try {
super.tearDown();
}
finally {
if (preferIPv4Stack == null)
System.clearProperty(PREFER_IPV4STACK);
else
System.setProperty(PREFER_IPV4STACK, preferIPv4Stack);
}
if (localRegionFactory != null)
localRegionFactory.stop();
if (remoteRegionFactory != null)
remoteRegionFactory.stop();
try {
super.cleanupTest();
}
finally {
if (preferIPv4Stack == null)
System.clearProperty(PREFER_IPV4STACK);
else
System.setProperty(PREFER_IPV4STACK, preferIPv4Stack);
}
Clone fragments detected by clone detection tool
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/functional/CacheTestCaseBase.java
|
Method name: void tearDown()
|
|
Method name: void cleanupTest()
|
Number of AST nodes: 6
|
|
Number of AST nodes: 2
|
|
1 | try {↵ | | 1 | try {↵
|
2 | super.tearDown();↵ | | 2 | super.cleanupTest();↵
|
3 | }↵ | | 3 | ↵
|
4 | ↵ | | 4 | }↵
|
5 | finally {↵ | | 5 | finally {↵
|
6 | if (preferIPv4Stack == null)↵ | | 6 | if (preferIPv4Stack == null)↵
|
7 | System.clearProperty(PREFER_IPV4STACK);↵ | | 7 | System.clearProperty(PREFER_IPV4STACK);↵
|
8 | else ↵ | | 8 | else ↵
|
9 | System.setProperty(PREFER_IPV4STACK, preferIPv4Stack); ↵ | | 9 | System.setProperty(PREFER_IPV4STACK, preferIPv4Stack);↵
|
10 | }↵ | | |
|
11 | ↵ | | |
|
12 | if (localRegionFactory != null)↵ | | |
|
13 | localRegionFactory.stop();↵ | | |
|
14 | ↵ | | |
|
15 | if (remoteRegionFactory != null)↵ | | |
|
16 | remoteRegionFactory.stop(); | | |
|
| | | 10 | }
|
See real code fragment |
|
See real code fragment |
Summary
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.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 6 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
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.5 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | try | | 1 | try |
2 | | | 2 | |
Precondition Violations (4)
Row |
Violation |
1 | Expression super.tearDown() is a method call throwing exception(s) that should be caught by a try block that will be extracted |
2 | Expression super.cleanupTest() is a method call throwing exception(s) that should be caught by a try block that will be extracted |
3 | Expression super.tearDown() is a void method call, and thus it cannot be parameterized |
4 | Expression super.cleanupTest() is a void method call, and thus it cannot be parameterized |