{"record":{"id":"7925fe19618cc359","repo":"JetBrains/intellij-community","slug":"compilation-failed-n","errorCode":null,"errorMessage":"Compilation failed:\\n","messagePattern":"Compilation failed:\\\\n","errorType":"exception","errorClass":"IncorrectCodeFragmentException","httpStatus":null,"severity":"error","filePath":"java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/CompilingEvaluatorImpl.java","lineNumber":123,"sourceCode":"\n      File sourceFile = null;\n      try {\n        sourceFile = generateTempSourceFile(compilerManager.getJavacCompilerWorkingDir());\n        File srcDir = sourceFile.getParentFile();\n        List<File> sourcePath = Collections.emptyList();\n        Set<File> sources = Collections.singleton(sourceFile);\n\n        myCompiledClasses =\n          compilerManager.compileJavaCode(options, platformClasspath, classpath, Collections.emptyList(), Collections.emptyList(), sourcePath, sources, srcDir);\n      }\n      catch (CompilationException e) {\n        StringBuilder res = new StringBuilder(\"Compilation failed:\\n\");\n        for (CompilationException.Message m : e.getMessages()) {\n          if (m.getCategory() == CompilerMessageCategory.ERROR) {\n            res.append(m.getText()).append(\"\\n\");\n          }\n        }\n        throw new IncorrectCodeFragmentException(res.toString());\n      }\n      catch (Exception e) {\n        throw new EvaluateException(e.getMessage());\n      }\n      finally {\n        if (sourceFile != null) {\n          FileUtil.delete(sourceFile);\n        }\n      }\n    }\n    return myCompiledClasses;\n  }\n\n  private File generateTempSourceFile(File workingDir) throws IOException {\n    Pair<String, String> fileData = ReadAction.compute(() -> {\n      PsiFile file = myData.getGeneratedInnerClass().getContainingFile();\n      return Pair.create(file.getName(), file.getText());\n    });","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/JetBrains/intellij-community/blob/be881553f2a76ac8b4ea53950d93f0de78295c19/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/CompilingEvaluatorImpl.java#L105-L141","documentation":"Error \"Compilation failed:\\n\" thrown in JetBrains/intellij-community.","triggerScenarios":"The expression submitted to the compiling evaluator fails Java compilation.","commonSituations":"Syntax errors, unresolved symbols, or type errors in an Evaluate Expression / watch using the compiling evaluator.","solutions":["Read the compiler diagnostics appended to the message and fix the expression accordingly.","Check that referenced classes are on the debuggee classpath and names are spelled correctly."],"exampleFix":"Fix the reported error, e.g. add a cast: (List<String>) value.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"be881553f2a76ac8b4ea53950d93f0de78295c19","analyzedAt":"2026-08-14T14:13:06.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}