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);
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/FieldRefCPInfo.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 fieldClass
1
ClassCPInfo interfaceMethodClass
2
            = (ClassCPInfo) constantPool.getEntry(classIndex);
2
             = (ClassCPInfo) constantPool.getEntry(classIndex);
3
        fieldClass.resolve(constantPool);
3
        interfaceMethodClass.resolve(constantPool);
4
        fieldClassName = fieldClass.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
        fieldName = nt.getName();
8
        interfaceMethodName = nt.getName();
9
        fieldType = 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 fieldClass = (ClassCPInfo)constantPool.getEntry(classIndex);
    1
    ClassCPInfo fieldClass = (ClassCPInfo)constantPool.getEntry(classIndex);
    1
    ClassCPInfo interfaceMethodClass = (ClassCPInfo)constantPool.getEntry(classIndex);
    Differences
    Expression1Expression2Difference
    fieldClassinterfaceMethodClassVARIABLE_NAME_MISMATCH
    1
    ClassCPInfo interfaceMethodClass = (ClassCPInfo)constantPool.getEntry(classIndex);
    2
    fieldClass.resolve(constantPool);
    2
    fieldClass.resolve(constantPool);
    2
    interfaceMethodClass.resolve(constantPool);
    Differences
    Expression1Expression2Difference
    fieldClassinterfaceMethodClassVARIABLE_NAME_MISMATCH
    2
    interfaceMethodClass.resolve(constantPool);
    3
    fieldClassName = fieldClass.getClassName();
    3
    fieldClassName = fieldClass.getClassName();
    3
    interfaceMethodClassName = interfaceMethodClass.getClassName();
    Differences
    Expression1Expression2Difference
    fieldClassNameinterfaceMethodClassNameVARIABLE_NAME_MISMATCH
    fieldClassinterfaceMethodClassVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression fieldClassName 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
    fieldName = nt.getName();
    6
    fieldName = nt.getName();
    6
    interfaceMethodName = nt.getName();
    Differences
    Expression1Expression2Difference
    fieldNameinterfaceMethodNameVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression fieldName 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
    fieldType = nt.getType();
    7
    fieldType = nt.getType();
    7
    interfaceMethodType = nt.getType();
    Differences
    Expression1Expression2Difference
    fieldTypeinterfaceMethodTypeVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression fieldType 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 fieldClassName 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 fieldName 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 fieldType is a field being modified, and thus it cannot be parameterized
    6Expression interfaceMethodType is a field being modified, and thus it cannot be parameterized