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

			newCapacity = capacity * 2;
        }
        else{
            newCapacity = Integer.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/IntListIndexer.java