File path: /jruby-1.4.0/src/org/jruby/runtime/callsite/SuperCallSite.java | File path: /jruby-1.4.0/src/org/jruby/runtime/callsite/SuperCallSite.java | |||
Method name: IRubyObject call(ThreadContext, IRubyObject, IRubyObject)
|
Method name: IRubyObject callBlock(ThreadContext, IRubyObject, IRubyObject, IRubyObject, Block)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | RubyModule klazz = context.getFrameKlazz();↵ | 1 | RubyModule klazz = context.getFrameKlazz();↵ | |
2 | String name = context.getFrameName();↵ | 2 | String name = context.getFrameName();↵ | |
3 | RubyClass selfType = pollAndGetClass(context, self, klazz, name);↵ | 3 | RubyClass selfType = pollAndGetClass(context, self, klazz, name);↵ | |
4 | CacheEntry myCache = cache;↵ | 4 | CacheEntry myCache = cache;↵ | |
5 | if (name == lastName && selfType != null && myCache.typeOk(selfType)) {↵ | 5 | if (name == lastName && selfType != null && myCache.typeOk(selfType)) {↵ | |
6 | return myCache.method.call(context, self, selfType, name);↵ | 6 | return myCache.method.call(context, self, selfType, name, arg1, block);↵ | |
7 | }↵ | 7 | }↵ | |
8 | return cacheAndCall(caller, selfType, context, self, name); | 8 | return cacheAndCall(caller, selfType, block, context, self, name, arg1); | |
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.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 15 |
Number of mapped statements | 7 |
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) | 167593.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | RubyModule klazz = context.getFrameKlazz(); | 1 | RubyModule klazz = context.getFrameKlazz(); | |||||||||||||
2 | String name = context.getFrameName(); | 2 | String name = context.getFrameName(); | |||||||||||||
3 | RubyClass selfType = pollAndGetClass(context, self, klazz, name); | 3 | RubyClass selfType = pollAndGetClass(context, self, klazz, name); | |||||||||||||
4 | CacheEntry myCache = cache; | 4 | CacheEntry myCache = cache; | |||||||||||||
5 | if (name == lastName && selfType != null && myCache.typeOk(selfType)) | 5 | if (name == lastName && selfType != null && myCache.typeOk(selfType)) | |||||||||||||
6 | return myCache.method.call(context, self, selfType, name); |
| 6 | return myCache.method.call(context, self, selfType, name, arg1, block); | ||||||||||||
7 | return cacheAndCall(caller, selfType, context, self, name); |
| 7 | return cacheAndCall(caller, selfType, block, context, self, name, arg1); |
Row | Violation |
---|---|
1 | Expression myCache.method.call(context,self,selfType,name) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression myCache.method.call(context,self,selfType,name,arg1,block) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression cacheAndCall(caller,selfType,context,self,name) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression cacheAndCall(caller,selfType,block,context,self,name,arg1) cannot be parameterized, because it has dependencies to/from statements that will be extracted |