if (_wrapee != null) { return _wrapee.toString(); } return super.toString();
if (o != null) { return o.toString(); } return "null";
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/util/BaseRuntimeException.java File path: /sql12/plugins/dbcopy/src/net/sourceforge/squirrel_sql/plugins/dbcopy/util/DBUtil.java
Method name: String toString() Method name: String getValue(Object)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (_wrapee != null)
1
if (o != null)
2
		{
2
		{
3
			return _wrapee.toString();
3
			return o.toString();
4
		}
4
		}
5
		return super.toString();
5
		return "null";
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)0.1
Clones locationClones are in different classes
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (_wrapee != null)
    1
    if (_wrapee != null)
    1
    if (o != null)
    Differences
    Expression1Expression2Difference
    _wrapeeoVARIABLE_NAME_MISMATCH
    java.lang.Throwablejava.lang.ObjectVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.Throwable of variable _wrapee does not match with type java.lang.Object of variable o
    • Make classes java.lang.Throwable and java.lang.Object extend a common superclass
    1
    if (o != null)
    2
    return _wrapee.toString();
    2
    return _wrapee.toString();
    2
    return o.toString();
    Differences
    Expression1Expression2Difference
    _wrapeeoVARIABLE_NAME_MISMATCH
    java.lang.Throwablejava.lang.ObjectVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.Throwable of variable _wrapee does not match with type java.lang.Object of variable o
    • Make classes java.lang.Throwable and java.lang.Object extend a common superclass
    2
    return o.toString();
    3
    return super.toString();
    3
    return super.toString();
    3
    return "null";
    Differences
    Expression1Expression2Difference
    super.toString()"null"TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Super method call return super.toString(); cannot be extracted from method
    3
    return "null";
    Precondition Violations (4)
    Row Violation
    1Type java.lang.Throwable of variable _wrapee does not match with type java.lang.Object of variable o
    2Type java.lang.Throwable of variable _wrapee does not match with type java.lang.Object of variable o
    3Super method call return super.toString(); cannot be extracted from method
    4The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.fw.util.BaseRuntimeException and net.sourceforge.squirrel_sql.plugins.dbcopy.util.DBUtil do not have a common superclass