if (getPreserveTime()) { // -ptime cmd.createArgument().setValue(FLAG_PRESERVETIME); }
if (print) { printResults(resultSet, out); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCUpdate.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/SQLExec.java
Method name: void checkOptions(Commandline) Method name: void execSQL(String, PrintStream)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (getPreserveTime()) {
1
if (print) {
2
                    // -ptime
2
                    
3
                    cmd.createArgument().setValue(FLAG_PRESERVETIME);
3
    printResults(resultSet, out);
4
                }
4
                    }
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 in different classes having the same super class
Number of node comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)10.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    10
    if (getPreserveTime())
    10
    if (getPreserveTime())
    15
    if (print)
    Differences
    Expression1Expression2Difference
    getPreserveTime()printTYPE_COMPATIBLE_REPLACEMENT
    15
    if (print)
    11
    cmd.createArgument().setValue(FLAG_PRESERVETIME);
    11
    cmd.createArgument().setValue(FLAG_PRESERVETIME);
    16
    printResults(resultSet, out);
    Differences
    Expression1Expression2Difference
    setValueprintResultsMETHOD_INVOCATION_NAME_MISMATCH
    cmd.createArgument().setValue(FLAG_PRESERVETIME)printResults(resultSet,out)ARGUMENT_NUMBER_MISMATCH
    cmd.createArgument()MISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression cmd.createArgument().setValue(FLAG_PRESERVETIME) is a void method call, and thus it cannot be parameterized
    Expression printResults(resultSet,out) is a void method call, and thus it cannot be parameterized
    Expression cmd.createArgument().setValue(FLAG_PRESERVETIME) is a void method call, and thus it cannot be parameterized
    Expression printResults(resultSet,out) is a void method call, and thus it cannot be parameterized
    16
    printResults(resultSet, out);
    Precondition Violations (4)
    Row Violation
    1Expression cmd.createArgument().setValue(FLAG_PRESERVETIME) is a void method call, and thus it cannot be parameterized
    2Expression printResults(resultSet,out) is a void method call, and thus it cannot be parameterized
    3Expression cmd.createArgument().setValue(FLAG_PRESERVETIME) is a void method call, and thus it cannot be parameterized
    4Expression printResults(resultSet,out) is a void method call, and thus it cannot be parameterized