context.loadNil(); context.pollThreadEvents(); if (!expr) context.consumeCurrentValue();
context.loadFalse(); context.pollThreadEvents(); if (!expr) context.consumeCurrentValue();
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: void compileNil(Node, BodyCompiler, boolean) Method name: void compileFalse(Node, BodyCompiler, boolean)
Number of AST nodes: 4 Number of AST nodes: 4
1
context.loadNil();
1
context.loadFalse();
2
            context.pollThreadEvents();
2
            context.pollThreadEvents();
3
            if (!expr) context.consumeCurrentValue();
3
            if (!expr) context.consumeCurrentValue();
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.2
Clones locationClones are declared in the same class
Number of node comparisons10
  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.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    5
    context.loadNil();
    5
    context.loadNil();
    5
    context.loadFalse();
    Differences
    Expression1Expression2Difference
    loadNilloadFalseMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression context.loadNil() is a void method call, and thus it cannot be parameterized
    Expression context.loadFalse() is a void method call, and thus it cannot be parameterized
    5
    context.loadFalse();
    6
    context.pollThreadEvents();
    6
    context.pollThreadEvents();
    7
    if (!expr)
    7
    if (!expr)
    8
    context.consumeCurrentValue();
    8
    context.consumeCurrentValue();
    Precondition Violations (2)
    Row Violation
    1Expression context.loadNil() is a void method call, and thus it cannot be parameterized
    2Expression context.loadFalse() is a void method call, and thus it cannot be parameterized