nus-yam/ex-repair huggingface dataset:
Program: 21834
Project: 21834
Buggy source:
@Override public TileEntity createTileEntity(World world,int metadata){
  if (metadata == 2) {
    return new FusionTileEntity();
  }
  if (metadata == 3) {
    return new FissionTileEntity();
  }
 else {
    return new TileEntityProxy(Settings.energyPacketSize);
  }
}

Fixed version (ground truth):
@Override public TileEntity createTileEntity(World world,int metadata){
  if (metadata == 2) {
    return new FusionTileEntity();
  }
  if (metadata == 3) {
    return new FissionTileEntity();
  }
 else {
    return new TileEntityProxy();
  }
}
Program: 21835
Project: 21835
Buggy source:
@Override public boolean onBlockActivated(World world,int x,int y,int z,EntityPlayer entityPlayer,int side,float par7,float par8,float par9){
  TileEntity tileEntity=world.getTileEntity(x,y,z);
  if (tileEntity == null || entityPlayer.isSneaking()) {
    return false;
  }
  if (!world.isRemote) {
    entityPlayer.openGui(Minechem.INSTANCE,0,world,x,y,z);
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean onBlockActivated(World world,int x,int y,int z,EntityPlayer entityPlayer,int side,float par7,float par8,float par9){
  TileEntity tileEntity=world.getTileEntity(x,y,z);
  if (tileEntity == null) {
    return false;
  }
  if (!world.isRemote) {
    entityPlayer.openGui(Minechem.INSTANCE,0,world,x,y,z);
  }
  return true;
}
Program: 21836
Project: 21836
Buggy source:
@Override public TileEntity createNewTileEntity(World world,int i){
  return new TileEntityProxy(Settings.energyPacketSize);
}

Fixed version (ground truth):
@Override public TileEntity createNewTileEntity(World world,int i){
  return new TileEntityProxy();
}
Program: 21837
Project: 21837
Buggy source:
public TileEntityProxy(int maxEnergy){
  super(maxEnergy);
}

Fixed version (ground truth):
public TileEntityProxy(){
  super(Settings.energyPacketSize);
}
Program: 21838
Project: 21838
Buggy source:
private TileEntity buildManagerBlock(LocalPosition position){
  BlueprintBlock managerBlock=blueprint.getManagerBlock();
  if (managerBlock != null) {
    Pos3 worldPos=position.getLocalPos(blueprint.getManagerPosX(),blueprint.getManagerPosY(),blueprint.getManagerPosZ());
    worldObj.setBlock(worldPos.x,worldPos.y,worldPos.z,managerBlock.block,managerBlock.metadata,3);
    if (this.blueprint == MinechemBlueprint.fusion) {
      FusionTileEntity fusion=new FusionTileEntity();
      fusion.setWorldObj(this.worldObj);
      fusion.xCoord=worldPos.x;
      fusion.yCoord=worldPos.y;
      fusion.zCoord=worldPos.z;
      fusion.blockType=MinechemBlocksGeneration.fusion;
      worldObj.addTileEntity(fusion);
    }
    return worldObj.getTileEntity(worldPos.x,worldPos.y,worldPos.z);
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
private TileEntity buildManagerBlock(LocalPosition position){
  BlueprintBlock managerBlock=blueprint.getManagerBlock();
  if (managerBlock != null) {
    Pos3 worldPos=position.getLocalPos(blueprint.getManagerPosX(),blueprint.getManagerPosY(),blueprint.getManagerPosZ());
    worldObj.setBlock(worldPos.x,worldPos.y,worldPos.z,managerBlock.block,managerBlock.metadata,3);
    if (this.blueprint == MinechemBlueprint.fusion && worldObj.getTileEntity(worldPos.x,worldPos.y,worldPos.z) == null) {
      FusionTileEntity fusion=new FusionTileEntity();
      fusion.setWorldObj(this.worldObj);
      fusion.xCoord=worldPos.x;
      fusion.yCoord=worldPos.y;
      fusion.zCoord=worldPos.z;
      fusion.blockType=MinechemBlocksGeneration.fusion;
      worldObj.addTileEntity(fusion);
    }
    return worldObj.getTileEntity(worldPos.x,worldPos.y,worldPos.z);
  }
 else {
    return null;
  }
}
Program: 21839
Project: 21839
Buggy source:
@Override public void updateEntity(){
  super.updateEntity();
  if (!completeStructure) {
    return;
  }
  if (!worldObj.isRemote) {
    if (!canProcess) {
      if (this.getEnergyNeeded() < this.getEnergyStored() && inputsCanBeFused() && canOutput()) {
        canProcess=true;
      }
    }
    if (canProcess && this.useEnergy(1)) {
      fuseInputs();
      removeInputs();
      canProcess=false;
    }
 else {
      fusedResult=0;
    }
    FusionUpdateMessage message=new FusionUpdateMessage(this);
    MessageHandler.INSTANCE.sendToAllAround(message,new NetworkRegistry.TargetPoint(worldObj.provider.dimensionId,this.xCoord,this.yCoord,this.zCoord,Settings.UpdateRadius));
  }
}

Fixed version (ground truth):
@Override public void updateEntity(){
  super.updateEntity();
  if (!completeStructure) {
    return;
  }
  if (!worldObj.isRemote) {
    if (!canProcess) {
      if (this.getEnergyNeeded() < this.getEnergyStored() && inputsCanBeFused() && canOutput()) {
        canProcess=true;
      }
    }
    if (canProcess && this.useEnergy(this.getEnergyNeeded())) {
      fuseInputs();
      removeInputs();
      canProcess=false;
    }
 else {
      fusedResult=0;
    }
    FusionUpdateMessage message=new FusionUpdateMessage(this);
    MessageHandler.INSTANCE.sendToAllAround(message,new NetworkRegistry.TargetPoint(worldObj.provider.dimensionId,this.xCoord,this.yCoord,this.zCoord,Settings.UpdateRadius));
  }
}
Program: 21840
Project: 21840
Buggy source:
@Override public int getEnergyNeeded(){
  if (inventory[inputLeft] != null && inventory[inputRight] != null && this.inputsCanBeFused())   return (inventory[inputLeft].getItemDamage() + inventory[inputRight].getItemDamage() + 2) * Settings.fusionMultiplier;
  return 0;
}

Fixed version (ground truth):
@Override public int getEnergyNeeded(){
  if (inventory[inputLeft] != null && inventory[inputRight] != null && this.inputsCanBeFused()) {
    return (inventory[inputLeft].getItemDamage() + inventory[inputRight].getItemDamage() + 2) * Settings.fusionMultiplier;
  }
  return 0;
}
Program: 21841
Project: 21841
Buggy source:
@Override public boolean canExtractItem(int slot,ItemStack itemstack,int side){
  return false;
}

Fixed version (ground truth):
@Override public boolean canExtractItem(int slot,ItemStack itemstack,int side){
  if (Settings.AllowAutomation && side == 0 && slot == 2) {
    return true;
  }
  return false;
}
Program: 21843
Project: 21843
Buggy source:
@Override public void setInventorySlotContents(int i,ItemStack itemstack){
  item=itemstack;
  if (itemstack != null && itemstack.stackSize == 64 && (itemstack.getItem() instanceof ElementItem) && PolytoolHelper.getTypeFromElement(ElementItem.getElement(itemstack),1) != null && PolytoolItem.validAlloyInfusion(player.getCurrentEquippedItem(),itemstack)) {
    item=null;
    PolytoolUpgradeType upgrade=PolytoolHelper.getTypeFromElement(ElementItem.getElement(itemstack),1);
    PolytoolItem.addTypeToNBT(player.inventory.getCurrentItem(),upgrade);
    if (!player.worldObj.isRemote) {
      PolytoolUpdateMessage message=new PolytoolUpdateMessage(upgrade);
      MessageHandler.INSTANCE.sendToServer(message);
    }
 else {
      ((PolytoolGui)Minecraft.getMinecraft().currentScreen).addUpgrade(upgrade);
    }
  }
}

Fixed version (ground truth):
@Override public void setInventorySlotContents(int i,ItemStack itemstack){
  item=itemstack;
  if (itemstack != null && itemstack.stackSize == 64 && (itemstack.getItem() instanceof ElementItem) && PolytoolHelper.getTypeFromElement(ElementItem.getElement(itemstack),1) != null && PolytoolItem.validAlloyInfusion(player.getCurrentEquippedItem(),itemstack)) {
    item=null;
    PolytoolUpgradeType upgrade=PolytoolHelper.getTypeFromElement(ElementItem.getElement(itemstack),1);
    PolytoolItem.addTypeToNBT(player.inventory.getCurrentItem(),upgrade);
    if (!player.worldObj.isRemote) {
      PolytoolUpdateMessage message=new PolytoolUpdateMessage(upgrade);
      MessageHandler.INSTANCE.sendTo(message,(EntityPlayerMP)player);
    }
  }
}
Program: 21844
Project: 21844
Buggy source:
@Override public void generate(Random random,int chunkX,int chunkZ,World world,IChunkProvider chunkGenerator,IChunkProvider chunkProvider){
  if (Settings.generateOre) {
    if (world.provider.isSurfaceWorld()) {
      for (int k=0; k <= Settings.UraniumOreDensity; k++) {
        int firstBlockXCoord=(16 * chunkX) + random.nextInt(16);
        int firstBlockYCoord=random.nextInt(50);
        int firstBlockZCoord=(16 * chunkZ) + random.nextInt(16);
        int oreCount=random.nextInt(Settings.UraniumOreClusterSize + 10);
        (new WorldGenMinable(MinechemBlocksGeneration.uranium,oreCount)).generate(world,random,firstBlockXCoord,firstBlockYCoord,firstBlockZCoord);
        if (Settings.DebugMode) {
          System.out.println("String_Node_Str");
          System.out.println("String_Node_Str" + firstBlockXCoord);
          System.out.println("String_Node_Str" + firstBlockYCoord);
          System.out.println("String_Node_Str" + firstBlockZCoord);
        }
      }
    }
  }
}

Fixed version (ground truth):
@Override public void generate(Random random,int chunkX,int chunkZ,World world,IChunkProvider chunkGenerator,IChunkProvider chunkProvider){
  if (Settings.generateOre) {
    if (world.provider.isSurfaceWorld()) {
      for (int k=0; k <= Settings.UraniumOreDensity; k++) {
        int firstBlockXCoord=(16 * chunkX) + random.nextInt(16);
        int firstBlockYCoord=random.nextInt(50);
        int firstBlockZCoord=(16 * chunkZ) + random.nextInt(16);
        int oreCount=random.nextInt(Settings.UraniumOreClusterSize + 10);
        (new WorldGenMinable(MinechemBlocksGeneration.uranium,oreCount)).generate(world,random,firstBlockXCoord,firstBlockYCoord,firstBlockZCoord);
        if (Settings.DebugMode) {
          Minechem.LOGGER.info("String_Node_Str");
          Minechem.LOGGER.info("String_Node_Str" + firstBlockXCoord);
          Minechem.LOGGER.info("String_Node_Str" + firstBlockYCoord);
          Minechem.LOGGER.info("String_Node_Str" + firstBlockZCoord);
        }
      }
    }
  }
}
Program: 21848
Project: 21848
Buggy source:
@Override public void readFromNBT(NBTTagCompound nbtTagCompound){
  super.readFromNBT(nbtTagCompound);
  managerXOffset=nbtTagCompound.getInteger("String_Node_Str");
  managerYOffset=nbtTagCompound.getInteger("String_Node_Str");
  managerZOffset=nbtTagCompound.getInteger("String_Node_Str");
  if (worldObj != null)   manager=worldObj.getBlockTileEntity(xCoord + managerXOffset,yCoord + managerYOffset,zCoord + managerZOffset);
}

Fixed version (ground truth):
@Override public void readFromNBT(NBTTagCompound nbtTagCompound){
  super.readFromNBT(nbtTagCompound);
  managerXOffset=nbtTagCompound.getInteger("String_Node_Str");
  managerYOffset=nbtTagCompound.getInteger("String_Node_Str");
  managerZOffset=nbtTagCompound.getInteger("String_Node_Str");
  if (worldObj != null) {
    manager=worldObj.getBlockTileEntity(xCoord + managerXOffset,yCoord + managerYOffset,zCoord + managerZOffset);
  }
}
Program: 21849
Project: 21849
Buggy source:
@Override public int[] getAccessibleSlotsFromSide(int var1){
  if (this.getManager() != null && this.getManager() instanceof ISidedInventory) {
    return ((ISidedInventory)this.getManager()).getAccessibleSlotsFromSide(var1);
  }
  return new int[0];
}

Fixed version (ground truth):
@Override public int[] getAccessibleSlotsFromSide(int var1){
  if (this.getManager() != null && this.getManager() instanceof ISidedInventory) {
    try {
      return ((ISidedInventory)this.getManager()).getAccessibleSlotsFromSide(var1);
    }
 catch (    StackOverflowError o) {
      if (Settings.DebugMode) {
        System.out.println("String_Node_Str" + this.xCoord + "String_Node_Str"+ this.yCoord+ "String_Node_Str"+ this.zCoord);
      }
    }
  }
  return new int[0];
}
Program: 21850
Project: 21850
Buggy source:
@Override public void onBlockPlacedBy(World world,int x,int y,int z,EntityLivingBase el,ItemStack is){
  if (!world.isRemote) {
  }
  byte facing=0;
  int facingI=MathHelper.floor_double(el.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
  if (facingI == 0) {
    facing=2;
  }
  if (facingI == 1) {
    facing=5;
  }
  if (facingI == 2) {
    facing=3;
  }
  if (facingI == 3) {
    facing=4;
  }
  world.setBlockMetadataWithNotify(x,y,z,facing,2);
}

Fixed version (ground truth):
@Override public void onBlockPlacedBy(World world,int x,int y,int z,EntityLivingBase el,ItemStack is){
  if (!world.isRemote && el instanceof EntityPlayer) {
    EntityPlayer entityPlayer=(EntityPlayer)el;
    entityPlayer.addChatMessage(new ChatComponentText("String_Node_Str"));
    entityPlayer.addChatMessage(new ChatComponentText("String_Node_Str"));
  }
  byte facing=0;
  int facingI=MathHelper.floor_double(el.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
  if (facingI == 0) {
    facing=2;
  }
  if (facingI == 1) {
    facing=5;
  }
  if (facingI == 2) {
    facing=3;
  }
  if (facingI == 3) {
    facing=4;
  }
  world.setBlockMetadataWithNotify(x,y,z,facing,2);
}
Program: 21851
Project: 21851
Buggy source:
@Override public void onBlockPlacedBy(World world,int x,int y,int z,EntityLivingBase el,ItemStack is){
  if (!world.isRemote) {
  }
  byte facing=0;
  int facingI=MathHelper.floor_double(el.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
  if (facingI == 0) {
    facing=2;
  }
  if (facingI == 1) {
    facing=5;
  }
  if (facingI == 2) {
    facing=3;
  }
  if (facingI == 3) {
    facing=4;
  }
  world.setBlockMetadataWithNotify(x,y,z,facing,2);
}

Fixed version (ground truth):
@Override public void onBlockPlacedBy(World world,int x,int y,int z,EntityLivingBase el,ItemStack is){
  if (!world.isRemote && el instanceof EntityPlayer) {
    EntityPlayer entityPlayer=(EntityPlayer)el;
    entityPlayer.addChatMessage(new ChatComponentText("String_Node_Str"));
    entityPlayer.addChatMessage(new ChatComponentText("String_Node_Str"));
  }
  byte facing=0;
  int facingI=MathHelper.floor_double(el.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
  if (facingI == 0) {
    facing=2;
  }
  if (facingI == 1) {
    facing=5;
  }
  if (facingI == 2) {
    facing=3;
  }
  if (facingI == 3) {
    facing=4;
  }
  world.setBlockMetadataWithNotify(x,y,z,facing,2);
}
Program: 21853
Project: 21853
Buggy source:
public static void load(Configuration config){
  try {
    config.load();
    Field[] fields=Settings.class.getFields();
    for (    Field field : fields) {
      CfgId annoBlock=field.getAnnotation(CfgId.class);
      CfgBool annoBool=field.getAnnotation(CfgBool.class);
      CfgInt annoInt=field.getAnnotation(CfgInt.class);
      if (annoBlock != null && annoBool == null && annoInt == null) {
        int id=field.getInt(null);
        if (annoBlock.block()) {
          id=config.getBlock(field.getName(),id).getInt();
        }
 else {
          id=config.getItem(field.getName(),id).getInt();
        }
        field.setInt(null,id);
      }
 else       if (annoBool != null && annoBlock == null && annoInt == null) {
        if (field.isAnnotationPresent(CfgBool.class)) {
          boolean bool=field.getBoolean(null);
          bool=config.get(Configuration.CATEGORY_GENERAL,field.getName(),bool).getBoolean(bool);
          field.setBoolean(null,bool);
        }
      }
 else       if (annoBool == null && annoBlock == null && annoInt != null) {
        if (field.isAnnotationPresent(CfgInt.class)) {
          int someInt=field.getInt(null);
          someInt=config.get(Configuration.CATEGORY_GENERAL,field.getName(),someInt).getInt(someInt);
          field.setInt(null,someInt);
        }
      }
    }
  }
 catch (  Exception e) {
    LogWrapper.log(Level.WARNING,"String_Node_Str");
  }
 finally {
    config.save();
  }
}

Fixed version (ground truth):
public static void load(Configuration config){
  try {
    config.load();
    Field[] fields=Settings.class.getFields();
    for (    Field field : fields) {
      CfgId annoBlock=field.getAnnotation(CfgId.class);
      CfgBool annoBool=field.getAnnotation(CfgBool.class);
      CfgInt annoInt=field.getAnnotation(CfgInt.class);
      if (annoBlock != null && annoBool == null && annoInt == null) {
        int id=field.getInt(null);
        if (annoBlock.block()) {
          id=config.getBlock(field.getName(),id).getInt();
        }
 else {
          id=config.getItem(field.getName(),id).getInt();
        }
        field.setInt(null,id);
      }
 else       if (annoBool != null && annoBlock == null && annoInt == null) {
        if (field.isAnnotationPresent(CfgBool.class)) {
          boolean bool=field.getBoolean(null);
          bool=config.get(Configuration.CATEGORY_GENERAL,field.getName(),bool).getBoolean(bool);
          field.setBoolean(null,bool);
        }
      }
 else       if (annoBool == null && annoBlock == null && annoInt != null) {
        if (field.isAnnotationPresent(CfgInt.class)) {
          int someInt=field.getInt(null);
          someInt=config.get(Configuration.CATEGORY_GENERAL,field.getName(),someInt).getInt(someInt);
          field.setInt(null,someInt);
        }
      }
    }
  }
 catch (  Exception e) {
    ModMinechem.LOGGER.log(Level.WARNING,"String_Node_Str");
  }
 finally {
    config.save();
  }
}
Program: 21854
Project: 21854
Buggy source:
private boolean hasDiscovered(ArrayList<ItemStack> list,ItemStack itemstack){
  for (  ItemStack itemstack2 : list) {
    if (itemstack.isItemEqual(itemstack2))     return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean hasDiscovered(ArrayList<ItemStack> list,ItemStack itemstack){
  for (  ItemStack itemstack2 : list) {
    if (itemstack.isItemEqual(itemstack2)) {
      return true;
    }
  }
  return false;
}
Program: 21855
Project: 21855
Buggy source:
public List<ItemStack> getItemList(ItemStack journal){
  NBTTagCompound tag=journal.getTagCompound();
  if (tag != null) {
    NBTTagList taglist=tag.getTagList(ITEMS_TAG_NAME);
    if (taglist != null)     return MinechemHelper.readTagListToItemStackList(taglist);
  }
  return null;
}

Fixed version (ground truth):
public List<ItemStack> getItemList(ItemStack journal){
  NBTTagCompound tag=journal.getTagCompound();
  if (tag != null) {
    NBTTagList taglist=tag.getTagList(ITEMS_TAG_NAME);
    if (taglist != null) {
      return MinechemHelper.readTagListToItemStackList(taglist);
    }
  }
  return null;
}
Program: 21856
Project: 21856
Buggy source:
@Override public ItemStack onItemRightClick(ItemStack par1ItemStack,World world,EntityPlayer entityPlayer){
  if (!world.isRemote)   entityPlayer.openGui(ModMinechem.INSTANCE,GuiHandler.GUI_ID_JOURNAL,world,entityPlayer.chunkCoordX,entityPlayer.chunkCoordY,entityPlayer.chunkCoordY);
  return par1ItemStack;
}

Fixed version (ground truth):
@Override public ItemStack onItemRightClick(ItemStack itemStack,World world,EntityPlayer entityPlayer){
  if (!world.isRemote) {
    entityPlayer.openGui(ModMinechem.INSTANCE,GuiHandler.GUI_ID_JOURNAL,world,entityPlayer.chunkCoordX,entityPlayer.chunkCoordY,entityPlayer.chunkCoordY);
    NBTTagCompound tagCompound=itemStack.getTagCompound();
    if (tagCompound == null) {
      tagCompound=new NBTTagCompound();
    }
    tagCompound.setString(JOURNAL_OWNER_TAG,entityPlayer.username);
    itemStack.setTagCompound(tagCompound);
  }
  return itemStack;
}
Program: 21857
Project: 21857
Buggy source:
@Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack itemStack,EntityPlayer entityPlayer,List list,boolean par4){
  NBTTagCompound stackTag=itemStack.getTagCompound();
  if (stackTag != null) {
    NBTTagCompound activeTag=(NBTTagCompound)stackTag.getTag(ACTIVE_ITEMSTACK_TAG);
    String owner=stackTag.getString("String_Node_Str");
    if (activeTag != null) {
      ItemStack activeItemStack=ItemStack.loadItemStackFromNBT(activeTag);
      list.add(activeItemStack.getDisplayName());
    }
    list.add("String_Node_Str" + owner);
  }
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack itemStack,EntityPlayer entityPlayer,List list,boolean par4){
  NBTTagCompound stackTag=itemStack.getTagCompound();
  if (stackTag != null) {
    NBTTagCompound activeTag=(NBTTagCompound)stackTag.getTag(ACTIVE_ITEMSTACK_TAG);
    if (activeTag != null) {
      ItemStack activeItemStack=ItemStack.loadItemStackFromNBT(activeTag);
      list.add("String_Node_Str" + activeItemStack.getDisplayName());
    }
    String owner=stackTag.getString(JOURNAL_OWNER_TAG);
    list.add("String_Node_Str" + owner);
  }
}
Program: 21858
Project: 21858
Buggy source:
public void setActiveStack(ItemStack itemstack,ItemStack journalStack){
  NBTTagCompound journalTag=journalStack.getTagCompound();
  if (journalTag == null)   journalTag=new NBTTagCompound();
  NBTTagCompound stackTag=itemstack.writeToNBT(new NBTTagCompound());
  journalTag.setTag(ACTIVE_ITEMSTACK_TAG,stackTag);
  journalStack.setTagCompound(journalTag);
}

Fixed version (ground truth):
public void setActiveStack(ItemStack itemstack,ItemStack journalStack){
  NBTTagCompound journalTag=journalStack.getTagCompound();
  if (journalTag == null) {
    journalTag=new NBTTagCompound();
  }
  NBTTagCompound stackTag=itemstack.writeToNBT(new NBTTagCompound());
  journalTag.setTag(ACTIVE_ITEMSTACK_TAG,stackTag);
  journalStack.setTagCompound(journalTag);
}
Program: 21859
Project: 21859
Buggy source:
public void addItemStackToJournal(ItemStack itemstack,ItemStack journal,World world){
  NBTTagCompound tagCompound=journal.getTagCompound();
  if (tagCompound == null)   tagCompound=new NBTTagCompound();
  NBTTagList taglist=tagCompound.getTagList(ITEMS_TAG_NAME);
  if (taglist == null)   taglist=new NBTTagList();
  ArrayList<ItemStack> itemArrayList=MinechemHelper.readTagListToItemStackList(taglist);
  if (!hasDiscovered(itemArrayList,itemstack)) {
    taglist.appendTag(itemstack.writeToNBT(new NBTTagCompound()));
    tagCompound.setTag(ITEMS_TAG_NAME,taglist);
    journal.setTagCompound(tagCompound);
  }
}

Fixed version (ground truth):
public void addItemStackToJournal(ItemStack itemstack,ItemStack journal,World world){
  NBTTagCompound tagCompound=journal.getTagCompound();
  if (tagCompound == null) {
    tagCompound=new NBTTagCompound();
  }
  NBTTagList taglist=tagCompound.getTagList(ITEMS_TAG_NAME);
  if (taglist == null) {
    taglist=new NBTTagList();
  }
  ArrayList<ItemStack> itemArrayList=MinechemHelper.readTagListToItemStackList(taglist);
  if (!hasDiscovered(itemArrayList,itemstack)) {
    taglist.appendTag(itemstack.writeToNBT(new NBTTagCompound()));
    tagCompound.setTag(ITEMS_TAG_NAME,taglist);
    journal.setTagCompound(tagCompound);
  }
}
Program: 21860
Project: 21860
Buggy source:
public ItemStack getActiveStack(ItemStack journalStack){
  NBTTagCompound journalTag=journalStack.getTagCompound();
  if (journalTag != null) {
    NBTTagCompound stackTag=(NBTTagCompound)journalTag.getTag(ACTIVE_ITEMSTACK_TAG);
    if (stackTag != null)     return ItemStack.loadItemStackFromNBT(stackTag);
  }
  return null;
}

Fixed version (ground truth):
public ItemStack getActiveStack(ItemStack journalStack){
  NBTTagCompound journalTag=journalStack.getTagCompound();
  if (journalTag != null) {
    NBTTagCompound stackTag=(NBTTagCompound)journalTag.getTag(ACTIVE_ITEMSTACK_TAG);
    if (stackTag != null) {
      return ItemStack.loadItemStackFromNBT(stackTag);
    }
  }
  return null;
}
Program: 21862
Project: 21862
Buggy source:
private void updateChemicalStorageContainer(EntityPlayer player,Container openContainer){
  ContainerChemicalStorage chemicalStorage=(ContainerChemicalStorage)openContainer;
  List<ItemStack> itemstacks=chemicalStorage.getStorageInventory();
  for (  ItemStack itemstack : itemstacks) {
    if (itemstack != null && itemstack.itemID == MinechemItems.element.itemID) {
      RadiationInfo radiationInfo=ItemElement.getRadiationInfo(itemstack,player.worldObj);
      radiationInfo.lastRadiationUpdate=player.worldObj.getTotalWorldTime();
      ItemElement.setRadiationInfo(radiationInfo,itemstack);
    }
  }
  List<ItemStack> playerStacks=chemicalStorage.getPlayerInventory();
  updateRadiationOnItems(player.worldObj,player,openContainer,playerStacks);
}

Fixed version (ground truth):
private void updateChemicalStorageContainer(EntityPlayer player,Container openContainer){
  ContainerChemicalStorage chemicalStorage=(ContainerChemicalStorage)openContainer;
  List<ItemStack> itemstacks=chemicalStorage.getStorageInventory();
  for (  ItemStack itemstack : itemstacks) {
    if (itemstack != null && itemstack.itemID == MinechemItems.element.itemID && ItemElement.getRadioactivity(itemstack) != EnumRadioactivity.stable) {
      RadiationInfo radiationInfo=ItemElement.getRadiationInfo(itemstack,player.worldObj);
      radiationInfo.lastRadiationUpdate=player.worldObj.getTotalWorldTime();
      ItemElement.setRadiationInfo(radiationInfo,itemstack);
    }
  }
  List<ItemStack> playerStacks=chemicalStorage.getPlayerInventory();
  updateRadiationOnItems(player.worldObj,player,openContainer,playerStacks);
}
Program: 21863
Project: 21863
Buggy source:
private List<DecayEvent> updateRadiationOnItems(World world,EntityPlayer player,Container container,List<ItemStack> itemstacks){
  List<DecayEvent> events=new ArrayList<DecayEvent>();
  for (  ItemStack itemstack : itemstacks) {
    if (itemstack != null && itemstack.itemID == MinechemItems.element.itemID) {
      DecayEvent decayEvent=new DecayEvent();
      decayEvent.before=itemstack.copy();
      decayEvent.damage=updateRadiation(world,itemstack);
      decayEvent.after=itemstack.copy();
      if (decayEvent.damage > 0)       events.add(decayEvent);
      if (decayEvent.damage > 0 && container != null) {
        applyRadiationDamage(player,container,decayEvent.damage);
        printRadiationDamageToChat(player,decayEvent);
      }
    }
  }
  return events;
}

Fixed version (ground truth):
private List<DecayEvent> updateRadiationOnItems(World world,EntityPlayer player,Container container,List<ItemStack> itemstacks){
  List<DecayEvent> events=new ArrayList<DecayEvent>();
  for (  ItemStack itemstack : itemstacks) {
    if (itemstack != null && itemstack.itemID == MinechemItems.element.itemID && ItemElement.getRadioactivity(itemstack) != EnumRadioactivity.stable) {
      DecayEvent decayEvent=new DecayEvent();
      decayEvent.before=itemstack.copy();
      decayEvent.damage=updateRadiation(world,itemstack);
      decayEvent.after=itemstack.copy();
      if (decayEvent.damage > 0)       events.add(decayEvent);
      if (decayEvent.damage > 0 && container != null) {
        applyRadiationDamage(player,container,decayEvent.damage);
        printRadiationDamageToChat(player,decayEvent);
      }
    }
  }
  return events;
}
Program: 21865
Project: 21865
Buggy source:
@Override public int[] getAccessibleSlotsFromSide(int var1){
  if (var1 == 0) {
    return this.kOutput;
  }
  return this.kInput;
}

Fixed version (ground truth):
@Override public int[] getAccessibleSlotsFromSide(int var1){
  if (var1 == 1) {
    return this.kInput;
  }
  return this.kOutput;
}
Program: 21866
Project: 21866
Buggy source:
public int[] getSizeInventorySide(int side){
switch (side) {
case 0:
case 1:
case 2:
case 3:
    return kInput;
default :
  return kOutput;
}
}

Fixed version (ground truth):
public int[] getSizeInventorySide(int side){
switch (side) {
case 1:
    return kInput;
default :
  return kOutput;
}
}
Program: 21867
Project: 21867
Buggy source:
public int[] getSizeInventorySide(int side){
switch (side) {
case 0:
case 1:
case 4:
case 5:
    return kStorage;
default :
  return kOutput;
}
}

Fixed version (ground truth):
public int[] getSizeInventorySide(int side){
switch (side) {
case 1:
    return kStorage;
default :
  return kOutput;
}
}
Program: 21868
Project: 21868
Buggy source:
@Override public int[] getAccessibleSlotsFromSide(int var1){
  if (var1 == 0 && takeStacksFromStorage(false)) {
    return this.kOutput;
  }
  return this.kStorage;
}

Fixed version (ground truth):
@Override public int[] getAccessibleSlotsFromSide(int var1){
  if (var1 != 1 && takeStacksFromStorage(false)) {
    return this.kOutput;
  }
  return this.kStorage;
}
Program: 21871
Project: 21871
Buggy source:
@Override public void breakBlock(World world,int x,int y,int z,int oldBlockId,int oldMetadata){
  super.breakBlock(world,x,y,z,oldBlockId,oldMetadata);
  if (oldMetadata < 2) {
    if (world.getBlockTileEntity(x,y,z) instanceof TileEntityProxy) {
      TileEntityProxy tileEntity=(TileEntityProxy)world.getBlockTileEntity(x,y,z);
      world.destroyBlock(tileEntity.getManager().xCoord,tileEntity.getManager().yCoord,tileEntity.getManager().zCoord,true);
    }
  }
}

Fixed version (ground truth):
@Override public void breakBlock(World world,int x,int y,int z,int oldBlockId,int oldMetadata){
  super.breakBlock(world,x,y,z,oldBlockId,oldMetadata);
}
Program: 21872
Project: 21872
Buggy source:
@Override public void breakBlock(World world,int x,int y,int z,int oldBlockId,int oldMetadata){
  TileEntity tileEntity=world.getBlockTileEntity(x,y,z);
  if (tileEntity != null) {
    ArrayList<ItemStack> droppedStacks=new ArrayList<ItemStack>();
    addStacksDroppedOnBlockBreak(tileEntity,droppedStacks);
    for (    ItemStack itemstack : droppedStacks) {
      float randomX=this.random.nextFloat() * 0.8F + 0.1F;
      float randomY=this.random.nextFloat() * 0.8F + 0.1F;
      float randomZ=this.random.nextFloat() * 0.8F + 0.1F;
      while (itemstack.stackSize > 0) {
        int randomN=this.random.nextInt(21) + 10;
        if (randomN > itemstack.stackSize)         randomN=itemstack.stackSize;
        itemstack.stackSize-=randomN;
        ItemStack droppedStack=new ItemStack(itemstack.itemID,randomN,itemstack.getItemDamage());
        if (itemstack.hasTagCompound()) {
          droppedStack.setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
        }
        EntityItem droppedEntityItem=new EntityItem(world,(double)((float)x + randomX),(double)((float)y + randomY),(double)((float)z + randomZ),droppedStack);
        world.spawnEntityInWorld(droppedEntityItem);
      }
    }
    super.breakBlock(world,x,y,z,oldBlockId,oldMetadata);
  }
}

Fixed version (ground truth):
@Override public void breakBlock(World world,int x,int y,int z,int oldBlockId,int oldMetadata){
  TileEntity tileEntity=world.getBlockTileEntity(x,y,z);
  if (tileEntity != null) {
    ArrayList<ItemStack> droppedStacks=new ArrayList<ItemStack>();
    addStacksDroppedOnBlockBreak(tileEntity,droppedStacks);
    for (    ItemStack itemstack : droppedStacks) {
      float randomX=this.random.nextFloat() * 0.8F + 0.1F;
      float randomY=this.random.nextFloat() * 0.8F + 0.1F;
      float randomZ=this.random.nextFloat() * 0.8F + 0.1F;
      if (itemstack != null) {
        while (itemstack.stackSize > 0) {
          int randomN=this.random.nextInt(21) + 10;
          if (randomN > itemstack.stackSize)           randomN=itemstack.stackSize;
          itemstack.stackSize-=randomN;
          ItemStack droppedStack=new ItemStack(itemstack.itemID,randomN,itemstack.getItemDamage());
          if (itemstack.hasTagCompound()) {
            droppedStack.setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
          }
          EntityItem droppedEntityItem=new EntityItem(world,(double)((float)x + randomX),(double)((float)y + randomY),(double)((float)z + randomZ),droppedStack);
          world.spawnEntityInWorld(droppedEntityItem);
        }
      }
    }
    super.breakBlock(world,x,y,z,oldBlockId,oldMetadata);
  }
}
Program: 21873
Project: 21873
Buggy source:
private void drawBlueprintInfo(ItemStack blueprintStack){
  MinechemBlueprint blueprint=MinechemItems.blueprint.getBlueprint(blueprintStack);
  if (blueprint == null) {
    System.out.println("String_Node_Str");
    return;
  }
  String name=blueprintStack.getDisplayName().replace("String_Node_Str","String_Node_Str");
  this.fontRenderer.drawStringWithShadow(name,64,12,0xFFFFFF);
  HashMap<Integer,Integer> blockCount=getBlockCount(blueprint);
  HashMap<Integer,BlueprintBlock> blockLookup=blueprint.getBlockLookup();
  int y=23;
  Iterator<Entry<Integer,Integer>> it=blockCount.entrySet().iterator();
  while (it.hasNext()) {
    Map.Entry<Integer,Integer> entry=it.next();
    BlueprintBlock block=blockLookup.get(entry.getKey());
    if (block != null) {
      ItemStack itemstack=new ItemStack(block.block,1,block.metadata);
      String info=String.format("String_Node_Str",entry.getValue(),itemstack.getDisplayName());
      this.fontRenderer.drawString(info,64,y,0xDDDDDD);
      y+=10;
    }
  }
}

Fixed version (ground truth):
private void drawBlueprintInfo(ItemStack blueprintStack){
  MinechemBlueprint blueprint=MinechemItems.blueprint.getBlueprint(blueprintStack);
  if (blueprint == null) {
    return;
  }
  String name=blueprintStack.getDisplayName().replace("String_Node_Str","String_Node_Str");
  this.fontRenderer.drawStringWithShadow(name,64,12,0xFFFFFF);
  HashMap<Integer,Integer> blockCount=getBlockCount(blueprint);
  HashMap<Integer,BlueprintBlock> blockLookup=blueprint.getBlockLookup();
  int y=23;
  Iterator<Entry<Integer,Integer>> it=blockCount.entrySet().iterator();
  while (it.hasNext()) {
    Map.Entry<Integer,Integer> entry=it.next();
    BlueprintBlock block=blockLookup.get(entry.getKey());
    if (block != null) {
      ItemStack itemstack=new ItemStack(block.block,1,block.metadata);
      String info=String.format("String_Node_Str",entry.getValue(),itemstack.getDisplayName());
      this.fontRenderer.drawString(info,64,y,0xDDDDDD);
      y+=10;
    }
  }
}
Program: 21874
Project: 21874
Buggy source:
@Override public Object getServerGuiElement(int ID,EntityPlayer player,World world,int x,int y,int z){
  if (ID == GUI_ID_JOURNAL) {
    return getServerGuiElementForJournal(player,world);
  }
  if (ID == GUI_ID_POLYTOOL) {
    return getServerGuiElementForPolytool(player,world);
  }
  if (ID == GUI_TABLE) {
    return new CotainerTable(player.inventory);
  }
  TileEntity tileEntity=world.getBlockTileEntity(x,y,z);
  if (tileEntity instanceof TileEntityDecomposer)   return new ContainerDecomposer(player.inventory,(TileEntityDecomposer)tileEntity);
  if (tileEntity instanceof TileEntityMicroscope)   return new ContainerMicroscope(player.inventory,(TileEntityMicroscope)tileEntity);
  if (tileEntity instanceof TileEntitySynthesis)   return new ContainerSynthesis(player.inventory,(TileEntitySynthesis)tileEntity);
  if (tileEntity instanceof TileEntityFusion) {
    return new ContainerFusion(player.inventory,(TileEntityFusion)tileEntity);
  }
  if (tileEntity instanceof TileEntityFission) {
    System.out.println(1);
    return new ContainerFission(player.inventory,(TileEntityFission)tileEntity);
  }
  if (tileEntity instanceof TileEntityProxy) {
    System.out.println(2);
    return getServerGuiElementFromProxy((TileEntityProxy)tileEntity,player);
  }
  if (tileEntity instanceof TileEntityBlueprintProjector)   return new ContainerProjector(player.inventory,(TileEntityBlueprintProjector)tileEntity);
  if (tileEntity instanceof TileEntityChemicalStorage)   return new ContainerChemicalStorage(player.inventory,(TileEntityChemicalStorage)tileEntity);
  return null;
}

Fixed version (ground truth):
@Override public Object getServerGuiElement(int ID,EntityPlayer player,World world,int x,int y,int z){
  if (ID == GUI_ID_JOURNAL) {
    return getServerGuiElementForJournal(player,world);
  }
  if (ID == GUI_ID_POLYTOOL) {
    return getServerGuiElementForPolytool(player,world);
  }
  if (ID == GUI_TABLE) {
    return new CotainerTable(player.inventory);
  }
  TileEntity tileEntity=world.getBlockTileEntity(x,y,z);
  if (tileEntity instanceof TileEntityDecomposer)   return new ContainerDecomposer(player.inventory,(TileEntityDecomposer)tileEntity);
  if (tileEntity instanceof TileEntityMicroscope)   return new ContainerMicroscope(player.inventory,(TileEntityMicroscope)tileEntity);
  if (tileEntity instanceof TileEntitySynthesis)   return new ContainerSynthesis(player.inventory,(TileEntitySynthesis)tileEntity);
  if (tileEntity instanceof TileEntityFusion) {
    return new ContainerFusion(player.inventory,(TileEntityFusion)tileEntity);
  }
  if (tileEntity instanceof TileEntityFission) {
    return new ContainerFission(player.inventory,(TileEntityFission)tileEntity);
  }
  if (tileEntity instanceof TileEntityProxy) {
    return getServerGuiElementFromProxy((TileEntityProxy)tileEntity,player);
  }
  if (tileEntity instanceof TileEntityBlueprintProjector)   return new ContainerProjector(player.inventory,(TileEntityBlueprintProjector)tileEntity);
  if (tileEntity instanceof TileEntityChemicalStorage)   return new ContainerChemicalStorage(player.inventory,(TileEntityChemicalStorage)tileEntity);
  return null;
}
Program: 21875
Project: 21875
Buggy source:
@Override public Object getClientGuiElement(int ID,EntityPlayer player,World world,int x,int y,int z){
  if (ID == GUI_ID_JOURNAL)   return getClientGuiElementForJournal(player,world);
  if (ID == GUI_TABLE)   return getClientGuiForJournal(player,world);
  if (ID == GUI_ID_POLYTOOL)   return getClientGuiForPolytool(player,world);
  TileEntity tileEntity=world.getBlockTileEntity(x,y,z);
  if (tileEntity instanceof TileEntityDecomposer)   return new GuiDecomposer(player.inventory,(TileEntityDecomposer)tileEntity);
  if (tileEntity instanceof TileEntityMicroscope)   return new GuiMicroscope(player.inventory,(TileEntityMicroscope)tileEntity);
  if (tileEntity instanceof TileEntitySynthesis)   return new GuiSynthesis(player.inventory,(TileEntitySynthesis)tileEntity);
  if (tileEntity instanceof TileEntityFusion)   return new GuiFusion(player.inventory,(TileEntityFusion)tileEntity);
  if (tileEntity instanceof TileEntityProxy) {
    System.out.println(3);
    return getClientGuiElementFromProxy((TileEntityProxy)tileEntity,player);
  }
  if (tileEntity instanceof TileEntityBlueprintProjector)   return new GuiProjector(player.inventory,(TileEntityBlueprintProjector)tileEntity);
  if (tileEntity instanceof TileEntityChemicalStorage)   return new GuiChemicalStorage(player.inventory,(TileEntityChemicalStorage)tileEntity);
  if (tileEntity instanceof TileEntityFission) {
    System.out.println(4);
    return new GuiFission(player.inventory,(TileEntityFission)tileEntity);
  }
  return null;
}

Fixed version (ground truth):
@Override public Object getClientGuiElement(int ID,EntityPlayer player,World world,int x,int y,int z){
  if (ID == GUI_ID_JOURNAL)   return getClientGuiElementForJournal(player,world);
  if (ID == GUI_TABLE)   return getClientGuiForJournal(player,world);
  if (ID == GUI_ID_POLYTOOL)   return getClientGuiForPolytool(player,world);
  TileEntity tileEntity=world.getBlockTileEntity(x,y,z);
  if (tileEntity instanceof TileEntityDecomposer)   return new GuiDecomposer(player.inventory,(TileEntityDecomposer)tileEntity);
  if (tileEntity instanceof TileEntityMicroscope)   return new GuiMicroscope(player.inventory,(TileEntityMicroscope)tileEntity);
  if (tileEntity instanceof TileEntitySynthesis)   return new GuiSynthesis(player.inventory,(TileEntitySynthesis)tileEntity);
  if (tileEntity instanceof TileEntityFusion)   return new GuiFusion(player.inventory,(TileEntityFusion)tileEntity);
  if (tileEntity instanceof TileEntityProxy) {
    return getClientGuiElementFromProxy((TileEntityProxy)tileEntity,player);
  }
  if (tileEntity instanceof TileEntityBlueprintProjector)   return new GuiProjector(player.inventory,(TileEntityBlueprintProjector)tileEntity);
  if (tileEntity instanceof TileEntityChemicalStorage)   return new GuiChemicalStorage(player.inventory,(TileEntityChemicalStorage)tileEntity);
  if (tileEntity instanceof TileEntityFission) {
    return new GuiFission(player.inventory,(TileEntityFission)tileEntity);
  }
  return null;
}
Program: 21876
Project: 21876
Buggy source:
@Override public ItemStack getCraftingResult(InventoryCrafting inv){
  System.out.println(6);
  for (int i=0; i < inv.getSizeInventory(); i++) {
    ItemStack s=inv.getStackInSlot(i);
    if (s != null && s.getItem() instanceof ItemSword) {
      for (int j=0; j < inv.getSizeInventory(); j++) {
        ItemStack s2=inv.getStackInSlot(j);
        if (s2 != null && s2.getItem() instanceof ItemMolecule && PharmacologyEffect.givesEffect(EnumMolecule.getById(s2.getItemDamage()))) {
          NBTTagList l=s2.getEnchantmentTagList();
          int level=0;
          if (l != null) {
            for (int k=0; k < l.tagCount(); k++) {
              NBTTagCompound tag=(NBTTagCompound)l.tagAt(k);
              if (tag.getShort("String_Node_Str") == EnchantmentCoated.chemLookup.get(EnumMolecule.getById(s2.getItemDamage())).effectId) {
                level=tag.getShort("String_Node_Str");
                ItemStack result=s.copy();
                ((NBTTagCompound)result.getEnchantmentTagList().tagAt(k)).setInteger("String_Node_Str",level + 1);
              }
            }
          }
          ItemStack result=s.copy();
          result.addEnchantment(EnchantmentCoated.chemLookup.get(EnumMolecule.getById(s2.getItemDamage())),1);
          return result;
        }
      }
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public ItemStack getCraftingResult(InventoryCrafting inv){
  for (int i=0; i < inv.getSizeInventory(); i++) {
    ItemStack s=inv.getStackInSlot(i);
    if (s != null && s.getItem() instanceof ItemSword) {
      for (int j=0; j < inv.getSizeInventory(); j++) {
        ItemStack s2=inv.getStackInSlot(j);
        if (s2 != null && s2.getItem() instanceof ItemMolecule && PharmacologyEffect.givesEffect(EnumMolecule.getById(s2.getItemDamage()))) {
          NBTTagList l=s2.getEnchantmentTagList();
          int level=0;
          if (l != null) {
            for (int k=0; k < l.tagCount(); k++) {
              NBTTagCompound tag=(NBTTagCompound)l.tagAt(k);
              if (tag.getShort("String_Node_Str") == EnchantmentCoated.chemLookup.get(EnumMolecule.getById(s2.getItemDamage())).effectId) {
                level=tag.getShort("String_Node_Str");
                ItemStack result=s.copy();
                ((NBTTagCompound)result.getEnchantmentTagList().tagAt(k)).setInteger("String_Node_Str",level + 1);
              }
            }
          }
          ItemStack result=s.copy();
          result.addEnchantment(EnchantmentCoated.chemLookup.get(EnumMolecule.getById(s2.getItemDamage())),1);
          return result;
        }
      }
    }
  }
  return null;
}
Program: 21878
Project: 21878
Buggy source:
public void checkForParticleCollision(){
  System.out.println(1);
  if (!worldObj.isRemote) {
    List<BaseParticle> nearbyParticles=this.worldObj.getEntitiesWithinAABB(BaseParticle.class,AxisAlignedBB.getBoundingBox(posX - 1.5,posY - 1.5,posZ - 1.5,posX + 1.5,posY + 1.5,posZ + 1.5));
    for (int i=0; i < nearbyParticles.size(); i++) {
      BaseParticle particle=nearbyParticles.get(i);
      if (this != particle && !this.isDead && !particle.isDead) {
        this.onCollideWithParticle(particle);
      }
    }
  }
}

Fixed version (ground truth):
public void checkForParticleCollision(){
  if (!worldObj.isRemote) {
    List<BaseParticle> nearbyParticles=this.worldObj.getEntitiesWithinAABB(BaseParticle.class,AxisAlignedBB.getBoundingBox(posX - 1.5,posY - 1.5,posZ - 1.5,posX + 1.5,posY + 1.5,posZ + 1.5));
    for (int i=0; i < nearbyParticles.size(); i++) {
      BaseParticle particle=nearbyParticles.get(i);
      if (this != particle && !this.isDead && !particle.isDead) {
        this.onCollideWithParticle(particle);
      }
    }
  }
}
Program: 21879
Project: 21879
Buggy source:
@Override public EnumElement getElement(){
  return EnumElement.Zn;
}

Fixed version (ground truth):
@Override public EnumElement getElement(){
  return EnumElement.Hg;
}
Program: 21881
Project: 21881
Buggy source:
@Override public void handle(OreRegisterEvent oreEvent){
  if (oreEvent.Name.equals("String_Node_Str")) {
    DecomposerRecipe.add(new DecomposerRecipe(oreEvent.Ore,certusQuartzDecompositionFormula));
    if (Loader.isModLoaded("String_Node_Str")) {
      SynthesisRecipe.add(new SynthesisRecipe(oreEvent.Ore,true,30000,certusQuartzDustSynthesisFormula));
    }
  }
 else   if (oreEvent.Name.equals("String_Node_Str")) {
    DecomposerRecipe.add(new DecomposerRecipe(oreEvent.Ore,certusQuartzDecompositionFormula));
    if (!Loader.isModLoaded("String_Node_Str")) {
      SynthesisRecipe.add(new SynthesisRecipe(oreEvent.Ore,true,30000,certusQuartzCrystalSynthesisFormula));
    }
  }
 else {
    ModMinechem.logger.info("String_Node_Str" + oreEvent.Name);
  }
}

Fixed version (ground truth):
@Override public void handle(OreRegisterEvent oreEvent){
  if (oreEvent.Name.equals("String_Node_Str")) {
    DecomposerRecipe.add(new DecomposerRecipe(oreEvent.Ore,certusQuartzDecompositionFormula));
    SynthesisRecipe.add(new SynthesisRecipe(oreEvent.Ore,true,30000,certusQuartzDustSynthesisFormula));
  }
}
Program: 21884
Project: 21884
Buggy source:
@Override public void renderTileEntityAt(TileEntity tileEntity,double x,double y,double z,float scale){
  BlueprintBlock blueprintBlock=getBlueprintBlock(tileEntity);
  if (blueprintBlock == null)   return;
  float alpha=random.nextFloat();
  GL11.glPushMatrix();
  GL11.glTranslated(x + 0.5D,y + 0.5D,z + 0.5D);
  GL11.glDisable(GL11.GL_LIGHTING);
  GL11.glEnable(GL11.GL_BLEND);
  GL11.glBlendFunc(GL11.GL_SRC_ALPHA,GL11.GL_DST_ALPHA);
  GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
  renderBlocks.blockAccess=tileEntity.worldObj;
  renderBlocks.renderBlockAsItem(blueprintBlock.block,blueprintBlock.metadata,alpha);
  GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
  GL11.glDisable(GL11.GL_BLEND);
  GL11.glEnable(GL11.GL_LIGHTING);
  GL11.glPopMatrix();
}

Fixed version (ground truth):
@Override public void renderTileEntityAt(TileEntity tileEntity,double x,double y,double z,float scale){
  BlueprintBlock blueprintBlock=getBlueprintBlock(tileEntity);
  if (blueprintBlock == null)   return;
  float alpha=random.nextFloat();
  GL11.glPushMatrix();
  GL11.glTranslated(x + 0.5D,y + 0.5D,z + 0.5D);
  GL11.glDisable(GL11.GL_LIGHTING);
  GL11.glEnable(GL11.GL_BLEND);
  GL11.glBlendFunc(GL11.GL_SRC_ALPHA,1 - GL11.GL_DST_ALPHA);
  GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
  renderBlocks.blockAccess=tileEntity.worldObj;
  renderBlocks.renderBlockAsItem(blueprintBlock.block,blueprintBlock.metadata,alpha);
  GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
  GL11.glDisable(GL11.GL_BLEND);
  GL11.glEnable(GL11.GL_LIGHTING);
  GL11.glPopMatrix();
}
Program: 21885
Project: 21885
Buggy source:
/** 
 * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given coordinates. Args: blockAccess, x, y, z, side
 */
@Override public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess,int par2,int par3,int par4,int par5){
  int var6=par1IBlockAccess.getBlockId(par2,par3,par4);
  return var6 == this.blockID ? false : super.shouldSideBeRendered(par1IBlockAccess,par2,par3,par4,par5);
}

Fixed version (ground truth):
/** 
 * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given coordinates. Args: blockAccess, x, y, z, side
 */
@Override public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess,int par2,int par3,int par4,int par5){
  return true;
}
Program: 21886
Project: 21886
Buggy source:
@Override public void handle(OreRegisterEvent oreEvent){
switch (oreEvent.Name) {
case "String_Node_Str":
    DecomposerRecipe.add(new DecomposerRecipe(oreEvent.Ore,certusQuartzDecompositionFormula));
  if (Loader.isModLoaded("String_Node_Str")) {
    SynthesisRecipe.add(new SynthesisRecipe(oreEvent.Ore,true,20000,certusQuartzDustSynthesisFormula));
  }
break;
case "String_Node_Str":
DecomposerRecipe.add(new DecomposerRecipe(oreEvent.Ore,certusQuartzDecompositionFormula));
if (!Loader.isModLoaded("String_Node_Str")) {
SynthesisRecipe.add(new SynthesisRecipe(oreEvent.Ore,true,20000,certusQuartzCrystalSynthesisFormula));
}
break;
default :
System.err.println("String_Node_Str" + oreEvent.Name);
break;
}
}

Fixed version (ground truth):
@Override public void handle(OreRegisterEvent oreEvent){
switch (oreEvent.Name) {
case "String_Node_Str":
    DecomposerRecipe.add(new DecomposerRecipe(oreEvent.Ore,certusQuartzDecompositionFormula));
  if (Loader.isModLoaded("String_Node_Str")) {
    SynthesisRecipe.add(new SynthesisRecipe(oreEvent.Ore,true,30000,certusQuartzDustSynthesisFormula));
  }
break;
case "String_Node_Str":
DecomposerRecipe.add(new DecomposerRecipe(oreEvent.Ore,certusQuartzDecompositionFormula));
if (!Loader.isModLoaded("String_Node_Str")) {
SynthesisRecipe.add(new SynthesisRecipe(oreEvent.Ore,true,30000,certusQuartzCrystalSynthesisFormula));
}
break;
default :
System.err.println("String_Node_Str" + oreEvent.Name);
break;
}
}