File path: /jruby-1.4.0/src/org/jruby/ext/ffi/jffi/DynamicLibrary.java | File path: /jruby-1.4.0/src/org/jruby/ext/ffi/jffi/DynamicLibrary.java | |||
Method name: IRubyObject findVariable(ThreadContext, IRubyObject)
|
Method name: IRubyObject findFunction(ThreadContext, IRubyObject)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | final String sym = symbolName.toString();↵ | 1 | final String sym = symbolName.toString();↵ | |
2 | final long address = library.getSymbolAddress(sym);↵ | 2 | final long address = library.getSymbolAddress(sym);↵ | |
3 | if (address == 0L) {↵ | 3 | if (address == 0L) {↵ | |
4 | return context.getRuntime().getNil();↵ | 4 | return context.getRuntime().getNil();↵ | |
5 | }↵ | 5 | }↵ | |
6 | return new Symbol(context.getRuntime(), this, sym,↵ | 6 | return new Symbol(context.getRuntime(), this, sym,↵ | |
7 | address != 0↵ | 7 | ↵ | |
8 | ? new DataSymbolMemoryIO(context.getRuntime(), this, address)↵ | 8 | new TextSymbolMemoryIO(context.getRuntime(), this, address)↵ | |
9 | : new NullMemoryIO(context.getRuntime())); | 9 |
| |
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 13 |
Number of mapped statements | 5 |
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) | 0.9 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | final String sym = symbolName.toString(); | 1 | final String sym = symbolName.toString(); | |
2 | final long address = library.getSymbolAddress(sym); | 2 | final long address = library.getSymbolAddress(sym); | |
3 | if (address == 0L) | 3 | if (address == 0L) | |
4 | return context.getRuntime().getNil(); | 4 | return context.getRuntime().getNil(); | |
5 | return new Symbol(context.getRuntime(), this, sym, address != 0 ? new DataSymbolMemoryIO(context.getRuntime(), this, address) : new NullMemoryIO(context.getRuntime())); | 5 | return new Symbol(context.getRuntime(), this, sym, new TextSymbolMemoryIO(context.getRuntime(), this, address)); |
Row | Violation |
---|