AST and = create( AND, "{and}" ); AST currentFirstChild = statement.getWhereClause().getFirstChild(); and.setFirstChild( discrimNode ); and.addChild( currentFirstChild ); statement.getWhereClause().setFirstChild( and );
Being b = (Being) iter.next(); assertTrue( Hibernate.isInitialized( b.getLocation() ) ); assertNotNull( b.getLocation().getName() ); assertNotNull( b.getIdentity() ); assertNotNull( b.getSpecies() );
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/ast/util/SyntheticAndFactory.java File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/unionsubclass/UnionSubclassTest.java
Method name: void addDiscriminatorWhereFragment(RestrictableStatement, Queryable, Map, String) Method name: void testUnionSubclass()
Number of AST nodes: 5 Number of AST nodes: 5
1
AST and = create( AND, "{and}" );
2
			AST currentFirstChild = statement.getWhereClause().getFirstChild();
3
			and.setFirstChild( discrimNode );
4
			and.addChild( currentFirstChild );
5
			statement.getWhereClause().setFirstChild( and
1
Being b = (Being) iter.next();
2
			assertTrue( Hibernate.isInitialized( b.getLocation() ) );
3
			assertNotNull( b.getLocation().getName() );
4
			assertNotNull( b.getIdentity() );
6
 );
5
			assertNotNull( b.getSpecies() );
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 comparisons25