CPD Results
The following document contains the results of PMD's CPD 7.20.0.
Duplications
| File |
Line |
| org/apache/bcel/Const.java |
2955 |
| org/apache/bcel/Const.java |
2974 |
{ T_BYTE }/* astore */, {}/* istore_0 */, {}/* istore_1 */, {}/* istore_2 */, {}/* istore_3 */, {}/* lstore_0 */, {}/* lstore_1 */,
{}/* lstore_2 */, {}/* lstore_3 */, {}/* fstore_0 */, {}/* fstore_1 */, {}/* fstore_2 */, {}/* fstore_3 */, {}/* dstore_0 */, {}/* dstore_1 */,
{}/* dstore_2 */, {}/* dstore_3 */, {}/* astore_0 */, {}/* astore_1 */, {}/* astore_2 */, {}/* astore_3 */, {}/* iastore */, {}/* lastore */,
{}/* fastore */, {}/* dastore */, {}/* aastore */, {}/* bastore */, {}/* castore */, {}/* sastore */, {}/* pop */, {}/* pop2 */, {}/* dup */,
{}/* dup_x1 */, {}/* dup_x2 */, {}/* dup2 */, {}/* dup2_x1 */, {}/* dup2_x2 */, {}/* swap */, {}/* iadd */, {}/* ladd */, {}/* fadd */,
{}/* dadd */, {}/* isub */, {}/* lsub */, {}/* fsub */, {}/* dsub */, {}/* imul */, {}/* lmul */, {}/* fmul */, {}/* dmul */, {}/* idiv */,
{}/* ldiv */, {}/* fdiv */, {}/* ddiv */, {}/* irem */, {}/* lrem */, {}/* frem */, {}/* drem */, {}/* ineg */, {}/* lneg */, {}/* fneg */, |
| File |
Line |
| org/apache/bcel/verifier/structurals/ControlFlowGraph.java |
129 |
| org/apache/bcel/verifier/structurals/Subroutines.java |
360 |
single[0] = ((JsrInstruction) inst).getTarget();
return single;
}
if (inst instanceof GotoInstruction) {
single[0] = ((GotoInstruction) inst).getTarget();
return single;
}
if (inst instanceof BranchInstruction) {
if (inst instanceof Select) {
// BCEL's getTargets() returns only the non-default targets,
// thanks to Eli Tilevich for reporting.
final InstructionHandle[] matchTargets = ((Select) inst).getTargets();
final InstructionHandle[] ret = new InstructionHandle[matchTargets.length + 1];
ret[0] = ((Select) inst).getTarget();
System.arraycopy(matchTargets, 0, ret, 1, matchTargets.length);
return ret;
}
final InstructionHandle[] pair = new InstructionHandle[2];
pair[0] = getInstruction().getNext(); |
| File |
Line |
| org/apache/bcel/classfile/ConstantClass.java |
73 |
| org/apache/bcel/classfile/ConstantModule.java |
78 |
| org/apache/bcel/classfile/ConstantPackage.java |
78 |
v.visitConstantClass(this);
}
/**
* Dumps constant class to file stream in binary format.
*
* @param file Output file stream.
* @throws IOException if an I/O error occurs writing to the DataOutputStream.
*/
@Override
public void dump(final DataOutputStream file) throws IOException {
file.writeByte(super.getTag());
file.writeShort(nameIndex);
}
/**
* Gets the dereferenced string.
*
* @param cp the constant pool.
* @return dereferenced string.
*/
public String getBytes(final ConstantPool cp) {
return (String) getConstantValue(cp);
}
/**
* Gets the String object.
*
* @param cp the constant pool.
* @return String object.
*/
@Override
public Object getConstantValue(final ConstantPool cp) {
return cp.getConstantUtf8(nameIndex).getBytes();
}
/**
* Gets the name index in constant pool of class name.
*
* @return Name index in constant pool of class name.
*/
public int getNameIndex() {
return nameIndex;
}
/**
* Sets the name index in the constant pool.
*
* @param nameIndex the name index in the constant pool of this Constant Class.
*/
public void setNameIndex(final int nameIndex) {
this.nameIndex = nameIndex;
}
/**
* @return String representation.
*/
@Override
public String toString() {
return super.toString() + "(nameIndex = " + nameIndex + ")";
}
} |
| File |
Line |
| org/apache/bcel/Const.java |
2959 |
| org/apache/bcel/Const.java |
2974 |
{}/* dup_x1 */, {}/* dup_x2 */, {}/* dup2 */, {}/* dup2_x1 */, {}/* dup2_x2 */, {}/* swap */, {}/* iadd */, {}/* ladd */, {}/* fadd */,
{}/* dadd */, {}/* isub */, {}/* lsub */, {}/* fsub */, {}/* dsub */, {}/* imul */, {}/* lmul */, {}/* fmul */, {}/* dmul */, {}/* idiv */,
{}/* ldiv */, {}/* fdiv */, {}/* ddiv */, {}/* irem */, {}/* lrem */, {}/* frem */, {}/* drem */, {}/* ineg */, {}/* lneg */, {}/* fneg */,
{}/* dneg */, {}/* ishl */, {}/* lshl */, {}/* ishr */, {}/* lshr */, {}/* iushr */, {}/* lushr */, {}/* iand */, {}/* land */, {}/* ior */,
{}/* lor */, {}/* ixor */, {}/* lxor */, { T_BYTE, T_BYTE }/* iinc */, {}/* i2l */, {}/* i2f */, {}/* i2d */, {}/* l2i */, {}/* l2f */, {}/* l2d */, |
| File |
Line |
| org/apache/bcel/Const.java |
2955 |
| org/apache/bcel/Const.java |
2959 |
{ T_BYTE }/* astore */, {}/* istore_0 */, {}/* istore_1 */, {}/* istore_2 */, {}/* istore_3 */, {}/* lstore_0 */, {}/* lstore_1 */,
{}/* lstore_2 */, {}/* lstore_3 */, {}/* fstore_0 */, {}/* fstore_1 */, {}/* fstore_2 */, {}/* fstore_3 */, {}/* dstore_0 */, {}/* dstore_1 */,
{}/* dstore_2 */, {}/* dstore_3 */, {}/* astore_0 */, {}/* astore_1 */, {}/* astore_2 */, {}/* astore_3 */, {}/* iastore */, {}/* lastore */,
{}/* fastore */, {}/* dastore */, {}/* aastore */, {}/* bastore */, {}/* castore */, {}/* sastore */, {}/* pop */, {}/* pop2 */, {}/* dup */,
{}/* dup_x1 */, {}/* dup_x2 */, {}/* dup2 */, {}/* dup2_x1 */, {}/* dup2_x2 */, {}/* swap */, {}/* iadd */, {}/* ladd */, {}/* fadd */, |
| File |
Line |
| org/apache/bcel/verifier/statics/Pass2Verifier.java |
1024 |
| org/apache/bcel/verifier/statics/Pass2Verifier.java |
1052 |
| org/apache/bcel/verifier/statics/Pass2Verifier.java |
1085 |
throw new ClassConstraintException("Invalid field name '" + name + "' referenced by '" + tostring(obj) + "'.");
}
final int classIndex = obj.getClassIndex();
final ConstantClass cc = (ConstantClass) cp.getConstant(classIndex);
final String className = ((ConstantUtf8) cp.getConstant(cc.getNameIndex())).getBytes(); // Class Name in internal form
if (!validClassName(className)) {
throw new ClassConstraintException("Illegal class name '" + className + "' used by '" + tostring(obj) + "'.");
}
final String sig = ((ConstantUtf8) cp.getConstant(cnat.getSignatureIndex())).getBytes(); // Field or Method sig.(=descriptor)
try { |
| File |
Line |
| org/apache/bcel/verifier/structurals/ExecutionVisitor.java |
844 |
| org/apache/bcel/verifier/structurals/ExecutionVisitor.java |
894 |
public void visitINVOKEINTERFACE(final INVOKEINTERFACE o) {
stack().pop(); // objectref
stack().pop(o.getArgumentTypes(cpg).length);
// We are sure the invoked method will xRETURN eventually
// We simulate xRETURNs functionality here because we
// don't really "jump into" and simulate the invoked
// method.
if (o.getReturnType(cpg) != Type.VOID) {
Type t = o.getReturnType(cpg);
if (t.equals(Type.BOOLEAN) || t.equals(Type.CHAR) || t.equals(Type.BYTE) || t.equals(Type.SHORT)) {
t = Type.INT;
}
stack().push(t);
}
}
/** Symbolically executes the corresponding Java Virtual Machine instruction. */
@Override
public void visitINVOKESPECIAL(final INVOKESPECIAL o) { |
| File |
Line |
| org/apache/bcel/util/CodeHTML.java |
150 |
| org/apache/bcel/util/CodeHTML.java |
439 |
break;
/*
* Two address bytes + offset from start of byte stream form the jump target.
*/
case Const.GOTO:
case Const.IFEQ:
case Const.IFGE:
case Const.IFGT:
case Const.IFLE:
case Const.IFLT:
case Const.IFNE:
case Const.IFNONNULL:
case Const.IFNULL:
case Const.IF_ACMPEQ:
case Const.IF_ACMPNE:
case Const.IF_ICMPEQ:
case Const.IF_ICMPGE:
case Const.IF_ICMPGT:
case Const.IF_ICMPLE:
case Const.IF_ICMPLT:
case Const.IF_ICMPNE:
case Const.JSR:
index = bytes.getIndex() + bytes.readShort() - 1; |
| File |
Line |
| org/apache/bcel/Const.java |
2936 |
| org/apache/bcel/Const.java |
3037 |
| org/apache/bcel/Const.java |
3071 |
2/* ifnonnull */, 4/* goto_w */, 4/* jsr_w */, 0/* breakpoint */, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, RESERVED/* impdep1 */, RESERVED/* impdep2 */ |
| File |
Line |
| org/apache/bcel/verifier/structurals/ExecutionVisitor.java |
845 |
| org/apache/bcel/verifier/structurals/ExecutionVisitor.java |
871 |
| org/apache/bcel/verifier/structurals/ExecutionVisitor.java |
895 |
stack().pop(); // objectref
stack().pop(o.getArgumentTypes(cpg).length);
// We are sure the invoked method will xRETURN eventually
// We simulate xRETURNs functionality here because we
// don't really "jump into" and simulate the invoked
// method.
if (o.getReturnType(cpg) != Type.VOID) {
Type t = o.getReturnType(cpg);
if (t.equals(Type.BOOLEAN) || t.equals(Type.CHAR) || t.equals(Type.BYTE) || t.equals(Type.SHORT)) {
t = Type.INT;
}
stack().push(t);
}
}
/** Symbolically executes the corresponding Java Virtual Machine instruction. */
@Override
public void visitINVOKESPECIAL(final INVOKESPECIAL o) { |
| File |
Line |
| org/apache/bcel/Const.java |
2936 |
| org/apache/bcel/Const.java |
3037 |
| org/apache/bcel/Const.java |
3071 |
2/* ifnonnull */, 4/* goto_w */, 4/* jsr_w */, 0/* breakpoint */, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, RESERVED/* impdep1 */, RESERVED/* impdep2 */ |
| File |
Line |
| org/apache/bcel/Const.java |
3037 |
| org/apache/bcel/Const.java |
3071 |
UNPREDICTABLE/* multianewarray */, 1/* ifnull */, 1/* ifnonnull */, 0/* goto_w */, 0/* jsr_w */, 0/* breakpoint */, UNDEFINED, UNDEFINED, UNDEFINED,
UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNPREDICTABLE/* impdep1 */, |
|