File path: /jruby-1.4.0/src/org/jruby/RubyComplex.java | File path: /jruby-1.4.0/src/org/jruby/RubyComplex.java | |||
Method name: IRubyObject convertCommon(ThreadContext, IRubyObject, IRubyObject, IRubyObject)
|
Method name: IRubyObject convertCommon(ThreadContext, IRubyObject, IRubyObject, IRubyObject)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (a1 instanceof RubyComplex) {↵ | 1 | if (a2 instanceof RubyComplex) {↵ | |
2 | RubyComplex a1Complex = (RubyComplex)a1;↵ | 2 | RubyComplex a2Complex = (RubyComplex)a2;↵ | |
3 | if (k_exact_p(a1Complex.image) && f_zero_p(context, a1Complex.image)) {↵ | 3 | if (k_exact_p(a2Complex.image) && f_zero_p(context, a2Complex.image)) {↵ | |
4 | a1 = a1Complex.real;↵ | 4 | a2 = a2Complex.real;↵ | |
5 | }↵ | 5 | }↵ | |
6 | } | 6 |
| |
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 8 |
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) | 5.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10 | if (a1 instanceof RubyComplex) |
| 14 | if (a2 instanceof RubyComplex) | |||||||||||||
11 | RubyComplex a1Complex = (RubyComplex)a1; |
| 15 | RubyComplex a2Complex = (RubyComplex)a2; | |||||||||||||
12 | if (k_exact_p(a1Complex.image) && f_zero_p(context, a1Complex.image)) |
| 16 | if (k_exact_p(a2Complex.image) && f_zero_p(context, a2Complex.image)) | |||||||||||||
13 | a1 = a1Complex.real; |
| 17 | a2 = a2Complex.real; |
Row | Violation |
---|