File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/builder/MultiplexingCacheInstanceManager.java | File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/builder/MultiplexingCacheInstanceManager.java | |||
Method name: void releaseCaches()
|
Method name: void releaseCaches()
|
|||
Number of AST nodes: 9 | Number of AST nodes: 5 | |||
1 | jbcFactory.releaseCache(entityConfig);↵ | 1 | jbcFactory.releaseCache(queryConfig);↵ | |
2 | jbcEntityCache = null;↵ | 2 | jbcQueryCache = null;↵ | |
3 | ↵ | 3 | ↵ | |
4 | // Make sure we don't re-release the same cache↵ | 4 | ↵ | |
5 | if (entityConfig.equals(collectionConfig))↵ | |||
6 | collectionConfig = null;↵ | |||
7 | if (entityConfig.equals(queryConfig))↵ | |||
8 | queryConfig = null;↵ | |||
9 | if (entityConfig.equals(tsConfig))↵ | 5 | if (queryConfig.equals(tsConfig))↵ | |
10 | tsConfig = null;↵ | 6 | tsConfig = null;↵ | |
11 | entityConfig = null; | 7 | queryConfig = 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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 11 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | jbcFactory.releaseCache(entityConfig); |
| 23 | jbcFactory.releaseCache(queryConfig); | |||||||||||||
4 | jbcEntityCache = null; |
| 24 | jbcQueryCache = null; | |||||||||||||
5 | if (entityConfig.equals(collectionConfig)) |
| 25 | if (queryConfig.equals(tsConfig)) | |||||||||||||
6 | collectionConfig = null; |
| 26 | tsConfig = null; | |||||||||||||
8 | queryConfig = null; | | |||||||||||||||
10 | tsConfig = null; | | |||||||||||||||
11 | entityConfig = null; |
| 27 | queryConfig = null; |
Row | Violation |
---|---|
1 | Expression jbcEntityCache is a field being modified, and thus it cannot be parameterized |
2 | Expression jbcQueryCache is a field being modified, and thus it cannot be parameterized |
3 | Expression collectionConfig is a field being modified, and thus it cannot be parameterized |
4 | Expression tsConfig is a field being modified, and thus it cannot be parameterized |
5 | Expression entityConfig is a field being modified, and thus it cannot be parameterized |
6 | Expression queryConfig is a field being modified, and thus it cannot be parameterized |