void (@NotNull PsiMethodCallExpression call) { String methodName = call.getMethodExpression().getReferenceName(); if (!"get".equals(methodName) && !"with".equals(methodName) && !"plus".equals(methodName) && !"minus".equals(methodName)) { return; } if (!CAN_BE_SIMPLIFIED_MATCHERS.matches(call)) return; int fieldArgumentIndex = 1; if ("get".equals(methodName) || "with".equals(methodName)) { fieldArgumentIndex = 0; } PsiExpression[] expressions = call.getArgumentList().getExpressions(); if (expressions.length < fieldArgumentIndex + 1) { return; } @Nullable PsiExpression fieldExpression = expressions[fieldArgumentIndex]; String chronoEnumName = getNameOfChronoEnum(fieldExpression, methodName); if (chronoEnumName == null) return; String newMethodName = getNewMethodName(chronoEnumName, call); if (newMethodName == null) return; PsiElement identifier = getIdentifier(call.getMethodExpression()); if (identifier == null) return; holder.registerProblem(identifier, InspectionGadgetsBundle.message("inspection.explicit.chrono.field.problem.descriptor"), new InlineChronoEnumCallFix(newMethodName, fieldArgumentIndex)); }