try { return block.yield(context, ptr); } finally { io.free(); }
if (block.isGiven()) { try { val = block.yield(context, strio); } finally { strio.doFinalize(); } }
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/ext/ffi/MemoryPointer.java File path: /jruby-1.4.0/src/org/jruby/RubyStringIO.java
Method name: IRubyObject allocate(ThreadContext, IRubyObject, IRubyObject, int, int, boolean, Block) Method name: IRubyObject open(ThreadContext, IRubyObject, IRubyObject[], Block)
Number of AST nodes: 2 Number of AST nodes: 3
1
if (block.isGiven()) {
1
try {
2
            try {
2
                return block.yield(context, ptr);
3
                val = block.yield(context, strio);
3
            } finally {
4
            } finally {
4
                io.free();
5
                strio.doFinalize();
5
    
6
            }
6
        }
7
        }
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.2
Clones locationClones are in different classes having the same super class
Number of node comparisons1