nus-yam/ex-repair huggingface dataset:
Program: 34852
Project: 34852
Buggy source:
@Mod.EventHandler public void remap(FMLMissingMappingsEvent event){
  Iterator<? extends IDust> iterator=BCAItemManager.dusts.getDusts().iterator();
  for (  FMLMissingMappingsEvent.MissingMapping mapping : event.get()) {
    if (mapping.name.toLowerCase().contains("String_Node_Str")) {
      mapping.ignore();
    }
  }
}

Fixed version (ground truth):
@Mod.EventHandler public void remap(FMLMissingMappingsEvent event){
  for (  FMLMissingMappingsEvent.MissingMapping mapping : event.get()) {
    if (mapping.name.toLowerCase().contains("String_Node_Str")) {
      mapping.ignore();
    }
  }
}
Program: 34855
Project: 34855
Buggy source:
@Override public String getName(){
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getName(){
  return "String_Node_Str" + dustNumber + "String_Node_Str";
}
Program: 34856
Project: 34856
Buggy source:
@Override public boolean isValid(int meta,String name,ItemStack dust){
  return OreDictionary.getOres("String_Node_Str" + name).size() > 0 || OreDictionary.getOres("String_Node_Str" + name).size() > 0 || OreDictionary.getOres("String_Node_Str" + name).size() > 0;
}

Fixed version (ground truth):
@Override public boolean isValid(int meta,String name,ItemStack dust){
  return OreDictionary.getOres("String_Node_Str" + name).size() > 0 || OreDictionary.getOres("String_Node_Str" + name).size() > 0;
}
Program: 34857
Project: 34857
Buggy source:
@Override public void register(int meta,String name,ItemStack dust){
  OreDictionary.registerOre("String_Node_Str" + name,dust.copy());
  BCARecipeManager.duster.addRecipe("String_Node_Str" + name,dust.copy());
}

Fixed version (ground truth):
@Override public void register(int meta,String name,ItemStack dust){
  OreDictionary.registerOre("String_Node_Str" + name,dust.copy());
  ItemStack dusts=dust.copy();
  dusts.stackSize=dustNumber;
  BCARecipeManager.duster.addRecipe("String_Node_Str" + name,dusts);
}
Program: 34858
Project: 34858
Buggy source:
public static String getRFInfoTooltip(int energy,int maxEnergy){
  int percent=maxEnergy > 0 ? ((energy * 100) / maxEnergy) : 0;
  String color="String_Node_Str";
  if (percent >= 75)   color+=EnumChatFormatting.DARK_GREEN;
 else   if (percent >= 60)   color+=EnumChatFormatting.GREEN;
 else   if (percent >= 45)   color+=EnumChatFormatting.YELLOW;
 else   if (percent >= 30)   color+=EnumChatFormatting.GOLD;
 else   if (percent >= 15)   color+=EnumChatFormatting.RED;
 else   color+=EnumChatFormatting.DARK_RED;
  return color + localizeFormatted("String_Node_Str",energy,maxEnergy);
}

Fixed version (ground truth):
public static String getRFInfoTooltip(int energy,int maxEnergy){
  int percent=maxEnergy > 0 ? (int)((energy / (double)maxEnergy) * 100) : 0;
  String color="String_Node_Str";
  if (percent >= 75)   color+=EnumChatFormatting.DARK_GREEN;
 else   if (percent >= 60)   color+=EnumChatFormatting.GREEN;
 else   if (percent >= 45)   color+=EnumChatFormatting.YELLOW;
 else   if (percent >= 30)   color+=EnumChatFormatting.GOLD;
 else   if (percent >= 15)   color+=EnumChatFormatting.RED;
 else   color+=EnumChatFormatting.DARK_RED;
  return color + localizeFormatted("String_Node_Str",energy,maxEnergy);
}
Program: 34859
Project: 34859
Buggy source:
@Override public void updateEntity(){
  super.updateEntity();
  if (reloadRotation) {
    setRotation(ForgeDirection.getOrientation(worldObj.getBlockMetadata(xCoord,yCoord,zCoord)));
    reloadRotation=false;
  }
  ItemStack stack=inventory.getStackInSlot(0);
  if (stack == null)   return;
  TileEntity outputTile=getTileFromDirection(getExitSide());
  if (outputTile == null || !(outputTile instanceof IInjectable))   return;
  IInjectable injectable=(IInjectable)outputTile;
  if (!injectable.canInjectItems(getExitSide().getOpposite()))   return;
  EnumColor color=null;
  for (int i=1; i < inventory.getSizeInventory() - 1; i++) {
    if (areStacksEqual(inventory.getStackInSlot(i),stack)) {
      color=EnumColor.values()[15 - colors[1 + (i - 1) / 6]];
      break;
    }
  }
  if (color == null)   color=EnumColor.values()[15 - colors[0]];
  injectable.injectItem(stack,true,getExitSide().getOpposite(),color);
  setInventorySlotContents(0,null);
  markDirty();
}

Fixed version (ground truth):
@Override public void updateEntity(){
  super.updateEntity();
  if (reloadRotation) {
    setRotation(ForgeDirection.getOrientation(worldObj.getBlockMetadata(xCoord,yCoord,zCoord)));
    reloadRotation=false;
  }
  ItemStack stack=inventory.getStackInSlot(0);
  if (stack == null)   return;
  TileEntity outputTile=getTileFromDirection(getExitSide());
  if (outputTile == null || !(outputTile instanceof IInjectable))   return;
  IInjectable injectable=(IInjectable)outputTile;
  if (!injectable.canInjectItems(getExitSide().getOpposite()))   return;
  EnumColor color=null;
  for (int i=1; i < inventory.getSizeInventory(); i++) {
    if (areStacksEqual(inventory.getStackInSlot(i),stack)) {
      color=EnumColor.values()[15 - colors[1 + (i - 1) / 6]];
      break;
    }
  }
  if (color == null)   color=EnumColor.values()[15 - colors[0]];
  injectable.injectItem(stack,true,getExitSide().getOpposite(),color);
  setInventorySlotContents(0,null);
  markDirty();
}
Program: 34860
Project: 34860
Buggy source:
@Override public boolean isTriggerActive(TileEntity target,ForgeDirection side,IStatementContainer source,IStatementParameter[] parameters){
  return target instanceof TileKineticEnergyBufferBase && ((TileKineticEnergyBufferBase)target).getEnergyLevel() == 0;
}

Fixed version (ground truth):
@Override public boolean isTriggerActive(TileEntity target,ForgeDirection side,IStatementContainer source,IStatementParameter[] parameters){
  return target instanceof TileKineticEnergyBufferBase && ((TileKineticEnergyBufferBase)target).getEnergyStored(ForgeDirection.UNKNOWN) == 0;
}
Program: 34861
Project: 34861
Buggy source:
public FluidStack drain(FluidStack resource,boolean doDrain){
  if (fluid != null && fluid.isFluidEqual(resource))   return drain(resource.amount,doDrain);
  return null;
}

Fixed version (ground truth):
public FluidStack drain(FluidStack resource,boolean doDrain){
  FluidStack drained=null;
  if (fluid != null && fluid.isFluidEqual(resource)) {
    if (tile instanceof TileBase)     ((TileBase)tile).sync();
    drained=drain(resource.amount,doDrain);
  }
  return drained;
}
Program: 34862
Project: 34862
Buggy source:
@Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack,EntityPlayer player,List list,boolean advancedTooltips){
  int energy=getEnergyStored(stack);
  int maxEnergy=getMaxEnergyStored(stack);
  int percent=(energy * 100) / maxEnergy;
  String color="String_Node_Str";
  if (percent > 75) {
    color+=EnumChatFormatting.DARK_GREEN;
  }
 else   if (percent > 60) {
    color+=EnumChatFormatting.GREEN;
  }
 else   if (percent > 45) {
    color+=EnumChatFormatting.YELLOW;
  }
 else   if (percent > 30) {
    color+=EnumChatFormatting.GOLD;
  }
 else   if (percent > 15) {
    color+=EnumChatFormatting.RED;
  }
 else {
    color+=EnumChatFormatting.DARK_RED;
  }
  list.add((color.equals("String_Node_Str") ? "String_Node_Str" : color) + Utils.localizeFormatted("String_Node_Str",energy,maxEnergy));
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack,EntityPlayer player,List list,boolean advancedTooltips){
  int energy=getEnergyStored(stack);
  int maxEnergy=getMaxEnergyStored(stack);
  int percent=maxEnergy != 0 ? (energy * 100) / maxEnergy : 0;
  String color="String_Node_Str";
  if (percent > 75) {
    color+=EnumChatFormatting.DARK_GREEN;
  }
 else   if (percent > 60) {
    color+=EnumChatFormatting.GREEN;
  }
 else   if (percent > 45) {
    color+=EnumChatFormatting.YELLOW;
  }
 else   if (percent > 30) {
    color+=EnumChatFormatting.GOLD;
  }
 else   if (percent > 15) {
    color+=EnumChatFormatting.RED;
  }
 else {
    color+=EnumChatFormatting.DARK_RED;
  }
  list.add((color.equals("String_Node_Str") ? "String_Node_Str" : color) + Utils.localizeFormatted("String_Node_Str",energy,maxEnergy));
}
Program: 34863
Project: 34863
Buggy source:
protected void spawnDustingParticles(){
  if (!worldObj.isRemote && worldObj instanceof WorldServer) {
    WorldServer worldServer=(WorldServer)worldObj;
    ItemStack stack=getStackInSlot(0);
    if (stack != null && stack.getItem() != null && stack.stackSize > 0) {
      Item item=stack.getItem();
      String s=null;
      double offsetY=0;
      if (item instanceof ItemBlock) {
        s="String_Node_Str" + Block.getIdFromBlock(((ItemBlock)item).field_150939_a) + "String_Node_Str"+ stack.getItemDamage();
        offsetY=0.1;
      }
 else {
        s="String_Node_Str" + Item.getIdFromItem(item);
        if (stack.getHasSubtypes())         s+="String_Node_Str" + stack.getItemDamage();
        offsetY=0.5;
      }
      offsetY+=getParticleOffset();
      if (!Strings.isNullOrEmpty(s))       worldServer.func_147487_a(s,xCoord + .5,yCoord + offsetY,zCoord + .5,100,0,0,0,0.075);
    }
  }
}

Fixed version (ground truth):
protected void spawnDustingParticles(){
  if (!worldObj.isRemote && worldObj instanceof WorldServer) {
    WorldServer worldServer=(WorldServer)worldObj;
    ItemStack stack=getStackInSlot(0);
    if (stack != null && stack.getItem() != null && stack.stackSize > 0) {
      Item item=stack.getItem();
      String s=null;
      double offsetY=0;
      if (item instanceof ItemBlock) {
        s="String_Node_Str" + Block.getIdFromBlock(((ItemBlock)item).field_150939_a) + "String_Node_Str"+ stack.getItemDamage();
        offsetY=0.1;
      }
 else {
        s="String_Node_Str" + Item.getIdFromItem(item);
        if (stack.getHasSubtypes())         s+="String_Node_Str" + stack.getItemDamage();
        offsetY=0.5;
      }
      offsetY+=getParticleOffset();
      if (!Strings.isNullOrEmpty(s))       worldServer.func_147487_a(s,xCoord + .5,yCoord + offsetY,zCoord + .5,particles,0,0,0,0.075);
    }
  }
}
Program: 34864
Project: 34864
Buggy source:
public TileMechanicalDuster(){
  super(Variables.Eureka.DustT2Key2);
}

Fixed version (ground truth):
public TileMechanicalDuster(){
  super(Variables.Eureka.DustT2Key2);
  particles=5;
}
Program: 34865
Project: 34865
Buggy source:
public ContainerFluidicCompressor(InventoryPlayer inventoryPlayer,TileFluidicCompressor tile){
  super(inventoryPlayer,tile);
  addSlotToContainer(new Slot(tile,0,89,39){
    @Override public boolean isItemValid(    ItemStack stack){
      return stack != null && stack.getItem() != null && (stack.getItem() instanceof IFluidContainerItem || FluidContainerRegistry.isContainer(stack));
    }
    @Override public int getSlotStackLimit(){
      return 1;
    }
  }
);
  addSlotToContainer(new SlotOutput(tile,1,126,43));
  addPlayerInventory(8,103);
}

Fixed version (ground truth):
public ContainerFluidicCompressor(InventoryPlayer inventoryPlayer,TileFluidicCompressor tile){
  super(inventoryPlayer,tile);
  addSlotToContainer(new Slot(tile,0,89,39){
    @Override public boolean isItemValid(    ItemStack stack){
      return stack != null && stack.getItem() != null && (stack.getItem() instanceof IFluidContainerItem || FluidContainerRegistry.isContainer(stack));
    }
  }
);
  addSlotToContainer(new SlotOutput(tile,1,126,43));
  addPlayerInventory(8,103);
}
Program: 34866
Project: 34866
Buggy source:
@Override public boolean isItemValidForSlot(int slot,ItemStack stack){
  ItemStack itemStack=getStackInSlot(0);
  return stack != null && slot == 0 && (stack.getItem() instanceof IFluidContainerItem || FluidContainerRegistry.isContainer(stack)) && (itemStack == null || itemStack.getItem() == null || itemStack.stackSize + stack.stackSize <= 1);
}

Fixed version (ground truth):
@Override public boolean isItemValidForSlot(int slot,ItemStack stack){
  return stack != null && stack.getItem() != null && slot == 0 && (stack.getItem() instanceof IFluidContainerItem || FluidContainerRegistry.isContainer(stack));
}
Program: 34868
Project: 34868
Buggy source:
@Mod.EventHandler public void remap(FMLMissingMappingsEvent event){
  for (  FMLMissingMappingsEvent.MissingMapping mapping : event.get()) {
    if (mapping.name.toLowerCase().contains("String_Node_Str")) {
      if (mapping.type == GameRegistry.Type.ITEM)       mapping.remap(Item.getItemFromBlock(FluidRegistry.getFluid("String_Node_Str").getBlock()));
      if (mapping.type == GameRegistry.Type.BLOCK)       mapping.remap(FluidRegistry.getFluid("String_Node_Str").getBlock());
      continue;
    }
 else     if (mapping.name.toLowerCase().contains("String_Node_Str") && Loader.isModLoaded("String_Node_Str")) {
      if (mapping.type == GameRegistry.Type.ITEM)       mapping.remap(Item.getItemFromBlock(FluidRegistry.getFluid("String_Node_Str").getBlock()));
 else       if (mapping.type == GameRegistry.Type.BLOCK)       mapping.remap(FluidRegistry.getFluid("String_Node_Str").getBlock());
      continue;
    }
    if (!ConfigurationHandler.shouldRegisterDusts)     return;
    for (    IDust dust : BCAItemManager.dusts.getDusts()) {
      if (dust == null)       continue;
      String name=dust.getName().toLowerCase();
      if (mapping.name.toLowerCase().contains(name)) {
        mapping.remap(GameRegistry.findItem(Variables.MOD.ID,"String_Node_Str" + name));
        continue;
      }
    }
  }
}

Fixed version (ground truth):
@Mod.EventHandler public void remap(FMLMissingMappingsEvent event){
  Iterator<? extends IDust> iterator=BCAItemManager.dusts.getDusts().iterator();
  for (  FMLMissingMappingsEvent.MissingMapping mapping : event.get()) {
    if (mapping.name.toLowerCase().contains("String_Node_Str")) {
      if (mapping.type == GameRegistry.Type.ITEM)       mapping.remap(Item.getItemFromBlock(FluidRegistry.getFluid("String_Node_Str").getBlock()));
      if (mapping.type == GameRegistry.Type.BLOCK)       mapping.remap(FluidRegistry.getFluid("String_Node_Str").getBlock());
      continue;
    }
 else     if (mapping.name.toLowerCase().contains("String_Node_Str") && Loader.isModLoaded("String_Node_Str")) {
      if (mapping.type == GameRegistry.Type.ITEM)       mapping.remap(Item.getItemFromBlock(FluidRegistry.getFluid("String_Node_Str").getBlock()));
 else       if (mapping.type == GameRegistry.Type.BLOCK)       mapping.remap(FluidRegistry.getFluid("String_Node_Str").getBlock());
      continue;
    }
    if (!ConfigurationHandler.shouldRegisterDusts)     return;
    while (iterator.hasNext()) {
      IDust dust=iterator.next();
      if (dust == null)       continue;
      String name=dust.getName().toLowerCase();
      if (mapping.name.toLowerCase().contains(name)) {
        mapping.remap(GameRegistry.findItem(Variables.MOD.ID,"String_Node_Str" + name));
        iterator.remove();
        continue;
      }
    }
  }
}
Program: 34871
Project: 34871
Buggy source:
@Override public void breakBlock(World world,int x,int y,int z,Block block,int meta){
  IInventory inventory=(IInventory)world.getTileEntity(x,y,z);
  if (inventory != null) {
    inventory.openInventory();
    for (int t=0; t < inventory.getSizeInventory(); t++) {
      ItemStack stack=inventory.getStackInSlot(t);
      if (stack != null) {
        inventory.setInventorySlotContents(t,null);
        Utils.dropItemstack(world,x,y,z,stack);
      }
    }
    inventory.closeInventory();
  }
  super.breakBlock(world,x,y,z,block,meta);
}

Fixed version (ground truth):
@Override public void breakBlock(World world,int x,int y,int z,Block block,int meta){
  TileEntity tile=world.getTileEntity(x,y,z);
  if (tile != null && tile instanceof IInventory) {
    IInventory inventory=(IInventory)tile;
    for (int i=0; i < inventory.getSizeInventory(); i++) {
      ItemStack stack=inventory.getStackInSlot(i);
      if (stack != null) {
        inventory.setInventorySlotContents(i,null);
        Utils.dropItemstack(world,x,y,z,stack);
      }
    }
  }
  super.breakBlock(world,x,y,z,block,meta);
}
Program: 34872
Project: 34872
Buggy source:
private static void railcraftIntegration(){
  addNuggets("String_Node_Str");
  addNuggets("String_Node_Str");
  addNuggets("String_Node_Str");
  addNuggets("String_Node_Str");
}

Fixed version (ground truth):
private static void railcraftIntegration(){
  addNuggets("String_Node_Str");
  addNuggets("String_Node_Str");
  addNuggets("String_Node_Str");
  addNuggets("String_Node_Str");
  addNuggets("String_Node_Str");
}
Program: 34873
Project: 34873
Buggy source:
@Override public void onFallenUpon(World world,int x,int y,int z,Entity entity,float hit){
  if (entity instanceof EntityPlayer) {
    TileEntity tileEntity=world.getTileEntity(x,y,z);
    if (tileEntity instanceof TileBasicDuster)     ((TileBasicDuster)tileEntity).makeProgress((EntityPlayer)entity);
  }
}

Fixed version (ground truth):
@Override public void onFallenUpon(World world,int x,int y,int z,Entity entity,float fallDistance){
  if (entity instanceof EntityPlayer) {
    TileEntity tileEntity=world.getTileEntity(x,y,z);
    if (tileEntity instanceof TileBasicDuster)     ((TileBasicDuster)tileEntity).makeProgress((EntityPlayer)entity);
  }
}
Program: 34874
Project: 34874
Buggy source:
@Override public TileEntity createNewTileEntity(World p_149915_1_,int p_149915_2_){
  return new TileKineticCoil();
}

Fixed version (ground truth):
@Override public TileEntity createNewTileEntity(World world,int meta){
  return new TileKineticCoil();
}
Program: 34875
Project: 34875
Buggy source:
@Override public TileEntity createNewTileEntity(World world,int getal){
  return new TileKineticDuster();
}

Fixed version (ground truth):
@Override public TileEntity createNewTileEntity(World world,int meta){
  return new TileKineticDuster();
}
Program: 34876
Project: 34876
Buggy source:
@Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister register){
  sides=new IIcon[4];
  sides[0]=RenderUtils.registerIcon(register,"String_Node_Str");
  sides[1]=RenderUtils.registerIcon(register,"String_Node_Str");
  sides[2]=RenderUtils.registerIcon(register,"String_Node_Str");
  sides[3]=RenderUtils.registerIcon(register,"String_Node_Str");
  bottom=RenderUtils.registerIcon(register,"String_Node_Str");
  top=RenderUtils.registerIcon(register,"String_Node_Str");
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister register){
  sides=new IIcon[4];
  sides[0]=RenderUtils.registerIcon(register,"String_Node_Str" + type + "String_Node_Str");
  sides[1]=RenderUtils.registerIcon(register,"String_Node_Str" + type + "String_Node_Str");
  sides[2]=RenderUtils.registerIcon(register,"String_Node_Str" + type + "String_Node_Str");
  sides[3]=RenderUtils.registerIcon(register,"String_Node_Str" + type + "String_Node_Str");
  bottom=RenderUtils.registerIcon(register,"String_Node_Str" + type + "String_Node_Str");
  top=RenderUtils.registerIcon(register,"String_Node_Str" + type + "String_Node_Str");
}
Program: 34877
Project: 34877
Buggy source:
@Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister register){
  front=RenderUtils.registerIcon(register,"String_Node_Str");
  sides=RenderUtils.registerIcon(register,"String_Node_Str");
  bottom=RenderUtils.registerIcon(register,"String_Node_Str");
  top=new IIcon[4];
  top[0]=RenderUtils.registerIcon(register,"String_Node_Str");
  top[1]=RenderUtils.registerIcon(register,"String_Node_Str");
  top[2]=RenderUtils.registerIcon(register,"String_Node_Str");
  top[3]=RenderUtils.registerIcon(register,"String_Node_Str");
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister register){
  front=RenderUtils.registerIcon(register,"String_Node_Str" + type + "String_Node_Str");
  sides=RenderUtils.registerIcon(register,"String_Node_Str" + type + "String_Node_Str");
  bottom=RenderUtils.registerIcon(register,"String_Node_Str" + type + "String_Node_Str");
  top=new IIcon[4];
  top[0]=RenderUtils.registerIcon(register,"String_Node_Str" + type + "String_Node_Str");
  top[1]=RenderUtils.registerIcon(register,"String_Node_Str" + type + "String_Node_Str");
  top[2]=RenderUtils.registerIcon(register,"String_Node_Str" + type + "String_Node_Str");
  top[3]=RenderUtils.registerIcon(register,"String_Node_Str" + type + "String_Node_Str");
}
Program: 34878
Project: 34878
Buggy source:
@Mod.EventHandler public void remap(FMLMissingMappingsEvent event){
  for (  FMLMissingMappingsEvent.MissingMapping mapping : event.get()) {
    if (mapping.name.toLowerCase().contains("String_Node_Str")) {
      if (mapping.type == GameRegistry.Type.ITEM)       mapping.remap(Item.getItemFromBlock(FluidRegistry.getFluid("String_Node_Str").getBlock()));
      if (mapping.type == GameRegistry.Type.BLOCK)       mapping.remap(FluidRegistry.getFluid("String_Node_Str").getBlock());
      continue;
    }
 else     if (mapping.name.toLowerCase().contains("String_Node_Str") && Loader.isModLoaded("String_Node_Str")) {
      if (mapping.type == GameRegistry.Type.ITEM)       mapping.remap(Item.getItemFromBlock(FluidRegistry.getFluid("String_Node_Str").getBlock()));
 else       if (mapping.type == GameRegistry.Type.BLOCK)       mapping.remap(FluidRegistry.getFluid("String_Node_Str").getBlock());
      continue;
    }
    for (    IDust dust : BCAItemManager.dusts.getDusts()) {
      if (dust == null)       continue;
      String name=dust.getName().toLowerCase();
      if (mapping.name.toLowerCase().contains(name)) {
        mapping.remap(GameRegistry.findItem(Variables.MOD.ID,"String_Node_Str" + name));
      }
    }
  }
}

Fixed version (ground truth):
@Mod.EventHandler public void remap(FMLMissingMappingsEvent event){
  for (  FMLMissingMappingsEvent.MissingMapping mapping : event.get()) {
    if (mapping.name.toLowerCase().contains("String_Node_Str")) {
      if (mapping.type == GameRegistry.Type.ITEM)       mapping.remap(Item.getItemFromBlock(FluidRegistry.getFluid("String_Node_Str").getBlock()));
      if (mapping.type == GameRegistry.Type.BLOCK)       mapping.remap(FluidRegistry.getFluid("String_Node_Str").getBlock());
      continue;
    }
 else     if (mapping.name.toLowerCase().contains("String_Node_Str") && Loader.isModLoaded("String_Node_Str")) {
      if (mapping.type == GameRegistry.Type.ITEM)       mapping.remap(Item.getItemFromBlock(FluidRegistry.getFluid("String_Node_Str").getBlock()));
 else       if (mapping.type == GameRegistry.Type.BLOCK)       mapping.remap(FluidRegistry.getFluid("String_Node_Str").getBlock());
      continue;
    }
    if (!ConfigurationHandler.shouldRegisterDusts)     return;
    for (    IDust dust : BCAItemManager.dusts.getDusts()) {
      if (dust == null)       continue;
      String name=dust.getName().toLowerCase();
      if (mapping.name.toLowerCase().contains(name)) {
        mapping.remap(GameRegistry.findItem(Variables.MOD.ID,"String_Node_Str" + name));
        continue;
      }
    }
  }
}
Program: 34879
Project: 34879
Buggy source:
@Override public void onBlockPlacedBy(World world,int x,int y,int z,EntityLivingBase entity,ItemStack stack){
  if (stack.stackTagCompound != null) {
    stack.stackTagCompound.setInteger("String_Node_Str",x);
    stack.stackTagCompound.setInteger("String_Node_Str",y);
    stack.stackTagCompound.setInteger("String_Node_Str",z);
    world.getTileEntity(x,y,z).readFromNBT(stack.stackTagCompound);
  }
  if (entity instanceof EntityPlayer) {
    TileEntity tileEntity=world.getTileEntity(x,y,z);
    if (tileEntity instanceof TileKineticEnergyBufferBase)     ((TileKineticEnergyBufferBase)tileEntity).setOwner(((EntityPlayer)entity).getDisplayName());
  }
}

Fixed version (ground truth):
@Override public void onBlockPlacedBy(World world,int x,int y,int z,EntityLivingBase entity,ItemStack stack){
  TileEntity tile=world.getTileEntity(x,y,z);
  if (tile == null || !(tile instanceof TileKineticEnergyBufferBase))   return;
  if (stack.stackTagCompound != null) {
    NBTBase nbtBase=stack.stackTagCompound.copy();
    if (nbtBase instanceof NBTTagCompound) {
      NBTTagCompound tag=(NBTTagCompound)nbtBase;
      tag.setInteger("String_Node_Str",x);
      tag.setInteger("String_Node_Str",y);
      tag.setInteger("String_Node_Str",z);
      tile.readFromNBT(tag);
    }
  }
  if (entity instanceof EntityPlayer)   ((TileKineticEnergyBufferBase)tile).setOwner(((EntityPlayer)entity).getDisplayName());
}
Program: 34880
Project: 34880
Buggy source:
@Override public ItemStack slotClick(int slotNum,int mouseButton,int modifier,EntityPlayer player){
  if (slotNum < 0 || slotNum >= inventorySlots.size())   return super.slotClick(slotNum,mouseButton,modifier,player);
  Slot slot=(Slot)inventorySlots.get(slotNum);
  if (slot instanceof SlotPhantom)   return ((SlotPhantom)slot).onClick(mouseButton,player);
  return super.slotClick(slotNum,mouseButton,modifier,player);
}

Fixed version (ground truth):
@Override public ItemStack slotClick(int slotNum,int mouseButton,int modifier,EntityPlayer player){
  if (slotNum < 0 || slotNum >= inventorySlots.size())   return null;
  Slot slot=(Slot)inventorySlots.get(slotNum);
  if (slot instanceof SlotPhantom)   return ((SlotPhantom)slot).onClick(mouseButton,player);
  return super.slotClick(slotNum,mouseButton,modifier,player);
}
Program: 34882
Project: 34882
Buggy source:
public ContainerItemSorter(InventoryPlayer inventoryPlayer,TileItemSorter tile){
  super(inventoryPlayer,tile);
  for (int i=0; i < 8; i++)   addSorterSlotColumn(26 + i * 18,18,1 + i * 6);
  addPlayerInventory(8,160);
}

Fixed version (ground truth):
public ContainerItemSorter(InventoryPlayer inventoryPlayer,TileItemSorter tile){
  super(inventoryPlayer,tile);
  for (int i=0; i < 8; i++)   addSorterSlotColumn(26 + i * 18,18,1 + i * 6);
  addPlayerInventory(8,160);
  setCanShift(false);
}
Program: 34883
Project: 34883
Buggy source:
@Mod.EventHandler public void remap(FMLMissingMappingsEvent event){
  for (  FMLMissingMappingsEvent.MissingMapping mapping : event.get()) {
    if (mapping.name.toLowerCase().contains("String_Node_Str")) {
      if (mapping.type == GameRegistry.Type.ITEM)       mapping.remap(Item.getItemFromBlock(FluidRegistry.getFluid("String_Node_Str").getBlock()));
      if (mapping.type == GameRegistry.Type.BLOCK)       mapping.remap(FluidRegistry.getFluid("String_Node_Str").getBlock());
      continue;
    }
 else     if (mapping.name.toLowerCase().contains("String_Node_Str")) {
      if (mapping.type == GameRegistry.Type.ITEM)       mapping.remap(Item.getItemFromBlock(FluidRegistry.getFluid("String_Node_Str").getBlock()));
      if (mapping.type == GameRegistry.Type.BLOCK)       mapping.remap(FluidRegistry.getFluid("String_Node_Str").getBlock());
      continue;
    }
    for (    IDust dust : BCAItemManager.dusts.getDusts()) {
      if (dust == null)       continue;
      String name=dust.getName().toLowerCase();
      if (mapping.name.toLowerCase().contains(name)) {
        mapping.remap(GameRegistry.findItem(Variables.MOD.ID,"String_Node_Str" + name));
      }
    }
  }
}

Fixed version (ground truth):
@Mod.EventHandler public void remap(FMLMissingMappingsEvent event){
  for (  FMLMissingMappingsEvent.MissingMapping mapping : event.get()) {
    if (mapping.name.toLowerCase().contains("String_Node_Str")) {
      if (mapping.type == GameRegistry.Type.ITEM)       mapping.remap(Item.getItemFromBlock(FluidRegistry.getFluid("String_Node_Str").getBlock()));
      if (mapping.type == GameRegistry.Type.BLOCK)       mapping.remap(FluidRegistry.getFluid("String_Node_Str").getBlock());
      continue;
    }
 else     if (mapping.name.toLowerCase().contains("String_Node_Str") && Loader.isModLoaded("String_Node_Str")) {
      if (mapping.type == GameRegistry.Type.ITEM)       mapping.remap(Item.getItemFromBlock(FluidRegistry.getFluid("String_Node_Str").getBlock()));
 else       if (mapping.type == GameRegistry.Type.BLOCK)       mapping.remap(FluidRegistry.getFluid("String_Node_Str").getBlock());
      continue;
    }
    for (    IDust dust : BCAItemManager.dusts.getDusts()) {
      if (dust == null)       continue;
      String name=dust.getName().toLowerCase();
      if (mapping.name.toLowerCase().contains(name)) {
        mapping.remap(GameRegistry.findItem(Variables.MOD.ID,"String_Node_Str" + name));
      }
    }
  }
}
Program: 34884
Project: 34884
Buggy source:
@Override public IIcon getIconFromDamage(int damage){
  return icons[damage];
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public IIcon getIconFromDamage(int damage){
  return icons[damage];
}
Program: 34885
Project: 34885
Buggy source:
@Override public void registerIcons(IIconRegister register){
  for (int i=0; i < icons.length; i++) {
    icons[i]=RenderUtils.registerIcon(register,EnumMachineUpgrades.values()[i].getTextureName());
  }
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public void registerIcons(IIconRegister register){
  icons=new IIcon[EnumMachineUpgrades.values().length];
  for (int i=0; i < icons.length; i++) {
    icons[i]=RenderUtils.registerIcon(register,EnumMachineUpgrades.values()[i].getTextureName());
  }
}
Program: 34887
Project: 34887
Buggy source:
@Mod.EventHandler public void postInit(FMLPostInitializationEvent event){
  ModIntegration.integrate();
}

Fixed version (ground truth):
@Mod.EventHandler public void postInit(FMLPostInitializationEvent event){
}
Program: 34888
Project: 34888
Buggy source:
@Mod.EventHandler public void doneLoading(FMLLoadCompleteEvent event){
  IMCHandler.handleIMC(FMLInterModComms.fetchRuntimeMessages(this));
}

Fixed version (ground truth):
@Mod.EventHandler public void doneLoading(FMLLoadCompleteEvent event){
  ModIntegration.integrate();
  IMCHandler.handleIMC(FMLInterModComms.fetchRuntimeMessages(this));
  for (  IDust dust : BCAItemManager.dusts.getDusts())   if (dust != null)   dust.getDustType().register(dust.getMeta(),dust.getName(),dust.getDustStack());
}
Program: 34889
Project: 34889
Buggy source:
public static void integrate(){
  Triggers.register();
  addBCRecipes();
  RefineryRecipeConverter.doYourThing();
  BuildcraftAdditions.proxy.addPowerplant();
  BuilderAPI.schematicRegistry.registerSchematicBlock(ItemsAndBlocks.kebT1,SchematicBCABase.class);
  BuilderAPI.schematicRegistry.registerSchematicBlock(ItemsAndBlocks.kineticCoil,SchematicBCABase.class);
  BuilderAPI.schematicRegistry.registerSchematicBlock(ItemsAndBlocks.kineticDusterBlock,SchematicBCABase.class);
  BuilderAPI.schematicRegistry.registerSchematicBlock(ItemsAndBlocks.lavaCoilBlock,SchematicBCABase.class);
  BuilderAPI.schematicRegistry.registerSchematicBlock(ItemsAndBlocks.basicCoilBlock,SchematicBCABase.class);
  BuilderAPI.schematicRegistry.registerSchematicBlock(ItemsAndBlocks.basicDusterBlock,SchematicRotatableBCABlock.class,new int[]{2,5,3,4},true);
  BuilderAPI.schematicRegistry.registerSchematicBlock(ItemsAndBlocks.heatedFurnaceBlock,SchematicRotatableBCABlock.class,new int[]{2,5,3,4},true);
  BuilderAPI.schematicRegistry.registerSchematicBlock(ItemsAndBlocks.chargingStationBlock,SchematicRotatableBCABlock.class,new int[]{2,5,3,4},true);
  BuilderAPI.schematicRegistry.registerSchematicBlock(ItemsAndBlocks.fluidicCompressorBlock,SchematicRotatableBCABlock.class,new int[]{2,5,3,4},true);
  BuilderAPI.schematicRegistry.registerSchematicBlock(ItemsAndBlocks.mechanicalDusterBlock,SchematicRotatableBCABlock.class,new int[]{2,5,3,4},true);
  BuilderAPI.schematicRegistry.registerSchematicBlock(ItemsAndBlocks.semiAutomaticDusterBlock,SchematicRotatableBCABlock.class,new int[]{2,5,3,4},true);
  BuilderAPI.schematicRegistry.registerSchematicBlock(ItemsAndBlocks.refineryWalls,SchematicMulitblock.class);
  BuilderAPI.schematicRegistry.registerSchematicBlock(ItemsAndBlocks.refineryValve,SchematicMulitblock.class);
  BuilderAPI.schematicRegistry.registerSchematicBlock(ItemsAndBlocks.coolingTowerWalls,SchematicMulitblock.class);
  BuilderAPI.schematicRegistry.registerSchematicBlock(ItemsAndBlocks.coolingTowerValve,SchematicMulitblock.class);
  BuilderAPI.schematicRegistry.registerSchematicBlock(ItemsAndBlocks.kebT2,SchematicMulitblock.class);
  BuilderAPI.schematicRegistry.registerSchematicBlock(ItemsAndBlocks.kebT3Core,SchematicMulitblock.class);
  BuilderAPI.schematicRegistry.registerSchematicBlock(ItemsAndBlocks.kebT3Plating,SchematicMulitblock.class);
  BuilderAPI.schematicRegistry.registerSchematicBlock(ItemsAndBlocks.itemSorter,SchematicSorter.class);
}

Fixed version (ground truth):
public static void integrate(){
  Triggers.register();
  addBCRecipes();
  RefineryRecipeConverter.doYourThing();
  BuildcraftAdditions.proxy.addPowerplant();
}
Program: 34890
Project: 34890
Buggy source:
@Override public List<String> getWailaBody(ItemStack itemStack,List<String> currenttip,IWailaDataAccessor accessor,IWailaConfigHandler config){
  TileRefinery refinery=(TileRefinery)accessor.getTileEntity();
  if (!refinery.isPartOfMultiblock()) {
    currenttip.add("String_Node_Str");
  }
 else {
    if (refinery.master == null && (!refinery.isMaster())) {
      refinery.findMaster();
      if (refinery.master == null)       return currenttip;
    }
    TileRefinery master=refinery;
    if (!refinery.isMaster())     master=refinery.master;
    currenttip.add("String_Node_Str" + master.currentHeat);
    if (!master.getOutput().equals("String_Node_Str")) {
      currenttip.add("String_Node_Str" + master.requiredHeat);
      currenttip.add("String_Node_Str" + master.getInput() + "String_Node_Str"+ master.getOutput());
    }
  }
  return currenttip;
}

Fixed version (ground truth):
@Override public List<String> getWailaBody(ItemStack itemStack,List<String> currenttip,IWailaDataAccessor accessor,IWailaConfigHandler config){
  TileRefinery refinery=(TileRefinery)accessor.getTileEntity();
  if (!refinery.isPartOfMultiblock()) {
    currenttip.add(Utils.localize("String_Node_Str"));
  }
 else {
    if (refinery.master == null && (!refinery.isMaster())) {
      refinery.findMaster();
      if (refinery.master == null)       return currenttip;
    }
    TileRefinery master=refinery;
    if (!refinery.isMaster())     master=refinery.master;
    currenttip.add(Utils.localizeFormatted("String_Node_Str",master.currentHeat));
    if (!master.getOutput().equals("String_Node_Str")) {
      currenttip.add(Utils.localizeFormatted("String_Node_Str",master.requiredHeat));
      currenttip.add(Utils.localizeFormatted("String_Node_Str",master.getInput(),master.getOutput()));
    }
  }
  return currenttip;
}
Program: 34891
Project: 34891
Buggy source:
@Override public List<String> getWailaBody(ItemStack itemStack,List<String> currenttip,IWailaDataAccessor accessor,IWailaConfigHandler config){
  String upgrades="String_Node_Str";
  IUpgradableMachine machine=(IUpgradableMachine)accessor.getTileEntity();
  if (!machine.getInstalledUpgrades().isEmpty()) {
    currenttip.add("String_Node_Str");
    for (    EnumMachineUpgrades upgrade : machine.getInstalledUpgrades())     upgrades+=SpecialChars.getRenderString("String_Node_Str",String.valueOf(upgrade.ordinal()));
  }
  currenttip.add(upgrades);
  return currenttip;
}

Fixed version (ground truth):
@Override public List<String> getWailaBody(ItemStack itemStack,List<String> currenttip,IWailaDataAccessor accessor,IWailaConfigHandler config){
  String upgrades="String_Node_Str";
  IUpgradableMachine machine=(IUpgradableMachine)accessor.getTileEntity();
  if (!machine.getInstalledUpgrades().isEmpty()) {
    currenttip.add(Utils.localize("String_Node_Str"));
    for (    EnumMachineUpgrades upgrade : machine.getInstalledUpgrades())     upgrades+=SpecialChars.getRenderString("String_Node_Str",String.valueOf(upgrade.ordinal()));
  }
  currenttip.add(upgrades);
  return currenttip;
}
Program: 34892
Project: 34892
Buggy source:
@SuppressWarnings("String_Node_Str") @Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack,EntityPlayer player,List list,boolean visible){
  list.add(Integer.toString(getEnergyStored(stack)) + "String_Node_Str" + Integer.toString(maxEnergy)+ "String_Node_Str");
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack,EntityPlayer player,List list,boolean visible){
  list.add(Utils.localizeFormatted("String_Node_Str",getEnergyStored(stack),maxEnergy));
}
Program: 34893
Project: 34893
Buggy source:
@Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack,EntityPlayer player,List list,boolean visible){
  readBateries(stack);
  readUpgrades(stack);
  list.add(Integer.toString(getEnergy()) + "String_Node_Str" + Integer.toString(getCapacity())+ "String_Node_Str");
  if (Keyboard.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindSneak.getKeyCode())) {
    if (chainsaw)     list.add(String.format(Utils.localize("String_Node_Str"),Utils.localize("String_Node_Str")));
    if (digger)     list.add(String.format(Utils.localize("String_Node_Str"),Utils.localize("String_Node_Str")));
    if (drill)     list.add(String.format(Utils.localize("String_Node_Str"),Utils.localize("String_Node_Str")));
    if (hoe)     list.add(String.format(Utils.localize("String_Node_Str"),Utils.localize("String_Node_Str")));
    if (!(chainsaw && digger && drill&& hoe))     list.add(Utils.localize("String_Node_Str") + "String_Node_Str" + upgradesAllowed);
  }
 else   list.add("String_Node_Str" + Utils.localize("String_Node_Str") + "String_Node_Str");
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack,EntityPlayer player,List list,boolean visible){
  readBateries(stack);
  readUpgrades(stack);
  list.add(Utils.localizeFormatted("String_Node_Str",getEnergy(),getCapacity()));
  if (Keyboard.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindSneak.getKeyCode())) {
    if (chainsaw)     list.add(String.format(Utils.localize("String_Node_Str"),Utils.localize("String_Node_Str")));
    if (digger)     list.add(String.format(Utils.localize("String_Node_Str"),Utils.localize("String_Node_Str")));
    if (drill)     list.add(String.format(Utils.localize("String_Node_Str"),Utils.localize("String_Node_Str")));
    if (hoe)     list.add(String.format(Utils.localize("String_Node_Str"),Utils.localize("String_Node_Str")));
    if (!(chainsaw && digger && drill&& hoe))     list.add(Utils.localize("String_Node_Str") + "String_Node_Str" + upgradesAllowed);
  }
 else   list.add("String_Node_Str" + Utils.localize("String_Node_Str") + "String_Node_Str");
}
Program: 34894
Project: 34894
Buggy source:
@Override public FluidStack drain(ForgeDirection from,int maxDrain,boolean doDrain){
  if (!valve)   return null;
  if (master == null)   findMaster();
  if (master != null)   return master.realDrain(maxDrain,doDrain);
  return null;
}

Fixed version (ground truth):
@Override public FluidStack drain(ForgeDirection from,int maxDrain,boolean doDrain){
  if (isMaster())   return realDrain(maxDrain,doDrain);
  if (!valve)   return null;
  if (master == null)   findMaster();
  if (master != null)   return master.realDrain(maxDrain,doDrain);
  return null;
}
Program: 34896
Project: 34896
Buggy source:
public BlacklistedTank(String name,int capacity,TileEntity tile,final Fluid... fluids){
  super(name,capacity,tile,new IFluidAcceptor(){
    @Override public boolean accepts(    FluidStack fluidStack){
      if (fluidStack == null)       return false;
      Fluid fluid=fluidStack.getFluid();
      if (fluid == null)       return false;
      if (fluids == null)       return true;
      for (      Fluid f : fluids)       if (f != null && f.getID() == fluid.getID())       return false;
      return true;
    }
    @Override public String getDescription(){
      ArrayList<String> list=new ArrayList<String>();
      if (fluids != null)       for (      Fluid f : fluids)       if (f != null)       list.add(f.getName());
      list.trimToSize();
      return "String_Node_Str" + list.toString();
    }
  }
);
}

Fixed version (ground truth):
public BlacklistedTank(String name,int capacity,TileEntity tile,final Fluid... fluids){
  super(name,capacity,tile,new IFluidAcceptor(){
    @Override public boolean accepts(    FluidStack fluidStack){
      if (fluidStack == null)       return false;
      Fluid fluid=fluidStack.getFluid();
      if (fluid == null)       return false;
      if (fluids == null)       return true;
      for (      Fluid f : fluids)       if (f != null && f.getID() == fluid.getID())       return false;
      return true;
    }
    @Override public String getDescription(){
      ArrayList<String> list=new ArrayList<String>();
      if (fluids != null)       for (      Fluid f : fluids)       if (f != null)       list.add(f.getName());
      list.trimToSize();
      return "String_Node_Str" + list.toString();
    }
    @Override public String toString(){
      return getDescription();
    }
  }
);
}
Program: 34897
Project: 34897
Buggy source:
public WhitelistedTank(String name,int capacity,TileEntity tile,final Fluid... fluids){
  super(name,capacity,tile,new IFluidAcceptor(){
    @Override public boolean accepts(    FluidStack fluidStack){
      if (fluids == null || fluidStack == null)       return false;
      Fluid fluid=fluidStack.getFluid();
      if (fluid == null)       return false;
      for (      Fluid f : fluids)       if (f != null && f.getID() != fluid.getID())       return false;
      return true;
    }
    @Override public String getDescription(){
      ArrayList<String> list=new ArrayList<String>();
      if (fluids != null)       for (      Fluid f : fluids)       if (f != null)       list.add(f.getName());
      list.trimToSize();
      return "String_Node_Str" + list.toString();
    }
  }
);
}

Fixed version (ground truth):
public WhitelistedTank(String name,int capacity,TileEntity tile,final Fluid... fluids){
  super(name,capacity,tile,new IFluidAcceptor(){
    @Override public boolean accepts(    FluidStack fluidStack){
      if (fluids == null || fluidStack == null)       return false;
      Fluid fluid=fluidStack.getFluid();
      if (fluid == null)       return false;
      for (      Fluid f : fluids)       if (f != null && f.getID() != fluid.getID())       return false;
      return true;
    }
    @Override public String getDescription(){
      ArrayList<String> list=new ArrayList<String>();
      if (fluids != null)       for (      Fluid f : fluids)       if (f != null)       list.add(f.getName());
      list.trimToSize();
      return "String_Node_Str" + list.toString();
    }
    @Override public String toString(){
      return getDescription();
    }
  }
);
}
Program: 34898
Project: 34898
Buggy source:
@Override public void initialize(){
  for (int i=0; i < 9; i++)   addWidget(new WidgetColor(i,guiLeft + 7 + i * 18,guiTop + 125,176,0,18,18,this,tile.colors[i],texture));
}

Fixed version (ground truth):
@Override public void initialize(){
  for (int i=0; i < 9; i++) {
    addWidget(new WidgetSortingColor(i,guiLeft + 7 + i * 18,guiTop + 125,176,0,18,18,this,tile.colors[i],texture));
  }
}
Program: 34900
Project: 34900
Buggy source:
@Override public int receiveEnergy(ForgeDirection from,int maxReceive,boolean simulate){
  if (data.isMaster) {
    int recieved=maxReceive;
    if (recieved > maxEnergy - energy)     recieved=maxEnergy - energy;
    if (!simulate)     energy+=recieved;
    return recieved;
  }
 else {
    if (master == null)     findMaster();
    if (master != null)     return master.receiveEnergy(from,maxReceive,simulate);
  }
  return 0;
}

Fixed version (ground truth):
@Override public int receiveEnergy(ForgeDirection from,int maxReceive,boolean simulate){
  if (isMaster()) {
    int recieved=maxReceive;
    if (recieved > maxEnergy - energy)     recieved=maxEnergy - energy;
    if (!simulate)     energy+=recieved;
    return recieved;
  }
 else {
    if (master == null)     findMaster();
    if (master != null)     return master.receiveEnergy(from,maxReceive,simulate);
  }
  return 0;
}
Program: 34901
Project: 34901
Buggy source:
@Override public boolean onBlockActivated(World world,int x,int y,int z,EntityPlayer player,int side,float hitX,float hitY,float hitZ){
  if (player.isSneaking())   return false;
  if (!world.isRemote && (player.getCurrentEquippedItem() == null || !(player.getCurrentEquippedItem().getItem() instanceof IToolWrench))) {
    player.openGui(BuildcraftAdditions.instance,Variables.Gui.ITEM_SORTER,world,x,y,z);
    return true;
  }
  Item equipped=player.getCurrentEquippedItem() != null ? player.getCurrentEquippedItem().getItem() : null;
  if (equipped != null && equipped instanceof IToolWrench && ((IToolWrench)equipped).canWrench(player,x,y,z)) {
    getSorterTile(world,x,y,z).setRotation(ForgeDirection.getOrientation(rotate(world.getBlockMetadata(x,y,z))));
    ((IToolWrench)equipped).wrenchUsed(player,x,y,z);
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onBlockActivated(World world,int x,int y,int z,EntityPlayer player,int side,float hitX,float hitY,float hitZ){
  if (player.isSneaking())   return false;
  Item equipped=player.getCurrentEquippedItem() != null ? player.getCurrentEquippedItem().getItem() : null;
  if (equipped != null && equipped instanceof IToolWrench && ((IToolWrench)equipped).canWrench(player,x,y,z)) {
    getSorterTile(world,x,y,z).setRotation(ForgeDirection.getOrientation(rotate(world.getBlockMetadata(x,y,z))));
    ((IToolWrench)equipped).wrenchUsed(player,x,y,z);
    return true;
  }
  if (!world.isRemote)   player.openGui(BuildcraftAdditions.instance,Variables.Gui.ITEM_SORTER,world,x,y,z);
  return true;
}
Program: 34902
Project: 34902
Buggy source:
public WidgetFluidTank(int id,int x,int y,int width,int height,GuiBase gui,Tank tank){
  super(id,x,y,0,0,width,height,gui);
  setEnableClockSound(false);
  this.tank=tank;
}

Fixed version (ground truth):
public WidgetFluidTank(int id,int x,int y,int width,int height,GuiBase gui,Tank tank){
  super(id,x,y,0,0,width,height,gui,"String_Node_Str");
  setEnableClockSound(false);
  this.tank=tank;
}
Program: 34903
Project: 34903
Buggy source:
public ContainerBase(InventoryPlayer inventoryPlayer,T tile){
  this.inventoryPlayer=inventoryPlayer;
  inventory=tile;
}

Fixed version (ground truth):
public ContainerBase(InventoryPlayer inventoryPlayer,T inventory){
  this.inventoryPlayer=inventoryPlayer;
  this.inventory=inventory;
}
Program: 34904
Project: 34904
Buggy source:
@Override public ItemStack transferStackInSlot(EntityPlayer player,int slotIndex){
  ItemStack originalStack=null;
  Slot slot=(Slot)inventorySlots.get(slotIndex);
  int numSlots=inventorySlots.size();
  if (slot != null && slot.getHasStack()) {
    ItemStack stackInSlot=slot.getStack();
    originalStack=stackInSlot.copy();
    if (slotIndex >= numSlots - 9 * 4 && tryShiftItem(stackInSlot,numSlots)) {
    }
 else     if (slotIndex >= numSlots - 9 * 4 && slotIndex < numSlots - 9) {
      if (!shiftItemStack(stackInSlot,numSlots - 9,numSlots)) {
        return null;
      }
    }
 else     if (slotIndex >= numSlots - 9 && slotIndex < numSlots) {
      if (!shiftItemStack(stackInSlot,numSlots - 9 * 4,numSlots - 9)) {
        return null;
      }
    }
 else     if (!shiftItemStack(stackInSlot,numSlots - 9 * 4,numSlots)) {
      return null;
    }
    slot.onSlotChange(stackInSlot,originalStack);
    if (stackInSlot.stackSize <= 0) {
      slot.putStack(null);
    }
 else {
      slot.onSlotChanged();
    }
    if (stackInSlot.stackSize == originalStack.stackSize) {
      return null;
    }
    slot.onPickupFromSlot(player,stackInSlot);
  }
  return originalStack;
}

Fixed version (ground truth):
@Override public ItemStack transferStackInSlot(EntityPlayer player,int slotIndex){
  int numSlots=inventorySlots.size();
  if (slotIndex < 0 || slotIndex >= numSlots)   return null;
  Slot slot=(Slot)inventorySlots.get(slotIndex);
  ItemStack originalStack=null;
  if (slot != null && slot.getHasStack()) {
    ItemStack stackInSlot=slot.getStack();
    originalStack=stackInSlot.copy();
    if (slotIndex >= numSlots - 9 * 4 && tryShiftItem(stackInSlot,numSlots)) {
    }
 else     if (slotIndex >= numSlots - 9 * 4 && slotIndex < numSlots - 9) {
      if (!shiftItemStack(stackInSlot,numSlots - 9,numSlots)) {
        return null;
      }
    }
 else     if (slotIndex >= numSlots - 9 && slotIndex < numSlots) {
      if (!shiftItemStack(stackInSlot,numSlots - 9 * 4,numSlots - 9)) {
        return null;
      }
    }
 else     if (!shiftItemStack(stackInSlot,numSlots - 9 * 4,numSlots)) {
      return null;
    }
    slot.onSlotChange(stackInSlot,originalStack);
    if (stackInSlot.stackSize <= 0) {
      slot.putStack(null);
    }
 else {
      slot.onSlotChanged();
    }
    if (stackInSlot.stackSize == originalStack.stackSize) {
      return null;
    }
    slot.onPickupFromSlot(player,stackInSlot);
  }
  return originalStack;
}