final int prime = 31; int result = 1; result = prime * result + ((currentRelease == null) ? 0 : currentRelease.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); return result;
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;
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/update/xmlbeans/ChannelXmlBean.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/dialects/IndexColInfo.java
Method name: int hashCode() Method name: int hashCode()
Number of AST nodes: 5 Number of AST nodes: 5
1
final int prime = 31;
1
final int PRIME = 31;
2
        int result = 1;
2
       int result = 1;
3
        result = prime * result
3
       result = PRIME * result
4
                + ((currentRelease == null) ? 0 : currentRelease.hashCode());
4
 + ((_colName == null) ? 0 : _colName.hashCode());
5
        result = prime * result + ((name == null) ? 0 : name.hashCode());
5
       result = PRIME * result + ((_ordinalPosition == null) ? 0 : _ordinalPosition.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 comparisons25
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    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 + ((currentRelease == null) ? 0 : currentRelease.hashCode());
    3
    result = prime * result + ((currentRelease == null) ? 0 : currentRelease.hashCode());
    3
    result = PRIME * result + ((_colName == null) ? 0 : _colName.hashCode());
    Differences
    Expression1Expression2Difference
    primePRIMEVARIABLE_NAME_MISMATCH
    currentRelease_colNameVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBeanjava.lang.StringVARIABLE_TYPE_MISMATCH
    currentRelease_colNameVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBeanjava.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable currentRelease does not match with type java.lang.String of variable _colName
    • Make classes net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean and java.lang.String extend a common superclass
    Type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable currentRelease does not match with type java.lang.String of variable _colName
    • Make classes net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean and java.lang.String extend a common superclass
    3
    result = PRIME * result + ((_colName == null) ? 0 : _colName.hashCode());
    4
    result = prime * result + ((name == null) ? 0 : name.hashCode());
    4
    result = prime * result + ((name == null) ? 0 : name.hashCode());
    4
    result = PRIME * result + ((_ordinalPosition == null) ? 0 : _ordinalPosition.hashCode());
    Differences
    Expression1Expression2Difference
    primePRIMEVARIABLE_NAME_MISMATCH
    name_ordinalPositionVARIABLE_NAME_MISMATCH
    java.lang.Stringjava.lang.IntegerVARIABLE_TYPE_MISMATCH
    name_ordinalPositionVARIABLE_NAME_MISMATCH
    java.lang.Stringjava.lang.IntegerVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable name does not match with type java.lang.Integer of variable _ordinalPosition
    • Make classes java.lang.String and java.lang.Integer extend a common superclass
    Type java.lang.String of variable name does not match with type java.lang.Integer of variable _ordinalPosition
    • Make classes java.lang.String and java.lang.Integer extend a common superclass
    4
    result = PRIME * result + ((_ordinalPosition == null) ? 0 : _ordinalPosition.hashCode());
    5
    return result;
    5
    return result;
    Precondition Violations (4)
    Row Violation
    1Type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable currentRelease does not match with type java.lang.String of variable _colName
    2Type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable currentRelease does not match with type java.lang.String of variable _colName
    3Type java.lang.String of variable name does not match with type java.lang.Integer of variable _ordinalPosition
    4Type java.lang.String of variable name does not match with type java.lang.Integer of variable _ordinalPosition