code: public int lookup(Object key, int hash) {
          Object node;
          int hash1 = hash ^ (hash >>> 15);
          int hash2 = (hash ^ (hash << 6)) | 1; //ensure coprimeness
          int deleted = -1;
          for (int i = hash1 & mask;; i = (i + hash2) & mask) {
              node = objs[i];
              if (node == key)
                  return i;
              if (node == null)
                  return deleted >= 0 ? deleted : i;
              if (node == DELETED && deleted < 0)
                  deleted = i;
          }
      }
docs: Find either the index of a key's value, or the index of an available space.
  
  @param key The key to whose value you want to find.
  @param hash The hash code of this key.
  @return Either the index of the key's value, or an index pointing to
  unoccupied space.