private boolean calculateNewSideEffect(@NotNull PsiNewExpression newExpr) {
    if (newExpr.getAnonymousClass() != null ||
        mayHaveSideEffect(newExpr.getArrayInitializer())) {
      return true;
    }
    PsiJavaCodeReferenceElement ref = newExpr.getClassReference();
    return ref == null || !(ref.resolve() instanceof PsiClass psiClass) || 
           !ClassUtils.isImmutableClass(psiClass) || calculateSideEffect(newExpr, newExpr.getQualifier());
  }
private boolean calculateNewSideEffect(@NotNull PsiNewExpression newExpr)