sb.append(StringUtils.LINE_SEP); try { out.write(sb.toString().getBytes()); out.flush(); } catch (IOException ex) { throw new BuildException("Unable to write output", ex); }
sb.append(newLine); try { out.write(sb.toString().getBytes()); out.flush(); } catch (IOException ioex) { throw new BuildException("Unable to write summary output", ioex); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/junit/SummaryJUnitResultFormatter.java
Method name: void startTestSuite(JUnitTest) Method name: void startTestSuite(JUnitTest)
Number of AST nodes: 4 Number of AST nodes: 4
1
sb.append(StringUtils.LINE_SEP);
1
sb.append(newLine);
2
        try {
2
        try {
3
            out.write(sb.toString().getBytes());
3
            out.write(sb.toString().getBytes());
4
            out.flush();
4
            out.flush();
5
        } catch (IOException ex) {
5
        } catch (IOException ioex) {
6
            throw new BuildException("Unable to write output", ex);
6
            throw new BuildException("Unable to write summary output", ioex);
7
        }
7
        }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in different classes
Number of node comparisons10
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    5
    sb.append(StringUtils.LINE_SEP);
    5
    sb.append(StringUtils.LINE_SEP);
    4
    sb.append(newLine);
    Differences
    Expression1Expression2Difference
    StringUtils.LINE_SEPnewLineTYPE_COMPATIBLE_REPLACEMENT
    4
    sb.append(newLine);
    6
    try
    6
    try
    5
    try
    Differences
    Expression1Expression2Difference
    exioexVARIABLE_NAME_MISMATCH
    "Unable to write output""Unable to write summary output"LITERAL_VALUE_MISMATCH
    exioexVARIABLE_NAME_MISMATCH
    5
    try
    7
    out.write(sb.toString().getBytes());
    6
    out.write(sb.toString().getBytes());
    8
    out.flush();
    7
    out.flush();
    Precondition Violations (0)
    Row Violation