if (src instanceof FileResource) {
return ((FileResource) src).getFile();
}
return null;
if (realThing instanceof Task) {
return (Task) realThing;
}
return null;
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/ArchiveFileSet.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/UnknownElement.java
|
Method name: File getSrc()
|
|
Method name: Task getTask()
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if (src instanceof FileResource) {↵ | | 1 | if (realThing instanceof Task) {↵
|
2 | return ((FileResource) src).getFile();↵ | | 2 | return (Task) realThing;↵
|
3 | }↵ | | 3 | }↵
|
4 | return null; | | 4 | return null;
|
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 having the same super class |
Number of node comparisons | 1 |