try {
BufferedOutputStream bos
= new BufferedOutputStream(new FileOutputStream(output));
outputstream = new PrintStream(bos);
} catch (IOException e) {
throw new BuildException(e, getLocation());
}
try {
BufferedOutputStream bos
= new BufferedOutputStream(new FileOutputStream(error));
errorstream = new PrintStream(bos);
} catch (IOException e) {
throw new BuildException(e, getLocation());
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/Rpm.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/Rpm.java
|
Method name: void execute()
|
|
Method name: void execute()
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | try {↵ | | 1 | try {↵
|
2 | BufferedOutputStream bos↵ | | 2 | BufferedOutputStream bos↵
|
3 | = new BufferedOutputStream(new FileOutputStream(output));↵ | | 3 | = new BufferedOutputStream(new FileOutputStream(error));↵
|
4 | outputstream = new PrintStream(bos);↵ | | 4 | errorstream = new PrintStream(bos);↵
|
5 | } catch (IOException e) {↵ | | 5 | } catch (IOException e) {↵
|
6 | throw new BuildException(e, getLocation());↵ | | 6 | throw new BuildException(e, getLocation());↵
|
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 10 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
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) | 0.8 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
22 | try | | 29 | try |
23 | BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(output)); | | 30 | BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(error)); |
24 | outputstream = new PrintStream(bos); | | 31 | errorstream = new PrintStream(bos); |
Precondition Violations (0)
Row |
Violation |