File path: /jruby-1.4.0/src/org/jruby/RubyArray.java | File path: /jruby-1.4.0/src/org/jruby/RubyArray.java | |||
Method name: IRubyObject fill(ThreadContext, IRubyObject, Block)
|
Method name: IRubyObject fill(ThreadContext, IRubyObject, IRubyObject, Block)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (arg instanceof RubyRange) {↵ | 1 | if (arg2 instanceof RubyRange) {↵ | |
2 | int[] beglen = ((RubyRange) arg).begLenInt(realLength, 1);↵ | 2 | int[] beglen = ((RubyRange) arg2).begLenInt(realLength, 1);↵ | |
3 | return fillCommon(context, beglen[0], beglen[1], block);↵ | 3 | return fillCommon(context, beglen[0], beglen[1], arg1);↵ | |
4 | }↵ | 4 | }↵ | |
5 | int beg;↵ | 5 | int beg;↵ | |
6 | return fillCommon(context, beg = fillBegin(arg), fillLen(beg, null), block); | 6 | return fillCommon(context, beg = fillBegin(arg2), fillLen(beg, null), arg1); | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 11 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 2.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | if (arg instanceof RubyRange) |
| 4 | if (arg2 instanceof RubyRange) | |||||||||||||||||
3 | int[] beglen = ((RubyRange)arg).begLenInt(realLength, 1); |
| 5 | int[] beglen = ((RubyRange)arg2).begLenInt(realLength, 1); | |||||||||||||||||
4 | return fillCommon(context, beglen[0], beglen[1], block); |
| 6 | return fillCommon(context, beglen[0], beglen[1], arg1); | |||||||||||||||||
5 | int beg; | 7 | int beg; | ||||||||||||||||||
6 | return fillCommon(context, beg = fillBegin(arg), fillLen(beg, null), block); |
| 8 | return fillCommon(context, beg = fillBegin(arg2), fillLen(beg, null), arg1); |
Row | Violation |
---|---|
1 | Type org.jruby.runtime.Block of variable block does not match with type org.jruby.runtime.builtin.IRubyObject of variable arg1 |
2 | Type org.jruby.runtime.Block of variable block does not match with type org.jruby.runtime.builtin.IRubyObject of variable arg1 |