Buggy code:
@ JRubyMethod ( required = 1 , optional = 1 , compat = RUBY1_9 ) public static IRubyObject define_singleton_method ( ThreadContext context , IRubyObject recv , IRubyObject [ ] args , Block block ) { } @ JRubyMethod ( name = { "proc" , "lambda" } , module = true , visibility = PRIVATE , compat = RUBY1_8 ) public static RubyProc proc ( ThreadContext context , IRubyObject recv , Block block ) { } @ JRubyMethod ( module = true , visibility = PRIVATE , compat = RUBY1_9 ) public static RubyProc lambda ( ThreadContext context , IRubyObject recv , Block block ) { } @ JRubyMethod ( name = "proc" , module = true , visibility = PRIVATE , compat = RUBY1_9 ) public static RubyProc proc_1_9 ( ThreadContext context , IRubyObject recv , Block block ) { } @ JRubyMethod ( name = "loop" , module = true , visibility = PRIVATE ) public static IRubyObject loop ( ThreadContext context , IRubyObject recv , Block block ) { } @ JRubyMethod ( name = "test" , required = 2 , optional = 1 , module = true , visibility = PRIVATE ) public static IRubyObject test ( ThreadContext context , IRubyObject recv , IRubyObject [ ] args ) { } @ JRubyMethod ( name = "`" , required = 1 , module = true , visibility = PRIVATE ) public static IRubyObject backquote ( ThreadContext context , IRubyObject recv , IRubyObject aString ) { } @ JRubyMethod ( name = "srand" , module = true , visibility = PRIVATE ) public static IRubyObject srand ( ThreadContext context , IRubyObject recv ) { } @ JRubyMethod ( name = "srand" , module = true , visibility = PRIVATE ) public static IRubyObject srand ( ThreadContext context , IRubyObject recv , IRubyObject arg ) { } @ JRubyMethod ( name = "rand" , module = true , optional = 1 , visibility = PRIVATE , compat = RUBY1_8 ) public static IRubyObject rand18 ( ThreadContext context , IRubyObject recv , IRubyObject [ ] arg ) { } @ JRubyMethod ( name = "rand" , module = true , optional = 1 , visibility = PRIVATE , compat = RUBY1_9 ) public static IRubyObject rand19 ( ThreadContext context , IRubyObject recv , IRubyObject [ ] arg ) { } public static RubyFixnum spawn ( ThreadContext context , IRubyObject recv , IRubyObject [ ] args ) { } @ JRubyMethod ( name = "syscall" , required = 1 , optional = 9 , module = true , visibility = PRIVATE ) public static IRubyObject syscall ( ThreadContext context , IRubyObject recv , IRubyObject [ ] args ) { } @ JRubyMethod ( name = "system" , required = 1 , rest = true , module = true , visibility = PRIVATE , compat = CompatVersion . CompatVersion . RUBY1_8 ) public static RubyBoolean system ( ThreadContext context , IRubyObject recv , IRubyObject [ ] args ) { } @ JRubyMethod ( name = "system" , required = 1 , rest = true , module = true , visibility = PRIVATE , compat = CompatVersion . CompatVersion . RUBY1_9 ) public static IRubyObject system19 ( ThreadContext context , IRubyObject recv , IRubyObject [ ] args ) { } private static int systemCommon ( ThreadContext context , IRubyObject recv , IRubyObject [ ] args ) { } @ JRubyMethod ( name = { "exec" } , required = 1 , rest = true , module = true , compat = RUBY1_8 , visibility = PRIVATE ) public static IRubyObject exec ( ThreadContext context , IRubyObject recv , IRubyObject [ ] args ) { } @ JRubyMethod ( required = 4 , module = true , compat = RUBY1_9 , visibility = PRIVATE ) public static IRubyObject _exec_internal ( ThreadContext context , IRubyObject recv , IRubyObject [ ] args ) { Ruby runtime = context . getRuntime ( ) ; IRubyObject env = args [ 0 ] ; IRubyObject prog = args [ 1 ] ; IRubyObject options = args [ 2 ] ; RubyArray cmdArgs = ( ( RubyArray ) ( args [ 3 ] ) ) ; <START_BUG> RubyIO . checkSpawnOptions ( options ) ; <END_BUG> return RubyKernel . execCommon ( runtime , env , prog , options , cmdArgs . toJavaArray ( ) ) ; } private static IRubyObject execCommon ( Ruby runtime , IRubyObject env , IRubyObject prog , IRubyObject options , IRubyObject [ ] args ) { } @ JRubyMethod ( name = "fork" , module = true , visibility = PRIVATE , compat = RUBY1_8 ) public static IRubyObject fork ( ThreadContext context , IRubyObject recv , Block block ) { } @ JRubyMethod ( name = "fork" , module = true , visibility = PRIVATE , compat = RUBY1_9 , notImplemented = true ) public static IRubyObject fork19 ( ThreadContext context , IRubyObject recv , Block block ) { } @ JRubyMethod ( module = true ) public static IRubyObject tap ( ThreadContext context , IRubyObject recv , Block block ) { } @ JRubyMethod ( name = { "to_enum" , "enum_for" } , rest = true , compat = RUBY1_9 ) public static IRubyObject to_enum ( ThreadContext context , IRubyObject recv , IRubyObject [ ] args ) { } @ JRubyMethod ( name = { "__method__" , "__callee__" } , module = true , visibility = PRIVATE , reads = METHODNAME , omit = true ) public static IRubyObject __method__ ( ThreadContext context , IRubyObject recv ) { } @ JRubyMethod ( module = true , compat = RUBY1_9 ) public static IRubyObject singleton_class ( IRubyObject recv ) { } @ JRubyMethod ( rest = true , compat = RUBY1_9 ) public static IRubyObject public_send ( ThreadContext context , IRubyObject recv , IRubyObject [ ] args ) { }

Fix:
RubyIO . checkExecOptions ( options ) ;