Buggy code:
@ Library ( "UIKit" ) public class UIAppearance { private static final Selector appearance = Selector . register ( "appearance" ) ; @ Bridge @ Pointer private static native long objc_appearance ( ObjCClass cls , Selector sel ) { } private static final Selector appearanceWhenContainedIn = Selector . register ( "appearanceWhenContainedIn:" ) ; @ Bridge @ Variadic ( 2 ) @ Pointer private static native long objc_appearanceWhenContainedIn ( ObjCClass cls , Selector sel , ObjCClass c01 , ObjCClass c02 , ObjCClass c03 , ObjCClass c04 , ObjCClass c05 , ObjCClass c06 , ObjCClass c07 , ObjCClass c08 , ObjCClass c09 , ObjCClass c10 , @ Pointer long nil ) { } private static final Selector appearanceForTraitCollection = Selector . register ( "appearanceForTraitCollection:" ) ; @ Bridge @ Pointer private static native long objc_appearanceForTraitCollection ( ObjCClass cls , Selector sel , UITraitCollection trait ) { } private static final Selector appearanceForTraitCollectionWhenContainedIn = Selector . register ( "appearanceForTraitCollection:whenContainedIn:" ) ; @ Bridge @ Variadic ( 3 ) @ Pointer private static native long objc_appearanceForTraitCollectionWhenContainedIn ( ObjCClass cls , Selector sel , UITraitCollection trait , ObjCClass c01 , ObjCClass c02 , ObjCClass c03 , ObjCClass c04 , ObjCClass c05 , ObjCClass c06 , ObjCClass c07 , ObjCClass c08 , ObjCClass c09 , ObjCClass c10 , @ Pointer long nil ) { } @ SuppressWarnings ( "unchecked" ) private static ObjCClass toObjCClass ( Class < ? > [ ] array , int index ) { } public static < T extends NSObject & UIAppearanceContainer > T getAppearance ( Class < T > type , Class < ? > ... containedIn ) { } public static < T extends NSObject & UIAppearanceContainer > T getAppearanceForTraitCollection ( Class < T > type , UITraitCollection trait , Class < ? > ... containedIn ) { ObjCClass objCClass = ObjCClass . getByType ( type ) ; long proxyHandle = 0 ; if ( ( containedIn == null ) || ( ( containedIn . length ) == 0 ) ) { proxyHandle = UIAppearance . objc_appearanceForTraitCollection ( objCClass , UIAppearance . appearanceForTraitCollection , trait ) ; } else { if ( ( containedIn . length ) > 10 ) { throw new IllegalArgumentException ( "A<seq2seq4repair_space>maximum<seq2seq4repair_space>of<seq2seq4repair_space>10<seq2seq4repair_space>container<seq2seq4repair_space>classes<seq2seq4repair_space>is<seq2seq4repair_space>supported" ) ; } ObjCClass c01 = UIAppearance . toObjCClass ( containedIn , 0 ) ; ObjCClass c02 = UIAppearance . toObjCClass ( containedIn , 1 ) ; ObjCClass c03 = UIAppearance . toObjCClass ( containedIn , 2 ) ; ObjCClass c04 = UIAppearance . toObjCClass ( containedIn , 3 ) ; ObjCClass c05 = UIAppearance . toObjCClass ( containedIn , 4 ) ; ObjCClass c06 = UIAppearance . toObjCClass ( containedIn , 5 ) ; ObjCClass c07 = UIAppearance . toObjCClass ( containedIn , 6 ) ; ObjCClass c08 = UIAppearance . toObjCClass ( containedIn , 7 ) ; ObjCClass c09 = UIAppearance . toObjCClass ( containedIn , 8 ) ; ObjCClass c10 = UIAppearance . toObjCClass ( containedIn , 9 ) ; proxyHandle = UIAppearance . objc_appearanceForTraitCollectionWhenContainedIn ( objCClass , UIAppearance . appearanceForTraitCollectionWhenContainedIn , trait , c01 , c02 , c03 , c04 , c05 , c06 , c07 , c08 , c09 , c10 , 0 ) ; } <START_BUG> return ObjCObject . toObjCObject ( type , proxyHandle , true ) ; <END_BUG> } }

Fix:
return ObjCObject . toObjCObject ( type , proxyHandle , 0 , true ) ;