File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/engine/BatchFetchQueue.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/engine/BatchFetchQueue.java | |||
Method name: boolean isCached(EntityKey, EntityPersister, EntityMode)
|
Method name: boolean isCached(Serializable, CollectionPersister, EntityMode)
|
|||
Number of AST nodes: 2 | Number of AST nodes: 2 | |||
1 | CacheKey key = new CacheKey(↵ | 1 | CacheKey cacheKey = new CacheKey(↵ | |
2 | entityKey.getIdentifier(),↵ | 2 | ↵ | |
3 | ↵ | 3 | collectionKey,↵ | |
4 | persister.getIdentifierType(),↵ | 4 | persister.getKeyType(),↵ | |
5 | entityKey.getEntityName(),↵ | 5 | ↵ | |
6 | ↵ | 6 | persister.getRole(),↵ | |
7 | entityMode,↵ | 7 | entityMode,↵ | |
8 | context.getSession().getFactory()↵ | 8 | context.getSession().getFactory()↵ | |
9 | );↵ | 9 | );↵ | |
10 | return persister.getCacheAccessStrategy().get( key, context.getSession().getTimestamp() ) != null; | 10 | return persister.getCacheAccessStrategy().get( cacheKey, context.getSession().getTimestamp() ) != null; | |
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 declared in the same class |
Number of node comparisons | 4 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| 2 | CacheKey cacheKey = new CacheKey(collectionKey, persister.getKeyType(), persister.getRole(), entityMode, context.getSession().getFactory()); | |||||||||||||||||||
2 | CacheKey key = new CacheKey(entityKey.getIdentifier(), persister.getIdentifierType(), entityKey.getEntityName(), entityMode, context.getSession().getFactory()); |
| | |||||||||||||||||||
3 | return persister.getCacheAccessStrategy().get(key, context.getSession().getTimestamp()) != null; |
| 3 | return persister.getCacheAccessStrategy().get(cacheKey, context.getSession().getTimestamp()) != null; |
Row | Violation |
---|---|
1 | Unmatched statement CacheKey cacheKey=new CacheKey(collectionKey,persister.getKeyType(),persister.getRole(),entityMode,context.getSession().getFactory()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement CacheKey key=new CacheKey(entityKey.getIdentifier(),persister.getIdentifierType(),entityKey.getEntityName(),entityMode,context.getSession().getFactory()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Type org.hibernate.cache.access.EntityRegionAccessStrategy of variable persister.getCacheAccessStrategy() does not match with type org.hibernate.cache.access.CollectionRegionAccessStrategy of variable persister.getCacheAccessStrategy() |
4 | Type org.hibernate.persister.entity.EntityPersister of variable persister does not match with type org.hibernate.persister.collection.CollectionPersister of variable persister |