if ( compiled ) { if ( log.isDebugEnabled() ) { log.debug( "compile() : The query is already compiled, skipping..." ); } return; }
if ( isTableCascadeDeleteEnabled( j ) ) { if ( log.isTraceEnabled() ) { log.trace( "delete handled by foreign key constraint: " + getTableName( j ) ); } return; //EARLY EXIT! }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/ast/QueryTranslatorImpl.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java
Method name: void doCompile(Map, boolean, String) Method name: void delete(Serializable, Object, int, Object, String, SessionImplementor, Object[])
Number of AST nodes: 4 Number of AST nodes: 4
1
if ( compiled ) {
1
if ( isTableCascadeDeleteEnabled( j ) ) {
2
			if ( log.isDebugEnabled() ) {
2
			if ( log.isTraceEnabled() ) {
3
				log.debug( "compile() : The query is already compiled, skipping..." );
3
				log.trace( "delete handled by foreign key constraint: " + getTableName( j ) );
4
			}
4
			}
5
			return;
5
			return; //EARLY EXIT!
6
		}
6
		}
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)1.7
Clones locationClones are in different classes
Number of node comparisons8
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (compiled)
    1
    if (compiled)
    11
    if (isTableCascadeDeleteEnabled(j))
    Differences
    Expression1Expression2Difference
    compiledisTableCascadeDeleteEnabled(j)TYPE_COMPATIBLE_REPLACEMENT
    11
    if (isTableCascadeDeleteEnabled(j))
    2
    if (log.isDebugEnabled())
    2
    if (log.isDebugEnabled())
    12
    if (log.isTraceEnabled())
    Differences
    Expression1Expression2Difference
    isDebugEnabledisTraceEnabledMETHOD_INVOCATION_NAME_MISMATCH
    12
    if (log.isTraceEnabled())
    3
    log.debug("compile() : The query is already compiled, skipping...");
    3
    log.debug("compile() : The query is already compiled, skipping...");
    13
    log.trace("delete handled by foreign key constraint: " + getTableName(j));
    Differences
    Expression1Expression2Difference
    debugtraceMETHOD_INVOCATION_NAME_MISMATCH
    "compile() : The query is already compiled, skipping...""delete handled by foreign key constraint: " + getTableName(j)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression log.debug("compile() : The query is already compiled, skipping...") is a void method call, and thus it cannot be parameterized
    Expression log.trace("delete handled by foreign key constraint: " + getTableName(j)) is a void method call, and thus it cannot be parameterized
    13
    log.trace("delete handled by foreign key constraint: " + getTableName(j));
    4
    return;
    4
    return;
    14
    return;
    Preondition Violations
    Conditional return;
    Conditional return;
    14
    return;
    Precondition Violations (4)
    Row Violation
    1Expression log.debug("compile() : The query is already compiled, skipping...") is a void method call, and thus it cannot be parameterized
    2Expression log.trace("delete handled by foreign key constraint: " + getTableName(j)) is a void method call, and thus it cannot be parameterized
    3Conditional return;
    4Conditional return;