DirectoryScanner ds = new DirectoryScanner(); ds.setBasedir(new File(getProject().getBaseDir(), "tmp")); ds.setIncludes(new String[] {"alpha/beta/gamma/GAMMA.XML"}); ds.scan();
DirectoryScanner ds = new DirectoryScanner(); ds.setBasedir(new File(getProject().getBaseDir(), "tmp")); ds.setIncludes(new String[] {"alpha/beta/gamma/"}); ds.setFollowSymlinks(false);
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 testFullPathMatchesCaseSensitive() Method name: void testProhibitSymlinks()
Number of AST nodes: 4 Number of AST nodes: 4
1
DirectoryScanner ds = new DirectoryScanner();
1
DirectoryScanner ds = new DirectoryScanner();
2
        ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
2
        ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
3
        ds.setIncludes(new String[] {"alpha/beta/gamma/GAMMA.XML"});
3
        ds.setIncludes(new String[] {"alpha/beta/gamma/"});
4
        ds.scan();
4
        ds.setFollowSymlinks(false);
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 comparisons16
  1. {Non-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
    1
    DirectoryScanner ds = new DirectoryScanner();
    4
    DirectoryScanner ds = new DirectoryScanner();
    2
    ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
    5
    ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
    3
    ds.setIncludes(new String[] {"alpha/beta/gamma/GAMMA.XML"});
    3
    ds.setIncludes(new String[] {"alpha/beta/gamma/GAMMA.XML"});
    6
    ds.setIncludes(new String[] {"alpha/beta/gamma/"});
    Differences
    Expression1Expression2Difference
    "alpha/beta/gamma/GAMMA.XML""alpha/beta/gamma/"LITERAL_VALUE_MISMATCH
    6
    ds.setIncludes(new String[] {"alpha/beta/gamma/"});
    4
    ds.scan();
    4
    ds.scan();
    7
    ds.setFollowSymlinks(false);
    Differences
    Expression1Expression2Difference
    scansetFollowSymlinksMETHOD_INVOCATION_NAME_MISMATCH
    ds.scan()ds.setFollowSymlinks(false)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression ds.scan() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ds.setFollowSymlinks(false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ds.scan() is a void method call, and thus it cannot be parameterized
    Expression ds.setFollowSymlinks(false) is a void method call, and thus it cannot be parameterized
    Expression ds.scan() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ds.setFollowSymlinks(false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ds.scan() is a void method call, and thus it cannot be parameterized
    Expression ds.setFollowSymlinks(false) is a void method call, and thus it cannot be parameterized
    7
    ds.setFollowSymlinks(false);
    Precondition Violations (8)
    Row Violation
    1Expression ds.scan() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression ds.setFollowSymlinks(false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression ds.scan() is a void method call, and thus it cannot be parameterized
    4Expression ds.setFollowSymlinks(false) is a void method call, and thus it cannot be parameterized
    5Expression ds.scan() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression ds.setFollowSymlinks(false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression ds.scan() is a void method call, and thus it cannot be parameterized
    8Expression ds.setFollowSymlinks(false) is a void method call, and thus it cannot be parameterized