File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/CommandlineTest.java | File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/util/facade/ImplementationSpecificArgumentTest.java | |||
Method name: void testAwkCommand()
|
Method name: void testDependsOnImplementation()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | String[] s = c.getCommandline();↵ | 1 | String[] parts = ia.getParts();↵ | |
2 | assertNotNull(s);↵ | 2 | assertNotNull(parts);↵ | |
3 | assertEquals(2, s.length);↵ | 3 | assertEquals(2, parts.length);↵ | |
4 | assertEquals("awk", s[0]);↵ | 4 | assertEquals("A", parts[0]);↵ | |
5 | assertEquals("'NR == 2 { print $NF }'", s[1]); | 5 | assertEquals("B", parts[1]); | |
See real code fragment | See real code fragment |
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 in different classes having the same super class |
Number of node comparisons | 25 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 3 | String[] parts = ia.getParts(); | |||||||||||||||
4 | String[] s = c.getCommandline(); | | |||||||||||||||
5 | assertNotNull(s); |
| 4 | assertNotNull(parts); | |||||||||||||
6 | assertEquals(2, s.length); |
| 5 | assertEquals(2, parts.length); | |||||||||||||
7 | assertEquals("awk", s[0]); |
| 6 | assertEquals("A", parts[0]); | |||||||||||||
8 | assertEquals("'NR == 2 { print $NF }'", s[1]); |
| 7 | assertEquals("B", parts[1]); |
Row | Violation |
---|