assertNull(parser.getErrorString(), parser.getErrorString()); final List clOptions = parser.getArguments(); final int size = clOptions.size(); assertEquals(size, 1); final CLOption option = (CLOption) clOptions.get(0); assertEquals(option.getDescriptor().getId(), DEFINE_OPT); assertEquals(option.getArgument(0), "stupid");
assertNull(parser.getErrorString(), parser.getErrorString()); final List clOptions = parser.getArguments(); final int size = clOptions.size(); assertEquals(size, 2); final CLOption option0 = (CLOption) clOptions.get(0); assertEquals(option0.getDescriptor().getId(), TAINT_OPT); assertEquals(option0.getArgument(0), "3");
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 testIncomplete2Args() Method name: void testOptionalArgsWithArgShortBeforeOtherOpt()
Number of AST nodes: 7 Number of AST nodes: 7
1
assertNull(parser.getErrorString(), parser.getErrorString());
1
assertNull(parser.getErrorString(), parser.getErrorString());
2
        final List clOptions = parser.getArguments();
2
        final List clOptions = parser.getArguments();
3
        final int size = clOptions.size();
3
        final int size = clOptions.size();
4
        assertEquals(size, 1);
4
        assertEquals(size, 2);
5
        final CLOption option = (CLOption) clOptions.get(0);
5
        final CLOption option0 = (CLOption) clOptions.get(0);
6
        assertEquals(option.getDescriptor().getId(), DEFINE_OPT);
6
        assertEquals(option0.getDescriptor().getId(), TAINT_OPT);
7
        assertEquals(option.getArgument(0), "stupid");
7
        assertEquals(option0.getArgument(0), "3");
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are declared in the same class
Number of node comparisons49
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    assertNull(parser.getErrorString(), parser.getErrorString());
    4
    assertNull(parser.getErrorString(), parser.getErrorString());
    4
    final List clOptions = parser.getArguments();
    5
    final List clOptions = parser.getArguments();
    5
    final int size = clOptions.size();
    6
    final int size = clOptions.size();
    6
    assertEquals(size, 1);
    6
    assertEquals(size, 1);
    7
    assertEquals(size, 2);
    Differences
    Expression1Expression2Difference
    12LITERAL_VALUE_MISMATCH
    7
    assertEquals(size, 2);
    7
    final CLOption option = (CLOption)clOptions.get(0);
    7
    final CLOption option = (CLOption)clOptions.get(0);
    8
    final CLOption option0 = (CLOption)clOptions.get(0);
    Differences
    Expression1Expression2Difference
    optionoption0VARIABLE_NAME_MISMATCH
    8
    final CLOption option0 = (CLOption)clOptions.get(0);
    8
    assertEquals(option.getDescriptor().getId(), DEFINE_OPT);
    8
    assertEquals(option.getDescriptor().getId(), DEFINE_OPT);
    9
    assertEquals(option0.getDescriptor().getId(), TAINT_OPT);
    Differences
    Expression1Expression2Difference
    optionoption0VARIABLE_NAME_MISMATCH
    DEFINE_OPTTAINT_OPTVARIABLE_NAME_MISMATCH
    9
    assertEquals(option0.getDescriptor().getId(), TAINT_OPT);
    9
    assertEquals(option.getArgument(0), "stupid");
    9
    assertEquals(option.getArgument(0), "stupid");
    10
    assertEquals(option0.getArgument(0), "3");
    Differences
    Expression1Expression2Difference
    optionoption0VARIABLE_NAME_MISMATCH
    "stupid""3"LITERAL_VALUE_MISMATCH
    10
    assertEquals(option0.getArgument(0), "3");
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variable option with type org.apache.commons.cli.avalon.CLOption , while Clone fragment #2 returns variable clOptions with type java.util.List