nus-yam/ex-repair huggingface dataset:
Program: 70196
Project: 70196
Buggy source:
@Override public void deleteTemporary(){
}

Fixed version (ground truth):
@Override public void deleteTemporary(){
  LinkedList<URI> traceScripts=new LinkedList<URI>();
  LinkedList<String> traceParams=new LinkedList<String>();
  String host=getHost();
  String installDir=getInstallDir();
  String workingDir=getWorkingDir();
  String user=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+ GAT_SCRIPT_PATH+ CLEANER_SCRIPT_NAME));
  }
 catch (  URISyntaxException e) {
    logger.error("String_Node_Str" + workingDir + "String_Node_Str"+ getName(),e);
    return;
  }
  String pars=workingDir;
  traceParams.add(pars);
  logger.debug("String_Node_Str" + workingDir + "String_Node_Str"+ getName());
  boolean result=new GATScriptExecutor(this).executeScript(traceScripts,traceParams,"String_Node_Str" + host);
  if (!result) {
    logger.error("String_Node_Str" + workingDir + "String_Node_Str"+ getName());
  }
}
Program: 70197
Project: 70197
Buggy source:
@Override public void updateTaskCount(int processorCoreCount){
  if (GATTracer.isActivated()) {
    System.err.println("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void updateTaskCount(int processorCoreCount){
  if (GATTracer.isActivated()) {
    logger.error("String_Node_Str");
  }
}
Program: 70198
Project: 70198
Buggy source:
@Override public void start() throws Exception {
  if (GATTracer.isActivated()) {
    logger.debug("String_Node_Str" + this.getName());
    tracingJob=GATTracer.startTracing(this);
    waitForTracingReady();
  }
}

Fixed version (ground truth):
@Override public void start() throws Exception {
  initWorkingDir();
  if (GATTracer.isActivated()) {
    logger.debug("String_Node_Str" + this.getName());
    tracingJob=GATTracer.startTracing(this);
    waitForTracingReady();
  }
}
Program: 70199
Project: 70199
Buggy source:
public String getWorkingDir(){
  return this.config.getWorkingDir();
}

Fixed version (ground truth):
public String getWorkingDir(){
  return this.config.getSandboxWorkingDir();
}
Program: 70200
Project: 70200
Buggy source:
@Override public void stop(ShutdownListener sl){
  try {
    File workingDirRoot=new File(this.config.getWorkingDir());
    for (    File c : workingDirRoot.listFiles()) {
      delete(c);
    }
  }
 catch (  FileNotFoundException e) {
    logger.warn("String_Node_Str" + e);
  }
  sl.notifyEnd();
}

Fixed version (ground truth):
@Override public void stop(ShutdownListener sl){
  try {
    String workingDir=this.config.getWorkingDir();
    if (workingDir != null || !workingDir.isEmpty()) {
      File workingDirRoot=new File(workingDir);
      if (workingDirRoot != null) {
        File[] filesInFolder=workingDirRoot.listFiles();
        if (filesInFolder != null) {
          for (          File c : filesInFolder) {
            delete(c);
          }
        }
      }
    }
  }
 catch (  FileNotFoundException e) {
    logger.warn("String_Node_Str" + e);
  }
  sl.notifyEnd();
}
Program: 70202
Project: 70202
Buggy source:
public void generateWorkersDebugInfo(){
}

Fixed version (ground truth):
public boolean generateWorkersDebugInfo(){
  return false;
}
Program: 70203
Project: 70203
Buggy source:
public void generatePackage(){
}

Fixed version (ground truth):
public boolean generatePackage(){
  return false;
}
Program: 70204
Project: 70204
Buggy source:
public abstract void generateWorkersDebugInfo();

Fixed version (ground truth):
public abstract boolean generateWorkersDebugInfo();
Program: 70205
Project: 70205
Buggy source:
public abstract void generatePackage();

Fixed version (ground truth):
public abstract boolean generatePackage();
Program: 70207
Project: 70207
Buggy source:
public void executeScript(List<URI> cleanScripts,List<String> cleanParams){
}

Fixed version (ground truth):
public boolean executeScript(List<URI> cleanScripts,List<String> cleanParams){
}
Program: 70208
Project: 70208
Buggy source:
public static void 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);
  }
  String pars="String_Node_Str" + workingDir + "String_Node_Str"+ host;
  traceParams.add(pars);
  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 CleanerExecutor(node).executeScript(traceScripts,traceParams);
}
Program: 70209
Project: 70209
Buggy source:
@Override public void generateWorkersDebugInfo(){
  logger.info("String_Node_Str");
}

Fixed version (ground truth):
@Override public boolean generateWorkersDebugInfo(){
  logger.info("String_Node_Str");
  return false;
}
Program: 70210
Project: 70210
Buggy source:
@Override public void generatePackage(){
  logger.debug("String_Node_Str");
  GATTracer.generatePackage(this);
}

Fixed version (ground truth):
@Override public boolean generatePackage(){
  logger.debug("String_Node_Str");
  GATTracer.generatePackage(this);
  return true;
}
Program: 70211
Project: 70211
Buggy source:
@Override public void stop(){
  logger.debug("String_Node_Str");
  HashSet<NIOWorkerNode> workers=new HashSet<NIOWorkerNode>();
  workers.addAll(nodes);
  Semaphore sem=new Semaphore(0);
  ShutdownListener sl=new ShutdownListener(sem);
  for (  NIOWorkerNode worker : workers) {
    logger.debug("String_Node_Str" + worker.getName());
    worker.stop(sl);
  }
  logger.debug("String_Node_Str");
  sl.enable();
  try {
    sem.acquire();
  }
 catch (  Exception e) {
    logger.error("String_Node_Str");
  }
  logger.debug("String_Node_Str");
  logger.debug("String_Node_Str");
  tm.shutdown(null);
  logger.debug("String_Node_Str");
}

Fixed version (ground truth):
@Override public void stop(){
  logger.debug("String_Node_Str");
  HashSet<NIOWorkerNode> workers=new HashSet<NIOWorkerNode>();
  workers.addAll(nodes);
  Semaphore sem=new Semaphore(0);
  ShutdownListener sl=new ShutdownListener(sem);
  for (  NIOWorkerNode worker : workers) {
    logger.debug("String_Node_Str" + worker.getName());
    sl.addOperation();
    worker.stop(sl);
  }
  logger.debug("String_Node_Str");
  sl.enable();
  try {
    sem.acquire();
  }
 catch (  Exception e) {
    logger.error("String_Node_Str");
  }
  logger.debug("String_Node_Str");
  logger.debug("String_Node_Str");
  tm.shutdown(null);
  logger.debug("String_Node_Str");
}
Program: 70212
Project: 70212
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();
  c.sendCommand(cmd);
  c.receive();
  c.finishConnection();
  commManager.waitUntilWorkersDebugInfoGenerated();
  logger.debug("String_Node_Str");
}

Fixed version (ground truth):
@Override public boolean generateWorkersDebugInfo(){
  if (started) {
    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();
    c.sendCommand(cmd);
    c.receive();
    c.finishConnection();
    commManager.waitUntilWorkersDebugInfoGenerated();
    logger.debug("String_Node_Str");
    return true;
  }
 else {
    logger.debug("String_Node_Str");
    return false;
  }
}
Program: 70213
Project: 70213
Buggy source:
@Override public void generatePackage(){
  logger.debug("String_Node_Str" + this.getHost());
  if (node == null) {
    logger.error("String_Node_Str");
  }
  Connection c=NIOAgent.tm.startConnection(node);
  CommandGeneratePackage cmd=new CommandGeneratePackage();
  c.sendCommand(cmd);
  c.receive();
  c.finishConnection();
  commManager.waitUntilTracingPackageGenerated();
  logger.debug("String_Node_Str");
}

Fixed version (ground truth):
@Override public boolean generatePackage(){
  if (started) {
    logger.debug("String_Node_Str" + this.getHost());
    if (node == null) {
      logger.error("String_Node_Str" + this.getHost() + "String_Node_Str");
      return false;
    }
 else {
      Connection c=NIOAgent.tm.startConnection(node);
      CommandGeneratePackage cmd=new CommandGeneratePackage();
      c.sendCommand(cmd);
      c.receive();
      c.finishConnection();
      commManager.waitUntilTracingPackageGenerated();
      logger.debug("String_Node_Str");
      return true;
    }
  }
 else {
    logger.debug("String_Node_Str" + this.getHost() + "String_Node_Str");
    return false;
  }
}
Program: 70214
Project: 70214
Buggy source:
@Override public void start() throws Exception {
  NIONode n=null;
  try {
    n=new WorkerStarter(this).startWorker();
  }
 catch (  Exception e) {
    ErrorManager.warn("String_Node_Str" + getName() + "String_Node_Str",e);
    throw e;
  }
  this.node=n;
  if (NIOTracer.isActivated()) {
    logger.debug("String_Node_Str" + this.getName());
    NIOTracer.startTracing(this.getName(),this.getUser(),this.getHost(),this.getLimitOfTasks());
  }
}

Fixed version (ground truth):
@Override public void start() throws Exception {
  NIONode n=null;
  try {
    workerStarter=new WorkerStarter(this);
    n=workerStarter.startWorker();
  }
 catch (  Exception e) {
    ErrorManager.warn("String_Node_Str" + getName() + "String_Node_Str",e);
    throw e;
  }
  this.node=n;
  if (NIOTracer.isActivated()) {
    logger.debug("String_Node_Str" + this.getName());
    NIOTracer.startTracing(this.getName(),this.getUser(),this.getHost(),this.getLimitOfTasks());
  }
}
Program: 70215
Project: 70215
Buggy source:
@Override public void stop(ShutdownListener sl){
  logger.debug("String_Node_Str" + this.getName());
  if (node == null) {
    sl.notifyFailure(new UnstartedNodeException());
    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){
  if (started) {
    logger.debug("String_Node_Str" + this.getName());
    if (node == null) {
      sl.notifyFailure(new UnstartedNodeException());
      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();
  }
 else {
    logger.debug("String_Node_Str" + this.getName() + "String_Node_Str");
    workerStarter.setToStop();
    sl.notifyEnd();
  }
}
Program: 70217
Project: 70217
Buggy source:
@Override public void generateWorkersDebugInfo(){
}

Fixed version (ground truth):
@Override public boolean generateWorkersDebugInfo(){
  return false;
}
Program: 70218
Project: 70218
Buggy source:
@Override public void generatePackage(){
}

Fixed version (ground truth):
@Override public boolean generatePackage(){
  return false;
}
Program: 70219
Project: 70219
Buggy source:
public LogicalData transferObjectValue(TransferObjectRequest toRequest){
  Semaphore sem=toRequest.getSemaphore();
  DataAccessId daId=toRequest.getDaId();
  RWAccessId rwaId=(RWAccessId)daId;
  String sourceName=rwaId.getReadDataInstance().getRenaming();
  LogicalData ld=Comm.getData(sourceName);
  if (ld == null) {
    ErrorManager.error("String_Node_Str" + sourceName);
  }
  if (ld.isInMemory()) {
    if (!ld.isOnStorage()) {
      try {
        ld.writeToStorage();
        ld.removeValue();
      }
 catch (      Exception e) {
        ErrorManager.error("String_Node_Str",e);
      }
    }
 else {
      Comm.clearValue(sourceName);
    }
    toRequest.setResponse(ld.getValue());
    toRequest.getSemaphore().release();
  }
 else {
    DataLocation targetLocation=null;
    String path=DataLocation.Protocol.FILE_URI.getSchema() + Comm.appHost.getTempDirPath() + sourceName;
    try {
      SimpleURI uri=new SimpleURI(path);
      targetLocation=DataLocation.createLocation(Comm.appHost,uri);
    }
 catch (    Exception e) {
      ErrorManager.error(DataLocation.ERROR_INVALID_LOCATION + "String_Node_Str" + path,e);
    }
    Comm.appHost.getData(sourceName,targetLocation,new ObjectTransferable(),new OneOpWithSemListener(sem));
  }
  return ld;
}

Fixed version (ground truth):
public LogicalData transferObjectValue(TransferObjectRequest toRequest){
  Semaphore sem=toRequest.getSemaphore();
  DataAccessId daId=toRequest.getDaId();
  RWAccessId rwaId=(RWAccessId)daId;
  String sourceName=rwaId.getReadDataInstance().getRenaming();
  LogicalData ld=Comm.getData(sourceName);
  if (ld == null) {
    ErrorManager.error("String_Node_Str" + sourceName);
  }
  if (ld.isInMemory()) {
    if (!ld.isOnStorage()) {
      try {
        ld.writeToStorage();
        ld.removeValue();
      }
 catch (      Exception e) {
        ErrorManager.error("String_Node_Str",e);
      }
    }
 else {
      Comm.clearValue(sourceName);
    }
    toRequest.setResponse(ld.getValue());
    toRequest.setTargetData(ld);
    toRequest.getSemaphore().release();
  }
 else {
    DataLocation targetLocation=null;
    String path=DataLocation.Protocol.FILE_URI.getSchema() + Comm.appHost.getTempDirPath() + sourceName;
    try {
      SimpleURI uri=new SimpleURI(path);
      targetLocation=DataLocation.createLocation(Comm.appHost,uri);
    }
 catch (    Exception e) {
      ErrorManager.error(DataLocation.ERROR_INVALID_LOCATION + "String_Node_Str" + path,e);
    }
    Comm.appHost.getData(sourceName,targetLocation,new ObjectTransferable(),new OneOpWithSemListener(sem));
  }
  return ld;
}
Program: 70220
Project: 70220
Buggy source:
@Override public Job<?> newJob(int taskId,TaskParams taskParams,Implementation<?> impl,Resource res,Job.JobListener listener){
  return null;
}

Fixed version (ground truth):
@Override public Job<?> newJob(int taskId,TaskDescription taskParams,Implementation<?> impl,Resource res,Job.JobListener listener){
  return null;
}
Program: 70221
Project: 70221
Buggy source:
public abstract Job<?> newJob(int taskId,TaskParams taskparams,Implementation<?> impl,Resource res,JobListener listener);

Fixed version (ground truth):
public abstract Job<?> newJob(int taskId,TaskDescription taskparams,Implementation<?> impl,Resource res,JobListener listener);
Program: 70222
Project: 70222
Buggy source:
public TaskParams getTaskParams(){
  return taskParams;
}

Fixed version (ground truth):
public TaskDescription getTaskParams(){
  return taskParams;
}
Program: 70223
Project: 70223
Buggy source:
public Job(int taskId,TaskParams task,Implementation<?> impl,Resource res,JobListener listener){
  jobId=nextJobId++;
  this.taskId=taskId;
  this.history=JobHistory.NEW;
  this.taskParams=task;
  this.impl=impl;
  this.worker=res;
  this.listener=listener;
  classpathFromFile=getResourceNode().getClasspath();
  if (!classpathFromFile.equals("String_Node_Str")) {
    if (!classpathFromEnvironment.equals("String_Node_Str")) {
      workerClasspath=classpathFromEnvironment + "String_Node_Str" + classpathFromFile;
    }
 else {
      workerClasspath=classpathFromFile;
    }
  }
 else {
    workerClasspath=classpathFromEnvironment;
  }
  pythonpathFromFile=getResourceNode().getPythonpath();
  if (!pythonpathFromFile.equals("String_Node_Str")) {
    if (!pythonpathFromEnvironment.equals("String_Node_Str")) {
      workerPythonpath=pythonpathFromEnvironment + "String_Node_Str" + pythonpathFromFile;
    }
 else {
      workerPythonpath=pythonpathFromFile;
    }
  }
 else {
    workerPythonpath=pythonpathFromEnvironment;
  }
}

Fixed version (ground truth):
public Job(int taskId,TaskDescription task,Implementation<?> impl,Resource res,JobListener listener){
  jobId=nextJobId++;
  this.taskId=taskId;
  this.history=JobHistory.NEW;
  this.taskParams=task;
  this.impl=impl;
  this.worker=res;
  this.listener=listener;
  classpathFromFile=getResourceNode().getClasspath();
  if (!classpathFromFile.equals("String_Node_Str")) {
    if (!classpathFromEnvironment.equals("String_Node_Str")) {
      workerClasspath=classpathFromEnvironment + "String_Node_Str" + classpathFromFile;
    }
 else {
      workerClasspath=classpathFromFile;
    }
  }
 else {
    workerClasspath=classpathFromEnvironment;
  }
  pythonpathFromFile=getResourceNode().getPythonpath();
  if (!pythonpathFromFile.equals("String_Node_Str")) {
    if (!pythonpathFromEnvironment.equals("String_Node_Str")) {
      workerPythonpath=pythonpathFromEnvironment + "String_Node_Str" + pythonpathFromFile;
    }
 else {
      workerPythonpath=pythonpathFromFile;
    }
  }
 else {
    workerPythonpath=pythonpathFromEnvironment;
  }
}
Program: 70224
Project: 70224
Buggy source:
public Job<?> newJob(int taskId,TaskParams taskParams,Implementation<?> impl,JobListener listener){
  return node.newJob(taskId,taskParams,impl,this,listener);
}

Fixed version (ground truth):
public Job<?> newJob(int taskId,TaskDescription taskParams,Implementation<?> impl,JobListener listener){
  return node.newJob(taskId,taskParams,impl,this,listener);
}
Program: 70225
Project: 70225
Buggy source:
public GATJob(int taskId,TaskParams taskParams,Implementation<?> impl,Resource res,JobListener listener,GATContext context,boolean userNeeded,boolean usingGlobus){
  super(taskId,taskParams,impl,res,listener);
  this.context=context;
  this.userNeeded=userNeeded;
  this.usingGlobus=usingGlobus;
}

Fixed version (ground truth):
public GATJob(int taskId,TaskDescription taskParams,Implementation<?> impl,Resource res,JobListener listener,GATContext context,boolean userNeeded,boolean usingGlobus){
  super(taskId,taskParams,impl,res,listener);
  this.context=context;
  this.userNeeded=userNeeded;
  this.usingGlobus=usingGlobus;
}
Program: 70227
Project: 70227
Buggy source:
@Override public Job<?> newJob(int taskId,TaskParams taskParams,Implementation<?> impl,Resource res,JobListener listener){
  return new GATJob(taskId,taskParams,impl,res,listener,config.getContext(),config.isUserNeeded(),config.isUsingGlobus());
}

Fixed version (ground truth):
@Override public Job<?> newJob(int taskId,TaskDescription taskParams,Implementation<?> impl,Resource res,JobListener listener){
  return new GATJob(taskId,taskParams,impl,res,listener,config.getContext(),config.isUserNeeded(),config.isUsingGlobus());
}
Program: 70228
Project: 70228
Buggy source:
@Override public void handle(Connection c){
  if (agent.isMyUuid(this.uuid)) {
    if (agent.getMaster() == null) {
      agent.setMaster((NIONode)c.getNode());
    }
  }
  CommandCheckWorkerACK cmd=new CommandCheckWorkerACK(uuid,nodeName);
  c.sendCommand(cmd);
  c.finishConnection();
}

Fixed version (ground truth):
@Override public void handle(Connection c){
  if (agent.isMyUuid(this.uuid)) {
    if (agent.getMaster() == null) {
      agent.setMaster((NIONode)c.getNode());
    }
    CommandCheckWorkerACK cmd=new CommandCheckWorkerACK(uuid,nodeName);
    c.sendCommand(cmd);
  }
  c.finishConnection();
}
Program: 70229
Project: 70229
Buggy source:
public NIOJob(int taskId,TaskParams taskParams,Implementation<?> impl,Resource res,JobListener listener){
  super(taskId,taskParams,impl,res,listener);
}

Fixed version (ground truth):
public NIOJob(int taskId,TaskDescription taskParams,Implementation<?> impl,Resource res,JobListener listener){
  super(taskId,taskParams,impl,res,listener);
}
Program: 70230
Project: 70230
Buggy source:
@Override public Job<?> newJob(int taskId,TaskParams taskParams,Implementation<?> impl,Resource res,JobListener listener){
  return new NIOJob(taskId,taskParams,impl,res,listener);
}

Fixed version (ground truth):
@Override public Job<?> newJob(int taskId,TaskDescription taskParams,Implementation<?> impl,Resource res,JobListener listener){
  return new NIOJob(taskId,taskParams,impl,res,listener);
}
Program: 70231
Project: 70231
Buggy source:
@Override public Job<?> newJob(int taskId,TaskParams taskParams,Implementation<?> impl,Resource res,JobListener listener){
  return new WSJob<COMPSsWorker>(taskId,taskParams,impl,res,listener);
}

Fixed version (ground truth):
@Override public Job<?> newJob(int taskId,TaskDescription taskParams,Implementation<?> impl,Resource res,JobListener listener){
  return new WSJob<COMPSsWorker>(taskId,taskParams,impl,res,listener);
}
Program: 70232
Project: 70232
Buggy source:
public WSJob(int taskId,TaskParams taskParams,Implementation<?> impl,Resource res,JobListener listener){
  super(taskId,taskParams,impl,res,listener);
  this.returnValue=null;
}

Fixed version (ground truth):
public WSJob(int taskId,TaskDescription taskParams,Implementation<?> impl,Resource res,JobListener listener){
  super(taskId,taskParams,impl,res,listener);
  this.returnValue=null;
}
Program: 70233
Project: 70233
Buggy source:
@Override 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() == DataDirection.IN) {
switch (parameters[i].getType()) {
case OBJECT_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):
@Override public void processRequests(){
  while (true) {
    WSJob<?> job=null;
    job=queue.dequeue();
    if (job == null) {
      break;
    }
    try {
      ArrayList<Object> input=new ArrayList<Object>();
      TaskDescription 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() == DataDirection.IN) {
switch (parameters[i].getType()) {
case OBJECT_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: 70234
Project: 70234
Buggy source:
private Object obtainObject(DataAccessId oaId){
  Semaphore sem=new Semaphore(0);
  TransferObjectRequest tor=new TransferObjectRequest(oaId,sem);
  requestQueue.offer(tor);
  try {
    sem.acquire();
  }
 catch (  InterruptedException e) {
  }
  Object oUpdated=tor.getResponse();
  if (oUpdated == null) {
    LogicalData ld=tor.getLogicalDataTarget();
    try {
      ld.loadFromStorage();
      oUpdated=ld.getValue();
    }
 catch (    Exception e) {
      logger.fatal(ERROR_OBJECT_LOAD_FROM_STORAGE + "String_Node_Str" + ld.getName(),e);
      ErrorManager.fatal(ERROR_OBJECT_LOAD_FROM_STORAGE + "String_Node_Str" + ld.getName(),e);
    }
  }
  return oUpdated;
}

Fixed version (ground truth):
private Object obtainObject(DataAccessId oaId){
  Semaphore sem=new Semaphore(0);
  TransferObjectRequest tor=new TransferObjectRequest(oaId,sem);
  requestQueue.offer(tor);
  try {
    sem.acquire();
  }
 catch (  InterruptedException e) {
  }
  Object oUpdated=tor.getResponse();
  if (oUpdated == null) {
    LogicalData ld=tor.getLogicalDataTarget();
    try {
      ld.loadFromStorage();
      oUpdated=ld.getValue();
    }
 catch (    Exception e) {
      logger.fatal(ERROR_OBJECT_LOAD_FROM_STORAGE + "String_Node_Str" + ((ld == null) ? "String_Node_Str" : ld.getName()),e);
      ErrorManager.fatal(ERROR_OBJECT_LOAD_FROM_STORAGE + "String_Node_Str" + ((ld == null) ? "String_Node_Str" : ld.getName()),e);
    }
  }
  return oUpdated;
}
Program: 70235
Project: 70235
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);
  return logicalData;
}

Fixed version (ground truth):
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: 70237
Project: 70237
Buggy source:
/** 
 * Stops the COMPSsRuntime
 */
@Override public void stopIT(boolean terminate){
synchronized (this) {
    if (Tracer.isActivated()) {
      Tracer.emitEvent(Tracer.Event.STOP.getId(),Tracer.Event.STOP.getType());
    }
    td.getTaskSummary(logger);
    logger.info("String_Node_Str");
    if (GraphGenerator.isEnabled()) {
      logger.debug("String_Node_Str");
    }
    if (RuntimeMonitor.isEnabled()) {
      logger.debug("String_Node_Str");
      runtimeMonitor.shutdown();
    }
    logger.debug("String_Node_Str");
    if (ap != null) {
      ap.shutdown();
    }
 else {
      logger.debug("String_Node_Str");
    }
    logger.debug("String_Node_Str");
    if (td != null) {
      td.shutdown();
    }
 else {
      logger.debug("String_Node_Str");
    }
    logger.debug("String_Node_Str");
    Comm.stop();
    logger.debug("String_Node_Str");
  }
  logger.warn("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Stops the COMPSsRuntime
 */
@Override public void stopIT(boolean terminate){
synchronized (this) {
    if (Tracer.isActivated()) {
      Tracer.emitEvent(Tracer.Event.STOP.getId(),Tracer.Event.STOP.getType());
    }
    boolean taskSummaryEnabled=System.getProperty(ITConstants.IT_TASK_SUMMARY) != null && !System.getProperty(ITConstants.IT_TASK_SUMMARY).isEmpty() && Boolean.valueOf(System.getProperty(ITConstants.IT_TASK_SUMMARY));
    if (taskSummaryEnabled) {
      td.getTaskSummary(logger);
    }
    logger.info("String_Node_Str");
    if (GraphGenerator.isEnabled()) {
      logger.debug("String_Node_Str");
    }
    if (RuntimeMonitor.isEnabled()) {
      logger.debug("String_Node_Str");
      runtimeMonitor.shutdown();
    }
    logger.debug("String_Node_Str");
    if (ap != null) {
      ap.shutdown();
    }
 else {
      logger.debug("String_Node_Str");
    }
    logger.debug("String_Node_Str");
    if (td != null) {
      td.shutdown();
    }
 else {
      logger.debug("String_Node_Str");
    }
    logger.debug("String_Node_Str");
    Comm.stop();
    logger.debug("String_Node_Str");
  }
  logger.warn("String_Node_Str");
}
Program: 70238
Project: 70238
Buggy source:
public DataAccessId registerObjectAccess(AccessMode mode,Object value,int code,int readerId){
  DataInfo oInfo;
  Integer aoId=codeToId.get(code);
  if (aoId == null) {
    if (debug) {
      logger.debug("String_Node_Str" + code);
    }
    oInfo=new ObjectInfo(code);
    aoId=oInfo.getDataId();
    codeToId.put(code,aoId);
    idToData.put(aoId,oInfo);
    DataInstanceId lastDID=oInfo.getCurrentDataInstanceId();
    String renaming=lastDID.getRenaming();
    if (mode != AccessMode.W) {
      Comm.registerValue(renaming,value);
      if (value instanceof StubItf) {
        String id=((StubItf)value).getID();
        if (id != null) {
          Comm.registerPSCO(renaming,id);
        }
      }
    }
  }
 else {
    if (debug) {
      logger.debug("String_Node_Str" + code);
    }
    oInfo=idToData.get(aoId);
  }
  return willAccess(mode,oInfo);
}

Fixed version (ground truth):
public DataAccessId registerObjectAccess(AccessMode mode,Object value,int code,int readerId){
  DataInfo oInfo;
  Integer aoId=codeToId.get(code);
  if (aoId == null) {
    if (debug) {
      logger.debug("String_Node_Str" + code);
    }
    oInfo=new ObjectInfo(code);
    aoId=oInfo.getDataId();
    codeToId.put(code,aoId);
    idToData.put(aoId,oInfo);
    DataInstanceId lastDID=oInfo.getCurrentDataInstanceId();
    String renaming=lastDID.getRenaming();
    if (mode != AccessMode.W) {
      Comm.registerValue(renaming,value);
    }
  }
 else {
    if (debug) {
      logger.debug("String_Node_Str" + code);
    }
    oInfo=idToData.get(aoId);
  }
  return willAccess(mode,oInfo);
}
Program: 70239
Project: 70239
Buggy source:
/** 
 * Sets the PSCO Id value (null if it is not PSCO)
 * @param id
 */
public synchronized void setId(String id){
  this.id=id;
}

Fixed version (ground truth):
/** 
 * Sets the LD id
 * @param id
 */
public synchronized void setId(String id){
  this.id=id;
}
Program: 70240
Project: 70240
Buggy source:
/** 
 * Loads the value of the LogicalData from a file
 * @throws Exception
 */
public synchronized void loadFromStorage() throws Exception {
  if (value != null) {
    return;
  }
  for (  DataLocation loc : this.locations) {
switch (loc.getType()) {
case PRIVATE:
case SHARED:
      MultiURI u=loc.getURIInHost(Comm.appHost);
    if (u == null) {
      continue;
    }
  String path=u.getPath();
if (path.startsWith(File.separator)) {
  this.value=Serializer.deserialize(path);
  String targetPath=Protocol.OBJECT_URI.getSchema() + this.name;
  SimpleURI uri=new SimpleURI(targetPath);
  DataLocation tgtLoc=DataLocation.createLocation(Comm.appHost,uri);
  addLocation(tgtLoc);
}
return;
case PERSISTENT:
PersistentLocation pLoc=(PersistentLocation)loc;
if (Tracer.isActivated()) {
Tracer.emitEvent(Tracer.Event.STORAGE_GETBYID.getId(),Tracer.Event.STORAGE_GETBYID.getType());
}
try {
this.value=StorageItf.getByID(pLoc.getId());
}
 catch (StorageException se) {
throw new Exception("String_Node_Str" + pLoc.getId(),se);
}
 finally {
if (Tracer.isActivated()) {
Tracer.emitEvent(Tracer.EVENT_END,Tracer.Event.STORAGE_GETBYID.getType());
}
}
String targetPath=Protocol.OBJECT_URI.getSchema() + this.name;
SimpleURI uri=new SimpleURI(targetPath);
DataLocation tgtLoc=DataLocation.createLocation(Comm.appHost,uri);
addLocation(tgtLoc);
return;
}
}
throw new Exception("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Loads the value of the LogicalData from a file
 * @throws Exception
 */
public synchronized void loadFromStorage() throws Exception {
  if (value != null) {
    return;
  }
  for (  DataLocation loc : this.locations) {
switch (loc.getType()) {
case PRIVATE:
case SHARED:
      MultiURI u=loc.getURIInHost(Comm.appHost);
    if (u == null) {
      continue;
    }
  String path=u.getPath();
if (path.startsWith(File.separator)) {
  this.value=Serializer.deserialize(path);
  String targetPath=Protocol.OBJECT_URI.getSchema() + this.name;
  SimpleURI uri=new SimpleURI(targetPath);
  DataLocation tgtLoc=DataLocation.createLocation(Comm.appHost,uri);
  addLocation(tgtLoc);
}
return;
case PERSISTENT:
PersistentLocation pLoc=(PersistentLocation)loc;
if (Tracer.isActivated()) {
Tracer.emitEvent(Tracer.Event.STORAGE_GETBYID.getId(),Tracer.Event.STORAGE_GETBYID.getType());
}
try {
this.value=StorageItf.getByID(pLoc.getId());
this.id=pLoc.getId();
}
 catch (StorageException se) {
throw new Exception("String_Node_Str" + pLoc.getId(),se);
}
 finally {
if (Tracer.isActivated()) {
Tracer.emitEvent(Tracer.EVENT_END,Tracer.Event.STORAGE_GETBYID.getType());
}
}
String targetPath=Protocol.OBJECT_URI.getSchema() + this.name;
SimpleURI uri=new SimpleURI(targetPath);
DataLocation tgtLoc=DataLocation.createLocation(Comm.appHost,uri);
addLocation(tgtLoc);
return;
}
}
throw new Exception("String_Node_Str");
}
Program: 70241
Project: 70241
Buggy source:
/** 
 * Prints in a file the final task graph
 */
public void commitGraph(){
  logger.debug("String_Node_Str");
  try {
    full_graph.close();
    try (FileInputStream sourceStream=new FileInputStream(COMPLETE_GRAPH_TMP_FILE);FileOutputStream destStream=new FileOutputStream(COMPLETE_GRAPH_FILE);FileChannel sourceChannel=sourceStream.getChannel();FileChannel destChannel=destStream.getChannel()){
      destChannel.transferFrom(sourceChannel,0,sourceChannel.size());
    }
     full_graph=new BufferedWriter(new FileWriter(COMPLETE_GRAPH_TMP_FILE,true));
    BufferedWriter finalGraph=new BufferedWriter(new FileWriter(COMPLETE_GRAPH_FILE,true));
    closeDependenceGraph(finalGraph);
    openLegend(finalGraph);
    legend.close();
    try (FileInputStream sourceStream=new FileInputStream(COMPLETE_LEGEND_TMP_FILE);FileOutputStream destStream=new FileOutputStream(COMPLETE_GRAPH_FILE);FileChannel sourceChannel=sourceStream.getChannel();FileChannel destChannel=destStream.getChannel()){
      destChannel.position(destChannel.size());
      sourceChannel.transferTo(0,sourceChannel.size(),destChannel);
    }
     legend=new BufferedWriter(new FileWriter(COMPLETE_LEGEND_TMP_FILE,true));
    closeLegend(finalGraph);
    closeGraphFile(finalGraph);
    finalGraph.close();
  }
 catch (  Exception e) {
    logger.error(ERROR_COMMIT_FINAL_GRAPH,e);
  }
}

Fixed version (ground truth):
/** 
 * Prints in a file the final task graph
 */
public void commitGraph(){
  logger.debug("String_Node_Str");
  try {
    full_graph.close();
    FileInputStream sourceFIS=null;
    FileOutputStream destFOS=null;
    FileChannel sourceChannel=null;
    FileChannel destChannel=null;
    try {
      sourceFIS=new FileInputStream(COMPLETE_GRAPH_TMP_FILE);
      destFOS=new FileOutputStream(COMPLETE_GRAPH_FILE);
      sourceChannel=sourceFIS.getChannel();
      destChannel=destFOS.getChannel();
      destChannel.transferFrom(sourceChannel,0,sourceChannel.size());
    }
  finally {
      sourceChannel.close();
      sourceFIS.close();
      destChannel.close();
      destFOS.close();
    }
    full_graph=new BufferedWriter(new FileWriter(COMPLETE_GRAPH_TMP_FILE,true));
    BufferedWriter finalGraph=new BufferedWriter(new FileWriter(COMPLETE_GRAPH_FILE,true));
    closeDependenceGraph(finalGraph);
    openLegend(finalGraph);
    legend.close();
    try {
      sourceFIS=new FileInputStream(COMPLETE_LEGEND_TMP_FILE);
      sourceChannel=sourceFIS.getChannel();
      destFOS=new FileOutputStream(COMPLETE_GRAPH_FILE,true);
      destChannel=destFOS.getChannel();
      destChannel.position(destChannel.size());
      sourceChannel.transferTo(0,sourceChannel.size(),destChannel);
    }
  finally {
      sourceChannel.close();
      sourceFIS.close();
      destChannel.close();
      destFOS.close();
    }
    legend=new BufferedWriter(new FileWriter(COMPLETE_LEGEND_TMP_FILE,true));
    closeLegend(finalGraph);
    closeGraphFile(finalGraph);
    finalGraph.close();
  }
 catch (  Exception e) {
    logger.error(ERROR_COMMIT_FINAL_GRAPH,e);
  }
}
Program: 70242
Project: 70242
Buggy source:
public MethodConfiguration(MethodConfiguration clone){
  super(clone);
  host=clone.host;
  user=clone.host;
  installDir=clone.installDir;
  workingDir=clone.workingDir;
  totalComputingUnits=clone.totalComputingUnits;
  appDir=clone.appDir;
  classpath=clone.classpath;
  pythonpath=clone.pythonpath;
  libraryPath=clone.libraryPath;
}

Fixed version (ground truth):
public MethodConfiguration(MethodConfiguration clone){
  super(clone);
  host=clone.host;
  user=clone.user;
  installDir=clone.installDir;
  workingDir=clone.workingDir;
  totalComputingUnits=clone.totalComputingUnits;
  appDir=clone.appDir;
  classpath=clone.classpath;
  pythonpath=clone.pythonpath;
  libraryPath=clone.libraryPath;
}
Program: 70243
Project: 70243
Buggy source:
public final void getWorkloadState(ResourceUser.WorkloadStatus response){
  int coreCount=CoreManager.getCoreCount();
  Profile[] coreProfile=new Profile[coreCount];
  for (int coreId=0; coreId < coreCount; coreId++) {
    coreProfile[coreId]=new Profile();
  }
  for (  ResourceScheduler<P,T> ui : workers.values()) {
    if (ui == null) {
      continue;
    }
    LinkedList<Implementation<T>>[] impls=ui.getExecutableImpls();
    for (int coreId=0; coreId < coreCount; coreId++) {
      for (      Implementation<T> impl : impls[coreId]) {
        coreProfile[coreId].accumulate(ui.getProfile(impl));
      }
    }
    LinkedList<AllocatableAction<P,T>> runningActions=ui.getHostedActions();
    long now=System.currentTimeMillis();
    for (    AllocatableAction<P,T> running : runningActions) {
      if (running.getImplementations().length > 0) {
        int coreId=running.getImplementations()[0].getCoreId();
        response.registerRunning(coreId,now - running.getStartTime());
      }
    }
  }
  for (int coreId=0; coreId < coreCount; coreId++) {
    response.registerNoResources(coreId,blockedActions.getActionCounts()[coreId]);
    response.registerReady(coreId,readyCounts[coreId]);
    response.registerTimes(coreId,coreProfile[coreId].getMinExecutionTime(),coreProfile[coreId].getAverageExecutionTime(),coreProfile[coreId].getMaxExecutionTime());
  }
}

Fixed version (ground truth):
public final void getWorkloadState(ResourceUser.WorkloadStatus response){
  int coreCount=CoreManager.getCoreCount();
  Profile[] coreProfile=new Profile[coreCount];
  for (int coreId=0; coreId < coreCount; coreId++) {
    coreProfile[coreId]=new Profile();
  }
  for (  ResourceScheduler<P,T> ui : workers.values()) {
    if (ui == null) {
      continue;
    }
    LinkedList<Implementation<T>>[] impls=ui.getExecutableImpls();
    for (int coreId=0; coreId < coreCount; coreId++) {
      for (      Implementation<T> impl : impls[coreId]) {
        coreProfile[coreId].accumulate(ui.getProfile(impl));
      }
    }
    LinkedList<AllocatableAction<P,T>> runningActions=ui.getHostedActions();
    long now=System.currentTimeMillis();
    for (    AllocatableAction<P,T> running : runningActions) {
      if (running.getImplementations().length > 0) {
        Integer coreId=running.getImplementations()[0].getCoreId();
        if (coreId != null) {
          response.registerRunning(coreId,now - running.getStartTime());
        }
      }
    }
  }
  for (int coreId=0; coreId < coreCount; coreId++) {
    response.registerNoResources(coreId,blockedActions.getActionCounts()[coreId]);
    response.registerReady(coreId,readyCounts[coreId]);
    response.registerTimes(coreId,coreProfile[coreId].getMinExecutionTime(),coreProfile[coreId].getAverageExecutionTime(),coreProfile[coreId].getMaxExecutionTime());
  }
}
Program: 70244
Project: 70244
Buggy source:
public TaskAnalyser(){
  currentTaskCount=new HashMap<Integer,Integer>();
  writers=new TreeMap<Integer,Task>();
  appIdToTaskCount=new HashMap<Long,Integer>();
  appIdToTotalTaskCount=new HashMap<Long,Integer>();
  appIdToSemaphore=new HashMap<Long,Semaphore>();
  appIdToWrittenFiles=new HashMap<Long,TreeSet<Integer>>();
  waitedTasks=new Hashtable<Task,List<Semaphore>>();
  synchronizationId=0;
  logger.info("String_Node_Str");
}

Fixed version (ground truth):
public TaskAnalyser(){
  currentTaskCount=new HashMap<Integer,Integer>();
  writers=new TreeMap<Integer,Task>();
  appIdToTaskCount=new HashMap<Long,Integer>();
  appIdToTotalTaskCount=new HashMap<Long,Integer>();
  appIdToSemaphore=new HashMap<Long,Semaphore>();
  appIdToWrittenFiles=new HashMap<Long,TreeSet<Integer>>();
  appIdToSCOWrittenIds=new HashMap<Long,TreeSet<Integer>>();
  waitedTasks=new Hashtable<Task,List<Semaphore>>();
  synchronizationId=0;
  logger.info("String_Node_Str");
}
Program: 70246
Project: 70246
Buggy source:
@Override public void dependencyFreeAction(AllocatableAction<P,T> action) throws BlockedActionException {
  dependingActions.removeAction(action);
  try {
    Score actionScore=action.schedulingScore(this);
    action.schedule(actionScore);
  }
 catch (  UnassignedActionException ex) {
    unassignedReadyActions.addAction(action);
  }
}

Fixed version (ground truth):
@Override public void dependencyFreeAction(AllocatableAction<P,T> action) throws BlockedActionException {
  dependingActions.removeAction(action);
  try {
    Score actionScore=action.schedulingScore(this);
    action.schedule(actionScore);
    try {
      action.tryToLaunch();
    }
 catch (    InvalidSchedulingException ise) {
      action.schedule(action.getConstrainingPredecessor().getAssignedResource(),actionScore);
      try {
        action.tryToLaunch();
      }
 catch (      InvalidSchedulingException ise2) {
      }
    }
  }
 catch (  UnassignedActionException ex) {
    unassignedReadyActions.addAction(action);
  }
}
Program: 70248
Project: 70248
Buggy source:
public void start(HashMap<String,String> disks) throws Exception {
  this.node.start();
  for (  java.util.Map.Entry<String,String> disk : disks.entrySet()) {
    addSharedDisk(disk.getKey(),disk.getValue());
  }
}

Fixed version (ground truth):
public void start() throws Exception {
  this.node.start();
  if (sharedDisks != null) {
    for (    java.util.Map.Entry<String,String> disk : sharedDisks.entrySet()) {
      SharedDiskManager.addSharedToMachine(disk.getKey(),disk.getValue(),this);
    }
  }
}
Program: 70249
Project: 70249
Buggy source:
public void run(){
  Thread.currentThread().setName(selectedResource.getResource().getName() + "String_Node_Str");
  try {
    selectedResource.getResource().start(new HashMap<String,String>());
    notifyCompleted();
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
    ErrorManager.warn("String_Node_Str",e);
    notifyError();
  }
}

Fixed version (ground truth):
public void run(){
  Thread.currentThread().setName(selectedResource.getResource().getName() + "String_Node_Str");
  try {
    selectedResource.getResource().start();
    notifyCompleted();
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
    ErrorManager.warn("String_Node_Str",e);
    notifyError();
  }
}
Program: 70250
Project: 70250
Buggy source:
@Override protected void doAction(){
  (new Thread(){
    public void run(){
      Thread.currentThread().setName(selectedResource.getResource().getName() + "String_Node_Str");
      try {
        selectedResource.getResource().start(new HashMap<String,String>());
        notifyCompleted();
      }
 catch (      Exception e) {
        logger.error("String_Node_Str",e);
        ErrorManager.warn("String_Node_Str",e);
        notifyError();
      }
    }
  }
).start();
}

Fixed version (ground truth):
@Override protected void doAction(){
  (new Thread(){
    public void run(){
      Thread.currentThread().setName(selectedResource.getResource().getName() + "String_Node_Str");
      try {
        selectedResource.getResource().start();
        notifyCompleted();
      }
 catch (      Exception e) {
        logger.error("String_Node_Str",e);
        ErrorManager.warn("String_Node_Str",e);
        notifyError();
      }
    }
  }
).start();
}
Program: 70251
Project: 70251
Buggy source:
public FakeWorker(WorkerResourceDescription description,int limitOfTasks){
  super("String_Node_Str",(T)description,new FakeNode(),limitOfTasks);
}

Fixed version (ground truth):
public FakeWorker(WorkerResourceDescription description,int limitOfTasks){
  super("String_Node_Str",(T)description,new FakeNode(),limitOfTasks,null);
}
Program: 70254
Project: 70254
Buggy source:
/** 
 * Reconfigures the master node adding its shared disks
 * @param sharedDisks Shared Disk descriptions (diskName->mountpoint)
 */
public static void updateMasterConfiguration(HashMap<String,String> sharedDisks){
  for (  java.util.Map.Entry<String,String> disk : sharedDisks.entrySet()) {
    String diskName=disk.getKey();
    String mountPoint=disk.getValue();
    Comm.appHost.addSharedDisk(diskName,mountPoint);
  }
}

Fixed version (ground truth):
/** 
 * Reconfigures the master node adding its shared disks
 * @param sharedDisks Shared Disk descriptions (diskName->mountpoint)
 */
public static void updateMasterConfiguration(HashMap<String,String> sharedDisks){
  Comm.appHost.updateSharedDisk(sharedDisks);
  try {
    Comm.appHost.start();
  }
 catch (  Exception e) {
    ErrorManager.error("String_Node_Str",e);
  }
}
Program: 70255
Project: 70255
Buggy source:
/** 
 * Initializes a new Method Worker
 * @param name
 * @param rd
 * @param sharedDisks
 * @param mc
 */
public static void newMethodWorker(String name,MethodResourceDescription rd,HashMap<String,String> sharedDisks,MethodConfiguration mc){
  int taskCount;
  int limitOfTasks=mc.getLimitOfTasks();
  int computingUnits=rd.getTotalComputingUnits();
  if (limitOfTasks < 0 && computingUnits < 0) {
    taskCount=0;
  }
 else {
    taskCount=Math.max(limitOfTasks,computingUnits);
  }
  mc.setLimitOfTasks(taskCount);
  MethodWorker newResource=new MethodWorker(name,rd,mc);
  addStaticResource(newResource);
}

Fixed version (ground truth):
/** 
 * Initializes a new Method Worker
 * @param name
 * @param rd
 * @param sharedDisks
 * @param mc
 */
public static void newMethodWorker(String name,MethodResourceDescription rd,HashMap<String,String> sharedDisks,MethodConfiguration mc){
  int taskCount;
  int limitOfTasks=mc.getLimitOfTasks();
  int computingUnits=rd.getTotalComputingUnits();
  if (limitOfTasks < 0 && computingUnits < 0) {
    taskCount=0;
  }
 else {
    taskCount=Math.max(limitOfTasks,computingUnits);
  }
  mc.setLimitOfTasks(taskCount);
  MethodWorker newResource=new MethodWorker(name,rd,mc,sharedDisks);
  addStaticResource(newResource);
}