if ( queryableCollection == null ) {
return false;
}
else {
return !queryableCollection.getElementType().isEntityType();
}
if ( maxPosition == null ) {
// we have not yet hit the last result...
return false;
}
else {
return currentPosition == maxPosition.intValue();
}
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/FromElementType.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/FetchingScrollableResultsImpl.java
|
Method name: boolean isCollectionOfValuesOrComponents()
|
|
Method name: boolean isLast()
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if ( queryableCollection == null ) {↵ | | 1 | if ( maxPosition == null ) {↵
|
2 | ↵ | | 2 | // we have not yet hit the last result...↵
|
3 | return false;↵ | | 3 | return false;↵
|
4 | }↵ | | 4 | }↵
|
5 | else {↵ | | 5 | else {↵
|
6 | return !queryableCollection.getElementType().isEntityType();↵ | | 6 | return currentPosition == maxPosition.intValue();↵
|
7 | } | | 7 | }
|
See real code fragment |
|
See real code fragment |
Summary
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 9 |
-
{Non-refactorable}
Mapping Summary
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.6 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | if (queryableCollection == null) | | 1 | if (maxPosition == null) |
3 | | | 2 | |
| | | | |
4 | return !queryableCollection.getElementType().isEntityType(); | | 3 | return currentPosition == maxPosition.intValue(); |
Precondition Violations (1)
Row |
Violation |
1 | Type org.hibernate.persister.collection.QueryableCollection of variable queryableCollection does not match with type java.lang.Integer of variable maxPosition |