if (newProject != null) { newProject.demuxFlush(errorOutputToFlush, true); } else { super.handleErrorFlush(errorOutputToFlush); }
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 handleErrorFlush(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.demuxFlush(errorOutputToFlush, true);
2
            newProject.demuxFlush(toFlush, false);
3
        } else {
3
        } else {
4
            super.handleErrorFlush(errorOutputToFlush);
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.1
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)0.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (newProject != null)
    1
    if (newProject != null)
    2
    newProject.demuxFlush(errorOutputToFlush, true);
    2
    newProject.demuxFlush(errorOutputToFlush, true);
    2
    newProject.demuxFlush(toFlush, false);
    Differences
    Expression1Expression2Difference
    errorOutputToFlushtoFlushVARIABLE_NAME_MISMATCH
    truefalseLITERAL_VALUE_MISMATCH
    2
    newProject.demuxFlush(toFlush, false);
    else
    else
    3
    super.handleErrorFlush(errorOutputToFlush);
    3
    super.handleErrorFlush(errorOutputToFlush);
    3
    super.handleFlush(toFlush);
    Differences
    Expression1Expression2Difference
    handleErrorFlushhandleFlushMETHOD_INVOCATION_NAME_MISMATCH
    errorOutputToFlushtoFlushVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression super.handleErrorFlush(errorOutputToFlush) 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 (2)
    Row Violation
    1Expression super.handleErrorFlush(errorOutputToFlush) is a void method call, and thus it cannot be parameterized
    2Expression super.handleFlush(toFlush) is a void method call, and thus it cannot be parameterized