nus-yam/ex-repair huggingface dataset:
Program: 22388
Project: 22388
Buggy source:
/** 
 * Adds the drops to the inventory.
 * @param drops An ArrayList of items to add to the inventory.
 * @param inv   The inventory to add items to.
 */
private void addToInventory(ArrayList<ItemStack> drops,IInventory inv){
  for (  ItemStack drop : drops) {
    if (drop == null) {
      continue;
    }
    for (int i=0; i < inv.getSizeInventory(); i++) {
      ItemStack stackInSlot=inv.getStackInSlot(i);
      if (stackInSlot == null) {
        inv.setInventorySlotContents(i,drop);
        break;
      }
 else       if (stackInSlot.getItem() == drop.getItem() && stackInSlot.getItemDamage() == drop.getItemDamage() && stackInSlot.stackSize + drop.stackSize < stackInSlot.getMaxStackSize()) {
        stackInSlot.stackSize+=drop.stackSize;
        inv.setInventorySlotContents(i,stackInSlot);
        break;
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Adds the drops to the inventory.
 * @param drops An ArrayList of items to add to the inventory.
 * @param inv   The inventory to add items to.
 * @return The items that did not get added.
 */
private ArrayList<ItemStack> addToInventory(ArrayList<ItemStack> drops,IInventory inv){
  ArrayList<ItemStack> failures=new ArrayList<>();
  for (  ItemStack drop : drops) {
    if (drop == null) {
      continue;
    }
    boolean added=false;
    for (int i=0; i < inv.getSizeInventory(); i++) {
      ItemStack stackInSlot=inv.getStackInSlot(i);
      if (stackInSlot == null) {
        inv.setInventorySlotContents(i,drop);
        added=true;
        break;
      }
 else       if (stackInSlot.getItem() == drop.getItem() && stackInSlot.getItemDamage() == drop.getItemDamage() && stackInSlot.stackSize + drop.stackSize < stackInSlot.getMaxStackSize()) {
        stackInSlot.stackSize+=drop.stackSize;
        inv.setInventorySlotContents(i,stackInSlot);
        added=true;
        break;
      }
    }
    if (!added) {
      failures.add(drop);
    }
  }
  return failures;
}
Program: 22389
Project: 22389
Buggy source:
@SubscribeEvent public void handlePainfulFrequencies(AnimalTradeEvent event){
  EntityLiving entity=event.salesperson;
  NBTTagCompound nbt=entity.getEntityData();
  if (nbt.getInteger("String_Node_Str") > nbt.getInteger("String_Node_Str")) {
    entity.setAttackTarget(event.customer);
  }
}

Fixed version (ground truth):
@SubscribeEvent @SideOnly(Side.CLIENT) public void handlePainfulFrequencies(AnimalTradeEvent event){
  EntityLiving entity=event.salesperson;
  NBTTagCompound nbt=entity.getEntityData();
  if (nbt.getInteger("String_Node_Str") > nbt.getInteger("String_Node_Str")) {
    entity.setAttackTarget(event.customer);
  }
}
Program: 22390
Project: 22390
Buggy source:
@SubscribeEvent @SideOnly(Side.CLIENT) public void handlePainfulFrequencies(AnimalTradeEvent event){
  EntityLiving entity=event.salesperson;
  NBTTagCompound nbt=entity.getEntityData();
  if (nbt.getInteger("String_Node_Str") > nbt.getInteger("String_Node_Str")) {
    entity.setAttackTarget(event.customer);
  }
}

Fixed version (ground truth):
@SubscribeEvent public void handlePainfulFrequencies(AnimalTradeEvent event){
  EntityLiving entity=event.salesperson;
  NBTTagCompound nbt=entity.getEntityData();
  if (nbt.getInteger("String_Node_Str") > nbt.getInteger("String_Node_Str")) {
    entity.setAttackTarget(event.customer);
  }
}
Program: 22391
Project: 22391
Buggy source:
@SubscribeEvent public void ignoreChatMessage(ClientChatReceivedEvent event){
  Minecraft mc=Minecraft.getMinecraft();
  EntityPlayer player=mc.thePlayer;
  World world=mc.theWorld;
  String message=event.message.getUnformattedText();
  Matcher matcher=Pattern.compile("String_Node_Str").matcher(message);
  if (matcher.find()) {
    EntityPlayer messager=world.getPlayerEntityByName(matcher.group(0));
    if (messager != null) {
      if (!messager.getDisplayName().equals(player.getDisplayName()) && playerHasFrequencyShifter(messager) && playerHasFrequencyShifter(player)) {
        event.setCanceled(true);
      }
    }
  }
}

Fixed version (ground truth):
@SubscribeEvent @SideOnly(Side.CLIENT) public void ignoreChatMessage(ClientChatReceivedEvent event){
  Minecraft mc=Minecraft.getMinecraft();
  EntityPlayer player=mc.thePlayer;
  World world=mc.theWorld;
  String message=event.message.getUnformattedText();
  Matcher matcher=Pattern.compile("String_Node_Str").matcher(message);
  if (matcher.find()) {
    EntityPlayer messager=world.getPlayerEntityByName(matcher.group(0));
    if (messager != null) {
      if (!messager.getDisplayName().equals(player.getDisplayName()) && playerHasFrequencyShifter(messager) && playerHasFrequencyShifter(player)) {
        event.setCanceled(true);
      }
    }
  }
}
Program: 22393
Project: 22393
Buggy source:
@EventHandler public void postInit(FMLPostInitializationEvent event){
  SteamcraftRecipes.registerCasting();
  if (Config.enablePipe) {
    MinecraftForge.EVENT_BUS.register(SteamcraftBlocks.pipe);
  }
  ItemSmashedOre iso=(ItemSmashedOre)SteamcraftItems.smashedOre;
  iso.registerDusts();
  iso.addSmelting();
  iso.registerDusts();
  SteamcraftItems.reregisterPlates();
  SteamcraftRecipes.registerDustLiquids();
  CrossMod.postInit(event);
  SteamcraftBook.registerBookResearch();
  long start=System.nanoTime();
  String[] ores=OreDictionary.getOreNames();
  for (  String s : ores) {
    ArrayList<ItemStack> stacks=OreDictionary.getOres(s);
    for (    ItemStack stack : stacks) {
      OreDictHelper.initializeOreDicts(s,stack);
    }
  }
  long end=System.nanoTime();
  int time=(int)(end - start) / 1000000;
  FMLLog.info("String_Node_Str" + "String_Node_Str",OreDictHelper.stones.size(),OreDictHelper.nuggets.size(),OreDictHelper.ingots.size(),time);
}

Fixed version (ground truth):
@EventHandler public void postInit(FMLPostInitializationEvent event){
  SteamcraftRecipes.registerCasting();
  if (Config.enablePipe) {
    MinecraftForge.EVENT_BUS.register(SteamcraftBlocks.pipe);
  }
  ItemSmashedOre iso=(ItemSmashedOre)SteamcraftItems.smashedOre;
  iso.registerDusts();
  iso.addSmelting();
  iso.registerDusts();
  SteamcraftItems.reregisterPlates();
  SteamcraftRecipes.registerDustLiquids();
  CrossMod.postInit(event);
  SteamcraftBook.registerBookResearch();
  long start=System.nanoTime();
  String[] ores=OreDictionary.getOreNames();
  for (  String s : ores) {
    ArrayList<ItemStack> stacks=OreDictionary.getOres(s);
    for (    ItemStack stack : stacks) {
      OreDictHelper.initializeOreDicts(s,stack);
    }
  }
  long end=System.nanoTime();
  int time=(int)(end - start) / 1000000;
  FMLLog.info("String_Node_Str" + "String_Node_Str",OreDictHelper.stones.size(),OreDictHelper.nuggets.size(),OreDictHelper.ingots.size(),OreDictHelper.leaves.size(),time);
}
Program: 22394
Project: 22394
Buggy source:
private void mineExtraBlocks(int[][] coordinateArray,int x,int y,int z,World world){
  for (  int[] aCoordinateArray : coordinateArray) {
    int thisX=x + aCoordinateArray[0];
    int thisY=y + aCoordinateArray[1];
    int thisZ=z + aCoordinateArray[2];
    Block block=world.getBlock(thisX,thisY,thisZ);
    int meta=world.getBlockMetadata(thisX,thisY,thisZ);
    if (block != null && !block.isAir(world,thisX,thisY,thisZ) && block.getHarvestTool(meta).equals("String_Node_Str") && ArrayUtils.contains(validMiningMaterials,(block.getMaterial()))) {
      if (block.getHarvestLevel(meta) < 3) {
        List<ItemStack> drops=block.getDrops(world,thisX,thisY,thisZ,meta,0);
        world.setBlockToAir(thisX,thisY,thisZ);
        for (        ItemStack stack : drops) {
          world.spawnEntityInWorld(new EntityItem(world,(double)x,(double)y,(double)z,stack));
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * This mines the extra blocks within the coordinate array.
 * @param coordinateArray The array of arrays containing the coordinates to add to x, y, z.
 * @param x The start X coordinate.
 * @param y The start Y coordinate.
 * @param z The start Z coordinate.
 * @param world The world.
 */
private void mineExtraBlocks(int[][] coordinateArray,int x,int y,int z,World world){
  for (  int[] aCoordinateArray : coordinateArray) {
    int thisX=x + aCoordinateArray[0];
    int thisY=y + aCoordinateArray[1];
    int thisZ=z + aCoordinateArray[2];
    Block block=world.getBlock(thisX,thisY,thisZ);
    int meta=world.getBlockMetadata(thisX,thisY,thisZ);
    if (block != null && !block.isAir(world,thisX,thisY,thisZ) && block.getHarvestTool(meta).equals("String_Node_Str") && ArrayUtils.contains(validMiningMaterials,(block.getMaterial()))) {
      if (block.getHarvestLevel(meta) < 3) {
        world.func_147480_a(thisX,thisY,thisZ,true);
      }
    }
  }
}
Program: 22395
Project: 22395
Buggy source:
@SubscribeEvent public void updateBlockBreakSpeed(PlayerEvent.BreakSpeed event){
  ItemStack equipped=event.entityPlayer.getCurrentEquippedItem();
  if (equipped != null && equipped.getItem() != null && equipped.getItem() instanceof ItemSteamDrill && event.block != null && event.block.getHarvestTool(event.metadata) != null && event.block.getHarvestTool(event.metadata).equals("String_Node_Str")) {
    ItemSteamDrill drill=(ItemSteamDrill)equipped.getItem();
    if (UtilSteamTool.hasUpgrade(equipped,SteamcraftItems.bigDrill) && drill.isWound(event.entityPlayer)) {
      float hardness=event.block.getBlockHardness(event.entityPlayer.worldObj,event.x,event.y,event.z);
      event.newSpeed=event.originalSpeed * ((hardness * 1.5F) / 8);
    }
  }
}

Fixed version (ground truth):
@SubscribeEvent public void updateBlockBreakSpeed(PlayerEvent.BreakSpeed event){
  ItemStack equipped=event.entityPlayer.getCurrentEquippedItem();
  Block block=event.block;
  int meta=event.metadata;
  EntityPlayer player=event.entityPlayer;
  if (equipped != null && equipped.getItem() != null) {
    if (block != null) {
      if (block.getHarvestTool(meta) != null && block.getHarvestTool(meta).equals("String_Node_Str")) {
        if (equipped.getItem() instanceof ItemSteamDrill) {
          ItemSteamDrill drill=(ItemSteamDrill)equipped.getItem();
          if (UtilSteamTool.hasUpgrade(equipped,SteamcraftItems.bigDrill) && drill.isWound(player)) {
            float hardness=block.getBlockHardness(player.worldObj,event.x,event.y,event.z);
            event.newSpeed=event.originalSpeed * ((hardness * 1.5F) / 8);
          }
        }
      }
 else       if (equipped.getItem() instanceof ItemSteamAxe) {
        ItemSteamAxe axe=(ItemSteamAxe)equipped.getItem();
        if (UtilSteamTool.hasUpgrade(equipped,SteamcraftItems.leafBlower)) {
          event.newSpeed=event.originalSpeed / 5F;
        }
      }
    }
  }
}
Program: 22396
Project: 22396
Buggy source:
public static void initializeOreDicts(String name,ItemStack stack){
  if (name.equals("String_Node_Str")) {
    stones.add(MutablePair.of(stack.getItem(),stack.getItemDamage()));
  }
  if (name.equals("String_Node_Str")) {
    MutablePair<Item,Integer> pair=MutablePair.of(stack.getItem(),stack.getItemDamage());
    cobblestones.add(pair);
  }
  if (name.startsWith("String_Node_Str")) {
    nuggets.add(MutablePair.of(stack.getItem(),stack.getItemDamage()));
  }
  if (name.startsWith("String_Node_Str")) {
    ingots.add(MutablePair.of(stack.getItem(),stack.getItemDamage()));
  }
}

Fixed version (ground truth):
public static void initializeOreDicts(String name,ItemStack stack){
  if (stack.getItemDamage() == OreDictionary.WILDCARD_VALUE) {
    for (int i=0; i < 15; i++) {
      initializeOreDicts(name,new ItemStack(stack.getItem(),1,i));
    }
    return;
  }
  if (name.equals("String_Node_Str")) {
    stones.add(MutablePair.of(stack.getItem(),stack.getItemDamage()));
  }
  if (name.equals("String_Node_Str")) {
    MutablePair<Item,Integer> pair=MutablePair.of(stack.getItem(),stack.getItemDamage());
    cobblestones.add(pair);
  }
  if (name.startsWith("String_Node_Str")) {
    nuggets.add(MutablePair.of(stack.getItem(),stack.getItemDamage()));
  }
  if (name.startsWith("String_Node_Str")) {
    ingots.add(MutablePair.of(stack.getItem(),stack.getItemDamage()));
  }
  if (name.startsWith("String_Node_Str")) {
    leaves.add(MutablePair.of(stack.getItem(),stack.getItemDamage()));
  }
}
Program: 22399
Project: 22399
Buggy source:
/** 
 * Gets all of the upgrades (except non-standard ones that do not implement ISteamToolUpgrade) that are installed in the tool
 * @param me The tool ItemStack.
 * @return The ArrayList of all the upgrades, or null.
 */
public static ArrayList<ISteamToolUpgrade> getUpgrades(ItemStack me){
  ArrayList<ISteamToolUpgrade> upgrades=new ArrayList<>();
  for (int i=1; i < 10; i++) {
    if (me.stackTagCompound.getCompoundTag("String_Node_Str").hasKey(Integer.toString(i))) {
      ItemStack stack=ItemStack.loadItemStackFromNBT(me.stackTagCompound.getCompoundTag("String_Node_Str").getCompoundTag(Integer.toString(i)));
      if (stack != null) {
        Item item=stack.getItem();
        if (item != null && item instanceof ISteamToolUpgrade) {
          upgrades.add((ISteamToolUpgrade)item);
        }
      }
    }
  }
  if (upgrades.isEmpty()) {
    return null;
  }
  return upgrades;
}

Fixed version (ground truth):
/** 
 * Gets all of the upgrades (except non-standard ones that do not implement ISteamToolUpgrade) that are installed in the tool
 * @param me The tool ItemStack.
 * @return The ArrayList of all the upgrades, or null.
 */
public static ArrayList<ISteamToolUpgrade> getUpgrades(ItemStack me){
  ArrayList<ISteamToolUpgrade> upgrades=new ArrayList<>();
  if (me.stackTagCompound == null || !me.stackTagCompound.hasKey("String_Node_Str")) {
    return null;
  }
  NBTTagCompound unbt=me.stackTagCompound.getCompoundTag("String_Node_Str");
  for (int i=1; i < 10; i++) {
    if (unbt.hasKey(Integer.toString(i))) {
      ItemStack stack=ItemStack.loadItemStackFromNBT(unbt.getCompoundTag(Integer.toString(i)));
      if (stack != null) {
        Item item=stack.getItem();
        if (item != null && item instanceof ISteamToolUpgrade) {
          upgrades.add((ISteamToolUpgrade)item);
        }
      }
    }
  }
  if (upgrades.isEmpty()) {
    return null;
  }
  return upgrades;
}
Program: 22401
Project: 22401
Buggy source:
/** 
 * Gets an ArrayList of the Strings that should be put in the item's tooltip.
 * @param upgrades The ISteamToolUpgrades that are being tested against; see #getUpgrades
 * @param redSlot The slot that should be red; drillHead, sawHead, or shovelHead usually.
 * @return The strings, or null if the upgrades were null.
 */
public static ArrayList<String> getInformation(ArrayList<ISteamToolUpgrade> upgrades,SteamToolSlot redSlot){
  if (upgrades == null) {
    return null;
  }
  ArrayList<String> strings=new ArrayList<>();
  for (  ISteamToolUpgrade upgrade : upgrades) {
    String info=upgrade.getInformation();
    if (info == null) {
      info=StatCollector.translateToLocal(((Item)upgrade).getUnlocalizedName());
    }
    if (upgrade.getToolSlot() == redSlot) {
      strings.add(EnumChatFormatting.RED + "String_Node_Str" + info);
    }
 else     if (upgrade.getToolSlot() == SteamToolSlot.toolCore) {
      strings.add(EnumChatFormatting.DARK_GREEN + "String_Node_Str" + info);
    }
  }
  return strings;
}

Fixed version (ground truth):
/** 
 * Gets an ArrayList of the Strings that should be put in the item's tooltip.
 * @param upgrades The ISteamToolUpgrades that are being tested against; see #getUpgrades
 * @param redSlot The slot that should be red; drillHead, sawHead, or shovelHead usually.
 * @return The strings, or null if the upgrades were null.
 */
public static ArrayList<String> getInformation(ArrayList<ISteamToolUpgrade> upgrades,SteamToolSlot redSlot){
  if (upgrades == null) {
    return null;
  }
  ArrayList<String> strings=new ArrayList<>();
  for (  ISteamToolUpgrade upgrade : upgrades) {
    String info=upgrade.getInformation();
    if (info == null) {
      info=StatCollector.translateToLocal(((Item)upgrade).getUnlocalizedName());
    }
    if (upgrade.getToolSlot() == redSlot) {
      strings.add(EnumChatFormatting.RED + "String_Node_Str" + info);
    }
 else     if (upgrade.getToolSlot() == SteamToolSlot.toolCore) {
      strings.add(EnumChatFormatting.DARK_GREEN + "String_Node_Str" + info);
    }
  }
  if (strings.isEmpty()) {
    return null;
  }
  return strings;
}
Program: 22403
Project: 22403
Buggy source:
/** 
 * Removes Exosuit Plates from the given Exosuit piece.
 * @param exosuitPiece The Exosuit Piece to remove the plates from.
 * @param identifier The plate type to remove.
 */
public static void removePlate(ItemStack exosuitPiece,String identifier){
  if (exosuitPiece.hasTagCompound() && exosuitPiece.hasTag("String_Node_Str")) {
    NBTTagCompound tagCompound=exosuitPiece.stackTagCompound;
    if (getPlate(tagCompound.getString("String_Node_Str")) == identifier) {
      tagCompound.removeTag("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
/** 
 * Removes Exosuit Plates from the given Exosuit piece.
 * @param exosuitPiece The Exosuit Piece to remove the plates from.
 * @param identifier The plate type to remove.
 */
public static void removePlate(ItemStack exosuitPiece,String identifier){
  if (exosuitPiece.hasTagCompound()) {
    NBTTagCompound tagCompound=exosuitPiece.stackTagCompound;
    if (tagCompound.hasKey("String_Node_Str") && getPlate(tagCompound.getString("String_Node_Str")).getIdentifier() == identifier) {
      tagCompound.removeTag("String_Node_Str");
    }
  }
}
Program: 22404
Project: 22404
Buggy source:
@SubscribeEvent public void burstZincPlate(LivingHurtEvent event){
}

Fixed version (ground truth):
@SubscribeEvent public void burstZincPlate(LivingHurtEvent event){
  EntityLivingBase entity=event.entityLiving;
  int consumption=Config.zincPlateConsumption;
  if (entity instanceof EntityPlayer && hasPower(entity,consumption)) {
    EntityPlayer player=(EntityPlayer)entity;
    float health=player.getHealth();
    if (event.ammount >= 5.0F || health <= 5.0F) {
      ItemStack stackWithPlate=null;
      for (int i=1; i < 5; i++) {
        ItemStack equipment=player.getEquipmentInSlot(i);
        Item item=equipment.getItem();
        if (item instanceof ItemExosuitArmor) {
          ItemExosuitArmor armor=(ItemExosuitArmor)item;
          if (armor.hasPlates(equipment) && UtilPlates.getPlate(equipment.stackTagCompound.getString("String_Node_Str")).getIdentifier() == "String_Node_Str") {
            stackWithPlate=equipment;
            break;
          }
        }
      }
      if (stackWithPlate != null) {
        ItemStack zincPlates=new ItemStack(SteamcraftItems.steamcraftPlate,2,1);
        World world=player.worldObj;
        player.setHealth(health + 5.0F);
        drainSteam(player.getEquipmentInSlot(3),consumption);
        UtilPlates.removePlate(stackWithPlate,"String_Node_Str");
        EntityItem entityItem=new EntityItem(world,player.posX,player.posY,player.posZ,zincPlates);
        world.spawnEntityInWorld(entityItem);
      }
    }
  }
}
Program: 22406
Project: 22406
Buggy source:
int getStorage(ItemStack stack);

Fixed version (ground truth):
/** 
 * Gets the maximum storage capacity for the tank.
 * @param stack The armor containing the tank.
 * @return The maximum storage that the tank (self) provides.
 */
int getStorage(ItemStack stack);
Program: 22407
Project: 22407
Buggy source:
boolean canFill(ItemStack stack);

Fixed version (ground truth):
/** 
 * Whether this tank allows the exosuit to be filled or not.
 * @param stack The armor containing the tank.
 * @return Whether this tank in this armor can charge in a charging device.
 */
boolean canFill(ItemStack stack);
Program: 22409
Project: 22409
Buggy source:
@Override public ExosuitSlot getSlot(){
  return ExosuitSlot.bodyTank;
}

Fixed version (ground truth):
@Override public ExosuitSlot getSlot(){
  return ExosuitSlot.BODY_TANK;
}
Program: 22411
Project: 22411
Buggy source:
@Override public ExosuitSlot getSlot(){
  return ExosuitSlot.bodyTank;
}

Fixed version (ground truth):
@Override public ExosuitSlot getSlot(){
  return ExosuitSlot.BODY_TANK;
}
Program: 22412
Project: 22412
Buggy source:
public boolean hasPower(ItemStack me,int powerNeeded){
  if (this.slot == 1) {
    if (!me.hasTagCompound()) {
      me.setTagCompound(new NBTTagCompound());
    }
    if (!me.stackTagCompound.hasKey("String_Node_Str")) {
      me.stackTagCompound.setInteger("String_Node_Str",0);
    }
    if (!me.stackTagCompound.hasKey("String_Node_Str")) {
      me.stackTagCompound.setInteger("String_Node_Str",0);
    }
    if (me.stackTagCompound.getInteger("String_Node_Str") > powerNeeded) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Gets whether the exosuit has the given amount of power. Will also set default values for the ItemStack's NBT if it is the chestpiece and does not have them. These values are: steamFill: 0 maxFill: 0
 * @param me The ItemStack to test against.
 * @param powerNeeded The amount of power to check for.
 */
public boolean hasPower(ItemStack me,int powerNeeded){
  if (this.slot == 1) {
    if (!me.hasTagCompound()) {
      me.setTagCompound(new NBTTagCompound());
    }
    if (!me.stackTagCompound.hasKey("String_Node_Str")) {
      me.stackTagCompound.setInteger("String_Node_Str",0);
    }
    if (!me.stackTagCompound.hasKey("String_Node_Str")) {
      me.stackTagCompound.setInteger("String_Node_Str",0);
    }
    return hasTank(me) && me.stackTagCompound.getInteger("String_Node_Str") > powerNeeded;
  }
  return false;
}
Program: 22413
Project: 22413
Buggy source:
@Override public void setInventorySlotContents(ItemStack me,int var1,ItemStack stack){
  if (!me.hasTagCompound()) {
    me.setTagCompound(new NBTTagCompound());
  }
  if (!me.stackTagCompound.hasKey("String_Node_Str")) {
    me.stackTagCompound.setTag("String_Node_Str",new NBTTagCompound());
  }
  if (me.stackTagCompound.getCompoundTag("String_Node_Str").hasKey(Integer.toString(var1))) {
    me.stackTagCompound.getCompoundTag("String_Node_Str").removeTag(Integer.toString(var1));
  }
  NBTTagCompound stc=new NBTTagCompound();
  if (stack != null) {
    stack.writeToNBT(stc);
    me.stackTagCompound.getCompoundTag("String_Node_Str").setTag(Integer.toString(var1),stc);
    if (var1 == 5 && slot == 1) {
      me.stackTagCompound.setInteger("String_Node_Str",0);
      me.stackTagCompound.setInteger("String_Node_Str",((IExosuitTank)stack.getItem()).getStorage(me));
      if (stack.getItem() instanceof BlockTankItem && stack.getItemDamage() == 1) {
        me.stackTagCompound.setInteger("String_Node_Str",me.stackTagCompound.getInteger("String_Node_Str"));
      }
    }
  }
  this.hasPlates(me);
}

Fixed version (ground truth):
@Override public void setInventorySlotContents(ItemStack me,int var1,ItemStack stack){
  if (!me.hasTagCompound()) {
    me.setTagCompound(new NBTTagCompound());
  }
  if (!me.stackTagCompound.hasKey("String_Node_Str")) {
    me.stackTagCompound.setTag("String_Node_Str",new NBTTagCompound());
  }
  if (me.stackTagCompound.getCompoundTag("String_Node_Str").hasKey(Integer.toString(var1))) {
    me.stackTagCompound.getCompoundTag("String_Node_Str").removeTag(Integer.toString(var1));
  }
  NBTTagCompound stc=new NBTTagCompound();
  if (stack != null) {
    stack.writeToNBT(stc);
    me.stackTagCompound.getCompoundTag("String_Node_Str").setTag(Integer.toString(var1),stc);
    if (var1 == 5 && slot == 1) {
      if (!me.stackTagCompound.hasKey("String_Node_Str")) {
        me.stackTagCompound.setInteger("String_Node_Str",0);
      }
      me.stackTagCompound.setInteger("String_Node_Str",((IExosuitTank)stack.getItem()).getStorage(me));
      if (stack.getItem() instanceof BlockTankItem && stack.getItemDamage() == 1) {
        me.stackTagCompound.setInteger("String_Node_Str",me.stackTagCompound.getInteger("String_Node_Str"));
      }
    }
  }
  this.hasPlates(me);
}
Program: 22414
Project: 22414
Buggy source:
@Override public boolean canPutInSlot(ItemStack me,int slotNum,ItemStack upgrade){
  if (slotNum == 0) {
    ItemStack clone=upgrade.copy();
    clone.stackSize=1;
    return UtilPlates.getPlate(clone) != null;
  }
  if (upgrade.getItem() instanceof IExosuitUpgrade) {
    IExosuitUpgrade upgradeItem=(IExosuitUpgrade)upgrade.getItem();
    return (upgradeItem.getSlot().armor == this.slot && upgradeItem.getSlot().slot == slotNum) || (upgradeItem.getSlot() == ExosuitSlot.vanity && upgradeItem.getSlot().slot == slotNum);
  }
 else   if (slotNum == ExosuitSlot.vanity.slot) {
    int[] ids=OreDictionary.getOreIDs(upgrade);
    for (    int id : ids) {
      String str=OreDictionary.getOreName(id);
      if (str.contains("String_Node_Str")) {
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean canPutInSlot(ItemStack me,int slotNum,ItemStack upgrade){
  if (slotNum == 0) {
    ItemStack clone=upgrade.copy();
    clone.stackSize=1;
    return UtilPlates.getPlate(clone) != null;
  }
  if (upgrade.getItem() instanceof IExosuitUpgrade) {
    IExosuitUpgrade upgradeItem=(IExosuitUpgrade)upgrade.getItem();
    return (upgradeItem.getSlot().armor == this.slot && upgradeItem.getSlot().slot == slotNum) || (upgradeItem.getSlot() == ExosuitSlot.VANITY && upgradeItem.getSlot().slot == slotNum);
  }
 else   if (slotNum == ExosuitSlot.VANITY.slot) {
    int[] ids=OreDictionary.getOreIDs(upgrade);
    for (    int id : ids) {
      String str=OreDictionary.getOreName(id);
      if (str.contains("String_Node_Str")) {
        return true;
      }
    }
  }
  return false;
}
Program: 22415
Project: 22415
Buggy source:
@Override public double getDurabilityForDisplay(ItemStack stack){
  if (!stack.hasTagCompound()) {
    stack.setTagCompound(new NBTTagCompound());
  }
  if (!stack.stackTagCompound.hasKey("String_Node_Str")) {
    stack.stackTagCompound.setInteger("String_Node_Str",0);
  }
  if (!stack.stackTagCompound.hasKey("String_Node_Str")) {
    stack.stackTagCompound.setInteger("String_Node_Str",0);
  }
  return 1.0D - (stack.stackTagCompound.getInteger("String_Node_Str") / (double)stack.stackTagCompound.getInteger("String_Node_Str"));
}

Fixed version (ground truth):
@Override public double getDurabilityForDisplay(ItemStack stack){
  if (!stack.hasTagCompound()) {
    stack.setTagCompound(new NBTTagCompound());
  }
  if (!stack.stackTagCompound.hasKey("String_Node_Str")) {
    stack.stackTagCompound.setInteger("String_Node_Str",0);
  }
  if (!stack.stackTagCompound.hasKey("String_Node_Str")) {
    stack.stackTagCompound.setInteger("String_Node_Str",0);
  }
  int fill=stack.stackTagCompound.getInteger("String_Node_Str");
  int max=stack.stackTagCompound.getInteger("String_Node_Str");
  return hasTank(stack) ? 1.0D - (fill / (double)max) : 1.0D;
}
Program: 22417
Project: 22417
Buggy source:
@Override public MutablePair<Integer,Integer>[] engineerCoordinates(){
  if (this.slot == 0) {
    return new MutablePair[]{MutablePair.of(1,19),MutablePair.of(1,1),MutablePair.of(39,16),MutablePair.of(59,36)};
  }
  if (this.slot == 2) {
    return new MutablePair[]{MutablePair.of(1,19),MutablePair.of(1,1),MutablePair.of(60,12),MutablePair.of(37,40)};
  }
  if (this.slot == 1) {
    return new MutablePair[]{MutablePair.of(1,19),MutablePair.of(1,1),MutablePair.of(49,33),MutablePair.of(75,26),MutablePair.of(1,37)};
  }
  if (this.slot == 3) {
    return new MutablePair[]{MutablePair.of(1,19),MutablePair.of(1,1),MutablePair.of(60,18),MutablePair.of(28,40)};
  }
  return new MutablePair[]{MutablePair.of(49,26)};
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public MutablePair<Integer,Integer>[] engineerCoordinates(){
  if (this.slot == 0) {
    return new MutablePair[]{MutablePair.of(1,19),MutablePair.of(1,1),MutablePair.of(39,16),MutablePair.of(59,36)};
  }
  if (this.slot == 2) {
    return new MutablePair[]{MutablePair.of(1,19),MutablePair.of(1,1),MutablePair.of(60,12),MutablePair.of(37,40)};
  }
  if (this.slot == 1) {
    return new MutablePair[]{MutablePair.of(1,19),MutablePair.of(1,1),MutablePair.of(49,33),MutablePair.of(75,26),MutablePair.of(1,37)};
  }
  if (this.slot == 3) {
    return new MutablePair[]{MutablePair.of(1,19),MutablePair.of(1,1),MutablePair.of(60,18),MutablePair.of(28,40)};
  }
  return new MutablePair[]{MutablePair.of(49,26)};
}
Program: 22418
Project: 22418
Buggy source:
public ItemExosuitJetpack(){
  super(ExosuitSlot.bodyFront,"String_Node_Str","String_Node_Str",0);
}

Fixed version (ground truth):
public ItemExosuitJetpack(){
  super(ExosuitSlot.BODY_FRONT,"String_Node_Str","String_Node_Str",0);
}
Program: 22419
Project: 22419
Buggy source:
public ItemExosuitSidepack(){
  super(ExosuitSlot.legsHips,"String_Node_Str","String_Node_Str",0);
}

Fixed version (ground truth):
public ItemExosuitSidepack(){
  super(ExosuitSlot.LEGS_HIPS,"String_Node_Str","String_Node_Str",0);
}
Program: 22420
Project: 22420
Buggy source:
public ItemExosuitWings(){
  super(ExosuitSlot.bodyFront,"String_Node_Str","String_Node_Str",0);
}

Fixed version (ground truth):
public ItemExosuitWings(){
  super(ExosuitSlot.BODY_FRONT,"String_Node_Str","String_Node_Str",0);
}
Program: 22421
Project: 22421
Buggy source:
@Override public ExosuitSlot getSlot(){
  return ExosuitSlot.bodyTank;
}

Fixed version (ground truth):
@Override public ExosuitSlot getSlot(){
  return ExosuitSlot.BODY_TANK;
}
Program: 22422
Project: 22422
Buggy source:
@Override public ExosuitSlot getSlot(){
  return ExosuitSlot.headGoggles;
}

Fixed version (ground truth):
@Override public ExosuitSlot getSlot(){
  return ExosuitSlot.HEAD_GOGGLES;
}
Program: 22423
Project: 22423
Buggy source:
@Override public ExosuitSlot getSlot(){
  return ExosuitSlot.headHelm;
}

Fixed version (ground truth):
@Override public ExosuitSlot getSlot(){
  return ExosuitSlot.HEAD_HELM;
}
Program: 22424
Project: 22424
Buggy source:
@SubscribeEvent public void openMerchant(EntityInteractEvent event){
  EntityPlayer player=event.entityPlayer;
  Entity target=event.target;
  if (playerHasFrequencyShifter(player) && (target instanceof EntityWolf || target instanceof EntityOcelot)) {
    EntityLiving living=(EntityLiving)target;
    ExtendedPropertiesMerchant nbt=(ExtendedPropertiesMerchant)living.getExtendedProperties(Steamcraft.MERCHANT_PROPERTY_ID);
    if (nbt.totalTrades > nbt.maximumTrades) {
      if (living instanceof EntityWolf) {
        EntityWolf wolf=(EntityWolf)living;
        wolf.setAngry(true);
      }
 else {
        EntityOcelot cat=(EntityOcelot)living;
        living.targetTasks.addTask(3,new EntityAIHurtByTarget(cat,true));
      }
    }
 else {
      if (living.hasCustomNameTag()) {
        nbt.merchantName=living.getCustomNameTag();
      }
      String name=nbt.merchantName;
      FrequencyMerchant merchant=new FrequencyMerchant(living,name);
      merchant.setCustomer(player);
      player.displayGUIMerchant(merchant,name);
      nbt.totalTrades+=1;
    }
  }
}

Fixed version (ground truth):
@SubscribeEvent(priority=EventPriority.LOWEST) public void openMerchant(EntityInteractEvent event){
  EntityPlayer player=event.entityPlayer;
  Entity target=event.target;
  ItemStack held=player.getHeldItem();
  if (playerHasFrequencyShifter(player) && (target instanceof EntityWolf || target instanceof EntityOcelot)) {
    boolean flag=held == null || !(held.getItem() instanceof ItemNameTag);
    if (!flag) {
      return;
    }
    EntityLiving living=(EntityLiving)target;
    ExtendedPropertiesMerchant nbt=(ExtendedPropertiesMerchant)living.getExtendedProperties(Steamcraft.MERCHANT_PROPERTY_ID);
    if (nbt.totalTrades > nbt.maximumTrades) {
      if (living instanceof EntityWolf) {
        EntityWolf wolf=(EntityWolf)living;
        wolf.setAngry(true);
      }
 else {
        EntityOcelot cat=(EntityOcelot)living;
        living.targetTasks.addTask(3,new EntityAIHurtByTarget(cat,true));
      }
    }
 else {
      if (living.hasCustomNameTag()) {
        nbt.merchantName=living.getCustomNameTag();
      }
      String name=nbt.merchantName;
      FrequencyMerchant merchant=new FrequencyMerchant(living,name);
      merchant.setCustomer(player);
      player.displayGUIMerchant(merchant,name);
      nbt.totalTrades+=1;
    }
  }
}
Program: 22425
Project: 22425
Buggy source:
/** 
 * Checks whether the given player has the Frequency Shifter upgrade, and enough steam in their suit.
 * @param player The player to check.
 * @return
 */
private boolean playerHasFrequencyShifter(EntityPlayer player){
  ItemStack helmet=player.getEquipmentInSlot(4);
  if (helmet != null && hasPower(player,1)) {
    Item helmetItem=helmet.getItem();
    if (helmetItem instanceof ItemExosuitArmor) {
      ItemExosuitArmor helmetArmor=(ItemExosuitArmor)helmetItem;
      if (helmetArmor.hasUpgrade(helmet,SteamcraftItems.frequencyShifter)) {
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Checks whether the given player has the Frequency Shifter upgrade, and enough steam in their suit.
 * @param player The player to check.
 * @return True if the player has the Frequency Shifter upgrade.
 */
private boolean playerHasFrequencyShifter(EntityPlayer player){
  ItemStack helmet=player.getEquipmentInSlot(4);
  if (helmet != null && hasPower(player,1)) {
    Item helmetItem=helmet.getItem();
    if (helmetItem instanceof ItemExosuitArmor) {
      ItemExosuitArmor helmetArmor=(ItemExosuitArmor)helmetItem;
      if (helmetArmor.hasUpgrade(helmet,SteamcraftItems.frequencyShifter)) {
        return true;
      }
    }
  }
  return false;
}
Program: 22426
Project: 22426
Buggy source:
@Override public void renderTileEntityAt(TileEntity var1,double var2,double var4,double var6,float var8){
  TileEntitySteamCharger charger=(TileEntitySteamCharger)var1;
  GameSettings settings=Minecraft.getMinecraft().gameSettings;
  int meta=charger.getWorldObj().getBlockMetadata(charger.xCoord,charger.yCoord,charger.zCoord);
  if (charger.getStackInSlot(0) != null) {
    GL11.glPushMatrix();
    GL11.glTranslatef((float)var2 + 0.5F,(float)var4 + 0.5F + (1.0F / 16.0F) - 0.02F,(float)var6 + 0.5F);
    GL11.glScalef(2.0F,2.0F,2.0F);
    GL11.glRotatef(0.0F + 90.0F * meta + (meta % 2 == 0 ? 180.0F : 0.0F),0.0F,1.0F,0.0F);
    GL11.glRotatef(90.0F,1.0F,0.0F,0.0F);
    GL11.glTranslatef(0.0F,-(7.0F / 32.0F),0.0F);
    ItemStack is=charger.getStackInSlot(0).copy();
    is.stackSize=1;
    EntityItem item=new EntityItem(var1.getWorldObj(),0.0F,0.0F,0.0F,is);
    item.hoverStart=0.0F;
    boolean fancy=settings.fancyGraphics;
    settings.fancyGraphics=true;
    RenderManager.instance.renderEntityWithPosYaw(item,0.0D,0.0D,0.0D,0.0F,0.0F);
    settings.fancyGraphics=fancy;
    GL11.glPopMatrix();
  }
}

Fixed version (ground truth):
@Override public void renderTileEntityAt(TileEntity var1,double var2,double var4,double var6,float var8){
  TileEntitySteamCharger charger=(TileEntitySteamCharger)var1;
  GameSettings settings=Minecraft.getMinecraft().gameSettings;
  int meta=charger.getWorldObj().getBlockMetadata(charger.xCoord,charger.yCoord,charger.zCoord);
  if (charger.getStackInSlot(0) != null) {
    RenderItem.renderInFrame=true;
    GL11.glPushMatrix();
    GL11.glTranslatef((float)var2 + 0.5F,(float)var4 + 0.5F + (1.0F / 16.0F) - 0.02F,(float)var6 + 0.5F);
    GL11.glScalef(2.0F,2.0F,2.0F);
    GL11.glRotatef(0.0F + 90.0F * meta + (meta % 2 == 0 ? 180.0F : 0.0F),0.0F,1.0F,0.0F);
    GL11.glRotatef(90.0F,1.0F,0.0F,0.0F);
    GL11.glTranslatef(0.0F,-(7.0F / 32.0F),0.0F);
    ItemStack is=charger.getStackInSlot(0).copy();
    is.stackSize=1;
    EntityItem item=new EntityItem(var1.getWorldObj(),0.0F,0.0F,0.0F,is);
    item.hoverStart=0.0F;
    boolean fancy=settings.fancyGraphics;
    settings.fancyGraphics=true;
    RenderManager.instance.renderEntityWithPosYaw(item,0.0D,0.0D,0.0D,0.0F,0.0F);
    settings.fancyGraphics=fancy;
    GL11.glPopMatrix();
    RenderItem.renderInFrame=false;
  }
}
Program: 22427
Project: 22427
Buggy source:
public static void sendConnectPacket(Entity player,int x,int y,int z,MovingObjectPosition pos){
  ByteBuf buf=Unpooled.buffer();
  ByteBufOutputStream out=new ByteBufOutputStream(buf);
  try {
    out.writeByte(4);
    out.writeInt(player.worldObj.provider.dimensionId);
    out.writeInt(player.getEntityId());
    out.writeInt(x);
    out.writeInt(y);
    out.writeInt(z);
    out.writeInt(pos.subHit);
  }
 catch (  IOException e) {
  }
  FMLProxyPacket packet=new FMLProxyPacket(buf,"String_Node_Str");
  Steamcraft.channel.sendToServer(packet);
  try {
    out.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void sendConnectPacket(Entity player,int x,int y,int z,MovingObjectPosition pos){
  ByteBuf buf=Unpooled.buffer();
  ByteBufOutputStream out=new ByteBufOutputStream(buf);
  try {
    out.writeByte(4);
    out.writeInt(player.worldObj.provider.dimensionId);
    out.writeInt(player.getEntityId());
    out.writeInt(x);
    out.writeInt(y);
    out.writeInt(z);
    out.writeInt(pos.subHit);
  }
 catch (  IOException ignored) {
  }
  FMLProxyPacket packet=new FMLProxyPacket(buf,"String_Node_Str");
  Steamcraft.channel.sendToServer(packet);
  try {
    out.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 22428
Project: 22428
Buggy source:
public static void sendGrapplePacket(EntityPlayer player,int x,int y,int z){
  ByteBuf buf=Unpooled.buffer();
  ByteBufOutputStream out=new ByteBufOutputStream(buf);
  try {
    out.writeByte(5);
    out.writeInt(player.worldObj.provider.dimensionId);
    out.writeInt(player.getEntityId());
    out.writeInt(x);
    out.writeInt(y);
    out.writeInt(z);
    out.writeDouble(player.posX);
    out.writeDouble(player.posY);
    out.writeDouble(player.posZ);
  }
 catch (  IOException e) {
  }
  FMLProxyPacket packet=new FMLProxyPacket(buf,"String_Node_Str");
  Steamcraft.channel.sendToServer(packet);
  try {
    out.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void sendGrapplePacket(EntityPlayer player,int x,int y,int z){
  ByteBuf buf=Unpooled.buffer();
  ByteBufOutputStream out=new ByteBufOutputStream(buf);
  try {
    out.writeByte(5);
    out.writeInt(player.worldObj.provider.dimensionId);
    out.writeInt(player.getEntityId());
    out.writeInt(x);
    out.writeInt(y);
    out.writeInt(z);
    out.writeDouble(player.posX);
    out.writeDouble(player.posY);
    out.writeDouble(player.posZ);
  }
 catch (  IOException ignored) {
  }
  FMLProxyPacket packet=new FMLProxyPacket(buf,"String_Node_Str");
  Steamcraft.channel.sendToServer(packet);
  try {
    out.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 22429
Project: 22429
Buggy source:
public static void sendCamoPacket(Entity player,MovingObjectPosition pos){
  ByteBuf buf=Unpooled.buffer();
  ByteBufOutputStream out=new ByteBufOutputStream(buf);
  try {
    out.writeByte(3);
    out.writeInt(player.worldObj.provider.dimensionId);
    out.writeInt(player.getEntityId());
    out.writeInt(pos.blockX);
    out.writeInt(pos.blockY);
    out.writeInt(pos.blockZ);
  }
 catch (  IOException e) {
  }
  FMLProxyPacket packet=new FMLProxyPacket(buf,"String_Node_Str");
  Steamcraft.channel.sendToServer(packet);
  try {
    out.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void sendCamoPacket(Entity player,MovingObjectPosition pos){
  ByteBuf buf=Unpooled.buffer();
  ByteBufOutputStream out=new ByteBufOutputStream(buf);
  try {
    out.writeByte(3);
    out.writeInt(player.worldObj.provider.dimensionId);
    out.writeInt(player.getEntityId());
    out.writeInt(pos.blockX);
    out.writeInt(pos.blockY);
    out.writeInt(pos.blockZ);
  }
 catch (  IOException ignored) {
  }
  FMLProxyPacket packet=new FMLProxyPacket(buf,"String_Node_Str");
  Steamcraft.channel.sendToServer(packet);
  try {
    out.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 22430
Project: 22430
Buggy source:
public static void sendNoSpacePacket(Entity player){
  ByteBuf buf=Unpooled.buffer();
  ByteBufOutputStream out=new ByteBufOutputStream(buf);
  try {
    out.writeByte(2);
    out.writeInt(player.worldObj.provider.dimensionId);
    out.writeInt(player.getEntityId());
  }
 catch (  IOException e) {
  }
  FMLProxyPacket packet=new FMLProxyPacket(buf,"String_Node_Str");
  Steamcraft.channel.sendToServer(packet);
  try {
    out.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void sendNoSpacePacket(Entity player){
  ByteBuf buf=Unpooled.buffer();
  ByteBufOutputStream out=new ByteBufOutputStream(buf);
  try {
    out.writeByte(2);
    out.writeInt(player.worldObj.provider.dimensionId);
    out.writeInt(player.getEntityId());
  }
 catch (  IOException ignored) {
  }
  FMLProxyPacket packet=new FMLProxyPacket(buf,"String_Node_Str");
  Steamcraft.channel.sendToServer(packet);
  try {
    out.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 22431
Project: 22431
Buggy source:
private void handleExplodePacket(ByteBufInputStream dat,World world){
  try {
    newExplosion(world,null,dat.readDouble(),dat.readDouble(),dat.readDouble(),dat.readFloat(),true,world.getGameRules().getGameRuleBooleanValue("String_Node_Str"));
  }
 catch (  Exception e) {
    e.printStackTrace();
    return;
  }
}

Fixed version (ground truth):
private void handleExplodePacket(ByteBufInputStream dat,World world){
  try {
    newExplosion(world,null,dat.readDouble(),dat.readDouble(),dat.readDouble(),dat.readFloat(),true,world.getGameRules().getGameRuleBooleanValue("String_Node_Str"));
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 22432
Project: 22432
Buggy source:
private void handleRocketJumpHackyPacket(ByteBufInputStream dat,World world){
  try {
    int id=dat.readInt();
    EntityPlayer player=(EntityPlayer)world.getEntityByID(id);
    if (player != null) {
      double motionX=dat.readDouble();
      double motionY=dat.readDouble();
      double motionZ=dat.readDouble();
      Minecraft.getMinecraft().thePlayer.motionX+=motionX;
      Minecraft.getMinecraft().thePlayer.motionY+=motionY;
      Minecraft.getMinecraft().thePlayer.motionZ+=motionZ;
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    return;
  }
}

Fixed version (ground truth):
private void handleRocketJumpHackyPacket(ByteBufInputStream dat,World world){
  try {
    int id=dat.readInt();
    Entity entity=world.getEntityByID(id);
    if (entity == null || !(entity instanceof EntityPlayer)) {
      return;
    }
    EntityPlayer player=(EntityPlayer)entity;
    double motionX=dat.readDouble();
    double motionY=dat.readDouble();
    double motionZ=dat.readDouble();
    player.motionX+=motionX;
    player.motionY+=motionY;
    player.motionZ+=motionZ;
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 22433
Project: 22433
Buggy source:
public static void sendSpacePacket(Entity player){
  ByteBuf buf=Unpooled.buffer();
  ByteBufOutputStream out=new ByteBufOutputStream(buf);
  try {
    out.writeByte(0);
    out.writeInt(player.worldObj.provider.dimensionId);
    out.writeInt(player.getEntityId());
  }
 catch (  IOException e) {
  }
  FMLProxyPacket packet=new FMLProxyPacket(buf,"String_Node_Str");
  Steamcraft.channel.sendToServer(packet);
  try {
    out.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void sendSpacePacket(Entity player){
  ByteBuf buf=Unpooled.buffer();
  ByteBufOutputStream out=new ByteBufOutputStream(buf);
  try {
    out.writeByte(0);
    out.writeInt(player.worldObj.provider.dimensionId);
    out.writeInt(player.getEntityId());
  }
 catch (  IOException ignored) {
  }
  FMLProxyPacket packet=new FMLProxyPacket(buf,"String_Node_Str");
  Steamcraft.channel.sendToServer(packet);
  try {
    out.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 22434
Project: 22434
Buggy source:
public static void sendItemNamePacket(World worldObj,int x,int y,int z,String s,EntityPlayer player){
  ByteBuf buf=Unpooled.buffer();
  ByteBufOutputStream out=new ByteBufOutputStream(buf);
  try {
    out.writeByte(1);
    out.writeInt(worldObj.provider.dimensionId);
    out.writeInt(x);
    out.writeInt(y);
    out.writeInt(z);
    out.writeUTF(s);
    out.writeInt(player.getEntityId());
  }
 catch (  IOException e) {
  }
  FMLProxyPacket packet=new FMLProxyPacket(buf,"String_Node_Str");
  Steamcraft.channel.sendToServer(packet);
  try {
    out.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void sendItemNamePacket(World worldObj,int x,int y,int z,String s,EntityPlayer player){
  ByteBuf buf=Unpooled.buffer();
  ByteBufOutputStream out=new ByteBufOutputStream(buf);
  try {
    out.writeByte(1);
    out.writeInt(worldObj.provider.dimensionId);
    out.writeInt(x);
    out.writeInt(y);
    out.writeInt(z);
    out.writeUTF(s);
    out.writeInt(player.getEntityId());
  }
 catch (  IOException ignored) {
  }
  FMLProxyPacket packet=new FMLProxyPacket(buf,"String_Node_Str");
  Steamcraft.channel.sendToServer(packet);
  try {
    out.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 22435
Project: 22435
Buggy source:
@SubscribeEvent public void onClientPacket(ClientCustomPacketEvent event){
  EntityClientPlayerMP player=Minecraft.getMinecraft().thePlayer;
  ByteBufInputStream bbis=new ByteBufInputStream(event.packet.payload());
  byte packetType;
  int dimension;
  byte packetID;
  try {
    packetType=bbis.readByte();
    dimension=bbis.readInt();
    World world=DimensionManager.getWorld(dimension);
    if (packetType == 2) {
      this.handleRocketJumpHackyPacket(bbis,world);
    }
    if (packetType == 3) {
      this.handleExplodePacket(bbis,world);
    }
    bbis.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
    return;
  }
}

Fixed version (ground truth):
@SubscribeEvent public void onClientPacket(ClientCustomPacketEvent event){
  ByteBufInputStream bbis=new ByteBufInputStream(event.packet.payload());
  byte packetType;
  int dimension;
  try {
    packetType=bbis.readByte();
    dimension=bbis.readInt();
    World world=DimensionManager.getWorld(dimension);
switch (packetType) {
case 2:
{
        this.handleRocketJumpHackyPacket(bbis,world);
      }
case 3:
{
      this.handleExplodePacket(bbis,world);
    }
}
bbis.close();
}
 catch (Exception e) {
e.printStackTrace();
}
}