if(values[idx] == REMOVED && bucket == -1) { bucket = idx;
if(values[idx] == REMOVED) { if(bucket == -1) bucket = idx;
	protected Object insert(long key, Object value) throws HashtableOverflowException {		if (value == null)			throw new IllegalArgumentException("Illegal value: null");		int idx = hash(key) % tabSize;		if(idx < 0)			idx *= -1;        int bucket = -1;		// look for an empty bucket		if (values[idx] == null) {			keys[idx] = key;			values[idx] = value;			++items;			return null;		} else if (values[idx] == REMOVED) {            // remember the bucket, but continue to check            // for duplicate keys            bucket = idx;        } else if (keys[idx] == key) {			// duplicate value        	Object dup = values[idx];			values[idx] = value;			return dup;		}		int rehashVal = rehash(idx);		int rehashCnt = 1;		for (int i = 0; i < tabSize; i++) {			idx = (idx + rehashVal) % tabSize;            if(values[idx] == REMOVED && bucket == -1) {                bucket = idx;			} else if (values[idx] == null) {                if(bucket > -1) {                    // store key into the empty bucket first found                    idx = bucket;                }				keys[idx] = key;				values[idx] = value;				++items;				return null;			} else if(keys[idx] == key) {				// duplicate value				Object dup = values[idx];				values[idx] = value;				return dup;			}			++rehashCnt;		}        // should never happen, but just to be sure:        // if the key has not been inserted yet, do it now        if(bucket > -1) {            keys[bucket] = key;            values[bucket] = value;            ++items;            return null;        }		throw new HashtableOverflowException();	}