code: public String findSymbol(char[] buffer, int start, int len, int hash)
      {
          // Sanity check:
          if (len < 1) {
              return EMPTY_STRING;
          }
  
          hash &= mIndexMask;
  
          String sym = mSymbols[hash];
  
          // Optimal case; checking existing primary symbol for hash index:
          if (sym != null) {
              // Let's inline primary String equality checking:
              if (sym.length() == len) {
                  int i = 0;
                  do {
                      if (sym.charAt(i) != buffer[start+i]) {
                          break;
                      }
                  } while (++i < len);
                  // Optimal case; primary match found
                  if (i == len) {
                      return sym;
                  }
              }
              // How about collision bucket?
              Bucket b = mBuckets[hash >> 1];
              if (b != null) {
                  sym = b.find(buffer, start, len);
                  if (sym != null) {
                      return sym;
                  }
              }
          }
  
          // Need to expand?
          if (mSize >= mSizeThreshold) {
              rehash();
              /* Need to recalc hash; rare occurence (index mask has been
               * recalculated as part of rehash)
               */
              hash = calcHash(buffer, start, len) & mIndexMask;
          } else if (!mDirty) {
              // Or perhaps we need to do copy-on-write?
              copyArrays();
              mDirty = true;
          }
          ++mSize;
  
          String newSymbol = new String(buffer, start, len);
          if (mInternStrings) {
              newSymbol = newSymbol.intern();
          }
          // Ok; do we need to add primary entry, or a bucket?
          if (mSymbols[hash] == null) {
              mSymbols[hash] = newSymbol;
          } else {
              int bix = hash >> 1;
              mBuckets[bix] = new Bucket(newSymbol, mBuckets[bix]);
          }
  
          return newSymbol;
      }
docs: /*
  public String findSymbol(char[] buffer, int start, int len)
  {
  return findSymbol(buffer, start, len, calcHash(buffer, start, len));
  }