File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/action/CollectionAction.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/event/def/DefaultRefreshEventListener.java | |||
Method name: void evict()
|
Method name: void onRefresh(RefreshEvent, Map)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | if ( persister.hasCache() ) {↵ | 1 | if ( persister.hasCache() ) {↵ | |
2 | CacheKey ck = new CacheKey( ↵ | 2 | final CacheKey ck = new CacheKey(↵ | |
3 | key, ↵ | 3 | id,↵ | |
4 | persister.getKeyType(), ↵ | 4 | persister.getIdentifierType(),↵ | |
5 | persister.getRole(), ↵ | 5 | persister.getRootEntityName(),↵ | |
6 | session.getEntityMode(), ↵ | 6 | source.getEntityMode(), ↵ | |
7 | session.getFactory() ↵ | 7 | source.getFactory()↵ | |
8 | ↵ | |||
9 | );↵ | 8 | );↵ | |
10 | persister.getCacheAccessStrategy().remove( ck );↵ | 9 | persister.getCacheAccessStrategy().evict( ck );↵ | |
11 | } | 10 |
| |
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 9 |
Number of mapped statements | 2 |
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) | 19.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (persister.hasCache()) |
| 32 | if (persister.hasCache()) | ||||||||||||||||||||||||
2 | CacheKey ck = new CacheKey(key, persister.getKeyType(), persister.getRole(), session.getEntityMode(), session.getFactory()); |
| | |||||||||||||||||||||||||
|
| 33 | final CacheKey ck = new CacheKey(id, persister.getIdentifierType(), persister.getRootEntityName(), source.getEntityMode(), source.getFactory()); | |||||||||||||||||||||||||
3 | persister.getCacheAccessStrategy().remove(ck); |
| 34 | persister.getCacheAccessStrategy().evict(ck); |
Row | Violation |
---|---|
1 | Type org.hibernate.persister.collection.CollectionPersister of variable persister does not match with type org.hibernate.persister.entity.EntityPersister of variable persister |
2 | Unmatched statement CacheKey ck=new CacheKey(key,persister.getKeyType(),persister.getRole(),session.getEntityMode(),session.getFactory()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched statement final CacheKey ck=new CacheKey(id,persister.getIdentifierType(),persister.getRootEntityName(),source.getEntityMode(),source.getFactory()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Expression persister.getCacheAccessStrategy().remove(ck) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression persister.getCacheAccessStrategy().evict(ck) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression persister.getCacheAccessStrategy().remove(ck) is a void method call, and thus it cannot be parameterized |
7 | Expression persister.getCacheAccessStrategy().evict(ck) is a void method call, and thus it cannot be parameterized |
8 | Expression persister.getCacheAccessStrategy() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression persister.getCacheAccessStrategy() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Type org.hibernate.cache.access.CollectionRegionAccessStrategy of variable persister.getCacheAccessStrategy() does not match with type org.hibernate.cache.access.EntityRegionAccessStrategy of variable persister.getCacheAccessStrategy() |
11 | Type org.hibernate.persister.collection.CollectionPersister of variable persister does not match with type org.hibernate.persister.entity.EntityPersister of variable persister |