boolean rc = false; if (rhs != null && rhs.getClass().equals(getClass())) { rc = ((IntegerIdentifier)rhs).toString().equals(toString()); } return rc;
boolean rc = false; if (rhs != null && rhs.getClass().equals(getClass())) { rc = ((UidIdentifier)rhs).toString().equals(toString()); } return rc;
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/id/IntegerIdentifier.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/id/UidIdentifier.java
Method name: boolean equals(Object) Method name: boolean equals(Object)
Number of AST nodes: 4 Number of AST nodes: 4
1
boolean rc = false;
1
boolean rc = false;
2
		if (rhs != null && rhs.getClass().equals(getClass()))
2
      if (rhs != null && rhs.getClass().equals(getClass()))
3
		{
4
			rc = ((Integer
3
      {
5
Identifier)rhs).toString().equals(toString());
4
         rc = ((UidIdentifier)rhs).toString().equals(toString());
6
		}
7
		
5
      }
8
return rc;
6
      return rc;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are in different classes
Number of node comparisons8
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    boolean rc = false;
    1
    boolean rc = false;
    2
    if (rhs != null && rhs.getClass().equals(getClass()))
    2
    if (rhs != null && rhs.getClass().equals(getClass()))
    3
    rc = ((IntegerIdentifier)rhs).toString().equals(toString());
    3
    rc = ((IntegerIdentifier)rhs).toString().equals(toString());
    3
    rc = ((UidIdentifier)rhs).toString().equals(toString());
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.fw.id.IntegerIdentifiernet.sourceforge.squirrel_sql.fw.id.UidIdentifierSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression (IntegerIdentifier)rhs cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression (UidIdentifier)rhs cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3
    rc = ((UidIdentifier)rhs).toString().equals(toString());
    4
    return rc;
    4
    return rc;
    Precondition Violations (2)
    Row Violation
    1Expression (IntegerIdentifier)rhs cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression (UidIdentifier)rhs cannot be parameterized, because it has dependencies to/from statements that will be extracted