File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/ResourceUtils.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/ResourceUtils.java | |||
Method name: void copyResource(Resource, Resource, FilterSetCollection, Vector, boolean, boolean, String, String, Project)
|
Method name: void copyResource(Resource, Resource, FilterSetCollection, Vector, boolean, boolean, String, String, Project)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | OutputStreamWriter osw = null;↵ | 1 | OutputStreamWriter osw = null;↵ | |
2 | if (outputEncoding == null) {↵ | 2 | if (outputEncoding == null) {↵ | |
3 | osw = new OutputStreamWriter(dest.getOutputStream());↵ | 3 | osw = new OutputStreamWriter(dest.getOutputStream());↵ | |
4 | } else {↵ | 4 | } else {↵ | |
5 | osw = new OutputStreamWriter(dest.getOutputStream(),↵ | 5 | osw = new OutputStreamWriter(dest.getOutputStream(),↵ | |
6 | outputEncoding);↵ | 6 | outputEncoding);↵ | |
7 | }↵ | 7 | }↵ | |
8 | out = new BufferedWriter(osw); | 8 |
| |
See real code fragment | See real code fragment |
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 | 14 |
Number of mapped statements | 5 |
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) | 3.7 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
16 | OutputStreamWriter osw = null; | 48 | OutputStreamWriter osw = null; | |
17 | if (outputEncoding == null) | 49 | if (outputEncoding == null) | |
18 | osw = new OutputStreamWriter(dest.getOutputStream()); | 50 | osw = new OutputStreamWriter(dest.getOutputStream()); | |
else | else | |||
19 | osw = new OutputStreamWriter(dest.getOutputStream(), outputEncoding); | 51 | osw = new OutputStreamWriter(dest.getOutputStream(), outputEncoding); | |
20 | out = new BufferedWriter(osw); | 52 | out = new BufferedWriter(osw); |
Row | Violation |
---|