ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
ds.setExcludes(new String[] {"**/gamma/**"});
ds.setFollowSymlinks(false);
ds.scan();
ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
ds.setExcludes(new String[] {"alpha/**"});
ds.setFollowSymlinks(false);
ds.scan();
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/DirectoryScannerTest.java
|
|
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/DirectoryScannerTest.java
|
Method name: void testIsExcludedDirectoryScanned()
|
|
Method name: void testChildrenOfExcludedDirectory()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));↵ | | 1 | ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));↵
|
2 | ds.setExcludes(new String[] {"**/gamma/**"});↵ | | 2 | ds.setExcludes(new String[] {"alpha/**"});↵
|
3 | ds.setFollowSymlinks(false);↵ | | 3 | ds.setFollowSymlinks(false);↵
|
4 | ds.scan(); | | 4 | ds.scan();
|
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 | 16 |
-
{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 |
7 | ds.setBasedir(new File(getProject().getBaseDir(), "tmp")); | | 3 | ds.setBasedir(new File(getProject().getBaseDir(), "tmp")); |
8 | ds.setExcludes(new String[] {"**/gamma/**"}); | | 4 | ds.setExcludes(new String[] {"alpha/**"}); |
9 | ds.setFollowSymlinks(false); | | 5 | ds.setFollowSymlinks(false); |
10 | ds.scan(); | | 6 | ds.scan(); |
Precondition Violations (0)
Row |
Violation |