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 fieldClass = (ClassCPInfo) constantPool.getEntry(classIndex); fieldClass.resolve(constantPool); fieldClassName = fieldClass.getClassName(); NameAndTypeCPInfo nt = (NameAndTypeCPInfo) constantPool.getEntry(nameAndTypeIndex); nt.resolve(constantPool); fieldName = nt.getName(); fieldType = 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/FieldRefCPInfo.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 fieldClass
2
             = (ClassCPInfo) constantPool.getEntry(classIndex);
2
            = (ClassCPInfo) constantPool.getEntry(classIndex);
3
        methodClass.resolve(constantPool);
3
        fieldClass.resolve(constantPool);
4
        methodClassName = methodClass.getClassName();
4
        fieldClassName = fieldClass.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
        fieldName = nt.getName();
9
        methodType = nt.getType();
9
        fieldType = 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 fieldClass = (ClassCPInfo)constantPool.getEntry(classIndex);
    Differences
    Expression1Expression2Difference
    methodClassfieldClassVARIABLE_NAME_MISMATCH
    1
    ClassCPInfo fieldClass = (ClassCPInfo)constantPool.getEntry(classIndex);
    2
    methodClass.resolve(constantPool);
    2
    methodClass.resolve(constantPool);
    2
    fieldClass.resolve(constantPool);
    Differences
    Expression1Expression2Difference
    methodClassfieldClassVARIABLE_NAME_MISMATCH
    2
    fieldClass.resolve(constantPool);
    3
    methodClassName = methodClass.getClassName();
    3
    methodClassName = methodClass.getClassName();
    3
    fieldClassName = fieldClass.getClassName();
    Differences
    Expression1Expression2Difference
    methodClassNamefieldClassNameVARIABLE_NAME_MISMATCH
    methodClassfieldClassVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression methodClassName is a field being modified, and thus it cannot be parameterized
    Expression fieldClassName is a field being modified, and thus it cannot be parameterized
    3
    fieldClassName = fieldClass.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
    fieldName = nt.getName();
    Differences
    Expression1Expression2Difference
    methodNamefieldNameVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression methodName is a field being modified, and thus it cannot be parameterized
    Expression fieldName is a field being modified, and thus it cannot be parameterized
    6
    fieldName = nt.getName();
    7
    methodType = nt.getType();
    7
    methodType = nt.getType();
    7
    fieldType = nt.getType();
    Differences
    Expression1Expression2Difference
    methodTypefieldTypeVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression methodType is a field being modified, and thus it cannot be parameterized
    Expression fieldType is a field being modified, and thus it cannot be parameterized
    7
    fieldType = 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 fieldClassName 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 fieldName 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 fieldType is a field being modified, and thus it cannot be parameterized