if (f.isDirectory()) { log("Found directory: " + text, Project.MSG_VERBOSE); } return f.isDirectory();
if (type.isFile()) { if (f.isFile()) { log("Found file: " + text, Project.MSG_VERBOSE); } return f.isFile(); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Available.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Available.java
Method name: boolean checkFile(File, String) Method name: boolean checkFile(File, String)
Number of AST nodes: 3 Number of AST nodes: 4
1
if (f.isDirectory
1
if (type.isFile()) {
2
()) {
2
                if (f.isFile()) {
3
                    log("Found directory: " + text, Project.MSG_VERBOSE);
3
                    log("Found file: " + text, Project.MSG_VERBOSE);
4
                }
4
                }
5
                return f.isDirectory();
5
                return f.isFile();
6
            }
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.1
Clones locationClones are in the same method
Number of node comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    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.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    if (f.isDirectory())
    3
    if (f.isDirectory())
    7
    if (f.isFile())
    Differences
    Expression1Expression2Difference
    isDirectoryisFileMETHOD_INVOCATION_NAME_MISMATCH
    7
    if (f.isFile())
    4
    log("Found directory: " + text, Project.MSG_VERBOSE);
    4
    log("Found directory: " + text, Project.MSG_VERBOSE);
    8
    log("Found file: " + text, Project.MSG_VERBOSE);
    Differences
    Expression1Expression2Difference
    "Found directory: ""Found file: "LITERAL_VALUE_MISMATCH
    8
    log("Found file: " + text, Project.MSG_VERBOSE);
    5
    return f.isDirectory();
    5
    return f.isDirectory();
    9
    return f.isFile();
    Differences
    Expression1Expression2Difference
    isDirectoryisFileMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression f.isDirectory() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression f.isFile() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9
    return f.isFile();
    Precondition Violations (2)
    Row Violation
    1Expression f.isDirectory() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression f.isFile() cannot be parameterized, because it has dependencies to/from statements that will be extracted