nus-yam/ex-repair huggingface dataset:
Program: 22338
Project: 22338
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){
  int meta=world.getBlockMetadata(x,y,z);
  if (player.isSneaking()) {
    return true;
  }
 else   if (side != 0 && side != 1) {
    world.setBlockMetadataWithNotify(x,y,z,side == meta ? ForgeDirection.getOrientation(side).getOpposite().ordinal() : side,2);
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onWrench(ItemStack stack,EntityPlayer player,World world,BlockPos pos,EnumHand hand,EnumFacing facing,IBlockState state,float hitX,float hitY,float hitZ){
  if (player.isSneaking()) {
    return true;
  }
 else   if (facing != EnumFacing.DOWN && facing != EnumFacing.UP && facing != state.getValue(FACING)) {
    world.setBlockState(pos,state.withProperty(FACING,facing.getOpposite()),2);
  }
  return false;
}
Program: 22339
Project: 22339
Buggy source:
@Override public void onBlockPlacedBy(World world,int x,int y,int z,EntityLivingBase elb,ItemStack stack){
  int l=MathHelper.floor_double((double)(elb.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
  if (l == 0) {
    world.setBlockMetadataWithNotify(x,y,z,2,2);
  }
  if (l == 1) {
    world.setBlockMetadataWithNotify(x,y,z,5,2);
  }
  if (l == 2) {
    world.setBlockMetadataWithNotify(x,y,z,3,2);
  }
  if (l == 3) {
    world.setBlockMetadataWithNotify(x,y,z,4,2);
  }
  if (stack.hasDisplayName()) {
  }
}

Fixed version (ground truth):
@Override public void onBlockPlacedBy(World world,BlockPos pos,IBlockState state,EntityLivingBase elb,ItemStack stack){
  world.setBlockState(pos,state.withProperty(FACING,elb.getHorizontalFacing().getOpposite()));
}
Program: 22340
Project: 22340
Buggy source:
@Override public void breakBlock(World world,int x,int y,int z,Block block,int meta){
  if (!field_149934_M) {
    TileEntityBoiler tileentityboiler=(TileEntityBoiler)world.getTileEntity(x,y,z);
    if (tileentityboiler != null) {
      for (int i1=0; i1 < tileentityboiler.getSizeInventory(); ++i1) {
        ItemStack itemstack=tileentityboiler.getStackInSlot(i1);
        if (itemstack != null) {
          float f=this.rand.nextFloat() * 0.8F + 0.1F;
          float f1=this.rand.nextFloat() * 0.8F + 0.1F;
          float f2=this.rand.nextFloat() * 0.8F + 0.1F;
          while (itemstack.stackSize > 0) {
            int j1=this.rand.nextInt(21) + 10;
            if (j1 > itemstack.stackSize) {
              j1=itemstack.stackSize;
            }
            itemstack.stackSize-=j1;
            EntityItem entityitem=new EntityItem(world,(double)((float)x + f),(double)((float)y + f1),(double)((float)z + f2),new ItemStack(itemstack.getItem(),j1,itemstack.getItemDamage()));
            if (itemstack.hasTagCompound()) {
              entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
            }
            float f3=0.05F;
            entityitem.motionX=(double)((float)this.rand.nextGaussian() * f3);
            entityitem.motionY=(double)((float)this.rand.nextGaussian() * f3 + 0.2F);
            entityitem.motionZ=(double)((float)this.rand.nextGaussian() * f3);
            world.spawnEntityInWorld(entityitem);
          }
        }
      }
      world.func_147453_f(x,y,z,block);
    }
  }
  super.breakBlock(world,x,y,z,block,meta);
}

Fixed version (ground truth):
@Override public void breakBlock(World world,BlockPos pos,IBlockState state){
  TileEntity tileentity=world.getTileEntity(pos);
  if (tileentity != null && tileentity instanceof TileEntityBoiler) {
    InventoryHelper.dropInventoryItems(world,pos,(TileEntityBoiler)tileentity);
    world.updateComparatorOutputLevel(pos,state.getBlock());
  }
  super.breakBlock(world,pos,state);
}
Program: 22341
Project: 22341
Buggy source:
@Override public ItemStack getPickBlock(MovingObjectPosition target,World world,int x,int y,int z,EntityPlayer player){
  return new ItemStack(SteamcraftBlocks.boiler);
}

Fixed version (ground truth):
@Override public ItemStack getPickBlock(IBlockState state,RayTraceResult target,World world,BlockPos pos,EntityPlayer player){
  return new ItemStack(SteamNetworkBlocks.Blocks.BOILER.getBlock());
}
Program: 22342
Project: 22342
Buggy source:
@Override public ItemStack onItemRightClick(ItemStack itemStack,World world,EntityPlayer player){
  player.openGui(Steamcraft.instance,1,world,0,0,0);
  return itemStack;
}

Fixed version (ground truth):
@Override public ActionResult<ItemStack> onItemRightClick(ItemStack itemStack,World world,EntityPlayer player,EnumHand hand){
  player.openGui(Steamcraft.instance,1,world,0,0,0);
  return new ActionResult<>(EnumActionResult.SUCCESS,itemStack);
}
Program: 22343
Project: 22343
Buggy source:
@Override public boolean onItemUse(ItemStack itemStack,EntityPlayer player,World world,int x,int y,int z,int side,float fx,float fy,float fz){
  if (player.isSneaking() && world.isRemote) {
    Block block=world.getBlock(x,y,z);
    ItemStack stack=block.getPickBlock(new MovingObjectPosition(x,y,z,side,Vec3.createVectorHelper(fx,fy,fz)),world,x,y,z,player);
    if (stack != null) {
      for (      ItemStack stack2 : SteamcraftRegistry.bookRecipes.keySet()) {
        if (stack2.getItem() == stack.getItem() && stack2.getItemDamage() == stack.getItemDamage()) {
          GuiSteamcraftBook.openRecipeFor(stack2,player);
          return true;
        }
      }
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public EnumActionResult onItemUse(ItemStack itemStack,EntityPlayer player,World world,BlockPos pos,EnumHand hand,EnumFacing side,float hitX,float hitY,float hitZ){
  if (player.isSneaking() && world.isRemote) {
    IBlockState state=world.getBlockState(pos);
    RayTraceResult rtr=new RayTraceResult(new Vec3d(hitX,hitY,hitZ),side,pos);
    ItemStack stack=state.getBlock().getPickBlock(state,rtr,world,pos,player);
    if (stack != null) {
      for (      ItemStack stack2 : SteamcraftRegistry.bookRecipes.keySet()) {
        if (stack2.getItem() == stack.getItem() && stack2.getItemDamage() == stack.getItemDamage()) {
          GuiSteamcraftBook.openRecipeFor(stack2,player);
          return EnumActionResult.SUCCESS;
        }
      }
    }
  }
  return EnumActionResult.FAIL;
}
Program: 22344
Project: 22344
Buggy source:
@Override public ItemStack onItemRightClick(ItemStack par1ItemStack,World par2World,EntityPlayer par3EntityPlayer){
  par3EntityPlayer.setItemInUse(par1ItemStack,this.getMaxItemUseDuration(par1ItemStack));
  return par1ItemStack;
}

Fixed version (ground truth):
@Override public ActionResult<ItemStack> onItemRightClick(ItemStack stack,World world,EntityPlayer player,EnumHand hand){
  player.setActiveHand(hand);
  return new ActionResult<>(EnumActionResult.SUCCESS,stack);
}
Program: 22345
Project: 22345
Buggy source:
@Override public boolean canApplyTo(ItemStack stack){
  return stack.getItem() == SteamcraftItems.musket;
}

Fixed version (ground truth):
@Override public boolean canApplyTo(ItemStack stack){
  return stack.getItem() == FirearmItems.Items.MUSKET.getItem();
}
Program: 22346
Project: 22346
Buggy source:
@Override public EnumRarity getRarity(ItemStack me){
  if (me.hasTagCompound() && me.stackTagCompound.hasKey("String_Node_Str")) {
    return EnumRarity.epic;
  }
  return super.getRarity(me);
}

Fixed version (ground truth):
@Override public EnumRarity getRarity(ItemStack me){
  if (me.hasTagCompound() && me.getTagCompound().hasKey("String_Node_Str")) {
    return EnumRarity.EPIC;
  }
  return super.getRarity(me);
}
Program: 22347
Project: 22347
Buggy source:
@Override public String getUnlocalizedName(ItemStack me){
  if (me.hasTagCompound() && me.stackTagCompound.hasKey("String_Node_Str")) {
    return "String_Node_Str";
  }
  return super.getUnlocalizedName(me);
}

Fixed version (ground truth):
@Override public String getUnlocalizedName(ItemStack me){
  if (me.hasTagCompound() && me.getTagCompound().hasKey("String_Node_Str")) {
    return "String_Node_Str";
  }
  return super.getUnlocalizedName(me);
}
Program: 22348
Project: 22348
Buggy source:
@Override public boolean getIsRepairable(ItemStack par1ItemStack,ItemStack par2ItemStack){
  return par2ItemStack.isItemEqual(new ItemStack(Items.leather)) ? true : super.getIsRepairable(par1ItemStack,par2ItemStack);
}

Fixed version (ground truth):
@Override public boolean getIsRepairable(ItemStack par1ItemStack,ItemStack par2ItemStack){
  return par2ItemStack.isItemEqual(new ItemStack(Items.LEATHER)) || super.getIsRepairable(par1ItemStack,par2ItemStack);
}
Program: 22349
Project: 22349
Buggy source:
@Override public void addInformation(ItemStack me,EntityPlayer player,List list,boolean par4){
  super.addInformation(me,player,list,par4);
  if (me.hasTagCompound()) {
    if (me.stackTagCompound.hasKey("String_Node_Str")) {
      int level=me.stackTagCompound.getInteger("String_Node_Str");
      list.add(EnumChatFormatting.GREEN + StatCollector.translateToLocal("String_Node_Str") + "String_Node_Str"+ level);
    }
  }
}

Fixed version (ground truth):
@Override public void addInformation(ItemStack me,EntityPlayer player,List<String> list,boolean par4){
  super.addInformation(me,player,list,par4);
  if (me.hasTagCompound()) {
    if (me.getTagCompound().hasKey("String_Node_Str")) {
      int level=me.getTagCompound().getInteger("String_Node_Str");
      list.add(TextFormatting.GREEN + I18n.format("String_Node_Str") + "String_Node_Str"+ level);
    }
  }
}
Program: 22350
Project: 22350
Buggy source:
@Override @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase entityLiving,ItemStack itemStack,int armorSlot){
  if (modelTophat == null)   modelTophat=new ModelTophat();
  if (itemStack.hasTagCompound() && itemStack.stackTagCompound.hasKey("String_Node_Str")) {
    modelTophat.level=itemStack.stackTagCompound.getInteger("String_Node_Str");
  }
  return modelTophat;
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase entityLiving,ItemStack itemStack,int armorSlot){
  if (modelTophat == null)   modelTophat=new ModelTophat();
  if (itemStack.hasTagCompound() && itemStack.getTagCompound().hasKey("String_Node_Str")) {
    modelTophat.level=itemStack.getTagCompound().getInteger("String_Node_Str");
  }
  return modelTophat;
}
Program: 22351
Project: 22351
Buggy source:
public void onCreated(ItemStack me,World p_77622_2_,EntityPlayer player){
  if (player.getDisplayName() == "String_Node_Str" || player.getDisplayName() == "String_Node_Str") {
    me.setTagCompound(new NBTTagCompound());
    me.stackTagCompound.setBoolean("String_Node_Str",true);
  }
}

Fixed version (ground truth):
public void onCreated(ItemStack me,World world,EntityPlayer player){
  String name=player.getDisplayName().getFormattedText();
  if ("String_Node_Str".equals(name) || "String_Node_Str".equals(name)) {
    me.setTagCompound(new NBTTagCompound());
    me.getTagCompound().setBoolean("String_Node_Str",true);
  }
}
Program: 22352
Project: 22352
Buggy source:
@Override public String getInformation(ItemStack self,ItemStack tool){
  DrillHeadMaterial mat=DrillHeadMaterial.materials.get(getMyMaterial(self));
  String name=mat.locName;
  return StatCollector.canTranslate(name) ? StatCollector.translateToLocal(name) : mat.materialName;
}

Fixed version (ground truth):
@Override public String getInformation(ItemStack self,ItemStack tool){
  DrillHeadMaterial mat=DrillHeadMaterial.materials.get(getMyMaterial(self));
  String name=mat.locName;
  return I18n.hasKey(name) ? I18n.format(name) : mat.materialName;
}
Program: 22353
Project: 22353
Buggy source:
/** 
 * The same as getInformation(ArrayList, SteamToolSlot), but relies on itemstacks instead of ISteamToolUpgrades
 * @param upgrades The ItemStacks that are being tested against; see #getUpgradeStacks
 * @param redSlot The slot that should be red. See getInformation.
 * @return The strings, or null if the upgrades were null.
 */
public static ArrayList<String> getInformationFromStacks(ArrayList<ItemStack> upgrades,SteamToolSlot redSlot,ItemStack tool){
  if (upgrades == null) {
    return null;
  }
  ArrayList<String> strings=new ArrayList<>();
  for (  ItemStack stack : upgrades) {
    ISteamToolUpgrade upgrade=(ISteamToolUpgrade)stack.getItem();
    EnumChatFormatting format=upgrade.getToolSlot() == redSlot ? EnumChatFormatting.RED : EnumChatFormatting.DARK_GREEN;
    String info=upgrade.getInformation(stack,tool);
    String toAdd=info == null ? stack.getItem().getUnlocalizedName() + "String_Node_Str" : info;
    strings.add(format + "String_Node_Str" + StatCollector.translateToLocal(toAdd));
  }
  if (strings.isEmpty()) {
    return null;
  }
  return strings;
}

Fixed version (ground truth):
/** 
 * The same as getInformation(ArrayList, SteamToolSlot), but relies on itemstacks instead of ISteamToolUpgrades
 * @param upgrades The ItemStacks that are being tested against; see #getUpgradeStacks
 * @param redSlot The slot that should be red. See getInformation.
 * @return The strings. Will return an empty array if there are no upgrades or strings.
 */
public static ArrayList<String> getInformationFromStacks(ArrayList<ItemStack> upgrades,SteamToolSlot redSlot,ItemStack tool){
  if (upgrades == null) {
    return new ArrayList<>();
  }
  ArrayList<String> strings=new ArrayList<>();
  for (  ItemStack stack : upgrades) {
    ISteamToolUpgrade upgrade=(ISteamToolUpgrade)stack.getItem();
    TextFormatting format=upgrade.getToolSlot() == redSlot ? TextFormatting.RED : TextFormatting.DARK_GREEN;
    String info=upgrade.getInformation(stack,tool);
    String toAdd=info == null ? stack.getItem().getUnlocalizedName() + "String_Node_Str" : info;
    strings.add(format + "String_Node_Str" + I18n.format(toAdd));
  }
  return strings;
}
Program: 22354
Project: 22354
Buggy source:
/** 
 * Essentially setInventorySlotContents
 * @param me The ItemStack being edited.
 * @param slot ???
 * @param stack ???Note: The original method was not documented, so I don't know what these params actually are.
 */
public static void setNBTInventory(ItemStack me,int slot,ItemStack stack){
  if (!me.hasTagCompound()) {
    me.setTagCompound(new NBTTagCompound());
  }
  if (!me.stackTagCompound.hasKey("String_Node_Str")) {
    me.stackTagCompound.setTag("String_Node_Str",new NBTTagCompound());
  }
  if (me.stackTagCompound.getCompoundTag("String_Node_Str").hasKey(Integer.toString(slot))) {
    me.stackTagCompound.getCompoundTag("String_Node_Str").removeTag(Integer.toString(slot));
  }
  NBTTagCompound stc=new NBTTagCompound();
  if (stack != null) {
    stack.writeToNBT(stc);
    me.stackTagCompound.getCompoundTag("String_Node_Str").setTag(Integer.toString(slot),stc);
  }
}

Fixed version (ground truth):
/** 
 * Essentially setInventorySlotContents
 * @param me The ItemStack being edited.
 * @param slot ???
 * @param stack ???Note: The original method was not documented, so I don't know what these params actually are.
 */
public static void setNBTInventory(ItemStack me,int slot,ItemStack stack){
  if (!me.hasTagCompound()) {
    me.setTagCompound(new NBTTagCompound());
  }
  if (!me.getTagCompound().hasKey("String_Node_Str")) {
    me.getTagCompound().setTag("String_Node_Str",new NBTTagCompound());
  }
  if (me.getTagCompound().getCompoundTag("String_Node_Str").hasKey(Integer.toString(slot))) {
    me.getTagCompound().getCompoundTag("String_Node_Str").removeTag(Integer.toString(slot));
  }
  NBTTagCompound stc=new NBTTagCompound();
  if (stack != null) {
    stack.writeToNBT(stc);
    me.getTagCompound().getCompoundTag("String_Node_Str").setTag(Integer.toString(slot),stc);
  }
}
Program: 22355
Project: 22355
Buggy source:
@Override public Explosion newExplosion(World world,Entity entity,double x,double y,double z,float explosionSize,boolean doFire,boolean doSmokeAndGrief){
  ExplosionRocket explosion=new ExplosionRocket(world,entity,x,y,z,explosionSize,false);
  explosion.isFlaming=doFire;
  explosion.isSmoking=doSmokeAndGrief;
  explosion.doExplosionA();
  explosion.doExplosionB(true);
  for (  EntityPlayer entityplayer : world.playerEntities) {
    if (entityplayer.getDistanceSq(x,y,z) < 4096.0D) {
      SPacketExplosion packet=new SPacketExplosion(x,y,z,explosionSize,explosion.affectedBlockPositions,(Vec3d)explosion.func_77277_b().get(entityplayer));
      ((EntityPlayerMP)entityplayer).playerNetServerHandler.sendPacket(packet);
    }
  }
  return explosion;
}

Fixed version (ground truth):
@Override public Explosion newExplosion(World world,Entity entity,double x,double y,double z,float explosionSize,boolean doFire,boolean doSmokeAndGrief){
  ExplosionRocket explosion=new ExplosionRocket(world,entity,x,y,z,explosionSize,false,doFire);
  explosion.isFlaming=doFire;
  explosion.isSmoking=doSmokeAndGrief;
  explosion.doExplosionA();
  explosion.doExplosionB(true);
  for (  EntityPlayer entityplayer : world.playerEntities) {
    if (entityplayer.getDistanceSq(x,y,z) < 4096.0D) {
      SPacketExplosion packet=new SPacketExplosion(x,y,z,explosionSize,explosion.affectedBlockPositions,explosion.getPlayerKnockbackMap().get(entityplayer));
      ((EntityPlayerMP)entityplayer).connection.sendPacket(packet);
    }
  }
  return explosion;
}
Program: 22356
Project: 22356
Buggy source:
@Override public Explosion newExplosion(World world,Entity entity,double x,double y,double z,float explosionSize,boolean doFire,boolean doSmokeAndGrief){
  ExplosionRocket explosion=new ExplosionRocket(world,entity,x,y,z,explosionSize,doSmokeAndGrief,true);
  explosion.isFlaming=doFire;
  explosion.isSmoking=doSmokeAndGrief;
  explosion.doExplosionA();
  explosion.doExplosionB(true);
  for (  EntityPlayer entityplayer : world.playerEntities) {
    if (entityplayer.getDistanceSq(x,y,z) < 4096.0D) {
      SPacketExplosion packet=new SPacketExplosion(x,y,z,explosionSize,explosion.affectedBlockPositions,(Vec3d)explosion.func_77277_b().get(entityplayer));
      ((EntityPlayerMP)entityplayer).playerNetServerHandler.sendPacket(packet);
    }
  }
  return explosion;
}

Fixed version (ground truth):
@Override public Explosion newExplosion(World world,Entity entity,double x,double y,double z,float explosionSize,boolean doFire,boolean doSmokeAndGrief){
  ExplosionRocket explosion=new ExplosionRocket(world,entity,x,y,z,explosionSize,doSmokeAndGrief,true);
  explosion.isFlaming=doFire;
  explosion.isSmoking=doSmokeAndGrief;
  explosion.doExplosionA();
  explosion.doExplosionB(true);
  for (  EntityPlayer entityplayer : world.playerEntities) {
    if (entityplayer.getDistanceSq(x,y,z) < 4096.0D) {
      SPacketExplosion packet=new SPacketExplosion(x,y,z,explosionSize,explosion.affectedBlockPositions,explosion.getPlayerKnockbackMap().get(entityplayer));
      ((EntityPlayerMP)entityplayer).connection.sendPacket(packet);
    }
  }
  return explosion;
}
Program: 22357
Project: 22357
Buggy source:
@Override public boolean attackEntityFrom(DamageSource source,float amount){
  if (isEntityInvulnerable(source)) {
    return false;
  }
 else {
    setBeenAttacked();
    if (source.getEntity() != null) {
      Vec3d vec3=source.getEntity().getLookVec();
      if (vec3 != null) {
        motionX=vec3.xCoord;
        motionY=vec3.yCoord;
        motionZ=vec3.zCoord;
      }
      if (source.getEntity() instanceof EntityLivingBase) {
        shootingEntity=(EntityLivingBase)source.getEntity();
      }
      return true;
    }
 else {
      return false;
    }
  }
}

Fixed version (ground truth):
@Override public boolean attackEntityFrom(DamageSource source,float amount){
  if (isEntityInvulnerable(source)) {
    return false;
  }
 else {
    setBeenAttacked();
    Entity entity=source.getEntity();
    if (entity != null) {
      Vec3d vec3=entity.getLookVec();
      motionX=vec3.xCoord;
      motionY=vec3.yCoord;
      motionZ=vec3.zCoord;
      if (entity instanceof EntityLivingBase) {
        shootingEntity=(EntityLivingBase)entity;
      }
      return true;
    }
 else {
      return false;
    }
  }
}
Program: 22358
Project: 22358
Buggy source:
public Explosion newExplosion(World world,Entity entity,double x,double y,double z,float explosionSize,boolean doFire,boolean doSmokeAndGrief){
  ExplosionRocket explosion=new ExplosionRocket(world,entity,x,y,z,explosionSize,doSmokeAndGrief);
  explosion.isFlaming=doFire;
  explosion.isSmoking=doSmokeAndGrief;
  explosion.doExplosionA();
  explosion.doExplosionB(true);
  for (  EntityPlayer entityplayer : world.playerEntities) {
    if (entityplayer.getDistanceSq(x,y,z) < 4096.0D) {
      SPacketExplosion packet=new SPacketExplosion(x,y,z,explosionSize,explosion.affectedBlockPositions,(Vec3d)explosion.func_77277_b().get(entityplayer));
      ((EntityPlayerMP)entityplayer).playerNetServerHandler.sendPacket(packet);
    }
  }
  return explosion;
}

Fixed version (ground truth):
public Explosion newExplosion(World world,Entity entity,double x,double y,double z,float explosionSize,boolean doFire,boolean doSmokeAndGrief){
  ExplosionRocket explosion=new ExplosionRocket(world,entity,x,y,z,explosionSize,doFire,doSmokeAndGrief);
  explosion.isFlaming=doFire;
  explosion.isSmoking=doSmokeAndGrief;
  explosion.doExplosionA();
  explosion.doExplosionB(true);
  for (  EntityPlayer entityplayer : world.playerEntities) {
    if (entityplayer.getDistanceSq(x,y,z) < 4096.0D) {
      SPacketExplosion packet=new SPacketExplosion(x,y,z,explosionSize,explosion.affectedBlockPositions,explosion.getPlayerKnockbackMap().get(entityplayer));
      ((EntityPlayerMP)entityplayer).connection.sendPacket(packet);
    }
  }
  return explosion;
}
Program: 22361
Project: 22361
Buggy source:
@Override public boolean onBlockDestroyed(ItemStack p_150894_1_,World p_150894_2_,Block p_150894_3_,int p_150894_4_,int p_150894_5_,int p_150894_6_,EntityLivingBase p_150894_7_){
  hasBrokenBlock=true;
  return true;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public boolean onBlockDestroyed(ItemStack stack,World p_150894_2_,Block p_150894_3_,int p_150894_4_,int p_150894_5_,int p_150894_6_,EntityLivingBase p_150894_7_){
  NBTTagCompound nbt=SteamToolHelper.checkNBT(stack);
  MutablePair<Integer,Integer> pair=ticksSpeed.get(stack);
  nbt.setInteger("String_Node_Str",pair.getLeft());
  nbt.setInteger("String_Node_Str",pair.getRight());
  hasBrokenBlock=true;
  ticksSpeed.remove(stack);
  return true;
}
Program: 22362
Project: 22362
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void onUpdate(ItemStack stack,World world,Entity player,int par4,boolean par5){
  if (player instanceof EntityPlayer) {
    NBTTagCompound nbt=SteamToolHelper.checkNBT(stack);
    int ticks=nbt.getInteger("String_Node_Str");
    int speed=nbt.getInteger("String_Node_Str");
    if (hasBrokenBlock) {
      speed-=10;
      hasBrokenBlock=false;
    }
    int addedTicks=Math.min(((Double)Math.floor((double)speed / 1000D * 25D)).intValue(),50);
    ticks+=addedTicks;
    if (speed > 0) {
      speed--;
    }
 else     if (ticks <= 0) {
      ticks=0;
    }
 else {
      ticks--;
    }
    if (ticks <= 50 && speed > 0) {
      world.playSoundAtEntity(player,"String_Node_Str",1.0F,1.0F);
    }
    ticks=ticks % 100;
    nbt.setInteger("String_Node_Str",ticks);
    nbt.setInteger("String_Node_Str",speed);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void onUpdate(ItemStack stack,World world,Entity player,int par4,boolean par5){
  if (player instanceof EntityPlayer) {
    NBTTagCompound nbt=SteamToolHelper.checkNBT(stack);
    int ticks=nbt.getInteger("String_Node_Str");
    int speed=nbt.getInteger("String_Node_Str");
    if (hasBrokenBlock) {
      speed-=10;
      hasBrokenBlock=false;
    }
    int addedTicks=Math.min(((Double)Math.floor((double)speed / 1000D * 25D)).intValue(),50);
    ticks+=addedTicks;
    if (speed > 0) {
      speed--;
    }
 else     if (ticks <= 0) {
      ticks=0;
    }
 else {
      ticks--;
    }
    ticks=ticks % 100;
    if (((EntityLivingBase)player).isSwingInProgress) {
      if (ticksSpeed.containsKey(stack)) {
        ticksSpeed.get(stack).setLeft(ticks);
        ticksSpeed.get(stack).setRight(speed);
      }
 else {
        ticksSpeed.put(stack,MutablePair.of(ticks,speed));
      }
    }
 else {
      nbt.setInteger("String_Node_Str",ticks);
      nbt.setInteger("String_Node_Str",speed);
    }
  }
}
Program: 22363
Project: 22363
Buggy source:
@Override public boolean onBlockDestroyed(ItemStack stack,World world,Block block,int x,int y,int z,EntityLivingBase entity){
  hasBrokenBlock=true;
  return true;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public boolean onBlockDestroyed(ItemStack stack,World world,Block block,int x,int y,int z,EntityLivingBase entity){
  NBTTagCompound nbt=SteamToolHelper.checkNBT(stack);
  MutablePair<Integer,Integer> pair=ticksSpeed.get(stack);
  nbt.setInteger("String_Node_Str",pair.getLeft());
  nbt.setInteger("String_Node_Str",pair.getRight());
  hasBrokenBlock=true;
  ticksSpeed.remove(stack);
  return true;
}
Program: 22364
Project: 22364
Buggy source:
@Override public void onUpdate(ItemStack stack,World world,Entity player,int par4,boolean par5){
  if (player instanceof EntityPlayer) {
    NBTTagCompound nbt=SteamToolHelper.checkNBT(stack);
    int ticks=nbt.getInteger("String_Node_Str");
    int speed=nbt.getInteger("String_Node_Str");
    if (hasBrokenBlock) {
      speed-=10;
      hasBrokenBlock=false;
    }
    int addedTicks=Math.min(((Double)Math.floor((double)speed / 1000D * 25D)).intValue(),50);
    ticks+=addedTicks;
    if (isWound(stack)) {
      speed--;
    }
 else     if (ticks <= 0) {
      ticks=0;
    }
 else {
      ticks--;
    }
    ticks=ticks % 100;
    nbt.setInteger("String_Node_Str",ticks);
    nbt.setInteger("String_Node_Str",speed);
  }
}

Fixed version (ground truth):
@Override public void onUpdate(ItemStack stack,World world,Entity player,int par4,boolean par5){
  if (player instanceof EntityPlayer) {
    NBTTagCompound nbt=SteamToolHelper.checkNBT(stack);
    int ticks=nbt.getInteger("String_Node_Str");
    int speed=nbt.getInteger("String_Node_Str");
    if (hasBrokenBlock) {
      speed-=10;
      hasBrokenBlock=false;
    }
    int addedTicks=Math.min(((Double)Math.floor((double)speed / 1000D * 25D)).intValue(),50);
    ticks+=addedTicks;
    if (isWound(stack)) {
      speed--;
    }
 else     if (ticks <= 0) {
      ticks=0;
    }
 else {
      ticks--;
    }
    ticks=ticks % 100;
    if (((EntityLivingBase)player).isSwingInProgress) {
      if (ticksSpeed.containsKey(stack)) {
        ticksSpeed.get(stack).setLeft(ticks);
        ticksSpeed.get(stack).setRight(speed);
      }
 else {
        ticksSpeed.put(stack,MutablePair.of(ticks,speed));
      }
    }
 else {
      nbt.setInteger("String_Node_Str",ticks);
      nbt.setInteger("String_Node_Str",speed);
    }
  }
}
Program: 22365
Project: 22365
Buggy source:
@Override public boolean onBlockDestroyed(ItemStack p_150894_1_,World p_150894_2_,Block p_150894_3_,int p_150894_4_,int p_150894_5_,int p_150894_6_,EntityLivingBase p_150894_7_){
  hasBrokenBlock=true;
  return true;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public boolean onBlockDestroyed(ItemStack stack,World p_150894_2_,Block p_150894_3_,int p_150894_4_,int p_150894_5_,int p_150894_6_,EntityLivingBase p_150894_7_){
  NBTTagCompound nbt=SteamToolHelper.checkNBT(stack);
  MutablePair<Integer,Integer> pair=ticksSpeed.get(stack);
  nbt.setInteger("String_Node_Str",pair.getLeft());
  nbt.setInteger("String_Node_Str",pair.getRight());
  hasBrokenBlock=true;
  ticksSpeed.remove(stack);
  return true;
}
Program: 22366
Project: 22366
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void onUpdate(ItemStack stack,World world,Entity player,int par4,boolean par5){
  if (player instanceof EntityPlayer) {
    NBTTagCompound nbt=SteamToolHelper.checkNBT(stack);
    int ticks=nbt.getInteger("String_Node_Str");
    int speed=nbt.getInteger("String_Node_Str");
    if (hasBrokenBlock) {
      speed-=10;
      hasBrokenBlock=false;
    }
    int addedTicks=Math.min(((Double)Math.floor((double)speed / 1000D * 25D)).intValue(),50);
    ticks+=addedTicks;
    if (speed > 0) {
      speed--;
    }
 else     if (ticks <= 0) {
      ticks=0;
    }
 else {
      ticks--;
    }
    if (ticks <= 50 && speed > 0) {
      world.playSoundAtEntity(player,"String_Node_Str",1.0F,1.0F);
    }
    ticks=ticks % 100;
    nbt.setInteger("String_Node_Str",ticks);
    nbt.setInteger("String_Node_Str",speed);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void onUpdate(ItemStack stack,World world,Entity player,int par4,boolean par5){
  if (player instanceof EntityPlayer) {
    NBTTagCompound nbt=SteamToolHelper.checkNBT(stack);
    int ticks=nbt.getInteger("String_Node_Str");
    int speed=nbt.getInteger("String_Node_Str");
    if (hasBrokenBlock) {
      speed-=10;
      hasBrokenBlock=false;
    }
    int addedTicks=Math.min(((Double)Math.floor((double)speed / 1000D * 25D)).intValue(),50);
    ticks+=addedTicks;
    if (speed > 0) {
      speed--;
    }
 else     if (ticks <= 0) {
      ticks=0;
    }
 else {
      ticks--;
    }
    ticks=ticks % 100;
    if (((EntityLivingBase)player).isSwingInProgress) {
      if (ticksSpeed.containsKey(stack)) {
        ticksSpeed.get(stack).setLeft(ticks);
        ticksSpeed.get(stack).setRight(speed);
      }
 else {
        ticksSpeed.put(stack,MutablePair.of(ticks,speed));
      }
    }
 else {
      nbt.setInteger("String_Node_Str",ticks);
      nbt.setInteger("String_Node_Str",speed);
    }
  }
}
Program: 22367
Project: 22367
Buggy source:
@Override public boolean onBlockActivated(World world,int x,int y,int z,EntityPlayer player,int side,float xf,float yf,float zf){
  if (world.getBlockMetadata(x,y,z) <= 0) {
    return false;
  }
  TileEntityFlashBoiler tileEntity=(TileEntityFlashBoiler)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,int x,int y,int z,EntityPlayer player,int side,float xf,float yf,float zf){
  if (world.getBlockMetadata(x,y,z) <= 0) {
    return false;
  }
  TileEntityFlashBoiler tileEntity=(TileEntityFlashBoiler)world.getTileEntity(x,y,z);
  if (tileEntity == null) {
    return false;
  }
  boolean isClient=!world.isRemote;
  if (!FluidHelper.playerIsHoldingWaterContainer(player) && isClient) {
    player.openGui(Steamcraft.instance,0,world,x,y,z);
  }
 else {
    FluidHelper.fillTankFromHeldItem(player,tileEntity.getTank());
  }
  return true;
}
Program: 22368
Project: 22368
Buggy source:
@Override public ItemStack decrStackSize(int par1,int par2){
  if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1) {
    if (this.furnaceItemStacks[par1] != null) {
      ItemStack itemstack;
      if (this.furnaceItemStacks[par1].stackSize <= par2) {
        itemstack=this.furnaceItemStacks[par1];
        this.furnaceItemStacks[par1]=null;
        return itemstack;
      }
 else {
        itemstack=this.furnaceItemStacks[par1].splitStack(par2);
        if (this.furnaceItemStacks[par1].stackSize == 0) {
          this.furnaceItemStacks[par1]=null;
        }
        return itemstack;
      }
    }
 else {
      return null;
    }
  }
 else {
    return worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0 && hasMaster() ? getMasterTileEntity().decrStackSize(par1,par2) : null;
  }
}

Fixed version (ground truth):
@Override public ItemStack decrStackSize(int par1,int par2){
  if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1) {
    if (this.furnaceItemStacks[par1] != null) {
      ItemStack itemstack;
      if (this.furnaceItemStacks[par1].stackSize <= par2) {
        itemstack=this.furnaceItemStacks[par1];
        this.furnaceItemStacks[par1]=null;
        return itemstack;
      }
 else {
        itemstack=this.furnaceItemStacks[par1].splitStack(par2);
        if (this.furnaceItemStacks[par1].stackSize == 0) {
          this.furnaceItemStacks[par1]=null;
        }
        return itemstack;
      }
    }
 else {
      return null;
    }
  }
 else {
    return worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0 && hasPrimary() ? getPrimaryTileEntity().decrStackSize(par1,par2) : null;
  }
}
Program: 22369
Project: 22369
Buggy source:
@SideOnly(Side.CLIENT) @Override public int getBurnTimeRemainingScaled(int scale){
  if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1) {
    if (this.currentItemBurnTime == 0) {
      this.currentItemBurnTime=200;
    }
    return this.furnaceBurnTime * scale / this.currentItemBurnTime;
  }
 else {
    return worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0 && hasMaster() ? getMasterTileEntity().getBurnTimeRemainingScaled(scale) : 0;
  }
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public int getBurnTimeRemainingScaled(int scale){
  if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1) {
    if (this.currentItemBurnTime == 0) {
      this.currentItemBurnTime=200;
    }
    return this.furnaceBurnTime * scale / this.currentItemBurnTime;
  }
 else {
    return worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0 && hasPrimary() ? getPrimaryTileEntity().getBurnTimeRemainingScaled(scale) : 0;
  }
}
Program: 22370
Project: 22370
Buggy source:
@Override public void setInventorySlotContents(int par1,ItemStack par2ItemStack){
  if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1) {
    this.furnaceItemStacks[par1]=par2ItemStack;
    if (par2ItemStack != null && par2ItemStack.stackSize > this.getInventoryStackLimit()) {
      par2ItemStack.stackSize=this.getInventoryStackLimit();
    }
  }
 else   if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0) {
    getMasterTileEntity().setInventorySlotContents(par1,par2ItemStack);
  }
}

Fixed version (ground truth):
@Override public void setInventorySlotContents(int par1,ItemStack par2ItemStack){
  if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1) {
    this.furnaceItemStacks[par1]=par2ItemStack;
    if (par2ItemStack != null && par2ItemStack.stackSize > this.getInventoryStackLimit()) {
      par2ItemStack.stackSize=this.getInventoryStackLimit();
    }
  }
 else   if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0) {
    getPrimaryTileEntity().setInventorySlotContents(par1,par2ItemStack);
  }
}
Program: 22371
Project: 22371
Buggy source:
@Override public boolean canExtractItem(int slot,ItemStack stack,int side){
  if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1) {
    return stack.getItem() == Items.bucket;
  }
 else {
    return worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0 && hasMaster() ? getMasterTileEntity().canExtractItem(slot,stack,side) : false;
  }
}

Fixed version (ground truth):
@Override public boolean canExtractItem(int slot,ItemStack stack,int side){
  if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1) {
    return stack.getItem() == Items.bucket;
  }
 else {
    return worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0 && hasPrimary() ? getPrimaryTileEntity().canExtractItem(slot,stack,side) : false;
  }
}
Program: 22372
Project: 22372
Buggy source:
@Override public boolean isBurning(){
  if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1) {
    return this.furnaceBurnTime > 0;
  }
 else   if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0) {
    if (getMasterTileEntity() != null) {
      return getMasterTileEntity().isBurning();
    }
 else     return false;
  }
 else   return false;
}

Fixed version (ground truth):
@Override public boolean isBurning(){
  if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1) {
    return this.furnaceBurnTime > 0;
  }
 else   if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0) {
    if (getPrimaryTileEntity() != null) {
      return getPrimaryTileEntity().isBurning();
    }
 else     return false;
  }
 else   return false;
}
Program: 22373
Project: 22373
Buggy source:
@Override public void insertSteam(int amount,ForgeDirection face){
  if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1 && this.getNetwork() != null) {
    this.getNetwork().addSteam(amount);
  }
 else   if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0) {
    getMasterTileEntity().insertSteam(amount,face);
  }
}

Fixed version (ground truth):
@Override public void insertSteam(int amount,ForgeDirection face){
  if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1 && this.getNetwork() != null) {
    this.getNetwork().addSteam(amount);
  }
 else   if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0) {
    getPrimaryTileEntity().insertSteam(amount,face);
  }
}
Program: 22374
Project: 22374
Buggy source:
@Override public int fill(ForgeDirection from,FluidStack resource,boolean doFill){
  int meta=worldObj.getBlockMetadata(xCoord,yCoord,zCoord);
  if (meta == 1) {
    return myTank.fill(resource,doFill);
  }
 else   if (meta > 0 && hasMaster()) {
    return getMasterTileEntity().fill(from,resource,doFill);
  }
 else {
    return 0;
  }
}

Fixed version (ground truth):
@Override public int fill(ForgeDirection from,FluidStack resource,boolean doFill){
  int meta=worldObj.getBlockMetadata(xCoord,yCoord,zCoord);
  if (meta == 1) {
    return myTank.fill(resource,doFill);
  }
 else   if (meta > 0 && hasPrimary()) {
    return getPrimaryTileEntity().fill(from,resource,doFill);
  }
 else {
    return 0;
  }
}
Program: 22375
Project: 22375
Buggy source:
@Override public int getSizeInventory(){
  return worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1 ? this.furnaceItemStacks.length : (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0 && hasMaster() ? getMasterTileEntity().getSizeInventory() : 0);
}

Fixed version (ground truth):
@Override public int getSizeInventory(){
  return worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1 ? this.furnaceItemStacks.length : (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0 && hasPrimary() ? getPrimaryTileEntity().getSizeInventory() : 0);
}
Program: 22376
Project: 22376
Buggy source:
@Override public ItemStack getStackInSlotOnClosing(int par1){
  if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1) {
    if (this.furnaceItemStacks[par1] != null) {
      ItemStack itemstack=this.furnaceItemStacks[par1];
      this.furnaceItemStacks[par1]=null;
      return itemstack;
    }
 else {
      return null;
    }
  }
 else {
    return worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0 && hasMaster() ? getMasterTileEntity().getStackInSlotOnClosing(par1) : null;
  }
}

Fixed version (ground truth):
@Override public ItemStack getStackInSlotOnClosing(int par1){
  if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1) {
    if (this.furnaceItemStacks[par1] != null) {
      ItemStack itemstack=this.furnaceItemStacks[par1];
      this.furnaceItemStacks[par1]=null;
      return itemstack;
    }
 else {
      return null;
    }
  }
 else {
    return worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0 && hasPrimary() ? getPrimaryTileEntity().getStackInSlotOnClosing(par1) : null;
  }
}
Program: 22377
Project: 22377
Buggy source:
@SideOnly(Side.CLIENT) @Override public int getCookProgressScaled(int scale){
  return worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1 ? this.furnaceCookTime * scale / 200 : (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0 && hasMaster() ? getMasterTileEntity().getCookProgressScaled(scale) : 0);
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public int getCookProgressScaled(int scale){
  return worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1 ? this.furnaceCookTime * scale / 200 : (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0 && hasPrimary() ? getPrimaryTileEntity().getCookProgressScaled(scale) : 0);
}
Program: 22378
Project: 22378
Buggy source:
@Override public FluidTank getTank(){
  if (this.getBlockMetadata() > 0) {
    if (this.getBlockMetadata() == 1) {
      return this.myTank;
    }
 else {
      if (this.hasMaster()) {
        return this.getMasterTileEntity().getTank();
      }
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public FluidTank getTank(){
  if (this.getBlockMetadata() > 0) {
    if (this.getBlockMetadata() == 1) {
      return this.myTank;
    }
 else {
      if (this.hasPrimary()) {
        return this.getPrimaryTileEntity().getTank();
      }
    }
  }
  return null;
}
Program: 22379
Project: 22379
Buggy source:
private boolean canSmelt(){
  return worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1 ? myTank.getFluidAmount() > 9 : worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0 && hasMaster() ? getMasterTileEntity().canSmelt() : false;
}

Fixed version (ground truth):
private boolean canSmelt(){
  return worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1 ? myTank.getFluidAmount() > 9 : worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0 && hasPrimary() ? getPrimaryTileEntity().canSmelt() : false;
}
Program: 22380
Project: 22380
Buggy source:
@Override public ItemStack getStackInSlot(int slot){
  return worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1 ? this.furnaceItemStacks[slot] : (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0 && hasMaster() ? getMasterTileEntity().getStackInSlot(slot) : null);
}

Fixed version (ground truth):
@Override public ItemStack getStackInSlot(int slot){
  return worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1 ? this.furnaceItemStacks[slot] : (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0 && hasPrimary() ? getPrimaryTileEntity().getStackInSlot(slot) : null);
}
Program: 22381
Project: 22381
Buggy source:
@Override public void decrSteam(int i){
  if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1 && this.getNetwork() != null) {
    this.getNetwork().decrSteam(i);
  }
 else   if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0) {
    getMasterTileEntity().decrSteam(i);
  }
}

Fixed version (ground truth):
@Override public void decrSteam(int i){
  if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1 && this.getNetwork() != null) {
    this.getNetwork().decrSteam(i);
  }
 else   if (worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0) {
    getPrimaryTileEntity().decrSteam(i);
  }
}
Program: 22382
Project: 22382
Buggy source:
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;
}

Fixed version (ground truth):
public boolean getBurning(){
  int meta=getBlockMetadata();
  if (meta > 0) {
    if (meta == 1) {
      return this.burning;
    }
 else {
      if (this.hasPrimary()) {
        return this.getPrimaryTileEntity().isBurning();
      }
    }
  }
  return false;
}
Program: 22383
Project: 22383
Buggy source:
@Override public FluidTankInfo[] getTankInfo(ForgeDirection from){
  return worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1 ? new FluidTankInfo[]{new FluidTankInfo(myTank)} : worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0 && hasMaster() ? getMasterTileEntity().getTankInfo(from) : new FluidTankInfo[]{new FluidTankInfo(new FluidTank(0))};
}

Fixed version (ground truth):
@Override public FluidTankInfo[] getTankInfo(ForgeDirection from){
  return worldObj.getBlockMetadata(xCoord,yCoord,zCoord) == 1 ? new FluidTankInfo[]{new FluidTankInfo(myTank)} : worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0 && hasPrimary() ? getPrimaryTileEntity().getTankInfo(from) : new FluidTankInfo[]{new FluidTankInfo(new FluidTank(0))};
}
Program: 22384
Project: 22384
Buggy source:
@Override public int getCapacity(){
  return worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0 && hasMaster() ? this.capacity : 0;
}

Fixed version (ground truth):
@Override public int getCapacity(){
  return worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0 && hasPrimary() ? this.capacity : 0;
}
Program: 22385
Project: 22385
Buggy source:
@Override public boolean canInsertItem(int slot,ItemStack stack,int side){
  int[] accessibleSlots=getAccessibleSlotsFromSide(side);
  boolean isAccessibleSlot=false;
  for (int i=0; i < accessibleSlots.length; i++) {
    if (accessibleSlots[i] == slot)     isAccessibleSlot=true;
  }
  return worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0 && hasMaster() ? this.isItemValidForSlot(slot,stack) && isAccessibleSlot : false;
}

Fixed version (ground truth):
@Override public boolean canInsertItem(int slot,ItemStack stack,int side){
  int[] accessibleSlots=getAccessibleSlotsFromSide(side);
  boolean isAccessibleSlot=false;
  for (int i=0; i < accessibleSlots.length; i++) {
    if (accessibleSlots[i] == slot)     isAccessibleSlot=true;
  }
  return worldObj.getBlockMetadata(xCoord,yCoord,zCoord) > 0 && hasPrimary() ? this.isItemValidForSlot(slot,stack) && isAccessibleSlot : false;
}
Program: 22387
Project: 22387
Buggy source:
@SubscribeEvent public void sendToVoid(BlockEvent.HarvestDropsEvent event){
  if (event.harvester == null || event.block == null) {
    return;
  }
  EntityPlayer player=event.harvester;
  World world=event.world;
  ItemStack equipped=player.getCurrentEquippedItem();
  if (!canDoVoidThings(equipped) || player.isSneaking()) {
    return;
  }
  if (equipped.hasTagCompound() && equipped.stackTagCompound.hasKey("String_Node_Str")) {
    NBTTagCompound nbt=equipped.stackTagCompound.getCompoundTag("String_Node_Str");
    int invX=nbt.getInteger("String_Node_Str");
    int invY=nbt.getInteger("String_Node_Str");
    int invZ=nbt.getInteger("String_Node_Str");
    TileEntity tile=world.getTileEntity(invX,invY,invZ);
    int x=event.x;
    int y=event.y;
    int z=event.z;
    if (tile == null || (invX == x && invY == y && invZ == z)) {
      equipped.getTagCompound().removeTag("String_Node_Str");
      indicateVoidSet(world,x,y,z);
      return;
    }
    if (tile instanceof IInventory) {
      addToInventory(event.drops,(IInventory)tile);
    }
    tile.updateEntity();
  }
 else {
    InventoryEnderChest ender=player.getInventoryEnderChest();
    addToInventory(event.drops,ender);
    ender.saveInventoryToNBT();
  }
  event.drops.clear();
}

Fixed version (ground truth):
@SubscribeEvent(priority=EventPriority.LOWEST) public void sendToVoid(BlockEvent.HarvestDropsEvent event){
  if (event.harvester == null || event.block == null) {
    return;
  }
  EntityPlayer player=event.harvester;
  World world=event.world;
  ItemStack equipped=player.getCurrentEquippedItem();
  if (!canDoVoidThings(equipped) || player.isSneaking()) {
    return;
  }
  ArrayList<ItemStack> failures=new ArrayList<>();
  if (equipped.hasTagCompound() && equipped.stackTagCompound.hasKey("String_Node_Str")) {
    NBTTagCompound nbt=equipped.stackTagCompound.getCompoundTag("String_Node_Str");
    int invX=nbt.getInteger("String_Node_Str");
    int invY=nbt.getInteger("String_Node_Str");
    int invZ=nbt.getInteger("String_Node_Str");
    TileEntity tile=world.getTileEntity(invX,invY,invZ);
    int x=event.x;
    int y=event.y;
    int z=event.z;
    if (tile == null || (invX == x && invY == y && invZ == z)) {
      equipped.getTagCompound().removeTag("String_Node_Str");
      indicateVoidSet(world,x,y,z);
      return;
    }
    if (tile instanceof IInventory) {
      failures=addToInventory(event.drops,(IInventory)tile);
    }
    tile.updateEntity();
  }
 else {
    InventoryEnderChest ender=player.getInventoryEnderChest();
    failures=addToInventory(event.drops,ender);
    ender.saveInventoryToNBT();
  }
  event.drops.clear();
  if (!failures.isEmpty()) {
    event.drops.addAll(failures);
  }
}