if (o1 == o2) return true;
if (o1 == null || o2 == null) return false;
int length = o1.length;
if (length != o2.length) return false;
for (int index = 0 ; index < length ; index++) {
if ( ! ( o1[index] == o2[index] ) ) return false;
}
return true;
if (b1 == b2) return true;
if (b1 == null || b2 == null) return false;
int length = b1.length;
if (length != b2.length) return false;
for (int index = 0 ; index < length ; index++) {
if ( ! ( b1[index] == b2[index] ) ) return false;
}
return true;
Clone fragments detected by clone detection tool
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 | return true;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
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 | 1 |