if ( mappedProperty.isBackRef() ) { return mappedProperty.getPropertyAccessor(null); } else { return PropertyAccessorFactory.getDom4jPropertyAccessor( mappedProperty.getNodeName(), mappedProperty.getType(), getEntityMetamodel().getSessionFactory() ); }
if ( mappedProperty.isBackRef() ) { return mappedProperty.getPropertyAccessor(null); } else { return PropertyAccessorFactory.getDynamicMapPropertyAccessor(); }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tuple/entity/Dom4jEntityTuplizer.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tuple/entity/DynamicMapEntityTuplizer.java
Method name: PropertyAccessor buildPropertyAccessor(Property) Method name: PropertyAccessor buildPropertyAccessor(Property)
Number of AST nodes: 3 Number of AST nodes: 3
1
if ( mappedProperty.isBackRef() ) {
1
if ( mappedProperty.isBackRef() ) {
2
			return mappedProperty.getPropertyAccessor(null);
2
			return mappedProperty.getPropertyAccessor(null);
3
		}
3
		}
4
		else {
4
		else {
5
			return PropertyAccessorFactory.getDom4jPropertyAccessor( 
5
			return PropertyAccessorFactory.getD
6
					mappedProperty.getNodeName(), 
7
					mappedProperty.getType(),
8
					getEntityMetamodel().getSessionFactory()
9
				);
6
ynamicMapPropertyAccessor();
10
		}
7
		}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes having the same super class
Number of node comparisons9
  1. {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.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (mappedProperty.isBackRef())
    1
    if (mappedProperty.isBackRef())
    2
    return mappedProperty.getPropertyAccessor(null);
    2
    return mappedProperty.getPropertyAccessor(null);
    else
    else
    3
    return PropertyAccessorFactory.getDom4jPropertyAccessor(mappedProperty.getNodeName(), mappedProperty.getType(), getEntityMetamodel().getSessionFactory());
    3
    return PropertyAccessorFactory.getDom4jPropertyAccessor(mappedProperty.getNodeName(), mappedProperty.getType(), getEntityMetamodel().getSessionFactory());
    3
    return PropertyAccessorFactory.getDynamicMapPropertyAccessor();
    Differences
    Expression1Expression2Difference
    getDom4jPropertyAccessorgetDynamicMapPropertyAccessorMETHOD_INVOCATION_NAME_MISMATCH
    PropertyAccessorFactory.getDom4jPropertyAccessor(mappedProperty.getNodeName(),mappedProperty.getType(),getEntityMetamodel().getSessionFactory())PropertyAccessorFactory.getDynamicMapPropertyAccessor()ARGUMENT_NUMBER_MISMATCH
    3
    return PropertyAccessorFactory.getDynamicMapPropertyAccessor();
    Precondition Violations (0)
    Row Violation