code: public synchronized Progress addPhase() {
      Progress phase = new Progress();
      phases.add(phase);
      phase.parent = this;
      progressPerPhase = 1.0f / (float)phases.size();
      return phase;
    }
docs: Adds a node to the tree.