code: private void fixDown(int k) {
          int j;
          while ((j = k << 1) <= size && j > 0) {
              if (j < size &&
                  queue[j].nextExecutionTime > queue[j+1].nextExecutionTime)
                  j++; // j indexes smallest kid
              if (queue[k].nextExecutionTime <= queue[j].nextExecutionTime)
                  break;
              TimerTask tmp = queue[j];  queue[j] = queue[k]; queue[k] = tmp;
              k = j;
          }
      }
docs: Establishes the heap invariant (described above) in the subtree
  rooted at k, which is assumed to satisfy the heap invariant except
  possibly for node k itself (which may have a nextExecutionTime greater
  than its children's).
  
  This method functions by "demoting" queue[k] down the hierarchy
  (by swapping it with its smaller child) repeatedly until queue[k]'s
  nextExecutionTime is less than or equal to those of its children.