private static TreeElement getNotNullParent(TreeElement cur) {
    TreeElement parent = cur.getTreeParent();
    if (parent == null) {
      diagnoseNullParent(cur);
    }
    return parent;
  }
private static TreeElement getNotNullParent(TreeElement cur)