nus-yam/ex-repair huggingface dataset:
Program: 90062
Project: 90062
Buggy source:
/** 
 * Get a connection to our database. Assumes that AutoCommit is true.
 * @return a connection to our database
 * @throws IOFailure if we cannot connect to the database (or find thedriver).
 */
public static Connection getDBConnection(){
  if (connectionPool.get(Thread.currentThread()) == null) {
    try {
      Class.forName(DBSpecifics.getInstance().getDriverClassName());
      Connection connection=DriverManager.getConnection(Settings.get(CommonSettings.DB_URL));
      connectionPool.put(Thread.currentThread(),connection);
      log.info("String_Node_Str" + Settings.get(CommonSettings.DB_URL) + "String_Node_Str"+ DBSpecifics.getInstance().getDriverClassName()+ "String_Node_Str");
    }
 catch (    ClassNotFoundException e) {
      final String message="String_Node_Str" + DBSpecifics.getInstance().getDriverClassName() + "String_Node_Str";
      log.warn(message,e);
      throw new IOFailure(message,e);
    }
catch (    SQLException e) {
      final String message="String_Node_Str" + Settings.get(CommonSettings.DB_URL) + "String_Node_Str"+ DBSpecifics.getInstance().getDriverClassName()+ "String_Node_Str";
      log.warn(message,e);
      throw new IOFailure(message,e);
    }
  }
  return connectionPool.get(Thread.currentThread());
}

Fixed version (ground truth):
/** 
 * Get a connection to our database. Assumes that AutoCommit is true.
 * @return a connection to our database
 * @throws IOFailure if we cannot connect to the database (or find thedriver).
 */
public static Connection getDBConnection(){
  if (connectionPool.get(Thread.currentThread()) == null) {
    try {
      Class.forName(DBSpecifics.getInstance().getDriverClassName());
      Connection connection=DriverManager.getConnection(Settings.get(CommonSettings.DB_URL));
      connectionPool.put(Thread.currentThread(),connection);
      log.info("String_Node_Str" + Settings.get(CommonSettings.DB_URL) + "String_Node_Str"+ DBSpecifics.getInstance().getDriverClassName()+ "String_Node_Str");
    }
 catch (    ClassNotFoundException e) {
      final String message="String_Node_Str" + DBSpecifics.getInstance().getDriverClassName() + "String_Node_Str";
      log.warn(message,e);
      throw new IOFailure(message,e);
    }
catch (    SQLException e) {
      final String message="String_Node_Str" + Settings.get(CommonSettings.DB_URL) + "String_Node_Str"+ DBSpecifics.getInstance().getDriverClassName()+ "String_Node_Str"+ "String_Node_Str"+ ExceptionUtils.getSQLExceptionCause(e);
      log.warn(message,e);
      throw new IOFailure(message,e);
    }
  }
  return connectionPool.get(Thread.currentThread());
}
Program: 90063
Project: 90063
Buggy source:
/** 
 * Shutdown the database system, if running embeddedly.  Otherwise, this is ignored. <p/> Will log a warning on errors, but otherwise ignore them.
 */
public void shutdownDatabase(){
  try {
    DriverManager.getConnection("String_Node_Str");
    log.warn("String_Node_Str");
  }
 catch (  SQLException e) {
    log.info("String_Node_Str");
    log.debug("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Shutdown the database system, if running embeddedly.  Otherwise, this is ignored. <p/> Will log a warning on errors, but otherwise ignore them.
 */
public void shutdownDatabase(){
  try {
    DriverManager.getConnection("String_Node_Str");
    log.warn("String_Node_Str");
  }
 catch (  SQLException e) {
    log.info("String_Node_Str");
    log.debug("String_Node_Str" + "String_Node_Str" + ExceptionUtils.getSQLExceptionCause(e),e);
  }
}
Program: 90065
Project: 90065
Buggy source:
/** 
 * Makes the install path with linux syntax.
 * @return The path in linux syntax.
 */
public String installPathLinux(){
  return machineParameters.getInstallDirValue() + "String_Node_Str" + settings.getSubChildValue(Constants.ENVIRONMENT_NAME_SETTING_PATH_LEAF);
}

Fixed version (ground truth):
/** 
 * Makes the install path with linux syntax.
 * @return The path in linux syntax.
 */
public String installPathLinux(){
  return machineParameters.getInstallDirValue() + "String_Node_Str" + settings.getSubChildValue(Constants.SETTINGS_ENVIRONMENT_NAME_LEAF);
}
Program: 90066
Project: 90066
Buggy source:
/** 
 * Extract the local variables from the root. Currently, this is the name and the optional applicationId.
 */
private void extractVariables(){
  try {
    Attribute at=applicationRoot.attribute(Constants.APPLICATION_NAME_ATTRIBUTE);
    if (at != null) {
      nameWithNamePath=at.getText();
      String[] stlist=nameWithNamePath.split("String_Node_Str");
      name=stlist[stlist.length - 1];
    }
 else {
      log.debug("String_Node_Str");
      name="String_Node_Str";
      nameWithNamePath="String_Node_Str";
    }
    Element elem=settings.getSubChild(Constants.APPLICATION_INSTANCE_ID_PATH);
    if (elem != null && !elem.getText().isEmpty()) {
      applicationId=elem.getText();
    }
 else {
      applicationId=null;
    }
  }
 catch (  Exception e) {
    log.debug("String_Node_Str" + e);
    throw new IOFailure("String_Node_Str" + e);
  }
}

Fixed version (ground truth):
/** 
 * Extract the local variables from the root. Currently, this is the name and the optional applicationId.
 */
private void extractVariables(){
  try {
    Attribute at=applicationRoot.attribute(Constants.APPLICATION_NAME_ATTRIBUTE);
    if (at != null) {
      nameWithNamePath=at.getText();
      String[] stlist=nameWithNamePath.split("String_Node_Str");
      name=stlist[stlist.length - 1];
      String xmlName=XmlStructure.pathAndContentToXML(nameWithNamePath,Constants.COMPLETE_APPLICATION_NAME_LEAF);
      Element appXmlName=XmlStructure.makeElementFromString(xmlName);
      settings.overWrite(appXmlName);
    }
 else {
      log.debug("String_Node_Str");
      name="String_Node_Str";
      nameWithNamePath="String_Node_Str";
    }
    Element elem=settings.getSubChild(Constants.SETTINGS_APPLICATION_INSTANCE_ID_LEAF);
    if (elem != null && !elem.getText().isEmpty()) {
      applicationId=elem.getText();
    }
 else {
      applicationId=null;
    }
  }
 catch (  Exception e) {
    log.debug("String_Node_Str" + e);
    throw new IOFailure("String_Node_Str" + e);
  }
}
Program: 90067
Project: 90067
Buggy source:
/** 
 * Makes the install path with windows syntax.
 * @return The path with windows syntax.
 */
public String installPathWindows(){
  return machineParameters.getInstallDirValue() + "String_Node_Str" + settings.getSubChildValue(Constants.ENVIRONMENT_NAME_SETTING_PATH_LEAF);
}

Fixed version (ground truth):
/** 
 * Makes the install path with windows syntax.
 * @return The path with windows syntax.
 */
public String installPathWindows(){
  return machineParameters.getInstallDirValue() + "String_Node_Str" + settings.getSubChildValue(Constants.SETTINGS_ENVIRONMENT_NAME_LEAF);
}
Program: 90068
Project: 90068
Buggy source:
/** 
 * A application is the program to be run on a machine.
 * @param e The root of this instance in the XML document.
 * @param parentSettings The setting inherited by the parent.
 * @param param The machine parameters inherited by the parent.
 */
public Application(Element e,XmlStructure parentSettings,Parameters param){
  ArgumentNotValid.checkNotNull(e,"String_Node_Str");
  ArgumentNotValid.checkNotNull(parentSettings,"String_Node_Str");
  ArgumentNotValid.checkNotNull(param,"String_Node_Str");
  settings=new XmlStructure(parentSettings.getRoot());
  applicationRoot=e;
  machineParameters=new Parameters(param);
  Element tmpSet=applicationRoot.element(Constants.SETTINGS_BRANCH);
  if (tmpSet != null) {
    settings.overWrite(tmpSet);
  }
  machineParameters.newParameters(applicationRoot);
  extractVariables();
}

Fixed version (ground truth):
/** 
 * A application is the program to be run on a machine.
 * @param e The root of this instance in the XML document.
 * @param parentSettings The setting inherited by the parent.
 * @param param The machine parameters inherited by the parent.
 */
public Application(Element e,XmlStructure parentSettings,Parameters param){
  ArgumentNotValid.checkNotNull(e,"String_Node_Str");
  ArgumentNotValid.checkNotNull(parentSettings,"String_Node_Str");
  ArgumentNotValid.checkNotNull(param,"String_Node_Str");
  settings=new XmlStructure(parentSettings.getRoot());
  applicationRoot=e;
  machineParameters=new Parameters(param);
  Element tmpSet=applicationRoot.element(Constants.COMPLETE_SETTINGS_BRANCH);
  if (tmpSet != null) {
    settings.overWrite(tmpSet);
  }
  machineParameters.newParameters(applicationRoot);
  extractVariables();
}
Program: 90069
Project: 90069
Buggy source:
/** 
 * Function to apply the variables.
 * @param offset The input offset value (1-9 below httpPort).
 * @param httpPort The new value for the HTTP port.
 * @param environmentName The new value for the environment name.
 * @param mailReceiver The new value for the mailReceiver.
 */
public void applyTestArguments(String offset,String httpPort,String environmentName,String mailReceiver){
  ArgumentNotValid.checkNotNullOrEmpty(offset,"String_Node_Str");
  ArgumentNotValid.checkNotNullOrEmpty(httpPort,"String_Node_Str");
  ArgumentNotValid.checkNotNullOrEmpty(environmentName,"String_Node_Str");
  ArgumentNotValid.checkNotNullOrEmpty(mailReceiver,"String_Node_Str");
  int offsetInt=(new Integer(httpPort)).intValue() - (new Integer(offset)).intValue();
  if (offsetInt > Constants.TEST_OFFSET_INTEGER_MAXIMUM_VALUE || offsetInt < 0) {
    System.err.print(Constants.MSG_ERROR_TEST_OFFSET);
    System.out.println();
    System.exit(0);
  }
  offsetVal=new String("String_Node_Str" + offsetInt);
  httpPortVal=httpPort;
  environmentNameVal=environmentName;
  mailReceiverVal=mailReceiver;
  httpPortPath=Constants.SETTINGS_HTTP_PORT_PATH;
  environmentNamePath=Constants.ENVIRONMENT_NAME_TOTAL_PATH_LEAF;
  mailReceiverPath=Constants.SETTINGS_NOTIFICATION_RECEIVER_PATH;
  offsetPaths=new OffsetSystem[]{new OffsetSystem(2,Constants.TEXT_JMX_PORT_PATH),new OffsetSystem(2,Constants.TEXT_JMX_RMI_PORT_PATH),new OffsetSystem(1,Constants.TEXT_HARVEST_HETRIX_GUI_PORT),new OffsetSystem(1,Constants.TEXT_HARVEST_HETRIX_JMX_PORT)};
  apply();
}

Fixed version (ground truth):
/** 
 * Function to apply the variables.
 * @param offset The input offset value (1-9 below httpPort).
 * @param httpPort The new value for the HTTP port.
 * @param environmentName The new value for the environment name.
 * @param mailReceiver The new value for the mailReceiver.
 */
public void applyTestArguments(String offset,String httpPort,String environmentName,String mailReceiver){
  ArgumentNotValid.checkNotNullOrEmpty(offset,"String_Node_Str");
  ArgumentNotValid.checkNotNullOrEmpty(httpPort,"String_Node_Str");
  ArgumentNotValid.checkNotNullOrEmpty(environmentName,"String_Node_Str");
  ArgumentNotValid.checkNotNullOrEmpty(mailReceiver,"String_Node_Str");
  int offsetInt=(new Integer(httpPort)).intValue() - (new Integer(offset)).intValue();
  if (offsetInt > Constants.TEST_OFFSET_INTEGER_MAXIMUM_VALUE || offsetInt < 0) {
    System.err.print(Constants.MSG_ERROR_TEST_OFFSET);
    System.out.println();
    System.exit(0);
  }
  offsetVal=new String("String_Node_Str" + offsetInt);
  httpPortVal=httpPort;
  environmentNameVal=environmentName;
  mailReceiverVal=mailReceiver;
  httpPortPath=Constants.COMPLETE_HTTP_PORT_LEAF;
  environmentNamePath=Constants.COMPLETE_ENVIRONMENT_NAME_LEAF;
  mailReceiverPath=Constants.SETTINGS_NOTIFICATION_RECEIVER_PATH;
  offsetPaths=new OffsetSystem[]{new OffsetSystem(2,Constants.COMPLETE_JMX_PORT_PATH),new OffsetSystem(2,Constants.TEXT_JMX_RMI_PORT_PATH),new OffsetSystem(1,Constants.COMPLETE_HARVEST_HETRIX_GUI_PORT_PATH),new OffsetSystem(1,Constants.COMPLETE_HARVEST_HETRIX_JMX_PORT)};
  apply();
}
Program: 90070
Project: 90070
Buggy source:
/** 
 * Applies the new variables. Goes through all element instances and applies the variables.
 */
@SuppressWarnings("String_Node_Str") private void apply(){
  applyOnElement(set.getRoot());
  List<Element> physLocs=set.getChildren(Constants.PHYSICAL_LOCATION_BRANCH);
  for (  Element pl : physLocs) {
    applyOnElement(pl);
    List<Element> machines=pl.elements(Constants.MACHINE_BRANCH);
    for (    Element mac : machines) {
      applyOnElement(mac);
      List<Element> applications=mac.elements(Constants.APPLICATION_BRANCH);
      for (      Element app : applications) {
        applyOnElement(app);
        applyOnApplication(app);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Applies the new variables. Goes through all element instances and applies the variables.
 */
@SuppressWarnings("String_Node_Str") private void apply(){
  applyOnElement(set.getRoot());
  List<Element> physLocs=set.getChildren(Constants.DEPLOY_PHYSICAL_LOCATION);
  for (  Element pl : physLocs) {
    applyOnElement(pl);
    List<Element> machines=pl.elements(Constants.DEPLOY_MACHINE);
    for (    Element mac : machines) {
      applyOnElement(mac);
      List<Element> applications=mac.elements(Constants.DEPLOY_APPLICATION_NAME);
      for (      Element app : applications) {
        applyOnElement(app);
        applyOnApplication(app);
      }
    }
  }
}
Program: 90071
Project: 90071
Buggy source:
/** 
 * Applies the environment name on the name of the file-directories. Thus: fileDir -> fileDir/environmentName
 * @param app The application where this has to be applied.
 */
@SuppressWarnings("String_Node_Str") private void applyOnApplication(Element app){
  Element current=app.element(Constants.SETTINGS_BRANCH);
  for (int i=0; i < Constants.SETTINGS_FILE_DIR_LEAF.length - 1; i++) {
    if (current == null) {
      return;
    }
    String st=Constants.SETTINGS_FILE_DIR_LEAF[i];
    current=current.element(st);
  }
  if (current == null) {
    return;
  }
  List<Element> elems=current.elements(Constants.SETTINGS_FILE_DIR_LEAF[Constants.SETTINGS_FILE_DIR_LEAF.length - 1]);
  for (  Element el : elems) {
    String content=el.getText();
    if (content.contains("String_Node_Str")) {
      content+="String_Node_Str" + environmentNameVal;
    }
 else {
      content+="String_Node_Str" + environmentNameVal;
    }
    el.setText(content);
  }
}

Fixed version (ground truth):
/** 
 * Applies the environment name on the name of the file-directories. Thus: fileDir -> fileDir/environmentName
 * @param app The application where this has to be applied.
 */
@SuppressWarnings("String_Node_Str") private void applyOnApplication(Element app){
  Element current=app.element(Constants.COMPLETE_SETTINGS_BRANCH);
  for (int i=0; i < Constants.SETTINGS_BITARCHIVE_FILEDIR_LEAF.length - 1; i++) {
    if (current == null) {
      return;
    }
    String st=Constants.SETTINGS_BITARCHIVE_FILEDIR_LEAF[i];
    current=current.element(st);
  }
  if (current == null) {
    return;
  }
  List<Element> elems=current.elements(Constants.SETTINGS_BITARCHIVE_FILEDIR_LEAF[Constants.SETTINGS_BITARCHIVE_FILEDIR_LEAF.length - 1]);
  for (  Element el : elems) {
    String content=el.getText();
    if (content.contains("String_Node_Str")) {
      content+="String_Node_Str" + environmentNameVal;
    }
 else {
      content+="String_Node_Str" + environmentNameVal;
    }
    el.setText(content);
  }
}
Program: 90072
Project: 90072
Buggy source:
/** 
 * Extracts the physical locations and put them into the list.
 */
private void extractElements(){
  physLocs=new ArrayList<PhysicalLocation>();
  List<Element> physList=config.getChildren(Constants.PHYSICAL_LOCATION_BRANCH);
  for (  Element elem : physList) {
    physLocs.add(new PhysicalLocation(elem,settings,machineParam,netarchiveSuiteFile.getName(),logPropFile,secPolicyFile,databaseFileName,resetDirectory));
  }
}

Fixed version (ground truth):
/** 
 * Extracts the physical locations and put them into the list.
 */
private void extractElements(){
  physLocs=new ArrayList<PhysicalLocation>();
  List<Element> physList=config.getChildren(Constants.DEPLOY_PHYSICAL_LOCATION);
  for (  Element elem : physList) {
    physLocs.add(new PhysicalLocation(elem,settings,machineParam,netarchiveSuiteFile.getName(),logPropFile,secPolicyFile,databaseFileName,resetDirectory));
  }
}
Program: 90074
Project: 90074
Buggy source:
/** 
 * Evaluates the config file. This is done by evaluating the settings branch for all the instances in  the XML-tree (global, physical locaiton, machine and application)
 */
@SuppressWarnings("String_Node_Str") public void evaluate(){
  evaluateElement(root.getChild(Constants.SETTINGS_BRANCH));
  List<Element> physLocs=root.getChildren(Constants.PHYSICAL_LOCATION_BRANCH);
  for (  Element pl : physLocs) {
    evaluateElement(pl.element(Constants.SETTINGS_BRANCH));
    List<Element> macs=pl.elements(Constants.MACHINE_BRANCH);
    for (    Element mac : macs) {
      evaluateElement(mac.element(Constants.SETTINGS_BRANCH));
      List<Element> apps=mac.elements(Constants.APPLICATION_BRANCH);
      for (      Element app : apps) {
        evaluateElement(app.element(Constants.SETTINGS_BRANCH));
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Evaluates the config file. This is done by evaluating the settings branch for all the instances in  the XML-tree (global, physical locaiton, machine and application)
 */
@SuppressWarnings("String_Node_Str") public void evaluate(){
  evaluateElement(root.getChild(Constants.COMPLETE_SETTINGS_BRANCH));
  List<Element> physLocs=root.getChildren(Constants.DEPLOY_PHYSICAL_LOCATION);
  for (  Element pl : physLocs) {
    evaluateElement(pl.element(Constants.COMPLETE_SETTINGS_BRANCH));
    List<Element> macs=pl.elements(Constants.DEPLOY_MACHINE);
    for (    Element mac : macs) {
      evaluateElement(mac.element(Constants.COMPLETE_SETTINGS_BRANCH));
      List<Element> apps=mac.elements(Constants.DEPLOY_APPLICATION_NAME);
      for (      Element app : apps) {
        evaluateElement(app.element(Constants.COMPLETE_SETTINGS_BRANCH));
      }
    }
  }
}
Program: 90075
Project: 90075
Buggy source:
/** 
 * Creates the script for creating the application specified directories.
 * @return The script for creating the application specified directories.
 */
@Override protected String getAppDirectories(){
  StringBuilder res=new StringBuilder("String_Node_Str");
  String[] dirs;
  for (  Application app : applications) {
    dirs=app.getSettingsValues(Constants.SETTINGS_FILE_DIR_LEAF);
    if (dirs != null && dirs.length > 0) {
      for (      String dir : dirs) {
        res.append(scriptCreateDir(dir,false));
      }
    }
    dirs=app.getSettingsValues(Constants.SETTINGS_HARVEST_SERVER_DIR_LEAF);
    if (dirs != null && dirs.length > 0) {
      for (      String dir : dirs) {
        res.append(scriptCreateDir(dir,false));
      }
    }
    dirs=app.getSettingsValues(Constants.SETTINGS_VIEWERPROXY_BASEDIR_LEAF);
    if (dirs != null && dirs.length > 0) {
      for (      String dir : dirs) {
        res.append(scriptCreateDir(dir,false));
      }
    }
  }
  return res.toString();
}

Fixed version (ground truth):
/** 
 * Creates the script for creating the application specified directories.
 * @return The script for creating the application specified directories.
 */
@Override protected String getAppDirectories(){
  StringBuilder res=new StringBuilder("String_Node_Str");
  String[] dirs;
  for (  Application app : applications) {
    dirs=app.getSettingsValues(Constants.SETTINGS_BITARCHIVE_FILEDIR_LEAF);
    if (dirs != null && dirs.length > 0) {
      for (      String dir : dirs) {
        res.append(scriptCreateDir(dir,false));
      }
    }
    dirs=app.getSettingsValues(Constants.SETTINGS_HARVEST_SERVERDIR_LEAF);
    if (dirs != null && dirs.length > 0) {
      for (      String dir : dirs) {
        res.append(scriptCreateDir(dir,false));
      }
    }
    dirs=app.getSettingsValues(Constants.SETTINGS_VIEWERPROXY_BASEDIR_LEAF);
    if (dirs != null && dirs.length > 0) {
      for (      String dir : dirs) {
        res.append(scriptCreateDir(dir,false));
      }
    }
  }
  return res.toString();
}
Program: 90076
Project: 90076
Buggy source:
/** 
 * Changes the file directory path to the format used in the security  policy.
 * @param path The current path.
 * @return The formatted path.
 */
@Override protected String changeFileDirPathForSecurity(String path){
  path+="String_Node_Str" + Constants.SECURITY_FILE_DIR_ATTACHMENT + "String_Node_Str";
  return path.replace("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Changes the file directory path to the format used in the security  policy.
 * @param path The current path.
 * @return The formatted path.
 */
@Override protected String changeFileDirPathForSecurity(String path){
  path+="String_Node_Str" + Constants.SECURITY_FILE_DIR_TAG + "String_Node_Str";
  return path.replace("String_Node_Str","String_Node_Str");
}
Program: 90078
Project: 90078
Buggy source:
/** 
 * For retrieving the environment name variable.
 * @return The environment name.
 */
protected String getEnvironmentName(){
  return settings.getSubChildValue(Constants.ENVIRONMENT_NAME_SETTING_PATH_LEAF);
}

Fixed version (ground truth):
/** 
 * For retrieving the environment name variable.
 * @return The environment name.
 */
protected String getEnvironmentName(){
  return settings.getSubChildValue(Constants.SETTINGS_ENVIRONMENT_NAME_LEAF);
}
Program: 90082
Project: 90082
Buggy source:
/** 
 * Extracts the XML for the applications from the root,  creates the applications and puts them into the list.
 */
@SuppressWarnings("String_Node_Str") private void extractApplications(){
  applications=new ArrayList<Application>();
  List<Element> le=machineRoot.elements(Constants.APPLICATION_BRANCH);
  for (  Element e : le) {
    applications.add(new Application(e,settings,machineParameters));
  }
}

Fixed version (ground truth):
/** 
 * Extracts the XML for the applications from the root,  creates the applications and puts them into the list.
 */
@SuppressWarnings("String_Node_Str") private void extractApplications(){
  applications=new ArrayList<Application>();
  List<Element> le=machineRoot.elements(Constants.DEPLOY_APPLICATION_NAME);
  for (  Element e : le) {
    applications.add(new Application(e,settings,machineParameters));
  }
}
Program: 90083
Project: 90083
Buggy source:
/** 
 * Overwrites the inherited parameters, if the root has new specified.
 * @param root The root of the current instance.
 */
@SuppressWarnings("String_Node_Str") public void newParameters(Element root){
  ArgumentNotValid.checkNotNull(root,"String_Node_Str");
  List<Element> tmp;
  tmp=root.elements(Constants.CLASS_PATH_BRANCH);
  if (tmp.size() > 0) {
    classPaths=tmp;
  }
  tmp=root.elements(Constants.JAVA_OPTIONS_BRANCH);
  if (tmp.size() > 0) {
    javaOptions=tmp;
  }
  tmp=root.elements(Constants.PARAMETER_INSTALL_DIR_BRANCH);
  if (tmp.size() > 0) {
    installDir=tmp.get(0);
  }
  tmp=root.elements(Constants.PARAMETER_MACHINE_USER_NAME_BRANCH);
  if (tmp.size() > 0) {
    machineUserName=tmp.get(0);
  }
  tmp=root.elements(Constants.PARAMETER_DATABASE_DIR_BRANCH);
  if (tmp.size() > 0) {
    databaseDir=tmp.get(0);
  }
}

Fixed version (ground truth):
/** 
 * Overwrites the inherited parameters, if the root has new specified.
 * @param root The root of the current instance.
 */
@SuppressWarnings("String_Node_Str") public void newParameters(Element root){
  ArgumentNotValid.checkNotNull(root,"String_Node_Str");
  List<Element> tmp;
  tmp=root.elements(Constants.DEPLOY_CLASS_PATH);
  if (tmp.size() > 0) {
    classPaths=tmp;
  }
  tmp=root.elements(Constants.DEPLOY_JAVA_OPTIONS);
  if (tmp.size() > 0) {
    javaOptions=tmp;
  }
  tmp=root.elements(Constants.DEPLOY_INSTALL_DIR);
  if (tmp.size() > 0) {
    installDir=tmp.get(0);
  }
  tmp=root.elements(Constants.DEPLOY_MACHINE_USER_NAME);
  if (tmp.size() > 0) {
    machineUserName=tmp.get(0);
  }
  tmp=root.elements(Constants.DEPLOY_DATABASE_DIR);
  if (tmp.size() > 0) {
    databaseDir=tmp.get(0);
  }
}
Program: 90084
Project: 90084
Buggy source:
/** 
 * Extract the local variables from the root. It is only the name for this instance.
 */
private void extractVariables(){
  Attribute at=physLocRoot.attribute(Constants.PHYSICAL_LOCATION_NAME_ATTRIBUTES);
  if (at != null) {
    name=at.getText();
  }
 else {
    log.debug("String_Node_Str");
    name="String_Node_Str";
  }
}

Fixed version (ground truth):
/** 
 * Extract the local variables from the root. It is only the name for this instance. This is then set in settings.
 */
private void extractVariables(){
  Attribute at=physLocRoot.attribute(Constants.PHYSICAL_LOCATION_NAME_ATTRIBUTES);
  if (at != null) {
    name=at.getText();
    String xmlName=XmlStructure.pathAndContentToXML(name,Constants.COMPLETE_THIS_PHYSICAL_LOCATION_LEAF);
    Element physLocName=XmlStructure.makeElementFromString(xmlName);
    settings.overWrite(physLocName);
  }
 else {
    log.debug("String_Node_Str");
    name="String_Node_Str";
  }
}
Program: 90085
Project: 90085
Buggy source:
/** 
 * Extracts the XML for machines from the root, creates the machines, and puts them into the list.
 */
@SuppressWarnings("String_Node_Str") private void extractMachines(){
  machines=new ArrayList<Machine>();
  List<Element> le=physLocRoot.elements(Constants.MACHINE_BRANCH);
  for (  Element e : le) {
    String os=e.attributeValue(Constants.MACHINE_OPERATING_SYSTEM_ATTRIBUTE);
    if (os != null && os.equalsIgnoreCase(Constants.OPERATING_SYSTEM_WINDOWS_ATTRIBUTE)) {
      machines.add(new WindowsMachine(e,settings,machineParameters,netarchiveSuiteFileName,logPropFile,securityPolicyFile,databaseFile,resetDirectory));
    }
 else {
      machines.add(new LinuxMachine(e,settings,machineParameters,netarchiveSuiteFileName,logPropFile,securityPolicyFile,databaseFile,resetDirectory));
    }
  }
}

Fixed version (ground truth):
/** 
 * Extracts the XML for machines from the root, creates the machines, and puts them into the list.
 */
@SuppressWarnings("String_Node_Str") private void extractMachines(){
  machines=new ArrayList<Machine>();
  List<Element> le=physLocRoot.elements(Constants.DEPLOY_MACHINE);
  for (  Element e : le) {
    String os=e.attributeValue(Constants.MACHINE_OPERATING_SYSTEM_ATTRIBUTE);
    if (os != null && os.equalsIgnoreCase(Constants.OPERATING_SYSTEM_WINDOWS_ATTRIBUTE)) {
      machines.add(new WindowsMachine(e,settings,machineParameters,netarchiveSuiteFileName,logPropFile,securityPolicyFile,databaseFile,resetDirectory));
    }
 else {
      machines.add(new LinuxMachine(e,settings,machineParameters,netarchiveSuiteFileName,logPropFile,securityPolicyFile,databaseFile,resetDirectory));
    }
  }
}
Program: 90089
Project: 90089
Buggy source:
/** 
 * Function to create the script which installs the new directories. This is only used for windows machines!
 * @param directory The directory to put the file
 */
@Override protected void createInstallDirScript(File directory){
  File dirScript=new File(directory,"String_Node_Str" + name + scriptExtension);
  try {
    PrintWriter dirPrint=new PrintWriter(dirScript);
    try {
      dirPrint.print("String_Node_Str");
      dirPrint.print(getInstallDirPath());
      dirPrint.print("String_Node_Str");
      String dir;
      dir=settings.getLeafValue(Constants.SETTINGS_ARCHIVE_BP_BASEDIR_LEAF);
      if (dir != null && !dir.equalsIgnoreCase("String_Node_Str") && !dir.equalsIgnoreCase("String_Node_Str")) {
        dirPrint.print(scriptCreateDir(dir,false));
      }
      dir=settings.getLeafValue(Constants.SETTINGS_ARCHIVE_ARC_BASEDIR_LEAF);
      if (dir != null && !dir.equalsIgnoreCase("String_Node_Str") && !dir.equalsIgnoreCase("String_Node_Str")) {
        dirPrint.print(scriptCreateDir(dir,false));
      }
      dirPrint.print(getAppDirectories());
      dir=settings.getLeafValue(Constants.SETTINGS_TEMP_DIR_LEAF);
      if (dir != null && !dir.equalsIgnoreCase("String_Node_Str") && !dir.equalsIgnoreCase("String_Node_Str")) {
        dirPrint.print(scriptCreateDir(dir,resetTempDir));
      }
    }
  finally {
      dirPrint.close();
    }
  }
 catch (  IOException e) {
    log.trace("String_Node_Str" + e);
    throw new IOFailure("String_Node_Str" + "String_Node_Str" + e);
  }
}

Fixed version (ground truth):
/** 
 * Function to create the script which installs the new directories. This is only used for windows machines!
 * @param directory The directory to put the file
 */
@Override protected void createInstallDirScript(File directory){
  File dirScript=new File(directory,getMakeDirectoryName());
  try {
    PrintWriter dirPrint=new PrintWriter(dirScript);
    try {
      dirPrint.print("String_Node_Str");
      dirPrint.print(getInstallDirPath());
      dirPrint.print("String_Node_Str");
      String dir;
      dir=settings.getLeafValue(Constants.SETTINGS_ARCHIVE_BP_BASEDIR_LEAF);
      if (dir != null && !dir.equalsIgnoreCase("String_Node_Str") && !dir.equalsIgnoreCase("String_Node_Str")) {
        dirPrint.print(scriptCreateDir(dir,false));
      }
      dir=settings.getLeafValue(Constants.SETTINGS_ARCHIVE_ARC_BASEDIR_LEAF);
      if (dir != null && !dir.equalsIgnoreCase("String_Node_Str") && !dir.equalsIgnoreCase("String_Node_Str")) {
        dirPrint.print(scriptCreateDir(dir,false));
      }
      dirPrint.print(getAppDirectories());
      dir=settings.getLeafValue(Constants.SETTINGS_TEMP_DIR_LEAF);
      if (dir != null && !dir.equalsIgnoreCase("String_Node_Str") && !dir.equalsIgnoreCase("String_Node_Str")) {
        dirPrint.print(scriptCreateDir(dir,resetTempDir));
      }
    }
  finally {
      dirPrint.close();
    }
  }
 catch (  IOException e) {
    log.trace("String_Node_Str" + e);
    throw new IOFailure("String_Node_Str" + "String_Node_Str" + e);
  }
}
Program: 90091
Project: 90091
Buggy source:
/** 
 * Find Job status to be shown based on parameters, including possibility for All statuses
 * @param dfltRequest contains defaulted parameters
 * @return Integer value being the ordinal of a JobStatus or -1 for ALL (job statuses)
 * @throws ArgumentNotValid , IllegalArgumentException
 */
public static Set<Integer> getSelectedJobStatusCodes(DefaultedRequest dfltRequest){
  ArgumentNotValid.checkNotNull(dfltRequest,"String_Node_Str");
  String[] values=dfltRequest.getParameter(Constants.JOBSTATUS_PARAM);
  if (values == null || values.length == 0) {
    throw new ArgumentNotValid("String_Node_Str");
  }
  Set<Integer> selectedJobStatusCodesSet=new HashSet<Integer>();
  for (  String value : values) {
    if (value.equals(JOBSTATUS_ALL)) {
      selectedJobStatusCodesSet=new HashSet<Integer>(JobStatus.ALL_STATUS_CODE);
      break;
    }
 else {
      selectedJobStatusCodesSet.add(JobStatus.valueOf(value).ordinal());
    }
  }
  return selectedJobStatusCodesSet;
}

Fixed version (ground truth):
/** 
 * Find Job status to be shown based on parameters, including possibility for All statuses
 * @param dfltRequest contains defaulted parameters
 * @return Integer value being the ordinal of a JobStatus or -1 for ALL (job statuses)
 * @throws ArgumentNotValid , IllegalArgumentException
 */
public static Set<Integer> getSelectedJobStatusCodes(DefaultedRequest dfltRequest){
  ArgumentNotValid.checkNotNull(dfltRequest,"String_Node_Str");
  String[] values=dfltRequest.getParameter(Constants.JOBSTATUS_PARAM);
  if (values == null || values.length == 0) {
    throw new ArgumentNotValid("String_Node_Str");
  }
  Set<Integer> selectedJobStatusCodesSet=new HashSet<Integer>();
  for (  String value : values) {
    if (value.equals(JOBSTATUS_ALL)) {
      selectedJobStatusCodesSet=new HashSet<Integer>();
      selectedJobStatusCodesSet.add(JobStatus.ALL_STATUS_CODE);
      break;
    }
 else {
      selectedJobStatusCodesSet.add(JobStatus.valueOf(value).ordinal());
    }
  }
  return selectedJobStatusCodesSet;
}
Program: 90092
Project: 90092
Buggy source:
/** 
 * Function to apply the variables.
 * @param offset The input offset value (1-9 below httpPort).
 * @param httpPort The new value for the HTTP port.
 * @param environmentName The new value for the environment name.
 * @param mailReceiver The new value for the mailReceiver.
 */
public void applyTestArguments(String offset,String httpPort,String environmentName,String mailReceiver){
  ArgumentNotValid.checkNotNullOrEmpty(offset,"String_Node_Str");
  ArgumentNotValid.checkNotNullOrEmpty(httpPort,"String_Node_Str");
  ArgumentNotValid.checkNotNullOrEmpty(environmentName,"String_Node_Str");
  ArgumentNotValid.checkNotNullOrEmpty(mailReceiver,"String_Node_Str");
  int offsetInt=(new Integer(httpPort)).intValue() - (new Integer(offset)).intValue();
  if (offsetInt > 9 || offsetInt < 0) {
    System.err.print(Constants.MSG_ERROR_TEST_OFFSET);
    System.out.println();
    System.exit(0);
  }
  offsetVal=new String("String_Node_Str" + offsetInt);
  httpPortVal=httpPort;
  environmentNameVal=environmentName;
  mailReceiverVal=mailReceiver;
  httpPortPath=Constants.SETTINGS_HTTP_PORT_PATH;
  environmentNamePath=Constants.ENVIRONMENT_NAME_TOTAL_PATH_LEAF;
  mailReceiverPath=Constants.SETTINGS_NOTIFICATION_RECEIVER_PATH;
  offsetPaths=new OffsetSystem[]{new OffsetSystem(2,Constants.TEXT_JMX_PORT_PATH),new OffsetSystem(2,Constants.TEXT_JMX_RMI_PORT_PATH),new OffsetSystem(1,Constants.TEXT_HARVEST_HETRIX_GUI_PORT),new OffsetSystem(1,Constants.TEXT_HARVEST_HETRIX_JMX_PORT)};
  apply();
}

Fixed version (ground truth):
/** 
 * Function to apply the variables.
 * @param offset The input offset value (1-9 below httpPort).
 * @param httpPort The new value for the HTTP port.
 * @param environmentName The new value for the environment name.
 * @param mailReceiver The new value for the mailReceiver.
 */
public void applyTestArguments(String offset,String httpPort,String environmentName,String mailReceiver){
  ArgumentNotValid.checkNotNullOrEmpty(offset,"String_Node_Str");
  ArgumentNotValid.checkNotNullOrEmpty(httpPort,"String_Node_Str");
  ArgumentNotValid.checkNotNullOrEmpty(environmentName,"String_Node_Str");
  ArgumentNotValid.checkNotNullOrEmpty(mailReceiver,"String_Node_Str");
  int offsetInt=(new Integer(httpPort)).intValue() - (new Integer(offset)).intValue();
  if (offsetInt > Constants.TEST_OFFSET_INTEGER_MAXIMUM_VALUE || offsetInt < 0) {
    System.err.print(Constants.MSG_ERROR_TEST_OFFSET);
    System.out.println();
    System.exit(0);
  }
  offsetVal=new String("String_Node_Str" + offsetInt);
  httpPortVal=httpPort;
  environmentNameVal=environmentName;
  mailReceiverVal=mailReceiver;
  httpPortPath=Constants.SETTINGS_HTTP_PORT_PATH;
  environmentNamePath=Constants.ENVIRONMENT_NAME_TOTAL_PATH_LEAF;
  mailReceiverPath=Constants.SETTINGS_NOTIFICATION_RECEIVER_PATH;
  offsetPaths=new OffsetSystem[]{new OffsetSystem(2,Constants.TEXT_JMX_PORT_PATH),new OffsetSystem(2,Constants.TEXT_JMX_RMI_PORT_PATH),new OffsetSystem(1,Constants.TEXT_HARVEST_HETRIX_GUI_PORT),new OffsetSystem(1,Constants.TEXT_HARVEST_HETRIX_JMX_PORT)};
  apply();
}
Program: 90093
Project: 90093
Buggy source:
/** 
 * Applies the new variables on a specific element.
 * @param e The element where the variables are to be applied.
 */
private void applyOnElement(Element e){
  ArgumentNotValid.checkNotNull(e,"String_Node_Str");
  set.overWriteOnly(e,httpPortVal,httpPortPath);
  set.overWriteOnly(e,environmentNameVal,environmentNamePath);
  set.overWriteOnly(e,mailReceiverVal,mailReceiverPath);
  for (  OffsetSystem ofs : offsetPaths) {
    set.overWriteOnlyInt(e,ofs.index,offsetVal.charAt(0),ofs.path);
  }
}

Fixed version (ground truth):
/** 
 * Applies the new variables on a specific element.
 * @param e The element where the variables are to be applied.
 */
private void applyOnElement(Element e){
  ArgumentNotValid.checkNotNull(e,"String_Node_Str");
  set.overWriteOnly(e,httpPortVal,httpPortPath);
  set.overWriteOnly(e,environmentNameVal,environmentNamePath);
  set.overWriteOnly(e,mailReceiverVal,mailReceiverPath);
  for (  OffsetSystem ofs : offsetPaths) {
    set.overWriteOnlyInt(e,ofs.getIndex(),offsetVal.charAt(0),ofs.getPath());
  }
}
Program: 90094
Project: 90094
Buggy source:
/** 
 * Applies the test arguments. If the test arguments are given correctly, the configuration file is  loaded and changed appropriately, then written to a test configuration  file. The new test configuration file has the same name as the original  configuration file, except ".xml" is replaced by "_text.xml". Thus "path/config.xml" -> "path/config_test.xml".  
 * @param testArguments The test arguments.
 */
private static void initTestArguments(String testArguments){
  if (testArguments == null || testArguments.equalsIgnoreCase("String_Node_Str")) {
    return;
  }
  String[] changes=testArguments.split("String_Node_Str");
  if (changes.length != Constants.TEST_ARGUMENTS_REQUIRED) {
    System.err.print(Constants.MSG_ERROR_TEST_ARGUMENTS);
    System.exit(0);
  }
  try {
    CreateTestInstance cti=new CreateTestInstance(itConfigFile);
    cti.applyTestArguments(changes[0],changes[1],changes[2],changes[3]);
    String tmp=itConfigFile.getPath();
    String[] configFile=tmp.split("String_Node_Str");
    String nameOfNewConfig=configFile[0] + Constants.TEST_CONFIG_FILE_REPLACE_ENDING;
    cti.createSettingsFile(nameOfNewConfig);
    itConfigFile=new File(nameOfNewConfig);
  }
 catch (  IOException e) {
    System.out.println("String_Node_Str" + e);
    System.exit(0);
  }
}

Fixed version (ground truth):
/** 
 * Applies the test arguments. If the test arguments are given correctly, the configuration file is  loaded and changed appropriately, then written to a test configuration  file. The new test configuration file has the same name as the original  configuration file, except ".xml" is replaced by "_text.xml". Thus "path/config.xml" -> "path/config_test.xml".  
 * @param testArguments The test arguments.
 */
private static void initTestArguments(String testArguments){
  if (testArguments == null || testArguments.equalsIgnoreCase("String_Node_Str")) {
    return;
  }
  String[] changes=testArguments.split("String_Node_Str");
  if (changes.length != Constants.TEST_ARGUMENTS_REQUIRED) {
    System.err.print(Constants.MSG_ERROR_TEST_ARGUMENTS);
    System.exit(0);
  }
  try {
    CreateTestInstance cti=new CreateTestInstance(itConfigFile);
    cti.applyTestArguments(changes[0],changes[1],changes[2],changes[2 + 1]);
    String tmp=itConfigFile.getPath();
    String[] configFile=tmp.split("String_Node_Str");
    String nameOfNewConfig=configFile[0] + Constants.TEST_CONFIG_FILE_REPLACE_ENDING;
    cti.createSettingsFile(nameOfNewConfig);
    itConfigFile=new File(nameOfNewConfig);
  }
 catch (  IOException e) {
    System.out.println("String_Node_Str" + e);
    System.exit(0);
  }
}
Program: 90096
Project: 90096
Buggy source:
/** 
 * Dummy function. This is only used for windows machines!
 * @param dir The directory to put the file
 */
@Override protected void createInstallDirScript(File dir){
  return;
}

Fixed version (ground truth):
/** 
 * Dummy function on linux machine. This is only used for windows machines!
 * @param dir The directory to put the file.
 */
@Override protected void createInstallDirScript(File dir){
  return;
}
Program: 90097
Project: 90097
Buggy source:
/** 
 * This function creates the script to kill all applications on this  machine. The scripts calls all the kill script for each application. 
 * @param directory The directory for this machine (use global variable?).
 */
@Override protected void createOSLocalKillAllScript(File directory){
  ArgumentNotValid.checkNotNull(directory,"String_Node_Str");
  File killAllScript=new File(directory,"String_Node_Str" + scriptExtension);
  try {
    PrintWriter killPrinter=new PrintWriter(killAllScript);
    try {
      killPrinter.println("String_Node_Str" + name);
      killPrinter.println("String_Node_Str");
      killPrinter.println("String_Node_Str" + getConfDirPath());
      for (      Application app : applications) {
        String appScript="String_Node_Str" + app.getIdentification() + scriptExtension;
        killPrinter.println("String_Node_Str" + appScript + "String_Node_Str");
        killPrinter.println("String_Node_Str" + appScript);
        killPrinter.println("String_Node_Str");
      }
    }
  finally {
      killPrinter.close();
    }
  }
 catch (  IOException e) {
    log.trace("String_Node_Str");
    throw new IOFailure("String_Node_Str" + e);
  }
catch (  Exception e) {
    log.trace("String_Node_Str" + e);
    System.out.println("String_Node_Str" + e);
  }
}

Fixed version (ground truth):
/** 
 * This function creates the script to kill all applications on this  machine. The scripts calls all the kill script for each application.  pseudo code: - echo Killing all applications at machine: mac - if [ -e ./kill_app.sh ] -    ./kill_app.sh - fi - ... where: mac = machine name. app = application name. ... = the same for other applications.
 * @param directory The directory for this machine (use global variable?).
 */
@Override protected void createOSLocalKillAllScript(File directory){
  ArgumentNotValid.checkNotNull(directory,"String_Node_Str");
  File killAllScript=new File(directory,"String_Node_Str" + scriptExtension);
  try {
    PrintWriter killPrinter=new PrintWriter(killAllScript);
    try {
      killPrinter.println("String_Node_Str" + name);
      killPrinter.println("String_Node_Str");
      killPrinter.println("String_Node_Str" + getConfDirPath());
      for (      Application app : applications) {
        String appScript="String_Node_Str" + app.getIdentification() + scriptExtension;
        killPrinter.println("String_Node_Str" + appScript + "String_Node_Str");
        killPrinter.println("String_Node_Str" + appScript);
        killPrinter.println("String_Node_Str");
      }
    }
  finally {
      killPrinter.close();
    }
  }
 catch (  IOException e) {
    log.trace("String_Node_Str");
    throw new IOFailure("String_Node_Str" + e);
  }
catch (  Exception e) {
    log.trace("String_Node_Str" + e);
    System.out.println("String_Node_Str" + e);
  }
}
Program: 90098
Project: 90098
Buggy source:
/** 
 * Creates the operation system specific starting script for this machine.
 * @return Operation system specific part of the startscript.
 */
@Override protected String osStartScript(){
  StringBuilder res=new StringBuilder("String_Node_Str");
  res.append("String_Node_Str");
  res.append(machineUserLogin());
  res.append("String_Node_Str");
  res.append(getConfDirPath());
  res.append("String_Node_Str");
  res.append(scriptExtension);
  res.append("String_Node_Str");
  res.append(getInstallDirPath());
  res.append("String_Node_Str");
  res.append("String_Node_Str");
  return res.toString();
}

Fixed version (ground truth):
/** 
 * Creates the operation system specific starting script for this machine. pseudo code: - ssh maclogin ". /etc/profile; conf/startall.sh; sleep 5;  cat install/*.log" where: maclogin = login for machine (username@machine). conf = path to /conf directory. install = path to install directory.
 * @return Operation system specific part of the startscript.
 */
@Override protected String osStartScript(){
  StringBuilder res=new StringBuilder("String_Node_Str");
  res.append("String_Node_Str");
  res.append(machineUserLogin());
  res.append("String_Node_Str");
  res.append(getConfDirPath());
  res.append("String_Node_Str");
  res.append(scriptExtension);
  res.append("String_Node_Str");
  res.append(getInstallDirPath());
  res.append("String_Node_Str");
  res.append("String_Node_Str");
  return res.toString();
}
Program: 90100
Project: 90100
Buggy source:
/** 
 * This function creates the script to start all applications on this  machine. The scripts calls all the start script for each application. 
 * @param directory The directory for this machine (use global variable?).
 */
@Override protected void createOSLocalStartAllScript(File directory){
  ArgumentNotValid.checkNotNull(directory,"String_Node_Str");
  File startAllScript=new File(directory,"String_Node_Str" + scriptExtension);
  try {
    PrintWriter startPrinter=new PrintWriter(startAllScript);
    try {
      startPrinter.println("String_Node_Str" + name);
      startPrinter.println("String_Node_Str");
      startPrinter.println("String_Node_Str" + getConfDirPath());
      for (      Application app : applications) {
        String appScript="String_Node_Str" + app.getIdentification() + scriptExtension;
        startPrinter.println("String_Node_Str" + appScript + "String_Node_Str");
        startPrinter.println("String_Node_Str" + appScript);
        startPrinter.println("String_Node_Str");
      }
    }
  finally {
      startPrinter.close();
    }
  }
 catch (  IOException e) {
    log.trace("String_Node_Str");
    throw new IOFailure("String_Node_Str" + e);
  }
catch (  Exception e) {
    log.trace("String_Node_Str" + e);
    System.out.println("String_Node_Str" + e);
  }
}

Fixed version (ground truth):
/** 
 * This function creates the script to start all applications on this  machine. The scripts calls all the start script for each application.  pseudo code: - echo Starting all applications at machine: mac - if [ -e ./start_app.sh ] -    ./start_app.sh - fi - ... where: mac = machine name. app = application name. ... = the same for other applications.
 * @param directory The directory for this machine (use global variable?).
 */
@Override protected void createOSLocalStartAllScript(File directory){
  ArgumentNotValid.checkNotNull(directory,"String_Node_Str");
  File startAllScript=new File(directory,"String_Node_Str" + scriptExtension);
  try {
    PrintWriter startPrinter=new PrintWriter(startAllScript);
    try {
      startPrinter.println("String_Node_Str" + name);
      startPrinter.println("String_Node_Str");
      startPrinter.println("String_Node_Str" + getConfDirPath());
      for (      Application app : applications) {
        String appScript="String_Node_Str" + app.getIdentification() + scriptExtension;
        startPrinter.println("String_Node_Str" + appScript + "String_Node_Str");
        startPrinter.println("String_Node_Str" + appScript);
        startPrinter.println("String_Node_Str");
      }
    }
  finally {
      startPrinter.close();
    }
  }
 catch (  IOException e) {
    log.trace("String_Node_Str");
    throw new IOFailure("String_Node_Str" + e);
  }
catch (  Exception e) {
    log.trace("String_Node_Str" + e);
    System.out.println("String_Node_Str" + e);
  }
}
Program: 90101
Project: 90101
Buggy source:
/** 
 * Look up a given URI and return the contents as an InputStream.
 * @param uri The URI to find in the archive.  If the URI does notmatch any entries in the archive, IOFailure is thrown.
 * @return An InputStream Containing all the data in the entry, ornull if the entry was not found
 * @throws IOFailure If the ARC file was found in the Lucene index but notin the bit archive, or if some other failure happened while finding the file.
 */
public InputStream lookup(URI uri){
  ArgumentNotValid.checkNotNull(uri,"String_Node_Str");
  ARCKey key=luceneLookup(uri.toString());
  if (key == null) {
    return null;
  }
 else {
    final BitarchiveRecord bitarchiveRecord=arcRepositoryClient.get(key.getFile().getName(),key.getOffset());
    if (bitarchiveRecord == null) {
      String message="String_Node_Str" + key.getFile().getName() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
      log.debug(message);
      throw new IOFailure(message);
    }
    return bitarchiveRecord.getData();
  }
}

Fixed version (ground truth):
/** 
 * Look up a given URI and return the contents as an InputStream.
 * @param uri The URI to find in the archive.  If the URI does notmatch any entries in the archive, IOFailure is thrown.
 * @return An InputStream Containing all the data in the entry, ornull if the entry was not found
 * @throws IOFailure If the ARC file was found in the Lucene index but notin the bit archive, or if some other failure happened while finding the file.
 */
public InputStream lookup(URI uri){
  ArgumentNotValid.checkNotNull(uri,"String_Node_Str");
  ARCKey key=luceneLookup(uri.getScheme() + "String_Node_Str" + uri.getSchemeSpecificPart());
  if (key == null) {
    return null;
  }
 else {
    final BitarchiveRecord bitarchiveRecord=arcRepositoryClient.get(key.getFile().getName(),key.getOffset());
    if (bitarchiveRecord == null) {
      String message="String_Node_Str" + key.getFile().getName() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
      log.debug(message);
      throw new IOFailure(message);
    }
    return bitarchiveRecord.getData();
  }
}