code: private void rehash()
      {
          int size = mTable.length;
          /* Let's grow aggressively; this should minimize number of
           * resizes, while adding to mem usage. But since these Maps
           * are never long-lived (only during parsing and validation of
           * a single doc), that shouldn't greatly matter.
           */
          int newSize = (size << 2);
          ElementId[] oldSyms = mTable;
          mTable = new ElementId[newSize];
  
          // Let's update index mask, threshold, now (needed for rehashing)
          mIndexMask = newSize - 1;
          mSizeThreshold <<= 2;
          
          int count = 0; // let's do sanity check
  
          for (int i = 0; i < size; ++i) {
              for (ElementId id = oldSyms[i]; id != null; ) {
                  ++count;
                  int index = calcHash(id.getId()) & mIndexMask;
                  ElementId nextIn = id.nextColliding();
                  id.setNextColliding(mTable[index]);
                  mTable[index] = id;
                  id = nextIn;
              }
          }
  
          if (count != mSize) {
              ExceptionUtil.throwInternal("on rehash(): had "+mSize+" entries; now have "+count+".");
          }
      }
docs: Method called when size (number of entries) of symbol table grows
  so big that load factor is exceeded. Since size has to remain
  power of two, arrays will then always be doubled. Main work
  is really redistributing old entries into new String/Bucket
  entries.