{"record":{"id":"d9e94bf0553ea657","repo":"pinpoint-apm/pinpoint","slug":"invalid-operator-not-found-left-operand-operato","errorCode":null,"errorMessage":"invalid operator - not found left operand. operator=${operator}","messagePattern":"invalid operator - not found left operand\\. operator=(.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/transformer/DefaultTransformerMatcher.java","lineNumber":264,"sourceCode":"        return null;\n    }\n\n    boolean traversal(ClassLoader classLoader, MatcherOperand operand, InternalClassMetadata classMetadata) {\n        if (operand instanceof NotMatcherOperator) {\n            NotMatcherOperator operator = (NotMatcherOperator) operand;\n            if (operator.getRightOperand() == null) {\n                throw new IllegalArgumentException(\"invalid operator - not found right operand. operator=\" + operator);\n            }\n\n            final MatcherOperand rightOperand = operator.getRightOperand();\n            // NOT\n            return match(classLoader, rightOperand, classMetadata) == false;\n        }\n\n        MatcherOperator operator = (MatcherOperator) operand;\n        // for binary operator.\n        if (operator.getLeftOperand() == null) {\n            throw new IllegalArgumentException(\"invalid operator - not found left operand. operator=\" + operator);\n        }\n        final MatcherOperand leftOperand = operator.getLeftOperand();\n\n        if (operator.getRightOperand() == null) {\n            throw new IllegalArgumentException(\"invalid operator - not found right operand. operator=\" + operator);\n        }\n        final MatcherOperand rightOperand = operator.getRightOperand();\n\n        MatcherOperand firstOperand = leftOperand;\n        MatcherOperand secondOperand = rightOperand;\n        if (leftOperand.getExecutionCost() > rightOperand.getExecutionCost()) {\n            // cost-based execution plan.\n            firstOperand = rightOperand;\n            secondOperand = leftOperand;\n        }\n\n        if (operand instanceof OrMatcherOperator) {\n            // OR","sourceCodeStart":246,"sourceCodeEnd":282,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/transformer/DefaultTransformerMatcher.java#L246-L282","documentation":"For binary MatcherOperator nodes (AND/OR), traversal requires both left and right operands. A binary operator whose left operand is null is structurally invalid and triggers IllegalArgumentException 'invalid operator - not found left operand'. (A null right operand throws the sibling message on the following lines.)","triggerScenarios":"Evaluating a matcher tree containing a binary operator built without a left operand, e.g. new AndMatcherOperator(null, right) or building via chaining without a base operand.","commonSituations":"Fluent operand chaining started from a null operand; refactoring that dropped the first operand of an AND/OR expression; custom matcher assembly code constructing binary nodes manually.","solutions":["Ensure binary operators are created with both left and right operands (operand1.and(operand2) / .or(...))","Validate the assembled MatcherOperand tree for null children before registering the matcher","Trace the matcher construction code path to find where the left operand became null"],"exampleFix":"// before\nMatcherOperator op = new AndMatcherOperator(null, rightOperand);\n// after\nMatcherOperator op = new AndMatcherOperator(leftOperand, rightOperand);","handlingStrategy":"validation","validationCode":"if (operand instanceof MatcherOperator && !(operand instanceof NotMatcherOperator)) { MatcherOperator op = (MatcherOperator) operand; if (op.getLeftOperand() == null || op.getRightOperand() == null) throw new IllegalStateException(\"binary operator missing operand\"); }","typeGuard":null,"tryCatchPattern":"try { boolean r = matcher.match(classLoader, operand, meta); } catch (IllegalArgumentException e) { log.error(\"malformed binary operator: {}\", e.getMessage()); }","preventionTips":["Build binary expressions via and()/or() chaining to guarantee both sides","Null-check operands before constructing operator nodes","Validate the complete matcher tree before registration"],"tags":["java","matcher","operator-tree","null-operand","validation"],"backgroundTag":"invalid-argument-value","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}