File path: /jruby-1.4.0/src/org/jruby/RubyArgsFile.java | File path: /jruby-1.4.0/src/org/jruby/RubyArgsFile.java | |||
Method name: IRubyObject eof_p(ThreadContext, IRubyObject)
|
Method name: IRubyObject eof(ThreadContext, IRubyObject)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | ArgsFileData data = ArgsFileData.getDataFrom(recv);↵ | 1 | ArgsFileData data = ArgsFileData.getDataFrom(recv);↵ | |
2 | if (!data.inited) return context.getRuntime().getTrue();↵ | 2 | if(!data.inited) return context.getRuntime().getTrue();↵ | |
3 | if (!(data.currentFile instanceof RubyIO)) return data.currentFile.callMethod(context, "eof?");↵ | 3 | if(!(data.currentFile instanceof RubyIO)) return data.currentFile.callMethod(context, "eof");↵ | |
4 | return ((RubyIO) data.currentFile).eof_p(context); | 4 |
| |
See real code fragment | See real code fragment |
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 17 |
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 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | ArgsFileData data = ArgsFileData.getDataFrom(recv); | 1 | ArgsFileData data = ArgsFileData.getDataFrom(recv); | |||||||||||
2 | if (!data.inited) | 2 | if (!data.inited) | |||||||||||
3 | return context.getRuntime().getTrue(); | 3 | return context.getRuntime().getTrue(); | |||||||||||
4 | if (!(data.currentFile instanceof RubyIO)) | 4 | if (!(data.currentFile instanceof RubyIO)) | |||||||||||
5 | return data.currentFile.callMethod(context, "eof?"); |
| 5 | return data.currentFile.callMethod(context, "eof"); | ||||||||||
6 | return ((RubyIO)data.currentFile).eof_p(context); | 6 | return ((RubyIO)data.currentFile).eof_p(context); |
Row | Violation |
---|