super.removeChild( child ); // only set the parent to null if child is no longer in the bag if ( ! getChildren().contains( child ) ) { ( ( ChildWithManyToOne ) child ).setParent( null ); }
super.validate(mapping); if ( !getIdentifier().isValid(mapping) ) { throw new MappingException( "collection id mapping has wrong number of columns: " + getRole() + " type: " + getIdentifier().getType().getName() ); }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/event/collection/association/bidirectional/onetomany/ParentWithBidirectionalOneToMany.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/IdentifierCollection.java
Method name: void removeChild(Child) Method name: void validate(Mapping)
Number of AST nodes: 3 Number of AST nodes: 3
1
super.removeChild( child );
1
super.
2
		// only set the parent to null if child is no longer in the bag
3
		if ( ! getChildren().contains( child ) ) {
4
			( ( ChildWithManyToOne ) child 
2
validate(mapping);
3
		if ( !getIdentifier().isValid(mapping) ) {
4
			throw new MappingException(
5
				"collection id mapping has wrong number of columns: " +
6
				getRole() +
7
				" type: " +
5
).setParent( null 
8
				getIdentifier().getType().getName()
6
);
9
			);
7
		}
10
		}
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