for ( int j = 0; j < params.length; ++j ) {
if ( !params[j].equals( parameterTypes[j] ) ) {
eq = false;
break;
}
}
for ( int j = 0; j < params.length; ++j ) {
if ( !params[j].equals( parameterTypes[j] ) ) {
eq = false;
break;
}
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/bytecode/javassist/FastClass.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/bytecode/javassist/FastClass.java
|
Method name: int getIndex(Class[])
|
|
Method name: int getIndex(String, Class[])
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | for ( int j = 0; j < params.length; ++j ) {↵ | | 1 | for ( int j = 0; j < params.length; ++j ) {↵
|
2 | if ( !params[j].equals( parameterTypes[j] ) ) {↵ | | 2 | if ( !params[j].equals( parameterTypes[j] ) ) {↵
|
3 | eq = false;↵ | | 3 | eq = false;↵
|
4 | break;↵ | | 4 | break;↵
|
5 | }↵ | | 5 | }↵
|
6 | } | | 6 | }
|
See real code fragment |
|
See real code fragment |
Summary
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.5 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 13 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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.6 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
10 | for (int j = 0; j < params.length; ++j) | | 12 | for (int j = 0; j < params.length; ++j) |
11 | if (!params[j].equals(parameterTypes[j])) | | 13 | if (!params[j].equals(parameterTypes[j])) |
12 | | | 14 | |
13 | | | 15 | |
Precondition Violations (0)
Row |
Violation |