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: 5 | Number of AST nodes: 5 | |||
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 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 17 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | ClassCPInfo fieldClass = (ClassCPInfo)constantPool.getEntry(classIndex); |
| 1 | ClassCPInfo interfaceMethodClass = (ClassCPInfo)constantPool.getEntry(classIndex); | |||||||||||||||
2 | fieldClass.resolve(constantPool); |
| 2 | interfaceMethodClass.resolve(constantPool); | |||||||||||||||
3 | fieldClassName = fieldClass.getClassName(); |
| 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); |
Row | Violation |
---|---|
1 | Expression fieldClassName is a field being modified, and thus it cannot be parameterized |
2 | Expression interfaceMethodClassName is a field being modified, and thus it cannot be parameterized |