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;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are declared in the same class
Number of node comparisons14
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.4
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    1
    if (!useQuery)
    1
    if (!useQuery)
    2
    return null;
    2
    return null;
    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