File path: /apache-ant-1.7.0/src/org/apache/tools/bzip2/CBZip2InputStream.java | File path: /apache-ant-1.7.0/src/org/apache/tools/bzip2/CBZip2OutputStream.java | |||
Method name: int read(byte[], int, int)
|
Method name: void write(byte[], int, int)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | if (offs < 0) {↵ | 1 | if (offs < 0) {↵ | |
2 | throw new IndexOutOfBoundsException("offs(" + offs + ") < 0.");↵ | 2 | throw new IndexOutOfBoundsException("offs(" + offs + ") < 0.");↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (len < 0) {↵ | 4 | if (len < 0) {↵ | |
5 | throw new IndexOutOfBoundsException("len(" + len + ") < 0.");↵ | 5 | throw new IndexOutOfBoundsException("len(" + len + ") < 0.");↵ | |
6 | }↵ | 6 | }↵ | |
7 | if (offs + len > dest.length) {↵ | 7 | if (offs + len > buf.length) {↵ | |
8 | throw new IndexOutOfBoundsException("offs(" + offs + ") + len("↵ | 8 | throw new IndexOutOfBoundsException("offs(" + offs + ") + len("↵ | |
9 | + len + ") > dest.length("↵ | 9 | + len + ") > buf.length("↵ | |
10 | + dest.length + ").");↵ | 10 | + buf.length + ").");↵ | |
11 | }↵ | 11 | }↵ | |
12 | if (this.in == null) {↵ | 12 | if (this.out == null) {↵ | |
13 | throw new IOException("stream closed");↵ | 13 | throw new IOException("stream closed");↵ | |
14 | } | 14 |
| |
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) | 1.9 |
Clones location | Clones are in different classes |
Number of node comparisons | 31 |
Number of mapped statements | 8 |
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) | 4.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (offs < 0) | 1 | if (offs < 0) | ||||||||||||||
2 | throw new IndexOutOfBoundsException("offs(" + offs + ") < 0."); | 2 | throw new IndexOutOfBoundsException("offs(" + offs + ") < 0."); | ||||||||||||||
3 | if (len < 0) | 3 | if (len < 0) | ||||||||||||||
4 | throw new IndexOutOfBoundsException("len(" + len + ") < 0."); | 4 | throw new IndexOutOfBoundsException("len(" + len + ") < 0."); | ||||||||||||||
5 | if (offs + len > dest.length) |
| 5 | if (offs + len > buf.length) | |||||||||||||
6 | throw new IndexOutOfBoundsException("offs(" + offs + ") + len(" + len + ") > dest.length(" + dest.length + ")."); |
| 6 | throw new IndexOutOfBoundsException("offs(" + offs + ") + len(" + len + ") > buf.length(" + buf.length + ")."); | |||||||||||||
7 | if (this.in == null) |
| 7 | if (this.out == null) | |||||||||||||
8 | throw new IOException("stream closed"); | 8 | throw new IOException("stream closed"); |
Row | Violation |
---|