File path: /jruby-1.4.0/src/org/jruby/RubyRegexp.java | File path: /jruby-1.4.0/src/org/jruby/RubyRegexp.java | |||
Method name: IRubyObject initialize_m19(IRubyObject, IRubyObject)
|
Method name: IRubyObject initialize_m(IRubyObject, IRubyObject)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (arg0 instanceof RubyRegexp) {↵ | 1 | if (arg0 instanceof RubyRegexp) {↵ | |
2 | getRuntime().getWarnings().warn(ID.REGEXP_IGNORED_FLAGS, "flags ignored"); ↵ | 2 | getRuntime().getWarnings().warn(ID.REGEXP_IGNORED_FLAGS, "flags ignored"); ↵ | |
3 | return initializeByRegexp19((RubyRegexp)arg0);↵ | 3 | return initializeByRegexp((RubyRegexp)arg0);↵ | |
4 | }↵ | 4 | }↵ | |
5 | ↵ | 5 | ↵ | |
6 | int options = arg1 instanceof RubyFixnum ? RubyNumeric.fix2int(arg1) : arg1.isTrue() ? RE_OPTION_IGNORECASE : 0;↵ | 6 | int options = arg1 instanceof RubyFixnum ? RubyNumeric.fix2int(arg1) : arg1.isTrue() ? RE_OPTION_IGNORECASE : 0;↵ | |
7 | return initializeCommon19(arg0.convertToString(), options); | 7 | return initializeCommon(arg0.convertToString().getByteList(), options); | |
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 13 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (arg0 instanceof RubyRegexp) | 1 | if (arg0 instanceof RubyRegexp) | |||||||||||||
2 | getRuntime().getWarnings().warn(ID.REGEXP_IGNORED_FLAGS, "flags ignored"); | 2 | getRuntime().getWarnings().warn(ID.REGEXP_IGNORED_FLAGS, "flags ignored"); | |||||||||||||
3 | return initializeByRegexp19((RubyRegexp)arg0); |
| 3 | return initializeByRegexp((RubyRegexp)arg0); | ||||||||||||
4 | int options = arg1 instanceof RubyFixnum ? RubyNumeric.fix2int(arg1) : arg1.isTrue() ? RE_OPTION_IGNORECASE : 0; | 4 | int options = arg1 instanceof RubyFixnum ? RubyNumeric.fix2int(arg1) : arg1.isTrue() ? RE_OPTION_IGNORECASE : 0; | |||||||||||||
| 5 | return initializeCommon(arg0.convertToString().getByteList(), options); | ||||||||||||||
5 | return initializeCommon19(arg0.convertToString(), options); | |
Row | Violation |
---|---|
1 | Expression initializeByRegexp19((RubyRegexp)arg0) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression initializeByRegexp((RubyRegexp)arg0) cannot be parameterized, because it has dependencies to/from statements that will be extracted |