RubyString str = strDup(context.getRuntime()); str.trTrans19(context, src, repl, false); return str;
RubyString str = strDup(context.getRuntime()); str.strip_bang(context); return str;
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/RubyString.java
Method name: IRubyObject tr19(ThreadContext, IRubyObject, IRubyObject) Method name: IRubyObject strip(ThreadContext)
Number of AST nodes: 3 Number of AST nodes: 3
1
RubyString str = strDup(context.getRuntime());
1
RubyString str = strDup(context.getRuntime());
2
        str.trTrans19(context, src, repl, false);
2
        str.strip_bang(context);
3
        return str;
3
        return str;
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 declared in the same class
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    RubyString str = strDup(context.getRuntime());
    1
    RubyString str = strDup(context.getRuntime());
    2
    str.trTrans19(context, src, repl, false);
    2
    str.trTrans19(context, src, repl, false);
    2
    str.strip_bang(context);
    Differences
    Expression1Expression2Difference
    trTrans19strip_bangMETHOD_INVOCATION_NAME_MISMATCH
    str.trTrans19(context,src,repl,false)str.strip_bang(context)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression str.trTrans19(context,src,repl,false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method trTrans19
    Expression str.strip_bang(context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression str.trTrans19(context,src,repl,false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method trTrans19
    Expression str.strip_bang(context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2
    str.strip_bang(context);
    3
    return str;
    3
    return str;
    Precondition Violations (4)
    Row Violation
    1Expression str.trTrans19(context,src,repl,false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression str.strip_bang(context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression str.trTrans19(context,src,repl,false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression str.strip_bang(context) cannot be parameterized, because it has dependencies to/from statements that will be extracted