nus-yam/ex-repair huggingface dataset:
Program: 134654
Project: 134654
Buggy source:
/** 
 * Converts JSON string to XML string. XML string is wrapped inside <response> wrapper element. The wrapper must be added, because otherwise it's not possible to convert the XML to SOAP element. JSON string does not likely have a root element that SOAP requires. <response> is used as a temporary root element and will be omitted by ProviderGateway when SOAP response is serialized as XML.
 * @param data JSON string to be converted
 * @return XML string
 */
public static String fromJSONToXML(String data){
  String wrapper="String_Node_Str";
  data=new JSONToXMLConverter().convert(data);
  return "String_Node_Str" + wrapper + "String_Node_Str"+ data+ "String_Node_Str"+ wrapper+ "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Converts JSON string to XML string. XML string is wrapped inside \<response\> wrapper element. The wrapper must be added, because otherwise it's not possible to convert the XML to SOAP element. JSON string does not likely have a root element that SOAP requires. \<response\> is used as a temporary root element and will be omitted by ProviderGateway when SOAP response is serialized as XML.
 * @param data JSON string to be converted
 * @return XML string
 */
public static String fromJSONToXML(String data){
  String wrapper="String_Node_Str";
  String dataXml=new JSONToXMLConverter().convert(data);
  return "String_Node_Str" + wrapper + "String_Node_Str"+ dataXml+ "String_Node_Str"+ wrapper+ "String_Node_Str";
}
Program: 134656
Project: 134656
Buggy source:
@Override public void cape(){
  try {
    DevCapes.getInstance().registerConfig(new URL("String_Node_Str"));
  }
 catch (  MalformedURLException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void cape(){
  try {
    DevCapes.getInstance().registerConfig(new URL("String_Node_Str"));
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 134657
Project: 134657
Buggy source:
private void loadConfiguration(){
  try {
    IC2NuclearControl.instance.alarmRange=configuration.get(Configuration.CATEGORY_GENERAL,"String_Node_Str",64).getInt();
    IC2NuclearControl.instance.maxAlarmRange=configuration.get(Configuration.CATEGORY_GENERAL,"String_Node_Str",128).getInt();
    IC2NuclearControl.instance.allowedAlarms=configuration.get(Configuration.CATEGORY_GENERAL,"String_Node_Str","String_Node_Str").getString().replaceAll("String_Node_Str","String_Node_Str");
    IC2NuclearControl.instance.remoteThermalMonitorEnergyConsumption=configuration.get(Configuration.CATEGORY_GENERAL,"String_Node_Str",1).getInt();
    IC2NuclearControl.instance.screenRefreshPeriod=configuration.get(Configuration.CATEGORY_GENERAL,"String_Node_Str",20).getInt();
    IC2NuclearControl.instance.rangeTriggerRefreshPeriod=configuration.get(Configuration.CATEGORY_GENERAL,"String_Node_Str",20).getInt();
    IC2NuclearControl.instance.SMPMaxAlarmRange=configuration.get(Configuration.CATEGORY_GENERAL,"String_Node_Str",256).getInt();
    IC2NuclearControl.instance.recipes=configuration.getString("String_Node_Str",Configuration.CATEGORY_GENERAL,"String_Node_Str","String_Node_Str");
  }
 catch (  Exception e) {
    IC2NuclearControl.logger.error("String_Node_Str",e);
  }
 finally {
    if (configuration.hasChanged()) {
      configuration.save();
    }
  }
}

Fixed version (ground truth):
private void loadConfiguration(){
  try {
    IC2NuclearControl.instance.alarmRange=configuration.get(Configuration.CATEGORY_GENERAL,"String_Node_Str",64).getInt();
    IC2NuclearControl.instance.maxAlarmRange=configuration.get(Configuration.CATEGORY_GENERAL,"String_Node_Str",128).getInt();
    IC2NuclearControl.instance.allowedAlarms=configuration.get(Configuration.CATEGORY_GENERAL,"String_Node_Str","String_Node_Str").getString().replaceAll("String_Node_Str","String_Node_Str");
    IC2NuclearControl.instance.remoteThermalMonitorEnergyConsumption=configuration.get(Configuration.CATEGORY_GENERAL,"String_Node_Str",1).getInt();
    IC2NuclearControl.instance.screenRefreshPeriod=configuration.get(Configuration.CATEGORY_GENERAL,"String_Node_Str",20).getInt();
    IC2NuclearControl.instance.rangeTriggerRefreshPeriod=configuration.get(Configuration.CATEGORY_GENERAL,"String_Node_Str",20).getInt();
    IC2NuclearControl.instance.SMPMaxAlarmRange=configuration.get(Configuration.CATEGORY_GENERAL,"String_Node_Str",256).getInt();
    IC2NuclearControl.instance.disableCapes=configuration.get(Configuration.CATEGORY_GENERAL,"String_Node_Str",false).getBoolean(false);
    IC2NuclearControl.instance.recipes=configuration.getString("String_Node_Str",Configuration.CATEGORY_GENERAL,"String_Node_Str","String_Node_Str");
  }
 catch (  Exception e) {
    IC2NuclearControl.logger.error("String_Node_Str",e);
  }
 finally {
    if (configuration.hasChanged()) {
      configuration.save();
    }
  }
}
Program: 134658
Project: 134658
Buggy source:
@EventHandler public void postInit(FMLPostInitializationEvent event){
  proxy.cape();
  CrossModLoader.postinit();
  crossBC=new CrossBuildcraft();
  crossRailcraft=new CrossRailcraft();
  crossRF=new CrossRF();
  crossIc2=IC2Cross.getIC2Cross();
  if (crossIc2.getType() == IC2Type.SPEIGER) {
    if (recipes.equalsIgnoreCase("String_Node_Str")) {
      logger.info("String_Node_Str");
      RecipesNew.addRecipes();
    }
 else     if (recipes.equalsIgnoreCase("String_Node_Str")) {
      logger.info("String_Node_Str");
      GregtechRecipes.addRecipes();
    }
 else {
      RecipesOld.addOldRecipes();
    }
  }
 else   if (recipes.equalsIgnoreCase("String_Node_Str")) {
    RecipesOld.addOldRecipes();
  }
 else   if (recipes.equalsIgnoreCase("String_Node_Str") || recipes.equalsIgnoreCase("String_Node_Str")) {
    GregtechRecipes.addRecipes();
    logger.info("String_Node_Str");
  }
 else {
    RecipesNew.addRecipes();
  }
}

Fixed version (ground truth):
@EventHandler public void postInit(FMLPostInitializationEvent event){
  if (!disableCapes) {
    proxy.cape();
  }
  CrossModLoader.postinit();
  crossBC=new CrossBuildcraft();
  crossRailcraft=new CrossRailcraft();
  crossRF=new CrossRF();
  crossIc2=IC2Cross.getIC2Cross();
  if (crossIc2.getType() == IC2Type.SPEIGER) {
    if (recipes.equalsIgnoreCase("String_Node_Str")) {
      logger.info("String_Node_Str");
      RecipesNew.addRecipes();
    }
 else     if (recipes.equalsIgnoreCase("String_Node_Str")) {
      logger.info("String_Node_Str");
      GregtechRecipes.addRecipes();
    }
 else {
      RecipesOld.addOldRecipes();
    }
  }
 else   if (recipes.equalsIgnoreCase("String_Node_Str")) {
    RecipesOld.addOldRecipes();
  }
 else   if (recipes.equalsIgnoreCase("String_Node_Str") || recipes.equalsIgnoreCase("String_Node_Str")) {
    GregtechRecipes.addRecipes();
    logger.info("String_Node_Str");
  }
 else {
    RecipesNew.addRecipes();
  }
}
Program: 134660
Project: 134660
Buggy source:
@Override public CardState update(World world,ICardWrapper card,int range){
  ChunkCoordinates target=card.getTarget();
  TileEntity check=world.getTileEntity(target.posX,target.posY,target.posZ);
  if (check instanceof TileEntityBlockFetcher) {
    TileEntityBlockFetcher BF=(TileEntityBlockFetcher)check;
    card.setBoolean("String_Node_Str",BF.isReactorOnline());
    card.setDouble("String_Node_Str",(double)BF.getEnergyStored());
    card.setDouble("String_Node_Str",(double)BF.getEnergyGenerated());
    card.setInt("String_Node_Str",BF.getTemp());
    card.setDouble("String_Node_Str",(double)BF.getEnergyOutPercent());
    return CardState.OK;
  }
 else {
    return CardState.NO_TARGET;
  }
}

Fixed version (ground truth):
@Override public CardState update(World world,ICardWrapper card,int range){
  ChunkCoordinates target=card.getTarget();
  TileEntity check=world.getTileEntity(target.posX,target.posY,target.posZ);
  if (check instanceof TileEntityBlockFetcher) {
    TileEntityBlockFetcher BF=(TileEntityBlockFetcher)check;
    card.setBoolean("String_Node_Str",BF.isReactorOnline());
    card.setDouble("String_Node_Str",(double)BF.getEnergyStored());
    card.setDouble("String_Node_Str",(double)BF.getEnergyGenerated());
    card.setInt("String_Node_Str",BF.getTemp());
    card.setDouble("String_Node_Str",(double)BF.getEnergyOutPercent());
    card.setBoolean("String_Node_Str",BF.getReactorController().isPassivelyCooled());
    if (!BF.getReactorController().isPassivelyCooled()) {
      if (BF.getReactorController().getCoolantContainer().getVaporType() != null) {
        card.setString("String_Node_Str",BF.getReactorController().getCoolantContainer().getVaporType().getLocalizedName());
        card.setInt("String_Node_Str",BF.getReactorController().getCoolantContainer().getVaporAmount());
      }
 else {
        card.setString("String_Node_Str","String_Node_Str");
        card.setInt("String_Node_Str",0);
      }
      if (BF.getReactorController().getCoolantContainer().getCoolantType() != null) {
        card.setString("String_Node_Str",new FluidStack(BF.getReactorController().getCoolantContainer().getCoolantType(),1).getLocalizedName());
        card.setInt("String_Node_Str",BF.getReactorController().getCoolantContainer().getCoolantAmount());
      }
 else {
        card.setString("String_Node_Str","String_Node_Str");
        card.setInt("String_Node_Str",0);
      }
    }
    return CardState.OK;
  }
 else {
    return CardState.NO_TARGET;
  }
}
Program: 134661
Project: 134661
Buggy source:
@Override public void cape(){
  DevCapes.getInstance().registerConfig("String_Node_Str");
}

Fixed version (ground truth):
@Override public void cape(){
  try {
    DevCapes.getInstance().registerConfig(new URL("String_Node_Str"));
  }
 catch (  MalformedURLException e) {
    e.printStackTrace();
  }
}
Program: 134662
Project: 134662
Buggy source:
@Override protected void actionPerformed(GuiButton par1GuiButton){
  if (textArea != null && wrapper != null) {
    String[] lines=textArea.getText();
    if (lines != null) {
      for (int i=0; i < lines.length; i++) {
        wrapper.setString("String_Node_Str" + i,lines[i]);
      }
    }
  }
  wrapper.commit();
  wrapper.closeGui();
}

Fixed version (ground truth):
@Override protected void actionPerformed(GuiButton par1GuiButton){
  if (textArea != null && wrapper != null) {
    String[] lines=textArea.getText();
    if (lines != null)     for (int i=0; i < lines.length; i++)     wrapper.setString("String_Node_Str" + i,lines[i]);
  }
  wrapper.commit();
  wrapper.closeGui();
}
Program: 134663
Project: 134663
Buggy source:
@SuppressWarnings("String_Node_Str") private void initControls(){
  buttonList.clear();
  buttonList.add(new GuiButton(1,guiLeft + xSize - 60 - 8,guiTop + 120,60,20,"String_Node_Str"));
  textArea=new GuiTextArea(fontRendererObj,guiLeft + 8,guiTop + 5,xSize - 16,ySize - 35,lineCount);
  textArea.setFocused(true);
  String[] data=textArea.getText();
  for (int i=0; i < lineCount; i++) {
    data[i]=helper.getString("String_Node_Str" + i);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void initControls(){
  buttonList.clear();
  buttonList.add(new GuiButton(1,guiLeft + xSize - 60 - 8,guiTop + 120,60,20,"String_Node_Str"));
  textArea=new GuiTextArea(fontRendererObj,guiLeft + 8,guiTop + 5,xSize - 16,ySize - 35,lineCount);
  textArea.setFocused(true);
  String[] data=textArea.getText();
  for (int i=0; i < lineCount; i++)   data[i]=helper.getString("String_Node_Str" + i);
}
Program: 134664
Project: 134664
Buggy source:
@Override protected void keyTyped(char par1,int par2){
  if (par2 == 1 || (par2 == this.mc.gameSettings.keyBindInventory.getKeyCode() && (textArea == null || !textArea.isFocused()))) {
    actionPerformed(null);
  }
 else   if (textArea != null && textArea.isFocused()) {
    textArea.textAreaKeyTyped(par1,par2);
  }
 else {
    super.keyTyped(par1,par2);
  }
}

Fixed version (ground truth):
@Override protected void keyTyped(char par1,int par2){
  if (par2 == 1 || (par2 == this.mc.gameSettings.keyBindInventory.getKeyCode() && (textArea == null || !textArea.isFocused())))   actionPerformed(null);
 else   if (textArea != null && textArea.isFocused())   textArea.textAreaKeyTyped(par1,par2);
 else   super.keyTyped(par1,par2);
}
Program: 134665
Project: 134665
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void initGui(){
  super.initGui();
  guiLeft=(this.width - xSize) / 2;
  guiTop=(this.height - ySize) / 2;
  buttonList.clear();
  slider=new GuiHowlerAlarmSlider(3,guiLeft + 12,guiTop + 33,StatCollector.translateToLocal("String_Node_Str"),alarm);
  List<String> items;
  if (alarm.getWorldObj().isRemote) {
    items=new ArrayList<String>(IC2NuclearControl.instance.availableAlarms);
    items.retainAll(IC2NuclearControl.instance.serverAllowedAlarms);
  }
 else {
    items=IC2NuclearControl.instance.availableAlarms;
  }
  listBox=new GuiHowlerAlarmListBox(4,guiLeft + 13,guiTop + 63,105,65,items,alarm);
  buttonList.add(slider);
  buttonList.add(listBox);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void initGui(){
  super.initGui();
  guiLeft=(this.width - xSize) / 2;
  guiTop=(this.height - ySize) / 2;
  buttonList.clear();
  slider=new GuiHowlerAlarmSlider(3,guiLeft + 12,guiTop + 33,StatCollector.translateToLocal("String_Node_Str"),alarm);
  List<String> items;
  if (alarm.getWorldObj().isRemote) {
    items=new ArrayList<String>(IC2NuclearControl.instance.availableAlarms);
    items.retainAll(IC2NuclearControl.instance.serverAllowedAlarms);
  }
 else   items=IC2NuclearControl.instance.availableAlarms;
  listBox=new GuiHowlerAlarmListBox(4,guiLeft + 13,guiTop + 63,105,65,items,alarm);
  buttonList.add(slider);
  buttonList.add(listBox);
}
Program: 134666
Project: 134666
Buggy source:
@Override protected void keyTyped(char par1,int par2){
  if (par2 == 1) {
    mc.thePlayer.closeScreen();
  }
 else   if (par1 == 13) {
    updateHeat(0);
  }
 else   if (textboxHeat != null && textboxHeat.isFocused() && (Character.isDigit(par1) || par1 == 0 || par1 == 8)) {
    textboxHeat.textboxKeyTyped(par1,par2);
  }
}

Fixed version (ground truth):
@Override protected void keyTyped(char par1,int par2){
  if (par2 == 1)   mc.thePlayer.closeScreen();
 else   if (par1 == 13)   updateHeat(0);
 else   if (textboxHeat != null && textboxHeat.isFocused() && (Character.isDigit(par1) || par1 == 0 || par1 == 8))   textboxHeat.textboxKeyTyped(par1,par2);
}
Program: 134667
Project: 134667
Buggy source:
private void updateHeat(int delta){
  if (textboxHeat != null) {
    int heat=0;
    try {
      String value=textboxHeat.getText();
      if (!"String_Node_Str".equals(value))       heat=Integer.parseInt(value);
    }
 catch (    NumberFormatException e) {
    }
    heat+=delta;
    if (heat < 0)     heat=0;
    if (heat >= 1000000)     heat=1000000;
    if (thermo.getHeatLevel().intValue() != heat) {
      thermo.setHeatLevel(heat);
      ((NetworkManager)IC2.network.get()).initiateClientTileEntityEvent(thermo,heat);
    }
    textboxHeat.setText(new Integer(heat).toString());
  }
}

Fixed version (ground truth):
private void updateHeat(int delta){
  if (textboxHeat != null) {
    int heat=0;
    try {
      String value=textboxHeat.getText();
      if (!"String_Node_Str".equals(value))       heat=Integer.parseInt(value);
    }
 catch (    NumberFormatException e) {
    }
    heat+=delta;
    if (heat < 0)     heat=0;
    if (heat >= 1000000)     heat=1000000;
    if (thermo.getHeatLevel().intValue() != heat) {
      ((NetworkManager)IC2.network.get()).initiateClientTileEntityEvent(thermo,heat);
    }
    textboxHeat.setText(new Integer(heat).toString());
  }
}
Program: 134668
Project: 134668
Buggy source:
@Override public boolean onBlockActivated(World world,int x,int y,int z,EntityPlayer player,int side,float f1,float f2,float f3){
  int blockType=world.getBlockMetadata(x,y,z);
  TileEntity tileEntity=world.getTileEntity(x,y,z);
  if (tileEntity instanceof TileEntityHowlerAlarm) {
    if (player.getCurrentEquippedItem() != null && DyeUtil.isADye(player.getCurrentEquippedItem())) {
      ((TileEntityHowlerAlarm)tileEntity).setColor(ItemDye.field_150922_c[DyeUtil.getDyeId(player.getCurrentEquippedItem())]);
      world.markBlockForUpdate(x,y,z);
      if (!player.capabilities.isCreativeMode) {
        if (player.inventory.getCurrentItem().stackSize == 1) {
          player.inventory.setInventorySlotContents(player.inventory.currentItem,null);
        }
 else {
          player.inventory.getCurrentItem().stackSize--;
        }
      }
      return true;
    }
  }
  if (WrenchHelper.isWrenchClicked(tileEntity,player,side)) {
    return true;
  }
  if (player != null && player.isSneaking()) {
    return false;
  }
  if (subblocks.containsKey(blockType) && subblocks.get(blockType).hasGui()) {
    if (player instanceof EntityPlayerMP)     player.openGui(IC2NuclearControl.instance,blockType,world,x,y,z);
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onBlockActivated(World world,int x,int y,int z,EntityPlayer player,int side,float f1,float f2,float f3){
  int blockType=world.getBlockMetadata(x,y,z);
  TileEntity tileEntity=world.getTileEntity(x,y,z);
  if (tileEntity instanceof TileEntityHowlerAlarm) {
    if (player.getCurrentEquippedItem() != null && DyeUtil.isADye(player.getCurrentEquippedItem())) {
      ((TileEntityHowlerAlarm)tileEntity).setColor(ItemDye.field_150922_c[DyeUtil.getDyeId(player.getCurrentEquippedItem())]);
      world.markBlockForUpdate(x,y,z);
      if (!player.capabilities.isCreativeMode) {
        if (player.inventory.getCurrentItem().stackSize == 1) {
          player.inventory.setInventorySlotContents(player.inventory.currentItem,null);
        }
 else {
          player.inventory.getCurrentItem().stackSize--;
        }
      }
      return true;
    }
 else     if (player.getCurrentEquippedItem() != null && Loader.isModLoaded("String_Node_Str")) {
      if (player.getCurrentEquippedItem().getItem() instanceof ItemToolPainter) {
        ItemToolPainter p=(ItemToolPainter)player.getCurrentEquippedItem().getItem();
        ((TileEntityHowlerAlarm)tileEntity).setColor(ItemDye.field_150922_c[p.color]);
        world.markBlockForUpdate(x,y,z);
        p.setDamage(player.getCurrentEquippedItem(),player.getCurrentEquippedItem().getItemDamage() - 1);
        return true;
      }
    }
  }
  if (WrenchHelper.isWrenchClicked(tileEntity,player,side)) {
    return true;
  }
  if (player != null && player.isSneaking()) {
    return false;
  }
  if (subblocks.containsKey(blockType) && subblocks.get(blockType).hasGui()) {
    if (player instanceof EntityPlayerMP)     player.openGui(IC2NuclearControl.instance,blockType,world,x,y,z);
    return true;
  }
  return false;
}
Program: 134669
Project: 134669
Buggy source:
private Dye(String name,int id){
  this.name=name;
  this.id=id;
}

Fixed version (ground truth):
private Dye(String name,int id){
  this.name=name;
  this.id=id;
  DYES=setDyes();
}
Program: 134670
Project: 134670
Buggy source:
public static boolean isADye(ItemStack itemstack){
  itemstack.stackSize=0;
  return Arrays.asList(ALL_DYES).contains(itemstack);
}

Fixed version (ground truth):
public static boolean isADye(ItemStack itemstack){
  Item toFind=itemstack.getItem();
  for (int s=0; s < ALL_DYES_DYE.length; s++) {
    for (int z=0; z < ALL_DYES_DYE[s].setDyes().length; z++) {
      if (ALL_DYES_DYE[s].setDyes()[z].getItem().equals(toFind)) {
        return true;
      }
    }
  }
  return false;
}
Program: 134672
Project: 134672
Buggy source:
@Override public Object getClientGuiElement(int ID,EntityPlayer player,World world,int x,int y,int z){
  if (ID == GuiRemoteMonitor.REMOTEMONITOR_GUI) {
    return new GuiRemoteMonitor(player.inventory,player.getCurrentEquippedItem(),new InventoryItem(player.getHeldItem()),player,new TileEntityInfoPanel());
  }
  TileEntity tileEntity=world.getTileEntity(x,y,z);
  Subblock block=IC2NuclearControl.blockNuclearControlMain.getSubblock(ID);
  if (block == null)   return null;
  return block.getClientGuiElement(tileEntity,player);
}

Fixed version (ground truth):
@Override public Object getClientGuiElement(int ID,EntityPlayer player,World world,int x,int y,int z){
  if (ID == GuiRemoteMonitor.REMOTEMONITOR_GUI) {
    return new GuiRemoteMonitor(player.inventory,player.getCurrentEquippedItem(),new InventoryItem(player.getHeldItem()),player,new TileEntityInfoPanel(),world);
  }
  TileEntity tileEntity=world.getTileEntity(x,y,z);
  Subblock block=IC2NuclearControl.blockNuclearControlMain.getSubblock(ID);
  if (block == null)   return null;
  return block.getClientGuiElement(tileEntity,player);
}
Program: 134673
Project: 134673
Buggy source:
@Override public Object getServerGuiElement(int ID,EntityPlayer player,World world,int x,int y,int z){
  if (ID == GuiRemoteMonitor.REMOTEMONITOR_GUI) {
    return new ContainerRemoteMonitor(player.inventory,player.getHeldItem(),new InventoryItem(player.getHeldItem()),new TileEntityInfoPanel());
  }
  Subblock block=IC2NuclearControl.blockNuclearControlMain.getSubblock(ID);
  if (block == null)   return null;
  TileEntity tileEntity=world.getTileEntity(x,y,z);
  return block.getServerGuiElement(tileEntity,player);
}

Fixed version (ground truth):
@Override public Object getServerGuiElement(int ID,EntityPlayer player,World world,int x,int y,int z){
  if (ID == GuiRemoteMonitor.REMOTEMONITOR_GUI) {
    return new ContainerRemoteMonitor(player.inventory,player.getHeldItem(),new InventoryItem(player.getHeldItem()),new TileEntityInfoPanel(),world);
  }
  Subblock block=IC2NuclearControl.blockNuclearControlMain.getSubblock(ID);
  if (block == null)   return null;
  TileEntity tileEntity=world.getTileEntity(x,y,z);
  return block.getServerGuiElement(tileEntity,player);
}
Program: 134674
Project: 134674
Buggy source:
public ContainerRemoteMonitor(InventoryPlayer inv,ItemStack stack,InventoryItem iItem,TileEntityInfoPanel tile){
  this.is=stack;
  this.item=iItem;
  this.panel=tile;
  this.panel.setWorldObj(MinecraftServer.getServer().getEntityWorld());
  this.addSlotToContainer(new SlotFilter(this.item,0,177,21));
  bindPlayerInventory(inv);
}

Fixed version (ground truth):
public ContainerRemoteMonitor(InventoryPlayer inv,ItemStack stack,InventoryItem iItem,TileEntityInfoPanel tile,World world){
  this.is=stack;
  this.item=iItem;
  this.panel=tile;
  if (IC2NuclearControl.isServer) {
    this.panel.setWorldObj(world);
  }
 else {
    this.panel.setWorldObj(MinecraftServer.getServer().getEntityWorld());
  }
  this.addSlotToContainer(new SlotFilter(this.item,0,177,21));
  bindPlayerInventory(inv);
}
Program: 134675
Project: 134675
Buggy source:
public GuiRemoteMonitor(InventoryPlayer inv,ItemStack stack,InventoryItem inventoryItem,EntityPlayer player,TileEntityInfoPanel panel){
  super(new ContainerRemoteMonitor(inv,stack,inventoryItem,panel));
  this.inv=inventoryItem;
  this.e=player;
  this.panel=panel;
}

Fixed version (ground truth):
public GuiRemoteMonitor(InventoryPlayer inv,ItemStack stack,InventoryItem inventoryItem,EntityPlayer player,TileEntityInfoPanel panel,World world){
  super(new ContainerRemoteMonitor(inv,stack,inventoryItem,panel,world));
  this.inv=inventoryItem;
  this.e=player;
  this.panel=panel;
}
Program: 134676
Project: 134676
Buggy source:
@Override protected void drawGuiContainerForegroundLayer(int par1,int par2){
  List<PanelString> joinedData=new LinkedList<PanelString>();
  boolean anyCardFound=false;
  if (inv.getStackInSlot(0) != null) {
    inv.markDirty();
    panel.updateEntity();
    ItemStack card=inv.getStackInSlot(0);
    ChannelHandler.network.sendToServer(new PacketServerUpdate(card));
    this.processCard(card,10,0,panel);
    if (card == null || !(card.getItem() instanceof IPanelDataSource)) {
      drawCardStuff(anyCardFound,joinedData);
    }
    int displaySettings=panel.getDisplaySettingsByCard(card);
    if (displaySettings == 0) {
      drawCardStuff(anyCardFound,joinedData);
    }
    CardWrapperImpl helper=new CardWrapperImpl(card,-1);
    CardState state=helper.getState();
    List<PanelString> data;
    if (state != CardState.OK && state != CardState.CUSTOM_ERROR) {
      data=StringUtils.getStateMessage(state);
    }
 else {
      data=panel.getCardData(displaySettings,card,helper);
    }
    if (data == null) {
      drawCardStuff(anyCardFound,joinedData);
    }
    joinedData.addAll(data);
    anyCardFound=true;
    drawCardStuff(anyCardFound,joinedData);
  }
 else {
    inv.markDirty();
    anyCardFound=false;
  }
}

Fixed version (ground truth):
@Override protected void drawGuiContainerForegroundLayer(int par1,int par2){
  List<PanelString> joinedData=new LinkedList<PanelString>();
  boolean anyCardFound=false;
  if (inv.getStackInSlot(0) != null) {
    inv.markDirty();
    ContainerRemoteMonitor.updateTile();
    ItemStack card=inv.getStackInSlot(0);
    ChannelHandler.network.sendToServer(new PacketServerUpdate(card));
    this.processCard(card,10,0,panel);
    if (card == null || !(card.getItem() instanceof IPanelDataSource)) {
      drawCardStuff(anyCardFound,joinedData);
    }
    int displaySettings=panel.getDisplaySettingsByCard(card);
    if (displaySettings == 0) {
      drawCardStuff(anyCardFound,joinedData);
    }
    CardWrapperImpl helper=new CardWrapperImpl(card,-1);
    CardState state=helper.getState();
    List<PanelString> data;
    if (state != CardState.OK && state != CardState.CUSTOM_ERROR) {
      data=StringUtils.getStateMessage(state);
    }
 else {
      data=panel.getCardData(displaySettings,card,helper);
    }
    if (data == null) {
      drawCardStuff(anyCardFound,joinedData);
    }
    joinedData.addAll(data);
    anyCardFound=true;
    drawCardStuff(anyCardFound,joinedData);
  }
 else {
    inv.markDirty();
    anyCardFound=false;
  }
}
Program: 134677
Project: 134677
Buggy source:
public static void init(){
  network.registerMessage(PacketAlarm.class,PacketAlarm.class,1,Side.CLIENT);
  network.registerMessage(PacketSensor.class,PacketSensor.class,2,Side.CLIENT);
  network.registerMessage(PacketSensorTitle.class,PacketSensorTitle.class,3,Side.CLIENT);
  network.registerMessage(PacketChat.class,PacketChat.class,4,Side.CLIENT);
  network.registerMessage(PacketEncounter.class,PacketEncounter.class,5,Side.CLIENT);
  network.registerMessage(PacketAcounter.class,PacketAcounter.class,6,Side.CLIENT);
  network.registerMessage(PacketClientSound.class,PacketClientSound.class,7,Side.SERVER);
  network.registerMessage(PacketClientRequest.class,PacketClientRequest.class,8,Side.SERVER);
  network.registerMessage(PacketClientRangeTrigger.class,PacketClientRangeTrigger.class,11,Side.SERVER);
  network.registerMessage(PacketClientSensor.class,PacketClientSensor.class,12,Side.SERVER);
  network.registerMessage(PacketClientColor.class,PacketClientColor.class,13,Side.SERVER);
  network.registerMessage(PacketClientDisplaySettings.class,PacketClientDisplaySettings.class,14,Side.SERVER);
  network.registerMessage(PacketDispSettingsAll.class,PacketDispSettingsAll.class,9,Side.CLIENT);
  network.registerMessage(PacketDispSettingsUpdate.class,PacketDispSettingsUpdate.class,10,Side.CLIENT);
  network.registerMessage(PacketServerUpdate.Handler.class,PacketServerUpdate.class,11,Side.SERVER);
  network.registerMessage(PacketClientRemoteMonitor.Handler.class,PacketClientRemoteMonitor.class,12,Side.CLIENT);
}

Fixed version (ground truth):
public static void init(){
  network.registerMessage(PacketAlarm.class,PacketAlarm.class,1,Side.CLIENT);
  network.registerMessage(PacketSensor.class,PacketSensor.class,2,Side.CLIENT);
  network.registerMessage(PacketSensorTitle.class,PacketSensorTitle.class,3,Side.CLIENT);
  network.registerMessage(PacketChat.class,PacketChat.class,4,Side.CLIENT);
  network.registerMessage(PacketEncounter.class,PacketEncounter.class,5,Side.CLIENT);
  network.registerMessage(PacketAcounter.class,PacketAcounter.class,6,Side.CLIENT);
  network.registerMessage(PacketClientSound.class,PacketClientSound.class,7,Side.SERVER);
  network.registerMessage(PacketClientRequest.class,PacketClientRequest.class,8,Side.SERVER);
  network.registerMessage(PacketDispSettingsAll.class,PacketDispSettingsAll.class,9,Side.CLIENT);
  network.registerMessage(PacketDispSettingsUpdate.class,PacketDispSettingsUpdate.class,10,Side.CLIENT);
  network.registerMessage(PacketClientRangeTrigger.class,PacketClientRangeTrigger.class,11,Side.SERVER);
  network.registerMessage(PacketClientSensor.class,PacketClientSensor.class,12,Side.SERVER);
  network.registerMessage(PacketClientColor.class,PacketClientColor.class,13,Side.SERVER);
  network.registerMessage(PacketClientDisplaySettings.class,PacketClientDisplaySettings.class,14,Side.SERVER);
  network.registerMessage(PacketServerUpdate.Handler.class,PacketServerUpdate.class,15,Side.SERVER);
  network.registerMessage(PacketClientRemoteMonitor.Handler.class,PacketClientRemoteMonitor.class,16,Side.CLIENT);
}
Program: 134678
Project: 134678
Buggy source:
@Override public IMessage onMessage(PacketClientRemoteMonitor message,MessageContext ctx){
  EntityPlayer player=Minecraft.getMinecraft().thePlayer;
  if (player.getHeldItem().getItem() == IC2NuclearControl.itemRemoteMonitor) {
    InventoryItem itemInv=new InventoryItem(player.getHeldItem());
    if (itemInv.getStackInSlot(0) == null || !(itemInv.getStackInSlot(0).getItem() instanceof IPanelDataSource)) {
      return null;
    }
    CardWrapperImpl helper=new CardWrapperImpl(itemInv.getStackInSlot(0),0);
    for (    Map.Entry<String,Object> entry : message.fields.entrySet()) {
      String name=entry.getKey();
      Object value=entry.getValue();
      if (value instanceof Long) {
        helper.setLong(name,(Long)value);
      }
 else       if (value instanceof Double) {
        helper.setDouble(name,(Double)value);
      }
 else       if (value instanceof Integer) {
        helper.setInt(name,(Integer)value);
      }
 else       if (value instanceof String) {
        helper.setString(name,(String)value);
      }
 else       if (value instanceof Boolean) {
        helper.setBoolean(name,(Boolean)value);
      }
 else       if (value instanceof NBTTagCompound) {
        helper.setTag(name,(NBTTagCompound)value);
      }
 else       if (value == null) {
        helper.clearField(name);
      }
    }
  }
  return null;
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public IMessage onMessage(PacketClientRemoteMonitor message,MessageContext ctx){
  EntityPlayer player=Minecraft.getMinecraft().thePlayer;
  if (player.getHeldItem().getItem() == IC2NuclearControl.itemRemoteMonitor) {
    InventoryItem itemInv=new InventoryItem(player.getHeldItem());
    if (itemInv.getStackInSlot(0) == null || !(itemInv.getStackInSlot(0).getItem() instanceof IPanelDataSource)) {
      return null;
    }
    CardWrapperImpl helper=new CardWrapperImpl(itemInv.getStackInSlot(0),0);
    for (    Map.Entry<String,Object> entry : message.fields.entrySet()) {
      String name=entry.getKey();
      Object value=entry.getValue();
      if (value instanceof Long) {
        helper.setLong(name,(Long)value);
      }
 else       if (value instanceof Double) {
        helper.setDouble(name,(Double)value);
      }
 else       if (value instanceof Integer) {
        helper.setInt(name,(Integer)value);
      }
 else       if (value instanceof String) {
        helper.setString(name,(String)value);
      }
 else       if (value instanceof Boolean) {
        helper.setBoolean(name,(Boolean)value);
      }
 else       if (value instanceof NBTTagCompound) {
        helper.setTag(name,(NBTTagCompound)value);
      }
 else       if (value == null) {
        helper.clearField(name);
      }
    }
  }
  return null;
}
Program: 134679
Project: 134679
Buggy source:
@Override public Object getServerGuiElement(int ID,EntityPlayer player,World world,int x,int y,int z){
  if (ID == GuiRemoteMonitor.REMOTEMONITOR_GUI) {
    return new ContainerRemoteMonitor(player.inventory,player.getHeldItem(),new InventoryItem(player.getHeldItem()),new TileEntityInfoPanel());
  }
  Subblock block=IC2NuclearControl.blockNuclearControlMain.getSubblock(ID);
  if (block == null)   return null;
  TileEntity tileEntity=world.getTileEntity(x,y,z);
  return block.getServerGuiElement(tileEntity,player);
}

Fixed version (ground truth):
@Override public Object getServerGuiElement(int ID,EntityPlayer player,World world,int x,int y,int z){
  if (ID == GuiRemoteMonitor.REMOTEMONITOR_GUI) {
    return new ContainerRemoteMonitor(player.inventory,player.getHeldItem(),new InventoryItem(player.getHeldItem()),new TileEntityInfoPanel(),world);
  }
  Subblock block=IC2NuclearControl.blockNuclearControlMain.getSubblock(ID);
  if (block == null)   return null;
  TileEntity tileEntity=world.getTileEntity(x,y,z);
  return block.getServerGuiElement(tileEntity,player);
}
Program: 134680
Project: 134680
Buggy source:
public ContainerRemoteMonitor(InventoryPlayer inv,ItemStack stack,InventoryItem iItem,TileEntityInfoPanel tile){
  this.is=stack;
  this.item=iItem;
  this.panel=tile;
  this.panel.setWorldObj(MinecraftServer.getServer().getEntityWorld());
  this.addSlotToContainer(new SlotFilter(this.item,0,177,21));
  bindPlayerInventory(inv);
}

Fixed version (ground truth):
public ContainerRemoteMonitor(InventoryPlayer inv,ItemStack stack,InventoryItem iItem,TileEntityInfoPanel tile,World world){
  this.is=stack;
  this.item=iItem;
  this.panel=tile;
  if (world.isRemote) {
    if (MinecraftServer.getServer() != null && MinecraftServer.getServer().worldServers != null) {
      this.panel.setWorldObj(MinecraftServer.getServer().getEntityWorld());
    }
 else {
      NCLog.error(FMLClientHandler.instance().getServer().worldServers.length);
    }
  }
 else {
    this.panel.setWorldObj(world);
  }
  this.addSlotToContainer(new SlotFilter(this.item,0,177,21));
  bindPlayerInventory(inv);
}
Program: 134682
Project: 134682
Buggy source:
public GuiRemoteMonitor(InventoryPlayer inv,ItemStack stack,InventoryItem inventoryItem,EntityPlayer player,TileEntityInfoPanel panel){
  super(new ContainerRemoteMonitor(inv,stack,inventoryItem,panel));
  this.inv=inventoryItem;
  this.e=player;
  this.panel=panel;
}

Fixed version (ground truth):
public GuiRemoteMonitor(InventoryPlayer inv,ItemStack stack,InventoryItem inventoryItem,EntityPlayer player,TileEntityInfoPanel panel){
  super(new ContainerRemoteMonitor(inv,stack,inventoryItem,panel,Minecraft.getMinecraft().theWorld));
  this.inv=inventoryItem;
  this.e=player;
  this.panel=panel;
}
Program: 134683
Project: 134683
Buggy source:
@Override protected void drawGuiContainerForegroundLayer(int par1,int par2){
  List<PanelString> joinedData=new LinkedList<PanelString>();
  boolean anyCardFound=false;
  if (inv.getStackInSlot(0) != null) {
    inv.markDirty();
    panel.updateEntity();
    ItemStack card=inv.getStackInSlot(0);
    ChannelHandler.network.sendToServer(new PacketServerUpdate(card));
    this.processCard(card,10,0,panel);
    if (card == null || !(card.getItem() instanceof IPanelDataSource)) {
      drawCardStuff(anyCardFound,joinedData);
    }
    int displaySettings=panel.getDisplaySettingsByCard(card);
    if (displaySettings == 0) {
      drawCardStuff(anyCardFound,joinedData);
    }
    CardWrapperImpl helper=new CardWrapperImpl(card,-1);
    CardState state=helper.getState();
    List<PanelString> data;
    if (state != CardState.OK && state != CardState.CUSTOM_ERROR) {
      data=StringUtils.getStateMessage(state);
    }
 else {
      data=panel.getCardData(displaySettings,card,helper);
    }
    if (data == null) {
      drawCardStuff(anyCardFound,joinedData);
    }
    joinedData.addAll(data);
    anyCardFound=true;
    drawCardStuff(anyCardFound,joinedData);
  }
 else {
    inv.markDirty();
    anyCardFound=false;
  }
}

Fixed version (ground truth):
@Override protected void drawGuiContainerForegroundLayer(int par1,int par2){
  List<PanelString> joinedData=new LinkedList<PanelString>();
  boolean anyCardFound=true;
  if (inv.getStackInSlot(0) != null) {
    if (inv.getStackInSlot(0).getItem().equals(IC2NuclearControl.itemEnergySensorLocationCard)) {
      ItemCardEnergySensorLocation card=(ItemCardEnergySensorLocation)inv.getStackInSlot(0).getItem();
      CardWrapperImpl helper=new CardWrapperImpl(inv.getStackInSlot(0),-1);
      ChunkCoordinates target=helper.getTarget();
      joinedData.clear();
      World world=MinecraftServer.getServer().worldServers[0];
      TileEntity tile=world.getTileEntity(target.posX,target.posY,target.posZ);
      tile.getDescriptionPacket();
      tile.markDirty();
      card.update(e.worldObj,helper,8 * (int)Math.pow(2,7));
      joinedData=card.getStringData(Integer.MAX_VALUE,helper,true);
      drawCardStuff(anyCardFound,joinedData);
    }
  }
}
Program: 134684
Project: 134684
Buggy source:
@Override public CardState update(TileEntity panel,ICardWrapper card,int range){
  ChunkCoordinates target=card.getTarget();
  int targetType=card.getInt("String_Node_Str");
  EnergyStorageData storage=EnergyStorageHelper.getStorageAt(panel.getWorldObj(),target.posX,target.posY,target.posZ,targetType);
  if (storage != null) {
    card.setDouble("String_Node_Str",storage.stored);
    card.setDouble("String_Node_Str",storage.capacity);
    card.setDouble("String_Node_Str",storage.stored);
    return CardState.OK;
  }
 else {
    return CardState.NO_TARGET;
  }
}

Fixed version (ground truth):
public CardState update(World world,ICardWrapper card,int range){
  ChunkCoordinates target=card.getTarget();
  int targetType=card.getInt("String_Node_Str");
  EnergyStorageData storage=EnergyStorageHelper.getStorageAt(world,target.posX,target.posY,target.posZ,targetType);
  if (storage != null) {
    card.setDouble("String_Node_Str",storage.stored);
    card.setDouble("String_Node_Str",storage.capacity);
    card.setDouble("String_Node_Str",storage.stored);
    return CardState.OK;
  }
 else {
    return CardState.NO_TARGET;
  }
}
Program: 134685
Project: 134685
Buggy source:
@Override public IMessage onMessage(PacketClientRemoteMonitor message,MessageContext ctx){
  EntityPlayer player=Minecraft.getMinecraft().thePlayer;
  if (player.getHeldItem().getItem() == IC2NuclearControl.itemRemoteMonitor) {
    InventoryItem itemInv=new InventoryItem(player.getHeldItem());
    if (itemInv.getStackInSlot(0) == null || !(itemInv.getStackInSlot(0).getItem() instanceof IPanelDataSource)) {
      return null;
    }
    CardWrapperImpl helper=new CardWrapperImpl(itemInv.getStackInSlot(0),0);
    for (    Map.Entry<String,Object> entry : message.fields.entrySet()) {
      String name=entry.getKey();
      Object value=entry.getValue();
      if (value instanceof Long) {
        helper.setLong(name,(Long)value);
      }
 else       if (value instanceof Double) {
        helper.setDouble(name,(Double)value);
      }
 else       if (value instanceof Integer) {
        helper.setInt(name,(Integer)value);
      }
 else       if (value instanceof String) {
        helper.setString(name,(String)value);
      }
 else       if (value instanceof Boolean) {
        helper.setBoolean(name,(Boolean)value);
      }
 else       if (value instanceof NBTTagCompound) {
        helper.setTag(name,(NBTTagCompound)value);
      }
 else       if (value == null) {
        helper.clearField(name);
      }
    }
  }
  return null;
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public IMessage onMessage(PacketClientRemoteMonitor message,MessageContext ctx){
  EntityPlayer player=Minecraft.getMinecraft().thePlayer;
  if (player.getHeldItem().getItem() == IC2NuclearControl.itemRemoteMonitor) {
    InventoryItem itemInv=new InventoryItem(player.getHeldItem());
    if (itemInv.getStackInSlot(0) == null || !(itemInv.getStackInSlot(0).getItem() instanceof IPanelDataSource)) {
      return null;
    }
    CardWrapperImpl helper=new CardWrapperImpl(itemInv.getStackInSlot(0),0);
    for (    Map.Entry<String,Object> entry : message.fields.entrySet()) {
      String name=entry.getKey();
      Object value=entry.getValue();
      if (value instanceof Long) {
        helper.setLong(name,(Long)value);
      }
 else       if (value instanceof Double) {
        helper.setDouble(name,(Double)value);
      }
 else       if (value instanceof Integer) {
        helper.setInt(name,(Integer)value);
      }
 else       if (value instanceof String) {
        helper.setString(name,(String)value);
      }
 else       if (value instanceof Boolean) {
        helper.setBoolean(name,(Boolean)value);
      }
 else       if (value instanceof NBTTagCompound) {
        helper.setTag(name,(NBTTagCompound)value);
      }
 else       if (value == null) {
        helper.clearField(name);
      }
    }
  }
  return null;
}
Program: 134686
Project: 134686
Buggy source:
@Override public void updateEntity(){
  if (!init) {
    initData();
    markDirty();
  }
  if (FMLCommonHandler.instance().getEffectiveSide().isClient())   return;
  if (!worldObj.isRemote) {
    if (!addedToEnergyNet) {
      EnergyTileLoadEvent event=new EnergyTileLoadEvent(this);
      MinecraftForge.EVENT_BUS.post(event);
      addedToEnergyNet=true;
    }
    index=(index + 1) % DATA_POINTS;
    data[index]=0;
    this.getAverage();
    double total=EnergyNet.instance.getTotalEnergyEmitted(this);
    data[index]=total;
    this.setPowerType((byte)EnergyStorageData.TARGET_TYPE_IC2);
  }
  super.updateEntity();
}

Fixed version (ground truth):
@Override public void updateEntity(){
  if (!init) {
    initData();
    markDirty();
  }
  if (FMLCommonHandler.instance().getEffectiveSide().isClient())   return;
  if (!worldObj.isRemote) {
    if (!addedToEnergyNet) {
      EnergyTileLoadEvent event=new EnergyTileLoadEvent(this);
      MinecraftForge.EVENT_BUS.post(event);
      addedToEnergyNet=true;
    }
    index=(index + 1) % DATA_POINTS;
    data[index]=0;
    this.getAverage();
    double total=EnergyNet.instance.getTotalEnergyEmitted(this);
    if (IC2NuclearControl.instance.crossClassic.getClassicType() == IC2ClassicType.SPEIGER) {
      double realTotal=total - lastReceivedPower;
      lastReceivedPower=total;
      data[index]=realTotal;
    }
 else     data[index]=total;
    this.setPowerType((byte)EnergyStorageData.TARGET_TYPE_IC2);
  }
  super.updateEntity();
}
Program: 134688
Project: 134688
Buggy source:
@Override public List<PanelString> getStringData(int displaySettings,ICardWrapper card,boolean showLabels){
  List<PanelString> result=new LinkedList<PanelString>();
  PanelString line;
  double energy=card.getDouble("String_Node_Str");
  double storage=card.getDouble("String_Node_Str");
  if ((displaySettings & DISPLAY_ENERGY) > 0) {
    line=new PanelString();
    line.textLeft=StringUtils.getFormatted("String_Node_Str",energy,showLabels);
    result.add(line);
  }
  if ((displaySettings & DISPLAY_FREE) > 0) {
    line=new PanelString();
    line.textLeft=StringUtils.getFormatted("String_Node_Str",storage - energy,showLabels);
    result.add(line);
  }
  if ((displaySettings & DISPLAY_STORAGE) > 0) {
    line=new PanelString();
    line.textLeft=StringUtils.getFormatted("String_Node_Str",storage,showLabels);
    result.add(line);
  }
  if ((displaySettings & DISPLAY_PERCENTAGE) > 0) {
    line=new PanelString();
    line.textLeft=StringUtils.getFormatted("String_Node_Str",storage == 0 ? 100 : (energy * 100 / storage),showLabels);
    result.add(line);
  }
  return result;
}

Fixed version (ground truth):
@Override public List<PanelString> getStringData(int displaySettings,ICardWrapper card,boolean showLabels){
  List<PanelString> result=new LinkedList<PanelString>();
  PanelString line;
  double energy=card.getDouble("String_Node_Str");
  double storage=card.getDouble("String_Node_Str");
  if ((displaySettings & DISPLAY_ENERGY) > 0) {
    line=new PanelString();
    line.textLeft=StringUtils.getFormatted("String_Node_Str",energy,showLabels);
    result.add(line);
  }
  if ((displaySettings & DISPLAY_FREE) > 0) {
    line=new PanelString();
    line.textLeft=StringUtils.getFormatted("String_Node_Str",storage - energy,showLabels);
    result.add(line);
  }
  if ((displaySettings & DISPLAY_STORAGE) > 0) {
    line=new PanelString();
    line.textLeft=StringUtils.getFormatted("String_Node_Str",storage,showLabels);
    result.add(line);
  }
  if ((displaySettings & DISPLAY_PERCENTAGE) > 0) {
    line=new PanelString();
    line.textLeft=StringUtils.getFormatted("String_Node_Str",storage == 0 ? 100 : ((energy / storage) * 100),showLabels);
    result.add(line);
  }
  return result;
}
Program: 134690
Project: 134690
Buggy source:
public CardState updateGenerator(TileEntity panel,ICardWrapper card,int range){
  ChunkCoordinates target=card.getTarget();
  TileEntity entity=panel.getWorldObj().getTileEntity(target.posX,target.posY,target.posZ);
  if (entity instanceof TileEntityBaseGenerator) {
    int production=(int)EnergyNet.instance.getTotalEnergyEmitted(entity);
    card.setInt("String_Node_Str",production);
    card.setDouble("String_Node_Str",(double)production);
    return CardState.OK;
  }
 else {
    return CardState.NO_TARGET;
  }
}

Fixed version (ground truth):
public CardState updateGenerator(TileEntity panel,ICardWrapper card,int range){
  ChunkCoordinates target=card.getTarget();
  TileEntity entity=panel.getWorldObj().getTileEntity(target.posX,target.posY,target.posZ);
  if (entity instanceof TileEntityBaseGenerator) {
    int production=(int)EnergyNet.instance.getNodeStats(entity).getEnergyOut();
    card.setInt("String_Node_Str",production);
    card.setDouble("String_Node_Str",(double)production);
    return CardState.OK;
  }
 else {
    return CardState.NO_TARGET;
  }
}
Program: 134691
Project: 134691
Buggy source:
public CardState updateLiquid(TileEntity panel,ICardWrapper card,int range){
  ChunkCoordinates target=card.getTarget();
  FluidTankInfo storage=LiquidStorageHelper.getStorageAt(panel.getWorldObj(),target.posX,target.posY,target.posZ);
  if (storage != null) {
    int capacity=storage.capacity;
    int amount=0;
    int liquidId=0;
    NBTTagCompound liquidTag=null;
    if (storage.fluid != null) {
      amount=storage.fluid.amount;
      if (storage.fluid.fluidID != 0 && amount > 0) {
        liquidId=storage.fluid.fluidID;
        liquidTag=storage.fluid.tag;
      }
    }
    card.setInt("String_Node_Str",capacity);
    card.setInt("String_Node_Str",amount);
    card.setInt("String_Node_Str",liquidId);
    card.setTag("String_Node_Str",liquidTag);
    card.setDouble("String_Node_Str",(double)amount);
    return CardState.OK;
  }
 else {
    return CardState.NO_TARGET;
  }
}

Fixed version (ground truth):
public CardState updateLiquid(TileEntity panel,ICardWrapper card,int range){
  ChunkCoordinates target=card.getTarget();
  FluidTankInfo storage=LiquidStorageHelper.getStorageAt(panel.getWorldObj(),target.posX,target.posY,target.posZ);
  if (storage != null) {
    int capacity=storage.capacity;
    int amount=0;
    int liquidId=0;
    NBTTagCompound liquidTag=null;
    if (storage.fluid != null) {
      amount=storage.fluid.amount;
      if (storage.fluid.getFluidID() != 0 && amount > 0) {
        liquidId=storage.fluid.getFluidID();
        liquidTag=storage.fluid.tag;
      }
    }
    card.setInt("String_Node_Str",capacity);
    card.setInt("String_Node_Str",amount);
    card.setInt("String_Node_Str",liquidId);
    card.setTag("String_Node_Str",liquidTag);
    card.setDouble("String_Node_Str",(double)amount);
    return CardState.OK;
  }
 else {
    return CardState.NO_TARGET;
  }
}
Program: 134693
Project: 134693
Buggy source:
@EventHandler public void init(FMLInitializationEvent event){
  IC2NuclearControl.instance.screenManager=new ScreenManager();
  initBlocks();
  registerBlocks();
  proxy.registerTileEntities();
  if (Loader.isModLoaded("String_Node_Str"))   crossOC=new CrossOpenComputers();
  FMLInterModComms.sendMessage("String_Node_Str","String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@EventHandler public void init(FMLInitializationEvent event){
  IC2NuclearControl.instance.screenManager=new ScreenManager();
  initBlocks();
  registerBlocks();
  proxy.registerTileEntities();
  if (Loader.isModLoaded("String_Node_Str"))   crossOC=new CrossOpenComputers();
  FMLInterModComms.sendMessage("String_Node_Str","String_Node_Str","String_Node_Str");
  CrossBigReactors.doStuff();
}