nus-yam/ex-repair huggingface dataset:
Program: 22269
Project: 22269
Buggy source:
@Override public Multimap<String,AttributeModifier> getAttributeModifiersForExosuit(EntityEquipmentSlot armorSlot,ItemStack armorPieceStack){
  Multimap<String,AttributeModifier> map=HashMultimap.create();
  map.put(SharedMonsterAttributes.KNOCKBACK_RESISTANCE.getName(),new AttributeModifier(new UUID(776437,armorSlot.getSlotIndex()),"String_Node_Str" + armorSlot.getName(),0.25D,0));
  return map;
}

Fixed version (ground truth):
@Override public Multimap<String,AttributeModifier> getAttributeModifiersForExosuit(EntityEquipmentSlot armorSlot,@Nonnull ItemStack armorPieceStack){
  Multimap<String,AttributeModifier> map=HashMultimap.create();
  map.put(SharedMonsterAttributes.KNOCKBACK_RESISTANCE.getName(),new AttributeModifier(new UUID(776437,armorSlot.getSlotIndex()),"String_Node_Str" + armorSlot.getName(),0.25D,0));
  return map;
}
Program: 22270
Project: 22270
Buggy source:
@Override public void onPlayerHurt(LivingHurtEvent event,EntityPlayer victim,ItemStack armorStack,EntityEquipmentSlot slot){
  EntityLivingBase entity=event.getEntityLiving();
  float amount=event.getAmount();
  if (!INVALID_SOURCES.contains(event.getSource()) && ChargableUtility.hasPower(entity,Config.zincPlateConsumption)) {
    float health=victim.getHealth();
    float maxHealth=victim.getMaxHealth();
    float halfOfMax=maxHealth / 2;
    if (amount >= halfOfMax || health <= halfOfMax) {
      ItemStack zincPlates=new ItemStack(METAL_PLATE,2,ItemMetalPlate.Types.ZINC_PLATE.getMeta());
      World world=victim.world;
      ChargableUtility.drainSteam(victim.getItemStackFromSlot(EntityEquipmentSlot.CHEST),Config.zincPlateConsumption,victim);
      UtilPlates.removePlate(armorStack);
      EntityItem entityItem=new EntityItem(world,victim.posX,victim.posY,victim.posZ,zincPlates);
      world.spawnEntity(entityItem);
      victim.setHealth(health);
      victim.performHurtAnimation();
      world.playSound(victim.posX,victim.posY,victim.posZ,EsteemedInnovation.SOUND_HISS,SoundCategory.PLAYERS,2F,0.9F,false);
      event.setCanceled(true);
    }
  }
}

Fixed version (ground truth):
@Override public void onPlayerHurt(LivingHurtEvent event,EntityPlayer victim,@Nonnull ItemStack armorStack,EntityEquipmentSlot slot){
  EntityLivingBase entity=event.getEntityLiving();
  float amount=event.getAmount();
  if (!INVALID_SOURCES.contains(event.getSource()) && ChargableUtility.hasPower(entity,Config.zincPlateConsumption)) {
    float health=victim.getHealth();
    float maxHealth=victim.getMaxHealth();
    float halfOfMax=maxHealth / 2;
    if (amount >= halfOfMax || health <= halfOfMax) {
      ItemStack zincPlates=new ItemStack(METAL_PLATE,2,ItemMetalPlate.Types.ZINC_PLATE.getMeta());
      World world=victim.world;
      ChargableUtility.drainSteam(victim.getItemStackFromSlot(EntityEquipmentSlot.CHEST),Config.zincPlateConsumption,victim);
      UtilPlates.removePlate(armorStack);
      EntityItem entityItem=new EntityItem(world,victim.posX,victim.posY,victim.posZ,zincPlates);
      world.spawnEntity(entityItem);
      victim.setHealth(health);
      victim.performHurtAnimation();
      world.playSound(victim.posX,victim.posY,victim.posZ,EsteemedInnovation.SOUND_HISS,SoundCategory.PLAYERS,2F,0.9F,false);
      event.setCanceled(true);
    }
  }
}
Program: 22271
Project: 22271
Buggy source:
@Override @SideOnly(Side.CLIENT) public void getSubItems(Item item,CreativeTabs tabs,NonNullList<ItemStack> subItems){
  for (int i=0; i < ArmorModule.MAX_PLATE_META; i++) {
    subItems.add(ArmorModule.plateStack(i));
  }
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public void getSubItems(@Nonnull Item item,CreativeTabs tabs,NonNullList<ItemStack> subItems){
  for (int i=0; i < ArmorModule.MAX_PLATE_META; i++) {
    subItems.add(ArmorModule.plateStack(i));
  }
}
Program: 22272
Project: 22272
Buggy source:
@Override public EnumRarity getRarity(ItemStack stack){
  return EsteemedInnovation.upgrade;
}

Fixed version (ground truth):
@Nonnull @Override public EnumRarity getRarity(ItemStack stack){
  return EsteemedInnovation.upgrade;
}
Program: 22273
Project: 22273
Buggy source:
@Override public String getUnlocalizedName(ItemStack stack){
  return getUnlocalizedName() + "String_Node_Str" + stack.getItemDamage();
}

Fixed version (ground truth):
@Nonnull @Override public String getUnlocalizedName(ItemStack stack){
  return getUnlocalizedName() + "String_Node_Str" + stack.getItemDamage();
}
Program: 22274
Project: 22274
Buggy source:
/** 
 * Helper method for checking if the provided entity has steam in their exosuit, without having to explicitly find the proper armor piece, null check, type check, and check for the power every time.
 * @param entityLiving The entity to check for power. It will check every equipment slot.
 * @param i The amount of power required.
 * @return Whether the player has any {@link ExosuitArmor} piece in their inventory with the required amount of power.It will return as soon as it finds a single piece (so you could have 1 piece with no power, and 1 with {@code i} power, and it will return true as soon as it finds the one with {@code i} power).
 */
public static boolean hasPower(EntityLivingBase entityLiving,int i){
  boolean hasPower=false;
  for (  EntityEquipmentSlot slot : ItemStackUtility.ARMOR_SLOTS) {
    ItemStack equipment=entityLiving.getItemStackFromSlot(slot);
    if (equipment != null) {
      Item item=equipment.getItem();
      if (item instanceof SteamChargable && ((SteamChargable)item).canCharge(equipment)) {
        hasPower=((SteamChargable)item).hasPower(equipment,i);
      }
    }
    if (hasPower) {
      break;
    }
  }
  return hasPower;
}

Fixed version (ground truth):
/** 
 * Helper method for checking if the provided entity has steam in their exosuit, without having to explicitly find the proper armor piece, null check, type check, and check for the power every time.
 * @param entityLiving The entity to check for power. It will check every equipment slot.
 * @param i The amount of power required.
 * @return Whether the player has any {@link ExosuitArmor} piece in their inventory with the required amount of power.It will return as soon as it finds a single piece (so you could have 1 piece with no power, and 1 with {@code i} power, and it will return true as soon as it finds the one with {@code i} power).
 */
public static boolean hasPower(EntityLivingBase entityLiving,int i){
  boolean hasPower=false;
  for (  EntityEquipmentSlot slot : ItemStackUtility.ARMOR_SLOTS) {
    ItemStack equipment=entityLiving.getItemStackFromSlot(slot);
    Item item=equipment.getItem();
    if (item instanceof SteamChargable && ((SteamChargable)item).canCharge(equipment)) {
      hasPower=((SteamChargable)item).hasPower(equipment,i);
    }
    if (hasPower) {
      break;
    }
  }
  return hasPower;
}
Program: 22275
Project: 22275
Buggy source:
/** 
 * @param elb The entity to check
 * @return The first {@link SteamChargable} item that the entity is wearing. Null if not found.
 */
@Nullable public static ItemStack findFirstChargableArmor(EntityLivingBase elb){
  for (  EntityEquipmentSlot slot : ItemStackUtility.ARMOR_SLOTS) {
    ItemStack equipment=elb.getItemStackFromSlot(slot);
    if (equipment != null) {
      Item item=equipment.getItem();
      if (item instanceof SteamChargable && ((SteamChargable)item).canCharge(equipment)) {
        return equipment;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @param elb The entity to check
 * @return The first {@link SteamChargable} item that the entity is wearing. Null if not found.
 */
@Nullable public static ItemStack findFirstChargableArmor(EntityLivingBase elb){
  for (  EntityEquipmentSlot slot : ItemStackUtility.ARMOR_SLOTS) {
    ItemStack equipment=elb.getItemStackFromSlot(slot);
    Item item=equipment.getItem();
    if (item instanceof SteamChargable && ((SteamChargable)item).canCharge(equipment)) {
      return equipment;
    }
  }
  return null;
}
Program: 22276
Project: 22276
Buggy source:
/** 
 * Helper method for draining the steam from an exosuit without having to explicitly null check and type check in your own code every time.
 * @param stack The ItemStack that contains the armor piece
 * @param amount The amount of steam to drain.
 * @param entity The entity using the thing.
 * @return Whether it was successfully drained.
 */
public static boolean drainSteam(ItemStack stack,int amount,EntityLivingBase entity){
  return stack != null && stack.getItem() instanceof SteamChargable && ((SteamChargable)stack.getItem()).canCharge(stack) && ((SteamChargable)stack.getItem()).drainSteam(stack,amount,entity);
}

Fixed version (ground truth):
/** 
 * Helper method for draining the steam from an exosuit without having to explicitly null check and type check in your own code every time.
 * @param stack The ItemStack that contains the armor piece
 * @param amount The amount of steam to drain.
 * @param entity The entity using the thing.
 * @return Whether it was successfully drained.
 */
public static boolean drainSteam(@Nonnull ItemStack stack,int amount,EntityLivingBase entity){
  Item item=stack.getItem();
  return item instanceof SteamChargable && ((SteamChargable)item).canCharge(stack) && ((SteamChargable)item).drainSteam(stack,amount,entity);
}
Program: 22277
Project: 22277
Buggy source:
ItemStack decrStackSize(ItemStack me,int var1,int var2);

Fixed version (ground truth):
@Nonnull ItemStack decrStackSize(@Nonnull ItemStack me,int var1,int var2);
Program: 22278
Project: 22278
Buggy source:
ItemStack getStackInSlot(ItemStack me,int var1);

Fixed version (ground truth):
@Nonnull ItemStack getStackInSlot(@Nonnull ItemStack me,int var1);
Program: 22279
Project: 22279
Buggy source:
void setInventorySlotContents(ItemStack me,int var1,ItemStack stack);

Fixed version (ground truth):
void setInventorySlotContents(@Nonnull ItemStack me,int var1,@Nonnull ItemStack stack);
Program: 22280
Project: 22280
Buggy source:
boolean canPutInSlot(ItemStack me,int slotNum,ItemStack upgrade);

Fixed version (ground truth):
boolean canPutInSlot(@Nonnull ItemStack me,int slotNum,@Nonnull ItemStack upgrade);
Program: 22281
Project: 22281
Buggy source:
boolean isItemValidForSlot(ItemStack me,int var1,ItemStack var2);

Fixed version (ground truth):
boolean isItemValidForSlot(@Nonnull ItemStack me,int var1,@Nonnull ItemStack var2);
Program: 22282
Project: 22282
Buggy source:
@Override public List<ItemStack> apply(ItemStack input,World world){
  return out;
}

Fixed version (ground truth):
@Override public List<ItemStack> apply(@Nonnull ItemStack input,World world){
  return out;
}
Program: 22283
Project: 22283
Buggy source:
/** 
 * Registers a smasher recipe
 * @param input The input ItemStack
 * @param function The function that returns the output.
 */
public static void registerSmashable(ItemStack input,BiFunction<ItemStack,World,List<ItemStack>> function){
  registry.put(input,function);
}

Fixed version (ground truth):
/** 
 * Registers a smasher recipe
 * @param input The input ItemStack
 * @param function The function that returns the output.
 */
public static void registerSmashable(@Nonnull ItemStack input,BiFunction<ItemStack,World,List<ItemStack>> function){
  registry.put(input,function);
}
Program: 22284
Project: 22284
Buggy source:
/** 
 * Gets all of the input ItemStacks that will produce the provided output. This does not respect stacksize.
 * @param output The desired output
 * @param world The current world
 * @return A list of all ItemStacks that produce the output. Can be null if the output is null. Because the functionmight use randomization (or other such things) to return its outputs, this might not be 100% accurate all of the time.
 */
public static List<ItemStack> getInputs(ItemStack output,World world){
  if (output == null) {
    return null;
  }
  List<ItemStack> inputs=new ArrayList<>();
  for (  Map.Entry<ItemStack,BiFunction<ItemStack,World,List<ItemStack>>> entry : registry.entrySet()) {
    for (    ItemStack out : entry.getValue().apply(entry.getKey(),world)) {
      if (out.isItemEqual(output)) {
        inputs.add(entry.getKey());
      }
    }
  }
  return inputs;
}

Fixed version (ground truth):
/** 
 * Gets all of the input ItemStacks that will produce the provided output. This does not respect stacksize.
 * @param output The desired output
 * @param world The current world
 * @return A list of all ItemStacks that produce the output. Can be null if the output is null. Because the functionmight use randomization (or other such things) to return its outputs, this might not be 100% accurate all of the time.
 */
public static List<ItemStack> getInputs(@Nonnull ItemStack output,World world){
  if (output.isEmpty()) {
    return null;
  }
  List<ItemStack> inputs=new ArrayList<>();
  for (  Map.Entry<ItemStack,BiFunction<ItemStack,World,List<ItemStack>>> entry : registry.entrySet()) {
    for (    ItemStack out : entry.getValue().apply(entry.getKey(),world)) {
      if (out.isItemEqual(output)) {
        inputs.add(entry.getKey());
      }
    }
  }
  return inputs;
}
Program: 22285
Project: 22285
Buggy source:
/** 
 * Removes a smasher recipe
 * @param input The input ItemStack whose recipe is being removed
 */
public static void removeSmashable(ItemStack input){
  registry.remove(input);
}

Fixed version (ground truth):
/** 
 * Removes a smasher recipe
 * @param input The input ItemStack whose recipe is being removed
 */
public static void removeSmashable(@Nonnull ItemStack input){
  registry.remove(input);
}
Program: 22286
Project: 22286
Buggy source:
/** 
 * Gets the smasher output for the provided ItemStack.
 * @param input The input ItemStack
 * @param world The current world
 * @return The output ItemStacks.
 */
@Nonnull public static List<ItemStack> getOutput(ItemStack input,World world){
  if (input == null) {
    return Collections.emptyList();
  }
  List<ItemStack> output=new ArrayList<>();
  for (  Map.Entry<ItemStack,BiFunction<ItemStack,World,List<ItemStack>>> entry : registry.entrySet()) {
    if (ItemStack.areItemStacksEqual(entry.getKey(),input)) {
      output=entry.getValue().apply(input,world);
      if (!output.isEmpty()) {
        break;
      }
    }
  }
  return output.stream().map(ItemStack::copy).collect(Collectors.toList());
}

Fixed version (ground truth):
/** 
 * Gets the smasher output for the provided ItemStack.
 * @param input The input ItemStack
 * @param world The current world
 * @return The output ItemStacks.
 */
@Nonnull public static List<ItemStack> getOutput(@Nonnull ItemStack input,World world){
  if (input.isEmpty()) {
    return Collections.emptyList();
  }
  List<ItemStack> output=new ArrayList<>();
  for (  Map.Entry<ItemStack,BiFunction<ItemStack,World,List<ItemStack>>> entry : registry.entrySet()) {
    if (ItemStack.areItemStacksEqual(entry.getKey(),input)) {
      output=entry.getValue().apply(input,world);
      if (!output.isEmpty()) {
        break;
      }
    }
  }
  return output.stream().map(ItemStack::copy).collect(Collectors.toList());
}
Program: 22287
Project: 22287
Buggy source:
/** 
 * Adds an amount of steam to the item.
 * @param me The ItemStack
 * @param amount How much steam to add.
 * @param entity The entity using the thing.
 * @return Whether it was a successful add.
 */
boolean addSteam(ItemStack me,int amount,EntityLivingBase entity);

Fixed version (ground truth):
/** 
 * Adds an amount of steam to the item.
 * @param me The ItemStack
 * @param amount How much steam to add.
 * @param entity The entity using the thing.
 * @return Whether it was a successful add.
 */
boolean addSteam(@Nonnull ItemStack me,int amount,EntityLivingBase entity);
Program: 22288
Project: 22288
Buggy source:
/** 
 * Checks whether the ItemStack has the amount of power in its steam storage. The opposite of
 * @param me The ItemStack
 * @param powerNeeded The amount of power needed
 * @return True if it has power, false if it doesn't.
 * @see #needsPower(ItemStack,int)
 */
boolean hasPower(ItemStack me,int powerNeeded);

Fixed version (ground truth):
/** 
 * Checks whether the ItemStack has the amount of power in its steam storage. The opposite of
 * @param me The ItemStack
 * @param powerNeeded The amount of power needed
 * @return True if it has power, false if it doesn't.
 * @see #needsPower(ItemStack,int)
 */
boolean hasPower(@Nonnull ItemStack me,int powerNeeded);
Program: 22289
Project: 22289
Buggy source:
/** 
 * Checks whether the ItemStack can have the amount of power added to its steam storage.
 * @param me The ItemStack
 * @param powerNeeded The amount of power to add
 * @return True if it will not exceed the limit with this amount of power added to it, false ifit will, or if it is not a chestplate.
 */
boolean needsPower(ItemStack me,int powerNeeded);

Fixed version (ground truth):
/** 
 * Checks whether the ItemStack can have the amount of power added to its steam storage.
 * @param me The ItemStack
 * @param powerNeeded The amount of power to add
 * @return True if it will not exceed the limit with this amount of power added to it, false ifit will, or if it is not a chestplate.
 */
boolean needsPower(@Nonnull ItemStack me,int powerNeeded);
Program: 22290
Project: 22290
Buggy source:
/** 
 * Called to ensure the item can be charged with steam devices
 * @param me The itemstack of the item
 * @return true if the item can charge
 */
boolean canCharge(ItemStack me);

Fixed version (ground truth):
/** 
 * Called to ensure the item can be charged with steam devices
 * @param me The itemstack of the item
 * @return true if the item can charge
 */
boolean canCharge(@Nonnull ItemStack me);
Program: 22291
Project: 22291
Buggy source:
/** 
 * Drains the provided amount of steam from the armor.
 * @param me The armor piece to drain from.
 * @param amountToDrain The amount of steam to drain from the armor.
 * @param entity The entity using the thing.
 * @return Whether steam was successfully drained.
 */
boolean drainSteam(ItemStack me,int amountToDrain,EntityLivingBase entity);

Fixed version (ground truth):
/** 
 * Drains the provided amount of steam from the armor.
 * @param me The armor piece to drain from.
 * @param amountToDrain The amount of steam to drain from the armor.
 * @param entity The entity using the thing.
 * @return Whether steam was successfully drained.
 */
boolean drainSteam(@Nonnull ItemStack me,int amountToDrain,EntityLivingBase entity);
Program: 22292
Project: 22292
Buggy source:
/** 
 * Removes a steaming custom recipe (not a replacement recipe).
 * @param input The input ItemStack.
 */
public static void removeSteamingRecipe(ItemStack input){
  steamingRecipes.remove(input);
}

Fixed version (ground truth):
/** 
 * Removes a steaming custom recipe (not a replacement recipe).
 * @param input The input ItemStack.
 */
public static void removeSteamingRecipe(@Nonnull ItemStack input){
  steamingRecipes.remove(input);
}
Program: 22293
Project: 22293
Buggy source:
/** 
 * Adds a steaming custom recipe (not a replacement recipe).
 * @param input The input ItemStack
 * @param output The output ItemStack
 */
public static void addSteamingRecipe(ItemStack input,ItemStack output){
  steamingRecipes.put(input,output);
}

Fixed version (ground truth):
/** 
 * Adds a steaming custom recipe (not a replacement recipe).
 * @param input The input ItemStack
 * @param output The output ItemStack
 */
public static void addSteamingRecipe(@Nonnull ItemStack input,@Nonnull ItemStack output){
  steamingRecipes.put(input,output);
}
Program: 22294
Project: 22294
Buggy source:
protected void drawItemStack(ItemStack stack,int x,int y,String str,RenderItem itemRender,FontRenderer fontRendererObj,boolean canHyperlink){
  GlStateManager.pushMatrix();
  GlStateManager.translate(0,0,32F);
  GlStateManager.enableBlend();
  GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA,GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
  RenderHelper.enableGUIStandardItemLighting();
  GlStateManager.enableRescaleNormal();
  GlStateManager.enableDepth();
  itemRender.zLevel=200.0F;
  FontRenderer font=null;
  if (stack != null && stack.getItem() != null) {
    font=stack.getItem().getFontRenderer(stack);
  }
  if (font == null) {
    font=fontRendererObj;
  }
  itemRender.renderItemAndEffectIntoGUI(stack,x,y);
  itemRender.renderItemOverlayIntoGUI(font,stack,x,y,str);
  itemRender.zLevel=0.0F;
  items.add(new Tuple4<>(x,y,stack,canHyperlink));
  GlStateManager.popMatrix();
}

Fixed version (ground truth):
protected void drawItemStack(@Nonnull ItemStack stack,int x,int y,String str,RenderItem itemRender,FontRenderer fontRendererObj,boolean canHyperlink){
  GlStateManager.pushMatrix();
  GlStateManager.translate(0,0,32F);
  GlStateManager.enableBlend();
  GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA,GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
  RenderHelper.enableGUIStandardItemLighting();
  GlStateManager.enableRescaleNormal();
  GlStateManager.enableDepth();
  itemRender.zLevel=200.0F;
  FontRenderer font=null;
  if (!stack.isEmpty()) {
    font=stack.getItem().getFontRenderer(stack);
  }
  if (font == null) {
    font=fontRendererObj;
  }
  itemRender.renderItemAndEffectIntoGUI(stack,x,y);
  itemRender.renderItemOverlayIntoGUI(font,stack,x,y,str);
  itemRender.zLevel=0.0F;
  items.add(new Tuple4<>(x,y,stack,canHyperlink));
  GlStateManager.popMatrix();
}
Program: 22295
Project: 22295
Buggy source:
private void drawItemStackInPage(ItemStack itemStack,FontRenderer fontRenderer,int x,int j,int y,int i,RenderItem renderer){
  fontRenderer.setUnicodeFlag(false);
  drawItemStack(itemStack,x + 49 + j * 19,y + 59 + i * 19,"String_Node_Str",renderer,fontRenderer,true);
  fontRenderer.setUnicodeFlag(true);
}

Fixed version (ground truth):
private void drawItemStackInPage(@Nonnull ItemStack itemStack,FontRenderer fontRenderer,int x,int j,int y,int i,RenderItem renderer){
  fontRenderer.setUnicodeFlag(false);
  drawItemStack(itemStack,x + 49 + j * 19,y + 59 + i * 19,"String_Node_Str",renderer,fontRenderer,true);
  fontRenderer.setUnicodeFlag(true);
}
Program: 22297
Project: 22297
Buggy source:
/** 
 * Registers a casting recipe.
 * @param inputLiquid The input liquid
 * @param mold The input mold
 * @param out The output
 */
public static void registerMoldingRecipe(CrucibleLiquid inputLiquid,ItemStack mold,ItemStack out){
  moldingRecipes.put(Pair.of(inputLiquid,mold),out);
}

Fixed version (ground truth):
/** 
 * Registers a casting recipe.
 * @param inputLiquid The input liquid
 * @param mold The input mold
 * @param out The output
 */
public static void registerMoldingRecipe(CrucibleLiquid inputLiquid,@Nonnull ItemStack mold,@Nonnull ItemStack out){
  moldingRecipes.put(Pair.of(inputLiquid,mold),out);
}
Program: 22298
Project: 22298
Buggy source:
/** 
 * @param inputLiquid The input liquid
 * @param mold The input mold
 * @return The output ItemStack
 */
@Nullable public static ItemStack getMoldingOutput(CrucibleLiquid inputLiquid,ItemStack mold){
  for (  Map.Entry<Pair<CrucibleLiquid,ItemStack>,ItemStack> entry : moldingRecipes.entrySet()) {
    Pair<CrucibleLiquid,ItemStack> input=entry.getKey();
    if (ItemStackUtility.compareItemStacks(mold,input.getRight()) && input.getLeft().equals(inputLiquid)) {
      return entry.getValue();
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @param inputLiquid The input liquid
 * @param mold The input mold
 * @return The output ItemStack
 */
@Nonnull public static ItemStack getMoldingOutput(CrucibleLiquid inputLiquid,@Nonnull ItemStack mold){
  for (  Map.Entry<Pair<CrucibleLiquid,ItemStack>,ItemStack> entry : moldingRecipes.entrySet()) {
    Pair<CrucibleLiquid,ItemStack> input=entry.getKey();
    if (ItemStackUtility.compareItemStacks(mold,input.getRight()) && input.getLeft().equals(inputLiquid)) {
      return entry.getValue();
    }
  }
  return ItemStack.EMPTY;
}
Program: 22299
Project: 22299
Buggy source:
/** 
 * Called after the weapon fires a round and the entity is spawned. This is after the ArrowLooseEvent is sent and after the ItemStack's loaded NBT key is decremented.
 * @param weaponStack The ItemStack for the weapon
 * @param world The world
 * @param player The player firing the round.
 */
default void afterRoundFired(ItemStack weaponStack,World world,EntityPlayer player){
}

Fixed version (ground truth):
/** 
 * Called after the weapon fires a round and the entity is spawned. This is after the ArrowLooseEvent is sent and after the ItemStack's loaded NBT key is decremented.
 * @param weaponStack The ItemStack for the weapon
 * @param world The world
 * @param player The player firing the round.
 */
default void afterRoundFired(@Nonnull ItemStack weaponStack,World world,EntityPlayer player){
}
Program: 22300
Project: 22300
Buggy source:
/** 
 * Whether this enhancement is valid for the given itemstack.
 * @param stack The ItemStack being upgraded.
 * @return Whether the enhancement can be used on the ItemStack.
 */
boolean canApplyTo(ItemStack stack);

Fixed version (ground truth):
/** 
 * Whether this enhancement is valid for the given itemstack.
 * @param stack The ItemStack being upgraded.
 * @return Whether the enhancement can be used on the ItemStack.
 */
boolean canApplyTo(@Nonnull ItemStack stack);
Program: 22301
Project: 22301
Buggy source:
@Override default void afterRoundFired(ItemStack weaponStack,World world,EntityPlayer player){
  if (player.capabilities.isFlying && !player.onGround && weaponStack.hasTagCompound()) {
    int timeBetweenFire=weaponStack.getTagCompound().getInteger("String_Node_Str");
    weaponStack.getTagCompound().setInteger("String_Node_Str",timeBetweenFire + getFireDelayChange(weaponStack));
  }
}

Fixed version (ground truth):
@Override default void afterRoundFired(@Nonnull ItemStack weaponStack,World world,EntityPlayer player){
  if (player.capabilities.isFlying && !player.onGround && weaponStack.hasTagCompound()) {
    int timeBetweenFire=weaponStack.getTagCompound().getInteger("String_Node_Str");
    weaponStack.getTagCompound().setInteger("String_Node_Str",timeBetweenFire + getFireDelayChange(weaponStack));
  }
}
Program: 22303
Project: 22303
Buggy source:
private void putInInventory(EntityItem item,int slot,IInventory inv){
  ItemStack checkStack1=null;
  ItemStack checkStack2=null;
  ItemStack stackInSlot=inv.getStackInSlot(slot);
  if (inv.getStackInSlot(slot) != null) {
    checkStack1=stackInSlot.copy();
    checkStack1.stackSize=1;
    checkStack2=item.getEntityItem().copy();
    checkStack2.stackSize=1;
  }
  if ((stackInSlot == null || (ItemStack.areItemStacksEqual(checkStack1,checkStack2) && stackInSlot.stackSize < stackInSlot.getMaxStackSize())) && inv.isItemValidForSlot(slot,item.getEntityItem())) {
    ItemStack stack=item.getEntityItem().copy();
    boolean setDead=true;
    if (inv.getStackInSlot(slot) != null) {
      if ((stackInSlot.stackSize + stack.stackSize) > stack.getMaxStackSize() && checkStack2 != null) {
        setDead=false;
        int total=stackInSlot.stackSize + stack.stackSize;
        stack.stackSize=stack.getMaxStackSize();
        total-=stack.getMaxStackSize();
        checkStack2.stackSize=total;
        item.setEntityItemStack(checkStack2);
      }
 else {
        stack.stackSize=stackInSlot.stackSize + item.getEntityItem().stackSize;
      }
    }
    inv.setInventorySlotContents(slot,stack);
    if (setDead) {
      item.setDead();
    }
  }
}

Fixed version (ground truth):
/** 
 * @param item The item to put inside the inventory, held in an EntityItem.
 * @param slot The slot in which to put the item in within the inventory.
 * @param inv The inventory to put the item inside of.
 * @return Whether it was added or not.
 */
private boolean putInInventory(EntityItem item,int slot,IInventory inv){
  ItemStack checkStack1=null;
  ItemStack checkStack2=null;
  ItemStack stackInSlot=inv.getStackInSlot(slot);
  if (inv.getStackInSlot(slot) != null) {
    checkStack1=stackInSlot.copy();
    checkStack1.stackSize=1;
    checkStack2=item.getEntityItem().copy();
    checkStack2.stackSize=1;
  }
  if ((stackInSlot == null || (ItemStack.areItemStacksEqual(checkStack1,checkStack2) && stackInSlot.stackSize < stackInSlot.getMaxStackSize())) && inv.isItemValidForSlot(slot,item.getEntityItem())) {
    ItemStack stack=item.getEntityItem().copy();
    boolean setDead=true;
    if (inv.getStackInSlot(slot) != null) {
      if ((stackInSlot.stackSize + stack.stackSize) > stack.getMaxStackSize() && checkStack2 != null) {
        setDead=false;
        int total=stackInSlot.stackSize + stack.stackSize;
        stack.stackSize=stack.getMaxStackSize();
        total-=stack.getMaxStackSize();
        checkStack2.stackSize=total;
        item.setEntityItemStack(checkStack2);
      }
 else {
        stack.stackSize=stackInSlot.stackSize + item.getEntityItem().stackSize;
      }
    }
    inv.setInventorySlotContents(slot,stack);
    if (setDead) {
      item.setDead();
    }
    return true;
  }
  return false;
}
Program: 22304
Project: 22304
Buggy source:
/** 
 * Depopulates the itemStack's list of stored items and inserts them into the inventory.
 * @param itemStack The ItemStack to depopulate
 * @param inventory The inventory populate
 */
private static void depopulate(ItemStack itemStack,InventoryPlayer inventory){
  NBTTagList list=itemStack.getTagCompound().getTagList("String_Node_Str",Constants.NBT.TAG_COMPOUND);
  for (int i=0; i < InventoryPlayer.getHotbarSize(); i++) {
    ItemStack stack=ItemStack.loadItemStackFromNBT(list.getCompoundTagAt(i));
    if (stack != null) {
      inventory.setInventorySlotContents(inventory.getFirstEmptyStack(),stack);
    }
  }
  itemStack.getTagCompound().removeTag("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Depopulates the itemStack's list of stored items and inserts them into the inventory.
 * @param itemStack The ItemStack to depopulate
 * @param inventory The inventory populate
 */
private static void depopulate(ItemStack itemStack,InventoryPlayer inventory){
  NBTTagList list=itemStack.getTagCompound().getTagList("String_Node_Str",Constants.NBT.TAG_COMPOUND).copy();
  NBTTagList remainingItems=new NBTTagList();
  for (int i=0; i < list.tagCount(); i++) {
    ItemStack containedStack=ItemStack.loadItemStackFromNBT(list.getCompoundTagAt(i));
    int emptySlotID=inventory.getFirstEmptyStack();
    if (containedStack != null) {
      if (emptySlotID == -1) {
        remainingItems.appendTag(containedStack.serializeNBT());
      }
 else {
        inventory.setInventorySlotContents(emptySlotID,containedStack);
      }
    }
  }
  itemStack.getTagCompound().setTag("String_Node_Str",remainingItems);
}
Program: 22305
Project: 22305
Buggy source:
/** 
 * Opposite of   {@link StringUtility#capitalize(String)}.
 */
public static String decapitalize(String str){
  return str.substring(0,1).toLowerCase() + (str.substring(1));
}

Fixed version (ground truth):
/** 
 * Opposite of   {@link StringUtility#capitalize(String)}.
 */
public static String decapitalize(String str){
  return str.substring(0,1).toLowerCase(Locale.US) + (str.substring(1));
}
Program: 22306
Project: 22306
Buggy source:
/** 
 * Capitalizes the first letter in the provided String.
 * @param str The string to capitalize.
 * @return The string with the first character capitalized. Examples:capitalize("title") // => "Title" capitalize("Title") // => "Title" capitalize("él") // => "Él"
 */
public static String capitalize(String str){
  return str.substring(0,1).toUpperCase() + (str.substring(1));
}

Fixed version (ground truth):
/** 
 * Capitalizes the first letter in the provided String.
 * @param str The string to capitalize.
 * @return The string with the first character capitalized. Examples:capitalize("title") // => "Title" capitalize("Title") // => "Title" capitalize("él") // => "Él"
 */
public static String capitalize(String str){
  return str.substring(0,1).toUpperCase(Locale.US) + (str.substring(1));
}
Program: 22309
Project: 22309
Buggy source:
@Override public void onBlockAdded(World world,BlockPos pos,IBlockState state){
  onNeighborChange(world,pos,null);
}

Fixed version (ground truth):
@Override public void onBlockAdded(World world,BlockPos pos,IBlockState state){
  neighborChanged(state,world,pos,null);
}
Program: 22310
Project: 22310
Buggy source:
@Override public void neighborChanged(IBlockState state,World world,BlockPos pos,Block neighbor){
  TileEntity tileEntity=world.getTileEntity(pos);
  if (tileEntity != null && tileEntity instanceof TileEntityFan) {
    boolean poweredByRedstone=world.isBlockIndirectlyGettingPowered(pos) > 0;
    TileEntityFan fan=(TileEntityFan)tileEntity;
    fan.updateRedstoneState(poweredByRedstone);
  }
}

Fixed version (ground truth):
@Override public void neighborChanged(IBlockState state,World world,BlockPos pos,Block neighbor){
  TileEntity tileEntity=world.getTileEntity(pos);
  if (tileEntity != null && tileEntity instanceof TileEntityFan) {
    boolean poweredByRedstone=world.isBlockPowered(pos);
    TileEntityFan fan=(TileEntityFan)tileEntity;
    fan.updateRedstoneState(poweredByRedstone);
  }
}
Program: 22314
Project: 22314
Buggy source:
@Mod.EventHandler public void load(FMLInitializationEvent event){
  NetworkRegistry.INSTANCE.registerGuiHandler(this,new SteamcraftGuiHandler());
  MinecraftForge.EVENT_BUS.register(new SteamcraftEventHandler());
  MinecraftForge.EVENT_BUS.register(new PhobicCoatingHandler());
  MinecraftForge.EVENT_BUS.register(new SteamcraftTickHandler());
  MinecraftForge.EVENT_BUS.register(new PhobicCoatingHandler());
  if (event.getSide() == Side.CLIENT) {
    MinecraftForge.EVENT_BUS.register(new ExosuitModelCache());
  }
  proxy.registerRenderers();
  proxy.registerHotkeys();
  for (  BlockCategories category : BlockCategories.values()) {
    category.getCategory().recipes();
  }
  for (  ItemCategories category : ItemCategories.values()) {
    category.getCategory().recipes();
  }
  STEAM_ENGINEER_PROFESSION=new VillagerRegistry.VillagerProfession("String_Node_Str","String_Node_Str");
  STEAM_ENGINEER_CAREER=new SteamEngineerCareer();
  VillagerRegistry.instance().register(STEAM_ENGINEER_PROFESSION);
  VillagerRegistry.instance().registerVillageCreationHandler(new SteamWorkshopCreationHandler());
  for (  MiscellaneousCategories category : MiscellaneousCategories.values()) {
    if (category.isEnabled()) {
      category.getCategory().init();
    }
  }
}

Fixed version (ground truth):
@Mod.EventHandler public void load(FMLInitializationEvent event){
  NetworkRegistry.INSTANCE.registerGuiHandler(this,new SteamcraftGuiHandler());
  MinecraftForge.EVENT_BUS.register(new SteamcraftEventHandler());
  MinecraftForge.EVENT_BUS.register(new PhobicCoatingHandler());
  MinecraftForge.EVENT_BUS.register(new SteamcraftTickHandler());
  MinecraftForge.EVENT_BUS.register(new PhobicCoatingHandler());
  if (event.getSide() == Side.CLIENT) {
    MinecraftForge.EVENT_BUS.register(new ExosuitModelCache());
  }
  proxy.registerRenderers();
  proxy.registerHotkeys();
  for (  BlockCategories category : BlockCategories.values()) {
    category.getCategory().recipes();
  }
  for (  ItemCategories category : ItemCategories.values()) {
    category.getCategory().recipes();
  }
  STEAM_ENGINEER_PROFESSION=new VillagerRegistry.VillagerProfession(MOD_ID + "String_Node_Str",MOD_ID + "String_Node_Str");
  STEAM_ENGINEER_CAREER=new SteamEngineerCareer();
  VillagerRegistry.instance().register(STEAM_ENGINEER_PROFESSION);
  VillagerRegistry.instance().registerVillageCreationHandler(new SteamWorkshopCreationHandler());
  for (  MiscellaneousCategories category : MiscellaneousCategories.values()) {
    if (category.isEnabled()) {
      category.getCategory().init();
    }
  }
}
Program: 22315
Project: 22315
Buggy source:
@Mod.EventHandler public void postInit(FMLPostInitializationEvent event){
  if (Config.enablePipe) {
    MinecraftForge.EVENT_BUS.register(SteamNetworkBlocks.Blocks.PIPE.getBlock());
  }
  ItemSmashedOre iso=(ItemSmashedOre)MetalItems.Items.SMASHED_ORE.getItem();
  iso.registerDusts();
  iso.addSmelting();
  iso.registerDusts();
  SteamcraftBook.registerBookResearch();
  long start=System.currentTimeMillis();
  String[] ores=OreDictionary.getOreNames();
  for (  String s : ores) {
    List<ItemStack> stacks=OreDictionary.getOres(s);
    for (    ItemStack stack : stacks) {
      OreDictHelper.initializeOreDicts(s,stack);
    }
  }
  long end=System.currentTimeMillis();
  int time=(int)(end - start);
  FMLLog.info("String_Node_Str",time);
  DrillHeadMaterial.registerDefaults();
  ((ToolUpgradeItems)ItemCategories.TOOL_UPGRADES.getCategory()).postInit();
  SteamcraftBook.registerSteamTools();
  for (  MiscellaneousCategories category : MiscellaneousCategories.values()) {
    if (category.isEnabled()) {
      category.getCategory().postInit();
    }
  }
}

Fixed version (ground truth):
@Mod.EventHandler public void postInit(FMLPostInitializationEvent event){
  if (Config.enablePipe) {
    MinecraftForge.EVENT_BUS.register(SteamNetworkBlocks.Blocks.PIPE.getBlock());
  }
  ItemSmashedOre iso=(ItemSmashedOre)MetalItems.Items.SMASHED_ORE.getItem();
  iso.registerDusts();
  iso.addSmelting();
  iso.registerDusts();
  SteamcraftBook.registerBookResearch();
  long start=System.currentTimeMillis();
  String[] ores=OreDictionary.getOreNames();
  for (  String s : ores) {
    List<ItemStack> stacks=OreDictionary.getOres(s);
    for (    ItemStack stack : stacks) {
      OreDictHelper.initializeOreDicts(s,stack);
    }
  }
  long end=System.currentTimeMillis();
  int time=(int)(end - start);
  FMLLog.info("String_Node_Str",time);
  RecipeSorter.register(MOD_ID + "String_Node_Str",DrillHeadRecipe.class,RecipeSorter.Category.SHAPED,"String_Node_Str");
  DrillHeadMaterial.registerDefaults();
  ((ToolUpgradeItems)ItemCategories.TOOL_UPGRADES.getCategory()).postInit();
  SteamcraftBook.registerSteamTools();
  for (  MiscellaneousCategories category : MiscellaneousCategories.values()) {
    if (category.isEnabled()) {
      category.getCategory().postInit();
    }
  }
}
Program: 22322
Project: 22322
Buggy source:
@Override public boolean onBlockActivated(World world,int par2,int par3,int par4,EntityPlayer par5EntityPlayer,int par6,float par7,float par8,float par9){
  return true;
}

Fixed version (ground truth):
@Override public boolean onBlockActivated(World world,BlockPos pos,IBlockState state,EntityPlayer playerIn,EnumHand hand,ItemStack heldItem,EnumFacing side,float hitX,float hitY,float hitZ){
  return true;
}
Program: 22323
Project: 22323
Buggy source:
@Override public boolean isAir(IBlockAccess world,int x,int y,int z){
  return true;
}

Fixed version (ground truth):
@Override public boolean isAir(IBlockState state,IBlockAccess world,BlockPos pos){
  return true;
}
Program: 22324
Project: 22324
Buggy source:
@Override public boolean canHarvestBlock(EntityPlayer player,int meta){
  return false;
}

Fixed version (ground truth):
@Override public boolean canHarvestBlock(IBlockAccess world,BlockPos pos,EntityPlayer player){
  return false;
}
Program: 22325
Project: 22325
Buggy source:
public BlockDummy(){
  super(Material.iron);
  setHardness(50.0F);
  setLightOpacity(0);
}

Fixed version (ground truth):
public BlockDummy(){
  super(Material.IRON);
  setHardness(50.0F);
  setLightOpacity(0);
}
Program: 22328
Project: 22328
Buggy source:
public boolean isEnabled(){
switch (this) {
case IRON:
{
      return Config.enableIronPlate;
    }
case GOLD:
{
    return Config.enableGoldPlate;
  }
case COPPER:
{
  return Config.enableCopperPlate;
}
case ZINC:
{
return Config.enableZincPlate;
}
case BRASS:
{
return Config.enableBrassPlate;
}
case GILDED_IRON:
{
return Config.enableGildedIronPlate;
}
default :
{
return false;
}
}
}

Fixed version (ground truth):
public boolean isEnabled(){
switch (this) {
case IRON_EXO:
{
      return Config.enableIronPlate;
    }
case GOLD_EXO:
{
    return Config.enableGoldPlate;
  }
case COPPER_EXO:
{
  return Config.enableCopperPlate;
}
case ZINC_EXO:
{
return Config.enableZincPlate;
}
case BRASS_EXO:
{
return Config.enableBrassPlate;
}
case GILDED_IRON_EXO:
{
return Config.enableGildedIronPlate;
}
default :
{
return false;
}
}
}
Program: 22330
Project: 22330
Buggy source:
@Override public void postInit(){
  SteamcraftRegistry.registerMeltRecipeOreDict(DUST_GOLD,Liquids.GOLD.getLiquid(),9);
  SteamcraftRegistry.registerMeltRecipeOreDict(DUST_IRON,Liquids.IRON.getLiquid(),9);
  SteamcraftRegistry.registerMeltRecipeOreDict(DUST_ZINC,Liquids.ZINC.getLiquid(),9);
  SteamcraftRegistry.registerMeltRecipeOreDict(DUST_COPPER,Liquids.COPPER.getLiquid(),9);
  SteamcraftRegistry.registerMeltRecipeOreDict(DUST_BRASS,Liquids.BRASS.getLiquid(),9);
}

Fixed version (ground truth):
@Override public void postInit(){
  SteamcraftRegistry.registerMeltRecipeOreDict(DUST_GOLD,Liquids.GOLD_LIQUID.getLiquid(),9);
  SteamcraftRegistry.registerMeltRecipeOreDict(DUST_IRON,Liquids.IRON_LIQUID.getLiquid(),9);
  SteamcraftRegistry.registerMeltRecipeOreDict(DUST_ZINC,Liquids.ZINC_LIQUID.getLiquid(),9);
  SteamcraftRegistry.registerMeltRecipeOreDict(DUST_COPPER,Liquids.COPPER_LIQUID.getLiquid(),9);
  SteamcraftRegistry.registerMeltRecipeOreDict(DUST_BRASS,Liquids.BRASS_LIQUID.getLiquid(),9);
}
Program: 22331
Project: 22331
Buggy source:
public static void postInit(){
  if (Config.enableLeadPlate && OreDictionary.getOres("String_Node_Str").size() > 0) {
    CrucibleLiquid liquidLead=new CrucibleLiquid("String_Node_Str",OreDictionary.getOres("String_Node_Str").get(0),MetalItems.Items.LEAD_PLATE.createItemStack(),OreDictionary.getOres("String_Node_Str").size() > 0 ? OreDictionary.getOres("String_Node_Str").get(0) : null,null,118,128,157);
    SteamcraftRegistry.registerLiquid(liquidLead);
    SteamcraftRegistry.registerMeltRecipeOreDict("String_Node_Str",liquidLead,9);
    SteamcraftRegistry.registerMeltRecipeOreDict("String_Node_Str",liquidLead,1);
    SteamcraftRegistry.registerMeltRecipeOreDict("String_Node_Str",liquidLead,6);
    SteamcraftRegistry.addExosuitPlate(new ExosuitPlate("String_Node_Str",ExosuitUpgradeItems.PlateItems.LEAD.createItemStack(),"String_Node_Str","String_Node_Str","String_Node_Str"));
    SteamcraftRecipes.addExosuitPlateRecipes("String_Node_Str","String_Node_Str",MetalItems.Items.LEAD_PLATE.createItemStack(),liquidLead);
  }
}

Fixed version (ground truth):
public static void postInit(){
  if (Config.enableLeadPlate && OreDictionary.getOres("String_Node_Str").size() > 0) {
    CrucibleLiquid liquidLead=new CrucibleLiquid("String_Node_Str",OreDictionary.getOres("String_Node_Str").get(0),MetalItems.Items.LEAD_PLATE.createItemStack(),OreDictionary.getOres("String_Node_Str").size() > 0 ? OreDictionary.getOres("String_Node_Str").get(0) : null,null,118,128,157);
    SteamcraftRegistry.registerLiquid(liquidLead);
    SteamcraftRegistry.registerMeltRecipeOreDict("String_Node_Str",liquidLead,9);
    SteamcraftRegistry.registerMeltRecipeOreDict("String_Node_Str",liquidLead,1);
    SteamcraftRegistry.registerMeltRecipeOreDict("String_Node_Str",liquidLead,6);
    SteamcraftRegistry.addExosuitPlate(new ExosuitPlate("String_Node_Str",ExosuitUpgradeItems.PlateItems.LEAD_EXO.createItemStack(),"String_Node_Str","String_Node_Str","String_Node_Str"));
    SteamcraftRecipes.addExosuitPlateRecipes("String_Node_Str","String_Node_Str",MetalItems.Items.LEAD_PLATE.createItemStack(),liquidLead);
  }
}
Program: 22332
Project: 22332
Buggy source:
public static void registerBookResearch(){
  if (Config.hasAllCrucial) {
    registerRecentCreations();
    registerBasics();
    registerFirearms();
    registerCasting();
    registerGadgets();
    registerSteamPower();
    registerExosuit();
  }
}

Fixed version (ground truth):
public static void registerBookResearch(){
  if (Config.hasAllCrucial) {
    registerBasics();
    registerFirearms();
    registerCasting();
    registerGadgets();
    registerSteamPower();
    registerExosuit();
  }
}
Program: 22334
Project: 22334
Buggy source:
@Override @SideOnly(Side.CLIENT) public void randomDisplayTick(World world,int x,int y,int z,Random rand){
  TileEntityBoiler boiler=(TileEntityBoiler)world.getTileEntity(x,y,z);
  if (boiler.isBurning()) {
    int l=world.getBlockMetadata(x,y,z);
    float f=(float)x + 0.5F;
    float f1=(float)y + 0.0F + rand.nextFloat() * 6.0F / 16.0F;
    float f2=(float)z + 0.5F;
    float f3=0.52F;
    float f4=rand.nextFloat() * 0.6F - 0.3F;
    if (l == 4) {
      world.spawnParticle("String_Node_Str",(double)(f - f3),(double)f1,(double)(f2 + f4),0.0D,0.0D,0.0D);
      world.spawnParticle("String_Node_Str",(double)(f - f3),(double)f1,(double)(f2 + f4),0.0D,0.0D,0.0D);
    }
 else     if (l == 5) {
      world.spawnParticle("String_Node_Str",(double)(f + f3),(double)f1,(double)(f2 + f4),0.0D,0.0D,0.0D);
      world.spawnParticle("String_Node_Str",(double)(f + f3),(double)f1,(double)(f2 + f4),0.0D,0.0D,0.0D);
    }
 else     if (l == 2) {
      world.spawnParticle("String_Node_Str",(double)(f + f4),(double)f1,(double)(f2 - f3),0.0D,0.0D,0.0D);
      world.spawnParticle("String_Node_Str",(double)(f + f4),(double)f1,(double)(f2 - f3),0.0D,0.0D,0.0D);
    }
 else     if (l == 3) {
      world.spawnParticle("String_Node_Str",(double)(f + f4),(double)f1,(double)(f2 + f3),0.0D,0.0D,0.0D);
      world.spawnParticle("String_Node_Str",(double)(f + f4),(double)f1,(double)(f2 + f3),0.0D,0.0D,0.0D);
    }
  }
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public void randomDisplayTick(IBlockState state,World world,BlockPos pos,Random rand){
  TileEntity tile=world.getTileEntity(pos);
  if (tile == null || !(tile instanceof TileEntityBoiler)) {
    return;
  }
  TileEntityBoiler boiler=(TileEntityBoiler)tile;
  if (boiler.isBurning()) {
    EnumFacing facing=state.getValue(FACING);
    float f=(float)pos.getX() + 0.5F;
    float f1=(float)pos.getY() + 0.0F + rand.nextFloat() * 6.0F / 16.0F;
    float f2=(float)pos.getZ() + 0.5F;
    float f3=0.52F;
    float f4=rand.nextFloat() * 0.6F - 0.3F;
    double xCoord;
    double yCoord=(double)f1;
    double zCoord;
switch (facing) {
case WEST:
{
        xCoord=(double)f - f3;
        zCoord=(double)f2 + f4;
        break;
      }
case EAST:
{
      xCoord=(double)f + f3;
      zCoord=(double)f2 + f4;
      break;
    }
case NORTH:
{
    xCoord=(double)f + f4;
    zCoord=(double)f2 - f3;
    break;
  }
case SOUTH:
{
  xCoord=(double)f + f4;
  zCoord=(double)f2 + f3;
  break;
}
default :
{
return;
}
}
world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL,xCoord,yCoord,zCoord,0D,0D,0D);
world.spawnParticle(EnumParticleTypes.FLAME,xCoord,yCoord,zCoord,0D,0D,0D);
}
}
Program: 22335
Project: 22335
Buggy source:
@Override public boolean onBlockActivated(World world,int x,int y,int z,EntityPlayer player,int side,float xf,float yf,float zf){
  TileEntityBoiler tileEntity=(TileEntityBoiler)world.getTileEntity(x,y,z);
  boolean isClient=!world.isRemote;
  if (!FluidHelper.playerIsHoldingWaterContainer(player) && isClient && tileEntity != null) {
    player.openGui(Steamcraft.instance,0,world,x,y,z);
  }
 else {
    FluidHelper.fillTankFromHeldItem(player,tileEntity.myTank);
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean onBlockActivated(World world,BlockPos pos,IBlockState state,EntityPlayer player,EnumHand hand,ItemStack heldItem,EnumFacing side,float hitX,float hitY,float hitZ){
  TileEntityBoiler tileEntity=(TileEntityBoiler)world.getTileEntity(pos);
  boolean isClient=!world.isRemote;
  if (tileEntity != null) {
    if (!FluidHelper.playerIsHoldingWaterContainer(player) && isClient) {
      player.openGui(Steamcraft.instance,0,world,pos.getX(),pos.getY(),pos.getZ());
    }
 else {
      FluidHelper.fillTankFromHeldItem(player,tileEntity.myTank);
    }
  }
  return true;
}
Program: 22336
Project: 22336
Buggy source:
@Override public void onBlockAdded(World world,int x,int y,int z){
  super.onBlockAdded(world,x,y,z);
  this.func_149930_e(world,x,y,z);
}

Fixed version (ground truth):
@Override public void onBlockAdded(World world,BlockPos pos,IBlockState state){
  super.onBlockAdded(world,pos,state);
  setDefaultFacing(world,pos,state);
}
Program: 22337
Project: 22337
Buggy source:
public BlockBoiler(boolean on){
  super(Material.iron);
  this.field_149932_b=on;
  setHardness(5F);
  setResistance(10F);
}

Fixed version (ground truth):
public BlockBoiler(){
  super(Material.IRON);
  setHardness(5F);
  setResistance(10F);
}