test3();
File file = new File(getProjectDir(), tempFile);
final long origSize = file.length();
executeTarget("test4");
File file2 = new File(getProjectDir(), tempFile2);
final long newSize = file2.length();
test3();
File file = new File(getProjectDir(), tempFile);
final long origSize = file.length();
executeTarget("testAppend");
File file2 = new File(getProjectDir(), tempFile2);
final long newSize = file2.length();
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/ConcatTest.java
|
|
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/ConcatTest.java
|
Method name: void test4()
|
|
Method name: void testAppend()
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | test3();↵ | | 1 | test3();↵
|
|
2 | File file = new File(getProjectDir(), tempFile);↵ | | 2 | File file = new File(getProjectDir(), tempFile);↵
|
3 | final long origSize = file.length();↵ | | 3 | final long origSize = file.length();↵
|
|
4 | executeTarget("test4");↵ | | 4 | executeTarget("testAppend");↵
|
|
5 | File file2 = new File(getProjectDir(), tempFile2);↵ | | 5 | File file2 = new File(getProjectDir(), tempFile2);↵
|
6 | final long newSize = file2.length(); | | 6 | final long newSize = file2.length();
|
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 declared in the same class |
Number of node comparisons | 16 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 6 |
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) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | test3(); | | 1 | test3(); |
2 | File file = new File(getProjectDir(), tempFile); | | 2 | File file = new File(getProjectDir(), tempFile); |
3 | final long origSize = file.length(); | | 3 | final long origSize = file.length(); |
4 | executeTarget("test4"); | | 4 | executeTarget("testAppend"); |
5 | File file2 = new File(getProjectDir(), tempFile2); | | 5 | File file2 = new File(getProjectDir(), tempFile2); |
6 | final long newSize = file2.length(); | | 6 | final long newSize = file2.length(); |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variables origSize, newSize , while Clone fragment #2 returns variables origSize, newSize |