{"record":{"id":"5e6ec738d0686fe8","repo":"apache/hadoop","slug":"unexpected-argument","errorCode":null,"errorMessage":"Unexpected argument: ","messagePattern":"Unexpected argument: ","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/find/Find.java","lineNumber":335,"sourceCode":"        } else {\n          if (!prevExpr.isOperator()) {\n            Expression and = getExpression(And.class);\n            while (!operators.isEmpty()) {\n              if (operators.peek().getPrecedence() >= and.getPrecedence()) {\n                Expression op = operators.pop();\n                op.addChildren(primaries);\n                primaries.push(op);\n              } else {\n                break;\n              }\n            }\n            operators.push(and);\n          }\n          primaries.push(expr);\n        }\n        prevExpr = expr;\n      } else {\n        throw new IOException(\"Unexpected argument: \" + arg);\n      }\n    }\n\n    while (!operators.isEmpty()) {\n      Expression operator = operators.pop();\n      operator.addChildren(primaries);\n      primaries.push(operator);\n    }\n\n    return primaries.isEmpty() ? getExpression(Print.class) : primaries.pop();\n  }\n\n  /** Returns true if the target is an ancestor of the source. */\n  private boolean isAncestor(PathData source, PathData target) {\n    for (Path parent = source.path; (parent != null) && !parent.isRoot();\n        parent = parent.getParent()) {\n      if (parent.equals(target.path)) {\n        return true;","sourceCodeStart":317,"sourceCodeEnd":353,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/find/Find.java#L317-L353","documentation":"Error \"Unexpected argument: \" thrown in apache/hadoop.","triggerScenarios":"Thrown by the find shell command when it encounters a command-line token that does not correspond to any known find expression or option.","commonSituations":"See trigger scenarios.","solutions":["Remove or correct the unexpected argument; check the find command syntax.","Quote arguments so the shell does not split them unexpectedly."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}