File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/AbstractGeneralDataRegionTestCase.java | File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/collection/AbstractCollectionRegionAccessStrategyTestCase.java | |||
Method name: void evictOrRemoveAllTest(String)
|
Method name: void evictOrRemoveAllTest(boolean)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 4 | |||
1 | if (optimistic) {↵ | |||
2 | regionRoot = localCache.getRoot().getChild(regionFqn);↵ | 1 | regionRoot = localCache.getRoot().getChild(regionFqn);↵ | |
3 | assertEquals(NonLockingDataVersion.class, ((NodeSPI) regionRoot).getVersion().getClass());↵ | 2 | assertEquals(NonLockingDataVersion.class, ((NodeSPI) regionRoot).getVersion().getClass());↵ | |
4 | regionRoot = remoteCache.getRoot().getChild(regionFqn);↵ | 3 | regionRoot = remoteCache.getRoot().getChild(regionFqn);↵ | |
5 | assertEquals(NonLockingDataVersion.class, ((NodeSPI) regionRoot).getVersion().getClass());↵ | 4 |
| |
6 | } | |||
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 10 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
36 | regionRoot = localCache.getRoot().getChild(regionFqn); | 23 | regionRoot = localCache.getRoot().getChild(regionFqn); | ||||
|
| 24 | assertEquals(NonLockingDataVersion.class, ((NodeSPI)regionRoot).getVersion().getClass()); | ||||
37 | assertEquals(NonLockingDataVersion.class, ((NodeSPI)regionRoot).getVersion().getClass()); | 26 | assertEquals(NonLockingDataVersion.class, ((NodeSPI)regionRoot).getVersion().getClass()); | ||||
38 | regionRoot = remoteCache.getRoot().getChild(regionFqn); | 25 | regionRoot = remoteCache.getRoot().getChild(regionFqn); | ||||
39 | assertEquals(NonLockingDataVersion.class, ((NodeSPI)regionRoot).getVersion().getClass()); | 26 | assertEquals(NonLockingDataVersion.class, ((NodeSPI)regionRoot).getVersion().getClass()); |
Row | Violation |
---|---|
1 | Unmatched statement assertEquals(NonLockingDataVersion.class,((NodeSPI)regionRoot).getVersion().getClass()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Clone fragment #1 returns variables , while Clone fragment #2 returns variables regionRoot |