nus-yam/ex-repair huggingface dataset:
Program: 22436
Project: 22436
Buggy source:
/** 
 * Looks for changes made in the container, sends them to every listener.
 */
public void detectAndSendChanges(){
  super.detectAndSendChanges();
  for (int i=0; i < this.crafters.size(); ++i) {
    ICrafting icrafting=(ICrafting)this.crafters.get(i);
    if (this.lastCookTime != this.furnace.furnaceCookTime) {
      icrafting.sendProgressBarUpdate(this,0,this.furnace.furnaceCookTime);
    }
    if (this.lastBurnTime != this.furnace.furnaceBurnTime) {
      icrafting.sendProgressBarUpdate(this,1,this.furnace.furnaceBurnTime);
    }
    if (this.lastItemBurnTime != this.furnace.currentItemBurnTime) {
      icrafting.sendProgressBarUpdate(this,2,this.furnace.currentItemBurnTime);
    }
    if (this.lastPressure != this.furnace.getPressureAsInt()) {
      icrafting.sendProgressBarUpdate(this,3,this.furnace.getPressureAsInt());
    }
    if (this.lastWater != this.furnace.getTank().getFluidAmount()) {
      icrafting.sendProgressBarUpdate(this,4,this.furnace.getTank().getFluidAmount());
    }
  }
  this.lastCookTime=this.furnace.furnaceCookTime;
  this.lastBurnTime=this.furnace.furnaceBurnTime;
  this.lastItemBurnTime=this.furnace.currentItemBurnTime;
  this.lastPressure=this.furnace.getPressureAsInt();
  this.lastWater=this.furnace.getTank().getFluidAmount();
}

Fixed version (ground truth):
/** 
 * Looks for changes made in the container, sends them to every listener.
 */
@Override public void detectAndSendChanges(){
  super.detectAndSendChanges();
  for (int i=0; i < this.crafters.size(); ++i) {
    ICrafting icrafting=(ICrafting)this.crafters.get(i);
    if (this.lastCookTime != this.furnace.furnaceCookTime) {
      icrafting.sendProgressBarUpdate(this,0,this.furnace.furnaceCookTime);
    }
    if (this.lastBurnTime != this.furnace.furnaceBurnTime) {
      icrafting.sendProgressBarUpdate(this,1,this.furnace.furnaceBurnTime);
    }
    if (this.lastItemBurnTime != this.furnace.currentItemBurnTime) {
      icrafting.sendProgressBarUpdate(this,2,this.furnace.currentItemBurnTime);
    }
    if (this.lastPressure != this.furnace.getPressureAsInt()) {
      icrafting.sendProgressBarUpdate(this,3,this.furnace.getPressureAsInt());
    }
    if (this.lastWater != this.furnace.getTank().getFluidAmount()) {
      icrafting.sendProgressBarUpdate(this,4,this.furnace.getTank().getFluidAmount());
    }
  }
  this.lastCookTime=this.furnace.furnaceCookTime;
  this.lastBurnTime=this.furnace.furnaceBurnTime;
  this.lastItemBurnTime=this.furnace.currentItemBurnTime;
  this.lastPressure=this.furnace.getPressureAsInt();
  this.lastWater=this.furnace.getTank().getFluidAmount();
}
Program: 22438
Project: 22438
Buggy source:
public void addCraftingToCrafters(ICrafting par1ICrafting){
  super.addCraftingToCrafters(par1ICrafting);
  par1ICrafting.sendProgressBarUpdate(this,0,this.furnace.furnaceCookTime);
  par1ICrafting.sendProgressBarUpdate(this,1,this.furnace.furnaceBurnTime);
  par1ICrafting.sendProgressBarUpdate(this,2,TileEntityBoiler.getItemBurnTime(null));
  par1ICrafting.sendProgressBarUpdate(this,3,(int)Math.floor((double)this.furnace.getPressure() * 1000));
}

Fixed version (ground truth):
@Override public void addCraftingToCrafters(ICrafting par1ICrafting){
  super.addCraftingToCrafters(par1ICrafting);
  par1ICrafting.sendProgressBarUpdate(this,0,this.furnace.furnaceCookTime);
  par1ICrafting.sendProgressBarUpdate(this,1,this.furnace.furnaceBurnTime);
  par1ICrafting.sendProgressBarUpdate(this,2,TileEntityBoiler.getItemBurnTime(null));
  par1ICrafting.sendProgressBarUpdate(this,3,(int)Math.floor((double)this.furnace.getPressure() * 1000));
}
Program: 22439
Project: 22439
Buggy source:
@SideOnly(Side.CLIENT) public void updateProgressBar(int par1,int par2){
  if (par1 == 0) {
    this.furnace.furnaceCookTime=par2;
  }
  if (par1 == 1) {
    this.furnace.furnaceBurnTime=par2;
  }
  if (par1 == 2) {
    this.furnace.currentItemBurnTime=par2;
  }
  if (par1 == 3) {
    this.furnace.pressure=(float)par2 / 1000F;
  }
  if (par1 == 4) {
    int current=this.furnace.getTank().getFluidAmount();
    int diff=par2 - current;
    if (diff > 0) {
      this.furnace.getTank().fill(new FluidStack(FluidRegistry.WATER,diff),true);
    }
 else {
      this.furnace.getTank().drain(-1 * diff,true);
    }
  }
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public void updateProgressBar(int par1,int par2){
  if (par1 == 0) {
    this.furnace.furnaceCookTime=par2;
  }
  if (par1 == 1) {
    this.furnace.furnaceBurnTime=par2;
  }
  if (par1 == 2) {
    this.furnace.currentItemBurnTime=par2;
  }
  if (par1 == 3) {
    this.furnace.pressure=(float)par2 / 1000F;
  }
  if (par1 == 4) {
    int current=this.furnace.getTank().getFluidAmount();
    int diff=par2 - current;
    if (diff > 0) {
      this.furnace.getTank().fill(new FluidStack(FluidRegistry.WATER,diff),true);
    }
 else {
      this.furnace.getTank().drain(-1 * diff,true);
    }
  }
}
Program: 22440
Project: 22440
Buggy source:
private static void registerFood(){
  steamedFish=new ItemSteamedFood((ItemFood)Items.cooked_fished).setUnlocalizedName("String_Node_Str").setCreativeTab(Steamcraft.tab);
  GameRegistry.registerItem(steamedFish,"String_Node_Str");
  SteamcraftRegistry.addSteamFood(Items.cooked_fished,steamedFish);
  steamedSalmon=new ItemSteamedFood((ItemFood)new ItemStack(Items.cooked_fished,1,1).getItem()).setUnlocalizedName("String_Node_Str").setCreativeTab(Steamcraft.tab);
  GameRegistry.registerItem(steamedSalmon,"String_Node_Str");
  SteamcraftRegistry.addSteamFood(new ItemStack(Items.cooked_fished,1,1).getItem(),steamedSalmon);
  steamedChicken=new ItemSteamedFood((ItemFood)Items.cooked_chicken).setUnlocalizedName("String_Node_Str").setCreativeTab(Steamcraft.tab);
  GameRegistry.registerItem(steamedChicken,"String_Node_Str");
  SteamcraftRegistry.addSteamFood(Items.cooked_chicken,steamedChicken);
  steamedBeef=new ItemSteamedFood((ItemFood)Items.cooked_beef).setUnlocalizedName("String_Node_Str").setCreativeTab(Steamcraft.tab);
  GameRegistry.registerItem(steamedBeef,"String_Node_Str");
  SteamcraftRegistry.addSteamFood(Items.cooked_beef,steamedBeef);
  steamedPorkchop=new ItemSteamedFood((ItemFood)Items.cooked_porkchop).setUnlocalizedName("String_Node_Str").setCreativeTab(Steamcraft.tab);
  GameRegistry.registerItem(steamedPorkchop,"String_Node_Str");
  SteamcraftRegistry.addSteamFood(Items.cooked_porkchop,steamedPorkchop);
}

Fixed version (ground truth):
private static void registerFood(){
  steamedFish=new ItemSteamedFood((ItemFood)Items.cooked_fished).setUnlocalizedName("String_Node_Str").setCreativeTab(Steamcraft.tab);
  GameRegistry.registerItem(steamedFish,"String_Node_Str");
  SteamcraftRegistry.addSteamFood(Items.cooked_fished,steamedFish);
  steamedSalmon=new ItemSteamedFood((ItemFood)new ItemStack(Items.cooked_fished,1,1).getItem()).setUnlocalizedName("String_Node_Str").setCreativeTab(Steamcraft.tab).setTextureName("String_Node_Str");
  GameRegistry.registerItem(steamedSalmon,"String_Node_Str");
  SteamcraftRegistry.addSteamFood(Items.cooked_fished,1,steamedSalmon,-1);
  steamedChicken=new ItemSteamedFood((ItemFood)Items.cooked_chicken).setUnlocalizedName("String_Node_Str").setCreativeTab(Steamcraft.tab);
  GameRegistry.registerItem(steamedChicken,"String_Node_Str");
  SteamcraftRegistry.addSteamFood(Items.cooked_chicken,steamedChicken);
  steamedBeef=new ItemSteamedFood((ItemFood)Items.cooked_beef).setUnlocalizedName("String_Node_Str").setCreativeTab(Steamcraft.tab);
  GameRegistry.registerItem(steamedBeef,"String_Node_Str");
  SteamcraftRegistry.addSteamFood(Items.cooked_beef,steamedBeef);
  steamedPorkchop=new ItemSteamedFood((ItemFood)Items.cooked_porkchop).setUnlocalizedName("String_Node_Str").setCreativeTab(Steamcraft.tab);
  GameRegistry.registerItem(steamedPorkchop,"String_Node_Str");
  SteamcraftRegistry.addSteamFood(Items.cooked_porkchop,steamedPorkchop);
}
Program: 22441
Project: 22441
Buggy source:
public static void addSteamFood(Item food1,Item food2){
  steamedFoods.put(MutablePair.of(food1,-1),MutablePair.of(food2,-1));
}

Fixed version (ground truth):
/** 
 * Adds a steamed food to the steamedFoods registry without metadata.
 * @param food1 The input food item
 * @param food2 The output food item
 */
public static void addSteamFood(Item food1,Item food2){
  steamedFoods.put(MutablePair.of(food1,-1),MutablePair.of(food2,-1));
}
Program: 22443
Project: 22443
Buggy source:
public boolean canSmelt(){
  if (this.getStackInSlot(0) == null) {
    return false;
  }
 else {
    ItemStack itemstack=FurnaceRecipes.smelting().getSmeltingResult(this.getStackInSlot(0));
    if (itemstack == null)     return false;
    if (SteamcraftRegistry.steamedFoods.containsKey(MutablePair.of(itemstack.getItem(),-1))) {
      int meta=SteamcraftRegistry.steamedFoods.get(MutablePair.of(itemstack.getItem(),-1)).right;
      Item item=SteamcraftRegistry.steamedFoods.get(MutablePair.of(itemstack.getItem(),-1)).left;
      if (meta == -1) {
        itemstack=new ItemStack(item);
      }
 else {
        itemstack=new ItemStack(item,0,meta);
      }
    }
    if (SteamcraftRegistry.steamedFoods.containsKey(MutablePair.of(itemstack.getItem(),itemstack.getItemDamage()))) {
      int meta=SteamcraftRegistry.steamedFoods.get(MutablePair.of(itemstack.getItem(),itemstack.getItemDamage())).right;
      Item item=SteamcraftRegistry.steamedFoods.get(MutablePair.of(itemstack.getItem(),itemstack.getItemDamage())).left;
      if (meta == -1) {
        itemstack=new ItemStack(item);
      }
 else {
        itemstack=new ItemStack(item,0,meta);
      }
    }
    if (this.getStackInSlot(2) == null)     return true;
    if (!this.getStackInSlot(2).isItemEqual(itemstack))     return false;
    int result=getStackInSlot(2).stackSize + itemstack.stackSize;
    return result <= getInventoryStackLimit() && result <= this.getStackInSlot(2).getMaxStackSize();
  }
}

Fixed version (ground truth):
public boolean canSmelt(){
  if (this.getStackInSlot(0) == null) {
    return false;
  }
 else {
    ItemStack itemstack=FurnaceRecipes.smelting().getSmeltingResult(this.getStackInSlot(0));
    if (itemstack == null)     return false;
    if (SteamcraftRegistry.steamedFoods.containsKey(MutablePair.of(itemstack.getItem(),itemstack.getItemDamage()))) {
      int meta=SteamcraftRegistry.steamedFoods.get(MutablePair.of(itemstack.getItem(),itemstack.getItemDamage())).right;
      Item item=SteamcraftRegistry.steamedFoods.get(MutablePair.of(itemstack.getItem(),itemstack.getItemDamage())).left;
      if (meta == -1) {
        itemstack=new ItemStack(item);
      }
 else {
        itemstack=new ItemStack(item,1,meta);
      }
    }
 else     if (SteamcraftRegistry.steamedFoods.containsKey(MutablePair.of(itemstack.getItem(),-1))) {
      int meta=SteamcraftRegistry.steamedFoods.get(MutablePair.of(itemstack.getItem(),-1)).right;
      Item item=SteamcraftRegistry.steamedFoods.get(MutablePair.of(itemstack.getItem(),-1)).left;
      if (meta == -1) {
        itemstack=new ItemStack(item);
      }
 else {
        itemstack=new ItemStack(item,1,meta);
      }
    }
    if (this.getStackInSlot(2) == null)     return true;
    if (!this.getStackInSlot(2).isItemEqual(itemstack))     return false;
    int result=getStackInSlot(2).stackSize + itemstack.stackSize;
    return result <= getInventoryStackLimit() && result <= this.getStackInSlot(2).getMaxStackSize();
  }
}
Program: 22444
Project: 22444
Buggy source:
@SideOnly(Side.CLIENT) public static void extendRange(Entity entity,float amount){
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) public static void extendRange(Entity entity,float amount){
  Minecraft mc=Minecraft.getMinecraft();
  if (!(mc.playerController instanceof IExtendedPlayerController)) {
    GameType type=ReflectionHelper.getPrivateValue(PlayerControllerMP.class,mc.playerController,CURRENT_GAME_TYPE);
    NetHandlerPlayClient net=ReflectionHelper.getPrivateValue(PlayerControllerMP.class,mc.playerController,NET_CLIENT_HANDLER);
    SteamcraftPlayerController controller=new SteamcraftPlayerController(mc,net);
    controller.setGameType(type);
    mc.playerController=controller;
  }
  ((IExtendedPlayerController)mc.playerController).setReachDistanceExtension(((IExtendedPlayerController)mc.playerController).getReachDistanceExtension() + amount);
}
Program: 22445
Project: 22445
Buggy source:
public static Multimap addModifiers(Multimap map,ItemStack stack,int armorType){
}

Fixed version (ground truth):
public static Multimap addModifiers(Multimap map,ItemStack stack,int armorType){
  if ((((ItemExosuitArmor)stack.getItem()).hasPlates(stack) && UtilPlates.getPlate(stack.stackTagCompound.getString("String_Node_Str")).getIdentifier() == "String_Node_Str")) {
    int hp=1;
switch (armorType) {
case 0:
      hp=2;
    break;
case 1:
  hp=4;
break;
case 2:
hp=2;
break;
case 4:
hp=2;
}
map.put(SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(),new AttributeModifier(new UUID(171328,armorType),"String_Node_Str" + armorType,hp,0));
}
return map;
}
Program: 22446
Project: 22446
Buggy source:
@SideOnly(Side.CLIENT) public static void displayThings(MovingObjectPosition pos,RenderGameOverlayEvent.Post event){
  Minecraft mc=Minecraft.getMinecraft();
  Block block=mc.theWorld.getBlock(pos.blockX,pos.blockY,pos.blockZ);
  if (block instanceof IWandHUD) {
    ((IWandHUD)block).renderHUD(mc,event.resolution,mc.theWorld,pos.blockX,pos.blockY,pos.blockZ);
  }
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) public static void displayThings(MovingObjectPosition pos,RenderGameOverlayEvent.Post event){
  Minecraft mc=Minecraft.getMinecraft();
  Block block=mc.theWorld.getBlock(pos.blockX,pos.blockY,pos.blockZ);
  if (block instanceof IWandHUD)   ((IWandHUD)block).renderHUD(mc,event.resolution,mc.theWorld,pos.blockX,pos.blockY,pos.blockZ);
}
Program: 22447
Project: 22447
Buggy source:
@SideOnly(Side.CLIENT) public static void extendRange(Entity entity,float amount){
  Minecraft mc=Minecraft.getMinecraft();
  if (!(mc.playerController instanceof IExtendedPlayerController)) {
    GameType type=ReflectionHelper.getPrivateValue(PlayerControllerMP.class,mc.playerController,CURRENT_GAME_TYPE);
    NetHandlerPlayClient net=ReflectionHelper.getPrivateValue(PlayerControllerMP.class,mc.playerController,NET_CLIENT_HANDLER);
    SteamcraftPlayerController controller=new SteamcraftPlayerController(mc,net);
    controller.setGameType(type);
    mc.playerController=controller;
  }
  ((IExtendedPlayerController)mc.playerController).setReachDistanceExtension(((IExtendedPlayerController)mc.playerController).getReachDistanceExtension() + amount);
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) public static void extendRange(Entity entity,float amount){
}
Program: 22448
Project: 22448
Buggy source:
public static Multimap addModifiers(Multimap map,ItemStack stack,int armorType){
  if ((((ItemExosuitArmor)stack.getItem()).hasPlates(stack) && UtilPlates.getPlate(stack.stackTagCompound.getString("String_Node_Str")).getIdentifier() == "String_Node_Str")) {
    int hp=1;
switch (armorType) {
case 0:
      hp=2;
    break;
case 1:
  hp=4;
break;
case 2:
hp=2;
break;
case 4:
hp=2;
}
map.put(SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(),new AttributeModifier(new UUID(171328,armorType),"String_Node_Str" + armorType,hp,0));
}
return map;
}

Fixed version (ground truth):
public static Multimap addModifiers(Multimap map,ItemStack stack,int armorType){
}
Program: 22449
Project: 22449
Buggy source:
@SideOnly(Side.CLIENT) public static void displayThings(MovingObjectPosition pos,RenderGameOverlayEvent.Post event){
  Minecraft mc=Minecraft.getMinecraft();
  Block block=mc.theWorld.getBlock(pos.blockX,pos.blockY,pos.blockZ);
  if (block instanceof IWandHUD)   ((IWandHUD)block).renderHUD(mc,event.resolution,mc.theWorld,pos.blockX,pos.blockY,pos.blockZ);
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) public static void displayThings(MovingObjectPosition pos,RenderGameOverlayEvent.Post event){
  Minecraft mc=Minecraft.getMinecraft();
  Block block=mc.theWorld.getBlock(pos.blockX,pos.blockY,pos.blockZ);
  if (block instanceof IWandHUD) {
    ((IWandHUD)block).renderHUD(mc,event.resolution,mc.theWorld,pos.blockX,pos.blockY,pos.blockZ);
  }
}
Program: 22451
Project: 22451
Buggy source:
@SideOnly(Side.CLIENT) public static void extendRange(Entity entity,float amount){
  Minecraft mc=Minecraft.getMinecraft();
  if (!(mc.playerController instanceof IExtendedPlayerController)) {
    GameType type=ReflectionHelper.getPrivateValue(PlayerControllerMP.class,mc.playerController,CURRENT_GAME_TYPE);
    NetHandlerPlayClient net=ReflectionHelper.getPrivateValue(PlayerControllerMP.class,mc.playerController,NET_CLIENT_HANDLER);
    SteamcraftPlayerController controller=new SteamcraftPlayerController(mc,net);
    controller.setGameType(type);
    mc.playerController=controller;
  }
  ((IExtendedPlayerController)mc.playerController).setReachDistanceExtension(((IExtendedPlayerController)mc.playerController).getReachDistanceExtension() + amount);
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) public static void extendRange(Entity entity,float amount){
}
Program: 22452
Project: 22452
Buggy source:
public static Multimap addModifiers(Multimap map,ItemStack stack,int armorType){
  if ((((ItemExosuitArmor)stack.getItem()).hasPlates(stack) && UtilPlates.getPlate(stack.stackTagCompound.getString("String_Node_Str")).getIdentifier() == "String_Node_Str")) {
    int hp=1;
switch (armorType) {
case 0:
      hp=2;
    break;
case 1:
  hp=4;
break;
case 2:
hp=2;
break;
case 4:
hp=2;
}
map.put(SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(),new AttributeModifier(new UUID(171328,armorType),"String_Node_Str" + armorType,hp,0));
}
return map;
}

Fixed version (ground truth):
public static Multimap addModifiers(Multimap map,ItemStack stack,int armorType){
}
Program: 22453
Project: 22453
Buggy source:
@SideOnly(Side.CLIENT) public static void displayThings(MovingObjectPosition pos,RenderGameOverlayEvent.Post event){
  Minecraft mc=Minecraft.getMinecraft();
  Block block=mc.theWorld.getBlock(pos.blockX,pos.blockY,pos.blockZ);
  if (block instanceof IWandHUD)   ((IWandHUD)block).renderHUD(mc,event.resolution,mc.theWorld,pos.blockX,pos.blockY,pos.blockZ);
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) public static void displayThings(MovingObjectPosition pos,RenderGameOverlayEvent.Post event){
  Minecraft mc=Minecraft.getMinecraft();
  Block block=mc.theWorld.getBlock(pos.blockX,pos.blockY,pos.blockZ);
  if (block instanceof IWandHUD) {
    ((IWandHUD)block).renderHUD(mc,event.resolution,mc.theWorld,pos.blockX,pos.blockY,pos.blockZ);
  }
}
Program: 22454
Project: 22454
Buggy source:
private void spawnItems(int x,int y,int z){
  if (smooshedStack != null) {
    for (    ItemStack stack : smooshedStack) {
      ItemStack output=REGISTRY.getOutput(stack);
      boolean isSmashableOre=output != null;
      if (Block.getBlockFromItem(stack.getItem()) == Blocks.cobblestone && !this.noSmashDrops) {
        output=new ItemStack(Blocks.gravel);
      }
 else       if (Block.getBlockFromItem(stack.getItem()) == Blocks.gravel && !this.noSmashDrops) {
        output=new ItemStack(Blocks.sand);
      }
      if (isSmashableOre && !this.noSmashDrops) {
        if (worldObj.rand.nextInt(Config.chance) == 0)         output.stackSize*=2;
        EntityItem entityItem=new EntityItem(this.worldObj,x + 0.5F,y + 0.1F,z + 0.5F,output);
        this.worldObj.spawnEntityInWorld(entityItem);
        this.smooshedStack=null;
      }
 else       if (output != null) {
        EntityItem entityItem=new EntityItem(this.worldObj,x + 0.5F,y + 0.1F,z + 0.5F,output);
        this.worldObj.spawnEntityInWorld(entityItem);
        this.smooshedStack=null;
      }
    }
  }
}

Fixed version (ground truth):
private void spawnItems(int x,int y,int z){
  if (smooshedStack != null) {
    for (    ItemStack stack : smooshedStack) {
      ItemStack output=REGISTRY.getOutput(stack);
      boolean isSmashableOre=output != null;
      if (Block.getBlockFromItem(stack.getItem()) == Blocks.cobblestone && !this.noSmashDrops) {
        output=new ItemStack(Blocks.gravel);
      }
 else       if (Block.getBlockFromItem(stack.getItem()) == Blocks.gravel && !this.noSmashDrops) {
        output=new ItemStack(Blocks.sand);
      }
      if (isSmashableOre && !this.noSmashDrops) {
        if (worldObj.rand.nextInt(Config.chance) == 0)         output.stackSize*=2;
        EntityItem entityItem=new EntityItem(this.worldObj,x + 0.5F,y + 0.1F,z + 0.5F,output);
        this.worldObj.spawnEntityInWorld(entityItem);
        this.smooshedStack=null;
      }
 else       if (output != null) {
        EntityItem entityItem=new EntityItem(this.worldObj,x + 0.5F,y + 0.1F,z + 0.5F,output);
        this.worldObj.spawnEntityInWorld(entityItem);
        this.smooshedStack=null;
      }
 else       if (output == null) {
        output=stack;
        EntityItem entityItem=new EntityItem(this.worldObj,x + 0.5F,y + 0.1F,z + 0.5F,output);
        this.worldObj.spawnEntityInWorld(entityItem);
      }
    }
  }
}
Program: 22456
Project: 22456
Buggy source:
@SideOnly(Side.CLIENT) public MovingObjectPosition collisionRayTrace(World world,int x,int y,int z,Vec3 start,Vec3 end){
  EntityPlayer player=Minecraft.getMinecraft().thePlayer;
  TileEntity tile=world.getTileEntity(x,y,z);
  if ((tile == null) || (!(tile instanceof TileEntitySteamPipe)) || player.isSneaking()|| !((player.getCurrentEquippedItem() != null) && (player.getCurrentEquippedItem().getItem() instanceof ItemWrench))) {
    return super.collisionRayTrace(world,x,y,z,start,end);
  }
  List<IndexedCuboid6> cuboids=new LinkedList();
  ((TileEntitySteamPipe)tile).addTraceableCuboids(cuboids);
  MovingObjectPosition mop=this.rayTracer.rayTraceCuboids(new Vector3(start),new Vector3(end),cuboids,new BlockCoord(x,y,z),this);
  return mop;
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) public MovingObjectPosition collisionRayTrace(World world,int x,int y,int z,Vec3 start,Vec3 end){
  EntityPlayer player=Minecraft.getMinecraft().thePlayer;
  TileEntity tile=world.getTileEntity(x,y,z);
  if ((tile == null) || (!(tile instanceof TileEntitySteamPipe)) || player == null || player.isSneaking() || !((player.getCurrentEquippedItem() != null) && (player.getCurrentEquippedItem().getItem() instanceof ItemWrench))) {
    return super.collisionRayTrace(world,x,y,z,start,end);
  }
  List<IndexedCuboid6> cuboids=new LinkedList();
  ((TileEntitySteamPipe)tile).addTraceableCuboids(cuboids);
  MovingObjectPosition mop=this.rayTracer.rayTraceCuboids(new Vector3(start),new Vector3(end),cuboids,new BlockCoord(x,y,z),this);
  return mop;
}
Program: 22458
Project: 22458
Buggy source:
@Override @SideOnly(Side.CLIENT) public void onUpdate(ItemStack stack,World world,Entity entity,int par4,boolean par5){
  super.onUpdate(stack,world,entity,par4,par5);
  if (stack.hasTagCompound() && (!(entity instanceof EntityPlayer) || !(((EntityPlayer)entity).getItemInUse() == stack))) {
    if (stack.stackTagCompound.hasKey("String_Node_Str")) {
      int delay=stack.stackTagCompound.getInteger("String_Node_Str");
      if (delay > 0) {
        delay--;
      }
      stack.stackTagCompound.setInteger("String_Node_Str",delay);
    }
  }
}

Fixed version (ground truth):
@Override public void onUpdate(ItemStack stack,World world,Entity entity,int par4,boolean par5){
  super.onUpdate(stack,world,entity,par4,par5);
  if (stack.hasTagCompound()) {
    if (stack.stackTagCompound.hasKey("String_Node_Str")) {
      int delay=stack.stackTagCompound.getInteger("String_Node_Str");
      if (delay > 0) {
        delay--;
      }
      stack.stackTagCompound.setInteger("String_Node_Str",delay);
    }
  }
}
Program: 22461
Project: 22461
Buggy source:
protected synchronized void tick(){
  if (Config.wimpMode) {
    if (this.getPressure() > 1.09F) {
      this.steam=(int)Math.floor((double)this.capacity * 1.09D);
    }
  }
 else {
    if (this.transporters != null && this.transporters.keySet() != null) {
      if (this.getPressure() > 1.2F) {
        for (        Coord4 coords : transporters.keySet()) {
          System.out.println("String_Node_Str");
          ISteamTransporter trans=transporters.get(coords);
          if (trans == null) {
            transporters.remove(coords);
          }
 else           if (!trans.getWorld().isRemote && shouldExplode(oneInX(this.getPressure(),trans.getPressureResistance()))) {
            trans.explode();
            Coord4 c=trans.getCoords();
            trans.getWorld().createExplosion(null,c.x + 0.5F,c.y + 0.5F,c.z + 0.5F,4.0F,true);
          }
        }
      }
    }
 else {
      System.out.println("String_Node_Str" + this.name);
    }
  }
}

Fixed version (ground truth):
protected synchronized void tick(){
  if (Config.wimpMode) {
    if (this.getPressure() > 1.09F) {
      this.steam=(int)Math.floor((double)this.capacity * 1.09D);
    }
  }
 else {
    if (this.transporters != null && this.transporters.keySet() != null) {
      if (this.getPressure() > 1.02F) {
        for (        Coord4 coords : transporters.keySet()) {
          ISteamTransporter trans=transporters.get(coords);
          if (trans == null || ((TileEntity)trans).isInvalid()) {
            transporters.remove(coords);
          }
 else           if (!trans.getWorld().isRemote && shouldExplode(oneInX(this.getPressure(),trans.getPressureResistance()))) {
            trans.explode();
          }
        }
      }
    }
 else {
      System.out.println("String_Node_Str" + this.name);
    }
  }
}
Program: 22462
Project: 22462
Buggy source:
@Override public void explode(){
  UtilSteamTransport.preExplosion(worldObj,xCoord,yCoord,zCoord,this.distributionDirections);
}

Fixed version (ground truth):
@Override public void explode(){
  this.network.decrSteam((int)(this.network.getSteam() * 0.1F));
  this.network.split(this,true);
  this.worldObj.createExplosion(null,xCoord + 0.5F,yCoord + 0.5F,zCoord + 0.5F,4.0F,true);
}
Program: 22463
Project: 22463
Buggy source:
@Override public void explode(){
  if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 4) {
    if (!isInCluster(xCoord - 1,yCoord,zCoord)) {
      UtilSteamTransport.preExplosion(worldObj,xCoord,yCoord,zCoord,new ForgeDirection[]{ForgeDirection.WEST});
    }
    if (!isInCluster(xCoord + 1,yCoord,zCoord)) {
      UtilSteamTransport.preExplosion(worldObj,xCoord,yCoord,zCoord,new ForgeDirection[]{ForgeDirection.EAST});
    }
    if (!isInCluster(xCoord,yCoord,zCoord - 1)) {
      UtilSteamTransport.preExplosion(worldObj,xCoord,yCoord,zCoord,new ForgeDirection[]{ForgeDirection.NORTH});
    }
    if (!isInCluster(xCoord,yCoord,zCoord + 1)) {
      UtilSteamTransport.preExplosion(worldObj,xCoord,yCoord,zCoord,new ForgeDirection[]{ForgeDirection.SOUTH});
    }
    UtilSteamTransport.preExplosion(worldObj,xCoord,yCoord,zCoord,new ForgeDirection[]{ForgeDirection.UP});
  }
  TileEntityFlashBoiler boiler=(TileEntityFlashBoiler)worldObj.getTileEntity(xCoord,yCoord,zCoord);
  int[][] cluster=(boiler.getClusterCoords(boiler.getValidClusterFromMetadata()));
  for (int pos=0; pos < cluster.length; pos++) {
    int x=cluster[pos][0], y=cluster[pos][1], z=cluster[pos][2];
    if (!(x == xCoord && y == yCoord && z == zCoord)) {
      TileEntityFlashBoiler otherBoiler=(TileEntityFlashBoiler)worldObj.getTileEntity(x,y,z);
      if (otherBoiler != null)       otherBoiler.secondaryExplosion();
    }
  }
}

Fixed version (ground truth):
@Override public void explode(){
  TileEntityFlashBoiler boiler=(TileEntityFlashBoiler)worldObj.getTileEntity(xCoord,yCoord,zCoord);
  if (boiler != null) {
    int[][] cluster=(boiler.getClusterCoords(boiler.getValidClusterFromMetadata()));
    for (int pos=0; pos < cluster.length; pos++) {
      int x=cluster[pos][0], y=cluster[pos][1], z=cluster[pos][2];
      if (!(x == xCoord && y == yCoord && z == zCoord)) {
        TileEntityFlashBoiler otherBoiler=(TileEntityFlashBoiler)worldObj.getTileEntity(x,y,z);
        if (otherBoiler != null)         otherBoiler.secondaryExplosion();
      }
    }
  }
  super.explode();
}
Program: 22465
Project: 22465
Buggy source:
protected synchronized void tick(){
  if (Config.wimpMode) {
    if (this.getPressure() > 1.09F) {
      this.steam=(int)Math.floor((double)this.capacity * 1.09D);
    }
  }
 else {
    if (this.transporters != null && this.transporters.keySet() != null) {
      if (this.getPressure() > 1.02F) {
        for (        Coord4 coords : transporters.keySet()) {
          ISteamTransporter trans=transporters.get(coords);
          if (trans == null || ((TileEntity)trans).isInvalid()) {
            transporters.remove(coords);
          }
 else           if (!trans.getWorld().isRemote && shouldExplode(oneInX(this.getPressure(),trans.getPressureResistance()))) {
            trans.explode();
          }
        }
      }
    }
 else {
      System.out.println("String_Node_Str" + this.name);
    }
  }
}

Fixed version (ground truth):
protected synchronized void tick(){
  if (Config.wimpMode) {
    if (this.getPressure() > 1.09F) {
      this.steam=(int)Math.floor((double)this.capacity * 1.09D);
    }
  }
 else {
    if (this.transporters != null && this.transporters.keySet() != null) {
      if (this.getPressure() > 1.2F) {
        for (        Coord4 coords : transporters.keySet()) {
          ISteamTransporter trans=transporters.get(coords);
          if ((trans == null || ((TileEntity)trans).isInvalid())) {
            System.out.println("String_Node_Str");
            transporters.remove(coords);
          }
 else           if (!trans.getWorld().isRemote && shouldExplode(oneInX(this.getPressure(),trans.getPressureResistance()))) {
            trans.explode();
          }
        }
      }
    }
 else {
      System.out.println("String_Node_Str" + this.name);
    }
  }
}
Program: 22466
Project: 22466
Buggy source:
public void refresh(){
  if (!worldObj.isRemote) {
  }
  if (this.network == null && !worldObj.isRemote) {
    if (SteamNetworkRegistry.getInstance().isInitialized(this.getDimension())) {
      if (this.networkName != null && SteamNetworkRegistry.getInstance().isInitialized(this.getDimension())) {
        this.network=SteamNetworkRegistry.getInstance().getNetwork(this.networkName,this);
        this.network.rejoin(this);
      }
 else {
        SteamNetwork.newOrJoin(this);
      }
      this.isInitialized=true;
      worldObj.markBlockForUpdate(xCoord,yCoord,zCoord);
    }
  }
}

Fixed version (ground truth):
public void refresh(){
  if (!worldObj.isRemote) {
  }
  if (this.network == null && !worldObj.isRemote) {
    if (SteamNetworkRegistry.getInstance().isInitialized(this.getDimension())) {
      if (this.networkName != null && SteamNetworkRegistry.getInstance().isInitialized(this.getDimension())) {
        System.out.println("String_Node_Str");
        this.network=SteamNetworkRegistry.getInstance().getNetwork(this.networkName,this);
        this.network.rejoin(this);
      }
 else {
        System.out.println("String_Node_Str");
        SteamNetwork.newOrJoin(this);
      }
      this.isInitialized=true;
      worldObj.markBlockForUpdate(xCoord,yCoord,zCoord);
    }
  }
}
Program: 22467
Project: 22467
Buggy source:
public void addTransporter(ISteamTransporter trans){
  if (!this.contains(trans)) {
    this.capacity+=trans.getCapacity();
    Coord4 transCoords=trans.getCoords();
    transporters.put(transCoords,trans);
    trans.setNetworkName(this.name);
    trans.setNetwork(this);
    SteamNetworkRegistry.markDirty(this);
  }
}

Fixed version (ground truth):
public void addTransporter(ISteamTransporter trans){
  if (trans != null && !this.contains(trans)) {
    this.capacity+=trans.getCapacity();
    Coord4 transCoords=trans.getCoords();
    transporters.put(transCoords,trans);
    trans.setNetworkName(this.name);
    trans.setNetwork(this);
    SteamNetworkRegistry.markDirty(this);
  }
}
Program: 22470
Project: 22470
Buggy source:
public boolean getBurning(){
  return this.burning;
}

Fixed version (ground truth):
public boolean getBurning(){
  int meta=getBlockMetadata();
  if (meta > 0) {
    if (meta == 1) {
      return this.burning;
    }
 else {
      if (this.hasMaster()) {
        return this.getMasterTileEntity().isBurning();
      }
    }
  }
  return false;
}
Program: 22471
Project: 22471
Buggy source:
@SubscribeEvent public void clickLeft(PlayerInteractEvent event){
  if (event.entityPlayer.worldObj.getTileEntity(event.x,event.y,event.z) != null && !event.entityPlayer.worldObj.isRemote) {
    if (event.entityPlayer.worldObj.getTileEntity(event.x,event.y,event.z) instanceof TileEntitySteamHeater) {
    }
  }
}

Fixed version (ground truth):
@SubscribeEvent public void clickLeft(PlayerInteractEvent event){
  if (event.entityPlayer.worldObj.getTileEntity(event.x,event.y,event.z) != null && !event.entityPlayer.worldObj.isRemote) {
    if (event.entityPlayer.worldObj.getTileEntity(event.x,event.y,event.z) instanceof TileEntitySteamHeater) {
    }
    if (event.entityPlayer.worldObj.getTileEntity(event.x,event.y,event.z) instanceof ISteamTransporter) {
      ISteamTransporter trans=(ISteamTransporter)event.entityPlayer.worldObj.getTileEntity(event.x,event.y,event.z);
      if (event.entityPlayer.worldObj.isRemote) {
        System.out.println("String_Node_Str");
      }
      System.out.println(trans.getSteam() + "String_Node_Str" + trans.getPressure()+ "String_Node_Str"+ trans.getNetworkName()+ "String_Node_Str"+ trans.getNetwork());
    }
  }
}
Program: 22472
Project: 22472
Buggy source:
@Override public boolean onWrench(ItemStack stack,EntityPlayer player,World world,int x,int y,int z,int side,float xO,float yO,float zO){
  MovingObjectPosition hit=RayTracer.retraceBlock(world,player,x,y,z);
  if (hit == null) {
    return false;
  }
  if ((hit.subHit >= 0) && (hit.subHit < 6) && world.getBlock(hit.blockX,hit.blockY,hit.blockZ) instanceof BlockPipe) {
    int sidesConnect=0;
    for (int i=0; i < 6; i++) {
      if (this.doesConnect(ForgeDirection.getOrientation(i))) {
        sidesConnect++;
      }
    }
    if (sidesConnect > 2 && this.doesConnect(ForgeDirection.getOrientation(hit.subHit))) {
      player.swingItem();
      this.blacklistedSides.add(hit.subHit);
      int steam=this.getSteam();
      this.getNetwork().split(this);
      SteamNetwork.newOrJoin(this);
      this.getNetwork().addSteam(steam);
      System.out.println(hit.subHit);
      this.worldObj.markBlockForUpdate(xCoord,yCoord,zCoord);
    }
 else     if (!this.doesConnect(ForgeDirection.getOrientation(hit.subHit))) {
      if (this.blacklistedSides.contains(hit.subHit)) {
        this.blacklistedSides.remove((Integer)hit.subHit);
        player.swingItem();
        int steam=this.getSteam();
        this.getNetwork().split(this);
        SteamNetwork.newOrJoin(this);
        this.getNetwork().addSteam(steam);
        this.worldObj.markBlockForUpdate(xCoord,yCoord,zCoord);
      }
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onWrench(ItemStack stack,EntityPlayer player,World world,int x,int y,int z,int side,float xO,float yO,float zO){
  MovingObjectPosition hit=RayTracer.retraceBlock(world,player,x,y,z);
  if (hit == null) {
    return false;
  }
  if ((hit.subHit >= 0) && (hit.subHit < 6) && world.getBlock(hit.blockX,hit.blockY,hit.blockZ) instanceof BlockPipe) {
    int sidesConnect=0;
    for (int i=0; i < 6; i++) {
      if (this.doesConnect(ForgeDirection.getOrientation(i))) {
        sidesConnect++;
      }
    }
    if (sidesConnect > 2 && this.doesConnect(ForgeDirection.getOrientation(hit.subHit))) {
      player.swingItem();
      this.blacklistedSides.add(hit.subHit);
      int steam=this.getSteam();
      this.getNetwork().split(this);
      SteamNetwork.newOrJoin(this);
      this.getNetwork().addSteam(steam);
      System.out.println(hit.subHit);
      System.out.println(this.getNetworkName());
      this.worldObj.markBlockForUpdate(xCoord,yCoord,zCoord);
    }
 else     if (!this.doesConnect(ForgeDirection.getOrientation(hit.subHit))) {
      if (this.blacklistedSides.contains(hit.subHit)) {
        this.blacklistedSides.remove((Integer)hit.subHit);
        player.swingItem();
        int steam=this.getSteam();
        this.getNetwork().split(this);
        SteamNetwork.newOrJoin(this);
        this.getNetwork().addSteam(steam);
        System.out.println(this.getNetworkName());
        this.worldObj.markBlockForUpdate(xCoord,yCoord,zCoord);
      }
    }
    return true;
  }
  return false;
}
Program: 22473
Project: 22473
Buggy source:
public ItemStack onItemRightClick(ItemStack stack,World par2World,EntityPlayer player){
  this.checkNBT(player);
  if (stack.getItemDamage() < stack.getMaxDamage() - 1) {
    MutablePair info=stuff.get(player.getEntityId());
    int ticks=(Integer)info.left;
    int speed=(Integer)info.right;
    if (speed <= 1000) {
      speed+=Math.min(90,1000 - speed);
      stack.damageItem(3,player);
    }
    stuff.put(player.getEntityId(),MutablePair.of(ticks,speed));
    System.out.println(speed);
  }
  return stack;
}

Fixed version (ground truth):
public ItemStack onItemRightClick(ItemStack stack,World par2World,EntityPlayer player){
  this.checkNBT(player);
  if (stack.getItemDamage() < stack.getMaxDamage() - 1) {
    MutablePair info=stuff.get(player.getEntityId());
    int ticks=(Integer)info.left;
    int speed=(Integer)info.right;
    if (speed <= 1000) {
      speed+=Math.min(90,1000 - speed);
      stack.damageItem(3,player);
    }
    stuff.put(player.getEntityId(),MutablePair.of(ticks,speed));
  }
  return stack;
}
Program: 22474
Project: 22474
Buggy source:
public ItemStack onItemRightClick(ItemStack stack,World par2World,EntityPlayer player){
  this.checkNBT(player);
  if (stack.getItemDamage() < stack.getMaxDamage() - 1) {
    MutablePair info=stuff.get(player.getEntityId());
    int ticks=(Integer)info.left;
    int speed=(Integer)info.right;
    if (speed <= 1000) {
      speed+=Math.min(90,1000 - speed);
      stack.damageItem(3,player);
    }
    stuff.put(player.getEntityId(),MutablePair.of(ticks,speed));
    System.out.println(speed);
  }
  return stack;
}

Fixed version (ground truth):
public ItemStack onItemRightClick(ItemStack stack,World par2World,EntityPlayer player){
  this.checkNBT(player);
  if (stack.getItemDamage() < stack.getMaxDamage() - 1) {
    MutablePair info=stuff.get(player.getEntityId());
    int ticks=(Integer)info.left;
    int speed=(Integer)info.right;
    if (speed <= 1000) {
      speed+=Math.min(90,1000 - speed);
      stack.damageItem(3,player);
    }
    stuff.put(player.getEntityId(),MutablePair.of(ticks,speed));
  }
  return stack;
}
Program: 22475
Project: 22475
Buggy source:
public ItemStack onItemRightClick(ItemStack stack,World par2World,EntityPlayer player){
  this.checkNBT(player);
  if (stack.getItemDamage() < stack.getMaxDamage() - 1) {
    MutablePair info=stuff.get(player.getEntityId());
    int ticks=(Integer)info.left;
    int speed=(Integer)info.right;
    if (speed <= 1000) {
      speed+=Math.min(90,1000 - speed);
      stack.damageItem(3,player);
    }
    stuff.put(player.getEntityId(),MutablePair.of(ticks,speed));
    System.out.println(speed);
  }
  return stack;
}

Fixed version (ground truth):
public ItemStack onItemRightClick(ItemStack stack,World par2World,EntityPlayer player){
  this.checkNBT(player);
  if (stack.getItemDamage() < stack.getMaxDamage() - 1) {
    MutablePair info=stuff.get(player.getEntityId());
    int ticks=(Integer)info.left;
    int speed=(Integer)info.right;
    if (speed <= 1000) {
      speed+=Math.min(90,1000 - speed);
      stack.damageItem(3,player);
    }
    stuff.put(player.getEntityId(),MutablePair.of(ticks,speed));
  }
  return stack;
}
Program: 22476
Project: 22476
Buggy source:
@Override public void readFromNBT(NBTTagCompound access){
  super.readFromNBT(access);
  this.extendedLength=access.getFloat("String_Node_Str");
  this.extendedTicks=access.getInteger("String_Node_Str");
  this.spinup=access.getInteger("String_Node_Str");
  this.smooshingBlock=Block.getBlockById(access.getInteger("String_Node_Str"));
  this.smooshingMeta=access.getInteger("String_Node_Str");
  worldObj.markBlockForUpdate(xCoord,yCoord,zCoord);
  this.steam=access.getInteger("String_Node_Str");
}

Fixed version (ground truth):
@Override public void readFromNBT(NBTTagCompound access){
  super.readFromNBT(access);
  this.extendedLength=access.getFloat("String_Node_Str");
  this.extendedTicks=access.getInteger("String_Node_Str");
  this.spinup=access.getInteger("String_Node_Str");
  this.smooshingBlock=Block.getBlockById(access.getInteger("String_Node_Str"));
  this.smooshingMeta=access.getInteger("String_Node_Str");
  NBTTagList nbttaglist=(NBTTagList)access.getTag("String_Node_Str");
  this.smooshedStack=new ArrayList<ItemStack>();
  for (int i=0; i < nbttaglist.tagCount(); ++i) {
    NBTTagCompound nbttagcompound1=(NBTTagCompound)nbttaglist.getCompoundTagAt(i);
    this.smooshedStack.add(ItemStack.loadItemStackFromNBT(nbttagcompound1));
  }
  worldObj.markBlockForUpdate(xCoord,yCoord,zCoord);
  this.steam=access.getInteger("String_Node_Str");
}
Program: 22477
Project: 22477
Buggy source:
private void spawnItems(int x,int y,int z){
  int id=OreDictionary.getOreID(this.smooshedStack);
  boolean isSmashableOre=false;
  try {
    isSmashableOre=ItemSmashedOre.oreTypesFromOre.containsKey(OreDictionary.getOreName(id));
  }
 catch (  Exception e) {
  }
  if (isSmashableOre) {
    boolean doubleItems=worldObj.rand.nextInt(Config.chance) == 0;
    ItemStack items=new ItemStack(SteamcraftItems.smashedOre,doubleItems ? 2 : 1,ItemSmashedOre.oreTypesFromOre.get(OreDictionary.getOreName(id)));
    EntityItem entityItem=new EntityItem(this.worldObj,x + 0.5F,y + 0.1F,z + 0.5F,items);
    this.worldObj.spawnEntityInWorld(entityItem);
    this.smooshedStack=null;
  }
 else {
    smooshingBlock.dropBlockAsItem(worldObj,x,y,z,this.smooshingMeta,0);
  }
}

Fixed version (ground truth):
private void spawnItems(int x,int y,int z){
  if (smooshedStack != null) {
    for (    ItemStack stack : smooshedStack) {
      int id=OreDictionary.getOreID(stack);
      boolean isSmashableOre=false;
      try {
        isSmashableOre=ItemSmashedOre.oreTypesFromOre.containsKey(OreDictionary.getOreName(id));
      }
 catch (      Exception e) {
      }
      if (isSmashableOre) {
        boolean doubleItems=worldObj.rand.nextInt(Config.chance) == 0;
        ItemStack items=new ItemStack(SteamcraftItems.smashedOre,doubleItems ? 2 : 1,ItemSmashedOre.oreTypesFromOre.get(OreDictionary.getOreName(id)));
        EntityItem entityItem=new EntityItem(this.worldObj,x + 0.5F,y + 0.1F,z + 0.5F,items);
        this.worldObj.spawnEntityInWorld(entityItem);
        this.smooshedStack=null;
      }
 else {
        EntityItem entityItem=new EntityItem(this.worldObj,x + 0.5F,y + 0.1F,z + 0.5F,stack);
        this.worldObj.spawnEntityInWorld(entityItem);
        this.smooshedStack=null;
      }
    }
  }
}
Program: 22479
Project: 22479
Buggy source:
@Override public void writeToNBT(NBTTagCompound access){
  super.writeToNBT(access);
  access.setInteger("String_Node_Str",spinup);
  access.setFloat("String_Node_Str",extendedLength);
  access.setInteger("String_Node_Str",extendedTicks);
  access.setInteger("String_Node_Str",Block.getIdFromBlock(smooshingBlock));
  access.setInteger("String_Node_Str",smooshingMeta);
  access.setInteger("String_Node_Str",steam);
}

Fixed version (ground truth):
@Override public void writeToNBT(NBTTagCompound access){
  super.writeToNBT(access);
  access.setInteger("String_Node_Str",spinup);
  access.setFloat("String_Node_Str",extendedLength);
  access.setInteger("String_Node_Str",extendedTicks);
  access.setInteger("String_Node_Str",Block.getIdFromBlock(smooshingBlock));
  access.setInteger("String_Node_Str",smooshingMeta);
  access.setInteger("String_Node_Str",steam);
  NBTTagList nbttaglist=new NBTTagList();
  if (this.smooshedStack != null) {
    for (int i=0; i < this.smooshedStack.size(); ++i) {
      NBTTagCompound nbttagcompound1=new NBTTagCompound();
      this.smooshedStack.get(i).writeToNBT(nbttagcompound1);
      nbttaglist.appendTag(nbttagcompound1);
    }
  }
  access.setTag("String_Node_Str",nbttaglist);
}
Program: 22481
Project: 22481
Buggy source:
@SideOnly(Side.CLIENT) public AxisAlignedBB getRenderBoundingBox(){
  return AxisAlignedBB.getAABBPool().getAABB(this.xCoord,this.yCoord,this.zCoord,this.xCoord + 1,this.yCoord + 5,this.zCoord + 1);
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) public AxisAlignedBB getRenderBoundingBox(){
  return AxisAlignedBB.getBoundingBox(this.xCoord,this.yCoord,this.zCoord,this.xCoord + 1,this.yCoord + 5,this.zCoord + 1);
}
Program: 22482
Project: 22482
Buggy source:
private void spawnItems(int x,int y,int z){
  int id=OreDictionary.getOreID(new ItemStack(smooshingBlock.getItem(worldObj,x,y,z),1,smooshingMeta));
  if (ItemSmashedOre.oreTypesFromOre.containsKey(OreDictionary.getOreName(id))) {
    boolean doubleItems=worldObj.rand.nextInt(5) == 0;
    ItemStack items=new ItemStack(SteamcraftItems.smashedOre,doubleItems ? 2 : 1,ItemSmashedOre.oreTypesFromOre.get(OreDictionary.getOreName(id)));
    EntityItem entityItem=new EntityItem(this.worldObj,x + 0.5F,y + 0.5F,z + 0.5F,items);
    this.worldObj.spawnEntityInWorld(entityItem);
  }
 else {
    smooshingBlock.dropBlockAsItem(worldObj,x,y,z,this.smooshingMeta,0);
  }
}

Fixed version (ground truth):
private void spawnItems(int x,int y,int z){
  int id[]=OreDictionary.getOreIDs(this.smooshedStack);
  if (id.length > 0 && ItemSmashedOre.oreTypesFromOre.containsKey(OreDictionary.getOreName(id[0]))) {
    boolean doubleItems=worldObj.rand.nextInt(3) == 0;
    ItemStack items=new ItemStack(SteamcraftItems.smashedOre,doubleItems ? 2 : 1,ItemSmashedOre.oreTypesFromOre.get(OreDictionary.getOreName(id[0])));
    EntityItem entityItem=new EntityItem(this.worldObj,x + 0.5F,y + 0.5F,z + 0.5F,items);
    this.worldObj.spawnEntityInWorld(entityItem);
    this.smooshedStack=null;
  }
 else {
    smooshingBlock.dropBlockAsItem(worldObj,x,y,z,this.smooshingMeta,0);
  }
}