File path: /apache-ant-1.7.0/src/org/apache/tools/zip/ZipOutputStream.java | File path: /apache-ant-1.7.0/src/org/apache/tools/zip/ZipOutputStream.java | |||
Method name: void writeLocalFileHeader(ZipEntry)
|
Method name: void writeCentralFileHeader(ZipEntry)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (zipMethod == DEFLATED && raf == null) {↵ | 1 | if (ze.getMethod() == DEFLATED && raf == null) {↵ | |
2 | // requires version 2 as we are going to store length info↵ | 2 | // requires version 2 as we are going to store length info↵ | |
3 | // in the data descriptor↵ | 3 | // in the data descriptor↵ | |
4 | writeOut(ZipShort.getBytes(20));↵ | 4 | writeOut(ZipShort.getBytes(20));↵ | |
5 | // bit3 set to signal, we use a data descriptor↵ | 5 | // bit3 set to signal, we use a data descriptor↵ | |
6 | writeOut(ZipShort.getBytes(8));↵ | 6 | writeOut(ZipShort.getBytes(8));↵ | |
7 | } else {↵ | 7 | } else {↵ | |
8 | writeOut(ZipShort.getBytes(10));↵ | 8 | writeOut(ZipShort.getBytes(10));↵ | |
9 | writeOut(ZERO);↵ | 9 | writeOut(ZERO);↵ | |
10 | } | 10 |
| |
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 declared in the same class |
Number of node comparisons | 25 |
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) | 2.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5 | if (zipMethod == DEFLATED && raf == null) |
| 5 | if (ze.getMethod() == DEFLATED && raf == null) | ||||||||||
6 | writeOut(ZipShort.getBytes(20)); | 6 | writeOut(ZipShort.getBytes(20)); | |||||||||||
7 | writeOut(ZipShort.getBytes(8)); | 7 | writeOut(ZipShort.getBytes(8)); | |||||||||||
else | else | |||||||||||||
8 | writeOut(ZipShort.getBytes(10)); | 8 | writeOut(ZipShort.getBytes(10)); | |||||||||||
9 | writeOut(ZERO); | 9 | writeOut(ZERO); |
Row | Violation |
---|