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