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/types/CommandlineTest.java | |||
Method name: void testTokenizer()
|
Method name: void testTokenizer()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | s = Commandline.translateCommandline("\"\"");↵ | 1 | s = Commandline.translateCommandline("1 2\\ 3 4");↵ | |
2 | assertEquals("Doublequoted null arg", 1, s.length);↵ | 2 | assertEquals("case with quoted whitespace", 4, s.length);↵ | |
3 | assertEquals("Doublequoted null arg", "", s[0]);↵ | 3 | assertEquals("backslash included", "2\\", s[1]);↵ | |
4 | // "" should become a single empty argument, same for ''↵ | |||
5 | // PR 5906↵ | |||
4 | s = Commandline.translateCommandline("\'\' a");↵ | 6 | s = Commandline.translateCommandline("\"\" a");↵ | |
5 | assertEquals("Singlequoted null arg prepend", 2, s.length);↵ | 7 | assertEquals("Doublequoted null arg prepend", 2, s.length);↵ | |
6 | assertEquals("Singlequoted null arg prepend", "", s[0]); | 8 | assertEquals("Doublequoted null arg prepend", "", s[0]); | |
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 the same method |
Number of node comparisons | 36 |
Number of mapped statements | 6 |
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 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
38 | s = Commandline.translateCommandline("\"\""); |
| 27 | s = Commandline.translateCommandline("1 2\\ 3 4"); | ||||||||||||||||
39 | assertEquals("Doublequoted null arg", 1, s.length); |
| 28 | assertEquals("case with quoted whitespace", 4, s.length); | ||||||||||||||||
40 | assertEquals("Doublequoted null arg", "", s[0]); |
| 29 | assertEquals("backslash included", "2\\", s[1]); | ||||||||||||||||
41 | s = Commandline.translateCommandline("\'\' a"); |
| 30 | s = Commandline.translateCommandline("\"\" a"); | ||||||||||||||||
42 | assertEquals("Singlequoted null arg prepend", 2, s.length); |
| 31 | assertEquals("Doublequoted null arg prepend", 2, s.length); | ||||||||||||||||
43 | assertEquals("Singlequoted null arg prepend", "", s[0]); |
| 32 | assertEquals("Doublequoted null arg prepend", "", s[0]); |
Row | Violation |
---|