if ( !selectExpressions[i].isScalar() ) {
FromElement fromElement = selectExpressions[i].getFromElement();
if ( fromElement != null ) {
renderNonScalarProperties( appender, fromElement, nonscalarSize, k );
k++;
}
}
if ( collectionPersisters != null ) {
for ( int i=0; i<collectionPersisters.length; i++ ) {
if ( collectionPersisters[i].isArray() ) {
//for arrays, we should end the collection load before resolving
//the entities, since the actual array instances are not instantiated
//during loading
//TODO: or we could do this polymorphically, and have two
// different operations implemented differently for arrays
endCollectionLoad( resultSetId, session, collectionPersisters[i] );
}
}
}
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/SelectClause.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/loader/Loader.java
|
Method name: void renderNonScalarSelects(SelectExpression[], FromClause)
|
|
Method name: void initializeEntitiesAndCollections(List, Object, SessionImplementor, boolean)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 4
|
|
1 | if ( !selectExpression↵ | | 1 | if ( collectionPersisters != null ) {↵
|
| | | 2 | for ( int i=0; i<collectionPersisters.length; i++ ) {↵
|
2 | s[i].isScalar() ) {↵ | | 3 | if ( collectionPersisters[i].isArray() ) {↵
|
3 | FromElement fromElement = selectExpressions[i].getFromElement();↵ | | 4 | ↵
|
4 | if ( fromElement != null ) {↵ | | |
|
5 | ↵ | | 5 | //for arrays, we should end the collection load before resolving↵
|
| | | 6 | //the entities, since the actual array instances are not instantiated↵
|
| | | 7 | //during loading↵
|
| | | 8 | //TODO: or we could do this polymorphically, and have two↵
|
| | | 9 | // different operations implemented differently for arrays↵
|
6 | renderNonScalarProperties( appender, fromElement, nonscalarSize, k );↵ | | 10 | end↵
|
7 | k++;↵ | | |
|
8 | ↵ | | 11 | CollectionLoad( resultSetId, session, collectionPersisters[i] );↵
|
| | | 12 | }↵
|
9 | }↵ | | 13 | }↵
|
10 | } | | 14 | }
|
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |