jbcFactory.releaseCache(entityConfig);
jbcEntityCache = null;
// Make sure we don't re-release the same cache
if (entityConfig.equals(collectionConfig))
collectionConfig = null;
if (entityConfig.equals(queryConfig))
queryConfig = null;
if (entityConfig.equals(tsConfig))
tsConfig = null;
entityConfig = null;
jbcFactory.releaseCache(tsConfig);
jbcTsCache = null;
tsConfig = null;
Clone fragments detected by clone detection tool
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: 3
|
|
1 | jbcFactory.releaseCache(entityConfig);↵ | | 1 | jbcFactory.releaseCache(tsConfig);↵
|
2 | jbcEntityCache = null;↵ | | 2 | jbc↵
|
3 | ↵ | | |
|
4 | // Make sure we don't re-release the same cache↵ | | |
|
5 | if (entityConfig.equals(collectionConfig))↵ | | |
|
6 | collectionConfig = null;↵ | | |
|
7 | if (entityConfig.equals(queryConfig))↵ | | |
|
8 | queryConfig = null;↵ | | |
|
9 | if (entityConfig.equals(tsConfig))↵ | | |
|
10 | tsConfig = null;↵ | | |
|
11 | entity↵ | | 3 | TsCache = null;↵
|
| | | 4 | ↵
|
12 | Config = null; | | 5 | tsConfig = null;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 12 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 5 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
8 | queryConfig = null; | | | |
10 | tsConfig = null; | | | |
Precondition Violations (0)
Row |
Violation |