return ASIS; } if (this.equals(CR) || this.equals(MAC)) { return CR; } if (this.equals(CRLF) || this.equals(DOS)) { return CRLF; }
return CR; } if (this.equals(CRLF) || this.equals(DOS)) { return CRLF; } if (this.equals(LF) || this.equals(UNIX)) { return LF; }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/filters/FixCrLfFilter.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/filters/FixCrLfFilter.java
Method name: CrLf resolve() Method name: CrLf resolve()
Number of AST nodes: 5 Number of AST nodes: 5
1
return ASIS;
2
            }
3
            if (this.equals(CR) || this.equals(MAC)) {
4
                return CR;
1
return CR;
5
            }
2
            }
6
            if (this.equals(CRLF) || this.equals(DOS)) {
3
            if (this.equals(CRLF) || this.equals(DOS)) {
7
                return CRLF;
4
                return CRLF;
8
            }
5
            }
6
            if (this.equals(LF) || this.equals(UNIX)) {
7
                return LF;
8
            }
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.5
Clones locationClones are in the same method
Number of node comparisons13
  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 fragment0
    Time elapsed for statement mapping (ms)0.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    if (this.equals(CR) || this.equals(MAC))
    3
    if (this.equals(CR) || this.equals(MAC))
    5
    if (this.equals(CRLF) || this.equals(DOS))
    Differences
    Expression1Expression2Difference
    CRCRLFVARIABLE_NAME_MISMATCH
    MACDOSVARIABLE_NAME_MISMATCH
    5
    if (this.equals(CRLF) || this.equals(DOS))
    4
    return CR;
    4
    return CR;
    6
    return CRLF;
    Differences
    Expression1Expression2Difference
    CRCRLFVARIABLE_NAME_MISMATCH
    6
    return CRLF;
    5
    if (this.equals(CRLF) || this.equals(DOS))
    5
    if (this.equals(CRLF) || this.equals(DOS))
    7
    if (this.equals(LF) || this.equals(UNIX))
    Differences
    Expression1Expression2Difference
    CRLFLFVARIABLE_NAME_MISMATCH
    DOSUNIXVARIABLE_NAME_MISMATCH
    7
    if (this.equals(LF) || this.equals(UNIX))
    6
    return CRLF;
    6
    return CRLF;
    8
    return LF;
    Differences
    Expression1Expression2Difference
    CRLFLFVARIABLE_NAME_MISMATCH
    8
    return LF;
    Precondition Violations (0)
    Row Violation