final int PRIME = 31; int result = 1; result = PRIME * result + ((_colName == null) ? 0 : _colName.hashCode()); result = PRIME * result + ((_ordinalPosition == null) ? 0 : _ordinalPosition.hashCode()); return result;
final int prime = 31; int result = 1; result = prime * result + ((_schemaName == null) ? 0 : _schemaName.hashCode()); return result;
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/dialects/IndexColInfo.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/SQLAliasSchemaDetailProperties.java
Method name: int hashCode() Method name: int hashCode()
Number of AST nodes: 5 Number of AST nodes: 4
1
final int PRIME = 31;
1
final int prime = 31;
2
       int result = 1;
2
       int result = 1;
3
       result = PRIME * result + ((_col
3
       result = prime * result
4
Name == null) ? 0 : _colName.hashCode());
4
       + ((_schemaName == null) ? 0 : _
5
       result = PRIME * result + ((_ordinalPosition == null) ? 0 : _ordinalPosition.hashCode());
5
schemaName.hashCode());
6
       return result;
6
       return result;
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 comparisons20
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    final int PRIME = 31;
    1
    final int PRIME = 31;
    1
    final int prime = 31;
    Differences
    Expression1Expression2Difference
    PRIMEprimeVARIABLE_NAME_MISMATCH
    1
    final int prime = 31;
    2
    int result = 1;
    2
    int result = 1;
    3
    result = PRIME * result + ((_colName == null) ? 0 : _colName.hashCode());
    3
    result = PRIME * result + ((_colName == null) ? 0 : _colName.hashCode());
    Preondition Violations
    Unmatched statement result=PRIME * result + ((_colName == null) ? 0 : _colName.hashCode()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                                                        
    4
    result = PRIME * result + ((_ordinalPosition == null) ? 0 : _ordinalPosition.hashCode());
    4
    result = PRIME * result + ((_ordinalPosition == null) ? 0 : _ordinalPosition.hashCode());
    3
    result = prime * result + ((_schemaName == null) ? 0 : _schemaName.hashCode());
    Differences
    Expression1Expression2Difference
    PRIMEprimeVARIABLE_NAME_MISMATCH
    _ordinalPosition_schemaNameVARIABLE_NAME_MISMATCH
    java.lang.Integerjava.lang.StringVARIABLE_TYPE_MISMATCH
    _ordinalPosition_schemaNameVARIABLE_NAME_MISMATCH
    java.lang.Integerjava.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.Integer of variable _ordinalPosition does not match with type java.lang.String of variable _schemaName
    • Make classes java.lang.Integer and java.lang.String extend a common superclass
    Type java.lang.Integer of variable _ordinalPosition does not match with type java.lang.String of variable _schemaName
    • Make classes java.lang.Integer and java.lang.String extend a common superclass
    3
    result = prime * result + ((_schemaName == null) ? 0 : _schemaName.hashCode());
    5
    return result;
    4
    return result;
    Precondition Violations (4)
    Row Violation
    1Unmatched statement result=PRIME * result + ((_colName == null) ? 0 : _colName.hashCode()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Type java.lang.Integer of variable _ordinalPosition does not match with type java.lang.String of variable _schemaName
    3Type java.lang.Integer of variable _ordinalPosition does not match with type java.lang.String of variable _schemaName
    4Clone fragment #1 returns variables PRIME, result , while Clone fragment #2 returns variables