File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/SessionFactoryImpl.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/SessionFactoryImpl.java | |||
Method name: void SessionFactoryImpl(Configuration, Mapping, Settings, EventListeners, SessionFactoryObserver)
|
Method name: void SessionFactoryImpl(Configuration, Mapping, Settings, EventListeners, SessionFactoryObserver)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | log.trace( "Building cache for entity data [" + model.getEntityName() + "]" );↵ | 1 | log.trace( "Building cache for collection data [" + model.getRole() + "]" );↵ | |
2 | EntityRegion entityRegion = settings.getRegionFactory().buildEntityRegion( cacheRegionName, properties, CacheDataDescriptionImpl.decode( model ) );↵ | 2 | CollectionRegion collectionRegion = settings.getRegionFactory().buildCollectionRegion( cacheRegionName, properties, CacheDataDescriptionImpl.decode( model ) );↵ | |
3 | accessStrategy = entityRegion.buildAccessStrategy( accessType );↵ | 3 | accessStrategy = collectionRegion.buildAccessStrategy( accessType );↵ | |
4 | entityAccessStrategies.put( cacheRegionName, accessStrategy );↵ | 4 | entityAccessStrategies.put( cacheRegionName, accessStrategy );↵ | |
5 | allCacheRegions.put( cacheRegionName, entityRegion ); | 5 | allCacheRegions.put( cacheRegionName, collectionRegion ); | |
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.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 26 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
36 | log.trace("Building cache for entity data [" + model.getEntityName() + "]"); |
| 54 | log.trace("Building cache for collection data [" + model.getRole() + "]"); | |||||||||||||||||
37 | EntityRegion entityRegion = settings.getRegionFactory().buildEntityRegion(cacheRegionName, properties, CacheDataDescriptionImpl.decode(model)); |
| | ||||||||||||||||||
38 | accessStrategy = entityRegion.buildAccessStrategy(accessType); | | |||||||||||||||||||
|
| 55 | CollectionRegion collectionRegion = settings.getRegionFactory().buildCollectionRegion(cacheRegionName, properties, CacheDataDescriptionImpl.decode(model)); | ||||||||||||||||||
| 56 | accessStrategy = collectionRegion.buildAccessStrategy(accessType); | |||||||||||||||||||
39 | entityAccessStrategies.put(cacheRegionName, accessStrategy); |
| 57 | entityAccessStrategies.put(cacheRegionName, accessStrategy); | |||||||||||||||||
40 | allCacheRegions.put(cacheRegionName, entityRegion); |
| 58 | allCacheRegions.put(cacheRegionName, collectionRegion); |
Row | Violation |
---|---|
1 | Type org.hibernate.mapping.PersistentClass of variable model does not match with type org.hibernate.mapping.Collection of variable model |
2 | Unmatched statement EntityRegion entityRegion=settings.getRegionFactory().buildEntityRegion(cacheRegionName,properties,CacheDataDescriptionImpl.decode(model)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement CollectionRegion collectionRegion=settings.getRegionFactory().buildCollectionRegion(cacheRegionName,properties,CacheDataDescriptionImpl.decode(model)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Type org.hibernate.cache.access.EntityRegionAccessStrategy of variable accessStrategy does not match with type org.hibernate.cache.access.CollectionRegionAccessStrategy of variable accessStrategy |
5 | Expression entityRegion cannot be unified with expression collectionRegion , because common superclass type org.hibernate.cache.TransactionalDataRegion cannot be passed as an argument to public abstract java.lang.Object put(java.lang.Object, java.lang.Object) |