Program: 39075
Project: 39075
Buggy source:
/** 
 * @param shardId ID of the shard this GatewayServer represents
 * @param channel Channel to communicate on
 * @throws IOException if there's an error declaring the rabbitmq queues or setting up the shard listeners
 */
public GatewayServer(int shardId,Channel channel) throws IOException {
  this.shardId=shardId;
  this.channel=channel;
  this.logger=LoggerFactory.getLogger("String_Node_Str" + shardId);
  channel.queueDeclare("String_Node_Str" + shardId + "String_Node_Str",true,false,false,null);
  channel.queueDeclare("String_Node_Str" + shardId + "String_Node_Str",true,false,false,null);
  channel.queueDeclare("String_Node_Str" + shardId + "String_Node_Str",true,false,false,null);
  channel.queueDeclare("String_Node_Str" + shardId + "String_Node_Str",true,false,false,null);
  channel.basicConsume("String_Node_Str" + shardId + "String_Node_Str",false,new DefaultConsumer(channel){
    @Override public void handleDelivery(    String consumerTag,    Envelope envelope,    AMQP.BasicProperties properties,    byte[] body) throws IOException {
      sendEvents.set(true);
      if (readyPayload != null) {
        channel.basicPublish("String_Node_Str","String_Node_Str" + shardId + "String_Node_Str",null,readyPayload.toString().getBytes(StandardCharsets.UTF_8));
        for (        JSONObject obj : guildCreateEvents.values()) {
          channel.basicPublish("String_Node_Str","String_Node_Str" + shardId + "String_Node_Str",null,obj.toString().getBytes(StandardCharsets.UTF_8));
        }
      }
      channel.basicAck(envelope.getDeliveryTag(),false);
    }
  }
);
  channel.basicConsume("String_Node_Str" + shardId + "String_Node_Str",false,new DefaultConsumer(channel){
    @Override public void handleDelivery(    String consumerTag,    Envelope envelope,    AMQP.BasicProperties properties,    byte[] body) throws IOException {
      sendEvents.set(false);
      channel.basicAck(envelope.getDeliveryTag(),false);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * @param shardId ID of the shard this GatewayServer represents
 * @param channel Channel to communicate on
 * @throws IOException if there's an error declaring the rabbitmq queues or setting up the shard listeners
 */
public GatewayServer(int shardId,Channel channel) throws IOException {
  this.shardId=shardId;
  this.channel=channel;
  this.logger=LoggerFactory.getLogger("String_Node_Str" + shardId);
  channel.queueDeclare("String_Node_Str" + shardId + "String_Node_Str",true,false,false,null);
  channel.queueDeclare("String_Node_Str" + shardId + "String_Node_Str",true,false,false,null);
  channel.queueDeclare("String_Node_Str" + shardId + "String_Node_Str",true,false,false,null);
  channel.queueDeclare("String_Node_Str" + shardId + "String_Node_Str",true,false,false,null);
  channel.basicConsume("String_Node_Str" + shardId + "String_Node_Str",true,new DefaultConsumer(channel){
    @Override public void handleDelivery(    String consumerTag,    Envelope envelope,    AMQP.BasicProperties properties,    byte[] body) throws IOException {
      sendEvents.set(true);
      if (readyPayload != null) {
        channel.basicPublish("String_Node_Str","String_Node_Str" + shardId + "String_Node_Str",null,readyPayload.toString().getBytes(StandardCharsets.UTF_8));
        for (        JSONObject obj : guildCreateEvents.values()) {
          channel.basicPublish("String_Node_Str","String_Node_Str" + shardId + "String_Node_Str",null,obj.toString().getBytes(StandardCharsets.UTF_8));
        }
      }
    }
  }
);
  channel.basicConsume("String_Node_Str" + shardId + "String_Node_Str",true,new DefaultConsumer(channel){
    @Override public void handleDelivery(    String consumerTag,    Envelope envelope,    AMQP.BasicProperties properties,    byte[] body) throws IOException {
      sendEvents.set(false);
    }
  }
);
}