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 op_match19(ThreadContext, IRubyObject)
|
Method name: IRubyObject op_match(ThreadContext, IRubyObject)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (other instanceof RubyRegexp) return ((RubyRegexp) other).op_match19(context, this);↵ | 1 | if (other instanceof RubyRegexp) return ((RubyRegexp) other).op_match(context, this);↵ | |
2 | if (other instanceof RubyString) throw context.getRuntime().newTypeError("type mismatch: String given");↵ | 2 | if (other instanceof RubyString) throw context.getRuntime().newTypeError("type mismatch: String given");↵ | |
3 | return other.callMethod(context, "=~", this); | 3 |
| |
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 14 |
Number of mapped statements | 5 |
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.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (other instanceof RubyRegexp) | 1 | if (other instanceof RubyRegexp) | |||||||||||||
2 | return ((RubyRegexp)other).op_match19(context, this); |
| 2 | return ((RubyRegexp)other).op_match(context, this); | ||||||||||||
3 | if (other instanceof RubyString) | 3 | if (other instanceof RubyString) | |||||||||||||
4 | throw context.getRuntime().newTypeError("type mismatch: String given"); | 4 | throw context.getRuntime().newTypeError("type mismatch: String given"); | |||||||||||||
5 | return other.callMethod(context, "=~", this); | 5 | return other.callMethod(context, "=~", this); |
Row | Violation |
---|---|
1 | Expression ((RubyRegexp)other).op_match19(context,this) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression ((RubyRegexp)other).op_match(context,this) cannot be parameterized, because it has dependencies to/from statements that will be extracted |