if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final ExtendedColumnInfo other = (ExtendedColumnInfo) obj; if (_qualifiedName == null) { if (other._qualifiedName != null) return false; } else if (!_qualifiedName.equals(other._qualifiedName)) return false; return true;
if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final MockSQLDriver other = (MockSQLDriver) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; return true;
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/ExtendedColumnInfo.java File path: /sql12/test/mockobjects/net/sourceforge/squirrel_sql/fw/sql/MockSQLDriver.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 ExtendedColumnInfo other = (ExtendedColumnInfo) obj;
8
       if (_qualifiedName == null) {
9
           if (other._qualifiedName != null)
10
              
7
		final MockSQLDriver other = (MockSQLDriver) obj;
8
		if (id == null)
9
		{
11
 return false;
10
			if (other.id != null) return false;
12
       } 
11
		}
13
else if (!_qualifiedName.equals(other._qualifiedName))
12
		else if (!
14
           return false;
13
id.equals(other.id)) return false;
15
       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.5
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)3.1
    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 MockSQLDriver other = (MockSQLDriver)obj;
    7
    final ExtendedColumnInfo other = (ExtendedColumnInfo)obj;
                                                                                                                        
    8
    if (_qualifiedName == null)
    8
    if (_qualifiedName == null)
    8
    if (id == null)
    Differences
    Expression1Expression2Difference
    _qualifiedNameidVARIABLE_NAME_MISMATCH
    java.lang.Stringnet.sourceforge.squirrel_sql.fw.id.IIdentifierVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable _qualifiedName does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable id
    • Make classes java.lang.String and net.sourceforge.squirrel_sql.fw.id.IIdentifier extend a common superclass
    8
    if (id == null)
    9
    if (other._qualifiedName != null)
    9
    if (other._qualifiedName != null)
    9
    if (other.id != null)
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.client.session.ExtendedColumnInfonet.sourceforge.squirrel_sql.fw.sql.MockSQLDriverVARIABLE_TYPE_MISMATCH
    _qualifiedNameidVARIABLE_NAME_MISMATCH
    java.lang.Stringnet.sourceforge.squirrel_sql.fw.id.IIdentifierVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable other._qualifiedName does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable other.id
    • Make classes net.sourceforge.squirrel_sql.client.session.ExtendedColumnInfo and net.sourceforge.squirrel_sql.fw.sql.MockSQLDriver extend a common superclass
    Expression other._qualifiedName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression other.id cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.lang.String of variable other._qualifiedName does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable other.id
    • Make classes java.lang.String and net.sourceforge.squirrel_sql.fw.id.IIdentifier extend a common superclass
    9
    if (other.id != null)
    10
    return false;
    10
    return false;
    11
    else if (!_qualifiedName.equals(other._qualifiedName))
    11
    else if (!_qualifiedName.equals(other._qualifiedName))
    11
    else if (!id.equals(other.id))
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.client.session.ExtendedColumnInfonet.sourceforge.squirrel_sql.fw.sql.MockSQLDriverVARIABLE_TYPE_MISMATCH
    _qualifiedNameidVARIABLE_NAME_MISMATCH
    java.lang.Stringnet.sourceforge.squirrel_sql.fw.id.IIdentifierVARIABLE_TYPE_MISMATCH
    _qualifiedNameidVARIABLE_NAME_MISMATCH
    java.lang.Stringnet.sourceforge.squirrel_sql.fw.id.IIdentifierVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable other._qualifiedName does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable other.id
    • Make classes net.sourceforge.squirrel_sql.client.session.ExtendedColumnInfo and net.sourceforge.squirrel_sql.fw.sql.MockSQLDriver extend a common superclass
    Expression other._qualifiedName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression other.id cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.lang.String of variable other._qualifiedName does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable other.id
    • Make classes java.lang.String and net.sourceforge.squirrel_sql.fw.id.IIdentifier extend a common superclass
    Type java.lang.String of variable _qualifiedName does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable id
    • Make classes java.lang.String and net.sourceforge.squirrel_sql.fw.id.IIdentifier extend a common superclass
    11
    else if (!id.equals(other.id))
    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 _qualifiedName does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable id
    3Type java.lang.String of variable other._qualifiedName does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable other.id
    4Expression other._qualifiedName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression other.id cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Type java.lang.String of variable other._qualifiedName does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable other.id
    7Type java.lang.String of variable other._qualifiedName does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable other.id
    8Expression other._qualifiedName cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression other.id cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Type java.lang.String of variable other._qualifiedName does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable other.id
    11Type java.lang.String of variable _qualifiedName does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable id
    12The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.client.session.ExtendedColumnInfo and net.sourceforge.squirrel_sql.fw.sql.MockSQLDriver do not have a common superclass