String[] dirs = p.list();
for (int i = 0; i < dirs.length; i++) {
executableFile
= FILE_UTILS.resolveFile(new File(dirs[i]), exec);
if (executableFile.exists()) {
return executableFile.getAbsolutePath();
}
}
Argument arg = (Argument) arguments.elementAt(i);
String[] s = arg.getParts();
if (s != null) {
for (int j = 0; j < s.length; j++) {
list.add(s[j]);
}
}
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/types/Commandline.java
|
Method name: String resolveExecutable(String, boolean)
|
|
Method name: void addArgumentsToList(ListIterator)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | String[] dirs = p.list();↵ | | 1 | Argument arg = (Argument) arguments.elementAt(i);↵
|
2 | for (int i = 0; i < dirs.length; i++) {↵ | | 2 | ↵
|
3 | executableFile↵ | | |
|
4 | = FILE_UTILS.resolveFile(new File(dirs[i]), exec);↵ | | |
|
5 | if (executableFile.exists()) {↵ | | |
|
6 | return executableFile.getAbsolutePath(↵ | | 3 | String[] s = arg.getParts();↵
|
| | | 4 | if (s != null) {↵
|
| | | 5 | for (int j = 0; j < s.length; j++) {↵
|
7 | );↵ | | 6 | list.add(s[j]);↵
|
8 | }↵ | | 7 | ↵
|
9 | ↵ | | 8 | }↵
|
10 | } | | 9 | }
|
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 |