private int switchChildrenToJoinedList(int parentId, int childrenCount, int slotsToReserve) {
      int start = myJoinedChildrenList.size();
      assert start > 0;
      for (int i = 0; i < childrenCount; i++) {
        myJoinedChildrenList.add(parentId + i + 1);
      }
      for (int i = 0; i < slotsToReserve; i++) {
        myJoinedChildrenList.add(0);
      }
      myStubData.set(childrenStartIndex(parentId), start);
      return start;
    }
private int switchChildrenToJoinedList(int parentId, int childrenCount, int slotsToReserve)