public class OrderedMapType extends MapType { /** * Constructs a map type capable of creating ordered maps of the given * role. * * @param role The collection role name. * @param propertyRef The property ref name. * @param isEmbeddedInXML Is this collection to embed itself in xml */ public OrderedMapType(String role, String propertyRef, boolean isEmbeddedInXML) { super( role, propertyRef, isEmbeddedInXML ); } /** * {@inheritDoc} */ public Object instantiate(int anticipatedSize) { return anticipatedSize > 0 ? new LinkedHashMap( anticipatedSize ) : new LinkedHashMap()
public class OrderedSetType extends SetType { /** * Constructs a set type capable of creating ordered sets of the given * role. * * @param role The collection role name. * @param propertyRef The property ref name. * @param isEmbeddedInXML Is this collection to embed itself in xml */ public OrderedSetType(String role, String propertyRef, boolean isEmbeddedInXML) { super( role, propertyRef, isEmbeddedInXML ); } /** * {@inheritDoc} */ public Object instantiate(int anticipatedSize) { return anticipatedSize > 0 ? new LinkedHashSet( anticipatedSize ) : new LinkedHashSet()
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/type/OrderedMapType.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/type/OrderedSetType.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class OrderedMapType extends MapType {
1
public class OrderedSetType extends SetType {
2
	/**
2
	/**
3
	 * Constructs a map type capable of creating ordered maps of the given
3
	 * Constructs a set type capable of creating ordered sets of the given
4
	 * role.
4
	 * role.
5
	 *
5
	 *
6
	 * @param role The collection role name.
6
	 * @param role The collection role name.
7
	 * @param propertyRef The property ref name.
7
	 * @param propertyRef The property ref name.
8
	 * @param isEmbeddedInXML Is this collection to embed itself in xml
8
	 * @param isEmbeddedInXML Is this collection to embed itself in xml
9
	 */
9
	 */
10
	public OrderedMapType(String role, String propertyRef, boolean isEmbeddedInXML) {
10
	public OrderedSetType(String role, String propertyRef, boolean isEmbeddedInXML) {
11
		super( role, propertyRef, isEmbeddedInXML );
11
		super( role, propertyRef, isEmbeddedInXML );
12
	}
12
	}
13
	/**
13
	/**
14
	 * {@inheritDoc}
14
	 * {@inheritDoc}
15
	 */
15
	 */
16
	public Object instantiate(int anticipatedSize) {
16
	public Object instantiate(int anticipatedSize) {
17
		return anticipatedSize > 0
17
		return anticipatedSize > 0
18
				? new LinkedHashMap( anticipatedSize )
18
				? new LinkedHashSet( anticipatedSize )
19
				: new LinkedHashMap()
19
				: new LinkedHashSet()
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