if (doclet.getPath() != null) { Path docletPath = doclet.getPath().concatSystemClasspath("ignore"); if (docletPath.size() != 0) { toExecute.createArgument().setValue("-docletpath"); toExecute.createArgument().setPath(docletPath); } }
if (tagletInfo.getPath() != null) { Path tagletPath = tagletInfo.getPath() .concatSystemClasspath("ignore"); if (tagletPath.size() != 0) { toExecute.createArgument() .setValue("-tagletpath"); toExecute.createArgument().setPath(tagletPath); } }
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/taskdefs/Javadoc.java
Method name: void execute() Method name: void execute()
Number of AST nodes: 5 Number of AST nodes: 5
1
if (doclet.getPath() != null) {
1
if (tagletInfo.getPath() != null) {
2
                    Path docletPath
2
                        Path tagletPath = tagletInfo.getPath()
3
                        = doclet.getPath().concatSystemClasspath("ignore");
3
                            .concatSystemClasspath("ignore");
4
                    if (docletPath.size() != 0) {
4
                        if (tagletPath.size() != 0) {
5
                        toExecute.createArgument()
5
                            toExecute.createArgument()
6
.setValue("-docletpath");
6
                                .setValue("-tagletpath");
7
                        toExecute.createArgument().setPath(docletPath);
7
                            toExecute.createArgument().setPath(tagletPath);
8
                    }
8
                    
9
    }
9
                }
10
                    }
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.3
Clones locationClones are in the same method
Number of node comparisons14
  1. {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)7.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    57
    if (doclet.getPath() != null)
    57
    if (doclet.getPath() != null)
    151
    if (tagletInfo.getPath() != null)
    Differences
    Expression1Expression2Difference
    doclettagletInfoVARIABLE_NAME_MISMATCH
    org.apache.tools.ant.taskdefs.Javadoc.DocletInfoorg.apache.tools.ant.taskdefs.Javadoc.ExtensionInfoSUBCLASS_TYPE_MISMATCH
    151
    if (tagletInfo.getPath() != null)
    58
    Path docletPath = doclet.getPath().concatSystemClasspath("ignore");
    58
    Path docletPath = doclet.getPath().concatSystemClasspath("ignore");
    152
    Path tagletPath = tagletInfo.getPath().concatSystemClasspath("ignore");
    Differences
    Expression1Expression2Difference
    docletPathtagletPathVARIABLE_NAME_MISMATCH
    doclettagletInfoVARIABLE_NAME_MISMATCH
    org.apache.tools.ant.taskdefs.Javadoc.DocletInfoorg.apache.tools.ant.taskdefs.Javadoc.ExtensionInfoSUBCLASS_TYPE_MISMATCH
    152
    Path tagletPath = tagletInfo.getPath().concatSystemClasspath("ignore");
    59
    if (docletPath.size() != 0)
    59
    if (docletPath.size() != 0)
    153
    if (tagletPath.size() != 0)
    Differences
    Expression1Expression2Difference
    docletPathtagletPathVARIABLE_NAME_MISMATCH
    153
    if (tagletPath.size() != 0)
    60
    toExecute.createArgument().setValue("-docletpath");
    60
    toExecute.createArgument().setValue("-docletpath");
    154
    toExecute.createArgument().setValue("-tagletpath");
    Differences
    Expression1Expression2Difference
    "-docletpath""-tagletpath"LITERAL_VALUE_MISMATCH
    154
    toExecute.createArgument().setValue("-tagletpath");
    61
    toExecute.createArgument().setPath(docletPath);
    61
    toExecute.createArgument().setPath(docletPath);
    155
    toExecute.createArgument().setPath(tagletPath);
    Differences
    Expression1Expression2Difference
    docletPathtagletPathVARIABLE_NAME_MISMATCH
    155
    toExecute.createArgument().setPath(tagletPath);
    Precondition Violations (0)
    Row Violation