File path: /jruby-1.4.0/src/org/jruby/RubyEnumerable.java | File path: /jruby-1.4.0/src/org/jruby/RubyArray.java | |||
Method name: IRubyObject cycleCommon(ThreadContext, IRubyObject, long, Block)
|
Method name: IRubyObject combination(ThreadContext, IRubyObject, Block)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 2 | |||
1 | while (nv < 0 || 0 < --nv) {↵ | |||
2 | for (int i=0; i < len; i++) {↵ | 1 | for (int i = 0; i < realLength; i++) {↵ | |
3 | block.yield(context, result.eltInternal(i));↵ | 2 | block.yield(context, values[begin + i]);↵ | |
4 | }↵ | 3 |
| |
5 | } | |||
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 |
Number of node comparisons | 6 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8 | for (int i = 0; i < len; i++) |
| 8 | for (int i = 0; i < realLength; i++) | ||||||||||||
9 | block.yield(context, result.eltInternal(i)); |
| 9 | block.yield(context, values[begin + i]); |
Row | Violation |
---|---|
1 | Expression result.eltInternal(i) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression values[begin + i] cannot be parameterized, because it has dependencies to/from statements that will be extracted |