switch (this) { case TRUENODE: case FIXNUMNODE: case FLOATNODE: case REGEXPNODE: case STRNODE: case DOTNODE: case SYMBOLNODE: case BIGNUMNODE: case ARRAYNODE: case HASHNODE: return true; default: return false; }
switch (this) { case FIXNUMNODE: case STRNODE: case FLOATNODE: case BIGNUMNODE: case SELFNODE: case TRUENODE: case FALSENODE: case NILNODE: return true; default: return false; }
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/ast/NodeType.java File path: /jruby-1.4.0/src/org/jruby/ast/NodeType.java
Method name: boolean alwaysTrue() Method name: boolean isImmediate()
Number of AST nodes: 14 Number of AST nodes: 12
1
switch (this) {
1
switch (this) {
2
        case TRUENODE:
3
        case FIXNUMNODE:
2
        case FIXNUMNODE:
4
        case FLOATNODE:
3
        case 
5
        case REGEXPNODE:
4
STRNODE:
6
        case STRNODE:
5
        case FLOATNODE:
7
        case DOTNODE:
6
        case BIGNUMNODE:
8
        case SYMBOLNODE:
7
        case SELFNODE:
9
        case BIGNUMNODE:
8
        case TRUENODE:
10
        case ARRAYNODE:
9
        case FALSENODE:
11
        case HASHNODE:
10
        case NILNODE:
12
            return true;
11
            return true;
13
        default:
12
        default:
14
            return false;
13
            return false;
15
        }
14
        }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are declared in the same class
Number of node comparisons76
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements12
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.3
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    switch (this)
    1
    switch (this)
    2
    case TRUENODE:
    7
    case TRUENODE:
    3
    case FIXNUMNODE:
    2
    case FIXNUMNODE:
    4
    case FLOATNODE:
    4
    case FLOATNODE:
    5
    case REGEXPNODE:
    5
    case REGEXPNODE:
    5
    case BIGNUMNODE:
    Differences
    Expression1Expression2Difference
    REGEXPNODEBIGNUMNODEVARIABLE_NAME_MISMATCH
    5
    case BIGNUMNODE:
    6
    case STRNODE:
    3
    case STRNODE:
    7
    case DOTNODE:
    7
    case DOTNODE:
    6
    case SELFNODE:
    Differences
    Expression1Expression2Difference
    DOTNODESELFNODEVARIABLE_NAME_MISMATCH
    6
    case SELFNODE:
    8
    case SYMBOLNODE:
    8
    case SYMBOLNODE:
    8
    case FALSENODE:
    Differences
    Expression1Expression2Difference
    SYMBOLNODEFALSENODEVARIABLE_NAME_MISMATCH
    8
    case FALSENODE:
    9
    case BIGNUMNODE:
    9
    case BIGNUMNODE:
    9
    case NILNODE:
    Differences
    Expression1Expression2Difference
    BIGNUMNODENILNODEVARIABLE_NAME_MISMATCH
    9
    case NILNODE:
    10
    case ARRAYNODE:
                                          
    11
    case HASHNODE:
                                        
    12
    return true;
    10
    return true;
    13
    default:
    11
    default:
    14
    return false;
    12
    return false;
    Precondition Violations (0)
    Row Violation