Buggy code:
public final class ArrayContainer extends Container implements Serializable , Cloneable { private static final int DEFAULT_INIT_SIZE = 4 ; static final int DEFAULT_MAX_SIZE = 4096 ; private static final long serialVersionUID = 1L ; protected int cardinality = 0 ; short [ ] content ; public ArrayContainer ( ) { } public ArrayContainer ( final int capacity ) { } public ArrayContainer ( final int firstOfRun , final int lastOfRun ) { } private ArrayContainer ( int newCard , short [ ] newContent ) { } protected ArrayContainer ( short [ ] newContent ) { } @ Override public Container add ( final short x ) { } @ Override public ArrayContainer and ( final ArrayContainer value2 ) { } @ Override public Container and ( BitmapContainer x ) { } @ Override public ArrayContainer andNot ( final ArrayContainer value2 ) { } @ Override public ArrayContainer andNot ( BitmapContainer value2 ) { } @ Override public void clear ( ) { } @ Override public ArrayContainer clone ( ) { } @ Override public boolean contains ( final short x ) { } @ Override public void deserialize ( DataInput in ) throws IOException { } @ Override public boolean equals ( Object o ) { } @ Override public void fillLeastSignificant16bits ( int [ ] x , int i , int mask ) { } @ Override protected int getArraySizeInBytes ( ) { } @ Override public int getCardinality ( ) { } @ Override public ShortIterator getShortIterator ( ) { } @ Override public ShortIterator getReverseShortIterator ( ) { } @ Override public int getSizeInBytes ( ) { } @ Override public int hashCode ( ) { } @ Override public ArrayContainer iand ( final ArrayContainer value2 ) { } @ Override public Container iand ( BitmapContainer value2 ) { } @ Override public ArrayContainer iandNot ( final ArrayContainer value2 ) { } @ Override public ArrayContainer iandNot ( BitmapContainer value2 ) { } private void increaseCapacity ( ) { <START_BUG> int newCapacity = ( ( this . content . length ) < 64 ) ? ( this . content . length ) * 2 : ( this . content . length ) < 1024 ? ( ( this . content . length ) * 3 ) // 2 : ( ( this . content . length ) * 5 ) // 4 ; <END_BUG> if ( newCapacity > ( ArrayContainer . DEFAULT_MAX_SIZE ) ) newCapacity = ArrayContainer . DEFAULT_MAX_SIZE ; this . content = Arrays . copyOf ( this . content , newCapacity ) ; } @ Override public Container inot ( final int firstOfRange , final int lastOfRange ) { } @ Override public Container ior ( final ArrayContainer value2 ) { } @ Override public Container ior ( BitmapContainer x ) { } @ Override public Iterator < Short > iterator ( ) { } @ Override public Container ixor ( final ArrayContainer value2 ) { } @ Override public Container ixor ( BitmapContainer x ) { } protected void loadData ( final BitmapContainer bitmapContainer ) { } private void negateRange ( final short [ ] buffer , final int startIndex , final int lastIndex , final int startRange , final int lastRange ) { } @ Override public Container not ( final int firstOfRange , final int lastOfRange ) { } @ Override public Container or ( final ArrayContainer value2 ) { } @ Override public Container or ( BitmapContainer x ) { } @ Override public void readExternal ( ObjectInput in ) throws IOException , ClassNotFoundException { } @ Override public Container remove ( final short x ) { } @ Override public void serialize ( DataOutput out ) throws IOException { } @ Override public int serializedSizeInBytes ( ) { } public BitmapContainer toBitmapContainer ( ) { } @ Override public String toString ( ) { } @ Override public void trim ( ) { } @ Override protected void writeArray ( DataOutput out ) throws IOException { } @ Override public void writeExternal ( ObjectOutput out ) throws IOException { } @ Override public Container xor ( final ArrayContainer value2 ) { } @ Override public Container xor ( BitmapContainer x ) { } @ Override public int rank ( short lowbits ) { } @ Override public short select ( int j ) { } @ Override public Container limit ( int maxcardinality ) { } }

Fix:
int newCapacity = ( ( this . content . length ) == 0 ) ? ArrayContainer . DEFAULT_INIT_SIZE : ( this . content . length ) < 64 ? ( this . content . length ) * 2 : ( this . content . length ) < 1024 ? ( ( this . content . length ) * 3 ) // 2 : ( ( this . content . length ) * 5 ) // 4 ;