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 testPartParse()
|
Method name: void test2PartParse()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | final ParserControl control = new AbstractParserControl() {↵ | 1 | final ParserControl control1 = new AbstractParserControl() {↵ | |
2 | public boolean isFinished(int lastOptionCode) {↵ | 2 | public boolean isFinished(int lastOptionCode) {↵ | |
3 | return (lastOptionCode == YOU_OPT);↵ | 3 | return (lastOptionCode == YOU_OPT);↵ | |
4 | }↵ | 4 | }↵ | |
5 | };↵ | 5 | };↵ | |
6 | final CLArgsParser parser = new CLArgsParser(ARGLIST1, options, control);↵ | 6 | final CLArgsParser parser1 = new CLArgsParser(ARGLIST1, options1, control1);↵ | |
7 | assertNull(parser.getErrorString(), parser.getErrorString());↵ | 7 | assertNull(parser1.getErrorString(), parser1.getErrorString());↵ | |
8 | final List clOptions = parser.getArguments(); | 8 | final List clOptions1 = parser1.getArguments(); | |
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 | 10 |
Number of mapped statements | 4 |
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 | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | final ParserControl control = new AbstractParserControl() {...}; |
| 3 | final ParserControl control1 = new AbstractParserControl() {...}; | ||||||||||||||||
3 | final CLArgsParser parser = new CLArgsParser(ARGLIST1, options, control); |
| 4 | final CLArgsParser parser1 = new CLArgsParser(ARGLIST1, options1, control1); | ||||||||||||||||
4 | assertNull(parser.getErrorString(), parser.getErrorString()); |
| 5 | assertNull(parser1.getErrorString(), parser1.getErrorString()); | ||||||||||||||||
5 | final List clOptions = parser.getArguments(); |
| 6 | final List clOptions1 = parser1.getArguments(); |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables clOptions , while Clone fragment #2 returns variables clOptions1, parser1 |