BlockBody body = blockBodies[index]; if (body == null) { return createBlockBody(scriptObject, context, index, descriptor); } return body;
BlockBody body = blockBodies[index]; if (body == null) { return createBlockBody19(scriptObject, context, index, descriptor); } return body;
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/ast/executable/AbstractScript.java File path: /jruby-1.4.0/src/org/jruby/ast/executable/AbstractScript.java
Method name: BlockBody getBlockBody(Object, ThreadContext, int, String) Method name: BlockBody getBlockBody19(Object, ThreadContext, int, String)
Number of AST nodes: 4 Number of AST nodes: 4
1
BlockBody body = blockBodies[index];
1
BlockBody body = blockBodies[index];
2
            if (body == null) {
2
            if (body == null) {
3
                return createBlockBody(scriptObject, context, index, descriptor);
3
                return createBlockBody19(scriptObject, context, index, descriptor);
4
            }
4
            }
5
            return body;
5
            return body;
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.1
Clones locationClones are declared in the same class
Number of node comparisons8
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    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.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    BlockBody body = blockBodies[index];
    1
    BlockBody body = blockBodies[index];
    2
    if (body == null)
    2
    if (body == null)
    3
    return createBlockBody(scriptObject, context, index, descriptor);
    3
    return createBlockBody(scriptObject, context, index, descriptor);
    3
    return createBlockBody19(scriptObject, context, index, descriptor);
    Differences
    Expression1Expression2Difference
    createBlockBodycreateBlockBody19METHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression createBlockBody(scriptObject,context,index,descriptor) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createBlockBody
    Expression createBlockBody19(scriptObject,context,index,descriptor) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createBlockBody19
    3
    return createBlockBody19(scriptObject, context, index, descriptor);
    4
    return body;
    4
    return body;
    Precondition Violations (2)
    Row Violation
    1Expression createBlockBody(scriptObject,context,index,descriptor) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression createBlockBody19(scriptObject,context,index,descriptor) cannot be parameterized, because it has dependencies to/from statements that will be extracted