out = new FileWriter(crashFile);
out.write(testCase + "\n");
out.flush();
output = new FileOutputStream(destFile);
manifest.write(output);
output.flush();
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/extension/JarLibManifestTask.java
|
Method name: void registerTestCase(String)
|
|
Method name: void writeManifest(Manifest)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | out = new FileWriter(crashFile);↵ | | 1 | output = new FileOutputStream(destFile);↵
|
2 | out.write(testCase + "\n");↵ | | 2 | manifest.write(output);↵
|
3 | out.flush(); | | 3 | output.flush();
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 9 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
7 | out.flush(); | | 5 | output.flush(); |
Precondition Violations (1)
Row |
Violation |
1 | Type java.io.FileWriter of variable out does not match with type java.io.FileOutputStream of variable output |