if (isError) { task.handleErrorFlush(output); } else { task.handleFlush(output); }
if (isWarning) { task.handleErrorOutput(output); } else { task.handleOutput(output); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/Project.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/Project.java
Method name: void demuxFlush(String, boolean) Method name: void demuxOutput(String, boolean)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (isError) {
1
if (isWarning) {
2
                task.handleErrorFlush(output);
2
                task.handleErrorOutput(output);
3
            } else {
3
            } else {
4
                task.handleFlush(output);
4
                task.handleOutput(output);
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 comparisons10
  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)1.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    4
    if (isError)
    4
    if (isError)
    4
    if (isWarning)
    Differences
    Expression1Expression2Difference
    isErrorisWarningVARIABLE_NAME_MISMATCH
    4
    if (isWarning)
    5
    task.handleErrorFlush(output);
    5
    task.handleErrorFlush(output);
    5
    task.handleErrorOutput(output);
    Differences
    Expression1Expression2Difference
    handleErrorFlushhandleErrorOutputMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression task.handleErrorFlush(output) is a void method call, and thus it cannot be parameterized
    Expression task.handleErrorOutput(output) is a void method call, and thus it cannot be parameterized
    5
    task.handleErrorOutput(output);
    else
    else
    6
    task.handleFlush(output);
    6
    task.handleFlush(output);
    6
    task.handleOutput(output);
    Differences
    Expression1Expression2Difference
    handleFlushhandleOutputMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression task.handleFlush(output) is a void method call, and thus it cannot be parameterized
    Expression task.handleOutput(output) is a void method call, and thus it cannot be parameterized
    6
    task.handleOutput(output);
    Precondition Violations (4)
    Row Violation
    1Expression task.handleErrorFlush(output) is a void method call, and thus it cannot be parameterized
    2Expression task.handleErrorOutput(output) is a void method call, and thus it cannot be parameterized
    3Expression task.handleFlush(output) is a void method call, and thus it cannot be parameterized
    4Expression task.handleOutput(output) is a void method call, and thus it cannot be parameterized