Ruby runtime = context.getRuntime(); if (runtime.isVerbose()) { runtime.getWarnings().warning(ID.DEPRECATED_METHOD, "StringScanner#getbyte is obsolete; use #get_byte instead", "StringScanner#getbyte", "#get_byte"); } return get_byte(context);
Ruby runtime = context.getRuntime(); if (runtime.isVerbose()) { runtime.getWarnings().warning(ID.DEPRECATED_METHOD, "StringScanner#empty? is obsolete; use #eos? instead", "StringScanner#empty?", "#eos?"); } return eos_p(context);
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/RubyStringScanner.java File path: /jruby-1.4.0/src/org/jruby/RubyStringScanner.java
Method name: IRubyObject getbyte(ThreadContext) Method name: RubyBoolean empty_p(ThreadContext)
Number of AST nodes: 4 Number of AST nodes: 4
1
Ruby runtime = context.getRuntime();
1
Ruby runtime = context.getRuntime();
2
        if (runtime.isVerbose()) { 
2
        if (runtime.isVerbose()) {
3
            runtime.getWarnings().warning(ID.DEPRECATED_METHOD,
3
            runtime.getWarnings().warning(ID.DEPRECATED_METHOD,
4
                    "StringScanner#getbyte is obsolete; use #get_byte instead",
4
 "StringScanner#empty? is obsolete; use #eos? instead",
5
                    "StringScanner#getbyte", "#get_byte");
5
 "StringScanner#empty?", "#eos?");
6
        }
6
        }
7
        return get_byte(context);
7
        return eos_p(context);
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 statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    Ruby runtime = context.getRuntime();
    1
    Ruby runtime = context.getRuntime();
    2
    if (runtime.isVerbose())
    2
    if (runtime.isVerbose())
    3
    runtime.getWarnings().warning(ID.DEPRECATED_METHOD, "StringScanner#getbyte is obsolete; use #get_byte instead", "StringScanner#getbyte", "#get_byte");
    3
    runtime.getWarnings().warning(ID.DEPRECATED_METHOD, "StringScanner#getbyte is obsolete; use #get_byte instead", "StringScanner#getbyte", "#get_byte");
    3
    runtime.getWarnings().warning(ID.DEPRECATED_METHOD, "StringScanner#empty? is obsolete; use #eos? instead", "StringScanner#empty?", "#eos?");
    Differences
    Expression1Expression2Difference
    "StringScanner#getbyte is obsolete; use #get_byte instead""StringScanner#empty? is obsolete; use #eos? instead"LITERAL_VALUE_MISMATCH
    "StringScanner#getbyte""StringScanner#empty?"LITERAL_VALUE_MISMATCH
    "#get_byte""#eos?"LITERAL_VALUE_MISMATCH
    3
    runtime.getWarnings().warning(ID.DEPRECATED_METHOD, "StringScanner#empty? is obsolete; use #eos? instead", "StringScanner#empty?", "#eos?");
                                                      
    4
    return eos_p(context);
    Preondition Violations
    Unmatched return eos_p(context);
    4
    return eos_p(context);
    4
    return get_byte(context);
    4
    return get_byte(context);
    Preondition Violations
    Unmatched return get_byte(context);
                                                            
    Precondition Violations (2)
    Row Violation
    1Unmatched return eos_p(context);
    2Unmatched return get_byte(context);