ds.setBasedir(new File(getProject().getBaseDir(), "tmp")); ds.setIncludes(new String[] {"alpha/be?a/**", "alpha/beta/gamma/"}); ds.scan(); compareFiles(ds, expectedFiles, expectedDirectories);
ds = myFTPTask.newScanner(ftp); 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/taskdefs/optional/net/FTPTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/net/FTPTest.java
Method name: void testOrderOfIncludePatternsIrrelevant() Method name: void testOrderOfIncludePatternsIrrelevant()
Number of AST nodes: 4 Number of AST nodes: 5
1
ds = myFTPTask.newScanner(ftp);
1
ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
2
        ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
2
        ds.setIncludes(new String[] {"alpha/be?a/**", "alpha/beta/gamma/"});
3
        ds.setIncludes(new String[] {"alpha/beta/gamma/", "alpha/be?a/**"});
3
        ds.scan();
4
        ds.scan();
4
        compareFiles(ds, expectedFiles, expectedDirectories);
5
        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 comparisons20
  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 fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
                                                                      
    12
    ds = myFTPTask.newScanner(ftp);
    8
    ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
    13
    ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
    9
    ds.setIncludes(new String[] {"alpha/be?a/**", "alpha/beta/gamma/"});
    9
    ds.setIncludes(new String[] {"alpha/be?a/**", "alpha/beta/gamma/"});
    14
    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
    14
    ds.setIncludes(new String[] {"alpha/beta/gamma/", "alpha/be?a/**"});
    10
    ds.scan();
    15
    ds.scan();
    11
    compareFiles(ds, expectedFiles, expectedDirectories);
    16
    compareFiles(ds, expectedFiles, expectedDirectories);
    Precondition Violations (0)
    Row Violation