public class JoinedSubclass extends Subclass implements TableOwner { private Table table; private KeyValue key; public JoinedSubclass(PersistentClass superclass) { super(superclass); } public Table getTable() { return table; } public void setTable(Table table) { this.table=table; getSuperclass().addSubclassTable(table); } public KeyValue getKey() { return key; } public void setKey(KeyValue key) { this.key = key; } public void validate(Mapping mapping) throws MappingException { super.validate(mapping); if ( key!=null && !key.isValid(mapping) ) { throw new MappingException( "subclass key mapping has wrong number of columns: " + getEntityName() + " type: " + key.getType().getName() ); } } public Iterator getReferenceablePropertyIterator() { return getPropertyIterator(); } public Object accept(PersistentClassVisitor mv) { return mv.accept(this);
public class UnionSubclass extends Subclass implements TableOwner { private Table table; private KeyValue key; public UnionSubclass(PersistentClass superclass) { super(superclass); } public Table getTable() { return table; } public void setTable(Table table) { this.table = table; getSuperclass().addSubclassTable(table); } public java.util.Set getSynchronizedTables() { return synchronizedTables; } protected Iterator getNonDuplicatedPropertyIterator() { return getPropertyClosureIterator(); } public void validate(Mapping mapping) throws MappingException { super.validate(mapping); if ( key!=null && !key.isValid(mapping) ) { throw new MappingException( "subclass key mapping has wrong number of columns: " + getEntityName() + " type: " + key.getType().getName() ); } } public Table getIdentityTable() { return getTable(); } public Object accept(PersistentClassVisitor mv) { return mv.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/JoinedSubclass.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/UnionSubclass.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class JoinedSubclass extends Subclass implements TableOwner {
1
public class UnionSubclass extends Subclass implements TableOwner {
2
	private Table table;
2
	private Table table;
3
	private KeyValue key;
3
	private KeyValue key;
4
	public JoinedSubclass(PersistentClass superclass) {
4
	public UnionSubclass(PersistentClass superclass) {
5
		super(superclass);
5
		super(superclass);
6
	}
6
	}
7
	public Table getTable() {
7
	public Table getTable() {
8
		return table;
8
		return table;
9
	}
9
	}
10
	public void setTable(Table table) {
10
	public void setTable(Table table) {
11
		this.table=table;
11
		this.table = table;
12
		getSuperclass().addSubclassTable(table);
12
		getSuperclass().addSubclassTable(table);
13
	}
13
	}
14
	public KeyValue getKey() {
14
	public 
15
		return key
15
java.util.Set getSynchronizedTables() {
16
;
16
		return synchronizedTables;
17
	}
17
	}
18
	
18
	public void setKey(KeyValue key) {
19
	p
19
		this.key = key
20
rotected Iterator getNonDuplicatedPropertyIterator() {
20
;
21
		return getPropertyClosureIterator();
21
	}
22
	}
22
	public void validate(Mapping mapping) throws MappingException {
23
	public void validate(Mapping mapping) throws MappingException {
23
		super.validate(mapping);
24
		super.validate(mapping);
24
		if ( key!=null && !key.isValid(mapping) ) {
25
		if ( key!=null && !key.isValid(mapping) ) {
25
			throw new MappingException(
26
			throw new MappingException(
26
					"subclass key mapping has wrong number of columns: " +
27
				"subclass key mapping has wrong number of columns: " +
27
					getEntityName() +
28
				getEntityName() +
28
					" type: " +
29
				" type: " +
29
					key.getType().getName()
30
				key.getType().getName()
30
				);
31
			);
31
		}
32
		}
32
	}
33
	}
34
	
33
	public Iterator getReferenceablePropertyIterator() {
35
	public Table getIdentityTable() {
34
		return getPropertyIterator();
36
		return getTable();
35
	}
37
	}
36
	
38
	
37
	public Object accept(PersistentClassVisitor mv) {
39
	public Object accept(PersistentClassVisitor mv) {
38
		return mv.accept(this);
40
		return mv.accept(this);
39
	
41
	
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