RubyArray args = (RubyArray) argsNode.interpret(runtime, context, self, block); args.append(value); RuntimeHelpers.invoke(context, receiver, name, args.toJavaArray(), CallType.NORMAL, Block.NULL_BLOCK);
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 otherAssign(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(), CallType.NORMAL, Block.NULL_BLOCK);
3
            RuntimeHelpers.invoke(context, receiver, getName(), args.toJavaArray(), CallType.NORMAL, Block.NULL_BLOCK);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
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. {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(), CallType.NORMAL, Block.NULL_BLOCK);
    6
    RuntimeHelpers.invoke(context, receiver, name, args.toJavaArray(), CallType.NORMAL, Block.NULL_BLOCK);
    6
    RuntimeHelpers.invoke(context, receiver, getName(), args.toJavaArray(), CallType.NORMAL, Block.NULL_BLOCK);
    Differences
    Expression1Expression2Difference
    namegetName()TYPE_COMPATIBLE_REPLACEMENT
    6
    RuntimeHelpers.invoke(context, receiver, getName(), args.toJavaArray(), CallType.NORMAL, Block.NULL_BLOCK);
    Precondition Violations (0)
    Row Violation