File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Untar.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/resources/BZip2Resource.java | |||
Method name: InputStream decompress(String, InputStream)
|
Method name: InputStream wrapStream(InputStream)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | for (int i = 0; i < magic.length; i++) {↵ | 1 | for (int i = 0; i < MAGIC.length; i++) {↵ | |
2 | if (istream.read() != magic[i]) {↵ | 2 | if (in.read() != MAGIC[i]) {↵ | |
3 | throw new BuildException(↵ | 3 | throw new IOException(↵ | |
4 | "Invalid bz2 file." + name);↵ | |||
5 | }↵ | |||
6 | ↵ | 4 | "Invalid bz2 stream.");↵ | |
5 | }↵ | |||
7 | } | 6 |
| |
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 5 |
Number of mapped statements | 3 |
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) | 0.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | for (int i = 0; i < magic.length; i++) |
| 1 | for (int i = 0; i < MAGIC.length; i++) | |||||||||||||
7 | if (istream.read() != magic[i]) |
| 2 | if (in.read() != MAGIC[i]) | |||||||||||||
8 | throw new BuildException("Invalid bz2 file." + name); |
| 3 | throw new IOException("Invalid bz2 stream."); |
Row | Violation |
---|