while (e.hasMoreElements()) {
String propertyName = (String) e.nextElement();
String propertyValue = props.getProperty(propertyName);
String v = getProject().replaceProperties(propertyValue);
if (prefix != null) {
propertyName = prefix + propertyName;
}
addProperty(propertyName, v);
}
File thisLink = (File) litr.next();
File parent = thisLink.getParentFile();
Vector v = (Vector) byDir.get(parent);
if (v == null) {
v = new Vector();
byDir.put(parent, v);
}
v.addElement(thisLink);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Property.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
|
Method name: void addProperties(Properties)
|
|
Method name: void record()
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | while (e.hasMoreElements()) {↵ | | 1 | File ↵
|
2 | String propertyName = (String) e.nextElement();↵ | | 2 | thisLink = (File) litr.next();↵
|
3 | String propertyValue = props.getProperty(propertyName);↵ | | 3 | ↵
|
|
4 | String v = getProject().replaceProperties(propertyValue↵ | | 4 | File parent = thisLink.getParentFile();↵
|
5 | );↵ | | 5 | Vector v = (Vector) byDir.get(parent);↵
|
|
6 | if (prefix != null) {↵ | | 6 | if (v == null) {↵
|
7 | propertyName = prefix + propertyName;↵ | | 7 | v = new Vector();↵
|
8 | }↵ | | 8 | ↵
|
|
9 | addProperty(propertyName, v);↵ | | 9 | ↵
|
10 | } | | 10 | byDir.put(parent, v);↵
|
| | | 11 | }↵
|
| | | 12 | v.addElement(thisLink);
|
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 having the same super class |
Number of node comparisons | 1 |