File path: /jruby-1.4.0/src/org/jruby/internal/runtime/methods/InvocationMethodFactory.java | File path: /jruby-1.4.0/src/org/jruby/internal/runtime/methods/InvocationMethodFactory.java | |||
Method name: void checkArity(JRubyMethod, SkinnyMethodAdapter, int)
|
Method name: void checkArity(JRubyMethod, SkinnyMethodAdapter, int)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (jrubyMethod.required() > 0) {↵ | |||
2 | // confirm minimum args provided↵ | |||
1 | method.aload(ARGS_INDEX);↵ | 3 | method.aload(ARGS_INDEX);↵ | |
2 | method.arraylength();↵ | 4 | method.arraylength();↵ | |
3 | method.ldc(jrubyMethod.required());↵ | 5 | method.ldc(jrubyMethod.required());↵ | |
4 | method.if_icmpne(arityError);↵ | 6 | method.if_icmplt(arityError);↵ | |
5 | checkArity = true; | 7 | } | |
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.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 20 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
29 | method.aload(ARGS_INDEX); | 20 | method.aload(ARGS_INDEX); | |||||||||||||
30 | method.arraylength(); | 21 | method.arraylength(); | |||||||||||||
31 | method.ldc(jrubyMethod.required()); | 22 | method.ldc(jrubyMethod.required()); | |||||||||||||
32 | method.if_icmpne(arityError); |
| 23 | method.if_icmplt(arityError); | ||||||||||||
33 | checkArity = true; | |
Row | Violation |
---|---|
1 | Expression method.if_icmpne(arityError) is a void method call, and thus it cannot be parameterized |
2 | Expression method.if_icmplt(arityError) is a void method call, and thus it cannot be parameterized |