Buggy code:
protected int [ ] intData ; protected float [ ] floatData ; protected BaseDataBuffer ( ByteBuf buf , int length ) { } public BaseDataBuffer ( float [ ] data , boolean copy ) { } public BaseDataBuffer ( double [ ] data , boolean copy ) { } public BaseDataBuffer ( int [ ] data , boolean copy ) { } public BaseDataBuffer ( double [ ] data ) { } public BaseDataBuffer ( int [ ] data ) { } public BaseDataBuffer ( float [ ] data ) { } public BaseDataBuffer ( int length , int elementSize ) { } @ Override public AllocationMode allocationMode ( ) { } @ Override public void persist ( ) { } @ Override public boolean isPersist ( ) { } @ Override public void unPersist ( ) { } protected BaseDataBuffer ( int length ) { } @ Override public void removeReferencing ( String id ) { } @ Override public Collection < String > references ( ) { } @ Override public void addReferencing ( String id ) { } @ Override public void assign ( int [ ] indices , float [ ] data , boolean contiguous , int inc ) { } @ Override public void setData ( int [ ] data ) { } @ Override public void setData ( float [ ] data ) { } @ Override public void setData ( double [ ] data ) { } @ Override public void assign ( int [ ] indices , double [ ] data , boolean contiguous , int inc ) { } @ Override public void assign ( DataBuffer data ) { } @ Override public void assign ( int [ ] indices , float [ ] data , boolean contiguous ) { } @ Override public void assign ( int [ ] indices , double [ ] data , boolean contiguous ) { } @ Override public int length ( ) { } @ Override public void assign ( Number value ) { } @ Override public double [ ] getDoublesAt ( int offset , int length ) { } @ Override public float [ ] getFloatsAt ( int offset , int inc , int length ) { } @ Override public DataBuffer dup ( ) { } protected abstract DataBuffer create ( int length ) { } public abstract DataBuffer create ( double [ ] data ) { } public abstract DataBuffer create ( float [ ] data ) { } public abstract DataBuffer create ( int [ ] data ) { } public abstract DataBuffer create ( ByteBuf buf , int length ) { } @ Override public double [ ] getDoublesAt ( int offset , int inc , int length ) { } @ Override public float [ ] getFloatsAt ( int offset , int length ) { } @ Override public IComplexFloat getComplexFloat ( int i ) { } @ Override public IComplexDouble getComplexDouble ( int i ) { } @ Override public IComplexNumber getComplex ( int i ) { } @ Override public void put ( int i , IComplexNumber result ) { } @ Override public void assign ( int [ ] offsets , int [ ] strides , DataBuffer ... buffers ) { } @ Override public byte [ ] asBytes ( ) { } @ Override public float [ ] asFloat ( ) { } @ Override public double [ ] asDouble ( ) { } @ Override public int [ ] asInt ( ) { } @ Override public double getDouble ( int i ) { } @ Override public float getFloat ( int i ) { } @ Override public Number getNumber ( int i ) { } @ Override public void put ( int i , float element ) { } @ Override public void put ( int i , double element ) { } protected void ensureWritable ( int pos , int len ) { } @ Override public DoubleBuffer asNioDouble ( ) { } @ Override public FloatBuffer asNioFloat ( ) { } @ Override public ByteBuffer asNio ( ) { } @ Override public ByteBuf asNetty ( ) { } @ Override public void put ( int i , int element ) { } @ Override public void assign ( Number value , int offset ) { } @ Override public void flush ( ) { } @ Override public int getInt ( int ix ) { } @ Override public void assign ( int [ ] offsets , int [ ] strides , long n , DataBuffer ... buffers ) { } @ Override public void assign ( DataBuffer ... buffers ) { } @ Override public void destroy ( ) { } @ Override public boolean equals ( Object o ) { } private void readObject ( ObjectInputStream s ) { } private void writeObject ( ObjectOutputStream out ) throws IOException { } protected void doReadObject ( ObjectInputStream s ) { } protected void doWriteObject ( ObjectOutputStream out ) throws IOException { out . defaultWriteObject ( ) ; out . writeUTF ( allocationMode . name ( ) ) ; <START_BUG> out . writeLong ( length ( ) ) ; <END_BUG> out . writeUTF ( dataType ( ) . name ( ) ) ; if ( ( dataType ( ) ) == ( Type . DOUBLE ) ) { for ( int i = 0 ; i < ( length ( ) ) ; i ++ ) out . writeDouble ( getDouble ( i ) ) ; } else { for ( int i = 0 ; i < ( length ( ) ) ; i ++ ) out . writeFloat ( getFloat ( i ) ) ; } out . flush ( ) ; } @ Override public Object array ( ) { } @ Override public String toString ( ) { } @ Override public int hashCode ( ) { } }

Fix:
out . writeInt ( length ( ) ) ;