Path cp = new Path(project); // kjc don't have bootclasspath option. Path p = getBootClassPath(); if (p.size() > 0) { cp.append(p); } if (extdirs != null) { cp.addExtdirs(extdirs); } cp.append(classpath);
Path cp = new Path(project); Path bp = getBootClassPath(); if (bp.size() > 0) { cp.append(bp); } if (extdirs != null) { cp.addExtdirs(extdirs); } cp.append(classpath);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/compilers/Kjc.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
Method name: Commandline setupKjcCommand() Method name: Commandline setupJavacCommandlineSwitches(Commandline, boolean)
Number of AST nodes: 7 Number of AST nodes: 7
1
Path cp = new Path(project);
1
Path cp = new Path(project);
2
        // kjc don't have bootclasspath option.
2
    
3
        Path p = getBootClassPath();
3
        Path bp = getBootClassPath();
4
        if (p.size() > 0) {
4
            if (bp.size() > 0) {
5
            cp.append(p);
5
                cp.append(bp);
6
        }
6
            }
7
        if (extdirs != null) {
7
            if (extdirs != null) {
8
            cp.addExtdirs(extdirs);
8
                cp.addExtdirs(extdirs);
9
        }
9
        
10
    }
10
        cp.append(classpath);
11
            cp.append(classpath);
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)18.6
Clones locationClones are in different classes having the same super class
Number of node comparisons15
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)15.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    9
    Path cp = new Path(project);
    24
    Path cp = new Path(project);
    10
    Path p = getBootClassPath();
    10
    Path p = getBootClassPath();
    25
    Path bp = getBootClassPath();
    Differences
    Expression1Expression2Difference
    pbpVARIABLE_NAME_MISMATCH
    25
    Path bp = getBootClassPath();
    11
    if (p.size() > 0)
    11
    if (p.size() > 0)
    26
    if (bp.size() > 0)
    Differences
    Expression1Expression2Difference
    pbpVARIABLE_NAME_MISMATCH
    26
    if (bp.size() > 0)
    12
    cp.append(p);
    12
    cp.append(p);
    27
    cp.append(bp);
    Differences
    Expression1Expression2Difference
    pbpVARIABLE_NAME_MISMATCH
    27
    cp.append(bp);
    13
    if (extdirs != null)
    28
    if (extdirs != null)
    14
    cp.addExtdirs(extdirs);
    29
    cp.addExtdirs(extdirs);
    15
    cp.append(classpath);
    30
    cp.append(classpath);
    Precondition Violations (0)
    Row Violation