public static @Nullable ExceptionIsPrintedToSystemOutResult getExceptionIsPrintedToSystemOutResult(@NotNull PsiMethodCallExpression expression) {
    final PsiReferenceExpression methodExpression = expression.getMethodExpression();
    final @NonNls String methodName = methodExpression.getReferenceName();
    if (!"print".equals(methodName) && !"println".equals(methodName)) {
      return null;
    }
    final PsiExpressionList argumentList = expression.getArgumentList();
    final PsiExpression[] arguments = argumentList.getExpressions();
    if (arguments.length != 1) {
      return null;
    }
    final PsiExpression argument = arguments[0];

    if (!TypeUtils.expressionHasTypeOrSubtype(argument, CommonClassNames.JAVA_LANG_THROWABLE)) {
      return null;
    }
    final PsiMethod method = expression.resolveMethod();
    if (method == null) {
      return null;
    }
    final PsiExpression qualifier = methodExpression.getQualifierExpression();
    if (!(qualifier instanceof PsiReferenceExpression qualifierReference)) {
      return null;
    }
    final PsiElement target = qualifierReference.resolve();
    if (!(target instanceof PsiField field)) {
      return null;
    }
    final @NonNls String fieldName = field.getName();
    if (!HardcodedMethodConstants.OUT.equals(fieldName) && !HardcodedMethodConstants.ERR.equals(fieldName)) {
      return null;
    }
    final PsiClass aClass = field.getContainingClass();
    if (aClass == null || !JAVA_LANG_SYSTEM.equals(aClass.getQualifiedName())) {
      return null;
    }

    return new ExceptionIsPrintedToSystemOutResult(methodName, argument, fieldName);
  }
public static @Nullable ExceptionIsPrintedToSystemOutResult getExceptionIsPrintedToSystemOutResult(@NotNull PsiMethodCallExpression expression)