File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/AntClassLoaderDelegationTest.java | File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/AntClassLoaderDelegationTest.java | |||
Method name: void testFindResources()
|
Method name: void testFindIsolateResources()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | String buildTestcases = System.getProperty("build.tests");↵ | 1 | String buildTestcases = System.getProperty("build.tests");↵ | |
2 | assertNotNull("defined ${build.tests}", buildTestcases);↵ | 2 | assertNotNull("defined ${build.tests}", buildTestcases);↵ | |
3 | assertTrue("have a dir " + buildTestcases,↵ | 3 | assertTrue("have a dir " + buildTestcases,↵ | |
4 | new File(buildTestcases).isDirectory());↵ | 4 | new File(buildTestcases).isDirectory());↵ | |
5 | Path path = new Path(p, buildTestcases + "/org");↵ | 5 | Path path = new Path(p, buildTestcases + "/org");↵ | |
6 | // A special parent loader which is not the system class loader:↵ | 6 | // A special parent loader which is not the system class loader:↵ | |
7 | ClassLoader parent = new ParentLoader(); | 7 |
| |
See real code fragment | See real code fragment |
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 | 17 |
Number of mapped statements | 5 |
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 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | String buildTestcases = System.getProperty("build.tests"); | 1 | String buildTestcases = System.getProperty("build.tests"); | |
2 | assertNotNull("defined ${build.tests}", buildTestcases); | 2 | assertNotNull("defined ${build.tests}", buildTestcases); | |
3 | assertTrue("have a dir " + buildTestcases, new File(buildTestcases).isDirectory()); | 3 | assertTrue("have a dir " + buildTestcases, new File(buildTestcases).isDirectory()); | |
4 | Path path = new Path(p, buildTestcases + "/org"); | 4 | Path path = new Path(p, buildTestcases + "/org"); | |
5 | ClassLoader parent = new ParentLoader(); | 5 | ClassLoader parent = new ParentLoader(); |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables path, parent, buildTestcases , while Clone fragment #2 returns variables buildTestcases, path, parent |