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[] getArgValues()
|
Method name: IRubyObject[] getArgValues()
|
|||
Number of AST nodes: 13 | Number of AST nodes: 11 | |||
1 | switch (totalArgs) {↵ | 1 | switch (totalArgs) {↵ | |
2 | case 0:↵ | 2 | case 0:↵ | |
3 | return IRubyObject.NULL_ARRAY;↵ | 3 | return IRubyObject.NULL_ARRAY;↵ | |
4 | case 1:↵ | 4 | case 1:↵ | |
5 | return new IRubyObject[] {variableValueZero};↵ | 5 | return new IRubyObject[] {variableValueZero};↵ | |
6 | case 2:↵ | 6 | case 2:↵ | |
7 | return new IRubyObject[] {variableValueZero, variableValueOne};↵ | 7 | return new IRubyObject[] {variableValueZero, variableValueOne};↵ | |
8 | case 3:↵ | 8 | case 3:↵ | |
9 | return new IRubyObject[] {variableValueZero, variableValueOne, variableValueTwo};↵ | 9 | return new IRubyObject[] {variableValueZero, variableValueOne, variableValueTwo};↵ | |
10 | case 4:↵ | |||
11 | return new IRubyObject[] {variableValueZero, variableValueOne, variableValueTwo, variableValueThree};↵ | |||
12 | default:↵ | 10 | default:↵ | |
13 | throw new RuntimeException("more args requested than available variables");↵ | 11 | throw new RuntimeException("more args requested than available variables");↵ | |
14 | } | 12 |
| |
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 in different classes having the same super class |
Number of node comparisons | 66 |
Number of mapped statements | 11 |
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.6 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
6 | switch (totalArgs) | 6 | switch (totalArgs) | ||||
7 | case 0: | 7 | case 0: | ||||
8 | return IRubyObject.NULL_ARRAY; | 8 | return IRubyObject.NULL_ARRAY; | ||||
9 | case 1: | 9 | case 1: | ||||
10 | return new IRubyObject[] {variableValueZero}; | 10 | return new IRubyObject[] {variableValueZero}; | ||||
11 | case 2: | 11 | case 2: | ||||
12 | return new IRubyObject[] {variableValueZero, variableValueOne}; | 12 | return new IRubyObject[] {variableValueZero, variableValueOne}; | ||||
13 | case 3: | 13 | case 3: | ||||
14 | return new IRubyObject[] {variableValueZero, variableValueOne, variableValueTwo}; | 14 | return new IRubyObject[] {variableValueZero, variableValueOne, variableValueTwo}; | ||||
15 | case 4: | | |||||
16 | return new IRubyObject[] {variableValueZero, variableValueOne, variableValueTwo, variableValueThree}; |
| | ||||
17 | default: | 15 | default: | ||||
18 | throw new RuntimeException("more args requested than available variables"); | 16 | throw new RuntimeException("more args requested than available variables"); |
Row | Violation |
---|---|
1 | Unmatched return new IRubyObject[]{variableValueZero,variableValueOne,variableValueTwo,variableValueThree}; |