Encoding enc = isCompatibleWith(other); if (enc == null) throw getRuntime().newEncodingCompatibilityError("incompatible character encodings: " + value.encoding + " and " + other.value.encoding); return enc;
IRubyObject line = gets(context); if (line.isNil()) throw context.getRuntime().newEOFError(); return line;
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/RubyIO.java
Method name: Encoding checkEncoding(RubyString) Method name: IRubyObject readline(ThreadContext)
Number of AST nodes: 4 Number of AST nodes: 4
1
Encoding enc = isCompatibleWith(other);
1
IRubyObject line = gets(context);
2
        if (enc == null) throw getRuntime().newEncodingCompatibilityError("incompatible character encodings: " + 
2
        if (
3
                                value.encoding + " and " + other.value.encoding);
3
line.isNil()) throw context.getRuntime().newEOFError();
4
        
4
        return enc;
5
        return line;
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes having the same super class
Number of node comparisons1