assertNull(parser1.getErrorString(), parser1.getErrorString());
final List clOptions1 = parser1.getArguments();
final int size1 = clOptions1.size();
assertEquals(size1, 4);
assertEquals(((CLOption) clOptions1.get(0)).getDescriptor().getId(), YOU_OPT);
assertNull(parser1.getErrorString(), parser1.getErrorString());
final List clOptions1 = parser1.getArguments();
final int size1 = clOptions1.size();
assertEquals(size1, 1);
assertEquals(((CLOption) clOptions1.get(0)).getDescriptor().getId(), YOU_OPT);
Clone fragments detected by clone detection tool
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 test2PartParse()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | assertNull(parser1.getErrorString(), parser1.getErrorString());↵ | | 1 | assertNull(parser1.getErrorString(), parser1.getErrorString());↵
|
|
2 | final List clOptions1 = parser1.getArguments();↵ | | 2 | final List clOptions1 = parser1.getArguments();↵
|
3 | final int size1 = clOptions1.size();↵ | | 3 | final int size1 = clOptions1.size();↵
|
|
4 | assertEquals(size1, 4);↵ | | 4 | assertEquals(size1, 1);↵
|
5 | assertEquals(((CLOption) clOptions1.get(0)).getDescriptor().getId(), YOU_OPT); | | 5 | assertEquals(((CLOption) clOptions1.get(0)).getDescriptor().getId(), YOU_OPT);
|
See real code fragment |
|
See real code fragment |
Summary
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 | 25 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 5 |
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 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
5 | assertNull(parser1.getErrorString(), parser1.getErrorString()); | | 5 | assertNull(parser1.getErrorString(), parser1.getErrorString()); |
6 | final List clOptions1 = parser1.getArguments(); | | 6 | final List clOptions1 = parser1.getArguments(); |
7 | final int size1 = clOptions1.size(); | | 7 | final int size1 = clOptions1.size(); |
8 | assertEquals(size1, 4); | | 8 | assertEquals(size1, 1); |
9 | assertEquals(((CLOption)clOptions1.get(0)).getDescriptor().getId(), YOU_OPT); | | 9 | assertEquals(((CLOption)clOptions1.get(0)).getDescriptor().getId(), YOU_OPT); |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variables clOptions1 , while Clone fragment #2 returns variables |