Rehashes to a bigger size.
968897
protected void rehash(int newCapacity)
  {
    HashIntSet rehashed = new HashIntSet(newCapacity);
    @SuppressWarnings("hiding")
    int[] cells = rehashed.cells;
    for (int element : this.cells) {
      if (element < 0)
      // removed or empty
      {
        continue;
      }

      // add the element
      cells[-(rehashed.findElementOrEmpty(element) + 1)] = element;
    }
    this.cells = cells;
    freecells = newCapacity - size;
    modCount++;
  }
96861
protected void rehash(int newCapacity) {
	int oldCapacity = table.length;
	//if (oldCapacity == newCapacity) return;
	
	long oldTable[] = table;
	int oldValues[] = values;
	byte oldState[] = state;

	long newTable[] = new long[newCapacity];
	int newValues[] = new int[newCapacity];
	byte newState[] = new byte[newCapacity];

	this.lowWaterMark  = chooseLowWaterMark(newCapacity,this.minLoadFactor);
	this.highWaterMark = chooseHighWaterMark(newCapacity,this.maxLoadFactor);

	this.table = newTable;
	this.values = newValues;
	this.state = newState;
	this.freeEntries = newCapacity-this.distinct; // delta
	
	for (int i = oldCapacity ; i-- > 0 ;) {
		if (oldState[i]==FULL) {
			long element = oldTable[i];
			int index = indexOfInsertion(element);
			newTable[index]=element;
			newValues[index]=oldValues[i];
			newState[index]=FULL;
		}
	}
}
1325282
private void enlargeCapacity(int key) {
	int diff = offCount - offset;

	int newSize = arr.length;
	if (newSize < 1) newSize = 1;
	while (newSize < key + offset + diff) {
	    newSize *= 2;
	}
	if (newSize > arr.length) {
	    Object[] na = new Object[newSize];
	    for (int i = offset; i < offset + size; i++) {
		na[i + diff] = arr[i];
	    }
	    arr = na;
	    offset += diff;
	}
    }
1112572
private void resize(int newCapacity) {
        // assert (newCapacity & -newCapacity) == newCapacity; // power of 2
        int newLength = newCapacity * 2;

        long[] oldTable = table;
        int oldLength = oldTable.length;
        if (oldLength == 2*MAXIMUM_CAPACITY) { // can't expand any further
            if (threshold == MAXIMUM_CAPACITY-1)
                throw new IllegalStateException("Capacity exhausted.");
            threshold = MAXIMUM_CAPACITY-1;  // Gigantic map!
            return;
        }
        if (oldLength >= newLength)
            return;

        long[] newTable = new long[newLength];
        threshold = (newCapacity * 3) / 4;

        for (int j = 0; j < oldLength; j += 2) {
            long key = oldTable[j];
            if (key != 0) {
                long value = oldTable[j+1];
                int i = hash(key, newLength);
                while (newTable[i] != 0)
                    i = nextKeyIndex(i, newLength);
                newTable[i] = key;
                newTable[i + 1] = value;
            }
        }
        table = newTable;
    }
1163317
public static void reshapeDown(ImageBase image, int inputWidth, int inputHeight, int squareWidth) {
		int w = downSampleSize(inputWidth,squareWidth);
		int h = downSampleSize(inputHeight,squareWidth);

		image.reshape(w,h);
	}
1206893
def rehash(path, blocksize=1 << 20):
    # type: (str, int) -> Tuple[str, str]
    """"""
    h = hashlib.sha256()
    length = 0
    with open(path, 'rb') as f:
        for block in read_chunks(f, size=blocksize):
            length += len(block)
            h.update(block)
    digest = 'sha256=' + urlsafe_b64encode(
        h.digest()
    ).decode('latin1').rstrip('=')
    # unicode/str python2 issues
    return (digest, str(length))
790820
PairTable rebuild(final int newLgSizeInts) {
    checkLgSizeInts(newLgSizeInts);
    final int newSize = 1 << newLgSizeInts;
    final int oldSize = 1 << lgSizeInts;
    rtAssert(newSize > numPairs);
    final int[] oldSlotsArr = slotsArr;
    slotsArr = new int[newSize];
    Arrays.fill(slotsArr, -1);
    lgSizeInts = newLgSizeInts;
    for (int i = 0; i < oldSize; i++) {
      final int item = oldSlotsArr[i];
      if (item != -1) { mustInsert(this, item); }
    }
    return this;
  }
384115
private void resize(Object[] oldTable, int newSize)
    {
        int oldCapacity = oldTable.length;
        int end = oldCapacity - 1;
        Object last = arrayAt(oldTable, end);
        if (this.size() < ((end*3) >> 2) && last == RESIZE_SENTINEL)
        {
            return;
        }
        if (oldCapacity >= MAXIMUM_CAPACITY)
        {
            throw new RuntimeException("max capacity of map exceeded");
        }
        ResizeContainer resizeContainer = null;
        boolean ownResize = false;
        if (last == null || last == RESIZE_SENTINEL)
        {
            synchronized (oldTable) // allocating a new array is too expensive to make this an atomic operation
            {
                if (arrayAt(oldTable, end) == null)
                {
                    setArrayAt(oldTable, end, RESIZE_SENTINEL);
                    resizeContainer = new ResizeContainer(allocateTable(newSize), oldTable.length - 2);
                    setArrayAt(oldTable, end, resizeContainer);
                    ownResize = true;
                }
            }
        }
        if (ownResize)
        {
            this.transfer(oldTable, resizeContainer);

            Object[] src = this.table;
            while (!TABLE_UPDATER.compareAndSet(this, oldTable, resizeContainer.nextArray))
            {
                // we're in a double resize situation; we'll have to go help until it's our turn to set the table
                if (src != oldTable)
                {
                    this.helpWithResize(src);
                }
            }
        }
        else
        {
            this.helpWithResize(oldTable);
        }
    }
114719
public void resize(int maxSize) {
		this.maxSize = maxSize;
		if (cache.size() > maxSize) {
			int count = 0;
			Iterator<Long> rowIds = cache.keySet().iterator();
			while (rowIds.hasNext()) {
				rowIds.next();
				if (++count > maxSize) {
					rowIds.remove();
				}
			}
		}
	}
1251262
protected void resizeTo(long newCapacity) {
        final long oldCapacity = capacity();
        final long oldAllocatedSize = HEADER_SIZE + oldCapacity * slotLength;
        final MemoryAllocator oldMalloc;
        final long oldAddress;
        if (auxMalloc != null) {
            final long size = size();
            oldAddress = move(baseAddress, oldCapacity, malloc, auxMalloc);
            oldMalloc = auxMalloc;
            auxAllocateAndAdjustFields(oldAddress, size, oldCapacity, newCapacity);
        } else {
            oldMalloc = malloc;
            oldAddress = baseAddress;
            allocateArrayAndAdjustFields(size(), newCapacity);
        }
        rehash(oldCapacity, oldAddress);
        oldMalloc.free(oldAddress - HEADER_SIZE, oldAllocatedSize);
    }
288098
private void resize(int newSize)
    {
        Object[] keys = _keys;
        int values[] = _values;

        _keys = new Object[newSize];
        _values = new int[newSize];
        _size = 0;

        _prime = getBiggestPrime(_keys.length);

        for (int i = keys.length - 1; i >= 0; i--) {
            Object key = keys[i];

            if (key != null) {
                put(key, values[i], true);
            }
        }
    }
1366723
protected void rehash (int ncount)
    {
        int[] obuckets = _buckets;
        createBuckets(ncount);

        for (int idx = 0, pos = 0; pos < _size; idx++) {
            int value = obuckets[idx];
            if (value != _sentinel) {
                readd(value);
                pos++;
            }
        }
    }
172847
def reshape(self, *dims):
        """"""
        shape = _dims2shape(*dims)
        if _volume(shape) != self.size:
            raise ValueError("expected shape with equal volume")
        return self.__class__(self._items, shape, self.ftype)
88179
private void resize() {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "resize", table.length);

    Entry[] newTable = new Entry[table.length + (table.length / 2)];

    /* We have to walk the entire SchemaSet, rehashing each Entry and putting */
    /* it in its new home. As contains() may be running at the same time, we  */
    /* have to create a new Entry instance for each.                          */
    for (int i = 0; i < table.length; i++) {
      Entry ent = table[i];
      Entry newEntry;
      int j;
      while (ent != null) {
        j = hashToTable(ent.schemaId, newTable);
        newEntry = new Entry(ent.schemaId, newTable[j]);
        newTable[j] = newEntry;
        ent = ent.next;
      }
    }

    /* Now replace the old table with the new one. */
    table = newTable;

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "resize", table.length);
  }
216519
protected void resizeBuckets (int newsize)
    {
        Record[] oldbuckets = _buckets;
        _buckets = new Record[newsize];

        // we shuffle the records around without allocating new ones
        int index = oldbuckets.length;
        while (index-- > 0) {
            Record oldrec = oldbuckets[index];
            while (oldrec != null) {
                Record newrec = oldrec;
                oldrec = oldrec.next;

                // always put the newrec at the start of a chain
                int newdex = Math.abs(newrec.key)%_buckets.length;
                newrec.next = _buckets[newdex];
                _buckets[newdex] = newrec;
            }
        }
    }
470501
def stripped_size
      80 + Bitcoin.pack_var_int(transactions.size).bytesize +
          transactions.inject(0){|sum, tx| sum + tx.serialize_old_format.bytesize}
    end
1046215
public void resize(int newSize) {
    if (newSize > elements.length) {
      reallocate(Math.max(newSize, 2 * elements.length));
    } else {
      for (int i = size; i < newSize; i++) {
        elements[i] = 0;
      }
    }
    size = newSize;
  }