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