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);
Parent p = new Parent( String.valueOf( i + 100 ) );
Child child = new Child( "child" + i );
child.setParent( p );
p.getChildren().add( child );
s.save( p );
parents.add(p);
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/reattachment/ProxyReattachmentTest.java
|
Method name: void handleLockExpiry(Object)
|
|
Method name: void testIterateWithEvictBottomOfLoop()
|
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): ↵ | | 1 | Parent p = new Parent( String.valueOf( i + 100 ) );↵
|
2 | " + key);↵ | | 2 | Child child = new Child( "child" + i );
↵
|
3 | long ts = cache.nextTimestamp() + cache.getTimeout();↵ | | 3 | child.setParent( p );
↵
|
4 | // create new lock that times out immediately↵ | | 4 | ↵
|
5 | Lock lock = new Lock( ts, nextLockId(), null );↵ | | 5 | p.getChildren().add( child );
↵
|
6 | lock.unlock(ts);↵ | | 6 | s.save( p );
↵
|
7 | cache.update(key, lock); | | 7 | parents.add(p);
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 30 |