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;
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/hql/ast/HqlParser.java File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/reattachment/ProxyReattachmentTest.java
Method name: AST handleIdentifierError(Token, RecognitionException) Method name: void testIterateWithEvictTopOfLoop()
Number of AST nodes: 7 Number of AST nodes: 6
1
reportWarning( "Keyword  '"
2
							+ token.getText()
3
							+ "' is being interpreted as an identifier due to: " + mte.getMessage() );
1
Parent p = new Parent( String.valueOf( i + 100 ) );
4
					// Add the token to the AST.
2
			
5
					ASTPair currentAST = new ASTPair();
6
					token.setType( HqlTokenTypes.WEIRD_IDENT
3
Child child = new Child( "child" + i );
7
 );
4
			child.setParent( p );
8
					astFactory.addASTChild( currentAST, astFactory.create( token ) );
5
			p.getChildren().add( child );
9
					consume();
6
			
10
					AST identifierAST = currentAST.root;
11
					return identifierAST
7
s.save( p );
12
;
8
			parents.add(p);
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 comparisons42