code: private T nextWrapper(Iterator<T> it) {
          try {
              if (trace != null) {
                  trace.add(new TraceEntry(System.nanoTime(), System.currentTimeMillis(),
                          NextOrHasNext.NEXT, debugLabels.get(it)));
              }
              return it.next();
          } catch (RuntimeException e) {
              logTrace();
              throw e;
          }
      }
docs: Get and return the next value from an iterator, and add a tracing record if enabled.
  Logs tracing info if a RuntimeException occurs.