File path: /jruby-1.4.0/src/org/jruby/RubyGlobal.java | File path: /jruby-1.4.0/src/org/jruby/RubyGlobal.java | |||
Method name: IRubyObject set(IRubyObject)
|
Method name: IRubyObject set(IRubyObject)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (newValue.isNil()) {↵ | 1 | if (newValue.isNil()) {↵ | |
2 | runtime.setVerbose(newValue);↵ | 2 | runtime.setDebug(newValue);↵ | |
3 | } else {↵ | 3 | } else {↵ | |
4 | runtime.setVerbose(runtime.newBoolean(newValue.isTrue()));↵ | 4 | runtime.setDebug(runtime.newBoolean(newValue.isTrue()));↵ | |
5 | }↵ | 5 | }↵ | |
6 | return newValue; | 6 |
| |
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.2 |
Clones location | Clones are in the same java file |
Number of node comparisons | 10 |
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) | 1.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (newValue.isNil()) | 1 | if (newValue.isNil()) | |||||||||||||
2 | runtime.setVerbose(newValue); |
| 2 | runtime.setDebug(newValue); | ||||||||||||
else | else | |||||||||||||||
3 | runtime.setVerbose(runtime.newBoolean(newValue.isTrue())); |
| 3 | runtime.setDebug(runtime.newBoolean(newValue.isTrue())); | ||||||||||||
4 | return newValue; | 4 | return newValue; |
Row | Violation |
---|---|
1 | Expression runtime.setVerbose(newValue) is a void method call, and thus it cannot be parameterized |
2 | Expression runtime.setDebug(newValue) is a void method call, and thus it cannot be parameterized |
3 | Expression runtime.setVerbose(runtime.newBoolean(newValue.isTrue())) is a void method call, and thus it cannot be parameterized |
4 | Expression runtime.setDebug(runtime.newBoolean(newValue.isTrue())) is a void method call, and thus it cannot be parameterized |