File path: /jruby-1.4.0/src/org/jruby/runtime/assigner/Pre2Rest0Post0Assigner.java | File path: /jruby-1.4.0/src/org/jruby/runtime/assigner/Pre1ExpandedRest0Post0Assigner.java | |||
Method name: void assign(Ruby, ThreadContext, IRubyObject, IRubyObject[], Block)
|
Method name: void assign(Ruby, ThreadContext, IRubyObject, IRubyObject[], Block)
|
|||
Number of AST nodes: 11 | Number of AST nodes: 10 | |||
1 | int length = values == null ? 0 : values.length;↵ | 1 | int length = values == null ? 0 : values.length;↵ | |
2 | switch (length) {↵ | 2 | switch (length) {↵ | |
3 | case 0:↵ | 3 | case 0:↵ | |
4 | assign(runtime, context, self, block);↵ | 4 | assign(runtime, context, self, block);↵ | |
5 | break;↵ | 5 | break;↵ | |
6 | case 1:↵ | 6 | case 1:↵ | |
7 | assign(runtime, context, self, values[0], block);↵ | 7 | assign(runtime, context, self, values[0], block);↵ | |
8 | break;↵ | 8 | break;↵ | |
9 | default:↵ | 9 | default:↵ | |
10 | assign(runtime, context, self, values[0], values[1], block);↵ | 10 | assign(runtime, context, self, runtime.newArray(values), block);↵ | |
11 | break;↵ | |||
12 | } | 11 |
| |
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 in different classes having the same super class |
Number of node comparisons | 47 |
Number of mapped statements | 10 |
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) | 2.3 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | int length = values == null ? 0 : values.length; | 1 | int length = values == null ? 0 : values.length; | |||||||||||||
2 | switch (length) | 2 | switch (length) | |||||||||||||
3 | case 0: | 3 | case 0: | |||||||||||||
4 | assign(runtime, context, self, block); | 4 | assign(runtime, context, self, block); | |||||||||||||
5 | break; | 5 | break; | |||||||||||||
6 | case 1: | 6 | case 1: | |||||||||||||
7 | assign(runtime, context, self, values[0], block); | 7 | assign(runtime, context, self, values[0], block); | |||||||||||||
8 | break; | 8 | break; | |||||||||||||
9 | default: | 9 | default: | |||||||||||||
10 | assign(runtime, context, self, values[0], values[1], block); |
| 10 | assign(runtime, context, self, runtime.newArray(values), block); | ||||||||||||
11 | break; |
| |
Row | Violation |
---|---|
1 | Expression assign(runtime,context,self,values[0],values[1],block) is a void method call, and thus it cannot be parameterized |
2 | Expression assign(runtime,context,self,runtime.newArray(values),block) is a void method call, and thus it cannot be parameterized |
3 | Unmatched break; |