private void checkColumnDuplication(java.util.Set distinctColumns, Iterator columns) throws MappingException { 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() );
protected void checkColumnDuplication(Set distinctColumns, Iterator columns) throws MappingException { while ( columns.hasNext() ) { Selectable columnOrFormula = (Selectable) columns.next(); if ( !columnOrFormula.isFormula() ) { Column col = (Column) columnOrFormula; if ( !distinctColumns.add( col.getName() ) ) { throw new MappingException( "Repeated column in mapping for entity: " + getEntityName() + " column: " + col.getName() + " (should be mapped with insert=\"false\" update=\"false\")"
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: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
private void checkColumnDuplication(java.util.Set distinctColumns, Iterator columns)
1
protected void checkColumnDuplication(Set distinctColumns, Iterator columns) 
2
			throws MappingException {
2
	throws MappingException {
3
		while ( columns.hasNext() ) {
3
		while ( columns.hasNext() ) {
4
			Selectable s = (Selectable) columns.next();
4
			Selectable columnOrFormula = (Selectable) columns.next();
5
			if ( !s.isFormula() ) {
5
			if ( !columnOrFormula.isFormula() ) {
6
				Column col = (Column) s;
6
				Column col = (Column) columnOrFormula;
7
				if ( !distinctColumns.add( col.getName() ) ) {
7
				if ( !distinctColumns.add( col.getName() ) ) {
8
					throw new MappingException( 
8
					throw new MappingException( 
9
"Repeated column in mapping for collection: "
9
							"Repeated column in mapping for entity: " +
10
						+ getRole()
10
							getEntityName() +
11
						+ " column: "
11
							" column: " +
12
						+ col.getName() );
12
							col.getName() 
13
+ 
14
							" (should be mapped with insert=\"false\" update=\"false\")"
13
				
15
						
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 location
Number of node comparisons0