public class BidirectionalOneToManySetCollectionEventTest extends AbstractAssociationCollectionEventTest { public BidirectionalOneToManySetCollectionEventTest(String string) { super( string ); } public static Test suite() { return new FunctionalTestClassTestSuite( BidirectionalOneToManySetCollectionEventTest.class ); } public String[] getMappings() { return new String[] { "event/collection/association/bidirectional/onetomany/BidirectionalOneToManySetMapping.hbm.xml" }; } public ParentWithCollection createParent(String name) { return new ParentWithBidirectionalOneToMany( name ); } public Collection createCollection() { return new HashSet(); } public Child createChild(String name) { return new ChildWithManyToOne( name );
public class UnidirectionalManyToManyBagCollectionEventTest extends AbstractAssociationCollectionEventTest { public UnidirectionalManyToManyBagCollectionEventTest(String string) { super( string ); } public static Test suite() { return new FunctionalTestClassTestSuite( UnidirectionalManyToManyBagCollectionEventTest.class ); } public String[] getMappings() { return new String[] { "event/collection/association/unidirectional/manytomany/UnidirectionalManyToManyBagMapping.hbm.xml" }; } public ParentWithCollection createParent(String name) { return new ParentWithCollectionOfEntities( name ); } public Collection createCollection() { return new ArrayList(); } public Child createChild(String name) { return new ChildEntity( name );
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/BidirectionalOneToManySetCollectionEventTest.java File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/event/collection/association/unidirectional/manytomany/UnidirectionalManyToManyBagCollectionEventTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class BidirectionalOneToManySetCollectionEventTest extends AbstractAssociationCollectionEventTest {
1
public class UnidirectionalManyToManyBagCollectionEventTest extends AbstractAssociationCollectionEventTest {
2
	public BidirectionalOneToManySetCollectionEventTest(String string) {
2
	public UnidirectionalManyToManyBagCollectionEventTest(String string) {
3
		super( string );
3
		super( string );
4
	}
4
	}
5
	public static Test suite() {
5
	public static Test suite() {
6
		return new FunctionalTestClassTestSuite( BidirectionalOneToManySetCollectionEventTest.class );
6
		return new FunctionalTestClassTestSuite( UnidirectionalManyToManyBagCollectionEventTest.class );
7
	}
7
	}
8
	public String[] getMappings() {
8
	public String[] getMappings() {
9
		return new String[] { "event/collection/association/bidirectional/onetomany/BidirectionalOneToManySetMapping.hbm.xml" };
9
		return new String[] { "event/collection/association/unidirectional/manytomany/UnidirectionalManyToManyBagMapping.hbm.xml" };
10
	}
10
	}
11
	public ParentWithCollection createParent(String name) {
11
	public ParentWithCollection createParent(String name) {
12
		return new ParentWithBidirectionalOneToMany( name );
12
		return new ParentWithCollectionOfEntities( name );
13
	}
13
	}
14
	public Collection createCollection() {
14
	public Collection createCollection() {
15
		return new HashSet();
15
		return new ArrayList();
16
	}
16
	}
17
	public Child createChild(String name) {
17
	public Child createChild(String name) {
18
		return new ChildWithManyToOne( name );
18
		return new ChildEntity( name );
19
	
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.0
Clones location
Number of node comparisons0