Buggy code:
public final class ObjectValue { public static final class AccessorSlot extends ObjectValue . Slot { static final long serialVersionUID = - 4900574849788797588L ; public Object getter ; public Object setter ; AccessorSlot ( String name , int indexOrHash , int attributes ) { } @ Override public Property getPropertyDescriptor ( Environment env , Scriptable scope ) { } @ Override public Object getValue ( Scriptable start ) { } @ Override public void markDeleted ( ) { } @ Override public boolean setValue ( Object value , Scriptable owner , Scriptable start ) { } @ Override public String toString ( ) { } } public static class RelinkedSlot extends ObjectValue . Slot { final ObjectValue . Slot origin ; RelinkedSlot ( ObjectValue . Slot slot ) { } @ Override public int getAttributes ( ) { } @ Override public Property getPropertyDescriptor ( Environment env , Scriptable scope ) { } @ Override public Object getValue ( Scriptable start ) { } @ Override public void markDeleted ( ) { } @ Override public void setAttributes ( int value ) { } @ Override public boolean setValue ( Object value , Scriptable owner , Scriptable start ) { } @ Override public String toString ( ) { } private void writeObject ( ObjectOutputStream out ) throws IOException { } } public static class Slot implements Serializable { private static final long serialVersionUID = - 6090581677123995491L ; public int indexOrHash ; public String name ; public transient volatile ObjectValue . Slot orderedNext ; public volatile Object value ; public transient volatile boolean wasDeleted ; volatile short attributes ; transient ObjectValue . Slot next ; Slot ( String name , int indexOrHash , int attributes ) { } public int getAttributes ( ) { } public Property getPropertyDescriptor ( Environment env , Scriptable scope ) { } public Object getValue ( Scriptable start ) { } public void markDeleted ( ) { } public synchronized void setAttributes ( int value ) { } public boolean setValue ( Object value , Scriptable owner , Scriptable start ) { } @ Override public String toString ( ) { } private void readObject ( ObjectInputStream in ) throws IOException , ClassNotFoundException { } } public static final ObjectValue . Slot unwrapSlot ( ObjectValue . Slot slot ) { } static final void addKnownAbsentSlot ( ObjectValue . Slot [ ] slots , ObjectValue . Slot slot , int insertPos ) { } static final int getSlotIndex ( int tableSize , int indexOrHash ) { } public static final int SLOT_CONVERT_ACCESSOR_TO_DATA = 5 ; public static final int SLOT_MODIFY = 2 ; public static final int SLOT_MODIFY_CONST = 3 ; public static final int SLOT_MODIFY_GETTER_SETTER = 4 ; public static final int SLOT_QUERY = 1 ; private static final int INITIAL_SLOT_SIZE = 4 ; public ObjectValue . Slot firstAdded ; public ObjectValue . Slot lastAdded ; private volatile Map < Object , Object > associatedValues ; private int count ; private boolean extensible ; private Scriptable prototype ; private ObjectValue . Slot [ ] slots ; public ObjectValue ( boolean extensible ) { } @ SuppressWarnings ( "unused" ) private ObjectValue ( ) { } public < T > void addLazilyInitializedValue ( String id , int index , LaziedValue < T > init , int attributes ) { } public void checkNotSealed ( String name , int index ) { } public ObjectValue . Slot findAttributeSlotModify ( String name , int index ) { } public ObjectValue . Slot findAttributeSlotQuery ( String name , int index ) { } public final Object getAssociatedValue ( Object key ) { } public int getCount ( ) { } public Scriptable getPrototypeObject ( ) { } public ObjectValue . Slot getSlotConvertAccessorToData ( Environment env , Object id ) { } public ObjectValue . Slot getSlotModify ( Environment env , Object id ) { } public ObjectValue . Slot getSlotModify ( String name , int index ) { } public ObjectValue . Slot getSlotModifyConst ( String name , int index ) { } public ObjectValue . Slot getSlotModifyGetterSetter ( Environment env , Object id ) { } public ObjectValue . Slot getSlotModifyGetterSetter ( String name , int index ) { } public ObjectValue . Slot getSlotQuery ( Environment env , Object id ) { } public ObjectValue . Slot getSlotQuery ( String name , int index ) { <START_BUG> ObjectValue . Slot [ ] slotsLocalRef = slots ; <END_BUG> if ( slotsLocalRef == null ) { return null ; } final int indexOrHash = ( name != null ) ? name . hashCode ( ) : index ; return inspectSlot ( name , slotsLocalRef , indexOrHash ) ; } public ObjectValue . Slot [ ] getSlots ( ) { } public boolean isExtensible ( ) { } public final boolean isSealed ( ) { } public synchronized boolean removeSlot ( String name , int index ) { } public synchronized void seal ( ) { } public final Object setAssociateValue ( Object key , Object value ) throws NullPointerException { } public void setExtensible ( boolean extensible ) { } public void setPrototypeObject ( Scriptable prototype ) { } @ Override public String toString ( ) { } private void copyTable ( ObjectValue . Slot [ ] oldSlots , ObjectValue . Slot [ ] newSlots , int count ) { } private synchronized ObjectValue . Slot createSlot ( String name , int indexOrHash , int accessType ) { } private ObjectValue . Slot getSlotConvertAccessorToData ( String name , int index ) { } private ObjectValue . Slot inspectSlot ( String name , ObjectValue . Slot [ ] slotsLocalRef , int indexOrHash ) { } }

Fix:
final ObjectValue . Slot [ ] slotsLocalRef = slots ;