if ( !id.isTypeSpecified() ) { throw new MappingException( "must specify an identifier type: " + entity.getEntityName() ); }
if ( sqlAst.needsExecutor() ) { throw new QueryExecutionRequestException( "Not supported for DML operations", hql ); }
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/hql/ast/QueryTranslatorImpl.java
Method name: void bindSimpleId(Element, RootClass, Mappings, java.util.Map) Method name: void errorIfDML()
Number of AST nodes: 2 Number of AST nodes: 2
1
if ( !id.isTypeSpecified() ) {
1
if ( sqlAst.needsExecutor() ) {
2
				throw new MappingException( "must specify an identifier type: "
2
			throw new QueryExecutionRequestException( "
3
					+ entity.getEntityName() );
3
Not supported for DML operations", hql );
4
			}
4
		}
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
Number of node comparisons4
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)53.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    8
    if (!id.isTypeSpecified())
    8
    if (!id.isTypeSpecified())
    1
    if (sqlAst.needsExecutor())
    Differences
    Expression1Expression2Difference
    !id.isTypeSpecified()sqlAst.needsExecutor()TYPE_COMPATIBLE_REPLACEMENT
    1
    if (sqlAst.needsExecutor())
    9
    throw new MappingException("must specify an identifier type: " + entity.getEntityName());
    9
    throw new MappingException("must specify an identifier type: " + entity.getEntityName());
    2
    throw new QueryExecutionRequestException("Not supported for DML operations", hql);
    Differences
    Expression1Expression2Difference
    org.hibernate.MappingExceptionorg.hibernate.hql.QueryExecutionRequestExceptionSUBCLASS_TYPE_MISMATCH
    new MappingException("must specify an identifier type: " + entity.getEntityName())new QueryExecutionRequestException("Not supported for DML operations",hql)ARGUMENT_NUMBER_MISMATCH
    2
    throw new QueryExecutionRequestException("Not supported for DML operations", hql);
    Precondition Violations (0)
    Row Violation