NodeList topChildren = topElement.getChildNodes();
int numChildren = topChildren.getLength();
for (int i = 0; i < numChildren; i++) {
addNodeRecursively(topChildren.item(i), prefix, null);
}
for (int i = 0; i < childDirectories.size(); i++) {
Directory current = (Directory) childDirectories.get(i);
if (current.getDirectory().equals(dir)) {
return current;
}
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/XmlProperty.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ssh/Directory.java
|
Method name: void execute()
|
|
Method name: Directory getChild(File)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | NodeList topChildren = topElement.getChildNodes();↵ | | |
|
2 | int numChild↵ | | 1 | for (int i = 0; i < childDirectories.size(); i++) {↵
|
3 | ren = topChildren.getLength();↵ | | 2 | Directory current = (Directory) childDirectories.get(i);↵
|
4 | for (int i = 0; i < numChildren; i++) {↵ | | 3 | ↵
|
5 | addNodeRecursively(topChildren.item(i), prefix, null)↵ | | 4 | if (current.getDirectory().equals(dir)) {↵
|
6 | ;↵ | | 5 | return current;↵
|
7 | ↵ | | 6 | }↵
|
8 | } | | 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.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |