if (args.length != 0) {
Arity.raiseArgumentError(runtime, args.length, 0, 0);
}
IRubyObject variable;
if ((variable = ((RubyModule) self).fastGetInstanceVariable(ivarName)) != null) {
return variable;
}
return runtime.getNil();
if (args.length != 0) {
Arity.raiseArgumentError(runtime, args.length, 0, 0);
}
IRubyObject variable;
if ((variable = ((RubyModule) self).fastGetInstanceVariable(ivarName)) != null) {
return variable;
}
return runtime.getNil();
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/javasupport/Java.java
|
|
File path: /jruby-1.4.0/src/org/jruby/javasupport/Java.java
|
Method name: IRubyObject call(ThreadContext, IRubyObject, RubyModule, String, IRubyObject[], Block)
|
|
Method name: IRubyObject call(ThreadContext, IRubyObject, RubyModule, String, IRubyObject[], Block)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | if (args.length != 0) {↵ | | 1 | if (args.length != 0) {↵
|
2 | Arity.raiseArgumentError(runtime, args.length, 0, 0);↵ | | 2 | Arity.raiseArgumentError(runtime, args.length, 0, 0);↵
|
3 | }↵ | | 3 | }↵
|
4 | IRubyObject variable;↵ | | 4 | IRubyObject variable;↵
|
5 | if ((variable = ((RubyModule) self).fastGetInstanceVariable(ivarName)) != null) {↵ | | 5 | if ((variable = ((RubyModule) self).fastGetInstanceVariable(ivarName)) != null) {↵
|
6 | return variable;↵ | | 6 | return variable;↵
|
7 | }↵ | | 7 | }↵
|
8 | return runtime.getNil(); | | 8 | return runtime.getNil();
|
See real code fragment |
|
See real code fragment |
Summary
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.9 |
Clones location | Clones are in the same java file |
Number of node comparisons | 17 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 6 |
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.0 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (args.length != 0) | | 1 | if (args.length != 0) |
2 | Arity.raiseArgumentError(runtime, args.length, 0, 0); | | 2 | Arity.raiseArgumentError(runtime, args.length, 0, 0); |
3 | IRubyObject variable; | | 3 | IRubyObject variable; |
4 | if ((variable = ((RubyModule)self).fastGetInstanceVariable(ivarName)) != null) | | 4 | if ((variable = ((RubyModule)self).fastGetInstanceVariable(ivarName)) != null) |
5 | | | 5 | |
6 | return runtime.getNil(); | | 6 | return runtime.getNil(); |
Precondition Violations (0)
Row |
Violation |