File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/collection/AbstractCollectionRegionAccessStrategyTestCase.java | File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/entity/AbstractEntityRegionAccessStrategyTestCase.java | |||
Method name: void tearDown()
|
Method name: void tearDown()
|
|||
Number of AST nodes: 15 | Number of AST nodes: 15 | |||
1 | super.tearDown();↵ | 1 | super.tearDown();↵ | |
2 | ↵ | 2 | ↵ | |
3 | if (localCollectionRegion != null)↵ | 3 | if (localEntityRegion != null)↵ | |
4 | localCollectionRegion.destroy();↵ | 4 | localEntityRegion.destroy();↵ | |
5 | if (remoteCollectionRegion != null)↵ | 5 | if (remoteEntityRegion != null)↵ | |
6 | remoteCollectionRegion.destroy();↵ | 6 | remoteEntityRegion.destroy();↵ | |
7 | ↵ | 7 | ↵ | |
8 | try {↵ | 8 | try {↵ | |
9 | localCache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);↵ | 9 | localCache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);↵ | |
10 | localCache.removeNode(Fqn.ROOT);↵ | 10 | localCache.removeNode(Fqn.ROOT);↵ | |
11 | }↵ | 11 | }↵ | |
12 | catch (Exception e) {↵ | 12 | catch (Exception e) {↵ | |
13 | log.error("Problem purging local cache" ,e);↵ | 13 | log.error("Problem purging local cache" ,e);↵ | |
14 | }↵ | 14 | }↵ | |
15 | ↵ | 15 | ↵ | |
16 | try {↵ | 16 | try {↵ | |
17 | remoteCache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);↵ | 17 | remoteCache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);↵ | |
18 | remoteCache.removeNode(Fqn.ROOT);↵ | 18 | remoteCache.removeNode(Fqn.ROOT);↵ | |
19 | }↵ | 19 | }↵ | |
20 | catch (Exception e) {↵ | 20 | catch (Exception e) {↵ | |
21 | log.error("Problem purging remote cache" ,e);↵ | 21 | log.error("Problem purging remote cache" ,e);↵ | |
22 | }↵ | 22 | }↵ | |
23 | ↵ | 23 | ↵ | |
24 | node1Exception = null;↵ | 24 | node1Exception = null;↵ | |
25 | node2Exception = null;↵ | 25 | node2Exception = null;↵ | |
26 | ↵ | 26 | ↵ | |
27 | node1Failure = null;↵ | 27 | node1Failure = null;↵ | |
28 | node2Failure = null; | 28 |
| |
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) | 1.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 60 |
Number of mapped statements | 15 |
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) | 11.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | super.tearDown(); |
| 1 | super.tearDown(); | |||||||||||||
2 | if (localCollectionRegion != null) |
| 2 | if (localEntityRegion != null) | |||||||||||||
3 | localCollectionRegion.destroy(); |
| 3 | localEntityRegion.destroy(); | |||||||||||||
4 | if (remoteCollectionRegion != null) |
| 4 | if (remoteEntityRegion != null) | |||||||||||||
5 | remoteCollectionRegion.destroy(); |
| 5 | remoteEntityRegion.destroy(); | |||||||||||||
6 | try | 6 | try | ||||||||||||||
7 | localCache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true); | 7 | localCache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true); | ||||||||||||||
8 | localCache.removeNode(Fqn.ROOT); | 8 | localCache.removeNode(Fqn.ROOT); | ||||||||||||||
9 | try | 9 | try | ||||||||||||||
10 | remoteCache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true); | 10 | remoteCache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true); | ||||||||||||||
11 | remoteCache.removeNode(Fqn.ROOT); | 11 | remoteCache.removeNode(Fqn.ROOT); | ||||||||||||||
12 | node1Exception = null; | 12 | node1Exception = null; | ||||||||||||||
13 | node2Exception = null; | 13 | node2Exception = null; | ||||||||||||||
14 | node1Failure = null; | 14 | node1Failure = null; | ||||||||||||||
15 | node2Failure = null; | 15 | node2Failure = null; |
Row | Violation |
---|---|
1 | Super method call super.tearDown(); cannot be extracted from method |
2 | Super method call super.tearDown(); cannot be extracted from method |