if ( accessType != null ) {
log.trace( "Building cache for entity data [" + model.getEntityName() + "]" );
EntityRegion entityRegion = settings.getRegionFactory().buildEntityRegion( cacheRegionName, properties, CacheDataDescriptionImpl.decode( model ) );
accessStrategy = entityRegion.buildAccessStrategy( accessType );
entityAccessStrategies.put( cacheRegionName, accessStrategy );
allCacheRegions.put( cacheRegionName, entityRegion );
}
if ( accessType != null && settings.isSecondLevelCacheEnabled() ) {
log.trace( "Building cache for collection data [" + model.getRole() + "]" );
CollectionRegion collectionRegion = settings.getRegionFactory().buildCollectionRegion( cacheRegionName, properties, CacheDataDescriptionImpl.decode( model ) );
accessStrategy = collectionRegion.buildAccessStrategy( accessType );
entityAccessStrategies.put( cacheRegionName, accessStrategy );
allCacheRegions.put( cacheRegionName, collectionRegion );
}
Clone fragments detected by clone detection tool
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: 6
|
|
Number of AST nodes: 6
|
|
1 | if ( accessType != null ) {↵ | | 1 | if ( accessType != null && settings.isSecondLevelCacheEnabled() ) {↵
|
2 | log.trace( "Building cache for entity data [" + model.getEntityName() + "]" );↵ | | 2 | log.trace( "Building cache for collection data [" + model.getRole() + "]" );↵
|
3 | EntityRegion entityRegion = settings.getRegionFactory().buildEntityRegion( cacheRegionName, properties, CacheDataDescriptionImpl.decode( model ) );↵ | | 3 | CollectionRegion collectionRegion = settings.getRegionFactory().buildCollectionRegion( cacheRegionName, properties, CacheDataDescriptionImpl.decode( model ) );↵
|
4 | accessStrategy = entityRegion.buildAccessStrategy( accessType );↵ | | 4 | accessStrategy = collectionRegion.buildAccessStrategy( accessType );↵
|
5 | entityAccessStrategies.put( cacheRegionName, accessStrategy );↵ | | 5 | entityAccessStrategies.put( cacheRegionName, accessStrategy );↵
|
6 | allCacheRegions.put( cacheRegionName, entityRegion );↵ | | 6 | allCacheRegions.put( cacheRegionName, collectionRegion );↵
|
7 | } | | 7 | }
|
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.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 1 |