for ( int i = 0; i < targetDatatypes.length; i++ ) {
if ( !areSqlTypesCompatible( targetDatatypes[i], sourceDatatypes[i] ) ) {
return false;
}
}
for ( int i = 0; i < types.length; i++ ) {
if ( !areCompatible( types[i], selectTypes[i] ) ) {
throw new QueryException(
"insertion type [" + types[i] + "] and selection type [" +
selectTypes[i] + "] at position " + i + " are not compatible"
);
}
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/ast/tree/IntoClause.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/ast/tree/IntoClause.java
|
Method name: boolean areCompatible(Type, Type)
|
|
Method name: void validateTypes(SelectClause)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | for ( int i = 0; i < targetDatatypes.length; i++ ) {↵ | | 1 | for ( int i = 0; i < types.length; i++ ) {↵
|
2 | if ( !areSqlTypesCompatible( targetDatatypes[i], sourceDatatypes[i] ) ) {↵ | | 2 | if ( !areCompatible( t↵
|
3 | return false↵ | | 3 | ypes[i], selectTypes[i] ) ) {↵
|
| | | 4 | throw new QueryException(↵
|
| | | 5 | "insertion type [" + types[i] + "] and selection type [" +↵
|
| | | 6 | selectTypes[i] + "] at position " + i + " are not compatible"↵
|
4 | ;↵ | | 7 | );↵
|
5 | }↵ | | 8 | }↵
|
6 | } | | 9 | }
|
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 |