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);
reportWarning( "Keyword '" + token.getText() + "' is being interpreted as an identifier due to: " + mte.getMessage() ); // Add the token to the AST. ASTPair currentAST = new ASTPair(); token.setType( HqlTokenTypes.WEIRD_IDENT ); astFactory.addASTChild( currentAST, astFactory.create( token ) ); consume(); AST identifierAST = currentAST.root; return identifierAST;
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/core/src/main/java/org/hibernate/hql/ast/HqlParser.java
Method name: void handleLockExpiry(Object) Method name: AST handleIdentifierError(Token, RecognitionException)
Number of AST nodes: 5 Number of AST nodes: 7
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();
3
		// create new lock that times out immediately
4
		Lock lock = new Lock( ts, nextLockId(), null );
5
		lock.unlock(ts);
6
		cache.update(key, lock)
1
reportWarning( "Keyword  '"
2
							+ token.getText()
3
							+ "' is being interpreted as an identifier due to: " + mte.getMessage() );
4
					// Add the token to the AST.
5
					ASTPair currentAST = new ASTPair();
6
					token.setType( HqlTokenTypes.WEIRD_IDENT );
7
					astFactory.addASTChild( currentAST, astFactory.create( token ) );
8
					consume();
9
					AST identifierAST = currentAST.root;
7
;
10
					return identifierAST;
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 comparisons35