nus-yam/ex-repair huggingface dataset:
Program: 22167
Project: 22167
Buggy source:
@Override public IBlockState getStateFromMeta(int meta){
  return getDefaultState().withProperty(VARIANT,OreBlockTypes.byMetadata(meta));
}

Fixed version (ground truth):
@Nonnull @Override public IBlockState getStateFromMeta(int meta){
  return getDefaultState().withProperty(VARIANT,OreBlockTypes.byMetadata(meta));
}
Program: 22168
Project: 22168
Buggy source:
@Override @SideOnly(Side.CLIENT) public void getSubBlocks(Item item,CreativeTabs tabs,NonNullList<ItemStack> list){
  for (  OreBlockTypes type : OreBlockTypes.LOOKUP) {
    list.add(new ItemStack(this,1,type.getMetadata()));
  }
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public void getSubBlocks(@Nonnull Item item,CreativeTabs tabs,NonNullList<ItemStack> list){
  for (  OreBlockTypes type : OreBlockTypes.LOOKUP) {
    list.add(new ItemStack(this,1,type.getMetadata()));
  }
}
Program: 22169
Project: 22169
Buggy source:
/** 
 * @param state The state to check
 * @return Whether the provided blockstate matches this BiomeDefinition.
 */
public boolean matches(IBlockState state){
  if (state == null || (replaceableBlocksOreDict.isEmpty() && replaceableBlocksAndMeta.isEmpty())) {
    return false;
  }
  Block block=state.getBlock();
  int meta=block.getMetaFromState(state);
  if (replaceableBlocksAndMeta.contains(Pair.of(block,meta)) || replaceableBlocksAndMeta.contains(Pair.of(block,OreDictionary.WILDCARD_VALUE))) {
    return true;
  }
  Item itemBlock=Item.getItemFromBlock(block);
  if (itemBlock == null) {
    return false;
  }
  int[] ids=OreDictionary.getOreIDs(new ItemStack(itemBlock,1,meta));
  for (  int id : ids) {
    if (replaceableBlocksOreDict.contains(OreDictionary.getOreName(id))) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * @param state The state to check
 * @return Whether the provided blockstate matches this BiomeDefinition.
 */
public boolean matches(IBlockState state){
  if (state == null || (replaceableBlocksOreDict.isEmpty() && replaceableBlocksAndMeta.isEmpty())) {
    return false;
  }
  Block block=state.getBlock();
  int meta=block.getMetaFromState(state);
  if (replaceableBlocksAndMeta.contains(Pair.of(block,meta)) || replaceableBlocksAndMeta.contains(Pair.of(block,OreDictionary.WILDCARD_VALUE))) {
    return true;
  }
  Item itemBlock=Item.getItemFromBlock(block);
  if (itemBlock == Items.AIR) {
    return false;
  }
  int[] ids=OreDictionary.getOreIDs(new ItemStack(itemBlock,1,meta));
  for (  int id : ids) {
    if (replaceableBlocksOreDict.contains(OreDictionary.getOreName(id))) {
      return true;
    }
  }
  return false;
}
Program: 22170
Project: 22170
Buggy source:
@Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack me,EntityPlayer player,List<String> list,boolean advanced){
  super.addInformation(me,player,list,advanced);
  list.add(TextFormatting.WHITE + "String_Node_Str" + (me.getMaxDamage() - me.getItemDamage()) * steamPerDurability() + "String_Node_Str" + me.getMaxDamage() * steamPerDurability() + "String_Node_Str");
  ArrayList<ItemStack> upgradeStacks=UtilSteamTool.getUpgradeStacks(me);
  ArrayList<String> upgradeStrings=UtilSteamTool.getInformationFromStacks(upgradeStacks,getRedSlot(),me);
  for (  String string : upgradeStrings) {
    list.add(string);
  }
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack me,World world,List<String> list,ITooltipFlag tooltipFlag){
  super.addInformation(me,world,list,tooltipFlag);
  list.add(TextFormatting.WHITE + "String_Node_Str" + (me.getMaxDamage() - me.getItemDamage()) * steamPerDurability() + "String_Node_Str" + me.getMaxDamage() * steamPerDurability() + "String_Node_Str");
  ArrayList<ItemStack> upgradeStacks=UtilSteamTool.getUpgradeStacks(me);
  ArrayList<String> upgradeStrings=UtilSteamTool.getInformationFromStacks(upgradeStacks,getRedSlot(),me);
  for (  String string : upgradeStrings) {
    list.add(string);
  }
}
Program: 22171
Project: 22171
Buggy source:
@Override public ItemStack getRecipeOutput(){
  return null;
}

Fixed version (ground truth):
@Nonnull @Override public ItemStack getRecipeOutput(){
  return ItemStack.EMPTY;
}
Program: 22172
Project: 22172
Buggy source:
@Override public ItemStack getCraftingResult(InventoryCrafting inv){
  ItemStack toCan=getItemToCan(inv);
  if (toCan != null) {
    if (!toCan.hasTagCompound()) {
      toCan.setTagCompound(new NBTTagCompound());
    }
    toCan.getTagCompound().setInteger("String_Node_Str",0);
    toCan.setCount(1);
    return toCan;
  }
  return null;
}

Fixed version (ground truth):
@Nonnull @Override public ItemStack getCraftingResult(@Nonnull InventoryCrafting inv){
  ItemStack toCan=getItemToCan(inv);
  if (toCan != null) {
    if (!toCan.hasTagCompound()) {
      toCan.setTagCompound(new NBTTagCompound());
    }
    toCan.getTagCompound().setInteger("String_Node_Str",0);
    toCan.setCount(1);
    return toCan;
  }
  return ItemStack.EMPTY;
}
Program: 22173
Project: 22173
Buggy source:
@Override public NonNullList<ItemStack> getRemainingItems(InventoryCrafting inv){
  return NonNullList.withSize(inv.getSizeInventory(),ItemStack.EMPTY);
}

Fixed version (ground truth):
@Nonnull @Override public NonNullList<ItemStack> getRemainingItems(@Nonnull InventoryCrafting inv){
  return NonNullList.withSize(inv.getSizeInventory(),ItemStack.EMPTY);
}
Program: 22174
Project: 22174
Buggy source:
/** 
 * @param inv The crafting inventory
 * @return A copy of the input ItemStack that is going to be canned. Will be null if the input is wrong (i.e.,multiple cans, multiple non-cans, input is already canned).
 */
@Nullable private ItemStack getItemToCan(InventoryCrafting inv){
  ItemStack output=null;
  int cans=0;
  int noncans=0;
  for (int i=0; i < inv.getSizeInventory(); i++) {
    ItemStack itemStack=inv.getStackInSlot(i);
    if (itemStack != null) {
      if (itemStack.getItem() == ITEM_CANISTER) {
        cans++;
      }
 else {
        noncans++;
        if (output == null) {
          output=itemStack.copy();
        }
      }
    }
  }
  if (output != null && output.hasTagCompound() && output.getTagCompound().hasKey("String_Node_Str")) {
    return null;
  }
  return cans == 1 && noncans == 1 ? output : null;
}

Fixed version (ground truth):
/** 
 * @param inv The crafting inventory
 * @return A copy of the input ItemStack that is going to be canned. Will be null if the input is wrong (i.e.,multiple cans, multiple non-cans, input is already canned).
 */
@Nullable private ItemStack getItemToCan(InventoryCrafting inv){
  ItemStack output=null;
  int cans=0;
  int noncans=0;
  for (int i=0; i < inv.getSizeInventory(); i++) {
    ItemStack itemStack=inv.getStackInSlot(i);
    if (!itemStack.isEmpty()) {
      if (itemStack.getItem() == ITEM_CANISTER) {
        cans++;
      }
 else {
        noncans++;
        if (output == null) {
          output=itemStack.copy();
        }
      }
    }
  }
  if (output != null && output.hasTagCompound() && output.getTagCompound().hasKey("String_Node_Str")) {
    return null;
  }
  return cans == 1 && noncans == 1 ? output : null;
}
Program: 22175
Project: 22175
Buggy source:
@Override public boolean matches(InventoryCrafting inv,World world){
  ItemStack toCan=getItemToCan(inv);
  return toCan != null;
}

Fixed version (ground truth):
@Override public boolean matches(@Nonnull InventoryCrafting inv,@Nonnull World world){
  ItemStack toCan=getItemToCan(inv);
  return toCan != null;
}
Program: 22176
Project: 22176
Buggy source:
@Override public boolean isEntityInvulnerable(DamageSource source){
  return true;
}

Fixed version (ground truth):
@Override public boolean isEntityInvulnerable(@Nonnull DamageSource source){
  return true;
}
Program: 22177
Project: 22177
Buggy source:
@Override public void writeEntityToNBT(NBTTagCompound nbt){
  nbt.setShort("String_Node_Str",(short)tilePos.getX());
  nbt.setShort("String_Node_Str",(short)tilePos.getY());
  nbt.setShort("String_Node_Str",(short)tilePos.getZ());
  nbt.setByte("String_Node_Str",(byte)inData);
  nbt.setByte("String_Node_Str",(byte)arrowShake);
  nbt.setBoolean("String_Node_Str",inGround);
  nbt.setDouble("String_Node_Str",damage);
}

Fixed version (ground truth):
@Override public void writeEntityToNBT(@Nonnull NBTTagCompound nbt){
  nbt.setShort("String_Node_Str",(short)tilePos.getX());
  nbt.setShort("String_Node_Str",(short)tilePos.getY());
  nbt.setShort("String_Node_Str",(short)tilePos.getZ());
  nbt.setByte("String_Node_Str",(byte)inData);
  nbt.setByte("String_Node_Str",(byte)arrowShake);
  nbt.setBoolean("String_Node_Str",inGround);
  nbt.setDouble("String_Node_Str",damage);
}
Program: 22178
Project: 22178
Buggy source:
@Override public void readEntityFromNBT(NBTTagCompound nbt){
  int x=nbt.getShort("String_Node_Str");
  int y=nbt.getShort("String_Node_Str");
  int z=nbt.getShort("String_Node_Str");
  tilePos=new BlockPos(x,y,z);
  inData=nbt.getByte("String_Node_Str") & 255;
  arrowShake=nbt.getByte("String_Node_Str") & 255;
  inGround=nbt.getBoolean("String_Node_Str");
  if (nbt.hasKey("String_Node_Str")) {
    damage=nbt.getDouble("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void readEntityFromNBT(@Nonnull NBTTagCompound nbt){
  int x=nbt.getShort("String_Node_Str");
  int y=nbt.getShort("String_Node_Str");
  int z=nbt.getShort("String_Node_Str");
  tilePos=new BlockPos(x,y,z);
  inData=nbt.getByte("String_Node_Str") & 255;
  arrowShake=nbt.getByte("String_Node_Str") & 255;
  inGround=nbt.getBoolean("String_Node_Str");
  if (nbt.hasKey("String_Node_Str")) {
    damage=nbt.getDouble("String_Node_Str");
  }
}
Program: 22179
Project: 22179
Buggy source:
@Override @SideOnly(Side.CLIENT) public void setVelocity(double x,double y,double z){
  motionX=x;
  motionY=y;
  motionZ=z;
  if (prevRotationPitch == 0.0F && prevRotationYaw == 0.0F) {
    float var7=MathHelper.sqrt(x * x + z * z);
    prevRotationYaw=rotationYaw=(float)(Math.atan2(x,z) * 180.0D / Math.PI);
    prevRotationPitch=rotationPitch=(float)(Math.atan2(y,(double)var7) * 180.0D / Math.PI);
    prevRotationPitch=rotationPitch;
    prevRotationYaw=rotationYaw;
    setLocationAndAngles(posX,posY,posZ,rotationYaw,rotationPitch);
    ticksInGround=0;
  }
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public void setVelocity(double x,double y,double z){
  motionX=x;
  motionY=y;
  motionZ=z;
  if (prevRotationPitch == 0.0F && prevRotationYaw == 0.0F) {
    float var7=MathHelper.sqrt(x * x + z * z);
    prevRotationYaw=rotationYaw=(float)(Math.atan2(x,z) * 180.0D / Math.PI);
    prevRotationPitch=rotationPitch=(float)(Math.atan2(y,var7) * 180.0D / Math.PI);
    prevRotationPitch=rotationPitch;
    prevRotationYaw=rotationYaw;
    setLocationAndAngles(posX,posY,posZ,rotationYaw,rotationPitch);
    ticksInGround=0;
  }
}
Program: 22180
Project: 22180
Buggy source:
public EntityMusketBall(World world,EntityPlayer player,float par3,float par4,float damage,boolean par6){
  super(world);
  this.damage=damage;
  setRenderDistanceWeight(10.0D);
  shootingEntity=player;
  setSize(0.5F,0.5F);
  setLocationAndAngles(player.posX,player.posY + (double)player.getEyeHeight(),player.posZ,player.rotationYaw + ((itemRand.nextFloat() - 0.5F) * par4 * 15F),player.rotationPitch + ((itemRand.nextFloat() - 0.5F) * par4 * 15F));
  posX-=(double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F);
  posY-=0.10000000149011612D;
  posZ-=(double)(MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F);
  setPosition(this.posX,this.posY,this.posZ);
  motionX=(double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI));
  motionZ=(double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI));
  motionY=(double)(-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI));
  setThrowableHeading(this.motionX,this.motionY,this.motionZ,par3 * 10F,1.0F);
}

Fixed version (ground truth):
public EntityMusketBall(World world,EntityPlayer player,float par3,float par4,float damage,boolean par6){
  super(world);
  this.damage=damage;
  setRenderDistanceWeight(10.0D);
  shootingEntity=player;
  setSize(0.5F,0.5F);
  setLocationAndAngles(player.posX,player.posY + player.getEyeHeight(),player.posZ,player.rotationYaw + ((itemRand.nextFloat() - 0.5F) * par4 * 15F),player.rotationPitch + ((itemRand.nextFloat() - 0.5F) * par4 * 15F));
  posX-=(MathHelper.cos(rotationYaw / 180.0F * (float)Math.PI) * 0.16F);
  posY-=0.10000000149011612D;
  posZ-=(MathHelper.sin(rotationYaw / 180.0F * (float)Math.PI) * 0.16F);
  setPosition(posX,posY,posZ);
  motionX=(-MathHelper.sin(rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float)Math.PI));
  motionZ=(MathHelper.cos(rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float)Math.PI));
  motionY=(-MathHelper.sin(rotationPitch / 180.0F * (float)Math.PI));
  shoot(motionX,motionY,motionZ,par3 * 10F,1.0F);
}
Program: 22182
Project: 22182
Buggy source:
@Override public void writeEntityToNBT(NBTTagCompound nbt){
  nbt.setShort("String_Node_Str",(short)x);
  nbt.setShort("String_Node_Str",(short)y);
  nbt.setShort("String_Node_Str",(short)z);
  nbt.setByte("String_Node_Str",(byte)Block.getIdFromBlock(blockInside));
  nbt.setBoolean("String_Node_Str",inGround);
  nbt.setTag("String_Node_Str",newDoubleNBTList(motionX,motionY,motionZ));
}

Fixed version (ground truth):
@Override public void writeEntityToNBT(@Nonnull NBTTagCompound nbt){
  nbt.setShort("String_Node_Str",(short)x);
  nbt.setShort("String_Node_Str",(short)y);
  nbt.setShort("String_Node_Str",(short)z);
  nbt.setByte("String_Node_Str",(byte)Block.getIdFromBlock(blockInside));
  nbt.setBoolean("String_Node_Str",inGround);
  nbt.setTag("String_Node_Str",newDoubleNBTList(motionX,motionY,motionZ));
}
Program: 22183
Project: 22183
Buggy source:
@Override public void readEntityFromNBT(NBTTagCompound nbt){
  x=nbt.getShort("String_Node_Str");
  y=nbt.getShort("String_Node_Str");
  z=nbt.getShort("String_Node_Str");
  blockInside=Block.getBlockById(nbt.getByte("String_Node_Str") & 255);
  inGround=nbt.getBoolean("String_Node_Str");
  if (nbt.hasKey("String_Node_Str",Constants.NBT.TAG_LIST)) {
    NBTTagList nbttaglist=nbt.getTagList("String_Node_Str",Constants.NBT.TAG_DOUBLE);
    motionX=nbttaglist.getDoubleAt(0);
    motionY=nbttaglist.getDoubleAt(1);
    motionZ=nbttaglist.getDoubleAt(2);
  }
 else {
    setDead();
  }
}

Fixed version (ground truth):
@Override public void readEntityFromNBT(@Nonnull NBTTagCompound nbt){
  x=nbt.getShort("String_Node_Str");
  y=nbt.getShort("String_Node_Str");
  z=nbt.getShort("String_Node_Str");
  blockInside=Block.getBlockById(nbt.getByte("String_Node_Str") & 255);
  inGround=nbt.getBoolean("String_Node_Str");
  if (nbt.hasKey("String_Node_Str",Constants.NBT.TAG_LIST)) {
    NBTTagList nbttaglist=nbt.getTagList("String_Node_Str",Constants.NBT.TAG_DOUBLE);
    motionX=nbttaglist.getDoubleAt(0);
    motionY=nbttaglist.getDoubleAt(1);
    motionZ=nbttaglist.getDoubleAt(2);
  }
 else {
    setDead();
  }
}
Program: 22184
Project: 22184
Buggy source:
@Override public float getBrightness(float partialTicks){
  return 1.0F;
}

Fixed version (ground truth):
@Override public float getBrightness(){
  return 1.0F;
}
Program: 22185
Project: 22185
Buggy source:
public EntityRocket(World world,EntityPlayer player,float par4,float size){
  super(world);
  inputParam4=par4;
  shootingEntity=player;
  explosionSize=size;
  setSize(0.25F,0.25F);
  setLocationAndAngles(player.posX,player.posY + (double)player.getEyeHeight(),player.posZ,player.rotationYaw + ((itemRand.nextFloat() - 0.5F) * par4 * 15F),player.rotationPitch + ((itemRand.nextFloat() - 0.5F) * par4 * 15F));
  setPosition(this.posX,this.posY,this.posZ);
  posX-=1.0D * (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F);
  posZ-=1.0D * (double)(MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F);
  motionX=motionY=motionZ=0.0D;
  double p_i1760_8_=player.getLookVec().x;
  double p_i1760_10_=player.getLookVec().y;
  double p_i1760_12_=player.getLookVec().z;
  double d6=(double)MathHelper.sqrt(p_i1760_8_ * p_i1760_8_ + p_i1760_10_ * p_i1760_10_ + p_i1760_12_ * p_i1760_12_);
  motionX=p_i1760_8_ / d6 * 1.0D;
  motionY=p_i1760_10_ / d6 * 1.0D;
  motionZ=p_i1760_12_ / d6 * 1.0D;
  displayRotationYaw=rotationYaw;
  float f3=MathHelper.sqrt(motionX * motionX + motionZ * motionZ);
  displayRotationPitch=(float)(Math.atan2(motionY,(double)f3) * 180.0D / Math.PI);
}

Fixed version (ground truth):
public EntityRocket(World world,EntityPlayer player,float par4,float size){
  super(world);
  inputParam4=par4;
  shootingEntity=player;
  explosionSize=size;
  setSize(0.25F,0.25F);
  setLocationAndAngles(player.posX,player.posY + player.getEyeHeight(),player.posZ,player.rotationYaw + ((itemRand.nextFloat() - 0.5F) * par4 * 15F),player.rotationPitch + ((itemRand.nextFloat() - 0.5F) * par4 * 15F));
  setPosition(posX,posY,posZ);
  posX-=1.0D * (MathHelper.cos(rotationYaw / 180.0F * (float)Math.PI) * 0.16F);
  posZ-=1.0D * (MathHelper.sin(rotationYaw / 180.0F * (float)Math.PI) * 0.16F);
  motionX=motionY=motionZ=0.0D;
  double p_i1760_8_=player.getLookVec().x;
  double p_i1760_10_=player.getLookVec().y;
  double p_i1760_12_=player.getLookVec().z;
  double d6=MathHelper.sqrt(p_i1760_8_ * p_i1760_8_ + p_i1760_10_ * p_i1760_10_ + p_i1760_12_ * p_i1760_12_);
  motionX=p_i1760_8_ / d6 * 1.0D;
  motionY=p_i1760_10_ / d6 * 1.0D;
  motionZ=p_i1760_12_ / d6 * 1.0D;
  displayRotationYaw=rotationYaw;
  float f3=MathHelper.sqrt(motionX * motionX + motionZ * motionZ);
  displayRotationPitch=(float)(Math.atan2(motionY,f3) * 180.0D / Math.PI);
}
Program: 22186
Project: 22186
Buggy source:
protected void onImpact(){
  if (!this.world.isRemote) {
    newExplosion(world,shootingEntity,posX,posY,posZ,explosionSize,true,world.getGameRules().getBoolean("String_Node_Str"));
    this.setDead();
  }
}

Fixed version (ground truth):
protected void onImpact(){
  if (!world.isRemote) {
    newExplosion(world,shootingEntity,posX,posY,posZ,explosionSize,true,world.getGameRules().getBoolean("String_Node_Str"));
    setDead();
  }
}
Program: 22187
Project: 22187
Buggy source:
@Override public boolean attackEntityFrom(DamageSource source,float amount){
  if (isEntityInvulnerable(source)) {
    return false;
  }
 else {
    setBeenAttacked();
    Entity entity=source.getTrueSource();
    if (entity != null) {
      Vec3d vec3=entity.getLookVec();
      motionX=vec3.x;
      motionY=vec3.y;
      motionZ=vec3.z;
      if (entity instanceof EntityLivingBase) {
        shootingEntity=(EntityLivingBase)entity;
      }
      return true;
    }
 else {
      return false;
    }
  }
}

Fixed version (ground truth):
@Override public boolean attackEntityFrom(@Nonnull DamageSource source,float amount){
  if (isEntityInvulnerable(source)) {
    return false;
  }
 else {
    markVelocityChanged();
    Entity entity=source.getTrueSource();
    if (entity != null) {
      Vec3d vec3=entity.getLookVec();
      motionX=vec3.x;
      motionY=vec3.y;
      motionZ=vec3.z;
      if (entity instanceof EntityLivingBase) {
        shootingEntity=(EntityLivingBase)entity;
      }
      return true;
    }
 else {
      return false;
    }
  }
}
Program: 22188
Project: 22188
Buggy source:
@Override @SideOnly(Side.CLIENT) public int getBrightnessForRender(float partialTicks){
  return 15728880;
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public int getBrightnessForRender(){
  return 15728880;
}
Program: 22190
Project: 22190
Buggy source:
@Override public String getName(){
  return name;
}

Fixed version (ground truth):
@Nonnull @Override public String getName(){
  return name;
}
Program: 22191
Project: 22191
Buggy source:
@Override public IBlockState withMirror(IBlockState state,Mirror mirrorIn){
  return state.withRotation(mirrorIn.toRotation(state.getValue(FACING)));
}

Fixed version (ground truth):
@Nonnull @Override public IBlockState withMirror(@Nonnull IBlockState state,Mirror mirrorIn){
  return state.withRotation(mirrorIn.toRotation(state.getValue(FACING)));
}
Program: 22192
Project: 22192
Buggy source:
@Override @SideOnly(Side.CLIENT) public void randomDisplayTick(IBlockState state,World world,BlockPos pos,Random rand){
  TileEntity tile=world.getTileEntity(pos);
  if (tile == null || !(tile instanceof TileEntityBoiler)) {
    return;
  }
  TileEntityBoiler boiler=(TileEntityBoiler)tile;
  if (boiler.isBurning()) {
    EnumFacing facing=state.getValue(FACING);
    float f=(float)pos.getX() + 0.5F;
    float f1=(float)pos.getY() + 0.0F + rand.nextFloat() * 6.0F / 16.0F;
    float f2=(float)pos.getZ() + 0.5F;
    float f3=0.52F;
    float f4=rand.nextFloat() * 0.6F - 0.3F;
    double xCoord;
    double yCoord=(double)f1;
    double zCoord;
switch (facing) {
case WEST:
{
        xCoord=(double)f - f3;
        zCoord=(double)f2 + f4;
        break;
      }
case EAST:
{
      xCoord=(double)f + f3;
      zCoord=(double)f2 + f4;
      break;
    }
case NORTH:
{
    xCoord=(double)f + f4;
    zCoord=(double)f2 - f3;
    break;
  }
case SOUTH:
{
  xCoord=(double)f + f4;
  zCoord=(double)f2 + f3;
  break;
}
default :
{
return;
}
}
world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL,xCoord,yCoord,zCoord,0D,0D,0D);
world.spawnParticle(EnumParticleTypes.FLAME,xCoord,yCoord,zCoord,0D,0D,0D);
}
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public void randomDisplayTick(IBlockState state,World world,BlockPos pos,Random rand){
  TileEntity tile=world.getTileEntity(pos);
  if (!(tile instanceof TileEntityBoiler)) {
    return;
  }
  TileEntityBoiler boiler=(TileEntityBoiler)tile;
  if (boiler.isBurning()) {
    EnumFacing facing=state.getValue(FACING);
    float f=pos.getX() + 0.5F;
    float f1=pos.getY() + 0.0F + rand.nextFloat() * 6.0F / 16.0F;
    float f2=pos.getZ() + 0.5F;
    float f3=0.52F;
    float f4=rand.nextFloat() * 0.6F - 0.3F;
    double xCoord;
    double zCoord;
switch (facing) {
case WEST:
{
        xCoord=(double)f - f3;
        zCoord=(double)f2 + f4;
        break;
      }
case EAST:
{
      xCoord=(double)f + f3;
      zCoord=(double)f2 + f4;
      break;
    }
case NORTH:
{
    xCoord=(double)f + f4;
    zCoord=(double)f2 - f3;
    break;
  }
case SOUTH:
{
  xCoord=(double)f + f4;
  zCoord=(double)f2 + f3;
  break;
}
default :
{
return;
}
}
world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL,xCoord,f1,zCoord,0D,0D,0D);
world.spawnParticle(EnumParticleTypes.FLAME,xCoord,f1,zCoord,0D,0D,0D);
}
}
Program: 22193
Project: 22193
Buggy source:
@Override public IBlockState withRotation(IBlockState state,Rotation rot){
  return state.withProperty(FACING,rot.rotate(state.getValue(FACING)));
}

Fixed version (ground truth):
@Nonnull @Override public IBlockState withRotation(@Nonnull IBlockState state,Rotation rot){
  return state.withProperty(FACING,rot.rotate(state.getValue(FACING)));
}
Program: 22194
Project: 22194
Buggy source:
@Override public IBlockState getActualState(IBlockState state,IBlockAccess world,BlockPos pos){
  TileEntity tile=WorldHelper.getTileEntitySafely(world,pos);
  if (tile instanceof TileEntityBoiler) {
    TileEntityBoiler boiler=(TileEntityBoiler)tile;
    return getDefaultState().withProperty(FACING,state.getValue(FACING)).withProperty(IS_ON,boiler.isBurning());
  }
  return state;
}

Fixed version (ground truth):
@Nonnull @Override public IBlockState getActualState(@Nonnull IBlockState state,IBlockAccess world,BlockPos pos){
  TileEntity tile=WorldHelper.getTileEntitySafely(world,pos);
  if (tile instanceof TileEntityBoiler) {
    TileEntityBoiler boiler=(TileEntityBoiler)tile;
    return getDefaultState().withProperty(FACING,state.getValue(FACING)).withProperty(IS_ON,boiler.isBurning());
  }
  return state;
}
Program: 22195
Project: 22195
Buggy source:
@Override public TileEntity createTileEntity(World world,IBlockState state){
  return new TileEntityBoiler();
}

Fixed version (ground truth):
@Override public TileEntity createTileEntity(@Nonnull World world,@Nonnull IBlockState state){
  return new TileEntityBoiler();
}
Program: 22196
Project: 22196
Buggy source:
@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) {
    WorldHelper.rotateProperly(FACING,world,state,pos,facing);
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onWrench(@Nonnull 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;
  }
  if (facing != EnumFacing.DOWN && facing != EnumFacing.UP) {
    WorldHelper.rotateProperly(FACING,world,state,pos,facing);
  }
  return false;
}
Program: 22197
Project: 22197
Buggy source:
@Override public BlockStateContainer createBlockState(){
  return new BlockStateContainer(this,FACING,IS_ON);
}

Fixed version (ground truth):
@Nonnull @Override public BlockStateContainer createBlockState(){
  return new BlockStateContainer(this,FACING,IS_ON);
}
Program: 22198
Project: 22198
Buggy source:
@Override public IBlockState getStateFromMeta(int meta){
  return getDefaultState().withProperty(FACING,EnumFacing.getHorizontal(meta));
}

Fixed version (ground truth):
@Nonnull @Override public IBlockState getStateFromMeta(int meta){
  return getDefaultState().withProperty(FACING,EnumFacing.getHorizontal(meta));
}
Program: 22199
Project: 22199
Buggy source:
@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);
}

Fixed version (ground truth):
@Override public void breakBlock(World world,BlockPos pos,IBlockState state){
  TileEntity tileentity=world.getTileEntity(pos);
  if (tileentity instanceof TileEntityBoiler) {
    InventoryHelper.dropInventoryItems(world,pos,(IInventory)tileentity);
    world.updateComparatorOutputLevel(pos,state.getBlock());
  }
  super.breakBlock(world,pos,state);
}
Program: 22200
Project: 22200
Buggy source:
@Override public ItemStack getPickBlock(IBlockState state,RayTraceResult target,World world,BlockPos pos,EntityPlayer player){
  return new ItemStack(BoilerModule.BOILER);
}

Fixed version (ground truth):
@Nonnull @Override public ItemStack getPickBlock(@Nonnull IBlockState state,RayTraceResult target,@Nonnull World world,@Nonnull BlockPos pos,EntityPlayer player){
  return new ItemStack(BoilerModule.BOILER);
}
Program: 22201
Project: 22201
Buggy source:
@Override public void detectAndSendChanges(){
  super.detectAndSendChanges();
  for (  IContainerListener listener : listeners) {
    if (lastCookTime != tileEntity.furnaceCookTime) {
      listener.sendWindowProperty(this,0,tileEntity.furnaceCookTime);
    }
    if (lastBurnTime != tileEntity.furnaceBurnTime) {
      listener.sendWindowProperty(this,1,tileEntity.furnaceBurnTime);
    }
    if (lastItemBurnTime != tileEntity.currentItemBurnTime) {
      listener.sendWindowProperty(this,2,tileEntity.currentItemBurnTime);
    }
    if (lastPressure != tileEntity.getPressureAsInt()) {
      listener.sendWindowProperty(this,3,tileEntity.getPressureAsInt());
    }
    if (this.lastWater != tileEntity.getTank().getFluidAmount()) {
      listener.sendWindowProperty(this,4,tileEntity.getTank().getFluidAmount());
    }
  }
  lastCookTime=tileEntity.furnaceCookTime;
  lastBurnTime=tileEntity.furnaceBurnTime;
  lastItemBurnTime=tileEntity.currentItemBurnTime;
  lastPressure=tileEntity.getPressureAsInt();
  lastWater=tileEntity.getTank().getFluidAmount();
}

Fixed version (ground truth):
@Override public void detectAndSendChanges(){
  super.detectAndSendChanges();
  for (  IContainerListener listener : listeners) {
    if (lastCookTime != tileEntity.cookTime) {
      listener.sendWindowProperty(this,0,tileEntity.cookTime);
    }
    if (lastBurnTime != tileEntity.burnTime) {
      listener.sendWindowProperty(this,1,tileEntity.burnTime);
    }
    if (lastItemBurnTime != tileEntity.currentItemBurnTime) {
      listener.sendWindowProperty(this,2,tileEntity.currentItemBurnTime);
    }
    if (lastPressure != tileEntity.getPressureAsInt()) {
      listener.sendWindowProperty(this,3,tileEntity.getPressureAsInt());
    }
    if (this.lastWater != tileEntity.getTank().getFluidAmount()) {
      listener.sendWindowProperty(this,4,tileEntity.getTank().getFluidAmount());
    }
  }
  lastCookTime=tileEntity.cookTime;
  lastBurnTime=tileEntity.burnTime;
  lastItemBurnTime=tileEntity.currentItemBurnTime;
  lastPressure=tileEntity.getPressureAsInt();
  lastWater=tileEntity.getTank().getFluidAmount();
}
Program: 22202
Project: 22202
Buggy source:
@Override public ItemStack transferStackInSlot(EntityPlayer player,int index){
  ItemStack itemstack=null;
  Slot slot=inventorySlots.get(index);
  if (slot != null && slot.getHasStack()) {
    ItemStack itemstack1=slot.getStack();
    itemstack=itemstack1.copy();
    if (index == 2) {
      return null;
    }
 else     if (index != 1 && index != 0) {
      if (FluidHelper.itemStackIsWaterContainer(itemstack1)) {
        if (!mergeItemStack(itemstack1,0,1,false)) {
          return null;
        }
      }
 else       if (TileEntityFurnace.isItemFuel(itemstack1)) {
        if (!mergeItemStack(itemstack1,1,2,false)) {
          return null;
        }
      }
 else       if (index >= 2 && index < 30) {
        if (!mergeItemStack(itemstack1,30,38,false)) {
          return null;
        }
      }
 else       if (index >= 30 && index < 39 && !mergeItemStack(itemstack1,3,30,false)) {
        return null;
      }
    }
 else     if (!mergeItemStack(itemstack1,3,38,false)) {
      return null;
    }
    if (itemstack1.isEmpty()) {
      slot.putStack(null);
    }
 else {
      slot.onSlotChanged();
    }
    if (itemstack1.getCount() == itemstack.getCount()) {
      return null;
    }
    slot.onTake(player,itemstack1);
  }
  return itemstack;
}

Fixed version (ground truth):
@Nonnull @Override public ItemStack transferStackInSlot(EntityPlayer player,int index){
  ItemStack itemstack=ItemStack.EMPTY;
  Slot slot=inventorySlots.get(index);
  if (slot != null && slot.getHasStack()) {
    ItemStack itemstack1=slot.getStack();
    itemstack=itemstack1.copy();
    if (index == 2) {
      return ItemStack.EMPTY;
    }
 else     if (index != 1 && index != 0) {
      if (FluidHelper.itemStackIsWaterContainer(itemstack1)) {
        if (!mergeItemStack(itemstack1,0,1,false)) {
          return ItemStack.EMPTY;
        }
      }
 else       if (TileEntityFurnace.isItemFuel(itemstack1)) {
        if (!mergeItemStack(itemstack1,1,2,false)) {
          return ItemStack.EMPTY;
        }
      }
 else       if (index >= 2 && index < 30) {
        if (!mergeItemStack(itemstack1,30,38,false)) {
          return ItemStack.EMPTY;
        }
      }
 else       if (index >= 30 && index < 39 && !mergeItemStack(itemstack1,3,30,false)) {
        return ItemStack.EMPTY;
      }
    }
 else     if (!mergeItemStack(itemstack1,3,38,false)) {
      return ItemStack.EMPTY;
    }
    if (itemstack1.isEmpty()) {
      slot.putStack(ItemStack.EMPTY);
    }
 else {
      slot.onSlotChanged();
    }
    if (itemstack1.getCount() == itemstack.getCount()) {
      return ItemStack.EMPTY;
    }
    slot.onTake(player,itemstack1);
  }
  return itemstack;
}
Program: 22203
Project: 22203
Buggy source:
@Override public boolean canInteractWith(EntityPlayer par1EntityPlayer){
  return tileEntity.isUsableByPlayer(par1EntityPlayer);
}

Fixed version (ground truth):
@Override public boolean canInteractWith(@Nonnull EntityPlayer par1EntityPlayer){
  return tileEntity.isUsableByPlayer(par1EntityPlayer);
}
Program: 22204
Project: 22204
Buggy source:
@Override public void addListener(IContainerListener listener){
  super.addListener(listener);
  listener.sendWindowProperty(this,0,tileEntity.furnaceCookTime);
  listener.sendWindowProperty(this,1,tileEntity.furnaceBurnTime);
  listener.sendWindowProperty(this,2,TileEntityBoiler.getItemBurnTime(null));
  listener.sendWindowProperty(this,3,(int)Math.floor((double)tileEntity.getPressure() * 1000));
}

Fixed version (ground truth):
@Override public void addListener(IContainerListener listener){
  super.addListener(listener);
  listener.sendWindowProperty(this,0,tileEntity.cookTime);
  listener.sendWindowProperty(this,1,tileEntity.burnTime);
  listener.sendWindowProperty(this,2,TileEntityBoiler.getItemBurnTime(ItemStack.EMPTY));
  listener.sendWindowProperty(this,3,(int)Math.floor((double)tileEntity.getPressure() * 1000));
}
Program: 22205
Project: 22205
Buggy source:
@SideOnly(Side.CLIENT) @Override public void updateProgressBar(int id,int data){
  if (id == 0) {
    tileEntity.furnaceCookTime=data;
  }
  if (id == 1) {
    tileEntity.furnaceBurnTime=data;
  }
  if (id == 2) {
    tileEntity.currentItemBurnTime=data;
  }
  if (id == 3) {
    tileEntity.setPressure((float)data / 1000F);
  }
  if (id == 4) {
    int current=tileEntity.getTank().getFluidAmount();
    int diff=data - current;
    if (diff > 0) {
      tileEntity.getTank().fill(new FluidStack(FluidHelper.getWaterFluid(),diff),true);
    }
 else {
      tileEntity.getTank().drain(-1 * diff,true);
    }
  }
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public void updateProgressBar(int id,int data){
  if (id == 0) {
    tileEntity.cookTime=data;
  }
  if (id == 1) {
    tileEntity.burnTime=data;
  }
  if (id == 2) {
    tileEntity.currentItemBurnTime=data;
  }
  if (id == 3) {
    tileEntity.setPressure((float)data / 1000F);
  }
  if (id == 4) {
    int current=tileEntity.getTank().getFluidAmount();
    int diff=data - current;
    if (diff > 0) {
      tileEntity.getTank().fill(new FluidStack(FluidHelper.getWaterFluid(),diff),true);
    }
 else {
      tileEntity.getTank().drain(-1 * diff,true);
    }
  }
}
Program: 22206
Project: 22206
Buggy source:
@Override protected void drawGuiContainerBackgroundLayer(float partialTicks,int mouseX,int mouseY){
  GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
  mc.getTextureManager().bindTexture(BOILER_TEXTURES);
  int k=(width - xSize) / 2;
  int l=(height - ySize) / 2;
  GL11.glEnable(3042);
  drawTexturedModalRect(k,l,0,0,xSize,ySize);
  int i1;
  i1=tileEntity.getBurnTimeRemainingScaled(14);
  drawTexturedModalRect(k + 58,l + 15 + 14 - i1,176,14 - i1,14,i1);
  GL11.glDisable(3042);
  FluidTank tank=tileEntity.getTank();
  if (tank == null) {
    return;
  }
  FluidStack fluidStack=tank.getFluid();
  if (fluidStack == null) {
    return;
  }
  float fill=fluidStack.amount / (float)tank.getCapacity();
  drawFluid(new FluidStack(FluidHelper.getWaterFluid(),1),(int)(fill * 58.0F),k + 81,l + 14,16,58,false);
  mc.getTextureManager().bindTexture(BOILER_TEXTURES);
  drawTexturedModalRect(k + 80,l + 13,190,0,18,60);
  fill=tileEntity.getPressure();
  fill=Math.min(fill,1.0F);
  FluidStack stack=new FluidStack(FluidHelper.getWaterFluid(),1);
  if (FluidRegistry.isFluidRegistered("String_Node_Str")) {
    stack=new FluidStack(FluidRegistry.getFluid("String_Node_Str"),1);
  }
  drawFluid(stack,(int)(fill * 58.0F),k + 104,l + 14,16,58,true);
  mc.getTextureManager().bindTexture(BOILER_TEXTURES);
  drawTexturedModalRect(k + 103,l + 13,190,0,18,60);
  GL11.glDisable(3042);
}

Fixed version (ground truth):
@Override protected void drawGuiContainerBackgroundLayer(float partialTicks,int mouseX,int mouseY){
  GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
  mc.getTextureManager().bindTexture(BOILER_TEXTURES);
  int k=(width - xSize) / 2;
  int l=(height - ySize) / 2;
  GL11.glEnable(3042);
  drawTexturedModalRect(k,l,0,0,xSize,ySize);
  int i1;
  i1=tileEntity.getBurnTimeRemainingScaled(14);
  drawTexturedModalRect(k + 58,l + 15 + 14 - i1,176,14 - i1,14,i1);
  GL11.glDisable(3042);
  FluidTank tank=tileEntity.getTank();
  if (tank == null) {
    return;
  }
  FluidStack fluidStack=tank.getFluid();
  if (fluidStack == null) {
    return;
  }
  float fill=fluidStack.amount / (float)tank.getCapacity();
  drawFluid(new FluidStack(FluidHelper.getWaterFluid(),1),(int)(fill * 58.0F),k + 81,l + 14,16,58,false);
  mc.getTextureManager().bindTexture(BOILER_TEXTURES);
  drawTexturedModalRect(k + 80,l + 13,190,0,18,60);
  fill=Math.min(tileEntity.getPressure(),1F);
  FluidStack stack=new FluidStack(FluidHelper.getWaterFluid(),1);
  if (FluidRegistry.isFluidRegistered("String_Node_Str")) {
    stack=new FluidStack(FluidRegistry.getFluid("String_Node_Str"),1);
  }
  drawFluid(stack,(int)(fill * 58.0F),k + 104,l + 14,16,58,true);
  mc.getTextureManager().bindTexture(BOILER_TEXTURES);
  drawTexturedModalRect(k + 103,l + 13,190,0,18,60);
  GL11.glDisable(3042);
}
Program: 22207
Project: 22207
Buggy source:
private void drawFluid(FluidStack fluid,int level,int x,int y,int width,int height,boolean steam){
  if (fluid == null || fluid.getFluid() == null) {
    return;
  }
  TextureAtlasSprite icon=FluidHelper.getStillTexture(mc,fluid.getFluid());
  if (steam) {
    icon=mc.getTextureMapBlocks().getTextureExtry(STEAM_RL.toString());
  }
  mc.renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
  int fullX=width / 16;
  int fullY=height / 16;
  int lastX=width - fullX * 16;
  int lastY=height - fullY * 16;
  int fullLvl=(height - level) / 16;
  int lastLvl=(height - level) - fullLvl * 16;
  for (int i=0; i < fullX; i++) {
    for (int j=0; j < fullY; j++) {
      if (j >= fullLvl) {
        drawCutIcon(icon,x + i * 16,y + j * 16,16,16,j == fullLvl ? lastLvl : 0);
      }
    }
  }
  for (int i=0; i < fullX; i++) {
    drawCutIcon(icon,x + i * 16,y + fullY * 16,16,lastY,fullLvl == fullY ? lastLvl : 0);
  }
  for (int i=0; i < fullY; i++) {
    if (i >= fullLvl) {
      drawCutIcon(icon,x + fullX * 16,y + i * 16,lastX,16,i == fullLvl ? lastLvl : 0);
    }
  }
  drawCutIcon(icon,x + fullX * 16,y + fullY * 16,lastX,lastY,fullLvl == fullY ? lastLvl : 0);
}

Fixed version (ground truth):
private void drawFluid(FluidStack fluid,int level,int x,int y,int width,int height,boolean steam){
  if (fluid == null || fluid.getFluid() == null) {
    return;
  }
  TextureAtlasSprite icon=FluidHelper.getStillTexture(mc,fluid.getFluid());
  if (steam) {
    icon=mc.getTextureMapBlocks().getTextureExtry(STEAM_RL.toString());
  }
  mc.renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
  int fullX=width / 16;
  int fullY=height / 16;
  int fullLvl=(height - level) / 16;
  int lastLvl=(height - level) - fullLvl * 16;
  for (int i=0; i < fullX; i++) {
    for (int j=0; j < fullY; j++) {
      if (j >= fullLvl) {
        drawCutIcon(icon,x + i * 16,y + j * 16,16,16,j == fullLvl ? lastLvl : 0);
      }
    }
  }
  int lastY=height - fullY * 16;
  for (int i=0; i < fullX; i++) {
    drawCutIcon(icon,x + i * 16,y + fullY * 16,16,lastY,fullLvl == fullY ? lastLvl : 0);
  }
  int lastX=width - fullX * 16;
  for (int i=0; i < fullY; i++) {
    if (i >= fullLvl) {
      drawCutIcon(icon,x + fullX * 16,y + i * 16,lastX,16,i == fullLvl ? lastLvl : 0);
    }
  }
  drawCutIcon(icon,x + fullX * 16,y + fullY * 16,lastX,lastY,fullLvl == fullY ? lastLvl : 0);
}
Program: 22208
Project: 22208
Buggy source:
/** 
 * Adds an exosuit plate recipe (2x2 of ingredient), without a melting recipe for the itemstack.
 * @param str The name of the recipe for the book.
 * @param ingredient The ingredient, either an ItemStack or an OreDict string
 * @param plate The output plate.
 */
private static void addExosuitPlateRecipes(String str,Object ingredient,ItemStack plate){
  BookRecipeRegistry.addRecipe(str,new ShapedOreRecipe(plate,"String_Node_Str","String_Node_Str",'x',ingredient));
  if (ingredient instanceof ItemStack) {
    ItemStack stack=((ItemStack)ingredient).copy();
    stack.stackSize=4;
    GameRegistry.addRecipe(new ShapelessOreRecipe(stack,plate));
  }
 else   if (ingredient instanceof String) {
    for (    ItemStack ore : OreDictionary.getOres((String)ingredient)) {
      ItemStack stack=ore.copy();
      stack.stackSize=4;
      GameRegistry.addRecipe(new ShapelessOreRecipe(stack,plate));
    }
  }
}

Fixed version (ground truth):
/** 
 * Adds an exosuit plate recipe (2x2 of ingredient), without a melting recipe for the itemstack.
 * @param str The name of the recipe for the book.
 * @param ingredient The ingredient, either an ItemStack or an OreDict string
 * @param plate The output plate.
 */
private static void addExosuitPlateRecipes(String str,Object ingredient,ItemStack plate){
  BookRecipeRegistry.addRecipe(str,new ShapedOreRecipe(plate,"String_Node_Str","String_Node_Str",'x',ingredient));
  if (ingredient instanceof ItemStack) {
    ItemStack stack=((ItemStack)ingredient).copy();
    stack.setCount(4);
    GameRegistry.addRecipe(new ShapelessOreRecipe(stack,plate));
  }
 else   if (ingredient instanceof String) {
    for (    ItemStack ore : OreDictionary.getOres((String)ingredient)) {
      ItemStack stack=ore.copy();
      stack.setCount(4);
      GameRegistry.addRecipe(new ShapelessOreRecipe(stack,plate));
    }
  }
}
Program: 22209
Project: 22209
Buggy source:
@SubscribeEvent @SideOnly(Side.CLIENT) public void onPlayerTick(TickEvent.ClientTickEvent event){
  Minecraft mc=Minecraft.getMinecraft();
  if (event.side == Side.CLIENT && mc.thePlayer != null) {
    if (event.phase == TickEvent.Phase.START) {
      return;
    }
    for (    EntityEquipmentSlot slot : ItemStackUtility.ARMOR_SLOTS) {
      ItemStack armorStack=mc.thePlayer.getItemStackFromSlot(slot);
      if (armorStack != null && armorType.isAssignableFrom(armorStack.getItem().getClass())) {
        getModel(mc.thePlayer,slot).updateModel(mc.thePlayer,armorStack,slot);
      }
    }
  }
}

Fixed version (ground truth):
@SubscribeEvent @SideOnly(Side.CLIENT) public void onPlayerTick(TickEvent.ClientTickEvent event){
  Minecraft mc=Minecraft.getMinecraft();
  if (event.side == Side.CLIENT && mc.player != null) {
    if (event.phase == TickEvent.Phase.START) {
      return;
    }
    for (    EntityEquipmentSlot slot : ItemStackUtility.ARMOR_SLOTS) {
      ItemStack armorStack=mc.player.getItemStackFromSlot(slot);
      if (armorStack != null && armorType.isAssignableFrom(armorStack.getItem().getClass())) {
        getModel(mc.player,slot).updateModel(mc.player,armorStack,slot);
      }
    }
  }
}
Program: 22210
Project: 22210
Buggy source:
@Override public ItemStack decrStackSize(ItemStack me,int slot,int size){
  NBTTagCompound plateNBT=getPlateNBT(me);
  if (plateNBT != null) {
    ItemStack toBeRemoved=ItemStack.loadItemStackFromNBT(plateNBT.getCompoundTag("String_Node_Str"));
    me.getTagCompound().removeTag("String_Node_Str");
    return toBeRemoved;
  }
  return null;
}

Fixed version (ground truth):
@Override public ItemStack decrStackSize(ItemStack me,int slot,int size){
  NBTTagCompound plateNBT=getPlateNBT(me);
  if (plateNBT != null) {
    ItemStack toBeRemoved=new ItemStack(plateNBT.getCompoundTag("String_Node_Str"));
    me.getTagCompound().removeTag("String_Node_Str");
    return toBeRemoved;
  }
  return null;
}
Program: 22211
Project: 22211
Buggy source:
@Override public ItemStack getStackInSlot(ItemStack me,int slot){
  NBTTagCompound plateNBT=getPlateNBT(me);
  if (plateNBT != null) {
    return ItemStack.loadItemStackFromNBT(plateNBT.getCompoundTag("String_Node_Str"));
  }
  return null;
}

Fixed version (ground truth):
@Override public ItemStack getStackInSlot(ItemStack me,int slot){
  NBTTagCompound plateNBT=getPlateNBT(me);
  if (plateNBT != null) {
    return new ItemStack(plateNBT.getCompoundTag("String_Node_Str"));
  }
  return null;
}
Program: 22212
Project: 22212
Buggy source:
@Override public void damageArmor(EntityLivingBase entity,ItemStack stack,DamageSource source,int damage,int slot){
  NBTTagCompound plateNBT=getPlateNBT(stack);
  if (plateNBT != null) {
    ExosuitPlate plate=UtilPlates.getPlate(plateNBT.getString("String_Node_Str"));
    int damageReduction=plate.getDamageReductionAmount(armorType,source);
    if ((entity.worldObj.rand.nextInt(20 - damage) + 1) > damageReduction) {
      if (plateNBT.hasKey("String_Node_Str")) {
        plateNBT.setInteger("String_Node_Str",plateNBT.getInteger("String_Node_Str") - 1);
      }
 else {
        plateNBT.setInteger("String_Node_Str",plate.getDamageReductionAmount(armorType,DamageSource.generic));
      }
    }
  }
}

Fixed version (ground truth):
@Override public void damageArmor(EntityLivingBase entity,ItemStack stack,DamageSource source,int damage,int slot){
  NBTTagCompound plateNBT=getPlateNBT(stack);
  if (plateNBT != null) {
    ExosuitPlate plate=UtilPlates.getPlate(plateNBT.getString("String_Node_Str"));
    int damageReduction=plate.getDamageReductionAmount(armorType,source);
    if ((entity.world.rand.nextInt(20 - damage) + 1) > damageReduction) {
      if (plateNBT.hasKey("String_Node_Str")) {
        plateNBT.setInteger("String_Node_Str",plateNBT.getInteger("String_Node_Str") - 1);
      }
 else {
        plateNBT.setInteger("String_Node_Str",plate.getDamageReductionAmount(armorType,DamageSource.GENERIC));
      }
    }
  }
}
Program: 22213
Project: 22213
Buggy source:
@Override public void addInformation(ItemStack stack,EntityPlayer playerIn,List<String> tooltip,boolean advanced){
  NBTTagCompound plateNBT=getPlateNBT(stack);
  if (plateNBT != null) {
    ItemStack plateStack=ItemStack.loadItemStackFromNBT(plateNBT.getCompoundTag("String_Node_Str"));
    if (plateStack != null) {
      tooltip.add(TextFormatting.BLUE + plateStack.getDisplayName());
    }
  }
  super.addInformation(stack,playerIn,tooltip,advanced);
}

Fixed version (ground truth):
@Override public void addInformation(ItemStack stack,EntityPlayer playerIn,List<String> tooltip,boolean advanced){
  NBTTagCompound plateNBT=getPlateNBT(stack);
  if (plateNBT != null) {
    ItemStack plateStack=new ItemStack(plateNBT.getCompoundTag("String_Node_Str"));
    if (plateStack != null) {
      tooltip.add(TextFormatting.BLUE + plateStack.getDisplayName());
    }
  }
  super.addInformation(stack,playerIn,tooltip,advanced);
}
Program: 22214
Project: 22214
Buggy source:
@Override public int getArmorDisplay(EntityPlayer player,ItemStack armor,int slot){
  NBTTagCompound plateNBT=getPlateNBT(armor);
  if (plateNBT != null) {
    return UtilPlates.getPlate(plateNBT.getString("String_Node_Str")).getDamageReductionAmount(armorType,DamageSource.generic);
  }
  return ArmorMaterial.LEATHER.getDamageReductionAmount(armorType);
}

Fixed version (ground truth):
@Override public int getArmorDisplay(EntityPlayer player,ItemStack armor,int slot){
  NBTTagCompound plateNBT=getPlateNBT(armor);
  if (plateNBT != null) {
    return UtilPlates.getPlate(plateNBT.getString("String_Node_Str")).getDamageReductionAmount(armorType,DamageSource.GENERIC);
  }
  return ArmorMaterial.LEATHER.getDamageReductionAmount(armorType);
}
Program: 22215
Project: 22215
Buggy source:
@Override public boolean hasUpgrade(ItemStack me,Item check){
  NBTTagCompound plateNBT=getPlateNBT(me);
  return plateNBT != null && ItemStack.loadItemStackFromNBT(plateNBT.getCompoundTag("String_Node_Str")).getItem() == check;
}

Fixed version (ground truth):
@Override public boolean hasUpgrade(ItemStack me,Item check){
  NBTTagCompound plateNBT=getPlateNBT(me);
  return plateNBT != null && new ItemStack(plateNBT.getCompoundTag("String_Node_Str")).getItem() == check;
}
Program: 22216
Project: 22216
Buggy source:
@Override public void onPlayerPickupXP(PlayerPickupXpEvent event,ItemStack armorStack,EntityEquipmentSlot slot){
  event.getOrb().xpValue=MathHelper.ceiling_float_int(event.getOrb().xpValue * 1.125F);
}

Fixed version (ground truth):
@Override public void onPlayerPickupXP(PlayerPickupXpEvent event,ItemStack armorStack,EntityEquipmentSlot slot){
  event.getOrb().xpValue=MathHelper.ceil(event.getOrb().xpValue * 1.125F);
}
Program: 22217
Project: 22217
Buggy source:
@Override public void onPlayerPickupXP(PlayerPickupXpEvent event,ItemStack armorStack,EntityEquipmentSlot slot){
  event.getOrb().xpValue=MathHelper.ceiling_float_int(event.getOrb().xpValue * 1.25F);
}

Fixed version (ground truth):
@Override public void onPlayerPickupXP(PlayerPickupXpEvent event,ItemStack armorStack,EntityEquipmentSlot slot){
  event.getOrb().xpValue=MathHelper.ceil(event.getOrb().xpValue * 1.25F);
}