code: private void resizeSemiUnique(int newCapacity)
      {
          SemiUniqueEntry[] oldTable = getNonDatedTable();
          int oldCapacity = oldTable.length;
          if (oldCapacity == MAXIMUM_CAPACITY) {
              semiUniqueThreshold = Integer.MAX_VALUE;
              return;
          }
  
          SemiUniqueEntry[] newTable = new SemiUniqueEntry[newCapacity];
          transferSemiUnique(oldTable, newTable);
          nonDatedTable = newTable;
  
          /*
           * If ignoring null elements and processing ref queue caused massive
           * shrinkage, then restore old nonDatedTable.  This should be rare, but avoids
           * unbounded expansion of garbage-filled tables.
           */
          if (nonDatedEntryCount >= semiUniqueThreshold / 2) {
              semiUniqueThreshold = (int)(newCapacity * loadFactor);
          } else {
              expungeStaleEntries();
              transferSemiUnique(newTable, oldTable);
              nonDatedTable = oldTable;
          }
      }
docs: Rehashes the contents of this map into a new array with a
  larger capacity.  This method is called automatically when the
  number of keys in this map reaches its semiUniqueThreshold.
  
  If current capacity is MAXIMUM_CAPACITY, this method does not
  resize the map, but but sets semiUniqueThreshold to Integer.MAX_VALUE.
  This has the effect of preventing future calls.
  
  @param newCapacity the new capacity, MUST be a power of two;
  must be greater than current capacity unless current
  capacity is MAXIMUM_CAPACITY (in which case value
  is irrelevant).