nus-yam/ex-repair huggingface dataset:
Program: 70101
Project: 70101
Buggy source:
@Override public String toString(){
  StringBuilder sb=new StringBuilder("String_Node_Str");
  sb.append("String_Node_Str").append(this.taskId).append("String_Node_Str");
  sb.append("String_Node_Str");
  for (  DataType param : this.paramTypes) {
    sb.append("String_Node_Str").append(param);
  }
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  for (  Object param : this.paramValues) {
    sb.append("String_Node_Str").append(param);
  }
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  return sb.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  StringBuilder sb=new StringBuilder("String_Node_Str");
  sb.append("String_Node_Str").append(this.jobId).append("String_Node_Str");
  sb.append("String_Node_Str");
  for (  DataType param : this.paramTypes) {
    sb.append("String_Node_Str").append(param);
  }
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  for (  Object param : this.paramValues) {
    sb.append("String_Node_Str").append(param);
  }
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  return sb.toString();
}
Program: 70102
Project: 70102
Buggy source:
public static void reduceWholeWorker(MethodWorker worker){
  ResourceUpdate<MethodResourceDescription> modification=new PendingReduction<>(worker.getDescription());
  resourceUser.updatedResource(worker,modification);
}

Fixed version (ground truth):
public static void reduceWholeWorker(MethodWorker worker){
  ResourceUpdate<MethodResourceDescription> modification=new PendingReduction<>(worker.getDescription().copy());
  resourceUser.updatedResource(worker,modification);
}
Program: 70103
Project: 70103
Buggy source:
/** 
 * Selects a subset of the critical set able to execute all the cores
 */
public void defineCriticalSet(){
synchronized (this) {
    int coreCount=CoreManager.getCoreCount();
    boolean[] runnable=new boolean[coreCount];
    for (int coreId=0; coreId < coreCount; coreId++) {
      runnable[coreId]=false;
    }
    String resourceName;
    for (    Worker<? extends WorkerResourceDescription> res : staticSet.values()) {
      List<Integer> cores=res.getExecutableCores();
      for (int i=0; i < cores.size(); i++) {
        runnable[cores.get(i)]=true;
      }
    }
    for (    DynamicMethodWorker resource : criticalOrder) {
      resourceName=resource.getName();
      List<Integer> executableCores=resource.getExecutableCores();
      boolean needed=false;
      for (int i=0; i < executableCores.size() && !needed; i++) {
        needed=needed || !runnable[executableCores.get(i)];
      }
      if (needed) {
        for (int i=0; i < executableCores.size(); i++) {
          runnable[executableCores.get(i)]=true;
        }
      }
 else {
        criticalSet.remove(resourceName);
        criticalOrder.remove(resource);
        nonCriticalSet.put(resourceName,resource);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Selects a subset of the critical set able to execute all the cores
 */
public void defineCriticalSet(){
synchronized (this) {
    int coreCount=CoreManager.getCoreCount();
    boolean[] runnable=new boolean[coreCount];
    for (int coreId=0; coreId < coreCount; coreId++) {
      runnable[coreId]=false;
    }
    String resourceName;
    for (    Worker<? extends WorkerResourceDescription> res : staticSet.values()) {
      List<Integer> cores=res.getExecutableCores();
      for (int i=0; i < cores.size(); i++) {
        runnable[cores.get(i)]=true;
      }
    }
    LinkedList<DynamicMethodWorker> criticalOrderRemovals=new LinkedList();
    for (    DynamicMethodWorker resource : criticalOrder) {
      resourceName=resource.getName();
      List<Integer> executableCores=resource.getExecutableCores();
      boolean needed=false;
      for (int i=0; i < executableCores.size() && !needed; i++) {
        needed=needed || !runnable[executableCores.get(i)];
      }
      if (needed) {
        for (int i=0; i < executableCores.size(); i++) {
          runnable[executableCores.get(i)]=true;
        }
      }
 else {
        criticalSet.remove(resourceName);
        criticalOrderRemovals.add(resource);
        nonCriticalSet.put(resourceName,resource);
      }
    }
    for (    DynamicMethodWorker resource : criticalOrderRemovals) {
      criticalOrder.remove(resource);
    }
  }
}
Program: 70104
Project: 70104
Buggy source:
public static void reduceWholeWorker(MethodWorker worker){
  ResourceUpdate<MethodResourceDescription> modification=new PendingReduction<>(worker.getDescription());
  resourceUser.updatedResource(worker,modification);
}

Fixed version (ground truth):
public static void reduceWholeWorker(MethodWorker worker){
  ResourceUpdate<MethodResourceDescription> modification=new PendingReduction<>(worker.getDescription().copy());
  resourceUser.updatedResource(worker,modification);
}
Program: 70105
Project: 70105
Buggy source:
@Override public void writeExternal(ObjectOutput out) throws IOException {
  out.writeInt(this.taskId);
  out.writeObject(this.paramTypes);
  out.writeObject(this.paramValues);
}

Fixed version (ground truth):
@Override public void writeExternal(ObjectOutput out) throws IOException {
  out.writeInt(this.jobId);
  out.writeObject(this.paramTypes);
  out.writeObject(this.paramValues);
}
Program: 70106
Project: 70106
Buggy source:
/** 
 * New task result from a given set of   {@code params}
 * @param taskId
 * @param params
 */
public NIOTaskResult(int taskId,LinkedList<NIOParam> params){
  this.taskId=taskId;
  for (  NIOParam np : params) {
    this.paramTypes.add(np.getType());
switch (np.getType()) {
case PSCO_T:
case EXTERNAL_OBJECT_T:
      this.paramValues.add(np.getValue());
    break;
default :
  this.paramValues.add(null);
break;
}
}
}

Fixed version (ground truth):
/** 
 * New task result from a given set of   {@code params}
 * @param jobId
 * @param params
 */
public NIOTaskResult(int jobId,LinkedList<NIOParam> params){
  this.jobId=jobId;
  for (  NIOParam np : params) {
    this.paramTypes.add(np.getType());
switch (np.getType()) {
case PSCO_T:
case EXTERNAL_OBJECT_T:
      this.paramValues.add(np.getValue());
    break;
default :
  this.paramValues.add(null);
break;
}
}
}
Program: 70107
Project: 70107
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  this.taskId=in.readInt();
  this.paramTypes=(LinkedList<DataType>)in.readObject();
  this.paramValues=(LinkedList<Object>)in.readObject();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  this.jobId=in.readInt();
  this.paramTypes=(LinkedList<DataType>)in.readObject();
  this.paramValues=(LinkedList<Object>)in.readObject();
}
Program: 70108
Project: 70108
Buggy source:
@Override public String toString(){
  StringBuilder sb=new StringBuilder("String_Node_Str");
  sb.append("String_Node_Str").append(this.taskId).append("String_Node_Str");
  sb.append("String_Node_Str");
  for (  DataType param : this.paramTypes) {
    sb.append("String_Node_Str").append(param);
  }
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  for (  Object param : this.paramValues) {
    sb.append("String_Node_Str").append(param);
  }
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  return sb.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  StringBuilder sb=new StringBuilder("String_Node_Str");
  sb.append("String_Node_Str").append(this.jobId).append("String_Node_Str");
  sb.append("String_Node_Str");
  for (  DataType param : this.paramTypes) {
    sb.append("String_Node_Str").append(param);
  }
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  for (  Object param : this.paramValues) {
    sb.append("String_Node_Str").append(param);
  }
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  return sb.toString();
}
Program: 70110
Project: 70110
Buggy source:
@Override public Object invokeMethod() throws JobExecutionException {
  checkArguments();
  return invokeMPIMethod();
}

Fixed version (ground truth):
@Override public Object invokeMethod() throws JobExecutionException {
  checkArguments();
  return invokeDecafMethod();
}
Program: 70112
Project: 70112
Buggy source:
private static String writeHostfile(File taskSandboxWorkingDir,String workers) throws InvokeExecutionException {
  String filename=taskSandboxWorkingDir.getAbsolutePath() + File.separator + "String_Node_Str";
  BufferedWriter writer=null;
  try {
    writer=new BufferedWriter(new FileWriter(filename));
    writer.write(workers);
  }
 catch (  IOException e) {
    throw new InvokeExecutionException("String_Node_Str",e);
  }
 finally {
    try {
      if (writer != null)       writer.close();
    }
 catch (    IOException e) {
    }
  }
  return filename;
}

Fixed version (ground truth):
private static String writeHostfile(File taskSandboxWorkingDir,String workers) throws InvokeExecutionException {
  String filename=taskSandboxWorkingDir.getAbsolutePath() + File.separator + "String_Node_Str";
  String workersInLines=workers.replace(',','\n');
  BufferedWriter writer=null;
  try {
    writer=new BufferedWriter(new FileWriter(filename));
    writer.write(workersInLines);
  }
 catch (  IOException e) {
    throw new InvokeExecutionException("String_Node_Str",e);
  }
 finally {
    try {
      if (writer != null)       writer.close();
    }
 catch (    IOException e) {
    }
  }
  return filename;
}
Program: 70113
Project: 70113
Buggy source:
public void newCoreElementsDetected(List<Integer> newCores){
  int coreCount=CoreManager.getCoreCount();
  for (  CloudInstanceTypeDescription type : types.values()) {
    int[][] slotsI=new int[coreCount][];
    int[] slotsC=type.getSlotsCore().clone();
    for (int i=0; i < type.getSlotsImplLength(); ++i) {
      int[] slotsImpl=type.getSpecificSlotsImpl(i);
      slotsI[i]=slotsImpl.clone();
    }
    for (    int coreId : newCores) {
      List<Implementation> impls=CoreManager.getCoreImplementations(coreId);
      int implsSize=impls.size();
      slotsI[coreId]=new int[implsSize];
      for (int implId=0; implId < implsSize; ++implId) {
        Implementation impl=impls.get(implId);
        if (impl.getTaskType() == TaskType.METHOD) {
          MethodResourceDescription rd=(MethodResourceDescription)impl.getRequirements();
          Integer into=type.getResourceDescription().canHostSimultaneously(rd);
          slotsC[coreId]=Math.max(slotsC[coreId],into);
          slotsI[coreId][implId]=into;
        }
      }
    }
    type.setSlotsCore(slotsC);
    type.setSlotsImpl(slotsI);
  }
}

Fixed version (ground truth):
public void newCoreElementsDetected(List<Integer> newCores){
  int coreCount=CoreManager.getCoreCount();
  for (  CloudInstanceTypeDescription type : types.values()) {
    int[][] slotsI=new int[coreCount][];
    int[] slotsC=Arrays.copyOf(type.getSlotsCore(),coreCount);
    for (int i=0; i < type.getSlotsImplLength(); ++i) {
      int[] slotsImpl=type.getSpecificSlotsImpl(i);
      slotsI[i]=slotsImpl.clone();
    }
    for (    int coreId : newCores) {
      List<Implementation> impls=CoreManager.getCoreImplementations(coreId);
      int implsSize=impls.size();
      slotsI[coreId]=new int[implsSize];
      for (int implId=0; implId < implsSize; ++implId) {
        Implementation impl=impls.get(implId);
        if (impl.getTaskType() == TaskType.METHOD) {
          MethodResourceDescription rd=(MethodResourceDescription)impl.getRequirements();
          Integer into=type.getResourceDescription().canHostSimultaneously(rd);
          slotsC[coreId]=Math.max(slotsC[coreId],into);
          slotsI[coreId][implId]=into;
        }
      }
    }
    type.setSlotsCore(slotsC);
    type.setSlotsImpl(slotsI);
  }
}
Program: 70114
Project: 70114
Buggy source:
/** 
 * Returns the total slots per per core
 * @return
 */
public static int[] getTotalSlots(){
  int[] counts=new int[CoreManager.getCoreCount()];
  int[] cloudCount=cloudManager.getPendingCoreCounts();
synchronized (pool) {
    for (int i=0; i < counts.length; i++) {
      if (i < cloudCount.length) {
        counts[i]=poolCoreMaxConcurrentTasks[i] + cloudCount[i];
      }
 else {
        counts[i]=poolCoreMaxConcurrentTasks[i];
      }
    }
  }
  return counts;
}

Fixed version (ground truth):
/** 
 * Returns the total slots per per core
 * @return
 */
public static int[] getTotalSlots(){
  int[] counts=new int[CoreManager.getCoreCount()];
  if (CoreManager.getCoreCount() > 0) {
    int[] cloudCount=cloudManager.getPendingCoreCounts();
synchronized (pool) {
      for (int i=0; i < counts.length; i++) {
        if (i < cloudCount.length) {
          counts[i]=poolCoreMaxConcurrentTasks[i] + cloudCount[i];
        }
 else {
          counts[i]=poolCoreMaxConcurrentTasks[i];
        }
      }
    }
  }
  return counts;
}
Program: 70115
Project: 70115
Buggy source:
/** 
 * Updates the coreElement information
 * @param updatedCores
 */
public static void coreElementUpdates(List<Integer> updatedCores){
synchronized (pool) {
    pool.coreElementUpdates(updatedCores);
    cloudManager.newCoreElementsDetected(updatedCores);
  }
}

Fixed version (ground truth):
/** 
 * Updates the coreElement information
 * @param updatedCores
 */
public static void coreElementUpdates(List<Integer> updatedCores){
synchronized (pool) {
    pool.coreElementUpdates(updatedCores);
    cloudManager.newCoreElementsDetected(updatedCores);
    updateMaxConcurrentTasks(updatedCores);
  }
}
Program: 70116
Project: 70116
Buggy source:
public boolean isPreserveSourceData(){
  return readDataVersion.hasPendingLectures();
}

Fixed version (ground truth):
public boolean isPreserveSourceData(){
  return readDataVersion.isOnlyReader();
}
Program: 70117
Project: 70117
Buggy source:
/** 
 * Initializes the persistent storage Configuration file must contain all the worker hostnames, one by line
 * @param storageConf Path to the storage configuration File
 * @throws StorageException
 */
public static void init(String storageConf) throws StorageException, IOException {
  LOGGER.info("String_Node_Str" + storageConf);
  try (BufferedReader br=new BufferedReader(new FileReader(storageConf))){
    String line;
    while ((line=br.readLine()) != null) {
      hosts.add(line.trim());
      System.out.println("String_Node_Str" + line.trim() + "String_Node_Str");
    }
  }
 catch (  FileNotFoundException e) {
    throw new StorageException("String_Node_Str",e);
  }
catch (  IOException e) {
    throw new StorageException("String_Node_Str",e);
  }
  assert(!hosts.isEmpty());
  try {
    redisClusterConnection=new JedisCluster(new HostAndPort(MASTER_HOSTNAME,REDIS_PORT));
  }
 catch (  JedisDataException e) {
    LOGGER.info("String_Node_Str");
    clusterMode=false;
    redisConnection=new Jedis(MASTER_HOSTNAME,REDIS_PORT);
  }
}

Fixed version (ground truth):
/** 
 * Initializes the persistent storage Configuration file must contain all the worker hostnames, one by line TODO: What to do with storage conf? StorageItf.init needs different content wrt storage_init.sh
 * @param storageConf Path to the storage configuration File
 * @throws StorageException
 */
public static void init(String storageConf) throws StorageException, IOException {
  LOGGER.info("String_Node_Str" + storageConf);
  try (BufferedReader br=new BufferedReader(new FileReader(storageConf))){
    String line;
    while ((line=br.readLine()) != null) {
      hosts.add(line.trim());
      System.out.println("String_Node_Str" + line.trim() + "String_Node_Str");
    }
  }
 catch (  FileNotFoundException e) {
    throw new StorageException("String_Node_Str",e);
  }
catch (  IOException e) {
    throw new StorageException("String_Node_Str",e);
  }
  assert(!hosts.isEmpty());
  try {
    redisClusterConnection=new JedisCluster(new HostAndPort(MASTER_HOSTNAME,REDIS_PORT));
  }
 catch (  JedisDataException e) {
    LOGGER.info("String_Node_Str");
    clusterMode=false;
    redisConnection=new JedisPool(MASTER_HOSTNAME,REDIS_PORT);
  }
}
Program: 70118
Project: 70118
Buggy source:
/** 
 * Removes all the occurrences of a given @id
 * @param id
 */
public static void removeById(String id){
  if (clusterMode) {
    redisClusterConnection.del(id.getBytes());
  }
 else {
    redisConnection.del(id.getBytes());
  }
}

Fixed version (ground truth):
/** 
 * Removes all the occurrences of a given @id
 * @param id
 */
public static void removeById(String id){
  if (clusterMode) {
    redisClusterConnection.del(id.getBytes());
  }
 else {
    redisConnection.getResource().del(id.getBytes());
  }
}
Program: 70119
Project: 70119
Buggy source:
/** 
 * Stores the object @o in the persistent storage with id @id
 * @param o
 * @param id
 * @throws StorageException
 */
public static void makePersistent(Object o,String id) throws StorageException, IOException {
  byte[] serializedObject=Serializer.serialize(o);
  String result=clusterMode ? redisClusterConnection.set(id.getBytes(),serializedObject) : redisConnection.set(id.getBytes(),serializedObject);
  if (!result.equals("String_Node_Str")) {
    throw new StorageException("String_Node_Str" + id);
  }
}

Fixed version (ground truth):
/** 
 * Stores the object @o in the persistent storage with id @id
 * @param o
 * @param id
 * @throws StorageException
 */
public static void makePersistent(Object o,String id) throws StorageException, IOException {
  byte[] serializedObject=Serializer.serialize(o);
  String result=clusterMode ? redisClusterConnection.set(id.getBytes(),serializedObject) : redisConnection.getResource().set(id.getBytes(),serializedObject);
  if (!result.equals("String_Node_Str")) {
    throw new StorageException("String_Node_Str" + id);
  }
}
Program: 70120
Project: 70120
Buggy source:
/** 
 * Returns the object with id @id This function retrieves the object from any location
 * @param id
 * @return
 * @throws StorageException
 */
public static Object getByID(String id) throws StorageException, IOException, ClassNotFoundException {
  byte[] serializedObject=clusterMode ? redisClusterConnection.get(id.getBytes()) : redisConnection.get(id.getBytes());
  if (serializedObject == null) {
    throw new StorageException("String_Node_Str" + id + "String_Node_Str");
  }
  Object ret=Serializer.deserialize(serializedObject);
  ((StorageObject)ret).setID(id);
  return ret;
}

Fixed version (ground truth):
/** 
 * Returns the object with id @id This function retrieves the object from any location
 * @param id
 * @return
 * @throws StorageException
 */
public static Object getByID(String id) throws StorageException, IOException, ClassNotFoundException {
  byte[] serializedObject=clusterMode ? redisClusterConnection.get(id.getBytes()) : redisConnection.getResource().get(id.getBytes());
  if (serializedObject == null) {
    throw new StorageException("String_Node_Str" + id + "String_Node_Str");
  }
  Object ret=Serializer.deserialize(serializedObject);
  ((StorageObject)ret).setID(id);
  return ret;
}
Program: 70121
Project: 70121
Buggy source:
/** 
 * Returns all the valid locations of a given id WARNING: Given that Redis has no immediate mechanisms to retrieve this information, we will return all the nodes instead, because a connection to any of them will grant us that we can retrieve it
 * @param id
 * @return
 * @throws StorageException
 */
public static List<String> getLocations(String id) throws StorageException {
  return hosts;
}

Fixed version (ground truth):
/** 
 * Returns all the valid locations of a given id WARNING: Given that Redis has no immediate mechanisms to retrieve this information, we will return all the nodes instead, because a connection to any of them will grant us that we can retrieve it
 * @param id
 * @return
 * @throws StorageException
 */
public static List<String> getLocations(String id) throws StorageException {
  if (clusterMode) {
    return hosts;
  }
  return hosts;
}
Program: 70122
Project: 70122
Buggy source:
/** 
 * Initializes the persistent storage Configuration file must contain all the worker hostnames, one by line
 * @param storageConf Path to the storage configuration File
 * @throws StorageException
 */
public static void init(String storageConf) throws StorageException, IOException {
  LOGGER.info("String_Node_Str" + storageConf);
  try (BufferedReader br=new BufferedReader(new FileReader(storageConf))){
    String line;
    while ((line=br.readLine()) != null) {
      hosts.add(line.trim());
      System.out.println("String_Node_Str" + line.trim() + "String_Node_Str");
    }
  }
 catch (  FileNotFoundException e) {
    throw new StorageException("String_Node_Str",e);
  }
catch (  IOException e) {
    throw new StorageException("String_Node_Str",e);
  }
  assert(!hosts.isEmpty());
  System.out.println("String_Node_Str" + MASTER_HOSTNAME);
  System.out.flush();
  try {
    redisClusterConnection=new JedisCluster(new HostAndPort(MASTER_HOSTNAME,REDIS_PORT));
  }
 catch (  JedisDataException e) {
    LOGGER.info("String_Node_Str");
    clusterMode=false;
    redisConnection=new Jedis(MASTER_HOSTNAME,REDIS_PORT);
  }
}

Fixed version (ground truth):
/** 
 * Initializes the persistent storage Configuration file must contain all the worker hostnames, one by line
 * @param storageConf Path to the storage configuration File
 * @throws StorageException
 */
public static void init(String storageConf) throws StorageException, IOException {
  LOGGER.info("String_Node_Str" + storageConf);
  try (BufferedReader br=new BufferedReader(new FileReader(storageConf))){
    String line;
    while ((line=br.readLine()) != null) {
      hosts.add(line.trim());
      System.out.println("String_Node_Str" + line.trim() + "String_Node_Str");
    }
  }
 catch (  FileNotFoundException e) {
    throw new StorageException("String_Node_Str",e);
  }
catch (  IOException e) {
    throw new StorageException("String_Node_Str",e);
  }
  assert(!hosts.isEmpty());
  try {
    redisClusterConnection=new JedisCluster(new HostAndPort(MASTER_HOSTNAME,REDIS_PORT));
  }
 catch (  JedisDataException e) {
    LOGGER.info("String_Node_Str");
    clusterMode=false;
    redisConnection=new Jedis(MASTER_HOSTNAME,REDIS_PORT);
  }
}
Program: 70123
Project: 70123
Buggy source:
/** 
 * Consolidates all intermediate versions to the final id
 * @param idFinal
 * @throws StorageException
 */
public static void consolidateVersion(String idFinal) throws StorageException {
  LOGGER.info("String_Node_Str" + idFinal);
  idFinal=previousVersion.get(idFinal);
  previousVersion.remove(idFinal);
  while (idFinal != null) {
    removeById(idFinal);
    idFinal=previousVersion.get(idFinal);
    previousVersion.remove(idFinal);
  }
}

Fixed version (ground truth):
/** 
 * Consolidates all intermediate versions to the final id
 * @param idFinal
 * @throws StorageException
 */
public static void consolidateVersion(String idFinal) throws StorageException {
  LOGGER.info("String_Node_Str" + idFinal);
  idFinal=previousVersion.get(idFinal);
  while (idFinal != null) {
    LOGGER.info("String_Node_Str" + idFinal);
    removeById(idFinal);
    String oldId=idFinal;
    idFinal=previousVersion.get(idFinal);
    previousVersion.remove(oldId);
  }
}
Program: 70124
Project: 70124
Buggy source:
/** 
 * Returns the object with id @id This function retrieves the object from any location
 * @param id
 * @return
 * @throws StorageException
 */
public static Object getByID(String id) throws StorageException, IOException, ClassNotFoundException {
  byte[] serializedObject=clusterMode ? redisClusterConnection.get(id.getBytes()) : redisConnection.get(id.getBytes());
  Object ret=Serializer.deserialize(serializedObject);
  ((StorageObject)ret).setID(id);
  return ret;
}

Fixed version (ground truth):
/** 
 * Returns the object with id @id This function retrieves the object from any location
 * @param id
 * @return
 * @throws StorageException
 */
public static Object getByID(String id) throws StorageException, IOException, ClassNotFoundException {
  byte[] serializedObject=clusterMode ? redisClusterConnection.get(id.getBytes()) : redisConnection.get(id.getBytes());
  if (serializedObject == null) {
    throw new StorageException("String_Node_Str" + id + "String_Node_Str");
  }
  Object ret=Serializer.deserialize(serializedObject);
  ((StorageObject)ret).setID(id);
  return ret;
}
Program: 70125
Project: 70125
Buggy source:
/** 
 * Retrieves the result of persistent storage execution
 * @param event
 * @return
 */
public static Object getResult(CallbackEvent event) throws StorageException {
  if (true)   throw new StorageException("String_Node_Str");
  return null;
}

Fixed version (ground truth):
/** 
 * Retrieves the result of persistent storage execution
 * @param event
 * @return
 */
public static Object getResult(CallbackEvent event) throws StorageException {
  throw new StorageException("String_Node_Str");
}
Program: 70126
Project: 70126
Buggy source:
@Override public ResourceDescription getDynamicCommons(ResourceDescription other){
  MethodResourceDescription otherMRD=(MethodResourceDescription)other;
  MethodResourceDescription common=new MethodResourceDescription();
  for (  Processor p : otherMRD.getProcessors()) {
    boolean isProcessorCompatible=false;
    int i=0;
    while (i < this.processors.size() && !isProcessorCompatible) {
      Processor pThis=this.processors.get(i);
      if (checkProcessorCompatibility(pThis,p)) {
        isProcessorCompatible=true;
        common.addProcessor(getDynamicCommonsProcessor(pThis,p));
      }
      i=i + 1;
    }
  }
  if (checkCompatibility(this.memoryType,otherMRD.memoryType)) {
    common.setMemoryType(this.getMemoryType());
    common.setMemorySize(Math.min(this.memorySize,otherMRD.getMemorySize()));
  }
  return common;
}

Fixed version (ground truth):
@Override public ResourceDescription getDynamicCommons(ResourceDescription other){
  MethodResourceDescription otherMRD=(MethodResourceDescription)other;
  MethodResourceDescription common=new MethodResourceDescription();
  for (  Processor p : otherMRD.getProcessors()) {
    boolean isProcessorCompatible=false;
    int i=0;
    while (i < this.processors.size() && !isProcessorCompatible) {
      Processor pThis=this.processors.get(i);
      if (checkProcessorCompatibility(pThis,p)) {
        isProcessorCompatible=true;
        Processor commonProcessor=getDynamicCommonsProcessor(pThis,p);
        if (commonProcessor.getComputingUnits() > 0) {
          common.addProcessor(commonProcessor);
        }
      }
      i=i + 1;
    }
  }
  if (checkCompatibility(this.memoryType,otherMRD.memoryType)) {
    common.setMemoryType(this.getMemoryType());
    common.setMemorySize(Math.min(this.memorySize,otherMRD.getMemorySize()));
  }
  return common;
}
Program: 70127
Project: 70127
Buggy source:
public int getSpecificSlotsImpl(int i,int j){
  return this.slotsImpl[i][j];
}

Fixed version (ground truth):
public int getSpecificSlotsImpl(int coreId,int implId){
  return this.slotsImpl[coreId][implId];
}
Program: 70128
Project: 70128
Buggy source:
/** 
 * Initializes the persistent storage Configuration file must contain all the worker hostnames, one by line
 * @param storageConf Path to the storage configuration File
 * @throws StorageException
 */
public static void init(String storageConf) throws StorageException, IOException {
  redisConnection=new Jedis("String_Node_Str",6379);
  hosts=new String[]{"String_Node_Str"};
}

Fixed version (ground truth):
/** 
 * Initializes the persistent storage Configuration file must contain all the worker hostnames, one by line
 * @param storageConf Path to the storage configuration File
 * @throws StorageException
 */
public static void init(String storageConf) throws StorageException, IOException {
  System.out.println("String_Node_Str" + storageConf);
  redisConnection=new Jedis("String_Node_Str",6379);
  hosts=new String[]{"String_Node_Str"};
}
Program: 70129
Project: 70129
Buggy source:
/** 
 * Removes all the occurrences of a given @id
 * @param id
 */
public static void removeById(String id){
  LOGGER.debug("String_Node_Str" + id);
  redisConnection.del(id.getBytes());
  LOGGER.debug("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Removes all the occurrences of a given @id
 * @param id
 */
public static void removeById(String id){
  redisConnection.del(id.getBytes());
}
Program: 70130
Project: 70130
Buggy source:
/** 
 * Stores the object @o in the persistent storage with id @id
 * @param o
 * @param id
 * @throws StorageException
 */
public static void makePersistent(Object o,String id) throws StorageException, IOException {
  LOGGER.debug("String_Node_Str");
  byte[] serializedObject=Serializer.serialize(o);
  LOGGER.debug("String_Node_Str");
  redisConnection.set(id.getBytes(),serializedObject);
  LOGGER.debug("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Stores the object @o in the persistent storage with id @id
 * @param o
 * @param id
 * @throws StorageException
 */
public static void makePersistent(Object o,String id) throws StorageException, IOException {
  byte[] serializedObject=Serializer.serialize(o);
  String result=redisConnection.set(id.getBytes(),serializedObject);
  if (!result.equals("String_Node_Str")) {
    throw new StorageException("String_Node_Str" + id);
  }
}
Program: 70131
Project: 70131
Buggy source:
/** 
 * Returns the object with id @id This function retrieves the object from any location
 * @param id
 * @return
 * @throws StorageException
 */
public static Object getByID(String id) throws StorageException, IOException, ClassNotFoundException {
  LOGGER.debug("String_Node_Str");
  byte[] serializedObject=redisConnection.get(id.getBytes());
  LOGGER.debug("String_Node_Str");
  Object ret=Serializer.deserialize(serializedObject);
  LOGGER.debug("String_Node_Str");
  return ret;
}

Fixed version (ground truth):
/** 
 * Returns the object with id @id This function retrieves the object from any location
 * @param id
 * @return
 * @throws StorageException
 */
public static Object getByID(String id) throws StorageException, IOException, ClassNotFoundException {
  byte[] serializedObject=redisConnection.get(id.getBytes());
  Object ret=Serializer.deserialize(serializedObject);
  ((StorageObject)ret).setID(id);
  return ret;
}
Program: 70132
Project: 70132
Buggy source:
/** 
 * Create a new version of the PSCO id @id in the host @hostname Returns the id of the new version
 * @param id
 * @param hostName
 * @return
 * @throws StorageException
 */
public static String newVersion(String id,boolean preserveSource,String hostName) throws StorageException {
  return null;
}

Fixed version (ground truth):
/** 
 * Create a new version of the PSCO id @id in the host @hostname Returns the id of the new version
 * @param id
 * @param hostName
 * @return
 * @throws StorageException
 */
public static String newVersion(String id,boolean preserveSource,String hostName) throws StorageException, IOException, ClassNotFoundException {
  Object obj=getByID(id);
  String new_id=UUID.randomUUID().toString();
  makePersistent(obj,new_id);
  if (!preserveSource) {
    removeById(id);
  }
  return new_id;
}
Program: 70133
Project: 70133
Buggy source:
/** 
 * Sets the ID
 */
protected void setID(String id) throws IOException, StorageException {
  if (this.id != null) {
    StorageItf.removeById(id);
    StorageItf.makePersistent(this,id);
  }
  this.id=id;
}

Fixed version (ground truth):
/** 
 * Sets the ID
 */
protected void setID(String id) throws IOException, StorageException {
  this.id=id;
}
Program: 70134
Project: 70134
Buggy source:
private static String getLsCpuOutput() throws InvalidMapException {
  String cmdOutput=null;
  ProcessBuilder pb=new ProcessBuilder("String_Node_Str");
  try {
    Process process=pb.start();
    process.getOutputStream().close();
    int exitValue=process.waitFor();
    if (exitValue != 0) {
      throw new InvalidMapException("String_Node_Str" + exitValue);
    }
    StringBuilder sb=new StringBuilder();
    try (BufferedReader br=new BufferedReader(new InputStreamReader(process.getInputStream()))){
      String line=null;
      while ((line=br.readLine()) != null) {
        sb.append(line).append("String_Node_Str");
      }
    }
 catch (    IOException ioe) {
      throw new InvalidMapException("String_Node_Str",ioe);
    }
    cmdOutput=sb.toString();
  }
 catch (  IOException ioe) {
    throw new InvalidMapException("String_Node_Str",ioe);
  }
catch (  InterruptedException ie) {
    throw new InvalidMapException("String_Node_Str",ie);
  }
  return cmdOutput;
}

Fixed version (ground truth):
private static String getLsCpuOutput() throws InvalidMapException {
  String cmdOutput=null;
  ProcessBuilder pb=new ProcessBuilder("String_Node_Str");
  try {
    pb.environment().remove(Tracer.LD_PRELOAD);
    Process process=pb.start();
    process.getOutputStream().close();
    int exitValue=process.waitFor();
    if (exitValue != 0) {
      throw new InvalidMapException("String_Node_Str" + exitValue);
    }
    StringBuilder sb=new StringBuilder();
    try (BufferedReader br=new BufferedReader(new InputStreamReader(process.getInputStream()))){
      String line=null;
      while ((line=br.readLine()) != null) {
        sb.append(line).append("String_Node_Str");
      }
    }
 catch (    IOException ioe) {
      throw new InvalidMapException("String_Node_Str",ioe);
    }
    cmdOutput=sb.toString();
  }
 catch (  IOException ioe) {
    throw new InvalidMapException("String_Node_Str",ioe);
  }
catch (  InterruptedException ie) {
    throw new InvalidMapException("String_Node_Str",ie);
  }
  return cmdOutput;
}
Program: 70135
Project: 70135
Buggy source:
/** 
 * New Core Elements have been detected; the Task Scheduler needs to be notified to modify any internal structure using that information.
 */
public final void coreElementsUpdated(){
  LOGGER.info("String_Node_Str");
  int newCoreCount=CoreManager.getCoreCount();
  SchedulingInformation.updateCoreCount(newCoreCount);
  this.blockedActions.updateCoreCount(newCoreCount);
  this.readyCounts=new int[newCoreCount];
  for (  ResourceScheduler<P,T,I> rs : workers.values()) {
    rs.updatedCoreElements(newCoreCount);
  }
}

Fixed version (ground truth):
/** 
 * New Core Elements have been detected; the Task Scheduler needs to be notified to modify any internal structure using that information.
 */
public final void coreElementsUpdated(){
  LOGGER.info("String_Node_Str");
  int newCoreCount=CoreManager.getCoreCount();
  SchedulingInformation.updateCoreCount(newCoreCount);
  this.blockedActions.updateCoreCount(newCoreCount);
  this.readyCounts=new int[newCoreCount];
  for (  ResourceScheduler<P,T,I> rs : workers.values()) {
    rs.updatedCoreElements(newCoreCount);
    SchedulingInformation.updateResource(rs);
  }
}
Program: 70136
Project: 70136
Buggy source:
@SuppressWarnings("String_Node_Str") public static <P extends Profile,T extends WorkerResourceDescription,I extends Implementation<T>>void changesOnWorker(ResourceScheduler<P,T,I> ui){
  for (  LinkedList<ResourceScheduler<Profile,WorkerResourceDescription,Implementation<WorkerResourceDescription>>> coreToWorker : coreToWorkers) {
    coreToWorker.remove(ui);
  }
  SchedulingInformation.updateCoreCount(CoreManager.getCoreCount());
  LinkedList<Integer> executableCores=ui.getExecutableCores();
  for (  int coreId : executableCores) {
    coreToWorkers.get(coreId).add((ResourceScheduler<Profile,WorkerResourceDescription,Implementation<WorkerResourceDescription>>)ui);
  }
}

Fixed version (ground truth):
public static <P extends Profile,T extends WorkerResourceDescription,I extends Implementation<T>>void changesOnWorker(ResourceScheduler<P,T,I> ui){
  for (  LinkedList<ResourceScheduler<Profile,WorkerResourceDescription,Implementation<WorkerResourceDescription>>> coreToWorker : coreToWorkers) {
    coreToWorker.remove(ui);
  }
  SchedulingInformation.updateCoreCount(CoreManager.getCoreCount());
  updateResource(ui);
}
Program: 70137
Project: 70137
Buggy source:
@Decaf(dfScript="String_Node_Str",mpiRunner="String_Node_Str",computingNodes="String_Node_Str") @Constraints(computingUnits="String_Node_Str") Integer taskConcurrentMultipleDecaf(@Parameter(type=Type.FILE,direction=Direction.OUT,stream=Stream.STDOUT) String fileOut);

Fixed version (ground truth):
@Constraints(computingUnits="String_Node_Str") Integer taskConcurrentMultipleDecaf(@Parameter(type=Type.FILE,direction=Direction.OUT,stream=Stream.STDOUT) String fileOut);
Program: 70138
Project: 70138
Buggy source:
@Decaf(dfScript="String_Node_Str",mpiRunner="String_Node_Str",computingNodes="String_Node_Str") @Constraints(computingUnits="String_Node_Str") int taskSingleDecaf(@Parameter(type=Type.FILE,direction=Direction.OUT,stream=Stream.STDOUT) String fileOut);

Fixed version (ground truth):
@Constraints(computingUnits="String_Node_Str") int taskSingleDecaf(@Parameter(type=Type.FILE,direction=Direction.OUT,stream=Stream.STDOUT) String fileOut);
Program: 70139
Project: 70139
Buggy source:
@Decaf(dfScript="String_Node_Str",mpiRunner="String_Node_Str",computingNodes="String_Node_Str") @Constraints(computingUnits="String_Node_Str") Integer taskMultipleDecaf(@Parameter(type=Type.FILE,direction=Direction.OUT,stream=Stream.STDOUT) String fileOut);

Fixed version (ground truth):
@Constraints(computingUnits="String_Node_Str") Integer taskMultipleDecaf(@Parameter(type=Type.FILE,direction=Direction.OUT,stream=Stream.STDOUT) String fileOut);
Program: 70140
Project: 70140
Buggy source:
/** 
 * Sets MPI / OMPSs environment variables
 */
private static void setEnvironmentVariables(){
  String hostname="String_Node_Str";
  try {
    hostname=InetAddress.getLocalHost().getHostName();
  }
 catch (  UnknownHostException e1) {
    ErrorManager.warn("String_Node_Str" + hostname);
  }
  GATWorker.hostnames.add(hostname);
  ++GATWorker.numNodes;
  boolean firstElement=true;
  StringBuilder hostnamesSTR=new StringBuilder();
  for (Iterator<String> it=GATWorker.hostnames.iterator(); it.hasNext(); ) {
    String nodeName=it.next();
    if (nodeName.endsWith("String_Node_Str")) {
      nodeName=nodeName.substring(0,hostname.lastIndexOf("String_Node_Str"));
    }
    if (firstElement) {
      firstElement=false;
      hostnamesSTR.append(hostname);
      for (int i=1; i < GATWorker.cus; ++i) {
        hostnamesSTR.append("String_Node_Str").append(hostname);
      }
    }
 else {
      for (int i=0; i < GATWorker.cus; ++i) {
        hostnamesSTR.append("String_Node_Str").append(hostname);
      }
    }
  }
  if (GATWorker.debug) {
    System.out.println("String_Node_Str" + hostnamesSTR.toString());
    System.out.println("String_Node_Str" + GATWorker.numNodes);
    System.out.println("String_Node_Str" + GATWorker.cus);
  }
  System.setProperty(Constants.COMPSS_HOSTNAMES,hostnamesSTR.toString());
  System.setProperty(Constants.COMPSS_NUM_NODES,String.valueOf(GATWorker.numNodes));
  System.setProperty(Constants.COMPSS_NUM_THREADS,String.valueOf(GATWorker.cus));
}

Fixed version (ground truth):
/** 
 * Sets MPI / OMPSs environment variables
 */
private static void setEnvironmentVariables(){
  String hostname="String_Node_Str";
  try {
    hostname=InetAddress.getLocalHost().getHostName();
  }
 catch (  UnknownHostException e1) {
    ErrorManager.warn("String_Node_Str" + hostname);
  }
  GATWorker.hostnames.add(hostname);
  ++GATWorker.numNodes;
  boolean firstElement=true;
  StringBuilder hostnamesSTR=new StringBuilder();
  for (  String nodeName : GATWorker.hostnames) {
    if (nodeName.endsWith("String_Node_Str")) {
      nodeName=nodeName.substring(0,nodeName.lastIndexOf("String_Node_Str"));
    }
    if (firstElement) {
      firstElement=false;
      hostnamesSTR.append(nodeName);
      for (int i=1; i < GATWorker.cus; ++i) {
        hostnamesSTR.append("String_Node_Str").append(nodeName);
      }
    }
 else {
      for (int i=0; i < GATWorker.cus; ++i) {
        hostnamesSTR.append("String_Node_Str").append(nodeName);
      }
    }
  }
  if (GATWorker.debug) {
    System.out.println("String_Node_Str" + hostnamesSTR.toString());
    System.out.println("String_Node_Str" + GATWorker.numNodes);
    System.out.println("String_Node_Str" + GATWorker.cus);
  }
  System.setProperty(Constants.COMPSS_HOSTNAMES,hostnamesSTR.toString());
  System.setProperty(Constants.COMPSS_NUM_NODES,String.valueOf(GATWorker.numNodes));
  System.setProperty(Constants.COMPSS_NUM_THREADS,String.valueOf(GATWorker.cus));
}
Program: 70141
Project: 70141
Buggy source:
private void deleteFolder(File folder){
  if (folder.isDirectory()) {
    for (    File f : folder.listFiles()) {
      deleteFolder(f);
    }
  }
  if (!folder.delete()) {
    logger.error("String_Node_Str" + (folder == null ? "String_Node_Str" : folder.getName()));
  }
}

Fixed version (ground truth):
private void deleteFolder(File folder){
  if (folder.isDirectory()) {
    for (    File f : folder.listFiles()) {
      deleteFolder(f);
    }
  }
  if (!folder.delete()) {
    LOGGER.error("String_Node_Str" + (folder == null ? "String_Node_Str" : folder.getName()));
  }
}
Program: 70143
Project: 70143
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");
    Thread.currentThread().interrupt();
  }
  if (debug) {
    logger.debug("String_Node_Str" + copy.getName() + "String_Node_Str"+ copy.getId()+ "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");
    Thread.currentThread().interrupt();
  }
  if (DEBUG) {
    LOGGER.debug("String_Node_Str" + copy.getName() + "String_Node_Str"+ copy.getId()+ "String_Node_Str");
  }
}
Program: 70144
Project: 70144
Buggy source:
@Override public void setWorkerIsReady(String nodeName){
  logger.info("String_Node_Str" + nodeName);
  WorkerStarter ws=WorkerStarter.getWorkerStarter(nodeName);
  if (ws != null) {
    ws.setWorkerIsReady();
  }
 else {
    logger.warn("String_Node_Str" + nodeName + "String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void setWorkerIsReady(String nodeName){
  logger.info("String_Node_Str" + nodeName + "String_Node_Str");
  WorkerStarter ws=WorkerStarter.getWorkerStarter(nodeName);
  if (ws != null) {
    ws.setWorkerIsReady();
  }
 else {
    logger.warn("String_Node_Str" + nodeName + "String_Node_Str");
  }
}
Program: 70146
Project: 70146
Buggy source:
public static Map<String,String> getEnvironment(NIOWorker nw){
  Map<String,String> env=new HashMap<>();
  String ldLibraryPath=System.getenv(LIBRARY_PATH_ENV);
  if (ldLibraryPath == null) {
    ldLibraryPath=nw.getLibPath();
  }
 else {
    ldLibraryPath=ldLibraryPath.concat("String_Node_Str" + nw.getLibPath());
  }
  ldLibraryPath=ldLibraryPath.concat("String_Node_Str" + nw.getInstallDir() + C_LIB_RELATIVE_PATH);
  ldLibraryPath=ldLibraryPath.concat("String_Node_Str" + nw.getInstallDir() + COMMONS_LIB_RELATIVE_PATH);
  env.put("String_Node_Str",ldLibraryPath);
  return env;
}

Fixed version (ground truth):
public static Map<String,String> getEnvironment(NIOWorker nw){
  Map<String,String> env=new HashMap<>();
  String ldLibraryPath=System.getenv(LIBRARY_PATH_ENV);
  if (ldLibraryPath == null) {
    ldLibraryPath=nw.getLibPath();
  }
 else {
    ldLibraryPath=ldLibraryPath.concat("String_Node_Str" + nw.getLibPath());
  }
  ldLibraryPath=ldLibraryPath.concat("String_Node_Str" + nw.getInstallDir() + C_LIB_RELATIVE_PATH);
  ldLibraryPath=ldLibraryPath.concat("String_Node_Str" + nw.getInstallDir() + BINDINGS_RELATIVE_PATH);
  env.put("String_Node_Str",ldLibraryPath);
  return env;
}
Program: 70147
Project: 70147
Buggy source:
public static Map<String,String> getEnvironment(NIOWorker nw){
  Map<String,String> env=new HashMap<>();
  String pycompssHome=nw.getInstallDir() + PYCOMPSS_RELATIVE_PATH;
  env.put("String_Node_Str",pycompssHome);
  String pythonPath=System.getenv("String_Node_Str");
  if (pythonPath == null) {
    pythonPath=pycompssHome + "String_Node_Str" + nw.getPythonpath()+ "String_Node_Str"+ nw.getAppDir();
  }
 else {
    pythonPath=pycompssHome + "String_Node_Str" + nw.getPythonpath()+ "String_Node_Str"+ nw.getAppDir()+ pythonPath;
  }
  env.put("String_Node_Str",pythonPath);
  String ldLibraryPath=System.getenv("String_Node_Str");
  if (ldLibraryPath == null) {
    ldLibraryPath=nw.getLibPath();
  }
 else {
    ldLibraryPath=ldLibraryPath.concat("String_Node_Str" + nw.getLibPath());
  }
  env.put("String_Node_Str",ldLibraryPath);
  return env;
}

Fixed version (ground truth):
public static Map<String,String> getEnvironment(NIOWorker nw){
  Map<String,String> env=new HashMap<>();
  String pycompssHome=nw.getInstallDir() + PYCOMPSS_RELATIVE_PATH;
  env.put("String_Node_Str",pycompssHome);
  String pythonPath=System.getenv("String_Node_Str");
  if (pythonPath == null) {
    pythonPath=pycompssHome + "String_Node_Str" + nw.getPythonpath()+ "String_Node_Str"+ nw.getAppDir();
  }
 else {
    pythonPath=pycompssHome + "String_Node_Str" + nw.getPythonpath()+ "String_Node_Str"+ nw.getAppDir()+ pythonPath;
  }
  env.put("String_Node_Str",pythonPath);
  String ldLibraryPath=System.getenv("String_Node_Str");
  if (ldLibraryPath == null) {
    ldLibraryPath=nw.getLibPath();
  }
 else {
    ldLibraryPath=ldLibraryPath.concat("String_Node_Str" + nw.getLibPath());
  }
  String bindingsHome=nw.getInstallDir() + BINDINGS_RELATIVE_PATH;
  ldLibraryPath=ldLibraryPath.concat("String_Node_Str" + bindingsHome);
  env.put("String_Node_Str",ldLibraryPath);
  return env;
}
Program: 70148
Project: 70148
Buggy source:
/** 
 * We have explicitly called the barrier API. STEPS: Add a new synchronization node. Add an edge from last synchronization point to barrier. Add edges from writer tasks to barrier
 */
private void addNewBarrier(){
  synchronizationId++;
  taskDetectedAfterSync=false;
  this.GM.addBarrierToGraph(synchronizationId);
  if (synchronizationId > 1) {
    this.GM.addEdgeToGraph("String_Node_Str" + (synchronizationId - 1),"String_Node_Str" + synchronizationId,"String_Node_Str");
  }
  for (  Task writer : writers.values()) {
    this.GM.addEdgeToGraph(String.valueOf(writer.getId()),"String_Node_Str" + synchronizationId,"String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * We have explicitly called the barrier API. STEPS: Add a new synchronization node. Add an edge from last synchronization point to barrier. Add edges from writer tasks to barrier
 */
private void addNewBarrier(){
  synchronizationId++;
  taskDetectedAfterSync=false;
  this.GM.addBarrierToGraph(synchronizationId);
  if (synchronizationId > 1) {
    this.GM.addEdgeToGraph("String_Node_Str" + (synchronizationId - 1),"String_Node_Str" + synchronizationId,"String_Node_Str");
  }
  HashSet<Task> uniqueWriters=new HashSet<>(writers.values());
  for (  Task writer : uniqueWriters) {
    if (writer.getSynchronizationId() == (synchronizationId - 1)) {
      this.GM.addEdgeToGraph(String.valueOf(writer.getId()),"String_Node_Str" + synchronizationId,"String_Node_Str");
    }
  }
}
Program: 70149
Project: 70149
Buggy source:
public static Integer align(String pFlag,String pMode,String dFlag,String database,String iFlag,String partitionFile,String oFlag,String partitionOutput){
  return -1;
}

Fixed version (ground truth):
/** 
 * Dummy implementation to call the BLAST binary for algin withou extra CMD args
 * @param pFlag
 * @param pMode
 * @param dFlag
 * @param database
 * @param iFlag
 * @param partitionFile
 * @param oFlag
 * @param partitionOutput
 * @return
 */
public static Integer align(String pFlag,String pMode,String dFlag,String database,String iFlag,String partitionFile,String oFlag,String partitionOutput){
  return -1;
}