thread = null; if (getFailonerror()) { throw new BuildException(TIMEOUT_MESSAGE); } else { log(TIMEOUT_MESSAGE, Project.MSG_ERR); }
if (ec != 0) { String msg = "Remote command failed with exit status " + ec; if (getFailonerror()) { throw new BuildException(msg); } else { log(msg, Project.MSG_ERR); } }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java
Method name: void execute() Method name: void execute()
Number of AST nodes: 4 Number of AST nodes: 5
1
thread = null;
1
if (ec != 0) {
2
                    String msg = "Remote command failed with exit status " + ec;
2
                if (getFailonerror()) {
3
                    if (getFailonerror()) {
3
                    throw new BuildException(TIMEOUT_MESSAGE);
4
                        throw new BuildException(
5
msg);
4
                } else {
6
                    } else {
5
                    log(TIMEOUT_MESSAGE, Project.MSG_ERR);
7
                        log(msg, Project.MSG_ERR);
8
                    }
6
                }
9
                }
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.1
Clones locationClones are in the same method
Number of node comparisons11
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    24
    thread = null;
                                    
                                                                                                                                
    34
    String msg = "Remote command failed with exit status " + ec;
    25
    if (getFailonerror())
    35
    if (getFailonerror())
    26
    throw new BuildException(TIMEOUT_MESSAGE);
    26
    throw new BuildException(TIMEOUT_MESSAGE);
    36
    throw new BuildException(msg);
    Differences
    Expression1Expression2Difference
    TIMEOUT_MESSAGEmsgVARIABLE_NAME_MISMATCH
    36
    throw new BuildException(msg);
    else
    else
    27
    log(TIMEOUT_MESSAGE, Project.MSG_ERR);
    27
    log(TIMEOUT_MESSAGE, Project.MSG_ERR);
    37
    log(msg, Project.MSG_ERR);
    Differences
    Expression1Expression2Difference
    TIMEOUT_MESSAGEmsgVARIABLE_NAME_MISMATCH
    37
    log(msg, Project.MSG_ERR);
    Precondition Violations (0)
    Row Violation