File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/builder/CacheInstanceManagerTestBase.java | File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/builder/CacheInstanceManagerTestBase.java | |||
Method name: void testUse2ndLevelCache()
|
Method name: void testUseQueryCache()
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | Configuration cfg = CacheTestUtil.buildConfiguration("", getRegionFactoryClass(), false, true);↵ | 1 | Configuration cfg = CacheTestUtil.buildConfiguration("", getRegionFactoryClass(), true, false);↵ | |
2 | ↵ | 2 | ↵ | |
3 | JBossCacheRegionFactory regionFactory = CacheTestUtil.startRegionFactory(cfg, getCacheTestSupport());↵ | 3 | JBossCacheRegionFactory regionFactory = CacheTestUtil.startRegionFactory(cfg, getCacheTestSupport());↵ | |
4 | ↵ | 4 | ↵ | |
5 | CacheInstanceManager cim = regionFactory.getCacheInstanceManager();↵ | 5 | CacheInstanceManager cim = regionFactory.getCacheInstanceManager();↵ | |
6 | ↵ | 6 | ↵ | |
7 | assertNull(cim.getCollectionCacheInstance());↵ | 7 | assertNotNull(cim.getCollectionCacheInstance());↵ | |
8 | assertNull(cim.getEntityCacheInstance());↵ | 8 | assertNotNull(cim.getEntityCacheInstance());↵ | |
9 | assertNotNull(cim.getQueryCacheInstance());↵ | 9 | assertNull(cim.getQueryCacheInstance());↵ | |
10 | assertNotNull(cim.getTimestampsCacheInstance()); | 10 | assertNull(cim.getTimestampsCacheInstance()); | |
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.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 49 |
Number of mapped statements | 7 |
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.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Configuration cfg = CacheTestUtil.buildConfiguration("", getRegionFactoryClass(), false, true); |
| 1 | Configuration cfg = CacheTestUtil.buildConfiguration("", getRegionFactoryClass(), true, false); | ||||||||||||||
2 | JBossCacheRegionFactory regionFactory = CacheTestUtil.startRegionFactory(cfg, getCacheTestSupport()); | 2 | JBossCacheRegionFactory regionFactory = CacheTestUtil.startRegionFactory(cfg, getCacheTestSupport()); | |||||||||||||||
3 | CacheInstanceManager cim = regionFactory.getCacheInstanceManager(); | 3 | CacheInstanceManager cim = regionFactory.getCacheInstanceManager(); | |||||||||||||||
4 | assertNull(cim.getCollectionCacheInstance()); |
| 4 | assertNotNull(cim.getCollectionCacheInstance()); | ||||||||||||||
5 | assertNull(cim.getEntityCacheInstance()); |
| 5 | assertNotNull(cim.getEntityCacheInstance()); | ||||||||||||||
6 | assertNotNull(cim.getQueryCacheInstance()); |
| 6 | assertNull(cim.getQueryCacheInstance()); | ||||||||||||||
7 | assertNotNull(cim.getTimestampsCacheInstance()); |
| 7 | assertNull(cim.getTimestampsCacheInstance()); |
Row | Violation |
---|---|
1 | Expression assertNull(cim.getCollectionCacheInstance()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression assertNotNull(cim.getCollectionCacheInstance()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression assertNull(cim.getCollectionCacheInstance()) is a void method call, and thus it cannot be parameterized |
4 | Expression assertNotNull(cim.getCollectionCacheInstance()) is a void method call, and thus it cannot be parameterized |
5 | Expression assertNull(cim.getEntityCacheInstance()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression assertNotNull(cim.getEntityCacheInstance()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression assertNull(cim.getEntityCacheInstance()) is a void method call, and thus it cannot be parameterized |
8 | Expression assertNotNull(cim.getEntityCacheInstance()) is a void method call, and thus it cannot be parameterized |
9 | Expression assertNotNull(cim.getQueryCacheInstance()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression assertNull(cim.getQueryCacheInstance()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression assertNotNull(cim.getQueryCacheInstance()) is a void method call, and thus it cannot be parameterized |
12 | Expression assertNull(cim.getQueryCacheInstance()) is a void method call, and thus it cannot be parameterized |
13 | Expression assertNotNull(cim.getTimestampsCacheInstance()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression assertNull(cim.getTimestampsCacheInstance()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression assertNotNull(cim.getTimestampsCacheInstance()) is a void method call, and thus it cannot be parameterized |
16 | Expression assertNull(cim.getTimestampsCacheInstance()) is a void method call, and thus it cannot be parameterized |