String[] targets = fileNameMapper.mapFileName("fromfilename"); assertNotNull("no filenames mapped", targets); assertEquals("wrong number of filenames mapped", 3, targets.length); List list = Arrays.asList(targets);
String[] targets = fileNameMapper.mapFileName("a"); assertNotNull("no filenames mapped", targets); assertEquals("wrong number of filenames mapped", 2, targets.length); List list = Arrays.asList(targets);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/MapperTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/MapperTest.java
Method name: void testNested() Method name: void testChained()
Number of AST nodes: 4 Number of AST nodes: 4
1
String[] targets = fileNameMapper.mapFileName("fromfilename");
1
String[] targets = fileNameMapper.mapFileName("a");
2
        assertNotNull("no filenames mapped", targets);
2
        assertNotNull("no filenames mapped", targets);
3
        assertEquals("wrong number of filenames mapped", 3, targets.length);
3
        assertEquals("wrong number of filenames mapped", 2, targets.length);
4
        List list = Arrays.asList(targets);
4
        List list = Arrays.asList(targets);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are declared in the same class
Number of node comparisons16
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    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
    15
    String[] targets = fileNameMapper.mapFileName("fromfilename");
    15
    String[] targets = fileNameMapper.mapFileName("fromfilename");
    22
    String[] targets = fileNameMapper.mapFileName("a");
    Differences
    Expression1Expression2Difference
    "fromfilename""a"LITERAL_VALUE_MISMATCH
    22
    String[] targets = fileNameMapper.mapFileName("a");
    16
    assertNotNull("no filenames mapped", targets);
    23
    assertNotNull("no filenames mapped", targets);
    17
    assertEquals("wrong number of filenames mapped", 3, targets.length);
    17
    assertEquals("wrong number of filenames mapped", 3, targets.length);
    24
    assertEquals("wrong number of filenames mapped", 2, targets.length);
    Differences
    Expression1Expression2Difference
    32LITERAL_VALUE_MISMATCH
    24
    assertEquals("wrong number of filenames mapped", 2, targets.length);
    18
    List list = Arrays.asList(targets);
    25
    List list = Arrays.asList(targets);
    Precondition Violations (0)
    Row Violation