project.addReference("path", p); testReference("testRename", new String[] {"path", "path"}, new boolean[] {true, false}, p); testReference("testRename", new String[] {"path", "path"}, new boolean[] {false, true}, null); testReference("testRename", new String[] {"newpath", "newpath"}, new boolean[] {false, true}, p);
project.addReference("no-override", p); testReference("testNoInherit", new String[] {"path", "path"}, new boolean[] {true, false}, p); testReference("testNoInherit", new String[] {"path", "path"}, new boolean[] {false, true}, null); testReference("testInherit", new String[] {"no-override", "no-override"}, new boolean[] {true, false}, p);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/AntTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/AntTest.java
Method name: void testReferenceRename() Method name: void testReferenceNoInheritance()
Number of AST nodes: 4 Number of AST nodes: 4
1
project.addReference("path", p);
1
project.addReference("no-override", p);
2
        testReference("testRename", new String[] {"path", "path"},
2
        testReference("testNoInherit", new String[] {"path", "path"},
3
                      new boolean[] {true, false}, p);
3
                      new boolean[] {true, false}, p);
4
        testReference("testRename", new String[] {"path", "path"},
4
        testReference("testNoInherit", new String[] {"path", "path"},
5
                      new boolean[] {false, true}, null);
5
                      new boolean[] {false, true}, null);
6
        testReference("testRename",
6
        testReference("testInherit",
7
 new String[] {"newpath", "newpath"},
7
                      new String[] {"no-override", "no-override"},
8
                      new boolean[] {false, true}, p);
8
                      new boolean[] {true, false}, p);
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
    3
    project.addReference("path", p);
    3
    project.addReference("path", p);
    4
    project.addReference("no-override", p);
    Differences
    Expression1Expression2Difference
    "path""no-override"LITERAL_VALUE_MISMATCH
    4
    project.addReference("no-override", p);
    4
    testReference("testRename", new String[] {"path", "path"}, new boolean[] {true, false}, p);
    4
    testReference("testRename", new String[] {"path", "path"}, new boolean[] {true, false}, p);
    5
    testReference("testNoInherit", new String[] {"path", "path"}, new boolean[] {true, false}, p);
    Differences
    Expression1Expression2Difference
    "testRename""testNoInherit"LITERAL_VALUE_MISMATCH
    5
    testReference("testNoInherit", new String[] {"path", "path"}, new boolean[] {true, false}, p);
    5
    testReference("testRename", new String[] {"path", "path"}, new boolean[] {false, true}, null);
    5
    testReference("testRename", new String[] {"path", "path"}, new boolean[] {false, true}, null);
    6
    testReference("testNoInherit", new String[] {"path", "path"}, new boolean[] {false, true}, null);
    Differences
    Expression1Expression2Difference
    "testRename""testNoInherit"LITERAL_VALUE_MISMATCH
    6
    testReference("testNoInherit", new String[] {"path", "path"}, new boolean[] {false, true}, null);
    6
    testReference("testRename", new String[] {"newpath", "newpath"}, new boolean[] {false, true}, p);
    6
    testReference("testRename", new String[] {"newpath", "newpath"}, new boolean[] {false, true}, p);
    7
    testReference("testInherit", new String[] {"no-override", "no-override"}, new boolean[] {true, false}, p);
    Differences
    Expression1Expression2Difference
    "testRename""testInherit"LITERAL_VALUE_MISMATCH
    "newpath""no-override"LITERAL_VALUE_MISMATCH
    "newpath""no-override"LITERAL_VALUE_MISMATCH
    falsetrueLITERAL_VALUE_MISMATCH
    truefalseLITERAL_VALUE_MISMATCH
    7
    testReference("testInherit", new String[] {"no-override", "no-override"}, new boolean[] {true, false}, p);
    Precondition Violations (0)
    Row Violation