if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final IndexColInfo other = (IndexColInfo) obj; if (_colName == null) { if (other._colName != null) return false; } else if (!_colName.equals(other._colName)) return false; if (_ordinalPosition == null) { if (other._ordinalPosition != null) return false; } else if (!_ordinalPosition.equals(other._ordinalPosition)) return false; return true;
if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final ChannelXmlBean other = (ChannelXmlBean) obj; if (currentRelease == null) { if (other.currentRelease != null) return false; } else if (!currentRelease.equals(other.currentRelease)) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; return true;
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/update/xmlbeans/ChannelXmlBean.java
Method name: boolean equals(Object) Method name: boolean equals(Object)
Number of AST nodes: 18 Number of AST nodes: 18
1
if (this == obj)
1
if (this == obj)
2
           return true;
2
            return true;
3
       if (obj == null)
3
        if (obj == null)
4
           return false;
4
            return false;
5
       if (getClass() != obj.getClass())
5
        if (getClass() != obj.getClass())
6
           return false;
6
            return false;
7
       final IndexColInfo other = (IndexColInfo) obj;
7
        final ChannelXmlBean other = (ChannelXmlBean) obj;
8
       if (_colName == null) {
8
        if (currentRelease == null) {
9
           if (other._colName != null)
9
            if (other.currentRelease != null)
10
               return false;
10
                return false;
11
       } else if (!_colName.equals(other._colName))
11
        } else if (!currentRelease.equals(other.currentRelease))
12
           return false;
12
            return false;
13
       if (_ordinalPosition == null) {
13
        if (name == null) {
14
           if (other._ordinalPosition != null)
14
            if (other.name != null)
15
               return false;
15
                return false;
16
       } else if (!_ordinalPosition.equals(other._ordinalPosition))
16
        } else if (!name.equals(other.name))
17
           return false;
17
            return false;
18
       return true;
18
        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)3.0
Clones locationClones are in different classes
Number of node comparisons68
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements17
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)3.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (this == obj)
    1
    if (this == obj)
    2
    return true;
    2
    return true;
    3
    if (obj == null)
    3
    if (obj == null)
    4
    return false;
    4
    return false;
    5
    if (getClass() != obj.getClass())
    5
    if (getClass() != obj.getClass())
    5
    if (getClass() != obj.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
    5
    if (getClass() != obj.getClass())
    6
    return false;
    6
    return false;
                                                                                                        
    7
    final ChannelXmlBean other = (ChannelXmlBean)obj;
    7
    final IndexColInfo other = (IndexColInfo)obj;
                                                                                                
    8
    if (_colName == null)
    8
    if (_colName == null)
    13
    if (name == null)
    Differences
    Expression1Expression2Difference
    _colNamenameVARIABLE_NAME_MISMATCH
    13
    if (name == null)
    9
    if (other._colName != null)
    9
    if (other._colName != null)
    14
    if (other.name != null)
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.fw.dialects.IndexColInfonet.sourceforge.squirrel_sql.client.update.xmlbeans.ChannelXmlBeanVARIABLE_TYPE_MISMATCH
    _colNamenameVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type java.lang.String of variable other._colName does not match with type java.lang.String of variable other.name
    • Make classes net.sourceforge.squirrel_sql.fw.dialects.IndexColInfo and net.sourceforge.squirrel_sql.client.update.xmlbeans.ChannelXmlBean extend a common superclass
    Expression other._colName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression other.name cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14
    if (other.name != null)
    10
    return false;
    15
    return false;
    11
    else if (!_colName.equals(other._colName))
    11
    else if (!_colName.equals(other._colName))
    16
    else if (!name.equals(other.name))
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.fw.dialects.IndexColInfonet.sourceforge.squirrel_sql.client.update.xmlbeans.ChannelXmlBeanVARIABLE_TYPE_MISMATCH
    _colNamenameVARIABLE_NAME_MISMATCH
    _colNamenameVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type java.lang.String of variable other._colName does not match with type java.lang.String of variable other.name
    • Make classes net.sourceforge.squirrel_sql.fw.dialects.IndexColInfo and net.sourceforge.squirrel_sql.client.update.xmlbeans.ChannelXmlBean extend a common superclass
    Expression other._colName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression other.name cannot be parameterized, because it has dependencies to/from statements that will be extracted
    16
    else if (!name.equals(other.name))
    12
    return false;
    17
    return false;
    13
    if (_ordinalPosition == null)
    13
    if (_ordinalPosition == null)
    8
    if (currentRelease == null)
    Differences
    Expression1Expression2Difference
    _ordinalPositioncurrentReleaseVARIABLE_NAME_MISMATCH
    java.lang.Integernet.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBeanVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.Integer of variable _ordinalPosition does not match with type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable currentRelease
    • Make classes java.lang.Integer and net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean extend a common superclass
    8
    if (currentRelease == null)
    14
    if (other._ordinalPosition != null)
    14
    if (other._ordinalPosition != null)
    9
    if (other.currentRelease != null)
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.fw.dialects.IndexColInfonet.sourceforge.squirrel_sql.client.update.xmlbeans.ChannelXmlBeanVARIABLE_TYPE_MISMATCH
    _ordinalPositioncurrentReleaseVARIABLE_NAME_MISMATCH
    java.lang.Integernet.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBeanVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.Integer of variable other._ordinalPosition does not match with type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable other.currentRelease
    • Make classes net.sourceforge.squirrel_sql.fw.dialects.IndexColInfo and net.sourceforge.squirrel_sql.client.update.xmlbeans.ChannelXmlBean extend a common superclass
    Expression other._ordinalPosition cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression other.currentRelease cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.lang.Integer of variable other._ordinalPosition does not match with type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable other.currentRelease
    • Make classes java.lang.Integer and net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean extend a common superclass
    9
    if (other.currentRelease != null)
    15
    return false;
    10
    return false;
    16
    else if (!_ordinalPosition.equals(other._ordinalPosition))
    16
    else if (!_ordinalPosition.equals(other._ordinalPosition))
    11
    else if (!currentRelease.equals(other.currentRelease))
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.fw.dialects.IndexColInfonet.sourceforge.squirrel_sql.client.update.xmlbeans.ChannelXmlBeanVARIABLE_TYPE_MISMATCH
    _ordinalPositioncurrentReleaseVARIABLE_NAME_MISMATCH
    java.lang.Integernet.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBeanVARIABLE_TYPE_MISMATCH
    _ordinalPositioncurrentReleaseVARIABLE_NAME_MISMATCH
    java.lang.Integernet.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBeanVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.Integer of variable other._ordinalPosition does not match with type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable other.currentRelease
    • Make classes net.sourceforge.squirrel_sql.fw.dialects.IndexColInfo and net.sourceforge.squirrel_sql.client.update.xmlbeans.ChannelXmlBean extend a common superclass
    Expression other._ordinalPosition cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression other.currentRelease cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.lang.Integer of variable other._ordinalPosition does not match with type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable other.currentRelease
    • Make classes java.lang.Integer and net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean extend a common superclass
    Type java.lang.Integer of variable _ordinalPosition does not match with type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable currentRelease
    • Make classes java.lang.Integer and net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean extend a common superclass
    11
    else if (!currentRelease.equals(other.currentRelease))
    17
    return false;
    12
    return false;
    18
    return true;
    18
    return true;
    Precondition Violations (17)
    Row Violation
    1Type java.lang.Class<> of variable getClass() does not match with type java.lang.Class<> of variable getClass()
    2Type java.lang.String of variable other._colName does not match with type java.lang.String of variable other.name
    3Expression other._colName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression other.name cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Type java.lang.String of variable other._colName does not match with type java.lang.String of variable other.name
    6Expression other._colName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression other.name cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Type java.lang.Integer of variable _ordinalPosition does not match with type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable currentRelease
    9Type java.lang.Integer of variable other._ordinalPosition does not match with type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable other.currentRelease
    10Expression other._ordinalPosition cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression other.currentRelease cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12Type java.lang.Integer of variable other._ordinalPosition does not match with type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable other.currentRelease
    13Type java.lang.Integer of variable other._ordinalPosition does not match with type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable other.currentRelease
    14Expression other._ordinalPosition cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15Expression other.currentRelease cannot be parameterized, because it has dependencies to/from statements that will be extracted
    16Type java.lang.Integer of variable other._ordinalPosition does not match with type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable other.currentRelease
    17Type java.lang.Integer of variable _ordinalPosition does not match with type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable currentRelease