executeTarget(target); String realLog = getFullLog(); assertEquals(log, realLog);
executeTarget(target); String realOutput = getOutput(); assertEquals(output, realOutput.trim());
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/BuildFileTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/BuildFileTest.java
Method name: void expectDebuglog(String, String) Method name: void expectOutput(String, String)
Number of AST nodes: 3 Number of AST nodes: 3
1
executeTarget(target);
1
executeTarget(target);
2
        String realLog = getFullLog();
2
        String realOutput = getOutput();
3
        assertEquals(log, realLog);
3
        assertEquals(output, realOutput.trim());
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.0
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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    executeTarget(target);
    1
    executeTarget(target);
    2
    String realLog = getFullLog();
    2
    String realLog = getFullLog();
    2
    String realOutput = getOutput();
    Differences
    Expression1Expression2Difference
    realLogrealOutputVARIABLE_NAME_MISMATCH
    getFullLoggetOutputMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression getFullLog() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression getOutput() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2
    String realOutput = getOutput();
    3
    assertEquals(log, realLog);
    3
    assertEquals(log, realLog);
    3
    assertEquals(output, realOutput.trim());
    Differences
    Expression1Expression2Difference
    logoutputVARIABLE_NAME_MISMATCH
    realLogrealOutput.trim()TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression realLog cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression realOutput.trim() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3
    assertEquals(output, realOutput.trim());
    Precondition Violations (4)
    Row Violation
    1Expression getFullLog() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression getOutput() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression realLog cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression realOutput.trim() cannot be parameterized, because it has dependencies to/from statements that will be extracted