code: private static List<Integer> allocateOffsets(List<List<Integer>> offsetsStorage) {
          if ( offsetsStorage.isEmpty() ) {
              return new ArrayList<Integer>();
          } else {
              return ( offsetsStorage.remove(0) );
          }
      }
docs: Allocate an offsets list.
  
  If no discarded list is available, allocate a new list.
  
  Otherwise, use one of the discarded lists.
  
  @param offsetsStorage Storage of discarded offset lists.
  
  @return An allocated offsets list.