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 testIncomplete2Args()
|
Method name: void testOptionalArgsWithArgShortBeforeOtherOpt()
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | assertNull(parser.getErrorString(), parser.getErrorString());↵ | 1 | assertNull(parser.getErrorString(), parser.getErrorString());↵ | |
2 | final List clOptions = parser.getArguments();↵ | 2 | final List clOptions = parser.getArguments();↵ | |
3 | final int size = clOptions.size();↵ | 3 | final int size = clOptions.size();↵ | |
4 | assertEquals(size, 1);↵ | 4 | assertEquals(size, 2);↵ | |
5 | final CLOption option = (CLOption) clOptions.get(0);↵ | 5 | final CLOption option0 = (CLOption) clOptions.get(0);↵ | |
6 | assertEquals(option.getDescriptor().getId(), DEFINE_OPT);↵ | 6 | assertEquals(option0.getDescriptor().getId(), TAINT_OPT);↵ | |
7 | assertEquals(option.getArgument(0), "stupid"); | 7 | assertEquals(option0.getArgument(0), "3"); | |
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 declared in the same class |
Number of node comparisons | 49 |
Number of mapped statements | 7 |
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 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | assertNull(parser.getErrorString(), parser.getErrorString()); | 4 | assertNull(parser.getErrorString(), parser.getErrorString()); | ||||||||||||||
4 | final List clOptions = parser.getArguments(); | 5 | final List clOptions = parser.getArguments(); | ||||||||||||||
5 | final int size = clOptions.size(); | 6 | final int size = clOptions.size(); | ||||||||||||||
6 | assertEquals(size, 1); |
| 7 | assertEquals(size, 2); | |||||||||||||
7 | final CLOption option = (CLOption)clOptions.get(0); |
| 8 | final CLOption option0 = (CLOption)clOptions.get(0); | |||||||||||||
8 | assertEquals(option.getDescriptor().getId(), DEFINE_OPT); |
| 9 | assertEquals(option0.getDescriptor().getId(), TAINT_OPT); | |||||||||||||
9 | assertEquals(option.getArgument(0), "stupid"); |
| 10 | assertEquals(option0.getArgument(0), "3"); |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variable option with type org.apache.commons.cli.avalon.CLOption , while Clone fragment #2 returns variable clOptions with type java.util.List |