Source:
<code>protected void entityIsTransient(MergeEvent event, Map copyCache) { LOG.trace( "Merging transient instance" ); final Object entity = event.getEntity(); <START> if ( entity instanceof PersistentAttributeInterceptable ) { <END> } final EventSource session = event.getSession(); final String entityName = event.getEntityName(); final EntityPersister persister = session.getEntityPersister( entityName, entity ); final Serializable id = persister.hasIdentifierProperty() ? persister.getIdentifier( entity, session ) : null; final Object copy; final Object existingCopy = copyCache.get( entity ); if ( existingCopy != null ) { persister.setIdentifier( copyCache.get( entity ), id, session ); copy = existingCopy; } else { copy = session.instantiate( persister, id ); ( (MergeContext) copyCache ).put( entity, copy, true ); } super.cascadeBeforeSave( session, persister, entity, copyCache ); copyValues( persister, entity, copy, session, copyCache, ForeignKeyDirection.FROM_PARENT ); saveTransientEntity( copy, entityName, event.getRequestedId(), session, copyCache ); super.cascadeAfterSave( session, persister, entity, copyCache ); copyValues( persister, entity, copy, session, copyCache, ForeignKeyDirection.TO_PARENT ); event.setResult( copy ); if ( copy instanceof PersistentAttributeInterceptable ) { final PersistentAttributeInterceptable interceptable = (PersistentAttributeInterceptable) copy; final PersistentAttributeInterceptor interceptor = interceptable.$$_hibernate_getInterceptor(); if ( interceptor == null ) { persister.getInstrumentationMetadata().injectInterceptor( copy, id, session ); } } }</code><technical_language>this check removed</technical_language>

Target:
protected void entityIsTransient(MergeEvent event, Map copyCache) { LOG.trace( "Merging transient instance" ); final Object entity = event.getEntity(); final EventSource session = event.getSession(); final String entityName = event.getEntityName(); final EntityPersister persister = session.getEntityPersister( entityName, entity ); final Serializable id = persister.hasIdentifierProperty() ? persister.getIdentifier( entity, session ) : null; final Object copy; final Object existingCopy = copyCache.get( entity ); if ( existingCopy != null ) { persister.setIdentifier( copyCache.get( entity ), id, session ); copy = existingCopy; } else { copy = session.instantiate( persister, id ); ( (MergeContext) copyCache ).put( entity, copy, true ); } super.cascadeBeforeSave( session, persister, entity, copyCache ); copyValues( persister, entity, copy, session, copyCache, ForeignKeyDirection.FROM_PARENT ); saveTransientEntity( copy, entityName, event.getRequestedId(), session, copyCache ); super.cascadeAfterSave( session, persister, entity, copyCache ); copyValues( persister, entity, copy, session, copyCache, ForeignKeyDirection.TO_PARENT ); event.setResult( copy ); if ( copy instanceof PersistentAttributeInterceptable ) { final PersistentAttributeInterceptable interceptable = (PersistentAttributeInterceptable) copy; final PersistentAttributeInterceptor interceptor = interceptable.$$_hibernate_getInterceptor(); if ( interceptor == null ) { persister.getBytecodeEnhancementMetadata().injectInterceptor( copy, id, session ); } } }