File path: /jruby-1.4.0/src/org/jruby/runtime/callsite/CachingCallSite.java | File path: /jruby-1.4.0/src/org/jruby/runtime/callsite/CachingCallSite.java | |||
Method name: IRubyObject callBlock(ThreadContext, IRubyObject, IRubyObject, IRubyObject, Block)
|
Method name: IRubyObject call(ThreadContext, IRubyObject, IRubyObject, IRubyObject, IRubyObject)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | RubyClass selfType = pollAndGetClass(context, self);↵ | 1 | RubyClass selfType = pollAndGetClass(context, self);↵ | |
2 | CacheEntry myCache = cache;↵ | 2 | CacheEntry myCache = cache;↵ | |
3 | if (myCache.typeOk(selfType)) {↵ | 3 | if (myCache.typeOk(selfType)) {↵ | |
4 | return myCache.method.call(context, self, selfType, methodName, arg1, block);↵ | 4 | return myCache.method.call(context, self, selfType, methodName, arg1, arg2);↵ | |
5 | }↵ | 5 | }↵ | |
6 | return cacheAndCall(caller, selfType, block, context, self, arg1); | 6 | return cacheAndCall(caller, selfType, context, self, arg1, arg2); | |
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 9 |
Number of mapped statements | 5 |
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) | 3.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | RubyClass selfType = pollAndGetClass(context, self); | 1 | RubyClass selfType = pollAndGetClass(context, self); | |||||||||||||||
2 | CacheEntry myCache = cache; | 2 | CacheEntry myCache = cache; | |||||||||||||||
3 | if (myCache.typeOk(selfType)) | 3 | if (myCache.typeOk(selfType)) | |||||||||||||||
4 | return myCache.method.call(context, self, selfType, methodName, arg1, block); |
| 4 | return myCache.method.call(context, self, selfType, methodName, arg1, arg2); | ||||||||||||||
5 | return cacheAndCall(caller, selfType, block, context, self, arg1); |
| 5 | return cacheAndCall(caller, selfType, context, self, arg1, arg2); |
Row | Violation |
---|---|
1 | Type org.jruby.runtime.Block of variable block does not match with type org.jruby.runtime.builtin.IRubyObject of variable arg2 |
2 | Type org.jruby.runtime.Block of variable block does not match with type org.jruby.runtime.ThreadContext of variable context |