Program: 10031
Project: 10031
Buggy source:
/** 
 * Setup builder configuration
 * @throws MojoExecutionException
 */
protected void configure() throws MojoExecutionException {
  resolveDependencies();
  configuration.enableAccessibility(accessible);
  configuration.allowSourcePathOverlap(allowSourcePathOverlap);
  configuration.useActionScript3(as3);
  configuration.enableDebugging(isDebug(),debugPassword);
  configuration.useECMAScript(es);
  if (fonts != null) {
    configureFontsAntiAliasing();
    enableFlashType();
    configuration.setFontManagers(fonts.getManagers());
    configuration.setMaximumCachedFonts(fonts.getMaxCachedFonts());
    configuration.setMaximumGlyphsPerFace(fonts.getMaxGlyphsPerFace());
    if (fonts.getLanguages() != null && !fonts.getLanguages().isEmpty()) {
      for (      String language : fonts.getLanguages().keySet()) {
        configuration.setFontLanguageRange(language,fonts.getLanguages().get(language));
      }
    }
  }
  File fontsSnapshot=getFontsSnapshot();
  if (fontsSnapshot == null || !fontsSnapshot.exists()) {
    throw new MojoExecutionException("String_Node_Str" + fontsSnapshot);
  }
  configuration.setLocalFontSnapshot(fontsSnapshot);
  configuration.setActionScriptMetadata(keepAs3Metadatas);
  configuration.keepCompilerGeneratedActionScript(keepGeneratedActionscript);
  if (licenses != null) {
    for (    String licenseName : licenses.keySet()) {
      String key=licenses.get(licenseName);
      configuration.setLicense(licenseName,key);
    }
  }
  addDefines();
  if (compiledLocales == null && runtimeLocales == null && isApplication()) {
    setLocales(getDefaultLocale());
  }
 else   if (compiledLocales != null) {
    setLocales(compiledLocales);
  }
 else {
    setLocales(new String[0]);
  }
  List<Namespace> fdkNamespaces=MavenUtils.getFdkNamespaces(getDependencyArtifacts(),build);
  if (this.namespaces != null) {
    fdkNamespaces.addAll(Arrays.asList(this.namespaces));
  }
  this.namespaces=fdkNamespaces.toArray(new Namespace[0]);
  if (namespaces != null) {
    for (    Namespace namespace : namespaces) {
      File manifest=namespace.getManifest();
      configuration.setComponentManifest(namespace.getUri(),manifest);
    }
  }
  configuration.optimize(optimize);
  if (this.warnings != null) {
    configureWarnings(configuration);
  }
  configuration.setSourcePath(sourcePaths);
  configuration.enableStrictChecking(strict);
  configuration.useNetwork(useNetwork);
  configuration.enableVerboseStacktraces(verboseStacktraces);
  if (contextRoot != null) {
    configuration.setContextRoot(contextRoot);
  }
  configuration.keepLinkReport(linkReport);
  configuration.keepConfigurationReport(configurationReport);
  configuration.setConfiguration(configFile);
  configuration.setServiceConfiguration(services);
  if (loadExterns != null) {
    List<File> externsFiles=new ArrayList<File>();
    for (    MavenArtifact mvnArtifact : loadExterns) {
      Artifact artifact=artifactFactory.createArtifactWithClassifier(mvnArtifact.getGroupId(),mvnArtifact.getArtifactId(),mvnArtifact.getVersion(),"String_Node_Str","String_Node_Str");
      resolveArtifact(artifact,resolver,localRepository,remoteRepositories);
      externsFiles.add(artifact.getFile());
    }
    configuration.setExterns(externsFiles.toArray(new File[externsFiles.size()]));
  }
  if (rawMetadata != null) {
    configuration.setSWFMetaData(rawMetadata);
  }
  if (metadata != null) {
    if (metadata.getContributor() != null) {
      configuration.setSWFMetaData(Configuration.CONTRIBUTOR,metadata.getContributor());
    }
    if (metadata.getCreator() != null) {
      configuration.setSWFMetaData(Configuration.CREATOR,metadata.getCreator());
    }
    if (metadata.getDate() != null) {
      configuration.setSWFMetaData(Configuration.DATE,metadata.getDate());
    }
    if (metadata.getDescriptions() != null) {
      configuration.setSWFMetaData(Configuration.DESCRIPTION,metadata.getDescriptions());
    }
    if (metadata.getTitles() != null) {
      configuration.setSWFMetaData(Configuration.TITLE,metadata.getTitles());
    }
    if (metadata.getLanguage() != null) {
      configuration.setSWFMetaData(Configuration.LANGUAGE,metadata.getLanguage());
    }
  }
  setCompatibilityMode();
  configuration.setActionScriptFileEncoding(encoding);
  setTargetPlayer();
  if (defaultsCss != null)   configuration.setDefaultCSS(defaultsCss);
  configuration.setDefaultBackgroundColor(Integer.parseInt(defaultBackgroundColor,16));
  configuration.setDefaultFrameRate(defaultFrameRate);
  configuration.setDefaultScriptLimits(scriptMaxRecursionDepth,scriptMaxExecutionTime);
  configuration.setDefaultSize(defaultSizeWidth,defaultSizeHeight);
  if (externs != null && externs.length > 0) {
    configuration.setExterns(externs);
  }
  if (frames != null && frames.length > 0) {
    for (    FrameLabel frame : frames) {
      configuration.setFrameLabel(frame.getLabel(),frame.getClassNames());
    }
  }
  if (includes != null && includes.length > 0) {
    configuration.setIncludes(includes);
  }
  configuration.useHeadlessServer(headlessServer);
  configuration.keepAllTypeSelectors(keepAllTypeSelectors);
  configuration.useResourceBundleMetaData(useResourceBundleMetadata);
  verifyDigests();
}

Fixed version (ground truth):
/** 
 * Setup builder configuration
 * @throws MojoExecutionException
 * @throws MojoFailureException
 */
protected void configure() throws MojoExecutionException, MojoFailureException {
  resolveDependencies();
  configuration.enableAccessibility(accessible);
  configuration.allowSourcePathOverlap(allowSourcePathOverlap);
  configuration.useActionScript3(as3);
  configuration.enableDebugging(isDebug(),debugPassword);
  configuration.useECMAScript(es);
  if (fonts != null) {
    configureFontsAntiAliasing();
    enableFlashType();
    configuration.setFontManagers(fonts.getManagers());
    configuration.setMaximumCachedFonts(fonts.getMaxCachedFonts());
    configuration.setMaximumGlyphsPerFace(fonts.getMaxGlyphsPerFace());
    if (fonts.getLanguages() != null && !fonts.getLanguages().isEmpty()) {
      for (      String language : fonts.getLanguages().keySet()) {
        configuration.setFontLanguageRange(language,fonts.getLanguages().get(language));
      }
    }
  }
  File fontsSnapshot=getFontsSnapshot();
  if (fontsSnapshot == null || !fontsSnapshot.exists()) {
    throw new MojoExecutionException("String_Node_Str" + fontsSnapshot);
  }
  configuration.setLocalFontSnapshot(fontsSnapshot);
  configuration.setActionScriptMetadata(keepAs3Metadatas);
  configuration.keepCompilerGeneratedActionScript(keepGeneratedActionscript);
  if (licenses != null) {
    for (    String licenseName : licenses.keySet()) {
      String key=licenses.get(licenseName);
      configuration.setLicense(licenseName,key);
    }
  }
  addDefines();
  if (compiledLocales == null && runtimeLocales == null && isApplication()) {
    setLocales(getDefaultLocale());
  }
 else   if (compiledLocales != null) {
    setLocales(compiledLocales);
  }
 else {
    setLocales(new String[0]);
  }
  List<Namespace> fdkNamespaces=MavenUtils.getFdkNamespaces(getDependencyArtifacts(),build);
  if (this.namespaces != null) {
    fdkNamespaces.addAll(Arrays.asList(this.namespaces));
  }
  this.namespaces=fdkNamespaces.toArray(new Namespace[0]);
  if (namespaces != null) {
    for (    Namespace namespace : namespaces) {
      File manifest=namespace.getManifest();
      configuration.setComponentManifest(namespace.getUri(),manifest);
    }
  }
  configuration.optimize(optimize);
  if (this.warnings != null) {
    configureWarnings(configuration);
  }
  configuration.setSourcePath(sourcePaths);
  configuration.enableStrictChecking(strict);
  configuration.useNetwork(useNetwork);
  configuration.enableVerboseStacktraces(verboseStacktraces);
  if (contextRoot != null) {
    configuration.setContextRoot(contextRoot);
  }
  configuration.keepLinkReport(linkReport);
  configuration.keepConfigurationReport(configurationReport);
  configuration.setConfiguration(configFile);
  configuration.setServiceConfiguration(services);
  if (loadExterns != null) {
    List<File> externsFiles=new ArrayList<File>();
    for (    MavenArtifact mvnArtifact : loadExterns) {
      Artifact artifact=artifactFactory.createArtifactWithClassifier(mvnArtifact.getGroupId(),mvnArtifact.getArtifactId(),mvnArtifact.getVersion(),"String_Node_Str","String_Node_Str");
      resolveArtifact(artifact,resolver,localRepository,remoteRepositories);
      externsFiles.add(artifact.getFile());
    }
    configuration.setExterns(externsFiles.toArray(new File[externsFiles.size()]));
  }
  if (rawMetadata != null) {
    configuration.setSWFMetaData(rawMetadata);
  }
  if (metadata != null) {
    if (metadata.getContributor() != null) {
      configuration.setSWFMetaData(Configuration.CONTRIBUTOR,metadata.getContributor());
    }
    if (metadata.getCreator() != null) {
      configuration.setSWFMetaData(Configuration.CREATOR,metadata.getCreator());
    }
    if (metadata.getDate() != null) {
      configuration.setSWFMetaData(Configuration.DATE,metadata.getDate());
    }
    if (metadata.getDescriptions() != null) {
      configuration.setSWFMetaData(Configuration.DESCRIPTION,metadata.getDescriptions());
    }
    if (metadata.getTitles() != null) {
      configuration.setSWFMetaData(Configuration.TITLE,metadata.getTitles());
    }
    if (metadata.getLanguage() != null) {
      configuration.setSWFMetaData(Configuration.LANGUAGE,metadata.getLanguage());
    }
  }
  setCompatibilityMode();
  configuration.setActionScriptFileEncoding(encoding);
  setTargetPlayer();
  if (defaultsCss != null)   configuration.setDefaultCSS(defaultsCss);
  configuration.setDefaultBackgroundColor(Integer.parseInt(defaultBackgroundColor,16));
  configuration.setDefaultFrameRate(defaultFrameRate);
  configuration.setDefaultScriptLimits(scriptMaxRecursionDepth,scriptMaxExecutionTime);
  configuration.setDefaultSize(defaultSizeWidth,defaultSizeHeight);
  if (externs != null && externs.length > 0) {
    configuration.setExterns(externs);
  }
  if (frames != null && frames.length > 0) {
    for (    FrameLabel frame : frames) {
      configuration.setFrameLabel(frame.getLabel(),frame.getClassNames());
    }
  }
  if (includes != null && includes.length > 0) {
    configuration.setIncludes(includes);
  }
  configuration.useHeadlessServer(headlessServer);
  configuration.keepAllTypeSelectors(keepAllTypeSelectors);
  configuration.useResourceBundleMetaData(useResourceBundleMetadata);
  verifyDigests();
}