File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/filters/HeadTailTest.java | File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/SubAntTest.java | |||
Method name: void testHeadSkip()
|
Method name: void testantfile()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | executeTarget("testHeadSkip");↵ | |||
2 | File expected = FILE_UTILS.resolveFile(getProject().getBaseDir(),"expected/head-tail.headSkip.test");↵ | |||
3 | File result = FILE_UTILS.resolveFile(getProject().getBaseDir(),"result/head-tail.headSkip.test");↵ | |||
4 | assertTrue("testHeadSkip: Result not like expected", FILE_UTILS.contentEquals(expected, result)↵ | 1 | File dir1 = project.resolveFile(".");↵ | |
2 | // basedir of subant/subant-test1/subant.xml is ..↵ | |||
3 | // therefore we expect here the subant/subant-test1 subdirectory↵ | |||
4 | File dir2 = project.resolveFile("subant/subant-test1");↵ | |||
5 | // basedir of subant/subant-test2/subant.xml is ..↵ | |||
6 | // therefore we expect here the subant subdirectory↵ | |||
7 | File dir3 = project.resolveFile("subant");↵ | |||
8 | testBaseDirs("testantfile",↵ | |||
9 | new String[] { dir1.getAbsolutePath(),↵ | |||
10 | dir2.getAbsolutePath(),↵ | |||
11 | dir3.getAbsolutePath()↵ | |||
5 | ); | 12 | }); | |
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 in different classes having the same super class |
Number of node comparisons | 16 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | File dir1 = project.resolveFile("."); | |||||||||||||||||||
| 2 | File dir2 = project.resolveFile("subant/subant-test1"); | |||||||||||||||||||
1 | executeTarget("testHeadSkip"); |
| 4 | testBaseDirs("testantfile", new String[] {dir1.getAbsolutePath(), dir2.getAbsolutePath(), dir3.getAbsolutePath()}); | |||||||||||||||||
2 | File expected = FILE_UTILS.resolveFile(getProject().getBaseDir(), "expected/head-tail.headSkip.test"); | | |||||||||||||||||||
| 3 | File dir3 = project.resolveFile("subant"); | |||||||||||||||||||
3 | File result = FILE_UTILS.resolveFile(getProject().getBaseDir(), "result/head-tail.headSkip.test"); | | |||||||||||||||||||
4 | assertTrue("testHeadSkip: Result not like expected", FILE_UTILS.contentEquals(expected, result)); | |
Row | Violation |
---|---|
1 | Expression executeTarget("testHeadSkip") is a void method call, and thus it cannot be parameterized |
2 | Expression testBaseDirs("testantfile",new String[]{dir1.getAbsolutePath(),dir2.getAbsolutePath(),dir3.getAbsolutePath()}) is a void method call, and thus it cannot be parameterized |
3 | Expression executeTarget("testHeadSkip") is a void method call, and thus it cannot be parameterized |
4 | Expression testBaseDirs("testantfile",new String[]{dir1.getAbsolutePath(),dir2.getAbsolutePath(),dir3.getAbsolutePath()}) is a void method call, and thus it cannot be parameterized |