if (Execute.isFailure(returncode)) { String msg = "'" + toExecute.getExecutable() + "' failed with exit code " + returncode; if (failOnError) { throw new BuildException(msg); } else { log(msg, Project.MSG_ERR); } }
if (exe.killedProcess()) { String msg = "Timeout: killed the sub-process"; if (failOnError) { throw new BuildException(msg); } else { log(msg, Project.MSG_WARN); } }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/Rpm.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/ExecTask.java
Method name: void execute() Method name: void runExecute(Execute)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (Execute.isFailure(returncode)) {
1
if (exe.killedProcess()) {
2
                String msg = "'" + toExecute.getExecutable()
2
                String msg = "
3
                    + "' failed with exit code " + returncode;
3
Timeout: killed the sub-process";
4
                if (failOnError) {
4
                if (failOnError) {
5
                    throw new BuildException(msg);
5
                    throw new BuildException(msg);
6
                } else {
6
                } else {
7
                    log(msg, Project.MSG_ERR);
7
                    log(msg, Project.MSG_WARN);
8
                }
8
                }
9
            }
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.2
Clones locationClones are in different classes having the same super class
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)1.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    40
    if (Execute.isFailure(returncode))
    40
    if (Execute.isFailure(returncode))
    4
    if (exe.killedProcess())
    Differences
    Expression1Expression2Difference
    isFailurekilledProcessMETHOD_INVOCATION_NAME_MISMATCH
    Execute.isFailure(returncode)exe.killedProcess()ARGUMENT_NUMBER_MISMATCH
    4
    if (exe.killedProcess())
    41
    String msg = "'" + toExecute.getExecutable() + "' failed with exit code " + returncode;
    41
    String msg = "'" + toExecute.getExecutable() + "' failed with exit code " + returncode;
    5
    String msg = "Timeout: killed the sub-process";
    Differences
    Expression1Expression2Difference
    "'" + toExecute.getExecutable() + "' failed with exit code "+ returncode"Timeout: killed the sub-process"TYPE_COMPATIBLE_REPLACEMENT
    5
    String msg = "Timeout: killed the sub-process";
    42
    if (failOnError)
    6
    if (failOnError)
    43
    throw new BuildException(msg);
    7
    throw new BuildException(msg);
    else
    else
    44
    log(msg, Project.MSG_ERR);
    44
    log(msg, Project.MSG_ERR);
    8
    log(msg, Project.MSG_WARN);
    Differences
    Expression1Expression2Difference
    MSG_ERRMSG_WARNVARIABLE_NAME_MISMATCH
    8
    log(msg, Project.MSG_WARN);
    Precondition Violations (0)
    Row Violation