while ( iter.hasNext() ) { Property property = (Property) iter.next(); if ( property.isLazy() ) { lazyPropertyNames.add( property.getName() ); } }
while ( iter.hasNext() ) { Table table = (Table) iter.next(); if ( table.isPhysicalTable() ) { /*Iterator subIter = table.getIndexIterator(); while ( subIter.hasNext() ) { Index index = (Index) subIter.next(); if ( !index.isForeignKey() || !dialect.hasImplicitIndexForForeignKey() ) { script.add( index.sqlDropString(dialect) ); } }*/ script.add( table.sqlDropString( dialect, defaultCatalog, defaultSchema ) ); } }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tuple/entity/PojoEntityTuplizer.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cfg/Configuration.java
Method name: void PojoEntityTuplizer(EntityMetamodel, PersistentClass) Method name: String[] generateDropSchemaScript(Dialect)
Number of AST nodes: 4 Number of AST nodes: 4
1
while ( iter.hasNext() ) {
1
while ( iter.hasNext() ) {
2
			Property property = (Property) i
2
			Table table = (Table) iter.next();
3
			if ( table.isPhysicalTable() ) {
4
				/*Iterator subIter = table.getIndexIterator();
5
				while ( subIter.hasNext() ) {
3
ter.next();
6
					Index index = (Index) subIter.next();
4
			if ( property.isLazy() ) {
7
					if ( !index.isForeignKey() || !dialect.hasImplicitIndexForForeignKey() ) {
5
				lazyPropertyNames.add( property.getName() 
8
						script.add( index.sqlDropString(dialect) );
9
					}
10
				}*/
11
				script.add(
12
						table.sqlDropString(
13
								dialect,
14
								defaultCatalog,
15
								defaultSchema
16
							)
6
);
17
					);
7
			}
18
			}
8
		}
19
		}
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