code: private float[] getReduceAvarageProgresses(int tasksPerBar, int index
        , TaskReport[] reports ) {
      float[] progresses = new float[] {0,0,0};
      int k=0;
      for(;k < tasksPerBar && index + k < reports.length; k++) {
        float progress = reports[index+k].getProgress();
        for(int j=0; progress > 0 ; j++, progress -= oneThird) {
          if(progress > oneThird)
            progresses[j] += 1f;
          else 
            progresses[j] += progress * 3 ;
        }
      }
      for(int j=0; j<3; j++) { progresses[j] /= k;}
      
      return progresses;
    }
docs: Computes average progresses per bar