for (Enumeration e = vendorTools.elements();
e.hasMoreElements();) {
HotDeploymentTool tool = (HotDeploymentTool) e.nextElement();
tool.validateAttributes();
tool.deploy();
}
for( Iterator i = cleanUpList.iterator(); i.hasNext(); ) {
File file = (File) i.next();
file.delete();
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/j2ee/ServerDeploy.java
|
|
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/ssh/ScpTest.java
|
Method name: void execute()
|
|
Method name: void tearDown()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 3
|
|
1 | for (Enumeration e = vendorTools.elements();↵ | | 1 | for↵
|
2 | e.hasMoreElements();) {↵ | | 2 | ( Iterator i = cleanUpList.iterator(); i.hasNext(); ) {↵
|
3 | HotDeploymentTool tool = (HotDeploymentTool) e.nextElement();↵ | | 3 | File file = (File) i.next();↵
|
4 | tool.validateAttributes();↵ | | 4 | ↵
|
5 | tool.deploy();↵ | | 5 | file.delete();↵
|
6 | } | | 6 | }
|
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 |