while (e.hasMoreElements()) {
Object arg = e.nextElement();
if (inheritedProperties.containsKey(arg)) {
continue;
}
Object value = userProperties.get(arg);
other.setUserProperty(arg.toString(), value.toString());
}
if (list != null) {
for (Iterator i = list.iterator();
i.hasNext();) {
UnknownElement child = copy((UnknownElement) i.next());
rc.addChild(child.getWrapper());
ret.addChild(child);
}
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/PropertyHelper.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/MacroInstance.java
|
Method name: void copyUserProperties(Project)
|
|
Method name: UnknownElement copy(UnknownElement)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 5
|
|
1 | while (e.hasMoreElements()) {↵ | | |
|
2 | Object arg = e.nextElement();↵ | | |
|
3 | if (inheritedProperties.containsKey(arg)) {↵ | | |
|
4 | continue↵ | | 1 | if (list != null) {↵
|
| | | 2 | for (Iterator i = list.iterator();↵
|
| | | 3 | i.hasNext();) {↵
|
5 | ;↵ | | 4 | UnknownElement child = copy((UnknownElement) i.next());↵
|
6 | }↵ | | 5 | ↵
|
7 | Object value = userProperties.get(arg);↵ | | 6 | ↵
|
8 | other.setUserProperty(arg.toString(), value.toString());↵ | | |
|
| | | 7 | rc.addChild(child.getWrapper());↵
|
| | | 8 | ret.addChild(child);↵
|
| | | 9 | }↵
|
9 | } | | 10 | }
|
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 |
Number of node comparisons | 1 |