queryCacheHitCount++; if (hql!=null) { QueryStatistics qs = getQueryStatistics(hql); qs.cacheHitCount++; } SecondLevelCacheStatistics slcs = getSecondLevelCacheStatistics(regionName); slcs.hitCount++;
queryCacheMissCount++; if (hql!=null) { QueryStatistics qs = getQueryStatistics(hql); qs.cacheMissCount++; } SecondLevelCacheStatistics slcs = getSecondLevelCacheStatistics(regionName); slcs.missCount++;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/stat/StatisticsImpl.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/stat/StatisticsImpl.java
Method name: void queryCacheHit(String, String) Method name: void queryCacheMiss(String, String)
Number of AST nodes: 6 Number of AST nodes: 6
1
queryCacheHitCount++;
1
queryCacheMissCount++;
2
		if (hql!=null) {
2
		if (hql!=null) {
3
			QueryStatistics qs = getQueryStatistics(hql);
3
			QueryStatistics qs = getQueryStatistics(hql);
4
			qs.cacheHitCount++;
4
			qs.cacheMissCount++;
5
		}
5
		}
6
		SecondLevelCacheStatistics slcs = getSecondLevelCacheStatistics(regionName);
6
		SecondLevelCacheStatistics slcs = getSecondLevelCacheStatistics(regionName);
7
		slcs.hitCount++;
7
		slcs.missCount++;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are declared in the same class
Number of node comparisons16
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    queryCacheHitCount++;
    1
    queryCacheHitCount++;
    1
    queryCacheMissCount++;
    Differences
    Expression1Expression2Difference
    queryCacheHitCountqueryCacheMissCountVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression queryCacheHitCount is a field being modified, and thus it cannot be parameterized
    Expression queryCacheMissCount is a field being modified, and thus it cannot be parameterized
    1
    queryCacheMissCount++;
    2
    if (hql != null)
    2
    if (hql != null)
    3
    QueryStatistics qs = getQueryStatistics(hql);
    3
    QueryStatistics qs = getQueryStatistics(hql);
    4
    qs.cacheHitCount++;
    4
    qs.cacheHitCount++;
    4
    qs.cacheMissCount++;
    Differences
    Expression1Expression2Difference
    cacheHitCountcacheMissCountVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression qs.cacheHitCount cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression qs.cacheMissCount cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4
    qs.cacheMissCount++;
    5
    SecondLevelCacheStatistics slcs = getSecondLevelCacheStatistics(regionName);
    5
    SecondLevelCacheStatistics slcs = getSecondLevelCacheStatistics(regionName);
    6
    slcs.hitCount++;
    6
    slcs.hitCount++;
    6
    slcs.missCount++;
    Differences
    Expression1Expression2Difference
    hitCountmissCountVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression slcs.hitCount cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression slcs.missCount cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6
    slcs.missCount++;
    Precondition Violations (6)
    Row Violation
    1Expression queryCacheHitCount is a field being modified, and thus it cannot be parameterized
    2Expression queryCacheMissCount is a field being modified, and thus it cannot be parameterized
    3Expression qs.cacheHitCount cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression qs.cacheMissCount cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression slcs.hitCount cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression slcs.missCount cannot be parameterized, because it has dependencies to/from statements that will be extracted