this.session = session; this.entityOrClassName = entityOrClassName; this.cacheable = false; this.rootAlias = alias;
this.lockable = lockable; this.lockMode = lockMode; this.sql = generateLockString();
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/CriteriaImpl.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/dialect/lock/SelectLockingStrategy.java
Method name: void CriteriaImpl(String, String, SessionImplementor) Method name: void SelectLockingStrategy(Lockable, LockMode)
Number of AST nodes: 4 Number of AST nodes: 3
1
this.session = session;
1
this.
2
		this.entityOrClassName = entityOrClassName;
2
lockable = lockable;
3
		this.cacheable = false;
3
		this.
4
		this.rootAlias = alias
4
lockMode = lockMode;
5
;
5
		this.sql = generateLockString();
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.0
Clones locationClones are in different classes
Number of node comparisons10
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
                                                        
    1
    this.lockable = lockable;
    1
    this.session = session;
                                                    
                                                        
    2
    this.lockMode = lockMode;
    2
    this.entityOrClassName = entityOrClassName;
    2
    this.entityOrClassName = entityOrClassName;
    3
    this.sql = generateLockString();
    Differences
    Expression1Expression2Difference
    entityOrClassNamesqlVARIABLE_NAME_MISMATCH
    entityOrClassNamegenerateLockString()TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression this.entityOrClassName is a field being modified, and thus it cannot be parameterized
    Expression this.sql is a field being modified, and thus it cannot be parameterized
    3
    this.sql = generateLockString();
    3
    this.cacheable = false;
                                                    
    4
    this.rootAlias = alias;
                                                    
    Precondition Violations (2)
    Row Violation
    1Expression this.entityOrClassName is a field being modified, and thus it cannot be parameterized
    2Expression this.sql is a field being modified, and thus it cannot be parameterized