if (entry != null
&& entry.getTag() == ConstantPoolEntry.CONSTANT_CLASS) {
ClassCPInfo classEntry = (ClassCPInfo) entry;
if (!classEntry.getClassName().equals(className)) {
classRefs.addElement(
ClassFileUtils.convertSlashName(classEntry.getClassName()));
}
}
if (element instanceof InterfaceMethodRefCPInfo) {
InterfaceMethodRefCPInfo interfaceMethodRefEntry
= (InterfaceMethodRefCPInfo) element;
if (interfaceMethodRefEntry.getInterfaceMethodClassName().equals(
interfaceMethodClassName)
&& interfaceMethodRefEntry.getInterfaceMethodName().equals(
interfaceMethodName)
&& interfaceMethodRefEntry.getInterfaceMethodType().equals(
interfaceMethodType)) {
index = i;
}
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/depend/ClassFile.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/depend/constantpool/ConstantPool.java
|
Method name: Vector getClassRefs()
|
|
Method name: int getInterfaceMethodRefEntry(String, String, String)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (entry != null↵ | | 1 | if (element instanceof InterfaceMethodRefCPInfo) {↵
|
2 | && entry.getTag() == ConstantPoolEntry.CONSTANT_CLASS) {↵ | | 2 | ↵
|
3 | ClassCPInfo classEntry = (Class↵ | | 3 | InterfaceMethodRefCPInfo interfaceMethodRefEntry↵
|
4 | CPInfo) entry;↵ | | 4 | = (InterfaceMethodRefCPInfo) element;↵
|
|
5 | if (!classEntry.getClassName().equals(c↵ | | 5 | if (interfaceMethodRefEntry.getInterfaceMethodClassName().equals(↵
|
6 | lassName)) {↵ | | 6 | interfaceMethodClassName)↵
|
|
7 | classRefs.addElement(↵ | | 7 | ↵
|
8 | ClassFileUtils.convertSlashName(classEntry.getClassName()))↵ | | 8 | && interfaceMethodRefEntry.getInterfaceMethodName().equals(↵
|
| | | 9 | interfaceMethodName)↵
|
| | | 10 | && interfaceMethodRefEntry.getInterfaceMethodType().equals(↵
|
| | | 11 | interfaceMethodType)) {↵
|
9 | ;↵ | | 12 | index = i;↵
|
10 | }↵ | | 13 | }↵
|
11 | } | | 14 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |