nus-yam/ex-repair huggingface dataset:
Program: 30519
Project: 30519
Buggy source:
public static void openGUI(EntityPlayer p,TileEntity tile,ForgeDirection side,GuiBridge type){
  if (isClient())   return;
  int x=(int)p.posX;
  int y=(int)p.posY;
  int z=(int)p.posZ;
  if (tile != null) {
    x=tile.xCoord;
    y=tile.yCoord;
    z=tile.zCoord;
  }
  if ((type.getType().isItem() && tile == null) || type.hasPermissions(tile,x,y,z,side,p)) {
    if (tile == null || type.getType() == GuiHostType.ITEM)     p.openGui(AppEng.instance,type.ordinal() << 4 | (1 << 3),p.getEntityWorld(),x,y,z);
 else     p.openGui(AppEng.instance,type.ordinal() << 4 | (side.ordinal()),tile.getWorldObj(),x,y,z);
  }
}

Fixed version (ground truth):
public static void openGUI(EntityPlayer p,TileEntity tile,ForgeDirection side,GuiBridge type){
  if (isClient())   return;
  int x=(int)p.posX;
  int y=(int)p.posY;
  int z=(int)p.posZ;
  if (tile != null) {
    x=tile.xCoord;
    y=tile.yCoord;
    z=tile.zCoord;
  }
  if ((type.getType().isItem() && tile == null) || type.hasPermissions(tile,x,y,z,side,p)) {
    if (tile != null && type.getType() == GuiHostType.ITEM)     p.openGui(AppEng.instance,type.ordinal() << 4 | (1 << 3),p.getEntityWorld(),x,y,z);
 else     if (tile == null && type.getType() == GuiHostType.ITEM)     p.openGui(AppEng.instance,type.ordinal() << 4 | (0 << 3),p.getEntityWorld(),p.inventory.currentItem,0,0);
 else     p.openGui(AppEng.instance,type.ordinal() << 4 | (side.ordinal()),tile.getWorldObj(),x,y,z);
  }
}
Program: 30520
Project: 30520
Buggy source:
@Override public IAEFluidStack injectItems(IAEFluidStack input,Actionable mode,BaseActionSource src){
  if (input != null)   target.addPower(input.getStackSize() / 1000.0);
  return null;
}

Fixed version (ground truth):
@Override public IAEFluidStack injectItems(IAEFluidStack input,Actionable mode,BaseActionSource src){
  if (mode == Actionable.SIMULATE)   return null;
  if (input != null)   target.addPower(input.getStackSize() / 1000.0);
  return null;
}
Program: 30521
Project: 30521
Buggy source:
@Override public IAEItemStack injectItems(IAEItemStack input,Actionable mode,BaseActionSource src){
  if (input != null)   target.addPower(input.getStackSize());
  return null;
}

Fixed version (ground truth):
@Override public IAEItemStack injectItems(IAEItemStack input,Actionable mode,BaseActionSource src){
  if (mode == Actionable.SIMULATE)   return null;
  if (input != null)   target.addPower(input.getStackSize());
  return null;
}
Program: 30522
Project: 30522
Buggy source:
private <T>T[] shrink(T[] in,boolean parts){
  int newSize=0;
  for (int x=0; x < in.length; x++)   if (in[x] != null)   newSize=x;
  if (newSize == 0)   return null;
  newSize++;
  if (newSize == in.length)   return in;
  T[] newArray=(T[])(parts ? new IPart[newSize] : new IFacadePart[newSize]);
  System.arraycopy(in,0,newArray,0,newSize);
  return newArray;
}

Fixed version (ground truth):
private <T>T[] shrink(T[] in,boolean parts){
  int newSize=-1;
  for (int x=0; x < in.length; x++)   if (in[x] != null)   newSize=x;
  if (newSize == -1)   return null;
  newSize++;
  if (newSize == in.length)   return in;
  T[] newArray=(T[])(parts ? new IPart[newSize] : new IFacadePart[newSize]);
  System.arraycopy(in,0,newArray,0,newSize);
  return newArray;
}
Program: 30523
Project: 30523
Buggy source:
private void checkInterfaceVsStorageBus(TileEntity target,ForgeDirection side){
  IInterfaceHost achievement=null;
  if (target instanceof IInterfaceHost)   achievement=(IInterfaceHost)target;
  if (target instanceof IPartHost) {
    Object part=((IPartHost)target).getPart(side);
    if (part instanceof IInterfaceHost)     achievement=(IInterfaceHost)part;
  }
  if (achievement != null) {
    Platform.addStat(achievement.getActionableNode().getPlayerID(),Achievements.Recursive.getAchievement());
    Platform.addStat(getActionableNode().getPlayerID(),Achievements.Recursive.getAchievement());
  }
}

Fixed version (ground truth):
private void checkInterfaceVsStorageBus(TileEntity target,ForgeDirection side){
  IInterfaceHost achievement=null;
  if (target instanceof IInterfaceHost)   achievement=(IInterfaceHost)target;
  if (target instanceof IPartHost) {
    Object part=((IPartHost)target).getPart(side);
    if (part instanceof IInterfaceHost)     achievement=(IInterfaceHost)part;
  }
  if (achievement != null) {
    Platform.addStat(achievement.getActionableNode().getPlayerID(),Achievements.Recursive.getAchievement());
  }
}
Program: 30524
Project: 30524
Buggy source:
@Override public ItemStack addItems(ItemStack A){
  if (A == null)   return null;
  if (A.stackSize == 0)   return null;
  if (p == null)   return A;
  if (p.inventory == null)   return A;
  ItemStack hand=p.inventory.getItemStack();
  if (hand != null && !Platform.isSameItem(A,hand))   return A;
  int original=0;
  ItemStack newHand=null;
  if (hand == null)   newHand=A.copy();
 else {
    newHand=hand;
    original=hand.stackSize;
    newHand.stackSize+=A.stackSize;
  }
  if (newHand.stackSize > newHand.getMaxStackSize()) {
    newHand.stackSize=newHand.getMaxStackSize();
    ItemStack B=A.copy();
    B.stackSize-=newHand.stackSize - original;
    p.inventory.setItemStack(newHand);
    return B;
  }
  p.inventory.setItemStack(newHand);
  return null;
}

Fixed version (ground truth):
@Override public ItemStack addItems(ItemStack A){
  if (A == null)   return null;
  if (A.stackSize == 0)   return null;
  if (p == null)   return A;
  if (p.inventory == null)   return A;
  ItemStack hand=p.inventory.getItemStack();
  if (hand != null && !Platform.isSameItemPrecise(A,hand))   return A;
  int original=0;
  ItemStack newHand=null;
  if (hand == null)   newHand=A.copy();
 else {
    newHand=hand;
    original=hand.stackSize;
    newHand.stackSize+=A.stackSize;
  }
  if (newHand.stackSize > newHand.getMaxStackSize()) {
    newHand.stackSize=newHand.getMaxStackSize();
    ItemStack B=A.copy();
    B.stackSize-=newHand.stackSize - original;
    p.inventory.setItemStack(newHand);
    return B;
  }
  p.inventory.setItemStack(newHand);
  return null;
}
Program: 30526
Project: 30526
Buggy source:
@Override public boolean onActivated(World w,int x,int y,int z,EntityPlayer p,int side,float hitX,float hitY,float hitZ){
  TileChest tg=getTileEntity(w,x,y,z);
  if (tg != null && !p.isSneaking()) {
    if (Platform.isClient())     return true;
    if (side != tg.getUp().ordinal()) {
      Platform.openGUI(p,tg,ForgeDirection.getOrientation(side),GuiBridge.GUI_CHEST);
    }
 else {
      ItemStack cell=tg.getStackInSlot(1);
      if (cell != null) {
        ICellHandler ch=AEApi.instance().registries().cell().getHandler(cell);
        tg.openGui(p,ch,cell,side);
      }
 else       p.addChatMessage(PlayerMessages.ChestCannotReadStorageCell.get());
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onActivated(World w,int x,int y,int z,EntityPlayer p,int side,float hitX,float hitY,float hitZ){
  TileChest tg=getTileEntity(w,x,y,z);
  if (tg != null && !p.isSneaking()) {
    if (Platform.isClient())     return true;
    if (side != tg.getUp().ordinal()) {
      Platform.openGUI(p,tg,ForgeDirection.getOrientation(side),GuiBridge.GUI_CHEST);
    }
 else {
      ItemStack cell=tg.getStackInSlot(1);
      if (cell != null) {
        ICellHandler ch=AEApi.instance().registries().cell().getHandler(cell);
        if (GuiBridge.GUI_CHEST.hasPermissions(tg,x,y,z,ForgeDirection.values()[side],p)) {
          tg.openGui(p,ch,cell,side);
        }
      }
 else       p.addChatMessage(PlayerMessages.ChestCannotReadStorageCell.get());
    }
    return true;
  }
  return false;
}
Program: 30527
Project: 30527
Buggy source:
@Override public boolean onActivated(World w,int x,int y,int z,EntityPlayer p,int side,float hitX,float hitY,float hitZ){
  TileChest tg=getTileEntity(w,x,y,z);
  if (tg != null && !p.isSneaking()) {
    if (Platform.isClient())     return true;
    if (side != tg.getUp().ordinal()) {
      Platform.openGUI(p,tg,ForgeDirection.getOrientation(side),GuiBridge.GUI_CHEST);
    }
 else {
      ItemStack cell=tg.getStackInSlot(1);
      if (cell != null) {
        ICellHandler ch=AEApi.instance().registries().cell().getHandler(cell);
        if (GuiBridge.GUI_CHEST.hasPermissions(tg,x,y,z,ForgeDirection.values()[side],p)) {
          tg.openGui(p,ch,cell,side);
        }
      }
 else       p.addChatMessage(PlayerMessages.ChestCannotReadStorageCell.get());
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onActivated(World w,int x,int y,int z,EntityPlayer p,int side,float hitX,float hitY,float hitZ){
  TileChest tg=getTileEntity(w,x,y,z);
  if (tg != null && !p.isSneaking()) {
    if (Platform.isClient())     return true;
    if (side != tg.getUp().ordinal()) {
      Platform.openGUI(p,tg,ForgeDirection.getOrientation(side),GuiBridge.GUI_CHEST);
    }
 else {
      ItemStack cell=tg.getStackInSlot(1);
      if (cell != null) {
        ICellHandler ch=AEApi.instance().registries().cell().getHandler(cell);
        tg.openGui(p,ch,cell,side);
      }
 else       p.addChatMessage(PlayerMessages.ChestCannotReadStorageCell.get());
    }
    return true;
  }
  return false;
}
Program: 30529
Project: 30529
Buggy source:
protected void mouseClickMove(int x,int y,int c,long d){
  Slot slot=this.getSlot(x,y);
  ItemStack itemstack=this.mc.thePlayer.inventory.getItemStack();
  if (slot instanceof SlotFake && itemstack != null) {
    if (c == 0) {
      try {
        PacketInventoryAction p=new PacketInventoryAction(InventoryAction.PICKUP_OR_SETDOWN,slot.slotNumber,0);
        NetworkHandler.instance.sendToServer(p);
      }
 catch (      IOException e) {
        AELog.error(e);
      }
    }
  }
 else   super.mouseClickMove(x,y,c,d);
}

Fixed version (ground truth):
protected void mouseClickMove(int x,int y,int c,long d){
  Slot slot=this.getSlot(x,y);
  ItemStack itemstack=this.mc.thePlayer.inventory.getItemStack();
  if (slot instanceof SlotFake && itemstack != null) {
    drag_click.add(slot);
    if (drag_click.size() > 1) {
      try {
        for (        Slot dr : drag_click) {
          PacketInventoryAction p=new PacketInventoryAction(c == 0 ? InventoryAction.PICKUP_OR_SETDOWN : InventoryAction.PLACE_SINGLE,dr.slotNumber,0);
          NetworkHandler.instance.sendToServer(p);
        }
      }
 catch (      IOException e) {
        AELog.error(e);
      }
    }
  }
 else   super.mouseClickMove(x,y,c,d);
}
Program: 30530
Project: 30530
Buggy source:
@Override protected void mouseClicked(int xCoord,int yCoord,int btn){
  if (btn == 1) {
    for (    Object o : this.buttonList) {
      GuiButton guibutton=(GuiButton)o;
      if (guibutton.mousePressed(this.mc,xCoord,yCoord)) {
        super.mouseClicked(xCoord,yCoord,0);
        return;
      }
    }
  }
  super.mouseClicked(xCoord,yCoord,btn);
}

Fixed version (ground truth):
@Override protected void mouseClicked(int xCoord,int yCoord,int btn){
  drag_click.clear();
  if (btn == 1) {
    for (    Object o : this.buttonList) {
      GuiButton guibutton=(GuiButton)o;
      if (guibutton.mousePressed(this.mc,xCoord,yCoord)) {
        super.mouseClicked(xCoord,yCoord,0);
        return;
      }
    }
  }
  super.mouseClicked(xCoord,yCoord,btn);
}
Program: 30532
Project: 30532
Buggy source:
public boolean commit(BaseActionSource src){
  IItemList<IAEItemStack> added=AEApi.instance().storage().createItemList();
  IItemList<IAEItemStack> pulled=AEApi.instance().storage().createItemList();
  boolean failed=false;
  if (logExtracted) {
    for (    IAEItemStack extra : extractedCache) {
      IAEItemStack result=null;
      pulled.add(result=target.extractItems(extra,Actionable.MODULATE,src));
      if (result == null || result.getStackSize() != extra.getStackSize()) {
        failed=true;
        break;
      }
    }
  }
  if (failed) {
    for (    IAEItemStack is : pulled)     target.injectItems(is,Actionable.MODULATE,src);
    return false;
  }
  if (logInjections) {
    for (    IAEItemStack injec : injectedCache) {
      IAEItemStack result=null;
      added.add(result=target.injectItems(injec,Actionable.MODULATE,src));
      if (result != null) {
        failed=true;
        break;
      }
    }
  }
  if (failed) {
    for (    IAEItemStack is : added)     target.extractItems(is,Actionable.MODULATE,src);
    for (    IAEItemStack is : pulled)     target.injectItems(is,Actionable.MODULATE,src);
    return false;
  }
  if (logMissing && par != null) {
    for (    IAEItemStack extra : missingCache)     par.addMissing(extra);
  }
  return true;
}

Fixed version (ground truth):
public boolean commit(BaseActionSource src){
  IItemList<IAEItemStack> added=AEApi.instance().storage().createItemList();
  IItemList<IAEItemStack> pulled=AEApi.instance().storage().createItemList();
  boolean failed=false;
  if (logInjections) {
    for (    IAEItemStack injec : injectedCache) {
      IAEItemStack result=null;
      added.add(result=target.injectItems(injec,Actionable.MODULATE,src));
      if (result != null) {
        failed=true;
        break;
      }
    }
  }
  if (failed) {
    for (    IAEItemStack is : added)     target.extractItems(is,Actionable.MODULATE,src);
    return false;
  }
  if (logExtracted) {
    for (    IAEItemStack extra : extractedCache) {
      IAEItemStack result=null;
      pulled.add(result=target.extractItems(extra,Actionable.MODULATE,src));
      if (result == null || result.getStackSize() != extra.getStackSize()) {
        failed=true;
        break;
      }
    }
  }
  if (failed) {
    for (    IAEItemStack is : added)     target.extractItems(is,Actionable.MODULATE,src);
    for (    IAEItemStack is : pulled)     target.injectItems(is,Actionable.MODULATE,src);
    return false;
  }
  if (logMissing && par != null) {
    for (    IAEItemStack extra : missingCache)     par.addMissing(extra);
  }
  return true;
}
Program: 30533
Project: 30533
Buggy source:
@Override public IAEItemStack extractItems(IAEItemStack request,Actionable mode,BaseActionSource src){
  if (request == null)   return null;
  IAEItemStack list=localCache.findPrecise(request);
  if (list == null || list.getStackSize() == 0)   return null;
  if (mode == Actionable.MODULATE && logExtracted)   extractedCache.add(request);
  if (list.getStackSize() >= request.getStackSize()) {
    if (mode == Actionable.MODULATE)     list.decStackSize(request.getStackSize());
    return request;
  }
  IAEItemStack ret=request.copy();
  ret.setStackSize(list.getStackSize());
  if (mode == Actionable.MODULATE)   list.reset();
  return ret;
}

Fixed version (ground truth):
@Override public IAEItemStack extractItems(IAEItemStack request,Actionable mode,BaseActionSource src){
  if (request == null)   return null;
  IAEItemStack list=localCache.findPrecise(request);
  if (list == null || list.getStackSize() == 0)   return null;
  if (list.getStackSize() >= request.getStackSize()) {
    if (mode == Actionable.MODULATE) {
      list.decStackSize(request.getStackSize());
      if (logExtracted)       extractedCache.add(request);
    }
    return request;
  }
  IAEItemStack ret=request.copy();
  ret.setStackSize(list.getStackSize());
  if (mode == Actionable.MODULATE) {
    list.reset();
    if (logExtracted)     extractedCache.add(ret);
  }
  return ret;
}
Program: 30534
Project: 30534
Buggy source:
@Override public boolean sameAs(AEColor color,ItemStack comparableItem){
  ItemStackSrc is=colors[color.ordinal()];
  if (comparableItem == null)   return false;
  return comparableItem.getItem() == is.item && comparableItem.getItemDamage() == is.damage;
}

Fixed version (ground truth):
@Override public boolean sameAs(AEColor color,ItemStack comparableItem){
  ItemStackSrc is=colors[color.ordinal()];
  if (comparableItem == null || is == null)   return false;
  return comparableItem.getItem() == is.item && comparableItem.getItemDamage() == is.damage;
}
Program: 30541
Project: 30541
Buggy source:
@Override public boolean onItemUseFirst(ItemStack is,EntityPlayer player,World world,int x,int y,int z,int side,float hitX,float hitY,float hitZ){
  Block b=world.getBlock(x,y,z);
  if (b != null && !player.isSneaking() && Platform.hasPermissions(new DimensionalCoord(world,x,y,z),player)) {
    if (Platform.isClient())     return true;
    ForgeDirection mySide=ForgeDirection.getOrientation(side);
    if (b.rotateBlock(world,x,y,z,mySide)) {
      b.onNeighborBlockChange(world,x,y,z,Platform.air);
      player.swingItem();
      return !world.isRemote;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onItemUseFirst(ItemStack is,EntityPlayer player,World world,int x,int y,int z,int side,float hitX,float hitY,float hitZ){
  Block b=world.getBlock(x,y,z);
  if (b != null && !player.isSneaking() && Platform.hasPermissions(new DimensionalCoord(world,x,y,z),player)) {
    if (Platform.isClient())     return !world.isRemote;
    ForgeDirection mySide=ForgeDirection.getOrientation(side);
    if (b.rotateBlock(world,x,y,z,mySide)) {
      b.onNeighborBlockChange(world,x,y,z,Platform.air);
      player.swingItem();
      return !world.isRemote;
    }
  }
  return false;
}
Program: 30542
Project: 30542
Buggy source:
@Override public void breakBlock(World w,int x,int y,int z,Block a,int b){
  AEBaseTile te=getTileEntity(w,x,y,z);
  if (te != null) {
    if (te.dropItems) {
      ArrayList<ItemStack> drops=new ArrayList<ItemStack>();
      te.getDrops(w,x,y,z,drops);
      Platform.spawnDrops(w,x,y,z,drops);
    }
  }
  super.breakBlock(w,x,y,z,a,b);
  if (te != null)   w.setTileEntity(x,y,z,null);
}

Fixed version (ground truth):
@Override public void breakBlock(World w,int x,int y,int z,Block a,int b){
  AEBaseTile te=getTileEntity(w,x,y,z);
  if (te != null) {
    ArrayList<ItemStack> drops=new ArrayList<ItemStack>();
    if (te.dropItems())     te.getDrops(w,x,y,z,drops);
 else     te.getNoDrops(w,x,y,z,drops);
    Platform.spawnDrops(w,x,y,z,drops);
  }
  super.breakBlock(w,x,y,z,a,b);
  if (te != null)   w.setTileEntity(x,y,z,null);
}
Program: 30543
Project: 30543
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public boolean removedByPlayer(World world,EntityPlayer player,int x,int y,int z){
  if (player.capabilities.isCreativeMode) {
    AEBaseTile tile=getTileEntity(world,x,y,z);
    if (tile != null)     tile.dropItems=false;
  }
  return super.removedByPlayer(world,player,x,y,z);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public boolean removedByPlayer(World world,EntityPlayer player,int x,int y,int z){
  if (player.capabilities.isCreativeMode) {
    AEBaseTile tile=getTileEntity(world,x,y,z);
    if (tile != null)     tile.disableDrops();
  }
  return super.removedByPlayer(world,player,x,y,z);
}
Program: 30544
Project: 30544
Buggy source:
public void securityBreak(){
  worldObj.func_147480_a(xCoord,yCoord,zCoord,true);
  dropItems=false;
}

Fixed version (ground truth):
public void securityBreak(){
  worldObj.func_147480_a(xCoord,yCoord,zCoord,true);
  disableDrops();
}
Program: 30545
Project: 30545
Buggy source:
protected AEBaseBlock(Class<?> c,Material mat,String subname){
  super(mat);
  if (mat == Material.glass)   setStepSound(Block.soundTypeGlass);
 else   if (mat == Material.rock)   setStepSound(Block.soundTypeStone);
 else   setStepSound(Block.soundTypeMetal);
  FeatureFullname=AEFeatureHandler.getName(c,subname);
  FeatureSubname=subname;
}

Fixed version (ground truth):
protected AEBaseBlock(Class<?> c,Material mat,String subname){
  super(mat);
  if (mat == AEGlassMaterial.instance)   setStepSound(Block.soundTypeGlass);
 else   if (mat == Material.glass)   setStepSound(Block.soundTypeGlass);
 else   if (mat == Material.rock)   setStepSound(Block.soundTypeStone);
 else   setStepSound(Block.soundTypeMetal);
  FeatureFullname=AEFeatureHandler.getName(c,subname);
  FeatureSubname=subname;
}
Program: 30546
Project: 30546
Buggy source:
public BlockCableBus(){
  super(BlockCableBus.class,Material.glass);
  setfeature(EnumSet.of(AEFeature.Core));
  setLightOpacity(0);
  isFullSize=isOpaque=false;
}

Fixed version (ground truth):
public BlockCableBus(){
  super(BlockCableBus.class,AEGlassMaterial.instance);
  setfeature(EnumSet.of(AEFeature.Core));
  setLightOpacity(0);
  isFullSize=isOpaque=false;
}
Program: 30547
Project: 30547
Buggy source:
public BlockCreativeEnergyCell(){
  super(BlockCreativeEnergyCell.class,Material.glass);
  setfeature(EnumSet.of(AEFeature.Creative));
  setTileEntiy(TileCreativeEnergyCell.class);
}

Fixed version (ground truth):
public BlockCreativeEnergyCell(){
  super(BlockCreativeEnergyCell.class,AEGlassMaterial.instance);
  setfeature(EnumSet.of(AEFeature.Creative));
  setTileEntiy(TileCreativeEnergyCell.class);
}
Program: 30548
Project: 30548
Buggy source:
public BlockWireless(){
  super(BlockWireless.class,Material.glass);
  setfeature(EnumSet.of(AEFeature.Core,AEFeature.WirelessAccessTerminal));
  setTileEntiy(TileWireless.class);
  setLightOpacity(0);
  isFullSize=false;
  isOpaque=false;
}

Fixed version (ground truth):
public BlockWireless(){
  super(BlockWireless.class,AEGlassMaterial.instance);
  setfeature(EnumSet.of(AEFeature.Core,AEFeature.WirelessAccessTerminal));
  setTileEntiy(TileWireless.class);
  setLightOpacity(0);
  isFullSize=false;
  isOpaque=false;
}
Program: 30549
Project: 30549
Buggy source:
public BlockQuantumLinkChamber(){
  super(BlockQuantumLinkChamber.class,Material.glass);
  setfeature(EnumSet.of(AEFeature.QuantumNetworkBridge));
  setTileEntiy(TileQuantumBridge.class);
  float shave=2.0f / 16.0f;
  setBlockBounds(shave,shave,shave,1.0f - shave,1.0f - shave,1.0f - shave);
  setLightOpacity(0);
  isFullSize=isOpaque=false;
}

Fixed version (ground truth):
public BlockQuantumLinkChamber(){
  super(BlockQuantumLinkChamber.class,AEGlassMaterial.instance);
  setfeature(EnumSet.of(AEFeature.QuantumNetworkBridge));
  setTileEntiy(TileQuantumBridge.class);
  float shave=2.0f / 16.0f;
  setBlockBounds(shave,shave,shave,1.0f - shave,1.0f - shave,1.0f - shave);
  setLightOpacity(0);
  isFullSize=isOpaque=false;
}
Program: 30550
Project: 30550
Buggy source:
@Override public boolean shouldSideBeRendered(IBlockAccess w,int x,int y,int z,int side){
  if (w.getBlock(x,y,z).getMaterial() == Material.glass) {
    if (w.getBlock(x,y,z).getRenderType() == this.getRenderType())     return false;
  }
  return super.shouldSideBeRendered(w,x,y,z,side);
}

Fixed version (ground truth):
@Override public boolean shouldSideBeRendered(IBlockAccess w,int x,int y,int z,int side){
  Material mat=w.getBlock(x,y,z).getMaterial();
  if (mat == Material.glass || mat == AEGlassMaterial.instance) {
    if (w.getBlock(x,y,z).getRenderType() == this.getRenderType())     return false;
  }
  return super.shouldSideBeRendered(w,x,y,z,side);
}
Program: 30551
Project: 30551
Buggy source:
public BlockSpatialPylon(){
  super(BlockSpatialPylon.class,Material.glass);
  setfeature(EnumSet.of(AEFeature.SpatialIO));
  setTileEntiy(TileSpatialPylon.class);
}

Fixed version (ground truth):
public BlockSpatialPylon(){
  super(BlockSpatialPylon.class,AEGlassMaterial.instance);
  setfeature(EnumSet.of(AEFeature.SpatialIO));
  setTileEntiy(TileSpatialPylon.class);
}
Program: 30552
Project: 30552
Buggy source:
@Override public IAEItemStack injectItems(IAEItemStack input,Actionable mode,BaseActionSource src){
  if (mode == Actionable.SIMULATE)   return null;
  ItemStack failed=cs.insertItems(side,input.getItemStack());
  if (failed == null)   return null;
  input.setStackSize(failed.stackSize);
  return input;
}

Fixed version (ground truth):
@Override public IAEItemStack injectItems(IAEItemStack input,Actionable mode,BaseActionSource src){
  if (mode == Actionable.SIMULATE)   return null;
  ItemStack failed=cs.insertItems(input.getItemStack());
  if (failed == null)   return null;
  input.setStackSize(failed.stackSize);
  return input;
}
Program: 30553
Project: 30553
Buggy source:
@Override public IItemList getAvailableItems(IItemList out){
  for (  ItemStack is : cs.getContents(side)) {
    out.add(AEItemStack.create(is));
  }
  return out;
}

Fixed version (ground truth):
@Override public IItemList getAvailableItems(IItemList out){
  for (  ItemStack is : cs.getContents()) {
    out.add(AEItemStack.create(is));
  }
  return out;
}
Program: 30554
Project: 30554
Buggy source:
@Override public IAEItemStack extractItems(IAEItemStack request,Actionable mode,BaseActionSource src){
  if (mode == Actionable.SIMULATE) {
    int howMany=cs.getItemCount(side,request.getItemStack());
    return howMany > request.getStackSize() ? request : request.copy().setStackSize(howMany);
  }
  ItemStack Obtained=cs.extractItems(side,request.getItemStack());
  return AEItemStack.create(Obtained);
}

Fixed version (ground truth):
@Override public IAEItemStack extractItems(IAEItemStack request,Actionable mode,BaseActionSource src){
  if (mode == Actionable.SIMULATE) {
    int howMany=cs.getItemCount(request.getItemStack());
    return howMany > request.getStackSize() ? request : request.copy().setStackSize(howMany);
  }
  ItemStack Obtained=cs.extractItems(request.getItemStack(),(int)request.getStackSize());
  return AEItemStack.create(Obtained);
}
Program: 30555
Project: 30555
Buggy source:
@Override public ItemStack simulateSimilarRemove(int how_many,ItemStack filter,FuzzyMode fuzzyMode,IInventoryDestination dest){
  ItemStack target=null;
  for (  ItemStack is : cs.getContents(side)) {
    if (is != null) {
      if (is.stackSize > 0 && (filter == null || Platform.isSameItemFuzzy(filter,is,fuzzyMode))) {
        if (dest == null || dest.canInsert(is)) {
          target=is;
          break;
        }
      }
    }
  }
  if (target != null) {
    int cnt=cs.getItemCount(side,target);
    if (cnt == 0)     return null;
    if (cnt > how_many)     cnt=how_many;
    ItemStack c=target.copy();
    c.stackSize=cnt;
    return c;
  }
  return null;
}

Fixed version (ground truth):
@Override public ItemStack simulateSimilarRemove(int how_many,ItemStack filter,FuzzyMode fuzzyMode,IInventoryDestination dest){
  ItemStack target=null;
  for (  ItemStack is : cs.getContents()) {
    if (is != null) {
      if (is.stackSize > 0 && (filter == null || Platform.isSameItemFuzzy(filter,is,fuzzyMode))) {
        if (dest == null || dest.canInsert(is)) {
          target=is;
          break;
        }
      }
    }
  }
  if (target != null) {
    int cnt=cs.getItemCount(target);
    if (cnt == 0)     return null;
    if (cnt > how_many)     cnt=how_many;
    ItemStack c=target.copy();
    c.stackSize=cnt;
    return c;
  }
  return null;
}
Program: 30556
Project: 30556
Buggy source:
@Override public Iterator<ItemSlot> iterator(){
  return new StackToSlotIterator(cs.getContents(side).iterator());
}

Fixed version (ground truth):
@Override public Iterator<ItemSlot> iterator(){
  return new StackToSlotIterator(cs.getContents().iterator());
}
Program: 30557
Project: 30557
Buggy source:
@Override public ItemStack removeItems(int how_many,ItemStack Filter,IInventoryDestination dest){
  ItemStack target=null;
  for (  ItemStack is : cs.getContents(side)) {
    if (is != null) {
      if (is.stackSize > 0 && (Filter == null || Platform.isSameItem(Filter,is))) {
        if (dest == null || dest.canInsert(is)) {
          target=is;
          break;
        }
      }
    }
  }
  if (target != null) {
    ItemStack f=Platform.cloneItemStack(target);
    f.stackSize=how_many;
    return cs.extractItems(side,f);
  }
  return null;
}

Fixed version (ground truth):
@Override public ItemStack removeItems(int how_many,ItemStack Filter,IInventoryDestination dest){
  ItemStack target=null;
  for (  ItemStack is : cs.getContents()) {
    if (is != null) {
      if (is.stackSize > 0 && (Filter == null || Platform.isSameItem(Filter,is))) {
        if (dest == null || dest.canInsert(is)) {
          target=is;
          break;
        }
      }
    }
  }
  if (target != null) {
    ItemStack f=Platform.cloneItemStack(target);
    f.stackSize=how_many;
    return cs.extractItems(f,how_many);
  }
  return null;
}
Program: 30558
Project: 30558
Buggy source:
@Override public ItemStack simulateRemove(int how_many,ItemStack Filter,IInventoryDestination dest){
  ItemStack target=null;
  for (  ItemStack is : cs.getContents(side)) {
    if (is != null) {
      if (is.stackSize > 0 && (Filter == null || Platform.isSameItem(Filter,is))) {
        if (dest == null || dest.canInsert(is)) {
          target=is;
          break;
        }
      }
    }
  }
  if (target != null) {
    int cnt=cs.getItemCount(side,target);
    if (cnt == 0)     return null;
    if (cnt > how_many)     cnt=how_many;
    ItemStack c=target.copy();
    c.stackSize=cnt;
    return c;
  }
  return null;
}

Fixed version (ground truth):
@Override public ItemStack simulateRemove(int how_many,ItemStack Filter,IInventoryDestination dest){
  ItemStack target=null;
  for (  ItemStack is : cs.getContents()) {
    if (is != null) {
      if (is.stackSize > 0 && (Filter == null || Platform.isSameItem(Filter,is))) {
        if (dest == null || dest.canInsert(is)) {
          target=is;
          break;
        }
      }
    }
  }
  if (target != null) {
    int cnt=cs.getItemCount(target);
    if (cnt == 0)     return null;
    if (cnt > how_many)     cnt=how_many;
    ItemStack c=target.copy();
    c.stackSize=cnt;
    return c;
  }
  return null;
}
Program: 30559
Project: 30559
Buggy source:
@Override public ItemStack removeSimilarItems(int amount,ItemStack filter,FuzzyMode fuzzyMode,IInventoryDestination dest){
  ItemStack target=null;
  for (  ItemStack is : cs.getContents(side)) {
    if (is != null) {
      if (is.stackSize > 0 && (filter == null || Platform.isSameItemFuzzy(filter,is,fuzzyMode))) {
        if (dest == null || dest.canInsert(is)) {
          target=is;
          break;
        }
      }
    }
  }
  if (target != null) {
    ItemStack f=Platform.cloneItemStack(target);
    f.stackSize=amount;
    return cs.extractItems(side,f);
  }
  return null;
}

Fixed version (ground truth):
@Override public ItemStack removeSimilarItems(int amount,ItemStack filter,FuzzyMode fuzzyMode,IInventoryDestination dest){
  ItemStack target=null;
  for (  ItemStack is : cs.getContents()) {
    if (is != null) {
      if (is.stackSize > 0 && (filter == null || Platform.isSameItemFuzzy(filter,is,fuzzyMode))) {
        if (dest == null || dest.canInsert(is)) {
          target=is;
          break;
        }
      }
    }
  }
  if (target != null) {
    ItemStack f=Platform.cloneItemStack(target);
    f.stackSize=amount;
    return cs.extractItems(f,amount);
  }
  return null;
}
Program: 30560
Project: 30560
Buggy source:
@Override public ItemStack simulateAdd(ItemStack A){
  int items=cs.spaceForItem(side,A);
  ItemStack B=Platform.cloneItemStack(A);
  if (A.stackSize <= items)   return null;
  B.stackSize-=items;
  return B;
}

Fixed version (ground truth):
@Override public ItemStack simulateAdd(ItemStack A){
  int items=cs.getSpaceForItem(A);
  ItemStack B=Platform.cloneItemStack(A);
  if (A.stackSize <= items)   return null;
  B.stackSize-=items;
  return B;
}
Program: 30561
Project: 30561
Buggy source:
@Override public boolean containsItems(){
  return cs.getContents(side).size() > 0;
}

Fixed version (ground truth):
@Override public boolean containsItems(){
  return cs.getUniqueItems() > 0;
}
Program: 30562
Project: 30562
Buggy source:
@Override public ItemStack addItems(ItemStack A){
  return cs.insertItems(side,A);
}

Fixed version (ground truth):
@Override public ItemStack addItems(ItemStack A){
  return cs.insertItems(A);
}
Program: 30564
Project: 30564
Buggy source:
private void updateNEI(String filter){
  try {
    if (NEIWord == null || !NEIWord.equals(filter)) {
      Class c=ReflectionHelper.getClass(getClass().getClassLoader(),"String_Node_Str");
      Field fldSearchField=c.getField("String_Node_Str");
      Object searchField=fldSearchField.get(c);
      Method a=searchField.getClass().getMethod("String_Node_Str",String.class);
      Method b=searchField.getClass().getMethod("String_Node_Str",String.class);
      NEIWord=filter;
      a.invoke(searchField,filter);
      b.invoke(searchField,"String_Node_Str");
    }
  }
 catch (  Throwable _) {
  }
}

Fixed version (ground truth):
private void updateNEI(String filter){
  try {
    if (NEIWord == null || !NEIWord.equals(filter)) {
      Class c=ReflectionHelper.getClass(getClass().getClassLoader(),"String_Node_Str");
      Field fldSearchField=c.getField("String_Node_Str");
      Object searchField=fldSearchField.get(c);
      Method a=searchField.getClass().getMethod("String_Node_Str",String.class);
      Method b=searchField.getClass().getMethod("String_Node_Str",String.class);
      NEIWord=filter;
      a.invoke(searchField,new String(filter));
      b.invoke(searchField,"String_Node_Str");
    }
  }
 catch (  Throwable _) {
  }
}
Program: 30567
Project: 30567
Buggy source:
@Override public void renderParticle(Tessellator par1Tessellator,float par2,float par3,float par4,float par5,float par6,float par7){
  Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
  float f6=this.particleTextureIndex.getMinU();
  float f7=this.particleTextureIndex.getMaxU();
  float f8=this.particleTextureIndex.getMinV();
  float f9=this.particleTextureIndex.getMaxV();
  float f10=0.05F * this.particleScale;
  float f11=(float)(this.prevPosX + (this.posX - this.prevPosX) * (double)par2 - interpPosX);
  float f12=(float)(this.prevPosY + (this.posY - this.prevPosY) * (double)par2 - interpPosY);
  float f13=(float)(this.prevPosZ + (this.posZ - this.prevPosZ) * (double)par2 - interpPosZ);
  float f14=1.0F;
  par1Tessellator.setColorRGBA_F(this.particleRed * f14,this.particleGreen * f14,this.particleBlue * f14,this.particleAlpha);
  par1Tessellator.addVertexWithUV((double)(f11 - par3 * f10 - par6 * f10),(double)(f12 - par4 * f10),(double)(f13 - par5 * f10 - par7 * f10),(double)f7,(double)f9);
  par1Tessellator.addVertexWithUV((double)(f11 - par3 * f10 + par6 * f10),(double)(f12 + par4 * f10),(double)(f13 - par5 * f10 + par7 * f10),(double)f7,(double)f8);
  par1Tessellator.addVertexWithUV((double)(f11 + par3 * f10 + par6 * f10),(double)(f12 + par4 * f10),(double)(f13 + par5 * f10 + par7 * f10),(double)f6,(double)f8);
  par1Tessellator.addVertexWithUV((double)(f11 + par3 * f10 - par6 * f10),(double)(f12 - par4 * f10),(double)(f13 + par5 * f10 - par7 * f10),(double)f6,(double)f9);
}

Fixed version (ground truth):
@Override public void renderParticle(Tessellator par1Tessellator,float par2,float par3,float par4,float par5,float par6,float par7){
  float f6=this.particleTextureIndex.getMinU();
  float f7=this.particleTextureIndex.getMaxU();
  float f8=this.particleTextureIndex.getMinV();
  float f9=this.particleTextureIndex.getMaxV();
  float f10=0.05F * this.particleScale;
  float f11=(float)(this.prevPosX + (this.posX - this.prevPosX) * (double)par2 - interpPosX);
  float f12=(float)(this.prevPosY + (this.posY - this.prevPosY) * (double)par2 - interpPosY);
  float f13=(float)(this.prevPosZ + (this.posZ - this.prevPosZ) * (double)par2 - interpPosZ);
  float f14=1.0F;
  par1Tessellator.setColorRGBA_F(this.particleRed * f14,this.particleGreen * f14,this.particleBlue * f14,this.particleAlpha);
  par1Tessellator.addVertexWithUV((double)(f11 - par3 * f10 - par6 * f10),(double)(f12 - par4 * f10),(double)(f13 - par5 * f10 - par7 * f10),(double)f7,(double)f9);
  par1Tessellator.addVertexWithUV((double)(f11 - par3 * f10 + par6 * f10),(double)(f12 + par4 * f10),(double)(f13 - par5 * f10 + par7 * f10),(double)f7,(double)f8);
  par1Tessellator.addVertexWithUV((double)(f11 + par3 * f10 + par6 * f10),(double)(f12 + par4 * f10),(double)(f13 + par5 * f10 + par7 * f10),(double)f6,(double)f8);
  par1Tessellator.addVertexWithUV((double)(f11 + par3 * f10 - par6 * f10),(double)(f12 - par4 * f10),(double)(f13 + par5 * f10 - par7 * f10),(double)f6,(double)f9);
}
Program: 30568
Project: 30568
Buggy source:
public boolean isActive(){
  return getCore().getActionableNode().isActive();
}

Fixed version (ground truth):
public boolean isActive(){
  TileCraftingTile core=getCore();
  if (core == null)   return false;
  IGridNode node=core.getActionableNode();
  if (node == null)   return false;
  return node.isActive();
}
Program: 30569
Project: 30569
Buggy source:
public IAEItemStack getLow(FuzzyMode fuzzy,boolean ignoreMeta){
  AEItemStack bottom=new AEItemStack(this);
  AEItemDef newDef=bottom.def=bottom.def.copy();
  if (ignoreMeta) {
    newDef.dspDamage=newDef.damageValue=0;
    newDef.reHash();
    return bottom;
  }
  if (newDef.item.isDamageable()) {
    if (fuzzy == FuzzyMode.IGNORE_ALL) {
      newDef.dspDamage=0;
    }
 else {
      int breakpoint=fuzzy.calculateBreakPoint(def.maxDamage);
      newDef.dspDamage=breakpoint <= def.dspDamage ? breakpoint : 0;
    }
    newDef.damageValue=newDef.dspDamage;
  }
  newDef.tagCompound=AEItemDef.lowTag;
  newDef.reHash();
  return bottom;
}

Fixed version (ground truth):
public IAEItemStack getLow(FuzzyMode fuzzy,boolean ignoreMeta){
  AEItemStack bottom=new AEItemStack(this);
  AEItemDef newDef=bottom.def=bottom.def.copy();
  if (ignoreMeta) {
    newDef.dspDamage=newDef.damageValue=0;
    newDef.reHash();
    return bottom;
  }
  if (newDef.item.isDamageable()) {
    if (fuzzy == FuzzyMode.IGNORE_ALL) {
      newDef.dspDamage=0;
    }
 else     if (fuzzy == FuzzyMode.PERCENT_99) {
      if (def.damageValue == 0)       newDef.dspDamage=0;
 else       newDef.dspDamage=1;
    }
 else {
      int breakpoint=fuzzy.calculateBreakPoint(def.maxDamage);
      newDef.dspDamage=breakpoint <= def.dspDamage ? breakpoint : 0;
    }
    newDef.damageValue=newDef.dspDamage;
  }
  newDef.tagCompound=AEItemDef.lowTag;
  newDef.reHash();
  return bottom;
}
Program: 30570
Project: 30570
Buggy source:
public IAEItemStack getHigh(FuzzyMode fuzzy,boolean ignoreMeta){
  AEItemStack top=new AEItemStack(this);
  AEItemDef newDef=top.def=top.def.copy();
  if (ignoreMeta) {
    newDef.dspDamage=newDef.damageValue=Integer.MAX_VALUE;
    newDef.reHash();
    return top;
  }
  if (newDef.item.isDamageable()) {
    if (fuzzy == FuzzyMode.IGNORE_ALL) {
      newDef.dspDamage=def.maxDamage + 1;
    }
 else {
      int breakpoint=fuzzy.calculateBreakPoint(def.maxDamage);
      newDef.dspDamage=def.dspDamage < breakpoint ? breakpoint - 1 : def.maxDamage + 1;
    }
    newDef.damageValue=newDef.dspDamage;
  }
  newDef.tagCompound=AEItemDef.highTag;
  newDef.reHash();
  return top;
}

Fixed version (ground truth):
public IAEItemStack getHigh(FuzzyMode fuzzy,boolean ignoreMeta){
  AEItemStack top=new AEItemStack(this);
  AEItemDef newDef=top.def=top.def.copy();
  if (ignoreMeta) {
    newDef.dspDamage=newDef.damageValue=Integer.MAX_VALUE;
    newDef.reHash();
    return top;
  }
  if (newDef.item.isDamageable()) {
    if (fuzzy == FuzzyMode.IGNORE_ALL) {
      newDef.dspDamage=def.maxDamage + 1;
    }
 else     if (fuzzy == FuzzyMode.PERCENT_99) {
      if (def.damageValue == 0)       newDef.dspDamage=0;
 else       newDef.dspDamage=def.maxDamage + 1;
    }
 else {
      int breakpoint=fuzzy.calculateBreakPoint(def.maxDamage);
      newDef.dspDamage=def.dspDamage < breakpoint ? breakpoint - 1 : def.maxDamage + 1;
    }
    newDef.damageValue=newDef.dspDamage;
  }
  newDef.tagCompound=AEItemDef.highTag;
  newDef.reHash();
  return top;
}
Program: 30571
Project: 30571
Buggy source:
public void selectFace(RenderBlocks renderer,ForgeDirection west,ForgeDirection up,ForgeDirection forward,int u1,int u2,int v1,int v2){
  v1=16 - v1;
  v2=16 - v2;
  double minX=(forward.offsetX > 0 ? 1 : 0) + mapFaceUV(west.offsetX,u1) + mapFaceUV(up.offsetX,v1);
  double minY=(forward.offsetY > 0 ? 1 : 0) + mapFaceUV(west.offsetY,u1) + mapFaceUV(up.offsetY,v1);
  double minZ=(forward.offsetZ > 0 ? 1 : 0) + mapFaceUV(west.offsetZ,u1) + mapFaceUV(up.offsetZ,v1);
  double maxX=(forward.offsetX > 0 ? 1 : 0) + mapFaceUV(west.offsetX,u2) + mapFaceUV(up.offsetX,v2);
  double maxY=(forward.offsetY > 0 ? 1 : 0) + mapFaceUV(west.offsetY,u2) + mapFaceUV(up.offsetY,v2);
  double maxZ=(forward.offsetZ > 0 ? 1 : 0) + mapFaceUV(west.offsetZ,u2) + mapFaceUV(up.offsetZ,v2);
  renderer.renderMinX=Math.max(0.0,Math.min(minX,maxX) - 0.001);
  renderer.renderMaxX=Math.min(1.0,Math.max(minX,maxX) + 0.001);
  renderer.renderMinY=Math.max(0.0,Math.min(minY,maxY) - 0.001);
  renderer.renderMaxY=Math.min(1.0,Math.max(minY,maxY) + 0.001);
  renderer.renderMinZ=Math.max(0.0,Math.min(minZ,maxZ) - 0.001);
  renderer.renderMaxZ=Math.min(1.0,Math.max(minZ,maxZ) + 0.001);
}

Fixed version (ground truth):
public void selectFace(RenderBlocks renderer,ForgeDirection west,ForgeDirection up,ForgeDirection forward,int u1,int u2,int v1,int v2){
  v1=16 - v1;
  v2=16 - v2;
  double minX=(forward.offsetX > 0 ? 1 : 0) + mapFaceUV(west.offsetX,u1) + mapFaceUV(up.offsetX,v1);
  double minY=(forward.offsetY > 0 ? 1 : 0) + mapFaceUV(west.offsetY,u1) + mapFaceUV(up.offsetY,v1);
  double minZ=(forward.offsetZ > 0 ? 1 : 0) + mapFaceUV(west.offsetZ,u1) + mapFaceUV(up.offsetZ,v1);
  double maxX=(forward.offsetX > 0 ? 1 : 0) + mapFaceUV(west.offsetX,u2) + mapFaceUV(up.offsetX,v2);
  double maxY=(forward.offsetY > 0 ? 1 : 0) + mapFaceUV(west.offsetY,u2) + mapFaceUV(up.offsetY,v2);
  double maxZ=(forward.offsetZ > 0 ? 1 : 0) + mapFaceUV(west.offsetZ,u2) + mapFaceUV(up.offsetZ,v2);
  renderer.renderMinX=Math.max(0.0,Math.min(minX,maxX) - (forward.offsetX != 0 ? 0 : 0.001));
  renderer.renderMaxX=Math.min(1.0,Math.max(minX,maxX) + (forward.offsetX != 0 ? 0 : 0.001));
  renderer.renderMinY=Math.max(0.0,Math.min(minY,maxY) - (forward.offsetY != 0 ? 0 : 0.001));
  renderer.renderMaxY=Math.min(1.0,Math.max(minY,maxY) + (forward.offsetY != 0 ? 0 : 0.001));
  renderer.renderMinZ=Math.max(0.0,Math.min(minZ,maxZ) - (forward.offsetZ != 0 ? 0 : 0.001));
  renderer.renderMaxZ=Math.min(1.0,Math.max(minZ,maxZ) + (forward.offsetZ != 0 ? 0 : 0.001));
}
Program: 30572
Project: 30572
Buggy source:
public TileCharger(){
  gridProxy.setValidSides(EnumSet.noneOf(ForgeDirection.class));
  gridProxy.setFlags(GridFlags.CANNOT_CARRY);
  internalMaxPower=1500;
  gridProxy.setIdlePowerUsage(0);
  addNewHandler(new TileChargerHandler());
}

Fixed version (ground truth):
public TileCharger(){
  gridProxy.setValidSides(EnumSet.noneOf(ForgeDirection.class));
  gridProxy.setFlags();
  internalMaxPower=1500;
  gridProxy.setIdlePowerUsage(0);
  addNewHandler(new TileChargerHandler());
}
Program: 30573
Project: 30573
Buggy source:
public TileQuartzGrowthAccelerator(){
  gridProxy.setValidSides(EnumSet.noneOf(ForgeDirection.class));
  gridProxy.setFlags(GridFlags.CANNOT_CARRY);
  gridProxy.setIdlePowerUsage(8);
  addNewHandler(new TileChargerHandler());
}

Fixed version (ground truth):
public TileQuartzGrowthAccelerator(){
  gridProxy.setValidSides(EnumSet.noneOf(ForgeDirection.class));
  gridProxy.setFlags();
  gridProxy.setIdlePowerUsage(8);
  addNewHandler(new TileChargerHandler());
}
Program: 30574
Project: 30574
Buggy source:
public TileVibrationChamber(){
  gridProxy.setIdlePowerUsage(0);
  gridProxy.setFlags(GridFlags.CANNOT_CARRY);
  addNewHandler(new TileVibrationChamberHandler());
}

Fixed version (ground truth):
public TileVibrationChamber(){
  gridProxy.setIdlePowerUsage(0);
  gridProxy.setFlags();
  addNewHandler(new TileVibrationChamberHandler());
}
Program: 30577
Project: 30577
Buggy source:
public void overlayRecipe(GuiContainer gui,List<PositionedStack> ingredients,boolean shift){
  try {
    NBTTagCompound recipe=new NBTTagCompound();
    if (gui instanceof GuiCraftingTerm || gui instanceof GuiPatternTerm) {
      for (int i=0; i < ingredients.size(); i++) {
        PositionedStack pstack=ingredients.get(i);
        int col=(pstack.relx - 25) / 18;
        int row=(pstack.rely - 6) / 18;
        if (pstack.item != null) {
          for (          Slot slot : (List<Slot>)gui.inventorySlots.inventorySlots) {
            if (slot instanceof SlotCraftingMatrix || slot instanceof SlotFakeCraftingMatrix) {
              Slot ctSlot=(Slot)slot;
              if (ctSlot.getSlotIndex() == col + row * 3) {
                NBTTagCompound inbt=new NBTTagCompound();
                pstack.item.writeToNBT(inbt);
                recipe.setTag("String_Node_Str" + ctSlot.getSlotIndex(),inbt);
                break;
              }
            }
          }
        }
      }
      NetworkHandler.instance.sendToServer(new PacketNEIRecipe(recipe));
    }
  }
 catch (  Exception err) {
  }
catch (  Error err) {
  }
}

Fixed version (ground truth):
public void overlayRecipe(GuiContainer gui,List<PositionedStack> ingredients,boolean shift){
  try {
    NBTTagCompound recipe=new NBTTagCompound();
    if (gui instanceof GuiCraftingTerm || gui instanceof GuiPatternTerm) {
      for (int i=0; i < ingredients.size(); i++) {
        PositionedStack pstack=ingredients.get(i);
        int col=(pstack.relx - 25) / 18;
        int row=(pstack.rely - 6) / 18;
        if (pstack.items != null && pstack.items.length > 0) {
          for (          Slot slot : (List<Slot>)gui.inventorySlots.inventorySlots) {
            if (slot instanceof SlotCraftingMatrix || slot instanceof SlotFakeCraftingMatrix) {
              Slot ctSlot=(Slot)slot;
              if (ctSlot.getSlotIndex() == col + row * 3) {
                NBTTagList ilist=new NBTTagList();
                for (int x=0; x < pstack.items.length; x++) {
                  NBTTagCompound inbt=new NBTTagCompound();
                  pstack.items[x].writeToNBT(inbt);
                  ilist.addtag(inbt);
                }
                recipe.setTag("String_Node_Str" + ctSlot.getSlotIndex(),ilist);
                break;
              }
            }
          }
        }
      }
      NetworkHandler.instance.sendToServer(new PacketNEIRecipe(recipe));
    }
  }
 catch (  Exception err) {
  }
catch (  Error err) {
  }
}
Program: 30581
Project: 30581
Buggy source:
@Override public void Init(){
  IP2PTunnelRegistry reg=AEApi.instance().registries().p2pTunnel();
  ItemStack energyPipe=GameRegistry.findItemStack("String_Node_Str","String_Node_Str",1);
  if (energyPipe != null) {
    energyPipe.setItemDamage(12);
    reg.addNewAttunement(energyPipe,TunnelType.RF_POWER);
  }
  ItemStack energyConduit=GameRegistry.findItemStack("String_Node_Str","String_Node_Str",1);
  if (energyConduit != null) {
    energyConduit.setItemDamage(OreDictionary.WILDCARD_VALUE);
    reg.addNewAttunement(energyConduit,TunnelType.RF_POWER);
  }
  reg.addNewAttunement(GameRegistry.findItemStack("String_Node_Str","String_Node_Str",1),TunnelType.RF_POWER);
  reg.addNewAttunement(GameRegistry.findItemStack("String_Node_Str","String_Node_Str",1),TunnelType.RF_POWER);
}

Fixed version (ground truth):
@Override public void Init(){
}
Program: 30582
Project: 30582
Buggy source:
@Override public void PostInit(){
}

Fixed version (ground truth):
@Override public void PostInit(){
  RFStack("String_Node_Str","String_Node_Str",12);
  RFStack("String_Node_Str","String_Node_Str",11);
  RFStack("String_Node_Str","String_Node_Str",14);
  RFStack("String_Node_Str","String_Node_Str",OreDictionary.WILDCARD_VALUE);
  RFStack("String_Node_Str","String_Node_Str",OreDictionary.WILDCARD_VALUE);
  RFStack("String_Node_Str","String_Node_Str",OreDictionary.WILDCARD_VALUE);
  RFStack("String_Node_Str","String_Node_Str",OreDictionary.WILDCARD_VALUE);
  RFStack("String_Node_Str","String_Node_Str",0);
  RFStack("String_Node_Str","String_Node_Str",0);
}