if (foundType != null && foundType != FastSwitchType.SINGLE_CHAR_STRING) return null; if (foundType == null) foundType = FastSwitchType.SINGLE_CHAR_STRING; continue;
if (foundType != null && foundType != FastSwitchType.SINGLE_CHAR_SYMBOL) return null; if (foundType == null) foundType = FastSwitchType.SINGLE_CHAR_SYMBOL; continue;
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/compiler/ASTCompiler.java File path: /jruby-1.4.0/src/org/jruby/compiler/ASTCompiler.java
Method name: FastSwitchType getHomogeneousSwitchType(List) Method name: FastSwitchType getHomogeneousSwitchType(List)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (foundType != null && foundType != FastSwitchType.SINGLE_CHAR_STRING) return null;
1
if (foundType != null && foundType != FastSwitchType.SINGLE_CHAR_SYMBOL) return null;
2
                    if (foundType == null) foundType = FastSwitchType.SINGLE_CHAR_STRING;
2
                    if (foundType == null) foundType = FastSwitchType.SINGLE_CHAR_SYMBOL;
3
                    continue;
3
                    continue;
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.6
Clones locationClones are in the same method
Number of node comparisons16
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    31
    if (foundType != null && foundType != FastSwitchType.SINGLE_CHAR_STRING)
    31
    if (foundType != null && foundType != FastSwitchType.SINGLE_CHAR_STRING)
    44
    if (foundType != null && foundType != FastSwitchType.SINGLE_CHAR_SYMBOL)
    Differences
    Expression1Expression2Difference
    SINGLE_CHAR_STRINGSINGLE_CHAR_SYMBOLVARIABLE_NAME_MISMATCH
    44
    if (foundType != null && foundType != FastSwitchType.SINGLE_CHAR_SYMBOL)
    32
    return null;
    45
    return null;
    33
    if (foundType == null)
    46
    if (foundType == null)
    34
    foundType = FastSwitchType.SINGLE_CHAR_STRING;
    34
    foundType = FastSwitchType.SINGLE_CHAR_STRING;
    47
    foundType = FastSwitchType.SINGLE_CHAR_SYMBOL;
    Differences
    Expression1Expression2Difference
    SINGLE_CHAR_STRINGSINGLE_CHAR_SYMBOLVARIABLE_NAME_MISMATCH
    47
    foundType = FastSwitchType.SINGLE_CHAR_SYMBOL;
    35
    continue;
    35
    continue;
    48
    continue;
    Preondition Violations
    Statement continue; without innermost loop
    Statement continue; without innermost loop
    48
    continue;
    Precondition Violations (2)
    Row Violation
    1Statement continue; without innermost loop
    2Statement continue; without innermost loop