public short getNewCapacity() {
     	short newCapacity;
        if (capacity == Short.MAX_VALUE) {
            return -1;
        }
        else if (capacity < Short.MAX_VALUE/2) {

            newCapacity = (short)(capacity*2);
        }
        else{
            newCapacity = Short.MAX_VALUE;
        }
        return newCapacity;
    }
Computes the next size that should be used to grow the index capacity.
Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ShortListIndexer.java