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
			}
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes
Number of node comparisons25