File path: /jruby-1.4.0/src/org/jruby/RubyRange.java | File path: /jruby-1.4.0/src/org/jruby/RubyRange.java | |||
Method name: IRubyObject eql_p(ThreadContext, IRubyObject)
|
Method name: IRubyObject op_equal(ThreadContext, IRubyObject)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | if (this == other) return getRuntime().getTrue();↵ | 1 | if (this == other) return getRuntime().getTrue();↵ | |
2 | if (!(other instanceof RubyRange)) return getRuntime().getFalse();↵ | 2 | if (!(other instanceof RubyRange)) return getRuntime().getFalse();↵ | |
3 | RubyRange otherRange = (RubyRange)other;↵ | 3 | RubyRange otherRange = (RubyRange) other;↵ | |
4 | if (eqlInternal(context, begin, otherRange.begin) &&↵ | 4 | if (equalInternal(context, begin, otherRange.begin) &&↵ | |
5 | eqlInternal(context, end, otherRange.end) &&↵ | 5 | equalInternal(context, end, otherRange.end) &&↵ | |
6 | isExclusive == otherRange.isExclusive) return getRuntime().getTrue();↵ | 6 | isExclusive == otherRange.isExclusive) return getRuntime().getTrue();↵ | |
7 | return getRuntime().getFalse(); | 7 |
| |
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.8 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 31 |
Number of mapped statements | 8 |
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) | 1.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (this == other) | 1 | if (this == other) | ||||||||||||||||||
2 | return getRuntime().getTrue(); | 2 | return getRuntime().getTrue(); | ||||||||||||||||||
3 | if (!(other instanceof RubyRange)) | 3 | if (!(other instanceof RubyRange)) | ||||||||||||||||||
4 | return getRuntime().getFalse(); | 4 | return getRuntime().getFalse(); | ||||||||||||||||||
5 | RubyRange otherRange = (RubyRange)other; | 5 | RubyRange otherRange = (RubyRange)other; | ||||||||||||||||||
6 | if (eqlInternal(context, begin, otherRange.begin) && eqlInternal(context, end, otherRange.end) && isExclusive == otherRange.isExclusive) |
| 6 | if (equalInternal(context, begin, otherRange.begin) && equalInternal(context, end, otherRange.end) && isExclusive == otherRange.isExclusive) | |||||||||||||||||
7 | return getRuntime().getTrue(); | 7 | return getRuntime().getTrue(); | ||||||||||||||||||
8 | return getRuntime().getFalse(); | 8 | return getRuntime().getFalse(); |
Row | Violation |
---|---|
1 | Expression eqlInternal(context,begin,otherRange.begin) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression equalInternal(context,begin,otherRange.begin) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression eqlInternal(context,end,otherRange.end) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression equalInternal(context,end,otherRange.end) cannot be parameterized, because it has dependencies to/from statements that will be extracted |