nus-yam/ex-repair huggingface dataset:
Program: 173258
Project: 173258
Buggy source:
/** 
 * Send messages to the particular id
 * @param id id to be used for sending messages
 * @param message the message
 * @return true if the message is accepted to be sent
 */
public boolean sendMessage(int id,MPIMessage message,MPIMessageListener callback){
  lock.lock();
  try {
    return pendingSends.offer(new MPISendRequests(id,message.getHeader().getEdge(),message,callback));
  }
  finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
/** 
 * Send messages to the particular id
 * @param id id to be used for sending messages
 * @param message the message
 * @return true if the message is accepted to be sent
 */
public boolean sendMessage(int id,MPIMessage message,MPIMessageListener callback){
  lock.lock();
  try {
    boolean offer=pendingSends.offer(new MPISendRequests(id,message.getHeader().getEdge(),message,callback));
    LOG.info(String.format("String_Node_Str",++pendingSendCount,pendingSends.size()));
    return offer;
  }
  finally {
    lock.unlock();
  }
}
Program: 173260
Project: 173260
Buggy source:
/** 
 * Serialized the message into the buffer
 * @param payload
 * @param sendMessage
 * @param buffer
 * @return true if the message is completely written
 */
private void serializeBody(Object payload,MPISendMessage sendMessage,MPIBuffer buffer){
  MessageType type=sendMessage.getMPIMessage().getType();
  LOG.log(Level.INFO,"String_Node_Str" + type);
switch (type) {
case INTEGER:
    break;
case LONG:
  break;
case DOUBLE:
break;
case OBJECT:
serializeObject(payload,sendMessage,buffer);
break;
case BYTE:
break;
case STRING:
break;
default :
break;
}
}

Fixed version (ground truth):
/** 
 * Serialized the message into the buffer
 * @param payload
 * @param sendMessage
 * @param buffer
 * @return true if the message is completely written
 */
private void serializeBody(Object payload,MPISendMessage sendMessage,MPIBuffer buffer){
  MessageType type=sendMessage.getMPIMessage().getType();
switch (type) {
case INTEGER:
    break;
case LONG:
  break;
case DOUBLE:
break;
case OBJECT:
serializeObject(payload,sendMessage,buffer);
break;
case BYTE:
break;
case STRING:
break;
default :
break;
}
}
Program: 173261
Project: 173261
Buggy source:
@Override public void onMessage(MessageHeader header,Object object){
  LOG.info("String_Node_Str");
  count++;
  if (count == 10) {
    status=Status.LOAD_RECEIVE_FINISHED;
  }
}

Fixed version (ground truth):
@Override public void onMessage(MessageHeader header,Object object){
  count++;
  LOG.info("String_Node_Str" + count);
  if (count == 10000) {
    status=Status.LOAD_RECEIVE_FINISHED;
  }
}
Program: 173262
Project: 173262
Buggy source:
@Override public void run(){
  LOG.log(Level.INFO,"String_Node_Str");
  for (int i=0; i < 10; i++) {
    IntData data=generateData();
    direct.send(0,data);
  }
  status=Status.MAP_FINISHED;
}

Fixed version (ground truth):
@Override public void run(){
  LOG.log(Level.INFO,"String_Node_Str");
  for (int i=0; i < 10000; i++) {
    IntData data=generateData();
    direct.send(0,data);
    Thread.yield();
  }
  status=Status.MAP_FINISHED;
}
Program: 173263
Project: 173263
Buggy source:
@Override public Object build(Object message,Object partialBuildObject){
  MPISendMessage sendMessage=(MPISendMessage)partialBuildObject;
  if (sendMessage.getMPIMessage().isComplete()) {
    sendMessage.setSerializedState(MPISendMessage.SerializedState.FINISHED);
    return sendMessage;
  }
  while (sendBuffers.size() > 0 && sendMessage.serializedState() != MPISendMessage.SerializedState.FINISHED) {
    MPIBuffer buffer=sendBuffers.poll();
    if (sendMessage.serializedState() == MPISendMessage.SerializedState.INIT) {
      buildHeader(buffer,sendMessage);
      sendMessage.setSerializedState(MPISendMessage.SerializedState.HEADER_BUILT);
    }
    if (sendMessage.serializedState() == MPISendMessage.SerializedState.HEADER_BUILT) {
      serializeBody(message,sendMessage,buffer);
      sendMessage.setSerializedState(MPISendMessage.SerializedState.BODY);
    }
 else     if (sendMessage.serializedState() == MPISendMessage.SerializedState.BODY) {
      serializeBody(message,sendMessage,buffer);
    }
    sendMessage.getMPIMessage().addBuffer(buffer);
    if (sendMessage.serializedState() == MPISendMessage.SerializedState.FINISHED) {
      MPIMessage mpiMessage=sendMessage.getMPIMessage();
      mpiMessage.setComplete(true);
    }
  }
  return sendMessage;
}

Fixed version (ground truth):
@Override public Object build(Object message,Object partialBuildObject){
  MPISendMessage sendMessage=(MPISendMessage)partialBuildObject;
  if (sendMessage.getMPIMessage().isComplete()) {
    sendMessage.setSerializedState(MPISendMessage.SerializedState.FINISHED);
    return sendMessage;
  }
  while (sendBuffers.size() > 0 && sendMessage.serializedState() != MPISendMessage.SerializedState.FINISHED) {
    MPIBuffer buffer=sendBuffers.poll();
    if (sendMessage.serializedState() == MPISendMessage.SerializedState.INIT) {
      buildHeader(buffer,sendMessage);
      sendMessage.setSerializedState(MPISendMessage.SerializedState.HEADER_BUILT);
    }
    if (sendMessage.serializedState() == MPISendMessage.SerializedState.HEADER_BUILT) {
      serializeBody(message,sendMessage,buffer);
    }
 else     if (sendMessage.serializedState() == MPISendMessage.SerializedState.BODY) {
      serializeBody(message,sendMessage,buffer);
    }
    sendMessage.getMPIMessage().addBuffer(buffer);
    if (sendMessage.serializedState() == MPISendMessage.SerializedState.FINISHED) {
      MPIMessage mpiMessage=sendMessage.getMPIMessage();
      mpiMessage.setComplete(true);
      LOG.info("String_Node_Str");
    }
 else {
      LOG.info("String_Node_Str");
    }
  }
  return sendMessage;
}
Program: 173265
Project: 173265
Buggy source:
private void buildHeader(MPIBuffer buffer,MPISendMessage sendMessage){
  if (buffer.getCapacity() < 16) {
    throw new RuntimeException("String_Node_Str");
  }
  ByteBuffer byteBuffer=buffer.getByteBuffer();
  byteBuffer.putInt(sendMessage.getSource());
  byteBuffer.putInt(sendMessage.getPath());
  byteBuffer.putInt(sendMessage.getSubEdge());
  byteBuffer.putInt(0);
  sendMessage.setWrittenHeaderSize(16);
  buffer.setSize(16);
}

Fixed version (ground truth):
private void buildHeader(MPIBuffer buffer,MPISendMessage sendMessage){
  if (buffer.getCapacity() < 16) {
    throw new RuntimeException("String_Node_Str");
  }
  LOG.info("String_Node_Str");
  ByteBuffer byteBuffer=buffer.getByteBuffer();
  byteBuffer.putInt(sendMessage.getSource());
  byteBuffer.putInt(sendMessage.getPath());
  byteBuffer.putInt(sendMessage.getSubEdge());
  byteBuffer.putInt(0);
  sendMessage.setWrittenHeaderSize(16);
  buffer.setSize(16);
}
Program: 173266
Project: 173266
Buggy source:
@Override protected void routeSendMessage(int src,MPISendMessage message,List<Integer> routes){
  Set<Integer> routing=router.getDownstreamTasks(src);
  if (routing == null) {
    throw new RuntimeException("String_Node_Str" + src);
  }
  routes.addAll(routing);
}

Fixed version (ground truth):
@Override protected void routeSendMessage(int src,List<Integer> routes){
  Set<Integer> routing=router.getDownstreamTasks(src);
  if (routing == null) {
    throw new RuntimeException("String_Node_Str" + src);
  }
  routes.addAll(routing);
}
Program: 173267
Project: 173267
Buggy source:
@Override protected void routeSendMessage(int source,MPISendMessage message,List<Integer> routes){
}

Fixed version (ground truth):
@Override protected void routeSendMessage(int source,List<Integer> routes){
}
Program: 173268
Project: 173268
Buggy source:
@Override public void progress(){
  lock.lock();
  try {
    while (pendingSendMessages.size() > 0) {
      Pair<Object,MPISendMessage> pair=pendingSendMessages.peek();
      MPISendMessage message=(MPISendMessage)messageSerializer.build(pair.getKey(),pair.getValue());
      if (message.serializedState() == MPISendMessage.SerializedState.FINISHED) {
        List<Integer> routes=new ArrayList<>();
        routeSendMessage(message.getSource(),message,routes);
        sendMessage(message.getMPIMessage(),routes);
        pendingSendMessages.remove();
      }
 else {
        break;
      }
    }
  }
  finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
@Override public void progress(){
  lock.lock();
  try {
    while (pendingSendMessages.size() > 0) {
      Pair<Object,MPISendMessage> pair=pendingSendMessages.peek();
      MPISendMessage message=(MPISendMessage)messageSerializer.build(pair.getKey(),pair.getValue());
      if (message.serializedState() == MPISendMessage.SerializedState.FINISHED) {
        List<Integer> routes=new ArrayList<>();
        routeSendMessage(message.getSource(),routes);
        sendMessage(message.getMPIMessage(),routes);
        pendingSendMessages.remove();
      }
 else {
        break;
      }
    }
  }
  finally {
    lock.unlock();
  }
}
Program: 173269
Project: 173269
Buggy source:
protected abstract void routeSendMessage(int source,MPISendMessage message,List<Integer> routes);

Fixed version (ground truth):
protected abstract void routeSendMessage(int source,List<Integer> routes);
Program: 173270
Project: 173270
Buggy source:
@Override protected void routeSendMessage(int source,MPISendMessage message,List<Integer> routes){
  Set<Integer> routing=router.getDownstreamTasks(source);
  if (routing == null) {
    throw new RuntimeException("String_Node_Str" + source);
  }
  routes.addAll(routing);
}

Fixed version (ground truth):
@Override protected void routeSendMessage(int source,List<Integer> routes){
  Set<Integer> routing=router.getDownstreamTasks(source);
  if (routing == null) {
    throw new RuntimeException("String_Node_Str" + source);
  }
  routes.addAll(routing);
}
Program: 173271
Project: 173271
Buggy source:
@Override protected void routeSendMessage(int source,MPISendMessage message,List<Integer> routes){
  Set<Integer> downstreamTasks=router.getDownstreamTasks(source);
  routes.addAll(downstreamTasks);
}

Fixed version (ground truth):
@Override protected void routeSendMessage(int source,List<Integer> routes){
  Set<Integer> downstreamTasks=router.getDownstreamTasks(source);
  routes.addAll(downstreamTasks);
}
Program: 173272
Project: 173272
Buggy source:
@Override protected void routeSendMessage(int source,MPISendMessage message,List<Integer> routes){
  Set<Integer> routing=router.getDownstreamTasks(source);
}

Fixed version (ground truth):
@Override protected void routeSendMessage(int source,List<Integer> routes){
  Set<Integer> routing=router.getDownstreamTasks(source);
}
Program: 173273
Project: 173273
Buggy source:
public DirectRouter(TaskPlan plan,Set<Integer> srscs,int dest){
  this.destination=dest;
  this.taskPlan=plan;
  this.downStream=new HashSet<>();
  this.downStream.add(dest);
  this.upstream=new HashMap<>();
  List<Integer> sources=new ArrayList<>();
  sources.addAll(srscs);
  this.upstream.put(0,sources);
  int destinationExecutor=executor(destination);
  receiveExecutors=new HashSet<>();
  if (destinationExecutor == taskPlan.getThisExecutor()) {
    for (    int s : srscs) {
      int e=executor(s);
      if (destinationExecutor != e) {
        receiveExecutors.add(e);
      }
    }
  }
  this.thisExecutorTasks=taskPlan.getChannelsOfExecutor(taskPlan.getThisExecutor());
}

Fixed version (ground truth):
public DirectRouter(TaskPlan plan,Set<Integer> srscs,int dest){
  this.destination=dest;
  this.taskPlan=plan;
  this.downStream=new HashSet<>();
  this.downStream.add(dest);
  this.upstream=new HashMap<>();
  List<Integer> sources=new ArrayList<>();
  sources.addAll(srscs);
  this.upstream.put(0,sources);
  int destinationExecutor=taskPlan.getExecutorForChannel(destination);
  receiveExecutors=new HashSet<>();
  if (destinationExecutor == taskPlan.getThisExecutor()) {
    for (    int s : srscs) {
      int e=taskPlan.getExecutorForChannel(s);
      if (destinationExecutor != e) {
        receiveExecutors.add(e);
      }
    }
  }
  this.thisExecutorTasks=taskPlan.getChannelsOfExecutor(taskPlan.getThisExecutor());
}
Program: 173274
Project: 173274
Buggy source:
@Override public Set<Integer> getDownstreamTasks(int source){
  return null;
}

Fixed version (ground truth):
@Override public Set<Integer> getDownstreamTasks(int source){
  return downStream;
}
Program: 173275
Project: 173275
Buggy source:
/** 
 * Initialize the data structure
 * @param cfg
 * @param plan
 * @param root
 * @param dests
 * @param strm
 */
public SingleTargetBinaryTreeRouter(Config cfg,TaskPlan plan,int root,Set<Integer> dests,int strm,int distinctRts){
  this.config=cfg;
  this.taskPlan=plan;
  this.sources=root;
  this.destinations=dests;
  this.stream=strm;
  this.distinctRoutes=distinctRts;
  this.interNodeDegree=MPIContext.interNodeDegree(cfg,2);
  this.intraNodeDegree=MPIContext.intraNodeDegree(cfg,2);
  tree=new BinaryTree(interNodeDegree,intraNodeDegree,taskPlan,root,dests);
  treeRoot=tree.buildInterGroupTree(0);
  Set<Integer> thisExecutorTasks=taskPlan.getChannelsOfExecutor(taskPlan.getThisExecutor());
  thisExecutorTasksOfOperation=new HashSet<>();
  for (  int t : thisExecutorTasks) {
    if (dests.contains(t) || root == t) {
      thisExecutorTasksOfOperation.add(t);
    }
  }
  receiveExecutors=new HashSet<>();
  for (  int t : thisExecutorTasksOfOperation) {
    Node search=BinaryTree.search(treeRoot,t);
    if (search == null) {
      continue;
    }
    receiveExecutors.addAll(search.getRemoteChildrenIds());
  }
  this.upstream=new HashMap<>();
  Set<Integer> recv=new HashSet<>();
  for (  int t : thisExecutorTasksOfOperation) {
    Node search=BinaryTree.search(treeRoot,t);
    if (search == null) {
      continue;
    }
    recv.addAll(search.getAllChildrenIds());
  }
  upstream.put(0,new ArrayList<>(recv));
  downStream=new HashSet<>();
}

Fixed version (ground truth):
/** 
 * Initialize the data structure
 * @param cfg
 * @param plan
 * @param root
 * @param dests
 * @param strm
 */
public SingleTargetBinaryTreeRouter(Config cfg,TaskPlan plan,int root,Set<Integer> dests,int strm,int distinctRts){
  this.config=cfg;
  this.taskPlan=plan;
  this.sources=root;
  this.destinations=dests;
  this.stream=strm;
  this.distinctRoutes=distinctRts;
  this.interNodeDegree=MPIContext.interNodeDegree(cfg,2);
  this.intraNodeDegree=MPIContext.intraNodeDegree(cfg,2);
  tree=new BinaryTree(interNodeDegree,intraNodeDegree,taskPlan,root,dests);
  treeRoot=tree.buildInterGroupTree(0);
  Set<Integer> thisExecutorTasks=taskPlan.getChannelsOfExecutor(taskPlan.getThisExecutor());
  thisExecutorTasksOfOperation=new HashSet<>();
  for (  int t : thisExecutorTasks) {
    if (dests.contains(t) || root == t) {
      thisExecutorTasksOfOperation.add(t);
    }
  }
  this.upstream=new HashMap<>();
  Set<Integer> recv=new HashSet<>();
  receiveExecutors=new HashSet<>();
  for (  int t : thisExecutorTasksOfOperation) {
    Node search=BinaryTree.search(treeRoot,t);
    if (search == null) {
      continue;
    }
    receiveExecutors.addAll(search.getRemoteChildrenIds());
    recv.addAll(search.getAllChildrenIds());
  }
  upstream.put(0,new ArrayList<>(recv));
  downStream=new HashSet<>();
}
Program: 173276
Project: 173276
Buggy source:
@Override public void run(){
  LOG.log(Level.INFO,"String_Node_Str");
  for (int i=0; i < 100000; i++) {
    IntData data=generateData();
    while (!reduce.send(0,data)) {
      try {
        Thread.sleep(1);
      }
 catch (      InterruptedException e) {
        e.printStackTrace();
      }
    }
    sendCount++;
    Thread.yield();
  }
  status=Status.MAP_FINISHED;
}

Fixed version (ground truth):
@Override public void run(){
  LOG.log(Level.INFO,"String_Node_Str");
  for (int i=0; i < 100000; i++) {
    IntData data=generateData();
    for (int j=0; j < NO_OF_TASKS - 1; j++) {
      while (!reduce.send(j,data)) {
        try {
          Thread.sleep(1);
        }
 catch (        InterruptedException e) {
          e.printStackTrace();
        }
      }
    }
    sendCount++;
    Thread.yield();
  }
  status=Status.MAP_FINISHED;
}
Program: 173277
Project: 173277
Buggy source:
public Builder subEdge(int edge){
  header.subEdge=edge;
  return this;
}

Fixed version (ground truth):
public Builder subEdge(int edge){
  header.destinationIdentifier=edge;
  return this;
}
Program: 173278
Project: 173278
Buggy source:
/** 
 * Setup the receives and send sendBuffers
 */
protected void setupCommunication(){
  int maxReceiveBuffers=MPIContext.receiveBufferCount(config);
  int receiveBufferSize=MPIContext.bufferSize(config);
  for (  Integer recv : router.receivingExecutors()) {
    Queue<MPIBuffer> recvList=new LinkedList<>();
    for (int i=0; i < maxReceiveBuffers; i++) {
      recvList.add(new MPIBuffer(receiveBufferSize));
    }
    LOG.info(instancePlan.getThisExecutor() + "String_Node_Str" + recv);
    channel.receiveMessage(recv,edge,this,recvList);
    receiveBuffers.put(recv,recvList);
  }
  if (!router.isLast() && this.partialReceiver != null) {
    partialReceiver.init(router.receiveExpectedTaskIds());
  }
 else {
    this.finalReceiver.init(router.receiveExpectedTaskIds());
  }
  int sendBufferSize=MPIContext.bufferSize(config);
  int sendBufferCount=MPIContext.sendBuffersCount(config);
  for (int i=0; i < sendBufferCount; i++) {
    MPIBuffer buffer=new MPIBuffer(sendBufferSize);
    sendBuffers.offer(buffer);
  }
}

Fixed version (ground truth):
/** 
 * Setup the receives and send sendBuffers
 */
protected void setupCommunication(){
  int maxReceiveBuffers=MPIContext.receiveBufferCount(config);
  int receiveBufferSize=MPIContext.bufferSize(config);
  for (  Integer recv : router.receivingExecutors()) {
    Queue<MPIBuffer> recvList=new LinkedList<>();
    for (int i=0; i < maxReceiveBuffers; i++) {
      recvList.add(new MPIBuffer(receiveBufferSize));
    }
    LOG.info(instancePlan.getThisExecutor() + "String_Node_Str" + recv);
    channel.receiveMessage(recv,edge,this,recvList);
    receiveBuffers.put(recv,recvList);
  }
  if (this.partialReceiver != null) {
    partialReceiver.init(router.receiveExpectedTaskIds());
  }
 else {
    this.finalReceiver.init(router.receiveExpectedTaskIds());
  }
  int sendBufferSize=MPIContext.bufferSize(config);
  int sendBufferCount=MPIContext.sendBuffersCount(config);
  for (int i=0; i < sendBufferCount; i++) {
    MPIBuffer buffer=new MPIBuffer(sendBufferSize);
    sendBuffers.offer(buffer);
  }
}
Program: 173279
Project: 173279
Buggy source:
@Override public void onReceiveComplete(int id,int e,MPIBuffer buffer){
  lock.lock();
  try {
    MPIMessage currentMessage=currentMessages.get(id);
    if (currentMessage == null) {
      currentMessage=new MPIMessage(type,MPIMessageDirection.IN,this);
      currentMessages.put(id,currentMessage);
    }
    Object object=messageDeSerializer.buid(buffer,currentMessage,e);
    if (currentMessage.isComplete()) {
      currentMessage.incrementRefCount();
      passMessageDownstream(currentMessage);
      MessageHeader header=currentMessage.getHeader();
      if (!router.isLast() && partialReceiver != null) {
        partialReceiver.onMessage(header,object);
      }
 else {
        finalReceiver.onMessage(header,object);
      }
      currentMessages.remove(id);
      currentMessage.release();
    }
 else {
      LOG.info("String_Node_Str");
    }
  }
  finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
@Override public void onReceiveComplete(int id,int e,MPIBuffer buffer){
  lock.lock();
  try {
    MPIMessage currentMessage=currentMessages.get(id);
    if (currentMessage == null) {
      currentMessage=new MPIMessage(type,MPIMessageDirection.IN,this);
      currentMessages.put(id,currentMessage);
    }
    Object object=messageDeSerializer.buid(buffer,currentMessage,e);
    if (currentMessage.isComplete()) {
      currentMessage.incrementRefCount();
      passMessageDownstream(currentMessage);
      receiveMessage(currentMessage,object);
      currentMessages.remove(id);
      currentMessage.release();
    }
 else {
      LOG.info("String_Node_Str");
    }
  }
  finally {
    lock.unlock();
  }
}
Program: 173280
Project: 173280
Buggy source:
@Override public boolean isLast(){
  return false;
}

Fixed version (ground truth):
@Override public boolean isLast(int task){
  return false;
}
Program: 173281
Project: 173281
Buggy source:
private void calculateRoutingTable(){
  ArrayList<Integer> sourceList=new ArrayList<>(sources);
  Collections.sort(sourceList);
  int routs=Math.min(Math.min(distinctRoutes,sourceList.size()),destinations.size());
  for (int i=0; i < sourceList.size(); i++) {
    int source=sourceList.get(i);
    int index=i % routs;
    Node root=null;
    Node search=tree.search(root,task);
    if (search != null) {
      Routing routing=getRouting(search);
      if (routing != null) {
        throw new RuntimeException("String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
private void calculateRoutingTable(){
  ArrayList<Integer> sourceList=new ArrayList<>(sources);
  Collections.sort(sourceList);
  int routs=Math.min(Math.min(distinctRoutes,sourceList.size()),destinations.size());
  for (int i=0; i < sourceList.size(); i++) {
    int source=sourceList.get(i);
    int index=i % routs;
    Node root=null;
    Node search=BinaryTree.search(root,0);
    if (search != null) {
      Routing routing=getRouting(search);
      if (routing != null) {
        throw new RuntimeException("String_Node_Str");
      }
    }
  }
}
Program: 173282
Project: 173282
Buggy source:
@Override public Map<Integer,List<Integer>> receiveExpectedTaskIds(){
  if (isLast()) {
    LOG.info(taskPlan.getThisExecutor() + "String_Node_Str" + upstream.get(0));
    return upstream;
  }
  return new HashMap<>();
}

Fixed version (ground truth):
@Override public Map<Integer,List<Integer>> receiveExpectedTaskIds(){
  if (thisExecutorTasks.contains(destination)) {
    LOG.info(taskPlan.getThisExecutor() + "String_Node_Str" + upstream.get(0));
    return upstream;
  }
  return new HashMap<>();
}
Program: 173283
Project: 173283
Buggy source:
@Override public boolean isLast(){
  Set<Integer> tasks=taskPlan.getChannelsOfExecutor(taskPlan.getThisExecutor());
  return tasks.contains(destination);
}

Fixed version (ground truth):
@Override public boolean isLast(int task){
  return thisExecutorTasks.contains(destination);
}
Program: 173284
Project: 173284
Buggy source:
public DirectRouter(TaskPlan plan,Set<Integer> srscs,int dest){
  this.destination=dest;
  this.taskPlan=plan;
  this.downStream=new HashSet<>();
  this.downStream.add(dest);
  this.upstream=new HashMap<>();
  List<Integer> sources=new ArrayList<>();
  sources.addAll(srscs);
  this.upstream.put(0,sources);
  int destinationExecutor=executor(destination);
  receiveExecutors=new HashSet<>();
  if (destinationExecutor == taskPlan.getThisExecutor()) {
    for (    int s : srscs) {
      int e=executor(s);
      if (destinationExecutor != e) {
        receiveExecutors.add(e);
      }
    }
  }
}

Fixed version (ground truth):
public DirectRouter(TaskPlan plan,Set<Integer> srscs,int dest){
  this.destination=dest;
  this.taskPlan=plan;
  this.downStream=new HashSet<>();
  this.downStream.add(dest);
  this.upstream=new HashMap<>();
  List<Integer> sources=new ArrayList<>();
  sources.addAll(srscs);
  this.upstream.put(0,sources);
  int destinationExecutor=executor(destination);
  receiveExecutors=new HashSet<>();
  if (destinationExecutor == taskPlan.getThisExecutor()) {
    for (    int s : srscs) {
      int e=executor(s);
      if (destinationExecutor != e) {
        receiveExecutors.add(e);
      }
    }
  }
  this.thisExecutorTasks=taskPlan.getChannelsOfExecutor(taskPlan.getThisExecutor());
}
Program: 173285
Project: 173285
Buggy source:
/** 
 * Is this the final task
 * @return
 */
boolean isLast();

Fixed version (ground truth):
/** 
 * Is this the final task
 * @return
 */
boolean isLast(int task);
Program: 173286
Project: 173286
Buggy source:
@Override public boolean isLast(){
  return false;
}

Fixed version (ground truth):
@Override public boolean isLast(int task){
  return false;
}
Program: 173287
Project: 173287
Buggy source:
protected IRouter setupRouting(){
  Set<Integer> sources=new HashSet<>();
  sources.add(source);
  return new BinaryTreeRouter(config,instancePlan,sources,destinations,edge,1);
}

Fixed version (ground truth):
protected void setupRouting(){
  Set<Integer> sources=new HashSet<>();
  sources.add(source);
  router=new BinaryTreeRouter(config,instancePlan,sources,destinations,edge,1);
}
Program: 173288
Project: 173288
Buggy source:
@Override protected IRouter setupRouting(){
  return null;
}

Fixed version (ground truth):
@Override protected void setupRouting(){
  return;
}
Program: 173289
Project: 173289
Buggy source:
protected abstract IRouter setupRouting();

Fixed version (ground truth):
protected abstract void setupRouting();
Program: 173290
Project: 173290
Buggy source:
@Override public void init(Config cfg,MessageType messageType,TaskPlan plan,int graphEdge,MessageReceiver rcvr,MessageReceiver partialRcvr){
  this.config=cfg;
  this.instancePlan=plan;
  this.edge=graphEdge;
  this.finalReceiver=rcvr;
  this.partialReceiver=partialRcvr;
  this.type=messageType;
  this.executor=instancePlan.getThisExecutor();
  int noOfSendBuffers=MPIContext.broadcastBufferCount(config);
  int sendBufferSize=MPIContext.bufferSize(config);
  this.sendBuffers=new ArrayBlockingQueue<MPIBuffer>(noOfSendBuffers);
  for (int i=0; i < noOfSendBuffers; i++) {
    sendBuffers.offer(new MPIBuffer(sendBufferSize));
  }
  this.receiveBuffers=new HashMap<>();
  router=setupRouting();
  pendingSendMessages=new ArrayBlockingQueue<Pair<Object,MPISendMessage>>(MPIContext.sendPendingMax(config,1024));
  setupCommunication();
  initSerializers();
}

Fixed version (ground truth):
@Override public void init(Config cfg,MessageType messageType,TaskPlan plan,int graphEdge,MessageReceiver rcvr,MessageReceiver partialRcvr){
  this.config=cfg;
  this.instancePlan=plan;
  this.edge=graphEdge;
  this.finalReceiver=rcvr;
  this.partialReceiver=partialRcvr;
  this.type=messageType;
  this.executor=instancePlan.getThisExecutor();
  int noOfSendBuffers=MPIContext.broadcastBufferCount(config);
  int sendBufferSize=MPIContext.bufferSize(config);
  this.sendBuffers=new ArrayBlockingQueue<MPIBuffer>(noOfSendBuffers);
  for (int i=0; i < noOfSendBuffers; i++) {
    sendBuffers.offer(new MPIBuffer(sendBufferSize));
  }
  this.receiveBuffers=new HashMap<>();
  setupRouting();
  pendingSendMessages=new ArrayBlockingQueue<Pair<Object,MPISendMessage>>(MPIContext.sendPendingMax(config,1024));
  setupCommunication();
  initSerializers();
}
Program: 173291
Project: 173291
Buggy source:
protected void receiveMessage(MPIMessage currentMessage,Object object){
  MessageHeader header=currentMessage.getHeader();
  int messageDestId=currentMessage.getHeader().getDestinationIdentifier();
  if (!router.isLast(messageDestId) && partialReceiver != null) {
    partialReceiver.onMessage(header,object);
  }
 else {
    finalReceiver.onMessage(header,object);
  }
}

Fixed version (ground truth):
protected void receiveMessage(MPIMessage currentMessage,Object object){
  MessageHeader header=currentMessage.getHeader();
  int messageDestId=currentMessage.getHeader().getDestinationIdentifier();
  if (!isLast(messageDestId) && partialReceiver != null) {
    partialReceiver.onMessage(header,object);
  }
 else {
    finalReceiver.onMessage(header,object);
  }
}
Program: 173292
Project: 173292
Buggy source:
/** 
 * Setup the receives and send sendBuffers
 */
protected void setupCommunication(){
  int maxReceiveBuffers=MPIContext.receiveBufferCount(config);
  int receiveBufferSize=MPIContext.bufferSize(config);
  for (  Integer recv : router.receivingExecutors()) {
    Queue<MPIBuffer> recvList=new LinkedList<>();
    for (int i=0; i < maxReceiveBuffers; i++) {
      recvList.add(new MPIBuffer(receiveBufferSize));
    }
    LOG.info(instancePlan.getThisExecutor() + "String_Node_Str" + recv);
    channel.receiveMessage(recv,edge,this,recvList);
    receiveBuffers.put(recv,recvList);
  }
  if (this.partialReceiver != null) {
    partialReceiver.init(router.receiveExpectedTaskIds());
  }
 else {
    this.finalReceiver.init(router.receiveExpectedTaskIds());
  }
  int sendBufferSize=MPIContext.bufferSize(config);
  int sendBufferCount=MPIContext.sendBuffersCount(config);
  for (int i=0; i < sendBufferCount; i++) {
    MPIBuffer buffer=new MPIBuffer(sendBufferSize);
    sendBuffers.offer(buffer);
  }
}

Fixed version (ground truth):
/** 
 * Setup the receives and send sendBuffers
 */
protected void setupCommunication(){
  int maxReceiveBuffers=MPIContext.receiveBufferCount(config);
  int receiveBufferSize=MPIContext.bufferSize(config);
  for (  Integer recv : receivingExecutors()) {
    Queue<MPIBuffer> recvList=new LinkedList<>();
    for (int i=0; i < maxReceiveBuffers; i++) {
      recvList.add(new MPIBuffer(receiveBufferSize));
    }
    LOG.info(instancePlan.getThisExecutor() + "String_Node_Str" + recv);
    channel.receiveMessage(recv,edge,this,recvList);
    receiveBuffers.put(recv,recvList);
  }
  if (this.partialReceiver != null) {
    partialReceiver.init(receiveExpectedTaskIds());
  }
 else {
    this.finalReceiver.init(receiveExpectedTaskIds());
  }
  int sendBufferSize=MPIContext.bufferSize(config);
  int sendBufferCount=MPIContext.sendBuffersCount(config);
  for (int i=0; i < sendBufferCount; i++) {
    MPIBuffer buffer=new MPIBuffer(sendBufferSize);
    sendBuffers.offer(buffer);
  }
}
Program: 173293
Project: 173293
Buggy source:
protected void sendMessage(MPIMessage msgObj1,List<Integer> sendIds){
  if (sendIds != null && sendIds.size() > 0) {
    msgObj1.incrementRefCount(sendIds.size());
    for (    int i : sendIds) {
      int e=router.executor(i);
      channel.sendMessage(e,msgObj1,this);
    }
  }
}

Fixed version (ground truth):
protected void sendMessage(MPIMessage msgObj1,List<Integer> sendIds){
  if (sendIds != null && sendIds.size() > 0) {
    msgObj1.incrementRefCount(sendIds.size());
    for (    int i : sendIds) {
      int e=instancePlan.getExecutorForChannel(i);
      channel.sendMessage(e,msgObj1,this);
    }
  }
}
Program: 173294
Project: 173294
Buggy source:
public IRouter setupRouting(){
  Set<Integer> destinations=new HashSet<>();
  destinations.add(destination);
  return new BinaryTreeRouter(config,instancePlan,destinations,sources,edge,1);
}

Fixed version (ground truth):
public void setupRouting(){
  Set<Integer> destinations=new HashSet<>();
  destinations.add(destination);
  this.router=new BinaryTreeRouter(config,instancePlan,destinations,sources,edge,1);
}
Program: 173295
Project: 173295
Buggy source:
@Override protected void receiveMessage(MPIMessage currentMessage,Object object){
  super.receiveMessage(currentMessage,object);
}

Fixed version (ground truth):
@Override protected void receiveMessage(MPIMessage currentMessage,Object object){
  MessageHeader header=currentMessage.getHeader();
  int messageDestId=currentMessage.getHeader().getDestinationIdentifier();
  if (!isLast(messageDestId) && partialReceiver != null) {
    partialReceiver.onMessage(header,object);
  }
 else {
    finalReceiver.onMessage(header,object);
  }
}
Program: 173296
Project: 173296
Buggy source:
@Override protected IRouter setupRouting(){
  return new DirectRouter(instancePlan,sources,destination);
}

Fixed version (ground truth):
@Override protected void setupRouting(){
  this.router=new DirectRouter(instancePlan,sources,destination);
}
Program: 173297
Project: 173297
Buggy source:
protected IRouter setupRouting(){
  return new LoadBalanceRouter(config,instancePlan,sources,destinations,edge,MPIContext.distinctRoutes(config,sources.size()));
}

Fixed version (ground truth):
protected void setupRouting(){
  this.router=new LoadBalanceRouter(config,instancePlan,sources,destinations,edge,MPIContext.distinctRoutes(config,sources.size()));
}
Program: 173299
Project: 173299
Buggy source:
/** 
 * Initialize the data flow communication
 * @param config the network configuration
 * @param instancePlan instance plan
 */
void init(Config config,int thisTask,TaskPlan instancePlan,Set<Integer> sources,Set<Integer> destinations,int stream,MessageReceiver receiver,MessageDeSerializer messageDeSerializer,MessageSerializer messageSerializer);

Fixed version (ground truth):
/** 
 * Initialize the data flow communication
 * @param config the network configuration
 * @param instancePlan instance plan
 */
void init(Config config,int thisTask,TaskPlan instancePlan,Set<Integer> sources,Set<Integer> destinations,int stream,MessageReceiver receiver,MessageDeSerializer messageDeSerializer,MessageSerializer messageSerializer,MessageReceiver partialReceiver);
Program: 173300
Project: 173300
Buggy source:
/** 
 * Indicate that a partial broadcast is finished
 */
void finish();

Fixed version (ground truth):
/** 
 * Indicate that a partial operation is finished
 */
void finish();
Program: 173301
Project: 173301
Buggy source:
private void set(int sourceId,int destId,int edge,int length,int lastNode){
  this.sourceId=sourceId;
  this.destId=destId;
  this.edge=edge;
  this.length=length;
  this.lastNode=lastNode;
}

Fixed version (ground truth):
private void set(int srcId,int dstId,int e,int l,int lNode){
  this.sourceId=srcId;
  this.destId=dstId;
  this.edge=e;
  this.length=l;
  this.lastNode=lNode;
}
Program: 173302
Project: 173302
Buggy source:
public static Builder newBuilder(int sourceId,int destId,int edge,int length,int lastNode){
  return new Builder(sourceId,destId,edge,length,lastNode);
}

Fixed version (ground truth):
public static Builder newBuilder(int srcId,int dstId,int e,int l,int lNode){
  return new Builder(srcId,dstId,e,l,lNode);
}
Program: 173303
Project: 173303
Buggy source:
public Builder reInit(int sourceId,int destId,int edge,int length,int lastNode){
  header.set(sourceId,destId,edge,length,lastNode);
  header.properties.clear();
  return this;
}

Fixed version (ground truth):
public Builder reInit(int sourceId,int destId,int edge,int length,int lastNode){
  header.set(sourceId,destId,edge,length,lastNode);
  header.subNodeDestingation=false;
  header.subNodeOrigin=false;
  header.properties.clear();
  return this;
}
Program: 173304
Project: 173304
Buggy source:
private MessageHeader(int sourceId,int destId,int edge,int length,int lastNode){
  this.sourceId=sourceId;
  this.destId=destId;
  this.edge=edge;
  this.length=length;
  this.lastNode=lastNode;
}

Fixed version (ground truth):
private MessageHeader(int srcId,int dstId,int e,int l,int lNode){
  this.sourceId=srcId;
  this.destId=dstId;
  this.edge=e;
  this.length=l;
  this.lastNode=lNode;
}
Program: 173305
Project: 173305
Buggy source:
@Override public void init(Config config,TaskPlan taskPlan){
  this.instancePlan=taskPlan;
  this.config=config;
}

Fixed version (ground truth):
@Override public void init(Config cfg,TaskPlan taskPlan){
  this.instancePlan=taskPlan;
  this.config=cfg;
}
Program: 173306
Project: 173306
Buggy source:
public DataFlowOperation setUpDataFlowOperation(Operation operation,int task,Set<Integer> sources,Set<Integer> destinations,Map<String,Object> configuration,int stream,MessageReceiver receiver,MessageDeSerializer formatter,MessageSerializer builder){
  Config mergedCfg=Config.newBuilder().putAll(config).putAll(configuration).build();
  DataFlowOperation dataFlowOperation=create(operation);
  dataFlowOperation.init(mergedCfg,task,instancePlan,sources,destinations,stream,receiver,formatter,builder);
  return dataFlowOperation;
}

Fixed version (ground truth):
public DataFlowOperation setUpDataFlowOperation(Operation operation,int task,Set<Integer> sources,Set<Integer> destinations,Map<String,Object> configuration,int stream,MessageReceiver receiver,MessageDeSerializer formatter,MessageSerializer builder,MessageReceiver partialReceiver){
  Config mergedCfg=Config.newBuilder().putAll(config).putAll(configuration).build();
  DataFlowOperation dataFlowOperation=create(operation);
  dataFlowOperation.init(mergedCfg,task,instancePlan,sources,destinations,stream,receiver,formatter,builder,partialReceiver);
  return dataFlowOperation;
}
Program: 173307
Project: 173307
Buggy source:
DataFlowOperation setUpDataFlowOperation(Operation operation,int task,Set<Integer> sources,Set<Integer> destinations,Map<String,Object> configuration,int stream,MessageReceiver receiver,MessageDeSerializer formatter,MessageSerializer builder);

Fixed version (ground truth):
DataFlowOperation setUpDataFlowOperation(Operation operation,int task,Set<Integer> sources,Set<Integer> destinations,Map<String,Object> configuration,int stream,MessageReceiver receiver,MessageDeSerializer formatter,MessageSerializer builder,MessageReceiver partialReceiver);
Program: 173308
Project: 173308
Buggy source:
@Override public void init(Config config,int thisTask,TaskPlan instancePlan,Set<Integer> sources,Set<Integer> destinations,int stream,MessageReceiver receiver,MessageDeSerializer messageDeSerializer,MessageSerializer messageSerializer){
}

Fixed version (ground truth):
@Override public void init(Config config,int thisTask,TaskPlan instancePlan,Set<Integer> sources,Set<Integer> destinations,int stream,MessageReceiver receiver,MessageDeSerializer messageDeSerializer,MessageSerializer messageSerializer,MessageReceiver partialRcvr){
}
Program: 173309
Project: 173309
Buggy source:
@Override public void init(Config cfg,int task,TaskPlan plan,Set<Integer> srcs,Set<Integer> dests,int messageStream,MessageReceiver rcvr,MessageDeSerializer fmtr,MessageSerializer bldr){
  super.init(cfg,task,plan,srcs,dests,messageStream,rcvr,fmtr,bldr);
  for (  Integer source : expectedRoutes.keySet()) {
    currentMessages.put(source,new HashMap<Integer,MPIMessage>());
  }
}

Fixed version (ground truth):
@Override public void init(Config cfg,int task,TaskPlan plan,Set<Integer> srcs,Set<Integer> dests,int messageStream,MessageReceiver rcvr,MessageDeSerializer fmtr,MessageSerializer bldr,MessageReceiver partialRcvr){
  super.init(cfg,task,plan,srcs,dests,messageStream,rcvr,fmtr,bldr,partialRcvr);
  for (  Integer source : expectedRoutes.keySet()) {
    currentMessages.put(source,new HashMap<Integer,MPIMessage>());
  }
}
Program: 173310
Project: 173310
Buggy source:
@Override public void init(Config config,TaskPlan taskPlan){
  super.init(config,taskPlan);
  channel=new TWSMPIChannel(config,MPI.COMM_WORLD);
}

Fixed version (ground truth):
@Override public void init(Config cfg,TaskPlan taskPlan){
  super.init(cfg,taskPlan);
  channel=new TWSMPIChannel(cfg,MPI.COMM_WORLD);
}
Program: 173311
Project: 173311
Buggy source:
@Override public DataFlowOperation create(Operation operation){
  if (operation == Operation.BROADCAST) {
    return new MPIDataFlowBroadcast(channel);
  }
 else   if (operation == Operation.REDUCE) {
    return new MPIDataFlowReduce(channel);
  }
 else   if (operation == Operation.ALLGATHER) {
    return null;
  }
 else   if (operation == Operation.LOADBALANCE) {
    return new MPILoadBalance(channel);
  }
 else   if (operation == Operation.PARTITION) {
    return new MPIPartition();
  }
  return null;
}

Fixed version (ground truth):
@Override public DataFlowOperation create(Operation operation){
  if (operation == Operation.BROADCAST) {
    return new MPIDataFlowBroadcast(channel);
  }
 else   if (operation == Operation.REDUCE) {
    return new MPIDataFlowReduce(channel);
  }
 else   if (operation == Operation.ALLGATHER) {
    return null;
  }
 else   if (operation == Operation.LOADBALANCE) {
    return new MPILoadBalance(channel);
  }
 else   if (operation == Operation.PARTITION) {
    return new MPIPartition(channel);
  }
  return null;
}
Program: 173312
Project: 173312
Buggy source:
@Override public void init(Config cfg,int task,TaskPlan plan,Set<Integer> srcs,Set<Integer> dests,int messageStream,MessageReceiver rcvr,MessageDeSerializer fmtr,MessageSerializer bldr){
  this.config=cfg;
  this.instancePlan=plan;
  this.sources=srcs;
  this.destinations=dests;
  this.stream=messageStream;
  this.messageDeSerializer=fmtr;
  this.messageSerializer=bldr;
  this.receiver=rcvr;
  this.sendBuffers=new LinkedList<>();
  this.thisTask=task;
  int noOfSendBuffers=MPIContext.broadcastBufferCount(config);
  int sendBufferSize=MPIContext.bufferSize(config);
  for (int i=0; i < noOfSendBuffers; i++) {
    sendBuffers.offer(new MPIBuffer(sendBufferSize));
  }
  router=setupRouting();
  this.expectedRoutes=router.expectedRoutes();
  setupCommunication();
}

Fixed version (ground truth):
@Override public void init(Config cfg,int task,TaskPlan plan,Set<Integer> srcs,Set<Integer> dests,int messageStream,MessageReceiver rcvr,MessageDeSerializer fmtr,MessageSerializer bldr,MessageReceiver partialRcvr){
  this.config=cfg;
  this.instancePlan=plan;
  this.sources=srcs;
  this.destinations=dests;
  this.stream=messageStream;
  this.messageDeSerializer=fmtr;
  this.messageSerializer=bldr;
  this.receiver=rcvr;
  this.sendBuffers=new LinkedList<>();
  this.thisTask=task;
  this.partialReceiver=partialRcvr;
  int noOfSendBuffers=MPIContext.broadcastBufferCount(config);
  int sendBufferSize=MPIContext.bufferSize(config);
  for (int i=0; i < noOfSendBuffers; i++) {
    sendBuffers.offer(new MPIBuffer(sendBufferSize));
  }
  router=setupRouting();
  this.expectedRoutes=router.expectedRoutes();
  setupCommunication();
}
Program: 173313
Project: 173313
Buggy source:
@Override public int hashCode(){
  int result=containerId;
  result=31 * result + (taskInstancePlan != null ? taskInstancePlan.hashCode() : 0);
  result=31 * result + (requiredresource != null ? requiredresource.hashCode() : 0);
  result=31 * result + (scheduledresource != null ? scheduledresource.hashCode() : 0);
  return result;
}

Fixed version (ground truth):
@Override public int hashCode(){
  int result=containerId;
  result=31 * result + (taskInstancePlan != null ? taskInstancePlan.hashCode() : 0);
  result=31 * result + (requiredResource != null ? requiredResource.hashCode() : 0);
  result=31 * result + (scheduledResource != null ? scheduledResource.hashCode() : 0);
  return result;
}
Program: 173314
Project: 173314
Buggy source:
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (!(o instanceof ContainerPlan))   return false;
  ContainerPlan that=(ContainerPlan)o;
  if (containerId != that.containerId)   return false;
  if (taskInstancePlan != null ? !taskInstancePlan.equals(that.taskInstancePlan) : that.taskInstancePlan != null)   return false;
  return (requiredresource != null ? requiredresource.equals(that.requiredresource) : that.requiredresource == null) && (scheduledresource != null ? scheduledresource.equals(that.scheduledresource) : that.scheduledresource == null);
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (!(o instanceof ContainerPlan))   return false;
  ContainerPlan that=(ContainerPlan)o;
  if (containerId != that.containerId)   return false;
  if (taskInstancePlan != null ? !taskInstancePlan.equals(that.taskInstancePlan) : that.taskInstancePlan != null)   return false;
  if (requiredResource != null ? !requiredResource.equals(that.requiredResource) : that.requiredResource != null)   return false;
  return scheduledResource != null ? scheduledResource.equals(that.scheduledResource) : that.scheduledResource == null;
}
Program: 173315
Project: 173315
Buggy source:
public Resource getRequiredresource(){
  return requiredresource;
}

Fixed version (ground truth):
public Resource getRequiredresource(){
  return requiredResource;
}
Program: 173316
Project: 173316
Buggy source:
public void start(RoundFacade parentRound,Player sellingPlayer,int cashToRaise,PublicCompany cashNeedingCompany,boolean dumpOtherCompaniesAllowed){
  log.info("String_Node_Str" + sellingPlayer.getId() + "String_Node_Str"+ cashToRaise);
  ReportBuffer.add(this,LocalText.getText("String_Node_Str",sellingPlayer.getId(),Bank.format(this,cashToRaise)));
  this.parentRound=parentRound;
  currentPlayer=this.sellingPlayer=sellingPlayer;
  this.cashNeedingCompany=cashNeedingCompany;
  this.cashToRaise=IntegerState.create(this,"String_Node_Str",cashToRaise);
  this.dumpOtherCompaniesAllowed=dumpOtherCompaniesAllowed;
  log.debug("String_Node_Str" + dumpOtherCompaniesAllowed);
  getRoot().getPlayerManager().setCurrentPlayer(sellingPlayer);
  getSellableShares();
}

Fixed version (ground truth):
public void start(RoundFacade parentRound,Player sellingPlayer,int cashToRaise,PublicCompany cashNeedingCompany,boolean dumpOtherCompaniesAllowed){
  log.info("String_Node_Str" + sellingPlayer.getId() + "String_Node_Str"+ cashToRaise);
  ReportBuffer.add(this,LocalText.getText("String_Node_Str",sellingPlayer.getId(),Bank.format(this,cashToRaise)));
  this.parentRound=parentRound;
  currentPlayer=this.sellingPlayer=sellingPlayer;
  this.cashNeedingCompany=cashNeedingCompany;
  this.cashToRaise=IntegerState.create(this,"String_Node_Str",cashToRaise);
  this.dumpOtherCompaniesAllowed=dumpOtherCompaniesAllowed;
  log.debug("String_Node_Str" + dumpOtherCompaniesAllowed);
  getRoot().getPlayerManager().setCurrentPlayer(sellingPlayer);
  if (getSellableShares().isEmpty()) {
    ReportBuffer.add(this,LocalText.getText("String_Node_Str",Bank.format(this,this.cashToRaise.value())));
    DisplayBuffer.add(this,LocalText.getText("String_Node_Str",Bank.format(this,this.cashToRaise.value())));
    currentPlayer.setBankrupt();
    gameManager.registerBankruptcy();
  }
}
Program: 173317
Project: 173317
Buggy source:
public ImmutableMap<MapHex,HexSidesSet> getReachableSides(){
  Map<MapHex,HexSidesSet.Builder> hexSides=Maps.newHashMap();
  for (  NetworkVertex vertex : graph.vertexSet()) {
    if (vertex.isSide()) {
      MapHex hex=vertex.getHex();
      if (!hexSides.containsKey(hex)) {
        hexSides.put(hex,HexSidesSet.builder());
      }
      hexSides.get(hex).set(vertex.getSide());
    }
  }
  ImmutableMap.Builder<MapHex,HexSidesSet> hexBuilder=ImmutableMap.builder();
  for (  MapHex hex : hexSides.keySet()) {
    hexBuilder.put(hex,hexSides.get(hex).build());
  }
  return hexBuilder.build();
}

Fixed version (ground truth):
public ImmutableMap<MapHex,HexSidesSet> getReachableSides(){
  Map<MapHex,HexSidesSet.Builder> hexSides=Maps.newHashMap();
  for (  NetworkVertex vertex : graph.vertexSet()) {
    if (vertex.isSide() && iterator.getSeenData().get(vertex) != NetworkIterator.greedyState.greedy) {
      MapHex hex=vertex.getHex();
      if (!hexSides.containsKey(hex)) {
        hexSides.put(hex,HexSidesSet.builder());
      }
      hexSides.get(hex).set(vertex.getSide());
    }
  }
  ImmutableMap.Builder<MapHex,HexSidesSet> hexBuilder=ImmutableMap.builder();
  for (  MapHex hex : hexSides.keySet()) {
    hexBuilder.put(hex,hexSides.get(hex).build());
  }
  return hexBuilder.build();
}