if (super.equals(obj) && obj instanceof ProcedureInfo) { ProcedureInfo info = (ProcedureInfo) obj; if ((info._remarks == null && _remarks == null) || ((info._remarks != null && _remarks != null) && info._remarks.equals(_remarks))) { return info._procType == _procType; } } return false;
if (super.equals(obj) && obj instanceof TableInfo) { TableInfo info = (TableInfo) obj; if ((info._tableType == null && _tableType == null) || ((info._tableType != null && _tableType != null) && info._tableType.equals(_tableType))) { return ( (info._remarks == null && _remarks == null) || ((info._remarks != null && _remarks != null) && info._remarks.equals(_remarks))); } } return false;
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/sql/ProcedureInfo.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/sql/TableInfo.java
Method name: boolean equals(Object) Method name: boolean equals(Object)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (super.equals(obj) && obj instanceof ProcedureInfo)
1
if (super.equals(obj) && obj instanceof TableInfo)
2
		{
2
		{
3
			ProcedureInfo info = (ProcedureInfo) obj;
3
			TableInfo info = (TableInfo) obj;
4
			if (
4
			if ((info._tableType == null && _tableType == null)
5
				|| ((info._tableType != null && _tableType != null)
6
					&& info._tableType.equals(_tableType)))
7
			{
8
				return (
5
(info._remarks == null && _remarks == null)
9
					(info._remarks == null && _remarks == null)
6
				|| ((info._remarks != null && _remarks != null)
10
						|| ((info._remarks != null && _remarks != null)
7
					&& info._remarks.equals(_remarks)))
11
							&& info._remarks.equals(_remarks)))
8
			{
9
				return info._procType == _procType;
12
;
10
			}
13
			}
11
		}
14
		}
12
		return false;
15
		return false;
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.2
Clones locationClones are in different classes having the same super class
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (super.equals(obj) && obj instanceof ProcedureInfo)
    1
    if (super.equals(obj) && obj instanceof ProcedureInfo)
    1
    if (super.equals(obj) && obj instanceof TableInfo)
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.fw.sql.ProcedureInfonet.sourceforge.squirrel_sql.fw.sql.TableInfoSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Super method call if(super.equals(obj) && obj instanceof ProcedureInfo) cannot be extracted from method
    Super method call if(super.equals(obj) && obj instanceof TableInfo) cannot be extracted from method
    1
    if (super.equals(obj) && obj instanceof TableInfo)
    2
    ProcedureInfo info = (ProcedureInfo)obj;
    2
    ProcedureInfo info = (ProcedureInfo)obj;
    2
    TableInfo info = (TableInfo)obj;
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.fw.sql.ProcedureInfonet.sourceforge.squirrel_sql.fw.sql.TableInfoSUBCLASS_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.fw.sql.ProcedureInfonet.sourceforge.squirrel_sql.fw.sql.TableInfoSUBCLASS_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.fw.sql.ProcedureInfonet.sourceforge.squirrel_sql.fw.sql.TableInfoSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression (ProcedureInfo)obj cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression (TableInfo)obj cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2
    TableInfo info = (TableInfo)obj;
    3
    if ((info._remarks == null && _remarks == null) || ((info._remarks != null && _remarks != null) && info._remarks.equals(_remarks)))
    3
    if ((info._remarks == null && _remarks == null) || ((info._remarks != null && _remarks != null) && info._remarks.equals(_remarks)))
    3
    if ((info._tableType == null && _tableType == null) || ((info._tableType != null && _tableType != null) && info._tableType.equals(_tableType)))
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.fw.sql.ProcedureInfonet.sourceforge.squirrel_sql.fw.sql.TableInfoSUBCLASS_TYPE_MISMATCH
    _remarks_tableTypeVARIABLE_NAME_MISMATCH
    _remarks_tableTypeVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.fw.sql.ProcedureInfonet.sourceforge.squirrel_sql.fw.sql.TableInfoSUBCLASS_TYPE_MISMATCH
    _remarks_tableTypeVARIABLE_NAME_MISMATCH
    _remarks_tableTypeVARIABLE_NAME_MISMATCH
    _remarks_tableTypeVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.fw.sql.ProcedureInfonet.sourceforge.squirrel_sql.fw.sql.TableInfoSUBCLASS_TYPE_MISMATCH
    _remarks_tableTypeVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression info._remarks cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression info._tableType cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression info._remarks cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression info._tableType cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression info._remarks cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression info._tableType cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3
    if ((info._tableType == null && _tableType == null) || ((info._tableType != null && _tableType != null) && info._tableType.equals(_tableType)))
    4
    return info._procType == _procType;
    4
    return info._procType == _procType;
    4
    return ((info._remarks == null && _remarks == null) || ((info._remarks != null && _remarks != null) && info._remarks.equals(_remarks)));
    Differences
    Expression1Expression2Difference
    info._procType == _procType((info._remarks == null && _remarks == null) || ((info._remarks != null && _remarks != null) && info._remarks.equals(_remarks)))TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression info._procType == _procType cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ((info._remarks == null && _remarks == null) || ((info._remarks != null && _remarks != null) && info._remarks.equals(_remarks))) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4
    return ((info._remarks == null && _remarks == null) || ((info._remarks != null && _remarks != null) && info._remarks.equals(_remarks)));
    5
    return false;
    5
    return false;
    Precondition Violations (12)
    Row Violation
    1Super method call if(super.equals(obj) && obj instanceof ProcedureInfo) cannot be extracted from method
    2Super method call if(super.equals(obj) && obj instanceof TableInfo) cannot be extracted from method
    3Expression (ProcedureInfo)obj cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression (TableInfo)obj cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression info._remarks cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression info._tableType cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression info._remarks cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression info._tableType cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression info._remarks cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression info._tableType cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression info._procType == _procType cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12Expression ((info._remarks == null && _remarks == null) || ((info._remarks != null && _remarks != null) && info._remarks.equals(_remarks))) cannot be parameterized, because it has dependencies to/from statements that will be extracted