while ( columns.hasNext() ) { Selectable s = (Selectable) columns.next(); if ( !s.isFormula() ) { Column col = (Column) s; if ( !distinctColumns.add( col.getName() ) ) { throw new MappingException( "Repeated column in mapping for collection: " + getRole() + " column: " + col.getName() ); } } }
Selectable columnOrFormula = (Selectable) columns.next(); if ( !columnOrFormula.isFormula() ) { Column col = (Column) columnOrFormula;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/Collection.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/PersistentClass.java
Method name: void checkColumnDuplication(java.util.Set, Iterator) Method name: void checkColumnDuplication(Set, Iterator)
Number of AST nodes: 6 Number of AST nodes: 2
1
while ( columns.hasNext() ) {
2
			Selectable s = (Selectable) columns.next();
1
Selectable columnOrFormula = (Selectable) columns.next();
3
			if ( !s.isFormula() ) {
2
			if ( !columnOrFormula.isFormula() ) {
4
				Column col = (Column) s;
3
				Column col = (Column) 
5
				if ( !distinctColumns.add( col.getName() ) ) {
6
					throw new MappingException( "Repeated column in mapping for collection: "
7
						+ getRole()
8
						+ " column: "
9
						+ col.getName() );
10
				}
11
			}
12
		}
4
columnOrFormula;
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 comparisons0