void add(long key, Index index) {
      if (stdOut.start < 0) {
        stdOut.start = index.stdOut.start;
      }
      if (stdErr.start < 0) {
        stdErr.start = index.stdErr.start;
      }
      if (index.stdOut.stop > stdOut.stop) {
        stdOut.stop = index.stdOut.stop;
      }
      if (index.stdErr.stop > stdErr.stop) {
        stdErr.stop = index.stdErr.stop;
      }

      children.put(key, index);
    }
    private void mark(long classId, long testId, boolean isStdout) {
      if (!index.containsKey(classId)) {
        index.put(classId, new LinkedHashMap<Long, TestCaseRegion>());
      }

      Map<Long, TestCaseRegion> testCaseRegions = index.get(classId);
      if (!testCaseRegions.containsKey(testId)) {
        TestCaseRegion region = new TestCaseRegion();
        testCaseRegions.put(testId, region);
      }

      TestCaseRegion region = testCaseRegions.get(testId);

      Region streamRegion = isStdout ? region.stdOutRegion : region.stdErrRegion;

      int total = output.total();
      if (streamRegion.start < 0) {
        streamRegion.start = total;
      }
      streamRegion.stop = total;
    }