nus-yam/ex-repair huggingface dataset:
Program: 34601
Project: 34601
Buggy source:
public GuiEnderCompendium(CompendiumFile compendiumFile){
  this.compendiumFile=compendiumFile;
  animationList.add(offsetY=new AnimatedFloat(Easing.CUBIC));
  animationList.add(portalSpeed=new AnimatedFloat(Easing.CUBIC));
  int y=32, maxY=0;
  for (  KnowledgeObject<?> obj : KnowledgeObject.getAllObjects()) {
    if (!obj.isHidden())     objectElements.add(new ObjectDisplayElement(obj,y));
    if (obj.getY() > maxY)     maxY=obj.getY();
  }
  this.totalHeight=y;
  portalSpeed.startAnimation(30F,15F,1.5F);
}

Fixed version (ground truth):
public GuiEnderCompendium(CompendiumFile compendiumFile){
  this.compendiumFile=compendiumFile;
  animationList.add(offsetY=new AnimatedFloat(Easing.CUBIC));
  animationList.add(portalSpeed=new AnimatedFloat(Easing.CUBIC));
  int y=48, maxY=0;
  for (  KnowledgeObject<?> obj : KnowledgeObject.getAllObjects()) {
    if (!obj.isHidden())     objectElements.add(new ObjectDisplayElement(obj,y));
    if (obj.getY() > maxY)     maxY=obj.getY();
  }
  this.totalHeight=y;
  portalSpeed.startAnimation(30F,15F,1.5F);
}
Program: 34603
Project: 34603
Buggy source:
public static void initialize(){
  HELP.setHidden().addFragments(new KnowledgeFragment[]{new FragmentText(0).setType(KnowledgeFragmentType.VISIBLE),new FragmentText(1).setType(KnowledgeFragmentType.VISIBLE),new FragmentText(2).setType(KnowledgeFragmentType.VISIBLE),new FragmentText(3).setType(KnowledgeFragmentType.VISIBLE)});
  TEST2.setParent(TEST1,0,4);
}

Fixed version (ground truth):
public static void initialize(){
  HELP.setHidden().addFragments(new KnowledgeFragment[]{new FragmentText(0).setType(KnowledgeFragmentType.VISIBLE),new FragmentText(1).setType(KnowledgeFragmentType.VISIBLE),new FragmentText(2).setType(KnowledgeFragmentType.VISIBLE),new FragmentText(3).setType(KnowledgeFragmentType.VISIBLE)});
  TEST2.setParent(TEST1,0,4);
  TEST3.setParent(TEST2,-5,3).addParentLine(0,-2).addParentLine(2,-2).addParentLine(2,-3);
  TEST4.setHidden();
  TEST5.setHidden();
  TEST6.setHidden();
}
Program: 34604
Project: 34604
Buggy source:
public KnowledgeObject(T holder,String unlocalizedTooltip){
  this.globalID=++prevID;
  this.holder=holder;
  this.tooltip=unlocalizedTooltip;
  this.children=new ArrayList<>(4);
  this.fragments=new LinkedHashSet<>(6);
  allObjects.put(globalID,this);
}

Fixed version (ground truth):
public KnowledgeObject(T holder,String unlocalizedTooltip){
  this.globalID=++prevID;
  this.holder=holder;
  this.tooltip=unlocalizedTooltip;
  this.children=new ArrayList<>(4);
  this.fragments=new LinkedHashSet<>(6);
  this.parentLineNodes=CollectionUtil.newList(new byte[]{0,0});
  this.childLineNodes=CollectionUtil.newList(new byte[]{0,0});
  allObjects.put(globalID,this);
}
Program: 34605
Project: 34605
Buggy source:
public KnowledgeObject<T> setPos(int x,int y){
  this.x=x;
  this.y=y;
  return this;
}

Fixed version (ground truth):
public KnowledgeObject<T> setPos(int x,int y){
  this.x=x * 12;
  this.y=y * 12;
  return this;
}
Program: 34606
Project: 34606
Buggy source:
public int getX(){
  return x * 12;
}

Fixed version (ground truth):
public int getX(){
  return x;
}
Program: 34607
Project: 34607
Buggy source:
public int getY(){
  return y * 12;
}

Fixed version (ground truth):
public int getY(){
  return y;
}
Program: 34608
Project: 34608
Buggy source:
public KnowledgeObject<T> setParent(KnowledgeObject<?> obj,int offX,int offY){
  this.x=obj.x + offX;
  this.y=obj.y + offY;
  this.parent=obj;
  this.parent.children.add(this);
  return this;
}

Fixed version (ground truth):
public KnowledgeObject<T> setParent(KnowledgeObject<?> obj,int offX,int offY){
  this.x=obj.x + offX * 12;
  this.y=obj.y + offY * 12;
  this.parent=obj;
  this.parent.children.add(this);
  return this;
}
Program: 34609
Project: 34609
Buggy source:
@SideOnly(Side.CLIENT) private static void renderString(String str,int x,int y,int maxWidth,int color){
  Minecraft mc=Minecraft.getMinecraft();
  FontRenderer fontRenderer=mc.fontRenderer;
  boolean origFont=fontRenderer.getUnicodeFlag();
  fontRenderer.setUnicodeFlag(true);
  if (mc.gameSettings.guiScale == 3) {
    float dist=0.08F;
    for (int cycle=0; cycle < 2; cycle++) {
      GL11.glTranslatef(-dist,0F,0F);
      fontRenderer.drawSplitString(str,x,y,maxWidth,color);
      GL11.glTranslatef(dist,-dist,0F);
      fontRenderer.drawSplitString(str,x,y,maxWidth,color);
      GL11.glTranslatef(dist,0F,0F);
      fontRenderer.drawSplitString(str,x,y,maxWidth,color);
      GL11.glTranslatef(-dist,dist,0F);
      dist=-dist;
    }
  }
 else   fontRenderer.drawSplitString(str,x,y,maxWidth,color);
  fontRenderer.setUnicodeFlag(origFont);
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) private static void renderString(String str,int x,int y,int maxWidth,int color){
  Minecraft mc=Minecraft.getMinecraft();
  FontRenderer fontRenderer=mc.fontRenderer;
  boolean origFont=fontRenderer.getUnicodeFlag();
  fontRenderer.setUnicodeFlag(true);
  if ((mc.gameSettings.guiScale & 1) == 1) {
    float dist=0.08F;
    for (int cycle=0; cycle < 2; cycle++) {
      GL11.glTranslatef(-dist,0F,0F);
      fontRenderer.drawSplitString(str,x,y,maxWidth,color);
      GL11.glTranslatef(dist,-dist,0F);
      fontRenderer.drawSplitString(str,x,y,maxWidth,color);
      GL11.glTranslatef(dist,0F,0F);
      fontRenderer.drawSplitString(str,x,y,maxWidth,color);
      GL11.glTranslatef(-dist,dist,0F);
      dist=-dist;
    }
  }
 else   fontRenderer.drawSplitString(str,x,y,maxWidth,color);
  fontRenderer.setUnicodeFlag(origFont);
}
Program: 34610
Project: 34610
Buggy source:
public static boolean tryDiscover(EntityPlayer player,ItemStack is){
  KnowledgeObject knowledgeObj=KnowledgeObject.fromObject(is);
  return knowledgeObj != null && getPlayerData(player).tryDiscoverObject(knowledgeObj);
}

Fixed version (ground truth):
public static boolean tryDiscover(EntityPlayer player,ItemStack is){
  KnowledgeObject knowledgeObj=KnowledgeObject.fromObject(is);
  return knowledgeObj != null && getPlayerData(player).tryDiscoverObject(player,knowledgeObj);
}
Program: 34611
Project: 34611
Buggy source:
@SubscribeEvent public void onPlayerTick(PlayerTickEvent e){
  if (e.phase != Phase.START || e.player.worldObj.isRemote || playerLivingTicks.update(e.player.getGameProfile().getId()))   return;
  KnowledgeObject<?> obj=KnowledgeUtils.getObservedObject(e.player);
  if (obj != null)   getPlayerData(e.player).tryDiscoverObject(obj);
}

Fixed version (ground truth):
@SubscribeEvent public void onPlayerTick(PlayerTickEvent e){
  if (e.phase != Phase.START || e.player.worldObj.isRemote || !playerLivingTicks.update(e.player.getGameProfile().getId()))   return;
  KnowledgeObject<?> obj=KnowledgeUtils.getObservedObject(e.player);
  if (obj != null)   getPlayerData(e.player).tryDiscoverObject(e.player,obj);
}
Program: 34612
Project: 34612
Buggy source:
@SideOnly(Side.CLIENT) private void loadClientConfig(){
  currentCategory="String_Node_Str";
  KnowledgeFragmentText.smoothRenderingMode=(byte)getInt("String_Node_Str",0,"String_Node_Str").getInt();
  if (firstTimeClient) {
    ModClientProxy.loadEnderbacon(getInt("String_Node_Str",0,"String_Node_Str").setShowInGui(false).getInt());
    MusicManager.enableCustomMusic=getBool("String_Node_Str",true,"String_Node_Str").setRequiresMcRestart(true).getBoolean();
    MusicManager.removeVanillaDelay=getBool("String_Node_Str",false,"String_Node_Str").setRequiresMcRestart(true).getBoolean();
    firstTimeClient=false;
  }
  if (config.hasChanged())   config.save();
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) private void loadClientConfig(){
  currentCategory="String_Node_Str";
  if (firstTimeClient) {
    ModClientProxy.loadEnderbacon(getInt("String_Node_Str",0,"String_Node_Str").setShowInGui(false).getInt());
    MusicManager.enableCustomMusic=getBool("String_Node_Str",true,"String_Node_Str").setRequiresMcRestart(true).getBoolean();
    MusicManager.removeVanillaDelay=getBool("String_Node_Str",false,"String_Node_Str").setRequiresMcRestart(true).getBoolean();
    firstTimeClient=false;
  }
  if (config.hasChanged())   config.save();
}
Program: 34613
Project: 34613
Buggy source:
public HeeAchievement setKnowledgeObj(KnowledgeObject<? extends IKnowledgeObjectInstance<?>> obj){
  this.knowledgeObj=obj;
  return this;
}

Fixed version (ground truth):
public HeeAchievement setKnowledgeObj(KnowledgeObject<? extends IObjectHolder<?>> obj){
  this.knowledgeObj=obj;
  return this;
}
Program: 34614
Project: 34614
Buggy source:
public KnowledgeObject<? extends IKnowledgeObjectInstance<?>> getKnowledgeObj(){
  return knowledgeObj;
}

Fixed version (ground truth):
public KnowledgeObject<? extends IObjectHolder<?>> getKnowledgeObj(){
  return knowledgeObj;
}
Program: 34617
Project: 34617
Buggy source:
public void showObject(KnowledgeObject<? extends IKnowledgeObjectInstance<?>> object){
  if (currentObject != null) {
    currentObjectPages.clear();
    purchaseElements.clear();
    if (currentObject != object) {
      pageIndex=0;
      btnHelp.forcedHover=false;
    }
  }
  if ((currentObject=object) == null)   return;
  byte page=0;
  int yy=0, height=0;
  boolean isUnlocked=false;
  Map<KnowledgeFragment,Boolean> pageMap=new LinkedHashMap<>();
  Iterator<KnowledgeFragment> iter=currentObject.getFragments().iterator();
  while (true) {
    KnowledgeFragment fragment=iter.hasNext() ? iter.next() : null;
    if (fragment == null || yy + (height=8 + fragment.getHeight(this,isUnlocked=(object == KnowledgeRegistrations.HELP || compendiumFile.hasUnlockedFragment(fragment)))) > guiPageHeight) {
      currentObjectPages.put(page++,pageMap);
      if (fragment == null)       break;
 else {
        pageMap=new LinkedHashMap<>();
        pageMap.put(fragment,isUnlocked);
        yy=height;
        continue;
      }
    }
    pageMap.put(fragment,isUnlocked);
    yy+=height;
  }
  if (object == KnowledgeRegistrations.HELP) {
    btnHelp.forcedHover=true;
    if (!compendiumFile.seenHelp()) {
      PacketPipeline.sendToServer(new S03SimpleEvent(EventType.OPEN_COMPENDIUM_HELP));
      compendiumFile.setSeenHelp();
    }
    purchaseElements.clear();
    return;
  }
  updatePurchaseElements();
}

Fixed version (ground truth):
public void showObject(KnowledgeObject<? extends IObjectHolder<?>> object){
  if (currentObject != null) {
    currentObjectPages.clear();
    purchaseElements.clear();
    if (currentObject != object) {
      pageIndex=0;
      btnHelp.forcedHover=false;
    }
  }
  if ((currentObject=object) == null)   return;
  byte page=0;
  int yy=0, height=0;
  boolean isUnlocked=false;
  Map<KnowledgeFragment,Boolean> pageMap=new LinkedHashMap<>();
  Iterator<KnowledgeFragment> iter=currentObject.getFragments().iterator();
  while (true) {
    KnowledgeFragment fragment=iter.hasNext() ? iter.next() : null;
    if (fragment == null || yy + (height=8 + fragment.getHeight(this,isUnlocked=(object == KnowledgeRegistrations.HELP || compendiumFile.hasUnlockedFragment(fragment)))) > guiPageHeight) {
      currentObjectPages.put(page++,pageMap);
      if (fragment == null)       break;
 else {
        pageMap=new LinkedHashMap<>();
        pageMap.put(fragment,isUnlocked);
        yy=height;
        continue;
      }
    }
    pageMap.put(fragment,isUnlocked);
    yy+=height;
  }
  if (object == KnowledgeRegistrations.HELP) {
    btnHelp.forcedHover=true;
    if (!compendiumFile.seenHelp()) {
      PacketPipeline.sendToServer(new S03SimpleEvent(EventType.OPEN_COMPENDIUM_HELP));
      compendiumFile.setSeenHelp();
    }
    purchaseElements.clear();
    return;
  }
  updatePurchaseElements();
}
Program: 34619
Project: 34619
Buggy source:
@Override protected void drawGuiContainerForegroundLayer(int mouseX,int mouseY){
  fontRendererObj.drawString(invLootChest.hasCustomInventoryName() ? invLootChest.getInventoryName() : I18n.format(invPlayer.player.capabilities.isCreativeMode ? "String_Node_Str" : "String_Node_Str"),8,6,4210752);
  fontRendererObj.drawString(invPlayer.hasCustomInventoryName() ? invPlayer.getInventoryName() : I18n.format(invPlayer.getInventoryName()),8,ySize - 94,4210752);
}

Fixed version (ground truth):
@Override protected void drawGuiContainerForegroundLayer(int mouseX,int mouseY){
  fontRendererObj.drawString(invPlayer.player.capabilities.isCreativeMode ? I18n.format("String_Node_Str") : I18n.format(invLootChest.getInventoryName()),8,6,4210752);
  fontRendererObj.drawString(invPlayer.hasCustomInventoryName() ? invPlayer.getInventoryName() : I18n.format(invPlayer.getInventoryName()),8,ySize - 94,4210752);
}
Program: 34623
Project: 34623
Buggy source:
@Override public void onBlockPlacedBy(World world,int x,int y,int z,EntityLivingBase entity,ItemStack is){
  super.onBlockPlacedBy(world,x,y,z,entity,is);
  IEnhanceableTile tile=(IEnhanceableTile)world.getTileEntity(x,y,z);
  if (tile != null)   tile.getEnhancements().addAll(EnhancementHandler.getEnhancements(is));
}

Fixed version (ground truth):
@Override public void onBlockPlacedBy(World world,int x,int y,int z,EntityLivingBase entity,ItemStack is){
  super.onBlockPlacedBy(world,x,y,z,entity,is);
  IEnhanceableTile tile=(IEnhanceableTile)world.getTileEntity(x,y,z);
  if (tile != null)   tile.getEnhancements().replace(EnhancementRegistry.getEnhancementList(is));
}
Program: 34624
Project: 34624
Buggy source:
@Override public void breakBlock(World world,int x,int y,int z,Block oldBlock,int oldMeta){
  TileEntity tile=world.getTileEntity(x,y,z);
  if (tile instanceof IEnhanceableTile)   dropBlockAsItem(world,x,y,z,((IEnhanceableTile)tile).createEnhancedItemStack());
  super.breakBlock(world,x,y,z,oldBlock,oldMeta);
}

Fixed version (ground truth):
@Override public void breakBlock(World world,int x,int y,int z,Block oldBlock,int oldMeta){
  Pos.at(x,y,z).castTileEntity(world,TileEntityEnhancedBrewingStand.class).ifPresent(tile -> dropBlockAsItem(world,x,y,z,IEnhanceableTile.createItemStack(tile)));
  super.breakBlock(world,x,y,z,oldBlock,oldMeta);
}
Program: 34625
Project: 34625
Buggy source:
private boolean tryIgniteTNT(World world,int x,int y,int z,boolean ignite,EntityLivingBase igniter){
  if (!world.isRemote) {
    TileEntityEnhancedTNT tile=(TileEntityEnhancedTNT)world.getTileEntity(x,y,z);
    if (tile != null && (ignite || tile.getEnhancements().contains(TNTEnhancements.TRAP))) {
      EntityBlockEnhancedTNTPrimed tnt=new EntityBlockEnhancedTNTPrimed(world,x + 0.5F,y + 0.5F,z + 0.5F,igniter,tile.getEnhancements());
      world.spawnEntityInWorld(tnt);
      world.playSoundAtEntity(tnt,"String_Node_Str",1F,1F);
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean tryIgniteTNT(World world,int x,int y,int z,boolean ignite,EntityLivingBase igniter){
  if (!world.isRemote) {
    TileEntityEnhancedTNT tile=(TileEntityEnhancedTNT)world.getTileEntity(x,y,z);
    if (tile != null && (ignite)) {
      EntityBlockEnhancedTNTPrimed tnt=new EntityBlockEnhancedTNTPrimed(world,x + 0.5F,y + 0.5F,z + 0.5F,igniter,tile.getEnhancements());
      world.spawnEntityInWorld(tnt);
      world.playSoundAtEntity(tnt,"String_Node_Str",1F,1F);
      return true;
    }
  }
  return false;
}
Program: 34626
Project: 34626
Buggy source:
@Override public void onBlockExploded(World world,int x,int y,int z,Explosion explosion){
  if (!world.isRemote) {
    TileEntityEnhancedTNT tile=(TileEntityEnhancedTNT)world.getTileEntity(x,y,z);
    if (tile != null) {
      EntityBlockEnhancedTNTPrimed tnt=new EntityBlockEnhancedTNTPrimed(world,x + 0.5F,y + 0.5F,z + 0.5F,explosion.getExplosivePlacedBy(),tile.getEnhancements());
      tnt.fuse=tile.getEnhancements().contains(TNTEnhancements.NO_FUSE) ? 1 : world.rand.nextInt(tnt.fuse / 4) + tnt.fuse / 8;
      world.spawnEntityInWorld(tnt);
    }
  }
  super.onBlockExploded(world,x,y,z,explosion);
}

Fixed version (ground truth):
@Override public void onBlockExploded(World world,int x,int y,int z,Explosion explosion){
  if (!world.isRemote) {
    TileEntityEnhancedTNT tile=(TileEntityEnhancedTNT)world.getTileEntity(x,y,z);
    if (tile != null) {
      EntityBlockEnhancedTNTPrimed tnt=new EntityBlockEnhancedTNTPrimed(world,x + 0.5F,y + 0.5F,z + 0.5F,explosion.getExplosivePlacedBy(),tile.getEnhancements());
      tnt.fuse=world.rand.nextInt(tnt.fuse / 4) + tnt.fuse / 8;
      world.spawnEntityInWorld(tnt);
    }
  }
  super.onBlockExploded(world,x,y,z,explosion);
}
Program: 34627
Project: 34627
Buggy source:
@Override public boolean removedByPlayer(World world,EntityPlayer player,int x,int y,int z,boolean willHarvest){
  boolean exploded=false;
  if (!player.capabilities.isCreativeMode)   exploded=tryIgniteTNT(world,x,y,z,false,null);
  if (!exploded) {
    TileEntity tile=world.getTileEntity(x,y,z);
    if (tile instanceof IEnhanceableTile)     dropBlockAsItem(world,x,y,z,((IEnhanceableTile)tile).createEnhancedItemStack());
  }
  return super.removedByPlayer(world,player,x,y,z,willHarvest);
}

Fixed version (ground truth):
@Override public boolean removedByPlayer(World world,EntityPlayer player,int x,int y,int z,boolean willHarvest){
  boolean exploded=false;
  if (!player.capabilities.isCreativeMode)   exploded=tryIgniteTNT(world,x,y,z,false,null);
  if (!exploded)   Pos.at(x,y,z).castTileEntity(world,TileEntityEnhancedTNT.class).ifPresent(tile -> dropBlockAsItem(world,x,y,z,IEnhanceableTile.createItemStack(tile)));
  return super.removedByPlayer(world,player,x,y,z,willHarvest);
}
Program: 34628
Project: 34628
Buggy source:
@Override public void breakBlock(World world,int x,int y,int z,Block oldBlock,int oldMeta){
  if (!world.isRemote) {
    TileEntityEssenceAltar altar=(TileEntityEssenceAltar)world.getTileEntity(x,y,z);
    if (altar != null) {
      altar.onBlockDestroy();
      dropBlockAsItem(world,x,y,z,((IEnhanceableTile)altar).createEnhancedItemStack());
    }
  }
  super.breakBlock(world,x,y,z,oldBlock,oldMeta);
}

Fixed version (ground truth):
@Override public void breakBlock(World world,int x,int y,int z,Block oldBlock,int oldMeta){
  if (!world.isRemote) {
    Pos.at(x,y,z).castTileEntity(world,TileEntityEssenceAltar.class).ifPresent(tile -> {
      tile.onBlockDestroy();
      dropBlockAsItem(world,x,y,z,IEnhanceableTile.createItemStack(tile));
    }
);
  }
  super.breakBlock(world,x,y,z,oldBlock,oldMeta);
}
Program: 34629
Project: 34629
Buggy source:
@Override public void writeEntityToNBT(NBTTagCompound nbt){
  super.writeEntityToNBT(nbt);
  nbt.setString("String_Node_Str",EnhancementEnumHelper.serialize(tntEnhancements));
  nbt.setBoolean("String_Node_Str",wentIntoWall);
}

Fixed version (ground truth):
@Override public void writeEntityToNBT(NBTTagCompound nbt){
  super.writeEntityToNBT(nbt);
  nbt.setString("String_Node_Str",enhancements.serialize());
  nbt.setBoolean("String_Node_Str",wentIntoWall);
}
Program: 34630
Project: 34630
Buggy source:
@Override public void readEntityFromNBT(NBTTagCompound nbt){
  super.readEntityFromNBT(nbt);
  tntEnhancements=EnhancementEnumHelper.deserialize(nbt.getString("String_Node_Str"),TNTEnhancements.class);
  wentIntoWall=nbt.getBoolean("String_Node_Str");
}

Fixed version (ground truth):
@Override public void readEntityFromNBT(NBTTagCompound nbt){
  super.readEntityFromNBT(nbt);
  enhancements.deserialize(nbt.getString("String_Node_Str"));
  wentIntoWall=nbt.getBoolean("String_Node_Str");
}
Program: 34631
Project: 34631
Buggy source:
public EntityBlockEnhancedTNTPrimed(World world,double x,double y,double z,EntityLivingBase igniter,List<Enum> enhancements){
  super(world,x,y,z,igniter);
  this.tntEnhancements.addAll(enhancements);
  if (tntEnhancements.contains(TNTEnhancements.NOCLIP)) {
    noClip=true;
    fuse=40;
  }
  if (tntEnhancements.contains(TNTEnhancements.NO_FUSE))   fuse=1;
}

Fixed version (ground truth):
public EntityBlockEnhancedTNTPrimed(World world,double x,double y,double z,EntityLivingBase igniter,EnhancementList<TNTEnhancements> enhancements){
  super(world,x,y,z,igniter);
  this.enhancements=enhancements;
}
Program: 34632
Project: 34632
Buggy source:
@Override public void readFromNBT(NBTTagCompound nbt){
  super.readFromNBT(nbt);
  pearlTypes=EnhancementEnumHelper.deserialize(nbt.getString("String_Node_Str"),EnderPearlEnhancements.class);
  life=nbt.getShort("String_Node_Str");
}

Fixed version (ground truth):
@Override public void readFromNBT(NBTTagCompound nbt){
  super.readFromNBT(nbt);
  enhancements.deserialize(nbt.getString("String_Node_Str"));
  life=nbt.getShort("String_Node_Str");
}
Program: 34633
Project: 34633
Buggy source:
@Override protected void onImpact(MovingObjectPosition mop){
  if (mop.entityHit != null) {
    if (ride != null && mop.entityHit.equals(ride))     return;
    mop.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this,getThrower()),0F);
  }
  for (int i=0; i < 32; ++i) {
    worldObj.spawnParticle("String_Node_Str",posX,posY + rand.nextDouble() * 2D,posZ,rand.nextGaussian(),0D,rand.nextGaussian());
  }
  if (!worldObj.isRemote) {
    if (getThrower() != null && getThrower() instanceof EntityPlayerMP) {
      EntityPlayerMP player=(EntityPlayerMP)getThrower();
      if (player.playerNetServerHandler.func_147362_b().isChannelOpen() && player.worldObj == worldObj) {
        EnderTeleportEvent event=new EnderTeleportEvent(player,posX,posY,posZ,5F);
        if (!MinecraftForge.EVENT_BUS.post(event)) {
          if (pearlTypes.contains(EnderPearlEnhancements.EXPLOSIVE))           worldObj.newExplosion(this,posX,posY,posZ,2.7F,false,true);
          if (pearlTypes.contains(EnderPearlEnhancements.FREEZE)) {
            for (            EntityLivingBase entity : (List<EntityLivingBase>)worldObj.getEntitiesWithinAABB(EntityLivingBase.class,boundingBox.expand(5D,3D,5D))) {
              double dist=entity.getDistanceSqToEntity(this);
              if (dist <= 5D)               entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id,80 + (int)(10D * (6D - dist)),3,true));
            }
          }
          if (player.isRiding())           player.mountEntity((Entity)null);
          player.setPositionAndUpdate(event.targetX,event.targetY,event.targetZ);
          player.fallDistance=0F;
          if (!pearlTypes.contains(EnderPearlEnhancements.NO_FALL_DAMAGE))           player.attackEntityFrom(DamageSource.fall,event.attackDamage);
          if (pearlTypes.contains(EnderPearlEnhancements.FREEZE))           PacketPipeline.sendToAllAround(this,64D,new C20Effect(FXType.Basic.ENDER_PEARL_FREEZE,this));
        }
      }
    }
    setDead();
  }
}

Fixed version (ground truth):
@Override protected void onImpact(MovingObjectPosition mop){
  if (mop.entityHit != null) {
    if (ride != null && mop.entityHit.equals(ride))     return;
    mop.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this,getThrower()),0F);
  }
  for (int i=0; i < 32; ++i) {
    worldObj.spawnParticle("String_Node_Str",posX,posY + rand.nextDouble() * 2D,posZ,rand.nextGaussian(),0D,rand.nextGaussian());
  }
  if (!worldObj.isRemote) {
    if (getThrower() != null && getThrower() instanceof EntityPlayerMP) {
      EntityPlayerMP player=(EntityPlayerMP)getThrower();
      if (player.playerNetServerHandler.func_147362_b().isChannelOpen() && player.worldObj == worldObj) {
        EnderTeleportEvent event=new EnderTeleportEvent(player,posX,posY,posZ,5F);
        if (!MinecraftForge.EVENT_BUS.post(event)) {
          if (player.isRiding())           player.mountEntity((Entity)null);
          player.setPositionAndUpdate(event.targetX,event.targetY,event.targetZ);
          player.fallDistance=0F;
        }
      }
    }
    setDead();
  }
}
Program: 34634
Project: 34634
Buggy source:
public EntityProjectileEnhancedEnderPearl(World world,EntityLivingBase thrower){
  super(world,thrower);
  if (thrower instanceof EntityPlayer) {
    EntityPlayer player=(EntityPlayer)thrower;
    ItemStack is=player.inventory.getCurrentItem();
    if (is != null)     pearlTypes.addAll(EnhancementHandler.getEnhancements(is));
    if (pearlTypes.contains(EnderPearlEnhancements.RIDING)) {
      ride=(EntityPlayer)thrower;
      for (      Object o : world.loadedEntityList) {
        if (o instanceof EntityProjectileEnhancedEnderPearl) {
          EntityProjectileEnhancedEnderPearl pearl=(EntityProjectileEnhancedEnderPearl)o;
          if (pearl.ride != null && pearl.ride.getCommandSenderName().equals(player.getCommandSenderName())) {
            pearl.ride=null;
            if (!pearl.pearlTypes.contains(EnderPearlEnhancements.NO_FALL_DAMAGE))             player.attackEntityFrom(DamageSource.fall,5F);
            pearl.setDead();
            break;
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
public EntityProjectileEnhancedEnderPearl(World world,EntityLivingBase thrower,EnhancementList<EnderPearlEnhancements> enhancements){
  super(world,thrower);
  this.enhancements=enhancements;
  if (thrower instanceof EntityPlayer) {
    EntityPlayer player=(EntityPlayer)thrower;
  }
}
Program: 34635
Project: 34635
Buggy source:
@Override protected float getGravityVelocity(){
  return pearlTypes.contains(EnderPearlEnhancements.NO_GRAVITY) ? 0F : (super.getGravityVelocity() * (pearlTypes.contains(EnderPearlEnhancements.INCREASED_RANGE) ? 0.75F : 1F));
}

Fixed version (ground truth):
@Override protected float getGravityVelocity(){
  return 1F;
}
Program: 34636
Project: 34636
Buggy source:
@Override public void onUpdate(){
  super.onUpdate();
  if (!worldObj.isRemote) {
    if (ride != null) {
      dataWatcher.updateObject(16,ride.getCommandSenderName());
      updateRidePosition();
      ride.fallDistance=0F;
      ride.setPosition(posX,posY + ride.height,posZ);
    }
    if (pearlTypes.contains(EnderPearlEnhancements.DOUBLE_SPEED)) {
      if (inGround) {
        motionX*=0.2D;
        motionY*=0.2D;
        motionZ*=0.2D;
      }
 else {
        super.onUpdate();
        if (ride != null)         updateRidePosition();
      }
    }
    if (++life > 200)     setDead();
  }
 else {
    EntityClientPlayerMP clientPlayer=FMLClientHandler.instance().getClient().thePlayer;
    if (dataWatcher.getWatchableObjectString(16).equals(clientPlayer.getCommandSenderName()))     clientPlayer.setPosition(posX,posY + clientPlayer.height,posZ);
  }
}

Fixed version (ground truth):
@Override public void onUpdate(){
  super.onUpdate();
  if (!worldObj.isRemote) {
    if (ride != null) {
      dataWatcher.updateObject(16,ride.getCommandSenderName());
      updateRidePosition();
      ride.fallDistance=0F;
      ride.setPosition(posX,posY + ride.height,posZ);
    }
    if (++life > 200)     setDead();
  }
 else {
    EntityClientPlayerMP clientPlayer=FMLClientHandler.instance().getClient().thePlayer;
    if (dataWatcher.getWatchableObjectString(16).equals(clientPlayer.getCommandSenderName()))     clientPlayer.setPosition(posX,posY + clientPlayer.height,posZ);
  }
}
Program: 34637
Project: 34637
Buggy source:
@Override public void writeToNBT(NBTTagCompound nbt){
  super.writeToNBT(nbt);
  nbt.setString("String_Node_Str",EnhancementEnumHelper.serialize(pearlTypes));
  nbt.setShort("String_Node_Str",life);
}

Fixed version (ground truth):
@Override public void writeToNBT(NBTTagCompound nbt){
  super.writeToNBT(nbt);
  nbt.setString("String_Node_Str",enhancements.serialize());
  nbt.setShort("String_Node_Str",life);
}
Program: 34638
Project: 34638
Buggy source:
@Override public void writeEntityToNBT(NBTTagCompound nbt){
  super.writeEntityToNBT(nbt);
  nbt.setByte("String_Node_Str",ticks);
  nbt.setString("String_Node_Str",EnhancementEnumHelper.serialize(enhancements));
  nbt.removeTag("String_Node_Str");
  nbt.removeTag("String_Node_Str");
}

Fixed version (ground truth):
@Override public void writeEntityToNBT(NBTTagCompound nbt){
  super.writeEntityToNBT(nbt);
  nbt.setByte("String_Node_Str",ticks);
  nbt.setString("String_Node_Str",enhancements.serialize());
  nbt.removeTag("String_Node_Str");
  nbt.removeTag("String_Node_Str");
}
Program: 34639
Project: 34639
Buggy source:
@SideOnly(Side.CLIENT) public EntityProjectileSpatialDash(World world,double x,double y,double z){
  super(world,x,y,z);
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) public EntityProjectileSpatialDash(World world,double x,double y,double z){
  super(world,x,y,z);
  this.enhancements=new EnhancementList<>(SpatialDashGemEnhancements.class);
}
Program: 34640
Project: 34640
Buggy source:
@Override public void readEntityFromNBT(NBTTagCompound nbt){
  super.readEntityFromNBT(nbt);
  ticks=nbt.getByte("String_Node_Str");
  enhancements=EnhancementEnumHelper.deserialize("String_Node_Str",SpatialDashGemEnhancements.class);
}

Fixed version (ground truth):
@Override public void readEntityFromNBT(NBTTagCompound nbt){
  super.readEntityFromNBT(nbt);
  ticks=nbt.getByte("String_Node_Str");
  enhancements.deserialize(nbt.getString("String_Node_Str"));
}
Program: 34642
Project: 34642
Buggy source:
public ContainerEndPowderEnhancements(InventoryPlayer inv,IEnhanceableTile tileOptional){
  containerInv=new InventoryBasic("String_Node_Str",false,1);
  this.enhanceableTile=tileOptional;
  if (isEnhancingTile()) {
    addSlotToContainer(new SlotShowCase(containerInv,0,80,8));
    containerInv.setInventorySlotContents(0,tileOptional.createEnhancedItemStack());
  }
 else {
    addSlotToContainer(new SlotEnhancementsSubject(this,containerInv,0,80,8));
  }
  for (int i=0; i < 3; ++i) {
    for (int j=0; j < 9; ++j)     addSlotToContainer(new Slot(inv,j + i * 9 + 9,8 + j * 18,112 + i * 18));
  }
  for (int i=0; i < 9; ++i)   addSlotToContainer(new Slot(inv,i,8 + i * 18,170));
}

Fixed version (ground truth):
public ContainerEndPowderEnhancements(InventoryPlayer inv,IEnhanceableTile tileOptional){
  containerInv=new InventoryBasic("String_Node_Str",false,1);
  this.enhanceableTile=tileOptional;
  if (isEnhancingTile()) {
    addSlotToContainer(new SlotShowCase(containerInv,0,80,8));
    containerInv.setInventorySlotContents(0,IEnhanceableTile.createItemStack(tileOptional));
  }
 else {
    addSlotToContainer(new SlotEnhancementsSubject(this,containerInv,0,80,8));
  }
  for (int i=0; i < 3; ++i) {
    for (int j=0; j < 9; ++j)     addSlotToContainer(new Slot(inv,j + i * 9 + 9,8 + j * 18,112 + i * 18));
  }
  for (int i=0; i < 9; ++i)   addSlotToContainer(new Slot(inv,i,8 + i * 18,170));
}
Program: 34643
Project: 34643
Buggy source:
@Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack is,EntityPlayer player,List textLines,boolean showAdvancedInfo){
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack is,EntityPlayer player,List textLines,boolean showAdvancedInfo){
  EnhancementRegistry.getEnhancementList(is).addTooltip(textLines,EnumChatFormatting.YELLOW);
}
Program: 34644
Project: 34644
Buggy source:
@Override public T removeRandomItem(Random rand){
  T item=getRandomItem(rand);
  if (item != null)   items.remove(item);
  return item;
}

Fixed version (ground truth):
@Override public T removeRandomItem(Random rand){
  T item=getRandomItem(rand);
  if (item != null) {
    items.remove(item);
    dirty=true;
  }
  return item;
}
Program: 34649
Project: 34649
Buggy source:
@Override public void generate(Random rand,int chunkX,int chunkZ,World world,IChunkProvider chunkGenerator,IChunkProvider chunkProvider){
  if (world.provider.dimensionId != 0)   return;
  Optional<ChunkCoordIntPair> chunk=findSpawnChunk(chunkX,chunkZ,world);
  if (!chunk.isPresent())   return;
  if (chunk.get().chunkXPos == chunkX && chunk.get().chunkZPos == chunkZ) {
  }
}

Fixed version (ground truth):
@Override public void generate(Random rand,int chunkX,int chunkZ,World world,IChunkProvider chunkGenerator,IChunkProvider chunkProvider){
  if (world.provider.dimensionId != 0)   return;
  Optional<ChunkCoordIntPair> chunk=findSpawnChunk(chunkX,chunkZ,world);
  if (!chunk.isPresent())   return;
  if (chunk.get().chunkXPos == chunkX && chunk.get().chunkZPos == chunkZ) {
    HardcoreEnderExpansion.notifications.report("String_Node_Str");
    stronghold.tryGenerateInWorld(world,rand,chunkX * 16 + 8,4 + rand.nextInt(11),chunkZ * 16 + 8,10);
  }
}
Program: 34650
Project: 34650
Buggy source:
public RandomList(List<T> collection,Random rand){
  this.collection=collection;
  this.rand=rand;
}

Fixed version (ground truth):
public RandomList(List<T> collection,Random rand){
  this.collection=new ArrayList<>(collection);
  this.rand=rand;
}
Program: 34651
Project: 34651
Buggy source:
public void add(T item,int weight){
  items.put(item,weight);
}

Fixed version (ground truth):
public void add(T item,int weight){
  items.put(item,weight);
  dirty=true;
}
Program: 34652
Project: 34652
Buggy source:
@Override protected boolean onWorkFinished(){
  ItemStack[] itemsCopy=new ItemStack[9];
  for (int slot=2; slot < items.length; slot++)   itemsCopy[slot - 2]=items[slot] == null ? null : items[slot].copy();
  for (  ItemStack ingredient : chosenIngredients) {
    boolean canAdd=false;
    for (int slot=0; slot < itemsCopy.length; slot++) {
      if (itemsCopy[slot] == null)       itemsCopy[slot]=ingredient.copy();
 else       if (DragonUtil.canAddOneItemTo(itemsCopy[slot],ingredient))       ++itemsCopy[slot].stackSize;
 else       continue;
      canAdd=true;
      break;
    }
    if (!canAdd)     return false;
  }
  for (  ItemStack ingredient : chosenIngredients) {
    for (int slot=2; slot < items.length; slot++) {
      if (items[slot] == null)       items[slot]=ingredient.copy();
 else       if (DragonUtil.canAddOneItemTo(items[slot],ingredient))       ++items[slot].stackSize;
 else       continue;
      break;
    }
  }
  items[0]=null;
  if ((items[1].stackSize-=requiredStardust) <= 0)   items[1]=null;
  chosenIngredients.clear();
  return true;
}

Fixed version (ground truth):
@Override protected boolean onWorkFinished(){
  ItemStack[] itemsCopy=new ItemStack[9];
  for (int slot=2; slot < items.length; slot++)   itemsCopy[slot - 2]=items[slot] == null ? null : items[slot].copy();
  for (  ItemStack ingredient : chosenIngredients) {
    boolean canAdd=false;
    for (int slot=0; slot < itemsCopy.length; slot++) {
      if (itemsCopy[slot] == null)       itemsCopy[slot]=ingredient.copy();
 else       if (ItemUtil.canAddOneItemTo(itemsCopy[slot],ingredient))       ++itemsCopy[slot].stackSize;
 else       continue;
      canAdd=true;
      break;
    }
    if (!canAdd)     return false;
  }
  for (  ItemStack ingredient : chosenIngredients) {
    for (int slot=2; slot < items.length; slot++) {
      if (items[slot] == null)       items[slot]=ingredient.copy();
 else       if (ItemUtil.canAddOneItemTo(items[slot],ingredient))       ++items[slot].stackSize;
 else       continue;
      break;
    }
  }
  items[0]=null;
  if ((items[1].stackSize-=requiredStardust) <= 0)   items[1]=null;
  chosenIngredients.clear();
  return true;
}
Program: 34653
Project: 34653
Buggy source:
public static List<Enum> getEnhancements(ItemStack is){
  List<Enum> enhancements=new ArrayList<>();
  if (!is.hasTagCompound() || !canEnhanceItem(is.getItem()))   return enhancements;
  EnhancementData enhancementData=itemMap.get(is.getItem());
  NBTUtil.readStringList(is.getTagCompound(),"String_Node_Str").map(name -> EnumUtils.getEnum(enhancementData.clsEnum,name)).filter(ele -> ele != null).forEach(enhancements::add);
  return enhancements;
}

Fixed version (ground truth):
public static List<Enum> getEnhancements(ItemStack is){
  List<Enum> enhancements=new ArrayList<>();
  if (!is.hasTagCompound() || !canEnhanceItem(is.getItem()))   return enhancements;
  NBTUtil.readStringList(is.getTagCompound(),"String_Node_Str").forEach(name -> {
    Enum ele=EnumUtils.getEnum(itemMap.get(is.getItem()).clsEnum,name);
    if (ele != null)     enhancements.add(ele);
  }
);
  return enhancements;
}
Program: 34654
Project: 34654
Buggy source:
@Override protected void onImpact(MovingObjectPosition mop){
  if (mop.entityHit instanceof EntityMiniBossFireFiend || mop.entityHit instanceof EntityProjectileFiendFireball)   return;
  if (mop.entityHit != null)   mop.entityHit.attackEntityFrom(DamageSource.causeFireballDamage(this,shootingEntity),ModCommonProxy.opMobs ? 9F : 4F);
  if (!worldObj.isRemote) {
    Explosion explosion=new FieryExplosion(worldObj,shootingEntity,worldObj.isRemote ? actualPosX : posX,posY,worldObj.isRemote ? actualPosZ : posZ,ModCommonProxy.opMobs ? 3.5F : 2.7F);
    explosion.doExplosionA();
    explosion.doExplosionB(true);
    PacketPipeline.sendToAllAround(this,128D,new C12FiendFireballExplosion(this));
  }
  setDead();
}

Fixed version (ground truth):
@Override protected void onImpact(MovingObjectPosition mop){
  if (mop.entityHit instanceof EntityMiniBossFireFiend || mop.entityHit instanceof EntityProjectileFiendFireball)   return;
  if (mop.entityHit != null)   mop.entityHit.attackEntityFrom(DamageSource.causeFireballDamage(this,shootingEntity),ModCommonProxy.opMobs ? 9F : 4F);
  if (!worldObj.isRemote) {
    Explosion explosion=new FieryExplosion(worldObj,shootingEntity,posX,posY,posZ,ModCommonProxy.opMobs ? 3.5F : 2.7F);
    explosion.doExplosionA();
    explosion.doExplosionB(true);
    PacketPipeline.sendToAllAround(this,128D,new C12FiendFireballExplosion(this));
  }
  setDead();
}
Program: 34655
Project: 34655
Buggy source:
public ModelEnderEye(){
  textureWidth=128;
  textureHeight=64;
  head=new ModelRenderer(this,0,0);
  head.addBox(-9F,-8F,-9F,18,18,18);
  head.setRotationPoint(0F,0F,0F);
  head.setTextureSize(128,64);
  head.mirror=true;
  setRotation(head,0F,0F,0F);
  rightArm=new ModelRenderer(this,116,0);
  rightArm.addBox(-12F,-27F,-3F,3,30,3);
  rightArm.setRotationPoint(0F,0F,0F);
  rightArm.setTextureSize(128,64);
  rightArm.mirror=true;
  setRotation(rightArm,1.570796F,0F,0F);
  leftArm=new ModelRenderer(this,116,0);
  leftArm.addBox(9F,-27F,-3F,3,30,3);
  leftArm.setRotationPoint(0F,0F,0F);
  leftArm.setTextureSize(128,64);
  leftArm.mirror=true;
  setRotation(leftArm,1.570796F,0F,0F);
  leftArm.mirror=false;
}

Fixed version (ground truth):
public ModelEnderEye(){
  textureWidth=128;
  textureHeight=64;
  head=new ModelRenderer(this,0,0);
  head.addBox(-9F,-8F,-9F,18,18,18);
  head.setRotationPoint(0F,0F,0F);
  head.setTextureSize(128,64);
  head.mirror=true;
  setRotation(head,0F,0F,0F);
  rightArm=new ModelRenderer(this,116,0);
  rightArm.addBox(-12F,-27F,-3F,3,30,3);
  rightArm.setRotationPoint(0F,0F,0F);
  rightArm.setTextureSize(128,64);
  rightArm.mirror=true;
  setRotation(rightArm,MathUtil.PI * 0.5F,0F,0F);
  leftArm=new ModelRenderer(this,116,0);
  leftArm.addBox(9F,-27F,-3F,3,30,3);
  leftArm.setRotationPoint(0F,0F,0F);
  leftArm.setTextureSize(128,64);
  leftArm.mirror=true;
  setRotation(leftArm,MathUtil.PI * 0.5F,0F,0F);
  leftArm.mirror=false;
}
Program: 34656
Project: 34656
Buggy source:
@Override public void setRotationAngles(float limbSwing,float limbSwingAngle,float entityTickTime,float rotationYaw,float rotationPitch,float unitPixel,Entity entity){
  super.setRotationAngles(limbSwing,limbSwingAngle,entityTickTime,rotationYaw,rotationPitch,unitPixel,entity);
  float yawRad=MathUtil.toRad(rotationYaw), pitchRad=-MathUtil.toRad(rotationPitch);
  EntityMiniBossEnderEye eye=(EntityMiniBossEnderEye)entity;
  byte anim=eye.getAttackAnimationTime();
  if (anim == 0 && animationAngle > 0F)   animationAngle=Math.max(0F,animationAngle - 0.10472F);
 else   if (anim > 0)   animationAngle=Math.min(1.570796F,animationAngle + 0.071399F);
  if (eye.isAsleep())   wakeupAngle=Math.min(-pitchRad + 1.570796F,wakeupAngle + 0.098175F);
 else   if (wakeupAngle != 0F)   wakeupAngle=Math.max(0F,wakeupAngle - 0.098175F);
  head.rotateAngleY=yawRad;
  head.rotateAngleX=pitchRad;
  leftArm.rotateAngleY=yawRad;
  leftArm.rotateAngleX=pitchRad + 1.570796F - animationAngle + wakeupAngle;
  rightArm.rotateAngleY=yawRad;
  rightArm.rotateAngleX=pitchRad + 1.570796F - animationAngle + wakeupAngle;
}

Fixed version (ground truth):
@Override public void setRotationAngles(float limbSwing,float limbSwingAngle,float entityTickTime,float rotationYaw,float rotationPitch,float unitPixel,Entity entity){
  super.setRotationAngles(limbSwing,limbSwingAngle,entityTickTime,rotationYaw,rotationPitch,unitPixel,entity);
  float yawRad=MathUtil.toRad(rotationYaw), pitchRad=-MathUtil.toRad(rotationPitch);
  EntityMiniBossEnderEye eye=(EntityMiniBossEnderEye)entity;
  byte anim=eye.getAttackAnimationTime();
  if (anim == 0 && animationAngle > 0F)   animationAngle=Math.max(0F,animationAngle - 0.10472F);
 else   if (anim > 0)   animationAngle=Math.min(MathUtil.PI * 0.5F,animationAngle + 0.071399F);
  if (eye.isAsleep())   wakeupAngle=Math.min(-pitchRad + 1.570796F,wakeupAngle + 0.098175F);
 else   if (wakeupAngle != 0F)   wakeupAngle=Math.max(0F,wakeupAngle - 0.098175F);
  head.rotateAngleY=yawRad;
  head.rotateAngleX=pitchRad;
  leftArm.rotateAngleY=yawRad;
  leftArm.rotateAngleX=pitchRad + 1.570796F - animationAngle + wakeupAngle;
  rightArm.rotateAngleY=yawRad;
  rightArm.rotateAngleX=pitchRad + 1.570796F - animationAngle + wakeupAngle;
}
Program: 34658
Project: 34658
Buggy source:
protected static final void placeCube(StructureWorld world,Random rand,IBlockPicker picker,int x1,int y1,int z1,int x2,int y2,int z2){
  int xMin=Math.min(x1,x2), xMax=Math.max(x1,x2);
  int yMin=Math.min(y1,y2), yMax=Math.max(y1,y2);
  int zMin=Math.min(z1,z2), zMax=Math.max(z1,z2);
  PosMutable mutablePos=new PosMutable();
  for (int x=xMin; x <= xMax; x++) {
    for (int y=yMin; y <= yMax; y++) {
      for (int z=zMin; z <= zMax; z++) {
        world.setBlock(x,y,z,picker.pick(rand));
      }
    }
  }
}

Fixed version (ground truth):
protected static final void placeCube(StructureWorld world,Random rand,IBlockPicker picker,int x1,int y1,int z1,int x2,int y2,int z2){
  int xMin=Math.min(x1,x2), xMax=Math.max(x1,x2);
  int yMin=Math.min(y1,y2), yMax=Math.max(y1,y2);
  int zMin=Math.min(z1,z2), zMax=Math.max(z1,z2);
  for (int x=xMin; x <= xMax; x++) {
    for (int y=yMin; y <= yMax; y++) {
      for (int z=zMin; z <= zMax; z++) {
        world.setBlock(x,y,z,picker.pick(rand));
      }
    }
  }
}
Program: 34659
Project: 34659
Buggy source:
public long toLong(){
  return (x & (1L << 26) - 1L) << 38 | (y & (1L << 12) - 1L) << 26 | (z & (1L << 26) - 1L);
}

Fixed version (ground truth):
public long toLong(){
  return (getX() & (1L << 26) - 1L) << 38 | (getY() & (1L << 12) - 1L) << 26 | (getZ() & (1L << 26) - 1L);
}
Program: 34660
Project: 34660
Buggy source:
protected void tryDeliverNotifications(){
  boolean delivered=false;
  ServerConfigurationManager manager=MinecraftServer.getServer().getConfigurationManager();
  List<EntityPlayer> players=manager.playerEntityList;
  for (  EntityPlayer player : players) {
    if (manager.func_152596_g(player.getGameProfile())) {
      deliverNotificationsToPlayer(player);
      delivered=true;
    }
  }
  if (delivered)   clearNotifications();
}

Fixed version (ground truth):
protected void tryDeliverNotifications(){
  ServerConfigurationManager manager=MinecraftServer.getServer().getConfigurationManager();
  if (manager == null)   return;
  boolean delivered=false;
  List<EntityPlayer> players=manager.playerEntityList;
  for (  EntityPlayer player : players) {
    if (manager.func_152596_g(player.getGameProfile())) {
      deliverNotificationsToPlayer(player);
      delivered=true;
    }
  }
  if (delivered)   clearNotifications();
}
Program: 34661
Project: 34661
Buggy source:
@Override @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister iconRegister){
  iconArray=new IIcon[totalIcons];
  for (int a=0; a < 10; a++)   iconArray[a]=iconRegister.registerIcon("String_Node_Str" + a);
  char c='a';
  for (int a=10; a < 18; a++)   iconArray[a]=iconRegister.registerIcon("String_Node_Str" + (c++));
  iconArray[18]=iconRegister.registerIcon("String_Node_Str");
  iconArray[19]=iconRegister.registerIcon("String_Node_Str");
  iconArray[23]=iconRegister.registerIcon("String_Node_Str");
  iconArray[24]=iconRegister.registerIcon("String_Node_Str");
  itemIcon=iconArray[0];
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister iconRegister){
  iconArray=new IIcon[totalIcons];
  for (int a=0; a < 10; a++)   iconArray[a]=iconRegister.registerIcon("String_Node_Str" + a);
  char c='a';
  for (int a=10; a < 18; a++)   iconArray[a]=iconRegister.registerIcon("String_Node_Str" + (c++));
  iconArray[18]=iconRegister.registerIcon("String_Node_Str");
  iconArray[19]=iconRegister.registerIcon("String_Node_Str");
  iconArray[20]=iconRegister.registerIcon("String_Node_Str");
  iconArray[21]=iconRegister.registerIcon("String_Node_Str");
  itemIcon=iconArray[0];
}
Program: 34663
Project: 34663
Buggy source:
private void onDebugInfo(NBTTagCompound nbt,EntityPlayer player,Pos pos){
  player.addChatMessage(new ChatComponentText(EnumChatFormatting.GOLD + "String_Node_Str" + EnumChatFormatting.RESET+ GameData.getBlockRegistry().getNameForObject(pos.getBlock(player.worldObj))));
  player.addChatMessage(new ChatComponentText(EnumChatFormatting.GOLD + "String_Node_Str" + EnumChatFormatting.RESET+ pos.getMetadata(player.worldObj)));
}

Fixed version (ground truth):
private void onDebugInfo(NBTTagCompound nbt,EntityPlayer player,Pos pos){
  if (pos != null) {
    player.addChatMessage(new ChatComponentText(EnumChatFormatting.GOLD + "String_Node_Str" + EnumChatFormatting.RESET+ GameData.getBlockRegistry().getNameForObject(pos.getBlock(player.worldObj))));
    player.addChatMessage(new ChatComponentText(EnumChatFormatting.GOLD + "String_Node_Str" + EnumChatFormatting.RESET+ pos.getMetadata(player.worldObj)));
  }
}
Program: 34664
Project: 34664
Buggy source:
@Override public String getUnlocalizedName(ItemStack is){
  CharmType type=CharmType.getFromDamage(is.getItemDamage()).getLeft();
  return "String_Node_Str" + (type == null ? "String_Node_Str" : type.name().toLowerCase().replaceAll("String_Node_Str","String_Node_Str"));
}

Fixed version (ground truth):
@Override public String getUnlocalizedName(ItemStack is){
  CharmType type=CharmType.getFromDamage(is.getItemDamage()).getLeft();
  return "String_Node_Str" + (type == null ? "String_Node_Str" : type.name().toLowerCase(Locale.ENGLISH).replaceAll("String_Node_Str","String_Node_Str"));
}
Program: 34665
Project: 34665
Buggy source:
@Override public String getUnlocalizedName(ItemStack is){
  CurseType type=CurseType.getFromDamage(is.getItemDamage());
  return "String_Node_Str" + (type == null ? "String_Node_Str" : type.name().toLowerCase().replaceAll("String_Node_Str","String_Node_Str"));
}

Fixed version (ground truth):
@Override public String getUnlocalizedName(ItemStack is){
  CurseType type=CurseType.getFromDamage(is.getItemDamage());
  return "String_Node_Str" + (type == null ? "String_Node_Str" : type.name().toLowerCase(Locale.ENGLISH).replaceAll("String_Node_Str","String_Node_Str"));
}
Program: 34666
Project: 34666
Buggy source:
@Override public String getUnlocalizedName(ItemStack is){
  int damage=is.getItemDamage();
  return "String_Node_Str" + (damage >= 0 && damage < RuneType.values.length ? RuneType.values[damage].name().toLowerCase() : damage == OreDictionary.WILDCARD_VALUE ? "String_Node_Str" : "String_Node_Str");
}

Fixed version (ground truth):
@Override public String getUnlocalizedName(ItemStack is){
  int damage=is.getItemDamage();
  return "String_Node_Str" + (damage >= 0 && damage < RuneType.values.length ? RuneType.values[damage].name().toLowerCase(Locale.ENGLISH) : damage == OreDictionary.WILDCARD_VALUE ? "String_Node_Str" : "String_Node_Str");
}
Program: 34667
Project: 34667
Buggy source:
@Override public String getUnlocalizedName(ItemStack is){
  if (is.getItemDamage() < 20)   return "String_Node_Str" + getTypeFromDamage(is.getItemDamage()).toString().toLowerCase();
 else   return "String_Node_Str" + getCoreFromDamage(is.getItemDamage()).toString().toLowerCase();
}

Fixed version (ground truth):
@Override public String getUnlocalizedName(ItemStack is){
  if (is.getItemDamage() < 20)   return "String_Node_Str" + getTypeFromDamage(is.getItemDamage()).toString().toLowerCase(Locale.ENGLISH);
 else   return "String_Node_Str" + getCoreFromDamage(is.getItemDamage()).toString().toLowerCase(Locale.ENGLISH);
}
Program: 34668
Project: 34668
Buggy source:
public static String getName(Enum enhancementEnum,EnumChatFormatting color){
  return new StringBuilder().append(EnumChatFormatting.RESET).append(color).append(enhancementEnum.name().substring(0,1).toUpperCase()).append(enhancementEnum.name().substring(1).toLowerCase().replace('_',' ')).toString();
}

Fixed version (ground truth):
public static String getName(Enum enhancementEnum,EnumChatFormatting color){
  return new StringBuilder().append(EnumChatFormatting.RESET).append(color).append(enhancementEnum.name().substring(0,1).toUpperCase(Locale.ENGLISH)).append(enhancementEnum.name().substring(1).toLowerCase(Locale.ENGLISH).replace('_',' ')).toString();
}