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;
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/hql/ast/HqlParser.java File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/proxy/ProxyTest.java
Method name: AST handleIdentifierError(Token, RecognitionException) Method name: void testFullyLoadedPCSerialization()
Number of AST nodes: 7 Number of AST nodes: 6
1
reportWarning( "Keyword  '"
2
							+ token.getTex
1
for ( int dp_indx = 0; dp_indx < nestedDataPointCount; dp_indx++ ) {
3
t()
2
				DataPoint dp = new DataPoint();
4
							+ "' is being interpreted as an identifier due to: " + mte.getMessage() );
3
				
5
					// Add the token to the AST.
6
					ASTPair currentAST = new ASTPair();
7
					token.setType( HqlTokenTypes.WEIRD_IDENT );
8
					astFactory.addASTChild( currentAST, astFactory.create( token
4
dp.setDescription( "data-point [" + c_indx + ", " + dp_indx + "]" );
5
// more HSQLDB fun...
6
//				dp.setX( new BigDecimal( c_indx ) );
7
				dp.setX( new BigDecimal( c_indx + dp_indx ) );
9
 ) );
8
				dp.setY( new BigDecimal( dp_indx ) );
10
					consume();
9
				con
11
					AST identifierAST = currentAST.root;
12
					return identifierAST;
10
tainer.getDataPoints().add( dp );
11
			}
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