File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Redirector.java | File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/JarTest.java | |||
Method name: void setProperties()
|
Method name: void tearDown()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (baos != null) {↵ | 1 | if (r1 != null) {↵ | |
2 | try {↵ | 2 | try {↵ | |
3 | baos.close();↵ | 3 | r1.close();↵ | |
4 | } catch (IOException eyeOhEx) {↵ | 4 | } catch (IOException e) {↵ | |
5 | // Ignore exception↵ | |||
6 | }↵ | 5 | }↵ | |
7 | }↵ | 6 | }↵ | |
8 | if (errorBaos != null) {↵ | 7 | if (r2 != null) {↵ | |
9 | try {↵ | 8 | try {↵ | |
10 | errorBaos.close();↵ | 9 | r2.close();↵ | |
11 | } catch (IOException eyeOhEx) {↵ | 10 | } catch (IOException e↵ | |
12 | // Ignore exception↵ | 11 | ) {↵ | |
13 | }↵ | 12 | }↵ | |
14 | } | 13 |
| |
See real code fragment | See real code fragment |
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.5 |
Clones location | Clones are in different classes |
Number of node comparisons | 17 |
Number of mapped statements | 6 |
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.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (baos != null) |
| 1 | if (r1 != null) | ||||||||||||||
2 | try |
| 2 | try | ||||||||||||||
3 | baos.close(); |
| 3 | r1.close(); | ||||||||||||||
4 | if (errorBaos != null) |
| 4 | if (r2 != null) | ||||||||||||||
5 | try |
| 5 | try | ||||||||||||||
6 | errorBaos.close(); |
| 6 | r2.close(); |
Row | Violation |
---|---|
1 | Type org.apache.tools.ant.taskdefs.Redirector.PropertyOutputStream of variable baos does not match with type java.io.Reader of variable r1 |
2 | Type org.apache.tools.ant.taskdefs.Redirector.PropertyOutputStream of variable baos does not match with type java.io.Reader of variable r1 |
3 | Type org.apache.tools.ant.taskdefs.Redirector.PropertyOutputStream of variable errorBaos does not match with type java.io.Reader of variable r2 |
4 | Type org.apache.tools.ant.taskdefs.Redirector.PropertyOutputStream of variable errorBaos does not match with type java.io.Reader of variable r2 |