ds.setBasedir(new File(getProject().getBaseDir(), "tmp")); ds.setIncludes(new String[] {"alpha/be?a/**", "alpha/beta/gamma/"}); ds.scan(); compareFiles(ds, expectedFiles, expectedDirectories);
ds.setBasedir(new File(getProject().getBaseDir(), "tmp")); ds.setIncludes(new String[] {"alpha/beta/gamma/", "alpha/be?a/**"}); ds.scan(); compareFiles(ds, expectedFiles, expectedDirectories);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/DirectoryScannerTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/DirectoryScannerTest.java
Method name: void testOrderOfIncludePatternsIrrelevant() Method name: void testOrderOfIncludePatternsIrrelevant()
Number of AST nodes: 4 Number of AST nodes: 4
1
ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
1
ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
2
        ds.setIncludes(new String[] {"alpha/be?a/**", "alpha/beta/gamma/"});
2
        ds.setIncludes(new String[] {"alpha/beta/gamma/", "alpha/be?a/**"});
3
        ds.scan();
3
        ds.scan();
4
        compareFiles(ds, expectedFiles, expectedDirectories);
4
        compareFiles(ds, expectedFiles, expectedDirectories);
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 in the same method
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
    4
    ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
    9
    ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
    5
    ds.setIncludes(new String[] {"alpha/be?a/**", "alpha/beta/gamma/"});
    5
    ds.setIncludes(new String[] {"alpha/be?a/**", "alpha/beta/gamma/"});
    10
    ds.setIncludes(new String[] {"alpha/beta/gamma/", "alpha/be?a/**"});
    Differences
    Expression1Expression2Difference
    "alpha/be?a/**""alpha/beta/gamma/"LITERAL_VALUE_MISMATCH
    "alpha/beta/gamma/""alpha/be?a/**"LITERAL_VALUE_MISMATCH
    10
    ds.setIncludes(new String[] {"alpha/beta/gamma/", "alpha/be?a/**"});
    6
    ds.scan();
    11
    ds.scan();
    7
    compareFiles(ds, expectedFiles, expectedDirectories);
    12
    compareFiles(ds, expectedFiles, expectedDirectories);
    Precondition Violations (0)
    Row Violation