if (FileUtils.isAbsolutePath(path)) {
String[] s = FILE_UTILS.dissect(path);
ret.add(s[0]);
path = s[1];
}
if (FileUtils.isAbsolutePath(path)) {
String[] s = FILE_UTILS.dissect(path);
root = 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/types/selectors/SelectorUtils.java
|
Method name: Vector tokenizePath(String, String)
|
|
Method name: String[] tokenizePathAsArray(String)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (FileUtils.isAbsolutePath(path)) {↵ | | 1 | if (FileUtils.isAbsolutePath(path)) {↵
|
2 | String[] s = FILE_UTILS.dissect(path);↵ | | 2 | String[] s = FILE_UTILS.dissect(path);↵
|
3 | ret.add(s[0]);↵ | | 3 | root = s[0];↵
|
4 | path = s[1];↵ | | 4 | path = s[1];↵
|
5 | } | | 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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 16 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 3 |
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.7 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | if (FileUtils.isAbsolutePath(path)) | | 2 | if (FileUtils.isAbsolutePath(path)) |
3 | String[] s = FILE_UTILS.dissect(path); | | 3 | String[] s = FILE_UTILS.dissect(path); |
| | | 4 | |
4 | | | | |
5 | | | 5 | |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variables s, path , while Clone fragment #2 returns variables s, path |