Buggy code:
arg_i = decontValue . get_int ( tc ) ; } else { if ( error != null ) error [ 0 ] = String . format ( "Cannot<seq2seq4repair_space>unbox<seq2seq4repair_space>argument<seq2seq4repair_space>to<seq2seq4repair_space>'%s'<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>native<seq2seq4repair_space>int" , varName ) ; return Binder . BIND_RESULT_FAIL ; } break ; case Binder . SIG_ELEM_NATIVE_NUM_VALUE : if ( ( ( spec . can_box ) & ( StorageSpec . CAN_BOX_NUM ) ) != 0 ) { flag = CallSiteDescriptor . ARG_NUM ; arg_n = decontValue . get_num ( tc ) ; } else { if ( error != null ) error [ 0 ] = String . format ( "Cannot<seq2seq4repair_space>unbox<seq2seq4repair_space>argument<seq2seq4repair_space>to<seq2seq4repair_space>'%s'<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>native<seq2seq4repair_space>num" , varName ) ; return Binder . BIND_RESULT_FAIL ; } break ; case Binder . SIG_ELEM_NATIVE_STR_VALUE : if ( ( ( spec . can_box ) & ( StorageSpec . CAN_BOX_STR ) ) != 0 ) { flag = CallSiteDescriptor . ARG_STR ; arg_s = decontValue . get_str ( tc ) ; } else { if ( error != null ) error [ 0 ] = String . format ( "Cannot<seq2seq4repair_space>unbox<seq2seq4repair_space>argument<seq2seq4repair_space>to<seq2seq4repair_space>'%s'<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>native<seq2seq4repair_space>str" , varName ) ; return Binder . BIND_RESULT_FAIL ; } break ; default : if ( error != null ) error [ 0 ] = String . format ( "Cannot<seq2seq4repair_space>unbox<seq2seq4repair_space>argument<seq2seq4repair_space>to<seq2seq4repair_space>'%s'<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>native<seq2seq4repair_space>type" , varName ) ; return Binder . BIND_RESULT_FAIL ; } } SixModelObject decontValue = null ; if ( ( flag == ( CallSiteDescriptor . ARG_OBJ ) ) && ( ! ( is_rw && ( desiredNative != 0 ) ) ) ) { decontValue = Ops . decont ( arg_o , tc ) ; decontValue = Ops . hllize ( decontValue , tc ) ; if ( ! noNomTypeCheck ) { SixModelObject nomType = param . get_attribute_boxed ( tc , gcx . Parameter , "$!nominal_type" , Binder . HINT_nominal_type ) ; if ( ( paramFlags & ( Binder . SIG_ELEM_NOMINAL_GENERIC ) ) != 0 ) { SixModelObject HOW = nomType . st . HOW ; SixModelObject ig = Ops . findmethod ( tc , HOW , "instantiate_generic" ) ; SixModelObject ContextRef = tc . gc . ContextRef ; SixModelObject cc = ContextRef . st . REPR . allocate ( tc , ContextRef . st ) ; ( ( ContextRefInstance ) ( cc ) ) . context = cf ; Ops . invokeDirect ( tc , ig , Binder . genIns , new Object [ ] { HOW , nomType , cc } ) ; nomType = Ops . result_o ( tc . curFrame ) ; } if ( ( nomType != ( gcx . Mu ) ) && ( ( Ops . istype_nodecont ( decontValue , nomType , tc ) ) == 0 ) ) { if ( error != null ) { SixModelObject thrower = RakOps . getThrower ( tc , "X::TypeCheck::Binding" ) ; if ( ( thrower != null ) && ( ( decontValue . st . WHAT ) != ( gcx . Junction ) ) ) { Ops . invokeDirect ( tc , thrower , Binder . bindThrower , new Object [ ] { decontValue . st . WHAT , nomType . st . WHAT , varName } ) ; return Binder . BIND_RESULT_FAIL ; } else error [ 0 ] = String . format ( "Nominal<seq2seq4repair_space>type<seq2seq4repair_space>check<seq2seq4repair_space>failed<seq2seq4repair_space>for<seq2seq4repair_space>parameter<seq2seq4repair_space>'%s'" , varName ) ; } return Binder . juncOrFail ( tc , gcx , decontValue ) ; } if ( ( paramFlags & ( Binder . SIG_ELEM_DEFINEDNES_CHECK ) ) != 0 ) { if ( ( ( paramFlags & ( Binder . SIG_ELEM_UNDEFINED_ONLY ) ) != 0 ) && ( ( Ops . isconcrete ( arg_o , tc ) ) == 1 ) ) { if ( error != null ) { if ( ( paramFlags & ( Binder . SIG_ELEM_INVOCANT ) ) != 0 ) { error [ 0 ] = "Invocant<seq2seq4repair_space>requires<seq2seq4repair_space>a<seq2seq4repair_space>type<seq2seq4repair_space>object,<seq2seq4repair_space>but<seq2seq4repair_space>an<seq2seq4repair_space>object<seq2seq4repair_space>instance<seq2seq4repair_space>was<seq2seq4repair_space>passed" ; } else { error [ 0 ] = String . format ( "Parameter<seq2seq4repair_space>'%s'<seq2seq4repair_space>requires<seq2seq4repair_space>a<seq2seq4repair_space>type<seq2seq4repair_space>object,<seq2seq4repair_space>but<seq2seq4repair_space>an<seq2seq4repair_space>object<seq2seq4repair_space>instance<seq2seq4repair_space>was<seq2seq4repair_space>passed" , varName ) ; } } return Binder . juncOrFail ( tc , gcx , decontValue ) ; } if ( ( ( paramFlags & ( Binder . SIG_ELEM_DEFINED_ONLY ) ) != 0 ) && ( ( Ops . isconcrete ( arg_o , tc ) ) != 1 ) ) { if ( error != null ) { if ( ( paramFlags & ( Binder . SIG_ELEM_INVOCANT ) ) != 0 ) { <START_BUG> error [ 0 ] = "Invocant<seq2seq4repair_space>requires<seq2seq4repair_space>a<seq2seq4repair_space>instance,<seq2seq4repair_space>but<seq2seq4repair_space>a<seq2seq4repair_space>type<seq2seq4repair_space>object<seq2seq4repair_space>was<seq2seq4repair_space>passed" ; <END_BUG> } else { error [ 0 ] = String . format ( "Parameter<seq2seq4repair_space>'%s'<seq2seq4repair_space>requires<seq2seq4repair_space>an<seq2seq4repair_space>instance,<seq2seq4repair_space>but<seq2seq4repair_space>a<seq2seq4repair_space>type<seq2seq4repair_space>object<seq2seq4repair_space>was<seq2seq4repair_space>passed" , varName ) ; } } return Binder . juncOrFail ( tc , gcx , decontValue ) ; } } } } SixModelObject typeCaps = param . get_attribute_boxed ( tc , gcx . Parameter , "$!type_captures" , Binder . HINT_type_captures ) ; if ( typeCaps != null ) Binder . bindTypeCaptures ( tc , typeCaps , cf , decontValue . st . WHAT ) ; SixModelObject coerceType = param . get_attribute_boxed ( tc , gcx . Parameter , "$!coerce_type" , Binder . HINT_coerce_type ) ; if ( coerceType != null ) { if ( flag != ( CallSiteDescriptor . ARG_OBJ ) ) { if ( error != null ) error [ 0 ] = String . format ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>coerce<seq2seq4repair_space>natively<seq2seq4repair_space>typed<seq2seq4repair_space>parameter<seq2seq4repair_space>'%s'" , varName ) ; return Binder . BIND_RESULT_FAIL ; } if ( ( Ops . istype ( decontValue , coerceType , tc ) ) == 0 ) { param . get_attribute_native ( tc , gcx . Parameter , "$!coerce_method" , Binder . HINT_coerce_method ) ; String methName = tc . native_s ; SixModelObject coerceMeth = Ops . findmethod ( tc , decontValue , methName ) ; if ( coerceMeth != null ) { Ops . invokeDirect ( tc , coerceMeth , invocantCallSite , new Object [ ] { decontValue } ) ; decontValue = Ops . decont ( Ops . result_o ( tc . curFrame ) , tc ) ; } else { if ( error != null ) error [ 0 ] = String . format ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>coerce<seq2seq4repair_space>value<seq2seq4repair_space>for<seq2seq4repair_space>'%s'<seq2seq4repair_space>to<seq2seq4repair_space>%s;<seq2seq4repair_space>no<seq2seq4repair_space>coercion<seq2seq4repair_space>method<seq2seq4repair_space>defined" , varName , methName ) ; return Binder . BIND_RESULT_FAIL ; } } }

Fix:
error [ 0 ] = "Invocant<seq2seq4repair_space>requires<seq2seq4repair_space>an<seq2seq4repair_space>instance,<seq2seq4repair_space>but<seq2seq4repair_space>a<seq2seq4repair_space>type<seq2seq4repair_space>object<seq2seq4repair_space>was<seq2seq4repair_space>passed" ;