RubyString result = multiplyByteList(context, other); result.copyCodeRangeForSubstr(this, result.value.encoding = value.encoding); return result;
Frame lastFrame = preYieldNoScope(binding, klass); // new scope for this invocation of the block, based on parent scope pushScope(DynamicScope.newDynamicScope(scope, binding.getDynamicScope())); return lastFrame;
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/RubyString.java File path: /jruby-1.4.0/src/org/jruby/runtime/ThreadContext.java
Method name: IRubyObject op_mul19(ThreadContext, IRubyObject) Method name: Frame preYieldSpecificBlock(Binding, StaticScope, RubyModule)
Number of AST nodes: 3 Number of AST nodes: 3
1
RubyString result = multiplyByteList(context, other);
2
        result.copyCodeRangeForSubstr(this, result.value.encoding = value.encoding
1
Frame lastFrame = preYieldNoScope(binding, klass);
2
        // new scope for this invocation of the block, based on parent scope
3
);
3
        pushScope(DynamicScope.newDynamicScope(scope, binding.getDynamicScope()));
4
        return result;
4
        return lastFrame;
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.0
Clones locationClones are in different classes
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                                        
    1
    Frame lastFrame = preYieldNoScope(binding, klass);
    1
    RubyString result = multiplyByteList(context, other);
                                                                                                              
    2
    result.copyCodeRangeForSubstr(this, result.value.encoding = value.encoding);
    2
    result.copyCodeRangeForSubstr(this, result.value.encoding = value.encoding);
    2
    pushScope(DynamicScope.newDynamicScope(scope, binding.getDynamicScope()));
    Differences
    Expression1Expression2Difference
    copyCodeRangeForSubstrpushScopeMETHOD_INVOCATION_NAME_MISMATCH
    result.copyCodeRangeForSubstr(this,result.value.encoding=value.encoding)pushScope(DynamicScope.newDynamicScope(scope,binding.getDynamicScope()))ARGUMENT_NUMBER_MISMATCH
    resultMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression result.copyCodeRangeForSubstr(this,result.value.encoding=value.encoding) is a void method call, and thus it cannot be parameterized
    Expression pushScope(DynamicScope.newDynamicScope(scope,binding.getDynamicScope())) is a void method call, and thus it cannot be parameterized
    Expression result.copyCodeRangeForSubstr(this,result.value.encoding=value.encoding) is a void method call, and thus it cannot be parameterized
    Expression pushScope(DynamicScope.newDynamicScope(scope,binding.getDynamicScope())) is a void method call, and thus it cannot be parameterized
    2
    pushScope(DynamicScope.newDynamicScope(scope, binding.getDynamicScope()));
                                            
    3
    return lastFrame;
    Preondition Violations
    Unmatched return lastFrame;
    3
    return lastFrame;
    3
    return result;
    3
    return result;
    Preondition Violations
    Unmatched return result;
                                      
    Precondition Violations (6)
    Row Violation
    1Expression result.copyCodeRangeForSubstr(this,result.value.encoding=value.encoding) is a void method call, and thus it cannot be parameterized
    2Expression pushScope(DynamicScope.newDynamicScope(scope,binding.getDynamicScope())) is a void method call, and thus it cannot be parameterized
    3Expression result.copyCodeRangeForSubstr(this,result.value.encoding=value.encoding) is a void method call, and thus it cannot be parameterized
    4Expression pushScope(DynamicScope.newDynamicScope(scope,binding.getDynamicScope())) is a void method call, and thus it cannot be parameterized
    5Unmatched return lastFrame;
    6Unmatched return result;