{"record":{"id":"8e87292b669a2a0c","repo":"stanfordnlp/CoreNLP","slug":"results-different-from-expected-baseline","errorCode":null,"errorMessage":"Results different from expected baseline","messagePattern":"Results different from expected baseline","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/edu/stanford/nlp/tagger/maxent/TestThreadedTagger.java","lineNumber":120,"sourceCode":"    @Override\n    public void run() {\n      try {\n        Timing t = new Timing();\n        TestClassifier testClassifier = new TestClassifier(tagger);\n        long millis = t.stop();\n        resultsString = testClassifier.resultsString(tagger);\n        System.out.println(\"Thread \" + threadName + \" took \" + millis +\n                           \" milliseconds to tag \" + testClassifier.getNumWords() +\n                           \" words.\\n\" + resultsString);\n      } catch(IOException e) {\n        throw new RuntimeException(e);\n      }\n    }\n  } // end class TaggerThread\n\n  public static void compareResults(String results, String baseline) {\n    if (!results.equals(baseline)) {\n      throw new RuntimeException(\"Results different from expected baseline\");\n    }\n  }\n\n  public static void main(final String[] args)\n    throws ClassNotFoundException, IOException, InterruptedException\n  {\n    Properties props = StringUtils.argsToProperties(args);\n    runThreadedTest(props);\n  }\n\n  public static void runThreadedTest(Properties props)\n    throws ClassNotFoundException, IOException, InterruptedException\n  {\n    ArrayList<Properties> configs = new ArrayList<>();\n    ArrayList<MaxentTagger> taggers = new ArrayList<>();\n    int numThreads = DEFAULT_NUM_THREADS;\n\n    // let the user specify how many threads to run in the first test case","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/tagger/maxent/TestThreadedTagger.java#L102-L138","documentation":"RuntimeException from TestThreadedTagger.compareResults when the accuracy results computed by two differently configured taggers (or threads) differ from the expected baseline, indicating a determinism or configuration regression in the threaded tagging test.","triggerScenarios":"Thrown at src/edu/stanford/nlp/tagger/maxent/TestThreadedTagger.java:120 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Compare the tagger configurations for unintended differences","Check for nondeterminism (threading, ordering) affecting results","Update the baseline only if the change is intended"],"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"}