File path: /jruby-1.4.0/src/org/jruby/runtime/callback/ReflectionCallbackFactory.java | File path: /jruby-1.4.0/src/org/jruby/internal/runtime/methods/ReflectionMethodFactory.java | |||
Method name: IRubyObject call(ThreadContext, IRubyObject, IRubyObject)
|
Method name: IRubyObject call(ThreadContext, IRubyObject, IRubyObject[], Block)
|
|||
Number of AST nodes: 2 | Number of AST nodes: 2 | |||
1 | try {↵ | 1 | try {↵ | |
2 | return (IRubyObject)blockMethod.invoke(scriptObject, new Object[]{context, self, args});↵ | 2 | return (IRubyObject)blockMethod.invoke(null, scriptObject, context, self, args, block);↵ | |
3 | } catch (IllegalAccessException ex) {↵ | 3 | } catch (IllegalAccessException ex) {↵ | |
4 | throw new RuntimeException(ex);↵ | 4 | throw new RuntimeException(ex);↵ | |
5 | } catch (IllegalArgumentException ex) {↵ | 5 | } catch (IllegalArgumentException ex) {↵ | |
6 | throw new RuntimeException(ex);↵ | 6 | throw new RuntimeException(ex);↵ | |
7 | } catch (InvocationTargetException ex) {↵ | 7 | } catch (InvocationTargetException ex) {↵ | |
8 | Throwable cause = ex.getCause();↵ | 8 | Throwable cause = ex.getCause();↵ | |
9 | if (cause instanceof RuntimeException) {↵ | 9 | if (cause instanceof RuntimeException) {↵ | |
10 | throw (RuntimeException) cause;↵ | 10 | throw (RuntimeException) cause;↵ | |
11 | } else if (cause instanceof Error) {↵ | 11 | } else if (cause instanceof Error) {↵ | |
12 | throw (Error) cause;↵ | 12 | throw (Error) cause;↵ | |
13 | } else {↵ | 13 | } else {↵ | |
14 | throw new RuntimeException(ex);↵ | 14 | throw new RuntimeException(ex);↵ | |
15 | }↵ | 15 | }↵ | |
16 | } | 16 |
| |
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) | 2.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 4 |
Number of mapped statements | 2 |
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) | 1.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | try |
| 1 | try | ||||||||||||
2 | return (IRubyObject)blockMethod.invoke(scriptObject, new Object[] {context, self, args}); |
| 2 | return (IRubyObject)blockMethod.invoke(null, scriptObject, context, self, args, block); |
Row | Violation |
---|---|
1 | Expression blockMethod.invoke(scriptObject,new Object[]{context,self,args}) is a method call throwing exception(s) that should be caught by a try block that will be extracted |
2 | Expression blockMethod.invoke(null,scriptObject,context,self,args,block) is a method call throwing exception(s) that should be caught by a try block that will be extracted |
3 | Expression blockMethod.invoke(scriptObject,new Object[]{context,self,args}) is a method call throwing exception(s) that should be caught by a try block that will be extracted |
4 | Expression blockMethod.invoke(null,scriptObject,context,self,args,block) is a method call throwing exception(s) that should be caught by a try block that will be extracted |