File f = getProject().resolveFile("tmpdir/ant/build.xml");
assertTrue("starting empty", !f.exists());
expectLogContaining("tag-attribute", "ANT_141 (revision: 1.175.2.13)");
assertTrue("now it is there", f.exists());
File f = getProject().resolveFile("tmpdir/ant/build.xml");
assertTrue("starting empty", !f.exists());
expectLogContaining("package-attribute", "U ant/build.xml");
assertTrue("now it is there", f.exists());
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/AbstractCvsTaskTest.java
|
|
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/AbstractCvsTaskTest.java
|
Method name: void testTagAttribute()
|
|
Method name: void testPackageAttribute()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | File f = getProject().resolveFile("tmpdir/ant/build.xml");↵ | | 1 | File f = getProject().resolveFile("tmpdir/ant/build.xml");↵
|
2 | assertTrue("starting empty", !f.exists());↵ | | 2 | assertTrue("starting empty", !f.exists());↵
|
3 | expectLogContaining("tag-attribute", "ANT_141 (revision: 1.175.2.13)");↵ | | 3 | expectLogContaining("package-attribute", "U ant/build.xml");↵
|
4 | assertTrue("now it is there", f.exists()); | | 4 | assertTrue("now it is there", f.exists());
|
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.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 10 |
-
{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) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | File f = getProject().resolveFile("tmpdir/ant/build.xml"); | | 1 | File f = getProject().resolveFile("tmpdir/ant/build.xml"); |
2 | assertTrue("starting empty", !f.exists()); | | 2 | assertTrue("starting empty", !f.exists()); |
3 | expectLogContaining("tag-attribute", "ANT_141 (revision: 1.175.2.13)"); | | 3 | expectLogContaining("package-attribute", "U ant/build.xml"); |
4 | assertTrue("now it is there", f.exists()); | | 4 | assertTrue("now it is there", f.exists()); |
Precondition Violations (0)
Row |
Violation |