nus-yam/ex-repair huggingface dataset:
Program: 59423
Project: 59423
Buggy source:
@Override public boolean canTakeStack(EntityPlayer player){
  return ServerHelper.isClientWorld(player.worldObj) ? myTile.createItemClient(false,inventory.getStackInSlot(getSlotIndex())) : myTile.createItem(false,inventory.getStackInSlot(getSlotIndex()));
}

Fixed version (ground truth):
@Override public boolean canTakeStack(EntityPlayer player){
  myContainer.onCraftMatrixChanged(null);
  return ServerHelper.isClientWorld(player.worldObj) ? myTile.createItemClient(false,inventory.getStackInSlot(getSlotIndex())) : myTile.createItem(false,inventory.getStackInSlot(getSlotIndex()));
}
Program: 59424
Project: 59424
Buggy source:
@Override public ItemStack getStack(){
  myTile.createItem(false,inventory.getStackInSlot(getSlotIndex()));
  return this.inventory.getStackInSlot(getSlotIndex());
}

Fixed version (ground truth):
@Override public ItemStack getStack(){
  return this.inventory.getStackInSlot(getSlotIndex());
}
Program: 59425
Project: 59425
Buggy source:
@Override public void onPickupFromSlot(EntityPlayer player,ItemStack stack){
  myTile.createItem(true,inventory.getStackInSlot(getSlotIndex()));
  FMLCommonHandler.instance().firePlayerCraftingEvent(player,stack,myContainer.craftMatrix);
  this.onCrafting(stack);
  super.onPickupFromSlot(player,stack);
}

Fixed version (ground truth):
@Override public void onPickupFromSlot(EntityPlayer player,ItemStack stack){
  myTile.createItem(true,stack);
  FMLCommonHandler.instance().firePlayerCraftingEvent(player,stack,myContainer.craftMatrix);
  this.onCrafting(stack);
  super.onPickupFromSlot(player,stack);
}
Program: 59426
Project: 59426
Buggy source:
@Override public <T>T getCapability(Capability<T> capability,EnumFacing facing){
  if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) {
    if (this instanceof ISidedInventory) {
      return CapabilityItemHandler.ITEM_HANDLER_CAPABILITY.cast(new SidedInvWrapper(((ISidedInventory)this),facing));
    }
 else {
      return CapabilityItemHandler.ITEM_HANDLER_CAPABILITY.cast(new InvWrapper(this));
    }
  }
  return super.getCapability(capability,facing);
}

Fixed version (ground truth):
@Override public <T>T getCapability(Capability<T> capability,EnumFacing facing){
  if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) {
    if (this instanceof ISidedInventory && facing != null) {
      return CapabilityItemHandler.ITEM_HANDLER_CAPABILITY.cast(new SidedInvWrapper(((ISidedInventory)this),facing));
    }
 else {
      return CapabilityItemHandler.ITEM_HANDLER_CAPABILITY.cast(new InvWrapper(this));
    }
  }
  return super.getCapability(capability,facing);
}
Program: 59427
Project: 59427
Buggy source:
@Override @SideOnly(Side.CLIENT) public TextureAtlasSprite getTexture(EnumFacing side,IBlockState state,BlockRenderLayer layer,IBlockAccess access,BlockPos pos){
  TileEntity tileEntity=access.getTileEntity(pos);
  if (tileEntity instanceof TileMachineBase) {
    TileMachineBase machine=((TileMachineBase)tileEntity);
    if (layer == BlockRenderLayer.SOLID) {
      if (side == EnumFacing.DOWN) {
        return IconRegistry.getIcon("String_Node_Str");
      }
 else       if (side == EnumFacing.UP) {
        return IconRegistry.getIcon("String_Node_Str");
      }
      return side.ordinal() != machine.getFacing() ? IconRegistry.getIcon("String_Node_Str") : machine.isActive ? IconRegistry.getIcon("String_Node_Str",machine.type) : IconRegistry.getIcon("String_Node_Str",machine.type);
    }
 else     if (layer == BlockRenderLayer.CUTOUT) {
      return machine.getTexture(side.ordinal(),1);
    }
  }
  return TextureUtils.getMissingSprite();
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public TextureAtlasSprite getTexture(EnumFacing side,IBlockState state,BlockRenderLayer layer,IBlockAccess access,BlockPos pos){
  TileEntity tileEntity=access.getTileEntity(pos);
  if (tileEntity instanceof TileMachineBase) {
    TileMachineBase machine=((TileMachineBase)tileEntity);
    return machine.getTexture(side.ordinal(),layer == BlockRenderLayer.SOLID ? 0 : 1);
  }
  return TextureUtils.getMissingSprite();
}
Program: 59429
Project: 59429
Buggy source:
@Override public String generateKey(ItemStack stack){
  StringBuilder builder=new StringBuilder();
  builder.append(stack.getMetadata());
  builder.append("String_Node_Str");
  builder.append(stack.getItem().getRegistryName().toString());
  builder.append("String_Node_Str");
  if (stack.hasTagCompound()) {
    builder.append(stack.getTagCompound().getByte("String_Node_Str"));
  }
  return builder.toString();
}

Fixed version (ground truth):
@Override public String generateKey(ItemStack stack){
  StringBuilder builder=new StringBuilder();
  builder.append(stack.getMetadata());
  builder.append("String_Node_Str");
  builder.append(stack.getItem().getRegistryName().toString());
  builder.append("String_Node_Str");
  if (stack.hasTagCompound() && stack.getTagCompound().hasKey("String_Node_Str")) {
    FluidStack fluid=FluidStack.loadFluidStackFromNBT(stack.getTagCompound().getCompoundTag("String_Node_Str"));
    int level=(int)Math.min(TileTank.RENDER_LEVELS - 1,(long)fluid.amount * TileTank.RENDER_LEVELS / TileTank.CAPACITY[stack.getMetadata()]);
    builder.append(fluid.getFluid().getName());
    builder.append("String_Node_Str");
    builder.append(level);
  }
  return builder.toString();
}
Program: 59431
Project: 59431
Buggy source:
@Override public ArrayList<ItemStack> dismantleBlock(EntityPlayer player,World world,int x,int y,int z,boolean returnDrops){
  TileTesseract tile=(TileTesseract)world.getTileEntity(x,y,z);
  if (ServerHelper.isServerWorld(world) && tile != null) {
    tile.removeFromRegistry();
    tile.inventory=new ItemStack[0];
  }
  return super.dismantleBlock(player,getItemStackTag(world,x,y,z),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){
  TileTesseract tile=(TileTesseract)world.getTileEntity(x,y,z);
  if (tile != null) {
    tile.removeFromRegistry();
    tile.inventory=new ItemStack[0];
  }
  return super.dismantleBlock(player,getItemStackTag(world,x,y,z),world,x,y,z,returnDrops,false);
}
Program: 59432
Project: 59432
Buggy source:
public void addToRegistry(){
  RegistryEnderAttuned.getRegistry().add(this);
}

Fixed version (ground truth):
public void addToRegistry(){
  if (ServerHelper.isServerWorld(worldObj)) {
    RegistryEnderAttuned.getRegistry().add(this);
  }
}
Program: 59433
Project: 59433
Buggy source:
@Override public void onChunkUnload(){
  if (ServerHelper.isServerWorld(worldObj)) {
    removeFromRegistry();
  }
}

Fixed version (ground truth):
@Override public void onChunkUnload(){
  removeFromRegistry();
}
Program: 59434
Project: 59434
Buggy source:
@Override public void blockBroken(){
  if (ServerHelper.isServerWorld(worldObj)) {
    removeFromRegistry();
  }
}

Fixed version (ground truth):
@Override public void blockBroken(){
  removeFromRegistry();
}
Program: 59435
Project: 59435
Buggy source:
@Override public void validate(){
  super.validate();
  if (ServerHelper.isServerWorld(worldObj) && frequency != -1) {
    addToRegistry();
  }
}

Fixed version (ground truth):
@Override public void validate(){
  super.validate();
  if (frequency != -1) {
    addToRegistry();
  }
}
Program: 59436
Project: 59436
Buggy source:
public void removeFromRegistry(){
  RegistryEnderAttuned.getRegistry().remove(this);
}

Fixed version (ground truth):
public void removeFromRegistry(){
  if (ServerHelper.isServerWorld(worldObj)) {
    RegistryEnderAttuned.getRegistry().remove(this);
  }
}
Program: 59438
Project: 59438
Buggy source:
@Override public ContainerTEBase getGuiServer(InventoryPlayer inventory){
  return new ContainerTEBase(inventory,this);
}

Fixed version (ground truth):
@Override public ContainerTEBase getGuiServer(InventoryPlayer inventory){
  return new ContainerTEBase(inventory,this,false,false);
}
Program: 59439
Project: 59439
Buggy source:
public void addEntry(int theFreq,String freqName){
  if (ServerHelper.isClientWorld(worldObj)) {
    PacketHandler.sendToServer(PacketTileInfo.newPacket(this).addByte(PacketInfoID.ALTER_NAME_LIST.ordinal()).addBool(false).addString(getChannelString()).addString(String.valueOf(theFreq)).addString(freqName));
  }
}

Fixed version (ground truth):
public void addEntry(int theFreq,String freqName){
  if (ServerHelper.isClientWorld(worldObj)) {
    PacketHandler.sendToServer(PacketTileInfo.newPacket(this).addByte(PacketInfoID.ALTER_NAME_LIST.ordinal()).addBool(false).addString(getChannelString()).addInt(theFreq).addString(freqName));
  }
}
Program: 59440
Project: 59440
Buggy source:
public void removeEntry(int theFreq,String freqName){
  if (ServerHelper.isClientWorld(worldObj)) {
    PacketHandler.sendToServer(PacketTileInfo.newPacket(this).addByte(PacketInfoID.ALTER_NAME_LIST.ordinal()).addBool(true).addString(getChannelString()).addString(String.valueOf(theFreq)).addString(freqName));
  }
}

Fixed version (ground truth):
public void removeEntry(int theFreq,String freqName){
  if (ServerHelper.isClientWorld(worldObj)) {
    PacketHandler.sendToServer(PacketTileInfo.newPacket(this).addByte(PacketInfoID.ALTER_NAME_LIST.ordinal()).addBool(true).addString(getChannelString()).addInt(theFreq).addString(freqName));
  }
}
Program: 59443
Project: 59443
Buggy source:
@Override public void writeToNBT(NBTTagCompound nbt){
  super.writeToNBT(nbt);
  nbt.setInteger("String_Node_Str",intensity);
  nbt.setInteger("String_Node_Str",angle);
}

Fixed version (ground truth):
@Override public void writeToNBT(NBTTagCompound nbt){
  super.writeToNBT(nbt);
  nbt.setInteger("String_Node_Str",intensity);
  nbt.setInteger("String_Node_Str",angle);
  updateForce();
}
Program: 59444
Project: 59444
Buggy source:
public GuiAugmentableBase(Container container,TileEntity tile,EntityPlayer player,ResourceLocation texture){
  super(container,texture);
  myTile=(TileAugmentable)tile;
  name=myTile.getInventoryName();
  playerName=player.getGameProfile().getId();
  if (myTile.enableSecurity() && myTile.isSecured()) {
    myTutorial+="String_Node_Str" + StringHelper.tutorialTabSecurity();
  }
  if (myTile.augmentRedstoneControl) {
    myTutorial+="String_Node_Str" + StringHelper.tutorialTabRedstone();
  }
  if (myTile.augmentReconfigSides) {
    myTutorial+="String_Node_Str" + StringHelper.tutorialTabConfiguration();
  }
  if (myTile.getMaxEnergyStored(ForgeDirection.UNKNOWN) > 0) {
    myTutorial+="String_Node_Str" + StringHelper.tutorialTabFluxRequired();
  }
}

Fixed version (ground truth):
public GuiAugmentableBase(Container container,TileEntity tile,EntityPlayer player,ResourceLocation texture){
  super(container,texture);
  myTile=(TileAugmentable)tile;
  name=myTile.getInventoryName();
  playerName=SecurityHelper.getID(player);
  if (myTile.enableSecurity() && myTile.isSecured()) {
    myTutorial+="String_Node_Str" + StringHelper.tutorialTabSecurity();
  }
  if (myTile.augmentRedstoneControl) {
    myTutorial+="String_Node_Str" + StringHelper.tutorialTabRedstone();
  }
  if (myTile.augmentReconfigSides) {
    myTutorial+="String_Node_Str" + StringHelper.tutorialTabConfiguration();
  }
  if (myTile.getMaxEnergyStored(ForgeDirection.UNKNOWN) > 0) {
    myTutorial+="String_Node_Str" + StringHelper.tutorialTabFluxRequired();
  }
}
Program: 59445
Project: 59445
Buggy source:
public GuiCell(InventoryPlayer inventory,TileEntity theTile){
  super(new ContainerTEBase(inventory,theTile),TEXTURE);
  myTile=(TileCell)theTile;
  name=myTile.getInventoryName();
  playerName=inventory.player.getGameProfile().getId();
  generateInfo("String_Node_Str",2);
}

Fixed version (ground truth):
public GuiCell(InventoryPlayer inventory,TileEntity theTile){
  super(new ContainerTEBase(inventory,theTile),TEXTURE);
  myTile=(TileCell)theTile;
  name=myTile.getInventoryName();
  playerName=SecurityHelper.getID(inventory.player);
  generateInfo("String_Node_Str",2);
}
Program: 59446
Project: 59446
Buggy source:
public GuiSatchel(InventoryPlayer inventory,ContainerSatchel container){
  super(container);
  playerName=inventory.player.getGameProfile().getId();
  storageIndex=ItemSatchel.getStorageIndex(container.getContainerStack());
  enchanted=ItemSatchel.isEnchanted(container.getContainerStack());
  secure=SecurityHelper.isSecure(container.getContainerStack());
  texture=CoFHProps.TEXTURE_STORAGE[storageIndex];
  name=container.getInventoryName();
  allowUserInput=false;
  xSize=14 + 18 * MathHelper.clampI(storageIndex + 1,9,13);
  ySize=112 + 18 * MathHelper.clampI(storageIndex,2,8);
  if (storageIndex == ItemSatchel.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 (!enchanted) {
      myInfo+="String_Node_Str" + StringHelper.localize("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
public GuiSatchel(InventoryPlayer inventory,ContainerSatchel container){
  super(container);
  playerName=SecurityHelper.getID(inventory.player);
  storageIndex=ItemSatchel.getStorageIndex(container.getContainerStack());
  enchanted=ItemSatchel.isEnchanted(container.getContainerStack());
  secure=SecurityHelper.isSecure(container.getContainerStack());
  texture=CoFHProps.TEXTURE_STORAGE[storageIndex];
  name=container.getInventoryName();
  allowUserInput=false;
  xSize=14 + 18 * MathHelper.clampI(storageIndex + 1,9,13);
  ySize=112 + 18 * MathHelper.clampI(storageIndex,2,8);
  if (storageIndex == ItemSatchel.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 (!enchanted) {
      myInfo+="String_Node_Str" + StringHelper.localize("String_Node_Str");
    }
  }
}
Program: 59447
Project: 59447
Buggy source:
public GuiStrongbox(InventoryPlayer inventory,TileEntity tile){
  super(new ContainerStrongbox(inventory,tile));
  myTile=(TileStrongbox)tile;
  playerName=inventory.player.getGameProfile().getId();
  storageIndex=myTile.getStorageIndex();
  texture=CoFHProps.TEXTURE_STORAGE[storageIndex];
  name=myTile.getInventoryName();
  xSize=14 + 18 * MathHelper.clampI(storageIndex + 1,9,13);
  ySize=112 + 18 * MathHelper.clampI(storageIndex,2,8);
  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");
    }
  }
}

Fixed version (ground truth):
public GuiStrongbox(InventoryPlayer inventory,TileEntity tile){
  super(new ContainerStrongbox(inventory,tile));
  myTile=(TileStrongbox)tile;
  playerName=SecurityHelper.getID(inventory.player);
  storageIndex=myTile.getStorageIndex();
  texture=CoFHProps.TEXTURE_STORAGE[storageIndex];
  name=myTile.getInventoryName();
  xSize=14 + 18 * MathHelper.clampI(storageIndex + 1,9,13);
  ySize=112 + 18 * MathHelper.clampI(storageIndex,2,8);
  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");
    }
  }
}
Program: 59448
Project: 59448
Buggy source:
public GuiWorkbench(InventoryPlayer inventory,TileEntity theTile){
  super(new ContainerWorkbench(inventory,theTile),TEXTURE);
  myTile=(TileWorkbench)theTile;
  name=myTile.getInventoryName();
  playerName=inventory.player.getGameProfile().getId();
  ySize=210;
  generateInfo("String_Node_Str",3);
}

Fixed version (ground truth):
public GuiWorkbench(InventoryPlayer inventory,TileEntity theTile){
  super(new ContainerWorkbench(inventory,theTile),TEXTURE);
  myTile=(TileWorkbench)theTile;
  name=myTile.getInventoryName();
  playerName=SecurityHelper.getID(inventory.player);
  ySize=210;
  generateInfo("String_Node_Str",3);
}
Program: 59449
Project: 59449
Buggy source:
public GuiDynamoBase(Container container,TileEntity tile,EntityPlayer player,ResourceLocation texture){
  super(container,texture);
  myTile=(TileDynamoBase)tile;
  name=myTile.getInventoryName();
  playerName=player.getGameProfile().getId();
  if (myTile.augmentRedstoneControl) {
    myTutorial+="String_Node_Str" + StringHelper.tutorialTabRedstone();
  }
}

Fixed version (ground truth):
public GuiDynamoBase(Container container,TileEntity tile,EntityPlayer player,ResourceLocation texture){
  super(container,texture);
  myTile=(TileDynamoBase)tile;
  name=myTile.getInventoryName();
  playerName=SecurityHelper.getID(player);
  if (myTile.augmentRedstoneControl) {
    myTutorial+="String_Node_Str" + StringHelper.tutorialTabRedstone();
  }
}
Program: 59450
Project: 59450
Buggy source:
public GuiTesseract(InventoryPlayer inventory,TileEntity theTile){
  super(new ContainerTEBase(inventory,theTile,false,false),TEXTURE);
  myTile=(TileTesseract)theTile;
  name=myTile.getInventoryName();
  drawInventory=false;
  playerName=inventory.player.getGameProfile().getId();
  tempFreq=myTile.frequency;
  generateInfo("String_Node_Str",2);
}

Fixed version (ground truth):
public GuiTesseract(InventoryPlayer inventory,TileEntity theTile){
  super(new ContainerTEBase(inventory,theTile,false,false),TEXTURE);
  myTile=(TileTesseract)theTile;
  name=myTile.getInventoryName();
  drawInventory=false;
  playerName=SecurityHelper.getID(inventory.player);
  tempFreq=myTile.frequency;
  generateInfo("String_Node_Str",2);
}
Program: 59451
Project: 59451
Buggy source:
public GuiPlateImpulse(InventoryPlayer inventory,TileEntity theTile){
  super(new ContainerTEBase(inventory,theTile,false,false),TEXTURE);
  myTile=(TilePlateImpulse)theTile;
  name=myTile.getInventoryName();
  playerName=inventory.player.getGameProfile().getId();
  drawInventory=false;
  this.height=100;
  generateInfo("String_Node_Str",2);
}

Fixed version (ground truth):
public GuiPlateImpulse(InventoryPlayer inventory,TileEntity theTile){
  super(new ContainerTEBase(inventory,theTile,false,false),TEXTURE);
  myTile=(TilePlateImpulse)theTile;
  name=myTile.getInventoryName();
  playerName=SecurityHelper.getID(inventory.player);
  drawInventory=false;
  this.height=100;
  generateInfo("String_Node_Str",2);
}
Program: 59452
Project: 59452
Buggy source:
public GuiPlateSignal(InventoryPlayer inventory,TileEntity theTile){
  super(new ContainerTEBase(inventory,theTile,false,false),TEXTURE);
  myTile=(TilePlateSignal)theTile;
  name=myTile.getInventoryName();
  playerName=inventory.player.getGameProfile().getId();
  drawInventory=false;
  this.height=100;
  generateInfo("String_Node_Str",2);
}

Fixed version (ground truth):
public GuiPlateSignal(InventoryPlayer inventory,TileEntity theTile){
  super(new ContainerTEBase(inventory,theTile,false,false),TEXTURE);
  myTile=(TilePlateSignal)theTile;
  name=myTile.getInventoryName();
  playerName=SecurityHelper.getID(inventory.player);
  drawInventory=false;
  this.height=100;
  generateInfo("String_Node_Str",2);
}
Program: 59453
Project: 59453
Buggy source:
public GuiPlateTranslocate(InventoryPlayer inventory,TileEntity theTile){
  super(new ContainerTEBase(inventory,theTile,false,false),TEXTURE);
  myTile=(TilePlateTranslocate)theTile;
  name=myTile.getInventoryName();
  playerName=inventory.player.getGameProfile().getId();
  drawInventory=false;
  this.height=100;
  generateInfo("String_Node_Str",2);
}

Fixed version (ground truth):
public GuiPlateTranslocate(InventoryPlayer inventory,TileEntity theTile){
  super(new ContainerTEBase(inventory,theTile,false,false),TEXTURE);
  myTile=(TilePlateTranslocate)theTile;
  name=myTile.getInventoryName();
  playerName=SecurityHelper.getID(inventory.player);
  drawInventory=false;
  this.height=100;
  generateInfo("String_Node_Str",2);
}
Program: 59454
Project: 59454
Buggy source:
@Override protected void generate(){
  int energy;
  if (fuelRF <= 0) {
    if (EnergyHelper.isEnergyContainerItem(inventory[0])) {
      IEnergyContainerItem container=(IEnergyContainerItem)inventory[0].getItem();
      fuelRF+=container.extractEnergy(inventory[0],container.getEnergyStored(inventory[0]),false);
      currentFuelRF=redstoneRF;
    }
 else {
      energy=getEnergyValue(inventory[0]) * fuelMod / FUEL_MOD;
      fuelRF+=energy;
      currentFuelRF=energy;
      inventory[0]=ItemHelper.consumeItem(inventory[0]);
    }
  }
  energy=Math.min(fuelRF,calcEnergy() * energyMod);
  energyStorage.modifyEnergyStored(energy);
  fuelRF-=energy;
}

Fixed version (ground truth):
@Override protected void generate(){
  int energy;
  if (fuelRF <= 0) {
    if (EnergyHelper.isEnergyContainerItem(inventory[0])) {
      IEnergyContainerItem container=(IEnergyContainerItem)inventory[0].getItem();
      energy=container.extractEnergy(inventory[0],container.getEnergyStored(inventory[0]),false);
      fuelRF+=energy;
      currentFuelRF=energy;
    }
 else {
      energy=getEnergyValue(inventory[0]) * fuelMod / FUEL_MOD;
      fuelRF+=energy;
      currentFuelRF=energy;
      inventory[0]=ItemHelper.consumeItem(inventory[0]);
    }
  }
  energy=Math.min(fuelRF,calcEnergy() * energyMod);
  energyStorage.modifyEnergyStored(energy);
  fuelRF-=energy;
}
Program: 59455
Project: 59455
Buggy source:
protected void updateAdjacentSources(){
  inHell=worldObj.getBiomeGenForCoords(xCoord,zCoord) == BiomeGenBase.hell;
  adjacentSources=0;
  Block block=worldObj.getBlock(xCoord - 1,yCoord,zCoord);
  int bMeta=worldObj.getBlockMetadata(xCoord - 1,yCoord,zCoord);
  if (bMeta == 0 && (block == Blocks.water || block == Blocks.flowing_water)) {
    ++adjacentSources;
  }
  block=worldObj.getBlock(xCoord + 1,yCoord,zCoord);
  bMeta=worldObj.getBlockMetadata(xCoord + 1,yCoord,zCoord);
  if (bMeta == 0 && (block == Blocks.water || block == Blocks.flowing_water)) {
    ++adjacentSources;
  }
  block=worldObj.getBlock(xCoord,yCoord,zCoord - 1);
  bMeta=worldObj.getBlockMetadata(xCoord,yCoord,zCoord - 1);
  if (bMeta == 0 && (block == Blocks.water || block == Blocks.flowing_water)) {
    ++adjacentSources;
  }
  block=worldObj.getBlock(xCoord,yCoord,zCoord + 1);
  bMeta=worldObj.getBlockMetadata(xCoord,yCoord,zCoord + 1);
  if (bMeta == 0 && (block == Blocks.water || block == Blocks.flowing_water)) {
    ++adjacentSources;
  }
}

Fixed version (ground truth):
protected void updateAdjacentSources(){
  inHell=worldObj.getBiomeGenForCoords(xCoord,zCoord) == BiomeGenBase.hell;
  adjacentSources=0;
  Block block=worldObj.getBlock(xCoord,yCoord - 1,zCoord);
  int bMeta=worldObj.getBlockMetadata(xCoord,yCoord - 1,zCoord);
  if (bMeta == 0 && (block == Blocks.water || block == Blocks.flowing_water)) {
    ++adjacentSources;
  }
  block=worldObj.getBlock(xCoord,yCoord + 1,zCoord);
  bMeta=worldObj.getBlockMetadata(xCoord,yCoord + 1,zCoord);
  if (bMeta == 0 && (block == Blocks.water || block == Blocks.flowing_water)) {
    ++adjacentSources;
  }
  block=worldObj.getBlock(xCoord - 1,yCoord,zCoord);
  bMeta=worldObj.getBlockMetadata(xCoord - 1,yCoord,zCoord);
  if (bMeta == 0 && (block == Blocks.water || block == Blocks.flowing_water)) {
    ++adjacentSources;
  }
  block=worldObj.getBlock(xCoord + 1,yCoord,zCoord);
  bMeta=worldObj.getBlockMetadata(xCoord + 1,yCoord,zCoord);
  if (bMeta == 0 && (block == Blocks.water || block == Blocks.flowing_water)) {
    ++adjacentSources;
  }
  block=worldObj.getBlock(xCoord,yCoord,zCoord - 1);
  bMeta=worldObj.getBlockMetadata(xCoord,yCoord,zCoord - 1);
  if (bMeta == 0 && (block == Blocks.water || block == Blocks.flowing_water)) {
    ++adjacentSources;
  }
  block=worldObj.getBlock(xCoord,yCoord,zCoord + 1);
  bMeta=worldObj.getBlockMetadata(xCoord,yCoord,zCoord + 1);
  if (bMeta == 0 && (block == Blocks.water || block == Blocks.flowing_water)) {
    ++adjacentSources;
  }
}
Program: 59456
Project: 59456
Buggy source:
@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);
  }
}

Fixed version (ground truth):
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player)) {
    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: 59457
Project: 59457
Buggy source:
@Override public void writePortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  RedstoneControlHelper.setItemStackTagRS(tag,this);
  ReconfigurableHelper.setItemStackTagReconfig(tag,this);
}

Fixed version (ground truth):
@Override public void writePortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player)) {
    return;
  }
  RedstoneControlHelper.setItemStackTagRS(tag,this);
  ReconfigurableHelper.setItemStackTagReconfig(tag,this);
}
Program: 59458
Project: 59458
Buggy source:
@Override public void sendGuiNetworkData(Container container,ICrafting player){
  super.sendGuiNetworkData(container,player);
  player.sendProgressBarUpdate(container,0,canPlayerAccess(((EntityPlayer)player).getCommandSenderName()) ? 1 : 0);
}

Fixed version (ground truth):
@Override public void sendGuiNetworkData(Container container,ICrafting player){
  super.sendGuiNetworkData(container,player);
  player.sendProgressBarUpdate(container,0,canPlayerAccess(((EntityPlayer)player)) ? 1 : 0);
}
Program: 59459
Project: 59459
Buggy source:
@Override public boolean openGui(EntityPlayer player){
  if (canPlayerAccess(player.getCommandSenderName())) {
    if (hasGui()) {
      player.openGui(ThermalExpansion.instance,GuiHandler.TILE_ID,worldObj,xCoord,yCoord,zCoord);
    }
    return hasGui();
  }
  if (ServerHelper.isServerWorld(worldObj)) {
    player.addChatMessage(new ChatComponentText(StringHelper.localize("String_Node_Str") + "String_Node_Str" + getOwnerName()+ "String_Node_Str"+ StringHelper.localize("String_Node_Str")));
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean openGui(EntityPlayer player){
  if (canPlayerAccess(player)) {
    if (hasGui()) {
      player.openGui(ThermalExpansion.instance,GuiHandler.TILE_ID,worldObj,xCoord,yCoord,zCoord);
    }
    return hasGui();
  }
  if (ServerHelper.isServerWorld(worldObj)) {
    player.addChatMessage(new ChatComponentText(StringHelper.localize("String_Node_Str") + "String_Node_Str" + getOwnerName()+ "String_Node_Str"+ StringHelper.localize("String_Node_Str")));
  }
  return false;
}
Program: 59460
Project: 59460
Buggy source:
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  rsMode=RedstoneControlHelper.getControlFromNBT(tag);
  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;
    }
  }
  energySend=(tag.getInteger("String_Node_Str") * MAX_SEND[getType()]) / 1000;
  energyReceive=(tag.getInteger("String_Node_Str") * MAX_RECEIVE[getType()]) / 1000;
  markDirty();
  sendUpdatePacket(Side.CLIENT);
}

Fixed version (ground truth):
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player)) {
    return;
  }
  rsMode=RedstoneControlHelper.getControlFromNBT(tag);
  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;
    }
  }
  energySend=(tag.getInteger("String_Node_Str") * MAX_SEND[getType()]) / 1000;
  energyReceive=(tag.getInteger("String_Node_Str") * MAX_RECEIVE[getType()]) / 1000;
  markDirty();
  sendUpdatePacket(Side.CLIENT);
}
Program: 59461
Project: 59461
Buggy source:
@Override public void writePortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  RedstoneControlHelper.setItemStackTagRS(tag,this);
  ReconfigurableHelper.setItemStackTagReconfig(tag,this);
  tag.setInteger("String_Node_Str",(energySend * 1000) / MAX_SEND[getType()]);
  tag.setInteger("String_Node_Str",energyReceive * 1000 / MAX_RECEIVE[getType()]);
}

Fixed version (ground truth):
@Override public void writePortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player)) {
    return;
  }
  RedstoneControlHelper.setItemStackTagRS(tag,this);
  ReconfigurableHelper.setItemStackTagReconfig(tag,this);
  tag.setInteger("String_Node_Str",(energySend * 1000) / MAX_SEND[getType()]);
  tag.setInteger("String_Node_Str",energyReceive * 1000 / MAX_RECEIVE[getType()]);
}
Program: 59462
Project: 59462
Buggy source:
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  super.readPortableData(player,tag);
  actsSneaking=tag.getBoolean("String_Node_Str");
  leftClick=tag.getBoolean("String_Node_Str");
  tickSlot=tag.getByte("String_Node_Str");
  angle=tag.getByte("String_Node_Str");
}

Fixed version (ground truth):
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player)) {
    return;
  }
  super.readPortableData(player,tag);
  actsSneaking=tag.getBoolean("String_Node_Str");
  leftClick=tag.getBoolean("String_Node_Str");
  tickSlot=tag.getByte("String_Node_Str");
  angle=tag.getByte("String_Node_Str");
}
Program: 59463
Project: 59463
Buggy source:
@Override public void writePortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  super.writePortableData(player,tag);
  tag.setBoolean("String_Node_Str",actsSneaking);
  tag.setBoolean("String_Node_Str",leftClick);
  tag.setByte("String_Node_Str",tickSlot);
  tag.setByte("String_Node_Str",angle);
}

Fixed version (ground truth):
@Override public void writePortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player)) {
    return;
  }
  super.writePortableData(player,tag);
  tag.setBoolean("String_Node_Str",actsSneaking);
  tag.setBoolean("String_Node_Str",leftClick);
  tag.setByte("String_Node_Str",tickSlot);
  tag.setByte("String_Node_Str",angle);
}
Program: 59464
Project: 59464
Buggy source:
@Override public void sendGuiNetworkData(Container container,ICrafting player){
  player.sendProgressBarUpdate(container,0,canPlayerAccess(((EntityPlayer)player).getCommandSenderName()) ? 1 : 0);
}

Fixed version (ground truth):
@Override public void sendGuiNetworkData(Container container,ICrafting player){
  player.sendProgressBarUpdate(container,0,canPlayerAccess(((EntityPlayer)player)) ? 1 : 0);
}
Program: 59465
Project: 59465
Buggy source:
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  if (augmentRedstoneControl) {
    rsMode=RedstoneControlHelper.getControlFromNBT(tag);
  }
}

Fixed version (ground truth):
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player)) {
    return;
  }
  if (augmentRedstoneControl) {
    rsMode=RedstoneControlHelper.getControlFromNBT(tag);
  }
}
Program: 59466
Project: 59466
Buggy source:
@Override public void writePortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  RedstoneControlHelper.setItemStackTagRS(tag,this);
}

Fixed version (ground truth):
@Override public void writePortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player)) {
    return;
  }
  RedstoneControlHelper.setItemStackTagRS(tag,this);
}
Program: 59467
Project: 59467
Buggy source:
@Override public void sendGuiNetworkData(Container container,ICrafting player){
  player.sendProgressBarUpdate(container,0,canPlayerAccess(((EntityPlayer)player).getCommandSenderName()) ? 1 : 0);
}

Fixed version (ground truth):
@Override public void sendGuiNetworkData(Container container,ICrafting player){
  player.sendProgressBarUpdate(container,0,canPlayerAccess(((EntityPlayer)player)) ? 1 : 0);
}
Program: 59468
Project: 59468
Buggy source:
@Override public boolean openGui(EntityPlayer player){
  if (CoreUtils.isFakePlayer(player)) {
    return true;
  }
  if (canPlayerAccess(player.getCommandSenderName())) {
    if (ServerHelper.isServerWorld(worldObj)) {
      sendNamesList((EntityPlayerMP)player);
    }
    player.openGui(ThermalExpansion.instance,GuiHandler.TILE_ID,worldObj,xCoord,yCoord,zCoord);
    return true;
  }
  if (ServerHelper.isServerWorld(worldObj)) {
    player.addChatMessage(new ChatComponentText(StringHelper.localize("String_Node_Str") + "String_Node_Str" + getOwnerName()+ "String_Node_Str"+ StringHelper.localize("String_Node_Str")));
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean openGui(EntityPlayer player){
  if (CoreUtils.isFakePlayer(player)) {
    return true;
  }
  if (canPlayerAccess(player)) {
    if (ServerHelper.isServerWorld(worldObj)) {
      sendNamesList((EntityPlayerMP)player);
    }
    player.openGui(ThermalExpansion.instance,GuiHandler.TILE_ID,worldObj,xCoord,yCoord,zCoord);
    return true;
  }
  if (ServerHelper.isServerWorld(worldObj)) {
    player.addChatMessage(new ChatComponentText(StringHelper.localize("String_Node_Str") + "String_Node_Str" + getOwnerName()+ "String_Node_Str"+ StringHelper.localize("String_Node_Str")));
  }
  return true;
}
Program: 59469
Project: 59469
Buggy source:
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  rsMode=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);
}

Fixed version (ground truth):
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player)) {
    return;
  }
  rsMode=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: 59470
Project: 59470
Buggy source:
@Override public void writePortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  RedstoneControlHelper.setItemStackTagRS(tag,this);
  tag.setInteger("String_Node_Str",frequency);
  tag.setByte("String_Node_Str",modeItem);
  tag.setByte("String_Node_Str",modeFluid);
  tag.setByte("String_Node_Str",modeEnergy);
}

Fixed version (ground truth):
@Override public void writePortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player)) {
    return;
  }
  RedstoneControlHelper.setItemStackTagRS(tag,this);
  tag.setInteger("String_Node_Str",frequency);
  tag.setByte("String_Node_Str",modeItem);
  tag.setByte("String_Node_Str",modeFluid);
  tag.setByte("String_Node_Str",modeEnergy);
}
Program: 59471
Project: 59471
Buggy source:
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  super.readPortableData(player,tag);
  lockPrimary=tag.getBoolean("String_Node_Str");
}

Fixed version (ground truth):
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player)) {
    return;
  }
  super.readPortableData(player,tag);
  lockPrimary=tag.getBoolean("String_Node_Str");
}
Program: 59472
Project: 59472
Buggy source:
@Override public void writePortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  super.writePortableData(player,tag);
  tag.setBoolean("String_Node_Str",lockPrimary);
}

Fixed version (ground truth):
@Override public void writePortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player)) {
    return;
  }
  super.writePortableData(player,tag);
  tag.setBoolean("String_Node_Str",lockPrimary);
}
Program: 59473
Project: 59473
Buggy source:
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  super.readPortableData(player,tag);
  lockPrimary=tag.getBoolean("String_Node_Str");
}

Fixed version (ground truth):
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player)) {
    return;
  }
  super.readPortableData(player,tag);
  lockPrimary=tag.getBoolean("String_Node_Str");
}
Program: 59474
Project: 59474
Buggy source:
@Override public void writePortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  super.writePortableData(player,tag);
  tag.setBoolean("String_Node_Str",lockPrimary);
}

Fixed version (ground truth):
@Override public void writePortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player)) {
    return;
  }
  super.writePortableData(player,tag);
  tag.setBoolean("String_Node_Str",lockPrimary);
}
Program: 59475
Project: 59475
Buggy source:
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  intensity=tag.getInteger("String_Node_Str");
  angle=tag.getInteger("String_Node_Str");
  updateForce();
  markDirty();
  sendUpdatePacket(Side.CLIENT);
}

Fixed version (ground truth):
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player)) {
    return;
  }
  intensity=tag.getInteger("String_Node_Str");
  angle=tag.getInteger("String_Node_Str");
  updateForce();
  markDirty();
  sendUpdatePacket(Side.CLIENT);
}
Program: 59476
Project: 59476
Buggy source:
@Override public void writePortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  tag.setInteger("String_Node_Str",intensity);
  tag.setInteger("String_Node_Str",angle);
}

Fixed version (ground truth):
@Override public void writePortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player)) {
    return;
  }
  tag.setInteger("String_Node_Str",intensity);
  tag.setInteger("String_Node_Str",angle);
}
Program: 59477
Project: 59477
Buggy source:
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  distance=tag.getByte("String_Node_Str");
  intensity=tag.getByte("String_Node_Str");
  duration=tag.getByte("String_Node_Str");
  markDirty();
  sendUpdatePacket(Side.CLIENT);
}

Fixed version (ground truth):
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player)) {
    return;
  }
  distance=tag.getByte("String_Node_Str");
  intensity=tag.getByte("String_Node_Str");
  duration=tag.getByte("String_Node_Str");
  markDirty();
  sendUpdatePacket(Side.CLIENT);
}
Program: 59478
Project: 59478
Buggy source:
@Override public void writePortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  tag.setByte("String_Node_Str",distance);
  tag.setByte("String_Node_Str",intensity);
  tag.setByte("String_Node_Str",duration);
}

Fixed version (ground truth):
@Override public void writePortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player)) {
    return;
  }
  tag.setByte("String_Node_Str",distance);
  tag.setByte("String_Node_Str",intensity);
  tag.setByte("String_Node_Str",duration);
}
Program: 59479
Project: 59479
Buggy source:
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  distance=tag.getByte("String_Node_Str");
  markDirty();
  sendUpdatePacket(Side.CLIENT);
}

Fixed version (ground truth):
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player)) {
    return;
  }
  distance=tag.getByte("String_Node_Str");
  markDirty();
  sendUpdatePacket(Side.CLIENT);
}
Program: 59480
Project: 59480
Buggy source:
@Override public void writePortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  tag.setByte("String_Node_Str",distance);
}

Fixed version (ground truth):
@Override public void writePortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player)) {
    return;
  }
  tag.setByte("String_Node_Str",distance);
}
Program: 59481
Project: 59481
Buggy source:
@Override public boolean canPlayerAccess(String name){
  AccessMode access=getAccess();
  if (access.isPublic() || (CoFHProps.enableOpSecureAccess && CoreUtils.isOp(name))) {
    return true;
  }
  UUID ownerID=getOwner().getId();
  if (ownerID.variant() == 0) {
    return true;
  }
  UUID otherID=UUID.fromString(PreYggdrasilConverter.func_152719_a(name));
  if (ownerID.equals(otherID)) {
    return true;
  }
  return access.isRestricted() && SocialRegistry.playerHasAccess(name,getOwner());
}

Fixed version (ground truth):
@Override public boolean canPlayerAccess(EntityPlayer player){
  AccessMode access=getAccess();
  String name=player.getCommandSenderName();
  if (access.isPublic() || (CoFHProps.enableOpSecureAccess && CoreUtils.isOp(name))) {
    return true;
  }
  UUID ownerID=getOwner().getId();
  if (ownerID.variant() == 0) {
    return true;
  }
  UUID otherID=player.getGameProfile().getId();
  if (ownerID.equals(otherID)) {
    return true;
  }
  return access.isRestricted() && SocialRegistry.playerHasAccess(name,getOwner());
}
Program: 59482
Project: 59482
Buggy source:
public int getNextStackIndex(){
  if (!needsWorld) {
    if ((leftClick && myFakePlayer.theItemInWorldManager.durabilityRemainingOnBlock > -1) || myFakePlayer.itemInUse != null) {
      return slotTracker;
    }
    if (tickSlot == 0) {
      return incrementTracker();
    }
 else     if (tickSlot == 1) {
      return getRandomStackIndex();
    }
    return 0;
  }
  return 0;
}

Fixed version (ground truth):
public int getNextStackIndex(){
  if ((leftClick && myFakePlayer.theItemInWorldManager.durabilityRemainingOnBlock > -1) || myFakePlayer.itemInUse != null) {
    return slotTracker;
  }
  if (tickSlot == 0) {
    return incrementTracker();
  }
 else   if (tickSlot == 1) {
    return getRandomStackIndex();
  }
  return 0;
}
Program: 59483
Project: 59483
Buggy source:
@Override public void onRedstoneUpdate(){
  if (!redstoneControlOrDisable() && !needsWorld && myFakePlayer.itemInUse != null) {
    myFakePlayer.stopUsingItem();
  }
 else {
    int coords[]=BlockHelper.getAdjacentCoordinatesForSide(xCoord,yCoord,zCoord,facing);
    Block block=worldObj.getBlock(coords[0],coords[1],coords[2]);
    if (block != null && block.isAir(worldObj,coords[0],coords[1],coords[2])) {
      doDeploy();
    }
  }
}

Fixed version (ground truth):
@Override public void onRedstoneUpdate(){
  if (!redstoneControlOrDisable() && myFakePlayer.itemInUse != null) {
    myFakePlayer.stopUsingItem();
  }
 else {
    int coords[]=BlockHelper.getAdjacentCoordinatesForSide(xCoord,yCoord,zCoord,facing);
    Block block=worldObj.getBlock(coords[0],coords[1],coords[2]);
    if (block != null && block.isAir(worldObj,coords[0],coords[1],coords[2])) {
      doDeploy();
    }
  }
}