Buggy code:
public class ErlangBuilder extends TargetBuilder < ErlangSourceRootDescriptor , ErlangTarget > { public static final String NAME = "erlc" ; public ErlangBuilder ( ) { } @ Override public void build ( @ NotNull ErlangTarget target , @ NotNull DirtyFilesHolder < ErlangSourceRootDescriptor , ErlangTarget > holder , @ NotNull BuildOutputConsumer outputConsumer , @ NotNull CompileContext context ) throws IOException , ProjectBuildException { JpsModule module = target . getModule ( ) ; JpsProject project = module . getProject ( ) ; <START_BUG> ErlangCompilerOptions compilerOptions = JpsErlangCompilerOptionsExtension . getOrCreateExtension ( project ) . getOptions ( ) ; <END_BUG> if ( compilerOptions . myUseRebarCompiler ) return ; ErlangBuilderUtil . LOG . info ( ( "Build<seq2seq4repair_space>module<seq2seq4repair_space>" + ( target . getPresentableName ( ) ) ) ) ; File sourceOutput = ErlangBuilder . getBuildOutputDirectory ( module , false , context ) ; File testOutput = ErlangBuilder . getBuildOutputDirectory ( module , true , context ) ; if ( holder . hasRemovedFiles ( ) ) { ErlangBuilderUtil . LOG . debug ( "Remove<seq2seq4repair_space>invalid<seq2seq4repair_space>.beam<seq2seq4repair_space>and<seq2seq4repair_space>.app<seq2seq4repair_space>files." ) ; ErlangBuilder . removeOutputFiles ( holder . getRemovedFiles ( target ) , sourceOutput , testOutput ) ; } ErlangBuilder . buildSources ( target , context , compilerOptions , outputConsumer , sourceOutput , false ) ; ErlangBuilder . buildSources ( target , context , compilerOptions , outputConsumer , testOutput , true ) ; ErlangBuilder . processAppConfigFiles ( holder , outputConsumer , context , sourceOutput , testOutput ) ; } @ NotNull @ Override public String getPresentableName ( ) { } private static void removeOutputFiles ( @ NotNull Collection < String > removedFiles , @ NotNull File ... outputDirectories ) { } @ NotNull private static List < File > getBeams ( @ NotNull Collection < String > erlPaths , @ NotNull final File outputDirectory ) { } @ NotNull private static List < File > getAppsOutput ( @ NotNull List < String > sourceApps , @ NotNull final File outputDir ) { } private static void buildSources ( @ NotNull ErlangTarget target , @ NotNull CompileContext context , @ NotNull ErlangCompilerOptions compilerOptions , @ NotNull BuildOutputConsumer outputConsumer , @ NotNull File outputDir , final boolean isTests ) throws IOException , ProjectBuildException { } private static void reportMessageForModule ( @ NotNull CompileContext context , @ NotNull String messagePrefix , @ NotNull String moduleName ) { } private static void reportMessage ( @ NotNull CompileContext context , @ NotNull String message ) { } @ NotNull private static File getBuildOutputDirectory ( @ NotNull JpsModule module , boolean forTests , @ NotNull CompileContext context ) throws ProjectBuildException { } private static void processAppConfigFiles ( DirtyFilesHolder < ErlangSourceRootDescriptor , ErlangTarget > holder , BuildOutputConsumer outputConsumer , CompileContext context , File ... outputDirectories ) throws IOException { } @ NotNull private static File getDestinationAppConfig ( File outputDir , @ NotNull String fileName ) { } @ NotNull private static String getAppConfigDestinationFileName ( @ NotNull String sourceFileName ) { } private static void runErlc ( ErlangTarget target , CompileContext context , ErlangCompilerOptions compilerOptions , List < String > erlangModulePathsToCompile , BuildOutputConsumer outputConsumer , File outputDirectory , boolean isTest ) throws IOException , ProjectBuildException { } private static GeneralCommandLine getErlcCommandLine ( ErlangTarget target , CompileContext context , ErlangCompilerOptions compilerOptions , File outputDirectory , List < String > erlangModulePaths , boolean isTest ) throws ProjectBuildException { } private static void addMacroDefinitions ( GeneralCommandLine commandLine , boolean isTests ) { } private static void addDebugInfo ( @ NotNull GeneralCommandLine commandLine , boolean addDebugInfoEnabled ) { } private static void addIncludePaths ( @ NotNull GeneralCommandLine commandLine , @ Nullable JpsModule module ) { } @ NotNull private static List < String > getErlangModulePaths ( @ NotNull ErlangTarget target , @ NotNull CompileContext context , boolean isTest ) { } @ Nullable private static List < String > getErlangModulePathsFromTarget ( @ NotNull ErlangTarget target , boolean isTests ) { } @ NotNull private static List < String > getErlangModulePathsDefault ( @ NotNull ErlangTarget target , boolean isTests ) { } private static void addParseTransforms ( @ NotNull GeneralCommandLine commandLine , @ Nullable JpsModule module ) throws ProjectBuildException { } private static void addCodePath ( @ NotNull GeneralCommandLine commandLine , @ NotNull JpsModule module , @ NotNull ErlangTarget target , @ NotNull CompileContext context ) throws ProjectBuildException { } private static void collectDependentModules ( @ NotNull JpsModule module , @ NotNull Collection < JpsModule > addedModules , @ NotNull Set < String > addedModuleNames ) { } private static void addModuleToCodePath ( @ NotNull GeneralCommandLine commandLine , @ NotNull JpsModule module , boolean forTests , @ NotNull CompileContext context ) throws ProjectBuildException { } private static void consumeFiles ( @ NotNull BuildOutputConsumer outputConsumer , @ NotNull List < File > dirtyFilePaths ) throws IOException { } @ NotNull private static List < String > findAppFiles ( @ NotNull Collection < String > removedFiles ) { } @ NotNull private static List < String > findErlFiles ( @ NotNull Collection < String > removedFiles ) { } No newline ; at end ; of file ; }

Fix:
ErlangCompilerOptions compilerOptions = ErlangBuilderUtil . getCompilerOptions ( project ) ;