File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/loader/Loader.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/loader/Loader.java | |||
Method name: Object loadSingleRow(ResultSet, SessionImplementor, QueryParameters, boolean)
|
Method name: void loadCollectionBatch(SessionImplementor, Serializable[], Type)
|
|||
Number of AST nodes: 2 | Number of AST nodes: 2 | |||
1 | try {↵ | 1 | try {↵ | |
2 | result = getRowFromResultSet(↵ | 2 | ↵ | |
3 | resultSet,↵ | 3 | doQueryAndInitializeNonLazyCollections( ↵ | |
4 | session,↵ | 4 | session,↵ | |
5 | queryParameters,↵ | 5 | new QueryParameters↵ | |
6 | getLockModes( queryParameters.getLockModes() ),↵ | |||
7 | null,↵ | |||
8 | hydratedObjects,↵ | |||
9 | new EntityKey[entitySpan],↵ | |||
10 | returnProxies↵ | 6 | ( idTypes, ids, ids ),↵ | |
7 | true ↵ | |||
11 | );↵ | 8 | );↵ | |
12 | }↵ | 9 | }↵ | |
13 | catch ( SQLException sqle ) {↵ | 10 | catch ( SQLException sqle ) {↵ | |
14 | throw JDBCExceptionHelper.convert(↵ | 11 | throw JDBCExceptionHelper.convert(↵ | |
15 | factory.getSQLExceptionConverter(),↵ | 12 | factory.getSQLExceptionConverter(),↵ | |
16 | sqle,↵ | 13 | sqle,↵ | |
17 | "could not read next row of results"↵ | 14 | "could not initialize a collection batch: " + ↵ | |
18 | ,↵ | 15 | MessageHelper.collectionInfoString( getCollectionPersisters()[0], ids, getFactory() ),↵ | |
19 | getSQLString()↵ | 16 | getSQLString()↵ | |
20 | );↵ | 17 | );↵ | |
21 | } | 18 |
| |
See real code fragment | See real code fragment |
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.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 4 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 7.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | try |
| 5 | try | ||||||||||
5 | result = getRowFromResultSet(resultSet, session, queryParameters, getLockModes(queryParameters.getLockModes()), null, hydratedObjects, new EntityKey[entitySpan], returnProxies); |
| | |||||||||||
|
| 6 | doQueryAndInitializeNonLazyCollections(session, new QueryParameters(idTypes, ids, ids), true); |
Row | Violation |
---|---|
1 | Unmatched statement result=getRowFromResultSet(resultSet,session,queryParameters,getLockModes(queryParameters.getLockModes()),null,hydratedObjects,new EntityKey[entitySpan],returnProxies); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement result=getRowFromResultSet(resultSet,session,queryParameters,getLockModes(queryParameters.getLockModes()),null,hydratedObjects,new EntityKey[entitySpan],returnProxies); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
3 | Unmatched statement doQueryAndInitializeNonLazyCollections(session,new QueryParameters(idTypes,ids,ids),true); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement doQueryAndInitializeNonLazyCollections(session,new QueryParameters(idTypes,ids,ids),true); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |