if ( intercepted && event.isDirtyCheckPossible() && !event.isDirtyCheckHandledByInterceptor() ) { int[] dirtyProperties; if ( event.hasDatabaseSnapshot() ) { dirtyProperties = persister.findModified( event.getDatabaseSnapshot(), values, entity, session ); } else { dirtyProperties = persister.findDirty( values, entry.getLoadedState(), entity, session ); } event.setDirtyProperties(dirtyProperties); }
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/event/def/DefaultFlushEntityEventListener.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/SessionFactoryImpl.java
Method name: boolean handleInterception(FlushEntityEvent) Method name: void SessionFactoryImpl(Configuration, Mapping, Settings, EventListeners, SessionFactoryObserver)
Number of AST nodes: 6 Number of AST nodes: 6
1
if ( intercepted && event.isDirtyCheckPossible() && !event.isDirtyCheckHandledByInterceptor() ) {
1
if ( 
2
			int[] dirtyProperties;
3
			if ( event.hasDatabaseSnapshot() ) {
4
				dirtyProperties = persister.findModified( event.getDatabaseSnapshot(), values, entity, session );
5
			}
6
			else {
7
				dirtyProperties = persister.findDirty( values, entry.getLoaded
2
accessType != null && settings.isSecondLevelCacheEnabled() ) {
3
				log.trace( "Building cache for collection data [" + model.getRole() + "]" );
4
				CollectionRegion collectionRegion = settings.getRegionFactory().buildCollectionRegion( cacheRegionName, properties, CacheDataDescriptionImpl.decode( model ) );
5
				accessStrategy = collectionRegion.buildAccessStrategy( accessType );
8
State(), entity, session );
6
				entityAccessStrate
9
			}
10
			event.setDirtyProperties(dirtyProperties
7
gies.put( cacheRegionName, accessStrategy );
11
);
8
				allCacheRegions.put( cacheRegionName, collectionRegion );
12
		}
9
			}
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes
Number of node comparisons1