void (@NotNull DfaValue @NotNull [] args, @NotNull DfaValue value, @NotNull DfaAnchor anchor, @NotNull DfaMemoryState state) { JavaDfaListener.super.beforePush(args, value, anchor, state); if (anchor instanceof JavaExpressionAnchor expressionAnchor) { PsiExpression expression = expressionAnchor.getExpression(); if (expression instanceof PsiLiteralExpression) return; if (expression instanceof PsiMethodCallExpression call && USELESS_SAME_ARGUMENTS.test(call)) { checkUselessCall(args, value, state, call.getMethodExpression()); } } if (anchor instanceof JavaMethodReferenceReturnAnchor returnAnchor) { PsiMethodReferenceExpression methodRef = returnAnchor.getMethodReferenceExpression(); if (USELESS_SAME_ARGUMENTS.methodReferenceMatches(methodRef)) { checkUselessCall(args, value, state, methodRef); } } if (anchor instanceof JavaSwitchLabelTakenAnchor labelTakenAnchor) { DfType type = state.getDfType(value); mySwitchLabelsReachability.merge(labelTakenAnchor.getLabelElement(), fromDfType(type), ThreeState::merge); return; } if (myPotentiallyRedundantInstanceOf.contains(anchor)) { if (isUsefulInstanceof(args, value, state)) { myPotentiallyRedundantInstanceOf.remove(anchor); } else { myConstantInstanceOf.merge(anchor, fromDfType(state.getDfType(value)), ThreeState::merge); } } }