private void switchChildrenToTempMap(int parentId) {
      if (myTempJoinedChildrenMap == null) {
        myTempJoinedChildrenMap = ContainerUtil.createConcurrentIntObjectMap();
      }

      int start = getChildrenStart(parentId);
      int count = getChildrenCount(parentId);
      MostlyUShortIntList ids = new MostlyUShortIntList(count + 1);
      switch (getChildrenStorage(start)) {
        case inPlainList:
          for (int i = 0; i < count; i++) ids.add(parentId + i + 1);
          break;
        case inJoinedList:
          for (int i = start; i < start + count; i++) ids.add(myJoinedChildrenList.get(i));
          break;
        default: throw new IllegalStateException();
      }

      MostlyUShortIntList prev = myTempJoinedChildrenMap.put(parentId, ids);
      assert prev == null: parentId;

      myStubData.set(childrenStartIndex(parentId), IN_TEMP_MAP);
    }
private void switchChildrenToTempMap(int parentId)