Serializable entityId = persister.getIdentifier( entity, source.getEntityMode() );
if ( !persister.getIdentifierType().isEqual( id, entityId, source.getEntityMode(), source.getFactory() ) ) {
throw new HibernateException( "merge requested with id not matching id of passed entity" );
}
CacheKey ck = new CacheKey(
id,
getIdentifierType(),
getRootEntityName(),
session.getEntityMode(),
session.getFactory()
);
if ( getCacheAccessStrategy().get( ck, session.getTimestamp() ) != null ) {
return Boolean.FALSE;
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/event/def/DefaultMergeEventListener.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java
|
Method name: void entityIsDetached(MergeEvent, Map)
|
|
Method name: Boolean isTransient(Object, SessionImplementor)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | Serializable entityId = persister.getIdentifier( entity, source.getEntityMode() );↵ | | |
|
2 | if ( !persister.getIdentifierType().isEqual( id, entityId, source↵ | | 1 | CacheKey ck = new CacheKey(↵
|
| | | 2 | id,↵
|
| | | 3 | getIdentifierType(),↵
|
| | | 4 | getRootEntityName(),↵
|
3 | .getEntityMode(), source.getFactory() ) ) {↵ | | 5 | session.getEntityMode(),↵
|
4 | throw new HibernateException( "merge requested with id not matching id of passed entity" )↵ | | |
|
| | | 6 | session.getFactory()↵
|
| | | 7 | );↵
|
| | | 8 | if ( getCacheAccessStrategy().get( ck, session.getTimestamp() ) != null ) {↵
|
5 | ;↵ | | 9 | return Boolean.FALSE;↵
|
6 | } | | 10 | }
|
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |