final int size = clOptions.size();
assertEquals(size, 5);
assertEquals(((CLOption) clOptions.get(0)).getDescriptor().getId(), DEFINE_OPT);
assertEquals(((CLOption) clOptions.get(1)).getDescriptor().getId(), 0);
assertEquals(((CLOption) clOptions.get(2)).getDescriptor().getId(), ALL_OPT);
final int size = clOptions.size();
assertEquals(size, 5);
assertEquals(((CLOption) clOptions.get(0)).getDescriptor().getId(), DEFINE_OPT);
assertEquals(((CLOption) clOptions.get(1)).getDescriptor().getId(), 0);
assertEquals(((CLOption) clOptions.get(2)).getDescriptor().getId(), ALL_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 test2ArgsParse()
|
|
Method name: void testIncompatableOptions()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | final int size = clOptions.size();↵ | | 1 | final int size = clOptions.size();↵
|
|
2 | assertEquals(size, 5);↵ | | 2 | assertEquals(size, 5);↵
|
3 | assertEquals(((CLOption) clOptions.get(0)).getDescriptor().getId(), DEFINE_OPT);↵ | | 3 | assertEquals(((CLOption) clOptions.get(0)).getDescriptor().getId(), DEFINE_OPT);↵
|
4 | assertEquals(((CLOption) clOptions.get(1)).getDescriptor().getId(), 0);↵ | | 4 | assertEquals(((CLOption) clOptions.get(1)).getDescriptor().getId(), 0);↵
|
5 | assertEquals(((CLOption) clOptions.get(2)).getDescriptor().getId(), ALL_OPT); | | 5 | assertEquals(((CLOption) clOptions.get(2)).getDescriptor().getId(), ALL_OPT);
|
See real code fragment |
|
See real code fragment |
Summary
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 | 25 |
-
{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 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
5 | final int size = clOptions.size(); | | 5 | final int size = clOptions.size(); |
6 | assertEquals(size, 5); | | 6 | assertEquals(size, 5); |
7 | assertEquals(((CLOption)clOptions.get(0)).getDescriptor().getId(), DEFINE_OPT); | | 7 | assertEquals(((CLOption)clOptions.get(0)).getDescriptor().getId(), DEFINE_OPT); |
8 | assertEquals(((CLOption)clOptions.get(1)).getDescriptor().getId(), 0); | | 8 | assertEquals(((CLOption)clOptions.get(1)).getDescriptor().getId(), 0); |
9 | assertEquals(((CLOption)clOptions.get(2)).getDescriptor().getId(), ALL_OPT); | | 9 | assertEquals(((CLOption)clOptions.get(2)).getDescriptor().getId(), ALL_OPT); |
Precondition Violations (0)
Row |
Violation |