nus-yam/ex-repair huggingface dataset:
Program: 70256
Project: 70256
Buggy source:
@Override protected void doFailed(){
  String taskName=task.getTaskParams().getName();
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str").append(taskName).append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str").append(taskName).append("String_Node_Str");
  sb.append("String_Node_Str").append(taskName).append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str").append(Comm.appHost.getJobsDirPath()).append("String_Node_Str");
  Iterator<Integer> j=jobs.iterator();
  while (true) {
    sb.append(j.next());
    if (!j.hasNext()) {
      break;
    }
    sb.append("String_Node_Str");
  }
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  ErrorManager.warn(sb.toString());
  task.setStatus(Task.TaskState.FAILED);
  producer.notifyTaskEnd(task);
}

Fixed version (ground truth):
@Override protected void doFailed(){
  String taskName=task.getTaskParams().getName();
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str").append(taskName).append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str").append(taskName).append("String_Node_Str");
  sb.append("String_Node_Str").append(taskName).append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str").append(Comm.appHost.getJobsDirPath()).append("String_Node_Str");
  Iterator<Integer> j=jobs.iterator();
  while (j.hasNext()) {
    sb.append(j.next());
    if (!j.hasNext()) {
      break;
    }
    sb.append("String_Node_Str");
  }
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  ErrorManager.warn(sb.toString());
  task.setStatus(Task.TaskState.FAILED);
  producer.notifyTaskEnd(task);
}
Program: 70257
Project: 70257
Buggy source:
private void transferJobData(DependencyParameter param,JobTransfersListener listener){
  Worker<?> w=selectedResource.getResource();
  DataAccessId access=param.getDataAccessId();
  if (access instanceof DataAccessId.WAccessId) {
    String tgtName=((DataAccessId.WAccessId)access).getWrittenDataInstance().getRenaming();
    param.setDataTarget(w.getCompleteRemotePath(param.getType(),tgtName));
    return;
  }
  listener.addOperation();
  if (access instanceof DataAccessId.RAccessId) {
    String srcName=((DataAccessId.RAccessId)access).getReadDataInstance().getRenaming();
    w.getData(srcName,srcName,param,listener);
  }
 else {
    String srcName=((DataAccessId.RWAccessId)access).getReadDataInstance().getRenaming();
    String tgtName=((DataAccessId.RWAccessId)access).getWrittenDataInstance().getRenaming();
    w.getData(srcName,tgtName,(LogicalData)null,param,listener);
  }
}

Fixed version (ground truth):
private void transferJobData(DependencyParameter param,JobTransfersListener listener){
  Worker<?> w=selectedResource.getResource();
  DataAccessId access=param.getDataAccessId();
  if (access instanceof DataAccessId.WAccessId) {
    String tgtName=((DataAccessId.WAccessId)access).getWrittenDataInstance().getRenaming();
    if (debug) {
      jobLogger.debug("String_Node_Str" + w.getCompleteRemotePath(param.getType(),tgtName));
    }
    param.setDataTarget(w.getCompleteRemotePath(param.getType(),tgtName));
    return;
  }
  listener.addOperation();
  if (access instanceof DataAccessId.RAccessId) {
    String srcName=((DataAccessId.RAccessId)access).getReadDataInstance().getRenaming();
    w.getData(srcName,srcName,param,listener);
  }
 else {
    String srcName=((DataAccessId.RWAccessId)access).getReadDataInstance().getRenaming();
    String tgtName=((DataAccessId.RWAccessId)access).getWrittenDataInstance().getRenaming();
    w.getData(srcName,tgtName,(LogicalData)null,param,listener);
  }
}
Program: 70259
Project: 70259
Buggy source:
private void waitForCopyTofinish(Copy copy){
  Semaphore sem=new Semaphore(0);
  SafeCopyListener currentCopylistener=new SafeCopyListener(sem);
  copy.addEventListener(currentCopylistener);
  currentCopylistener.addOperation();
  currentCopylistener.enable();
  try {
    sem.acquire();
  }
 catch (  InterruptedException ex) {
    ErrorManager.warn("String_Node_Str" + getName() + "String_Node_Str");
  }
}

Fixed version (ground truth):
private void waitForCopyTofinish(Copy copy){
  Semaphore sem=new Semaphore(0);
  SafeCopyListener currentCopylistener=new SafeCopyListener(sem);
  copy.addEventListener(currentCopylistener);
  currentCopylistener.addOperation();
  currentCopylistener.enable();
  try {
    sem.acquire();
  }
 catch (  InterruptedException ex) {
    ErrorManager.warn("String_Node_Str" + getName() + "String_Node_Str");
  }
  if (debug) {
    logger.debug("String_Node_Str" + copy.getName() + "String_Node_Str"+ copy.getId()+ "String_Node_Str");
  }
}
Program: 70260
Project: 70260
Buggy source:
private synchronized void addLocation_private(DataLocation loc){
  isBeingSaved=false;
  locations.add(loc);
switch (loc.getType()) {
case PRIVATE:
    for (    Resource host : loc.getHosts()) {
      if (host == null) {
        host=Comm.appHost;
      }
      boolean done=false;
      HashSet<LogicalData> files=null;
      while (!done) {
        try {
          files=hostToPrivateFiles.get(host);
          if (files == null) {
            files=new HashSet<LogicalData>();
            hostToPrivateFiles.put(host,files);
          }
          done=true;
        }
 catch (        ConcurrentModificationException cme) {
          logger.debug("String_Node_Str");
        }
      }
      files.add(this);
    }
  if (loc.getPath().startsWith(File.separator)) {
    onFile=true;
  }
break;
case SHARED:
String shared=loc.getSharedDisk();
boolean done=false;
HashSet<LogicalData> files=null;
while (!done) {
try {
files=sharedDiskToSharedFiles.get(shared);
if (files == null) {
files=new HashSet<LogicalData>();
sharedDiskToSharedFiles.put(shared,files);
}
done=true;
}
 catch (ConcurrentModificationException cme) {
logger.debug("String_Node_Str");
}
}
files.add(this);
onFile=true;
break;
}
}

Fixed version (ground truth):
private synchronized void addLocation_private(DataLocation loc){
  isBeingSaved=false;
  locations.add(loc);
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + this.getName() + "String_Node_Str"+ loc.getLocationKey()+ "String_Node_Str");
  }
switch (loc.getType()) {
case PRIVATE:
    for (    Resource host : loc.getHosts()) {
      if (host == null) {
        host=Comm.appHost;
      }
      boolean done=false;
      HashSet<LogicalData> files=null;
      while (!done) {
        try {
          files=hostToPrivateFiles.get(host);
          if (files == null) {
            files=new HashSet<LogicalData>();
            hostToPrivateFiles.put(host,files);
          }
          done=true;
        }
 catch (        ConcurrentModificationException cme) {
          logger.debug("String_Node_Str");
        }
      }
      files.add(this);
    }
  if (loc.getPath().startsWith(File.separator)) {
    onFile=true;
  }
break;
case SHARED:
String shared=loc.getSharedDisk();
boolean done=false;
HashSet<LogicalData> files=null;
while (!done) {
try {
files=sharedDiskToSharedFiles.get(shared);
if (files == null) {
files=new HashSet<LogicalData>();
sharedDiskToSharedFiles.put(shared,files);
}
done=true;
}
 catch (ConcurrentModificationException cme) {
logger.debug("String_Node_Str");
}
}
files.add(this);
onFile=true;
break;
}
}
Program: 70261
Project: 70261
Buggy source:
public Copy(LogicalData srcData,DataLocation prefSrc,DataLocation prefTgt,LogicalData tgtData,Transferable reason,EventListener listener){
  super(srcData,listener);
  this.srcData=srcData;
  this.srcLoc=prefSrc;
  this.tgtData=tgtData;
  this.tgtLoc=prefTgt;
  this.reason=reason;
}

Fixed version (ground truth):
public Copy(LogicalData srcData,DataLocation prefSrc,DataLocation prefTgt,LogicalData tgtData,Transferable reason,EventListener listener){
  super(srcData,listener);
  this.srcData=srcData;
  this.srcLoc=prefSrc;
  this.tgtData=tgtData;
  this.tgtLoc=prefTgt;
  this.reason=reason;
  if (debug) {
    logger.debug("String_Node_Str" + this.getName() + "String_Node_Str"+ this.getId()+ "String_Node_Str");
  }
}
Program: 70262
Project: 70262
Buggy source:
public void setFinalTarget(String targetAbsolutePath){
  reason.setDataTarget(targetAbsolutePath);
}

Fixed version (ground truth):
public void setFinalTarget(String targetAbsolutePath){
  if (debug) {
    logger.debug("String_Node_Str" + targetAbsolutePath);
  }
  reason.setDataTarget(targetAbsolutePath);
}
Program: 70263
Project: 70263
Buggy source:
public void stop(boolean saveUniqueData,ShutdownListener sl){
  if (debug) {
    logger.debug("String_Node_Str" + this.getName());
  }
  Semaphore sem=new Semaphore(0);
  SafeCopyListener listener=new SafeCopyListener(sem);
  HashSet<LogicalData> lds=LogicalData.getAllDataFromHost(this);
  HashMap<String,String> disks=SharedDiskManager.terminate(this);
  COMPSsNode masterNode=Comm.appHost.getNode();
  for (  LogicalData ld : lds) {
    ld.notifyToInProgressCopiesEnd(listener);
    DataLocation lastLoc=ld.removeHostAndCheckLocationToSave(this,disks);
    if (lastLoc != null && saveUniqueData) {
      listener.addOperation();
      DataLocation safeLoc=DataLocation.getLocation(Comm.appHost,Comm.appHost.getTempDirPath() + ld.getName());
      masterNode.obtainData(ld,lastLoc,safeLoc,ld,new SafeCopyTransferable(),listener);
    }
  }
  if (debug) {
    logger.debug("String_Node_Str" + this.getName());
  }
  listener.enable();
  try {
    sem.acquire();
  }
 catch (  InterruptedException ex) {
    logger.error("String_Node_Str" + getName() + "String_Node_Str");
  }
  if (debug) {
    logger.debug("String_Node_Str" + this.getName());
  }
  if (this.getType() != Type.SERVICE) {
    if (tracing) {
      node.generatePackage();
      getTracingPackageToMaster();
      if (debug) {
        logger.debug("String_Node_Str" + this.getName());
      }
    }
    if (debug) {
      node.generateWorkersDebugInfo();
      getWorkersDebugInfo();
      logger.debug("String_Node_Str" + this.getName());
    }
  }
  this.deleteIntermediate();
  sl.addOperation();
  node.stop(sl);
}

Fixed version (ground truth):
public void stop(ShutdownListener sl){
  this.deleteIntermediate();
  sl.addOperation();
  node.stop(sl);
}
Program: 70264
Project: 70264
Buggy source:
public void copiedData(int transferGroupId){
  LinkedList<Copy> copies=groupToCopy.remove(transferGroupId);
  if (copies == null) {
    return;
  }
  for (  Copy c : copies) {
    if (!c.isRegistered()) {
      continue;
    }
    DataLocation actualLocation=c.getSourceData().finishedCopy(c);
    LogicalData tgtData=c.getTargetData();
    if (tgtData != null) {
      tgtData.addLocation(actualLocation);
    }
  }
}

Fixed version (ground truth):
public void copiedData(int transferGroupId){
  logger.debug("String_Node_Str");
  LinkedList<Copy> copies=groupToCopy.remove(transferGroupId);
  if (copies == null) {
    logger.debug("String_Node_Str");
    return;
  }
  for (  Copy c : copies) {
    logger.debug("String_Node_Str" + c.getName());
    if (!c.isRegistered()) {
      logger.debug("String_Node_Str" + c.getName());
      continue;
    }
    DataLocation actualLocation=c.getSourceData().finishedCopy(c);
    if (actualLocation != null) {
      logger.debug("String_Node_Str" + actualLocation.getPath());
    }
 else {
      logger.debug("String_Node_Str");
    }
    LogicalData tgtData=c.getTargetData();
    if (tgtData != null) {
      logger.debug("String_Node_Str");
      if (actualLocation.getType().equals(DataLocation.Type.PRIVATE)) {
        logger.debug("String_Node_Str" + actualLocation.getPath() + "String_Node_Str"+ tgtData.getName());
        tgtData.addLocation(actualLocation);
      }
 else {
        logger.debug("String_Node_Str" + tgtData.getName());
      }
      logger.debug("String_Node_Str" + tgtData.getName() + "String_Node_Str"+ tgtData.getURIs());
    }
 else {
      logger.warn("String_Node_Str" + c.getName());
    }
  }
}
Program: 70265
Project: 70265
Buggy source:
public long getMonitorInterval(){
  return config.getLong(ITConstants.IT_MONITOR);
}

Fixed version (ground truth):
public long getMonitorInterval(){
  return config.getLong(ITConstants.IT_MONITOR,ITConstants.DEFAULT_MONITOR_INTERVAL);
}
Program: 70266
Project: 70266
Buggy source:
public String getDeploymentId(){
  return config.getString(ITConstants.IT_DEPLOYMENT_ID);
}

Fixed version (ground truth):
public String getDeploymentId(){
  return config.getString(ITConstants.IT_DEPLOYMENT_ID,ITConstants.DEFAULT_DEPLOYMENT_ID);
}
Program: 70267
Project: 70267
Buggy source:
public void stop(boolean saveUniqueData,ShutdownListener sl){
  if (debug) {
    logger.debug("String_Node_Str" + this.getName());
  }
  Semaphore sem=new Semaphore(0);
  SafeCopyListener listener=new SafeCopyListener(sem);
  HashSet<LogicalData> lds=LogicalData.getAllDataFromHost(this);
  HashMap<String,String> disks=SharedDiskManager.terminate(this);
  COMPSsNode masterNode=Comm.appHost.getNode();
  for (  LogicalData ld : lds) {
    ld.notifyToInProgressCopiesEnd(listener);
    DataLocation lastLoc=ld.removeHostAndCheckLocationToSave(this,disks);
    if (lastLoc != null && saveUniqueData) {
      listener.addOperation();
      DataLocation safeLoc=DataLocation.getLocation(Comm.appHost,Comm.appHost.getTempDirPath() + ld.getName());
      masterNode.obtainData(ld,lastLoc,safeLoc,ld,new SafeCopyTransferable(),listener);
    }
  }
  if (debug) {
    logger.debug("String_Node_Str" + this.getName());
  }
  listener.enable();
  try {
    sem.acquire();
  }
 catch (  InterruptedException ex) {
    logger.error("String_Node_Str" + getName() + "String_Node_Str");
  }
  if (this.getType() != Type.SERVICE) {
    if (tracing) {
      node.generatePackage();
      getTracingPackageToMaster();
    }
    if (debug) {
      node.generateWorkersDebugInfo();
      getWorkersDebugInfo();
    }
  }
  this.deleteIntermediate();
  sl.addOperation();
  node.stop(sl);
}

Fixed version (ground truth):
public void stop(boolean saveUniqueData,ShutdownListener sl){
  if (debug) {
    logger.debug("String_Node_Str" + this.getName());
  }
  Semaphore sem=new Semaphore(0);
  SafeCopyListener listener=new SafeCopyListener(sem);
  HashSet<LogicalData> lds=LogicalData.getAllDataFromHost(this);
  HashMap<String,String> disks=SharedDiskManager.terminate(this);
  COMPSsNode masterNode=Comm.appHost.getNode();
  for (  LogicalData ld : lds) {
    ld.notifyToInProgressCopiesEnd(listener);
    DataLocation lastLoc=ld.removeHostAndCheckLocationToSave(this,disks);
    if (lastLoc != null && saveUniqueData) {
      listener.addOperation();
      DataLocation safeLoc=DataLocation.getLocation(Comm.appHost,Comm.appHost.getTempDirPath() + ld.getName());
      masterNode.obtainData(ld,lastLoc,safeLoc,ld,new SafeCopyTransferable(),listener);
    }
  }
  if (debug) {
    logger.debug("String_Node_Str" + this.getName());
  }
  listener.enable();
  try {
    sem.acquire();
  }
 catch (  InterruptedException ex) {
    logger.error("String_Node_Str" + getName() + "String_Node_Str");
  }
  if (debug) {
    logger.debug("String_Node_Str" + this.getName());
  }
  if (this.getType() != Type.SERVICE) {
    if (tracing) {
      node.generatePackage();
      getTracingPackageToMaster();
      if (debug) {
        logger.debug("String_Node_Str" + this.getName());
      }
    }
    if (debug) {
      node.generateWorkersDebugInfo();
      getWorkersDebugInfo();
      logger.debug("String_Node_Str" + this.getName());
    }
  }
  this.deleteIntermediate();
  sl.addOperation();
  node.stop(sl);
}
Program: 70268
Project: 70268
Buggy source:
public void receivedShutdown(Connection requester,LinkedList<Data> filesToSend){
  closingConnection=requester;
  finish=true;
  if (!hasPendingTransfers()) {
    shutdown(closingConnection);
  }
}

Fixed version (ground truth):
public void receivedShutdown(Connection requester,LinkedList<Data> filesToSend){
  logger.debug("String_Node_Str");
  closingConnection=requester;
  finish=true;
  if (!hasPendingTransfers()) {
    shutdown(closingConnection);
  }
}
Program: 70269
Project: 70269
Buggy source:
@Override public void generateWorkersDebugInfo(){
  logger.debug("String_Node_Str" + this.getHost());
  if (node == null) {
    logger.error("String_Node_Str");
  }
  Connection c=NIOAgent.tm.startConnection(node);
  CommandGenerateWorkerDebugFiles cmd=new CommandGenerateWorkerDebugFiles(this.getHost(),this.getInstallDir(),this.getWorkingDir(),this.getName());
  c.sendCommand(cmd);
  c.receive();
  c.finishConnection();
  logger.debug("String_Node_Str");
}

Fixed version (ground truth):
@Override public void generateWorkersDebugInfo(){
  logger.debug("String_Node_Str" + this.getHost());
  if (node == null) {
    logger.error("String_Node_Str");
  }
  Connection c=NIOAgent.tm.startConnection(node);
  CommandGenerateWorkerDebugFiles cmd=new CommandGenerateWorkerDebugFiles(this.getHost(),this.getInstallDir(),this.getWorkingDir(),this.getName());
  c.sendCommand(cmd);
  c.receive();
  c.finishConnection();
  commManager.waitUntilWorkersDebugInfoGenerated();
  logger.debug("String_Node_Str");
}
Program: 70270
Project: 70270
Buggy source:
@Override public void stop(ShutdownListener sl){
  logger.info("String_Node_Str" + this.getName());
  if (node == null) {
    sl.notifyFailure(new Exception());
    logger.error("String_Node_Str");
  }
  Connection c=NIOAgent.tm.startConnection(node);
  commManager.shuttingDown(this,c,sl);
  CommandShutdown cmd=new CommandShutdown(null,null);
  c.sendCommand(cmd);
  c.receive();
  c.finishConnection();
}

Fixed version (ground truth):
@Override public void stop(ShutdownListener sl){
  logger.debug("String_Node_Str" + this.getName());
  if (node == null) {
    sl.notifyFailure(new Exception());
    logger.error("String_Node_Str");
  }
  Connection c=NIOAgent.tm.startConnection(node);
  commManager.shuttingDown(this,c,sl);
  CommandShutdown cmd=new CommandShutdown(null,null);
  c.sendCommand(cmd);
  c.receive();
  c.finishConnection();
}
Program: 70271
Project: 70271
Buggy source:
public void processRequests(){
  while (true) {
    Job<?> job=queue.dequeue();
    if (job == null) {
      break;
    }
    try {
      job.submit();
      if (debug) {
        logger.debug("String_Node_Str" + job.getJobId() + "String_Node_Str");
      }
    }
 catch (    Exception ex) {
      logger.error(SUBMISSION_ERROR + job.getJobId(),ex);
      job.getListener().jobFailed(job,Job.JobListener.JobEndStatus.SUBMISSION_FAILED);
    }
  }
}

Fixed version (ground truth):
public void processRequests(){
  while (true) {
    Job<?> job=queue.dequeue();
    if (job == null) {
      break;
    }
    try {
      job.submit();
      if (debug) {
        logger.debug("String_Node_Str" + job.getJobId() + "String_Node_Str");
      }
    }
 catch (    Exception ex) {
      logger.error(SUBMISSION_ERROR + job.getJobId(),ex);
      job.getListener().jobFailed(job,Job.JobListener.JobEndStatus.SUBMISSION_FAILED);
    }
  }
  logger.debug("String_Node_Str");
}
Program: 70273
Project: 70273
Buggy source:
@Override public Job<?> newJob(int taskId,TaskParams taskParams,Implementation<?> impl,Resource res,JobListener listener){
  return new WSJob(taskId,taskParams,impl,res,listener);
}

Fixed version (ground truth):
@Override public Job<?> newJob(int taskId,TaskParams taskParams,Implementation<?> impl,Resource res,JobListener listener){
  return new WSJob<COMPSsWorker>(taskId,taskParams,impl,res,listener);
}
Program: 70274
Project: 70274
Buggy source:
public static void init() throws Exception {
  if (callerQueue == null) {
    callerQueue=new RequestQueue<WSJob>();
  }
 else {
    callerQueue.clear();
  }
  caller=new WSCaller(callerQueue);
  callerPool=new ThreadPool(POOL_SIZE,POOL_NAME,caller);
  try {
    callerPool.startThreads();
  }
 catch (  Exception e) {
    logger.error(THREAD_POOL_ERR,e);
    throw e;
  }
}

Fixed version (ground truth):
public static void init() throws Exception {
  if (callerQueue == null) {
    callerQueue=new RequestQueue<WSJob<?>>();
  }
 else {
    callerQueue.clear();
  }
  caller=new WSCaller(callerQueue);
  callerPool=new ThreadPool(POOL_SIZE,POOL_NAME,caller);
  try {
    callerPool.startThreads();
  }
 catch (  Exception e) {
    logger.error(THREAD_POOL_ERR,e);
    throw e;
  }
}
Program: 70275
Project: 70275
Buggy source:
public WSCaller(RequestQueue<WSJob> queue){
  super(queue);
}

Fixed version (ground truth):
public WSCaller(RequestQueue<WSJob<?>> queue){
  super(queue);
}
Program: 70276
Project: 70276
Buggy source:
public void processRequests(){
  while (true) {
    WSJob job=null;
    job=queue.dequeue();
    if (job == null) {
      break;
    }
    try {
      ArrayList<Object> input=new ArrayList<Object>();
      TaskParams taskParams=job.taskParams;
      ServiceImplementation service=(ServiceImplementation)job.impl;
      Parameter[] parameters=taskParams.getParameters();
      for (int i=0; i < taskParams.getParameters().length; i++) {
        if (parameters[i].getDirection() == ParamDirection.IN) {
switch (parameters[i].getType()) {
case OBJECT_T:
case SCO_T:
case PSCO_T:
            DependencyParameter dp=(DependencyParameter)parameters[i];
          Object o=getObjectValue(dp);
        input.add(o);
      break;
case FILE_T:
    break;
default :
  BasicTypeParameter btParB=(BasicTypeParameter)parameters[i];
input.add(btParB.getValue());
}
}
}
ServiceInstance si=(ServiceInstance)job.getResourceNode();
String portName=service.getRequirements().getPort();
String operationName=service.getOperation();
if (operationName.compareTo("String_Node_Str") == 0) {
operationName=taskParams.getName();
}
Client client=getClient(si,portName);
ClientCallback cb=new ClientCallback();
client.invoke(cb,operationName,input.toArray());
Object[] result=cb.get();
if (result.length > 0) {
job.returnValue=result[0];
}
job.listener.jobCompleted(job);
}
 catch (Exception e) {
job.listener.jobFailed(job,JobEndStatus.EXECUTION_FAILED);
logger.error(SUBMIT_ERROR,e);
return;
}
}
}

Fixed version (ground truth):
public void processRequests(){
  while (true) {
    WSJob<?> job=null;
    job=queue.dequeue();
    if (job == null) {
      break;
    }
    try {
      ArrayList<Object> input=new ArrayList<Object>();
      TaskParams taskParams=job.taskParams;
      ServiceImplementation service=(ServiceImplementation)job.impl;
      Parameter[] parameters=taskParams.getParameters();
      for (int i=0; i < taskParams.getParameters().length; i++) {
        if (parameters[i].getDirection() == ParamDirection.IN) {
switch (parameters[i].getType()) {
case OBJECT_T:
case SCO_T:
case PSCO_T:
            DependencyParameter dp=(DependencyParameter)parameters[i];
          Object o=getObjectValue(dp);
        input.add(o);
      break;
case FILE_T:
    break;
default :
  BasicTypeParameter btParB=(BasicTypeParameter)parameters[i];
input.add(btParB.getValue());
}
}
}
ServiceInstance si=(ServiceInstance)job.getResourceNode();
String portName=service.getRequirements().getPort();
String operationName=service.getOperation();
if (operationName.compareTo("String_Node_Str") == 0) {
operationName=taskParams.getName();
}
Client client=getClient(si,portName);
ClientCallback cb=new ClientCallback();
client.invoke(cb,operationName,input.toArray());
Object[] result=cb.get();
if (result.length > 0) {
job.returnValue=result[0];
}
job.listener.jobCompleted(job);
}
 catch (Exception e) {
job.listener.jobFailed(job,JobEndStatus.EXECUTION_FAILED);
logger.error(SUBMIT_ERROR,e);
return;
}
}
}
Program: 70277
Project: 70277
Buggy source:
@Override public void reduceDynamic(ResourceDescription rd){
}

Fixed version (ground truth):
@Override public ResourceDescription reduceDynamic(ResourceDescription rd){
  return null;
}
Program: 70278
Project: 70278
Buggy source:
private static void testImmutableObjects(){
  Integer i=ObjectTestImpl.createInteger(5);
  String s=ObjectTestImpl.createString("String_Node_Str");
  System.out.println("String_Node_Str" + i);
  System.out.println("String_Node_Str" + s);
  ObjectTestImpl.printObjects(i,s);
}

Fixed version (ground truth):
private static void testImmutableObjects(){
  Integer i=ObjectTestImpl.createInteger(5);
  String s=ObjectTestImpl.createString("String_Node_Str");
  System.out.println("String_Node_Str" + i);
  System.out.println("String_Node_Str" + s);
  ObjectTestImpl.printContent(i,s);
}
Program: 70279
Project: 70279
Buggy source:
public static void printObjects(Integer i,String s){
  System.out.println("String_Node_Str" + i);
  System.out.println("String_Node_Str" + s);
}

Fixed version (ground truth):
public static void printObjects(A a,B b){
  System.out.println("String_Node_Str" + a.getIntField());
  System.out.println("String_Node_Str" + b.getStringField());
}
Program: 70280
Project: 70280
Buggy source:
@Method(declaringClass="String_Node_Str") void printObjects(@Parameter(type=Type.OBJECT,direction=Direction.IN) Integer i,@Parameter(type=Type.OBJECT,direction=Direction.IN) String s);

Fixed version (ground truth):
@Method(declaringClass="String_Node_Str") void printObjects(@Parameter(type=Type.OBJECT,direction=Direction.IN) A a,@Parameter(type=Type.OBJECT,direction=Direction.IN) B b);
Program: 70282
Project: 70282
Buggy source:
/** 
 * Adds a new task summary request
 * @param logger
 */
public void getTaskSummary(Logger logger){
  Semaphore sem=new Semaphore(0);
  TaskSummaryRequest request=new TaskSummaryRequest(LOGGER,sem);
  addRequest(request);
  try {
    sem.acquire();
  }
 catch (  InterruptedException e) {
    Thread.currentThread().interrupt();
  }
}

Fixed version (ground truth):
/** 
 * Adds a new task summary request
 * @param logger
 */
public void getTaskSummary(Logger logger){
  Semaphore sem=new Semaphore(0);
  TaskSummaryRequest request=new TaskSummaryRequest(logger,sem);
  addRequest(request);
  try {
    sem.acquire();
  }
 catch (  InterruptedException e) {
    Thread.currentThread().interrupt();
  }
}
Program: 70283
Project: 70283
Buggy source:
@Override public void process(TaskScheduler ts) throws ShutdownException {
  ts.getTaskSummary(logger);
  sem.release();
}

Fixed version (ground truth):
@Override public void process(TaskScheduler ts) throws ShutdownException {
  ts.getTaskSummary(this.logger);
  this.sem.release();
}
Program: 70286
Project: 70286
Buggy source:
private void sendFile(Connection c,String path,Data d){
  if (path.startsWith(File.separator)) {
    File f=new File(path);
    if (f.exists()) {
      if (DEBUG) {
        LOGGER.debug(DBG_PREFIX + "String_Node_Str" + c.hashCode()+ "String_Node_Str"+ path+ "String_Node_Str"+ d.getName());
      }
      c.sendDataFile(path);
    }
 else {
      ErrorManager.warn("String_Node_Str" + path + "String_Node_Str"+ c.hashCode()+ "String_Node_Str");
      handleDataToSendNotAvailable(c,d);
    }
  }
 else {
    sendObject(c,path,d);
  }
}

Fixed version (ground truth):
private void sendFile(Connection c,String path,Data d){
  if (path.startsWith(File.separator)) {
    File f=new File(path);
    if (f.exists()) {
      if (DEBUG) {
        LOGGER.debug(DBG_PREFIX + "String_Node_Str" + c.hashCode()+ "String_Node_Str"+ path+ "String_Node_Str"+ d.getName());
      }
      c.sendDataFile(path);
    }
 else {
      if (!f.getName().equals(d.getName())) {
        File renamed;
        if (isMaster()) {
          renamed=new File(Comm.getAppHost().getCompleteRemotePath(DataType.FILE_T,d.getName()).getPath());
        }
 else {
          renamed=new File(f.getParentFile().getAbsolutePath() + File.separator + d.getName());
        }
        if (renamed.exists()) {
          if (DEBUG) {
            LOGGER.debug(DBG_PREFIX + "String_Node_Str" + c.hashCode()+ "String_Node_Str"+ renamed.getAbsolutePath()+ "String_Node_Str"+ d.getName());
          }
          c.sendDataFile(renamed.getAbsolutePath());
        }
 else {
          ErrorManager.warn("String_Node_Str" + path + "String_Node_Str"+ renamed.getAbsolutePath()+ "String_Node_Str"+ c.hashCode()+ "String_Node_Str");
          handleDataToSendNotAvailable(c,d);
        }
      }
 else {
        ErrorManager.warn("String_Node_Str" + path + "String_Node_Str"+ c.hashCode()+ "String_Node_Str");
        handleDataToSendNotAvailable(c,d);
      }
    }
  }
 else {
    if (DEBUG) {
      LOGGER.debug(DBG_PREFIX + "String_Node_Str" + c.hashCode()+ "String_Node_Str"+ d.getName());
    }
    sendObject(c,path,d);
  }
}
Program: 70287
Project: 70287
Buggy source:
/** 
 * Marks a location for deletion
 * @param loc
 */
public void markForDeletion(DataLocation loc){
  if (!requestQueue.offer(new DeleteFileRequest(loc))) {
    ErrorManager.error(ERROR_QUEUE_OFFER + "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Marks a location for deletion
 * @param loc
 */
public void markForDeletion(DataLocation loc){
  LOGGER.debug("String_Node_Str" + loc + "String_Node_Str");
  Semaphore sem=new Semaphore(0);
  if (!requestQueue.offer(new DeleteFileRequest(loc,sem))) {
    ErrorManager.error(ERROR_QUEUE_OFFER + "String_Node_Str");
  }
  sem.acquireUninterruptibly();
  LOGGER.debug("String_Node_Str" + loc + "String_Node_Str");
}
Program: 70288
Project: 70288
Buggy source:
/** 
 * Tries to schedule the current action
 * @throws InvalidSchedulingException
 */
public final void tryToLaunch() throws InvalidSchedulingException {
  lock.lock();
  if (selectedResource != null && state == State.RUNNABLE && !hasDataPredecessors() && schedulingInfo.isExecutable()) {
    if (selectedResource.isRemoved() || (isSchedulingConstrained() && unrequiredResource() || isTargetResourceEnforced() && selectedResource != schedulingInfo.getEnforcedTargetResource())) {
      lock.unlock();
      throw new InvalidSchedulingException();
    }
    execute();
  }
 else {
    lock.unlock();
  }
}

Fixed version (ground truth):
/** 
 * Tries to schedule the current action
 * @throws InvalidSchedulingException
 */
public final void tryToLaunch() throws InvalidSchedulingException {
  lock.lock();
  if (selectedResource != null && state == State.RUNNABLE && !hasDataPredecessors() && schedulingInfo.isExecutable()) {
    if ((selectedResource.isRemoved() && !isToStopResource()) || (isSchedulingConstrained() && unrequiredResource() || isTargetResourceEnforced() && selectedResource != schedulingInfo.getEnforcedTargetResource())) {
      lock.unlock();
      throw new InvalidSchedulingException();
    }
    execute();
  }
 else {
    lock.unlock();
  }
}
Program: 70289
Project: 70289
Buggy source:
public boolean isTaskFile(String fileName){
  if (fileName == null) {
    File f=new File(fileName);
    if (taskFiles.contains(f.getAbsolutePath())) {
      return true;
    }
 else {
      return false;
    }
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public boolean isTaskFile(String fileName){
  if (fileName != null) {
    File f=new File(fileName);
    if (taskFiles.contains(f.getAbsolutePath())) {
      return true;
    }
 else {
      return false;
    }
  }
 else {
    return false;
  }
}
Program: 70290
Project: 70290
Buggy source:
public FileInputStream newFileInputStream(FileDescriptor fd){
  StreamList list=obtainList(fd);
  FileInputStream fis=new FileInputStream(fd);
  if (list != null)   list.addStream(fis);
  return fis;
}

Fixed version (ground truth):
public FileInputStream newFileInputStream(FileDescriptor fd){
  StreamList list=obtainList(fd);
  FileInputStream fis=new FileInputStream(fd);
  if (list != null) {
    list.addStream(fis);
  }
  return fis;
}
Program: 70291
Project: 70291
Buggy source:
public boolean isTaskFile(String fileName){
  File f=new File(fileName);
  if (taskFiles.contains(f.getAbsolutePath())) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public boolean isTaskFile(String fileName){
  if (fileName == null) {
    File f=new File(fileName);
    if (taskFiles.contains(f.getAbsolutePath())) {
      return true;
    }
 else {
      return false;
    }
  }
 else {
    return false;
  }
}
Program: 70292
Project: 70292
Buggy source:
/** 
 * Executes a given command @cmd with the stream redirections @streamValues
 * @param cmd
 * @param streamValues
 * @return
 * @throws InvokeExecutionException
 */
public static Object executeCMD(String[] cmd,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();
    process.getOutputStream().close();
    logBinaryExecution(process,exitValue,fileOutPath,fileErrPath);
    exitValue=process.waitFor();
  }
 catch (  Exception e) {
    throw new InvokeExecutionException(ERROR_PROC_EXEC,e);
  }
  return exitValue;
}

Fixed version (ground truth):
/** 
 * Executes a given command @cmd with the stream redirections @streamValues
 * @param cmd
 * @param streamValues
 * @return
 * @throws InvokeExecutionException
 */
public static Object executeCMD(String[] cmd,StreamSTD streamValues,File taskSandboxWorkingDir,PrintStream defaultOutStream,PrintStream defaultErrStream) 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();
    process.getOutputStream().close();
    logBinaryExecution(process,fileOutPath,fileErrPath,defaultOutStream,defaultErrStream);
    exitValue=process.waitFor();
    System.out.println("String_Node_Str");
    System.out.println("String_Node_Str" + exitValue);
    System.out.println("String_Node_Str");
  }
 catch (  Exception e) {
    System.err.println(ERROR_PROC_EXEC);
    e.printStackTrace();
    throw new InvokeExecutionException(ERROR_PROC_EXEC,e);
  }
  return exitValue;
}
Program: 70293
Project: 70293
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) {
    StreamGobbler outputGobbler=new StreamGobbler(process.getInputStream(),System.out,LogManager.getLogger(Loggers.WORKER));
    outputGobbler.start();
  }
  System.out.println("String_Node_Str");
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  if (process != null) {
    StreamGobbler errorGobbler=new StreamGobbler(process.getErrorStream(),System.err,LogManager.getLogger(Loggers.WORKER));
    errorGobbler.start();
  }
  System.err.println("String_Node_Str");
}

Fixed version (ground truth):
private static void logBinaryExecution(Process process,String fileOutPath,String fileErrPath,PrintStream defaultOutStream,PrintStream defaultErrStream) throws InvokeExecutionException {
  StreamGobbler errorGobbler=null;
  StreamGobbler outputGobbler=null;
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  if (process != null) {
    if (fileOutPath == null) {
      outputGobbler=new StreamGobbler(process.getInputStream(),defaultOutStream,LogManager.getLogger(Loggers.WORKER));
      outputGobbler.start();
    }
 else {
      try (FileInputStream outputStream=new FileInputStream(fileOutPath)){
        outputGobbler=new StreamGobbler(outputStream,defaultOutStream,LogManager.getLogger(Loggers.WORKER));
        outputGobbler.start();
      }
 catch (      IOException ioe) {
        System.err.println(ERROR_OUTPUTREADER);
        ioe.printStackTrace();
        throw new InvokeExecutionException(ERROR_OUTPUTREADER,ioe);
      }
    }
  }
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str");
  if (process != null) {
    if (fileErrPath == null) {
      errorGobbler=new StreamGobbler(process.getErrorStream(),defaultErrStream,LogManager.getLogger(Loggers.WORKER));
      errorGobbler.start();
    }
 else {
      try (FileInputStream errStream=new FileInputStream(fileErrPath)){
        errorGobbler=new StreamGobbler(errStream,defaultErrStream,LogManager.getLogger(Loggers.WORKER));
        errorGobbler.start();
      }
 catch (      IOException ioe) {
        throw new InvokeExecutionException(ERROR_OUTPUTREADER,ioe);
      }
    }
  }
  if (outputGobbler != null) {
    try {
      outputGobbler.join();
    }
 catch (    InterruptedException e) {
      System.err.println("String_Node_Str");
      e.printStackTrace();
    }
  }
  System.out.println("String_Node_Str");
  if (errorGobbler != null) {
    try {
      errorGobbler.join();
    }
 catch (    InterruptedException e) {
      System.err.println("String_Node_Str");
      e.printStackTrace();
    }
  }
  System.err.println("String_Node_Str");
}
Program: 70297
Project: 70297
Buggy source:
/** 
 * Invokes a binary method
 * @param binary
 * @param values
 * @param streams
 * @param prefixes
 * @param taskSandboxWorkingDir
 * @return
 * @throws InvokeExecutionException
 */
public static Object invokeBinaryMethod(String binary,Object[] values,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,streamValues,taskSandboxWorkingDir);
}

Fixed version (ground truth):
/** 
 * Invokes a binary method
 * @param binary
 * @param values
 * @param streams
 * @param prefixes
 * @param taskSandboxWorkingDir
 * @return
 * @throws InvokeExecutionException
 */
public static Object invokeBinaryMethod(String binary,Object[] values,Stream[] streams,String[] prefixes,File taskSandboxWorkingDir,PrintStream defaultOutStream,PrintStream defaultErrStream) 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,streamValues,taskSandboxWorkingDir,defaultOutStream,defaultErrStream);
}
Program: 70298
Project: 70298
Buggy source:
public static Object invokeMPIMethod(String mpiRunner,String mpiBinary,Object target,Object[] values,Stream[] streams,String[] prefixes,File taskSandboxWorkingDir){
  Object retValue=null;
  try {
    retValue=GenericInvoker.invokeMPIMethod(mpiRunner,mpiBinary,values,streams,prefixes,taskSandboxWorkingDir);
  }
 catch (  InvokeExecutionException iee) {
    ErrorManager.error(ERROR_INVOKE,iee);
  }
  return retValue;
}

Fixed version (ground truth):
public static Object invokeMPIMethod(String mpiRunner,String mpiBinary,Object target,Object[] values,Stream[] streams,String[] prefixes,File taskSandboxWorkingDir){
  Object retValue=null;
  try {
    retValue=GenericInvoker.invokeMPIMethod(mpiRunner,mpiBinary,values,streams,prefixes,taskSandboxWorkingDir,System.out,System.err);
  }
 catch (  InvokeExecutionException iee) {
    ErrorManager.error(ERROR_INVOKE,iee);
  }
  return retValue;
}
Program: 70299
Project: 70299
Buggy source:
public static Object invokeDecafMethod(String dfRunner,String dfScript,String dfExecutor,String dfLib,String mpiRunner,Object target,Object[] values,Stream[] streams,String[] prefixes,File taskSandboxWorkingDir){
  Object retValue=null;
  try {
    retValue=GenericInvoker.invokeDecafMethod(dfRunner,dfScript,dfExecutor,dfLib,mpiRunner,values,streams,prefixes,taskSandboxWorkingDir);
  }
 catch (  InvokeExecutionException iee) {
    ErrorManager.error(ERROR_INVOKE,iee);
  }
  return retValue;
}

Fixed version (ground truth):
public static Object invokeDecafMethod(String dfRunner,String dfScript,String dfExecutor,String dfLib,String mpiRunner,Object target,Object[] values,Stream[] streams,String[] prefixes,File taskSandboxWorkingDir){
  Object retValue=null;
  try {
    retValue=GenericInvoker.invokeDecafMethod(dfRunner,dfScript,dfExecutor,dfLib,mpiRunner,values,streams,prefixes,taskSandboxWorkingDir,System.out,System.err);
  }
 catch (  InvokeExecutionException iee) {
    ErrorManager.error(ERROR_INVOKE,iee);
  }
  return retValue;
}
Program: 70300
Project: 70300
Buggy source:
public static Object invokeOmpSsMethod(String ompssBinary,Object target,Object[] values,Stream[] streams,String[] prefixes,File taskSandboxWorkingDir){
  Object retValue=null;
  try {
    retValue=GenericInvoker.invokeOmpSsMethod(ompssBinary,values,streams,prefixes,taskSandboxWorkingDir);
  }
 catch (  InvokeExecutionException iee) {
    ErrorManager.error(ERROR_INVOKE,iee);
  }
  return retValue;
}

Fixed version (ground truth):
public static Object invokeOmpSsMethod(String ompssBinary,Object target,Object[] values,Stream[] streams,String[] prefixes,File taskSandboxWorkingDir){
  Object retValue=null;
  try {
    retValue=GenericInvoker.invokeOmpSsMethod(ompssBinary,values,streams,prefixes,taskSandboxWorkingDir,System.out,System.err);
  }
 catch (  InvokeExecutionException iee) {
    ErrorManager.error(ERROR_INVOKE,iee);
  }
  return retValue;
}
Program: 70301
Project: 70301
Buggy source:
public static Object invokeBinaryMethod(String binary,Object target,Object[] values,Stream[] streams,String[] prefixes,File taskSandboxWorkingDir){
  Object retValue=null;
  try {
    retValue=GenericInvoker.invokeBinaryMethod(binary,values,streams,prefixes,taskSandboxWorkingDir);
  }
 catch (  InvokeExecutionException iee) {
    ErrorManager.error(ERROR_INVOKE,iee);
  }
  return retValue;
}

Fixed version (ground truth):
public static Object invokeBinaryMethod(String binary,Object target,Object[] values,Stream[] streams,String[] prefixes,File taskSandboxWorkingDir){
  Object retValue=null;
  try {
    retValue=GenericInvoker.invokeBinaryMethod(binary,values,streams,prefixes,taskSandboxWorkingDir,System.out,System.err);
  }
 catch (  InvokeExecutionException iee) {
    ErrorManager.error(ERROR_INVOKE,iee);
  }
  return retValue;
}
Program: 70302
Project: 70302
Buggy source:
@Override public Object invokeMethod() throws JobExecutionException {
  LOGGER.info("String_Node_Str" + this.binary + "String_Node_Str"+ this.nw.getHostName());
  try {
    return GenericInvoker.invokeBinaryMethod(this.binary,this.values,this.streams,this.prefixes,this.taskSandboxWorkingDir);
  }
 catch (  InvokeExecutionException iee) {
    throw new JobExecutionException(iee);
  }
}

Fixed version (ground truth):
@Override public Object invokeMethod() throws JobExecutionException {
  LOGGER.info("String_Node_Str" + this.binary + "String_Node_Str"+ this.nw.getHostName());
  try {
    return GenericInvoker.invokeBinaryMethod(this.binary,this.values,this.streams,this.prefixes,this.taskSandboxWorkingDir,nw.getThreadOutStream(),nw.getThreadErrStream());
  }
 catch (  InvokeExecutionException iee) {
    LOGGER.error("String_Node_Str",iee);
    throw new JobExecutionException(iee);
  }
}
Program: 70303
Project: 70303
Buggy source:
private Object invokeDecafMethod() throws JobExecutionException {
  LOGGER.info("String_Node_Str" + this.dfScript + "String_Node_Str"+ this.nw.getHostName());
  try {
    return GenericInvoker.invokeDecafMethod(nw.getInstallDir() + DecafImplementation.SCRIPT_PATH,this.dfScript,this.dfExecutor,this.dfLib,this.mpiRunner,this.values,this.streams,this.prefixes,this.taskSandboxWorkingDir);
  }
 catch (  InvokeExecutionException iee) {
    throw new JobExecutionException(iee);
  }
}

Fixed version (ground truth):
private Object invokeDecafMethod() throws JobExecutionException {
  LOGGER.info("String_Node_Str" + this.dfScript + "String_Node_Str"+ this.nw.getHostName());
  try {
    return GenericInvoker.invokeDecafMethod(nw.getInstallDir() + DecafImplementation.SCRIPT_PATH,this.dfScript,this.dfExecutor,this.dfLib,this.mpiRunner,this.values,this.streams,this.prefixes,this.taskSandboxWorkingDir,nw.getThreadOutStream(),nw.getThreadErrStream());
  }
 catch (  InvokeExecutionException iee) {
    throw new JobExecutionException(iee);
  }
}
Program: 70304
Project: 70304
Buggy source:
private Object invokeMPIMethod() throws JobExecutionException {
  LOGGER.info("String_Node_Str" + this.mpiBinary + "String_Node_Str"+ this.nw.getHostName());
  try {
    return GenericInvoker.invokeMPIMethod(this.mpiRunner,this.mpiBinary,this.values,this.streams,this.prefixes,this.taskSandboxWorkingDir);
  }
 catch (  InvokeExecutionException iee) {
    throw new JobExecutionException(iee);
  }
}

Fixed version (ground truth):
private Object invokeMPIMethod() throws JobExecutionException {
  LOGGER.info("String_Node_Str" + this.mpiBinary + "String_Node_Str"+ this.nw.getHostName());
  try {
    return GenericInvoker.invokeMPIMethod(this.mpiRunner,this.mpiBinary,this.values,this.streams,this.prefixes,this.taskSandboxWorkingDir,nw.getThreadOutStream(),nw.getThreadErrStream());
  }
 catch (  InvokeExecutionException iee) {
    throw new JobExecutionException(iee);
  }
}
Program: 70305
Project: 70305
Buggy source:
@Override public Object invokeMethod() throws JobExecutionException {
  LOGGER.info("String_Node_Str" + ompssBinary + "String_Node_Str"+ nw.getHostName());
  try {
    return GenericInvoker.invokeOmpSsMethod(this.ompssBinary,this.values,this.streams,this.prefixes,this.taskSandboxWorkingDir);
  }
 catch (  InvokeExecutionException iee) {
    throw new JobExecutionException(iee);
  }
}

Fixed version (ground truth):
@Override public Object invokeMethod() throws JobExecutionException {
  LOGGER.info("String_Node_Str" + ompssBinary + "String_Node_Str"+ nw.getHostName());
  try {
    return GenericInvoker.invokeOmpSsMethod(this.ompssBinary,this.values,this.streams,this.prefixes,this.taskSandboxWorkingDir,nw.getThreadOutStream(),nw.getThreadErrStream());
  }
 catch (  InvokeExecutionException iee) {
    throw new JobExecutionException(iee);
  }
}
Program: 70306
Project: 70306
Buggy source:
public void unregisterThread(){
  try {
    close();
    threadToStream.remove(Thread.currentThread().getId());
  }
 catch (  Exception e) {
    e.printStackTrace(System.err);
  }
}

Fixed version (ground truth):
public void unregisterThread(){
  try {
    flush();
    close();
    threadToStream.remove(Thread.currentThread().getId());
  }
 catch (  Exception e) {
    e.printStackTrace(System.err);
  }
}