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 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 10 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 2.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
5 | sb.append(StringUtils.LINE_SEP); | | 4 | sb.append(newLine); |
6 | try | | 5 | try |
7 | out.write(sb.toString().getBytes()); | | 6 | out.write(sb.toString().getBytes()); |
8 | | | 7 | |
Precondition Violations (0)
Row |
Violation |