File path: /jruby-1.4.0/src/org/jruby/RubyComplex.java | File path: /jruby-1.4.0/src/org/jruby/RubyComplex.java | |||
Method name: RubyArray str_to_c_internal(ThreadContext, IRubyObject)
|
Method name: RubyArray str_to_c_internal(ThreadContext, IRubyObject)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (!sr.isNil()) {↵ | 1 | if (!si.isNil()) {↵ | |
2 | if (sr.callMethod(context, "include?", runtime.newString(new ByteList(new byte[]{'/'}))).isTrue()) {↵ | 2 | if (si.callMethod(context, "include?", runtime.newString(new ByteList(new byte[]{'/'}))).isTrue()) {↵ | |
3 | r = f_to_r(context, sr);↵ | 3 | i = f_to_r(context, si);↵ | |
4 | } else if (f_gt_p(context, sr.callMethod(context, "count", runtime.newString(".eE")), RubyFixnum.zero(runtime)).isTrue()) {↵ | 4 | } else if (f_gt_p(context, si.callMethod(context, "count", runtime.newString(".eE")), RubyFixnum.zero(runtime)).isTrue()) {↵ | |
5 | r = f_to_f(context, sr); ↵ | 5 | i = f_to_f(context, si);↵ | |
6 | } else {↵ | 6 | } else {↵ | |
7 | r = f_to_i(context, sr);↵ | 7 | i = f_to_i(context, si);↵ | |
8 | }↵ | 8 | }↵ | |
9 | } | 9 |
| |
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) | 1.6 |
Clones location | Clones are in the same method |
Number of node comparisons | 21 |
Number of mapped statements | 6 |
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) | 12.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
44 | if (!sr.isNil()) |
| 50 | if (!si.isNil()) | |||||||||||||
45 | if (sr.callMethod(context, "include?", runtime.newString(new ByteList(new byte[] {'/'}))).isTrue()) |
| 51 | if (si.callMethod(context, "include?", runtime.newString(new ByteList(new byte[] {'/'}))).isTrue()) | |||||||||||||
46 | r = f_to_r(context, sr); |
| 52 | i = f_to_r(context, si); | |||||||||||||
47 | else if (f_gt_p(context, sr.callMethod(context, "count", runtime.newString(".eE")), RubyFixnum.zero(runtime)).isTrue()) |
| 53 | else if (f_gt_p(context, si.callMethod(context, "count", runtime.newString(".eE")), RubyFixnum.zero(runtime)).isTrue()) | |||||||||||||
48 | r = f_to_f(context, sr); |
| 54 | i = f_to_f(context, si); | |||||||||||||
else | else | ||||||||||||||||
49 | r = f_to_i(context, sr); |
| 55 | i = f_to_i(context, si); |
Row | Violation |
---|