Buggy code:
public class AntBytesImpl implements AntBytes { protected long getLongFromField ( Field f , Object o ) throws IllegalAccessException { } @ Override public < T > byte [ ] toAntBytes ( T o ) { } @ Override public < T > byte [ ] toAntBytes ( T o , int size ) { byte [ ] output = new byte [ size ] ; for ( Field f : o . getClass ( ) . getDeclaredFields ( ) ) for ( Annotation anon : f . getAnnotations ( ) ) try { Class type = anon . annotationType ( ) ; if ( type == ( U8BIT . class ) ) { U8BIT u8bit = ( ( U8BIT ) ( anon ) ) ; BitBytes . output ( output , u8bit . value ( ) , u8bit . startBit ( ) , getLongFromField ( f , o ) , 8 ) ; } else if ( type == ( U16BIT . class ) ) { U16BIT u16bit = ( ( U16BIT ) ( anon ) ) ; BitBytes . output ( output , u16bit . value ( ) , u16bit . startBit ( ) , getLongFromField ( f , o ) , 16 ) ; } else if ( type == ( U32BIT . class ) ) { U32BIT u32bit = ( ( U32BIT ) ( anon ) ) ; BitBytes . output ( output , u32bit . value ( ) , u32bit . startBit ( ) , getLongFromField ( f , o ) , 32 ) ; } else if ( type == ( LSBU16BIT . class ) ) { LSBU16BIT lsbu16bit = ( ( LSBU16BIT ) ( anon ) ) ; BitBytes . outputLSB ( output , lsbu16bit . value ( ) , lsbu16bit . startBit ( ) , getLongFromField ( f , o ) , 16 ) ; } else if ( type == ( LSBU32BIT . class ) ) { LSBU32BIT lsbu32bit = ( ( LSBU32BIT ) ( anon ) ) ; BitBytes . outputLSB ( output , lsbu32bit . value ( ) , lsbu32bit . startBit ( ) , getLongFromField ( f , o ) , 32 ) ; } else if ( type == ( LSBUXBIT . class ) ) { LSBUXBIT uxbit = ( ( LSBUXBIT ) ( anon ) ) ; <START_BUG> BitBytes . output ( output , uxbit . value ( ) , uxbit . startBit ( ) , getLongFromField ( f , o ) , uxbit . bitLength ( ) ) ; <END_BUG> } else if ( type == ( UXBIT . class ) ) { UXBIT uxbit = ( ( UXBIT ) ( anon ) ) ; BitBytes . output ( output , uxbit . value ( ) , uxbit . startBit ( ) , getLongFromField ( f , o ) , uxbit . bitLength ( ) ) ; } else if ( type == ( S8BIT . class ) ) { S8BIT s8bit = ( ( S8BIT ) ( anon ) ) ; BitBytes . output ( output , s8bit . value ( ) , s8bit . startBit ( ) , getLongFromField ( f , o ) , 8 ) ; } else if ( type == ( S16BIT . class ) ) { S16BIT s16bit = ( ( S16BIT ) ( anon ) ) ; BitBytes . output ( output , s16bit . value ( ) , s16bit . startBit ( ) , getLongFromField ( f , o ) , 16 ) ; } else if ( type == ( S32BIT . class ) ) { S32BIT s32bit = ( ( S32BIT ) ( anon ) ) ; BitBytes . output ( output , s32bit . value ( ) , s32bit . startBit ( ) , getLongFromField ( f , o ) , 32 ) ; } else if ( type == ( SXBIT . class ) ) { SXBIT sxbit = ( ( SXBIT ) ( anon ) ) ; BitBytes . output ( output , sxbit . value ( ) , sxbit . startBit ( ) , getLongFromField ( f , o ) , sxbit . bitLength ( ) ) ; } else if ( type == ( Page . class ) ) { BitBytes . output ( output , 0 , ( ( Page ) ( anon ) ) . value ( ) , 8 ) ; } } catch ( IllegalAccessException ignore ) { } return output ; } protected void setLongOnField ( Field field , Object object , long value ) { } protected void setIntOnField ( Field field , Object object , long value ) { } protected void setOnField ( boolean asLong , Field field , Object object , long value ) { } @ Override public < T > T instanceFromAntBytes ( Class < ? extends T > clazz , byte [ ] antBytes ) { } @ Override public < T > T fromAntBytes ( T object , byte [ ] antBytes ) { } Map < Integer , Object > mapping = Collections . synchronizedMap ( new HashMap < Integer , Object > ( ) ) ; protected int findPage ( Class clazz ) { } protected boolean hasRequired ( Class clazz ) { } public boolean hasAllRequired ( Class clazz , byte [ ] antBytes ) { } @ Override public void register ( Class clazz ) { } @ Override public Object fromAntBytes ( byte [ ] antBytes ) { } }

Fix:
BitBytes . outputLSB ( output , uxbit . value ( ) , uxbit . startBit ( ) , getLongFromField ( f , o ) , uxbit . bitLength ( ) ) ;