nus-yam/ex-repair huggingface dataset:
Program: 165660
Project: 165660
Buggy source:
@Override protected void checkRedstone(World world,BlockPos pos){
  IBlockState state=world.getBlockState(pos);
  TileEntity te=world.getTileEntity(pos);
  if (state.getBlock() instanceof LogicSlabBlock && te instanceof ThreeLogicTileEntity) {
    ThreeLogicTileEntity tileEntity=(ThreeLogicTileEntity)te;
    LogicFacing facing=tileEntity.getFacing(state);
    EnumFacing downSide=facing.getSide();
    EnumFacing inputSide=facing.getInputSide();
    EnumFacing leftSide=rotateLeft(downSide,inputSide);
    EnumFacing rightSide=rotateRight(downSide,inputSide);
    int powered1=getInputStrength(world,pos,leftSide) > 0 ? 1 : 0;
    int powered2=getInputStrength(world,pos,inputSide) > 0 ? 2 : 0;
    int powered3=getInputStrength(world,pos,rightSide) > 0 ? 4 : 0;
    tileEntity.setPowerInput(powered1 + powered2 + powered3);
    tileEntity.checkRedstone();
  }
}

Fixed version (ground truth):
@Override protected void checkRedstone(World world,BlockPos pos){
  if (loopDetector.contains(pos)) {
    return;
  }
  IBlockState state=world.getBlockState(pos);
  TileEntity te=world.getTileEntity(pos);
  if (state.getBlock() instanceof LogicSlabBlock && te instanceof ThreeLogicTileEntity) {
    loopDetector.add(pos);
    ThreeLogicTileEntity tileEntity=(ThreeLogicTileEntity)te;
    LogicFacing facing=tileEntity.getFacing(state);
    EnumFacing downSide=facing.getSide();
    EnumFacing inputSide=facing.getInputSide();
    EnumFacing leftSide=rotateLeft(downSide,inputSide);
    EnumFacing rightSide=rotateRight(downSide,inputSide);
    int powered1=getInputStrength(world,pos,leftSide) > 0 ? 1 : 0;
    int powered2=getInputStrength(world,pos,inputSide) > 0 ? 2 : 0;
    int powered3=getInputStrength(world,pos,rightSide) > 0 ? 4 : 0;
    tileEntity.setPowerInput(powered1 + powered2 + powered3);
    tileEntity.checkRedstone();
    loopDetector.remove(pos);
  }
}
Program: 165661
Project: 165661
Buggy source:
@Override public EnumFacing getBlockOrientation(){
  return OrientationTools.getOrientationHoriz(world.getBlockState(pos));
}

Fixed version (ground truth):
@Override public EnumFacing getBlockOrientation(){
  IBlockState state=world.getBlockState(pos);
  if (state.getBlock() instanceof BuilderBlock) {
    return OrientationTools.getOrientationHoriz(state);
  }
 else {
    return null;
  }
}
Program: 165663
Project: 165663
Buggy source:
/** 
 * Register a module data factory. This is needed so that RFTools know how to deserialize your module data for your screen module. You don't have to do this for any of the builtin module data implementations (like IModuleDataBoolean, IModuleDataInteger and so on). Note that you only need the screen module registry if you have custom data.
 * @param id a unique id in the form modid:name
 * @param dataFactory
 */
void registerModuleDataFactory(String id,IModuleDataFactory dataFactory);

Fixed version (ground truth):
/** 
 * Register a module data factory. This is needed so that RFTools know how to deserialize your module data for your screen module. You don't have to do this for any of the builtin module data implementations (like IModuleDataBoolean, IModuleDataInteger and so on). Note that you only need the screen module registry if you have custom data.
 * @param id a unique id in the form modid:name
 * @param dataFactory
 */
void registerModuleDataFactory(String id,IModuleDataFactory<?> dataFactory);
Program: 165664
Project: 165664
Buggy source:
IModuleDataFactory getModuleDataFactory(String id);

Fixed version (ground truth):
IModuleDataFactory<?> getModuleDataFactory(String id);
Program: 165665
Project: 165665
Buggy source:
@Override public void registerModuleDataFactory(String id,IModuleDataFactory dataFactory){
  dataFactoryMap.put(id,dataFactory);
}

Fixed version (ground truth):
@Override public void registerModuleDataFactory(String id,IModuleDataFactory<?> dataFactory){
  dataFactoryMap.put(id,dataFactory);
}
Program: 165666
Project: 165666
Buggy source:
@Override public IModuleDataFactory getModuleDataFactory(String id){
  return dataFactoryMap.get(id);
}

Fixed version (ground truth):
@Override public IModuleDataFactory<?> getModuleDataFactory(String id){
  return dataFactoryMap.get(id);
}
Program: 165667
Project: 165667
Buggy source:
@SideOnly(Side.CLIENT) @Override public Class<? extends GenericGuiContainer> getGuiClass(){
  return GuiBlockProtector.class;
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public Class<GuiBlockProtector> getGuiClass(){
  return GuiBlockProtector.class;
}
Program: 165668
Project: 165668
Buggy source:
@Override public void initGui(){
  super.initGui();
  int maxEnergyStored=tileEntity.getMaxEnergyStored();
  energyBar=new EnergyBar(mc,this).setVertical().setMaxValue(maxEnergyStored).setLayoutHint(new PositionalLayout.PositionalHint(10,7,8,54)).setShowText(false);
  energyBar.setValue(GenericEnergyStorageTileEntity.getCurrentRF());
  initRedstoneMode();
  Widget toplevel=new Panel(mc,this).setBackground(iconLocation).setLayout(new PositionalLayout()).addChild(energyBar).addChild(redstoneMode);
  toplevel.setBounds(new Rectangle(guiLeft,guiTop,xSize,ySize));
  window=new Window(this,toplevel);
  tileEntity.requestRfFromServer(RFTools.MODID);
}

Fixed version (ground truth):
@Override public void initGui(){
  super.initGui();
  int maxEnergyStored=tileEntity.getMaxEnergyStored();
  energyBar=new EnergyBar(mc,this).setVertical().setMaxValue(maxEnergyStored).setLayoutHint(new PositionalLayout.PositionalHint(10,7,8,54)).setShowText(false);
  energyBar.setValue(GenericEnergyStorageTileEntity.getCurrentRF());
  initRedstoneMode();
  Panel toplevel=new Panel(mc,this).setBackground(iconLocation).setLayout(new PositionalLayout()).addChild(energyBar).addChild(redstoneMode);
  toplevel.setBounds(new Rectangle(guiLeft,guiTop,xSize,ySize));
  window=new Window(this,toplevel);
  tileEntity.requestRfFromServer(RFTools.MODID);
}
Program: 165669
Project: 165669
Buggy source:
@SideOnly(Side.CLIENT) @Override public Class<? extends GenericGuiContainer> getGuiClass(){
  return GuiBooster.class;
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public Class<GuiBooster> getGuiClass(){
  return GuiBooster.class;
}
Program: 165670
Project: 165670
Buggy source:
@SideOnly(Side.CLIENT) @Override public Class<? extends GenericGuiContainer> getGuiClass(){
  return GuiBuilder.class;
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public Class<GuiBuilder> getGuiClass(){
  return GuiBuilder.class;
}
Program: 165671
Project: 165671
Buggy source:
@SideOnly(Side.CLIENT) @Override public Class<? extends GenericGuiContainer> getGuiClass(){
  return GuiCrafter.class;
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public Class<GuiCrafter> getGuiClass(){
  return GuiCrafter.class;
}
Program: 165673
Project: 165673
Buggy source:
@SideOnly(Side.CLIENT) @Override public Class<? extends GenericGuiContainer> getGuiClass(){
  return GuiElevator.class;
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public Class<GuiElevator> getGuiClass(){
  return GuiElevator.class;
}
Program: 165674
Project: 165674
Buggy source:
@SideOnly(Side.CLIENT) @Override public Class<? extends GenericGuiContainer> getGuiClass(){
  return GuiEnderMonitor.class;
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public Class<GuiEnderMonitor> getGuiClass(){
  return GuiEnderMonitor.class;
}
Program: 165675
Project: 165675
Buggy source:
@SideOnly(Side.CLIENT) @Override public Class<? extends GenericGuiContainer> getGuiClass(){
  return GuiEndergenic.class;
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public Class<GuiEndergenic> getGuiClass(){
  return GuiEndergenic.class;
}
Program: 165677
Project: 165677
Buggy source:
@Override public void initGui(){
  super.initGui();
  Widget toplevel=new Panel(mc,this).setBackground(iconLocation).setLayout(new PositionalLayout());
  toplevel.setBounds(new Rectangle(guiLeft,guiTop,xSize,ySize));
  window=new Window(this,toplevel);
}

Fixed version (ground truth):
@Override public void initGui(){
  super.initGui();
  Panel toplevel=new Panel(mc,this).setBackground(iconLocation).setLayout(new PositionalLayout());
  toplevel.setBounds(new Rectangle(guiLeft,guiTop,xSize,ySize));
  window=new Window(this,toplevel);
}
Program: 165678
Project: 165678
Buggy source:
@SideOnly(Side.CLIENT) @Override public Class<? extends GenericGuiContainer> getGuiClass(){
  return GuiPearlInjector.class;
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public Class<GuiPearlInjector> getGuiClass(){
  return GuiPearlInjector.class;
}
Program: 165679
Project: 165679
Buggy source:
@SideOnly(Side.CLIENT) @Override public Class<? extends GenericGuiContainer> getGuiClass(){
  return GuiEnvironmentalController.class;
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public Class<GuiEnvironmentalController> getGuiClass(){
  return GuiEnvironmentalController.class;
}
Program: 165680
Project: 165680
Buggy source:
@SideOnly(Side.CLIENT) @Override public Class<? extends GenericGuiContainer> getGuiClass(){
  return GuiCoalGenerator.class;
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public Class<GuiCoalGenerator> getGuiClass(){
  return GuiCoalGenerator.class;
}
Program: 165681
Project: 165681
Buggy source:
@Override public void initGui(){
  super.initGui();
  int maxEnergyStored=tileEntity.getMaxEnergyStored();
  energyBar=new EnergyBar(mc,this).setVertical().setMaxValue(maxEnergyStored).setLayoutHint(new PositionalLayout.PositionalHint(10,7,8,54)).setShowText(false);
  energyBar.setValue(GenericEnergyStorageTileEntity.getCurrentRF());
  initRedstoneMode();
  Widget toplevel=new Panel(mc,this).setBackground(iconLocation).setLayout(new PositionalLayout()).addChild(energyBar).addChild(redstoneMode);
  toplevel.setBounds(new Rectangle(guiLeft,guiTop,xSize,ySize));
  window=new Window(this,toplevel);
  tileEntity.requestRfFromServer(RFTools.MODID);
}

Fixed version (ground truth):
@Override public void initGui(){
  super.initGui();
  int maxEnergyStored=tileEntity.getMaxEnergyStored();
  energyBar=new EnergyBar(mc,this).setVertical().setMaxValue(maxEnergyStored).setLayoutHint(new PositionalLayout.PositionalHint(10,7,8,54)).setShowText(false);
  energyBar.setValue(GenericEnergyStorageTileEntity.getCurrentRF());
  initRedstoneMode();
  Panel toplevel=new Panel(mc,this).setBackground(iconLocation).setLayout(new PositionalLayout()).addChild(energyBar).addChild(redstoneMode);
  toplevel.setBounds(new Rectangle(guiLeft,guiTop,xSize,ySize));
  window=new Window(this,toplevel);
  tileEntity.requestRfFromServer(RFTools.MODID);
}
Program: 165682
Project: 165682
Buggy source:
@Override public void initGui(){
  super.initGui();
  int maxEnergyStored=tileEntity.getMaxEnergyStored();
  energyBar=new EnergyBar(mc,this).setVertical().setMaxValue(maxEnergyStored).setLayoutHint(new PositionalLayout.PositionalHint(10,7,8,54)).setShowText(false);
  energyBar.setValue(GenericEnergyStorageTileEntity.getCurrentRF());
  Widget toplevel=new Panel(mc,this).setBackground(iconLocation).setLayout(new PositionalLayout()).addChild(energyBar);
  toplevel.setBounds(new Rectangle(guiLeft,guiTop,xSize,ySize));
  window=new Window(this,toplevel);
  tileEntity.requestRfFromServer(RFTools.MODID);
}

Fixed version (ground truth):
@Override public void initGui(){
  super.initGui();
  int maxEnergyStored=tileEntity.getMaxEnergyStored();
  energyBar=new EnergyBar(mc,this).setVertical().setMaxValue(maxEnergyStored).setLayoutHint(new PositionalLayout.PositionalHint(10,7,8,54)).setShowText(false);
  energyBar.setValue(GenericEnergyStorageTileEntity.getCurrentRF());
  Panel toplevel=new Panel(mc,this).setBackground(iconLocation).setLayout(new PositionalLayout()).addChild(energyBar);
  toplevel.setBounds(new Rectangle(guiLeft,guiTop,xSize,ySize));
  window=new Window(this,toplevel);
  tileEntity.requestRfFromServer(RFTools.MODID);
}
Program: 165683
Project: 165683
Buggy source:
@SideOnly(Side.CLIENT) @Override public Class<? extends GenericGuiContainer> getGuiClass(){
  return GuiMachineInfuser.class;
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public Class<GuiMachineInfuser> getGuiClass(){
  return GuiMachineInfuser.class;
}
Program: 165684
Project: 165684
Buggy source:
@SideOnly(Side.CLIENT) @Override public Class<? extends GenericGuiContainer> getGuiClass(){
  return GuiItemFilter.class;
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public Class<GuiItemFilter> getGuiClass(){
  return GuiItemFilter.class;
}
Program: 165685
Project: 165685
Buggy source:
@SideOnly(Side.CLIENT) @Override public Class<? extends GenericGuiContainer> getGuiClass(){
  return GuiCounter.class;
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public Class<GuiCounter> getGuiClass(){
  return GuiCounter.class;
}
Program: 165686
Project: 165686
Buggy source:
@SideOnly(Side.CLIENT) @Override public Class<? extends GenericGuiContainer> getGuiClass(){
  return GuiInvChecker.class;
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public Class<GuiInvChecker> getGuiClass(){
  return GuiInvChecker.class;
}
Program: 165687
Project: 165687
Buggy source:
@SideOnly(Side.CLIENT) @Override public Class<? extends GenericGuiContainer> getGuiClass(){
  return GuiSensor.class;
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public Class<GuiSensor> getGuiClass(){
  return GuiSensor.class;
}
Program: 165688
Project: 165688
Buggy source:
@SideOnly(Side.CLIENT) @Override public Class<? extends GenericGuiContainer> getGuiClass(){
  return GuiSequencer.class;
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public Class<GuiSequencer> getGuiClass(){
  return GuiSequencer.class;
}
Program: 165689
Project: 165689
Buggy source:
private void restart(){
  sendServerCommand(RFToolsMessages.INSTANCE,BuilderTileEntity.CMD_RESTART,new Argument("String_Node_Str",RedstoneMode.values()[redstoneMode.getCurrentChoiceIndex()].getDescription()));
}

Fixed version (ground truth):
private void restart(){
  sendServerCommand(RFToolsMessages.INSTANCE,BuilderTileEntity.CMD_RESTART);
}
Program: 165690
Project: 165690
Buggy source:
private void changeRedstoneMode(){
  tileEntity.setRSMode(RedstoneMode.values()[redstoneMode.getCurrentChoiceIndex()]);
  sendServerCommand(RFToolsMessages.INSTANCE,BuilderTileEntity.CMD_MODE,new Argument("String_Node_Str",RedstoneMode.values()[redstoneMode.getCurrentChoiceIndex()].getDescription()));
}

Fixed version (ground truth):
private void changeRedstoneMode(){
  tileEntity.setRSMode(RedstoneMode.values()[redstoneMode.getCurrentChoiceIndex()]);
  sendServerCommand(RFToolsMessages.INSTANCE,BuilderTileEntity.CMD_SETRSMODE,new Argument("String_Node_Str",RedstoneMode.values()[redstoneMode.getCurrentChoiceIndex()].getDescription()));
}
Program: 165691
Project: 165691
Buggy source:
private static int getScanId(NBTTagCompound tagCompound){
  if (tagCompound.hasKey("String_Node_Str")) {
    return tagCompound.getInteger("String_Node_Str");
  }
  Shape shape=getShape(tagCompound);
  if (shape == Shape.SHAPE_COMPOSITION) {
    NBTTagList children=tagCompound.getTagList("String_Node_Str",Constants.NBT.TAG_COMPOUND);
    for (int i=0; i < children.tagCount(); i++) {
      NBTTagCompound childTag=children.getCompoundTagAt(i);
      int id=getScanId(childTag);
      if (id != 0) {
        return id;
      }
    }
  }
  return 0;
}

Fixed version (ground truth):
public static int getScanId(ItemStack stack){
  if (ItemStackTools.isEmpty(stack)) {
    return 0;
  }
  NBTTagCompound tagCompound=getCompound(stack);
  return tagCompound.getInteger("String_Node_Str");
}
Program: 165693
Project: 165693
Buggy source:
@Override public void addProbeInfo(ProbeMode mode,IProbeInfo probeInfo,EntityPlayer player,World world,IBlockState blockState,IProbeHitData data){
  super.addProbeInfo(mode,probeInfo,player,world,blockState,data);
  TileEntity te=world.getTileEntity(data.getPos());
  if (te instanceof BuilderTileEntity) {
    int scan=BuilderTileEntity.getCurrentLevel();
    probeInfo.text(TextFormatting.GREEN + "String_Node_Str" + (scan == -1 ? "String_Node_Str" : scan));
  }
}

Fixed version (ground truth):
@Override public void addProbeInfo(ProbeMode mode,IProbeInfo probeInfo,EntityPlayer player,World world,IBlockState blockState,IProbeHitData data){
  super.addProbeInfo(mode,probeInfo,player,world,blockState,data);
  TileEntity te=world.getTileEntity(data.getPos());
  if (te instanceof BuilderTileEntity) {
    int scan=((BuilderTileEntity)te).getCurrentLevel();
    probeInfo.text(TextFormatting.GREEN + "String_Node_Str" + (scan == -1 ? "String_Node_Str" : scan));
  }
}
Program: 165694
Project: 165694
Buggy source:
@SideOnly(Side.CLIENT) @Override public List<String> getWailaBody(ItemStack itemStack,List<String> currenttip,IWailaDataAccessor accessor,IWailaConfigHandler config){
  super.getWailaBody(itemStack,currenttip,accessor,config);
  TileEntity te=accessor.getTileEntity();
  if (te instanceof BuilderTileEntity) {
    if (System.currentTimeMillis() - lastTime > 250) {
      lastTime=System.currentTimeMillis();
      BuilderTileEntity builderTileEntity=(BuilderTileEntity)te;
      builderTileEntity.requestCurrentLevel();
    }
    int scan=BuilderTileEntity.getCurrentLevel();
    currenttip.add(TextFormatting.GREEN + "String_Node_Str" + (scan == -1 ? "String_Node_Str" : scan));
  }
  return currenttip;
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public List<String> getWailaBody(ItemStack itemStack,List<String> currenttip,IWailaDataAccessor accessor,IWailaConfigHandler config){
  super.getWailaBody(itemStack,currenttip,accessor,config);
  TileEntity te=accessor.getTileEntity();
  if (te instanceof BuilderTileEntity) {
    if (System.currentTimeMillis() - lastTime > 250) {
      lastTime=System.currentTimeMillis();
      BuilderTileEntity builderTileEntity=(BuilderTileEntity)te;
      builderTileEntity.requestCurrentLevel();
    }
    int scan=BuilderTileEntity.getCurrentLevelClientSide();
    currenttip.add(TextFormatting.GREEN + "String_Node_Str" + (scan == -1 ? "String_Node_Str" : scan));
  }
  return currenttip;
}
Program: 165695
Project: 165695
Buggy source:
public static int getCurrentLevel(){
  return currentLevel;
}

Fixed version (ground truth):
public int getCurrentLevel(){
  return scan == null ? -1 : scan.getY();
}
Program: 165696
Project: 165696
Buggy source:
@Override protected void drawGuiContainerBackgroundLayer(float v,int i,int i2){
  int cury=getCurrentLevel();
  currentLevel.setText("String_Node_Str" + (cury == -1 ? "String_Node_Str" : cury));
  ItemStack card=tileEntity.getStackInSlot(BuilderContainer.SLOT_TAB);
  boolean enabled;
  if (ItemStackTools.isEmpty(card)) {
    enabled=false;
  }
 else   if (card.getItem() == BuilderSetup.shapeCardItem) {
    enabled=false;
  }
 else {
    enabled=true;
  }
  modeChoice.setEnabled(enabled);
  rotateButton.setEnabled(enabled);
  updateAnchorSettings(tileEntity.getAnchor());
  drawWindow();
  energyBar.setValue(getCurrentRF());
  tileEntity.requestRfFromServer(RFTools.MODID);
  tileEntity.requestCurrentLevel();
}

Fixed version (ground truth):
@Override protected void drawGuiContainerBackgroundLayer(float v,int i,int i2){
  int cury=getCurrentLevelClientSide();
  currentLevel.setText("String_Node_Str" + (cury == -1 ? "String_Node_Str" : cury));
  ItemStack card=tileEntity.getStackInSlot(BuilderContainer.SLOT_TAB);
  boolean enabled;
  if (ItemStackTools.isEmpty(card)) {
    enabled=false;
  }
 else   if (card.getItem() == BuilderSetup.shapeCardItem) {
    enabled=false;
  }
 else {
    enabled=true;
  }
  modeChoice.setEnabled(enabled);
  rotateButton.setEnabled(enabled);
  updateAnchorSettings(tileEntity.getAnchor());
  drawWindow();
  energyBar.setValue(getCurrentRF());
  tileEntity.requestRfFromServer(RFTools.MODID);
  tileEntity.requestCurrentLevel();
}
Program: 165697
Project: 165697
Buggy source:
@Override public void initGui(){
  super.initGui();
  int maxEnergyStored=tileEntity.getMaxEnergyStored(EnumFacing.DOWN);
  energyBar=new EnergyBar(mc,this).setVertical().setMaxValue(maxEnergyStored).setLayoutHint(new PositionalLayout.PositionalHint(10,6,9,59)).setShowText(false);
  energyBar.setValue(getCurrentRF());
  initRedstoneMode();
  currentLevel=new Label(mc,this).setHorizontalAlignment(HorizontalAlignment.ALIGH_LEFT);
  currentLevel.setText("String_Node_Str").setTooltips("String_Node_Str").setLayoutHint(new PositionalLayout.PositionalHint(75,31,40,15));
  Panel positionPanel=setupPositionPanel();
  Panel modePanel=setupModePanel();
  Panel toplevel=new Panel(mc,this).setBackground(iconLocation).setLayout(new PositionalLayout()).addChild(energyBar).addChild(modePanel).addChild(positionPanel).addChild(currentLevel).addChild(redstoneMode);
  toplevel.setBounds(new Rectangle(guiLeft,guiTop,xSize,ySize));
  window=new Window(this,toplevel);
  tileEntity.requestRfFromServer(RFTools.MODID);
  tileEntity.requestCurrentLevel();
}

Fixed version (ground truth):
@Override public void initGui(){
  super.initGui();
  int maxEnergyStored=tileEntity.getMaxEnergyStored(EnumFacing.DOWN);
  energyBar=new EnergyBar(mc,this).setVertical().setMaxValue(maxEnergyStored).setLayoutHint(new PositionalLayout.PositionalHint(10,6,9,59)).setShowText(false);
  energyBar.setValue(getCurrentRF());
  initRedstoneMode();
  currentLevel=new Button(mc,this);
  currentLevel.setText("String_Node_Str").setTooltips("String_Node_Str",TextFormatting.YELLOW + "String_Node_Str").setLayoutHint(new PositionalLayout.PositionalHint(75,31,45,13)).addButtonEvent(parent -> restart());
  Panel positionPanel=setupPositionPanel();
  Panel modePanel=setupModePanel();
  Panel toplevel=new Panel(mc,this).setBackground(iconLocation).setLayout(new PositionalLayout()).addChild(energyBar).addChild(modePanel).addChild(positionPanel).addChild(currentLevel).addChild(redstoneMode);
  toplevel.setBounds(new Rectangle(guiLeft,guiTop,xSize,ySize));
  window=new Window(this,toplevel);
  tileEntity.requestRfFromServer(RFTools.MODID);
  tileEntity.requestCurrentLevel();
}
Program: 165699
Project: 165699
Buggy source:
private void handleSendingEnergy(){
  int energyStored=getEnergyStored();
  if (energyStored <= EndergenicConfiguration.keepRfInBuffer) {
    return;
  }
  energyStored-=EndergenicConfiguration.keepRfInBuffer;
  for (  EnumFacing dir : EnumFacing.VALUES) {
    BlockPos o=getPos().offset(dir);
    TileEntity te=getWorld().getTileEntity(o);
    if (EnergyTools.isEnergyTE(te)) {
      EnumFacing opposite=dir.getOpposite();
      int rfToGive;
      if (EndergenicConfiguration.rfOutput <= energyStored) {
        rfToGive=EndergenicConfiguration.rfOutput;
      }
 else {
        rfToGive=energyStored;
      }
      int received;
      if (RFTools.redstoneflux && RedstoneFluxCompatibility.isEnergyConnection(te)) {
        if (RedstoneFluxCompatibility.canConnectEnergy(te,opposite)) {
          received=EnergyTools.receiveEnergy(te,opposite,rfToGive);
        }
 else {
          received=0;
        }
      }
 else {
        received=EnergyTools.receiveEnergy(te,opposite,rfToGive);
      }
      energyStored-=storage.extractEnergy(received,false);
      if (energyStored <= 0) {
        break;
      }
    }
  }
}

Fixed version (ground truth):
private void handleSendingEnergy(){
  int energyStored=getEnergyStored();
  if (energyStored <= EndergenicConfiguration.keepRfInBuffer) {
    return;
  }
  energyStored-=EndergenicConfiguration.keepRfInBuffer;
  for (  EnumFacing dir : EnumFacing.VALUES) {
    BlockPos o=getPos().offset(dir);
    TileEntity te=getWorld().getTileEntity(o);
    EnumFacing opposite=dir.getOpposite();
    if (EnergyTools.isEnergyTE(te) || (te != null && te.hasCapability(CapabilityEnergy.ENERGY,opposite))) {
      int rfToGive;
      if (EndergenicConfiguration.rfOutput <= energyStored) {
        rfToGive=EndergenicConfiguration.rfOutput;
      }
 else {
        rfToGive=energyStored;
      }
      int received;
      if (RFTools.redstoneflux && RedstoneFluxCompatibility.isEnergyConnection(te)) {
        if (RedstoneFluxCompatibility.canConnectEnergy(te,opposite)) {
          received=EnergyTools.receiveEnergy(te,opposite,rfToGive);
        }
 else {
          received=0;
        }
      }
 else {
        received=EnergyTools.receiveEnergy(te,opposite,rfToGive);
      }
      energyStored-=storage.extractEnergy(received,false);
      if (energyStored <= 0) {
        break;
      }
    }
  }
}
Program: 165700
Project: 165700
Buggy source:
private void handleSendingEnergy(){
  int energyStored=getEnergyStored();
  for (  EnumFacing facing : EnumFacing.VALUES) {
    BlockPos pos=getPos().offset(facing);
    TileEntity te=getWorld().getTileEntity(pos);
    if (EnergyTools.isEnergyTE(te)) {
      EnumFacing opposite=facing.getOpposite();
      int rfToGive=CoalGeneratorConfiguration.SENDPERTICK <= energyStored ? CoalGeneratorConfiguration.SENDPERTICK : energyStored;
      int received;
      if (RFTools.redstoneflux && RedstoneFluxCompatibility.isEnergyConnection(te)) {
        if (RedstoneFluxCompatibility.canConnectEnergy(te,opposite)) {
          received=EnergyTools.receiveEnergy(te,opposite,rfToGive);
        }
 else {
          received=0;
        }
      }
 else {
        received=EnergyTools.receiveEnergy(te,opposite,rfToGive);
      }
      energyStored-=storage.extractEnergy(received,false);
      if (energyStored <= 0) {
        break;
      }
    }
  }
}

Fixed version (ground truth):
private void handleSendingEnergy(){
  int energyStored=getEnergyStored();
  for (  EnumFacing facing : EnumFacing.VALUES) {
    BlockPos pos=getPos().offset(facing);
    TileEntity te=getWorld().getTileEntity(pos);
    EnumFacing opposite=facing.getOpposite();
    if (EnergyTools.isEnergyTE(te) || (te != null && te.hasCapability(CapabilityEnergy.ENERGY,opposite))) {
      int rfToGive=CoalGeneratorConfiguration.SENDPERTICK <= energyStored ? CoalGeneratorConfiguration.SENDPERTICK : energyStored;
      int received;
      if (RFTools.redstoneflux && RedstoneFluxCompatibility.isEnergyConnection(te)) {
        if (RedstoneFluxCompatibility.canConnectEnergy(te,opposite)) {
          received=EnergyTools.receiveEnergy(te,opposite,rfToGive);
        }
 else {
          received=0;
        }
      }
 else {
        received=EnergyTools.receiveEnergy(te,opposite,rfToGive);
      }
      energyStored-=storage.extractEnergy(received,false);
      if (energyStored <= 0) {
        break;
      }
    }
  }
}
Program: 165701
Project: 165701
Buggy source:
private void sendOutEnergy(){
  int energyStored=getEnergyStored();
  for (  EnumFacing face : EnumFacing.VALUES) {
    if (modes[face.ordinal()] == Mode.MODE_OUTPUT) {
      BlockPos pos=getPos().offset(face);
      TileEntity te=getWorld().getTileEntity(pos);
      if (EnergyTools.isEnergyTE(te)) {
        if ((!(te instanceof PowerCellTileEntity)) || getNetworkId() == -1 || ((PowerCellTileEntity)te).getNetworkId() != getNetworkId()) {
          EnumFacing opposite=face.getOpposite();
          float factor=getCostFactor();
          int rfPerTick=getRfPerTickPerSide();
          int received;
          int rfToGive;
          if (rfPerTick <= ((int)(energyStored / factor))) {
            rfToGive=rfPerTick;
          }
 else {
            rfToGive=(int)(energyStored / factor);
          }
          if (RFTools.redstoneflux && RedstoneFluxCompatibility.isEnergyConnection(te)) {
            if (RedstoneFluxCompatibility.canConnectEnergy(te,opposite)) {
              received=EnergyTools.receiveEnergy(te,opposite,rfToGive);
            }
 else {
              received=0;
            }
          }
 else {
            received=EnergyTools.receiveEnergy(te,opposite,rfToGive);
          }
          energyStored-=extractEnergyInternal(received,false,Integer.MAX_VALUE);
          if (energyStored <= 0) {
            break;
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
private void sendOutEnergy(){
  int energyStored=getEnergyStored();
  for (  EnumFacing face : EnumFacing.VALUES) {
    if (modes[face.ordinal()] == Mode.MODE_OUTPUT) {
      BlockPos pos=getPos().offset(face);
      TileEntity te=getWorld().getTileEntity(pos);
      EnumFacing opposite=face.getOpposite();
      if (EnergyTools.isEnergyTE(te) || (te != null && te.hasCapability(CapabilityEnergy.ENERGY,opposite))) {
        if ((!(te instanceof PowerCellTileEntity)) || getNetworkId() == -1 || ((PowerCellTileEntity)te).getNetworkId() != getNetworkId()) {
          float factor=getCostFactor();
          int rfPerTick=getRfPerTickPerSide();
          int received;
          int rfToGive;
          if (rfPerTick <= ((int)(energyStored / factor))) {
            rfToGive=rfPerTick;
          }
 else {
            rfToGive=(int)(energyStored / factor);
          }
          if (RFTools.redstoneflux && RedstoneFluxCompatibility.isEnergyConnection(te)) {
            if (RedstoneFluxCompatibility.canConnectEnergy(te,opposite)) {
              received=EnergyTools.receiveEnergy(te,opposite,rfToGive);
            }
 else {
              received=0;
            }
          }
 else {
            received=EnergyTools.receiveEnergy(te,opposite,rfToGive);
          }
          energyStored-=extractEnergyInternal(received,false,Integer.MAX_VALUE);
          if (energyStored <= 0) {
            break;
          }
        }
      }
    }
  }
}
Program: 165703
Project: 165703
Buggy source:
@Override public boolean isItemValidForSlot(int index,ItemStack stack){
  if (index == CoalGeneratorContainer.SLOT_CHARGEITEM) {
    return stack.getItem() instanceof IEnergyContainerItem;
  }
 else   if (index == CoalGeneratorContainer.SLOT_COALINPUT) {
    return stack.getItem() == Items.COAL;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean isItemValidForSlot(int index,ItemStack stack){
  if (index == CoalGeneratorContainer.SLOT_CHARGEITEM) {
    return stack.getItem() instanceof IEnergyContainerItem;
  }
 else   if (index == CoalGeneratorContainer.SLOT_COALINPUT) {
    return stack.getItem() == Items.COAL || stack.getItem() == Item.getItemFromBlock(Blocks.COAL_BLOCK);
  }
  return true;
}
Program: 165705
Project: 165705
Buggy source:
public void readFromNBT(NBTTagCompound tagCompound){
  this.energy=tagCompound.getInteger("String_Node_Str");
  this.advancedBlocks=tagCompound.getInteger("String_Node_Str");
  this.simpleBlocks=tagCompound.getInteger("String_Node_Str");
  blocks.clear();
  NBTTagList list=tagCompound.getTagList("String_Node_Str",Constants.NBT.TAG_COMPOUND);
  for (int i=0; i < list.tagCount(); i++) {
    NBTTagCompound tag=list.getCompoundTagAt(i);
    blocks.add(new GlobalCoordinate(new BlockPos(tag.getInteger("String_Node_Str"),tag.getInteger("String_Node_Str"),tag.getInteger("String_Node_Str")),tag.getInteger("String_Node_Str")));
  }
}

Fixed version (ground truth):
public void readFromNBT(NBTTagCompound tagCompound){
  this.energy=tagCompound.getInteger("String_Node_Str");
  this.advancedBlocks=tagCompound.getInteger("String_Node_Str");
  this.simpleBlocks=tagCompound.getInteger("String_Node_Str");
  blocks.clear();
  NBTTagList list=tagCompound.getTagList("String_Node_Str",Constants.NBT.TAG_COMPOUND);
  for (int i=0; i < list.tagCount(); i++) {
    NBTTagCompound tag=list.getCompoundTagAt(i);
    blocks.add(new GlobalCoordinate(new BlockPos(tag.getInteger("String_Node_Str"),tag.getInteger("String_Node_Str"),tag.getInteger("String_Node_Str")),tag.getInteger("String_Node_Str")));
  }
  if (energy < 0) {
    energy=calculateMaximumEnergy();
  }
}
Program: 165706
Project: 165706
Buggy source:
private int receiveEnergyMulti(int maxReceive,boolean simulate){
  PowerCellNetwork.Network network=getNetwork();
  if (getWorld().isRemote) {
    throw new RuntimeException("String_Node_Str");
  }
  int totEnergy=PowerCellConfiguration.rfPerNormalCell * (network.getBlockCount() - network.getAdvancedBlockCount() - network.getSimpleBlockCount()) + PowerCellConfiguration.rfPerNormalCell * advancedFactor * network.getAdvancedBlockCount() + +PowerCellConfiguration.rfPerNormalCell * network.getSimpleBlockCount() / simpleFactor;
  int maxInsert=Math.min(totEnergy - network.getEnergy(),maxReceive);
  if (maxInsert > 0) {
    if (!simulate) {
      network.receiveEnergy(maxInsert);
      PowerCellNetwork.getChannels(getWorld()).save(getWorld());
    }
  }
  return maxInsert;
}

Fixed version (ground truth):
private int receiveEnergyMulti(int maxReceive,boolean simulate){
  PowerCellNetwork.Network network=getNetwork();
  if (getWorld().isRemote) {
    throw new RuntimeException("String_Node_Str");
  }
  int totEnergy=network.calculateMaximumEnergy();
  int maxInsert=Math.min(totEnergy - network.getEnergy(),maxReceive);
  if (maxInsert > 0) {
    if (!simulate) {
      network.receiveEnergy(maxInsert);
      PowerCellNetwork.getChannels(getWorld()).save(getWorld());
    }
  }
  return maxInsert;
}
Program: 165707
Project: 165707
Buggy source:
@Override public boolean isItemValidForSlot(int index,ItemStack stack){
  if (index == CoalGeneratorContainer.SLOT_CHARGEITEM) {
    boolean rf=RFTools.redstoneflux && RedstoneFluxCompatibility.isEnergyItem(stack.getItem());
    return rf;
  }
 else   if (index == CoalGeneratorContainer.SLOT_COALINPUT) {
    return stack.getItem() == Items.COAL;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean isItemValidForSlot(int index,ItemStack stack){
  if (index == CoalGeneratorContainer.SLOT_CHARGEITEM) {
    boolean rf=RFTools.redstoneflux && RedstoneFluxCompatibility.isEnergyItem(stack.getItem());
    return rf;
  }
 else   if (index == CoalGeneratorContainer.SLOT_COALINPUT) {
    return stack.getItem() == Items.COAL || stack.getItem() == Item.getItemFromBlock(Blocks.COAL_BLOCK);
  }
  return true;
}
Program: 165708
Project: 165708
Buggy source:
public void addOreSpawn(IBlockState block,IBlockState targetBlock,World world,Random random,int blockXPos,int blockZPos,int minVeinSize,int maxVeinSize,int chancesToSpawn,int minY,int maxY){
  WorldGenMinable minable=new WorldGenMinable(block,(minVeinSize - random.nextInt(maxVeinSize - minVeinSize)),state -> state.getBlock() == targetBlock.getBlock());
  for (int i=0; i < chancesToSpawn; i++) {
    int posX=blockXPos + random.nextInt(16);
    int posY=minY + random.nextInt(maxY - minY);
    int posZ=blockZPos + random.nextInt(16);
    minable.generate(world,random,new BlockPos(posX,posY,posZ));
  }
}

Fixed version (ground truth):
public void addOreSpawn(IBlockState block,IBlockState targetBlock,World world,Random random,int blockXPos,int blockZPos,int minVeinSize,int maxVeinSize,int chancesToSpawn,int minY,int maxY){
  WorldGenMinable minable=new WorldGenMinable(block,(minVeinSize + random.nextInt(maxVeinSize - minVeinSize)),state -> state.getBlock() == targetBlock.getBlock());
  for (int i=0; i < chancesToSpawn; i++) {
    int posX=blockXPos + random.nextInt(16);
    int posY=minY + random.nextInt(maxY - minY);
    int posZ=blockZPos + random.nextInt(16);
    minable.generate(world,random,new BlockPos(posX,posY,posZ));
  }
}
Program: 165710
Project: 165710
Buggy source:
@SubscribeEvent public void onDetonate(ExplosionEvent.Detonate event){
  Explosion explosion=event.getExplosion();
  Vec3d explosionVector=explosion.getPosition();
  Collection<GlobalCoordinate> protectors=BlockProtectors.getProtectors(event.getWorld(),(int)explosionVector.x,(int)explosionVector.y,(int)explosionVector.z);
  if (protectors.isEmpty()) {
    return;
  }
  List<BlockPos> affectedBlocks=event.getAffectedBlocks();
  List<BlockPos> toremove=new ArrayList<>();
  int rf=0;
  for (  GlobalCoordinate protector : protectors) {
    BlockPos pos=protector.getCoordinate();
    TileEntity te=event.getWorld().getTileEntity(pos);
    if (te instanceof BlockProtectorTileEntity) {
      BlockProtectorTileEntity blockProtectorTileEntity=(BlockProtectorTileEntity)te;
      for (      BlockPos block : affectedBlocks) {
        BlockPos relative=blockProtectorTileEntity.absoluteToRelative(block);
        boolean b=blockProtectorTileEntity.isProtected(relative);
        if (b) {
          Vec3d blockVector=new Vec3d(block);
          double distanceTo=explosionVector.distanceTo(blockVector);
          int rfneeded=blockProtectorTileEntity.attemptExplosionProtection((float)(distanceTo / explosion.explosionSize),explosion.explosionSize);
          if (rfneeded > 0) {
            toremove.add(block);
            rf+=rfneeded;
          }
 else {
            blockProtectorTileEntity.removeProtection(relative);
          }
        }
      }
    }
  }
  affectedBlocks.removeAll(toremove);
}

Fixed version (ground truth):
@SubscribeEvent public void onDetonate(ExplosionEvent.Detonate event){
  Explosion explosion=event.getExplosion();
  Vec3d explosionVector=explosion.getPosition();
  Collection<GlobalCoordinate> protectors=BlockProtectors.getProtectors(event.getWorld(),(int)explosionVector.x,(int)explosionVector.y,(int)explosionVector.z);
  if (protectors.isEmpty()) {
    return;
  }
  List<BlockPos> affectedBlocks=event.getAffectedBlocks();
  List<BlockPos> toremove=new ArrayList<>();
  int rf=0;
  for (  GlobalCoordinate protector : protectors) {
    BlockPos pos=protector.getCoordinate();
    TileEntity te=event.getWorld().getTileEntity(pos);
    if (te instanceof BlockProtectorTileEntity) {
      BlockProtectorTileEntity blockProtectorTileEntity=(BlockProtectorTileEntity)te;
      for (      BlockPos block : affectedBlocks) {
        BlockPos relative=blockProtectorTileEntity.absoluteToRelative(block);
        boolean b=blockProtectorTileEntity.isProtected(relative);
        if (b) {
          Vec3d blockVector=new Vec3d(block);
          double distanceTo=explosionVector.distanceTo(blockVector);
          int rfneeded=blockProtectorTileEntity.attemptExplosionProtection((float)(distanceTo / explosion.size),explosion.size);
          if (rfneeded > 0) {
            toremove.add(block);
            rf+=rfneeded;
          }
 else {
            blockProtectorTileEntity.removeProtection(relative);
          }
        }
      }
    }
  }
  affectedBlocks.removeAll(toremove);
}
Program: 165711
Project: 165711
Buggy source:
@SideOnly(Side.CLIENT) @Override public void addInformation(ItemStack itemStack,EntityPlayer player,List<String> list,boolean whatIsThis){
  super.addInformation(itemStack,player,list,whatIsThis);
  NBTTagCompound tagCompound=itemStack.getTagCompound();
  if (tagCompound != null) {
    int id=tagCompound.getInteger("String_Node_Str");
    list.add(TextFormatting.GREEN + "String_Node_Str" + id);
  }
  if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) {
    list.add(TextFormatting.WHITE + "String_Node_Str");
    list.add(TextFormatting.WHITE + "String_Node_Str");
    list.add(TextFormatting.WHITE + "String_Node_Str");
    list.add(TextFormatting.YELLOW + "String_Node_Str");
  }
 else {
    list.add(TextFormatting.WHITE + RFTools.SHIFT_MESSAGE);
  }
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public void addInformation(ItemStack itemStack,World player,List<String> list,ITooltipFlag whatIsThis){
  super.addInformation(itemStack,player,list,whatIsThis);
  NBTTagCompound tagCompound=itemStack.getTagCompound();
  if (tagCompound != null) {
    int id=tagCompound.getInteger("String_Node_Str");
    list.add(TextFormatting.GREEN + "String_Node_Str" + id);
  }
  if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) {
    list.add(TextFormatting.WHITE + "String_Node_Str");
    list.add(TextFormatting.WHITE + "String_Node_Str");
    list.add(TextFormatting.WHITE + "String_Node_Str");
    list.add(TextFormatting.YELLOW + "String_Node_Str");
  }
 else {
    list.add(TextFormatting.WHITE + RFTools.SHIFT_MESSAGE);
  }
}
Program: 165712
Project: 165712
Buggy source:
public static void initCrafting(){
  if (GeneralConfiguration.enableBlockProtectorRecipe) {
    GameRegistry.addRecipe(new ItemStack(blockProtectorBlock),"String_Node_Str","String_Node_Str","String_Node_Str",'M',ModBlocks.machineFrame,'o',Blocks.OBSIDIAN,'t',ShieldSetup.shieldTemplateBlock);
  }
}

Fixed version (ground truth):
public static void initCrafting(){
  if (GeneralConfiguration.enableBlockProtectorRecipe) {
    MyGameReg.addRecipe(new ItemStack(blockProtectorBlock),"String_Node_Str","String_Node_Str","String_Node_Str",'M',ModBlocks.machineFrame,'o',Blocks.OBSIDIAN,'t',ShieldSetup.shieldTemplateBlock);
  }
}
Program: 165713
Project: 165713
Buggy source:
@SideOnly(Side.CLIENT) @Override public void addInformation(ItemStack itemStack,EntityPlayer player,List<String> list,boolean whatIsThis){
  super.addInformation(itemStack,player,list,whatIsThis);
  if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) {
    list.add(TextFormatting.WHITE + "String_Node_Str");
    list.add(TextFormatting.WHITE + "String_Node_Str");
    list.add(TextFormatting.YELLOW + "String_Node_Str");
  }
 else {
    list.add(TextFormatting.WHITE + RFTools.SHIFT_MESSAGE);
  }
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public void addInformation(ItemStack itemStack,World player,List<String> list,ITooltipFlag whatIsThis){
  super.addInformation(itemStack,player,list,whatIsThis);
  if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) {
    list.add(TextFormatting.WHITE + "String_Node_Str");
    list.add(TextFormatting.WHITE + "String_Node_Str");
    list.add(TextFormatting.YELLOW + "String_Node_Str");
  }
 else {
    list.add(TextFormatting.WHITE + RFTools.SHIFT_MESSAGE);
  }
}
Program: 165714
Project: 165714
Buggy source:
public static void initCrafting(){
  GameRegistry.addRecipe(new ItemStack(boosterBlock),"String_Node_Str","String_Node_Str","String_Node_Str",'o',Items.GLASS_BOTTLE,'M',ModBlocks.machineFrame,'D',Items.DIAMOND,'E',Items.REDSTONE,'G',Items.GOLD_INGOT,'I',Items.IRON_INGOT);
}

Fixed version (ground truth):
public static void initCrafting(){
  MyGameReg.addRecipe(new ItemStack(boosterBlock),"String_Node_Str","String_Node_Str","String_Node_Str",'o',Items.GLASS_BOTTLE,'M',ModBlocks.machineFrame,'D',Items.DIAMOND,'E',Items.REDSTONE,'G',Items.GOLD_INGOT,'I',Items.IRON_INGOT);
}
Program: 165715
Project: 165715
Buggy source:
@SideOnly(Side.CLIENT) @Override public void addInformation(ItemStack itemStack,EntityPlayer player,List<String> list,boolean whatIsThis){
  super.addInformation(itemStack,player,list,whatIsThis);
  if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) {
    list.add(TextFormatting.WHITE + "String_Node_Str");
    list.add(TextFormatting.WHITE + "String_Node_Str");
    list.add(TextFormatting.WHITE + "String_Node_Str");
    list.add(TextFormatting.YELLOW + "String_Node_Str");
    list.add(TextFormatting.YELLOW + "String_Node_Str");
  }
 else {
    list.add(TextFormatting.WHITE + RFTools.SHIFT_MESSAGE);
  }
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public void addInformation(ItemStack itemStack,World player,List<String> list,ITooltipFlag whatIsThis){
  super.addInformation(itemStack,player,list,whatIsThis);
  if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) {
    list.add(TextFormatting.WHITE + "String_Node_Str");
    list.add(TextFormatting.WHITE + "String_Node_Str");
    list.add(TextFormatting.WHITE + "String_Node_Str");
    list.add(TextFormatting.YELLOW + "String_Node_Str");
    list.add(TextFormatting.YELLOW + "String_Node_Str");
  }
 else {
    list.add(TextFormatting.WHITE + RFTools.SHIFT_MESSAGE);
  }
}
Program: 165716
Project: 165716
Buggy source:
@Override public void onBlockPlacedBy(World world,BlockPos pos,IBlockState state,EntityLivingBase placer,ItemStack stack){
  super.onBlockPlacedBy(world,pos,state,placer,stack);
  if (placer instanceof EntityPlayer) {
    Achievements.trigger((EntityPlayer)placer,Achievements.theBuilder);
  }
}

Fixed version (ground truth):
@Override public void onBlockPlacedBy(World world,BlockPos pos,IBlockState state,EntityLivingBase placer,ItemStack stack){
  super.onBlockPlacedBy(world,pos,state,placer,stack);
  if (placer instanceof EntityPlayer) {
  }
}
Program: 165717
Project: 165717
Buggy source:
@Override public void renderTileEntityAt(BuilderTileEntity te,double x,double y,double z,float partialTicks,int destroyStage){
  super.renderTileEntityAt(te,x,y,z,partialTicks,destroyStage);
  if (BuilderConfiguration.showProgressHud) {
    HudRenderer.renderHud(te,x,y,z);
  }
}

Fixed version (ground truth):
@Override public void renderTileEntityAt(BuilderTileEntity te,double x,double y,double z,float partialTicks,int destroyStage,float alpha){
  super.renderTileEntityAt(te,x,y,z,partialTicks,destroyStage,alpha);
  if (BuilderConfiguration.showProgressHud) {
    HudRenderer.renderHud(te,x,y,z);
  }
}
Program: 165719
Project: 165719
Buggy source:
private Function<Pair<SidedConsumer,StorageConnectorSettings>,BlockPos> isInventory(IControllerContext context){
  return pair -> {
    BlockPos invPos=context.findConsumerPosition(pair.getKey().getConsumerId());
    if (invPos != null) {
      TileEntity te=context.getControllerWorld().getTileEntity(invPos);
      if (te != null && (te instanceof IInventory || te.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY,null))) {
        return invPos;
      }
    }
    return null;
  }
;
}

Fixed version (ground truth):
private Function<Pair<SidedConsumer,StorageConnectorSettings>,BlockPos> isInventory(IControllerContext context){
  return pair -> {
    BlockPos consumerPos=context.findConsumerPosition(pair.getKey().getConsumerId());
    if (consumerPos != null) {
      EnumFacing side=pair.getKey().getSide();
      BlockPos pos=consumerPos.offset(side);
      TileEntity te=context.getControllerWorld().getTileEntity(pos);
      if (te != null && (te instanceof IInventory || te.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY,null))) {
        return pos;
      }
    }
    return null;
  }
;
}
Program: 165720
Project: 165720
Buggy source:
@Nullable @Override public IndicatorIcon getIndicatorIcon(){
switch (mode) {
case DUAL:
    return new IndicatorIcon(StorageChannelSettings.iconGuiElements,13,57,13,10);
case INS:
  return new IndicatorIcon(StorageChannelSettings.iconGuiElements,0,48,13,10);
case EXT:
return new IndicatorIcon(StorageChannelSettings.iconGuiElements,13,48,13,10);
case STORAGE:
return new IndicatorIcon(StorageChannelSettings.iconGuiElements,13,67,13,10);
}
return null;
}

Fixed version (ground truth):
@Nullable @Override public IndicatorIcon getIndicatorIcon(){
switch (mode) {
case DUAL:
    return new IndicatorIcon(StorageChannelSettings.iconGuiElements,13,57,13,10);
case INS:
  return new IndicatorIcon(StorageChannelSettings.iconGuiElements,0,48,13,10);
case EXT:
return new IndicatorIcon(StorageChannelSettings.iconGuiElements,13,48,13,10);
case STORAGE:
return new IndicatorIcon(StorageChannelSettings.iconGuiElements,13,66,13,10);
}
return null;
}
Program: 165721
Project: 165721
Buggy source:
private EndergenicTileEntity findEndergenicWithInjector(){
  if (hasInjector()) {
    return this;
  }
  if (destination == null) {
    return null;
  }
  TileEntity te=getWorld().getTileEntity(destination);
  if (te instanceof EndergenicTileEntity) {
    return ((EndergenicTileEntity)te).findEndergenicWithInjector();
  }
  return null;
}

Fixed version (ground truth):
private EndergenicTileEntity findEndergenicWithInjector(BlockPos start){
  if (hasInjector()) {
    return this;
  }
  if (destination == null) {
    return null;
  }
  if (destination == start) {
    return null;
  }
  TileEntity te=getWorld().getTileEntity(destination);
  if (te instanceof EndergenicTileEntity) {
    return ((EndergenicTileEntity)te).findEndergenicWithInjector(start);
  }
  return null;
}