void (XPathPredicate predicate) { final XPathExpression expr = predicate.getPredicateExpression(); if (expr != null) { if (expr.getType() == XPathType.NUMBER) { if (isZero(expr)) { final String message = XPathBundle.message("inspection.message.use.of.0.as.predicate.index"); addProblem(myManager.createProblemDescriptor(expr, message, (LocalQuickFix)null, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, myOnTheFly)); } } else if (expr instanceof XPathBinaryExpression expression && expr.getType() == XPathType.BOOLEAN) { if (!XPathTokenTypes.BOOLEAN_OPERATIONS.contains(expression.getOperator())) { return; } final XPathExpression lOp = expression.getLOperand(); final XPathExpression rOp = expression.getROperand(); if (isZero(lOp)) { assert lOp != null; if (isPosition(rOp)) { final String message = XPathBundle.message("inspection.message.comparing.position.to.0"); addProblem(myManager.createProblemDescriptor(expr, message, (LocalQuickFix)null, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, myOnTheFly)); } } else if (isZero(rOp)) { assert rOp != null; if (isPosition(lOp)) { final String message = XPathBundle.message("inspection.message.comparing.position.to"); addProblem(myManager.createProblemDescriptor(expr, message, (LocalQuickFix)null, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, myOnTheFly)); } } } } }