File path: /jruby-1.4.0/src/org/jruby/ext/ffi/jffi/CallbackManager.java | File path: /jruby-1.4.0/src/org/jruby/ext/ffi/jffi/FastIntMethodFactory.java | |||
Method name: boolean isReturnTypeValid(Type)
|
Method name: boolean isFastIntResult(Type)
|
|||
Number of AST nodes: 17 | Number of AST nodes: 17 | |||
1 | if (type instanceof Type.Builtin) {↵ | |||
1 | switch (type.getNativeType()) {↵ | 2 | switch (type.getNativeType()) {↵ | |
3 | case VOID:↵ | |||
2 | case CHAR:↵ | 4 | case CHAR:↵ | |
3 | case UCHAR:↵ | 5 | case UCHAR:↵ | |
4 | case SHORT:↵ | 6 | case SHORT:↵ | |
5 | case USHORT:↵ | 7 | case USHORT:↵ | |
6 | case INT:↵ | 8 | case INT:↵ | |
7 | case UINT:↵ | 9 | case UINT:↵ | |
8 | case LONG:↵ | 10 | case ↵ | |
9 | case ULONG:↵ | 11 | BOOL:↵ | |
10 | case LONG_LONG:↵ | 12 | return true;↵ | |
11 | case ULONG_LONG:↵ | 13 | case POINTER:↵ | |
12 | case FLOAT:↵ | 14 | case STRING:↵ | |
13 | case DOUBLE:↵ | 15 | ↵ | |
14 | case POINTER:↵ | 16 | return Platform.getPlatform().addressSize() == 32;↵ | |
15 | case VOID:↵ | 17 | case LONG:↵ | |
16 | case BOOL:↵ | 18 | case ULONG:↵ | |
17 | return true;↵ | 19 | return Platform.getPlatform().longSize() == 32;↵ | |
18 | } | 20 | }↵ | |
21 |
| |||
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 120 |
Number of mapped statements | 14 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 3.8 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | switch (type.getNativeType()) | 2 | switch (type.getNativeType()) | |||||||||||
3 | case CHAR: | 4 | case CHAR: | |||||||||||
4 | case UCHAR: | 5 | case UCHAR: | |||||||||||
5 | case SHORT: | 6 | case SHORT: | |||||||||||
6 | case USHORT: | 7 | case USHORT: | |||||||||||
7 | case INT: | 8 | case INT: | |||||||||||
8 | case UINT: | 9 | case UINT: | |||||||||||
|
| 14 | return Platform.getPlatform().addressSize() == 32; | |||||||||||
9 | case LONG: | 15 | case LONG: | |||||||||||
10 | case ULONG: | 16 | case ULONG: | |||||||||||
11 | case LONG_LONG: |
| 10 | case BOOL: | ||||||||||
12 | case ULONG_LONG: |
| 12 | case POINTER: | ||||||||||
13 | case FLOAT: |
| 13 | case STRING: | ||||||||||
14 | case DOUBLE: |
| 3 | case VOID: | ||||||||||
15 | case POINTER: | | ||||||||||||
16 | case VOID: | | ||||||||||||
17 | case BOOL: | | ||||||||||||
18 | return true; | 11 | return true; | |||||||||||
|
| 17 | return Platform.getPlatform().longSize() == 32; |
Row | Violation |
---|---|
1 | Unmatched return Platform.getPlatform().addressSize() == 32; |
2 | Unmatched return Platform.getPlatform().longSize() == 32; |