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 testFilterReaderHeadLinesSkip()
|
Method name: void testantfile()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | executeTarget("testFilterReaderHeadLinesSkip");↵ | |||
2 | File expected = FILE_UTILS.resolveFile(getProject().getBaseDir(),↵ | |||
3 | "expected/head-tail.headLinesSkip.test");↵ | |||
4 | File result = FILE_UTILS.resolveFile(getProject().getBaseDir(),↵ | |||
5 | "result/head-tail.filterReaderHeadLinesSkip.tes↵ | 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↵ | |||
6 | t");↵ | 7 | File dir3 = project.resolveFile("subant");↵ | |
7 | assertTrue("testFilterReaderHeadLinesSkip: Result not like expected",↵ | 8 | ↵ | |
8 | FILE_UTILS.contentEquals(expected, result)↵ | 9 | testBaseDirs("testantfile",↵ | |
10 | new String[] { dir1.getAbsolutePath(),↵ | |||
11 | dir2.getAbsolutePath(),↵ | |||
12 | dir3.getAbsolutePath()↵ | |||
9 | ); | 13 | }); | |
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("testFilterReaderHeadLinesSkip"); |
| 4 | testBaseDirs("testantfile", new String[] {dir1.getAbsolutePath(), dir2.getAbsolutePath(), dir3.getAbsolutePath()}); | |||||||||||||||||
2 | File expected = FILE_UTILS.resolveFile(getProject().getBaseDir(), "expected/head-tail.headLinesSkip.test"); | | |||||||||||||||||||
| 3 | File dir3 = project.resolveFile("subant"); | |||||||||||||||||||
3 | File result = FILE_UTILS.resolveFile(getProject().getBaseDir(), "result/head-tail.filterReaderHeadLinesSkip.test"); | | |||||||||||||||||||
4 | assertTrue("testFilterReaderHeadLinesSkip: Result not like expected", FILE_UTILS.contentEquals(expected, result)); | |
Row | Violation |
---|---|
1 | Expression executeTarget("testFilterReaderHeadLinesSkip") 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("testFilterReaderHeadLinesSkip") 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 |