if (fromDirName.equals(toDirNames[i])) { log("Skipping self-move of " + fromDirName, verbosity); selfMove = true; continue; }
if (fromFile.equals(toFile)) { log("Skipping self-move of " + fromFile, verbosity); selfMove = true; // if this is the last time through the loop then // move will not occur, but that's what we want continue; }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Move.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Move.java
Method name: void doFileOperations() Method name: void doFileOperations()
Number of AST nodes: 4 Number of AST nodes: 4
1
if (fromDirName.equals(toDirNames[i])) {
1
if (fromFile.equals(toFile)) {
2
                        log("Skipping self-move of " + fromDirName, verbosity);
2
                            log("Skipping self-move of " + fromFile, verbosity);
3
                        selfMove = true;
3
                            selfMove = true;
4
                            // if this is the last time through the loop then
5
                            // move will not occur, but that's what we want
4
                        continue;
6
                            continue;
5
                    }
7
                        }
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.2
Clones locationClones are in the same method
Number of node comparisons20
  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.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    47
    if (fromDirName.equals(toDirNames[i]))
    47
    if (fromDirName.equals(toDirNames[i]))
    31
    if (fromFile.equals(toFile))
    Differences
    Expression1Expression2Difference
    toDirNames[i]toFileTYPE_COMPATIBLE_REPLACEMENT
    fromDirNamefromFileVARIABLE_NAME_MISMATCH
    31
    if (fromFile.equals(toFile))
    48
    log("Skipping self-move of " + fromDirName, verbosity);
    48
    log("Skipping self-move of " + fromDirName, verbosity);
    32
    log("Skipping self-move of " + fromFile, verbosity);
    Differences
    Expression1Expression2Difference
    fromDirNamefromFileVARIABLE_NAME_MISMATCH
    32
    log("Skipping self-move of " + fromFile, verbosity);
    49
    selfMove = true;
    33
    selfMove = true;
    50
    continue;
    50
    continue;
    34
    continue;
    Preondition Violations
    Statement continue; without innermost loop
    Statement continue; without innermost loop
    34
    continue;
    Precondition Violations (2)
    Row Violation
    1Statement continue; without innermost loop
    2Statement continue; without innermost loop