File path: /jruby-1.4.0/src/org/jruby/ext/ffi/MemoryPointer.java | File path: /jruby-1.4.0/src/org/jruby/ext/ffi/Enum.java | |||
Method name: RubyClass createMemoryPointerClass(Ruby, RubyModule)
|
Method name: RubyClass createEnumClass(Ruby, RubyModule)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | RubyClass result = module.defineClassUnder("MemoryPointer",↵ | 1 | RubyClass enumClass = ffiModule.defineClassUnder("↵ | |
2 | module.fastGetClass("Pointer"),↵ | 2 | Enum", ffiModule.fastGetClass("Type"),↵ | |
3 | ObjectAllocator.NOT_ALLOCATABLE_ALLOCATOR);↵ | 3 | Allocator.INSTANCE);↵ | |
4 | result.defineAnnotatedMethods(MemoryPointer.class);↵ | 4 | enumClass.defineAnnotatedMethods(Enum.class);↵ | |
5 | result.defineAnnotatedConstants(MemoryPointer.class);↵ | 5 | enumClass.defineAnnotatedConstants(↵ | |
6 | Enum.class);↵ | |||
7 | ↵ | |||
6 | return result; | 8 | return enumClass; | |
See real code fragment | See real code fragment |
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.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 8 |
Number of mapped statements | 4 |
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("MemoryPointer", module.fastGetClass("Pointer"), ObjectAllocator.NOT_ALLOCATABLE_ALLOCATOR); |
| 1 | RubyClass enumClass = ffiModule.defineClassUnder("Enum", ffiModule.fastGetClass("Type"), Allocator.INSTANCE); | |||||||||||||||||||||||||||||
2 | result.defineAnnotatedMethods(MemoryPointer.class); |
| 2 | enumClass.defineAnnotatedMethods(Enum.class); | |||||||||||||||||||||||||||||
3 | result.defineAnnotatedConstants(MemoryPointer.class); |
| 3 | enumClass.defineAnnotatedConstants(Enum.class); | |||||||||||||||||||||||||||||
4 | return result; |
| 4 | return enumClass; |
Row | Violation |
---|---|
1 | Type org.jruby.runtime.ObjectAllocator of variable ObjectAllocator does not match with type org.jruby.ext.ffi.Enum.Allocator of variable Allocator |