if ( prop.getValue() instanceof Component ) { if ( hasPartialUpdateComponentGeneration( ( Component ) prop.getValue() ) ) { return true; } }
if ( mappingProperty.getValue() instanceof Component ) { if ( hasPartialInsertComponentGeneration( ( Component ) mappingProperty.getValue() ) ) { return ValueInclusion.PARTIAL; } }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tuple/entity/EntityMetamodel.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tuple/entity/EntityMetamodel.java
Method name: boolean hasPartialUpdateComponentGeneration(Component) Method name: ValueInclusion determineInsertValueGenerationType(Property, StandardProperty)
Number of AST nodes: 3 Number of AST nodes: 3
1
if ( prop.getValue() instanceof Component ) {
1
if ( mappingProperty.getValue() instanceof Component ) {
2
				if ( hasPartialUpdateComponentGeneration( ( Component ) prop.getValue() ) ) {
2
			if ( hasPartialInsertComponentGeneration( ( Component ) mappingProperty.getValue() ) ) {
3
					return true;
3
				return ValueInclusion.PARTIAL;
4
				}
4
			}
5
			}
5
		}
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.2
Clones locationClones are declared in the same class
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    6
    else if (prop.getValue() instanceof Component)
    6
    else if (prop.getValue() instanceof Component)
    3
    else if (mappingProperty.getValue() instanceof Component)
    Differences
    Expression1Expression2Difference
    propmappingPropertyVARIABLE_NAME_MISMATCH
    3
    else if (mappingProperty.getValue() instanceof Component)
    7
    if (hasPartialUpdateComponentGeneration((Component)prop.getValue()))
    7
    if (hasPartialUpdateComponentGeneration((Component)prop.getValue()))
    4
    if (hasPartialInsertComponentGeneration((Component)mappingProperty.getValue()))
    Differences
    Expression1Expression2Difference
    hasPartialUpdateComponentGenerationhasPartialInsertComponentGenerationMETHOD_INVOCATION_NAME_MISMATCH
    propmappingPropertyVARIABLE_NAME_MISMATCH
    4
    if (hasPartialInsertComponentGeneration((Component)mappingProperty.getValue()))
                                                                      
    5
    return ValueInclusion.PARTIAL;
    Preondition Violations
    Unmatched return ValueInclusion.PARTIAL;
    5
    return ValueInclusion.PARTIAL;
    8
    return true;
    8
    return true;
    Preondition Violations
    Unmatched return true;
                                  
    Precondition Violations (2)
    Row Violation
    1Unmatched return ValueInclusion.PARTIAL;
    2Unmatched return true;