nus-yam/ex-repair huggingface dataset:
Program: 22860
Project: 22860
Buggy source:
public void StorePendingBlockUpdateRecord(net.minecraft.world.NextTickListEntry PendingBlockUpdate,long WorldTime){
  net.minecraft.nbt.NBTTagCompound PendingBlockUpdateRecord=new net.minecraft.nbt.NBTTagCompound();
  PendingBlockUpdateRecord.setInteger("String_Node_Str",PendingBlockUpdate.xCoord);
  PendingBlockUpdateRecord.setInteger("String_Node_Str",PendingBlockUpdate.yCoord);
  PendingBlockUpdateRecord.setInteger("String_Node_Str",PendingBlockUpdate.zCoord);
  PendingBlockUpdateRecord.setInteger("String_Node_Str",PendingBlockUpdate.blockID);
  PendingBlockUpdateRecord.setInteger("String_Node_Str",(int)(PendingBlockUpdate.scheduledTime - WorldTime));
  PendingBlockUpdateRecord.setInteger("String_Node_Str",PendingBlockUpdate.priority);
  PendingBlockUpdates.appendTag(PendingBlockUpdateRecord);
}

Fixed version (ground truth):
public void StorePendingBlockUpdateRecord(net.minecraft.world.NextTickListEntry PendingBlockUpdate,long WorldTime){
  net.minecraft.nbt.NBTTagCompound PendingBlockUpdateRecord=new net.minecraft.nbt.NBTTagCompound();
  PendingBlockUpdateRecord.setInteger("String_Node_Str",PendingBlockUpdate.xCoord);
  PendingBlockUpdateRecord.setInteger("String_Node_Str",PendingBlockUpdate.yCoord);
  PendingBlockUpdateRecord.setInteger("String_Node_Str",PendingBlockUpdate.zCoord);
  PendingBlockUpdateRecord.setInteger("String_Node_Str",Block.getIdFromBlock(PendingBlockUpdate.func_151351_a()));
  PendingBlockUpdateRecord.setInteger("String_Node_Str",(int)(PendingBlockUpdate.scheduledTime - WorldTime));
  PendingBlockUpdateRecord.setInteger("String_Node_Str",PendingBlockUpdate.priority);
  PendingBlockUpdates.appendTag(PendingBlockUpdateRecord);
}
Program: 22861
Project: 22861
Buggy source:
public void AssertNotObstruction(BlockRecord Record) throws CarriageMotionException {
  if (Body.contains(Record)) {
    return;
  }
  if (World.isAirBlock(Record.X,Record.Y,Record.Z)) {
    return;
  }
  if (((Material)Reflection.stealField("String_Node_Str",World.getBlock(Record.X,Record.Y,Record.Z))).isLiquid()) {
    if (ObstructedByLiquids) {
      FailBecauseObstructed(Record,"String_Node_Str");
    }
    return;
  }
  if (!((net.minecraft.block.BlockFlowing)net.minecraft.block.Block.waterMoving).blockBlocksFlow(World,Record.X,Record.Y,Record.Z)) {
    if (ObstructedByFragileBlocks) {
      FailBecauseObstructed(Record,"String_Node_Str");
    }
    return;
  }
  FailBecauseObstructed(Record,"String_Node_Str");
}

Fixed version (ground truth):
public void AssertNotObstruction(BlockRecord Record) throws CarriageMotionException {
  if (Body.contains(Record)) {
    return;
  }
  if (World.isAirBlock(Record.X,Record.Y,Record.Z)) {
    return;
  }
  if (((Material)Reflection.stealField("String_Node_Str",World.getBlock(Record.X,Record.Y,Record.Z))).isLiquid()) {
    if (ObstructedByLiquids) {
      FailBecauseObstructed(Record,"String_Node_Str");
    }
    return;
  }
  if (!World.getBlock(Record.X,Record.Y,Record.Z).canBeReplacedByLeaves(World,Record.X,Record.Y,Record.Z)) {
    if (ObstructedByFragileBlocks) {
      FailBecauseObstructed(Record,"String_Node_Str");
    }
    return;
  }
  FailBecauseObstructed(Record,"String_Node_Str");
}
Program: 22862
Project: 22862
Buggy source:
@Override public IIcon GetIcon(net.minecraft.item.ItemStack Item,Directions Side){
  if (Side != Directions.PosY) {
    int DecorationId=CarriageItem.GetDecorationId(Item);
    if (DecorationId != 0) {
      int DecorationMeta=CarriageItem.GetDecorationMeta(Item);
      try {
        return (Block.Get(DecorationId).getIcon(Side.ordinal(),DecorationMeta));
      }
 catch (      Throwable Throwable) {
        Throwable.printStackTrace();
      }
    }
  }
  return (Blocks.Carriage.getIcon(0,BlockItem.GetBlockType(Item)));
}

Fixed version (ground truth):
@Override public IIcon GetIcon(net.minecraft.item.ItemStack Item,Directions Side){
  if (Side != Directions.PosY) {
    if (DecorationId != null) {
      int DecorationMeta=CarriageItem.GetDecorationMeta(Item);
      try {
        return (Block.Get(DecorationId).getIcon(Side.ordinal(),DecorationMeta));
      }
 catch (      Throwable Throwable) {
        Throwable.printStackTrace();
      }
    }
  }
  return (Blocks.Carriage.getIcon(0,BlockItem.GetBlockType(Item)));
}
Program: 22863
Project: 22863
Buggy source:
public static net.minecraft.util.Icon RegisterIcon(net.minecraft.client.renderer.texture.IconRegister IconRegister,String Handle){
  return (IconRegister.registerIcon(Mod.Handle + "String_Node_Str" + TexturePrefix+ Handle));
}

Fixed version (ground truth):
public static IIcon RegisterIcon(IIconRegister IconRegister,String Handle){
  return (IconRegister.registerIcon(Mod.Handle + "String_Node_Str" + TexturePrefix+ Handle));
}
Program: 22864
Project: 22864
Buggy source:
public static void SetBlock(net.minecraft.world.World World,int X,int Y,int Z,int Id,int Meta){
  net.minecraft.world.chunk.Chunk Chunk=World.getChunkFromBlockCoords(X,Z);
  int ChunkX=X & 0xF;
  int ChunkY=Y & 0xF;
  int ChunkZ=Z & 0xF;
  Chunk.removeChunkBlockTileEntity(ChunkX,Y,ChunkZ);
  int LayerY=Y >> 4;
  if (Chunk.storageArrays[LayerY] == null) {
    Chunk.storageArrays[LayerY]=new net.minecraft.world.chunk.storage.ExtendedBlockStorage((LayerY) << 4,!World.provider.hasNoSky);
  }
  Chunk.storageArrays[LayerY].setExtBlockID(ChunkX,ChunkY,ChunkZ,Id);
  Chunk.storageArrays[LayerY].setExtBlockMetadata(ChunkX,ChunkY,ChunkZ,Meta);
  Chunk.isModified=true;
  World.markBlockForUpdate(X,Y,Z);
}

Fixed version (ground truth):
public static void SetBlock(net.minecraft.world.World World,int X,int Y,int Z,Block spectre,int Meta){
  net.minecraft.world.chunk.Chunk Chunk=World.getChunkFromBlockCoords(X,Z);
  int ChunkX=X & 0xF;
  int ChunkY=Y & 0xF;
  int ChunkZ=Z & 0xF;
  Chunk.removeTileEntity(ChunkX,Y,ChunkZ);
  int LayerY=Y >> 4;
  ExtendedBlockStorage[] storageArrays=(ExtendedBlockStorage[])Reflection.stealField("String_Node_Str",Chunk);
  if (storageArrays[LayerY] == null) {
    storageArrays[LayerY]=new net.minecraft.world.chunk.storage.ExtendedBlockStorage((LayerY) << 4,!World.provider.hasNoSky);
  }
  storageArrays[LayerY].func_150818_a(ChunkX,ChunkY,ChunkZ,spectre);
  storageArrays[LayerY].setExtBlockMetadata(ChunkX,ChunkY,ChunkZ,Meta);
  Chunk.isModified=true;
  World.markBlockForUpdate(X,Y,Z);
}
Program: 22865
Project: 22865
Buggy source:
public Block(int Id,net.minecraft.block.Block Template,Class<? extends BlockItem> BlockItemClass,String HarvestToolType,Class<? extends TileEntity>... TileEntityClasses){
  this(Id,Template,BlockItemClass,TileEntityClasses);
  net.minecraftforge.common.MinecraftForge.setBlockHarvestLevel(this,HarvestToolType,0);
  setCreativeTab(CreativeTab.Instance);
}

Fixed version (ground truth):
public Block(net.minecraft.block.Block Template,Class<? extends BlockItem> BlockItemClass,String HarvestToolType,Class<? extends TileEntity>... TileEntityClasses){
  this(Template,BlockItemClass,TileEntityClasses);
  setCreativeTab(CreativeTab.Instance);
}
Program: 22866
Project: 22866
Buggy source:
@Override public void onBlockPlacedBy(net.minecraft.world.World World,int X,int Y,int Z,net.minecraft.entity.EntityLivingBase Entity,net.minecraft.item.ItemStack Item){
  super.onBlockPlacedBy(World,X,Y,Z,Entity,Item);
  try {
    ((TileEntity)World.getBlockTileEntity(X,Y,Z)).Setup((net.minecraft.entity.player.EntityPlayer)Entity,Item);
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void onBlockPlacedBy(net.minecraft.world.World World,int X,int Y,int Z,net.minecraft.entity.EntityLivingBase Entity,net.minecraft.item.ItemStack Item){
  super.onBlockPlacedBy(World,X,Y,Z,Entity,Item);
  try {
    ((TileEntity)World.getTileEntity(X,Y,Z)).Setup((net.minecraft.entity.player.EntityPlayer)Entity,Item);
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
  }
}
Program: 22867
Project: 22867
Buggy source:
@Override public void getSubBlocks(int Id,net.minecraft.creativetab.CreativeTabs CreativeTab,java.util.List Showcase){
  AddShowcaseStacks(Showcase);
}

Fixed version (ground truth):
@Override public void getSubBlocks(net.minecraft.creativetab.CreativeTabs CreativeTab,java.util.List Showcase){
  AddShowcaseStacks(Showcase);
}
Program: 22868
Project: 22868
Buggy source:
public BlockItem(int Id){
  super(Id);
  setHasSubtypes(true);
}

Fixed version (ground truth):
public BlockItem(Block Id){
  super(Id);
  setHasSubtypes(true);
}
Program: 22869
Project: 22869
Buggy source:
public static BlockRecord Identified(TileEntity Anchor,int X,int Y,int Z){
  BlockRecord Record=new BlockRecord(X,Y,Z);
  Record.Identify(Anchor.worldObj);
  return (Record);
}

Fixed version (ground truth):
public static BlockRecord Identified(TileEntity Anchor,int X,int Y,int Z){
  BlockRecord Record=new BlockRecord(X,Y,Z);
  Record.Identify(Anchor.getWorldObj());
  return (Record);
}
Program: 22870
Project: 22870
Buggy source:
public void Identify(net.minecraft.world.World World){
  this.World=World;
  Id=World.getBlockId(X,Y,Z);
  Meta=World.getBlockMetadata(X,Y,Z);
  Entity=World.getBlockTileEntity(X,Y,Z);
}

Fixed version (ground truth):
public void Identify(net.minecraft.world.World World){
  this.World=World;
  block=World.getBlock(X,Y,Z);
  Meta=World.getBlockMetadata(X,Y,Z);
  Entity=World.getTileEntity(X,Y,Z);
}
Program: 22871
Project: 22871
Buggy source:
@Override public boolean renderWorldBlock(net.minecraft.world.IBlockAccess World,int X,int Y,int Z,net.minecraft.block.Block Block,int RenderId,net.minecraft.client.renderer.RenderBlocks RenderBlocks){
  this.X=X;
  this.Y=Y;
  this.Z=Z;
  Brightness=Block.getMixedBrightnessForBlock(World,X,Y,Z);
  RenderBlocks.setRenderBounds(0,0,0,1,1,1);
  RenderBlocks.renderStandardBlock(Block,X,Y,Z);
  Render(World.getBlockTileEntity(X,Y,Z));
  return (true);
}

Fixed version (ground truth):
@Override public boolean renderWorldBlock(net.minecraft.world.IBlockAccess World,int X,int Y,int Z,net.minecraft.block.Block Block,int RenderId,net.minecraft.client.renderer.RenderBlocks RenderBlocks){
  this.X=X;
  this.Y=Y;
  this.Z=Z;
  Brightness=Block.getMixedBrightnessForBlock(World,X,Y,Z);
  RenderBlocks.setRenderBounds(0,0,0,1,1,1);
  RenderBlocks.renderStandardBlock(Block,X,Y,Z);
  Render(World.getTileEntity(X,Y,Z));
  return (true);
}
Program: 22872
Project: 22872
Buggy source:
public int Initialize(int BlockId){
  RenderId=cpw.mods.fml.client.registry.RenderingRegistry.getNextAvailableRenderId();
  cpw.mods.fml.client.registry.RenderingRegistry.registerBlockHandler(this);
  net.minecraftforge.client.MinecraftForgeClient.registerItemRenderer(BlockId,this);
  return (RenderId);
}

Fixed version (ground truth):
public int Initialize(Block block){
  RenderId=cpw.mods.fml.client.registry.RenderingRegistry.getNextAvailableRenderId();
  cpw.mods.fml.client.registry.RenderingRegistry.registerBlockHandler(this);
  net.minecraftforge.client.MinecraftForgeClient.registerItemRenderer(new ItemBlock(block),this);
  return (RenderId);
}
Program: 22873
Project: 22873
Buggy source:
@Override public boolean shouldRender3DInInventory(){
  return (true);
}

Fixed version (ground truth):
@Override public boolean shouldRender3DInInventory(int id){
  return (true);
}
Program: 22874
Project: 22874
Buggy source:
public void SetTextureSpan(net.minecraft.util.Icon Texture){
  TextureMinU=Texture.getInterpolatedU(0);
  TextureMinV=Texture.getInterpolatedV(0);
  TextureMaxU=Texture.getInterpolatedU(16);
  TextureMaxV=Texture.getInterpolatedV(16);
}

Fixed version (ground truth):
public void SetTextureSpan(IIcon Texture){
  TextureMinU=Texture.getInterpolatedU(0);
  TextureMinV=Texture.getInterpolatedV(0);
  TextureMaxU=Texture.getInterpolatedU(16);
  TextureMaxV=Texture.getInterpolatedV(16);
}
Program: 22875
Project: 22875
Buggy source:
public abstract net.minecraft.util.Icon GetIcon(net.minecraft.item.ItemStack Item,Directions Side);

Fixed version (ground truth):
public abstract IIcon GetIcon(net.minecraft.item.ItemStack Item,Directions Side);
Program: 22876
Project: 22876
Buggy source:
@Override public boolean onBlockActivated(net.minecraft.world.World World,int X,int Y,int Z,net.minecraft.entity.player.EntityPlayer Player,int Side,float HitX,float HitY,float HitZ){
  if (World.isRemote) {
    return (false);
  }
  if (!ToolItemSet.IsScrewdriverOrEquivalent(Player.inventory.getCurrentItem())) {
    return (false);
  }
  try {
    ((CarriageEntity)World.getBlockTileEntity(X,Y,Z)).ToggleSide(Side,Player.isSneaking());
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
    return (false);
  }
  return (true);
}

Fixed version (ground truth):
@Override public boolean onBlockActivated(net.minecraft.world.World World,int X,int Y,int Z,net.minecraft.entity.player.EntityPlayer Player,int Side,float HitX,float HitY,float HitZ){
  if (World.isRemote) {
    return (false);
  }
  if (!ToolItemSet.IsScrewdriverOrEquivalent(Player.inventory.getCurrentItem())) {
    return (false);
  }
  try {
    ((CarriageEntity)World.getTileEntity(X,Y,Z)).ToggleSide(Side,Player.isSneaking());
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
    return (false);
  }
  return (true);
}
Program: 22877
Project: 22877
Buggy source:
@Override public net.minecraft.util.Icon getBlockTexture(net.minecraft.world.IBlockAccess World,int X,int Y,int Z,int Side){
  try {
    CarriageEntity Carriage=(CarriageEntity)World.getBlockTileEntity(X,Y,Z);
    if ((Carriage.DecorationId != 0) && (Carriage.SideClosed[Side])) {
      return (net.minecraft.block.Block.blocksList[Carriage.DecorationId].getIcon(Side,Carriage.DecorationMeta));
    }
    Types Type=Types.values()[World.getBlockMetadata(X,Y,Z)];
    return (Carriage.SideClosed[Side] ? Type.ClosedIcon : Type.OpenIcon);
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
    return (Blocks.Spectre.getIcon(0,0));
  }
}

Fixed version (ground truth):
@Override public IIcon getBlockTexture(net.minecraft.world.IBlockAccess World,int X,int Y,int Z,int Side){
  try {
    CarriageEntity Carriage=(CarriageEntity)World.getTileEntity(X,Y,Z);
    if ((Carriage.DecorationId != 0) && (Carriage.SideClosed[Side])) {
      return (net.minecraft.block.Block.blocksList[Carriage.DecorationId].getIcon(Side,Carriage.DecorationMeta));
    }
    Types Type=Types.values()[World.getBlockMetadata(X,Y,Z)];
    return (Carriage.SideClosed[Side] ? Type.ClosedIcon : Type.OpenIcon);
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
    return (Blocks.Spectre.getIcon(0,0));
  }
}
Program: 22878
Project: 22878
Buggy source:
@Override public net.minecraft.util.Icon getIcon(int Side,int Meta){
  try {
    return (Types.values()[Meta].OpenIcon);
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
    return (Blocks.Spectre.getIcon(0,0));
  }
}

Fixed version (ground truth):
@Override public IIcon getIcon(int Side,int Meta){
  try {
    return (Types.values()[Meta].OpenIcon);
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
    return (Blocks.Spectre.getIcon(0,0));
  }
}
Program: 22879
Project: 22879
Buggy source:
@Override public void onNeighborBlockChange(net.minecraft.world.World World,int X,int Y,int Z,int Id){
  try {
    ((CarriageDriveEntity)World.getBlockTileEntity(X,Y,Z)).HandleNeighbourBlockChange();
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void onNeighborBlockChange(net.minecraft.world.World World,int X,int Y,int Z,int Id){
  try {
    ((CarriageDriveEntity)World.getTileEntity(X,Y,Z)).HandleNeighbourBlockChange();
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
  }
}
Program: 22880
Project: 22880
Buggy source:
@Override public boolean onBlockActivated(net.minecraft.world.World World,int X,int Y,int Z,net.minecraft.entity.player.EntityPlayer Player,int Side,float HitX,float HitY,float HitZ){
  if (World.isRemote) {
    return (false);
  }
  if (!ToolItemSet.IsScrewdriverOrEquivalent(Player.inventory.getCurrentItem())) {
    return (false);
  }
  try {
    CarriageDriveEntity cde=(CarriageDriveEntity)World.getBlockTileEntity(X,Y,Z);
    cde.lastUsingPlayer=Player;
    System.out.println("String_Node_Str");
    cde.HandleToolUsage(Side,Player.isSneaking());
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
    return (false);
  }
  return (true);
}

Fixed version (ground truth):
@Override public boolean onBlockActivated(net.minecraft.world.World World,int X,int Y,int Z,net.minecraft.entity.player.EntityPlayer Player,int Side,float HitX,float HitY,float HitZ){
  if (World.isRemote) {
    return (false);
  }
  if (!ToolItemSet.IsScrewdriverOrEquivalent(Player.inventory.getCurrentItem())) {
    return (false);
  }
  try {
    CarriageDriveEntity cde=(CarriageDriveEntity)World.getTileEntity(X,Y,Z);
    cde.lastUsingPlayer=Player;
    System.out.println("String_Node_Str");
    cde.HandleToolUsage(Side,Player.isSneaking());
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
    return (false);
  }
  return (true);
}
Program: 22881
Project: 22881
Buggy source:
@Override public net.minecraft.util.Icon getBlockTexture(net.minecraft.world.IBlockAccess World,int X,int Y,int Z,int Side){
  try {
    CarriageDriveEntity Drive=(CarriageDriveEntity)World.getBlockTileEntity(X,Y,Z);
    if (Drive.SideClosed[Side]) {
      return (InactiveIcon);
    }
    Types Type=Types.values()[World.getBlockMetadata(X,Y,Z)];
    if (Drive.Continuous) {
      return (Drive.Active ? Type.ContinuousActiveIcon : Type.ContinuousIcon);
    }
    return (Drive.Active ? Type.NormalActiveIcon : Type.NormalIcon);
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
    return (Blocks.Spectre.getIcon(0,0));
  }
}

Fixed version (ground truth):
@Override public IIcon getBlockTexture(net.minecraft.world.IBlockAccess World,int X,int Y,int Z,int Side){
  try {
    CarriageDriveEntity Drive=(CarriageDriveEntity)World.getTileEntity(X,Y,Z);
    if (Drive.SideClosed[Side]) {
      return (InactiveIcon);
    }
    Types Type=Types.values()[World.getBlockMetadata(X,Y,Z)];
    if (Drive.Continuous) {
      return (Drive.Active ? Type.ContinuousActiveIcon : Type.ContinuousIcon);
    }
    return (Drive.Active ? Type.NormalActiveIcon : Type.NormalIcon);
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
    return (Blocks.Spectre.getIcon(0,0));
  }
}
Program: 22882
Project: 22882
Buggy source:
@Override public net.minecraft.util.Icon getIcon(int Side,int Meta){
  try {
    return (Types.values()[Meta].NormalIcon);
  }
 catch (  Throwable Throwable) {
    return (Blocks.Spectre.getIcon(0,0));
  }
}

Fixed version (ground truth):
@Override public IIcon getIcon(int Side,int Meta){
  try {
    return (Types.values()[Meta].NormalIcon);
  }
 catch (  Throwable Throwable) {
    return (Blocks.Spectre.getIcon(0,0));
  }
}
Program: 22883
Project: 22883
Buggy source:
@Override public net.minecraft.util.Icon GetIcon(net.minecraft.item.ItemStack Item,Directions Side){
  return (Blocks.CarriageDrive.getIcon(0,BlockItem.GetBlockType(Item)));
}

Fixed version (ground truth):
@Override public IIcon GetIcon(net.minecraft.item.ItemStack Item,Directions Side){
  return (Blocks.CarriageDrive.getIcon(0,BlockItem.GetBlockType(Item)));
}
Program: 22884
Project: 22884
Buggy source:
@Override public net.minecraft.item.ItemStack Process(net.minecraft.inventory.InventoryCrafting Inventory){
  net.minecraft.item.ItemStack Carriage=null;
  net.minecraft.item.ItemStack Decoration=null;
  int InventorySize=Inventory.getSizeInventory();
  for (int Index=0; Index < InventorySize; Index++) {
    net.minecraft.item.ItemStack Item=Inventory.getStackInSlot(Index);
    if (Item == null) {
      continue;
    }
    if (Item.itemID == Blocks.Carriage.blockID) {
      if (Carriage != null) {
        return (null);
      }
      Carriage=Item;
      continue;
    }
    if (Decoration != null) {
      return (null);
    }
    Decoration=Item;
  }
  if (Carriage == null) {
    return (null);
  }
  int Tier=CarriageItem.GetTier(Carriage);
  int DecorationId=CarriageItem.GetDecorationId(Carriage);
  if (DecorationId == 0) {
    if (Decoration == null) {
      return (null);
    }
    if (!(Decoration.getItem() instanceof net.minecraft.item.ItemBlock)) {
      return (null);
    }
    DecorationId=Decoration.itemID;
    int DecorationMeta=Decoration.getItem().getMetadata(Decoration.getItemDamage());
    return (CarriageItem.Stack(Carriage.getItemDamage(),Tier,DecorationId,DecorationMeta));
  }
  if (Decoration != null) {
    return (null);
  }
  return (CarriageItem.Stack(BlockItem.GetBlockType(Carriage),Tier));
}

Fixed version (ground truth):
@Override public net.minecraft.item.ItemStack Process(net.minecraft.inventory.InventoryCrafting Inventory){
  net.minecraft.item.ItemStack Carriage=null;
  net.minecraft.item.ItemStack Decoration=null;
  int InventorySize=Inventory.getSizeInventory();
  for (int Index=0; Index < InventorySize; Index++) {
    net.minecraft.item.ItemStack Item=Inventory.getStackInSlot(Index);
    if (Item == null) {
      continue;
    }
    if (Item.getItem() instanceof ItemBlock && ((ItemBlock)Item.getItem()).field_150939_a == Blocks.Carriage) {
      if (Carriage != null) {
        return (null);
      }
      Carriage=Item;
      continue;
    }
    if (Decoration != null) {
      return (null);
    }
    Decoration=Item;
  }
  if (Carriage == null) {
    return (null);
  }
  int Tier=CarriageItem.GetTier(Carriage);
  net.minecraft.block.Block DecorationId=CarriageItem.GetDecorationId(Carriage);
  if (DecorationId == null) {
    if (Decoration == null) {
      return (null);
    }
    if (!(Decoration.getItem() instanceof net.minecraft.item.ItemBlock)) {
      return (null);
    }
    DecorationId=((ItemBlock)Decoration.getItem()).field_150939_a;
    int DecorationMeta=Decoration.getItem().getMetadata(Decoration.getItemDamage());
    return (CarriageItem.Stack(Carriage.getItemDamage(),Tier,DecorationId,DecorationMeta));
  }
  if (Decoration != null) {
    return (null);
  }
  return (CarriageItem.Stack(BlockItem.GetBlockType(Carriage),Tier));
}
Program: 22885
Project: 22885
Buggy source:
public CarriageDriveItem(int Id){
  super(Id);
}

Fixed version (ground truth):
public CarriageDriveItem(Block b){
  super(b);
}
Program: 22886
Project: 22886
Buggy source:
@Override public void Render(net.minecraft.tileentity.TileEntity TileEntity){
  if (TileEntity instanceof CarriageTranslocatorEntity) {
    CarriageTranslocatorEntity Translocator=(CarriageTranslocatorEntity)TileEntity;
    if (Translocator.Player == null) {
      return;
    }
    UseFullLabel();
    if (Translocator.Player.equals("String_Node_Str")) {
      UseFullIcon(CarriageDrive.PublicIcon);
    }
 else {
      if (Translocator.Player.equals(net.minecraft.client.Minecraft.getMinecraft().thePlayer.username)) {
        UseFullIcon(CarriageDrive.PrivateToSelfIcon);
      }
 else {
        UseFullIcon(CarriageDrive.PrivateToOtherIcon);
      }
    }
    RenderOverlay(0.001,Translocator.SideClosed,false);
    for (    Vanilla.DyeTypes DyeType : Vanilla.DyeTypes.values()) {
      if (CarriageDriveItem.LabelHasDye(Translocator.Label,DyeType)) {
        double GridH=((double)(DyeType.ordinal() % 4)) / 4;
        double GridV=((double)(DyeType.ordinal() / 4)) / 4;
        UsePartialLabel(GridH,GridV,GridH + 0.25,GridV + 0.25);
        UsePartialIcon(CarriageDrive.DyeIconSet,GridH,GridV,GridH + 0.25,GridV + 0.25);
        RenderOverlay(0.002,Translocator.SideClosed,false);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void Render(net.minecraft.tileentity.TileEntity TileEntity){
  if (TileEntity instanceof CarriageTranslocatorEntity) {
    CarriageTranslocatorEntity Translocator=(CarriageTranslocatorEntity)TileEntity;
    if (Translocator.Player == null) {
      return;
    }
    UseFullLabel();
    if (Translocator.Player.equals("String_Node_Str")) {
      UseFullIcon(CarriageDrive.PublicIcon);
    }
 else {
      if (Translocator.Player.equals(net.minecraft.client.Minecraft.getMinecraft().thePlayer.getDisplayName())) {
        UseFullIcon(CarriageDrive.PrivateToSelfIcon);
      }
 else {
        UseFullIcon(CarriageDrive.PrivateToOtherIcon);
      }
    }
    RenderOverlay(0.001,Translocator.SideClosed,false);
    for (    Vanilla.DyeTypes DyeType : Vanilla.DyeTypes.values()) {
      if (CarriageDriveItem.LabelHasDye(Translocator.Label,DyeType)) {
        double GridH=((double)(DyeType.ordinal() % 4)) / 4;
        double GridV=((double)(DyeType.ordinal() / 4)) / 4;
        UsePartialLabel(GridH,GridV,GridH + 0.25,GridV + 0.25);
        UsePartialIcon(CarriageDrive.DyeIconSet,GridH,GridV,GridH + 0.25,GridV + 0.25);
        RenderOverlay(0.002,Translocator.SideClosed,false);
      }
    }
  }
}
Program: 22887
Project: 22887
Buggy source:
public void UseFullIcon(net.minecraft.util.Icon Icon){
  SetTextureSpan(Icon);
}

Fixed version (ground truth):
public void UseFullIcon(net.minecraft.util.IIcon Icon){
  SetTextureSpan(Icon);
}
Program: 22888
Project: 22888
Buggy source:
public CarriageDriveRenderer(){
  Blocks.CarriageDrive.RenderId=Initialize(Blocks.CarriageDrive.blockID);
}

Fixed version (ground truth):
public CarriageDriveRenderer(){
  Blocks.CarriageDrive.RenderId=Initialize(Blocks.CarriageDrive);
}
Program: 22889
Project: 22889
Buggy source:
public void UsePartialIcon(net.minecraft.util.Icon Icon,double MinU,double MinV,double MaxU,double MaxV){
  UseFullIcon(Icon);
  SubsectTextureSpan(MinU,MinV,MaxU,MaxV);
}

Fixed version (ground truth):
public void UsePartialIcon(net.minecraft.util.IIcon Icon,double MinU,double MinV,double MaxU,double MaxV){
  UseFullIcon(Icon);
  SubsectTextureSpan(MinU,MinV,MaxU,MaxV);
}
Program: 22890
Project: 22890
Buggy source:
@Override public CarriagePackage PreparePackage(Directions MotionDirection) throws CarriageMotionException {
  CarriagePackage Package=super.PreparePackage(null);
  CarriageTranslocatorEntity Target=null;
  java.util.LinkedList<BlockPosition> ActiveTranslocators;
  try {
    ActiveTranslocators=ActiveTranslocatorSets.get(Player).get(Label);
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
    throw (new CarriageMotionException("String_Node_Str"));
  }
  for (int Index=0; Index < ActiveTranslocators.size(); Index++) {
    BlockPosition Position=ActiveTranslocators.get(Index);
    try {
      CarriageTranslocatorEntity Translocator=(CarriageTranslocatorEntity)WorldUtil.GetWorld(Position.Dimension).getBlockTileEntity(Position.X,Position.Y,Position.Z);
      if (Translocator == this) {
        continue;
      }
      boolean TargetValid=true;
      for (      BlockRecord Record : Package.NewPositions) {
        if (!Translocator.worldObj.isAirBlock(Record.X + Translocator.xCoord,Record.Y + Translocator.yCoord,Record.Z + Translocator.zCoord)) {
          TargetValid=false;
          break;
        }
      }
      if (TargetValid) {
        Target=Translocator;
        break;
      }
    }
 catch (    Throwable Throwable) {
      Throwable.printStackTrace();
    }
  }
  if (Target == null) {
    throw (new CarriageMotionException("String_Node_Str"));
  }
  Package.Translocator=Target;
  return (Package);
}

Fixed version (ground truth):
@Override public CarriagePackage PreparePackage(Directions MotionDirection) throws CarriageMotionException {
  CarriagePackage Package=super.PreparePackage(null);
  CarriageTranslocatorEntity Target=null;
  java.util.LinkedList<BlockPosition> ActiveTranslocators;
  try {
    ActiveTranslocators=ActiveTranslocatorSets.get(Player).get(Label);
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
    throw (new CarriageMotionException("String_Node_Str"));
  }
  for (int Index=0; Index < ActiveTranslocators.size(); Index++) {
    BlockPosition Position=ActiveTranslocators.get(Index);
    try {
      CarriageTranslocatorEntity Translocator=(CarriageTranslocatorEntity)WorldUtil.GetWorld(Position.Dimension).getTileEntity(Position.X,Position.Y,Position.Z);
      if (Translocator == this) {
        continue;
      }
      boolean TargetValid=true;
      for (      BlockRecord Record : Package.NewPositions) {
        if (!Translocator.worldObj.isAirBlock(Record.X + Translocator.xCoord,Record.Y + Translocator.yCoord,Record.Z + Translocator.zCoord)) {
          TargetValid=false;
          break;
        }
      }
      if (TargetValid) {
        Target=Translocator;
        break;
      }
    }
 catch (    Throwable Throwable) {
      Throwable.printStackTrace();
    }
  }
  if (Target == null) {
    throw (new CarriageMotionException("String_Node_Str"));
  }
  Package.Translocator=Target;
  return (Package);
}
Program: 22891
Project: 22891
Buggy source:
@Override public void Setup(net.minecraft.entity.player.EntityPlayer Player,net.minecraft.item.ItemStack Item){
  super.Setup(Player,Item);
  this.Player=CarriageDriveItem.GetPrivateFlag(Item) ? Player.username : "String_Node_Str";
  Label=CarriageDriveItem.GetLabel(Item);
  if (!worldObj.isRemote) {
    RegisterLabel();
{
      ClearLabel();
      RegisterLabel();
    }
  }
}

Fixed version (ground truth):
@Override public void Setup(net.minecraft.entity.player.EntityPlayer Player,net.minecraft.item.ItemStack Item){
  super.Setup(Player,Item);
  this.Player=CarriageDriveItem.GetPrivateFlag(Item) ? Player.getDisplayName() : "String_Node_Str";
  Label=CarriageDriveItem.GetLabel(Item);
  if (!worldObj.isRemote) {
    RegisterLabel();
{
      ClearLabel();
      RegisterLabel();
    }
  }
}
Program: 22892
Project: 22892
Buggy source:
@Override public void getSubItems(int Id,net.minecraft.creativetab.CreativeTabs CreativeTab,java.util.List Showcase){
  AddShowcaseStacks(Showcase);
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public void getSubItems(net.minecraft.item.Item p_150895_1_,CreativeTabs p_150895_2_,List Showcase){
  AddShowcaseStacks(Showcase);
}
Program: 22893
Project: 22893
Buggy source:
public static void Handle(net.minecraft.nbt.NBTTagCompound Packet,net.minecraft.world.World World){
  int Id=Packet.getInteger("String_Node_Str");
  net.minecraft.nbt.NBTTagList Body=Packet.getTagList("String_Node_Str");
  for (int Index=0; Index < Body.tagCount(); Index++) {
    net.minecraft.nbt.NBTTagCompound Tag=(net.minecraft.nbt.NBTTagCompound)Body.tagAt(Index);
    World.setBlock(Tag.getInteger("String_Node_Str"),Tag.getInteger("String_Node_Str"),Tag.getInteger("String_Node_Str"),Id,0,0);
  }
}

Fixed version (ground truth):
public static void Handle(net.minecraft.nbt.NBTTagCompound Packet,net.minecraft.world.World World){
  int Id=Packet.getInteger("String_Node_Str");
  net.minecraft.nbt.NBTTagList Body=Packet.getTagList("String_Node_Str",9);
  for (int Index=0; Index < Body.tagCount(); Index++) {
    net.minecraft.nbt.NBTTagCompound Tag=(net.minecraft.nbt.NBTTagCompound)Body.tagAt(Index);
    World.setBlock(Tag.getInteger("String_Node_Str"),Tag.getInteger("String_Node_Str"),Tag.getInteger("String_Node_Str"),Block.getBlockById(Id),0,0);
  }
}
Program: 22894
Project: 22894
Buggy source:
public static void RegisterSmeltingRecipe(net.minecraft.item.ItemStack Output,net.minecraft.item.ItemStack Input,float Xp){
  net.minecraft.item.crafting.FurnaceRecipes.smelting().addSmelting(Input.itemID,Input.getItemDamage(),Output,Xp);
}

Fixed version (ground truth):
public static void RegisterSmeltingRecipe(net.minecraft.item.ItemStack Output,net.minecraft.item.ItemStack Input,float Xp){
  net.minecraft.item.crafting.FurnaceRecipes.smelting().func_151394_a(Input,Output,Xp);
}
Program: 22895
Project: 22895
Buggy source:
public Spectre(){
  super(Configuration.BlockIds.Spectre,bedrock,SpectreItem.class,MotiveSpectreEntity.class,null,TeleportativeSpectreEntity.class);
  RenderId=-1;
}

Fixed version (ground truth):
public Spectre(){
  super((net.minecraft.block.Block)Block.blockRegistry.getObject("String_Node_Str"),SpectreItem.class,MotiveSpectreEntity.class,null,TeleportativeSpectreEntity.class);
  RenderId=-1;
}
Program: 22896
Project: 22896
Buggy source:
public SpectreItem(int Id){
  super(Id);
}

Fixed version (ground truth):
public SpectreItem(Block b){
  super(b);
}
Program: 22897
Project: 22897
Buggy source:
public boolean IsStructureCarriage(BlockRecord Record){
  Record.Identify(worldObj);
  if (Record.Id == Blocks.Carriage.blockID) {
    if (Record.Meta == Carriage.Types.Structure.ordinal()) {
      return (true);
    }
  }
  return (false);
}

Fixed version (ground truth):
public boolean IsStructureCarriage(BlockRecord Record){
  Record.Identify(worldObj);
  if (Record.block == Blocks.Carriage) {
    if (Record.Meta == Carriage.Types.Structure.ordinal()) {
      return (true);
    }
  }
  return (false);
}
Program: 22898
Project: 22898
Buggy source:
@Override public void ScheduleShiftedBlockUpdate(net.minecraft.nbt.NBTTagCompound PendingBlockUpdateRecord){
  worldObj.scheduleBlockUpdateFromLoad(PendingBlockUpdateRecord.getInteger("String_Node_Str") + ShiftX,PendingBlockUpdateRecord.getInteger("String_Node_Str") + ShiftY,PendingBlockUpdateRecord.getInteger("String_Node_Str") + ShiftZ,PendingBlockUpdateRecord.getInteger("String_Node_Str"),PendingBlockUpdateRecord.getInteger("String_Node_Str"),PendingBlockUpdateRecord.getInteger("String_Node_Str"));
}

Fixed version (ground truth):
@Override public void ScheduleShiftedBlockUpdate(net.minecraft.nbt.NBTTagCompound PendingBlockUpdateRecord){
  worldObj.scheduleBlockUpdateWithPriority(PendingBlockUpdateRecord.getInteger("String_Node_Str") + ShiftX,PendingBlockUpdateRecord.getInteger("String_Node_Str") + ShiftY,PendingBlockUpdateRecord.getInteger("String_Node_Str") + ShiftZ,Block.getBlockById(PendingBlockUpdateRecord.getInteger("String_Node_Str")),PendingBlockUpdateRecord.getInteger("String_Node_Str"),PendingBlockUpdateRecord.getInteger("String_Node_Str"));
}
Program: 22899
Project: 22899
Buggy source:
public boolean IsUnpatternedTemplateCarriage(BlockRecord Record){
  boolean IsUnpatternedTemplateCarriage=false;
  Record.Identify(worldObj);
  if (Record.Id == Blocks.Carriage.blockID) {
    if (Record.Meta == Carriage.Types.Template.ordinal()) {
      if (((TemplateCarriageEntity)Record.Entity).Pattern == null) {
        IsUnpatternedTemplateCarriage=true;
      }
    }
  }
  Record.Entity=null;
  return (IsUnpatternedTemplateCarriage);
}

Fixed version (ground truth):
public boolean IsUnpatternedTemplateCarriage(BlockRecord Record){
  boolean IsUnpatternedTemplateCarriage=false;
  Record.Identify(worldObj);
  if (Record.block == Blocks.Carriage) {
    if (Record.Meta == Carriage.Types.Template.ordinal()) {
      if (((TemplateCarriageEntity)Record.Entity).Pattern == null) {
        IsUnpatternedTemplateCarriage=true;
      }
    }
  }
  Record.Entity=null;
  return (IsUnpatternedTemplateCarriage);
}
Program: 22900
Project: 22900
Buggy source:
@Override public void ReadCommonRecord(net.minecraft.nbt.NBTTagCompound TagCompound){
  super.ReadCommonRecord(TagCompound);
  if (TagCompound.hasKey("String_Node_Str")) {
    net.minecraft.nbt.NBTTagList PatternRecord=TagCompound.getTagList("String_Node_Str");
    Pattern=new BlockRecordList();
    int PatternSize=PatternRecord.tagCount();
    for (int Index=0; Index < PatternSize; Index++) {
      net.minecraft.nbt.NBTTagCompound PatternBlockRecord=(net.minecraft.nbt.NBTTagCompound)PatternRecord.tagAt(Index);
      Pattern.add(new BlockRecord(PatternBlockRecord.getInteger("String_Node_Str"),PatternBlockRecord.getInteger("String_Node_Str"),PatternBlockRecord.getInteger("String_Node_Str")));
    }
  }
 else {
    Pattern=null;
  }
  RenderPattern=TagCompound.getBoolean("String_Node_Str");
}

Fixed version (ground truth):
@Override public void ReadCommonRecord(net.minecraft.nbt.NBTTagCompound TagCompound){
  super.ReadCommonRecord(TagCompound);
  if (TagCompound.hasKey("String_Node_Str")) {
    net.minecraft.nbt.NBTTagList PatternRecord=TagCompound.getTagList("String_Node_Str",9);
    Pattern=new BlockRecordList();
    int PatternSize=PatternRecord.tagCount();
    for (int Index=0; Index < PatternSize; Index++) {
      net.minecraft.nbt.NBTTagCompound PatternBlockRecord=(net.minecraft.nbt.NBTTagCompound)PatternRecord.getCompoundTagAt(Index);
      Pattern.add(new BlockRecord(PatternBlockRecord.getInteger("String_Node_Str"),PatternBlockRecord.getInteger("String_Node_Str"),PatternBlockRecord.getInteger("String_Node_Str")));
    }
  }
 else {
    Pattern=null;
  }
  RenderPattern=TagCompound.getBoolean("String_Node_Str");
}
Program: 22901
Project: 22901
Buggy source:
public static boolean IsScrewdriverOrEquivalent(net.minecraft.item.ItemStack Item){
  if (Item == null) {
    return (false);
  }
  if (Item.itemID == Items.ToolItemSet.itemID) {
    if (Item.getItemDamage() == Types.Screwdriver.ordinal()) {
      return (true);
    }
  }
  if (ModInteraction.OmniTools.ItemWrench != null) {
    if (ModInteraction.OmniTools.ItemWrench.isInstance(Item.getItem())) {
      return (true);
    }
  }
  return (false);
}

Fixed version (ground truth):
public static boolean IsScrewdriverOrEquivalent(net.minecraft.item.ItemStack Item){
  if (Item == null) {
    return (false);
  }
  if (Item.getItem() == Items.ToolItemSet) {
    if (Item.getItemDamage() == Types.Screwdriver.ordinal()) {
      return (true);
    }
  }
  if (ModInteraction.OmniTools.ItemWrench != null) {
    if (ModInteraction.OmniTools.ItemWrench.isInstance(Item.getItem())) {
      return (true);
    }
  }
  return (false);
}
Program: 22902
Project: 22902
Buggy source:
@Override public net.minecraft.util.Icon getIconFromDamage(int Damage){
  try {
    return (Types.values()[Damage].Icon);
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
    return (Blocks.Spectre.getIcon(0,0));
  }
}

Fixed version (ground truth):
@Override public net.minecraft.util.IIcon getIconFromDamage(int Damage){
  try {
    return (Types.values()[Damage].Icon);
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
    return (Blocks.Spectre.getIcon(0,0));
  }
}
Program: 22903
Project: 22903
Buggy source:
@Override public void registerIcons(net.minecraft.client.renderer.texture.IconRegister IconRegister){
  for (  Types Type : Types.values()) {
    Type.Icon=Registry.RegisterIcon(IconRegister,Type.name());
  }
}

Fixed version (ground truth):
@Override public void registerIcons(net.minecraft.client.renderer.texture.IIconRegister IconRegister){
  for (  Types Type : Types.values()) {
    Type.Icon=Registry.RegisterIcon(IconRegister,Type.name());
  }
}
Program: 22904
Project: 22904
Buggy source:
public ToolItemSet(){
  super(Id);
  setMaxStackSize(1);
}

Fixed version (ground truth):
public ToolItemSet(){
  super();
  setMaxStackSize(1);
}
Program: 22905
Project: 22905
Buggy source:
public Block(int Id,net.minecraft.block.Block Template,Class<? extends BlockItem> BlockItemClass,String HarvestToolType,Class<? extends TileEntity>... TileEntityClasses){
  this(Id,Template,BlockItemClass,TileEntityClasses);
  net.minecraftforge.common.MinecraftForge.setBlockHarvestLevel(this,HarvestToolType,0);
  setCreativeTab(CreativeTab.Instance);
}

Fixed version (ground truth):
public Block(net.minecraft.block.Block Template,Class<? extends BlockItem> BlockItemClass,String HarvestToolType,Class<? extends TileEntity>... TileEntityClasses){
  this(Template,BlockItemClass,TileEntityClasses);
  setCreativeTab(CreativeTab.Instance);
}
Program: 22906
Project: 22906
Buggy source:
@Override public void onBlockPlacedBy(net.minecraft.world.World World,int X,int Y,int Z,net.minecraft.entity.EntityLivingBase Entity,net.minecraft.item.ItemStack Item){
  super.onBlockPlacedBy(World,X,Y,Z,Entity,Item);
  try {
    ((TileEntity)World.getBlockTileEntity(X,Y,Z)).Setup((net.minecraft.entity.player.EntityPlayer)Entity,Item);
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void onBlockPlacedBy(net.minecraft.world.World World,int X,int Y,int Z,net.minecraft.entity.EntityLivingBase Entity,net.minecraft.item.ItemStack Item){
  super.onBlockPlacedBy(World,X,Y,Z,Entity,Item);
  try {
    ((TileEntity)World.getTileEntity(X,Y,Z)).Setup((net.minecraft.entity.player.EntityPlayer)Entity,Item);
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
  }
}
Program: 22907
Project: 22907
Buggy source:
@Override public void getSubBlocks(int Id,net.minecraft.creativetab.CreativeTabs CreativeTab,java.util.List Showcase){
  AddShowcaseStacks(Showcase);
}

Fixed version (ground truth):
@Override public void getSubBlocks(net.minecraft.creativetab.CreativeTabs CreativeTab,java.util.List Showcase){
  AddShowcaseStacks(Showcase);
}
Program: 22908
Project: 22908
Buggy source:
public BlockItem(int Id){
  super(Id);
  setHasSubtypes(true);
}

Fixed version (ground truth):
public BlockItem(Block Id){
  super(Id);
  setHasSubtypes(true);
}
Program: 22909
Project: 22909
Buggy source:
public static BlockRecord Identified(TileEntity Anchor,int X,int Y,int Z){
  BlockRecord Record=new BlockRecord(X,Y,Z);
  Record.Identify(Anchor.worldObj);
  return (Record);
}

Fixed version (ground truth):
public static BlockRecord Identified(TileEntity Anchor,int X,int Y,int Z){
  BlockRecord Record=new BlockRecord(X,Y,Z);
  Record.Identify(Anchor.getWorldObj());
  return (Record);
}
Program: 22910
Project: 22910
Buggy source:
public void Identify(net.minecraft.world.World World){
  this.World=World;
  Id=World.getBlockId(X,Y,Z);
  Meta=World.getBlockMetadata(X,Y,Z);
  Entity=World.getBlockTileEntity(X,Y,Z);
}

Fixed version (ground truth):
public void Identify(net.minecraft.world.World World){
  this.World=World;
  block=World.getBlock(X,Y,Z);
  Meta=World.getBlockMetadata(X,Y,Z);
  Entity=World.getTileEntity(X,Y,Z);
}
Program: 22911
Project: 22911
Buggy source:
@Override public boolean renderWorldBlock(net.minecraft.world.IBlockAccess World,int X,int Y,int Z,net.minecraft.block.Block Block,int RenderId,net.minecraft.client.renderer.RenderBlocks RenderBlocks){
  this.X=X;
  this.Y=Y;
  this.Z=Z;
  Brightness=Block.getMixedBrightnessForBlock(World,X,Y,Z);
  RenderBlocks.setRenderBounds(0,0,0,1,1,1);
  RenderBlocks.renderStandardBlock(Block,X,Y,Z);
  Render(World.getBlockTileEntity(X,Y,Z));
  return (true);
}

Fixed version (ground truth):
@Override public boolean renderWorldBlock(net.minecraft.world.IBlockAccess World,int X,int Y,int Z,net.minecraft.block.Block Block,int RenderId,net.minecraft.client.renderer.RenderBlocks RenderBlocks){
  this.X=X;
  this.Y=Y;
  this.Z=Z;
  Brightness=Block.getMixedBrightnessForBlock(World,X,Y,Z);
  RenderBlocks.setRenderBounds(0,0,0,1,1,1);
  RenderBlocks.renderStandardBlock(Block,X,Y,Z);
  Render(World.getTileEntity(X,Y,Z));
  return (true);
}
Program: 22912
Project: 22912
Buggy source:
public int Initialize(int BlockId){
  RenderId=cpw.mods.fml.client.registry.RenderingRegistry.getNextAvailableRenderId();
  cpw.mods.fml.client.registry.RenderingRegistry.registerBlockHandler(this);
  net.minecraftforge.client.MinecraftForgeClient.registerItemRenderer(BlockId,this);
  return (RenderId);
}

Fixed version (ground truth):
public int Initialize(Block block){
  RenderId=cpw.mods.fml.client.registry.RenderingRegistry.getNextAvailableRenderId();
  cpw.mods.fml.client.registry.RenderingRegistry.registerBlockHandler(this);
  net.minecraftforge.client.MinecraftForgeClient.registerItemRenderer(new ItemBlock(block),this);
  return (RenderId);
}
Program: 22913
Project: 22913
Buggy source:
@Override public boolean shouldRender3DInInventory(){
  return (true);
}

Fixed version (ground truth):
@Override public boolean shouldRender3DInInventory(int id){
  return (true);
}
Program: 22914
Project: 22914
Buggy source:
public void SetTextureSpan(net.minecraft.util.Icon Texture){
  TextureMinU=Texture.getInterpolatedU(0);
  TextureMinV=Texture.getInterpolatedV(0);
  TextureMaxU=Texture.getInterpolatedU(16);
  TextureMaxV=Texture.getInterpolatedV(16);
}

Fixed version (ground truth):
public void SetTextureSpan(IIcon Texture){
  TextureMinU=Texture.getInterpolatedU(0);
  TextureMinV=Texture.getInterpolatedV(0);
  TextureMaxU=Texture.getInterpolatedU(16);
  TextureMaxV=Texture.getInterpolatedV(16);
}
Program: 22915
Project: 22915
Buggy source:
public abstract net.minecraft.util.Icon GetIcon(net.minecraft.item.ItemStack Item,Directions Side);

Fixed version (ground truth):
public abstract IIcon GetIcon(net.minecraft.item.ItemStack Item,Directions Side);
Program: 22916
Project: 22916
Buggy source:
@Override public boolean onBlockActivated(net.minecraft.world.World World,int X,int Y,int Z,net.minecraft.entity.player.EntityPlayer Player,int Side,float HitX,float HitY,float HitZ){
  if (World.isRemote) {
    return (false);
  }
  if (!ToolItemSet.IsScrewdriverOrEquivalent(Player.inventory.getCurrentItem())) {
    return (false);
  }
  try {
    ((CarriageEntity)World.getBlockTileEntity(X,Y,Z)).ToggleSide(Side,Player.isSneaking());
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
    return (false);
  }
  return (true);
}

Fixed version (ground truth):
@Override public boolean onBlockActivated(net.minecraft.world.World World,int X,int Y,int Z,net.minecraft.entity.player.EntityPlayer Player,int Side,float HitX,float HitY,float HitZ){
  if (World.isRemote) {
    return (false);
  }
  if (!ToolItemSet.IsScrewdriverOrEquivalent(Player.inventory.getCurrentItem())) {
    return (false);
  }
  try {
    ((CarriageEntity)World.getTileEntity(X,Y,Z)).ToggleSide(Side,Player.isSneaking());
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
    return (false);
  }
  return (true);
}
Program: 22917
Project: 22917
Buggy source:
@Override public net.minecraft.util.Icon getBlockTexture(net.minecraft.world.IBlockAccess World,int X,int Y,int Z,int Side){
  try {
    CarriageEntity Carriage=(CarriageEntity)World.getBlockTileEntity(X,Y,Z);
    if ((Carriage.DecorationId != 0) && (Carriage.SideClosed[Side])) {
      return (net.minecraft.block.Block.blocksList[Carriage.DecorationId].getIcon(Side,Carriage.DecorationMeta));
    }
    Types Type=Types.values()[World.getBlockMetadata(X,Y,Z)];
    return (Carriage.SideClosed[Side] ? Type.ClosedIcon : Type.OpenIcon);
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
    return (Blocks.Spectre.getIcon(0,0));
  }
}

Fixed version (ground truth):
@Override public IIcon getBlockTexture(net.minecraft.world.IBlockAccess World,int X,int Y,int Z,int Side){
  try {
    CarriageEntity Carriage=(CarriageEntity)World.getTileEntity(X,Y,Z);
    if ((Carriage.DecorationId != 0) && (Carriage.SideClosed[Side])) {
      return (net.minecraft.block.Block.blocksList[Carriage.DecorationId].getIcon(Side,Carriage.DecorationMeta));
    }
    Types Type=Types.values()[World.getBlockMetadata(X,Y,Z)];
    return (Carriage.SideClosed[Side] ? Type.ClosedIcon : Type.OpenIcon);
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
    return (Blocks.Spectre.getIcon(0,0));
  }
}
Program: 22918
Project: 22918
Buggy source:
@Override public net.minecraft.util.Icon getIcon(int Side,int Meta){
  try {
    return (Types.values()[Meta].OpenIcon);
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
    return (Blocks.Spectre.getIcon(0,0));
  }
}

Fixed version (ground truth):
@Override public IIcon getIcon(int Side,int Meta){
  try {
    return (Types.values()[Meta].OpenIcon);
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
    return (Blocks.Spectre.getIcon(0,0));
  }
}
Program: 22919
Project: 22919
Buggy source:
@Override public void onNeighborBlockChange(net.minecraft.world.World World,int X,int Y,int Z,int Id){
  try {
    ((CarriageDriveEntity)World.getBlockTileEntity(X,Y,Z)).HandleNeighbourBlockChange();
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void onNeighborBlockChange(net.minecraft.world.World World,int X,int Y,int Z,int Id){
  try {
    ((CarriageDriveEntity)World.getTileEntity(X,Y,Z)).HandleNeighbourBlockChange();
  }
 catch (  Throwable Throwable) {
    Throwable.printStackTrace();
  }
}