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, 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 | if (method.isUndefined()) {↵ | 6 | if (method.isUndefined()) {↵ | |
7 | return callMethodMissing(context, self, method.getVisibility(), name, CallType.SUPER, arg0, arg1, arg2, block);↵ | 7 | return callMethodMissing(context, self, method.getVisibility(), name, CallType.SUPER, arg0, block);↵ | |
8 | }↵ | 8 | }↵ | |
9 | return method.call(context, self, superClass, name, arg0, arg1, arg2, block); | 9 | return method.call(context, self, superClass, name, arg0, 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) | 80127.3 |
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, arg1, arg2, block); |
| 7 | return callMethodMissing(context, self, method.getVisibility(), name, CallType.SUPER, arg0, block); | ||||||||||||
8 | return method.call(context, self, superClass, name, arg0, arg1, arg2, block); |
| 8 | return method.call(context, self, superClass, name, arg0, block); |
Row | Violation |
---|---|
1 | Expression callMethodMissing(context,self,method.getVisibility(),name,CallType.SUPER,arg0,arg1,arg2,block) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression callMethodMissing(context,self,method.getVisibility(),name,CallType.SUPER,arg0,block) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression method.call(context,self,superClass,name,arg0,arg1,arg2,block) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression method.call(context,self,superClass,name,arg0,block) cannot be parameterized, because it has dependencies to/from statements that will be extracted |