{"record":{"id":"16ed149df3057329","repo":"stanfordnlp/CoreNLP","slug":"unknown-argument-s-props-getproperty","errorCode":null,"errorMessage":"unknown argument(s): \"\" + props.getProperty(\"\") + '\"'","messagePattern":"unknown argument\\(s\\): \"\" \\+ props\\.getProperty\\(\"\"\\) \\+ '\"'","errorType":"validation","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/edu/stanford/nlp/tagger/maxent/TaggerConfig.java","lineNumber":165,"sourceCode":"      if (name == null) {\n        name = props.getProperty(\"dump\");\n      }\n      if (name != null) {\n        try (DataInputStream in = new DataInputStream(IOUtils.getInputStreamFromURLOrClasspathOrFileSystem(name))) {\n          log.info(\"Loading default properties from tagger \" + name);\n          this.putAll(TaggerConfig.readConfig(in)); // overwrites defaults with any serialized values.\n        } catch (Exception e) {\n          throw new RuntimeIOException(\"No such trained tagger config file found: \" + name);\n        }\n      }\n    }\n\n    setProperties(props);\n  }\n\n  public void setProperties(Properties props) {\n    if (props.getProperty(\"\") != null) {\n      throw new RuntimeException(\"unknown argument(s): \\\"\" + props.getProperty(\"\") + '\\\"');\n    }\n\n    if (props.getProperty(\"genprops\") != null) {\n      printGenProps(System.out);\n      System.exit(0);\n    }\n\n    if (props.containsKey(\"mode\") && props.containsKey(\"file\")) {\n      this.setProperty(\"mode\", props.getProperty(\"mode\"));\n      this.setProperty(\"file\", props.getProperty(\"file\"));\n    } else if (props.containsKey(\"trainFile\")) {\n      //Training mode\n      this.setProperty(\"mode\", Mode.TRAIN.toString());\n      this.setProperty(\"file\", props.getProperty(\"trainFile\", \"\").trim());\n    } else if (props.containsKey(\"testFile\")) {\n      //Testing mode\n      this.setProperty(\"mode\", Mode.TEST.toString());\n      this.setProperty(\"file\", props.getProperty(\"testFile\", \"\").trim());","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/tagger/maxent/TaggerConfig.java#L147-L183","documentation":"RuntimeException from TaggerConfig.setProperties when a command-line/properties argument is not a recognized tagger option; unknown argument(s) are rejected so mis-typed flags do not silently change training or tagging behavior.","triggerScenarios":"Thrown at src/edu/stanford/nlp/tagger/maxent/TaggerConfig.java:165 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check flag spelling against documented TaggerConfig options","Remove or correct the unrecognized argument","Use a properties file for advanced options"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a","analyzedAt":"2026-09-10T02:24:07.274Z","contentChangedAt":"2026-09-10T02:24:07.274Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}