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