void (@NotNull Project project, @NotNull PsiElement startElement, @NotNull ModPsiUpdater updater) { final PsiMethodCallExpression call = ObjectUtils.tryCast(startElement.getParent().getParent(), PsiMethodCallExpression.class); if (!isRedundantToString(call)) return; final PsiReferenceExpression methodExpression = call.getMethodExpression(); final PsiExpression qualifier = ExpressionUtils.getEffectiveQualifier(methodExpression); if (qualifier == null) { // Should not happen normally as toString() should always resolve to the innermost class // Probably may happen only if SDK is broken (e.g. no java.lang.Object found) return; } new CommentTracker().replaceAndRestoreComments(call, qualifier); }