if (rsh != null) { if (rsh.trim().equals("")) { rsh = null; } } this.cvsRsh = rsh;
if (root != null) { if (root.trim().equals("")) { root = null; } } this.cvsRoot = root;
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/AbstractCvsTask.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/AbstractCvsTask.java
Method name: void setCvsRsh(String) Method name: void setCvsRoot(String)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (rsh != null) {
1
if (root != null) {
2
            if (rsh.trim().equals("")) {
2
            if (root.trim().equals("")) {
3
                rsh = null;
3
                root = null;
4
            }
4
            }
5
        }
5
        }
6
        this.cvsRsh = rsh;
6
        this.cvsRoot = root;
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.2
Clones locationClones are declared in the same class
Number of node comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    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
    1
    if (rsh != null)
    1
    if (rsh != null)
    1
    if (root != null)
    Differences
    Expression1Expression2Difference
    rshrootVARIABLE_NAME_MISMATCH
    1
    if (root != null)
    2
    if (rsh.trim().equals(""))
    2
    if (rsh.trim().equals(""))
    2
    if (root.trim().equals(""))
    Differences
    Expression1Expression2Difference
    rshrootVARIABLE_NAME_MISMATCH
    2
    if (root.trim().equals(""))
    3
    rsh = null;
    3
    rsh = null;
    3
    root = null;
    Differences
    Expression1Expression2Difference
    rshrootVARIABLE_NAME_MISMATCH
    3
    root = null;
    4
    this.cvsRsh = rsh;
    4
    this.cvsRsh = rsh;
    4
    this.cvsRoot = root;
    Differences
    Expression1Expression2Difference
    cvsRshcvsRootVARIABLE_NAME_MISMATCH
    rshrootVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.cvsRsh is a field being modified, and thus it cannot be parameterized
    Expression this.cvsRoot is a field being modified, and thus it cannot be parameterized
    4
    this.cvsRoot = root;
    Precondition Violations (2)
    Row Violation
    1Expression this.cvsRsh is a field being modified, and thus it cannot be parameterized
    2Expression this.cvsRoot is a field being modified, and thus it cannot be parameterized