nus-yam/ex-repair huggingface dataset:
Program: 59540
Project: 59540
Buggy source:
@Override public void renderItem(ItemRenderType type,ItemStack item,Object... data){
  GL11.glPushMatrix();
  double offset=-0.5;
  if (type == ItemRenderType.EQUIPPED || type == ItemRenderType.EQUIPPED_FIRST_PERSON) {
    offset=0;
  }
  int metadata=item.getItemDamage();
  int color=0xFFFFFFFF;
  if (item.hasTagCompound()) {
    color=item.getTagCompound().getInteger("String_Node_Str");
    color=(color << 8) + 0xFF;
  }
  RenderUtils.preItemRender();
  RenderHelper.setBlockTextureSheet();
switch (BlockLight.Types.values()[metadata]) {
case ILLUMINATOR:
    renderItemIlluminator(color,item.hasTagCompound(),offset);
  break;
case LAMP_BASIC:
renderItemLampBasic(color,offset);
break;
}
RenderUtils.postItemRender();
GL11.glPopMatrix();
}

Fixed version (ground truth):
@Override public void renderItem(ItemRenderType type,ItemStack item,Object... data){
  GL11.glPushMatrix();
  double offset=-0.5;
  if (type == ItemRenderType.EQUIPPED || type == ItemRenderType.EQUIPPED_FIRST_PERSON) {
    offset=0;
  }
  int metadata=item.getItemDamage();
  int color=0xFFFFFFFF;
  if (item.hasTagCompound()) {
    color=item.getTagCompound().getInteger("String_Node_Str");
    color=(color << 8) + 0xFF;
  }
  RenderUtils.preItemRender();
  RenderHelper.setBlockTextureSheet();
switch (BlockLight.Types.values()[metadata]) {
case ILLUMINATOR:
    renderItemIlluminator(color,item.hasTagCompound(),offset);
  break;
case LAMP_BASIC:
case LAMP_BASIC_ALT:
renderItemLampBasic(color,offset);
break;
}
RenderUtils.postItemRender();
GL11.glPopMatrix();
}
Program: 59541
Project: 59541
Buggy source:
public boolean renderWorldLampBasic(int color,boolean active,double x,double y,double z){
  if (BlockCoFHBase.renderPass == 0) {
    modelFrame[1].setColour(color);
    renderFrame(1,x,y,z);
    modelFrame[1].setColour(0xFFFFFFFF);
    return true;
  }
 else   if (active) {
    modelHalo[1].setColour(color - 0x80);
    renderHalo(1,x,y,z);
    modelHalo[1].setColour(0xFFFFFFFF);
  }
  return active;
}

Fixed version (ground truth):
public boolean renderWorldLampBasic(int color,boolean active,double x,double y,double z){
  if (BlockCoFHBase.renderPass == 0) {
    modelFrame[1].setColour(color);
    renderFrame(1,x,y,z);
    modelFrame[1].setColour(0xFFFFFFFF);
    return true;
  }
  return BlockCoFHBase.renderPass == 0;
}
Program: 59543
Project: 59543
Buggy source:
public ItemStack insertItem(ForgeDirection from,ItemStack stack,boolean simulate){
  if (stack == null) {
    return null;
  }
  if (storedStack == null) {
    if (!simulate) {
      setStoredItemType(stack,stack.stackSize);
    }
    return null;
  }
  if (getStoredCount() == SIZE[type]) {
    return stack;
  }
  if (ItemHelper.itemsEqualWithMetadata(stack,storedStack,true)) {
    if (getStoredCount() + stack.stackSize > SIZE[type]) {
      ItemStack retStack=ItemHelper.cloneStack(stack,SIZE[type] - getStoredCount());
      if (!simulate) {
        setStoredItemCount(SIZE[type]);
      }
      return retStack;
    }
    if (!simulate) {
      setStoredItemCount(getStoredCount() + stack.stackSize);
    }
    return null;
  }
  return stack;
}

Fixed version (ground truth):
public ItemStack insertItem(ForgeDirection from,ItemStack stack,boolean simulate){
  if (stack == null) {
    return null;
  }
  if (storedStack == null) {
    if (!simulate) {
      setStoredItemType(stack,stack.stackSize);
    }
    return null;
  }
  if (getStoredCount() == SIZE[type]) {
    return stack;
  }
  if (ItemHelper.itemsIdentical(stack,storedStack)) {
    if (getStoredCount() + stack.stackSize > SIZE[type]) {
      ItemStack retStack=ItemHelper.cloneStack(stack,SIZE[type] - getStoredCount());
      if (!simulate) {
        setStoredItemCount(SIZE[type]);
      }
      return retStack;
    }
    if (!simulate) {
      setStoredItemCount(getStoredCount() + stack.stackSize);
    }
    return null;
  }
  return stack;
}
Program: 59544
Project: 59544
Buggy source:
@Override public boolean isSideSolid(IBlockAccess world,int x,int y,int z,ForgeDirection side){
  TileEntity te=world.getTileEntity(x,y,z);
  if (!(te instanceof TileDynamoBase)) {
    return false;
  }
  TileDynamoBase tile=(TileDynamoBase)te;
  return tile.facing == BlockHelper.SIDE_OPPOSITE[side.ordinal()];
}

Fixed version (ground truth):
@Override public boolean isSideSolid(IBlockAccess world,int x,int y,int z,ForgeDirection side){
  TileEntity tile=world.getTileEntity(x,y,z);
  if (!(tile instanceof TileDynamoBase)) {
    return false;
  }
  TileDynamoBase theTile=(TileDynamoBase)tile;
  return theTile.facing == BlockHelper.SIDE_OPPOSITE[side.ordinal()];
}
Program: 59545
Project: 59545
Buggy source:
@Override public void onUpdate(ItemStack stack,World world,Entity entity,int slot,boolean isCurrentItem){
  if (slot > 8 || !isActive(stack) || isCurrentItem) {
    return;
  }
  InventoryPlayer playerInv=((EntityPlayer)entity).inventory;
  IEnergyContainerItem containerItem;
  int toSend=Math.min(getEnergyStored(stack),SEND[ItemHelper.getItemDamage(stack)]);
  if (EnergyHelper.isEnergyContainerItem(playerInv.getCurrentItem())) {
    containerItem=(IEnergyContainerItem)playerInv.mainInventory[playerInv.currentItem].getItem();
    extractEnergy(stack,containerItem.receiveEnergy(playerInv.mainInventory[playerInv.currentItem],toSend,false),false);
  }
}

Fixed version (ground truth):
@Override public void onUpdate(ItemStack stack,World world,Entity entity,int slot,boolean isCurrentItem){
  if (slot > 8 || !isActive(stack) || isCurrentItem) {
    return;
  }
  InventoryPlayer playerInv=((EntityPlayer)entity).inventory;
  IEnergyContainerItem containerItem;
  int toSend=Math.min(getEnergyStored(stack),SEND[ItemHelper.getItemDamage(stack)]);
  ItemStack currentItem=playerInv.getCurrentItem();
  if (EnergyHelper.isEnergyContainerItem(currentItem)) {
    containerItem=(IEnergyContainerItem)currentItem.getItem();
    extractEnergy(stack,containerItem.receiveEnergy(currentItem,toSend,false),false);
  }
}
Program: 59546
Project: 59546
Buggy source:
public static int addToInventory(IInventory theTile,int from,ItemStack stack){
  if (!InventoryHelper.isInsertion(theTile)) {
    return stack.stackSize;
  }
  stack=InventoryHelper.addToInsertion(theTile,from,stack);
  return stack == null ? 0 : stack.stackSize;
}

Fixed version (ground truth):
public static int addToInventory(IInventory tile,int from,ItemStack stack){
  if (!InventoryHelper.isInsertion(tile)) {
    return stack.stackSize;
  }
  stack=InventoryHelper.addToInsertion(tile,from,stack);
  return stack == null ? 0 : stack.stackSize;
}
Program: 59547
Project: 59547
Buggy source:
private static int addToPipeTile_do(TileEntity theTile,int side,ItemStack stack){
  if (theTile instanceof IPipeTile) {
    int used=((IPipeTile)theTile).injectItem(stack,true,ForgeDirection.VALID_DIRECTIONS[side ^ 1]);
    return used;
  }
  return 0;
}

Fixed version (ground truth):
private static int addToPipeTile_do(TileEntity tile,int side,ItemStack stack){
  if (tile instanceof IPipeTile) {
    int used=((IPipeTile)tile).injectItem(stack,true,ForgeDirection.VALID_DIRECTIONS[side ^ 1]);
    return used;
  }
  return 0;
}
Program: 59548
Project: 59548
Buggy source:
public static boolean isAdjacentInventory(int x,int y,int z,World worldObj,int side){
  TileEntity theTile=BlockHelper.getAdjacentTileEntity(worldObj,x,y,z,side);
  return isInventory(theTile,side);
}

Fixed version (ground truth):
public static boolean isAdjacentInventory(int x,int y,int z,World worldObj,int side){
  TileEntity tile=BlockHelper.getAdjacentTileEntity(worldObj,x,y,z,side);
  return isInventory(tile,side);
}
Program: 59549
Project: 59549
Buggy source:
public static int canAddToInventory(int xCoord,int yCoord,int zCoord,World worldObj,int from,ItemStack stack){
  TileEntity theTile=worldObj.getTileEntity(xCoord,yCoord,zCoord);
  if (!InventoryHelper.isInventory(theTile)) {
    return stack.stackSize;
  }
  stack=InventoryHelper.simulateInsertItemStackIntoInventory((IInventory)theTile,stack,from ^ 1);
  return stack == null ? 0 : stack.stackSize;
}

Fixed version (ground truth):
public static int canAddToInventory(int xCoord,int yCoord,int zCoord,World worldObj,int from,ItemStack stack){
  TileEntity tile=worldObj.getTileEntity(xCoord,yCoord,zCoord);
  if (!InventoryHelper.isInventory(tile)) {
    return stack.stackSize;
  }
  stack=InventoryHelper.simulateInsertItemStackIntoInventory((IInventory)tile,stack,from ^ 1);
  return stack == null ? 0 : stack.stackSize;
}
Program: 59550
Project: 59550
Buggy source:
void loadWorldGeneration(){
}

Fixed version (ground truth):
void loadWorldGeneration(){
  worldGen=new File(CoFHProps.configDir,"String_Node_Str");
  if (!worldGen.exists()) {
    try {
      worldGen.createNewFile();
      CoreUtils.copyFileUsingStream(worldGenInternal,worldGen);
    }
 catch (    Throwable t) {
      t.printStackTrace();
    }
  }
}
Program: 59551
Project: 59551
Buggy source:
@Override public boolean onBlockActivated(World world,int x,int y,int z,EntityPlayer player,int hitSide,float hitX,float hitY,float hitZ){
  if (Utils.isHoldingMultimeter(player,x,y,z)) {
    return true;
  }
  if (player.isSneaking()) {
    if (Utils.isHoldingUsableWrench(player,x,y,z)) {
      if (ServerHelper.isServerWorld(world) && canDismantle(player,world,x,y,z)) {
        dismantleBlock(player,world,x,y,z,false);
      }
      Utils.usedWrench(player,x,y,z);
      return true;
    }
    return false;
  }
  TileTEBase tile=(TileTEBase)world.getTileEntity(x,y,z);
  if (tile == null) {
    return false;
  }
  if (Utils.isHoldingUsableWrench(player,x,y,z)) {
    if (ServerHelper.isServerWorld(world)) {
      tile.onWrench(player,hitSide);
    }
    Utils.usedWrench(player,x,y,z);
    return true;
  }
  return tile.openGui(player);
}

Fixed version (ground truth):
@Override public boolean onBlockActivated(World world,int x,int y,int z,EntityPlayer player,int hitSide,float hitX,float hitY,float hitZ){
  if (Utils.isHoldingDebugger(player)) {
    return true;
  }
  if (Utils.isHoldingMultimeter(player)) {
    return true;
  }
  if (player.isSneaking()) {
    if (Utils.isHoldingUsableWrench(player,x,y,z)) {
      if (ServerHelper.isServerWorld(world) && canDismantle(player,world,x,y,z)) {
        dismantleBlock(player,world,x,y,z,false);
      }
      Utils.usedWrench(player,x,y,z);
      return true;
    }
    return false;
  }
  TileTEBase tile=(TileTEBase)world.getTileEntity(x,y,z);
  if (tile == null) {
    return false;
  }
  if (Utils.isHoldingUsableWrench(player,x,y,z)) {
    if (ServerHelper.isServerWorld(world)) {
      tile.onWrench(player,hitSide);
    }
    Utils.usedWrench(player,x,y,z);
    return true;
  }
  return tile.openGui(player);
}
Program: 59552
Project: 59552
Buggy source:
@Override public ArrayList<ItemStack> dismantleBlock(EntityPlayer player,World world,int x,int y,int z,boolean returnDrops){
  NBTTagCompound tag=getItemStackTag(world,x,y,z);
  TileEntity tile=world.getTileEntity(x,y,z);
  if (tile instanceof TileWorkbench) {
    ((TileWorkbench)tile).inventory=new ItemStack[((TileWorkbench)tile).inventory.length];
  }
  return super.dismantleBlock(player,tag,world,x,y,z,returnDrops,false);
}

Fixed version (ground truth):
@Override public ArrayList<ItemStack> dismantleBlock(EntityPlayer player,World world,int x,int y,int z,boolean returnDrops){
  NBTTagCompound tag=getItemStackTag(world,x,y,z);
  TileEntity tile=world.getTileEntity(x,y,z);
  if (tile instanceof TileWorkbench) {
    ((TileWorkbench)tile).inventory=new ItemStack[((TileWorkbench)tile).inventory.length];
  }
 else   if (tile instanceof TileAugmentable) {
    if (tag == null) {
      tag=new NBTTagCompound();
    }
    TileAugmentable theTile=(TileAugmentable)tile;
    ReconfigurableHelper.setItemStackTagReconfig(tag,theTile);
    tag.setInteger("String_Node_Str",theTile.getEnergyStored(ForgeDirection.UNKNOWN));
    theTile.writeAugmentsToNBT(tag);
  }
  return super.dismantleBlock(player,tag,world,x,y,z,returnDrops,false);
}
Program: 59553
Project: 59553
Buggy source:
@Override public NBTTagCompound getItemStackTag(World world,int x,int y,int z){
  NBTTagCompound tag=super.getItemStackTag(world,x,y,z);
  TileDynamoBase tile=(TileDynamoBase)world.getTileEntity(x,y,z);
  if (tile != null) {
    if (tag == null) {
      tag=new NBTTagCompound();
    }
    tag.setInteger("String_Node_Str",tile.getEnergyStored(ForgeDirection.UNKNOWN));
  }
  return tag;
}

Fixed version (ground truth):
@Override public NBTTagCompound getItemStackTag(World world,int x,int y,int z){
  NBTTagCompound tag=super.getItemStackTag(world,x,y,z);
  TileDynamoBase tile=(TileDynamoBase)world.getTileEntity(x,y,z);
  if (tile != null) {
    if (tag == null) {
      tag=new NBTTagCompound();
    }
    tag.setInteger("String_Node_Str",tile.getEnergyStored(ForgeDirection.UNKNOWN));
    tile.writeAugmentsToNBT(tag);
  }
  return tag;
}
Program: 59554
Project: 59554
Buggy source:
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  RedstoneControlHelper.getControlFromNBT(tag);
  frequency=tag.getInteger("String_Node_Str");
  modeItem=tag.getByte("String_Node_Str");
  modeFluid=tag.getByte("String_Node_Str");
  modeEnergy=tag.getByte("String_Node_Str");
}

Fixed version (ground truth):
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  RedstoneControlHelper.getControlFromNBT(tag);
  frequency=tag.getInteger("String_Node_Str");
  modeItem=tag.getByte("String_Node_Str");
  modeFluid=tag.getByte("String_Node_Str");
  modeEnergy=tag.getByte("String_Node_Str");
  markDirty();
  sendUpdatePacket(Side.CLIENT);
}
Program: 59555
Project: 59555
Buggy source:
public static void initialize(){
  defaultSideConfig[TYPE]=new SideConfig();
  defaultSideConfig[TYPE].numGroup=3;
  defaultSideConfig[TYPE].slotGroups=new int[][]{{},{0},{1}};
  defaultSideConfig[TYPE].allowInsertion=new boolean[]{false,true,false};
  defaultSideConfig[TYPE].allowExtraction=new boolean[]{false,true,true};
  defaultSideConfig[TYPE].sideTex=new int[]{0,1,4};
  defaultSideConfig[TYPE].defaultSides=new byte[]{1,1,2,2,2,2};
  int maxPower=MathHelper.clampI(ThermalExpansion.config.get("String_Node_Str","String_Node_Str",400),100,500);
  ThermalExpansion.config.set("String_Node_Str","String_Node_Str",maxPower);
  defaultEnergyConfig[TYPE]=new EnergyConfig();
  defaultEnergyConfig[TYPE].setParams(1,maxPower,Math.max(480000,maxPower * 1200));
  GameRegistry.registerTileEntity(TileCharger.class,"String_Node_Str");
}

Fixed version (ground truth):
public static void initialize(){
  defaultSideConfig[TYPE]=new SideConfig();
  defaultSideConfig[TYPE].numGroup=3;
  defaultSideConfig[TYPE].slotGroups=new int[][]{{},{0},{1}};
  defaultSideConfig[TYPE].allowInsertion=new boolean[]{false,true,false};
  defaultSideConfig[TYPE].allowExtraction=new boolean[]{false,true,true};
  defaultSideConfig[TYPE].sideTex=new int[]{0,1,4};
  defaultSideConfig[TYPE].defaultSides=new byte[]{1,1,2,2,2,2};
  int maxPower=MathHelper.clampI(ThermalExpansion.config.get("String_Node_Str","String_Node_Str",10000),100,20000);
  ThermalExpansion.config.set("String_Node_Str","String_Node_Str",maxPower);
  defaultEnergyConfig[TYPE]=new EnergyConfig();
  defaultEnergyConfig[TYPE].setParams(1,maxPower,Math.max(480000,maxPower * 1200));
  GameRegistry.registerTileEntity(TileCharger.class,"String_Node_Str");
}
Program: 59556
Project: 59556
Buggy source:
@Override public void placeAir(){
  if (ServerHelper.isClientWorld(worldObj)) {
    return;
  }
  if (fullOnPlace) {
    return;
  }
  Block query;
  int queryMeta;
  Fluid queryFluid;
  int bucketCounter=0;
  for (int i=xCoord - 1; i <= xCoord + 1; i++) {
    for (int j=yCoord - 1; j <= yCoord + 1; j++) {
      for (int k=zCoord - 1; k <= zCoord + 1; k++) {
        query=worldObj.getBlock(i,j,k);
        queryMeta=worldObj.getBlockMetadata(i,j,k);
        if (queryMeta == 0) {
          queryFluid=FluidHelper.lookupFluidForBlock(query);
          if (!full && queryFluid != null) {
            if (fluid == null) {
              fluid=new FluidStack(queryFluid,1000);
              bucketCounter=1;
              worldObj.setBlock(i,j,k,TEBlocks.blockAirBarrier,0,3);
            }
 else             if (fluid.fluidID == queryFluid.getID()) {
              bucketCounter++;
              worldObj.setBlock(i,j,k,TEBlocks.blockAirBarrier,0,3);
            }
          }
        }
 else         if (query.isAir(worldObj,i,j,k) || query.getMaterial().isLiquid()) {
          worldObj.setBlock(i,j,k,TEBlocks.blockAirBarrier,0,3);
        }
      }
    }
  }
  if (fluid != null) {
    fluid.amount=bucketCounter * 1000;
    full=true;
  }
}

Fixed version (ground truth):
@Override public void placeAir(){
  if (ServerHelper.isClientWorld(worldObj)) {
    return;
  }
  if (fullOnPlace) {
    return;
  }
  Block query;
  int queryMeta;
  Fluid queryFluid;
  int bucketCounter=0;
  for (int i=xCoord - 1; i <= xCoord + 1; i++) {
    for (int j=yCoord - 1; j <= yCoord + 1; j++) {
      for (int k=zCoord - 1; k <= zCoord + 1; k++) {
        query=worldObj.getBlock(i,j,k);
        queryMeta=worldObj.getBlockMetadata(i,j,k);
        if (queryMeta == 0) {
          queryFluid=FluidHelper.lookupFluidForBlock(query);
          if (!full && queryFluid != null) {
            if (fluid == null) {
              fluid=new FluidStack(queryFluid,1000);
              bucketCounter=1;
              worldObj.setBlock(i,j,k,TEBlocks.blockAirBarrier,0,3);
            }
 else             if (fluid.fluidID == queryFluid.getID()) {
              bucketCounter++;
              worldObj.setBlock(i,j,k,TEBlocks.blockAirBarrier,0,3);
            }
          }
 else           if (query.isAir(worldObj,i,j,k)) {
            worldObj.setBlock(i,j,k,TEBlocks.blockAirBarrier,0,3);
          }
        }
 else         if (query.isAir(worldObj,i,j,k) || query.getMaterial().isLiquid()) {
          worldObj.setBlock(i,j,k,TEBlocks.blockAirBarrier,0,3);
        }
      }
    }
  }
  if (fluid != null) {
    fluid.amount=bucketCounter * 1000;
    full=true;
  }
}
Program: 59557
Project: 59557
Buggy source:
@Override public void readFromNBT(NBTTagCompound nbt){
  type=nbt.getByte("String_Node_Str");
  enchant=nbt.getByte("String_Node_Str");
  facing=nbt.getByte("String_Node_Str");
  if (type > 0) {
    inventory=new ItemStack[CoFHProps.STORAGE_SIZE[2 * type + enchant]];
  }
 else {
    inventory=new ItemStack[1];
  }
  super.readFromNBT(nbt);
}

Fixed version (ground truth):
@Override public void readFromNBT(NBTTagCompound nbt){
  type=nbt.getByte("String_Node_Str");
  enchant=nbt.getByte("String_Node_Str");
  facing=nbt.getByte("String_Node_Str");
  if (type > 0) {
    inventory=new ItemStack[CoFHProps.STORAGE_SIZE[getStorageIndex()]];
  }
 else {
    inventory=new ItemStack[1];
  }
  super.readFromNBT(nbt);
}
Program: 59558
Project: 59558
Buggy source:
@Override public int[] getAccessibleSlotsFromSide(int side){
  return access.isPublic() ? CoFHProps.SLOTS[type] : TEProps.EMPTY_INVENTORY;
}

Fixed version (ground truth):
@Override public int[] getAccessibleSlotsFromSide(int side){
  return access.isPublic() ? CoFHProps.SLOTS[getStorageIndex()] : TEProps.EMPTY_INVENTORY;
}
Program: 59559
Project: 59559
Buggy source:
@Override public void handleTilePacket(PacketCoFHBase payload,boolean isServer){
  super.handleTilePacket(payload,isServer);
  type=payload.getByte();
  enchant=payload.getByte();
  if (!isServer) {
    facing=payload.getByte();
    if (inventory.length <= 0) {
      createInventory();
    }
  }
 else {
    payload.getByte();
  }
}

Fixed version (ground truth):
@Override public void handleTilePacket(PacketCoFHBase payload,boolean isServer){
  super.handleTilePacket(payload,isServer);
  type=payload.getByte();
  byte prevEnchant=enchant;
  enchant=payload.getByte();
  if (!isServer) {
    facing=payload.getByte();
    if (enchant != prevEnchant || inventory.length <= 0) {
      createInventory();
    }
  }
 else {
    payload.getByte();
  }
}
Program: 59560
Project: 59560
Buggy source:
public int getStorageIndex(){
  return type > 0 ? 2 * type + enchant : 0;
}

Fixed version (ground truth):
public int getStorageIndex(){
  return type > 0 ? Math.min(2 * type + enchant,CoFHProps.STORAGE_SIZE.length - 1) : 0;
}
Program: 59561
Project: 59561
Buggy source:
@Override public void initGui(){
  super.initGui();
  if (myTile.type == BlockStrongbox.Types.CREATIVE.ordinal()) {
    myInfo=StringHelper.localize("String_Node_Str");
  }
 else {
    myInfo=StringHelper.localize("String_Node_Str") + "String_Node_Str" + StringHelper.localize("String_Node_Str");
    if (myTile.enchant <= 0) {
      myInfo+="String_Node_Str" + StringHelper.localize("String_Node_Str");
    }
  }
  addTab(new TabInfo(this,myInfo));
  if (myTile.enableSecurity() && myTile.isSecured()) {
    addTab(new TabSecurity(this,myTile,playerName));
  }
}

Fixed version (ground truth):
@Override public void initGui(){
  super.initGui();
  if (myTile.type == BlockStrongbox.Types.CREATIVE.ordinal()) {
    myInfo=StringHelper.localize("String_Node_Str");
  }
 else {
    myInfo=StringHelper.localize("String_Node_Str");
    if (myTile.enchant <= 0) {
      myInfo+="String_Node_Str" + StringHelper.localize("String_Node_Str");
    }
  }
  addTab(new TabInfo(this,myInfo));
  if (myTile.enableSecurity() && myTile.isSecured()) {
    addTab(new TabSecurity(this,myTile,playerName));
  }
}
Program: 59562
Project: 59562
Buggy source:
@Override public void handleElementButtonClick(String buttonName,int mouseButton){
  if (buttonName.equals("String_Node_Str")) {
    if (((ContainerWorkbench)inventorySlots).canWriteSchematic()) {
      PacketTEBase.sendCreateSchematicPacketToServer();
      playSound("String_Node_Str",1.0F,0.8F);
    }
  }
 else   if (buttonName.equals("String_Node_Str")) {
    if (gridNotEmpty()) {
      myTile.clearCraftingGrid();
      playSound("String_Node_Str",1.0F,0.6F);
    }
 else     if (hasValidSchematic()) {
      myTile.setCraftingGrid();
      playSound("String_Node_Str",1.0F,0.8F);
    }
  }
}

Fixed version (ground truth):
@Override public void handleElementButtonClick(String buttonName,int mouseButton){
  if (buttonName.equals("String_Node_Str")) {
    if (((ContainerWorkbench)inventorySlots).canWriteSchematic()) {
      PacketTEBase.sendTabSchematicPacketToServer();
      playSound("String_Node_Str",1.0F,0.8F);
    }
  }
 else   if (buttonName.equals("String_Node_Str")) {
    if (gridNotEmpty()) {
      myTile.clearCraftingGrid();
      playSound("String_Node_Str",1.0F,0.6F);
    }
 else     if (hasValidSchematic()) {
      myTile.setCraftingGrid();
      playSound("String_Node_Str",1.0F,0.8F);
    }
  }
}
Program: 59563
Project: 59563
Buggy source:
@Override public boolean onBlockActivated(World world,int x,int y,int z,EntityPlayer player,int hitSide,float hitX,float hitY,float hitZ){
  if (Utils.isHoldingDebugger(player)) {
    return true;
  }
  if (Utils.isHoldingMultimeter(player)) {
    return true;
  }
  if (player.isSneaking()) {
    if (Utils.isHoldingUsableWrench(player,x,y,z)) {
      if (ServerHelper.isServerWorld(world) && canDismantle(player,world,x,y,z)) {
        dismantleBlock(player,world,x,y,z,false);
      }
      Utils.usedWrench(player,x,y,z);
      return true;
    }
    return false;
  }
  TileTEBase tile=(TileTEBase)world.getTileEntity(x,y,z);
  if (tile == null) {
    return false;
  }
  if (Utils.isHoldingUsableWrench(player,x,y,z)) {
    if (ServerHelper.isServerWorld(world)) {
      tile.onWrench(player,hitSide);
    }
    Utils.usedWrench(player,x,y,z);
    return true;
  }
  if (ServerHelper.isServerWorld(world)) {
    return tile.openGui(player);
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean onBlockActivated(World world,int x,int y,int z,EntityPlayer player,int hitSide,float hitX,float hitY,float hitZ){
  if (Utils.isHoldingDebugger(player)) {
    return true;
  }
  if (Utils.isHoldingMultimeter(player)) {
    return true;
  }
  TileTEBase tile=(TileTEBase)world.getTileEntity(x,y,z);
  if (tile == null) {
    return false;
  }
  if (Utils.isHoldingUsableWrench(player,x,y,z)) {
    if (ServerHelper.isServerWorld(world)) {
      tile.onWrench(player,hitSide);
    }
    Utils.usedWrench(player,x,y,z);
    return true;
  }
  if (ServerHelper.isServerWorld(world)) {
    return tile.openGui(player);
  }
  return true;
}
Program: 59564
Project: 59564
Buggy source:
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  if (augmentRedstoneControl) {
    RedstoneControlHelper.getControlFromNBT(tag);
  }
  if (augmentReconfigSides) {
    int storedFacing=ReconfigurableHelper.getFacingFromNBT(tag);
    byte[] storedSideCache=ReconfigurableHelper.getSideCacheFromNBT(tag,getDefaultSides());
    sideCache[0]=storedSideCache[0];
    sideCache[1]=storedSideCache[1];
    sideCache[facing]=storedSideCache[storedFacing];
    sideCache[BlockHelper.getLeftSide(facing)]=storedSideCache[BlockHelper.getLeftSide(storedFacing)];
    sideCache[BlockHelper.getRightSide(facing)]=storedSideCache[BlockHelper.getRightSide(storedFacing)];
    sideCache[BlockHelper.getOppositeSide(facing)]=storedSideCache[BlockHelper.getOppositeSide(storedFacing)];
    for (int i=0; i < 6; i++) {
      if (sideCache[i] >= getNumConfig(i)) {
        sideCache[i]=0;
      }
    }
    markDirty();
    sendUpdatePacket(Side.CLIENT);
  }
}

Fixed version (ground truth):
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  if (augmentRedstoneControl) {
    rsMode=RedstoneControlHelper.getControlFromNBT(tag);
  }
  if (augmentReconfigSides) {
    int storedFacing=ReconfigurableHelper.getFacingFromNBT(tag);
    byte[] storedSideCache=ReconfigurableHelper.getSideCacheFromNBT(tag,getDefaultSides());
    sideCache[0]=storedSideCache[0];
    sideCache[1]=storedSideCache[1];
    sideCache[facing]=storedSideCache[storedFacing];
    sideCache[BlockHelper.getLeftSide(facing)]=storedSideCache[BlockHelper.getLeftSide(storedFacing)];
    sideCache[BlockHelper.getRightSide(facing)]=storedSideCache[BlockHelper.getRightSide(storedFacing)];
    sideCache[BlockHelper.getOppositeSide(facing)]=storedSideCache[BlockHelper.getOppositeSide(storedFacing)];
    for (int i=0; i < 6; i++) {
      if (sideCache[i] >= getNumConfig(i)) {
        sideCache[i]=0;
      }
    }
    markDirty();
    sendUpdatePacket(Side.CLIENT);
  }
}
Program: 59565
Project: 59565
Buggy source:
@Override @SideOnly(Side.CLIENT) public int getRenderType(){
  return TEProps.renderIdTesseract;
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public int getRenderType(){
  return TEProps.renderIdEnder;
}
Program: 59566
Project: 59566
Buggy source:
@Override public void onBlockPlacedBy(World world,int x,int y,int z,EntityLivingBase living,ItemStack stack){
  if (ServerHelper.isServerWorld(world) && stack.stackTagCompound != null && stack.stackTagCompound.hasKey("String_Node_Str")) {
    TileTesseract tile=(TileTesseract)world.getTileEntity(x,y,z);
    tile.removeFromRegistry();
    tile.modeItem=stack.stackTagCompound.getByte("String_Node_Str");
    tile.modeFluid=stack.stackTagCompound.getByte("String_Node_Str");
    tile.modeEnergy=stack.stackTagCompound.getByte("String_Node_Str");
    tile.frequency=stack.stackTagCompound.getInteger("String_Node_Str");
    tile.isActive=tile.frequency != -1;
    tile.addToRegistry();
    tile.sendDescPacket();
  }
  super.onBlockPlacedBy(world,x,y,z,living,stack);
}

Fixed version (ground truth):
@Override public void onBlockPlacedBy(World world,int x,int y,int z,EntityLivingBase living,ItemStack stack){
  TileEntity aTile=world.getTileEntity(x,y,z);
  if (aTile instanceof TileTesseract) {
    TileTesseract tile=(TileTesseract)world.getTileEntity(x,y,z);
    tile.setInvName(ItemHelper.getNameFromItemStack(stack));
    if (SecurityHelper.isSecure(stack)) {
      String stackOwner=SecurityHelper.getOwnerName(stack);
      if (!stackOwner.isEmpty()) {
        tile.setOwnerName(stackOwner);
      }
 else       if (living instanceof ICommandSender) {
        tile.setOwnerName(living.getCommandSenderName());
      }
      tile.setAccessQuick(SecurityHelper.getAccess(stack));
    }
    if (RedstoneControlHelper.hasRSControl(stack)) {
      tile.setControl(RedstoneControlHelper.getControl(stack));
    }
    tile.onNeighborBlockChange();
    if (stack.stackTagCompound != null && stack.stackTagCompound.hasKey("String_Node_Str")) {
      if (ServerHelper.isServerWorld(world)) {
        tile.removeFromRegistry();
      }
      tile.modeItem=stack.stackTagCompound.getByte("String_Node_Str");
      tile.modeFluid=stack.stackTagCompound.getByte("String_Node_Str");
      tile.modeEnergy=stack.stackTagCompound.getByte("String_Node_Str");
      tile.frequency=stack.stackTagCompound.getInteger("String_Node_Str");
      tile.isActive=tile.frequency != -1;
      if (ServerHelper.isServerWorld(world)) {
        tile.addToRegistry();
        tile.sendDescPacket();
      }
    }
  }
 else {
    super.onBlockPlacedBy(world,x,y,z,living,stack);
  }
}
Program: 59567
Project: 59567
Buggy source:
@Override public int getRenderId(){
  return TEProps.renderIdTesseract;
}

Fixed version (ground truth):
@Override public int getRenderId(){
  return TEProps.renderIdEnder;
}
Program: 59568
Project: 59568
Buggy source:
public CoFHPacket getConfigSync(){
  CoFHPacket myPacket=GenericTEPacket.getPacket(PacketTypes.CONFIG_SYNC);
  myPacket.addBool(TileWorkbench.enableSecurity);
  myPacket.addBool(TileStrongbox.enableSecurity);
  return myPacket;
}

Fixed version (ground truth):
public CoFHPacket getConfigSync(){
  CoFHPacket payload=GenericTEPacket.getPacket(PacketTypes.CONFIG_SYNC);
  payload.addBool(TileWorkbench.enableSecurity);
  payload.addBool(TileStrongbox.enableSecurity);
  return payload;
}
Program: 59570
Project: 59570
Buggy source:
@EventHandler public void postInit(FMLPostInitializationEvent event){
  TEItems.postInit();
  TEBlocks.postInit();
  TEFluids.postInit();
  TEPlugins.postInit();
  proxy.registerEntities();
  proxy.registerRenderInformation();
}

Fixed version (ground truth):
@EventHandler public void postInit(FMLPostInitializationEvent event){
  TEItems.postInit();
  TEBlocks.postInit();
  TEPlugins.postInit();
  proxy.registerEntities();
  proxy.registerRenderInformation();
}
Program: 59571
Project: 59571
Buggy source:
@EventHandler public void initialize(FMLInitializationEvent event){
  TEItems.initialize();
  TEBlocks.initialize();
  TEFluids.initialize();
  TEPlugins.initialize();
  if (TEProps.enableAchievements) {
  }
  loadWorldGeneration();
  NetworkRegistry.INSTANCE.registerGuiHandler(instance,guiHandler);
  GenericTEPacket.initialize();
  MinecraftForge.EVENT_BUS.register(proxy);
  try {
    Field eBus=FMLModContainer.class.getDeclaredField("String_Node_Str");
    eBus.setAccessible(true);
    EventBus FMLbus=(EventBus)eBus.get(FMLCommonHandler.instance().findContainerFor(this));
    FMLbus.register(this);
  }
 catch (  Throwable t) {
    if (TEProps.enableDebugOutput) {
      t.printStackTrace();
    }
  }
}

Fixed version (ground truth):
@EventHandler public void initialize(FMLInitializationEvent event){
  TEItems.initialize();
  TEBlocks.initialize();
  TEPlugins.initialize();
  if (TEProps.enableAchievements) {
  }
  loadWorldGeneration();
  NetworkRegistry.INSTANCE.registerGuiHandler(instance,guiHandler);
  GenericTEPacket.initialize();
  MinecraftForge.EVENT_BUS.register(proxy);
  try {
    Field eBus=FMLModContainer.class.getDeclaredField("String_Node_Str");
    eBus.setAccessible(true);
    EventBus FMLbus=(EventBus)eBus.get(FMLCommonHandler.instance().findContainerFor(this));
    FMLbus.register(this);
  }
 catch (  Throwable t) {
    if (TEProps.enableDebugOutput) {
      t.printStackTrace();
    }
  }
}
Program: 59572
Project: 59572
Buggy source:
public static void initialize(){
  blockMachine=addBlock(new BlockMachine());
  blockDevice=addBlock(new BlockDevice());
  blockDynamo=addBlock(new BlockDynamo());
  blockEnergyCell=addBlock(new BlockEnergyCell());
  blockTank=addBlock(new BlockTank());
  blockStrongbox=addBlock(new BlockStrongbox());
  blockCache=addBlock(new BlockCache());
  blockTesseract=addBlock(new BlockTesseract());
  blockLamp=addBlock(new BlockLamp());
  blockGlass=addBlock(new BlockGlass());
  blockRockwool=addBlock(new BlockRockwool());
  GameRegistry.registerBlock(blockMachine,ItemBlockMachine.class,"String_Node_Str");
  GameRegistry.registerBlock(blockDevice,ItemBlockDevice.class,"String_Node_Str");
  GameRegistry.registerBlock(blockDynamo,ItemBlockDynamo.class,"String_Node_Str");
  GameRegistry.registerBlock(blockEnergyCell,ItemBlockEnergyCell.class,"String_Node_Str");
  GameRegistry.registerBlock(blockTank,ItemBlockTank.class,"String_Node_Str");
  GameRegistry.registerBlock(blockStrongbox,ItemBlockStrongbox.class,"String_Node_Str");
  GameRegistry.registerBlock(blockCache,ItemBlockCache.class,"String_Node_Str");
  GameRegistry.registerBlock(blockTesseract,ItemBlockTesseract.class,"String_Node_Str");
  GameRegistry.registerBlock(blockLamp,ItemBlockLamp.class,"String_Node_Str");
  GameRegistry.registerBlock(blockGlass,ItemBlockGlass.class,"String_Node_Str");
  GameRegistry.registerBlock(blockRockwool,ItemBlockRockwool.class,"String_Node_Str");
  for (  IInitializer initializer : blockList) {
    initializer.initialize();
  }
}

Fixed version (ground truth):
public static void initialize(){
  blockMachine=addBlock(new BlockMachine());
  blockDevice=addBlock(new BlockDevice());
  blockDynamo=addBlock(new BlockDynamo());
  blockCell=addBlock(new BlockCell());
  blockTank=addBlock(new BlockTank());
  blockStrongbox=addBlock(new BlockStrongbox());
  blockCache=addBlock(new BlockCache());
  blockTesseract=addBlock(new BlockTesseract());
  blockLamp=addBlock(new BlockLamp());
  blockGlass=addBlock(new BlockGlass());
  blockRockwool=addBlock(new BlockRockwool());
  GameRegistry.registerBlock(blockMachine,ItemBlockMachine.class,"String_Node_Str");
  GameRegistry.registerBlock(blockDevice,ItemBlockDevice.class,"String_Node_Str");
  GameRegistry.registerBlock(blockDynamo,ItemBlockDynamo.class,"String_Node_Str");
  GameRegistry.registerBlock(blockCell,ItemBlockCell.class,"String_Node_Str");
  GameRegistry.registerBlock(blockTank,ItemBlockTank.class,"String_Node_Str");
  GameRegistry.registerBlock(blockStrongbox,ItemBlockStrongbox.class,"String_Node_Str");
  GameRegistry.registerBlock(blockCache,ItemBlockCache.class,"String_Node_Str");
  GameRegistry.registerBlock(blockTesseract,ItemBlockTesseract.class,"String_Node_Str");
  GameRegistry.registerBlock(blockLamp,ItemBlockLamp.class,"String_Node_Str");
  GameRegistry.registerBlock(blockGlass,ItemBlockGlass.class,"String_Node_Str");
  GameRegistry.registerBlock(blockRockwool,ItemBlockRockwool.class,"String_Node_Str");
  for (  IInitializer initializer : blockList) {
    initializer.initialize();
  }
}
Program: 59573
Project: 59573
Buggy source:
@Override public boolean postInit(){
  if (enable[Types.BASIC.ordinal()]) {
    GameRegistry.addRecipe(new ShapedOreRecipe(cacheBasic,new Object[]{"String_Node_Str","String_Node_Str","String_Node_Str",'I',"String_Node_Str",'X',Blocks.log}));
  }
  if (enable[Types.HARDENED.ordinal()]) {
    GameRegistry.addRecipe(new UpgradeRecipe(cacheHardened,new Object[]{"String_Node_Str","String_Node_Str","String_Node_Str",'I',"String_Node_Str",'X',cacheBasic}));
    GameRegistry.addRecipe(new ShapedOreRecipe(cacheHardened,new Object[]{"String_Node_Str","String_Node_Str","String_Node_Str",'I',"String_Node_Str",'X',Blocks.log,'Y',"String_Node_Str"}));
  }
  if (enable[Types.REINFORCED.ordinal()]) {
    GameRegistry.addRecipe(new UpgradeRecipe(cacheReinforced,new Object[]{"String_Node_Str","String_Node_Str","String_Node_Str",'X',cacheHardened,'G',"String_Node_Str"}));
  }
  if (enable[Types.RESONANT.ordinal()]) {
    GameRegistry.addRecipe(new UpgradeRecipe(cacheResonant,new Object[]{"String_Node_Str","String_Node_Str","String_Node_Str",'I',"String_Node_Str",'X',cacheReinforced}));
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean postInit(){
  if (enable[Types.BASIC.ordinal()]) {
    GameRegistry.addRecipe(new ShapedOreRecipe(cacheBasic,new Object[]{"String_Node_Str","String_Node_Str","String_Node_Str",'I',"String_Node_Str",'X',"String_Node_Str"}));
  }
  if (enable[Types.HARDENED.ordinal()]) {
    GameRegistry.addRecipe(new UpgradeRecipe(cacheHardened,new Object[]{"String_Node_Str","String_Node_Str","String_Node_Str",'I',"String_Node_Str",'X',cacheBasic}));
    GameRegistry.addRecipe(new ShapedOreRecipe(cacheHardened,new Object[]{"String_Node_Str","String_Node_Str","String_Node_Str",'I',"String_Node_Str",'X',"String_Node_Str",'Y',"String_Node_Str"}));
  }
  if (enable[Types.REINFORCED.ordinal()]) {
    GameRegistry.addRecipe(new UpgradeRecipe(cacheReinforced,new Object[]{"String_Node_Str","String_Node_Str","String_Node_Str",'X',cacheHardened,'G',"String_Node_Str"}));
  }
  if (enable[Types.RESONANT.ordinal()]) {
    GameRegistry.addRecipe(new UpgradeRecipe(cacheResonant,new Object[]{"String_Node_Str","String_Node_Str","String_Node_Str",'I',"String_Node_Str",'X',cacheReinforced}));
  }
  return true;
}
Program: 59574
Project: 59574
Buggy source:
@Override public void readFromNBT(NBTTagCompound nbt){
  type=nbt.getByte("String_Node_Str");
  facing=nbt.getByte("String_Node_Str");
  locked=nbt.getBoolean("String_Node_Str");
  storedStack=ItemStack.loadItemStackFromNBT(nbt.getCompoundTag("String_Node_Str"));
  maxCacheStackSize=SIZE[type] - storedStack.getMaxStackSize() * 2;
  super.readFromNBT(nbt);
}

Fixed version (ground truth):
@Override public void readFromNBT(NBTTagCompound nbt){
  type=nbt.getByte("String_Node_Str");
  facing=nbt.getByte("String_Node_Str");
  locked=nbt.getBoolean("String_Node_Str");
  if (nbt.hasKey("String_Node_Str")) {
    storedStack=ItemStack.loadItemStackFromNBT(nbt.getCompoundTag("String_Node_Str"));
    maxCacheStackSize=SIZE[type] - storedStack.getMaxStackSize() * 2;
  }
 else {
    maxCacheStackSize=SIZE[type] - 64 * 2;
  }
  super.readFromNBT(nbt);
}
Program: 59575
Project: 59575
Buggy source:
@Override public void writeToNBT(NBTTagCompound nbt){
  super.writeToNBT(nbt);
  nbt.setByte("String_Node_Str",type);
  nbt.setByte("String_Node_Str",facing);
  nbt.setBoolean("String_Node_Str",locked);
  nbt.setTag("String_Node_Str",storedStack.writeToNBT(new NBTTagCompound()));
}

Fixed version (ground truth):
@Override public void writeToNBT(NBTTagCompound nbt){
  super.writeToNBT(nbt);
  nbt.setByte("String_Node_Str",type);
  nbt.setByte("String_Node_Str",facing);
  nbt.setBoolean("String_Node_Str",locked);
  if (storedStack != null) {
    nbt.setTag("String_Node_Str",storedStack.writeToNBT(new NBTTagCompound()));
  }
}
Program: 59576
Project: 59576
Buggy source:
public Payload getConfigSync(int packetID){
  Payload myPayload=Payload.getPayload(packetID);
  myPayload.addByte(PacketTypes.CONFIG_SYNC.ordinal());
  myPayload.addBool(TileWorkbench.enableSecurity);
  myPayload.addBool(TileStrongbox.enableSecurity);
  return myPayload;
}

Fixed version (ground truth):
public CoFHPacket getConfigSync(int packetID){
  CoFHPacket myPacket=CoFHPacket.getCoFHPacket(packetID);
  myPacket.addByte(PacketTypes.CONFIG_SYNC.ordinal());
  myPacket.addBool(TileWorkbench.enableSecurity);
  myPacket.addBool(TileStrongbox.enableSecurity);
  return myPacket;
}
Program: 59577
Project: 59577
Buggy source:
public void handleConfigSync(Payload payload){
  TileWorkbench.enableSecurity=payload.getBool();
  TileStrongbox.enableSecurity=payload.getBool();
  log.info(StringHelper.localize("String_Node_Str"));
}

Fixed version (ground truth):
public void handleConfigSync(CoFHPacket payload){
  TileWorkbench.enableSecurity=payload.getBool();
  TileStrongbox.enableSecurity=payload.getBool();
  log.info(StringHelper.localize("String_Node_Str"));
}
Program: 59578
Project: 59578
Buggy source:
@Override public void handleTilePacket(Payload payload){
  if (ServerHelper.isClientWorld(worldObj)) {
    invName=payload.getString();
  }
 else {
    payload.getString();
  }
}

Fixed version (ground truth):
@Override public void handleTilePacket(CoFHPacket payload,boolean isServer){
  if (ServerHelper.isClientWorld(worldObj)) {
    invName=payload.getString();
  }
 else {
    payload.getString();
  }
}
Program: 59579
Project: 59579
Buggy source:
@Override public void handleTilePacket(Payload payload){
  isPowered=payload.getBool();
  rsDisable=payload.getBool();
  rsSetting=payload.getBool();
}

Fixed version (ground truth):
@Override public void handleTilePacket(CoFHPacket payload,boolean isServer){
  isPowered=payload.getBool();
  rsDisable=payload.getBool();
  rsSetting=payload.getBool();
}
Program: 59580
Project: 59580
Buggy source:
@Override public void handleTilePacket(Payload payload){
  super.handleTilePacket(payload);
  isPowered=payload.getBool();
  rsDisable=payload.getBool();
  rsSetting=payload.getBool();
}

Fixed version (ground truth):
@Override public void handleTilePacket(CoFHPacket payload,boolean isServer){
  super.handleTilePacket(payload);
  isPowered=payload.getBool();
  rsDisable=payload.getBool();
  rsSetting=payload.getBool();
}
Program: 59581
Project: 59581
Buggy source:
@Override public void handleTilePacket(Payload payload){
  super.handleTilePacket(payload);
  payload.getByteArray(sideCache);
  if (ServerHelper.isClientWorld(worldObj)) {
    facing=payload.getByte();
    isActive=payload.getBool();
  }
 else {
    payload.getByte();
    payload.getBool();
  }
  for (int i=0; i < 6; ++i) {
    if (sideCache[i] >= getNumConfig(i)) {
      sideCache[i]=0;
    }
  }
  worldObj.markBlockForUpdate(xCoord,yCoord,zCoord);
  worldObj.updateAllLightTypes(xCoord,yCoord,zCoord);
  worldObj.notifyBlocksOfNeighborChange(xCoord,yCoord,zCoord,getBlockType());
}

Fixed version (ground truth):
@Override public void handleTilePacket(CoFHPacket payload,boolean isServer){
  super.handleTilePacket(payload);
  payload.getByteArray(sideCache);
  if (ServerHelper.isClientWorld(worldObj)) {
    facing=payload.getByte();
    isActive=payload.getBool();
  }
 else {
    payload.getByte();
    payload.getBool();
  }
  for (int i=0; i < 6; ++i) {
    if (sideCache[i] >= getNumConfig(i)) {
      sideCache[i]=0;
    }
  }
  worldObj.markBlockForUpdate(xCoord,yCoord,zCoord);
  worldObj.updateAllLightTypes(xCoord,yCoord,zCoord);
  worldObj.notifyBlocksOfNeighborChange(xCoord,yCoord,zCoord,getBlockType());
}
Program: 59582
Project: 59582
Buggy source:
@Override public void handleTilePacket(Payload payload){
  super.handleTilePacket(payload);
  payload.getByteArray(sideCache);
  if (ServerHelper.isClientWorld(worldObj)) {
    facing=payload.getByte();
    isActive=payload.getBool();
  }
 else {
    payload.getByte();
    payload.getBool();
  }
  for (int i=0; i < 6; ++i) {
    if (sideCache[i] >= getNumConfig(i)) {
      sideCache[i]=0;
    }
  }
  worldObj.markBlockForUpdate(xCoord,yCoord,zCoord);
  worldObj.updateAllLightTypes(xCoord,yCoord,zCoord);
  worldObj.notifyBlocksOfNeighborChange(xCoord,yCoord,zCoord,getBlockType());
}

Fixed version (ground truth):
@Override public void handleTilePacket(CoFHPacket payload,boolean isServer){
  super.handleTilePacket(payload);
  payload.getByteArray(sideCache);
  if (ServerHelper.isClientWorld(worldObj)) {
    facing=payload.getByte();
    isActive=payload.getBool();
  }
 else {
    payload.getByte();
    payload.getBool();
  }
  for (int i=0; i < 6; ++i) {
    if (sideCache[i] >= getNumConfig(i)) {
      sideCache[i]=0;
    }
  }
  worldObj.markBlockForUpdate(xCoord,yCoord,zCoord);
  worldObj.updateAllLightTypes(xCoord,yCoord,zCoord);
  worldObj.notifyBlocksOfNeighborChange(xCoord,yCoord,zCoord,getBlockType());
}
Program: 59583
Project: 59583
Buggy source:
@Override public void handleTilePacket(Payload payload){
  super.handleTilePacket(payload);
  actsSneaking=payload.getBool();
  leftClick=payload.getBool();
  tickSlot=payload.getByte();
  angle=payload.getByte();
}

Fixed version (ground truth):
@Override public void handleTilePacket(CoFHPacket payload,boolean isServer){
  super.handleTilePacket(payload);
  actsSneaking=payload.getBool();
  leftClick=payload.getBool();
  tickSlot=payload.getByte();
  angle=payload.getByte();
}
Program: 59584
Project: 59584
Buggy source:
@Override public void handleTileInfoPacket(Payload payload,NetHandler handler){
switch (TEProps.PacketID.values()[payload.getByte()]) {
case MODE:
    leftClick=payload.getBool();
  actsSneaking=payload.getBool();
tickSlot=payload.getByte();
angle=payload.getByte();
return;
default :
}
}

Fixed version (ground truth):
@Override public void handleTileInfoPacket(CoFHPacket payload,boolean isServer,EntityPlayer thePlayer){
switch (TEProps.PacketID.values()[payload.getByte()]) {
case MODE:
    leftClick=payload.getBool();
  actsSneaking=payload.getBool();
tickSlot=payload.getByte();
angle=payload.getByte();
return;
default :
}
}
Program: 59585
Project: 59585
Buggy source:
@Override public void handleTilePacket(Payload payload){
}

Fixed version (ground truth):
@Override public void handleTilePacket(CoFHPacket payload,boolean isServer){
}
Program: 59586
Project: 59586
Buggy source:
public void clearCraftingGrid(){
  for (int i=0; i < 9; i++) {
    inventory[getMatrixOffset() + i]=null;
  }
  PacketUtils.sendToServer(Payload.getInfoPayload(this).addByte(PacketInfoID.CLEAR_GRID.ordinal()).getPacket());
}

Fixed version (ground truth):
public void clearCraftingGrid(){
  for (int i=0; i < 9; i++) {
    inventory[getMatrixOffset() + i]=null;
  }
  PacketHandler.sendToServer(CoFHTileInfoPacket.getTileInfoPacket(this).addByte(PacketInfoID.CLEAR_GRID.ordinal()));
}
Program: 59587
Project: 59587
Buggy source:
@Override public void handleTilePacket(Payload payload){
  super.handleTilePacket(payload);
  access=ISecureTile.AccessMode.values()[payload.getByte()];
  selectedSchematic=payload.getByte();
  if (ServerHelper.isClientWorld(worldObj)) {
    owner=payload.getString();
  }
 else {
    payload.getString();
  }
  worldObj.markBlockForUpdate(xCoord,yCoord,zCoord);
  worldObj.notifyBlocksOfNeighborChange(xCoord,yCoord,zCoord,getBlockType());
}

Fixed version (ground truth):
@Override public void handleTilePacket(CoFHPacket payload,boolean isServer){
  super.handleTilePacket(payload,isServer);
  access=ISecureTile.AccessMode.values()[payload.getByte()];
  selectedSchematic=payload.getByte();
  if (ServerHelper.isClientWorld(worldObj)) {
    owner=payload.getString();
  }
 else {
    payload.getString();
  }
  worldObj.markBlockForUpdate(xCoord,yCoord,zCoord);
  worldObj.notifyBlocksOfNeighborChange(xCoord,yCoord,zCoord,getBlockType());
}