String subpath = StringHelper.qualify( entityName, propertyName ); value = new Component( persistentClass ); bindComponent( subnode, (Component) value, persistentClass.getClassName(), propertyName, subpath, true, "properties".equals( name ), mappings, inheritedMetas, false );
if ( "component".equals( name ) || "dynamic-component".equals( name ) ) { String subpath = StringHelper.qualify( path, propertyName ); value = new Component( join ); bindComponent( subnode, (Component) value, join.getPersistentClass().getClassName(), propertyName, subpath, true, false, mappings, inheritedMetas, false ); }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cfg/HbmBinder.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cfg/HbmBinder.java
Method name: void createClassProperties(Element, PersistentClass, Mappings, java.util.Map, UniqueKey, boolean, boolean, boolean) Method name: void bindJoin(Element, Join, Mappings, java.util.Map)
Number of AST nodes: 3 Number of AST nodes: 4
1
if ( "component".equals( name ) || "dynamic-component".equals( name ) ) {
1
String subpath = StringHelper.qualify( entityName, propertyName );
2
				String subpath = StringHelper.qualify( path, propertyName );
2
				value = new Component( persistentClass );
3
				value = new Component( join );
3
				bindComponent(
4
				bindComponent(
4
						subnode,
5
						subnode,
5
						(Component) value,
6
						(Component) value,
6
						persistentClass.getClassName(),
7
						join.getPersistentClass().getClassName(),
7
						propertyName,
8
						propertyName,
8
						subpath,
9
						subpath,
9
						true,
10
						true,
10
						"properties".equals( name ),
11
						false,
11
						mappings,
12
						mappings,
12
						inheritedMetas,
13
						inheritedMetas,
13
						false
14
						false
14
					);
15
					);
16
			}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are declared in the same class
Number of node comparisons10
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    27
    String subpath = StringHelper.qualify(entityName, propertyName);
    27
    String subpath = StringHelper.qualify(entityName, propertyName);
    44
    String subpath = StringHelper.qualify(path, propertyName);
    Differences
    Expression1Expression2Difference
    entityNamepathVARIABLE_NAME_MISMATCH
    44
    String subpath = StringHelper.qualify(path, propertyName);
    28
    value = new Component(persistentClass);
    28
    value = new Component(persistentClass);
    45
    value = new Component(join);
    Differences
    Expression1Expression2Difference
    persistentClassjoinVARIABLE_NAME_MISMATCH
    org.hibernate.mapping.PersistentClassorg.hibernate.mapping.JoinVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.hibernate.mapping.PersistentClass of variable persistentClass does not match with type org.hibernate.mapping.Join of variable join
    • Make classes org.hibernate.mapping.PersistentClass and org.hibernate.mapping.Join extend a common superclass
    45
    value = new Component(join);
    29
    bindComponent(subnode, (Component)value, persistentClass.getClassName(), propertyName, subpath, true, "properties".equals(name), mappings, inheritedMetas, false);
    29
    bindComponent(subnode, (Component)value, persistentClass.getClassName(), propertyName, subpath, true, "properties".equals(name), mappings, inheritedMetas, false);
    46
    bindComponent(subnode, (Component)value, join.getPersistentClass().getClassName(), propertyName, subpath, true, false, mappings, inheritedMetas, false);
    Differences
    Expression1Expression2Difference
    persistentClassjoin.getPersistentClass()TYPE_COMPATIBLE_REPLACEMENT
    "properties".equals(name)falseTYPE_COMPATIBLE_REPLACEMENT
    46
    bindComponent(subnode, (Component)value, join.getPersistentClass().getClassName(), propertyName, subpath, true, false, mappings, inheritedMetas, false);
    Precondition Violations (1)
    Row Violation
    1Type org.hibernate.mapping.PersistentClass of variable persistentClass does not match with type org.hibernate.mapping.Join of variable join