switch (type.getNativeType()) { case CHAR: case UCHAR: case SHORT: case USHORT: case INT: case UINT: case LONG: case ULONG: case LONG_LONG: case ULONG_LONG: case FLOAT: case DOUBLE: case POINTER: case VOID: case BOOL: return true; }
switch (type.getNativeType()) { case CHAR: case UCHAR: case SHORT: case USHORT: case INT: case UINT: case LONG: case ULONG: case LONG_LONG: case ULONG_LONG: case FLOAT: case DOUBLE: case POINTER: case STRING: case BOOL: return true; }
Clone fragments detected by clone detection tool
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/CallbackManager.java
Method name: boolean isReturnTypeValid(Type) Method name: boolean isParameterTypeValid(Type)
Number of AST nodes: 17 Number of AST nodes: 17
1
switch (type.getNativeType()) {
1
switch (type.getNativeType()) {
2
                case CHAR:
2
                case CHAR:
3
                case UCHAR:
3
                case UCHAR:
4
                case SHORT:
4
                case SHORT:
5
                case USHORT:
5
                case USHORT:
6
                case INT:
6
                case INT:
7
                case UINT:
7
                case UINT:
8
                case LONG:
8
                case LONG:
9
                case ULONG:
9
                case ULONG:
10
                case LONG_LONG:
10
                case LONG_LONG:
11
                case ULONG_LONG:
11
                case ULONG_LONG:
12
                case FLOAT:
12
                case FLOAT:
13
                case DOUBLE:
13
                case DOUBLE:
14
                case POINTER:
14
                case POINTER:
15
                case VOID:
15
                case STRING:
16
                case BOOL:
16
                case BOOL:
17
                    return true;
17
                    return true;
18
            }
18
            }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are declared in the same class
Number of node comparisons139
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements17
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    switch (type.getNativeType())
    2
    switch (type.getNativeType())
    3
    case CHAR:
    3
    case CHAR:
    4
    case UCHAR:
    4
    case UCHAR:
    5
    case SHORT:
    5
    case SHORT:
    6
    case USHORT:
    6
    case USHORT:
    7
    case INT:
    7
    case INT:
    8
    case UINT:
    8
    case UINT:
    9
    case LONG:
    9
    case LONG:
    10
    case ULONG:
    10
    case ULONG:
    11
    case LONG_LONG:
    11
    case LONG_LONG:
    12
    case ULONG_LONG:
    12
    case ULONG_LONG:
    13
    case FLOAT:
    13
    case FLOAT:
    14
    case DOUBLE:
    14
    case DOUBLE:
    15
    case POINTER:
    15
    case POINTER:
    16
    case VOID:
    16
    case VOID:
    16
    case STRING:
    Differences
    Expression1Expression2Difference
    VOIDSTRINGVARIABLE_NAME_MISMATCH
    16
    case STRING:
    17
    case BOOL:
    17
    case BOOL:
    18
    return true;
    18
    return true;
    18
    return true;
    Preondition Violations
    Conditional return true;
    Conditional return true;
    18
    return true;
    Precondition Violations (2)
    Row Violation
    1Conditional return true;
    2Conditional return true;