for (Iterator i = unknownElements.iterator();
i.hasNext();) {
UnknownElement child = copy((UnknownElement) i.next());
rc.addChild(child.getWrapper());
ret.addChild(child);
}
while (it.hasNext()) {
BaseAssertion assertion = (BaseAssertion) it.next();
String arg = assertion.toCommand();
getProject().log("adding assertion " + arg, Project.MSG_DEBUG);
commandList.add(arg);
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/MacroInstance.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/Assertions.java
|
Method name: UnknownElement copy(UnknownElement)
|
|
Method name: void applyAssertions(List)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 5
|
|
1 | for (Iterator i = unknownElements.iterator();↵ | | |
|
2 | i.hasNext();) {↵ | | 1 | while (it.hasNext()) {↵
|
3 | UnknownElement child = copy((UnknownElement) i.next());↵ | | 2 | BaseAssertion assertion = (BaseAssertion) it.next();↵
|
4 | rc.addChild(child.getWrapper());↵ | | 3 | ↵
|
5 | ret.addChild(child);↵ | | |
|
6 | ↵ | | 4 | String arg = assertion.toCommand();↵
|
| | | 5 | getProject().log("adding assertion " + arg, Project.MSG_DEBUG);↵
|
| | | 6 | commandList.add(arg);↵
|
7 | } | | 7 | }
|
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.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 1 |