Program: 112281
Project: 112281
Buggy source:
@Override public void execute() throws MojoExecutionException, MojoFailureException {
  FhirContext fhirContext;
  if ("String_Node_Str".equals(version)) {
    fhirContext=FhirContext.forDstu1();
  }
 else   if ("String_Node_Str".equals(version)) {
    fhirContext=FhirContext.forDstu2();
  }
 else   if ("String_Node_Str".equals(version)) {
    fhirContext=FhirContext.forDstu2_1();
  }
 else   if ("String_Node_Str".equals(version)) {
    fhirContext=FhirContext.forDev();
  }
 else {
    throw new MojoFailureException("String_Node_Str" + version);
  }
  if (baseResourceNames == null || baseResourceNames.isEmpty()) {
    baseResourceNames=new ArrayList<String>();
    ourLog.info("String_Node_Str",fhirContext.getVersion().getVersion());
    Properties p=new Properties();
    try {
      p.load(fhirContext.getVersion().getFhirVersionPropertiesFile());
    }
 catch (    IOException e) {
      throw new MojoFailureException("String_Node_Str",e);
    }
    ourLog.debug("String_Node_Str",p);
    TreeSet<String> keys=new TreeSet<String>();
    for (    Object next : p.keySet()) {
      keys.add((String)next);
    }
    for (    String next : keys) {
      if (next.startsWith("String_Node_Str")) {
        baseResourceNames.add(next.substring("String_Node_Str".length()).toLowerCase());
      }
    }
  }
  for (int i=0; i < baseResourceNames.size(); i++) {
    baseResourceNames.set(i,baseResourceNames.get(i).toLowerCase());
  }
  if (excludeResourceNames != null) {
    for (int i=0; i < excludeResourceNames.size(); i++) {
      excludeResourceNames.set(i,excludeResourceNames.get(i).toLowerCase());
    }
    baseResourceNames.removeAll(excludeResourceNames);
  }
  ourLog.info("String_Node_Str",baseResourceNames);
  File configPackageDirectoryBase=new File(targetDirectory,configPackageBase.replace("String_Node_Str",File.separatorChar + "String_Node_Str"));
  configPackageDirectoryBase.mkdirs();
  File packageDirectoryBase=new File(targetDirectory,packageBase.replace("String_Node_Str",File.separatorChar + "String_Node_Str"));
  packageDirectoryBase.mkdirs();
  ResourceGeneratorUsingSpreadsheet gen=new ResourceGeneratorUsingSpreadsheet(version,baseDir);
  gen.setBaseResourceNames(baseResourceNames);
  try {
    gen.parse();
    gen.setFilenameSuffix("String_Node_Str");
    gen.setTemplate("String_Node_Str");
    gen.writeAll(packageDirectoryBase,null,packageBase);
  }
 catch (  Exception e) {
    throw new MojoFailureException("String_Node_Str",e);
  }
  myProject.addCompileSourceRoot(targetDirectory.getAbsolutePath());
  try {
    VelocityContext ctx=new VelocityContext();
    ctx.put("String_Node_Str",gen.getResources());
    ctx.put("String_Node_Str",packageBase);
    ctx.put("String_Node_Str",configPackageBase);
    ctx.put("String_Node_Str",version);
    ctx.put("String_Node_Str",new EscapeTool());
    String capitalize=WordUtils.capitalize(version);
    if ("String_Node_Str".equals(capitalize)) {
      capitalize="String_Node_Str";
    }
    ctx.put("String_Node_Str",capitalize);
    VelocityEngine v=new VelocityEngine();
    v.setProperty("String_Node_Str","String_Node_Str");
    v.setProperty("String_Node_Str","String_Node_Str");
    v.setProperty("String_Node_Str",Boolean.TRUE);
    InputStream templateIs=ResourceGeneratorUsingSpreadsheet.class.getResourceAsStream("String_Node_Str");
    InputStreamReader templateReader=new InputStreamReader(templateIs);
    targetResourceDirectory.mkdirs();
    File f=new File(targetResourceDirectory,targetResourceSpringBeansFile);
    OutputStreamWriter w=new OutputStreamWriter(new FileOutputStream(f,false),"String_Node_Str");
    v.evaluate(ctx,w,"String_Node_Str",templateReader);
    w.close();
    Resource resource=new Resource();
    resource.setDirectory(targetResourceDirectory.getAbsolutePath());
    resource.addInclude(targetResourceSpringBeansFile);
    myProject.addResource(resource);
    templateIs=ResourceGeneratorUsingSpreadsheet.class.getResourceAsStream("String_Node_Str");
    templateReader=new InputStreamReader(templateIs);
    f=new File(configPackageDirectoryBase,"String_Node_Str" + capitalize + "String_Node_Str");
    w=new OutputStreamWriter(new FileOutputStream(f,false),"String_Node_Str");
    v.evaluate(ctx,w,"String_Node_Str",templateReader);
    w.close();
  }
 catch (  Exception e) {
    throw new MojoFailureException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public void execute() throws MojoExecutionException, MojoFailureException {
  FhirContext fhirContext;
  if ("String_Node_Str".equals(version)) {
    fhirContext=FhirContext.forDstu1();
  }
 else   if ("String_Node_Str".equals(version)) {
    fhirContext=FhirContext.forDstu2();
  }
 else   if ("String_Node_Str".equals(version)) {
    fhirContext=FhirContext.forDstu2_1();
  }
 else {
    throw new MojoFailureException("String_Node_Str" + version);
  }
  if (baseResourceNames == null || baseResourceNames.isEmpty()) {
    baseResourceNames=new ArrayList<String>();
    ourLog.info("String_Node_Str",fhirContext.getVersion().getVersion());
    Properties p=new Properties();
    try {
      p.load(fhirContext.getVersion().getFhirVersionPropertiesFile());
    }
 catch (    IOException e) {
      throw new MojoFailureException("String_Node_Str",e);
    }
    ourLog.debug("String_Node_Str",p);
    TreeSet<String> keys=new TreeSet<String>();
    for (    Object next : p.keySet()) {
      keys.add((String)next);
    }
    for (    String next : keys) {
      if (next.startsWith("String_Node_Str")) {
        baseResourceNames.add(next.substring("String_Node_Str".length()).toLowerCase());
      }
    }
  }
  for (int i=0; i < baseResourceNames.size(); i++) {
    baseResourceNames.set(i,baseResourceNames.get(i).toLowerCase());
  }
  if (excludeResourceNames != null) {
    for (int i=0; i < excludeResourceNames.size(); i++) {
      excludeResourceNames.set(i,excludeResourceNames.get(i).toLowerCase());
    }
    baseResourceNames.removeAll(excludeResourceNames);
  }
  ourLog.info("String_Node_Str",baseResourceNames);
  File configPackageDirectoryBase=new File(targetDirectory,configPackageBase.replace("String_Node_Str",File.separatorChar + "String_Node_Str"));
  configPackageDirectoryBase.mkdirs();
  File packageDirectoryBase=new File(targetDirectory,packageBase.replace("String_Node_Str",File.separatorChar + "String_Node_Str"));
  packageDirectoryBase.mkdirs();
  ResourceGeneratorUsingSpreadsheet gen=new ResourceGeneratorUsingSpreadsheet(version,baseDir);
  gen.setBaseResourceNames(baseResourceNames);
  try {
    gen.parse();
    gen.setFilenameSuffix("String_Node_Str");
    gen.setTemplate("String_Node_Str");
    gen.writeAll(packageDirectoryBase,null,packageBase);
  }
 catch (  Exception e) {
    throw new MojoFailureException("String_Node_Str",e);
  }
  myProject.addCompileSourceRoot(targetDirectory.getAbsolutePath());
  try {
    VelocityContext ctx=new VelocityContext();
    ctx.put("String_Node_Str",gen.getResources());
    ctx.put("String_Node_Str",packageBase);
    ctx.put("String_Node_Str",configPackageBase);
    ctx.put("String_Node_Str",version);
    ctx.put("String_Node_Str",new EscapeTool());
    String capitalize=WordUtils.capitalize(version);
    if ("String_Node_Str".equals(capitalize)) {
      capitalize="String_Node_Str";
    }
    ctx.put("String_Node_Str",capitalize);
    VelocityEngine v=new VelocityEngine();
    v.setProperty("String_Node_Str","String_Node_Str");
    v.setProperty("String_Node_Str","String_Node_Str");
    v.setProperty("String_Node_Str",Boolean.TRUE);
    InputStream templateIs=ResourceGeneratorUsingSpreadsheet.class.getResourceAsStream("String_Node_Str");
    InputStreamReader templateReader=new InputStreamReader(templateIs);
    targetResourceDirectory.mkdirs();
    File f=new File(targetResourceDirectory,targetResourceSpringBeansFile);
    OutputStreamWriter w=new OutputStreamWriter(new FileOutputStream(f,false),"String_Node_Str");
    v.evaluate(ctx,w,"String_Node_Str",templateReader);
    w.close();
    Resource resource=new Resource();
    resource.setDirectory(targetResourceDirectory.getAbsolutePath());
    resource.addInclude(targetResourceSpringBeansFile);
    myProject.addResource(resource);
    templateIs=ResourceGeneratorUsingSpreadsheet.class.getResourceAsStream("String_Node_Str");
    templateReader=new InputStreamReader(templateIs);
    f=new File(configPackageDirectoryBase,"String_Node_Str" + capitalize + "String_Node_Str");
    w=new OutputStreamWriter(new FileOutputStream(f,false),"String_Node_Str");
    v.evaluate(ctx,w,"String_Node_Str",templateReader);
    w.close();
  }
 catch (  Exception e) {
    throw new MojoFailureException("String_Node_Str",e);
  }
}