for ( int i=0; i<getLength(); i++ ) { Projection proj = getProjection(i); if ( proj.isGrouped() ) { buf.append( proj.toGroupSqlString(criteria, criteriaQuery) ) .append(", "); } }
for ( int i = 0; i < parents.size(); i++ ) { AST parent = ( AST ) parents.get( i ); if ( parent.getNextSibling() == null ) { pw.print( " " ); } else { pw.print( " | " ); } }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/criterion/ProjectionList.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/ast/util/ASTPrinter.java
Method name: String toGroupSqlString(Criteria, CriteriaQuery) Method name: void showAst(ArrayList, PrintWriter, AST)
Number of AST nodes: 4 Number of AST nodes: 5
1
for ( int i=0; i<getLength(); i++ ) {
1
for ( int i = 0; i < parents.size(); i++ ) {
2
			Projection proj = getProjection(i);
2
			
3
			if ( proj.isGrouped()
3
AST parent = ( AST ) parents.get( i );
4
 ) {
4
			if ( parent.getNextSibling() == null ) {
5
				buf.append( proj.toGroupSqlString(criteria, criteriaQuery) )
5
				
6
					.append(",
6
pw.print( "   " );
7
			}
8
			else {
7
 ");
9
				pw.print( " | " );
8
			}
10
			}
9
		}
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.1
Clones locationClones are in different classes
Number of node comparisons1