if (runner != null) { runner.handleFlush(output); if (showOutput) { super.handleFlush(output); } } else { super.handleFlush(output); }
if (runner != null) { runner.handleErrorOutput(output); if (showOutput) { super.handleErrorOutput(output); } } else { super.handleErrorOutput(output); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
Method name: void handleFlush(String) Method name: void handleErrorOutput(String)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (runner != null) {
1
if (runner != null) {
2
            runner.handleFlush(output);
2
            runner.handleErrorOutput(output);
3
            if (showOutput) {
3
            if (showOutput) {
4
                super.handleFlush(output);
4
                super.handleErrorOutput(output);
5
            }
5
            }
6
        } else {
6
        } else {
7
            super.handleFlush(output);
7
            super.handleErrorOutput(output);
8
        }
8
        }
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 comparisons13
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    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.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (runner != null)
    1
    if (runner != null)
    2
    runner.handleFlush(output);
    2
    runner.handleFlush(output);
    2
    runner.handleErrorOutput(output);
    Differences
    Expression1Expression2Difference
    handleFlushhandleErrorOutputMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression runner.handleFlush(output) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression runner.handleErrorOutput(output) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression runner.handleFlush(output) is a void method call, and thus it cannot be parameterized
    Expression runner.handleErrorOutput(output) is a void method call, and thus it cannot be parameterized
    2
    runner.handleErrorOutput(output);
    3
    if (showOutput)
    3
    if (showOutput)
    4
    super.handleFlush(output);
    4
    super.handleFlush(output);
    4
    super.handleErrorOutput(output);
    Differences
    Expression1Expression2Difference
    handleFlushhandleErrorOutputMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression super.handleFlush(output) is a void method call, and thus it cannot be parameterized
    Expression super.handleErrorOutput(output) is a void method call, and thus it cannot be parameterized
    4
    super.handleErrorOutput(output);
    else
    else
    5
    super.handleFlush(output);
    5
    super.handleFlush(output);
    5
    super.handleErrorOutput(output);
    Differences
    Expression1Expression2Difference
    handleFlushhandleErrorOutputMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression super.handleFlush(output) is a void method call, and thus it cannot be parameterized
    Expression super.handleErrorOutput(output) is a void method call, and thus it cannot be parameterized
    5
    super.handleErrorOutput(output);
    Precondition Violations (8)
    Row Violation
    1Expression runner.handleFlush(output) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression runner.handleErrorOutput(output) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression runner.handleFlush(output) is a void method call, and thus it cannot be parameterized
    4Expression runner.handleErrorOutput(output) is a void method call, and thus it cannot be parameterized
    5Expression super.handleFlush(output) is a void method call, and thus it cannot be parameterized
    6Expression super.handleErrorOutput(output) is a void method call, and thus it cannot be parameterized
    7Expression super.handleFlush(output) is a void method call, and thus it cannot be parameterized
    8Expression super.handleErrorOutput(output) is a void method call, and thus it cannot be parameterized