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 \"2\" 3");↵ | 1 | s = Commandline.translateCommandline("1 \"2\'3\" 4");↵ | |
2 | assertEquals("Simple case with double quotes", 3, s.length);↵ | 2 | assertEquals("Case with double quotes around single quote", 3, s.length);↵ | |
3 | assertEquals("Double quotes have been stripped", "2",↵ | 3 | assertEquals("Double quotes stripped, single quote included", "2\'3",↵ | |
4 | s[1]);↵ | 4 | s[1]);↵ | |
5 | s = Commandline.translateCommandline("1 \"2 3\" 4");↵ | 5 | s = Commandline.translateCommandline("1 \'2 3\' 4");↵ | |
6 | assertEquals("Case with double quotes and whitespace", 3, s.length);↵ | 6 | assertEquals("Case with single quotes and whitespace", 3, s.length);↵ | |
7 | assertEquals("Double quotes stripped, space included", "2 3", s[1]); | 7 | assertEquals("Single quotes stripped, space included", "2 3", s[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 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 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12 | s = Commandline.translateCommandline("1 \"2\" 3"); |
| 18 | s = Commandline.translateCommandline("1 \"2\'3\" 4"); | |||||||||||||
13 | assertEquals("Simple case with double quotes", 3, s.length); |
| 19 | assertEquals("Case with double quotes around single quote", 3, s.length); | |||||||||||||
14 | assertEquals("Double quotes have been stripped", "2", s[1]); |
| 20 | assertEquals("Double quotes stripped, single quote included", "2\'3", s[1]); | |||||||||||||
15 | s = Commandline.translateCommandline("1 \"2 3\" 4"); |
| 21 | s = Commandline.translateCommandline("1 \'2 3\' 4"); | |||||||||||||
16 | assertEquals("Case with double quotes and whitespace", 3, s.length); |
| 22 | assertEquals("Case with single quotes and whitespace", 3, s.length); | |||||||||||||
17 | assertEquals("Double quotes stripped, space included", "2 3", s[1]); |
| 23 | assertEquals("Single quotes stripped, space included", "2 3", s[1]); |
Row | Violation |
---|