currentPathElement = findPathElementCaseUnsensitive(this.curpwd, currentPathElement); if (currentPathElement == null) { return; }
if (outfile == null) { return; } this.outfile = outfile;
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/net/FTP.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/jlink/jlink.java
Method name: void AntFTPFile(AntFTPFile, String) Method name: void setOutfile(String)
Number of AST nodes: 3 Number of AST nodes: 3
1
currentPathElement = findPathElementCaseUnsensitive(this.curpwd,
2
                               currentPathElement);
3
                            if (currentPathElement == null) {
1
if (outfile == null) {
4
                                return;
2
            return;
5
               
3
        }
6
             }
4
        this.outfile = outfile;
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.1
Clones locationClones are in different classes
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    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
    14
    currentPathElement = findPathElementCaseUnsensitive(this.curpwd, currentPathElement);
    14
    currentPathElement = findPathElementCaseUnsensitive(this.curpwd, currentPathElement);
    3
    this.outfile = outfile;
    Differences
    Expression1Expression2Difference
    currentPathElementthis.outfileTYPE_COMPATIBLE_REPLACEMENT
    findPathElementCaseUnsensitive(this.curpwd,currentPathElement)outfileTYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression this.outfile is a field being modified, and thus it cannot be parameterized
    3
    this.outfile = outfile;
    15
    if (currentPathElement == null)
    15
    if (currentPathElement == null)
    1
    if (outfile == null)
    Differences
    Expression1Expression2Difference
    currentPathElementoutfileVARIABLE_NAME_MISMATCH
    1
    if (outfile == null)
    16
    return;
    16
    return;
    2
    return;
    Preondition Violations
    Conditional return;
    2
    return;
    Precondition Violations (3)
    Row Violation
    1Expression this.outfile is a field being modified, and thus it cannot be parameterized
    2Conditional return;
    3Clone fragment #1 returns variables currentPathElement , while Clone fragment #2 returns variables