File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java | |||
Method name: Object initializeLazyPropertiesFromDatastore(String, Object, SessionImplementor, Serializable, EntityEntry)
|
Method name: Object initializeLazyPropertiesFromCache(String, Object, SessionImplementor, EntityEntry, CacheEntry)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | for ( int j = 0; j < lazyPropertyNames.length; j++ ) {↵ | 1 | for ( int j = 0; j < lazyPropertyNames.length; j++ ) {↵ | |
2 | Object propValue = lazyPropertyTypes[j].nullSafeGet( rs,↵ | 2 | final Object propValue = lazyPropertyTypes[j].assemble(↵ | |
3 | lazyPropertyColumnAliases[j], ↵ | 3 | disassembledValues[ lazyPropertyNumbers[j] ],↵ | |
4 | session, ↵ | 4 | session,↵ | |
5 | entity );↵ | 5 | entity↵ | |
6 | ↵ | 6 | );↵ | |
7 | if ( initializeLazyProperty( fieldName, entity, session, snapshot, j, propValue ) ) {↵ | 7 | if ( initializeLazyProperty( fieldName, entity, session, snapshot, j, propValue ) ) {↵ | |
8 | result = propValue;↵ | 8 | result = propValue;↵ | |
9 | }↵ | 9 | ↵ | |
10 | ↵ | 10 | }↵ | |
11 | } | 11 |
| |
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.5 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 8 |
Number of mapped statements | 3 |
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.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||
---|---|---|---|---|---|---|---|---|
17 | for (int j = 0; j < lazyPropertyNames.length; j++) | 5 | for (int j = 0; j < lazyPropertyNames.length; j++) | |||||
|
| 6 | final Object propValue = lazyPropertyTypes[j].assemble(disassembledValues[lazyPropertyNumbers[j]], session, entity); | |||||
18 | Object propValue = lazyPropertyTypes[j].nullSafeGet(rs, lazyPropertyColumnAliases[j], session, entity); |
| | |||||
19 | if (initializeLazyProperty(fieldName, entity, session, snapshot, j, propValue)) | 7 | if (initializeLazyProperty(fieldName, entity, session, snapshot, j, propValue)) | |||||
20 | result = propValue; | 8 | result = propValue; |
Row | Violation |
---|---|
1 | Unmatched statement final Object propValue=lazyPropertyTypes[j].assemble(disassembledValues[lazyPropertyNumbers[j]],session,entity); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement final Object propValue=lazyPropertyTypes[j].assemble(disassembledValues[lazyPropertyNumbers[j]],session,entity); 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 Object propValue=lazyPropertyTypes[j].nullSafeGet(rs,lazyPropertyColumnAliases[j],session,entity); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement Object propValue=lazyPropertyTypes[j].nullSafeGet(rs,lazyPropertyColumnAliases[j],session,entity); 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 |
5 | Clone fragment #1 returns variables j, result , while Clone fragment #2 returns variables j, result |