if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final SQLAliasSchemaDetailProperties other = (SQLAliasSchemaDetailProperties) obj; if (_schemaName == null) { if (other._schemaName != null) return false; } else if (!_schemaName.equals(other._schemaName)) return false; return true;
if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final MemorySessionInfo other = (MemorySessionInfo) obj; if (sessionId == null) { if (other.sessionId != null) return false; } else if (!sessionId.equals(other.sessionId)) return false; return true;
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/SQLAliasSchemaDetailProperties.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/MemoryPanel.java
Method name: boolean equals(Object) Method name: boolean equals(Object)
Number of AST nodes: 13 Number of AST nodes: 13
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 SQLAliasSchemaDetailProperties other = (SQLAliasSchemaDetailProperties) obj;
7
            final MemorySessionInfo other = (MemorySessionInfo) obj;
8
       if (_schemaName == null) {
8
            if (sessionId == null) {
9
           if (other._schemaName != null)
9
                if (other.sessionId != null)
10
               return false;
10
                    return false;
11
       } else if (!_schemaName.equals(other._schemaName))
11
            } else if (!sessionId.equals(other.
12
sessionId))
12
           return false;
13
                return false;
13
       return true;
14
            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)1.3
Clones locationClones are in different classes
Number of node comparisons34
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements12
    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.3
    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 MemorySessionInfo other = (MemorySessionInfo)obj;
    7
    final SQLAliasSchemaDetailProperties other = (SQLAliasSchemaDetailProperties)obj;
                                                                                                                                                                        
    8
    if (_schemaName == null)
    8
    if (_schemaName == null)
    8
    if (sessionId == null)
    Differences
    Expression1Expression2Difference
    _schemaNamesessionIdVARIABLE_NAME_MISMATCH
    java.lang.Stringnet.sourceforge.squirrel_sql.fw.id.IIdentifierVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable _schemaName does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable sessionId
    • Make classes java.lang.String and net.sourceforge.squirrel_sql.fw.id.IIdentifier extend a common superclass
    8
    if (sessionId == null)
    9
    if (other._schemaName != null)
    9
    if (other._schemaName != null)
    9
    if (other.sessionId != null)
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.client.gui.db.SQLAliasSchemaDetailPropertiesnet.sourceforge.squirrel_sql.client.gui.MemoryPanel.MemorySessionInfoVARIABLE_TYPE_MISMATCH
    _schemaNamesessionIdVARIABLE_NAME_MISMATCH
    java.lang.Stringnet.sourceforge.squirrel_sql.fw.id.IIdentifierVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable other._schemaName does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable other.sessionId
    • Make classes net.sourceforge.squirrel_sql.client.gui.db.SQLAliasSchemaDetailProperties and net.sourceforge.squirrel_sql.client.gui.MemoryPanel.MemorySessionInfo extend a common superclass
    Expression other._schemaName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression other.sessionId cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.lang.String of variable other._schemaName does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable other.sessionId
    • Make classes java.lang.String and net.sourceforge.squirrel_sql.fw.id.IIdentifier extend a common superclass
    9
    if (other.sessionId != null)
    10
    return false;
    10
    return false;
    11
    else if (!_schemaName.equals(other._schemaName))
    11
    else if (!_schemaName.equals(other._schemaName))
    11
    else if (!sessionId.equals(other.sessionId))
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.client.gui.db.SQLAliasSchemaDetailPropertiesnet.sourceforge.squirrel_sql.client.gui.MemoryPanel.MemorySessionInfoVARIABLE_TYPE_MISMATCH
    _schemaNamesessionIdVARIABLE_NAME_MISMATCH
    java.lang.Stringnet.sourceforge.squirrel_sql.fw.id.IIdentifierVARIABLE_TYPE_MISMATCH
    _schemaNamesessionIdVARIABLE_NAME_MISMATCH
    java.lang.Stringnet.sourceforge.squirrel_sql.fw.id.IIdentifierVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable other._schemaName does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable other.sessionId
    • Make classes net.sourceforge.squirrel_sql.client.gui.db.SQLAliasSchemaDetailProperties and net.sourceforge.squirrel_sql.client.gui.MemoryPanel.MemorySessionInfo extend a common superclass
    Expression other._schemaName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression other.sessionId cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.lang.String of variable other._schemaName does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable other.sessionId
    • Make classes java.lang.String and net.sourceforge.squirrel_sql.fw.id.IIdentifier extend a common superclass
    Type java.lang.String of variable _schemaName does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable sessionId
    • Make classes java.lang.String and net.sourceforge.squirrel_sql.fw.id.IIdentifier extend a common superclass
    11
    else if (!sessionId.equals(other.sessionId))
    12
    return false;
    12
    return false;
    13
    return true;
    13
    return true;
    Precondition Violations (12)
    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 _schemaName does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable sessionId
    3Type java.lang.String of variable other._schemaName does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable other.sessionId
    4Expression other._schemaName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression other.sessionId cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Type java.lang.String of variable other._schemaName does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable other.sessionId
    7Type java.lang.String of variable other._schemaName does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable other.sessionId
    8Expression other._schemaName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression other.sessionId cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Type java.lang.String of variable other._schemaName does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable other.sessionId
    11Type java.lang.String of variable _schemaName does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable sessionId
    12The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.client.gui.db.SQLAliasSchemaDetailProperties and net.sourceforge.squirrel_sql.client.gui.MemoryPanel.MemorySessionInfo do not have a common superclass