super.validate(mapping); if ( !getIdentifier().isValid(mapping) ) { throw new MappingException( "collection id mapping has wrong number of columns: " + getRole() + " type: " + getIdentifier().getType().getName() ); }
super.validate(mapping); if ( !getIdentifier().isValid(mapping) ) { throw new MappingException( "identifier mapping has wrong number of columns: " + getEntityName() + " type: " + getIdentifier().getType().getName() ); } checkCompositeIdentifier();
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/IdentifierCollection.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/RootClass.java
Method name: void validate(Mapping) Method name: void validate(Mapping)
Number of AST nodes: 3 Number of AST nodes: 4
1
super.validate(mapping);
1
super.validate(mapping);
2
		if ( !getIdentifier().isValid(mapping) ) {
2
		if ( !getIdentifier().isValid(mapping) ) {
3
			throw new MappingException(
3
			throw new MappingException(
4
				"collection id mapping has wrong number of columns: " +
4
				"identifier mapping has wrong number of columns: " +
5
				getRole() +
5
				getEntityName() +
6
				" type: " +
6
				" type: " +
7
				getIdentifier().getType().getName()
7
				getIdentifier().getType().getName()
8
			);
8
			);
9
		}
9
		}
10
		checkCompositeIdentifier();
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.2
Clones locationClones are in different classes
Number of node comparisons6
  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 fragment1
    Time elapsed for statement mapping (ms)0.9
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    super.validate(mapping);
    1
    super.validate(mapping);
    2
    if (!getIdentifier().isValid(mapping))
    2
    if (!getIdentifier().isValid(mapping))
    3
    throw new MappingException("collection id mapping has wrong number of columns: " + getRole() + " type: " + getIdentifier().getType().getName());
    3
    throw new MappingException("collection id mapping has wrong number of columns: " + getRole() + " type: " + getIdentifier().getType().getName());
    3
    throw new MappingException("identifier mapping has wrong number of columns: " + getEntityName() + " type: " + getIdentifier().getType().getName());
    Differences
    Expression1Expression2Difference
    "collection id mapping has wrong number of columns: ""identifier mapping has wrong number of columns: "LITERAL_VALUE_MISMATCH
    getRolegetEntityNameMETHOD_INVOCATION_NAME_MISMATCH
    3
    throw new MappingException("identifier mapping has wrong number of columns: " + getEntityName() + " type: " + getIdentifier().getType().getName());
                                                                
    4
    checkCompositeIdentifier();
    Precondition Violations (0)
    Row Violation