File path: /jruby-1.4.0/src/org/jruby/ext/ffi/jffi/Function.java | File path: /jruby-1.4.0/src/org/jruby/ext/ffi/jffi/JFFIInvoker.java | |||
Method name: RubyClass createFunctionClass(Ruby, RubyModule)
|
Method name: RubyClass createInvokerClass(Ruby, RubyModule)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | RubyClass result = module.defineClassUnder("Function",↵ | 1 | RubyClass result = module.defineClassUnder("Invoker",↵ | |
2 | module.fastGetClass("Pointer"),↵ | 2 | module.fastGetClass("AbstractInvoker"),↵ | |
3 | ObjectAllocator.NOT_ALLOCATABLE_ALLOCATOR);↵ | 3 | ObjectAllocator.NOT_ALLOCATABLE_ALLOCATOR);↵ | |
4 | result.defineAnnotatedMethods(AbstractInvoker.class);↵ | 4 | result.defineAnnotatedMethods(AbstractInvoker.class);↵ | |
5 | result.defineAnnotatedMethods(Function.class);↵ | 5 | result.defineAnnotatedMethods(JFFIInvoker.class);↵ | |
6 | result.defineAnnotatedConstants(Function.class);↵ | 6 | result.defineAnnotatedConstants(JFFIInvoker.class);↵ | |
7 | return result; | 7 |
| |
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.0 |
Clones location | Clones are in different classes having the same super 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.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | RubyClass result = module.defineClassUnder("Function", module.fastGetClass("Pointer"), ObjectAllocator.NOT_ALLOCATABLE_ALLOCATOR); |
| 1 | RubyClass result = module.defineClassUnder("Invoker", module.fastGetClass("AbstractInvoker"), ObjectAllocator.NOT_ALLOCATABLE_ALLOCATOR); | |||||||||||||
2 | result.defineAnnotatedMethods(AbstractInvoker.class); | 2 | result.defineAnnotatedMethods(AbstractInvoker.class); | ||||||||||||||
3 | result.defineAnnotatedMethods(Function.class); | 3 | result.defineAnnotatedMethods(JFFIInvoker.class); | ||||||||||||||
4 | result.defineAnnotatedConstants(Function.class); | 4 | result.defineAnnotatedConstants(JFFIInvoker.class); | ||||||||||||||
5 | return result; | 5 | return result; |
Row | Violation |
---|