String clazz = (String) it.next();
if (clazz.endsWith("Home.class")) {
//remove .class extension
String home = toClass(clazz);
homes.add(home);
log(" Home " + home, Project.MSG_VERBOSE);
}
String path = (String) merges.nextElement();
File f = new File(path);
if (f.getName().endsWith(".jar") || f.getName().endsWith(".zip")) {
//Do the merge
mergeZipJarContents(output, f);
} else {
//Add this file to the addfiles Vector and add it
//later at the top level of the output file.
addAddFile(path);
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/jlink/jlink.java
|
Method name: void writeJar(String, File, Hashtable, String)
|
|
Method name: void link()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | String clazz = (String) it.next();↵ | | 1 | String path = (String) ↵
|
2 | if (clazz.endsWith("Home.class↵ | | 2 | merges.nextElement();↵
|
| | | 3 | File f = new File(path);↵
|
|
3 | ")) {↵ | | 4 | if (f.getName().endsWith(".jar") || f.getName().endsWith(".zip")) {↵
|
4 | //remove .class extension↵ | | 5 | //↵
|
5 | String home = toClass(clazz);↵ | | |
|
6 | homes.add(home);↵ | | |
|
7 | log(" Home " + home, Project.MSG_VERBOSE↵ | | 6 | Do the merge↵
|
| | | 7 | mergeZipJarContents(output, f);↵
|
| | | 8 | } else {↵
|
| | | 9 | //Add this file to the addfiles Vector and add it↵
|
| | | 10 | //later at the top level of the output file.↵
|
8 | );↵ | | 11 | addAddFile(path);↵
|
9 | } | | 12 | }
|
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 |