if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final ArtifactStatus other = (ArtifactStatus) obj; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; if (type == null) { if (other.type != null) return false; } else if (!type.equals(other.type)) return false; return true;
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;
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/update/gui/ArtifactStatus.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/dialects/IndexColInfo.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 ArtifactStatus other = (ArtifactStatus) obj;
7
       final IndexColInfo other = (IndexColInfo) obj;
8
      if (name == null) {
8
       if (_colName == null) {
9
         if (other.name != null)
9
           if (other._colName != null)
10
            return false;
10
               return false;
11
      } else if (!name.equals(other.name))
11
       } else if (!_colName.equals(other._colName))
12
         return false;
12
           return false;
13
      if (type == null) {
13
       if (_ordinalPosition == null) {
14
         if (other.type != null)
14
           if (other._ordinalPosition != null)
15
            return false;
15
               return false;
16
      } else if (!type.equals(other.type))
16
       } else if (!_ordinalPosition.equals(other._ordinalPosition))
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)2.9
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)4.0
    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 IndexColInfo other = (IndexColInfo)obj;
    7
    final ArtifactStatus other = (ArtifactStatus)obj;
                                                                                                        
    8
    if (name == null)
    8
    if (name == null)
    8
    if (_colName == null)
    Differences
    Expression1Expression2Difference
    name_colNameVARIABLE_NAME_MISMATCH
    8
    if (_colName == null)
    9
    if (other.name != null)
    9
    if (other.name != null)
    9
    if (other._colName != null)
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.client.update.gui.ArtifactStatusnet.sourceforge.squirrel_sql.fw.dialects.IndexColInfoVARIABLE_TYPE_MISMATCH
    name_colNameVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type java.lang.String of variable other.name does not match with type java.lang.String of variable other._colName
    • Make classes net.sourceforge.squirrel_sql.client.update.gui.ArtifactStatus and net.sourceforge.squirrel_sql.fw.dialects.IndexColInfo extend a common superclass
    Expression other.name cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression other._colName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9
    if (other._colName != null)
    10
    return false;
    10
    return false;
    11
    else if (!name.equals(other.name))
    11
    else if (!name.equals(other.name))
    11
    else if (!_colName.equals(other._colName))
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.client.update.gui.ArtifactStatusnet.sourceforge.squirrel_sql.fw.dialects.IndexColInfoVARIABLE_TYPE_MISMATCH
    name_colNameVARIABLE_NAME_MISMATCH
    name_colNameVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type java.lang.String of variable other.name does not match with type java.lang.String of variable other._colName
    • Make classes net.sourceforge.squirrel_sql.client.update.gui.ArtifactStatus and net.sourceforge.squirrel_sql.fw.dialects.IndexColInfo extend a common superclass
    Expression other.name cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression other._colName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11
    else if (!_colName.equals(other._colName))
    12
    return false;
    12
    return false;
    13
    if (type == null)
    13
    if (type == null)
    13
    if (_ordinalPosition == null)
    Differences
    Expression1Expression2Difference
    type_ordinalPositionVARIABLE_NAME_MISMATCH
    java.lang.Stringjava.lang.IntegerVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable type does not match with type java.lang.Integer of variable _ordinalPosition
    • Make classes java.lang.String and java.lang.Integer extend a common superclass
    13
    if (_ordinalPosition == null)
    14
    if (other.type != null)
    14
    if (other.type != null)
    14
    if (other._ordinalPosition != null)
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.client.update.gui.ArtifactStatusnet.sourceforge.squirrel_sql.fw.dialects.IndexColInfoVARIABLE_TYPE_MISMATCH
    type_ordinalPositionVARIABLE_NAME_MISMATCH
    java.lang.Stringjava.lang.IntegerVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable other.type does not match with type java.lang.Integer of variable other._ordinalPosition
    • Make classes net.sourceforge.squirrel_sql.client.update.gui.ArtifactStatus and net.sourceforge.squirrel_sql.fw.dialects.IndexColInfo extend a common superclass
    Expression other.type cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression other._ordinalPosition cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.lang.String of variable other.type does not match with type java.lang.Integer of variable other._ordinalPosition
    • Make classes java.lang.String and java.lang.Integer extend a common superclass
    14
    if (other._ordinalPosition != null)
    15
    return false;
    15
    return false;
    16
    else if (!type.equals(other.type))
    16
    else if (!type.equals(other.type))
    16
    else if (!_ordinalPosition.equals(other._ordinalPosition))
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.client.update.gui.ArtifactStatusnet.sourceforge.squirrel_sql.fw.dialects.IndexColInfoVARIABLE_TYPE_MISMATCH
    type_ordinalPositionVARIABLE_NAME_MISMATCH
    java.lang.Stringjava.lang.IntegerVARIABLE_TYPE_MISMATCH
    type_ordinalPositionVARIABLE_NAME_MISMATCH
    java.lang.Stringjava.lang.IntegerVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable other.type does not match with type java.lang.Integer of variable other._ordinalPosition
    • Make classes net.sourceforge.squirrel_sql.client.update.gui.ArtifactStatus and net.sourceforge.squirrel_sql.fw.dialects.IndexColInfo extend a common superclass
    Expression other.type cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression other._ordinalPosition cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.lang.String of variable other.type does not match with type java.lang.Integer of variable other._ordinalPosition
    • Make classes java.lang.String and java.lang.Integer extend a common superclass
    Type java.lang.String of variable type does not match with type java.lang.Integer of variable _ordinalPosition
    • Make classes java.lang.String and java.lang.Integer extend a common superclass
    16
    else if (!_ordinalPosition.equals(other._ordinalPosition))
    17
    return false;
    17
    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.name does not match with type java.lang.String of variable other._colName
    3Expression other.name cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression other._colName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Type java.lang.String of variable other.name does not match with type java.lang.String of variable other._colName
    6Expression other.name cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression other._colName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Type java.lang.String of variable type does not match with type java.lang.Integer of variable _ordinalPosition
    9Type java.lang.String of variable other.type does not match with type java.lang.Integer of variable other._ordinalPosition
    10Expression other.type cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression other._ordinalPosition cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12Type java.lang.String of variable other.type does not match with type java.lang.Integer of variable other._ordinalPosition
    13Type java.lang.String of variable other.type does not match with type java.lang.Integer of variable other._ordinalPosition
    14Expression other.type cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15Expression other._ordinalPosition cannot be parameterized, because it has dependencies to/from statements that will be extracted
    16Type java.lang.String of variable other.type does not match with type java.lang.Integer of variable other._ordinalPosition
    17Type java.lang.String of variable type does not match with type java.lang.Integer of variable _ordinalPosition