String filename = line.substring(0, index); String rev = null; int indexrev = -1; if ((indexrev = line.indexOf(REVISION, index)) != -1) { rev = line.substring(indexrev + REVISION.length()); }
String filename = line.substring(0, index); String rev = null; int indexrev = -1; if ((indexrev = line.indexOf(REVISION, index)) != -1) { rev = line.substring(indexrev + REVISION.length()); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java
Method name: CvsTagEntry[] parseRDiff(File) Method name: CvsTagEntry[] parseRDiff(File)
Number of AST nodes: 5 Number of AST nodes: 5
1
String filename = line.substring(0, index);
1
String filename = line.substring(0, index);
2
                        String rev = null;
2
                        String rev = null;
3
                        int indexrev = -1;
3
                        int indexrev = -1;
4
                        if ((indexrev = line.indexOf(REVISION, index)) != -1) {
4
                        if ((indexrev = line.indexOf(REVISION, index)) != -1) {
5
                            rev = line.substring(indexrev + REVISION.length());
5
                            rev = line.substring(indexrev + REVISION.length());
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.4
Clones locationClones are in the same method
Number of node comparisons15
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3.4
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    16
    String filename = line.substring(0, index);
    33
    String filename = line.substring(0, index);
    17
    String rev = null;
    34
    String rev = null;
    18
    int indexrev = -1;
    35
    int indexrev = -1;
    19
    if ((indexrev = line.indexOf(REVISION, index)) != -1)
    36
    if ((indexrev = line.indexOf(REVISION, index)) != -1)
    20
    rev = line.substring(indexrev + REVISION.length());
    37
    rev = line.substring(indexrev + REVISION.length());
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables filename, rev , while Clone fragment #2 returns variables filename, rev