if (!d.exists()) {
if (!d.mkdirs()) {
log("Unable to create directory "
+ d.getAbsolutePath(), Project.MSG_ERR);
} else {
createCount++;
}
}
if (!d.exists()) {
if (!d.mkdirs()) {
log("Unable to create directory "
+ d.getAbsolutePath(), Project.MSG_ERR);
} else {
createCount++;
}
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Copy.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Move.java
|
Method name: void doFileOperations()
|
|
Method name: void doFileOperations()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (!d.exists()) {↵ | | 1 | if (!d.exists()) {↵
|
2 | if (!d.mkdirs()) {↵ | | 2 | if (!d.mkdirs()) {↵
|
3 | log("Unable to create directory "↵ | | 3 | log("Unable to create directory "↵
|
4 | + d.getAbsolutePath(), Project.MSG_ERR);↵ | | 4 | + d.getAbsolutePath(), Project.MSG_ERR);↵
|
5 | } else {↵ | | 5 | } else {↵
|
6 | createCount++;↵ | | 6 | createCount++;↵
|
7 | }↵ | | 7 | }↵
|
8 | } | | 8 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.5 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 14 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.1 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
27 | if (!d.exists()) | | 52 | if (!d.exists()) |
28 | | | 53 | |
29 | log("Unable to create directory " + d.getAbsolutePath(), Project.MSG_ERR); | | 54 | log("Unable to create directory " + d.getAbsolutePath(), Project.MSG_ERR); |
| | | | |
30 | | | 55 | |
Precondition Violations (0)
Row |
Violation |