log.warn("An item was expired by the cache while it was locked (increase your cache timeout): " + key);
long ts = cache.nextTimestamp() + cache.getTimeout();
// create new lock that times out immediately
Lock lock = new Lock( ts, nextLockId(), null );
lock.unlock(ts);
cache.update(key, lock);
for ( int dp_indx = 0; dp_indx < nestedDataPointCount; dp_indx++ ) {
DataPoint dp = new DataPoint();
dp.setDescription( "data-point [" + c_indx + ", " + dp_indx + "]" );
// more HSQLDB fun...
// dp.setX( new BigDecimal( c_indx ) );
dp.setX( new BigDecimal( c_indx + dp_indx ) );
dp.setY( new BigDecimal( dp_indx ) );
container.getDataPoints().add( dp );
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cache/ReadWriteCache.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/proxy/ProxyTest.java
|
Method name: void handleLockExpiry(Object)
|
|
Method name: void testFullyLoadedPCSerialization()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 6
|
|
1 | log.warn("An item was expired by the cache while it was locked (increase your cache timeout): " + key);↵ | | |
|
2 | long ts = cache.nextTimestamp() + cache.getTimeout(↵ | | 1 | for ( int dp_indx = 0; dp_indx < nestedDataPointCount; dp_indx++ ) {↵
|
| | | 2 | DataPoint dp = new DataPoint();↵
|
3 | );↵ | | 3 | dp.setDescription( "data-point [" + c_indx + ", " + dp_indx + "]" );↵
|
4 | // create new lock that times out immediately↵ | | 4 | // ↵
|
5 | Lock lock = new Lock( ts, nextLockId(), null );↵ | | |
|
6 | lock.unlock(ts↵ | | 5 | more HSQLDB fun...↵
|
| | | 6 | // dp.setX( new BigDecimal( c_indx ) );↵
|
| | | 7 | dp.setX( new BigDecimal( c_indx + dp_indx ) );↵
|
7 | );↵ | | 8 | dp.setY( new BigDecimal( dp_indx ) );↵
|
8 | cache.update(key, lock); | | 9 | container.getDataPoints().add( dp );↵
|
| | | 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.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 25 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 0 |
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 | Unknown type |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
Precondition Violations (0)
Row |
Violation |