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 | InputStreamReader isr = null;↵ | 1 | OutputStreamWriter osw = null;↵ | |
2 | if (inputEncoding == null) {↵ | 2 | if (outputEncoding == null) {↵ | |
3 | isr = new InputStreamReader(source.getInputStream());↵ | 3 | osw = new OutputStreamWriter(dest.getOutputStream());↵ | |
4 | } else {↵ | 4 | } else {↵ | |
5 | isr = new InputStreamReader(source.getInputStream(),↵ | 5 | osw = new OutputStreamWriter(dest.getOutputStream(),↵ | |
6 | inputEncoding);↵ | 6 | outputEncoding);↵ | |
7 | }↵ | 7 | }↵ | |
8 | in = new BufferedReader(isr); | 8 | out = new BufferedWriter(osw); | |
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.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 14 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 4 |
Time elapsed for statement mapping (ms) | 0.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
44 | if (inputEncoding == null) |
| 17 | if (outputEncoding == null) | ||||||||||
|
| 18 | osw = new OutputStreamWriter(dest.getOutputStream()); | |||||||||||
45 | isr = new InputStreamReader(source.getInputStream()); |
| | |||||||||||
else | | |||||||||||||
|
| 19 | osw = new OutputStreamWriter(dest.getOutputStream(), outputEncoding); | |||||||||||
46 | isr = new InputStreamReader(source.getInputStream(), inputEncoding); |
| |
Row | Violation |
---|---|
1 | Unmatched statement isr=new InputStreamReader(source.getInputStream()); cannot be moved, because it updates a variable modified in other unmapped statements |
2 | Unmatched statement isr=new InputStreamReader(source.getInputStream(),inputEncoding); cannot be moved, because it updates a variable modified in other unmapped statements |
3 | Unmatched statement osw=new OutputStreamWriter(dest.getOutputStream()); cannot be moved, because it updates a variable modified in other unmapped statements |
4 | Unmatched statement osw=new OutputStreamWriter(dest.getOutputStream(),outputEncoding); cannot be moved, because it updates a variable modified in other unmapped statements |