RubyArray args = (RubyArray) argsNode.interpret(runtime, context, self, block); args.append(value); RuntimeHelpers.invoke(context, receiver, name, args.toJavaArray());
RubyArray args = (RubyArray)argsNode.interpret(runtime, context, self, block); args.append(value); RuntimeHelpers.invoke(context, receiver, getName(), args.toJavaArray(), CallType.NORMAL, Block.NULL_BLOCK);
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/ast/AttrAssignNode.java File path: /jruby-1.4.0/src/org/jruby/ast/CallNode.java
Method name: IRubyObject selfAssign(Ruby, ThreadContext, IRubyObject, IRubyObject, Block, boolean) Method name: IRubyObject assign(Ruby, ThreadContext, IRubyObject, IRubyObject, Block, boolean)
Number of AST nodes: 3 Number of AST nodes: 3
1
RubyArray args = (RubyArray) argsNode.interpret(runtime, context, self, block);
1
RubyArray args = (RubyArray)argsNode.interpret(runtime, context, self, block);
2
            args.append(value);
2
            args.append(value);
3
            RuntimeHelpers.invoke(context, receiver, name, args.toJavaArray());
3
            RuntimeHelpers.invoke(context, receiver, getName(), args.toJavaArray(), CallType.NORMAL, Block.NULL_BLOCK);
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 in different classes having the same super class
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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    4
    RubyArray args = (RubyArray)argsNode.interpret(runtime, context, self, block);
    4
    RubyArray args = (RubyArray)argsNode.interpret(runtime, context, self, block);
    5
    args.append(value);
    5
    args.append(value);
    6
    RuntimeHelpers.invoke(context, receiver, name, args.toJavaArray());
    6
    RuntimeHelpers.invoke(context, receiver, name, args.toJavaArray());
    6
    RuntimeHelpers.invoke(context, receiver, getName(), args.toJavaArray(), CallType.NORMAL, Block.NULL_BLOCK);
    Differences
    Expression1Expression2Difference
    RuntimeHelpers.invoke(context,receiver,name,args.toJavaArray())RuntimeHelpers.invoke(context,receiver,getName(),args.toJavaArray(),CallType.NORMAL,Block.NULL_BLOCK)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression RuntimeHelpers.invoke(context,receiver,name,args.toJavaArray()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression RuntimeHelpers.invoke(context,receiver,getName(),args.toJavaArray(),CallType.NORMAL,Block.NULL_BLOCK) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6
    RuntimeHelpers.invoke(context, receiver, getName(), args.toJavaArray(), CallType.NORMAL, Block.NULL_BLOCK);
    Precondition Violations (2)
    Row Violation
    1Expression RuntimeHelpers.invoke(context,receiver,name,args.toJavaArray()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression RuntimeHelpers.invoke(context,receiver,getName(),args.toJavaArray(),CallType.NORMAL,Block.NULL_BLOCK) cannot be parameterized, because it has dependencies to/from statements that will be extracted