if (FileUtils.isAbsolutePath(path)) {
String[] s = FILE_UTILS.dissect(path);
ret.add(s[0]);
path = s[1];
}
String[] s = FILE_UTILS.dissect(path);
base = new File(s[0]);
path = s[1];
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/selectors/SelectorUtils.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/DirectoryScanner.java
|
Method name: Vector tokenizePath(String, String)
|
|
Method name: File findFile(File, String, boolean)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 3
|
|
1 | if (FileUtils.isAbsolutePath(path)) {↵ | | |
|
2 | String[] s = FILE_UTILS.dissect(path);↵ | | 1 | String[] s = FILE_UTILS.dissect(path);↵
|
3 | ret.add(s[0]);↵ | | 2 | base = new File(s[0]);↵
|
4 | path = s[1];↵ | | 3 | path = s[1];
|
5 | } | | | |
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 9 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
3 | String[] s = FILE_UTILS.dissect(path); | | 3 | String[] s = FILE_UTILS.dissect(path); |
| | | 4 | base = new File(s[0]); |
4 | ret.add(s[0]); | | | |
5 | path = s[1]; | | 5 | path = s[1]; |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variables s, path , while Clone fragment #2 returns variables s, path |