File path: /jruby-1.4.0/src/org/jruby/RubyString.java | File path: /jruby-1.4.0/src/org/jruby/RubyString.java | |||
Method name: RubyArray splitCommon19(IRubyObject, boolean, int, int, ThreadContext)
|
Method name: RubyArray splitCommon(IRubyObject, boolean, int, int, ThreadContext)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | if (!limit && lim == 0) {↵ | 1 | if (!limit && lim == 0) {↵ | |
2 | while (result.size() > 0 && ((RubyString)result.eltInternal(result.size() - 1)).value.realSize == 0) {↵ | 2 | while (result.size() > 0 && ((RubyString)result.eltInternal(result.size() - 1)).value.realSize == 0) {↵ | |
3 | result.pop(context);↵ | 3 | result.pop(context);↵ | |
4 | }↵ | 4 | }↵ | |
5 | } | 5 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.9 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 5 |
Number of mapped statements | 3 |
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 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
29 | if (!limit && lim == 0) | 10 | if (!limit && lim == 0) | |
30 | while (result.size() > 0 && ((RubyString)result.eltInternal(result.size() - 1)).value.realSize == 0) | 11 | while (result.size() > 0 && ((RubyString)result.eltInternal(result.size() - 1)).value.realSize == 0) | |
31 | result.pop(context); | 12 | result.pop(context); |
Row | Violation |
---|