File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/util/ArrayHelper.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/util/ArrayHelper.java | |||
Method name: boolean isEquals(char[], char[])
|
Method name: boolean isEquals(byte[], byte[])
|
|||
Number of AST nodes: 11 | Number of AST nodes: 11 | |||
1 | if (o1 == o2) return true;↵ | 1 | if (b1 == b2) return true;↵ | |
2 | if (o1 == null || o2 == null) return false;↵ | 2 | if (b1 == null || b2 == null) return false;↵ | |
3 | int length = o1.length;↵ | 3 | int length = b1.length;↵ | |
4 | if (length != o2.length) return false;↵ | 4 | if (length != b2.length) return false;↵ | |
5 | for (int index = 0 ; index < length ; index++) {↵ | 5 | for (int index = 0 ; index < length ; index++) {↵ | |
6 | if ( ! ( o1[index] == o2[index] ) ) return false;↵ | 6 | if ( ! ( b1[index] == b2[index] ) ) return false;↵ | |
7 | }↵ | 7 | }↵ | |
8 | return true; | 8 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.8 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 27 |
Number of mapped statements | 11 |
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.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (o1 == o2) |
| 1 | if (b1 == b2) | |||||||||||||||||||||
2 | return true; | 2 | return true; | ||||||||||||||||||||||
3 | if (o1 == null || o2 == null) |
| 3 | if (b1 == null || b2 == null) | |||||||||||||||||||||
4 | return false; | 4 | return false; | ||||||||||||||||||||||
5 | int length = o1.length; |
| 5 | int length = b1.length; | |||||||||||||||||||||
6 | if (length != o2.length) |
| 6 | if (length != b2.length) | |||||||||||||||||||||
7 | return false; | 7 | return false; | ||||||||||||||||||||||
8 | for (int index = 0; index < length; index++) | 8 | for (int index = 0; index < length; index++) | ||||||||||||||||||||||
9 | if (!(o1[index] == o2[index])) |
| 9 | if (!(b1[index] == b2[index])) | |||||||||||||||||||||
10 | return false; | 10 | return false; | ||||||||||||||||||||||
11 | return true; | 11 | return true; |
Row | Violation |
---|---|
1 | Type char[] of variable o1 does not match with type byte[] of variable b1 |
2 | Type char[] of variable o2 does not match with type byte[] of variable b2 |
3 | Type char[] of variable o1 does not match with type byte[] of variable b1 |
4 | Type char[] of variable o2 does not match with type byte[] of variable b2 |
5 | Type int of variable o1.length does not match with type int of variable b1.length |
6 | Type int of variable o2.length does not match with type int of variable b2.length |
7 | Type char[] of variable o1 does not match with type byte[] of variable b1 |
8 | Type char[] of variable o2 does not match with type byte[] of variable b2 |