queryCacheMissCount++; if (hql!=null) { QueryStatistics qs = getQueryStatistics(hql); qs.cacheMissCount++; } SecondLevelCacheStatistics slcs = getSecondLevelCacheStatistics(regionName); slcs.missCount++;
queryCachePutCount++; if (hql!=null) { QueryStatistics qs = getQueryStatistics(hql); qs.cachePutCount++; } SecondLevelCacheStatistics slcs = getSecondLevelCacheStatistics(regionName); slcs.putCount++;
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 queryCacheMiss(String, String) Method name: void queryCachePut(String, String)
Number of AST nodes: 6 Number of AST nodes: 6
1
queryCacheMissCount++;
1
queryCachePutCount++;
2
		if (hql!=null) {
2
		if (hql!=null) {
3
			QueryStatistics qs = getQueryStatistics(hql);
3
			QueryStatistics qs = getQueryStatistics(hql);
4
			qs.cacheMissCount++;
4
			qs.cachePutCount++;
5
		}
5
		}
6
		SecondLevelCacheStatistics slcs = getSecondLevelCacheStatistics(regionName);
6
		SecondLevelCacheStatistics slcs = getSecondLevelCacheStatistics(regionName);
7
		slcs.missCount++;
7
		slcs.putCount++;
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.1
Clones locationClones are declared in the same class
Number of node comparisons16
  1. {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.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    queryCacheMissCount++;
    1
    queryCacheMissCount++;
    1
    queryCachePutCount++;
    Differences
    Expression1Expression2Difference
    queryCacheMissCountqueryCachePutCountVARIABLE_NAME_MISMATCH
    1
    queryCachePutCount++;
    2
    if (hql != null)
    2
    if (hql != null)
    3
    QueryStatistics qs = getQueryStatistics(hql);
    3
    QueryStatistics qs = getQueryStatistics(hql);
    4
    qs.cacheMissCount++;
    4
    qs.cacheMissCount++;
    4
    qs.cachePutCount++;
    Differences
    Expression1Expression2Difference
    cacheMissCountcachePutCountVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression qs.cacheMissCount cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression qs.cachePutCount cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression qs.cacheMissCount is a field being modified, and thus it cannot be parameterized
    Expression qs.cachePutCount is a field being modified, and thus it cannot be parameterized
    4
    qs.cachePutCount++;
    5
    SecondLevelCacheStatistics slcs = getSecondLevelCacheStatistics(regionName);
    5
    SecondLevelCacheStatistics slcs = getSecondLevelCacheStatistics(regionName);
    6
    slcs.missCount++;
    6
    slcs.missCount++;
    6
    slcs.putCount++;
    Differences
    Expression1Expression2Difference
    missCountputCountVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression slcs.missCount cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression slcs.putCount cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression slcs.missCount is a field being modified, and thus it cannot be parameterized
    Expression slcs.putCount is a field being modified, and thus it cannot be parameterized
    6
    slcs.putCount++;
    Precondition Violations (8)
    Row Violation
    1Expression qs.cacheMissCount cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression qs.cachePutCount cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression qs.cacheMissCount is a field being modified, and thus it cannot be parameterized
    4Expression qs.cachePutCount is a field being modified, and thus it cannot be parameterized
    5Expression slcs.missCount cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression slcs.putCount cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression slcs.missCount is a field being modified, and thus it cannot be parameterized
    8Expression slcs.putCount is a field being modified, and thus it cannot be parameterized