private static boolean isVariableNamedSameAsSuper(PsiVariable variable) {
      if (!(variable instanceof PsiParameter parameter)) {
        return false;
      }
      final PsiElement scope = parameter.getDeclarationScope();
      if (!(scope instanceof PsiMethod method)) {
        return false;
      }
      final String variableName = variable.getName();
      final int index =
        method.getParameterList().getParameterIndex(parameter);
      final PsiMethod[] superMethods = method.findSuperMethods();
      for (PsiMethod superMethod : superMethods) {
        final PsiParameter[] parameters =
          superMethod.getParameterList().getParameters();
        final PsiParameter overriddenParameter = parameters[index];
        if (overriddenParameter.getName().equals(variableName)) {
          return true;
        }
      }
      return false;
    }
private static boolean isVariableNamedSameAsSuper(PsiVariable variable)