public static @NotNull PsiAnchor create(@NotNull PsiElement element) {
    PsiUtilCore.ensureValid(element);

    PsiAnchor anchor = doCreateAnchor(element);
    if (ApplicationManager.getApplication().isUnitTestMode() && !ApplicationManagerEx.isInStressTest()) {
      PsiElement restored = anchor.retrieve();
      if (!element.equals(restored)) {
        Logger.getInstance(PsiAnchor.class)
          .error("Cannot restore element " + element  + " of " + element.getClass()
                 + " from anchor " + anchor + ", getting " + restored + " instead");
      }
    }
    return anchor;
  }
public static @NotNull PsiAnchor create(@NotNull PsiElement element)