if ( fromValue == Primitive.NULL && fromType != null ) throw new InterpreterError("inconsistent args 1"); if ( fromValue == Primitive.VOID && fromType != Void.TYPE ) throw new InterpreterError("inconsistent args 2");
if ( fromValue == Primitive.NULL && fromType != null ) throw new InterpreterError("inconsistent args 1"); if ( fromValue == Primitive.VOID && fromType != Void.TYPE ) throw new InterpreterError("inconsistent args 2");
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/bsh/Primitive.java File path: /jEdit-4.2/src/bsh/Types.java
Method name: Primitive castPrimitive(Class, Class, Primitive, boolean, int) Method name: Object castObject(Class, Class, Object, int, boolean)
Number of AST nodes: 4 Number of AST nodes: 4
1
if ( fromValue == Primitive.NULL && fromType != null )
1
if ( fromValue == Primitive.NULL && fromType != null )
2
			throw new InterpreterError("inconsistent args 1");
2
			throw new InterpreterError("inconsistent args 1");
3
		if ( fromValue == Primitive.VOID && fromType != Void.TYPE )
3
		if ( fromValue == Primitive.VOID && fromType != Void.TYPE )
4
			throw new InterpreterError("inconsistent args 2");
4
			throw new InterpreterError("inconsistent args 2");
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
Number of node comparisons13
  1. {Non-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)0.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    7
    if (fromValue == Primitive.NULL && fromType != null)
    7
    if (fromValue == Primitive.NULL && fromType != null)
    7
    if (fromValue == Primitive.NULL && fromType != null)
    Differences
    Expression1Expression2Difference
    bsh.Primitivejava.lang.ObjectVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type bsh.Primitive of variable fromValue does not match with type java.lang.Object of variable fromValue
    • Make classes bsh.Primitive and java.lang.Object extend a common superclass
    7
    if (fromValue == Primitive.NULL && fromType != null)
    8
    throw new InterpreterError("inconsistent args 1");
    8
    throw new InterpreterError("inconsistent args 1");
    9
    if (fromValue == Primitive.VOID && fromType != Void.TYPE)
    9
    if (fromValue == Primitive.VOID && fromType != Void.TYPE)
    9
    if (fromValue == Primitive.VOID && fromType != Void.TYPE)
    Differences
    Expression1Expression2Difference
    bsh.Primitivejava.lang.ObjectVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type bsh.Primitive of variable fromValue does not match with type java.lang.Object of variable fromValue
    • Make classes bsh.Primitive and java.lang.Object extend a common superclass
    9
    if (fromValue == Primitive.VOID && fromType != Void.TYPE)
    10
    throw new InterpreterError("inconsistent args 2");
    10
    throw new InterpreterError("inconsistent args 2");
    Precondition Violations (2)
    Row Violation
    1Type bsh.Primitive of variable fromValue does not match with type java.lang.Object of variable fromValue
    2Type bsh.Primitive of variable fromValue does not match with type java.lang.Object of variable fromValue