if (obj != null) { return obj.toString(); } return "<null>";
if (_wrapee != null) { return _wrapee.toString(); } return super.toString();
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DefaultColumnRenderer.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/util/BaseException.java
Method name: Object renderObject(Object) Method name: String toString()
Number of AST nodes: 3 Number of AST nodes: 3
1
if (obj != null)
1
if (_wrapee != null)
2
		{
2
		{
3
			return obj.toString();
3
			return _wrapee.toString();
4
		}
4
		}
5
		return "<null>";
5
		return super.toString();
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.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (obj != null)
    1
    if (obj != null)
    1
    if (_wrapee != null)
    Differences
    Expression1Expression2Difference
    obj_wrapeeVARIABLE_NAME_MISMATCH
    java.lang.Objectjava.lang.ThrowableVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.Object of variable obj does not match with type java.lang.Throwable of variable _wrapee
    • Make classes java.lang.Object and java.lang.Throwable extend a common superclass
    1
    if (_wrapee != null)
    2
    return obj.toString();
    2
    return obj.toString();
    2
    return _wrapee.toString();
    Differences
    Expression1Expression2Difference
    obj_wrapeeVARIABLE_NAME_MISMATCH
    java.lang.Objectjava.lang.ThrowableVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.Object of variable obj does not match with type java.lang.Throwable of variable _wrapee
    • Make classes java.lang.Object and java.lang.Throwable extend a common superclass
    2
    return _wrapee.toString();
    3
    return "<null>";
    3
    return "<null>";
    3
    return super.toString();
    Differences
    Expression1Expression2Difference
    ""super.toString()TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Super method call return super.toString(); cannot be extracted from method
    3
    return super.toString();
    Precondition Violations (3)
    Row Violation
    1Type java.lang.Object of variable obj does not match with type java.lang.Throwable of variable _wrapee
    2Type java.lang.Object of variable obj does not match with type java.lang.Throwable of variable _wrapee
    3Super method call return super.toString(); cannot be extracted from method