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);
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);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/depend/constantpool/InterfaceMethodRefCPInfo.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/depend/constantpool/MethodRefCPInfo.java
Method name: void resolve(ConstantPool) Method name: void resolve(ConstantPool)
Number of AST nodes: 8 Number of AST nodes: 8
1
ClassCPInfo interfaceMethodClass
1
ClassCPInfo methodClass
2
             = (ClassCPInfo) constantPool.getEntry(classIndex);
2
             = (ClassCPInfo) constantPool.getEntry(classIndex);
3
        interfaceMethodClass.resolve(constantPool);
3
        methodClass.resolve(constantPool);
4
        interfaceMethodClassName = interfaceMethodClass.getClassName();
4
        methodClassName = methodClass.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
        interfaceMethodName = nt.getName();
8
        methodName = nt.getName();
9
        interfaceMethodType = nt.getType();
9
        methodType = 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 interfaceMethodClass = (ClassCPInfo)constantPool.getEntry(classIndex);
    1
    ClassCPInfo interfaceMethodClass = (ClassCPInfo)constantPool.getEntry(classIndex);
    1
    ClassCPInfo methodClass = (ClassCPInfo)constantPool.getEntry(classIndex);
    Differences
    Expression1Expression2Difference
    interfaceMethodClassmethodClassVARIABLE_NAME_MISMATCH
    1
    ClassCPInfo methodClass = (ClassCPInfo)constantPool.getEntry(classIndex);
    2
    interfaceMethodClass.resolve(constantPool);
    2
    interfaceMethodClass.resolve(constantPool);
    2
    methodClass.resolve(constantPool);
    Differences
    Expression1Expression2Difference
    interfaceMethodClassmethodClassVARIABLE_NAME_MISMATCH
    2
    methodClass.resolve(constantPool);
    3
    interfaceMethodClassName = interfaceMethodClass.getClassName();
    3
    interfaceMethodClassName = interfaceMethodClass.getClassName();
    3
    methodClassName = methodClass.getClassName();
    Differences
    Expression1Expression2Difference
    interfaceMethodClassNamemethodClassNameVARIABLE_NAME_MISMATCH
    interfaceMethodClassmethodClassVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression interfaceMethodClassName is a field being modified, and thus it cannot be parameterized
    Expression methodClassName is a field being modified, and thus it cannot be parameterized
    3
    methodClassName = methodClass.getClassName();
    4
    NameAndTypeCPInfo nt = (NameAndTypeCPInfo)constantPool.getEntry(nameAndTypeIndex);
    4
    NameAndTypeCPInfo nt = (NameAndTypeCPInfo)constantPool.getEntry(nameAndTypeIndex);
    5
    nt.resolve(constantPool);
    5
    nt.resolve(constantPool);
    6
    interfaceMethodName = nt.getName();
    6
    interfaceMethodName = nt.getName();
    6
    methodName = nt.getName();
    Differences
    Expression1Expression2Difference
    interfaceMethodNamemethodNameVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression interfaceMethodName is a field being modified, and thus it cannot be parameterized
    Expression methodName is a field being modified, and thus it cannot be parameterized
    6
    methodName = nt.getName();
    7
    interfaceMethodType = nt.getType();
    7
    interfaceMethodType = nt.getType();
    7
    methodType = nt.getType();
    Differences
    Expression1Expression2Difference
    interfaceMethodTypemethodTypeVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression interfaceMethodType is a field being modified, and thus it cannot be parameterized
    Expression methodType is a field being modified, and thus it cannot be parameterized
    7
    methodType = nt.getType();
    8
    super.resolve(constantPool);
    8
    super.resolve(constantPool);
    Precondition Violations (6)
    Row Violation
    1Expression interfaceMethodClassName is a field being modified, and thus it cannot be parameterized
    2Expression methodClassName is a field being modified, and thus it cannot be parameterized
    3Expression interfaceMethodName is a field being modified, and thus it cannot be parameterized
    4Expression methodName is a field being modified, and thus it cannot be parameterized
    5Expression interfaceMethodType is a field being modified, and thus it cannot be parameterized
    6Expression methodType is a field being modified, and thus it cannot be parameterized