nus-yam/ex-repair huggingface dataset:
Program: 51732
Project: 51732
Buggy source:
@Override public void func_73863_a(int p_73863_1_,int p_73863_2_,float p_73863_3_){
  this.func_146276_q_();
  int offset=85;
  this.func_73732_a(this.field_146289_q,"String_Node_Str",this.field_146294_l / 2,offset,0xFFFFFF);
  offset+=10;
  this.func_73732_a(this.field_146289_q,String.format("String_Node_Str",missingItems.size()),this.field_146294_l / 2,offset,0xFFFFFF);
  offset+=10;
  this.func_73732_a(this.field_146289_q,"String_Node_Str",this.field_146294_l / 2,offset,0xFFFFFF);
  super.func_73863_a(p_73863_1_,p_73863_2_,p_73863_3_);
}

Fixed version (ground truth):
@Override public void func_73863_a(int p_73863_1_,int p_73863_2_,float p_73863_3_){
  this.func_146276_q_();
  int spaceAvailable=this.field_146295_m - 38 - 20;
  int spaceRequired=Math.min(spaceAvailable,10 + 6 * 10 + missingItems.size());
  int offset=10 + (spaceAvailable - spaceRequired) / 2;
  this.func_73732_a(this.field_146289_q,"String_Node_Str",this.field_146294_l / 2,offset,0xFFFFFF);
  offset+=20;
  this.func_73732_a(this.field_146289_q,String.format("String_Node_Str",missingItems.size()),this.field_146294_l / 2,offset,0xFFFFFF);
  offset+=10;
  this.func_73732_a(this.field_146289_q,"String_Node_Str",this.field_146294_l / 2,offset,0xFFFFFF);
  offset+=20;
  this.func_73732_a(this.field_146289_q,"String_Node_Str",this.field_146294_l / 2,offset,0xFFFFFF);
  offset+=10;
  Iterator<String> it=missingItems.iterator();
  while (it.hasNext()) {
    String item=it.next();
    this.func_73732_a(this.field_146289_q,item,this.field_146294_l / 2,offset,0xFFFFFF);
    offset+=10;
    if (offset >= spaceAvailable)     break;
  }
  if (it.hasNext()) {
    this.func_73732_a(this.field_146289_q,"String_Node_Str",this.field_146294_l / 2,offset,0xFFFFFF);
  }
  super.func_73863_a(p_73863_1_,p_73863_2_,p_73863_3_);
}
Program: 51733
Project: 51733
Buggy source:
void set(FMLControlledNamespacedRegistry<I> registry){
  if (this.superType != registry.superType)   throw new IllegalArgumentException("String_Node_Str");
  this.discriminator=registry.discriminator;
  this.optionalDefaultName=registry.optionalDefaultName;
  this.maxId=registry.maxId;
  this.minId=registry.minId;
  this.aliases.putAll(registry.aliases);
  field_148759_a=new ObjectIntIdentityMap();
  field_82596_a.clear();
  for (Iterator<Object> it=registry.iterator(); it.hasNext(); ) {
    I obj=(I)it.next();
    super.func_148756_a(registry.getId(obj),registry.func_148750_c(obj),obj);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") void set(FMLControlledNamespacedRegistry<I> registry){
  if (this.superType != registry.superType)   throw new IllegalArgumentException("String_Node_Str");
  this.discriminator=registry.discriminator;
  this.optionalDefaultName=registry.optionalDefaultName;
  this.maxId=registry.maxId;
  this.minId=registry.minId;
  this.aliases.clear();
  this.aliases.putAll(registry.aliases);
  field_148759_a=new ObjectIntIdentityMap();
  field_82596_a.clear();
  for (  I thing : (Iterable<I>)registry) {
    super.func_148756_a(registry.getId(thing),registry.func_148750_c(thing),thing);
  }
}
Program: 51734
Project: 51734
Buggy source:
public void serializeInto(Map<String,Integer> idMapping){
  for (Iterator<Object> it=iterator(); it.hasNext(); ) {
    I thing=(I)it.next();
    idMapping.put(discriminator + func_148750_c(thing),getId(thing));
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void serializeInto(Map<String,Integer> idMapping){
  for (  I thing : (Iterable<I>)this) {
    idMapping.put(discriminator + func_148750_c(thing),getId(thing));
  }
}
Program: 51735
Project: 51735
Buggy source:
Map<String,Integer> getEntriesNotIn(FMLControlledNamespacedRegistry<I> registry){
  Map<String,Integer> ret=new HashMap<String,Integer>();
  for (Iterator<Object> it=iterator(); it.hasNext(); ) {
    I thing=(I)it.next();
    if (!registry.field_148758_b.containsKey(thing))     ret.put(func_148750_c(thing),getId(thing));
  }
  return ret;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") Map<String,Integer> getEntriesNotIn(FMLControlledNamespacedRegistry<I> registry){
  Map<String,Integer> ret=new HashMap<String,Integer>();
  for (  I thing : (Iterable<I>)this) {
    if (!registry.field_148758_b.containsKey(thing))     ret.put(func_148750_c(thing),getId(thing));
  }
  return ret;
}
Program: 51736
Project: 51736
Buggy source:
public int getId(String itemName){
  I obj=getRaw(itemName);
  if (obj == null)   return -1;
  return getId(obj);
}

Fixed version (ground truth):
/** 
 * Get the id for the specified object. Don't hold onto the id across the world, it's being dynamically re-mapped as needed. Usually the name should be used instead of the id, if using the Block/Item object itself is not suitable for the task.
 * @param itemName Block/Item registry name.
 * @return Block/Item id or -1 if it wasn't found.
 */
public int getId(String itemName){
  I obj=getRaw(itemName);
  if (obj == null)   return -1;
  return getId(obj);
}
Program: 51737
Project: 51737
Buggy source:
void dump(){
  List<Integer> ids=new ArrayList<Integer>();
  for (Iterator<Object> it=iterator(); it.hasNext(); ) {
    ids.add(getId((I)it.next()));
  }
  Collections.sort(ids);
  for (  int id : ids) {
    I thing=getRaw(id);
    FMLLog.finer("String_Node_Str",func_148750_c(thing),id,thing);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") void dump(){
  List<Integer> ids=new ArrayList<Integer>();
  for (  I thing : (Iterable<I>)this) {
    ids.add(getId(thing));
  }
  Collections.sort(ids);
  for (  int id : ids) {
    I thing=getRaw(id);
    FMLLog.finer("String_Node_Str",func_148750_c(thing),id,thing);
  }
}
Program: 51738
Project: 51738
Buggy source:
public static ModContainer findModOwner(String string){
  UniqueIdentifier ui=new UniqueIdentifier(string);
  if (customOwners.containsKey(ui)) {
    return customOwners.get(ui);
  }
  return Loader.instance().getIndexedModList().get(ui.modId);
}

Fixed version (ground truth):
/** 
 * @deprecated no replacement planned
 */
@Deprecated public static ModContainer findModOwner(String string){
  UniqueIdentifier ui=new UniqueIdentifier(string);
  if (customOwners.containsKey(ui)) {
    return customOwners.get(ui);
  }
  return Loader.instance().getIndexedModList().get(ui.modId);
}
Program: 51739
Project: 51739
Buggy source:
private void testConsistency(){
  for (int i=availabilityMap.nextSetBit(0); i >= 0; i=availabilityMap.nextSetBit(i + 1)) {
    if (iBlockRegistry.getRaw(i) == null && iItemRegistry.getRaw(i) == null && !blockedIds.contains(i)) {
      throw new IllegalStateException(String.format("String_Node_Str",i));
    }
  }
  for (Iterator<Object> it=iBlockRegistry.iterator(); it.hasNext(); ) {
    Block block=(Block)it.next();
    int id=iBlockRegistry.getId(block);
    if (!availabilityMap.get(id)) {
      throw new IllegalStateException(String.format("String_Node_Str",block,id));
    }
    if (blockedIds.contains(id)) {
      throw new IllegalStateException(String.format("String_Node_Str",block,id));
    }
  }
  for (Iterator<Object> it=iItemRegistry.iterator(); it.hasNext(); ) {
    Item item=(Item)it.next();
    int id=iItemRegistry.getId(item);
    if (!availabilityMap.get(id)) {
      throw new IllegalStateException(String.format("String_Node_Str",item,id));
    }
    if (blockedIds.contains(id)) {
      throw new IllegalStateException(String.format("String_Node_Str",item,id));
    }
    if (item instanceof ItemBlock) {
      Block block=((ItemBlock)item).field_150939_a;
      if (iBlockRegistry.getId(block) != id) {
        throw new IllegalStateException(String.format("String_Node_Str",item,id,iBlockRegistry.getId(block)));
      }
    }
  }
  FMLLog.fine("String_Node_Str");
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void testConsistency(){
  for (int i=availabilityMap.nextSetBit(0); i >= 0; i=availabilityMap.nextSetBit(i + 1)) {
    if (iBlockRegistry.getRaw(i) == null && iItemRegistry.getRaw(i) == null && !blockedIds.contains(i)) {
      throw new IllegalStateException(String.format("String_Node_Str",i));
    }
  }
  for (  Block block : (Iterable<Block>)iBlockRegistry) {
    int id=iBlockRegistry.getId(block);
    if (!availabilityMap.get(id)) {
      throw new IllegalStateException(String.format("String_Node_Str",block,id));
    }
    if (blockedIds.contains(id)) {
      throw new IllegalStateException(String.format("String_Node_Str",block,id));
    }
  }
  for (  Item item : (Iterable<Item>)iItemRegistry) {
    int id=iItemRegistry.getId(item);
    if (!availabilityMap.get(id)) {
      throw new IllegalStateException(String.format("String_Node_Str",item,id));
    }
    if (blockedIds.contains(id)) {
      throw new IllegalStateException(String.format("String_Node_Str",item,id));
    }
    if (item instanceof ItemBlock) {
      Block block=((ItemBlock)item).field_150939_a;
      if (iBlockRegistry.getId(block) != id) {
        throw new IllegalStateException(String.format("String_Node_Str",item,id,iBlockRegistry.getId(block)));
      }
    }
  }
  FMLLog.fine("String_Node_Str");
}
Program: 51740
Project: 51740
Buggy source:
public static FMLControlledNamespacedRegistry<Item> getItemRegistry(){
  return getMain().iItemRegistry;
}

Fixed version (ground truth):
/** 
 * Get the currently active item registry.
 * @return Item Registry.
 */
public static FMLControlledNamespacedRegistry<Item> getItemRegistry(){
  return getMain().iItemRegistry;
}
Program: 51742
Project: 51742
Buggy source:
public static FMLControlledNamespacedRegistry<Block> getBlockRegistry(){
  return getMain().iBlockRegistry;
}

Fixed version (ground truth):
/** 
 * Get the currently active block registry.
 * @return Block Registry.
 */
public static FMLControlledNamespacedRegistry<Block> getBlockRegistry(){
  return getMain().iBlockRegistry;
}
Program: 51743
Project: 51743
Buggy source:
void register(Object obj,String name,int idHint){
  if (obj instanceof Block) {
    registerBlock((Block)obj,name,null,idHint);
  }
 else   if (obj instanceof Item) {
    registerItem((Item)obj,name,null,idHint);
  }
 else {
    throw new IllegalArgumentException("String_Node_Str");
  }
}

Fixed version (ground truth):
int register(Object obj,String name,int idHint){
  if (obj instanceof Block) {
    return registerBlock((Block)obj,name,null,idHint);
  }
 else   if (obj instanceof Item) {
    return registerItem((Item)obj,name,null,idHint);
  }
 else {
    throw new IllegalArgumentException("String_Node_Str");
  }
}
Program: 51744
Project: 51744
Buggy source:
public void sendToAllAround(FMLProxyPacket pkt,NetworkRegistry.TargetPoint point){
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT);
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(point);
  channels.get(Side.SERVER).writeAndFlush(pkt);
}

Fixed version (ground truth):
public void sendToAllAround(FMLProxyPacket pkt,NetworkRegistry.TargetPoint point){
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT);
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(point);
  channels.get(Side.SERVER).writeAndFlush(pkt).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
}
Program: 51745
Project: 51745
Buggy source:
public void sendToDimension(FMLProxyPacket pkt,int dimensionId){
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.DIMENSION);
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(dimensionId);
  channels.get(Side.SERVER).writeAndFlush(pkt);
}

Fixed version (ground truth):
public void sendToDimension(FMLProxyPacket pkt,int dimensionId){
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.DIMENSION);
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(dimensionId);
  channels.get(Side.SERVER).writeAndFlush(pkt).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
}
Program: 51746
Project: 51746
Buggy source:
public void sendTo(FMLProxyPacket pkt,EntityPlayerMP player){
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.PLAYER);
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(player);
  channels.get(Side.SERVER).writeAndFlush(pkt);
}

Fixed version (ground truth):
public void sendTo(FMLProxyPacket pkt,EntityPlayerMP player){
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.PLAYER);
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(player);
  channels.get(Side.SERVER).writeAndFlush(pkt).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
}
Program: 51747
Project: 51747
Buggy source:
public void sendToAll(FMLProxyPacket pkt){
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALL);
  channels.get(Side.SERVER).writeAndFlush(pkt);
}

Fixed version (ground truth):
public void sendToAll(FMLProxyPacket pkt){
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALL);
  channels.get(Side.SERVER).writeAndFlush(pkt).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
}
Program: 51748
Project: 51748
Buggy source:
void fireRead(FMLProxyPacket msg,ChannelHandlerContext ctx){
  FMLNetworkEvent.CustomPacketEvent<?> event=null;
  if (msg.handler() instanceof NetHandlerPlayClient) {
    NetHandlerPlayClient client=(NetHandlerPlayClient)msg.handler();
    event=new FMLNetworkEvent.ClientCustomPacketEvent(client.func_147298_b(),msg);
  }
 else   if (msg.handler() instanceof NetHandlerPlayServer) {
    NetHandlerPlayServer server=(NetHandlerPlayServer)msg.handler();
    event=new FMLNetworkEvent.ServerCustomPacketEvent(server.func_147362_b(),msg);
  }
  if (event != null) {
    this.eventBus.post(event);
    if (event.reply != null) {
      ctx.channel().attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.REPLY);
      ctx.writeAndFlush(event.reply);
    }
  }
}

Fixed version (ground truth):
void fireRead(FMLProxyPacket msg,ChannelHandlerContext ctx){
  FMLNetworkEvent.CustomPacketEvent<?> event=null;
  if (msg.handler() instanceof NetHandlerPlayClient) {
    NetHandlerPlayClient client=(NetHandlerPlayClient)msg.handler();
    event=new FMLNetworkEvent.ClientCustomPacketEvent(client.func_147298_b(),msg);
  }
 else   if (msg.handler() instanceof NetHandlerPlayServer) {
    NetHandlerPlayServer server=(NetHandlerPlayServer)msg.handler();
    event=new FMLNetworkEvent.ServerCustomPacketEvent(server.func_147362_b(),msg);
  }
  if (event != null) {
    this.eventBus.post(event);
    if (event.reply != null) {
      ctx.channel().attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.REPLY);
      ctx.writeAndFlush(event.reply).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
    }
  }
}
Program: 51749
Project: 51749
Buggy source:
public void sendToServer(FMLProxyPacket pkt){
  channels.get(Side.CLIENT).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.TOSERVER);
  channels.get(Side.CLIENT).writeAndFlush(pkt);
}

Fixed version (ground truth):
public void sendToServer(FMLProxyPacket pkt){
  channels.get(Side.CLIENT).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.TOSERVER);
  channels.get(Side.CLIENT).writeAndFlush(pkt).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
}
Program: 51750
Project: 51750
Buggy source:
@Override protected final void encode(ChannelHandlerContext ctx,A msg,List<Object> out) throws Exception {
  ByteBuf buffer=Unpooled.buffer();
  @SuppressWarnings("String_Node_Str") Class<? extends A> clazz=(Class<? extends A>)msg.getClass();
  byte discriminator=types.get(clazz);
  buffer.writeByte(discriminator);
  encodeInto(ctx,msg,buffer);
  FMLProxyPacket proxy=new FMLProxyPacket(buffer.copy(),ctx.channel().attr(NetworkRegistry.FML_CHANNEL).get());
  FMLProxyPacket old=inboundPacket.get();
  proxy.setDispatcher(old.getDispatcher());
  out.add(proxy);
}

Fixed version (ground truth):
@Override protected final void encode(ChannelHandlerContext ctx,A msg,List<Object> out) throws Exception {
  ByteBuf buffer=Unpooled.buffer();
  @SuppressWarnings("String_Node_Str") Class<? extends A> clazz=(Class<? extends A>)msg.getClass();
  byte discriminator=types.get(clazz);
  buffer.writeByte(discriminator);
  encodeInto(ctx,msg,buffer);
  FMLProxyPacket proxy=new FMLProxyPacket(buffer.copy(),ctx.channel().attr(NetworkRegistry.FML_CHANNEL).get());
  FMLProxyPacket old=ctx.attr(INBOUNDPACKETTRACKER).get().get();
  if (old != null) {
    proxy.setDispatcher(old.getDispatcher());
  }
  out.add(proxy);
}
Program: 51751
Project: 51751
Buggy source:
@Override protected final void decode(ChannelHandlerContext ctx,FMLProxyPacket msg,List<Object> out) throws Exception {
  testMessageValidity(msg);
  ByteBuf payload=msg.payload();
  byte discriminator=payload.readByte();
  Class<? extends A> clazz=discriminators.get(discriminator);
  if (clazz == null) {
    throw new NullPointerException("String_Node_Str" + discriminator + "String_Node_Str"+ msg.channel());
  }
  A newMsg=clazz.newInstance();
  inboundPacket.set(msg);
  decodeInto(ctx,payload.slice(),newMsg);
  out.add(newMsg);
}

Fixed version (ground truth):
@Override protected final void decode(ChannelHandlerContext ctx,FMLProxyPacket msg,List<Object> out) throws Exception {
  testMessageValidity(msg);
  ByteBuf payload=msg.payload();
  byte discriminator=payload.readByte();
  Class<? extends A> clazz=discriminators.get(discriminator);
  if (clazz == null) {
    throw new NullPointerException("String_Node_Str" + discriminator + "String_Node_Str"+ msg.channel());
  }
  A newMsg=clazz.newInstance();
  ctx.attr(INBOUNDPACKETTRACKER).get().set(msg);
  decodeInto(ctx,payload.slice(),newMsg);
  out.add(newMsg);
}
Program: 51752
Project: 51752
Buggy source:
@Override protected void channelRead0(ChannelHandlerContext ctx,REQ msg) throws Exception {
  INetHandler iNetHandler=ctx.attr(NetworkRegistry.NET_HANDLER).get();
  MessageContext context=new MessageContext(iNetHandler,side);
  REPLY result=messageHandler.onMessage(msg,context);
  if (result != null) {
    ctx.writeAndFlush(result);
  }
}

Fixed version (ground truth):
@Override protected void channelRead0(ChannelHandlerContext ctx,REQ msg) throws Exception {
  INetHandler iNetHandler=ctx.attr(NetworkRegistry.NET_HANDLER).get();
  MessageContext context=new MessageContext(iNetHandler,side);
  REPLY result=messageHandler.onMessage(msg,context);
  if (result != null) {
    ctx.writeAndFlush(result).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
  }
}
Program: 51753
Project: 51753
Buggy source:
/** 
 * Send this message to everyone within a certain range of a point. The   {@link IMessageHandler} for this message type should be on the CLIENT side.
 * @param message The message to send
 * @param point The {@link TargetPoint} around which to send
 */
public void sendToAllAround(IMessage message,NetworkRegistry.TargetPoint point){
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT);
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(point);
  channels.get(Side.SERVER).writeAndFlush(message);
}

Fixed version (ground truth):
/** 
 * Send this message to everyone within a certain range of a point. The   {@link IMessageHandler} for this message type should be on the CLIENT side.
 * @param message The message to send
 * @param point The {@link TargetPoint} around which to send
 */
public void sendToAllAround(IMessage message,NetworkRegistry.TargetPoint point){
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT);
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(point);
  channels.get(Side.SERVER).writeAndFlush(message).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
}
Program: 51754
Project: 51754
Buggy source:
/** 
 * Send this message to everyone within the supplied dimension. The   {@link IMessageHandler} for this message type should be on the CLIENT side.
 * @param message The message to send
 * @param dimensionId The dimension id to target
 */
public void sendToDimension(IMessage message,int dimensionId){
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.DIMENSION);
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(dimensionId);
  channels.get(Side.SERVER).writeAndFlush(message);
}

Fixed version (ground truth):
/** 
 * Send this message to everyone within the supplied dimension. The   {@link IMessageHandler} for this message type should be on the CLIENT side.
 * @param message The message to send
 * @param dimensionId The dimension id to target
 */
public void sendToDimension(IMessage message,int dimensionId){
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.DIMENSION);
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(dimensionId);
  channels.get(Side.SERVER).writeAndFlush(message).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
}
Program: 51755
Project: 51755
Buggy source:
/** 
 * Send this message to the specified player. The   {@link IMessageHandler} for this message type should be on the CLIENT side.
 * @param message The message to send
 * @param player The player to send it to
 */
public void sendTo(IMessage message,EntityPlayerMP player){
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.PLAYER);
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(player);
  channels.get(Side.SERVER).writeAndFlush(message);
}

Fixed version (ground truth):
/** 
 * Send this message to the specified player. The   {@link IMessageHandler} for this message type should be on the CLIENT side.
 * @param message The message to send
 * @param player The player to send it to
 */
public void sendTo(IMessage message,EntityPlayerMP player){
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.PLAYER);
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(player);
  channels.get(Side.SERVER).writeAndFlush(message).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
}
Program: 51756
Project: 51756
Buggy source:
/** 
 * Send this message to everyone. The   {@link IMessageHandler} for this message type should be on the CLIENT side.
 * @param message The message to send
 */
public void sendToAll(IMessage message){
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALL);
  channels.get(Side.SERVER).writeAndFlush(message);
}

Fixed version (ground truth):
/** 
 * Send this message to everyone. The   {@link IMessageHandler} for this message type should be on the CLIENT side.
 * @param message The message to send
 */
public void sendToAll(IMessage message){
  channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALL);
  channels.get(Side.SERVER).writeAndFlush(message).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
}
Program: 51757
Project: 51757
Buggy source:
/** 
 * Send this message to the server. The   {@link IMessageHandler} for this message type should be on the SERVER side.
 * @param message The message to send
 */
public void sendToServer(IMessage message){
  channels.get(Side.CLIENT).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.TOSERVER);
  channels.get(Side.CLIENT).writeAndFlush(message);
}

Fixed version (ground truth):
/** 
 * Send this message to the server. The   {@link IMessageHandler} for this message type should be on the SERVER side.
 * @param message The message to send
 */
public void sendToServer(IMessage message){
  channels.get(Side.CLIENT).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.TOSERVER);
  channels.get(Side.CLIENT).writeAndFlush(message).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
}
Program: 51758
Project: 51758
Buggy source:
public void tryLoadWorld(GuiSelectWorld selectWorldGUI,int selectedIndex){
  selectWorldGUI.func_146615_e(selectedIndex);
}

Fixed version (ground truth):
public void tryLoadWorld(GuiSelectWorld selectWorldGUI,int selectedIndex){
  playClientBlock=new CountDownLatch(1);
  selectWorldGUI.func_146615_e(selectedIndex);
}
Program: 51759
Project: 51759
Buggy source:
public void setPlayClient(NetHandlerPlayClient netHandlerPlayClient){
  playClientBlock.countDown();
}

Fixed version (ground truth):
public void setPlayClient(NetHandlerPlayClient netHandlerPlayClient){
  playClientBlock.countDown();
  this.currentPlayClient=netHandlerPlayClient;
}
Program: 51760
Project: 51760
Buggy source:
@Override public INetHandler getClientPlayHandler(){
  return this.client.func_147114_u();
}

Fixed version (ground truth):
@Override public INetHandler getClientPlayHandler(){
  return this.currentPlayClient;
}
Program: 51761
Project: 51761
Buggy source:
@Override protected void channelRead0(ChannelHandlerContext ctx,FMLProxyPacket msg) throws Exception {
  Side side=ctx.channel().attr(NetworkRegistry.CHANNEL_SOURCE).get();
  NetworkManager manager=msg.getOrigin();
  if (msg.channel().equals("String_Node_Str") || msg.channel().equals("String_Node_Str")) {
    byte[] data=new byte[msg.payload().readableBytes()];
    msg.payload().readBytes(data);
    String channels=new String(data,Charsets.UTF_8);
    String[] split=channels.split("String_Node_Str");
    Set<String> channelSet=ImmutableSet.copyOf(split);
    FMLCommonHandler.instance().fireNetRegistrationEvent(manager,channelSet,msg.channel(),side);
  }
 else {
    ctx.fireChannelRead(msg);
  }
}

Fixed version (ground truth):
@Override protected void channelRead0(ChannelHandlerContext ctx,FMLProxyPacket msg) throws Exception {
  Side side=msg.getTarget();
  NetworkManager manager=msg.getOrigin();
  if (msg.channel().equals("String_Node_Str") || msg.channel().equals("String_Node_Str")) {
    byte[] data=new byte[msg.payload().readableBytes()];
    msg.payload().readBytes(data);
    String channels=new String(data,Charsets.UTF_8);
    String[] split=channels.split("String_Node_Str");
    Set<String> channelSet=ImmutableSet.copyOf(split);
    FMLCommonHandler.instance().fireNetRegistrationEvent(manager,channelSet,msg.channel(),side);
  }
 else {
    ctx.fireChannelRead(msg);
  }
}
Program: 51762
Project: 51762
Buggy source:
private boolean handleServerSideCustomPacket(C17PacketCustomPayload msg,ChannelHandlerContext context){
  if (state == ConnectionState.AWAITING_HANDSHAKE) {
    this.manager.channel().pipeline().remove("String_Node_Str");
    state=ConnectionState.HANDSHAKING;
  }
  String channelName=msg.func_149559_c();
  if ("String_Node_Str".equals(channelName) || "String_Node_Str".equals(channelName) || "String_Node_Str".equals(channelName)) {
    FMLProxyPacket proxy=new FMLProxyPacket(msg);
    handshakeChannel.writeInbound(proxy);
    for (    Object push : handshakeChannel.inboundMessages()) {
      List<FMLProxyPacket> messageResult=FMLNetworkHandler.forwardHandshake((FMLMessage.CompleteHandshake)push,this,Side.SERVER);
      for (      FMLProxyPacket result : messageResult) {
        result.setTarget(Side.SERVER);
        result.payload().resetReaderIndex();
        context.fireChannelRead(result);
      }
    }
    handshakeChannel.inboundMessages().clear();
    return true;
  }
 else   if (NetworkRegistry.INSTANCE.hasChannel(channelName,Side.SERVER)) {
    FMLProxyPacket proxy=new FMLProxyPacket(msg);
    proxy.setDispatcher(this);
    context.fireChannelRead(proxy);
    return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean handleServerSideCustomPacket(C17PacketCustomPayload msg,ChannelHandlerContext context){
  if (state == ConnectionState.AWAITING_HANDSHAKE) {
    this.manager.channel().pipeline().remove("String_Node_Str");
    state=ConnectionState.HANDSHAKING;
  }
  String channelName=msg.func_149559_c();
  if ("String_Node_Str".equals(channelName) || "String_Node_Str".equals(channelName) || "String_Node_Str".equals(channelName)) {
    FMLProxyPacket proxy=new FMLProxyPacket(msg);
    proxy.setDispatcher(this);
    handshakeChannel.writeInbound(proxy);
    for (    Object push : handshakeChannel.inboundMessages()) {
      List<FMLProxyPacket> messageResult=FMLNetworkHandler.forwardHandshake((FMLMessage.CompleteHandshake)push,this,Side.SERVER);
      for (      FMLProxyPacket result : messageResult) {
        result.setTarget(Side.SERVER);
        result.payload().resetReaderIndex();
        context.fireChannelRead(result);
      }
    }
    handshakeChannel.inboundMessages().clear();
    return true;
  }
 else   if (NetworkRegistry.INSTANCE.hasChannel(channelName,Side.SERVER)) {
    FMLProxyPacket proxy=new FMLProxyPacket(msg);
    proxy.setDispatcher(this);
    context.fireChannelRead(proxy);
    return true;
  }
  return false;
}
Program: 51763
Project: 51763
Buggy source:
private boolean handleClientSideCustomPacket(S3FPacketCustomPayload msg,ChannelHandlerContext context){
  String channelName=msg.func_149169_c();
  if ("String_Node_Str".equals(channelName) || "String_Node_Str".equals(channelName) || "String_Node_Str".equals(channelName)) {
    FMLProxyPacket proxy=new FMLProxyPacket(msg);
    handshakeChannel.writeInbound(proxy);
    for (    Object push : handshakeChannel.inboundMessages()) {
      List<FMLProxyPacket> messageResult=FMLNetworkHandler.forwardHandshake((FMLMessage.CompleteHandshake)push,this,Side.CLIENT);
      for (      FMLProxyPacket result : messageResult) {
        result.setTarget(Side.CLIENT);
        result.payload().resetReaderIndex();
        context.fireChannelRead(result);
      }
    }
    handshakeChannel.inboundMessages().clear();
    return true;
  }
 else   if (NetworkRegistry.INSTANCE.hasChannel(channelName,Side.CLIENT)) {
    FMLProxyPacket proxy=new FMLProxyPacket(msg);
    proxy.setDispatcher(this);
    context.fireChannelRead(proxy);
    return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean handleClientSideCustomPacket(S3FPacketCustomPayload msg,ChannelHandlerContext context){
  String channelName=msg.func_149169_c();
  if ("String_Node_Str".equals(channelName) || "String_Node_Str".equals(channelName) || "String_Node_Str".equals(channelName)) {
    FMLProxyPacket proxy=new FMLProxyPacket(msg);
    proxy.setDispatcher(this);
    handshakeChannel.writeInbound(proxy);
    for (    Object push : handshakeChannel.inboundMessages()) {
      List<FMLProxyPacket> messageResult=FMLNetworkHandler.forwardHandshake((FMLMessage.CompleteHandshake)push,this,Side.CLIENT);
      for (      FMLProxyPacket result : messageResult) {
        result.setTarget(Side.CLIENT);
        result.payload().resetReaderIndex();
        context.fireChannelRead(result);
      }
    }
    handshakeChannel.inboundMessages().clear();
    return true;
  }
 else   if (NetworkRegistry.INSTANCE.hasChannel(channelName,Side.CLIENT)) {
    FMLProxyPacket proxy=new FMLProxyPacket(msg);
    proxy.setDispatcher(this);
    context.fireChannelRead(proxy);
    return true;
  }
  return false;
}
Program: 51764
Project: 51764
Buggy source:
public ServerConnectionFromClientEvent(NetworkManager manager){
  super((INetHandlerPlayServer)manager.func_150729_e(),INetHandlerPlayServer.class,manager);
  isLocal=manager.func_150731_c();
}

Fixed version (ground truth):
public ServerConnectionFromClientEvent(NetworkManager manager){
  super((INetHandlerPlayServer)manager.func_150729_e(),INetHandlerPlayServer.class,manager);
  this.isLocal=manager.func_150731_c();
}
Program: 51765
Project: 51765
Buggy source:
public ClientConnectedToServerEvent(NetworkManager manager){
  super((INetHandlerPlayClient)manager.func_150729_e(),INetHandlerPlayClient.class,manager);
  isLocal=manager.func_150731_c();
}

Fixed version (ground truth):
public ClientConnectedToServerEvent(NetworkManager manager,String connectionType){
  super((INetHandlerPlayClient)manager.func_150729_e(),INetHandlerPlayClient.class,manager);
  this.isLocal=manager.func_150731_c();
  this.connectionType=connectionType;
}
Program: 51766
Project: 51766
Buggy source:
public void findModDirMods(File modsDir){
  File[] modList=modsDir.listFiles();
  Arrays.sort(modList,new Comparator<File>(){
    @Override public int compare(    File o1,    File o2){
      return o1.getName().compareToIgnoreCase(o2.getName());
    }
  }
);
  for (  File modFile : modList) {
    if (CoreModManager.getLoadedCoremods().contains(modFile.getName())) {
      FMLLog.finer("String_Node_Str",modFile.getName());
    }
 else     if (modFile.isDirectory()) {
      FMLLog.fine("String_Node_Str",modFile.getName());
      candidates.add(new ModCandidate(modFile,modFile,ContainerType.DIR));
    }
 else {
      Matcher matcher=zipJar.matcher(modFile.getName());
      if (matcher.matches()) {
        FMLLog.fine("String_Node_Str",matcher.group(0));
        candidates.add(new ModCandidate(modFile,modFile,ContainerType.JAR));
      }
 else {
        FMLLog.fine("String_Node_Str",modFile.getName());
      }
    }
  }
}

Fixed version (ground truth):
public void findModDirMods(File modsDir){
  File[] modList=FileListHelper.sortFileList(modsDir,null);
  for (  File modFile : modList) {
    if (CoreModManager.getLoadedCoremods().contains(modFile.getName())) {
      FMLLog.finer("String_Node_Str",modFile.getName());
    }
 else     if (modFile.isDirectory()) {
      FMLLog.fine("String_Node_Str",modFile.getName());
      candidates.add(new ModCandidate(modFile,modFile,ContainerType.DIR));
    }
 else {
      Matcher matcher=zipJar.matcher(modFile.getName());
      if (matcher.matches()) {
        FMLLog.fine("String_Node_Str",matcher.group(0));
        candidates.add(new ModCandidate(modFile,modFile,ContainerType.JAR));
      }
 else {
        FMLLog.fine("String_Node_Str",modFile.getName());
      }
    }
  }
}
Program: 51768
Project: 51768
Buggy source:
public void connectToServer(GuiScreen guiMultiplayer,ServerData serverEntry){
  ExtendedServerListData extendedData=serverDataTag.get(serverEntry);
  if (extendedData.isBlocked) {
    showGuiScreen(new GuiAccessDenied(guiMultiplayer,serverEntry));
  }
 else {
    showGuiScreen(new GuiConnecting(guiMultiplayer,client,serverEntry));
  }
}

Fixed version (ground truth):
public void connectToServer(GuiScreen guiMultiplayer,ServerData serverEntry){
  ExtendedServerListData extendedData=serverDataTag.get(serverEntry);
  if (extendedData.isBlocked) {
    showGuiScreen(new GuiAccessDenied(guiMultiplayer,serverEntry));
  }
 else {
    showGuiScreen(new GuiConnecting(guiMultiplayer,client,serverEntry));
  }
  playClientBlock=new CountDownLatch(1);
}
Program: 51769
Project: 51769
Buggy source:
void clientListenForServerHandshake(){
  manager.func_150723_a(EnumConnectionState.PLAY);
  this.netHandler=FMLCommonHandler.instance().getClientPlayHandler();
  this.state=ConnectionState.AWAITING_HANDSHAKE;
}

Fixed version (ground truth):
void clientListenForServerHandshake(){
  manager.func_150723_a(EnumConnectionState.PLAY);
  FMLCommonHandler.instance().waitForPlayClient();
  this.netHandler=FMLCommonHandler.instance().getClientPlayHandler();
  this.state=ConnectionState.AWAITING_HANDSHAKE;
}
Program: 51770
Project: 51770
Buggy source:
@SuppressWarnings("String_Node_Str") public HandshakeMessageHandler(Class<S> stateType){
  fmlHandshakeState=(AttributeKey<S>)STATE;
  initialState=Enum.valueOf(stateType,"String_Node_Str");
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public HandshakeMessageHandler(Class<S> stateType){
  fmlHandshakeState=(AttributeKey<S>)((Object)STATE);
  initialState=Enum.valueOf(stateType,"String_Node_Str");
}
Program: 51773
Project: 51773
Buggy source:
private byte[] runTransformers(String name,String transformedName,byte[] basicClass){
  for (  IClassTransformer transformer : transformers) {
    basicClass=transformer.transform(name,transformedName,basicClass);
  }
  return basicClass;
}

Fixed version (ground truth):
private byte[] runTransformers(String name,String transformedName,byte[] basicClass){
  if (DEBUG_CLASSLOADING_FINER) {
    FMLLog.finest("String_Node_Str",name,transformedName,(basicClass == null ? 0 : basicClass.length));
    for (    IClassTransformer transformer : transformers) {
      String transName=transformer.getClass().getName();
      FMLLog.finest("String_Node_Str",transName,(basicClass == null ? 0 : basicClass.length));
      basicClass=transformer.transform(name,transformedName,basicClass);
      FMLLog.finest("String_Node_Str",transName,(basicClass == null ? 0 : basicClass.length));
    }
    FMLLog.finest("String_Node_Str",name,transformedName,(basicClass == null ? 0 : basicClass.length));
  }
 else {
    for (    IClassTransformer transformer : transformers) {
      basicClass=transformer.transform(name,transformedName,basicClass);
    }
  }
  return basicClass;
}
Program: 51776
Project: 51776
Buggy source:
public void serverStopped(){
  modController.distributeStateMessage(LoaderState.SERVER_STOPPED);
  modController.transition(LoaderState.SERVER_STOPPED);
  modController.transition(LoaderState.AVAILABLE);
}

Fixed version (ground truth):
public void serverStopped(){
  modController.distributeStateMessage(LoaderState.SERVER_STOPPED);
  try {
    modController.transition(LoaderState.SERVER_STOPPED);
  }
 catch (  LoaderException e) {
    modController.forceState(LoaderState.SERVER_STOPPED);
  }
  modController.transition(LoaderState.AVAILABLE);
}
Program: 51777
Project: 51777
Buggy source:
/** 
 * Return the effective side for the context in the game. This is dependent on thread analysis to try and determine whether the code is running in the server or not. Use at your own risk
 */
public Side getEffectiveSide(){
  Thread thr=Thread.currentThread();
  if ((thr instanceof BehaviorSnowballDispense) || (thr instanceof ServerListenThread)) {
    return Side.SERVER;
  }
  return Side.CLIENT;
}

Fixed version (ground truth):
/** 
 * Return the effective side for the context in the game. This is dependent on thread analysis to try and determine whether the code is running in the server or not. Use at your own risk
 */
public Side getEffectiveSide(){
  Thread thr=Thread.currentThread();
  if ((thr instanceof ThreadMinecraftServer) || (thr instanceof ServerListenThread)) {
    return Side.SERVER;
  }
  return Side.CLIENT;
}
Program: 51778
Project: 51778
Buggy source:
/** 
 * A list of modids that should be loaded <em>after</em> this one. The special value <strong>*</strong> indicates to load <em>after</em> any other mod.
 */
List<ArtifactVersion> getDependants();

Fixed version (ground truth):
/** 
 * A list of modids that should be loaded <em>after</em> this one. The special value <strong>*</strong> indicates to load <em>before</em> any other mod.
 */
List<ArtifactVersion> getDependants();
Program: 51779
Project: 51779
Buggy source:
/** 
 * A list of modids that should be loaded prior to this one. The special value <strong>*</strong> indicates to load <em>before</em> any other mod.
 */
List<ArtifactVersion> getDependencies();

Fixed version (ground truth):
/** 
 * A list of modids that should be loaded prior to this one. The special value <strong>*</strong> indicates to load <em>after</em> any other mod.
 */
List<ArtifactVersion> getDependencies();
Program: 51780
Project: 51780
Buggy source:
private static void enqueueMessage(Object sourceMod,String modTarget,IMCMessage message){
  ModContainer mc=FMLCommonHandler.instance().findContainerFor(sourceMod);
  if (mc != null && Loader.isModLoaded(modTarget)) {
    message.setSender(mc);
    modMessages.put(modTarget,message);
  }
}

Fixed version (ground truth):
private static void enqueueMessage(Object sourceMod,String modTarget,IMCMessage message){
  ModContainer mc;
  if (sourceMod instanceof ModContainer) {
    mc=(ModContainer)sourceMod;
  }
 else {
    mc=FMLCommonHandler.instance().findContainerFor(sourceMod);
  }
  if (mc != null && Loader.isModLoaded(modTarget)) {
    message.setSender(mc);
    modMessages.put(modTarget,message);
  }
}
Program: 51781
Project: 51781
Buggy source:
@Override public void applyModContainer(ModContainer activeContainer){
  currentList=ImmutableList.copyOf(modMessages.removeAll(activeContainer.getModId()));
}

Fixed version (ground truth):
@Override public void applyModContainer(ModContainer activeContainer){
  currentList=ImmutableList.copyOf(modMessages.removeAll(activeContainer.getModId()));
  FMLLog.finest("String_Node_Str",currentList.size(),activeContainer.getModId());
}
Program: 51782
Project: 51782
Buggy source:
public static ImmutableList<IMCMessage> fetchRuntimeMessages(Object forMod){
  ModContainer mc=FMLCommonHandler.instance().findContainerFor(forMod);
  if (mc != null) {
    return ImmutableList.copyOf(modMessages.removeAll(mc));
  }
 else {
    return emptyIMCList;
  }
}

Fixed version (ground truth):
/** 
 * Retrieve any pending runtime messages for the mod
 * @param forMod The {@link Instance} of the Mod to fetch messages for
 * @return any messages - the collection will never be null
 */
public static ImmutableList<IMCMessage> fetchRuntimeMessages(Object forMod){
  ModContainer mc=FMLCommonHandler.instance().findContainerFor(forMod);
  if (mc != null) {
    return ImmutableList.copyOf(modMessages.removeAll(mc));
  }
 else {
    return emptyIMCList;
  }
}
Program: 51783
Project: 51783
Buggy source:
@Override public void connectionClosed(INetworkManager manager){
  if (!ModLoaderHelper.sidedHelper.clientConnectionClosed(manager,mod)) {
    mod.serverDisconnect();
    mod.onClientLogout(manager);
  }
}

Fixed version (ground truth):
@Override public void connectionClosed(INetworkManager manager){
  if (ModLoaderHelper.sidedHelper == null || !ModLoaderHelper.sidedHelper.clientConnectionClosed(manager,mod)) {
    mod.serverDisconnect();
    mod.onClientLogout(manager);
  }
}
Program: 51785
Project: 51785
Buggy source:
@Override public void applyModContainer(ModContainer activeContainer){
  currentList=messages.get(activeContainer.getModId());
}

Fixed version (ground truth):
@Override public void applyModContainer(ModContainer activeContainer){
  currentList=ImmutableList.copyOf(modMessages.get(activeContainer.getModId()));
}
Program: 51786
Project: 51786
Buggy source:
public void computeBranding(){
  if (brandings == null) {
    Builder brd=ImmutableList.<String>builder();
    brd.add(Loader.instance().getMCVersionString());
    brd.add(Loader.instance().getMCPVersionString());
    brd.add("String_Node_Str" + Loader.instance().getFMLVersionString());
    String forgeBranding=(String)callForgeMethod("String_Node_Str");
    if (!Strings.isNullOrEmpty(forgeBranding)) {
      brd.add(forgeBranding);
    }
    brd.addAll(sidedDelegate.getAdditionalBrandingInformation());
    try {
      Properties props=new Properties();
      props.load(getClass().getClassLoader().getResourceAsStream("String_Node_Str"));
      brd.add(props.getProperty("String_Node_Str"));
    }
 catch (    Exception ex) {
    }
    int tModCount=Loader.instance().getModList().size();
    int aModCount=Loader.instance().getActiveModList().size();
    brd.add(String.format("String_Node_Str",tModCount,tModCount != 1 ? "String_Node_Str" : "String_Node_Str",aModCount,aModCount != 1 ? "String_Node_Str" : "String_Node_Str"));
    brandings=brd.build();
  }
}

Fixed version (ground truth):
public void computeBranding(){
  if (brandings == null) {
    Builder brd=ImmutableList.<String>builder();
    brd.add(Loader.instance().getMCVersionString());
    brd.add(Loader.instance().getMCPVersionString());
    brd.add("String_Node_Str" + Loader.instance().getFMLVersionString());
    String forgeBranding=(String)callForgeMethod("String_Node_Str");
    if (!Strings.isNullOrEmpty(forgeBranding)) {
      brd.add(forgeBranding);
    }
    if (sidedDelegate != null) {
      brd.addAll(sidedDelegate.getAdditionalBrandingInformation());
    }
    try {
      Properties props=new Properties();
      props.load(getClass().getClassLoader().getResourceAsStream("String_Node_Str"));
      brd.add(props.getProperty("String_Node_Str"));
    }
 catch (    Exception ex) {
    }
    int tModCount=Loader.instance().getModList().size();
    int aModCount=Loader.instance().getActiveModList().size();
    brd.add(String.format("String_Node_Str",tModCount,tModCount != 1 ? "String_Node_Str" : "String_Node_Str",aModCount,aModCount != 1 ? "String_Node_Str" : "String_Node_Str"));
    brandings=brd.build();
  }
}
Program: 51787
Project: 51787
Buggy source:
@Override public void run(){
  do {
    LogRecord lr;
    try {
      lr=recordQueue.take();
      wrappedHandler.publish(lr);
    }
 catch (    InterruptedException e) {
      Thread.interrupted();
    }
  }
 while (true);
}

Fixed version (ground truth):
@Override public void run(){
  do {
    LogRecord lr;
    try {
      lr=recordQueue.take();
      wrappedHandler.publish(lr);
    }
 catch (    InterruptedException e) {
      e.printStackTrace(errCache);
      Thread.interrupted();
    }
  }
 while (true);
}
Program: 51788
Project: 51788
Buggy source:
@Override public void publish(LogRecord record){
  try {
    ConsoleLogThread.recordQueue.put(record);
  }
 catch (  InterruptedException e) {
    Thread.interrupted();
  }
}

Fixed version (ground truth):
@Override public void publish(LogRecord record){
  boolean currInt=Thread.interrupted();
  try {
    ConsoleLogThread.recordQueue.put(record);
  }
 catch (  InterruptedException e) {
    e.printStackTrace(errCache);
  }
  if (currInt) {
    Thread.currentThread().interrupt();
  }
}