assertEquals(FILE_OPT, ((CLOption) clOptions.get(0)).getDescriptor().getId());
assertEquals("-=-", ((CLOption) clOptions.get(0)).getArgument());
}
public void testSingleArg8() {
final CLOptionDescriptor[] options = new CLOptionDescriptor[] { FILE };
final CLArgsParser parser = new CLArgsParser(new String[] { "--file", "-=-" }, options);
assertNull(parser.getErrorString(), parser.getErrorString());
final List clOptions = parser.getArguments();
final int size = clOptions.size();
assertEquals(1, size);
assertEqual
assertEquals(FILE_OPT, ((CLOption) clOptions.get(2)).getDescriptor().getId());
assertEquals("a", ((CLOption) clOptions.get(2)).getArgument());
}
public void testCombinedArgs3() {
final CLOptionDescriptor[] options = new CLOptionDescriptor[] { BLEE, TAINT, FILE };
final CLArgsParser parser = new CLArgsParser(new String[] { "-bT", "--", "-fa" }// Should
// not
// detect
// trailing
// option
, options);
assertNull(parser.getErrorString(), parser.getErrorString());
final List clOptions = parser.getArguments();
final int size = clOptions.size();
assertEquals(3, size);
assertEqual
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:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | assertEquals(FILE_OPT, ((CLOption) clOptions.get(0)).getDescriptor().getId());↵ | | 1 | assertEquals(FILE_OPT, ((CLOption) clOptions.get(2)).getDescriptor().getId());↵
|
2 | assertEquals("-=-", ((CLOption) clOptions.get(0)).getArgument());↵ | | 2 | assertEquals("a", ((CLOption) clOptions.get(2)).getArgument());↵
|
3 | }↵ | | 3 | }↵
|
|
4 | public void testSingleArg8() {↵ | | 4 | public void testCombinedArgs3() {↵
|
5 | final CLOptionDescriptor[] options = new CLOptionDescriptor[] { FILE };↵ | | 5 | final CLOptionDescriptor[] options = new CLOptionDescriptor[] { BLEE, TAINT, FILE };↵
|
|
6 | final CLArgsParser parser = new CLArgsParser(new String[] { "--file", "-=-"↵ | | 6 | final CLArgsParser parser = new CLArgsParser(new String[] { "-bT", "--", "-fa" }// Should↵
|
| | | 7 | // not↵
|
| | | 8 | // detect↵
|
| | | 9 | // trailing↵
|
| | | 10 | // option↵
|
7 | }, options);↵ | | 11 | , options);↵
|
|
8 | assertNull(parser.getErrorString(), parser.getErrorString());↵ | | 12 | assertNull(parser.getErrorString(), parser.getErrorString());↵
|
|
9 | final List clOptions = parser.getArguments();↵ | | 13 | final List clOptions = parser.getArguments();↵
|
10 | final int size = clOptions.size();↵ | | 14 | final int size = clOptions.size();↵
|
|
11 | assertEquals(1, size);↵ | | 15 | assertEquals(3, size);↵
|
12 | assertEqual | | 16 | assertEqual
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | |
Number of node comparisons | 0 |