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 cacheAndCall(IRubyObject, RubyClass, IRubyObject[], ThreadContext, IRubyObject)
|
Method name: IRubyObject cacheAndCall(IRubyObject, RubyClass, Block, ThreadContext, IRubyObject)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | CacheEntry entry = selfType.searchWithCache(methodName);↵ | 1 | CacheEntry entry = selfType.searchWithCache(methodName);↵ | |
2 | DynamicMethod method = entry.method;↵ | 2 | DynamicMethod method = entry.method;↵ | |
3 | if (methodMissing(method, caller)) {↵ | 3 | if (methodMissing(method, caller)) {↵ | |
4 | return callMethodMissing(context, self, method, args);↵ | 4 | return callMethodMissing(context, self, method, block);↵ | |
5 | }↵ | 5 | }↵ | |
6 | cache = entry;↵ | 6 | cache = entry;↵ | |
7 | return method.call(context, self, selfType, methodName, args); | 7 | return method.call(context, self, selfType, methodName, 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 | 12 |
Number of mapped statements | 6 |
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) | 5.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | CacheEntry entry = selfType.searchWithCache(methodName); | 1 | CacheEntry entry = selfType.searchWithCache(methodName); | |||||||||||||||
2 | DynamicMethod method = entry.method; | 2 | DynamicMethod method = entry.method; | |||||||||||||||
3 | if (methodMissing(method, caller)) | 3 | if (methodMissing(method, caller)) | |||||||||||||||
4 | return callMethodMissing(context, self, method, args); |
| 4 | return callMethodMissing(context, self, method, block); | ||||||||||||||
5 | cache = entry; | 5 | cache = entry; | |||||||||||||||
6 | return method.call(context, self, selfType, methodName, args); |
| 6 | return method.call(context, self, selfType, methodName, block); |
Row | Violation |
---|---|
1 | Type org.jruby.runtime.builtin.IRubyObject[] of variable args does not match with type org.jruby.runtime.Block of variable block |
2 | Type org.jruby.runtime.builtin.IRubyObject[] of variable args does not match with type org.jruby.runtime.Block of variable block |