nus-yam/ex-repair huggingface dataset:
Program: 169676
Project: 169676
Buggy source:
@EventHandler public void preInit(FMLPreInitializationEvent event){
  super.preInit(event);
  NetworkRegistry.INSTANCE.registerGuiHandler(this,proxy);
  Modstats.instance().getReporter().registerMod(INSTANCE);
  MinecraftForge.EVENT_BUS.register(INSTANCE);
  MinecraftForge.EVENT_BUS.register(proxy);
  blockExplosive=manager.newBlock(TileWarhead.class);
  if (ResonantEngine.runningAsDev)   blockExplosiveMarker=manager.newBlock(BlockExplosiveMarker.class,ItemBlockMetadata.class);
  itemMissile=manager.newItem(ItemMissile.class);
  itemRocketLauncher=manager.newItem(ItemRocketLauncher.class);
  itemMissileModules=manager.newItem(ItemMissileModules.class);
  for (  MissileSizes size : MissileSizes.values()) {
    MissileModuleBuilder.INSTANCE.register(DOMAIN,"String_Node_Str" + size.name().toLowerCase(),size.warhead_clazz);
  }
  EnumModule.register();
  CREATIVE_TAB.itemStack=new ItemStack(itemMissile);
}

Fixed version (ground truth):
@EventHandler public void preInit(FMLPreInitializationEvent event){
  super.preInit(event);
  NetworkRegistry.INSTANCE.registerGuiHandler(this,proxy);
  Modstats.instance().getReporter().registerMod(INSTANCE);
  MinecraftForge.EVENT_BUS.register(INSTANCE);
  MinecraftForge.EVENT_BUS.register(proxy);
  blockExplosive=manager.newBlock(TileWarhead.class);
  if (ResonantEngine.runningAsDev)   blockExplosiveMarker=manager.newBlock(BlockExplosiveMarker.class,ItemBlockMetadata.class);
  itemMissile=manager.newItem(ItemMissile.class);
  itemRocketLauncher=manager.newItem(ItemRocketLauncher.class);
  itemMissileModules=manager.newItem(ItemMissileModules.class);
  for (  MissileSizes size : MissileSizes.values()) {
    MissileModuleBuilder.INSTANCE.register(DOMAIN,"String_Node_Str" + size.name().toLowerCase(),size.warhead_clazz);
  }
  Engines.register();
  CREATIVE_TAB.itemStack=new ItemStack(itemMissile);
}
Program: 169677
Project: 169677
Buggy source:
public String getUnlocaizedName(){
  return "String_Node_Str" + ICBM.PREFIX + name+ "String_Node_Str";
}

Fixed version (ground truth):
public String getUnlocaizedName(){
  return "String_Node_Str" + ICBM.PREFIX + name;
}
Program: 169679
Project: 169679
Buggy source:
@Override public void load(NBTTagCompound nbt){
  ex=ExplosiveItemUtility.getExplosive(nbt);
  size=ExplosiveItemUtility.getSize(nbt);
  tag=nbt.getCompoundTag("String_Node_Str");
}

Fixed version (ground truth):
@Override public void load(NBTTagCompound nbt){
  if (nbt.hasKey(ExplosiveItemUtility.EXPLOSIVE_SAVE))   ex=ExplosiveItemUtility.getExplosive(nbt);
  if (nbt.hasKey("String_Node_Str"))   tag=nbt.getCompoundTag("String_Node_Str");
  size=ExplosiveItemUtility.getSize(nbt);
}
Program: 169680
Project: 169680
Buggy source:
@Override public void save(NBTTagCompound nbt){
  ExplosiveItemUtility.setExplosive(nbt,ex);
  ExplosiveItemUtility.setSize(nbt,size);
  nbt.setTag("String_Node_Str",tag);
}

Fixed version (ground truth):
@Override public void save(NBTTagCompound nbt){
  if (ex != null)   ExplosiveItemUtility.setExplosive(nbt,ex);
  if (tag != null)   nbt.setTag("String_Node_Str",tag);
  ExplosiveItemUtility.setSize(nbt,size);
}
Program: 169681
Project: 169681
Buggy source:
/** 
 * Triggers the warhead to set its explosive off 
 */
public WorldChangeHelper.ChangeResult trigger(TriggerCause triggerCause,World world,double x,double y,double z){
  return ExplosiveRegistry.triggerExplosive(world,x,y,z,ex,triggerCause,size,tag);
}

Fixed version (ground truth):
/** 
 * Triggers the warhead to set its explosive off
 */
public WorldChangeHelper.ChangeResult trigger(TriggerCause triggerCause,World world,double x,double y,double z){
  return ExplosiveRegistry.triggerExplosive(world,x,y,z,ex,triggerCause,size,tag);
}
Program: 169682
Project: 169682
Buggy source:
@Override public void addInformation(ItemStack stack,EntityPlayer player,List list,boolean bool){
  super.addInformation(stack,player,list,bool);
  Missile missile=MissileSizes.loadMissile(stack);
  IExplosive ex=missile.getWarhead() != null ? missile.getWarhead().ex : null;
  String ex_translation=LanguageUtility.getLocal("String_Node_Str" + ICBM.PREFIX + "String_Node_Str") + "String_Node_Str";
  if (ex != null) {
    ex_translation+=LanguageUtility.getLocal(getExplosive(stack).getTranslationKey());
    list.add(ex_translation);
    List<String> l=new ArrayList();
    ex.addInfoToItem(stack,l);
    for (    String s : l)     list.add(s);
  }
 else {
    ex_translation+="String_Node_Str";
    list.add(ex_translation);
  }
  String engine_translation=LanguageUtility.getLocal("String_Node_Str" + ICBM.PREFIX + "String_Node_Str") + "String_Node_Str";
  if (missile.getEngine() != null) {
    engine_translation+=LanguageUtility.getLocal(missile.getEngine().getUnlocaizedName());
  }
 else {
    engine_translation+="String_Node_Str";
  }
  list.add(engine_translation);
}

Fixed version (ground truth):
@Override public void addInformation(ItemStack stack,EntityPlayer player,List list,boolean bool){
  super.addInformation(stack,player,list,bool);
  Missile missile=MissileSizes.loadMissile(stack);
  IExplosive ex=missile.getWarhead() != null ? missile.getWarhead().ex : null;
  String ex_translation=LanguageUtility.getLocal("String_Node_Str" + ICBM.PREFIX + "String_Node_Str") + "String_Node_Str";
  if (ex != null) {
    ex_translation+=LanguageUtility.getLocal(ex.getTranslationKey() + "String_Node_Str");
    list.add(ex_translation);
    List<String> l=new ArrayList();
    ex.addInfoToItem(stack,l);
    for (    String s : l)     list.add(s);
  }
 else {
    ex_translation+="String_Node_Str";
    list.add(ex_translation);
  }
  String engine_translation=LanguageUtility.getLocal("String_Node_Str" + ICBM.PREFIX + "String_Node_Str") + "String_Node_Str";
  if (missile.getEngine() != null) {
    engine_translation+=LanguageUtility.getLocal(missile.getEngine().getUnlocaizedName() + "String_Node_Str");
  }
 else {
    engine_translation+="String_Node_Str";
  }
  list.add(engine_translation);
}
Program: 169683
Project: 169683
Buggy source:
public BlockExplosiveMarker(){
  setBlockBounds(0.45F,0.45F,0.45F,0.55F,0.55F,0.55F);
}

Fixed version (ground truth):
public BlockExplosiveMarker(){
  super(Material.circuits);
  setBlockBounds(0.45F,0.45F,0.45F,0.55F,0.55F,0.55F);
}
Program: 169684
Project: 169684
Buggy source:
@Override public IIcon getIcon(int side,int meta){
  return Blocks.glass.getIcon(side,meta);
}

Fixed version (ground truth):
@Override public IIcon getIcon(int side,int meta){
  return Blocks.stone.getIcon(side,meta);
}
Program: 169689
Project: 169689
Buggy source:
@SideOnly(Side.CLIENT) @Override public IModelCustom getMissileModel(){
  try {
    if (this.model == null)     model=AdvancedModelLoader.loadModel(new ResourceLocation(Reference.DOMAIN,Reference.MODEL_DIRECTORY + this.modelName));
  }
 catch (  ModelFormatException e) {
    System.out.println("String_Node_Str" + this.modelName);
    e.printStackTrace();
  }
  return model;
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public IModelCustom getMissileModel(){
  try {
    if (this.model == null)     model=AdvancedModelLoader.loadModel(new ResourceLocation(Reference.DOMAIN,Reference.MODEL_PREFIX + this.modelName));
  }
 catch (  ModelFormatException e) {
    Reference.LOGGER.error("String_Node_Str" + this.modelName);
    Reference.LOGGER.catching(Level.INFO,e);
  }
  return model;
}
Program: 169690
Project: 169690
Buggy source:
/** 
 * The interval in ticks before the next procedural call of this explosive
 * @param return - Return -1 if this explosive does not need proceudral calls 
 */
@Override public int proceduralInterval(){
  return 4;
}

Fixed version (ground truth):
/** 
 * The interval in ticks before the next procedural call of this explosive
 * @return - Return -1 if this explosive does not need proceudral calls 
 */
@Override public int proceduralInterval(){
  return 4;
}
Program: 169694
Project: 169694
Buggy source:
/** 
 * Draw the foreground layer for the GuiContainer (everything in front of the items) 
 */
@Override protected void drawGuiContainerForegroundLayer(int mouseX,int mouseY){
  this.fontRendererObj.drawString("String_Node_Str" + LanguageUtility.getLocal("String_Node_Str"),65,6,4210752);
  this.fontRendererObj.drawString(LanguageUtility.getLocal("String_Node_Str").replaceAll("String_Node_Str","String_Node_Str"),12,30,4210752);
  this.textFieldBanJing.drawTextBox();
  this.fontRendererObj.drawString(LanguageUtility.getLocal("String_Node_Str"),12,55,4210752);
  String mode=LanguageUtility.getLocal("String_Node_Str");
  if (this.tileEntity.empMode == 1) {
    mode=LanguageUtility.getLocal("String_Node_Str");
  }
 else   if (this.tileEntity.empMode == 2) {
    mode=LanguageUtility.getLocal("String_Node_Str");
  }
  this.fontRendererObj.drawString(LanguageUtility.getLocal("String_Node_Str") + "String_Node_Str" + mode,12,105,4210752);
  String color="String_Node_Str";
  String status=LanguageUtility.getLocal("String_Node_Str");
  if (!this.tileEntity.energy().isFull()) {
    status=LanguageUtility.getLocal("String_Node_Str");
  }
 else {
    color="String_Node_Str";
    status=LanguageUtility.getLocal("String_Node_Str");
  }
  this.fontRendererObj.drawString(color + LanguageUtility.getLocal("String_Node_Str") + "String_Node_Str"+ status,12,120,4210752);
}

Fixed version (ground truth):
/** 
 * Draw the foreground layer for the GuiContainer (everything in front of the items) 
 */
@Override protected void drawGuiContainerForegroundLayer(int mouseX,int mouseY){
  this.fontRendererObj.drawString("String_Node_Str" + LanguageUtility.getLocal("String_Node_Str"),65,6,4210752);
  this.fontRendererObj.drawString(LanguageUtility.getLocal("String_Node_Str").replaceAll("String_Node_Str","String_Node_Str"),12,30,4210752);
  this.textFieldBanJing.drawTextBox();
  this.fontRendererObj.drawString(LanguageUtility.getLocal("String_Node_Str"),12,55,4210752);
  String mode=LanguageUtility.getLocal("String_Node_Str");
  if (this.tileEntity.empMode == 1) {
    mode=LanguageUtility.getLocal("String_Node_Str");
  }
 else   if (this.tileEntity.empMode == 2) {
    mode=LanguageUtility.getLocal("String_Node_Str");
  }
  this.fontRendererObj.drawString(LanguageUtility.getLocal("String_Node_Str") + "String_Node_Str" + mode,12,105,4210752);
  String color="String_Node_Str";
  String status=LanguageUtility.getLocal("String_Node_Str");
  if (!this.tileEntity.getEnergyStorage().checkExtract()) {
    status=LanguageUtility.getLocal("String_Node_Str");
  }
 else {
    color="String_Node_Str";
    status=LanguageUtility.getLocal("String_Node_Str");
  }
  this.fontRendererObj.drawString(color + LanguageUtility.getLocal("String_Node_Str") + "String_Node_Str"+ status,12,120,4210752);
}
Program: 169695
Project: 169695
Buggy source:
/** 
 * Draw the foreground layer for the GuiContainer (everything in front of the items) 
 */
@Override protected void drawGuiContainerForegroundLayer(int par1,int par2){
  this.fontRenderer.drawString("String_Node_Str" + tileEntity.getInvName(),48,6,4210752);
  this.fontRenderer.drawString(LanguageUtility.getLocal("String_Node_Str"),63,28,4210752);
  this.fontRenderer.drawString(StatCollector.translateToLocal("String_Node_Str"),8,this.ySize - 96 + 2,4210752);
}

Fixed version (ground truth):
/** 
 * Draw the foreground layer for the GuiContainer (everything in front of the items) 
 */
@Override protected void drawGuiContainerForegroundLayer(int par1,int par2){
  this.fontRendererObj.drawString("String_Node_Str" + tileEntity.getInventoryName(),48,6,4210752);
  this.fontRendererObj.drawString(LanguageUtility.getLocal("String_Node_Str"),63,28,4210752);
  this.fontRendererObj.drawString(StatCollector.translateToLocal("String_Node_Str"),8,this.ySize - 96 + 2,4210752);
}
Program: 169698
Project: 169698
Buggy source:
public BlockConcrete(int id){
  super("String_Node_Str",Material.rock);
  this.setHardness(3.8f);
  this.setResistance(50);
  this.setStepSound(BlockButton.soundTypeMetal);
}

Fixed version (ground truth):
public BlockConcrete(){
  super("String_Node_Str",Material.rock);
  this.setHardness(3.8f);
  this.setResistance(50);
  this.setStepSound(BlockButton.soundTypeMetal);
}
Program: 169700
Project: 169700
Buggy source:
public BlockICBMMachine(int id){
  super(id,"String_Node_Str",UniversalElectricity.machine);
}

Fixed version (ground truth):
public BlockICBMMachine(){
  super("String_Node_Str",Material.circuits);
}
Program: 169701
Project: 169701
Buggy source:
/** 
 * Called when the block is placed in the world. 
 */
@Override public void onBlockPlacedBy(World world,int x,int y,int z,EntityLivingBase par5EntityLiving,ItemStack itemStack){
  int angle=MathHelper.floor_double((par5EntityLiving.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
  TileEntity tileEntity=world.getBlockTileEntity(x,y,z);
  if (tileEntity instanceof IRotatable) {
    IRotatable rotatableEntity=((IRotatable)tileEntity);
switch (angle) {
case 0:
      rotatableEntity.setDirection(ForgeDirection.getOrientation(3));
    break;
case 1:
  rotatableEntity.setDirection(ForgeDirection.getOrientation(4));
break;
case 2:
rotatableEntity.setDirection(ForgeDirection.getOrientation(2));
break;
case 3:
rotatableEntity.setDirection(ForgeDirection.getOrientation(5));
break;
}
}
if (tileEntity instanceof IMultiBlock) {
ResonantEngine.blockMulti.createMultiBlockStructure((IMultiBlock)tileEntity);
}
}

Fixed version (ground truth):
/** 
 * Called when the block is placed in the world. 
 */
@Override public void onBlockPlacedBy(World world,int x,int y,int z,EntityLivingBase par5EntityLiving,ItemStack itemStack){
  int angle=MathHelper.floor_double((par5EntityLiving.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
  TileEntity tileEntity=world.getTileEntity(x,y,z);
  if (tileEntity instanceof IRotatable) {
    IRotatable rotatableEntity=((IRotatable)tileEntity);
switch (angle) {
case 0:
      rotatableEntity.setDirection(ForgeDirection.getOrientation(3));
    break;
case 1:
  rotatableEntity.setDirection(ForgeDirection.getOrientation(4));
break;
case 2:
rotatableEntity.setDirection(ForgeDirection.getOrientation(2));
break;
case 3:
rotatableEntity.setDirection(ForgeDirection.getOrientation(5));
break;
}
}
if (tileEntity instanceof IMultiBlock) {
ResonantEngine.blockMulti.createMultiBlockStructure((IMultiBlock)tileEntity);
}
}
Program: 169702
Project: 169702
Buggy source:
public ItemICBMElectrical(int id,String name){
  super(Settings.CONFIGURATION.getItem(name,id).getInt(id));
  this.setUnlocalizedName(Reference.PREFIX + name);
  this.setCreativeTab(TabICBM.INSTANCE);
  this.setTextureName(Reference.PREFIX + name);
}

Fixed version (ground truth):
public ItemICBMElectrical(String name){
  this.setUnlocalizedName(Reference.PREFIX + name);
  this.setCreativeTab(TabICBM.INSTANCE);
  this.setTextureName(Reference.PREFIX + name);
}
Program: 169703
Project: 169703
Buggy source:
@Override public Object getServerGuiElement(int ID,EntityPlayer player,World world,int x,int y,int z){
  TileEntity tileEntity=world.getBlockTileEntity(x,y,z);
  if (tileEntity instanceof TileCruiseLauncher) {
    return new ContainerCruiseLauncher(player.inventory,(TileCruiseLauncher)tileEntity);
  }
 else   if (tileEntity instanceof TileMissileCoordinator) {
    return new ContainerMissileCoordinator(player.inventory,(TileMissileCoordinator)tileEntity);
  }
 else   if (tileEntity instanceof TileMissileAssembler) {
    return new ContainerMissileTable(player.inventory,(TileMissileAssembler)tileEntity);
  }
 else   if (tileEntity instanceof TileLauncherScreen || tileEntity instanceof TileRadarStation || tileEntity instanceof TileEMPTower|| tileEntity instanceof TileLauncherBase|| tileEntity instanceof TileMissileCoordinator|| tileEntity instanceof TileMissileAssembler) {
    return new ContainerDummy(player,tileEntity);
  }
  return null;
}

Fixed version (ground truth):
@Override public Object getServerGuiElement(int ID,EntityPlayer player,World world,int x,int y,int z){
  TileEntity tileEntity=world.getTileEntity(x,y,z);
  if (tileEntity instanceof TileCruiseLauncher) {
    return new ContainerCruiseLauncher(player.inventory,(TileCruiseLauncher)tileEntity);
  }
 else   if (tileEntity instanceof TileMissileCoordinator) {
    return new ContainerMissileCoordinator(player.inventory,(TileMissileCoordinator)tileEntity);
  }
 else   if (tileEntity instanceof TileMissileAssembler) {
    return new ContainerMissileTable(player.inventory,(TileMissileAssembler)tileEntity);
  }
 else   if (tileEntity instanceof TileLauncherScreen || tileEntity instanceof TileRadarStation || tileEntity instanceof TileEMPTower|| tileEntity instanceof TileLauncherBase|| tileEntity instanceof TileMissileCoordinator|| tileEntity instanceof TileMissileAssembler) {
    return new ContainerDummy(player,tileEntity);
  }
  return null;
}
Program: 169704
Project: 169704
Buggy source:
@Override public void explode(){
  try {
    if (!this.isExpoding) {
      if (this.explosiveID == 0) {
        if (!this.worldObj.isRemote) {
          this.worldObj.createExplosion(this,this.posX,this.posY,this.posZ,5F,true);
        }
      }
 else {
        ((Explosion)ExplosiveRegistry.get(this.explosiveID)).createExplosion(this.worldObj,this.posX,this.posY,this.posZ,this);
      }
      this.isExpoding=true;
      ICBMCore.LOGGER.info(this.getEntityName() + "String_Node_Str" + this.entityId+ "String_Node_Str"+ (int)this.posX+ "String_Node_Str"+ (int)this.posY+ "String_Node_Str"+ (int)this.posZ);
    }
    setDead();
  }
 catch (  Exception e) {
    ICBMCore.LOGGER.severe("String_Node_Str");
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void explode(){
  try {
    if (!this.isExpoding) {
      if (this.explosiveID == 0) {
        if (!this.worldObj.isRemote) {
          this.worldObj.createExplosion(this,this.posX,this.posY,this.posZ,5F,true);
        }
      }
 else {
        ((Explosion)ExplosiveRegistry.get(this.explosiveID)).createExplosion(this.worldObj,this.posX,this.posY,this.posZ,this);
      }
      this.isExpoding=true;
      ICBMCore.LOGGER.info(this.getEntityName() + "String_Node_Str" + this.getEntityId()+ "String_Node_Str"+ (int)this.posX+ "String_Node_Str"+ (int)this.posY+ "String_Node_Str"+ (int)this.posZ);
    }
    setDead();
  }
 catch (  Exception e) {
    ICBMCore.LOGGER.severe("String_Node_Str");
    e.printStackTrace();
  }
}
Program: 169705
Project: 169705
Buggy source:
@Override public String getEntityName(){
  return ExplosiveRegistry.get(this.explosiveID).getMissileName();
}

Fixed version (ground truth):
public String getEntityName(){
  return ExplosiveRegistry.get(this.explosiveID).getMissileName();
}
Program: 169706
Project: 169706
Buggy source:
/** 
 * (abstract) Protected helper method to write subclass entity data to NBT. 
 */
@Override protected void writeEntityToNBT(NBTTagCompound nbt){
  if (this.startPos != null) {
    nbt.setCompoundTag("String_Node_Str",this.startPos.writeToNBT(new NBTTagCompound()));
  }
  if (this.targetVector != null) {
    nbt.setCompoundTag("String_Node_Str",this.targetVector.writeToNBT(new NBTTagCompound()));
  }
  if (this.launcherPos != null) {
    nbt.setCompoundTag("String_Node_Str",this.launcherPos.writeToNBT(new NBTTagCompound()));
  }
  nbt.setFloat("String_Node_Str",this.acceleration);
  nbt.setInteger("String_Node_Str",this.explosiveID);
  nbt.setInteger("String_Node_Str",this.targetHeight);
  nbt.setInteger("String_Node_Str",this.feiXingTick);
  nbt.setDouble("String_Node_Str",this.qiFeiGaoDu);
  nbt.setInteger("String_Node_Str",this.missileType.ordinal());
  nbt.setTag("String_Node_Str",this.nbtData);
}

Fixed version (ground truth):
/** 
 * (abstract) Protected helper method to write subclass entity data to NBT. 
 */
@Override protected void writeEntityToNBT(NBTTagCompound nbt){
  if (this.startPos != null) {
    nbt.setTag("String_Node_Str",this.startPos.writeNBT(new NBTTagCompound()));
  }
  if (this.targetVector != null) {
    nbt.setTag("String_Node_Str",this.targetVector.writeNBT(new NBTTagCompound()));
  }
  if (this.launcherPos != null) {
    nbt.setTag("String_Node_Str",this.launcherPos.writeNBT(new NBTTagCompound()));
  }
  nbt.setFloat("String_Node_Str",this.acceleration);
  nbt.setInteger("String_Node_Str",this.explosiveID);
  nbt.setInteger("String_Node_Str",this.targetHeight);
  nbt.setInteger("String_Node_Str",this.feiXingTick);
  nbt.setDouble("String_Node_Str",this.qiFeiGaoDu);
  nbt.setInteger("String_Node_Str",this.missileType.ordinal());
  nbt.setTag("String_Node_Str",this.nbtData);
}
Program: 169707
Project: 169707
Buggy source:
/** 
 * Recalculates required parabolic path for the missile Registry 
 */
public void recalculatePath(){
  if (this.targetVector != null) {
    this.deltaPathX=this.targetVector.x - this.startPos.x;
    this.deltaPathY=this.targetVector.y - this.startPos.y;
    this.deltaPathZ=this.targetVector.z - this.startPos.z;
    this.flatDistance=Vector2.distance(this.startPos.toVector2(),this.targetVector.toVector2());
    this.maxHeight=160 + (int)(this.flatDistance * 3);
    this.missileFlightTime=(float)Math.max(100,2 * this.flatDistance) - this.feiXingTick;
    this.acceleration=(float)this.maxHeight * 2 / (this.missileFlightTime * this.missileFlightTime);
  }
}

Fixed version (ground truth):
/** 
 * Recalculates required parabolic path for the missile Registry 
 */
public void recalculatePath(){
  if (this.targetVector != null) {
    this.deltaPathX=this.targetVector.x() - this.startPos.x();
    this.deltaPathY=this.targetVector.y() - this.startPos.y();
    this.deltaPathZ=this.targetVector.z() - this.startPos.z();
    this.flatDistance=this.startPos.subtract(this.targetVector).magnitude();
    this.maxHeight=160 + (int)(this.flatDistance * 3);
    this.missileFlightTime=(float)Math.max(100,2 * this.flatDistance) - this.feiXingTick;
    this.acceleration=(float)this.maxHeight * 2 / (this.missileFlightTime * this.missileFlightTime);
  }
}
Program: 169708
Project: 169708
Buggy source:
@Override public Vector3 getPredictedPosition(int t){
  Vector3 guJiDiDian=new Vector3(this);
  double tempMotionY=this.motionY;
  if (this.feiXingTick > 20) {
    for (int i=0; i < t; i++) {
      if (this.missileType == MissileType.CruiseMissile || this.missileType == MissileType.LAUNCHER) {
        guJiDiDian.x+=this.xiaoDanMotion.x;
        guJiDiDian.y+=this.xiaoDanMotion.y;
        guJiDiDian.z+=this.xiaoDanMotion.z;
      }
 else {
        guJiDiDian.x+=this.motionX;
        guJiDiDian.y+=tempMotionY;
        guJiDiDian.z+=this.motionZ;
        tempMotionY-=this.acceleration;
      }
    }
  }
  return guJiDiDian;
}

Fixed version (ground truth):
@Override public Vector3 getPredictedPosition(int t){
  Vector3 guJiDiDian=new Vector3(this);
  double tempMotionY=this.motionY;
  if (this.feiXingTick > 20) {
    for (int i=0; i < t; i++) {
      if (this.missileType == MissileType.CruiseMissile || this.missileType == MissileType.LAUNCHER) {
        guJiDiDian.addEquals(xiaoDanMotion);
      }
 else {
        guJiDiDian.addEquals(this.motionX,tempMotionY,this.motionZ);
        tempMotionY-=this.acceleration;
      }
    }
  }
  return guJiDiDian;
}
Program: 169709
Project: 169709
Buggy source:
/** 
 * For rocket launchers
 * @param explosiveId - Explosive ID
 * @param startPos - Starting Position
 * @param yaw - The yaw of the missle
 * @param pitch - the pitch of the missle 
 */
public EntityMissile(World world,Vector3 startPos,int explosiveId,float yaw,float pitch){
  this(world);
  this.explosiveID=explosiveId;
  this.launcherPos=this.startPos=startPos;
  this.missileType=MissileType.LAUNCHER;
  this.protectionTime=0;
  this.setPosition(this.startPos.x,this.startPos.y,this.startPos.z);
  this.setRotation(yaw,pitch);
}

Fixed version (ground truth):
/** 
 * For rocket launchers
 * @param explosiveId - Explosive ID
 * @param startPos - Starting Position
 * @param yaw - The yaw of the missle
 * @param pitch - the pitch of the missle 
 */
public EntityMissile(World world,Vector3 startPos,int explosiveId,float yaw,float pitch){
  this(world);
  this.explosiveID=explosiveId;
  this.launcherPos=this.startPos=startPos;
  this.missileType=MissileType.LAUNCHER;
  this.protectionTime=0;
  this.setPosition(this.startPos.x(),this.startPos.y(),this.startPos.z());
  this.setRotation(yaw,pitch);
}
Program: 169710
Project: 169710
Buggy source:
@Override public void readSpawnData(ByteArrayDataInput data){
  try {
    this.explosiveID=data.readInt();
    this.missileType=MissileType.values()[data.readInt()];
    this.startPos=new Vector3(data.readDouble(),data.readDouble(),data.readDouble());
    this.launcherPos=new Vector3(data.readInt(),data.readInt(),data.readInt());
    rotationYaw=data.readFloat();
    rotationPitch=data.readFloat();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void readSpawnData(ByteBuf data){
  try {
    this.explosiveID=data.readInt();
    this.missileType=MissileType.values()[data.readInt()];
    this.startPos=new Vector3(data.readDouble(),data.readDouble(),data.readDouble());
    this.launcherPos=new Vector3(data.readInt(),data.readInt(),data.readInt());
    rotationYaw=data.readFloat();
    rotationPitch=data.readFloat();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 169712
Project: 169712
Buggy source:
@Override public void writeSpawnData(ByteArrayDataOutput data){
  try {
    data.writeInt(this.explosiveID);
    data.writeInt(this.missileType.ordinal());
    data.writeDouble(this.startPos.x);
    data.writeDouble(this.startPos.y);
    data.writeDouble(this.startPos.z);
    data.writeInt(this.launcherPos.intX());
    data.writeInt(this.launcherPos.intY());
    data.writeInt(this.launcherPos.intZ());
    data.writeFloat(rotationYaw);
    data.writeFloat(rotationPitch);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void writeSpawnData(ByteBuf data){
  try {
    data.writeInt(this.explosiveID);
    data.writeInt(this.missileType.ordinal());
    data.writeDouble(this.startPos.x());
    data.writeDouble(this.startPos.y());
    data.writeDouble(this.startPos.z());
    data.writeInt(this.launcherPos.xi());
    data.writeInt(this.launcherPos.yi());
    data.writeInt(this.launcherPos.zi());
    data.writeFloat(rotationYaw);
    data.writeFloat(rotationPitch);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 169713
Project: 169713
Buggy source:
private void spawnMissileSmoke(){
  if (this.worldObj.isRemote) {
    Vector3 position=new Vector3(this);
    double distance=-this.daoDanGaoDu - 0.2f;
    Vector3 delta=new Vector3();
    delta.y=Math.sin(Math.toRadians(this.rotationPitch)) * distance;
    double dH=Math.cos(Math.toRadians(this.rotationPitch)) * distance;
    delta.x=Math.sin(Math.toRadians(this.rotationYaw)) * dH;
    delta.z=Math.cos(Math.toRadians(this.rotationYaw)) * dH;
    position.add(delta);
    this.worldObj.spawnParticle("String_Node_Str",position.x,position.y,position.z,0,0,0);
    ICBMExplosion.proxy.spawnParticle("String_Node_Str",this.worldObj,position,4,2);
    position.scale(1 - 0.001 * Math.random());
    ICBMExplosion.proxy.spawnParticle("String_Node_Str",this.worldObj,position,4,2);
    position.scale(1 - 0.001 * Math.random());
    ICBMExplosion.proxy.spawnParticle("String_Node_Str",this.worldObj,position,4,2);
    position.scale(1 - 0.001 * Math.random());
    ICBMExplosion.proxy.spawnParticle("String_Node_Str",this.worldObj,position,4,2);
  }
}

Fixed version (ground truth):
private void spawnMissileSmoke(){
  if (this.worldObj.isRemote) {
    Vector3 position=new Vector3(this);
    double distance=-this.daoDanGaoDu - 0.2f;
    Vector3 delta=new Vector3();
    delta.y_$eq(Math.sin(Math.toRadians(this.rotationPitch)) * distance);
    double dH=Math.cos(Math.toRadians(this.rotationPitch)) * distance;
    delta.x_$eq(Math.sin(Math.toRadians(this.rotationYaw)) * dH);
    delta.z_$eq(Math.cos(Math.toRadians(this.rotationYaw)) * dH);
    position.add(delta);
    this.worldObj.spawnParticle("String_Node_Str",position.x(),position.y(),position.z(),0,0,0);
    ICBMExplosion.proxy.spawnParticle("String_Node_Str",this.worldObj,position,4,2);
    position.multiply(1 - 0.001 * Math.random());
    ICBMExplosion.proxy.spawnParticle("String_Node_Str",this.worldObj,position,4,2);
    position.multiply(1 - 0.001 * Math.random());
    ICBMExplosion.proxy.spawnParticle("String_Node_Str",this.worldObj,position,4,2);
    position.multiply(1 - 0.001 * Math.random());
    ICBMExplosion.proxy.spawnParticle("String_Node_Str",this.worldObj,position,4,2);
  }
}
Program: 169715
Project: 169715
Buggy source:
@Override public World world(){
  return this.position.world;
}

Fixed version (ground truth):
@Override public World world(){
  return this.position.world();
}
Program: 169717
Project: 169717
Buggy source:
/** 
 * The interval in ticks before the next procedural call of this explosive
 * @param return - Return -1 if this explosive does not need procedural calls 
 */
public int proceduralInterval(){
  return -1;
}

Fixed version (ground truth):
/** 
 * The interval in ticks before the next procedural call of this explosive
 * @return - Return -1 if this explosive does not need procedural calls 
 */
public int proceduralInterval(){
  return -1;
}
Program: 169721
Project: 169721
Buggy source:
@Override public long getEnergyCapacity(ItemStack itemStack){
  return YONG_DIAN_LIANG * 10;
}

Fixed version (ground truth):
@Override public long getEnergyCapacity(ItemStack itemStack){
  return energyCost * 10;
}
Program: 169722
Project: 169722
Buggy source:
@Override public void onReceivePacket(ByteArrayDataInput data,EntityPlayer player,Object... extra){
  ItemStack itemStack=(ItemStack)extra[0];
  Vector3 position=new Vector3(data.readInt(),data.readInt(),data.readInt());
  ((ItemLaserDesignator)ICBMExplosion.itemLaserDesignator).setLauncherCountDown(itemStack,119);
  player.worldObj.playSoundEffect(position.intX(),player.worldObj.getHeightValue(position.intX(),position.intZ()),position.intZ(),Reference.PREFIX + "String_Node_Str",5.0F,(1.0F + (player.worldObj.rand.nextFloat() - player.worldObj.rand.nextFloat()) * 0.2F) * 0.7F);
  player.worldObj.spawnEntityInWorld(new EntityLightBeam(player.worldObj,position,5 * 20,0F,1F,0F));
  if (ICBMExplosion.itemRadarGun instanceof ItemElectric)   ((ItemElectric)ICBMExplosion.itemRadarGun).discharge(itemStack,ItemLaserDesignator.YONG_DIAN_LIANG,true);
}

Fixed version (ground truth):
@Override public void onReceivePacket(ByteArrayDataInput data,EntityPlayer player,Object... extra){
  ItemStack itemStack=(ItemStack)extra[0];
  Vector3 position=new Vector3(data.readInt(),data.readInt(),data.readInt());
  ((ItemLaserDesignator)ICBMExplosion.itemLaserDesignator).setLauncherCountDown(itemStack,119);
  player.worldObj.playSoundEffect(position.intX(),player.worldObj.getHeightValue(position.intX(),position.intZ()),position.intZ(),Reference.PREFIX + "String_Node_Str",5.0F,(1.0F + (player.worldObj.rand.nextFloat() - player.worldObj.rand.nextFloat()) * 0.2F) * 0.7F);
  player.worldObj.spawnEntityInWorld(new EntityLightBeam(player.worldObj,position,5 * 20,0F,1F,0F));
  if (ICBMExplosion.itemRadarGun instanceof ItemElectric)   ((ItemElectric)ICBMExplosion.itemRadarGun).discharge(itemStack,ItemLaserDesignator.energyCost,true);
}
Program: 169724
Project: 169724
Buggy source:
@Override public long getEnergyCapacity(ItemStack itemStack){
  return YONG_DIAN_LIANG * 10;
}

Fixed version (ground truth):
@Override public long getEnergyCapacity(ItemStack itemStack){
  return energyCost * 10;
}
Program: 169725
Project: 169725
Buggy source:
/** 
 * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer 
 */
@Override public ItemStack onItemRightClick(ItemStack itemStack,World par2World,EntityPlayer entityPlayer){
  if (par2World.isRemote) {
    MovingObjectPosition objectMouseOver=entityPlayer.rayTrace(JU_LI,1);
    if (objectMouseOver != null) {
      TileEntity tileEntity=par2World.getBlockTileEntity(objectMouseOver.blockX,objectMouseOver.blockY,objectMouseOver.blockZ);
      if (!(tileEntity instanceof TileLauncherPrefab)) {
        if (this.getEnergy(itemStack) > YONG_DIAN_LIANG) {
          PacketDispatcher.sendPacketToServer(ICBMCore.PACKET_ITEM.getPacket(entityPlayer,objectMouseOver.blockX,objectMouseOver.blockY,objectMouseOver.blockZ));
          this.discharge(itemStack,YONG_DIAN_LIANG,true);
          entityPlayer.addChatMessage(LanguageUtility.getLocal("String_Node_Str").replaceAll("String_Node_Str","String_Node_Str" + objectMouseOver.blockX).replace("String_Node_Str","String_Node_Str" + objectMouseOver.blockY).replaceAll("String_Node_Str","String_Node_Str" + objectMouseOver.blockZ).replaceAll("String_Node_Str","String_Node_Str" + Math.round(new Vector3(entityPlayer).distance(new Vector3(objectMouseOver)))));
        }
 else {
          entityPlayer.addChatMessage(LanguageUtility.getLocal("String_Node_Str"));
        }
      }
    }
  }
  return itemStack;
}

Fixed version (ground truth):
/** 
 * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer 
 */
@Override public ItemStack onItemRightClick(ItemStack itemStack,World par2World,EntityPlayer entityPlayer){
  if (par2World.isRemote) {
    MovingObjectPosition objectMouseOver=entityPlayer.rayTrace(raycastDistance,1);
    if (objectMouseOver != null) {
      TileEntity tileEntity=par2World.getBlockTileEntity(objectMouseOver.blockX,objectMouseOver.blockY,objectMouseOver.blockZ);
      if (!(tileEntity instanceof TileLauncherPrefab)) {
        if (this.getEnergy(itemStack) > energyCost) {
          PacketDispatcher.sendPacketToServer(ICBMCore.PACKET_ITEM.getPacket(entityPlayer,objectMouseOver.blockX,objectMouseOver.blockY,objectMouseOver.blockZ));
          this.discharge(itemStack,energyCost,true);
          entityPlayer.addChatMessage(LanguageUtility.getLocal("String_Node_Str").replaceAll("String_Node_Str","String_Node_Str" + objectMouseOver.blockX).replace("String_Node_Str","String_Node_Str" + objectMouseOver.blockY).replaceAll("String_Node_Str","String_Node_Str" + objectMouseOver.blockZ).replaceAll("String_Node_Str","String_Node_Str" + Math.round(new Vector3(entityPlayer).distance(new Vector3(objectMouseOver)))));
        }
 else {
          entityPlayer.addChatMessage(LanguageUtility.getLocal("String_Node_Str"));
        }
      }
    }
  }
  return itemStack;
}
Program: 169726
Project: 169726
Buggy source:
@Override public long getEnergyCapacity(ItemStack theItem){
  return 80000;
}

Fixed version (ground truth):
@Override public long getEnergyCapacity(ItemStack theItem){
  return 1000000;
}
Program: 169727
Project: 169727
Buggy source:
@Override public void onReceivePacket(ByteArrayDataInput data,EntityPlayer player,Object... extra){
  ItemStack itemStack=(ItemStack)extra[0];
  this.setLink(itemStack,new Vector3(data.readInt(),data.readInt(),data.readInt()));
  if (ICBMExplosion.itemRadarGun instanceof ItemElectric)   ((ItemElectric)ICBMExplosion.itemRadarGun).discharge(itemStack,ItemRadarGun.YONG_DIAN_LIANG,true);
}

Fixed version (ground truth):
@Override public void onReceivePacket(ByteArrayDataInput data,EntityPlayer player,Object... extra){
  ItemStack itemStack=(ItemStack)extra[0];
  this.setLink(itemStack,new Vector3(data.readInt(),data.readInt(),data.readInt()));
  if (ICBMExplosion.itemRadarGun instanceof ItemElectric)   ((ItemElectric)ICBMExplosion.itemRadarGun).discharge(itemStack,ItemRadarGun.energyCost,true);
}
Program: 169728
Project: 169728
Buggy source:
@Override public long getEnergyCapacity(ItemStack itemStack){
  return 80000;
}

Fixed version (ground truth):
@Override public long getEnergyCapacity(ItemStack itemStack){
  return 1000000;
}
Program: 169729
Project: 169729
Buggy source:
@Override public long getEnergyCapacity(ItemStack itemStack){
  return 100000;
}

Fixed version (ground truth):
@Override public long getEnergyCapacity(ItemStack itemStack){
  return 1000000;
}
Program: 169731
Project: 169731
Buggy source:
@Override public void onUpdate(ItemStack itemStack,World world,Entity entity,int par4,boolean par5){
  if (!world.isRemote) {
    if (this.getEnergy(itemStack) > 20 && world.getWorldTime() % 20 == 0) {
      this.discharge(itemStack,1 * 20,true);
    }
  }
}

Fixed version (ground truth):
@Override public void onUpdate(ItemStack itemStack,World world,Entity entity,int par4,boolean par5){
  if (!world.isRemote) {
    if (this.getEnergy(itemStack) > energyCost && world.getWorldTime() % 20 == 0) {
      this.discharge(itemStack,1 * energyCost,true);
    }
  }
}
Program: 169732
Project: 169732
Buggy source:
@Override public boolean onActivated(EntityPlayer player){
  if (player.inventory.getCurrentItem() != null) {
    if (player.inventory.getCurrentItem().getItem() instanceof ItemMissile) {
      if (this.getStackInSlot(0) == null) {
        this.setInventorySlotContents(0,player.inventory.getCurrentItem());
        if (!player.capabilities.isCreativeMode)         player.inventory.setInventorySlotContents(player.inventory.currentItem,null);
        return true;
      }
 else {
        ItemStack player_held=player.inventory.getCurrentItem();
        if (!player.capabilities.isCreativeMode)         player.inventory.setInventorySlotContents(player.inventory.currentItem,this.getStackInSlot(0));
        this.setInventorySlotContents(0,player_held);
        return true;
      }
    }
  }
 else   if (this.getStackInSlot(0) != null) {
    player.inventory.setInventorySlotContents(player.inventory.currentItem,this.getStackInSlot(0));
    this.setInventorySlotContents(0,null);
    return true;
  }
  player.openGui(ICBMExplosion.instance,0,this.worldObj,this.xCoord,this.yCoord,this.zCoord);
  return true;
}

Fixed version (ground truth):
@Override public boolean onActivated(EntityPlayer player){
  if (player.inventory.getCurrentItem() != null) {
    if (player.inventory.getCurrentItem().getItem() instanceof ItemMissile) {
      if (this.getStackInSlot(0) == null) {
        this.setInventorySlotContents(0,player.inventory.getCurrentItem());
        if (!player.capabilities.isCreativeMode)         player.inventory.setInventorySlotContents(player.inventory.currentItem,null);
        return true;
      }
 else {
        ItemStack player_held=player.inventory.getCurrentItem();
        if (!player.capabilities.isCreativeMode)         player.inventory.setInventorySlotContents(player.inventory.currentItem,this.getStackInSlot(0));
        this.setInventorySlotContents(0,player_held);
        return true;
      }
    }
  }
 else   if (this.getStackInSlot(0) != null) {
    player.inventory.setInventorySlotContents(player.inventory.currentItem,this.getStackInSlot(0));
    this.setInventorySlotContents(0,null);
    return true;
  }
  if (!this.worldObj.isRemote)   player.openGui(ICBMExplosion.instance,0,this.worldObj,this.xCoord,this.yCoord,this.zCoord);
  return true;
}
Program: 169733
Project: 169733
Buggy source:
@Override public boolean onActivated(EntityPlayer entityPlayer){
  entityPlayer.openGui(ICBMExplosion.instance,0,this.worldObj,this.xCoord,this.yCoord,this.zCoord);
  return true;
}

Fixed version (ground truth):
@Override public boolean onActivated(EntityPlayer entityPlayer){
  if (!this.worldObj.isRemote)   entityPlayer.openGui(ICBMExplosion.instance,0,this.worldObj,this.xCoord,this.yCoord,this.zCoord);
  return true;
}
Program: 169734
Project: 169734
Buggy source:
@Override public boolean onActivated(EntityPlayer entityPlayer){
  if (entityPlayer.inventory.getCurrentItem() != null && this.getStackInSlot(0) == null) {
    if (entityPlayer.inventory.getCurrentItem().getItem() instanceof ItemMissile) {
      this.setInventorySlotContents(0,entityPlayer.inventory.getCurrentItem());
      entityPlayer.inventory.setInventorySlotContents(entityPlayer.inventory.currentItem,null);
      this.onInventoryChanged();
      return true;
    }
  }
  entityPlayer.openGui(ICBMExplosion.instance,0,this.worldObj,this.xCoord,this.yCoord,this.zCoord);
  return true;
}

Fixed version (ground truth):
@Override public boolean onActivated(EntityPlayer entityPlayer){
  if (entityPlayer.inventory.getCurrentItem() != null && this.getStackInSlot(0) == null) {
    if (entityPlayer.inventory.getCurrentItem().getItem() instanceof ItemMissile) {
      this.setInventorySlotContents(0,entityPlayer.inventory.getCurrentItem());
      entityPlayer.inventory.setInventorySlotContents(entityPlayer.inventory.currentItem,null);
      this.onInventoryChanged();
      return true;
    }
  }
  if (!this.worldObj.isRemote)   entityPlayer.openGui(ICBMExplosion.instance,0,this.worldObj,this.xCoord,this.yCoord,this.zCoord);
  return true;
}
Program: 169735
Project: 169735
Buggy source:
@Override public boolean onActivated(EntityPlayer entityPlayer){
  this.worldObj.playSoundEffect(this.xCoord,this.yCoord,this.zCoord,Reference.PREFIX + "String_Node_Str",1,(float)(this.worldObj.rand.nextFloat() * 0.2 + 0.9F));
  entityPlayer.openGui(ICBMExplosion.instance,0,this.worldObj,this.xCoord,this.yCoord,this.zCoord);
  return true;
}

Fixed version (ground truth):
@Override public boolean onActivated(EntityPlayer entityPlayer){
  this.worldObj.playSoundEffect(this.xCoord,this.yCoord,this.zCoord,Reference.PREFIX + "String_Node_Str",1,(float)(this.worldObj.rand.nextFloat() * 0.2 + 0.9F));
  if (!this.worldObj.isRemote)   entityPlayer.openGui(ICBMExplosion.instance,0,this.worldObj,this.xCoord,this.yCoord,this.zCoord);
  return true;
}
Program: 169736
Project: 169736
Buggy source:
@Override public boolean onActivated(EntityPlayer entityPlayer){
  if (entityPlayer.inventory.getCurrentItem() != null) {
    if (WrenchUtility.isUsableWrench(entityPlayer,entityPlayer.inventory.getCurrentItem(),this.xCoord,this.yCoord,this.zCoord)) {
      if (!this.worldObj.isRemote) {
        this.emitAll=!this.emitAll;
        entityPlayer.addChatMessage(LanguageUtility.getLocal("String_Node_Str") + "String_Node_Str" + this.emitAll);
      }
      return true;
    }
  }
  entityPlayer.openGui(ICBMExplosion.instance,0,this.worldObj,this.xCoord,this.yCoord,this.zCoord);
  return true;
}

Fixed version (ground truth):
@Override public boolean onActivated(EntityPlayer entityPlayer){
  if (entityPlayer.inventory.getCurrentItem() != null) {
    if (WrenchUtility.isUsableWrench(entityPlayer,entityPlayer.inventory.getCurrentItem(),this.xCoord,this.yCoord,this.zCoord)) {
      if (!this.worldObj.isRemote) {
        this.emitAll=!this.emitAll;
        entityPlayer.addChatMessage(LanguageUtility.getLocal("String_Node_Str") + "String_Node_Str" + this.emitAll);
      }
      return true;
    }
  }
  if (!this.worldObj.isRemote)   entityPlayer.openGui(ICBMExplosion.instance,0,this.worldObj,this.xCoord,this.yCoord,this.zCoord);
  return true;
}
Program: 169737
Project: 169737
Buggy source:
@Override public boolean onActivated(EntityPlayer entityPlayer){
  entityPlayer.openGui(ICBMExplosion.instance,0,this.worldObj,this.xCoord,this.yCoord,this.zCoord);
  return true;
}

Fixed version (ground truth):
@Override public boolean onActivated(EntityPlayer entityPlayer){
  if (!this.worldObj.isRemote)   entityPlayer.openGui(ICBMExplosion.instance,0,this.worldObj,this.xCoord,this.yCoord,this.zCoord);
  return true;
}
Program: 169738
Project: 169738
Buggy source:
@Override public boolean onMachineActivated(World world,int x,int y,int z,EntityPlayer entityPlayer,int side,float hitX,float hitY,float hitZ){
  if (entityPlayer != null) {
    if (entityPlayer.inventory.getCurrentItem() == null || entityPlayer.inventory.getCurrentItem().itemID != ICBMSentry.blockTurret.blockID || side != 0 && side != 1) {
      entityPlayer.openGui(ICBMSentry.INSTANCE,0,world,x,y,z);
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onMachineActivated(World world,int x,int y,int z,EntityPlayer entityPlayer,int side,float hitX,float hitY,float hitZ){
  if (entityPlayer != null) {
    if (entityPlayer.inventory.getCurrentItem() == null || entityPlayer.inventory.getCurrentItem().itemID != ICBMSentry.blockTurret.blockID || side != 0 && side != 1) {
      if (!world.isRemote)       entityPlayer.openGui(ICBMSentry.INSTANCE,0,world,x,y,z);
      return true;
    }
  }
  return false;
}
Program: 169739
Project: 169739
Buggy source:
@Override public boolean onSneakMachineActivated(World world,int x,int y,int z,EntityPlayer entityPlayer,int side,float hitX,float hitY,float hitZ){
  if (entityPlayer != null) {
    entityPlayer.openGui(ICBMSentry.INSTANCE,1,world,x,y,z);
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onSneakMachineActivated(World world,int x,int y,int z,EntityPlayer entityPlayer,int side,float hitX,float hitY,float hitZ){
  if (entityPlayer != null) {
    if (!world.isRemote)     entityPlayer.openGui(ICBMSentry.INSTANCE,1,world,x,y,z);
    return true;
  }
  return false;
}
Program: 169740
Project: 169740
Buggy source:
@Override public boolean onMachineActivated(World world,int x,int y,int z,EntityPlayer player,int side,float hitX,float hitY,float hitZ){
  player.openGui(ICBMCore.INSTANCE,0,world,x,y,z);
  return true;
}

Fixed version (ground truth):
@Override public boolean onMachineActivated(World world,int x,int y,int z,EntityPlayer player,int side,float hitX,float hitY,float hitZ){
  if (!world.isRemote)   player.openGui(ICBMCore.INSTANCE,0,world,x,y,z);
  return true;
}
Program: 169741
Project: 169741
Buggy source:
@Override public ItemStack onItemRightClick(ItemStack par1ItemStack,World par2World,EntityPlayer par3EntityPlayer){
  par3EntityPlayer.openGui(ICBMCore.INSTANCE,0,par2World,(int)par3EntityPlayer.posX,(int)par3EntityPlayer.posY,(int)par3EntityPlayer.posZ);
  return par1ItemStack;
}

Fixed version (ground truth):
@Override public ItemStack onItemRightClick(ItemStack par1ItemStack,World par2World,EntityPlayer par3EntityPlayer){
  if (!par2World.isRemote)   par3EntityPlayer.openGui(ICBMCore.INSTANCE,0,par2World,(int)par3EntityPlayer.posX,(int)par3EntityPlayer.posY,(int)par3EntityPlayer.posZ);
  return par1ItemStack;
}
Program: 169742
Project: 169742
Buggy source:
@Override protected boolean use(EntityPlayer player,int side,Vector3 hit){
  player.openGui(ICBMCore.INSTANCE,0,world(),x(),y(),z());
  return true;
}

Fixed version (ground truth):
@Override protected boolean use(EntityPlayer player,int side,Vector3 hit){
  if (!this.worldObj.isRemote)   player.openGui(ICBMCore.INSTANCE,0,world(),x(),y(),z());
  return true;
}
Program: 169745
Project: 169745
Buggy source:
public static boolean canBePlacedAt(World world,int x,int y,int z,int metadata,int direction){
switch (metadata) {
default :
{
      return world.getBlockMaterial(x,y - 1,z).isSolid();
    }
case 0:
{
    if (direction == 0 || direction == 2) {
      return world.getBlockId(x,y,z) == 0 && world.getBlockId(x + 1,y,z) == 0 && world.getBlockId(x + 1,y + 1,z) == 0 && world.getBlockId(x + 1,y + 2,z) == 0 && world.getBlockId(x - 1,y,z) == 0 && world.getBlockId(x - 1,y + 1,z) == 0 && world.getBlockId(x - 1,y + 2,z) == 0;
    }
 else     if (direction == 1 || direction == 3) {
      return world.getBlockId(x,y,z) == 0 && world.getBlockId(x,y,z + 1) == 0 && world.getBlockId(x,y + 1,z + 1) == 0 && world.getBlockId(x,y + 2,z + 1) == 0 && world.getBlockId(x,y,z - 1) == 0 && world.getBlockId(x,y + 1,z - 1) == 0 && world.getBlockId(x,y + 2,z - 1) == 0;
    }
  }
case 2:
{
  return world.getBlockMaterial(x,y - 1,z).isSolid() && world.getBlockId(x,y,z) == 0 && world.getBlockId(x,y + 1,z) == 0 && world.getBlockId(x,y + 2,z) == 0;
}
case 4:
{
return world.getBlockId(x,y,z) == 0 && world.getBlockId(x,y + 1,z) == 0;
}
}
}

Fixed version (ground truth):
/** 
 * Checks if the machine can be placed at the location 
 */
public static boolean canBePlacedAt(World world,int x,int y,int z,int m,int side){
  ForgeDirection d=ForgeDirection.getOrientation(side);
  if (m == 0) {
    for (int yp=0; yp < 2; yp++) {
      if (!world.isAirBlock(x + d.offsetX,y + yp,z + d.offsetZ))       return false;
      if (!world.isAirBlock(x - d.offsetX,y + yp,z - d.offsetZ))       return false;
    }
    return world.isAirBlock(x,y,z);
  }
 else   if (m == 2) {
    return world.getBlockMaterial(x,y - 1,z).isSolid() && world.isAirBlock(x,y,z) && world.isAirBlock(x,y + 1,z)&& world.isAirBlock(x,y + 2,z);
  }
 else   if (m == 4) {
    return world.isAirBlock(x,y,z) && world.isAirBlock(x,y + 1,z);
  }
  return world.getBlockMaterial(x,y - 1,z).isSolid();
}