final int insert(String name) {
        if (used == capacity) {
            rehash();
        }
        int prev = Math.abs(name.hashCode() % hashSize());
        int entry = hash[prev];
        while (entry != 0) {
            final int sym = hash[entry];
            if (names[sym].equals(name)) { // found entry
                return sym;
            }
            prev = entry + 1;
            entry = hash[prev];
        }
        final int insertIdx = (hashSize() + (used << 1));
        hash[prev] = insertIdx;
        hash[insertIdx] = used;
        names[used++] = name;
        return (used - 1);
    }
Add a name to the symbol table; if the name is already
in the symbol table just returns the id it already had.
@param name the name to insert
@return the id now associated with the name
vespajlib/src/main/java/com/yahoo/slime/SymbolTable.java