private static PsiElement findGuard(PsiElement element) {
    PsiElement guard = element;
    do {
      guard = PsiTreeUtil.getParentOfType(guard, PsiMethod.class, PsiClassInitializer.class, PsiClass.class, PsiComment.class);
    }
    while (guard instanceof PsiAnonymousClass);
    return guard;
  }
private static PsiElement findGuard(PsiElement element)