if (p == null) {
Vector envVars = Execute.getProcEnvironment();
Enumeration e = envVars.elements();
while (e.hasMoreElements()) {
String line = (String) e.nextElement();
if (isPath(line)) {
p = new Path(getProject(), line.substring(5));
break;
}
}
}
while (iter.hasNext()) {
FileResource r = (FileResource) iter.next();
File f = r.getFile();
if (f == null) {
f = new File(r.getBaseDir(), r.getName());
}
tarFile(f, tOut, f.getName(), tfs);
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/ExecTask.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Tar.java
|
Method name: String resolveExecutable(String, boolean)
|
|
Method name: void tar(ResourceCollection, TarOutputStream)
|
Number of AST nodes: 8
|
|
Number of AST nodes: 6
|
|
1 | if (p == null) {↵ | | |
|
2 | Vector envVars = Execute.getProcEnvironment();↵ | | |
|
3 | Enumeration e = envVars.elements();↵ | | |
|
4 | while (e.hasMoreElements()) {↵ | | |
|
5 | String line = (String) e.nextElement↵ | | 1 | while (iter.hasNext()) {↵
|
| | | 2 | FileResource r = (FileResource) iter.next();↵
|
6 | ();↵ | | 3 | File f = r.getFile();↵
|
7 | if (isPath(line)) {↵ | | 4 | if (f == null) {↵
|
8 | p = new Path(getProject(), line.substring(5));↵ | | 5 | f = new ↵
|
9 | ↵ | | 6 | File(r.getBaseDir(), r.getName());↵
|
10 | break;↵ | | 7 | }↵
|
11 | }↵ | | 8 | ↵
|
12 | }↵ | | 9 | tarFile(f, tOut, f.getName(), tfs);↵
|
13 | } | | 10 | }
|
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 |