void addStub(@NotNull StubBase<?> stub, @Nullable StubBase<?> parent, @Nullable IStubElementType<?, ?> type) {
    int stubId = size();
    stub.id = stubId;

    int parentId = parent == null ? -1 : parent.id;
    if (nonDfsOrderDetected(parentId, stubId)) {
      Objects.requireNonNull(myTempState).switchChildrenToTempMap(parentId);
    }

    addStub(stubId, parentId, type == null ? 0 : type.getIndex());
  }
void addStub(@NotNull StubBase<?> stub, @Nullable StubBase<?> parent, @Nullable IStubElementType<?, ?> type)