if (newProject != null) { newProject.demuxOutput(errorOutputToHandle, true); } else { super.handleErrorOutput(errorOutputToHandle); }
if (newProject != null) { newProject.demuxFlush(toFlush, false); } else { super.handleFlush(toFlush); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Ant.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Ant.java
Method name: void handleErrorOutput(String) Method name: void handleFlush(String)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (newProject != null) {
1
if (newProject != null) {
2
            newProject.demuxOutput(errorOutputToHandle, true);
2
            newProject.demuxFlush(toFlush, false);
3
        } else {
3
        } else {
4
            super.handleErrorOutput(errorOutputToHandle);
4
            super.handleFlush(toFlush);
5
        }
5
        }
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 comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)6.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (newProject != null)
    1
    if (newProject != null)
    2
    newProject.demuxOutput(errorOutputToHandle, true);
    2
    newProject.demuxOutput(errorOutputToHandle, true);
    2
    newProject.demuxFlush(toFlush, false);
    Differences
    Expression1Expression2Difference
    demuxOutputdemuxFlushMETHOD_INVOCATION_NAME_MISMATCH
    errorOutputToHandletoFlushVARIABLE_NAME_MISMATCH
    truefalseLITERAL_VALUE_MISMATCH
    Preondition Violations
    Expression newProject.demuxOutput(errorOutputToHandle,true) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression newProject.demuxFlush(toFlush,false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression newProject.demuxOutput(errorOutputToHandle,true) is a void method call, and thus it cannot be parameterized
    Expression newProject.demuxFlush(toFlush,false) is a void method call, and thus it cannot be parameterized
    2
    newProject.demuxFlush(toFlush, false);
    else
    else
    3
    super.handleErrorOutput(errorOutputToHandle);
    3
    super.handleErrorOutput(errorOutputToHandle);
    3
    super.handleFlush(toFlush);
    Differences
    Expression1Expression2Difference
    handleErrorOutputhandleFlushMETHOD_INVOCATION_NAME_MISMATCH
    errorOutputToHandletoFlushVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression super.handleErrorOutput(errorOutputToHandle) is a void method call, and thus it cannot be parameterized
    Expression super.handleFlush(toFlush) is a void method call, and thus it cannot be parameterized
    3
    super.handleFlush(toFlush);
    Precondition Violations (6)
    Row Violation
    1Expression newProject.demuxOutput(errorOutputToHandle,true) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression newProject.demuxFlush(toFlush,false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression newProject.demuxOutput(errorOutputToHandle,true) is a void method call, and thus it cannot be parameterized
    4Expression newProject.demuxFlush(toFlush,false) is a void method call, and thus it cannot be parameterized
    5Expression super.handleErrorOutput(errorOutputToHandle) is a void method call, and thus it cannot be parameterized
    6Expression super.handleFlush(toFlush) is a void method call, and thus it cannot be parameterized