nus-yam/ex-repair huggingface dataset:
Program: 10053
Project: 10053
Buggy source:
@SuppressWarnings("String_Node_Str") private Map<Artifact,List<Artifact>> getDependencies(List<Artifact> rslArtifacts) throws MojoExecutionException {
  Map<Artifact,List<Artifact>> dependencies=new HashMap<Artifact,List<Artifact>>();
  for (  Artifact pomArtifact : rslArtifacts) {
    try {
      MavenProject pomProject=mavenProjectBuilder.buildFromRepository(pomArtifact,remoteRepositories,localRepository);
      Set pomArtifacts=pomProject.createArtifacts(artifactFactory,null,null);
      ArtifactResolutionResult arr=resolver.resolveTransitively(pomArtifacts,pomArtifact,remoteRepositories,localRepository,artifactMetadataSource);
      List<Artifact> artifactDependencies=new ArrayList(arr.getArtifacts());
      artifactDependencies=removeNonRSLDependencies(rslArtifacts,artifactDependencies);
      dependencies.put(pomArtifact,artifactDependencies);
    }
 catch (    Exception e) {
      throw new MojoExecutionException(e.getMessage(),e);
    }
  }
  return dependencies;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private Map<Artifact,List<Artifact>> getDependencies(List<Artifact> rslArtifacts) throws MojoExecutionException {
  Map<Artifact,List<Artifact>> dependencies=new HashMap<Artifact,List<Artifact>>();
  for (  Artifact pomArtifact : rslArtifacts) {
    try {
      MavenProject pomProject=mavenProjectBuilder.buildFromRepository(pomArtifact,remoteRepositories,localRepository);
      Set pomArtifacts=pomProject.createArtifacts(artifactFactory,null,null);
      ArtifactResolutionResult arr=resolver.resolveTransitively(pomArtifacts,pomArtifact,remoteRepositories,localRepository,artifactMetadataSource);
      List<Artifact> artifactDependencies=new ArrayList<Artifact>(arr.getArtifacts());
      artifactDependencies=removeNonRSLDependencies(rslArtifacts,artifactDependencies);
      dependencies.put(pomArtifact,artifactDependencies);
    }
 catch (    Exception e) {
      throw new MojoExecutionException(e.getMessage(),e);
    }
  }
  return dependencies;
}
Program: 10054
Project: 10054
Buggy source:
/** 
 * Get resource bundles
 * @return Array of resource bundle files
 * @throws MojoExecutionException
 */
protected File[] getResourcesBundles() throws MojoExecutionException {
  if (locales == null) {
    return new File[0];
  }
  List<File> resourceBundles=new ArrayList<File>();
  for (  Artifact artifact : getDependencyArtifacts()) {
    if (!"String_Node_Str".equals(artifact.getType())) {
      continue;
    }
    for (    String locale : locales) {
      Artifact localeArtifact=artifactFactory.createArtifactWithClassifier(artifact.getGroupId(),artifact.getArtifactId(),artifact.getVersion(),artifact.getType(),locale);
      resolveArtifact(localeArtifact,resolver,localRepository,remoteRepositories);
      resourceBundles.add(localeArtifact.getFile());
    }
  }
  return resourceBundles.toArray(new File[resourceBundles.size()]);
}

Fixed version (ground truth):
/** 
 * Get resource bundles for the given locale
 * @param locale the locale for which you want bundles, null for all locales
 * @return Array of resource bundle files
 * @throws MojoExecutionException
 */
protected File[] getResourcesBundles(String locale) throws MojoExecutionException {
  if (locales == null) {
    return new File[0];
  }
  List<File> resourceBundles=new ArrayList<File>();
  for (  Artifact artifact : getDependencyArtifacts()) {
    if (!"String_Node_Str".equals(artifact.getType())) {
      continue;
    }
    for (    String mylocale : locales) {
      if (locale == null || mylocale.equals(locale)) {
        Artifact localeArtifact=artifactFactory.createArtifactWithClassifier(artifact.getGroupId(),artifact.getArtifactId(),artifact.getVersion(),artifact.getType(),mylocale);
        resolveArtifact(localeArtifact,resolver,localRepository,remoteRepositories);
        resourceBundles.add(localeArtifact.getFile());
      }
    }
  }
  getLog().debug("String_Node_Str" + locale + "String_Node_Str"+ resourceBundles);
  return resourceBundles.toArray(new File[resourceBundles.size()]);
}
Program: 10056
Project: 10056
Buggy source:
@Override protected void writeResourceBundle(String[] bundles,String locale,File localePath) throws MojoExecutionException {
  getLog().info("String_Node_Str" + locale);
  Library localized=new Library();
  localized.setConfiguration(configuration);
  localized.setLogger(new CompileLogger(getLog()));
  configuration.addLibraryPath(new File[]{outputFile});
  setLocales(new String[]{locale});
  configuration.setSourcePath(new File[]{localePath});
  for (  String bundle : bundles) {
    localized.addResourceBundle(bundle);
  }
  configuration.addLibraryPath(getResourcesBundles());
  File output=new File(build.getDirectory(),build.getFinalName() + "String_Node_Str" + locale+ "String_Node_Str");
  localized.setOutput(output);
  build(localized);
  projectHelper.attachArtifact(project,"String_Node_Str",locale,output);
}

Fixed version (ground truth):
@Override protected void writeResourceBundle(String[] bundles,String locale,File localePath) throws MojoExecutionException {
  getLog().info("String_Node_Str" + locale);
  Library localized=new Library();
  localized.setConfiguration(configuration);
  configuration.setLibraryPath(new File[0]);
  localized.setLogger(new CompileLogger(getLog()));
  configuration.addLibraryPath(new File[]{outputFile});
  setLocales(new String[]{locale});
  configuration.setSourcePath(new File[]{localePath});
  for (  String bundle : bundles) {
    localized.addResourceBundle(bundle);
  }
  configuration.addLibraryPath(getResourcesBundles(locale));
  File output=new File(build.getDirectory(),build.getFinalName() + "String_Node_Str" + locale+ "String_Node_Str");
  localized.setOutput(output);
  build(localized);
  projectHelper.attachArtifact(project,"String_Node_Str",locale,output);
}
Program: 10059
Project: 10059
Buggy source:
@Override protected void configure() throws MojoExecutionException {
  super.configure();
  configuration.setExternalLibraryPath(getGlobalDependency());
  configuration.includeLibraries(null);
  configuration.setRuntimeSharedLibraries(null);
  configuration.setLibraryPath(getDependenciesPath("String_Node_Str"));
  configuration.addLibraryPath(getDependenciesPath("String_Node_Str"));
  configuration.addLibraryPath(getDependenciesPath("String_Node_Str"));
  configuration.addLibraryPath(getResourcesBundles());
  configuration.addLibraryPath(getDependenciesPath("String_Node_Str"));
  configuration.includeLibraries(merge(getDependenciesPath("String_Node_Str"),getDependenciesPath("String_Node_Str")));
  configuration.addSourcePath(new File[]{new File(build.getTestOutputDirectory())});
  configuration.addSourcePath(MavenUtils.getTestSourcePaths(build));
  configuration.allowSourcePathOverlap(true);
}

Fixed version (ground truth):
@Override protected void configure() throws MojoExecutionException {
  super.configure();
  configuration.setExternalLibraryPath(getGlobalDependency());
  configuration.includeLibraries(null);
  configuration.setRuntimeSharedLibraries(null);
  configuration.setLibraryPath(getDependenciesPath("String_Node_Str"));
  configuration.addLibraryPath(getDependenciesPath("String_Node_Str"));
  configuration.addLibraryPath(getDependenciesPath("String_Node_Str"));
  configuration.addLibraryPath(getResourcesBundles());
  configuration.addLibraryPath(getDependenciesPath("String_Node_Str"));
  configuration.includeLibraries(merge(getDependenciesPath("String_Node_Str"),getDependenciesPath("String_Node_Str")));
  configuration.addSourcePath(new File[]{new File(build.getTestOutputDirectory())});
  configuration.addSourcePath(MavenUtils.getTestSourcePaths(project,build));
  configuration.allowSourcePathOverlap(true);
}
Program: 10060
Project: 10060
Buggy source:
@Override public void setUp() throws MojoExecutionException, MojoFailureException {
  isSetProjectFile=false;
  File outputFolder=new File(build.getTestOutputDirectory());
  if (!outputFolder.exists()) {
    outputFolder.mkdirs();
  }
  outputFile=new File(build.getDirectory(),build.getFinalName() + "String_Node_Str");
  includeSources=MavenUtils.getTestSourcePaths(build);
  super.setUp();
}

Fixed version (ground truth):
@Override public void setUp() throws MojoExecutionException, MojoFailureException {
  isSetProjectFile=false;
  File outputFolder=new File(build.getTestOutputDirectory());
  if (!outputFolder.exists()) {
    outputFolder.mkdirs();
  }
  outputFile=new File(build.getDirectory(),build.getFinalName() + "String_Node_Str");
  includeSources=MavenUtils.getTestSourcePaths(project,build);
  super.setUp();
}
Program: 10061
Project: 10061
Buggy source:
@Override protected void configure() throws MojoExecutionException {
  super.configure();
  configuration.addLibraryPath(getDependenciesPath("String_Node_Str"));
  configuration.addSourcePath(MavenUtils.getTestSourcePaths(build));
}

Fixed version (ground truth):
@Override protected void configure() throws MojoExecutionException {
  super.configure();
  configuration.addLibraryPath(getDependenciesPath("String_Node_Str"));
  configuration.addSourcePath(MavenUtils.getTestSourcePaths(project,build));
}
Program: 10063
Project: 10063
Buggy source:
/** 
 * Get the test-source paths for all resources in the test-source directory.
 * @param build Build for this to get all test-source paths
 * @return Array of test-source paths for all resources in the test-source directory
 */
@SuppressWarnings("String_Node_Str") public static File[] getTestSourcePaths(Build build){
  return getFiles(build.getTestSourceDirectory(),build.getTestResources());
}

Fixed version (ground truth):
/** 
 * Get the test-source paths for all resources in the test-source directory.
 * @param build Build for this to get all test-source paths
 * @return Array of test-source paths for all resources in the test-source directory
 */
@SuppressWarnings("String_Node_Str") public static File[] getTestSourcePaths(MavenProject project,Build build){
  return getFiles(build.getTestSourceDirectory(),build.getTestResources(),project.getTestCompileSourceRoots());
}
Program: 10064
Project: 10064
Buggy source:
/** 
 * Resolve a resource file in a maven project resources folders
 * @param project maven project
 * @param resourceFile sugested name on pom
 * @return source file or null if source not found
 */
@SuppressWarnings("String_Node_Str") public static File resolveResourceFile(MavenProject project,String resourceFile){
  File[] resoucesFolders=getFiles(project.getBasedir().getAbsolutePath(),project.getBuild().getResources());
  for (  File resourceFolder : resoucesFolders) {
    File resource=new File(resourceFolder,resourceFile);
    if (resource.exists()) {
      return resource;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Resolve a resource file in a maven project resources folders
 * @param project maven project
 * @param resourceFile sugested name on pom
 * @return source file or null if source not found
 */
@SuppressWarnings("String_Node_Str") public static File resolveResourceFile(MavenProject project,String resourceFile){
  File[] resoucesFolders=getFiles(project.getBasedir().getAbsolutePath(),project.getBuild().getResources(),Collections.EMPTY_LIST);
  for (  File resourceFolder : resoucesFolders) {
    File resource=new File(resourceFolder,resourceFile);
    if (resource.exists()) {
      return resource;
    }
  }
  return null;
}
Program: 10065
Project: 10065
Buggy source:
public static Map<String,File> getManifests(File configZip,Build build) throws MojoExecutionException {
  File outputFolder=new File(build.getOutputDirectory(),"String_Node_Str");
  outputFolder.mkdirs();
  ZipExtractor ze;
  try {
    ze=new ZipExtractor(configZip);
    ze.extract(outputFolder);
  }
 catch (  IOException e) {
    throw new MojoExecutionException("String_Node_Str",e);
  }
  Map<String,File> manifests=new LinkedHashMap<String,File>();
  File configFile=new File(outputFolder,"String_Node_Str");
  if (!configFile.isFile()) {
    return manifests;
  }
  SAXReader reader=new SAXReader();
  Document document;
  try {
    document=reader.read(configFile);
  }
 catch (  DocumentException e) {
    throw new MojoExecutionException("String_Node_Str" + configFile.getAbsolutePath(),e);
  }
  List<Node> list=document.selectNodes("String_Node_Str");
  for (  Node node : list) {
    String uri=node.valueOf("String_Node_Str");
    File manifest=new File(outputFolder,node.valueOf("String_Node_Str"));
    if (!manifest.exists()) {
      throw new MojoExecutionException("String_Node_Str" + uri + "String_Node_Str"+ manifest.getAbsolutePath());
    }
    manifests.put(uri,manifest);
  }
  return manifests;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static Map<String,File> getManifests(File configZip,Build build) throws MojoExecutionException {
  File outputFolder=new File(build.getOutputDirectory(),"String_Node_Str");
  outputFolder.mkdirs();
  ZipExtractor ze;
  try {
    ze=new ZipExtractor(configZip);
    ze.extract(outputFolder);
  }
 catch (  IOException e) {
    throw new MojoExecutionException("String_Node_Str",e);
  }
  Map<String,File> manifests=new LinkedHashMap<String,File>();
  File configFile=new File(outputFolder,"String_Node_Str");
  if (!configFile.isFile()) {
    return manifests;
  }
  SAXReader reader=new SAXReader();
  Document document;
  try {
    document=reader.read(configFile);
  }
 catch (  DocumentException e) {
    throw new MojoExecutionException("String_Node_Str" + configFile.getAbsolutePath(),e);
  }
  List<Node> list=document.selectNodes("String_Node_Str");
  for (  Node node : list) {
    String uri=node.valueOf("String_Node_Str");
    File manifest=new File(outputFolder,node.valueOf("String_Node_Str"));
    if (!manifest.exists()) {
      throw new MojoExecutionException("String_Node_Str" + uri + "String_Node_Str"+ manifest.getAbsolutePath());
    }
    manifests.put(uri,manifest);
  }
  return manifests;
}
Program: 10066
Project: 10066
Buggy source:
/** 
 * Get array of Files for all resources in the resources list.
 * @param sourceDirectory path to source directory
 * @param resources List of Resources
 * @return Array of Files for given source directory and resources
 */
private static File[] getFiles(String sourceDirectory,List<Resource> resources){
  List<File> files=new ArrayList<File>();
  File source=new File(sourceDirectory);
  if (source.exists()) {
    files.add(source);
  }
  for (  Resource resource : resources) {
    File resourceFile=new File(resource.getDirectory());
    if (resourceFile.exists()) {
      files.add(resourceFile);
    }
  }
  return files.toArray(new File[files.size()]);
}

Fixed version (ground truth):
/** 
 * Get array of Files for all resources in the resources list.
 * @param project
 * @param sourceDirectory path to source directory
 * @param resources List of Resources
 * @param compilePaths
 * @return Array of Files for given source directory and resources
 */
private static File[] getFiles(String sourceDirectory,List<Resource> resources,List<String> compilePaths){
  Set<File> files=new HashSet<File>();
  File source=new File(sourceDirectory);
  if (source.exists()) {
    files.add(source);
  }
  for (  Resource resource : resources) {
    File resourceFile=new File(resource.getDirectory());
    if (resourceFile.exists()) {
      files.add(resourceFile);
    }
  }
  for (  String path : compilePaths) {
    File filePath=new File(path);
    if (filePath.exists()) {
      files.add(filePath);
    }
  }
  return files.toArray(new File[files.size()]);
}
Program: 10067
Project: 10067
Buggy source:
/** 
 * Get the source paths for all resources in the source directory.
 * @param build Build for this to get all source paths
 * @return Array of source paths for all resources in the source directory
 */
@SuppressWarnings("String_Node_Str") public static File[] getSourcePaths(Build build){
  return getFiles(build.getSourceDirectory(),build.getResources());
}

Fixed version (ground truth):
/** 
 * Get the source paths for all resources in the source directory.
 * @param build Build for this to get all source paths
 * @return Array of source paths for all resources in the source directory
 */
@SuppressWarnings("String_Node_Str") public static File[] getSourcePaths(MavenProject project,Build build){
  return getFiles(build.getSourceDirectory(),build.getResources(),project.getCompileSourceRoots());
}
Program: 10068
Project: 10068
Buggy source:
@Override protected void configure() throws MojoExecutionException {
  super.configure();
  configuration.setExternalLibraryPath(getGlobalDependency());
  configuration.setIncludes(null);
  configuration.setRuntimeSharedLibraries(null);
  configuration.setLibraryPath(getDependenciesPath("String_Node_Str"));
  configuration.addLibraryPath(getDependenciesPath("String_Node_Str"));
  configuration.addLibraryPath(getDependenciesPath("String_Node_Str"));
  configuration.addLibraryPath(getResourcesBundles());
  configuration.addLibraryPath(getDependenciesPath("String_Node_Str"));
  configuration.addLibraryPath(getDependenciesPath("String_Node_Str"));
  configuration.addLibraryPath(getDependenciesPath("String_Node_Str"));
  configuration.addSourcePath(new File[]{new File(build.getTestOutputDirectory())});
  configuration.addSourcePath(MavenUtils.getTestSourcePaths(build));
  configuration.allowSourcePathOverlap(true);
}

Fixed version (ground truth):
@Override protected void configure() throws MojoExecutionException {
  super.configure();
  configuration.setExternalLibraryPath(getGlobalDependency());
  configuration.includeLibraries(null);
  configuration.setRuntimeSharedLibraries(null);
  configuration.setLibraryPath(getDependenciesPath("String_Node_Str"));
  configuration.addLibraryPath(getDependenciesPath("String_Node_Str"));
  configuration.addLibraryPath(getDependenciesPath("String_Node_Str"));
  configuration.addLibraryPath(getResourcesBundles());
  configuration.addLibraryPath(getDependenciesPath("String_Node_Str"));
  configuration.includeLibraries(merge(getDependenciesPath("String_Node_Str"),getDependenciesPath("String_Node_Str")));
  configuration.addSourcePath(new File[]{new File(build.getTestOutputDirectory())});
  configuration.addSourcePath(MavenUtils.getTestSourcePaths(build));
  configuration.allowSourcePathOverlap(true);
}
Program: 10069
Project: 10069
Buggy source:
/** 
 * Called by Ant to execute the task.
 */
@Override protected void setUp() throws MojoExecutionException, MojoFailureException {
  swf=new File(build.getTestOutputDirectory(),"String_Node_Str");
  reportPath=new File(build.getDirectory(),"String_Node_Str");
  reportPath.mkdirs();
  if (updateSecuritySandbox) {
    updateSecuritySandbox();
  }
}

Fixed version (ground truth):
/** 
 * Called by Ant to execute the task.
 */
@Override protected void setUp() throws MojoExecutionException, MojoFailureException {
  swf=new File(build.getTestOutputDirectory(),"String_Node_Str");
  reportPath=new File(build.getDirectory(),"String_Node_Str");
  reportPath.mkdirs();
}
Program: 10070
Project: 10070
Buggy source:
@Override protected void tearDown() throws MojoExecutionException, MojoFailureException {
  super.tearDown();
  if (modules != null) {
    configuration.addExterns(new File[]{linkReportFile});
    for (    File module : modules) {
      getLog().info("String_Node_Str" + module);
      String moduleName=module.getName();
      moduleName=moduleName.substring(0,moduleName.lastIndexOf('.'));
      Application moduleBuilder;
      try {
        moduleBuilder=new Application(module);
      }
 catch (      FileNotFoundException e) {
        throw new MojoFailureException("String_Node_Str" + module);
      }
      moduleBuilder.setConfiguration(configuration);
      moduleBuilder.setLogger(new CompileLogger(getLog()));
      File outputModule=new File(build.getDirectory(),build.getFinalName() + "String_Node_Str" + moduleName+ "String_Node_Str"+ project.getPackaging());
      moduleBuilder.setOutput(outputModule);
      build(moduleBuilder);
      projectHelper.attachArtifact(project,"String_Node_Str",moduleName,outputModule);
    }
  }
}

Fixed version (ground truth):
@Override protected void tearDown() throws MojoExecutionException, MojoFailureException {
  super.tearDown();
  if (updateSecuritySandbox) {
    updateSecuritySandbox();
  }
  if (modules != null) {
    configuration.addExterns(new File[]{linkReportFile});
    for (    File module : modules) {
      getLog().info("String_Node_Str" + module);
      String moduleName=module.getName();
      moduleName=moduleName.substring(0,moduleName.lastIndexOf('.'));
      Application moduleBuilder;
      try {
        moduleBuilder=new Application(module);
      }
 catch (      FileNotFoundException e) {
        throw new MojoFailureException("String_Node_Str" + module);
      }
      moduleBuilder.setConfiguration(configuration);
      moduleBuilder.setLogger(new CompileLogger(getLog()));
      File outputModule=new File(build.getDirectory(),build.getFinalName() + "String_Node_Str" + moduleName+ "String_Node_Str"+ project.getPackaging());
      moduleBuilder.setOutput(outputModule);
      build(moduleBuilder);
      projectHelper.attachArtifact(project,"String_Node_Str",moduleName,outputModule);
    }
  }
}
Program: 10072
Project: 10072
Buggy source:
private void addFooter(List<String> args){
  if (footer != null) {
    args.add("String_Node_Str" + footer);
  }
}

Fixed version (ground truth):
private void addFooter(List<String> args){
  if (footer != null) {
    args.add("String_Node_Str");
    args.add(footer);
  }
}
Program: 10073
Project: 10073
Buggy source:
/** 
 * Get resource bundles
 * @return Array of resource bundle files
 * @throws MojoExecutionException
 */
protected File[] getResourcesBundles() throws MojoExecutionException {
  List<File> resouceBundles=new ArrayList<File>();
  for (  Artifact artifact : getDependencyArtifacts()) {
    if (!"String_Node_Str".equals(artifact.getType())) {
      continue;
    }
    for (    String locale : locales) {
      Artifact localeArtifact=artifactFactory.createArtifactWithClassifier(artifact.getGroupId(),artifact.getArtifactId(),artifact.getVersion(),artifact.getType(),locale);
      resolveArtifact(localeArtifact,resolver,localRepository,resouceBundles);
      resouceBundles.add(localeArtifact.getFile());
    }
  }
  return resouceBundles.toArray(new File[resouceBundles.size()]);
}

Fixed version (ground truth):
/** 
 * Get resource bundles
 * @return Array of resource bundle files
 * @throws MojoExecutionException
 */
protected File[] getResourcesBundles() throws MojoExecutionException {
  List<File> resourceBundles=new ArrayList<File>();
  for (  Artifact artifact : getDependencyArtifacts()) {
    if (!"String_Node_Str".equals(artifact.getType())) {
      continue;
    }
    for (    String locale : locales) {
      Artifact localeArtifact=artifactFactory.createArtifactWithClassifier(artifact.getGroupId(),artifact.getArtifactId(),artifact.getVersion(),artifact.getType(),locale);
      resolveArtifact(localeArtifact,resolver,localRepository,remoteRepositories);
      resourceBundles.add(localeArtifact.getFile());
    }
  }
  return resourceBundles.toArray(new File[resourceBundles.size()]);
}
Program: 10075
Project: 10075
Buggy source:
@Override protected void writeResourceBundle(String[] bundles,String locale,File localePath) throws MojoExecutionException {
  getLog().info("String_Node_Str" + locale);
  Library localized=new Library();
  localized.setConfiguration(configuration);
  localized.setLogger(new CompileLogger(getLog()));
  configuration.addLibraryPath(new File[]{outputFile});
  configuration.setLocale(new String[]{locale});
  configuration.setSourcePath(new File[]{localePath});
  for (  String bundle : bundles) {
    localized.addResourceBundle(bundle);
  }
  configuration.addLibraryPath(getResourcesBundles());
  File output=new File(build.getDirectory(),project.getArtifactId() + "String_Node_Str" + project.getVersion()+ "String_Node_Str"+ locale+ "String_Node_Str");
  localized.setOutput(output);
  build(localized);
  projectHelper.attachArtifact(project,"String_Node_Str",locale,output);
}

Fixed version (ground truth):
@Override protected void writeResourceBundle(String[] bundles,String locale,File localePath) throws MojoExecutionException {
  getLog().info("String_Node_Str" + locale);
  Library localized=new Library();
  localized.setConfiguration(configuration);
  localized.setLogger(new CompileLogger(getLog()));
  configuration.addLibraryPath(new File[]{outputFile});
  configuration.setLocale(new String[]{locale});
  configuration.setSourcePath(new File[]{localePath});
  for (  String bundle : bundles) {
    localized.addResourceBundle(bundle);
  }
  configuration.addLibraryPath(getResourcesBundles());
  File output=new File(build.getDirectory(),build.getFinalName() + "String_Node_Str" + locale+ "String_Node_Str");
  localized.setOutput(output);
  build(localized);
  projectHelper.attachArtifact(project,"String_Node_Str",locale,output);
}
Program: 10076
Project: 10076
Buggy source:
@SuppressWarnings("String_Node_Str") private boolean isCompilationRequired() throws MojoExecutionException {
  if (!quick) {
    return true;
  }
  Artifact artifact=artifactFactory.createArtifact(project.getGroupId(),project.getArtifactId(),project.getVersion(),null,project.getPackaging());
  try {
    resolver.resolve(artifact,remoteRepositories,localRepository);
  }
 catch (  AbstractArtifactResolutionException e) {
    return true;
  }
  File artifactFile=artifact.getFile();
  if (artifactFile == null || !artifactFile.exists()) {
    getLog().warn("String_Node_Str");
    return true;
  }
  try {
    FileUtils.copyFile(artifactFile,outputFile);
  }
 catch (  IOException e) {
    throw new MojoExecutionException("String_Node_Str",e);
  }
  long lastCompiledArtifact=artifactFile.lastModified();
  Set<Artifact> dependencies=getDependencyArtifacts();
  for (  Artifact dependency : dependencies) {
    if (FileUtils.isFileNewer(dependency.getFile(),lastCompiledArtifact)) {
      getLog().warn("String_Node_Str" + dependency);
      return true;
    }
  }
  for (  File sourcePath : sourcePaths) {
    Collection<File> files=FileUtils.listFiles(sourcePath,new AgeFileFilter(lastCompiledArtifact,false),null);
    if (files.size() > 0) {
      getLog().warn("String_Node_Str");
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private boolean isCompilationRequired() throws MojoExecutionException {
  if (!quick) {
    return true;
  }
  Artifact artifact=artifactFactory.createArtifact(project.getGroupId(),project.getArtifactId(),project.getVersion(),null,project.getPackaging());
  try {
    resolver.resolve(artifact,remoteRepositories,localRepository);
  }
 catch (  AbstractArtifactResolutionException e) {
    return true;
  }
  File artifactFile=artifact.getFile();
  if (artifactFile == null || !artifactFile.exists()) {
    getLog().warn("String_Node_Str");
    return true;
  }
  try {
    FileUtils.copyFile(artifactFile,outputFile);
  }
 catch (  IOException e) {
    throw new MojoExecutionException("String_Node_Str",e);
  }
  long lastCompiledArtifact=artifactFile.lastModified();
  Set<Artifact> dependencies=getDependencyArtifacts();
  for (  Artifact dependency : dependencies) {
    if (FileUtils.isFileNewer(dependency.getFile(),lastCompiledArtifact)) {
      getLog().warn("String_Node_Str" + dependency);
      return true;
    }
  }
  List<File> paths=new ArrayList<File>(Arrays.asList(sourcePaths));
  paths.remove(new File(resourceBundlePath));
  for (  String locale : locales) {
    paths.add(MavenUtils.getLocaleResourcePath(resourceBundlePath,locale));
  }
  for (  File sourcePath : paths) {
    Collection<File> files=FileUtils.listFiles(sourcePath,new AgeFileFilter(lastCompiledArtifact,false),null);
    if (files.size() > 0) {
      getLog().warn("String_Node_Str");
      return true;
    }
  }
  return false;
}
Program: 10078
Project: 10078
Buggy source:
/** 
 * Called by Ant to execute the task.
 */
@Override protected void setUp() throws MojoExecutionException, MojoFailureException {
  swf=new File(build.getTestOutputDirectory(),"String_Node_Str");
  reportPath=new File(build.getDirectory(),"String_Node_Str");
  reportPath.mkdirs();
}

Fixed version (ground truth):
/** 
 * Called by Ant to execute the task.
 */
@Override protected void setUp() throws MojoExecutionException, MojoFailureException {
  swf=new File(build.getTestOutputDirectory(),"String_Node_Str");
  reportPath=new File(build.getDirectory(),"String_Node_Str");
  reportPath.mkdirs();
  if (updateSecuritySandbox) {
    updateSecuritySandbox();
  }
}
Program: 10079
Project: 10079
Buggy source:
private void addPackageDescriptions(List<String> args){
  if (packageDescriptions == null) {
    return;
  }
  for (  String pack : packageDescriptions.keySet()) {
    args.add("String_Node_Str" + pack + "String_Node_Str"+ packageDescriptions.get(pack));
  }
}

Fixed version (ground truth):
private void addPackageDescriptions(List<String> args){
  if (packageDescriptions == null) {
    return;
  }
  for (  String pack : packageDescriptions.keySet()) {
    args.add("String_Node_Str");
    args.add(pack);
    args.add(packageDescriptions.get(pack));
  }
}
Program: 10080
Project: 10080
Buggy source:
@Override public void execute() throws MojoExecutionException, MojoFailureException {
  setUp();
  if (skipTests) {
    getLog().warn("String_Node_Str");
  }
 else   if (swf == null || !swf.exists()) {
    getLog().warn("String_Node_Str" + swf);
  }
 else {
    run();
    tearDown();
  }
}

Fixed version (ground truth):
@Override public void execute() throws MojoExecutionException, MojoFailureException {
  setUp();
  if (skip || skipTest) {
    getLog().info("String_Node_Str");
  }
 else   if (swf == null || !swf.exists()) {
    getLog().warn("String_Node_Str" + swf);
  }
 else {
    run();
    tearDown();
  }
}
Program: 10081
Project: 10081
Buggy source:
protected void run() throws MojoExecutionException, MojoFailureException {
  if (docSources == null || docSources.length == 0) {
    getLog().warn("String_Node_Str");
    return;
  }
  List<String> args=new ArrayList<String>();
  addDocSources(args);
  addDocClasses(args);
  addDocNamespaces(args);
  addSourcePath(args);
  addLibraries(args);
  addCompatibility(args);
  addPackageDescriptions(args);
  addExcludeClasses(args);
  addFooter(args);
  args.add("String_Node_Str" + templatesPath.getAbsolutePath());
  args.add("String_Node_Str" + windowTitle);
  args.add("String_Node_Str" + mainTitle);
  args.add("String_Node_Str" + leftFramesetWidth);
  args.add("String_Node_Str" + excludeDependencies);
  args.add("String_Node_Str" + fontsSnapshot.getAbsolutePath());
  if (headlessServer) {
    args.add("String_Node_Str");
  }
  args.add("String_Node_Str" + configFile.getAbsolutePath());
  args.add("String_Node_Str" + output.getAbsolutePath());
  getLog().info(args.toString());
  ASDoc.asdoc(args.toArray(new String[args.size()]));
  int errorCount=ThreadLocalToolkit.errorCount();
  if (errorCount > 0) {
    throw new MojoExecutionException("String_Node_Str");
  }
}

Fixed version (ground truth):
protected void run() throws MojoExecutionException, MojoFailureException {
  if (docSources == null || docSources.length == 0) {
    getLog().warn("String_Node_Str");
    return;
  }
  List<String> args=new ArrayList<String>();
  addDocSources(args);
  addDocClasses(args);
  addDocNamespaces(args);
  addSourcePath(args);
  addLibraries(args);
  addCompatibility(args);
  addPackageDescriptions(args);
  addDefines(args);
  addExcludeClasses(args);
  addFooter(args);
  args.add("String_Node_Str" + templatesPath.getAbsolutePath());
  args.add("String_Node_Str" + windowTitle);
  args.add("String_Node_Str" + mainTitle);
  args.add("String_Node_Str" + leftFramesetWidth);
  args.add("String_Node_Str" + excludeDependencies);
  args.add("String_Node_Str" + fontsSnapshot.getAbsolutePath());
  if (headlessServer) {
    args.add("String_Node_Str");
  }
  args.add("String_Node_Str" + configFile.getAbsolutePath());
  args.add("String_Node_Str" + output.getAbsolutePath());
  getLog().info(args.toString());
  ASDoc.asdoc(args.toArray(new String[args.size()]));
  int errorCount=ThreadLocalToolkit.errorCount();
  if (errorCount > 0) {
    throw new MojoExecutionException("String_Node_Str");
  }
}
Program: 10082
Project: 10082
Buggy source:
@SuppressWarnings("String_Node_Str") public static String getCompilerPluginSetting(MavenProject project,String optionName){
  String value=findCompilerPluginSettingInPlugins(project.getModel().getBuild().getPlugins(),optionName);
  if (value == null && project.getModel().getBuild().getPluginManagement() != null) {
    value=findCompilerPluginSettingInPlugins(project.getModel().getBuild().getPluginManagement().getPlugins(),optionName);
  }
  return value;
}

Fixed version (ground truth):
public static String getCompilerPluginSetting(MavenProject project,String optionName){
  Xpp3Dom value=getCompilerPluginConfiguration(project,optionName);
  return value.getValue();
}
Program: 10083
Project: 10083
Buggy source:
/** 
 * Returns a compiler plugin settings from a list of plugins .
 * @param project maven project
 * @return option value (may be null)
 */
@SuppressWarnings("String_Node_Str") private static String findCompilerPluginSettingInPlugins(List<Plugin> plugins,String optionName){
  String value=null;
  for (Iterator<Plugin> it=plugins.iterator(); it.hasNext(); ) {
    Plugin plugin=(Plugin)it.next();
    if (plugin.getArtifactId().equals("String_Node_Str")) {
      Xpp3Dom o=(Xpp3Dom)plugin.getConfiguration();
      if (o != null && o.getChild(optionName) != null) {
        value=o.getChild(optionName).getValue();
      }
      List<PluginExecution> executions=plugin.getExecutions();
      for (Iterator<PluginExecution> iter=executions.iterator(); iter.hasNext(); ) {
        PluginExecution execution=(PluginExecution)iter.next();
        o=(Xpp3Dom)execution.getConfiguration();
        if (o != null && o.getChild(optionName) != null) {
          value=o.getChild(optionName).getValue();
        }
      }
    }
  }
  return value;
}

Fixed version (ground truth):
/** 
 * Returns a compiler plugin settings from a list of plugins .
 * @param project maven project
 * @return option value (may be null)
 */
@SuppressWarnings("String_Node_Str") private static Xpp3Dom findCompilerPluginSettingInPlugins(List<Plugin> plugins,String optionName){
  for (Iterator<Plugin> it=plugins.iterator(); it.hasNext(); ) {
    Plugin plugin=(Plugin)it.next();
    if (plugin.getArtifactId().equals("String_Node_Str")) {
      Xpp3Dom o=(Xpp3Dom)plugin.getConfiguration();
      Xpp3Dom value=null;
      if (o != null && o.getChild(optionName) != null) {
        value=o.getChild(optionName);
      }
      List<PluginExecution> executions=plugin.getExecutions();
      for (Iterator<PluginExecution> iter=executions.iterator(); iter.hasNext(); ) {
        PluginExecution execution=(PluginExecution)iter.next();
        o=(Xpp3Dom)execution.getConfiguration();
        if (o != null && o.getChild(optionName) != null) {
          value=o.getChild(optionName);
        }
      }
      return value;
    }
  }
  return null;
}
Program: 10084
Project: 10084
Buggy source:
@Override protected void tearDown() throws MojoExecutionException, MojoFailureException {
  if (executionError != null) {
    throw executionError;
  }
  handleFailures();
}

Fixed version (ground truth):
@Override protected void tearDown() throws MojoExecutionException, MojoFailureException {
  if (!testFailureIgnore) {
    if (executionError != null) {
      throw executionError;
    }
    if (failures) {
      throw new MojoExecutionException("String_Node_Str");
    }
  }
 else {
    if (executionError != null) {
      getLog().error(executionError.getMessage(),executionError);
    }
    if (failures) {
      getLog().error("String_Node_Str");
    }
  }
}
Program: 10085
Project: 10085
Buggy source:
private File extractTemplate() throws MojoExecutionException {
  getLog().info("String_Node_Str");
  File template=new File(build.getOutputDirectory(),"String_Node_Str");
  URL url;
  try {
    URI uri=new URI(templateURI);
    url=getUrl(uri);
  }
 catch (  Exception e) {
    throw new MojoExecutionException("String_Node_Str",e);
  }
  try {
    FileUtils.copyURLToFile(url,template);
  }
 catch (  IOException e) {
    throw new MojoExecutionException("String_Node_Str" + template,e);
  }
  File outputDir=new File(build.getOutputDirectory(),"String_Node_Str");
  outputDir.mkdirs();
  try {
    ZipExtractor ze=new ZipExtractor(template);
    ze.extract(outputDir);
  }
 catch (  IOException e) {
    throw new MojoExecutionException("String_Node_Str",e);
  }
  return outputDir;
}

Fixed version (ground truth):
private File extractTemplate() throws MojoExecutionException {
  getLog().info("String_Node_Str");
  File outputDir=new File(build.getOutputDirectory(),"String_Node_Str");
  outputDir.mkdirs();
  URI uri;
  try {
    uri=new URI(templateURI);
  }
 catch (  URISyntaxException e) {
    throw new MojoExecutionException("String_Node_Str",e);
  }
  String scheme=uri.getScheme();
  if ("String_Node_Str".equals(scheme)) {
    copyEmbedTemplate(uri.getSchemeSpecificPart(),outputDir);
  }
 else   if ("String_Node_Str".equals(scheme)) {
    copyZipTemplate(uri.getSchemeSpecificPart(),outputDir);
  }
 else   if ("String_Node_Str".equals(scheme)) {
    copyFolderTemplate(uri.getSchemeSpecificPart(),outputDir);
  }
 else {
    throw new MojoExecutionException("String_Node_Str" + scheme);
  }
  return outputDir;
}
Program: 10086
Project: 10086
Buggy source:
public void execute() throws MojoExecutionException, MojoFailureException {
  try {
    getLog().error(getClass().getResource("String_Node_Str").toURI().toString());
  }
 catch (  URISyntaxException e) {
    e.printStackTrace();
  }
  init();
  File templateFolder=extractTemplate();
  File targetFolder=new File(build.getDirectory());
  copyTemplates(templateFolder,targetFolder);
  copyIndex(templateFolder,targetFolder);
}

Fixed version (ground truth):
public void execute() throws MojoExecutionException, MojoFailureException {
  init();
  File templateFolder=extractTemplate();
  File targetFolder=new File(build.getDirectory());
  copyTemplates(templateFolder,targetFolder);
  copyIndex(templateFolder,targetFolder);
}
Program: 10087
Project: 10087
Buggy source:
protected void run() throws MojoExecutionException, MojoFailureException {
  if (docSources == null || docSources.length == 0) {
    getLog().warn("String_Node_Str");
    return;
  }
  List<String> args=new ArrayList<String>();
  addDocSources(args);
  addDocClasses(args);
  addDocNamespaces(args);
  addSourcePath(args);
  addLibraries(args);
  addCompatibility(args);
  addPackageDescriptions(args);
  addExcludeClasses(args);
  addFooter(args);
  args.add("String_Node_Str" + templatesPath.getAbsolutePath());
  args.add("String_Node_Str" + windowTitle);
  args.add("String_Node_Str" + mainTitle);
  args.add("String_Node_Str" + leftFramesetWidth);
  args.add("String_Node_Str" + excludeDependencies);
  args.add("String_Node_Str" + fontsSnapshot.getAbsolutePath());
  args.add("String_Node_Str" + configFile.getAbsolutePath());
  args.add("String_Node_Str" + output.getAbsolutePath());
  getLog().info(args.toString());
  ASDoc.asdoc(args.toArray(new String[args.size()]));
  int errorCount=ThreadLocalToolkit.errorCount();
  if (errorCount > 0) {
    throw new MojoExecutionException("String_Node_Str");
  }
}

Fixed version (ground truth):
protected void run() throws MojoExecutionException, MojoFailureException {
  if (docSources == null || docSources.length == 0) {
    getLog().warn("String_Node_Str");
    return;
  }
  List<String> args=new ArrayList<String>();
  addDocSources(args);
  addDocClasses(args);
  addDocNamespaces(args);
  addSourcePath(args);
  addLibraries(args);
  addCompatibility(args);
  addPackageDescriptions(args);
  addExcludeClasses(args);
  addFooter(args);
  args.add("String_Node_Str" + templatesPath.getAbsolutePath());
  args.add("String_Node_Str" + windowTitle);
  args.add("String_Node_Str" + mainTitle);
  args.add("String_Node_Str" + leftFramesetWidth);
  args.add("String_Node_Str" + excludeDependencies);
  args.add("String_Node_Str" + fontsSnapshot.getAbsolutePath());
  if (headlessServer) {
    args.add("String_Node_Str");
  }
  args.add("String_Node_Str" + configFile.getAbsolutePath());
  args.add("String_Node_Str" + output.getAbsolutePath());
  getLog().info(args.toString());
  ASDoc.asdoc(args.toArray(new String[args.size()]));
  int errorCount=ThreadLocalToolkit.errorCount();
  if (errorCount > 0) {
    throw new MojoExecutionException("String_Node_Str");
  }
}
Program: 10088
Project: 10088
Buggy source:
private void makeHelperExecutable(File templates) throws MojoExecutionException {
  if (!MavenUtils.isWindows()) {
    Runtime runtime=Runtime.getRuntime();
    String statement=String.format("String_Node_Str",templates.getAbsolutePath(),"String_Node_Str" + (MavenUtils.isLinux() ? "String_Node_Str" : "String_Node_Str"));
    try {
      Process p=runtime.exec(statement);
      if (0 != p.waitFor()) {
        throw new MojoExecutionException(String.format("String_Node_Str"));
      }
    }
 catch (    Exception e) {
      throw new MojoExecutionException(String.format("String_Node_Str",statement));
    }
  }
}

Fixed version (ground truth):
private void makeHelperExecutable(File templates) throws MojoExecutionException {
  if (!MavenUtils.isWindows()) {
    Runtime runtime=Runtime.getRuntime();
    String pathname=String.format("String_Node_Str",templates.getAbsolutePath(),"String_Node_Str" + (MavenUtils.isLinux() ? "String_Node_Str" : "String_Node_Str"));
    String[] statements=new String[]{"String_Node_Str","String_Node_Str",pathname};
    try {
      Process p=runtime.exec(statements);
      int result=p.waitFor();
      if (0 != result) {
        throw new MojoExecutionException(String.format("String_Node_Str",Arrays.asList(statements),result));
      }
    }
 catch (    Exception e) {
      throw new MojoExecutionException(String.format("String_Node_Str",Arrays.asList(statements)));
    }
  }
}
Program: 10090
Project: 10090
Buggy source:
/** 
 * Get dependency artifacts for given scope
 * @param scope for which to get artifacts
 * @return List of artifacts
 * @throws MojoExecutionException
 */
protected List<Artifact> getDependencyArtifacts(String scope) throws MojoExecutionException {
  if (scope == null)   return null;
  List<Artifact> artifacts=new ArrayList<Artifact>();
  for (  Artifact artifact : getDependencyArtifacts()) {
    if ("String_Node_Str".equals(artifact.getType()) && scope.equals(artifact.getScope())) {
      artifacts.add(artifact);
    }
  }
  return artifacts;
}

Fixed version (ground truth):
/** 
 * Get dependency artifacts for given scope
 * @param scope for which to get artifacts
 * @return List of artifacts
 * @throws MojoExecutionException
 */
protected List<Artifact> getDependencyArtifacts(String... scopes) throws MojoExecutionException {
  if (scopes == null)   return null;
  if (scopes.length == 0) {
    return new ArrayList<Artifact>();
  }
  List<String> scopesList=Arrays.asList(scopes);
  List<Artifact> artifacts=new ArrayList<Artifact>();
  for (  Artifact artifact : getDependencyArtifacts()) {
    if ("String_Node_Str".equals(artifact.getType()) && scopesList.contains(artifact.getScope())) {
      artifacts.add(artifact);
    }
  }
  return artifacts;
}
Program: 10091
Project: 10091
Buggy source:
protected void run() throws MojoExecutionException, MojoFailureException {
  if (docSources == null || docSources.length == 0) {
    getLog().warn("String_Node_Str");
    return;
  }
  List<String> args=new ArrayList<String>();
  addDocSources(args);
  addDocClasses(args);
  addDocNamespaces(args);
  addSourcePath(args);
  addLibraries(args);
  addCompatibility(args);
  addPackageDescriptions(args);
  addExcludeClasses(args);
  addFooter(args);
  args.add("String_Node_Str" + templatesPath.getAbsolutePath());
  args.add("String_Node_Str" + windowTitle);
  args.add("String_Node_Str" + mainTitle);
  args.add("String_Node_Str" + leftFramesetWidth);
  args.add("String_Node_Str" + excludeDependencies);
  args.add("String_Node_Str" + fontsSnapshot.getAbsolutePath());
  args.add("String_Node_Str" + configFile.getAbsolutePath());
  args.add("String_Node_Str" + output.getAbsolutePath());
  getLog().info(args.toString());
  ASDoc.asdoc(args.toArray(new String[args.size()]));
}

Fixed version (ground truth):
protected void run() throws MojoExecutionException, MojoFailureException {
  if (docSources == null || docSources.length == 0) {
    getLog().warn("String_Node_Str");
    return;
  }
  List<String> args=new ArrayList<String>();
  addDocSources(args);
  addDocClasses(args);
  addDocNamespaces(args);
  addSourcePath(args);
  addLibraries(args);
  addCompatibility(args);
  addPackageDescriptions(args);
  addExcludeClasses(args);
  addFooter(args);
  args.add("String_Node_Str" + templatesPath.getAbsolutePath());
  args.add("String_Node_Str" + windowTitle);
  args.add("String_Node_Str" + mainTitle);
  args.add("String_Node_Str" + leftFramesetWidth);
  args.add("String_Node_Str" + excludeDependencies);
  args.add("String_Node_Str" + fontsSnapshot.getAbsolutePath());
  args.add("String_Node_Str" + configFile.getAbsolutePath());
  args.add("String_Node_Str" + output.getAbsolutePath());
  getLog().info(args.toString());
  ASDoc.asdoc(args.toArray(new String[args.size()]));
  int errorCount=ThreadLocalToolkit.errorCount();
  if (errorCount > 0) {
    throw new MojoExecutionException("String_Node_Str");
  }
}
Program: 10094
Project: 10094
Buggy source:
@Override protected void tearDown() throws MojoExecutionException, MojoFailureException {
  super.tearDown();
  if (modules != null) {
    LibraryCache libCache=builder.getSwcCache();
    configuration.addExterns(new File[]{linkReportFile});
    for (    File module : modules) {
      getLog().info("String_Node_Str" + module);
      String moduleName=module.getName();
      moduleName=moduleName.substring(0,moduleName.lastIndexOf('.'));
      Application moduleBuilder;
      try {
        moduleBuilder=new Application(module);
      }
 catch (      FileNotFoundException e) {
        throw new MojoFailureException("String_Node_Str" + module);
      }
      moduleBuilder.setConfiguration(configuration);
      moduleBuilder.setLogger(new CompileLogger(getLog()));
      if (libCache != null) {
        moduleBuilder.setSwcCache(libCache);
      }
      File outputModule=new File(build.getDirectory(),build.getFinalName() + "String_Node_Str" + moduleName+ "String_Node_Str"+ project.getPackaging());
      moduleBuilder.setOutput(outputModule);
      build(moduleBuilder);
      projectHelper.attachArtifact(project,"String_Node_Str",moduleName,outputModule);
    }
  }
}

Fixed version (ground truth):
@Override protected void tearDown() throws MojoExecutionException, MojoFailureException {
  super.tearDown();
  if (modules != null) {
    configuration.addExterns(new File[]{linkReportFile});
    for (    File module : modules) {
      getLog().info("String_Node_Str" + module);
      String moduleName=module.getName();
      moduleName=moduleName.substring(0,moduleName.lastIndexOf('.'));
      Application moduleBuilder;
      try {
        moduleBuilder=new Application(module);
      }
 catch (      FileNotFoundException e) {
        throw new MojoFailureException("String_Node_Str" + module);
      }
      moduleBuilder.setConfiguration(configuration);
      moduleBuilder.setLogger(new CompileLogger(getLog()));
      File outputModule=new File(build.getDirectory(),build.getFinalName() + "String_Node_Str" + moduleName+ "String_Node_Str"+ project.getPackaging());
      moduleBuilder.setOutput(outputModule);
      build(moduleBuilder);
      projectHelper.attachArtifact(project,"String_Node_Str",moduleName,outputModule);
    }
  }
}