code: public void driftHandled(boolean dropOld)
      {
          /*
           * Iterate through and either drop everything to the left OR the right
           * Track statiscits so that we can update allStats
           */
          Iterator<OnLineStatistics> testIter = windows.descendingIterator();
          OnLineStatistics leftStats = new OnLineStatistics();
       
          while (testIter.hasNext())
          {
              OnLineStatistics windowItem = testIter.next();
  
              //accumulate left side statistics
              if(leftStats.getSumOfWeights() < driftStart)
              {
                  leftStats.add(windowItem);
                  if(dropOld)
                      testIter.remove();
              }
              else
              {
                  if(!dropOld)
                      testIter.remove();
              }
          }
          
          if(dropOld)
              allStats.remove(leftStats);
          else
              allStats = leftStats;
          time = (int) allStats.getSumOfWeights();
  
          leftMean = leftVariance = rightMean = rightVariance = Double.NaN;
  
          //Calling at the end b/c we need driftStart's value
          super.driftHandled();
      }
docs: This implementation of ADWIN allows for choosing to drop either the old
  values, as is normal for a drift detector, <i>or</i> to drop the newer
  values. Passing {@code true} will result in the standard behavior of
  calling {@link #driftHandled() }. <br>
  If {@code false} is passed in to drop the <i>newer</i> values that
  drifted it is probably that continuing to add new examples will continue
  to cause detections.
  
  @param dropOld {@code true} to drop the older values out of the window
  that we drifted away from, or {@code false} to drop the newer values and
  retain the old ones.