File path: /jruby-1.4.0/src/org/jruby/runtime/scope/FourVarDynamicScope.java | File path: /jruby-1.4.0/src/org/jruby/runtime/scope/ThreeVarDynamicScope.java | |||
Method name: IRubyObject setValue(int, IRubyObject, int)
|
Method name: IRubyObject setValue(int, IRubyObject, int)
|
|||
Number of AST nodes: 12 | Number of AST nodes: 10 | |||
1 | assert offset < SIZE : SIZE_ERROR;↵ | 1 | assert offset < SIZE : SIZE_ERROR;↵ | |
2 | switch (offset) {↵ | 2 | switch (offset) {↵ | |
3 | case 0:↵ | 3 | case 0:↵ | |
4 | return variableValueZero = value;↵ | 4 | return variableValueZero = value;↵ | |
5 | case 1:↵ | 5 | case 1:↵ | |
6 | return variableValueOne = value;↵ | 6 | return variableValueOne = value;↵ | |
7 | case 2:↵ | 7 | case 2:↵ | |
8 | return variableValueTwo = value;↵ | 8 | return variableValueTwo = value;↵ | |
9 | case 3:↵ | |||
10 | return variableValueThree = value;↵ | |||
11 | default:↵ | 9 | default:↵ | |
12 | throw new RuntimeException(SIZE_ERROR);↵ | 10 | throw new RuntimeException(SIZE_ERROR);↵ | |
13 | } | 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 | 2 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.2 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
4 | assert offset < SIZE : SIZE_ERROR; | 4 | assert offset < SIZE : SIZE_ERROR; | ||||
5 | switch (offset) | 5 | switch (offset) | ||||
6 | case 0: | 6 | case 0: | ||||
7 | return variableValueZero = value; | 7 | return variableValueZero = value; | ||||
8 | case 1: | 8 | case 1: | ||||
9 | return variableValueOne = value; | 9 | return variableValueOne = value; | ||||
10 | case 2: | 10 | case 2: | ||||
11 | return variableValueTwo = value; | 11 | return variableValueTwo = value; | ||||
12 | case 3: | | |||||
13 | return variableValueThree = value; |
| | ||||
14 | default: | 12 | default: | ||||
15 | throw new RuntimeException(SIZE_ERROR); | 13 | throw new RuntimeException(SIZE_ERROR); |
Row | Violation |
---|---|
1 | Unmatched return variableValueThree=value; |