if (child instanceof TaskContainer) {
// taskcontainer nested element can contain other tasks - no other
// nested elements possible
new TaskHandler(helperImpl, this, (TaskContainer) child,
childWrapper, target).init(name, attrs);
} else {
new NestedElementHandler(helperImpl, this, child,
childWrapper, target).init(name, attrs);
}
if (task instanceof TaskContainer) {
// task can contain other tasks - no other nested elements possible
new TaskHandler(helperImpl, this, (TaskContainer) task,
wrapper, target).init(name, attrs);
} else {
new NestedElementHandler(helperImpl, this, task,
wrapper, target).init(name, attrs);
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/helper/ProjectHelperImpl.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/helper/ProjectHelperImpl.java
|
Method name: void startElement(String, AttributeList)
|
|
Method name: void startElement(String, AttributeList)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if (child instanceof TaskContainer) {↵ | | 1 | if (task instanceof TaskContainer) {↵
|
2 | // taskcontainer nested element can contain other tasks - no other↵ | | 2 | // task can contain other tasks - no other↵
|
3 | // nested elements possible↵ | | 3 | nested elements possible↵
|
4 | new TaskHandler(helperImpl, this, (TaskContainer) child,↵ | | 4 | new TaskHandler(helperImpl, this, (TaskContainer) task,↵
|
5 | childWrapper, target).init(name, attrs);↵ | | 5 | wrapper, target).init(name, attrs);↵
|
6 | } else {↵ | | 6 | } else {↵
|
7 | new NestedElementHandler(helperImpl, this, child,↵ | | 7 | new NestedElementHandler(helperImpl, this, task,↵
|
8 | childWrapper, target).init(name, attrs);↵ | | 8 | wrapper, target).init(name, attrs);↵
|
9 | } | | 9 | }
|
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 the same java file |
Number of node comparisons | 1 |