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;
if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final FontInfo other = (FontInfo) obj; if (_familyName == null) { if (other._familyName != null) return false; } else if (!_familyName.equals(other._familyName)) return false; if (_isBold != other._isBold) return false; if (_isItalic != other._isItalic) return false; if (_size != other._size) return false; return true;
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/gui/FontInfo.java
Method name: boolean equals(Object) Method name: boolean equals(Object)
Number of AST nodes: 18 Number of AST nodes: 19
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 ChannelXmlBean other = (ChannelXmlBean) obj;
7
        final FontInfo other = (FontInfo) obj;
8
        if (currentRelease == null) {
8
        if (_familyName == null) {
9
            if (other.currentRelease != null)
9
            if (other._familyName != null)
10
                return false;
10
                return false;
11
        } else if (!currentRelease.equals(other.currentRelease))
11
        } else if (!_familyName.equals(other._familyName))
12
            return false;
12
            return false;
13
        if (name == null) {
13
        if (
14
            if (other.name != null)
15
    
14
_isBold != other._isBold)
15
            return false;
16
        if (_isItalic != other._isItalic)
16
            return false;
17
            return false;
17
        } else if (!name.equals(other.name))
18
        if (_size != other._size)
18
            return false;
19
            return false;
19
        return true;
20
        return true;
Summary
Number of common nesting structure subtrees2
Number of refactorable cases0
Number of non-refactorable cases2
Time elapsed for finding largest common nesting structure subtrees (ms)2.7
Clones locationClones are in different classes
Number of node comparisons57
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements11
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)2.7
    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 FontInfo other = (FontInfo)obj;
    7
    final ChannelXmlBean other = (ChannelXmlBean)obj;
                                                                                                        
    8
    if (currentRelease == null)
    8
    if (currentRelease == null)
    8
    if (_familyName == null)
    Differences
    Expression1Expression2Difference
    currentRelease_familyNameVARIABLE_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 _familyName
    • Make classes net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean and java.lang.String extend a common superclass
    8
    if (_familyName == null)
    9
    if (other.currentRelease != null)
    9
    if (other.currentRelease != null)
    9
    if (other._familyName != null)
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.client.update.xmlbeans.ChannelXmlBeannet.sourceforge.squirrel_sql.fw.gui.FontInfoVARIABLE_TYPE_MISMATCH
    currentRelease_familyNameVARIABLE_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 other.currentRelease does not match with type java.lang.String of variable other._familyName
    • Make classes net.sourceforge.squirrel_sql.client.update.xmlbeans.ChannelXmlBean and net.sourceforge.squirrel_sql.fw.gui.FontInfo extend a common superclass
    Expression other.currentRelease cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression other._familyName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable other.currentRelease does not match with type java.lang.String of variable other._familyName
    • Make classes net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean and java.lang.String extend a common superclass
    9
    if (other._familyName != null)
    10
    return false;
    10
    return false;
    11
    else if (!currentRelease.equals(other.currentRelease))
    11
    else if (!currentRelease.equals(other.currentRelease))
    11
    else if (!_familyName.equals(other._familyName))
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.client.update.xmlbeans.ChannelXmlBeannet.sourceforge.squirrel_sql.fw.gui.FontInfoVARIABLE_TYPE_MISMATCH
    currentRelease_familyNameVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBeanjava.lang.StringVARIABLE_TYPE_MISMATCH
    currentRelease_familyNameVARIABLE_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 other.currentRelease does not match with type java.lang.String of variable other._familyName
    • Make classes net.sourceforge.squirrel_sql.client.update.xmlbeans.ChannelXmlBean and net.sourceforge.squirrel_sql.fw.gui.FontInfo extend a common superclass
    Expression other.currentRelease cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression other._familyName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable other.currentRelease does not match with type java.lang.String of variable other._familyName
    • 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 _familyName
    • Make classes net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean and java.lang.String extend a common superclass
    11
    else if (!_familyName.equals(other._familyName))
    12
    return false;
    12
    return false;
    Precondition Violations (12)
    Row Violation
    1Type java.lang.Class<> of variable getClass() does not match with type java.lang.Class<> of variable getClass()
    2Type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable currentRelease does not match with type java.lang.String of variable _familyName
    3Type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable other.currentRelease does not match with type java.lang.String of variable other._familyName
    4Expression other.currentRelease cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression other._familyName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable other.currentRelease does not match with type java.lang.String of variable other._familyName
    7Type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable other.currentRelease does not match with type java.lang.String of variable other._familyName
    8Expression other.currentRelease cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression other._familyName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable other.currentRelease does not match with type java.lang.String of variable other._familyName
    11Type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable currentRelease does not match with type java.lang.String of variable _familyName
    12Not all possible execution flows end in a return statement
  2. {Non-refactorable}
    Mapping Summary
    Number of mapped statements11
    Number of unmapped statements in the first code fragment6
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)2.3
    Clone typeType 3
    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 FontInfo other = (FontInfo)obj;
    7
    final ChannelXmlBean other = (ChannelXmlBean)obj;
                                                                                                        
    8
    if (currentRelease == null)
    8
    if (currentRelease == null)
    8
    if (_familyName == null)
    Differences
    Expression1Expression2Difference
    currentRelease_familyNameVARIABLE_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 _familyName
    • Make classes net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean and java.lang.String extend a common superclass
    8
    if (_familyName == null)
    9
    if (other.currentRelease != null)
    9
    if (other.currentRelease != null)
    9
    if (other._familyName != null)
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.client.update.xmlbeans.ChannelXmlBeannet.sourceforge.squirrel_sql.fw.gui.FontInfoVARIABLE_TYPE_MISMATCH
    currentRelease_familyNameVARIABLE_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 other.currentRelease does not match with type java.lang.String of variable other._familyName
    • Make classes net.sourceforge.squirrel_sql.client.update.xmlbeans.ChannelXmlBean and net.sourceforge.squirrel_sql.fw.gui.FontInfo extend a common superclass
    Expression other.currentRelease cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression other._familyName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable other.currentRelease does not match with type java.lang.String of variable other._familyName
    • Make classes net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean and java.lang.String extend a common superclass
    9
    if (other._familyName != null)
    10
    return false;
    10
    return false;
    11
    else if (!currentRelease.equals(other.currentRelease))
    11
    else if (!currentRelease.equals(other.currentRelease))
    11
    else if (!_familyName.equals(other._familyName))
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.client.update.xmlbeans.ChannelXmlBeannet.sourceforge.squirrel_sql.fw.gui.FontInfoVARIABLE_TYPE_MISMATCH
    currentRelease_familyNameVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBeanjava.lang.StringVARIABLE_TYPE_MISMATCH
    currentRelease_familyNameVARIABLE_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 other.currentRelease does not match with type java.lang.String of variable other._familyName
    • Make classes net.sourceforge.squirrel_sql.client.update.xmlbeans.ChannelXmlBean and net.sourceforge.squirrel_sql.fw.gui.FontInfo extend a common superclass
    Expression other.currentRelease cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression other._familyName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable other.currentRelease does not match with type java.lang.String of variable other._familyName
    • 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 _familyName
    • Make classes net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean and java.lang.String extend a common superclass
    11
    else if (!_familyName.equals(other._familyName))
    12
    return false;
    12
    return false;
    13
    if (name == null)
                                            
    14
    if (other.name != null)
                                                        
    15
    return false;
    15
    return false;
    Preondition Violations
    Unmatched return false;
                                      
    16
    else if (!name.equals(other.name))
                                                                    
    17
    return false;
    17
    return false;
    Preondition Violations
    Unmatched return false;
                                      
    Precondition Violations (14)
    Row Violation
    1Type java.lang.Class<> of variable getClass() does not match with type java.lang.Class<> of variable getClass()
    2Type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable currentRelease does not match with type java.lang.String of variable _familyName
    3Type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable other.currentRelease does not match with type java.lang.String of variable other._familyName
    4Expression other.currentRelease cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression other._familyName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable other.currentRelease does not match with type java.lang.String of variable other._familyName
    7Type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable other.currentRelease does not match with type java.lang.String of variable other._familyName
    8Expression other.currentRelease cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression other._familyName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable other.currentRelease does not match with type java.lang.String of variable other._familyName
    11Type net.sourceforge.squirrel_sql.client.update.xmlbeans.ReleaseXmlBean of variable currentRelease does not match with type java.lang.String of variable _familyName
    12Unmatched return false;
    13Unmatched return false;
    14Not all possible execution flows end in a return statement