code: private void addToStreak(StackTraceElementWrapper stackTraceElementWrapper) {
      if (stackTraceElementWrapper.getStackFrameType() != currentStreakType) {
        endStreak();
        currentStreakType = stackTraceElementWrapper.getStackFrameType();
        currentStreakLength = 1;
      } else {
        currentStreakLength++;
      }
    }
docs: Either adds the given frame to the running streak or closes out the running streak and starts a
  new one.