File path: /jruby-1.4.0/src/org/jruby/RubyEnumerable.java | File path: /jruby-1.4.0/src/org/jruby/RubyEnumerable.java | |||
Method name: IRubyObject to_a19(ThreadContext, IRubyObject)
|
Method name: IRubyObject to_a19(ThreadContext, IRubyObject, IRubyObject[])
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | Ruby runtime = context.getRuntime();↵ | 1 | Ruby runtime = context.getRuntime();↵ | |
2 | RubyArray result = runtime.newArray();↵ | 2 | RubyArray result = runtime.newArray();↵ | |
3 | callEach(runtime, context, self↵ | 3 | RuntimeHelpers.invoke(context, self, "each", args, CallBlock.newCallClosure(self, runtime.getEnumerable(), ↵ | |
4 | , new AppendBlockCallback(runtime, result));↵ | 4 | Arity.OPTIONAL, new AppendBlockCallback(runtime, result), context));↵ | |
5 | return result; | 5 |
| |
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.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 16 |
Number of mapped statements | 4 |
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) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Ruby runtime = context.getRuntime(); | 1 | Ruby runtime = context.getRuntime(); | |||||||||||||||||||||
2 | RubyArray result = runtime.newArray(); | 2 | RubyArray result = runtime.newArray(); | |||||||||||||||||||||
3 | callEach(runtime, context, self, new AppendBlockCallback(runtime, result)); |
| 3 | RuntimeHelpers.invoke(context, self, "each", args, CallBlock.newCallClosure(self, runtime.getEnumerable(), Arity.OPTIONAL, new AppendBlockCallback(runtime, result), context)); | ||||||||||||||||||||
4 | return result; | 4 | return result; |
Row | Violation |
---|---|
1 | Expression callEach(runtime,context,self,new AppendBlockCallback(runtime,result)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression RuntimeHelpers.invoke(context,self,"each",args,CallBlock.newCallClosure(self,runtime.getEnumerable(),Arity.OPTIONAL,new AppendBlockCallback(runtime,result),context)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression callEach(runtime,context,self,new AppendBlockCallback(runtime,result)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression RuntimeHelpers.invoke(context,self,"each",args,CallBlock.newCallClosure(self,runtime.getEnumerable(),Arity.OPTIONAL,new AppendBlockCallback(runtime,result),context)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |