ClassCPInfo methodClass = (ClassCPInfo) constantPool.getEntry(classIndex); methodClass.resolve(constantPool); methodClassName = methodClass.getClassName(); NameAndTypeCPInfo nt = (NameAndTypeCPInfo) constantPool.getEntry(nameAndTypeIndex); nt.resolve(constantPool); methodName = nt.getName(); methodType = nt.getType(); super.resolve(constantPool);
ClassCPInfo interfaceMethodClass = (ClassCPInfo) constantPool.getEntry(classIndex); interfaceMethodClass.resolve(constantPool); interfaceMethodClassName = interfaceMethodClass.getClassName(); NameAndTypeCPInfo nt = (NameAndTypeCPInfo) constantPool.getEntry(nameAndTypeIndex); nt.resolve(constantPool); interfaceMethodName = nt.getName(); interfaceMethodType = nt.getType(); super.resolve(constantPool);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/depend/constantpool/MethodRefCPInfo.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/depend/constantpool/InterfaceMethodRefCPInfo.java
Method name: void resolve(ConstantPool) Method name: void resolve(ConstantPool)
Number of AST nodes: 8 Number of AST nodes: 8
1
ClassCPInfo methodClass
1
ClassCPInfo interfaceMethodClass
2
             = (ClassCPInfo) constantPool.getEntry(classIndex);
2
             = (ClassCPInfo) constantPool.getEntry(classIndex);
3
        methodClass.resolve(constantPool);
3
        interfaceMethodClass.resolve(constantPool);
4
        methodClassName = methodClass.getClassName();
4
        interfaceMethodClassName = interfaceMethodClass.getClassName();
5
        NameAndTypeCPInfo nt
5
        NameAndTypeCPInfo nt
6
             = (NameAndTypeCPInfo) constantPool.getEntry(nameAndTypeIndex);
6
             = (NameAndTypeCPInfo) constantPool.getEntry(nameAndTypeIndex);
7
        nt.resolve(constantPool);
7
        nt.resolve(constantPool);
8
        methodName = nt.getName();
8
        interfaceMethodName = nt.getName();
9
        methodType = nt.getType();
9
        interfaceMethodType = nt.getType();
10
        super.resolve(constantPool);
10
        super.resolve(constantPool);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes having the same super class
Number of node comparisons31
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements8
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    ClassCPInfo methodClass = (ClassCPInfo)constantPool.getEntry(classIndex);
    1
    ClassCPInfo methodClass = (ClassCPInfo)constantPool.getEntry(classIndex);
    1
    ClassCPInfo interfaceMethodClass = (ClassCPInfo)constantPool.getEntry(classIndex);
    Differences
    Expression1Expression2Difference
    methodClassinterfaceMethodClassVARIABLE_NAME_MISMATCH
    1
    ClassCPInfo interfaceMethodClass = (ClassCPInfo)constantPool.getEntry(classIndex);
    2
    methodClass.resolve(constantPool);
    2
    methodClass.resolve(constantPool);
    2
    interfaceMethodClass.resolve(constantPool);
    Differences
    Expression1Expression2Difference
    methodClassinterfaceMethodClassVARIABLE_NAME_MISMATCH
    2
    interfaceMethodClass.resolve(constantPool);
    3
    methodClassName = methodClass.getClassName();
    3
    methodClassName = methodClass.getClassName();
    3
    interfaceMethodClassName = interfaceMethodClass.getClassName();
    Differences
    Expression1Expression2Difference
    methodClassNameinterfaceMethodClassNameVARIABLE_NAME_MISMATCH
    methodClassinterfaceMethodClassVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression methodClassName is a field being modified, and thus it cannot be parameterized
    Expression interfaceMethodClassName is a field being modified, and thus it cannot be parameterized
    3
    interfaceMethodClassName = interfaceMethodClass.getClassName();
    4
    NameAndTypeCPInfo nt = (NameAndTypeCPInfo)constantPool.getEntry(nameAndTypeIndex);
    4
    NameAndTypeCPInfo nt = (NameAndTypeCPInfo)constantPool.getEntry(nameAndTypeIndex);
    5
    nt.resolve(constantPool);
    5
    nt.resolve(constantPool);
    6
    methodName = nt.getName();
    6
    methodName = nt.getName();
    6
    interfaceMethodName = nt.getName();
    Differences
    Expression1Expression2Difference
    methodNameinterfaceMethodNameVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression methodName is a field being modified, and thus it cannot be parameterized
    Expression interfaceMethodName is a field being modified, and thus it cannot be parameterized
    6
    interfaceMethodName = nt.getName();
    7
    methodType = nt.getType();
    7
    methodType = nt.getType();
    7
    interfaceMethodType = nt.getType();
    Differences
    Expression1Expression2Difference
    methodTypeinterfaceMethodTypeVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression methodType is a field being modified, and thus it cannot be parameterized
    Expression interfaceMethodType is a field being modified, and thus it cannot be parameterized
    7
    interfaceMethodType = nt.getType();
    8
    super.resolve(constantPool);
    8
    super.resolve(constantPool);
    Precondition Violations (6)
    Row Violation
    1Expression methodClassName is a field being modified, and thus it cannot be parameterized
    2Expression interfaceMethodClassName is a field being modified, and thus it cannot be parameterized
    3Expression methodName is a field being modified, and thus it cannot be parameterized
    4Expression interfaceMethodName is a field being modified, and thus it cannot be parameterized
    5Expression methodType is a field being modified, and thus it cannot be parameterized
    6Expression interfaceMethodType is a field being modified, and thus it cannot be parameterized