File path: /jruby-1.4.0/src/org/jruby/javasupport/util/RuntimeHelpers.java | File path: /jruby-1.4.0/src/org/jruby/javasupport/util/RuntimeHelpers.java | |||
Method name: IRubyObject invokeSuper(ThreadContext, IRubyObject, IRubyObject, Block)
|
Method name: IRubyObject invokeSuper(ThreadContext, IRubyObject, IRubyObject[], Block)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | checkSuperDisabledOrOutOfMethod(context);↵ | 1 | checkSuperDisabledOrOutOfMethod(context);↵ | |
2 | RubyModule klazz = context.getFrameKlazz();↵ | 2 | RubyModule klazz = context.getFrameKlazz();↵ | |
3 | String name = context.getFrameName();↵ | 3 | String name = context.getFrameName();↵ | |
4 | RubyClass superClass = findImplementerIfNecessary(self.getMetaClass(), klazz).getSuperClass();↵ | 4 | RubyClass superClass = findImplementerIfNecessary(self.getMetaClass(), klazz).getSuperClass();↵ | |
5 | DynamicMethod method = superClass != null ? superClass.searchMethod(name) : UndefinedMethod.INSTANCE;↵ | 5 | DynamicMethod method = superClass != null ? superClass.searchMethod(name) : UndefinedMethod.INSTANCE;↵ | |
6 | ↵ | |||
6 | if (method.isUndefined()) {↵ | 7 | if (method.isUndefined()) {↵ | |
7 | return callMethodMissing(context, self, method.getVisibility(), name, CallType.SUPER, arg0, block);↵ | 8 | return callMethodMissing(context, self, method.getVisibility(), name, CallType.SUPER, args, block);↵ | |
8 | }↵ | 9 | }↵ | |
9 | return method.call(context, self, superClass, name, arg0, block); | 10 | return method.call(context, self, superClass, name, args, block); | |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 20 |
Number of mapped statements | 8 |
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) | 4.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | checkSuperDisabledOrOutOfMethod(context); | 1 | checkSuperDisabledOrOutOfMethod(context); | |||||||||||||||
2 | RubyModule klazz = context.getFrameKlazz(); | 2 | RubyModule klazz = context.getFrameKlazz(); | |||||||||||||||
3 | String name = context.getFrameName(); | 3 | String name = context.getFrameName(); | |||||||||||||||
4 | RubyClass superClass = findImplementerIfNecessary(self.getMetaClass(), klazz).getSuperClass(); | 4 | RubyClass superClass = findImplementerIfNecessary(self.getMetaClass(), klazz).getSuperClass(); | |||||||||||||||
5 | DynamicMethod method = superClass != null ? superClass.searchMethod(name) : UndefinedMethod.INSTANCE; | 5 | DynamicMethod method = superClass != null ? superClass.searchMethod(name) : UndefinedMethod.INSTANCE; | |||||||||||||||
6 | if (method.isUndefined()) | 6 | if (method.isUndefined()) | |||||||||||||||
7 | return callMethodMissing(context, self, method.getVisibility(), name, CallType.SUPER, arg0, block); |
| 7 | return callMethodMissing(context, self, method.getVisibility(), name, CallType.SUPER, args, block); | ||||||||||||||
8 | return method.call(context, self, superClass, name, arg0, block); |
| 8 | return method.call(context, self, superClass, name, args, block); |
Row | Violation |
---|---|
1 | Type org.jruby.runtime.builtin.IRubyObject of variable arg0 does not match with type org.jruby.runtime.builtin.IRubyObject[] of variable args |
2 | Type org.jruby.runtime.builtin.IRubyObject of variable arg0 does not match with type org.jruby.runtime.builtin.IRubyObject[] of variable args |