code: private void moveNextResults(boolean clearPreviousResults) {
          if (clearPreviousResults) {
              allResults.clear();
          }
          allResults.addAll(nextResults);
          nextResults.clear();
      }
docs: Moves the contents of the nextResults buffer into allResults and resets
  the buffer.
  
  @param clearPreviousResults
  Whether it should clear previous results in allResults field.