private static @Nullable PsiClass findClassToFix(PsiElement element) {
    final PsiClass containingClass = PsiTreeUtil.getParentOfType(element, PsiClass.class);
    if (containingClass == null) {
      return null;
    }
    return containingClass.getModifierList() == null ? null : containingClass;
  }
private static @Nullable PsiClass findClassToFix(PsiElement element)