Buggy code:
public RubyArray push_m ( IRubyObject [ ] items ) { } public RubyArray push ( IRubyObject item ) { } @ JRubyMethod ( name = "push" , rest = true ) public RubyArray push_m19 ( IRubyObject [ ] items ) { } @ JRubyMethod public IRubyObject pop ( ThreadContext context ) { } @ JRubyMethod public IRubyObject pop ( ThreadContext context , IRubyObject num ) { } @ JRubyMethod ( name = "shift" ) public IRubyObject shift ( ThreadContext context ) { } @ JRubyMethod ( name = "shift" ) public IRubyObject shift ( ThreadContext context , IRubyObject num ) { } public IRubyObject unshift ( ) { } @ JRubyMethod ( name = "unshift" ) public IRubyObject unshift19 ( ) { } public IRubyObject unshift ( IRubyObject item ) { } @ JRubyMethod ( name = "unshift" ) public IRubyObject unshift19 ( IRubyObject item ) { } public IRubyObject unshift ( IRubyObject [ ] items ) { } @ JRubyMethod ( name = "unshift" , rest = true ) public IRubyObject unshift19 ( IRubyObject [ ] items ) { } @ JRubyMethod ( name = "include?" , required = 1 ) public RubyBoolean include_p ( ThreadContext context , IRubyObject item ) { } @ JRubyMethod ( name = "frozen?" ) @ Override public RubyBoolean frozen_p ( ThreadContext context ) { } public IRubyObject aref ( IRubyObject [ ] args ) { } public IRubyObject aref ( IRubyObject arg0 ) { } @ JRubyMethod ( name = { "[]" , "slice" } ) public IRubyObject aref19 ( IRubyObject arg0 ) { } private IRubyObject arefCommon ( IRubyObject arg0 ) { } public IRubyObject aref ( IRubyObject arg0 , IRubyObject arg1 ) { } @ JRubyMethod ( name = { "[]" , "slice" } ) public IRubyObject aref19 ( IRubyObject arg0 , IRubyObject arg1 ) { } private IRubyObject arefCommon ( IRubyObject arg0 , IRubyObject arg1 ) { } public IRubyObject aset ( IRubyObject [ ] args ) { } public IRubyObject aset ( IRubyObject arg0 , IRubyObject arg1 ) { } @ JRubyMethod ( name = "[]=" ) public IRubyObject aset19 ( IRubyObject arg0 , IRubyObject arg1 ) { } public IRubyObject aset ( IRubyObject arg0 , IRubyObject arg1 , IRubyObject arg2 ) { } @ JRubyMethod ( name = "[]=" ) public IRubyObject aset19 ( IRubyObject arg0 , IRubyObject arg1 , IRubyObject arg2 ) { } @ JRubyMethod ( name = "at" , required = 1 ) public IRubyObject at ( IRubyObject pos ) { } public RubyArray concat ( IRubyObject obj ) { } @ JRubyMethod ( name = "concat" , required = 1 ) public RubyArray concat19 ( IRubyObject obj ) { } private IRubyObject inspectAry ( ThreadContext context ) { } @ JRubyMethod ( name = "inspect" ) @ Override public IRubyObject inspect ( ) { } public IRubyObject first ( IRubyObject [ ] args ) { } @ JRubyMethod ( name = "first" ) public IRubyObject first ( ) { } @ JRubyMethod ( name = "first" ) public IRubyObject first ( IRubyObject arg0 ) { } public IRubyObject last ( IRubyObject [ ] args ) { } @ JRubyMethod ( name = "last" ) public IRubyObject last ( ) { } @ JRubyMethod ( name = "last" ) public IRubyObject last ( IRubyObject arg0 ) { } @ JRubyMethod public IRubyObject each ( ThreadContext context , Block block ) { } public IRubyObject eachSlice ( ThreadContext context , int size , Block block ) { } @ JRubyMethod public IRubyObject each_slice ( ThreadContext context , IRubyObject arg , Block block ) { final int size = RubyNumeric . num2int ( arg ) ; final Ruby runtime = context . runtime ; if ( size <= 0 ) throw runtime . newArgumentError ( "invalid<seq2seq4repair_space>slice<seq2seq4repair_space>size" ) ; <START_BUG> return block . isGiven ( ) ? eachSlice ( context , size , block ) : RubyEnumerator . enumeratorize ( context . runtime , this , "each_slice" , arg ) ; <END_BUG> } public IRubyObject eachIndex ( ThreadContext context , Block block ) { } @ JRubyMethod public IRubyObject each_index ( ThreadContext context , Block block ) { } public IRubyObject reverseEach ( ThreadContext context , Block block ) { } @ JRubyMethod public IRubyObject reverse_each ( ThreadContext context , Block block ) { } private IRubyObject inspectJoin ( ThreadContext context , RubyArray tmp , IRubyObject sep ) { } public IRubyObject join ( ThreadContext context , IRubyObject sep ) { } public IRubyObject join ( ThreadContext context ) { } private RubyString joinStrings ( RubyString sep , int max , RubyString result ) { } private RubyString joinAny ( ThreadContext context , IRubyObject obj , RubyString sep , int i , RubyString result ) { } private void recursiveJoin ( final ThreadContext context , final IRubyObject outValue , final RubyString sep , final RubyString result , final IRubyObject ary ) { } @ JRubyMethod ( name = "join" ) public IRubyObject join19 ( final ThreadContext context , IRubyObject sep ) { } @ JRubyMethod ( name = "join" ) public IRubyObject join19 ( ThreadContext context ) { } @ JRubyMethod ( name = "to_a" ) @ Override public RubyArray to_a ( ) { } @ JRubyMethod ( name = "to_ary" ) public IRubyObject to_ary ( ) { } @ Override public RubyArray convertToArray ( ) { } @ Override public IRubyObject checkArrayType ( ) { } @ JRubyMethod ( name = "==" , required = 1 ) @ Override public IRubyObject op_equal ( ThreadContext context , IRubyObject obj ) { } public RubyBoolean compare ( ThreadContext context , MethodNames method , IRubyObject other ) { } @ JRubyMethod ( name = "eql?" , required = 1 ) public IRubyObject eql ( ThreadContext context , IRubyObject obj ) { } @ JRubyMethod ( name = "compact!" ) public IRubyObject compact_bang ( ) { } public IRubyObject compact ( ) { } @ JRubyMethod ( name = "compact" ) public IRubyObject compact19 ( ) { }

Fix:
return block . isGiven ( ) ? eachSlice ( context , size , block ) : RubyEnumerator . enumeratorizeWithSize ( context , this , "each_slice" , arg , arg ) ;