commandLine.setExecutable(getClearToolCommand()); commandLine.createArgument().setValue(COMMAND_MKLBTYPE); checkOptions(commandLine); if (!getFailOnErr()) { getProject().log("Ignoring any errors that occur for: " + getTypeSpecifier(), Project.MSG_VERBOSE); } result = run(commandLine); if (Execute.isFailure(result) && getFailOnErr()) { String msg = "Failed executing: " + commandLine.toString(); throw new BuildException(msg, getLocation()); }
commandLine.setExecutable(getClearToolCommand()); commandLine.createArgument().setValue(COMMAND_LOCK); // Check the command line options checkOptions(commandLine); // For debugging // System.out.println(commandLine.toString()); if (!getFailOnErr()) { getProject().log("Ignoring any errors that occur for: " + getOpType(), Project.MSG_VERBOSE); } result = run(commandLine); if (Execute.isFailure(result) && getFailOnErr()) { String msg = "Failed executing: " + commandLine.toString(); throw new BuildException(msg, getLocation()); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklbtype.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCLock.java
Method name: void execute() Method name: void execute()
Number of AST nodes: 9 Number of AST nodes: 9
1
commandLine.setExecutable(getClearToolCommand());
1
commandLine.setExecutable(getClearToolCommand());
2
        commandLine.createArgument().setValue(COMMAND_MKLBTYPE);
2
        commandLine.createArgument().setValue(COMMAND_LOCK);
3
        checkOptions(commandLine
3
        // Check the command line options
4
        checkOptions(commandLine);
5
        // For debugging
4
);
6
        // System.out.println(commandLine.toString());
5
        if (!getFailOnErr()) {
7
        if (!getFailOnErr()) {
6
            getProject().log("Ignoring any errors that occur for: "
8
            getProject().log("Ignoring any errors that occur for: "
7
                    + getTypeSpecifier(), Project.MSG_VERBOSE);
9
                    + getOpType(), Project.MSG_VERBOSE);
8
        }
10
        }
9
        result = run(commandLine);
11
        result = run(commandLine);
10
        if (Execute.isFailure(result) && getFailOnErr()) {
12
        if (Execute.isFailure(result) && getFailOnErr()) {
11
            String msg = "Failed executing: " + commandLine.toString();
13
            String msg = "Failed executing: " + commandLine.toString();
12
            throw new BuildException(msg, getLocation());
14
            throw new BuildException(msg, getLocation());
13
        }
15
        }
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 different classes having the same super class
Number of node comparisons31
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements9
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)29.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    5
    commandLine.setExecutable(getClearToolCommand());
    6
    commandLine.setExecutable(getClearToolCommand());
    6
    commandLine.createArgument().setValue(COMMAND_MKLBTYPE);
    6
    commandLine.createArgument().setValue(COMMAND_MKLBTYPE);
    7
    commandLine.createArgument().setValue(COMMAND_LOCK);
    Differences
    Expression1Expression2Difference
    COMMAND_MKLBTYPECOMMAND_LOCKVARIABLE_NAME_MISMATCH
    7
    commandLine.createArgument().setValue(COMMAND_LOCK);
    7
    checkOptions(commandLine);
    8
    checkOptions(commandLine);
    8
    if (!getFailOnErr())
    9
    if (!getFailOnErr())
    9
    getProject().log("Ignoring any errors that occur for: " + getTypeSpecifier(), Project.MSG_VERBOSE);
    9
    getProject().log("Ignoring any errors that occur for: " + getTypeSpecifier(), Project.MSG_VERBOSE);
    10
    getProject().log("Ignoring any errors that occur for: " + getOpType(), Project.MSG_VERBOSE);
    Differences
    Expression1Expression2Difference
    getTypeSpecifiergetOpTypeMETHOD_INVOCATION_NAME_MISMATCH
    10
    getProject().log("Ignoring any errors that occur for: " + getOpType(), Project.MSG_VERBOSE);
    10
    result = run(commandLine);
    11
    result = run(commandLine);
    11
    if (Execute.isFailure(result) && getFailOnErr())
    12
    if (Execute.isFailure(result) && getFailOnErr())
    12
    String msg = "Failed executing: " + commandLine.toString();
    13
    String msg = "Failed executing: " + commandLine.toString();
    13
    throw new BuildException(msg, getLocation());
    14
    throw new BuildException(msg, getLocation());
    Precondition Violations (0)
    Row Violation