while (e.hasMoreElements()) {
String arg = e.nextElement().toString();
if (other.getUserProperty(arg) != null) {
continue;
}
Object value = inheritedProperties.get(arg);
other.setInheritedProperty(arg, 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 copyInheritedProperties(Project)
|
|
Method name: UnknownElement copy(UnknownElement)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 5
|
|
1 | while (e.hasMoreElements()) {↵ | | |
|
2 | String arg = e.nextElement().toString↵ | | 1 | if (list != null) {↵
|
3 | ();↵ | | 2 | for (Iterator i = list.iterator();↵
|
4 | if (other.getUserProperty(arg) != null) {↵ | | 3 | ↵
|
5 | continue↵ | | 4 | i.hasNext();) {↵
|
6 | ;↵ | | 5 | UnknownElement child = copy((UnknownElement) i.next());↵
|
7 | }↵ | | 6 | ↵
|
8 | Object value = inheritedProperties.get(arg);↵ | | 7 | ↵
|
9 | other.setInheritedProperty(arg, value.toString());↵ | | |
|
| | | 8 | rc.addChild(child.getWrapper());↵
|
| | | 9 | ret.addChild(child);↵
|
| | | 10 | }↵
|
10 | } | | 11 | }
|
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 |