Program: 122506
Project: 122506
Buggy source:
/** 
 * Created OSGi Blueprint configuration for job bundle.
 * @param processItem
 * @param inputFile
 * @param targetFile
 * @param jobName
 * @param jobClassName
 * @param itemType
 * @param isESBJob
 * @throws IOException
 */
private void createJobBundleBlueprintConfig(ProcessItem processItem,String inputFile,File targetFile,String jobName,String jobClassName,String itemType) throws IOException {
  String additionalJobInterfaces="String_Node_Str";
  String additionalServiceProps="String_Node_Str";
  String additionalJobBundleConfig="String_Node_Str";
  String additionalJobBeanParams="String_Node_Str";
  if (ROUTE.equals(itemType)) {
    for (    NodeType node : EmfModelUtils.getComponentsByName(processItem,"String_Node_Str")) {
      String format=EmfModelUtils.computeTextElementValue("String_Node_Str",node);
      if (!"String_Node_Str".equals(format)) {
        if (EmfModelUtils.computeCheckElementValue("String_Node_Str",node)) {
          additionalJobBeanParams="String_Node_Str";
          additionalJobBundleConfig="String_Node_Str";
          break;
        }
      }
    }
  }
 else {
    if (isESBJob(processItem)) {
      additionalJobInterfaces="String_Node_Str";
      if (isESBProviderJob(processItem)) {
        additionalJobInterfaces+="String_Node_Str";
        additionalServiceProps="String_Node_Str";
      }
    }
  }
  additionalJobBeanParams+=DataSourceConfig.getAdditionalJobBeanParams(processItem);
  BufferedReader br=null;
  BufferedWriter bw=null;
  try {
    br=new BufferedReader(new FileReader(inputFile));
    bw=new BufferedWriter(new FileWriter(targetFile));
    String line=br.readLine();
    while (line != null) {
      line=line.replace("String_Node_Str",jobName).replace("String_Node_Str",itemType).replace("String_Node_Str",jobClassName).replace("String_Node_Str",additionalJobInterfaces).replace("String_Node_Str",additionalJobBeanParams).replace("String_Node_Str",additionalJobBundleConfig).replace("String_Node_Str",additionalServiceProps);
      bw.write(line);
      bw.newLine();
      line=br.readLine();
    }
    bw.flush();
  }
  finally {
    if (null != br) {
      br.close();
    }
    if (null != bw) {
      bw.close();
    }
  }
}

Fixed version (ground truth):
/** 
 * Created OSGi Blueprint configuration for job bundle.
 * @param processItem
 * @param inputFile
 * @param targetFile
 * @param jobName
 * @param jobClassName
 * @param itemType
 * @param isESBJob
 * @throws IOException
 */
private void createJobBundleBlueprintConfig(ProcessItem processItem,String inputFile,File targetFile,String jobName,String jobClassName,String itemType) throws IOException {
  String additionalJobInterfaces="String_Node_Str";
  String additionalServiceProps="String_Node_Str";
  String additionalJobBundleConfig="String_Node_Str";
  String additionalJobBeanParams="String_Node_Str";
  if (ROUTE.equals(itemType)) {
    for (    NodeType node : EmfModelUtils.getComponentsByName(processItem,"String_Node_Str")) {
      String format=EmfModelUtils.computeTextElementValue("String_Node_Str",node);
      if (!"String_Node_Str".equals(format)) {
        if (EmfModelUtils.computeCheckElementValue("String_Node_Str",node)) {
          additionalJobBeanParams="String_Node_Str";
          additionalJobBundleConfig="String_Node_Str" + "String_Node_Str";
          break;
        }
      }
    }
  }
 else {
    if (isESBJob(processItem)) {
      additionalJobInterfaces="String_Node_Str";
      if (isESBProviderJob(processItem)) {
        additionalJobInterfaces+="String_Node_Str";
        additionalServiceProps="String_Node_Str";
      }
    }
  }
  additionalJobBeanParams+=DataSourceConfig.getAdditionalJobBeanParams(processItem);
  BufferedReader br=null;
  BufferedWriter bw=null;
  try {
    br=new BufferedReader(new FileReader(inputFile));
    bw=new BufferedWriter(new FileWriter(targetFile));
    String line=br.readLine();
    while (line != null) {
      line=line.replace("String_Node_Str",jobName).replace("String_Node_Str",itemType).replace("String_Node_Str",jobClassName).replace("String_Node_Str",additionalJobInterfaces).replace("String_Node_Str",additionalJobBeanParams).replace("String_Node_Str",additionalJobBundleConfig).replace("String_Node_Str",additionalServiceProps);
      bw.write(line);
      bw.newLine();
      line=br.readLine();
    }
    bw.flush();
  }
  finally {
    if (null != br) {
      br.close();
    }
    if (null != bw) {
      bw.close();
    }
  }
}