public class Bag extends Collection { public Bag(PersistentClass owner) { super(owner); } public CollectionType getDefaultCollectionType() { return TypeFactory.bag( getRole(), getReferencedPropertyName(), isEmbedded() ); } void createPrimaryKey() { //create an index on the key columns?? } public Object accept(ValueVisitor visitor) { return visitor.accept(this)
public class IdentifierBag extends IdentifierCollection { public IdentifierBag(PersistentClass owner) { super(owner); } public CollectionType getDefaultCollectionType() { return TypeFactory.idbag( getRole(), getReferencedPropertyName(), isEmbedded() ); } public Object accept(ValueVisitor visitor) { return visitor.accept(this)
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/Bag.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/IdentifierBag.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class Bag extends Collection {
1
public class IdentifierBag extends IdentifierCollection {
2
	public Bag(PersistentClass owner) {
2
	public IdentifierBag(PersistentClass owner) {
3
		super(owner);
3
		super(owner);
4
	}
4
	}
5
	public CollectionType getDefaultCollectionType() {
5
	public CollectionType getDefaultCollectionType() {
6
		return TypeFactory.bag( getRole(), getReferencedPropertyName(), isEmbedded() );
6
		return TypeFactory.idbag( getRole(), getReferencedPropertyName(), isEmbedded() );
7
	}
7
	}
8
	void createPrimaryKey() {
9
		//create an index on the key columns??
10
	}
11
	public Object accept(ValueVisitor visitor) {
8
	public Object accept(ValueVisitor visitor) {
12
		return visitor.accept(this)
9
		return visitor.accept(this)
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