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/taskdefs/Tar.java | |||
Method name: void extract()
|
Method name: void tarResource(Resource, TarOutputStream, String, TarFileSet)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 7 | |||
1 | out = new FileOutputStream(dest);↵ | 1 | if (!r.isDirectory()) {↵ | |
2 | fis = srcResource.getInputStream();↵ | 2 | in = r.getInputStream();↵ | |
3 | zIn = new GZIPInputStream(fis);↵ | |||
4 | byte[] buffer = new byte[8 * 1024];↵ | 3 | byte[] buffer = new byte[8 * 1024];↵ | |
5 | int count = 0;↵ | 4 | int count = 0;↵ | |
6 | do {↵ | 5 | do {↵ | |
7 | out.write(buffer, 0, count);↵ | 6 | tOut.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 | } while (count != -1);↵ | |
9 |
| |||
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 25 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 2.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9 | zIn = new GZIPInputStream(fis); |
| 63 | in = r.getInputStream(); | ||||||||||||||||
10 | byte[] buffer = new byte[8 * 1024]; | 64 | byte[] buffer = new byte[8 * 1024]; | |||||||||||||||||
11 | int count = 0; | 65 | int count = 0; | |||||||||||||||||
14 | do while(count != -1) | 68 | do while(count != -1) | |||||||||||||||||
12 | out.write(buffer, 0, count); |
| 66 | tOut.write(buffer, 0, count); | ||||||||||||||||
13 | count = zIn.read(buffer, 0, buffer.length); |
| 67 | count = in.read(buffer, 0, buffer.length); |
Row | Violation |
---|