if (isTrace) {
runtime.callEventHooks(context, RubyEvent.C_CALL, context.getFile(), context.getLine(), name, getImplementationClass());
}
return (IRubyObject)method.invoke(self, (Object[])args);
if (bytesRead == 0 && number != 0) {
if (eof) {
throw new EOFException();
}
}
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/internal/runtime/methods/ReflectedJavaMethod.java
|
|
File path: /jruby-1.4.0/src/org/jruby/util/io/ChannelStream.java
|
Method name: IRubyObject call(ThreadContext, IRubyObject, RubyModule, String, IRubyObject[], Block)
|
|
Method name: int bufferedRead(ByteList, int)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if (isTrace) {↵ | | 1 | if (↵
|
2 | runtime.callEventHooks(context, RubyEvent.C_CALL, context.getFile(), context.getLine(), name, getImplementationClass());↵ | | |
|
3 | } ↵ | | |
|
4 | return (IRubyObject)method.invoke(self, (Object[])args); | | 2 | bytesRead == 0 && number != 0) {↵
|
| | | 3 | if (eof) {↵
|
| | | 4 | throw new EOFException();↵
|
| | | 5 | }↵
|
| | | 6 | }
|
See real code fragment |
|
See real code fragment |
Summary
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 in different classes |
Number of node comparisons | 5 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.5 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
10 | if (isTrace) | | 26 | if (eof) |
11 | runtime.callEventHooks(context, RubyEvent.C_CALL, context.getFile(), context.getLine(), name, getImplementationClass()); | | | |
| | | 27 | throw new EOFException(); |
Precondition Violations (1)
Row |
Violation |
1 | Unmatched throw new EOFException(); |