if ( this == o ) { return true; } if ( o == null || getClass() != o.getClass() ) { return false; } final FilterQueryPlanKey that = ( FilterQueryPlanKey ) o; if ( shallow != that.shallow ) { return false; } if ( !filterNames.equals( that.filterNames ) ) { return false; } if ( !query.equals( that.query ) ) { return false; } if ( !collectionRole.equals( that.collectionRole ) ) { return false; } return true;
if ( this == o ) { return true; } if ( o == null || getClass() != o.getClass() ) { return false; } final HQLQueryPlanKey that = ( HQLQueryPlanKey ) o; if ( shallow != that.shallow ) { return false; } if ( !filterNames.equals( that.filterNames ) ) { return false; } if ( !query.equals( that.query ) ) { return false; } return true;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/engine/query/QueryPlanCache.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/engine/query/QueryPlanCache.java
Method name: boolean equals(Object) Method name: boolean equals(Object)
Number of AST nodes: 14 Number of AST nodes: 12
1
if ( this == o ) {
1
if ( this == o ) {
2
				return true;
2
				return true;
3
			}
3
			}
4
			if ( o == null || getClass() != o.getClass() ) {
4
			if ( o == null || getClass() != o.getClass() ) {
5
				return false;
5
				return false;
6
			}
6
			}
7
			final FilterQueryPlanKey that = ( FilterQueryPlanKey ) o;
7
			final HQLQueryPlanKey that = ( HQLQueryPlanKey ) o;
8
			if ( shallow != that.shallow ) {
8
			if ( shallow != that.shallow ) {
9
				return false;
9
				return false;
10
			}
10
			}
11
			if ( !filterNames.equals( that.filterNames ) ) {
11
			if ( !filterNames.equals( that.filterNames ) ) {
12
				return false;
12
				return false;
13
			}
13
			}
14
			if ( !query.equals( that.query ) ) {
14
			if ( !query.equals( that.query ) ) {
15
				return false;
15
				return false;
16
			}
16
			}
17
			if ( !collectionRole.equals( that.collectionRole ) ) {
18
				return false;
19
			}
20
			return true;
17
			return true;
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)2.6
Clones locationClones are in the same java file
Number of node comparisons79
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements11
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)2.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    if (this == o)
    1
    if (this == o)
    2
    return true;
    2
    return true;
    3
    if (o == null || getClass() != o.getClass())
    3
    if (o == null || getClass() != o.getClass())
    3
    if (o == null || getClass() != o.getClass())
    Differences
    Expression1Expression2Difference
    java.lang.Classjava.lang.ClassVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.Class<> of variable getClass() does not match with type java.lang.Class<> of variable getClass()
    • Make classes java.lang.Class and java.lang.Class extend a common superclass
    3
    if (o == null || getClass() != o.getClass())
    4
    return false;
    4
    return false;
                                                                                                      
    5
    final HQLQueryPlanKey that = (HQLQueryPlanKey)o;
    5
    final FilterQueryPlanKey that = (FilterQueryPlanKey)o;
                                                                                                                  
    6
    if (shallow != that.shallow)
    6
    if (shallow != that.shallow)
    6
    if (shallow != that.shallow)
    Differences
    Expression1Expression2Difference
    org.hibernate.engine.query.QueryPlanCache.FilterQueryPlanKeyorg.hibernate.engine.query.QueryPlanCache.HQLQueryPlanKeyVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.hibernate.engine.query.QueryPlanCache.FilterQueryPlanKey of variable that does not match with type org.hibernate.engine.query.QueryPlanCache.HQLQueryPlanKey of variable that
    • Make classes org.hibernate.engine.query.QueryPlanCache.FilterQueryPlanKey and org.hibernate.engine.query.QueryPlanCache.HQLQueryPlanKey extend a common superclass
    6
    if (shallow != that.shallow)
    7
    return false;
    7
    return false;
    8
    if (!filterNames.equals(that.filterNames))
    8
    if (!filterNames.equals(that.filterNames))
    8
    if (!filterNames.equals(that.filterNames))
    Differences
    Expression1Expression2Difference
    org.hibernate.engine.query.QueryPlanCache.FilterQueryPlanKeyorg.hibernate.engine.query.QueryPlanCache.HQLQueryPlanKeyVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.hibernate.engine.query.QueryPlanCache.FilterQueryPlanKey of variable that does not match with type org.hibernate.engine.query.QueryPlanCache.HQLQueryPlanKey of variable that
    • Make classes org.hibernate.engine.query.QueryPlanCache.FilterQueryPlanKey and org.hibernate.engine.query.QueryPlanCache.HQLQueryPlanKey extend a common superclass
    8
    if (!filterNames.equals(that.filterNames))
    9
    return false;
    9
    return false;
    10
    if (!query.equals(that.query))
    10
    if (!query.equals(that.query))
    10
    if (!query.equals(that.query))
    Differences
    Expression1Expression2Difference
    org.hibernate.engine.query.QueryPlanCache.FilterQueryPlanKeyorg.hibernate.engine.query.QueryPlanCache.HQLQueryPlanKeyVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.hibernate.engine.query.QueryPlanCache.FilterQueryPlanKey of variable that does not match with type org.hibernate.engine.query.QueryPlanCache.HQLQueryPlanKey of variable that
    • Make classes org.hibernate.engine.query.QueryPlanCache.FilterQueryPlanKey and org.hibernate.engine.query.QueryPlanCache.HQLQueryPlanKey extend a common superclass
    10
    if (!query.equals(that.query))
    11
    return false;
    11
    return false;
    12
    if (!collectionRole.equals(that.collectionRole))
                                                                                                          
    13
    return false;
    13
    return false;
    Preondition Violations
    Unmatched return false;
                                      
    14
    return true;
    12
    return true;
    Precondition Violations (5)
    Row Violation
    1Type java.lang.Class<> of variable getClass() does not match with type java.lang.Class<> of variable getClass()
    2Type org.hibernate.engine.query.QueryPlanCache.FilterQueryPlanKey of variable that does not match with type org.hibernate.engine.query.QueryPlanCache.HQLQueryPlanKey of variable that
    3Type org.hibernate.engine.query.QueryPlanCache.FilterQueryPlanKey of variable that does not match with type org.hibernate.engine.query.QueryPlanCache.HQLQueryPlanKey of variable that
    4Type org.hibernate.engine.query.QueryPlanCache.FilterQueryPlanKey of variable that does not match with type org.hibernate.engine.query.QueryPlanCache.HQLQueryPlanKey of variable that
    5Unmatched return false;