File path: /jruby-1.4.0/src/org/jruby/RubyString.java | File path: /jruby-1.4.0/src/org/jruby/RubyString.java | |||
Method name: IRubyObject each_charCommon19(ThreadContext, Block)
|
Method name: IRubyObject each_charCommon18(ThreadContext, Block)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | while (p < end) {↵ | 1 | while (p < end) {↵ | |
2 | int n = StringSupport.length(enc, bytes, p, end);↵ | 2 | int n = StringSupport.length(enc, bytes, p, end);↵ | |
3 | block.yield(context, makeShared19(runtime, val, p-value.begin, n));↵ | 3 | block.yield(context, makeShared19(runtime, val, p-val.begin, n));↵ | |
4 | p += n;↵ | 4 | p += n;↵ | |
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 16 |
Number of mapped statements | 4 |
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) | 2.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7 | while (p < end) | 7 | while (p < end) | |||||||||||
8 | int n = StringSupport.length(enc, bytes, p, end); | 8 | int n = StringSupport.length(enc, bytes, p, end); | |||||||||||
9 | block.yield(context, makeShared19(runtime, val, p - value.begin, n)); |
| 9 | block.yield(context, makeShared19(runtime, val, p - val.begin, n)); | ||||||||||
10 | p += n; | 10 | p += n; |
Row | Violation |
---|