nus-yam/ex-repair huggingface dataset:
Program: 59484
Project: 59484
Buggy source:
@Override public void updateEntity(){
  if (ServerHelper.isClientWorld(worldObj)) {
    return;
  }
  if (hasEnergy(ACTIVATION_ENERGY)) {
    if (!isActive) {
      worldObj.markBlockForUpdate(xCoord,yCoord,zCoord);
    }
    isActive=true;
    boolean work=false;
    if (worldObj.getTotalWorldTime() % CoFHProps.TIME_CONSTANT_HALF == 0 && redstoneControlOrDisable()) {
      work=doDeploy();
    }
 else     if (!needsWorld) {
      if (leftClick && myFakePlayer.theItemInWorldManager.durabilityRemainingOnBlock > -1) {
        work=true;
        int tickSlot=getNextStackIndex();
        myFakePlayer.theItemInWorldManager.updateBlockRemoving();
        if (myFakePlayer.theItemInWorldManager.durabilityRemainingOnBlock >= 9) {
          work=simLeftClick(myFakePlayer,getStackInSlot(tickSlot),facing);
        }
      }
 else       if (!leftClick && myFakePlayer.itemInUse != null) {
        work=true;
        int slot=getNextStackIndex();
        myFakePlayer.inventory.currentItem=slot;
        myFakePlayer.tickItemInUse(getStackInSlot(slot));
        checkItemsUpdated();
      }
    }
    if (work) {
      drainEnergy(ACTIVATION_ENERGY);
    }
  }
 else {
    if (isActive) {
      worldObj.markBlockForUpdate(xCoord,yCoord,zCoord);
    }
    isActive=false;
  }
  chargeEnergy();
}

Fixed version (ground truth):
@Override public void updateEntity(){
  if (ServerHelper.isClientWorld(worldObj)) {
    return;
  }
  if (hasEnergy(ACTIVATION_ENERGY)) {
    if (!isActive) {
      worldObj.markBlockForUpdate(xCoord,yCoord,zCoord);
    }
    isActive=true;
    boolean work=false;
    if (worldObj.getTotalWorldTime() % CoFHProps.TIME_CONSTANT_HALF == 0 && redstoneControlOrDisable()) {
      work=doDeploy();
    }
 else {
      if (leftClick && myFakePlayer.theItemInWorldManager.durabilityRemainingOnBlock > -1) {
        work=true;
        int tickSlot=getNextStackIndex();
        myFakePlayer.theItemInWorldManager.updateBlockRemoving();
        if (myFakePlayer.theItemInWorldManager.durabilityRemainingOnBlock >= 9) {
          work=simLeftClick(myFakePlayer,getStackInSlot(tickSlot),facing);
        }
      }
 else       if (!leftClick && myFakePlayer.itemInUse != null) {
        work=true;
        int slot=getNextStackIndex();
        myFakePlayer.inventory.currentItem=slot;
        myFakePlayer.tickItemInUse(getStackInSlot(slot));
        checkItemsUpdated();
      }
    }
    if (work) {
      drainEnergy(ACTIVATION_ENERGY);
    }
  }
 else {
    if (isActive) {
      worldObj.markBlockForUpdate(xCoord,yCoord,zCoord);
    }
    isActive=false;
  }
  chargeEnergy();
}
Program: 59485
Project: 59485
Buggy source:
@Override public boolean rotateBlock(){
  if (!needsWorld) {
    int coords[]=BlockHelper.getAdjacentCoordinatesForSide(xCoord,yCoord,zCoord,facing);
    myFakePlayer.theItemInWorldManager.cancelDestroyingBlock(coords[0],coords[1],coords[2]);
    myFakePlayer.theItemInWorldManager.durabilityRemainingOnBlock=-1;
  }
  return super.rotateBlock();
}

Fixed version (ground truth):
@Override public boolean rotateBlock(){
  if (inWorld) {
    int coords[]=BlockHelper.getAdjacentCoordinatesForSide(xCoord,yCoord,zCoord,facing);
    myFakePlayer.theItemInWorldManager.cancelDestroyingBlock(coords[0],coords[1],coords[2]);
    myFakePlayer.theItemInWorldManager.durabilityRemainingOnBlock=-1;
  }
  return super.rotateBlock();
}
Program: 59486
Project: 59486
Buggy source:
public void updateFakePlayer(int tickSlot){
  if (needsWorld) {
    myFakePlayer=new CoFHFakePlayer((WorldServer)worldObj);
    needsWorld=false;
  }
  myFakePlayer.inventory.mainInventory=new ItemStack[36];
  for (int i=0; i < MAX_SLOT; i++) {
    myFakePlayer.inventory.mainInventory[i]=getStackInSlot(i);
  }
  double x=xCoord + 0.5D;
  double y=yCoord - 1.1D;
  double z=zCoord + 0.5D;
  float pitch=this.angle == 0 ? 45.0F : this.angle == 1 ? 0F : -45F;
  float yaw;
switch (facing) {
case 0:
    pitch=this.angle == 0 ? -90.0F : this.angle == 1 ? 0F : 90F;
  yaw=0.0F;
y-=0.51D;
break;
case 1:
pitch=this.angle == 0 ? 90.0F : this.angle == 1 ? 0F : -90F;
yaw=0.0F;
y+=1.51D;
break;
case 2:
yaw=180.0F;
z-=0.51D;
y+=.5D;
break;
case 3:
yaw=0.0F;
z+=0.51D;
y+=.5D;
break;
case 4:
yaw=90.0F;
x-=0.51D;
y+=.5D;
break;
default :
yaw=-90.0F;
x+=0.51D;
y+=.5D;
}
myFakePlayer.setPositionAndRotation(x,y,z,yaw,pitch);
myFakePlayer.isSneaking=actsSneaking;
myFakePlayer.yOffset=-1.1F;
myFakePlayer.setItemInHand(tickSlot);
myFakePlayer.onUpdate();
}

Fixed version (ground truth):
public void updateFakePlayer(int tickSlot){
  myFakePlayer.inventory.mainInventory=new ItemStack[36];
  for (int i=0; i < MAX_SLOT; i++) {
    myFakePlayer.inventory.mainInventory[i]=getStackInSlot(i);
  }
  double x=xCoord + 0.5D;
  double y=yCoord - 1.1D;
  double z=zCoord + 0.5D;
  float pitch=this.angle == 0 ? 45.0F : this.angle == 1 ? 0F : -45F;
  float yaw;
switch (facing) {
case 0:
    pitch=this.angle == 0 ? -90.0F : this.angle == 1 ? 0F : 90F;
  yaw=0.0F;
y-=0.51D;
break;
case 1:
pitch=this.angle == 0 ? 90.0F : this.angle == 1 ? 0F : -90F;
yaw=0.0F;
y+=1.51D;
break;
case 2:
yaw=180.0F;
z-=0.51D;
y+=.5D;
break;
case 3:
yaw=0.0F;
z+=0.51D;
y+=.5D;
break;
case 4:
yaw=90.0F;
x-=0.51D;
y+=.5D;
break;
default :
yaw=-90.0F;
x+=0.51D;
y+=.5D;
}
myFakePlayer.setPositionAndRotation(x,y,z,yaw,pitch);
myFakePlayer.isSneaking=actsSneaking;
myFakePlayer.yOffset=-1.1F;
myFakePlayer.setItemInHand(tickSlot);
myFakePlayer.onUpdate();
}
Program: 59487
Project: 59487
Buggy source:
public void handleConfigSync(PacketCoFHBase payload){
  FMLEventHandler.instance.handleIdMappingEvent(null);
  TileCell.enableSecurity=payload.getBool();
  TileWorkbench.enableSecurity=payload.getBool();
  TileActivator.enableSecurity=payload.getBool();
  TileBreaker.enableSecurity=payload.getBool();
  TileNullifier.enableSecurity=payload.getBool();
  TileDynamoBase.enableSecurity=payload.getBool();
  for (int i=0; i < TileMachineBase.enableSecurity.length; i++) {
    TileMachineBase.enableSecurity[i]=payload.getBool();
  }
  TileStrongbox.enableSecurity=payload.getBool();
  ItemSatchel.enableSecurity=payload.getBool();
  log.info("String_Node_Str");
}

Fixed version (ground truth):
public void handleConfigSync(PacketCoFHBase payload){
  handleIdMapping();
  TileCell.enableSecurity=payload.getBool();
  TileWorkbench.enableSecurity=payload.getBool();
  TileActivator.enableSecurity=payload.getBool();
  TileBreaker.enableSecurity=payload.getBool();
  TileNullifier.enableSecurity=payload.getBool();
  TileDynamoBase.enableSecurity=payload.getBool();
  for (int i=0; i < TileMachineBase.enableSecurity.length; i++) {
    TileMachineBase.enableSecurity[i]=payload.getBool();
  }
  TileStrongbox.enableSecurity=payload.getBool();
  ItemSatchel.enableSecurity=payload.getBool();
  log.info("String_Node_Str");
}
Program: 59488
Project: 59488
Buggy source:
public void resetClientConfigs(){
  TileCell.configure();
  TileWorkbench.configure();
  TileActivator.configure();
  TileBreaker.configure();
  TileNullifier.configure();
  TileDynamoBase.configure();
  TileMachineBase.configure();
  TileStrongbox.configure();
  ItemSatchel.configure();
  FMLEventHandler.instance.handleIdMappingEvent(null);
  log.info(StringHelper.localize("String_Node_Str"));
}

Fixed version (ground truth):
public void resetClientConfigs(){
  TileCell.configure();
  TileWorkbench.configure();
  TileActivator.configure();
  TileBreaker.configure();
  TileNullifier.configure();
  TileDynamoBase.configure();
  TileMachineBase.configure();
  TileStrongbox.configure();
  ItemSatchel.configure();
  handleIdMapping();
  log.info(StringHelper.localize("String_Node_Str"));
}
Program: 59489
Project: 59489
Buggy source:
@SubscribeEvent public void onPlayerLogin(PlayerLoggedInEvent event){
  if (TEProps.enableAchievements) {
    event.player.addStat(TEAchievements.baseTE,1);
  }
  PacketTEBase.sendConfigSyncPacketToClient(event.player);
  handleIdMappingEvent(null);
}

Fixed version (ground truth):
@SubscribeEvent public void onPlayerLogin(PlayerLoggedInEvent event){
  if (TEProps.enableAchievements) {
    event.player.addStat(TEAchievements.baseTE,1);
  }
  PacketTEBase.sendConfigSyncPacketToClient(event.player);
}
Program: 59490
Project: 59490
Buggy source:
public FluidTankAdv getTank(){
  return tank;
}

Fixed version (ground truth):
@Override public FluidTankAdv getTank(){
  return tank;
}
Program: 59491
Project: 59491
Buggy source:
public TilePump(){
  sideCache=new byte[]{0,0,1,1,1,1};
  energyStorage=new EnergyStorage(0);
}

Fixed version (ground truth):
public TilePump(){
  sideConfig=defaultSideConfig;
  sideCache=new byte[]{0,0,1,1,1,1};
  energyStorage=new EnergyStorage(0);
}
Program: 59492
Project: 59492
Buggy source:
public FluidStack getTankFluid(){
  return tank.getFluid();
}

Fixed version (ground truth):
@Override public FluidStack getTankFluid(){
  return tank.getFluid();
}
Program: 59493
Project: 59493
Buggy source:
public static void initialize(){
}

Fixed version (ground truth):
public static void initialize(){
  defaultSideConfig=new SideConfig();
  defaultSideConfig.numGroup=2;
  defaultSideConfig.slotGroups=new int[][]{{},{}};
  defaultSideConfig.allowInsertion=new boolean[]{false,false};
  defaultSideConfig.allowExtraction=new boolean[]{false,false};
  defaultSideConfig.sideTex=new int[]{0,4};
  defaultSideConfig.defaultSides=new byte[]{0,0,1,1,1,1};
  GameRegistry.registerTileEntity(TilePump.class,"String_Node_Str");
  configure();
}
Program: 59494
Project: 59494
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",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");
}

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 * 60));
  GameRegistry.registerTileEntity(TileCharger.class,"String_Node_Str");
}
Program: 59495
Project: 59495
Buggy source:
public RecipeHandlerCrucible(){
  super();
  this.maxEnergy=400000;
}

Fixed version (ground truth):
public RecipeHandlerCrucible(){
  super();
  this.maxEnergy=400 * 1200;
}
Program: 59496
Project: 59496
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;
  }
  FluidStack fluid=null;
  if (item.stackTagCompound != null) {
    fluid=FluidStack.loadFluidStackFromNBT(item.stackTagCompound.getCompoundTag("String_Node_Str"));
  }
  RenderUtils.preItemRender();
  CCRenderState.startDrawing();
  renderFluid(item.getItemDamage(),fluid,offset,offset,offset);
  CCRenderState.draw();
  CCRenderState.startDrawing();
  renderFrame(item.getItemDamage(),0,offset,offset,offset);
  CCRenderState.draw();
  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;
  }
  FluidStack fluid=null;
  if (item.stackTagCompound != null) {
    fluid=FluidStack.loadFluidStackFromNBT(item.stackTagCompound.getCompoundTag("String_Node_Str"));
  }
  RenderUtils.preItemRender();
  CCRenderState.startDrawing();
  renderFrame(item.getItemDamage(),0,offset,offset,offset);
  CCRenderState.draw();
  CCRenderState.startDrawing();
  renderFluid(item.getItemDamage(),fluid,offset,offset,offset);
  CCRenderState.draw();
  RenderUtils.postItemRender();
  GL11.glPopMatrix();
}
Program: 59498
Project: 59498
Buggy source:
public CoFHPacket getConfigSync(){
  CoFHPacket payload=GenericTEPacket.getPacket(PacketTypes.CONFIG_SYNC);
  payload.addBool(TileCell.enableSecurity);
  payload.addBool(TileWorkbench.enableSecurity);
  payload.addBool(TileActivator.enableSecurity);
  payload.addBool(TileBreaker.enableSecurity);
  payload.addBool(TileNullifier.enableSecurity);
  payload.addBool(TileDynamoBase.enableSecurity);
  for (int i=0; i < TileMachineBase.enableSecurity.length; i++) {
    payload.addBool(TileMachineBase.enableSecurity[i]);
  }
  payload.addBool(TileStrongbox.enableSecurity);
  payload.addBool(ItemSatchel.enableSecurity);
  return payload;
}

Fixed version (ground truth):
public PacketCoFHBase getConfigSync(){
  PacketCoFHBase payload=PacketTEBase.getPacket(PacketTypes.CONFIG_SYNC);
  payload.addBool(TileCell.enableSecurity);
  payload.addBool(TileWorkbench.enableSecurity);
  payload.addBool(TileActivator.enableSecurity);
  payload.addBool(TileBreaker.enableSecurity);
  payload.addBool(TileNullifier.enableSecurity);
  payload.addBool(TileDynamoBase.enableSecurity);
  for (int i=0; i < TileMachineBase.enableSecurity.length; i++) {
    payload.addBool(TileMachineBase.enableSecurity[i]);
  }
  payload.addBool(TileStrongbox.enableSecurity);
  payload.addBool(ItemSatchel.enableSecurity);
  return payload;
}
Program: 59499
Project: 59499
Buggy source:
public void handleConfigSync(CoFHPacket payload){
  TileCell.enableSecurity=payload.getBool();
  TileWorkbench.enableSecurity=payload.getBool();
  TileActivator.enableSecurity=payload.getBool();
  TileBreaker.enableSecurity=payload.getBool();
  TileNullifier.enableSecurity=payload.getBool();
  TileDynamoBase.enableSecurity=payload.getBool();
  for (int i=0; i < TileMachineBase.enableSecurity.length; i++) {
    TileMachineBase.enableSecurity[i]=payload.getBool();
  }
  TileStrongbox.enableSecurity=payload.getBool();
  ItemSatchel.enableSecurity=payload.getBool();
  log.info("String_Node_Str");
}

Fixed version (ground truth):
public void handleConfigSync(PacketCoFHBase payload){
  TileCell.enableSecurity=payload.getBool();
  TileWorkbench.enableSecurity=payload.getBool();
  TileActivator.enableSecurity=payload.getBool();
  TileBreaker.enableSecurity=payload.getBool();
  TileNullifier.enableSecurity=payload.getBool();
  TileDynamoBase.enableSecurity=payload.getBool();
  for (int i=0; i < TileMachineBase.enableSecurity.length; i++) {
    TileMachineBase.enableSecurity[i]=payload.getBool();
  }
  TileStrongbox.enableSecurity=payload.getBool();
  ItemSatchel.enableSecurity=payload.getBool();
  log.info("String_Node_Str");
}
Program: 59500
Project: 59500
Buggy source:
@EventHandler public void initialize(FMLInitializationEvent event){
  TEItems.initialize();
  TEBlocks.initialize();
  TEPlugins.initialize();
  if (TEProps.enableAchievements) {
  }
  loadWorldGeneration();
  NetworkRegistry.INSTANCE.registerGuiHandler(instance,guiHandler);
  MinecraftForge.EVENT_BUS.register(proxy);
  GenericTEPacket.initialize();
  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);
  MinecraftForge.EVENT_BUS.register(proxy);
  PacketTEBase.initialize();
  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: 59501
Project: 59501
Buggy source:
@Override public CoFHPacket getPacket(){
  CoFHPacket payload=super.getPacket();
  payload.addBool(augmentReconfigSides);
  payload.addBool(augmentRedstoneControl);
  return payload;
}

Fixed version (ground truth):
@Override public PacketCoFHBase getPacket(){
  PacketCoFHBase payload=super.getPacket();
  payload.addBool(augmentReconfigSides);
  payload.addBool(augmentRedstoneControl);
  return payload;
}
Program: 59502
Project: 59502
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;
      }
    }
  }
  if (augmentRedstoneControl || augmentReconfigSides) {
    sendUpdatePacket(Side.CLIENT);
  }
}

Fixed version (ground truth):
@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);
  }
}
Program: 59503
Project: 59503
Buggy source:
@Override public void handleTilePacket(CoFHPacket payload,boolean isServer){
  super.handleTilePacket(payload,isServer);
  if (!isServer) {
    augmentReconfigSides=payload.getBool();
    augmentRedstoneControl=payload.getBool();
  }
 else {
    payload.getBool();
    payload.getBool();
  }
}

Fixed version (ground truth):
@Override public void handleTilePacket(PacketCoFHBase payload,boolean isServer){
  super.handleTilePacket(payload,isServer);
  if (!isServer) {
    augmentReconfigSides=payload.getBool();
    augmentRedstoneControl=payload.getBool();
  }
 else {
    payload.getBool();
    payload.getBool();
  }
}
Program: 59504
Project: 59504
Buggy source:
@Override protected void handleGuiPacket(CoFHPacket payload){
  isActive=payload.getBool();
  energyStorage.setCapacity(payload.getInt());
  energyStorage.setEnergyStored(payload.getInt());
  boolean prevReconfig=augmentReconfigSides;
  boolean prevControl=augmentRedstoneControl;
  augmentReconfigSides=payload.getBool();
  augmentRedstoneControl=payload.getBool();
  if (augmentReconfigSides != prevReconfig || augmentRedstoneControl != prevControl) {
    onInstalled();
    sendUpdatePacket(Side.SERVER);
  }
}

Fixed version (ground truth):
@Override protected void handleGuiPacket(PacketCoFHBase payload){
  isActive=payload.getBool();
  energyStorage.setCapacity(payload.getInt());
  energyStorage.setEnergyStored(payload.getInt());
  boolean prevReconfig=augmentReconfigSides;
  boolean prevControl=augmentRedstoneControl;
  augmentReconfigSides=payload.getBool();
  augmentRedstoneControl=payload.getBool();
  if (augmentReconfigSides != prevReconfig || augmentRedstoneControl != prevControl) {
    onInstalled();
    sendUpdatePacket(Side.SERVER);
  }
}
Program: 59505
Project: 59505
Buggy source:
@Override public CoFHPacket getGuiPacket(){
  CoFHPacket payload=super.getGuiPacket();
  payload.addBool(isActive);
  payload.addInt(energyStorage.getMaxEnergyStored());
  payload.addInt(energyStorage.getEnergyStored());
  payload.addBool(augmentReconfigSides);
  payload.addBool(augmentRedstoneControl);
  return payload;
}

Fixed version (ground truth):
@Override public PacketCoFHBase getGuiPacket(){
  PacketCoFHBase payload=super.getGuiPacket();
  payload.addBool(isActive);
  payload.addInt(energyStorage.getMaxEnergyStored());
  payload.addInt(energyStorage.getEnergyStored());
  payload.addBool(augmentReconfigSides);
  payload.addBool(augmentRedstoneControl);
  return payload;
}
Program: 59506
Project: 59506
Buggy source:
@Override public void installAugments(){
  resetAugments();
  for (int i=0; i < augments.length; i++) {
    augmentStatus[i]=false;
    if (Utils.isAugmentItem(augments[i])) {
      augmentStatus[i]=installAugment(i);
    }
  }
  if (CoFHCore.proxy.isServer()) {
    onInstalled();
    sendUpdatePacket(Side.CLIENT);
  }
}

Fixed version (ground truth):
@Override public void installAugments(){
  resetAugments();
  for (int i=0; i < augments.length; i++) {
    augmentStatus[i]=false;
    if (Utils.isAugmentItem(augments[i])) {
      augmentStatus[i]=installAugment(i);
    }
  }
  if (CoreUtils.isServer()) {
    onInstalled();
    sendUpdatePacket(Side.CLIENT);
  }
}
Program: 59507
Project: 59507
Buggy source:
@Override public CoFHPacket getPacket(){
  CoFHPacket payload=super.getPacket();
  payload.addByte((byte)access.ordinal());
  payload.addString(owner);
  return payload;
}

Fixed version (ground truth):
@Override public PacketCoFHBase getPacket(){
  PacketCoFHBase payload=super.getPacket();
  payload.addByte((byte)access.ordinal());
  payload.addString(owner);
  return payload;
}
Program: 59508
Project: 59508
Buggy source:
@Override public void handleTilePacket(CoFHPacket payload,boolean isServer){
  super.handleTilePacket(payload,isServer);
  access=ISecurable.AccessMode.values()[payload.getByte()];
  if (!isServer) {
    owner=payload.getString();
  }
 else {
    payload.getString();
  }
}

Fixed version (ground truth):
@Override public void handleTilePacket(PacketCoFHBase payload,boolean isServer){
  super.handleTilePacket(payload,isServer);
  access=ISecurable.AccessMode.values()[payload.getByte()];
  if (!isServer) {
    owner=payload.getString();
  }
 else {
    payload.getString();
  }
}
Program: 59509
Project: 59509
Buggy source:
@Override public void onNeighborBlockChange(){
  wasPowered=isPowered;
  isPowered=worldObj.isBlockIndirectlyGettingPowered(xCoord,yCoord,zCoord);
  if (wasPowered != isPowered && sendRedstoneUpdates()) {
    GenericTEPacket.sendRSPowerUpdatePacketToClients(this,worldObj,xCoord,yCoord,zCoord);
    onRedstoneUpdate();
  }
}

Fixed version (ground truth):
@Override public void onNeighborBlockChange(){
  wasPowered=isPowered;
  isPowered=worldObj.isBlockIndirectlyGettingPowered(xCoord,yCoord,zCoord);
  if (wasPowered != isPowered && sendRedstoneUpdates()) {
    PacketTEBase.sendRSPowerUpdatePacketToClients(this,worldObj,xCoord,yCoord,zCoord);
    onRedstoneUpdate();
  }
}
Program: 59510
Project: 59510
Buggy source:
@Override public CoFHPacket getPacket(){
  CoFHPacket payload=super.getPacket();
  payload.addBool(isPowered);
  payload.addByte(rsMode.ordinal());
  payload.addBool(isActive);
  payload.addInt(energyStorage.getEnergyStored());
  return payload;
}

Fixed version (ground truth):
@Override public PacketCoFHBase getPacket(){
  PacketCoFHBase payload=super.getPacket();
  payload.addBool(isPowered);
  payload.addByte(rsMode.ordinal());
  payload.addBool(isActive);
  payload.addInt(energyStorage.getEnergyStored());
  return payload;
}
Program: 59511
Project: 59511
Buggy source:
@Override public void handleTilePacket(CoFHPacket payload,boolean isServer){
  super.handleTilePacket(payload,isServer);
  isPowered=payload.getBool();
  rsMode=ControlMode.values()[payload.getByte()];
  if (!isServer) {
    isActive=payload.getBool();
    energyStorage.setEnergyStored(payload.getInt());
  }
 else {
    payload.getBool();
    payload.getInt();
  }
}

Fixed version (ground truth):
@Override public void handleTilePacket(PacketCoFHBase payload,boolean isServer){
  super.handleTilePacket(payload,isServer);
  isPowered=payload.getBool();
  rsMode=ControlMode.values()[payload.getByte()];
  if (!isServer) {
    isActive=payload.getBool();
    energyStorage.setEnergyStored(payload.getInt());
  }
 else {
    payload.getBool();
    payload.getInt();
  }
}
Program: 59512
Project: 59512
Buggy source:
@Override public final void setControl(ControlMode control){
  rsMode=control;
  if (ServerHelper.isClientWorld(worldObj)) {
    GenericTEPacket.sendRSConfigUpdatePacketToServer(this,this.xCoord,this.yCoord,this.zCoord);
  }
 else {
    sendUpdatePacket(Side.CLIENT);
  }
}

Fixed version (ground truth):
@Override public final void setControl(ControlMode control){
  rsMode=control;
  if (ServerHelper.isClientWorld(worldObj)) {
    PacketTEBase.sendRSConfigUpdatePacketToServer(this,this.xCoord,this.yCoord,this.zCoord);
  }
 else {
    sendUpdatePacket(Side.CLIENT);
  }
}
Program: 59513
Project: 59513
Buggy source:
@Override public CoFHPacket getPacket(){
  CoFHPacket payload=super.getPacket();
  payload.addByteArray(sideCache);
  payload.addByte(facing);
  return payload;
}

Fixed version (ground truth):
@Override public PacketCoFHBase getPacket(){
  PacketCoFHBase payload=super.getPacket();
  payload.addByteArray(sideCache);
  payload.addByte(facing);
  return payload;
}
Program: 59514
Project: 59514
Buggy source:
@Override public void handleTilePacket(CoFHPacket payload,boolean isServer){
  super.handleTilePacket(payload,isServer);
  payload.getByteArray(sideCache);
  for (int i=0; i < 6; i++) {
    if (sideCache[i] >= getNumConfig(i)) {
      sideCache[i]=0;
    }
  }
  if (!isServer) {
    facing=payload.getByte();
  }
 else {
    payload.getByte();
  }
}

Fixed version (ground truth):
@Override public void handleTilePacket(PacketCoFHBase payload,boolean isServer){
  super.handleTilePacket(payload,isServer);
  payload.getByteArray(sideCache);
  for (int i=0; i < 6; i++) {
    if (sideCache[i] >= getNumConfig(i)) {
      sideCache[i]=0;
    }
  }
  if (!isServer) {
    facing=payload.getByte();
  }
 else {
    payload.getByte();
  }
}
Program: 59515
Project: 59515
Buggy source:
@Override public CoFHPacket getPacket(){
  CoFHPacket payload=super.getPacket();
  payload.addString(tileName);
  return payload;
}

Fixed version (ground truth):
@Override public PacketCoFHBase getPacket(){
  PacketCoFHBase payload=super.getPacket();
  payload.addString(tileName);
  return payload;
}
Program: 59516
Project: 59516
Buggy source:
public CoFHPacket getModePacket(){
  CoFHPacket payload=CoFHTileInfoPacket.newPacket(this);
  payload.addByte(TEProps.PacketID.MODE.ordinal());
  return payload;
}

Fixed version (ground truth):
public PacketCoFHBase getModePacket(){
  PacketCoFHBase payload=PacketTileInfo.newPacket(this);
  payload.addByte(TEProps.PacketID.MODE.ordinal());
  return payload;
}
Program: 59517
Project: 59517
Buggy source:
protected void handleFluidPacket(CoFHPacket payload){
}

Fixed version (ground truth):
protected void handleFluidPacket(PacketCoFHBase payload){
}
Program: 59518
Project: 59518
Buggy source:
@Override public void handleTilePacket(CoFHPacket payload,boolean isServer){
  if (ServerHelper.isClientWorld(worldObj)) {
    tileName=payload.getString();
  }
 else {
    payload.getString();
  }
  worldObj.markBlockForUpdate(xCoord,yCoord,zCoord);
  callNeighborTileChange();
}

Fixed version (ground truth):
@Override public void handleTilePacket(PacketCoFHBase payload,boolean isServer){
  if (ServerHelper.isClientWorld(worldObj)) {
    tileName=payload.getString();
  }
 else {
    payload.getString();
  }
  worldObj.markBlockForUpdate(xCoord,yCoord,zCoord);
  callNeighborTileChange();
}
Program: 59519
Project: 59519
Buggy source:
@Override public void sendGuiNetworkData(Container container,ICrafting iCrafting){
  if (iCrafting instanceof EntityPlayer) {
    CoFHPacket guiPacket=getGuiPacket();
    if (guiPacket != null) {
      PacketHandler.sendTo(guiPacket,(EntityPlayer)iCrafting);
    }
  }
}

Fixed version (ground truth):
@Override public void sendGuiNetworkData(Container container,ICrafting iCrafting){
  if (iCrafting instanceof EntityPlayer) {
    PacketCoFHBase guiPacket=getGuiPacket();
    if (guiPacket != null) {
      PacketHandler.sendTo(guiPacket,(EntityPlayer)iCrafting);
    }
  }
}
Program: 59520
Project: 59520
Buggy source:
protected void handleGuiPacket(CoFHPacket payload){
}

Fixed version (ground truth):
protected void handleGuiPacket(PacketCoFHBase payload){
}
Program: 59521
Project: 59521
Buggy source:
public CoFHPacket getFluidPacket(){
  CoFHPacket payload=CoFHTileInfoPacket.newPacket(this);
  payload.addByte(TEProps.PacketID.FLUID.ordinal());
  return payload;
}

Fixed version (ground truth):
public PacketCoFHBase getFluidPacket(){
  PacketCoFHBase payload=PacketTileInfo.newPacket(this);
  payload.addByte(TEProps.PacketID.FLUID.ordinal());
  return payload;
}
Program: 59522
Project: 59522
Buggy source:
protected void handleModePacket(CoFHPacket payload){
}

Fixed version (ground truth):
protected void handleModePacket(PacketCoFHBase payload){
}
Program: 59523
Project: 59523
Buggy source:
public CoFHPacket getGuiPacket(){
  CoFHPacket payload=CoFHTileInfoPacket.newPacket(this);
  payload.addByte(TEProps.PacketID.GUI.ordinal());
  return payload;
}

Fixed version (ground truth):
public PacketCoFHBase getGuiPacket(){
  PacketCoFHBase payload=PacketTileInfo.newPacket(this);
  payload.addByte(TEProps.PacketID.GUI.ordinal());
  return payload;
}
Program: 59524
Project: 59524
Buggy source:
@Override public void handleTileInfoPacket(CoFHPacket payload,boolean isServer,EntityPlayer thePlayer){
switch (TEProps.PacketID.values()[payload.getByte()]) {
case GUI:
    handleGuiPacket(payload);
  return;
case FLUID:
handleFluidPacket(payload);
return;
case MODE:
handleModePacket(payload);
return;
default :
}
}

Fixed version (ground truth):
@Override public void handleTileInfoPacket(PacketCoFHBase payload,boolean isServer,EntityPlayer thePlayer){
switch (TEProps.PacketID.values()[payload.getByte()]) {
case GUI:
    handleGuiPacket(payload);
  return;
case FLUID:
handleFluidPacket(payload);
return;
case MODE:
handleModePacket(payload);
return;
default :
}
}
Program: 59525
Project: 59525
Buggy source:
@Override public void addInformation(ItemStack stack,EntityPlayer player,List list,boolean check){
  if (StringHelper.displayShiftForDetail && !StringHelper.isShiftKeyDown()) {
    list.add(StringHelper.shiftForDetails());
  }
  if (!StringHelper.isShiftKeyDown()) {
    return;
  }
  if (stack.stackTagCompound == null) {
    list.add(StringHelper.localize("String_Node_Str"));
    return;
  }
  boolean lock=stack.stackTagCompound.getBoolean("String_Node_Str");
  if (lock) {
    list.add(StringHelper.localize("String_Node_Str"));
  }
 else {
    list.add(StringHelper.localize("String_Node_Str"));
  }
  list.add(StringHelper.localize("String_Node_Str") + "String_Node_Str");
  if (stack.stackTagCompound.hasKey("String_Node_Str")) {
    ItemStack stored=ItemHelper.readItemStackFromNBT(stack.stackTagCompound.getCompoundTag("String_Node_Str"));
    list.add("String_Node_Str" + StringHelper.BRIGHT_GREEN + stored.stackSize+ "String_Node_Str"+ StringHelper.getItemName(stored));
  }
}

Fixed version (ground truth):
@Override public void addInformation(ItemStack stack,EntityPlayer player,List list,boolean check){
  if (StringHelper.displayShiftForDetail && !StringHelper.isShiftKeyDown()) {
    list.add(StringHelper.shiftForDetails());
  }
  if (!StringHelper.isShiftKeyDown()) {
    return;
  }
  list.add(StringHelper.localize("String_Node_Str") + "String_Node_Str" + TileCache.SIZE[ItemHelper.getItemDamage(stack)]);
  if (stack.stackTagCompound == null) {
    list.add(StringHelper.localize("String_Node_Str"));
    return;
  }
  boolean lock=stack.stackTagCompound.getBoolean("String_Node_Str");
  if (lock) {
    list.add(StringHelper.localize("String_Node_Str"));
  }
 else {
    list.add(StringHelper.localize("String_Node_Str"));
  }
  list.add(StringHelper.localize("String_Node_Str") + "String_Node_Str");
  if (stack.stackTagCompound.hasKey("String_Node_Str")) {
    ItemStack stored=ItemHelper.readItemStackFromNBT(stack.stackTagCompound.getCompoundTag("String_Node_Str"));
    list.add("String_Node_Str" + StringHelper.BRIGHT_GREEN + stored.stackSize+ "String_Node_Str"+ StringHelper.getItemName(stored));
  }
}
Program: 59526
Project: 59526
Buggy source:
@Override public EnumRarity getRarity(ItemStack stack){
switch (BlockCache.Types.values()[stack.getItemDamage()]) {
case CREATIVE:
    return EnumRarity.epic;
case RESONANT:
  return EnumRarity.rare;
case REINFORCED:
return EnumRarity.uncommon;
default :
return EnumRarity.common;
}
}

Fixed version (ground truth):
@Override public EnumRarity getRarity(ItemStack stack){
switch (BlockCache.Types.values()[ItemHelper.getItemDamage(stack)]) {
case CREATIVE:
    return EnumRarity.epic;
case RESONANT:
  return EnumRarity.rare;
case REINFORCED:
return EnumRarity.uncommon;
default :
return EnumRarity.common;
}
}
Program: 59527
Project: 59527
Buggy source:
@Override public String getUnlocalizedName(ItemStack stack){
  return "String_Node_Str" + BlockCache.NAMES[stack.getItemDamage()] + "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getUnlocalizedName(ItemStack stack){
  return "String_Node_Str" + BlockCache.NAMES[ItemHelper.getItemDamage(stack)] + "String_Node_Str";
}
Program: 59528
Project: 59528
Buggy source:
public void handleConfigSync(PacketCoFHBase payload){
  TileCell.enableSecurity=payload.getBool();
  TileWorkbench.enableSecurity=payload.getBool();
  TileActivator.enableSecurity=payload.getBool();
  TileBreaker.enableSecurity=payload.getBool();
  TileNullifier.enableSecurity=payload.getBool();
  TileDynamoBase.enableSecurity=payload.getBool();
  for (int i=0; i < TileMachineBase.enableSecurity.length; i++) {
    TileMachineBase.enableSecurity[i]=payload.getBool();
  }
  TileStrongbox.enableSecurity=payload.getBool();
  ItemSatchel.enableSecurity=payload.getBool();
  log.info("String_Node_Str");
}

Fixed version (ground truth):
public void handleConfigSync(PacketCoFHBase payload){
  FMLEventHandler.instance.handleIdMappingEvent(null);
  TileCell.enableSecurity=payload.getBool();
  TileWorkbench.enableSecurity=payload.getBool();
  TileActivator.enableSecurity=payload.getBool();
  TileBreaker.enableSecurity=payload.getBool();
  TileNullifier.enableSecurity=payload.getBool();
  TileDynamoBase.enableSecurity=payload.getBool();
  for (int i=0; i < TileMachineBase.enableSecurity.length; i++) {
    TileMachineBase.enableSecurity[i]=payload.getBool();
  }
  TileStrongbox.enableSecurity=payload.getBool();
  ItemSatchel.enableSecurity=payload.getBool();
  log.info("String_Node_Str");
}
Program: 59529
Project: 59529
Buggy source:
public void resetClientConfigs(){
  TileCell.configure();
  TileWorkbench.configure();
  TileActivator.configure();
  TileBreaker.configure();
  TileNullifier.configure();
  TileDynamoBase.configure();
  TileMachineBase.configure();
  TileStrongbox.configure();
  ItemSatchel.configure();
  log.info(StringHelper.localize("String_Node_Str"));
}

Fixed version (ground truth):
public void resetClientConfigs(){
  TileCell.configure();
  TileWorkbench.configure();
  TileActivator.configure();
  TileBreaker.configure();
  TileNullifier.configure();
  TileDynamoBase.configure();
  TileMachineBase.configure();
  TileStrongbox.configure();
  ItemSatchel.configure();
  FMLEventHandler.instance.handleIdMappingEvent(null);
  log.info(StringHelper.localize("String_Node_Str"));
}
Program: 59530
Project: 59530
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 (super.onBlockActivated(world,x,y,z,player,hitSide,hitX,hitY,hitZ)) {
    return true;
  }
  if (ServerHelper.isClientWorld(world)) {
    return true;
  }
  TileCache tile=(TileCache)world.getTileEntity(x,y,z);
  if (ItemHelper.isPlayerHoldingNothing(player) && player.isSneaking()) {
    tile.toggleLock();
    return true;
  }
  ItemStack heldStack=player.getCurrentEquippedItem();
  ItemStack ret=tile.insertItem(ForgeDirection.UNKNOWN,heldStack,false);
  if (!player.capabilities.isCreativeMode && ret != heldStack) {
    player.inventory.setInventorySlotContents(player.inventory.currentItem,ret);
  }
  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 (super.onBlockActivated(world,x,y,z,player,hitSide,hitX,hitY,hitZ)) {
    if (Utils.isHoldingDebugger(player) || Utils.isHoldingMultimeter(player) || Utils.isHoldingUsableWrench(player,x,y,z)) {
      return true;
    }
  }
  TileCache tile=(TileCache)world.getTileEntity(x,y,z);
  if (ItemHelper.isPlayerHoldingNothing(player)) {
    if (player.isSneaking()) {
      tile.toggleLock();
      return true;
    }
    if (tile.getStoredItemType() != null) {
      for (int i=0; i < player.inventory.getSizeInventory(); i++) {
        if (tile.insertItem(ForgeDirection.UNKNOWN,player.inventory.getStackInSlot(i),true) != player.inventory.getStackInSlot(i)) {
          player.inventory.setInventorySlotContents(i,tile.insertItem(ForgeDirection.UNKNOWN,player.inventory.getStackInSlot(i),false));
        }
      }
    }
    return true;
  }
  ItemStack heldStack=player.getCurrentEquippedItem();
  ItemStack ret=tile.insertItem(ForgeDirection.UNKNOWN,heldStack,false);
  if (!player.capabilities.isCreativeMode && ret != heldStack) {
    player.inventory.setInventorySlotContents(player.inventory.currentItem,ret);
  }
  return false;
}
Program: 59531
Project: 59531
Buggy source:
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  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.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);
}
Program: 59532
Project: 59532
Buggy source:
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  if (augmentRedstoneControl) {
    RedstoneControlHelper.getControlFromNBT(tag);
  }
}

Fixed version (ground truth):
@Override public void readPortableData(EntityPlayer player,NBTTagCompound tag){
  if (!canPlayerAccess(player.getCommandSenderName())) {
    return;
  }
  if (augmentRedstoneControl) {
    rsMode=RedstoneControlHelper.getControlFromNBT(tag);
  }
}
Program: 59533
Project: 59533
Buggy source:
@Override public int[] getAccessibleSlotsFromSide(int side){
  return SLOTS;
}

Fixed version (ground truth):
@Override public int[] getAccessibleSlotsFromSide(int side){
  if (frequency == -1 || !redstoneControlOrDisable() || !canSendItems() || inventory[0] != null) {
    return TEProps.EMPTY_INVENTORY;
  }
  return SLOTS;
}
Program: 59534
Project: 59534
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");
  markDirty();
  sendUpdatePacket(Side.CLIENT);
}

Fixed version (ground truth):
@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);
}
Program: 59535
Project: 59535
Buggy source:
@Override public boolean postInit(){
  if (enable[Types.ILLUMINATOR.ordinal()]) {
    TransposerManager.addTEFillRecipe(2000,BlockFrame.frameIlluminator,illuminator,new FluidStack(TFFluids.fluidGlowstone,1000),false);
  }
  if (enable[Types.LAMP_BASIC.ordinal()]) {
    GameRegistry.addRecipe(new ShapedOreRecipe(lampBasic,new Object[]{"String_Node_Str","String_Node_Str","String_Node_Str",'G',"String_Node_Str",'L',"String_Node_Str",'S',"String_Node_Str"}));
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean postInit(){
  if (enable[Types.ILLUMINATOR.ordinal()]) {
    TransposerManager.addTEFillRecipe(2000,BlockFrame.frameIlluminator,illuminator,new FluidStack(TFFluids.fluidGlowstone,1000),false);
  }
  if (enable[Types.LAMP_BASIC.ordinal()]) {
    GameRegistry.addRecipe(new ShapedOreRecipe(lampBasic,new Object[]{"String_Node_Str","String_Node_Str","String_Node_Str",'G',"String_Node_Str",'L',"String_Node_Str",'S',"String_Node_Str"}));
    GameRegistry.addRecipe(new ShapedOreRecipe(lampBasicAlt,new Object[]{"String_Node_Str","String_Node_Str","String_Node_Str",'G',"String_Node_Str",'L',"String_Node_Str",'S',"String_Node_Str"}));
  }
  return true;
}
Program: 59536
Project: 59536
Buggy source:
@Override public boolean initialize(){
  TileLight.initialize();
  illuminator=new ItemStack(this,1,0);
  lampBasic=new ItemStack(this,1,1);
  GameRegistry.registerCustomItemStack("String_Node_Str",illuminator);
  GameRegistry.registerCustomItemStack("String_Node_Str",lampBasic);
  return true;
}

Fixed version (ground truth):
@Override public boolean initialize(){
  TileLight.initialize();
  illuminator=new ItemStack(this,1,0);
  lampBasic=new ItemStack(this,1,1);
  lampBasicAlt=new ItemStack(this,1,2);
  GameRegistry.registerCustomItemStack("String_Node_Str",illuminator);
  GameRegistry.registerCustomItemStack("String_Node_Str",lampBasic);
  GameRegistry.registerCustomItemStack("String_Node_Str",lampBasicAlt);
  return true;
}
Program: 59537
Project: 59537
Buggy source:
public static void configure(){
  for (int i=0; i < BlockMachine.Types.values().length; i++) {
    String name=StringHelper.titleCase(BlockMachine.NAMES[i]);
    String comment="String_Node_Str" + name + "String_Node_Str";
    enableSecurity[i]=ThermalExpansion.config.get("String_Node_Str","String_Node_Str" + name + "String_Node_Str",enableSecurity[i],comment);
  }
}

Fixed version (ground truth):
public static void configure(){
  for (int i=0; i < BlockMachine.Types.values().length; i++) {
    String name=StringHelper.titleCase(BlockMachine.NAMES[i]);
    String comment="String_Node_Str" + name + "String_Node_Str";
    enableSecurity[i]=ThermalExpansion.config.get("String_Node_Str","String_Node_Str" + name + "String_Node_Str",enableSecurity[i],comment);
    comment="String_Node_Str" + name + "String_Node_Str";
    enableSound[i]=ThermalExpansion.config.get("String_Node_Str","String_Node_Str" + name + "String_Node_Str",enableSound[i],comment);
  }
}
Program: 59538
Project: 59538
Buggy source:
public ItemBlockSponge(Block block){
  super(block);
  setHasSubtypes(true);
  setMaxDamage(0);
}

Fixed version (ground truth):
public ItemBlockSponge(Block block){
  super(block);
  setHasSubtypes(true);
  setMaxDamage(0);
  setMaxStackSize(1);
  setNoRepair();
}
Program: 59539
Project: 59539
Buggy source:
@Override public boolean renderWorldBlock(IBlockAccess world,int x,int y,int z,Block block,int modelId,RenderBlocks renderer){
  TileEntity tile=world.getTileEntity(x,y,z);
  if (!(tile instanceof TileLight)) {
    return false;
  }
  TileLight theTile=(TileLight)tile;
  int bMeta=world.getBlockMetadata(x,y,z);
  RenderUtils.preWorldRender(world,x,y,z);
  int color=theTile.getColorMultiplier();
  boolean modified=theTile.modified;
  boolean active=theTile.getLightValue() > 0;
switch (BlockLight.Types.values()[bMeta]) {
case ILLUMINATOR:
    return renderWorldIlluminator(color,modified,x,y,z);
case LAMP_BASIC:
  return renderWorldLampBasic(color,active,x,y,z);
default :
return false;
}
}

Fixed version (ground truth):
@Override public boolean renderWorldBlock(IBlockAccess world,int x,int y,int z,Block block,int modelId,RenderBlocks renderer){
  TileEntity tile=world.getTileEntity(x,y,z);
  if (!(tile instanceof TileLight)) {
    return false;
  }
  TileLight theTile=(TileLight)tile;
  int bMeta=world.getBlockMetadata(x,y,z);
  RenderUtils.preWorldRender(world,x,y,z);
  int color=theTile.getColorMultiplier();
  boolean modified=theTile.modified;
  boolean active=theTile.getLightValue() > 0;
switch (BlockLight.Types.values()[bMeta]) {
case ILLUMINATOR:
    return renderWorldIlluminator(color,modified,x,y,z);
case LAMP_BASIC:
  return renderWorldLampHalo(color,active,x,y,z);
case LAMP_BASIC_ALT:
return renderWorldLampBasic(color,active,x,y,z);
default :
return false;
}
}