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 queryCachePut(String, String)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | queryCacheHitCount++;↵ | 1 | queryCachePutCount++;↵ | |
2 | if (hql!=null) {↵ | 2 | if (hql!=null) {↵ | |
3 | QueryStatistics qs = getQueryStatistics(hql);↵ | 3 | QueryStatistics qs = getQueryStatistics(hql);↵ | |
4 | qs.cacheHitCount++;↵ | 4 | qs.cachePutCount++;↵ | |
5 | }↵ | 5 | }↵ | |
6 | SecondLevelCacheStatistics slcs = getSecondLevelCacheStatistics(regionName);↵ | 6 | SecondLevelCacheStatistics slcs = getSecondLevelCacheStatistics(regionName);↵ | |
7 | slcs.hitCount++; | 7 | slcs.putCount++; | |
See real code fragment | See real code fragment |
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 16 |
Number of mapped statements | 6 |
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) | 1.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | queryCacheHitCount++; |
| 1 | queryCachePutCount++; | ||||||||||||||
2 | if (hql != null) | 2 | if (hql != null) | |||||||||||||||
3 | QueryStatistics qs = getQueryStatistics(hql); | 3 | QueryStatistics qs = getQueryStatistics(hql); | |||||||||||||||
4 | qs.cacheHitCount++; |
| 4 | qs.cachePutCount++; | ||||||||||||||
5 | SecondLevelCacheStatistics slcs = getSecondLevelCacheStatistics(regionName); | 5 | SecondLevelCacheStatistics slcs = getSecondLevelCacheStatistics(regionName); | |||||||||||||||
6 | slcs.hitCount++; |
| 6 | slcs.putCount++; |
Row | Violation |
---|---|
1 | Expression qs.cacheHitCount cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression qs.cachePutCount cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression qs.cacheHitCount is a field being modified, and thus it cannot be parameterized |
4 | Expression qs.cachePutCount is a field being modified, and thus it cannot be parameterized |
5 | Expression slcs.hitCount cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression slcs.putCount cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression slcs.hitCount is a field being modified, and thus it cannot be parameterized |
8 | Expression slcs.putCount is a field being modified, and thus it cannot be parameterized |