for (i = 0; i < SCOPE_ELEMENTS.length; i++) { if (next.equals (SCOPE_ELEMENTS[i])) { break; } }
for (; same < minLength; same++) { if (!fromPathStack[same].equals(toPathStack[same])) { break; } }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Javadoc.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/FileUtils.java
Method name: void setScope(String) Method name: String getRelativePath(File, File)
Number of AST nodes: 3 Number of AST nodes: 3
1
for (i = 0; i < SCOPE_ELEMENTS.length; i++) {
1
for (; same < minLength; same++) {
2
                        if (next.equals (SCOPE_ELEMENTS[i])) {
2
            if (!fromPathStack[same].equals(toPathStack[same])) {
3
                            break;
3
                
4
                        }
5
            
4
break;
5
            }
6
        }
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.2
Clones locationClones are in different classes
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    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.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    14
    if (next.equals(SCOPE_ELEMENTS[i]))
    14
    if (next.equals(SCOPE_ELEMENTS[i]))
    12
    if (!fromPathStack[same].equals(toPathStack[same]))
    Differences
    Expression1Expression2Difference
    next.equals(SCOPE_ELEMENTS[i])!fromPathStack[same].equals(toPathStack[same])TYPE_COMPATIBLE_REPLACEMENT
    12
    if (!fromPathStack[same].equals(toPathStack[same]))
    15
    break;
    15
    break;
    13
    break;
    Preondition Violations
    Statement break; without innermost loop
    Statement break; without innermost loop
    13
    break;
    Precondition Violations (2)
    Row Violation
    1Statement break; without innermost loop
    2Statement break; without innermost loop