Object arg = e.nextElement();
if (inheritedProperties.containsKey(arg)) {
continue;
}
Object value = userProperties.get(arg);
other.setUserProperty(arg.toString(), value.toString());
for (Enumeration p = properties.keys(); p.hasMoreElements();) {
String name = (String) p.nextElement();
if (name.startsWith(r.prefix)) {
names.add(name);
}
}
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/types/PropertySet.java
|
Method name: void copyUserProperties(Project)
|
|
Method name: void addPropertyNames(Set, Hashtable)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 4
|
|
1 | Object arg = e.nextElement();↵ | | 1 | for (Enumeration p = properties.keys(); p.hasMoreElements();↵
|
| | | 2 | ) {↵
|
2 | if (inheritedProperties.containsKey(arg)) {↵ | | 3 | ↵
|
3 | continue;↵ | | 4 | String name = (String) p.nextElement();↵
|
| | | 5 | if (name.startsWith(r.prefix)) {↵
|
4 | }↵ | | 6 | ↵
|
5 | Object value = userProperties.get(arg);↵ | | 7 | ↵
|
6 | other.setUserProperty(arg.toString(), value.toString()); | | 8 | names.add(name);↵
|
| | | 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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |