loadRuntime(); method.ldc(name); invokeUtilityMethod("getGlobalVariable", sig(IRubyObject.class, Ruby.class, String.class));
loadRuntime(); method.pushBoolean(masgnHasHead); invokeUtilityMethod("ensureMultipleAssignableRubyArray", sig(RubyArray.class, params(IRubyObject.class, Ruby.class, boolean.class)));
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/compiler/impl/BaseBodyCompiler.java File path: /jruby-1.4.0/src/org/jruby/compiler/impl/BaseBodyCompiler.java
Method name: void retrieveGlobalVariable(String) Method name: void ensureMultipleAssignableRubyArray(boolean)
Number of AST nodes: 3 Number of AST nodes: 3
1
loadRuntime();
1
loadRuntime();
2
        method.ldc(name);
2
        method.pushBoolean(masgnHasHead);
3
        invokeUtilityMethod("getGlobalVariable", sig(IRubyObject.class, Ruby.class, String.class));
3
        invokeUtilityMethod("ensureMultipleAssignableRubyArray", sig(RubyArray.class, params(IRubyObject.class, Ruby.class, boolean.class)));
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.0
Clones locationClones are declared in the same class
Number of node comparisons9
  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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    loadRuntime();
    1
    loadRuntime();
    2
    method.ldc(name);
    2
    method.ldc(name);
    3
    invokeUtilityMethod("ensureMultipleAssignableRubyArray", sig(RubyArray.class, params(IRubyObject.class, Ruby.class, boolean.class)));
    Differences
    Expression1Expression2Difference
    ldcinvokeUtilityMethodMETHOD_INVOCATION_NAME_MISMATCH
    method.ldc(name)invokeUtilityMethod("ensureMultipleAssignableRubyArray",sig(RubyArray.class,params(IRubyObject.class,Ruby.class,boolean.class)))ARGUMENT_NUMBER_MISMATCH
    methodMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression method.ldc(name) is a void method call, and thus it cannot be parameterized
    Expression invokeUtilityMethod("ensureMultipleAssignableRubyArray",sig(RubyArray.class,params(IRubyObject.class,Ruby.class,boolean.class))) is a void method call, and thus it cannot be parameterized
    Expression method.ldc(name) is a void method call, and thus it cannot be parameterized
    Expression invokeUtilityMethod("ensureMultipleAssignableRubyArray",sig(RubyArray.class,params(IRubyObject.class,Ruby.class,boolean.class))) is a void method call, and thus it cannot be parameterized
    3
    invokeUtilityMethod("ensureMultipleAssignableRubyArray", sig(RubyArray.class, params(IRubyObject.class, Ruby.class, boolean.class)));
    3
    invokeUtilityMethod("getGlobalVariable", sig(IRubyObject.class, Ruby.class, String.class));
    3
    invokeUtilityMethod("getGlobalVariable", sig(IRubyObject.class, Ruby.class, String.class));
    2
    method.pushBoolean(masgnHasHead);
    Differences
    Expression1Expression2Difference
    invokeUtilityMethodpushBooleanMETHOD_INVOCATION_NAME_MISMATCH
    invokeUtilityMethod("getGlobalVariable",sig(IRubyObject.class,Ruby.class,String.class))method.pushBoolean(masgnHasHead)ARGUMENT_NUMBER_MISMATCH
    methodMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression invokeUtilityMethod("getGlobalVariable",sig(IRubyObject.class,Ruby.class,String.class)) is a void method call, and thus it cannot be parameterized
    Expression method.pushBoolean(masgnHasHead) is a void method call, and thus it cannot be parameterized
    Expression invokeUtilityMethod("getGlobalVariable",sig(IRubyObject.class,Ruby.class,String.class)) is a void method call, and thus it cannot be parameterized
    Expression method.pushBoolean(masgnHasHead) is a void method call, and thus it cannot be parameterized
    2
    method.pushBoolean(masgnHasHead);
    Precondition Violations (8)
    Row Violation
    1Expression method.ldc(name) is a void method call, and thus it cannot be parameterized
    2Expression invokeUtilityMethod("ensureMultipleAssignableRubyArray",sig(RubyArray.class,params(IRubyObject.class,Ruby.class,boolean.class))) is a void method call, and thus it cannot be parameterized
    3Expression method.ldc(name) is a void method call, and thus it cannot be parameterized
    4Expression invokeUtilityMethod("ensureMultipleAssignableRubyArray",sig(RubyArray.class,params(IRubyObject.class,Ruby.class,boolean.class))) is a void method call, and thus it cannot be parameterized
    5Expression invokeUtilityMethod("getGlobalVariable",sig(IRubyObject.class,Ruby.class,String.class)) is a void method call, and thus it cannot be parameterized
    6Expression method.pushBoolean(masgnHasHead) is a void method call, and thus it cannot be parameterized
    7Expression invokeUtilityMethod("getGlobalVariable",sig(IRubyObject.class,Ruby.class,String.class)) is a void method call, and thus it cannot be parameterized
    8Expression method.pushBoolean(masgnHasHead) is a void method call, and thus it cannot be parameterized