Buggy code:
public final class SerializableChecker extends ObjectOutputStream { private static final Logger logger = LoggerFactory . getLogger ( SerializableChecker . class ) ; public static final class WicketNotSerializableException extends WicketRuntimeException { private static final long serialVersionUID = 1L ; WicketNotSerializableException ( String message , Throwable cause ) { } } private static class NoopOutputStream extends OutputStream { @ Override public void close ( ) { } @ Override public void flush ( ) { } @ Override public void write ( byte [ ] b ) { } @ Override public void write ( byte [ ] b , int i , int l ) { } @ Override public void write ( int b ) { } } private abstract static class ObjectOutputAdaptor implements ObjectOutput { public void close ( ) throws IOException { } public void flush ( ) throws IOException { } public void write ( byte [ ] b ) throws IOException { } public void write ( byte [ ] b , int off , int len ) throws IOException { } public void write ( int b ) throws IOException { } public void writeBoolean ( boolean v ) throws IOException { } public void writeByte ( int v ) throws IOException { } public void writeBytes ( String s ) throws IOException { } public void writeChar ( int v ) throws IOException { } public void writeChars ( String s ) throws IOException { } public void writeDouble ( double v ) throws IOException { } public void writeFloat ( float v ) throws IOException { } public void writeInt ( int v ) throws IOException { } public void writeLong ( long v ) throws IOException { } public void writeShort ( int v ) throws IOException { } public void writeUTF ( String str ) throws IOException { } } private static final class TraceSlot { private final String fieldDescription ; private final Object object ; TraceSlot ( Object object , String fieldDescription ) { } @ Override public String toString ( ) { } } private static final SerializableChecker . NoopOutputStream DUMMY_OUTPUT_STREAM = new SerializableChecker . NoopOutputStream ( ) ; private static final Logger log = LoggerFactory . getLogger ( SerializableChecker . class ) ; private static boolean available = true ; private static Method LOOKUP_METHOD ; private static Method GET_CLASS_DATA_LAYOUT_METHOD ; private static Method GET_NUM_OBJ_FIELDS_METHOD ; private static Method GET_OBJ_FIELD_VALUES_METHOD ; private static Method GET_FIELD_METHOD ; private static Method HAS_WRITE_REPLACE_METHOD_METHOD ; private static Method INVOKE_WRITE_REPLACE_METHOD ; public static boolean isAvailable ( ) { } private final LinkedList < SerializableChecker . TraceSlot > traceStack = new LinkedList < SerializableChecker . TraceSlot > ( ) ; private final Map < Object , Object > checked = new IdentityHashMap < Object , Object > ( ) ; private final LinkedList < String > nameStack = new LinkedList < String > ( ) ; private Object root ; private final Map < Class < ? > , Object > writeObjectMethodCache = Generics . newHashMap ( ) ; private String simpleName = "" ; private String fieldDescription ; private final NotSerializableException exception ; public SerializableChecker ( NotSerializableException exception ) throws IOException { } @ Override public void reset ( ) throws IOException { } private void check ( Object obj ) { } private void checkFields ( Object obj , ObjectStreamClass desc ) { int numFields ; try { numFields = ( ( Integer ) ( SerializableChecker . GET_NUM_OBJ_FIELDS_METHOD . invoke ( desc , ( ( Object [ ] ) ( null ) ) ) ) ) . intValue ( ) ; } catch ( IllegalAccessException e ) { throw new RuntimeException ( e ) ; } catch ( InvocationTargetException e ) { throw new RuntimeException ( e ) ; } if ( numFields > 0 ) { int numPrimFields ; ObjectStreamField [ ] fields = desc . getFields ( ) ; Object [ ] objVals = new Object [ numFields ] ; numPrimFields = ( fields . length ) - ( objVals . length ) ; try { SerializableChecker . GET_OBJ_FIELD_VALUES_METHOD . invoke ( desc , new Object [ ] { obj , objVals } ) ; } catch ( IllegalAccessException e ) { throw new RuntimeException ( e ) ; } catch ( InvocationTargetException e ) { throw new RuntimeException ( e ) ; } for ( int i = 0 ; i < ( objVals . length ) ; i ++ ) { if ( ( ( ( ( ( objVals [ i ] ) instanceof String ) || ( ( objVals [ i ] ) instanceof Number ) ) || ( ( objVals [ i ] ) instanceof Date ) ) || ( ( objVals [ i ] ) instanceof Boolean ) ) || ( ( objVals [ i ] ) instanceof Class ) ) { continue ; } if ( checked . containsKey ( objVals [ i ] ) ) { continue ; } ObjectStreamField fieldDesc = fields [ ( numPrimFields + i ) ] ; Field field ; try { field = ( ( Field ) ( SerializableChecker . GET_FIELD_METHOD . invoke ( fieldDesc , ( ( Object [ ] ) ( null ) ) ) ) ) ; } catch ( IllegalAccessException e ) { throw new RuntimeException ( e ) ; } catch ( InvocationTargetException e ) { throw new RuntimeException ( e ) ; } <START_BUG> String fieldName = field . getName ( ) ; <END_BUG> simpleName = field . getName ( ) ; fieldDescription = field . toString ( ) ; check ( objVals [ i ] ) ; } } } private StringBuffer currentPath ( ) { } private final String toPrettyPrintedStack ( String type ) { } @ Override protected final void writeObjectOverride ( Object obj ) throws IOException { } }

Fix:
field . getName ( ) ;