if (!useQuery)
return null;
if (CacheHelper.isClusteredInvalidation(cache)) {
throw new CacheException("Query cache not supported for clustered invalidation");
}
return cache;
if (!useQuery)
return null;
if (CacheHelper.isClusteredInvalidation(cache)) {
throw new CacheException("Query cache not supported for clustered invalidation");
}
return cache;
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/SharedCacheInstanceManager.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/builder/SharedCacheInstanceManager.java
|
Method name: Cache getQueryCacheInstance()
|
|
Method name: Cache getTimestampsCacheInstance()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if (!useQuery)↵ | | 1 | if (!useQuery)↵
|
2 | return null;↵ | | 2 | return null;↵
|
3 | ↵ | | 3 | ↵
|
4 | if (CacheHelper.isClusteredInvalidation(cache)) {↵ | | 4 | if (CacheHelper.isClusteredInvalidation(cache)) {↵
|
5 | throw new CacheException("Query cache not supported for clustered invalidation");↵ | | 5 | throw new CacheException("Query cache not supported for clustered invalidation");↵
|
6 | }↵ | | 6 | }↵
|
7 | return cache; | | 7 | return cache;
|
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 14 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.4 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (!useQuery) | | 1 | if (!useQuery) |
2 | | | 2 | |
3 | if (CacheHelper.isClusteredInvalidation(cache)) | | 3 | if (CacheHelper.isClusteredInvalidation(cache)) |
4 | throw new CacheException("Query cache not supported for clustered invalidation"); | | 4 | throw new CacheException("Query cache not supported for clustered invalidation"); |
5 | return cache; | | 5 | return cache; |
Precondition Violations (0)
Row |
Violation |