File path: /jruby-1.4.0/src/org/jruby/java/dispatch/CallableSelector.java | File path: /jruby-1.4.0/src/org/jruby/java/dispatch/CallableSelector.java | |||
Method name: ParameterTypes matchingCallableArityN(IRubyObject, Map, ParameterTypes[], IRubyObject[], int)
|
Method name: JavaCallable matchingCallableArityN(IRubyObject, Map, JavaCallable[], IRubyObject[], int)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | int signatureCode = argsHashCode(args);↵ | 1 | int signatureCode = argsHashCode(args);↵ | |
2 | ParameterTypes method = (ParameterTypes)cache.get(signatureCode);↵ | 2 | JavaCallable method = (JavaCallable)cache.get(signatureCode);↵ | |
3 | if (method == null) {↵ | 3 | if (method == null) {↵ | |
4 | method = findMatchingCallableForArgs(recv, cache, signatureCode, methods, args);↵ | 4 | method = (JavaCallable)findMatchingCallableForArgs(recv, cache, signatureCode, methods, args);↵ | |
5 | }↵ | 5 | }↵ | |
6 | return method; | 6 |
| |
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 | 13 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 0.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | int signatureCode = argsHashCode(args); | 1 | int signatureCode = argsHashCode(args); | ||||||||||||
|
| 2 | JavaCallable method = (JavaCallable)cache.get(signatureCode); | ||||||||||||
2 | ParameterTypes method = (ParameterTypes)cache.get(signatureCode); |
| | ||||||||||||
3 | if (method == null) |
| 3 | if (method == null) | |||||||||||
|
| 4 | method = (JavaCallable)findMatchingCallableForArgs(recv, cache, signatureCode, methods, args); | ||||||||||||
4 | method = findMatchingCallableForArgs(recv, cache, signatureCode, methods, args); |
| | ||||||||||||
|
| 5 | return method; | ||||||||||||
5 | return method; |
| |
Row | Violation |
---|---|
1 | Unmatched statement JavaCallable method=(JavaCallable)cache.get(signatureCode); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement ParameterTypes method=(ParameterTypes)cache.get(signatureCode); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Type org.jruby.javasupport.ParameterTypes of variable method does not match with type org.jruby.javasupport.JavaCallable of variable method |
4 | Unmatched statement method=(JavaCallable)findMatchingCallableForArgs(recv,cache,signatureCode,methods,args); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement method=findMatchingCallableForArgs(recv,cache,signatureCode,methods,args); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched return method; |
7 | Unmatched return method; |