for (Enumeration i = entries.elements(); i.hasMoreElements();) {
ConstantPoolEntry poolInfo = (ConstantPoolEntry) i.nextElement();
if (poolInfo != null && !poolInfo.isResolved()) {
poolInfo.resolve(this);
}
}
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/taskdefs/optional/depend/constantpool/ConstantPool.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/PropertySet.java
|
Method name: void resolve()
|
|
Method name: void addPropertyNames(Set, Hashtable)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | for (Enumeration i = entries.elements(); i.hasMoreElements();) {↵ | | 1 | for (Enumeration p = properties.keys(); p.hasMoreElements();) {↵
|
2 | ConstantPoolEntry poolInfo = (ConstantPoolEntry) i.nextElement();↵ | | 2 | String name = (String) p.nextElement();↵
|
|
3 | if (poolInfo != null && !poolInfo.isResolved()) {↵ | | 3 | if (name.startsWith(r.prefix)) {↵
|
4 | poolInfo.resolve(this);↵ | | 4 | ↵
|
5 | }↵ | | |
|
| | | 5 | names.add(name);↵
|
| | | 6 | }↵
|
6 | } | | 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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |