Program: 27433
Project: 27433
Buggy source:
/** 
 * Sets options based on the configurations set flags API. Called during the run() run() method. If you want to ignore the flags API, or interpret flags your own way, then you should override this method.
 */
protected void setRunOptions(CompilerOptions options) throws FlagUsageException, IOException {
  DiagnosticGroups diagnosticGroups=getDiagnosticGroups();
  if (config.warningGuards != null) {
    for (    WarningGuardSpec.Entry entry : config.warningGuards.entries) {
      if ("String_Node_Str".equals(entry.groupName)) {
        Set<String> groupNames=diagnosticGroups.getRegisteredGroups().keySet();
        for (        String groupName : groupNames) {
          if (!DiagnosticGroups.wildcardExcludedGroups.contains(groupName)) {
            diagnosticGroups.setWarningLevel(options,groupName,entry.level);
          }
        }
      }
 else {
        diagnosticGroups.setWarningLevel(options,entry.groupName,entry.level);
      }
    }
  }
  if (!config.warningsWhitelistFile.isEmpty()) {
    addWhitelistWarningsGuard(options,new File(config.warningsWhitelistFile));
  }
  if (!config.hideWarningsFor.isEmpty()) {
    options.addWarningsGuard(new ShowByPathWarningsGuard(config.hideWarningsFor.toArray(new String[]{}),ShowByPathWarningsGuard.ShowType.EXCLUDE));
  }
  createDefineOrTweakReplacements(config.define,options,false);
  options.setTweakProcessing(config.tweakProcessing);
  createDefineOrTweakReplacements(config.tweak,options,true);
  DependencyOptions depOptions=createDependencyOptions(config.manageClosureDependencies,config.onlyClosureDependencies,config.processCommonJSModules,config.closureEntryPoints);
  if (depOptions != null) {
    options.setDependencyOptions(depOptions);
  }
  options.devMode=config.jscompDevMode;
  options.setCodingConvention(config.codingConvention);
  options.setSummaryDetailLevel(config.summaryDetailLevel);
  options.setTrustedStrings(true);
  legacyOutputCharset=options.outputCharset=getLegacyOutputCharset();
  outputCharset2=getOutputCharset2();
  inputCharset=getInputCharset();
  if (config.jsOutputFile.length() > 0) {
    if (config.skipNormalOutputs) {
      throw new FlagUsageException("String_Node_Str" + "String_Node_Str");
    }
  }
  if (config.skipNormalOutputs && config.printAst) {
    throw new FlagUsageException("String_Node_Str" + "String_Node_Str");
  }
  if (config.skipNormalOutputs && config.printTree) {
    throw new FlagUsageException("String_Node_Str" + "String_Node_Str");
  }
  if (config.createSourceMap.length() > 0) {
    options.sourceMapOutputPath=config.createSourceMap;
  }
 else   if (isOutputInJson()) {
    options.sourceMapOutputPath="String_Node_Str";
  }
  options.sourceMapDetailLevel=config.sourceMapDetailLevel;
  options.sourceMapFormat=config.sourceMapFormat;
  options.sourceMapLocationMappings=config.sourceMapLocationMappings;
  ImmutableMap.Builder<String,SourceMapInput> inputSourceMaps=new ImmutableMap.Builder<>();
  for (  Map.Entry<String,String> files : config.sourceMapInputFiles.entrySet()) {
    SourceFile sourceMap=SourceFile.fromFile(files.getValue());
    inputSourceMaps.put(files.getKey(),new SourceMapInput(sourceMap));
  }
  options.inputSourceMaps=inputSourceMaps.build();
  if (!config.variableMapInputFile.isEmpty()) {
    options.inputVariableMap=VariableMap.load(config.variableMapInputFile);
  }
  if (!config.propertyMapInputFile.isEmpty()) {
    options.inputPropertyMap=VariableMap.load(config.propertyMapInputFile);
  }
  if (config.languageIn.length() > 0) {
    CompilerOptions.LanguageMode languageMode=CompilerOptions.LanguageMode.fromString(config.languageIn);
    if (languageMode != null) {
      options.setLanguageIn(languageMode);
    }
 else {
      throw new FlagUsageException("String_Node_Str" + config.languageIn + "String_Node_Str");
    }
  }
  if (config.languageOut.isEmpty()) {
    options.setLanguageOut(options.getLanguageIn());
  }
 else {
    CompilerOptions.LanguageMode languageMode=CompilerOptions.LanguageMode.fromString(config.languageOut);
    if (languageMode != null) {
      options.setLanguageOut(languageMode);
    }
 else {
      throw new FlagUsageException("String_Node_Str" + config.languageOut + "String_Node_Str");
    }
  }
  if (!config.outputManifests.isEmpty()) {
    Set<String> uniqueNames=new HashSet<>();
    for (    String filename : config.outputManifests) {
      if (!uniqueNames.add(filename)) {
        throw new FlagUsageException("String_Node_Str" + "String_Node_Str" + filename);
      }
    }
  }
  if (!config.outputBundles.isEmpty()) {
    Set<String> uniqueNames=new HashSet<>();
    for (    String filename : config.outputBundles) {
      if (!uniqueNames.add(filename)) {
        throw new FlagUsageException("String_Node_Str" + "String_Node_Str" + filename);
      }
    }
  }
  options.transformAMDToCJSModules=config.transformAMDToCJSModules;
  options.processCommonJSModules=config.processCommonJSModules;
  options.moduleRoots=config.moduleRoots;
  options.angularPass=config.angularPass;
  options.tracer=config.tracerMode;
  options.setNewTypeInference(config.useNewTypeInference);
  options.instrumentationTemplateFile=config.instrumentationTemplateFile;
}

Fixed version (ground truth):
/** 
 * Sets options based on the configurations set flags API. Called during the run() run() method. If you want to ignore the flags API, or interpret flags your own way, then you should override this method.
 */
protected void setRunOptions(CompilerOptions options) throws FlagUsageException, IOException {
  DiagnosticGroups diagnosticGroups=getDiagnosticGroups();
  if (config.warningGuards != null) {
    for (    FlagEntry<CheckLevel> entry : config.warningGuards) {
      if ("String_Node_Str".equals(entry.value)) {
        Set<String> groupNames=diagnosticGroups.getRegisteredGroups().keySet();
        for (        String groupName : groupNames) {
          if (!DiagnosticGroups.wildcardExcludedGroups.contains(groupName)) {
            diagnosticGroups.setWarningLevel(options,groupName,entry.flag);
          }
        }
      }
 else {
        diagnosticGroups.setWarningLevel(options,entry.value,entry.flag);
      }
    }
  }
  if (!config.warningsWhitelistFile.isEmpty()) {
    addWhitelistWarningsGuard(options,new File(config.warningsWhitelistFile));
  }
  if (!config.hideWarningsFor.isEmpty()) {
    options.addWarningsGuard(new ShowByPathWarningsGuard(config.hideWarningsFor.toArray(new String[]{}),ShowByPathWarningsGuard.ShowType.EXCLUDE));
  }
  createDefineOrTweakReplacements(config.define,options,false);
  options.setTweakProcessing(config.tweakProcessing);
  createDefineOrTweakReplacements(config.tweak,options,true);
  DependencyOptions depOptions=createDependencyOptions(config.manageClosureDependencies,config.onlyClosureDependencies,config.processCommonJSModules,config.closureEntryPoints);
  if (depOptions != null) {
    options.setDependencyOptions(depOptions);
  }
  options.devMode=config.jscompDevMode;
  options.setCodingConvention(config.codingConvention);
  options.setSummaryDetailLevel(config.summaryDetailLevel);
  options.setTrustedStrings(true);
  legacyOutputCharset=options.outputCharset=getLegacyOutputCharset();
  outputCharset2=getOutputCharset2();
  inputCharset=getInputCharset();
  if (config.jsOutputFile.length() > 0) {
    if (config.skipNormalOutputs) {
      throw new FlagUsageException("String_Node_Str" + "String_Node_Str");
    }
  }
  if (config.skipNormalOutputs && config.printAst) {
    throw new FlagUsageException("String_Node_Str" + "String_Node_Str");
  }
  if (config.skipNormalOutputs && config.printTree) {
    throw new FlagUsageException("String_Node_Str" + "String_Node_Str");
  }
  if (config.createSourceMap.length() > 0) {
    options.sourceMapOutputPath=config.createSourceMap;
  }
 else   if (isOutputInJson()) {
    options.sourceMapOutputPath="String_Node_Str";
  }
  options.sourceMapDetailLevel=config.sourceMapDetailLevel;
  options.sourceMapFormat=config.sourceMapFormat;
  options.sourceMapLocationMappings=config.sourceMapLocationMappings;
  ImmutableMap.Builder<String,SourceMapInput> inputSourceMaps=new ImmutableMap.Builder<>();
  for (  Map.Entry<String,String> files : config.sourceMapInputFiles.entrySet()) {
    SourceFile sourceMap=SourceFile.fromFile(files.getValue());
    inputSourceMaps.put(files.getKey(),new SourceMapInput(sourceMap));
  }
  options.inputSourceMaps=inputSourceMaps.build();
  if (!config.variableMapInputFile.isEmpty()) {
    options.inputVariableMap=VariableMap.load(config.variableMapInputFile);
  }
  if (!config.propertyMapInputFile.isEmpty()) {
    options.inputPropertyMap=VariableMap.load(config.propertyMapInputFile);
  }
  if (config.languageIn.length() > 0) {
    CompilerOptions.LanguageMode languageMode=CompilerOptions.LanguageMode.fromString(config.languageIn);
    if (languageMode != null) {
      options.setLanguageIn(languageMode);
    }
 else {
      throw new FlagUsageException("String_Node_Str" + config.languageIn + "String_Node_Str");
    }
  }
  if (config.languageOut.isEmpty()) {
    options.setLanguageOut(options.getLanguageIn());
  }
 else {
    CompilerOptions.LanguageMode languageMode=CompilerOptions.LanguageMode.fromString(config.languageOut);
    if (languageMode != null) {
      options.setLanguageOut(languageMode);
    }
 else {
      throw new FlagUsageException("String_Node_Str" + config.languageOut + "String_Node_Str");
    }
  }
  if (!config.outputManifests.isEmpty()) {
    Set<String> uniqueNames=new HashSet<>();
    for (    String filename : config.outputManifests) {
      if (!uniqueNames.add(filename)) {
        throw new FlagUsageException("String_Node_Str" + "String_Node_Str" + filename);
      }
    }
  }
  if (!config.outputBundles.isEmpty()) {
    Set<String> uniqueNames=new HashSet<>();
    for (    String filename : config.outputBundles) {
      if (!uniqueNames.add(filename)) {
        throw new FlagUsageException("String_Node_Str" + "String_Node_Str" + filename);
      }
    }
  }
  options.transformAMDToCJSModules=config.transformAMDToCJSModules;
  options.processCommonJSModules=config.processCommonJSModules;
  options.moduleRoots=config.moduleRoots;
  options.angularPass=config.angularPass;
  options.tracer=config.tracerMode;
  options.setNewTypeInference(config.useNewTypeInference);
  options.instrumentationTemplateFile=config.instrumentationTemplateFile;
}