File path: /jakarta-jmeter-2.3.2/test/src/org/apache/commons/cli/avalon/ClutilTestCase.java | File path: /jakarta-jmeter-2.3.2/test/src/org/apache/commons/cli/avalon/ClutilTestCase.java | |||
Method name: void testIncomplete2ArgsMixed()
|
Method name: void testIncomplete2ArgsMixedNoEq()
|
|||
Number of AST nodes: 12 | Number of AST nodes: 12 | |||
1 | final CLOptionDescriptor[] options = new CLOptionDescriptor[] { DEFINE, CLEAR1 };↵ | 1 | final CLOptionDescriptor[] options = new CLOptionDescriptor[] { DEFINE, CLEAR1 };↵ | |
2 | final String[] args = new String[] { "-Dstupid=", "-c" };↵ | 2 | final String[] args = new String[] { "-DStupid", "-c" };↵ | |
3 | final CLArgsParser parser = new CLArgsParser(args, options);↵ | 3 | final CLArgsParser parser = new CLArgsParser(args, options);↵ | |
4 | assertNull(parser.getErrorString(), parser.getErrorString());↵ | 4 | assertNull(parser.getErrorString(), parser.getErrorString());↵ | |
5 | final List clOptions = parser.getArguments();↵ | 5 | final List clOptions = parser.getArguments();↵ | |
6 | final int size = clOptions.size();↵ | 6 | final int size = clOptions.size();↵ | |
7 | assertEquals(size, 2);↵ | 7 | assertEquals(size, 2);↵ | |
8 | assertEquals(((CLOption) clOptions.get(1)).getDescriptor().getId(), CLEAR1_OPT);↵ | 8 | assertEquals(((CLOption) clOptions.get(1)).getDescriptor().getId(), CLEAR1_OPT);↵ | |
9 | final CLOption option = (CLOption) clOptions.get(0);↵ | 9 | final CLOption option = (CLOption) clOptions.get(0);↵ | |
10 | assertEquals(option.getDescriptor().getId(), DEFINE_OPT);↵ | 10 | assertEquals(option.getDescriptor().getId(), DEFINE_OPT);↵ | |
11 | assertEquals(option.getArgument(0), "stupid");↵ | 11 | assertEquals(option.getArgument(0), "Stupid");↵ | |
12 | assertEquals(option.getArgument(1), ""); | 12 |
| |
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 declared in the same class |
Number of node comparisons | 122 |
Number of mapped statements | 12 |
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | final CLOptionDescriptor[] options = new CLOptionDescriptor[] {DEFINE, CLEAR1}; | 1 | final CLOptionDescriptor[] options = new CLOptionDescriptor[] {DEFINE, CLEAR1}; | |||||||||||
2 | final String[] args = new String[] {"-Dstupid=", "-c"}; |
| 2 | final String[] args = new String[] {"-DStupid", "-c"}; | ||||||||||
3 | final CLArgsParser parser = new CLArgsParser(args, options); | 3 | final CLArgsParser parser = new CLArgsParser(args, options); | |||||||||||
4 | assertNull(parser.getErrorString(), parser.getErrorString()); | 4 | assertNull(parser.getErrorString(), parser.getErrorString()); | |||||||||||
5 | final List clOptions = parser.getArguments(); | 5 | final List clOptions = parser.getArguments(); | |||||||||||
6 | final int size = clOptions.size(); | 6 | final int size = clOptions.size(); | |||||||||||
7 | assertEquals(size, 2); | 7 | assertEquals(size, 2); | |||||||||||
8 | assertEquals(((CLOption)clOptions.get(1)).getDescriptor().getId(), CLEAR1_OPT); | 8 | assertEquals(((CLOption)clOptions.get(1)).getDescriptor().getId(), CLEAR1_OPT); | |||||||||||
9 | final CLOption option = (CLOption)clOptions.get(0); | 9 | final CLOption option = (CLOption)clOptions.get(0); | |||||||||||
10 | assertEquals(option.getDescriptor().getId(), DEFINE_OPT); | 10 | assertEquals(option.getDescriptor().getId(), DEFINE_OPT); | |||||||||||
11 | assertEquals(option.getArgument(0), "stupid"); |
| 11 | assertEquals(option.getArgument(0), "Stupid"); | ||||||||||
12 | assertEquals(option.getArgument(1), ""); | 12 | assertEquals(option.getArgument(1), ""); |
Row | Violation |
---|