File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/GUnzip.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/ResourceUtils.java | |||
Method name: void extract()
|
Method name: void copyResource(Resource, Resource, FilterSetCollection, Vector, boolean, boolean, String, String, Project)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 7 | |||
1 | out = new FileOutputStream(dest);↵ | |||
2 | fis = srcResource.getInputStream();↵ | 1 | in = source.getInputStream();↵ | |
3 | zIn = new GZIPInputStream(fis);↵ | 2 | out = dest.getOutputStream();↵ | |
4 | byte[] buffer = new byte[8 * 1024];↵ | 3 | byte[] buffer = new byte[FileUtils.BUF_SIZE];↵ | |
5 | int count = 0;↵ | 4 | int count = 0;↵ | |
6 | do {↵ | 5 | do {↵ | |
7 | out.write(buffer, 0, count);↵ | 6 | out.write(buffer, 0, count);↵ | |
8 | count = zIn.read(buffer, 0, buffer.length);↵ | 7 | count = in.read(buffer, 0, buffer.length);↵ | |
9 | } while (count != -1); | 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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 30 |
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 2.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7 | out = new FileOutputStream(dest); |
| 71 | out = dest.getOutputStream(); | ||||||||||||||||
9 | zIn = new GZIPInputStream(fis); |
| 70 | in = source.getInputStream(); | ||||||||||||||||
10 | byte[] buffer = new byte[8 * 1024]; |
| 72 | byte[] buffer = new byte[FileUtils.BUF_SIZE]; | ||||||||||||||||
11 | int count = 0; | 73 | int count = 0; | |||||||||||||||||
14 | do while(count != -1) | 76 | do while(count != -1) | |||||||||||||||||
12 | out.write(buffer, 0, count); |
| 74 | out.write(buffer, 0, count); | ||||||||||||||||
13 | count = zIn.read(buffer, 0, buffer.length); |
| 75 | count = in.read(buffer, 0, buffer.length); |
Row | Violation |
---|