ProblemDescriptor (@NotNull final PsiMethodCallExpression call) { final PsiElement methodNameReference = call.getMethodExpression().getReferenceNameElement(); if (methodNameReference == null) return null; if (isStringFormatCallRedundant(call)) { return myManager.createProblemDescriptor(methodNameReference, InspectionGadgetsBundle.message("redundant.call.problem.descriptor"), new RemoveRedundantStringFormatFix(), ProblemHighlightType.GENERIC_ERROR_OR_WARNING, myIsOnTheFly); } final PsiMethodCallExpression printlnCall = getDirectParentMethod(call); final boolean isPrintlnCall = PRINTSTREAM_PRINTLN.test(printlnCall); if (!isPrintlnCall) { if (!PRINTSTREAM_PRINT.test(printlnCall)) return null; } return myManager.createProblemDescriptor(methodNameReference, InspectionGadgetsBundle.message("redundant.call.problem.descriptor"), new ReplaceStringFormatWithPrintfFix(isPrintlnCall), ProblemHighlightType.GENERIC_ERROR_OR_WARNING, myIsOnTheFly); }