nus-yam/ex-repair huggingface dataset:
Program: 70150
Project: 70150
Buggy source:
private static void parseArgs(String[] args){
  Blast.debug=Boolean.parseBoolean(args[0]);
  Blast.databasePath=args[1];
  Blast.inputFileName=args[2];
  Blast.numFragments=Integer.parseInt(args[3]);
  Blast.tmpDir=args[4];
  Blast.outputFileName=args[5];
  Blast.commandArgs="String_Node_Str";
  for (int i=6; i < args.length; i++) {
    Blast.commandArgs+=args[i] + "String_Node_Str";
  }
}

Fixed version (ground truth):
/** 
 * Parses the input parameters and initializes the class atributes
 * @param args
 */
private static void parseArgs(String[] args){
  Blast.debug=Boolean.parseBoolean(args[0]);
  Blast.databasePath=args[1];
  Blast.inputFileName=args[2];
  Blast.numFragments=Integer.parseInt(args[3]);
  Blast.tmpDir=args[4];
  Blast.outputFileName=args[5];
  Blast.commandArgs="String_Node_Str";
  for (int i=6; i < args.length; i++) {
    Blast.commandArgs+=args[i] + "String_Node_Str";
  }
}
Program: 70151
Project: 70151
Buggy source:
private static void logArgs(){
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + System.getenv(ENV_BLAST_BINARY));
  System.out.println("String_Node_Str" + Blast.debug);
  System.out.println("String_Node_Str" + Blast.databasePath);
  System.out.println("String_Node_Str" + Blast.inputFileName);
  System.out.println("String_Node_Str" + Blast.numFragments);
  System.out.println("String_Node_Str" + Blast.tmpDir);
  System.out.println("String_Node_Str" + Blast.outputFileName);
  System.out.println("String_Node_Str" + Blast.commandArgs);
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Prints the class attributes used for the execution
 */
private static void logArgs(){
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + System.getenv(ENV_BLAST_BINARY));
  System.out.println("String_Node_Str" + Blast.debug);
  System.out.println("String_Node_Str" + Blast.databasePath);
  System.out.println("String_Node_Str" + Blast.inputFileName);
  System.out.println("String_Node_Str" + Blast.numFragments);
  System.out.println("String_Node_Str" + Blast.tmpDir);
  System.out.println("String_Node_Str" + Blast.outputFileName);
  System.out.println("String_Node_Str" + Blast.commandArgs);
  System.out.println("String_Node_Str");
}
Program: 70152
Project: 70152
Buggy source:
public static void main(String[] args) throws BlastException {
}

Fixed version (ground truth):
/** 
 * MAIN CODE
 * @param args
 * @throws BlastException
 */
public static void main(String[] args) throws BlastException {
}
Program: 70153
Project: 70153
Buggy source:
public BlastException(String msg,Exception e){
  super(msg,e);
}

Fixed version (ground truth):
/** 
 * Constructs a new BlastException with a nested exception @e and error message @msg
 * @param msg
 * @param e
 */
public BlastException(String msg,Exception e){
  super(msg,e);
}
Program: 70154
Project: 70154
Buggy source:
/** 
 * Bind numCUs core units to the job
 * @param jobId
 * @param numCUs
 * @return
 * @throws UnsufficientAvailableComputingUnitsException
 */
public int[] bindComputingUnits(int jobId,int numCUs) throws UnsufficientAvailableComputingUnitsException {
  int assignedCoreUnits[]=new int[numCUs];
  int numAssignedCores=0;
synchronized (this.bindedComputingUnits) {
    for (int coreId=0; coreId < this.bindedComputingUnits.length; ++coreId) {
      if (this.bindedComputingUnits[coreId] == -1) {
        this.bindedComputingUnits[coreId]=jobId;
        assignedCoreUnits[numAssignedCores]=coreId;
        numAssignedCores++;
      }
      if (numAssignedCores == numCUs) {
        break;
      }
    }
    if (numAssignedCores != numCUs) {
      releaseComputingUnits(jobId);
      throw new UnsufficientAvailableComputingUnitsException("String_Node_Str");
    }
  }
  return assignedCoreUnits;
}

Fixed version (ground truth):
/** 
 * Bind numCUs core units to the job
 * @param jobId
 * @param numCUs
 * @return
 * @throws UnsufficientAvailableComputingUnitsException
 */
public int[] bindComputingUnits(int jobId,int numCUs) throws UnsufficientAvailableComputingUnitsException {
  if (numCUs == 0)   return new int[0];
  int assignedCoreUnits[]=new int[numCUs];
  int numAssignedCores=0;
synchronized (this.bindedComputingUnits) {
    for (int coreId=0; coreId < this.bindedComputingUnits.length; ++coreId) {
      if (this.bindedComputingUnits[coreId] == -1) {
        this.bindedComputingUnits[coreId]=jobId;
        assignedCoreUnits[numAssignedCores]=coreId;
        numAssignedCores++;
      }
      if (numAssignedCores == numCUs) {
        break;
      }
    }
    if (numAssignedCores != numCUs) {
      releaseComputingUnits(jobId);
      throw new UnsufficientAvailableComputingUnitsException("String_Node_Str");
    }
  }
  return assignedCoreUnits;
}
Program: 70155
Project: 70155
Buggy source:
private static void generateTrace(){
  if (debug) {
    logger.debug("String_Node_Str");
  }
  String script=System.getenv(ITConstants.IT_HOME) + TRACE_SCRIPT_PATH;
  String appName=System.getProperty(ITConstants.IT_APP_NAME);
  ProcessBuilder pb=new ProcessBuilder(script,"String_Node_Str",System.getProperty(ITConstants.IT_APP_LOG_DIR),appName,String.valueOf(hostToSlots.size() + 1));
  Process p;
  pb.environment().remove(LD_PRELOAD);
  try {
    p=pb.start();
  }
 catch (  IOException e) {
    ErrorManager.warn("String_Node_Str",e);
    return;
  }
  StreamGobbler outputGobbler=new StreamGobbler(p.getInputStream(),System.out);
  StreamGobbler errorGobbler=new StreamGobbler(p.getErrorStream(),System.err);
  outputGobbler.start();
  errorGobbler.start();
  int exitCode=0;
  try {
    exitCode=p.waitFor();
    if (exitCode != 0) {
      ErrorManager.warn("String_Node_Str" + exitCode);
    }
  }
 catch (  InterruptedException e) {
    ErrorManager.warn("String_Node_Str" + e.getMessage());
  }
  String lang=System.getProperty(ITConstants.IT_LANG);
  if (exitCode == 0 && lang.equalsIgnoreCase(ITConstants.Lang.PYTHON.name())) {
    try {
      new TraceMerger(System.getProperty(ITConstants.IT_APP_LOG_DIR),appName).merge();
    }
 catch (    IOException e) {
      ErrorManager.warn("String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
private static void generateTrace(){
  if (debug) {
    logger.debug("String_Node_Str");
  }
  String script=System.getenv(ITConstants.IT_HOME) + TRACE_SCRIPT_PATH;
  String appName=System.getProperty(ITConstants.IT_APP_NAME);
  ProcessBuilder pb=new ProcessBuilder(script,"String_Node_Str",System.getProperty(ITConstants.IT_APP_LOG_DIR),appName,String.valueOf(hostToSlots.size() + 1));
  Process p;
  pb.environment().remove(LD_PRELOAD);
  try {
    p=pb.start();
  }
 catch (  IOException e) {
    ErrorManager.warn("String_Node_Str",e);
    return;
  }
  StreamGobbler outputGobbler=new StreamGobbler(p.getInputStream(),System.out,logger);
  StreamGobbler errorGobbler=new StreamGobbler(p.getErrorStream(),System.err,logger);
  outputGobbler.start();
  errorGobbler.start();
  int exitCode=0;
  try {
    exitCode=p.waitFor();
    if (exitCode != 0) {
      ErrorManager.warn("String_Node_Str" + exitCode);
    }
  }
 catch (  InterruptedException e) {
    ErrorManager.warn("String_Node_Str" + e.getMessage());
  }
  String lang=System.getProperty(ITConstants.IT_LANG);
  if (exitCode == 0 && lang.equalsIgnoreCase(ITConstants.Lang.PYTHON.name())) {
    try {
      new TraceMerger(System.getProperty(ITConstants.IT_APP_LOG_DIR),appName).merge();
    }
 catch (    IOException e) {
      ErrorManager.warn("String_Node_Str",e);
    }
  }
}
Program: 70156
Project: 70156
Buggy source:
private static void generateMasterPackage(){
  if (debug) {
    logger.debug("String_Node_Str");
  }
  String script=System.getenv(ITConstants.IT_HOME) + TRACE_SCRIPT_PATH;
  ProcessBuilder pb=new ProcessBuilder(script,"String_Node_Str","String_Node_Str","String_Node_Str");
  pb.environment().remove(LD_PRELOAD);
  Process p;
  try {
    p=pb.start();
  }
 catch (  IOException e) {
    ErrorManager.warn("String_Node_Str",e);
    return;
  }
  if (debug) {
    StreamGobbler outputGobbler=new StreamGobbler(p.getInputStream(),System.out);
    StreamGobbler errorGobbler=new StreamGobbler(p.getErrorStream(),System.err);
    outputGobbler.start();
    errorGobbler.start();
  }
  try {
    int exitCode=p.waitFor();
    if (exitCode != 0) {
      ErrorManager.warn("String_Node_Str" + exitCode);
    }
  }
 catch (  InterruptedException e) {
    ErrorManager.warn("String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
private static void generateMasterPackage(){
  if (debug) {
    logger.debug("String_Node_Str");
  }
  String script=System.getenv(ITConstants.IT_HOME) + TRACE_SCRIPT_PATH;
  ProcessBuilder pb=new ProcessBuilder(script,"String_Node_Str","String_Node_Str","String_Node_Str");
  pb.environment().remove(LD_PRELOAD);
  Process p;
  try {
    p=pb.start();
  }
 catch (  IOException e) {
    ErrorManager.warn("String_Node_Str",e);
    return;
  }
  if (debug) {
    StreamGobbler outputGobbler=new StreamGobbler(p.getInputStream(),System.out,logger);
    StreamGobbler errorGobbler=new StreamGobbler(p.getErrorStream(),System.err,logger);
    outputGobbler.start();
    errorGobbler.start();
  }
  try {
    int exitCode=p.waitFor();
    if (exitCode != 0) {
      ErrorManager.warn("String_Node_Str" + exitCode);
    }
  }
 catch (  InterruptedException e) {
    ErrorManager.warn("String_Node_Str" + e.getMessage());
  }
}
Program: 70157
Project: 70157
Buggy source:
/** 
 * Executes a given command @cmd with the stream redirections @streamValues
 * @param cmd
 * @param hasReturn
 * @param streamValues
 * @return
 * @throws InvokeExecutionException
 */
public static Object executeCMD(String[] cmd,boolean hasReturn,StreamSTD streamValues,File taskSandboxWorkingDir) throws InvokeExecutionException {
  ProcessBuilder builder=new ProcessBuilder(cmd);
  builder.directory(taskSandboxWorkingDir);
  builder.environment().remove(Tracer.LD_PRELOAD);
  String fileInPath=streamValues.getStdIn();
  if (fileInPath != null) {
    builder.redirectInput(new File(fileInPath));
  }
  String fileOutPath=streamValues.getStdOut();
  if (fileOutPath != null) {
    builder.redirectOutput(Redirect.appendTo(new File(fileOutPath)));
  }
  String fileErrPath=streamValues.getStdErr();
  if (fileErrPath != null) {
    builder.redirectError(Redirect.appendTo(new File(fileErrPath)));
  }
  Process process=null;
  int exitValue=-1;
  try {
    System.out.println("String_Node_Str");
    System.out.println("String_Node_Str");
    process=builder.start();
    System.out.println("String_Node_Str");
    System.out.println("String_Node_Str");
    exitValue=process.waitFor();
  }
 catch (  Exception e) {
    throw new InvokeExecutionException(ERROR_PROC_EXEC,e);
  }
 finally {
    logBinaryExecution(process,exitValue,fileOutPath,fileErrPath);
  }
  return hasReturn ? exitValue : null;
}

Fixed version (ground truth):
/** 
 * Executes a given command @cmd with the stream redirections @streamValues
 * @param cmd
 * @param hasReturn
 * @param streamValues
 * @return
 * @throws InvokeExecutionException
 */
public static Object executeCMD(String[] cmd,boolean hasReturn,StreamSTD streamValues,File taskSandboxWorkingDir) throws InvokeExecutionException {
  ProcessBuilder builder=new ProcessBuilder(cmd);
  builder.directory(taskSandboxWorkingDir);
  builder.environment().remove(Tracer.LD_PRELOAD);
  String fileInPath=streamValues.getStdIn();
  if (fileInPath != null) {
    builder.redirectInput(new File(fileInPath));
  }
  String fileOutPath=streamValues.getStdOut();
  if (fileOutPath != null) {
    builder.redirectOutput(Redirect.appendTo(new File(fileOutPath)));
  }
  String fileErrPath=streamValues.getStdErr();
  if (fileErrPath != null) {
    builder.redirectError(Redirect.appendTo(new File(fileErrPath)));
  }
  Process process=null;
  int exitValue=-1;
  try {
    System.out.println("String_Node_Str");
    System.out.println("String_Node_Str");
    process=builder.start();
    exitValue=process.waitFor();
  }
 catch (  Exception e) {
    throw new InvokeExecutionException(ERROR_PROC_EXEC,e);
  }
 finally {
    logBinaryExecution(process,exitValue,fileOutPath,fileErrPath);
  }
  return hasReturn ? exitValue : null;
}
Program: 70158
Project: 70158
Buggy source:
private static void logBinaryExecution(Process process,int exitValue,String fileOutPath,String fileErrPath) throws InvokeExecutionException {
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + exitValue);
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  if (process != null) {
    try (BufferedReader outputReader=(fileOutPath != null) ? new BufferedReader(new FileReader(fileOutPath)) : new BufferedReader(new InputStreamReader(process.getInputStream()))){
      String line=null;
      while ((line=outputReader.readLine()) != null) {
        System.out.println(line);
      }
    }
 catch (    IOException ioe) {
      throw new InvokeExecutionException(ERROR_OUTPUTREADER,ioe);
    }
  }
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  if (process != null) {
    try (BufferedReader errorReader=(fileErrPath != null) ? new BufferedReader(new FileReader(fileErrPath)) : new BufferedReader(new InputStreamReader(process.getErrorStream()))){
      String line=null;
      while ((line=errorReader.readLine()) != null) {
        System.err.println(line);
      }
    }
 catch (    IOException ioe) {
      throw new InvokeExecutionException(ERROR_ERRORREADER,ioe);
    }
  }
}

Fixed version (ground truth):
private static void logBinaryExecution(Process process,int exitValue,String fileOutPath,String fileErrPath) throws InvokeExecutionException {
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + exitValue);
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  if (process != null) {
    try (BufferedReader outputReader=(fileOutPath != null) ? new BufferedReader(new FileReader(fileOutPath)) : new BufferedReader(new InputStreamReader(process.getInputStream()))){
      String line=null;
      while ((line=outputReader.readLine()) != null) {
        System.out.println(line);
      }
    }
 catch (    IOException ioe) {
      throw new InvokeExecutionException(ERROR_OUTPUTREADER,ioe);
    }
  }
  System.out.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  if (process != null) {
    try (BufferedReader errorReader=(fileErrPath != null) ? new BufferedReader(new FileReader(fileErrPath)) : new BufferedReader(new InputStreamReader(process.getErrorStream()))){
      String line=null;
      while ((line=errorReader.readLine()) != null) {
        System.err.println(line);
      }
    }
 catch (    IOException ioe) {
      throw new InvokeExecutionException(ERROR_ERRORREADER,ioe);
    }
  }
  System.err.println("String_Node_Str");
}
Program: 70160
Project: 70160
Buggy source:
public static Object invokeOmpSsMethod(String ompssBinary,Object[] values,boolean hasReturn,Stream[] streams,String[] prefixes,File taskSandboxWorkingDir) throws InvokeExecutionException {
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + ompssBinary);
  String computingUnits=System.getProperty(Constants.COMPSS_NUM_THREADS);
  System.out.println("String_Node_Str" + computingUnits);
  StreamSTD streamValues=new StreamSTD();
  ArrayList<String> binaryParams=BinaryRunner.createCMDParametersFromValues(values,streams,prefixes,streamValues);
  String[] cmd=new String[NUM_BASE_OMPSS_ARGS + binaryParams.size()];
  cmd[0]=ompssBinary;
  for (int i=0; i < binaryParams.size(); ++i) {
    cmd[NUM_BASE_OMPSS_ARGS + i]=binaryParams.get(i);
  }
  System.setProperty(OMP_NUM_THREADS,computingUnits);
  System.out.print("String_Node_Str");
  for (int i=0; i < cmd.length; ++i) {
    System.out.print(cmd[i] + "String_Node_Str");
  }
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + streamValues.getStdIn());
  System.out.println("String_Node_Str" + streamValues.getStdOut());
  System.out.println("String_Node_Str" + streamValues.getStdErr());
  return BinaryRunner.executeCMD(cmd,hasReturn,streamValues,taskSandboxWorkingDir);
}

Fixed version (ground truth):
public static Object invokeOmpSsMethod(String ompssBinary,Object[] values,boolean hasReturn,Stream[] streams,String[] prefixes,File taskSandboxWorkingDir) throws InvokeExecutionException {
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + ompssBinary);
  System.out.println("String_Node_Str" + taskSandboxWorkingDir.getAbsolutePath());
  String computingUnits=System.getProperty(Constants.COMPSS_NUM_THREADS);
  System.out.println("String_Node_Str" + computingUnits);
  StreamSTD streamValues=new StreamSTD();
  ArrayList<String> binaryParams=BinaryRunner.createCMDParametersFromValues(values,streams,prefixes,streamValues);
  String[] cmd=new String[NUM_BASE_OMPSS_ARGS + binaryParams.size()];
  cmd[0]=ompssBinary;
  for (int i=0; i < binaryParams.size(); ++i) {
    cmd[NUM_BASE_OMPSS_ARGS + i]=binaryParams.get(i);
  }
  System.setProperty(OMP_NUM_THREADS,computingUnits);
  System.out.print("String_Node_Str");
  for (int i=0; i < cmd.length; ++i) {
    System.out.print(cmd[i] + "String_Node_Str");
  }
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + streamValues.getStdIn());
  System.out.println("String_Node_Str" + streamValues.getStdOut());
  System.out.println("String_Node_Str" + streamValues.getStdErr());
  return BinaryRunner.executeCMD(cmd,hasReturn,streamValues,taskSandboxWorkingDir);
}
Program: 70161
Project: 70161
Buggy source:
public static Object invokeBinaryMethod(String binary,Object[] values,boolean hasReturn,Stream[] streams,String[] prefixes,File taskSandboxWorkingDir) throws InvokeExecutionException {
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + binary);
  StreamSTD streamValues=new StreamSTD();
  ArrayList<String> binaryParams=BinaryRunner.createCMDParametersFromValues(values,streams,prefixes,streamValues);
  String[] cmd=new String[NUM_BASE_BINARY_ARGS + binaryParams.size()];
  cmd[0]=binary;
  for (int i=0; i < binaryParams.size(); ++i) {
    cmd[NUM_BASE_BINARY_ARGS + i]=binaryParams.get(i);
  }
  System.out.print("String_Node_Str");
  for (int i=0; i < cmd.length; ++i) {
    System.out.print(cmd[i] + "String_Node_Str");
  }
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + streamValues.getStdIn());
  System.out.println("String_Node_Str" + streamValues.getStdOut());
  System.out.println("String_Node_Str" + streamValues.getStdErr());
  return BinaryRunner.executeCMD(cmd,hasReturn,streamValues,taskSandboxWorkingDir);
}

Fixed version (ground truth):
public static Object invokeBinaryMethod(String binary,Object[] values,boolean hasReturn,Stream[] streams,String[] prefixes,File taskSandboxWorkingDir) throws InvokeExecutionException {
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + binary);
  System.out.println("String_Node_Str" + taskSandboxWorkingDir.getAbsolutePath());
  StreamSTD streamValues=new StreamSTD();
  ArrayList<String> binaryParams=BinaryRunner.createCMDParametersFromValues(values,streams,prefixes,streamValues);
  String[] cmd=new String[NUM_BASE_BINARY_ARGS + binaryParams.size()];
  cmd[0]=binary;
  for (int i=0; i < binaryParams.size(); ++i) {
    cmd[NUM_BASE_BINARY_ARGS + i]=binaryParams.get(i);
  }
  System.out.print("String_Node_Str");
  for (int i=0; i < cmd.length; ++i) {
    System.out.print(cmd[i] + "String_Node_Str");
  }
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + streamValues.getStdIn());
  System.out.println("String_Node_Str" + streamValues.getStdOut());
  System.out.println("String_Node_Str" + streamValues.getStdErr());
  return BinaryRunner.executeCMD(cmd,hasReturn,streamValues,taskSandboxWorkingDir);
}
Program: 70163
Project: 70163
Buggy source:
/** 
 * Communications initializer
 */
public static synchronized void init(){
  appHost=new MasterResource();
  try {
    if (STORAGE_CONF == null || STORAGE_CONF.equals("String_Node_Str") || STORAGE_CONF.equals("String_Node_Str")) {
      logger.warn("String_Node_Str");
    }
 else {
      logger.debug("String_Node_Str" + STORAGE_CONF);
      StorageItf.init(STORAGE_CONF);
    }
  }
 catch (  StorageException e) {
    logger.fatal("String_Node_Str" + STORAGE_CONF,e);
    System.exit(1);
  }
  loadAdaptorsJars();
  if (System.getProperty(ITConstants.IT_TRACING) != null && Integer.parseInt(System.getProperty(ITConstants.IT_TRACING)) > 0) {
    logger.debug("String_Node_Str");
    int tracing_level=Integer.parseInt(System.getProperty(ITConstants.IT_TRACING));
    Tracer.init(tracing_level);
    Tracer.emitEvent(Tracer.Event.STATIC_IT.getId(),Tracer.Event.STATIC_IT.getType());
  }
}

Fixed version (ground truth):
/** 
 * Communications initializer
 */
public static void init(){
  appHost=new MasterResource();
  try {
    if (STORAGE_CONF == null || STORAGE_CONF.equals("String_Node_Str") || STORAGE_CONF.equals("String_Node_Str")) {
      logger.warn("String_Node_Str");
    }
 else {
      logger.debug("String_Node_Str" + STORAGE_CONF);
      StorageItf.init(STORAGE_CONF);
    }
  }
 catch (  StorageException e) {
    logger.fatal("String_Node_Str" + STORAGE_CONF,e);
    System.exit(1);
  }
  loadAdaptorsJars();
  if (System.getProperty(ITConstants.IT_TRACING) != null && Integer.parseInt(System.getProperty(ITConstants.IT_TRACING)) > 0) {
    logger.debug("String_Node_Str");
    int tracing_level=Integer.parseInt(System.getProperty(ITConstants.IT_TRACING));
    Tracer.init(tracing_level);
    Tracer.emitEvent(Tracer.Event.STATIC_IT.getId(),Tracer.Event.STATIC_IT.getType());
  }
}
Program: 70164
Project: 70164
Buggy source:
/** 
 * Return the active adaptors
 * @return
 */
public static synchronized HashMap<String,CommAdaptor> getAdaptors(){
  return adaptors;
}

Fixed version (ground truth):
/** 
 * Return the active adaptors
 * @return
 */
public static Map<String,CommAdaptor> getAdaptors(){
  return adaptors;
}
Program: 70165
Project: 70165
Buggy source:
/** 
 * Stops all the submitted jobs
 */
public static synchronized void stopSubmittedjobs(){
  for (  CommAdaptor adaptor : adaptors.values()) {
    adaptor.stopSubmittedJobs();
  }
}

Fixed version (ground truth):
/** 
 * Stops all the submitted jobs
 */
public static void stopSubmittedjobs(){
  for (  CommAdaptor adaptor : adaptors.values()) {
    adaptor.stopSubmittedJobs();
  }
}
Program: 70166
Project: 70166
Buggy source:
/** 
 * Initializes the internal adaptor and constructs a comm configuration
 * @param adaptorName
 * @param project_properties
 * @param resources_properties
 * @return
 * @throws ConstructConfigurationException
 */
public static synchronized Configuration constructConfiguration(String adaptorName,Object project_properties,Object resources_properties) throws ConstructConfigurationException {
  CommAdaptor adaptor=adaptors.get(adaptorName);
  if (adaptor == null) {
    try {
      Constructor<?> constrAdaptor=Class.forName(adaptorName).getConstructor();
      adaptor=(CommAdaptor)constrAdaptor.newInstance();
    }
 catch (    NoSuchMethodException|SecurityException|ClassNotFoundException|InstantiationException|IllegalAccessException|IllegalArgumentException|InvocationTargetException e) {
      throw new ConstructConfigurationException(e);
    }
    adaptor.init();
    adaptors.put(adaptorName,adaptor);
  }
  if (debug) {
    logger.debug("String_Node_Str" + adaptorName);
  }
  return adaptor.constructConfiguration(project_properties,resources_properties);
}

Fixed version (ground truth):
/** 
 * Initializes the internal adaptor and constructs a comm configuration
 * @param adaptorName
 * @param project_properties
 * @param resources_properties
 * @return
 * @throws ConstructConfigurationException
 */
public static Configuration constructConfiguration(String adaptorName,Object project_properties,Object resources_properties) throws ConstructConfigurationException {
  CommAdaptor adaptor=adaptors.get(adaptorName);
  if (adaptor == null) {
    try {
      Constructor<?> constrAdaptor=Class.forName(adaptorName).getConstructor();
      adaptor=(CommAdaptor)constrAdaptor.newInstance();
    }
 catch (    NoSuchMethodException|SecurityException|ClassNotFoundException|InstantiationException|IllegalAccessException|IllegalArgumentException|InvocationTargetException e) {
      throw new ConstructConfigurationException(e);
    }
    adaptor.init();
    adaptors.put(adaptorName,adaptor);
  }
  if (debug) {
    logger.debug("String_Node_Str" + adaptorName);
  }
  return adaptor.constructConfiguration(project_properties,resources_properties);
}
Program: 70167
Project: 70167
Buggy source:
/** 
 * Initializes a worker with name @name and configuration @config
 * @param name
 * @param config
 * @return
 */
public static synchronized COMPSsWorker initWorker(String name,Configuration config){
  String adaptorName=config.getAdaptorName();
  CommAdaptor adaptor=adaptors.get(adaptorName);
  return adaptor.initWorker(name,config);
}

Fixed version (ground truth):
/** 
 * Initializes a worker with name @name and configuration @config
 * @param name
 * @param config
 * @return
 */
public static COMPSsWorker initWorker(String name,Configuration config){
  String adaptorName=config.getAdaptorName();
  CommAdaptor adaptor=adaptors.get(adaptorName);
  return adaptor.initWorker(name,config);
}
Program: 70168
Project: 70168
Buggy source:
/** 
 * Returns all the data stored in a host @host
 * @param host
 * @return
 */
public static synchronized HashSet<LogicalData> getAllData(Resource host){
  return host.getAllDataFromHost();
}

Fixed version (ground truth):
/** 
 * Returns all the data stored in a host @host
 * @param host
 * @return
 */
public static HashSet<LogicalData> getAllData(Resource host){
  return host.getAllDataFromHost();
}
Program: 70169
Project: 70169
Buggy source:
/** 
 * Stops the communication layer.  Clean FTM, Job, {GATJob, NIOJob} and WSJob
 */
public static synchronized void stop(){
  appHost.deleteIntermediate();
  for (  CommAdaptor adaptor : adaptors.values()) {
    adaptor.stop();
  }
  if (STORAGE_CONF != null && !STORAGE_CONF.equals("String_Node_Str") && !STORAGE_CONF.equals("String_Node_Str")) {
    try {
      logger.debug("String_Node_Str");
      StorageItf.finish();
    }
 catch (    StorageException e) {
      logger.error("String_Node_Str" + e.getMessage());
    }
  }
  if (Tracer.isActivated()) {
    Tracer.emitEvent(Tracer.EVENT_END,Tracer.getRuntimeEventsType());
    Tracer.fini();
  }
}

Fixed version (ground truth):
/** 
 * Stops the communication layer.  Clean FTM, Job, {GATJob, NIOJob} and WSJob
 */
public static void stop(){
  appHost.deleteIntermediate();
  for (  CommAdaptor adaptor : adaptors.values()) {
    adaptor.stop();
  }
  if (STORAGE_CONF != null && !STORAGE_CONF.equals("String_Node_Str") && !STORAGE_CONF.equals("String_Node_Str")) {
    try {
      logger.debug("String_Node_Str");
      StorageItf.finish();
    }
 catch (    StorageException e) {
      logger.error("String_Node_Str" + e.getMessage());
    }
  }
  if (Tracer.isActivated()) {
    Tracer.emitEvent(Tracer.EVENT_END,Tracer.getRuntimeEventsType());
    Tracer.fini();
  }
}
Program: 70171
Project: 70171
Buggy source:
public MultiURI(Protocol protocol,Resource host,String path){
  this.protocol=protocol;
  this.host=host;
  this.path=path;
  this.internal=new HashMap<>();
}

Fixed version (ground truth):
public MultiURI(Protocol protocol,Resource host,String path){
  this.protocol=protocol;
  this.host=host;
  this.path=path;
  this.internal=new HashMap<>();
  try {
    host.setInternalURI(this);
  }
 catch (  UnstartedNodeException e) {
    e.printStackTrace();
  }
}
Program: 70172
Project: 70172
Buggy source:
public String debugString(){
  StringBuilder sb=new StringBuilder(this.protocol.getSchema() + this.host.toString() + File.separator+ this.path+ "String_Node_Str");
  for (  Entry<String,Object> e : internal.entrySet()) {
    sb.append("String_Node_Str").append(e.getKey()).append("String_Node_Str").append(e.getValue()).append("String_Node_Str");
  }
  return sb.toString();
}

Fixed version (ground truth):
public String debugString(){
  StringBuilder sb=new StringBuilder(this.protocol.getSchema() + this.host.getName() + File.separator+ this.path+ "String_Node_Str");
  for (  Entry<String,Object> e : internal.entrySet()) {
    sb.append("String_Node_Str").append(e.getKey()).append("String_Node_Str").append(e.getValue()).append("String_Node_Str");
  }
  return sb.toString();
}
Program: 70173
Project: 70173
Buggy source:
public Object getInternalURI(String adaptor) throws UnstartedNodeException {
  Object o=internal.get(adaptor);
  if (o == null) {
    host.setInternalURI(this);
    o=internal.get(adaptor);
  }
  return o;
}

Fixed version (ground truth):
public Object getInternalURI(String adaptor) throws UnstartedNodeException {
  Object o=internal.get(adaptor);
  return o;
}
Program: 70175
Project: 70175
Buggy source:
public static synchronized void init(){
  appHost=new MasterResource();
  try {
    if (STORAGE_CONF == null || STORAGE_CONF.equals("String_Node_Str") || STORAGE_CONF.equals("String_Node_Str")) {
      logger.warn("String_Node_Str");
    }
 else {
      logger.debug("String_Node_Str" + STORAGE_CONF);
      StorageItf.init(STORAGE_CONF);
    }
  }
 catch (  StorageException e) {
    logger.fatal("String_Node_Str" + STORAGE_CONF,e);
    System.exit(1);
  }
  loadAdaptorsJars();
  if (System.getProperty(ITConstants.IT_TRACING) != null && Integer.parseInt(System.getProperty(ITConstants.IT_TRACING)) > 0) {
    logger.debug("String_Node_Str");
    int tracing_level=Integer.parseInt(System.getProperty(ITConstants.IT_TRACING));
    Tracer.init(tracing_level);
    Tracer.emitEvent(Tracer.Event.STATIC_IT.getId(),Tracer.Event.STATIC_IT.getType());
  }
}

Fixed version (ground truth):
/** 
 * Communications initializer
 */
public static synchronized void init(){
  appHost=new MasterResource();
  try {
    if (STORAGE_CONF == null || STORAGE_CONF.equals("String_Node_Str") || STORAGE_CONF.equals("String_Node_Str")) {
      logger.warn("String_Node_Str");
    }
 else {
      logger.debug("String_Node_Str" + STORAGE_CONF);
      StorageItf.init(STORAGE_CONF);
    }
  }
 catch (  StorageException e) {
    logger.fatal("String_Node_Str" + STORAGE_CONF,e);
    System.exit(1);
  }
  loadAdaptorsJars();
  if (System.getProperty(ITConstants.IT_TRACING) != null && Integer.parseInt(System.getProperty(ITConstants.IT_TRACING)) > 0) {
    logger.debug("String_Node_Str");
    int tracing_level=Integer.parseInt(System.getProperty(ITConstants.IT_TRACING));
    Tracer.init(tracing_level);
    Tracer.emitEvent(Tracer.Event.STATIC_IT.getId(),Tracer.Event.STATIC_IT.getType());
  }
}
Program: 70176
Project: 70176
Buggy source:
public static synchronized LogicalData registerPSCO(String dataId,String id){
  String targetPath=Protocol.PERSISTENT_URI.getSchema() + id;
  DataLocation location=null;
  try {
    SimpleURI uri=new SimpleURI(targetPath);
    location=DataLocation.createLocation(appHost,uri);
  }
 catch (  Exception e) {
    ErrorManager.error(DataLocation.ERROR_INVALID_LOCATION + "String_Node_Str" + targetPath,e);
  }
  LogicalData logicalData=data.get(dataId);
  logicalData.addLocation(location);
  return logicalData;
}

Fixed version (ground truth):
/** 
 * Registers a new PSCO id @id for the data with id @dataId dataId must exist
 * @param dataId
 * @param id
 * @return
 */
public static synchronized LogicalData registerPSCO(String dataId,String id){
  String targetPath=Protocol.PERSISTENT_URI.getSchema() + id;
  DataLocation location=null;
  try {
    SimpleURI uri=new SimpleURI(targetPath);
    location=DataLocation.createLocation(appHost,uri);
  }
 catch (  Exception e) {
    ErrorManager.error(DataLocation.ERROR_INVALID_LOCATION + "String_Node_Str" + targetPath,e);
  }
  LogicalData logicalData=data.get(dataId);
  logicalData.addLocation(location);
  return logicalData;
}
Program: 70177
Project: 70177
Buggy source:
public static synchronized LogicalData registerData(String dataId){
  logger.debug("String_Node_Str" + dataId);
  LogicalData logicalData=new LogicalData(dataId);
  data.put(dataId,logicalData);
  return logicalData;
}

Fixed version (ground truth):
/** 
 * Registers a new data with id @dataId
 * @param dataId
 * @return
 */
public static synchronized LogicalData registerData(String dataId){
  logger.debug("String_Node_Str" + dataId);
  LogicalData logicalData=new LogicalData(dataId);
  data.put(dataId,logicalData);
  return logicalData;
}
Program: 70178
Project: 70178
Buggy source:
public static synchronized String dataDump(){
  StringBuilder sb=new StringBuilder("String_Node_Str");
  for (  Map.Entry<String,LogicalData> lde : data.entrySet()) {
    sb.append("String_Node_Str").append(lde.getKey()).append("String_Node_Str");
    LogicalData ld=lde.getValue();
    for (    MultiURI u : ld.getURIs()) {
      sb.append("String_Node_Str").append(u.toString()).append("String_Node_Str");
      for (      String adaptor : adaptors.keySet()) {
        Object internal=null;
        try {
          internal=u.getInternalURI(adaptor);
          if (internal != null) {
            sb.append("String_Node_Str").append(internal.toString()).append("String_Node_Str");
          }
        }
 catch (        UnstartedNodeException une) {
        }
      }
    }
  }
  return sb.toString();
}

Fixed version (ground truth):
/** 
 * Dumps the stored data (only for testing)
 * @return
 */
public static synchronized String dataDump(){
  StringBuilder sb=new StringBuilder("String_Node_Str");
  for (  Map.Entry<String,LogicalData> lde : data.entrySet()) {
    sb.append("String_Node_Str").append(lde.getKey()).append("String_Node_Str");
    LogicalData ld=lde.getValue();
    for (    MultiURI u : ld.getURIs()) {
      sb.append("String_Node_Str").append(u.toString()).append("String_Node_Str");
      for (      String adaptor : adaptors.keySet()) {
        Object internal=null;
        try {
          internal=u.getInternalURI(adaptor);
          if (internal != null) {
            sb.append("String_Node_Str").append(internal.toString()).append("String_Node_Str");
          }
        }
 catch (        UnstartedNodeException une) {
        }
      }
    }
  }
  return sb.toString();
}
Program: 70179
Project: 70179
Buggy source:
public static MasterResource getAppHost(){
  return appHost;
}

Fixed version (ground truth):
/** 
 * Returns the resource assigned as master node
 * @return
 */
public static MasterResource getAppHost(){
  return appHost;
}
Program: 70180
Project: 70180
Buggy source:
public static synchronized HashMap<String,CommAdaptor> getAdaptors(){
  return adaptors;
}

Fixed version (ground truth):
/** 
 * Return the active adaptors
 * @return
 */
public static synchronized HashMap<String,CommAdaptor> getAdaptors(){
  return adaptors;
}
Program: 70181
Project: 70181
Buggy source:
public static synchronized void stopSubmittedjobs(){
  for (  CommAdaptor adaptor : adaptors.values()) {
    adaptor.stopSubmittedJobs();
  }
}

Fixed version (ground truth):
/** 
 * Stops all the submitted jobs
 */
public static synchronized void stopSubmittedjobs(){
  for (  CommAdaptor adaptor : adaptors.values()) {
    adaptor.stopSubmittedJobs();
  }
}
Program: 70182
Project: 70182
Buggy source:
public static synchronized Configuration constructConfiguration(String adaptorName,Object project_properties,Object resources_properties) throws Exception {
  CommAdaptor adaptor=adaptors.get(adaptorName);
  if (adaptor == null) {
    Constructor<?> constrAdaptor=Class.forName(adaptorName).getConstructor();
    adaptor=(CommAdaptor)constrAdaptor.newInstance();
    adaptor.init();
    adaptors.put(adaptorName,adaptor);
  }
  if (debug) {
    logger.debug("String_Node_Str" + adaptorName);
  }
  return adaptor.constructConfiguration(project_properties,resources_properties);
}

Fixed version (ground truth):
/** 
 * Initializes the internal adaptor and constructs a comm configuration
 * @param adaptorName
 * @param project_properties
 * @param resources_properties
 * @return
 * @throws ConstructConfigurationException
 */
public static synchronized Configuration constructConfiguration(String adaptorName,Object project_properties,Object resources_properties) throws ConstructConfigurationException {
  CommAdaptor adaptor=adaptors.get(adaptorName);
  if (adaptor == null) {
    try {
      Constructor<?> constrAdaptor=Class.forName(adaptorName).getConstructor();
      adaptor=(CommAdaptor)constrAdaptor.newInstance();
    }
 catch (    NoSuchMethodException|SecurityException|ClassNotFoundException|InstantiationException|IllegalAccessException|IllegalArgumentException|InvocationTargetException e) {
      throw new ConstructConfigurationException(e);
    }
    adaptor.init();
    adaptors.put(adaptorName,adaptor);
  }
  if (debug) {
    logger.debug("String_Node_Str" + adaptorName);
  }
  return adaptor.constructConfiguration(project_properties,resources_properties);
}
Program: 70183
Project: 70183
Buggy source:
public static synchronized LogicalData registerValue(String dataId,Object value){
  logger.debug("String_Node_Str" + value + "String_Node_Str"+ dataId);
  String targetPath=Protocol.OBJECT_URI.getSchema() + dataId;
  DataLocation location=null;
  try {
    SimpleURI uri=new SimpleURI(targetPath);
    location=DataLocation.createLocation(appHost,uri);
  }
 catch (  Exception e) {
    ErrorManager.error(DataLocation.ERROR_INVALID_LOCATION + "String_Node_Str" + targetPath,e);
  }
  LogicalData logicalData=data.get(dataId);
  logicalData.addLocation(location);
  logicalData.setValue(value);
  if (value instanceof StubItf) {
    String id=((StubItf)value).getID();
    if (id != null) {
      Comm.registerPSCO(dataId,id);
    }
  }
  return logicalData;
}

Fixed version (ground truth):
/** 
 * Registers a new value @value for the data with id @dataId dataId must exist
 * @param dataId
 * @param value
 * @return
 */
public static synchronized LogicalData registerValue(String dataId,Object value){
  logger.debug("String_Node_Str" + value + "String_Node_Str"+ dataId);
  String targetPath=Protocol.OBJECT_URI.getSchema() + dataId;
  DataLocation location=null;
  try {
    SimpleURI uri=new SimpleURI(targetPath);
    location=DataLocation.createLocation(appHost,uri);
  }
 catch (  Exception e) {
    ErrorManager.error(DataLocation.ERROR_INVALID_LOCATION + "String_Node_Str" + targetPath,e);
  }
  LogicalData logicalData=data.get(dataId);
  logicalData.addLocation(location);
  logicalData.setValue(value);
  if (value instanceof StubItf) {
    String id=((StubItf)value).getID();
    if (id != null) {
      Comm.registerPSCO(dataId,id);
    }
  }
  return logicalData;
}
Program: 70184
Project: 70184
Buggy source:
public static synchronized Object clearValue(String dataId){
  logger.debug("String_Node_Str" + dataId);
  LogicalData logicalData=data.get(dataId);
  return logicalData.removeValue();
}

Fixed version (ground truth):
/** 
 * Clears the value of the data id @dataId
 * @param dataId
 * @return
 */
public static synchronized Object clearValue(String dataId){
  logger.debug("String_Node_Str" + dataId);
  LogicalData logicalData=data.get(dataId);
  return logicalData.removeValue();
}
Program: 70185
Project: 70185
Buggy source:
public static synchronized COMPSsWorker initWorker(String name,Configuration config){
  String adaptorName=config.getAdaptorName();
  CommAdaptor adaptor=adaptors.get(adaptorName);
  return adaptor.initWorker(name,config);
}

Fixed version (ground truth):
/** 
 * Initializes a worker with name @name and configuration @config
 * @param name
 * @param config
 * @return
 */
public static synchronized COMPSsWorker initWorker(String name,Configuration config){
  String adaptorName=config.getAdaptorName();
  CommAdaptor adaptor=adaptors.get(adaptorName);
  return adaptor.initWorker(name,config);
}
Program: 70186
Project: 70186
Buggy source:
public static synchronized LogicalData registerLocation(String dataId,DataLocation location){
  logger.debug("String_Node_Str" + dataId + "String_Node_Str");
  logger.debug("String_Node_Str" + location);
  LogicalData logicalData=data.get(dataId);
  logicalData.addLocation(location);
  return logicalData;
}

Fixed version (ground truth):
/** 
 * Registers a new location @location for the data with id @dataId dataId must exist
 * @param dataId
 * @param location
 * @return
 */
public static synchronized LogicalData registerLocation(String dataId,DataLocation location){
  logger.debug("String_Node_Str" + dataId + "String_Node_Str");
  logger.debug("String_Node_Str" + location);
  LogicalData logicalData=data.get(dataId);
  logicalData.addLocation(location);
  return logicalData;
}
Program: 70187
Project: 70187
Buggy source:
public static synchronized HashSet<LogicalData> getAllData(Resource host){
  return host.getAllDataFromHost();
}

Fixed version (ground truth):
/** 
 * Returns all the data stored in a host @host
 * @param host
 * @return
 */
public static synchronized HashSet<LogicalData> getAllData(Resource host){
  return host.getAllDataFromHost();
}
Program: 70188
Project: 70188
Buggy source:
public static synchronized void stop(){
  appHost.deleteIntermediate();
  for (  CommAdaptor adaptor : adaptors.values()) {
    adaptor.stop();
  }
  if (STORAGE_CONF != null && !STORAGE_CONF.equals("String_Node_Str") && !STORAGE_CONF.equals("String_Node_Str")) {
    try {
      logger.debug("String_Node_Str");
      StorageItf.finish();
    }
 catch (    StorageException e) {
      logger.error("String_Node_Str" + e.getMessage());
    }
  }
  if (Tracer.isActivated()) {
    Tracer.emitEvent(Tracer.EVENT_END,Tracer.getRuntimeEventsType());
    Tracer.fini();
  }
}

Fixed version (ground truth):
/** 
 * Stops the communication layer.  Clean FTM, Job, {GATJob, NIOJob} and WSJob
 */
public static synchronized void stop(){
  appHost.deleteIntermediate();
  for (  CommAdaptor adaptor : adaptors.values()) {
    adaptor.stop();
  }
  if (STORAGE_CONF != null && !STORAGE_CONF.equals("String_Node_Str") && !STORAGE_CONF.equals("String_Node_Str")) {
    try {
      logger.debug("String_Node_Str");
      StorageItf.finish();
    }
 catch (    StorageException e) {
      logger.error("String_Node_Str" + e.getMessage());
    }
  }
  if (Tracer.isActivated()) {
    Tracer.emitEvent(Tracer.EVENT_END,Tracer.getRuntimeEventsType());
    Tracer.fini();
  }
}
Program: 70189
Project: 70189
Buggy source:
public static synchronized boolean existsData(String renaming){
  return (data.get(renaming) != null);
}

Fixed version (ground truth):
/** 
 * Checks if a given dataId @renaming exists
 * @param renaming
 * @return
 */
public static synchronized boolean existsData(String renaming){
  return (data.get(renaming) != null);
}
Program: 70190
Project: 70190
Buggy source:
public static synchronized void removeData(String renaming){
  logger.debug("String_Node_Str" + renaming);
  LogicalData ld=data.remove(renaming);
  ld.isObsolete();
  for (  DataLocation dl : ld.getLocations()) {
    MultiURI uri=dl.getURIInHost(appHost);
    if (uri != null) {
      File f=new File(uri.getPath());
      if (f.exists()) {
        logger.info("String_Node_Str" + f.getAbsolutePath());
        if (!f.delete()) {
          logger.error("String_Node_Str" + f.getAbsolutePath());
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Removes the data with id @renaming
 * @param renaming
 */
public static synchronized void removeData(String renaming){
  logger.debug("String_Node_Str" + renaming);
  LogicalData ld=data.remove(renaming);
  ld.isObsolete();
  for (  DataLocation dl : ld.getLocations()) {
    MultiURI uri=dl.getURIInHost(appHost);
    if (uri != null) {
      File f=new File(uri.getPath());
      if (f.exists()) {
        logger.info("String_Node_Str" + f.getAbsolutePath());
        if (!f.delete()) {
          logger.error("String_Node_Str" + f.getAbsolutePath());
        }
      }
    }
  }
}
Program: 70191
Project: 70191
Buggy source:
public static synchronized LogicalData getData(String dataId){
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + data.get(dataId));
  }
  return data.get(dataId);
}

Fixed version (ground truth):
/** 
 * Returns the data with id @dataId
 * @param dataId
 * @return
 */
public static synchronized LogicalData getData(String dataId){
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + data.get(dataId));
  }
  return data.get(dataId);
}
Program: 70192
Project: 70192
Buggy source:
/** 
 * Creates a configuration instance for the specific adaptor
 * @param project_properties
 * @param resources_properties
 * @return
 * @throws Exception
 */
public Configuration constructConfiguration(Object project_properties,Object resources_properties) throws Exception ;

Fixed version (ground truth):
/** 
 * Creates a configuration instance for the specific adaptor
 * @param project_properties
 * @param resources_properties
 * @return
 * @throws Exception
 */
public Configuration constructConfiguration(Object project_properties,Object resources_properties) throws ConstructConfigurationException ;
Program: 70193
Project: 70193
Buggy source:
public void setWorkingDir(String workingDir){
  if (workingDir == null) {
    this.workingDir=File.separator + "String_Node_Str" + File.separator;
  }
 else   if (workingDir.isEmpty()) {
    this.workingDir=File.separator + "String_Node_Str" + File.separator;
  }
 else   if (!workingDir.endsWith(File.separator)) {
    this.workingDir=workingDir + File.separator;
  }
 else {
    this.workingDir=workingDir;
  }
}

Fixed version (ground truth):
public void setWorkingDir(String workingDir){
  if (workingDir == null) {
    this.workingDir=File.separator + "String_Node_Str" + File.separator;
  }
 else   if (workingDir.isEmpty()) {
    this.workingDir=File.separator + "String_Node_Str" + File.separator;
  }
 else   if (!workingDir.endsWith(File.separator)) {
    this.workingDir=workingDir + File.separator;
  }
 else {
    this.workingDir=workingDir;
  }
  String host=this.getHost().replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str");
  String sandboxWorkingDir=this.getWorkingDir() + DEPLOYMENT_ID + File.separator+ host+ File.separator;
  this.setSandboxWorkingDir(sandboxWorkingDir);
}
Program: 70195
Project: 70195
Buggy source:
public static boolean generatePackage(GATWorkerNode node){
  LinkedList<URI> traceScripts=new LinkedList<URI>();
  LinkedList<String> traceParams=new LinkedList<String>();
  String host=node.getHost();
  String installDir=node.getInstallDir();
  String workingDir=node.getWorkingDir();
  String user=node.getUser();
  if (user == null) {
    user="String_Node_Str";
  }
 else {
    user+="String_Node_Str";
  }
  try {
    traceScripts.add(new URI(Protocol.ANY_URI.getSchema() + user + host+ File.separator+ installDir+ TRACE_SCRIPT_PATH));
  }
 catch (  URISyntaxException e) {
    logger.error("String_Node_Str",e);
    return false;
  }
  String pars="String_Node_Str" + workingDir + "String_Node_Str"+ host;
  traceParams.add(pars);
  return new CleanerExecutor(node).executeScript(traceScripts,traceParams);
}

Fixed version (ground truth):
public static boolean generatePackage(GATWorkerNode node){
  LinkedList<URI> traceScripts=new LinkedList<URI>();
  LinkedList<String> traceParams=new LinkedList<String>();
  String host=node.getHost();
  String installDir=node.getInstallDir();
  String workingDir=node.getWorkingDir();
  String user=node.getUser();
  if (user == null) {
    user="String_Node_Str";
  }
 else {
    user+="String_Node_Str";
  }
  try {
    traceScripts.add(new URI(Protocol.ANY_URI.getSchema() + user + host+ File.separator+ installDir+ TRACE_SCRIPT_PATH));
  }
 catch (  URISyntaxException e) {
    logger.error("String_Node_Str",e);
    return false;
  }
  String pars="String_Node_Str" + workingDir + "String_Node_Str"+ host;
  traceParams.add(pars);
  return new GATScriptExecutor(node).executeScript(traceScripts,traceParams,"String_Node_Str" + host);
}