code: private void createNewNode(QueryNode childQueryNode, TreeNode parentNode,
                                 Optional<BinaryOrderedOperatorNode.ArgumentPosition> optionalPosition, boolean canReplace)
              throws IllegalTreeUpdateException {
          TreeNode childNode = new TreeNode(childQueryNode);
          insertNodeIntoIndex(childQueryNode, childNode);
  
          childrenIndex.put(childNode, createChildrenRelation(childNode));
  
          parentIndex.put(childNode, parentNode);
          accessChildrenRelation(parentNode).addChild(childNode, optionalPosition, canReplace);
      }
docs: Low-level