private void rehash() {
		String[][] olddata = buckets;
		// magic numbers ... we make 4-times as many buckets.
		mask = ((mask + 1) << 2) - 1;
		buckets = new String[mask + 1][];
		lengths = new int[buckets.length];
		int hash = 0, bucketid = 0, length = 0;
		for (String[] ob : olddata) {
			if (ob == null) {
				// was an empty bucket.
				continue;
			}
			for (String val : ob) {
				if (val == null) {
					// there are no more values to rehash in this bucket.
					break;
				}
				hash = val.hashCode();
				bucketid = ((hash >>> 16) ^ hash) & mask;
				length = lengths[bucketid];
				if (length == 0) {
					buckets[bucketid] = new String[(ob.length + GROW) / GROW];
					buckets[bucketid][0] = val;
				} else {
					if (buckets[bucketid].length == length) {
						buckets[bucketid] = ArrayCopy.copyOf(
								buckets[bucketid], lengths[bucketid] + GROW);
					}
					buckets[bucketid][length] = val;
				}
				lengths[bucketid]++;
			}
		}
	}