File path: /jruby-1.4.0/src/org/jruby/runtime/CompiledBlock19.java | File path: /jruby-1.4.0/src/org/jruby/runtime/CompiledBlock19.java | |||
Method name: IRubyObject yieldSpecific(ThreadContext, IRubyObject, Binding, Block.Type)
|
Method name: IRubyObject[] setupBlockArgs(IRubyObject)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | IRubyObject[] args;↵ | 1 | IRubyObject[] parameters;↵ | |
2 | if (arg0 instanceof RubyArray) {↵ | 2 | if (value instanceof RubyArray) {// && args.getMaxArgumentsCount() != 1) {↵ | |
3 | args = ((RubyArray)arg0).toJavaArray();↵ | 3 | parameters = ((RubyArray) value).toJavaArray();↵ | |
4 | } else {↵ | 4 | } else {↵ | |
5 | args = new IRubyObject[] {arg0};↵ | 5 | parameters = new IRubyObject[] { value };↵ | |
6 | }↵ | 6 | }↵ | |
7 | return yieldSpecificInternal(context, args, binding, type); | 7 | return parameters; | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
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 | 13 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | IRubyObject[] args; |
| 1 | IRubyObject[] parameters; | |||||||||||||
2 | if (arg0 instanceof RubyArray) |
| 2 | if (value instanceof RubyArray) | |||||||||||||
3 | args = ((RubyArray)arg0).toJavaArray(); |
| 3 | parameters = ((RubyArray)value).toJavaArray(); | |||||||||||||
else | else | ||||||||||||||||
4 | args = new IRubyObject[] {arg0}; |
| 4 | parameters = new IRubyObject[] {value}; | |||||||||||||
| 5 | return parameters; | |||||||||||||||
5 | return yieldSpecificInternal(context, args, binding, type); | |
Row | Violation |
---|