nus-yam/ex-repair huggingface dataset:
Program: 169803
Project: 169803
Buggy source:
@Override public boolean canAccess(String username){
  return this.getAccessProfile().getUserAccess(username) != null;
}

Fixed version (ground truth):
@Override public boolean canAccess(String username){
  return this.getAccessProfile().getUserAccess(username).getGroup() != null;
}
Program: 169804
Project: 169804
Buggy source:
@Override public boolean canUse(String node,EntityPlayer player){
  return this.getAccessProfile().getOwnerGroup().isMemeber(player.username);
}

Fixed version (ground truth):
@Override public boolean canUse(String node,EntityPlayer player){
  return this.getAccessProfile().getUserAccess(player.username).hasNode(node);
}
Program: 169805
Project: 169805
Buggy source:
public GuiLauncherScreen(TileLauncherScreen tileEntity){
  super(tileEntity);
  this.tileEntity=tileEntity;
}

Fixed version (ground truth):
public GuiLauncherScreen(TileLauncherScreen tileEntity){
  super(tileEntity);
  this.tileEntity=tileEntity;
  ySize=166;
}
Program: 169806
Project: 169806
Buggy source:
public GuiFrequency(EntityPlayer player,ItemStack par1ItemStack){
  this.player=player;
  this.itemStack=par1ItemStack;
}

Fixed version (ground truth):
public GuiFrequency(EntityPlayer player,ItemStack par1ItemStack){
  this.player=player;
  this.itemStack=par1ItemStack;
  this.ySize=166;
}
Program: 169807
Project: 169807
Buggy source:
public EulerServo(EulerAngle angle,float rotationSpeed){
  super(angle);
  this.rotationSpeed=rotationSpeed;
}

Fixed version (ground truth):
public EulerServo(EulerAngle angle,double rotationSpeed){
  super(angle);
  this.rotationSpeed=rotationSpeed;
}
Program: 169809
Project: 169809
Buggy source:
@Override public Packet getDescriptionPacket(){
  return ICBMCore.PACKET_TILE.getPacket(this,this.facingDirection,this.tier);
}

Fixed version (ground truth):
@Override public Packet getDescriptionPacket(){
  return ICBMCore.PACKET_TILE.getPacket(this,(byte)this.facingDirection.ordinal(),this.tier);
}
Program: 169811
Project: 169811
Buggy source:
public BlockExplosive(int id){
  super(id,"String_Node_Str",Material.tnt);
  this.setHardness(0.0F);
  this.setStepSound(soundGrassFootstep);
  this.setCreativeTab(CreativeTabICBM.INSTANCE);
}

Fixed version (ground truth):
public BlockExplosive(int id){
  super(id,"String_Node_Str",Material.tnt);
  this.setHardness(0.0F);
  this.setStepSound(soundGrassFootstep);
  this.setCreativeTab(TabICBM.INSTANCE);
}
Program: 169812
Project: 169812
Buggy source:
@EventHandler public void preInit(FMLPreInitializationEvent event){
  NetworkRegistry.instance().registerGuiHandler(this,ICBMSentry.proxy);
  MinecraftForge.EVENT_BUS.register(this);
  SentryTypes.load();
  blockTurret=ICBMCore.contentRegistry.createBlock(BlockTurret.class,ItemBlockTurret.class,TileTurret.class);
  blockPlatform=ICBMCore.contentRegistry.createBlock(BlockTurretPlatform.class);
  itemAmmo=ICBMCore.contentRegistry.createItem("String_Node_Str",ItemAmmo.class,false);
  itemUpgrade=ICBMCore.contentRegistry.createItem("String_Node_Str",ItemSentryUpgrade.class,false);
  bulletShell=new ItemStack(itemAmmo,1,0);
  conventionalBullet=new ItemStack(itemAmmo,1,1);
  railgunBullet=new ItemStack(itemAmmo,1,2);
  antimatterBullet=new ItemStack(itemAmmo,1,3);
  EntityRegistry.registerGlobalEntityID(EntitySentryFake.class,"String_Node_Str",EntityRegistry.findGlobalUniqueEntityId());
  EntityRegistry.registerModEntity(EntitySentryFake.class,"String_Node_Str",ENTITY_ID_PREFIX + 7,this,50,5,true);
  CreativeTabICBM.itemStack=new ItemStack(blockTurret);
  proxy.preInit();
}

Fixed version (ground truth):
@EventHandler public void preInit(FMLPreInitializationEvent event){
  NetworkRegistry.instance().registerGuiHandler(this,ICBMSentry.proxy);
  MinecraftForge.EVENT_BUS.register(this);
  SentryTypes.load();
  blockTurret=ICBMCore.contentRegistry.createBlock(BlockTurret.class,ItemBlockTurret.class,TileTurret.class);
  blockPlatform=ICBMCore.contentRegistry.createBlock(BlockTurretPlatform.class);
  itemAmmo=ICBMCore.contentRegistry.createItem("String_Node_Str",ItemAmmo.class,false);
  itemUpgrade=ICBMCore.contentRegistry.createItem("String_Node_Str",ItemSentryUpgrade.class,false);
  bulletShell=new ItemStack(itemAmmo,1,0);
  conventionalBullet=new ItemStack(itemAmmo,1,1);
  railgunBullet=new ItemStack(itemAmmo,1,2);
  antimatterBullet=new ItemStack(itemAmmo,1,3);
  EntityRegistry.registerGlobalEntityID(EntitySentryFake.class,"String_Node_Str",EntityRegistry.findGlobalUniqueEntityId());
  EntityRegistry.registerModEntity(EntitySentryFake.class,"String_Node_Str",ENTITY_ID_PREFIX + 7,this,50,5,true);
  TabICBM.itemStack=new ItemStack(blockTurret);
  proxy.preInit();
}
Program: 169813
Project: 169813
Buggy source:
public BlockTurretPlatform(int id){
  super(id,"String_Node_Str");
  this.setHardness(100f);
  this.setResistance(50f);
  this.setCreativeTab(CreativeTabICBM.INSTANCE);
  this.requireSidedTextures=true;
}

Fixed version (ground truth):
public BlockTurretPlatform(int id){
  super(id,"String_Node_Str");
  this.setHardness(100f);
  this.setResistance(50f);
  this.setCreativeTab(TabICBM.INSTANCE);
  this.requireSidedTextures=true;
}
Program: 169814
Project: 169814
Buggy source:
public BlockTurret(int id){
  super(id,"String_Node_Str");
  this.setCreativeTab(CreativeTabICBM.INSTANCE);
  this.setHardness(100f);
  this.setResistance(50f);
}

Fixed version (ground truth):
public BlockTurret(int id){
  super(id,"String_Node_Str");
  this.setCreativeTab(TabICBM.INSTANCE);
  this.setHardness(100f);
  this.setResistance(50f);
}
Program: 169815
Project: 169815
Buggy source:
public BlockCamouflage(int id){
  super(id,"String_Node_Str",Material.cloth);
  this.setHardness(0.3F);
  this.setResistance(1F);
  this.setStepSound(Block.soundClothFootstep);
  this.setCreativeTab(CreativeTabICBM.INSTANCE);
}

Fixed version (ground truth):
public BlockCamouflage(int id){
  super(id,"String_Node_Str",Material.cloth);
  this.setHardness(0.3F);
  this.setResistance(1F);
  this.setStepSound(Block.soundClothFootstep);
  this.setCreativeTab(TabICBM.INSTANCE);
}
Program: 169816
Project: 169816
Buggy source:
public BlockGlassButton(int id){
  super(id,true);
  this.setTickRandomly(true);
  this.setUnlocalizedName(Reference.PREFIX + "String_Node_Str");
  this.setStepSound(soundGlassFootstep);
  this.setCreativeTab(CreativeTabICBM.INSTANCE);
}

Fixed version (ground truth):
public BlockGlassButton(int id){
  super(id,true);
  this.setTickRandomly(true);
  this.setUnlocalizedName(Reference.PREFIX + "String_Node_Str");
  this.setStepSound(soundGlassFootstep);
  this.setCreativeTab(TabICBM.INSTANCE);
}
Program: 169817
Project: 169817
Buggy source:
public BlockGlassPressurePlate(int id){
  super(id,Reference.PREFIX + "String_Node_Str",Material.glass,EnumMobType.everything);
  this.setTickRandomly(true);
  this.setResistance(1F);
  this.setHardness(0.3F);
  this.setStepSound(soundGlassFootstep);
  this.setUnlocalizedName(Reference.PREFIX + "String_Node_Str");
  this.setCreativeTab(CreativeTabICBM.INSTANCE);
}

Fixed version (ground truth):
public BlockGlassPressurePlate(int id){
  super(id,Reference.PREFIX + "String_Node_Str",Material.glass,EnumMobType.everything);
  this.setTickRandomly(true);
  this.setResistance(1F);
  this.setHardness(0.3F);
  this.setStepSound(soundGlassFootstep);
  this.setUnlocalizedName(Reference.PREFIX + "String_Node_Str");
  this.setCreativeTab(TabICBM.INSTANCE);
}
Program: 169818
Project: 169818
Buggy source:
public BlockReinforcedGlass(int id){
  super(id,"String_Node_Str",Material.glass);
  this.setResistance(48);
  this.setCreativeTab(CreativeTabICBM.INSTANCE);
}

Fixed version (ground truth):
public BlockReinforcedGlass(int id){
  super(id,"String_Node_Str",Material.glass);
  this.setResistance(48);
  this.setCreativeTab(TabICBM.INSTANCE);
}
Program: 169819
Project: 169819
Buggy source:
public BlockSpikes(int id){
  super(id,"String_Node_Str",Material.cactus);
  this.setHardness(1.0F);
  this.setCreativeTab(CreativeTabICBM.INSTANCE);
}

Fixed version (ground truth):
public BlockSpikes(int id){
  super(id,"String_Node_Str",Material.cactus);
  this.setHardness(1.0F);
  this.setCreativeTab(TabICBM.INSTANCE);
}
Program: 169821
Project: 169821
Buggy source:
public BlockICBM(int id,String name,Material material){
  super(id,material);
  setUnlocalizedName(Reference.PREFIX + name);
  setTextureName(Reference.PREFIX + name);
  setCreativeTab(CreativeTabICBM.INSTANCE);
}

Fixed version (ground truth):
public BlockICBM(int id,String name,Material material){
  super(id,material);
  setUnlocalizedName(Reference.PREFIX + name);
  setTextureName(Reference.PREFIX + name);
  setCreativeTab(TabICBM.INSTANCE);
}
Program: 169822
Project: 169822
Buggy source:
public ItemICBMBase(int id,String name){
  super(id);
  this.setUnlocalizedName(Reference.PREFIX + name);
  this.setCreativeTab(CreativeTabICBM.INSTANCE);
  this.setTextureName(Reference.PREFIX + name);
}

Fixed version (ground truth):
public ItemICBMBase(int id,String name){
  super(id);
  this.setUnlocalizedName(Reference.PREFIX + name);
  this.setCreativeTab(TabICBM.INSTANCE);
  this.setTextureName(Reference.PREFIX + name);
}
Program: 169823
Project: 169823
Buggy source:
public ItemICBMElectrical(int id,String name){
  super(Settings.CONFIGURATION.getItem(name,id).getInt(id));
  this.setUnlocalizedName(Reference.PREFIX + name);
  this.setCreativeTab(CreativeTabICBM.INSTANCE);
  this.setTextureName(Reference.PREFIX + name);
}

Fixed version (ground truth):
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);
}
Program: 169824
Project: 169824
Buggy source:
@EventHandler public void preInit(FMLPreInitializationEvent event){
  NetworkRegistry.instance().registerGuiHandler(this,ICBMSentry.proxy);
  MinecraftForge.EVENT_BUS.register(this);
  Settings.CONFIGURATION.load();
  SentryTypes.load();
  blockTurret=ICBMCore.contentRegistry.createBlock("String_Node_Str",BlockTurret.class,ItemBlockTurret.class,null,false);
  blockPlatform=ICBMCore.contentRegistry.createBlock("String_Node_Str",BlockTurretPlatform.class,null,null,false);
  itemAmmo=ICBMCore.contentRegistry.createItem("String_Node_Str",ItemAmmo.class,false);
  itemUpgrade=ICBMCore.contentRegistry.createItem("String_Node_Str",ItemSentryUpgrade.class,false);
  bulletShell=new ItemStack(itemAmmo,1,0);
  conventionalBullet=new ItemStack(itemAmmo,1,1);
  railgunBullet=new ItemStack(itemAmmo,1,2);
  antimatterBullet=new ItemStack(itemAmmo,1,3);
  EntityRegistry.registerGlobalEntityID(EntitySentryFake.class,"String_Node_Str",EntityRegistry.findGlobalUniqueEntityId());
  EntityRegistry.registerModEntity(EntitySentryFake.class,"String_Node_Str",ENTITY_ID_PREFIX + 7,this,50,5,true);
  CreativeTabICBM.itemStack=new ItemStack(blockTurret);
  proxy.preInit();
  Settings.CONFIGURATION.save();
}

Fixed version (ground truth):
@EventHandler public void preInit(FMLPreInitializationEvent event){
  NetworkRegistry.instance().registerGuiHandler(this,ICBMSentry.proxy);
  MinecraftForge.EVENT_BUS.register(this);
  Settings.CONFIGURATION.load();
  SentryTypes.load();
  blockTurret=ICBMCore.contentRegistry.createBlock(BlockTurret.class,ItemBlockTurret.class);
  blockPlatform=ICBMCore.contentRegistry.createBlock(BlockTurretPlatform.class);
  itemAmmo=ICBMCore.contentRegistry.createItem("String_Node_Str",ItemAmmo.class,false);
  itemUpgrade=ICBMCore.contentRegistry.createItem("String_Node_Str",ItemSentryUpgrade.class,false);
  bulletShell=new ItemStack(itemAmmo,1,0);
  conventionalBullet=new ItemStack(itemAmmo,1,1);
  railgunBullet=new ItemStack(itemAmmo,1,2);
  antimatterBullet=new ItemStack(itemAmmo,1,3);
  EntityRegistry.registerGlobalEntityID(EntitySentryFake.class,"String_Node_Str",EntityRegistry.findGlobalUniqueEntityId());
  EntityRegistry.registerModEntity(EntitySentryFake.class,"String_Node_Str",ENTITY_ID_PREFIX + 7,this,50,5,true);
  CreativeTabICBM.itemStack=new ItemStack(blockTurret);
  proxy.preInit();
  Settings.CONFIGURATION.save();
}
Program: 169825
Project: 169825
Buggy source:
@Override public void render(ForgeDirection side,TileSentry tile,float yaw,float pitch){
  GL11.glRotatef(180F,0F,0F,1F);
  GL11.glRotatef(180F,0F,1F,0F);
  GL11.glRotatef(yaw,0F,1F,0F);
  MODEL.renderBody(0.0625F);
  MODEL.renderRadar(0.0625F);
  MODEL.renderCannon(0.0625F,(float)Math.toRadians(pitch));
}

Fixed version (ground truth):
@Override public void render(ForgeDirection side,TileSentry tile,float yaw,float pitch){
  GL11.glTranslatef(0.5f,2.2f,0.5f);
  GL11.glScalef(1.5f,1.5f,1.5f);
  GL11.glRotatef(180F,0F,0F,1F);
  GL11.glRotatef(yaw,0F,1F,0F);
  MODEL.renderBody(0.0625F);
  MODEL.renderRadar(0.0625F);
  MODEL.renderCannon(0.0625F,(float)Math.toRadians(pitch));
}
Program: 169826
Project: 169826
Buggy source:
@Override public void render(ForgeDirection side,TileSentry tile,float yaw,float pitch){
  GL11.glRotatef(180F,0F,0F,1F);
  GL11.glRotatef(180F,0F,1F,0F);
  GL11.glRotatef(yaw,0F,1F,0F);
  MODEL.renderYaw(0.0625F);
  GL11.glRotatef(pitch,1F,0F,0F);
  MODEL.renderYawPitch(0.0625F);
}

Fixed version (ground truth):
@Override public void render(ForgeDirection side,TileSentry tile,float yaw,float pitch){
  GL11.glTranslatef(0.5f,2.2f,0.5f);
  GL11.glScalef(1.5f,1.5f,1.5f);
  GL11.glRotatef(180F,0F,0F,1F);
  GL11.glRotatef(yaw,0F,1F,0F);
  MODEL.renderYaw(0.0625F);
  GL11.glRotatef(pitch,1F,0F,0F);
  MODEL.renderYawPitch(0.0625F);
}
Program: 169827
Project: 169827
Buggy source:
@Override public void render(ForgeDirection side,TileSentry sentry,float yaw,float pitch){
  GL11.glRotatef(180F,0F,0F,1F);
  GL11.glRotatef(180F,0F,1F,0F);
  GL11.glRotatef(yaw,0F,1F,0F);
  MODEL.renderYaw(0.0625F);
  GL11.glRotatef(pitch,1F,0F,0F);
  MODEL.renderYawPitch(0.0625F,0);
}

Fixed version (ground truth):
@Override public void render(ForgeDirection side,TileSentry sentry,float yaw,float pitch){
  GL11.glTranslatef(0.5f,2.2f,0.5f);
  GL11.glScalef(1.5f,1.5f,1.5f);
  GL11.glRotatef(180F,0F,0F,1F);
  GL11.glRotatef(yaw,0F,1F,0F);
  MODEL.renderYaw(0.0625F);
  GL11.glRotatef(pitch,1F,0F,0F);
  MODEL.renderYawPitch(0.0625F,0);
}
Program: 169828
Project: 169828
Buggy source:
@Override public void render(ForgeDirection side,TileSentry tile,float yaw,float pitch){
  GL11.glRotatef(180F,0F,0F,1F);
  GL11.glRotatef(180F,0F,1F,0F);
  MODEL.render((float)Math.toRadians(yaw),(float)Math.toRadians(pitch),0.0625F);
}

Fixed version (ground truth):
@Override public void render(ForgeDirection side,TileSentry tile,float yaw,float pitch){
  GL11.glTranslatef(0.5f,2.2f,0.5f);
  GL11.glScalef(1.5f,1.5f,1.5f);
  GL11.glRotatef(180F,0F,0F,1F);
  MODEL.render((float)Math.toRadians(yaw),(float)Math.toRadians(pitch),0.0625F);
}
Program: 169829
Project: 169829
Buggy source:
public BlockTurretPlatform(int id){
  super(id,"String_Node_Str",UniversalElectricity.machine);
  this.setHardness(100f);
  this.setResistance(50f);
  this.setCreativeTab(CreativeTabICBM.INSTANCE);
  this.requireSidedTextures=true;
}

Fixed version (ground truth):
public BlockTurretPlatform(){
  super("String_Node_Str");
  this.setHardness(100f);
  this.setResistance(50f);
  this.setCreativeTab(CreativeTabICBM.INSTANCE);
  this.requireSidedTextures=true;
}
Program: 169830
Project: 169830
Buggy source:
public BlockTurret(int id){
  super(id,"String_Node_Str",UniversalElectricity.machine);
  this.setCreativeTab(CreativeTabICBM.INSTANCE);
  this.setHardness(100f);
  this.setResistance(50f);
}

Fixed version (ground truth):
public BlockTurret(){
  super("String_Node_Str");
  this.setCreativeTab(CreativeTabICBM.INSTANCE);
  this.setHardness(100f);
  this.setResistance(50f);
}
Program: 169832
Project: 169832
Buggy source:
@Override protected void doPoisonEntity(Vector3 emitPosition,EntityLivingBase entity,int amplifier){
  if (this.isContagious) {
    entity.addPotionEffect(new CustomPotionEffect(PChuanRanDu.INSTANCE.getId(),45 * 20,amplifier,null));
    entity.addPotionEffect(new CustomPotionEffect(Potion.blindness.id,15 * 20,amplifier));
  }
 else {
    entity.addPotionEffect(new CustomPotionEffect(PDaDu.INSTANCE.getId(),30 * 20,amplifier,null));
    entity.addPotionEffect(new CustomPotionEffect(Potion.confusion.id,30 * 20,amplifier));
  }
  entity.addPotionEffect(new CustomPotionEffect(Potion.hunger.id,30 * 20,amplifier));
  entity.addPotionEffect(new CustomPotionEffect(Potion.weakness.id,35 * 20,amplifier));
  entity.addPotionEffect(new CustomPotionEffect(Potion.digSlowdown.id,60 * 20,amplifier));
}

Fixed version (ground truth):
@Override protected void doPoisonEntity(Vector3 emitPosition,EntityLivingBase entity,int amplifier){
  if (this.isContagious) {
    entity.addPotionEffect(new CustomPotionEffect(PoisonContagion.INSTANCE.getId(),45 * 20,amplifier,null));
    entity.addPotionEffect(new CustomPotionEffect(Potion.blindness.id,15 * 20,amplifier));
  }
 else {
    entity.addPotionEffect(new CustomPotionEffect(PoisonToxin.INSTANCE.getId(),30 * 20,amplifier,null));
    entity.addPotionEffect(new CustomPotionEffect(Potion.confusion.id,30 * 20,amplifier));
  }
  entity.addPotionEffect(new CustomPotionEffect(Potion.hunger.id,30 * 20,amplifier));
  entity.addPotionEffect(new CustomPotionEffect(Potion.weakness.id,35 * 20,amplifier));
  entity.addPotionEffect(new CustomPotionEffect(Potion.digSlowdown.id,60 * 20,amplifier));
}
Program: 169835
Project: 169835
Buggy source:
@EventHandler public void preInit(FMLPreInitializationEvent event){
  NetworkRegistry.instance().registerGuiHandler(this,ICBMSentry.proxy);
  MinecraftForge.EVENT_BUS.register(this);
  Settings.CONFIGURATION.load();
  blockTurret=new BlockTurret(BLOCK_ID_PREFIX);
  blockPlatform=new BlockTurretPlatform(BLOCK_ID_PREFIX + 1);
  itemAmmo=new ItemAmmo(ITEM_ID_PREFIX + 1);
  itemUpgrade=new ItemSentryUpgrade(ITEM_ID_PREFIX + 2);
  Settings.CONFIGURATION.save();
  bulletShell=new ItemStack(itemAmmo,1,0);
  conventionalBullet=new ItemStack(itemAmmo,1,1);
  railgunBullet=new ItemStack(itemAmmo,1,2);
  antimatterBullet=new ItemStack(itemAmmo,1,3);
  GameRegistry.registerBlock(blockTurret,ItemBlockTurret.class,"String_Node_Str");
  GameRegistry.registerBlock(blockPlatform,"String_Node_Str");
  EntityRegistry.registerGlobalEntityID(EntitySentryFake.class,"String_Node_Str",EntityRegistry.findGlobalUniqueEntityId());
  EntityRegistry.registerModEntity(EntitySentryFake.class,"String_Node_Str",ENTITY_ID_PREFIX + 7,this,50,5,true);
  CreativeTabICBM.itemStack=new ItemStack(blockTurret);
  proxy.preInit();
}

Fixed version (ground truth):
@EventHandler public void preInit(FMLPreInitializationEvent event){
  NetworkRegistry.instance().registerGuiHandler(this,ICBMSentry.proxy);
  MinecraftForge.EVENT_BUS.register(this);
  SaveManager.registerClass("String_Node_Str",Sentry.class);
  Settings.CONFIGURATION.load();
  blockTurret=new BlockTurret(BLOCK_ID_PREFIX);
  blockPlatform=new BlockTurretPlatform(BLOCK_ID_PREFIX + 1);
  itemAmmo=new ItemAmmo(ITEM_ID_PREFIX + 1);
  itemUpgrade=new ItemSentryUpgrade(ITEM_ID_PREFIX + 2);
  Settings.CONFIGURATION.save();
  bulletShell=new ItemStack(itemAmmo,1,0);
  conventionalBullet=new ItemStack(itemAmmo,1,1);
  railgunBullet=new ItemStack(itemAmmo,1,2);
  antimatterBullet=new ItemStack(itemAmmo,1,3);
  GameRegistry.registerBlock(blockTurret,ItemBlockTurret.class,"String_Node_Str");
  GameRegistry.registerBlock(blockPlatform,"String_Node_Str");
  EntityRegistry.registerGlobalEntityID(EntitySentryFake.class,"String_Node_Str",EntityRegistry.findGlobalUniqueEntityId());
  EntityRegistry.registerModEntity(EntitySentryFake.class,"String_Node_Str",ENTITY_ID_PREFIX + 7,this,50,5,true);
  CreativeTabICBM.itemStack=new ItemStack(blockTurret);
  proxy.preInit();
}
Program: 169836
Project: 169836
Buggy source:
public boolean canFire(){
  return true;
}

Fixed version (ground truth):
public boolean canFire(){
  return false;
}
Program: 169837
Project: 169837
Buggy source:
@Override protected boolean onUpdateTask(){
  super.onUpdateTask();
  if (this.tileEntity instanceof IAutoSentry) {
    if (!this.tileEntity.isValidTarget(this.tileEntity.getTarget())) {
      this.tileEntity.setTarget(null);
      this.tileEntity.cancelRotation();
      return false;
    }
 else     if (this.tileEntity.canActivateWeapon()) {
      this.tileEntity.onWeaponActivated();
    }
 else {
      float[] rotations=this.tileEntity.lookHelper.getDeltaRotations(this.tileEntity.getTargetPosition());
      this.tileEntity.rotateTo(rotations[0],rotations[1]);
    }
  }
  return true;
}

Fixed version (ground truth):
@Override protected boolean onUpdateTask(){
  super.onUpdateTask();
  if (this.sentry() instanceof IAutoSentry) {
    if (!this.sentry().isValidTarget(this.sentry().getTarget())) {
      this.sentry().setTarget(null);
      this.sentry().cancelRotation();
      return false;
    }
 else     if (this.sentry().canActivateWeapon()) {
      this.sentry().onWeaponActivated();
    }
 else {
      float[] rotations=this.sentry().lookHelper.getDeltaRotations(this.sentry().getTargetPosition());
      this.sentry().rotateTo(rotations[0],rotations[1]);
    }
  }
  return true;
}
Program: 169838
Project: 169838
Buggy source:
public void addTask(Task task){
  task.taskManager=this;
  task.world=this.tileEntity.worldObj;
  task.tileEntity=this.tileEntity;
  this.tasks.add(task);
}

Fixed version (ground truth):
public void addTask(Task task){
  task.taskManager=this;
  this.tasks.add(task);
}
Program: 169839
Project: 169839
Buggy source:
@SuppressWarnings("String_Node_Str") @Override protected boolean onUpdateTask(){
  super.onUpdateTask();
  if (this.tileEntity.getTarget() == null || !this.tileEntity.isValidTarget(this.tileEntity.getTarget())) {
    AxisAlignedBB bounds=this.tileEntity.getTargetingBox();
    List<Entity> entities=this.tileEntity.worldObj.getEntitiesWithinAABB(Entity.class,bounds);
    Entity currentTarget=null;
    if (currentTarget == null) {
      double smallestDis=this.tileEntity.maxTargetRange;
      final Vector3 center=this.tileEntity.pos();
      for (      Entity entity : entities) {
        final double distance=center.distance(entity);
        if (this.tileEntity.isValidTarget(entity) && distance <= smallestDis) {
          currentTarget=entity;
          smallestDis=distance;
        }
      }
    }
    if (currentTarget != null) {
      this.tileEntity.cancelRotation();
      this.tileEntity.setTarget(currentTarget);
      return false;
    }
 else     if (this.tileEntity.lastRotateTick > this.world.rand.nextInt(30) + 10) {
      this.tileEntity.rotateTo(this.world.rand.nextInt(360) - 180,this.world.rand.nextInt(30) - 10);
    }
    return true;
  }
 else {
    this.taskManager.addTask(new TaskKillTarget());
  }
  return false;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override protected boolean onUpdateTask(){
  super.onUpdateTask();
  if (this.sentry().getTarget() == null || !this.sentry().isValidTarget(this.sentry().getTarget())) {
    AxisAlignedBB bounds=this.sentry().getTargetingBox();
    List<Entity> entities=this.world().getEntitiesWithinAABB(Entity.class,bounds);
    Entity currentTarget=null;
    if (currentTarget == null) {
      double smallestDis=this.sentry().maxTargetRange;
      final Vector3 center=this.sentry().pos();
      for (      Entity entity : entities) {
        final double distance=center.distance(entity);
        if (this.sentry().isValidTarget(entity) && distance <= smallestDis) {
          currentTarget=entity;
          smallestDis=distance;
        }
      }
    }
    if (currentTarget != null) {
      this.sentry().cancelRotation();
      this.sentry().setTarget(currentTarget);
      return false;
    }
 else     if (this.sentry().lastRotateTick > this.world().rand.nextInt(30) + 10) {
      this.sentry().rotateTo(this.world().rand.nextInt(360) - 180,this.world().rand.nextInt(30) - 10);
    }
    return true;
  }
  return false;
}
Program: 169841
Project: 169841
Buggy source:
@Override public void init(){
  super.init();
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityGunTurret.class,new RenderGunTurret());
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAAGun.class,new RenderAAGun());
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRailGun.class,new RenderRailGun());
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLaserGun.class,new RenderLaserTurret());
  RenderingRegistry.registerEntityRenderingHandler(EntityMountPoint.class,new EmptyRenderer());
  RenderingRegistry.registerBlockHandler(new BlockRenderingHandler());
}

Fixed version (ground truth):
@Override public void init(){
  super.init();
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityGunTurret.class,new RenderGunTurret());
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAAGun.class,new RenderAAGun());
  ClientRegistry.bindTileEntitySpecialRenderer(TileRailGun.class,new RenderRailGun());
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLaserGun.class,new RenderLaserTurret());
  RenderingRegistry.registerEntityRenderingHandler(EntityMountPoint.class,new EmptyRenderer());
  RenderingRegistry.registerBlockHandler(new BlockRenderingHandler());
}
Program: 169842
Project: 169842
Buggy source:
public void init(){
  GameRegistry.registerTileEntity(TileEntityGunTurret.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TileEntityAAGun.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TileEntityRailGun.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TileEntityLaserGun.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TileTurretPlatform.class,"String_Node_Str");
}

Fixed version (ground truth):
public void init(){
  GameRegistry.registerTileEntity(TileEntityGunTurret.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TileEntityAAGun.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TileRailGun.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TileEntityLaserGun.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TileTurretPlatform.class,"String_Node_Str");
}
Program: 169843
Project: 169843
Buggy source:
public EntityTileDamagable(TileEntityTurret host){
  this(host.worldObj);
  this.setPosition(host.xCoord + 0.5,host.yCoord,host.zCoord + 0.5);
  this.host=host;
}

Fixed version (ground truth):
public EntityTileDamagable(TileTurret host){
  this(host.worldObj);
  this.setPosition(host.xCoord + 0.5,host.yCoord,host.zCoord + 0.5);
  this.host=host;
}
Program: 169844
Project: 169844
Buggy source:
@Override public void readSpawnData(ByteArrayDataInput data){
  try {
    TileEntity tileEntity=this.worldObj.getBlockTileEntity(data.readInt(),data.readInt(),data.readInt());
    if (tileEntity instanceof TileEntityTurret) {
      this.host=(TileEntityTurret)tileEntity;
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void readSpawnData(ByteArrayDataInput data){
  try {
    TileEntity tileEntity=this.worldObj.getBlockTileEntity(data.readInt(),data.readInt(),data.readInt());
    if (tileEntity instanceof TileTurret) {
      this.host=(TileTurret)tileEntity;
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 169845
Project: 169845
Buggy source:
public static TileDamageSource doBulletDamage(TileEntityTurret tileEntity){
  return (TileDamageSource)(new TileDamageSource("String_Node_Str",tileEntity).setProjectile());
}

Fixed version (ground truth):
public static TileDamageSource doBulletDamage(TileTurret tileEntity){
  return (TileDamageSource)(new TileDamageSource("String_Node_Str",tileEntity).setProjectile());
}
Program: 169846
Project: 169846
Buggy source:
public static TileDamageSource doLaserDamage(TileEntityTurret tileEntity){
  return (TileDamageSource)(new TileDamageSource("String_Node_Str",tileEntity).setDamageBypassesArmor().setProjectile());
}

Fixed version (ground truth):
public static TileDamageSource doLaserDamage(TileTurret tileEntity){
  return (TileDamageSource)(new TileDamageSource("String_Node_Str",tileEntity).setDamageBypassesArmor().setProjectile());
}
Program: 169847
Project: 169847
Buggy source:
public TileDamageSource(String damageName,TileEntityTurret tileEntity){
  super(damageName,tileEntity.getDamageEntity());
}

Fixed version (ground truth):
public TileDamageSource(String damageName,TileTurret tileEntity){
  super(damageName,tileEntity.getDamageEntity());
}
Program: 169848
Project: 169848
Buggy source:
/** 
 * Gets the turret instance linked to this platform 
 */
public TileEntityTurret getTurret(){
  if (this.cachedTurret == null || this.cachedTurret.isInvalid() || !(new Vector3(this.cachedTurret).equals(new Vector3(this).modifyPositionFromSide(this.getTurretDirection())))) {
    TileEntity tileEntity=new Vector3(this).modifyPositionFromSide(this.getTurretDirection()).getTileEntity(this.worldObj);
    if (tileEntity instanceof TileEntityTurret) {
      this.cachedTurret=(TileEntityTurret)tileEntity;
    }
 else {
      this.cachedTurret=null;
    }
    this.updateEnergyHandler();
  }
  return this.cachedTurret;
}

Fixed version (ground truth):
/** 
 * Gets the turret instance linked to this platform 
 */
public TileTurret getTurret(){
  if (this.cachedTurret == null || this.cachedTurret.isInvalid() || !(new Vector3(this.cachedTurret).equals(new Vector3(this).modifyPositionFromSide(this.getTurretDirection())))) {
    TileEntity tileEntity=new Vector3(this).modifyPositionFromSide(this.getTurretDirection()).getTileEntity(this.worldObj);
    if (tileEntity instanceof TileTurret) {
      this.cachedTurret=(TileTurret)tileEntity;
    }
 else {
      this.cachedTurret=null;
    }
    this.updateEnergyHandler();
  }
  return this.cachedTurret;
}
Program: 169849
Project: 169849
Buggy source:
/** 
 * if a sentry is spawned above the stand it is removed
 * @return
 */
public boolean destroyTurret(){
  TileEntity ent=this.worldObj.getBlockTileEntity(this.xCoord + this.getTurretDirection().offsetX,this.yCoord + this.getTurretDirection().offsetY,this.zCoord + this.getTurretDirection().offsetZ);
  if (ent instanceof TileEntityTurret) {
    this.cachedTurret=null;
    ((TileEntityTurret)ent).destroy(false);
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * if a sentry is spawned above the stand it is removed
 * @return
 */
public boolean destroyTurret(){
  TileEntity ent=this.worldObj.getBlockTileEntity(this.xCoord + this.getTurretDirection().offsetX,this.yCoord + this.getTurretDirection().offsetY,this.zCoord + this.getTurretDirection().offsetZ);
  if (ent instanceof TileTurret) {
    this.cachedTurret=null;
    ((TileTurret)ent).destroy(false);
    return true;
  }
  return false;
}
Program: 169850
Project: 169850
Buggy source:
@Override public void renderTileEntityAt(TileEntity t,double x,double y,double z,float f){
  super.renderTileEntityAt(t,x,y,z,f);
  if (t instanceof TileEntityTurret) {
    TileEntityTurret tileEntity=(TileEntityTurret)t;
    GL11.glPushMatrix();
    GL11.glTranslatef((float)x + 0.5f,(float)y + 1f,(float)z + 0.5f);
    GL11.glScalef(0.7f,0.7f,0.7f);
    this.setTextureBaseOnState(tileEntity);
    render(tileEntity.getYawServo().getRotation(),tileEntity.getPitchServo().getRotation());
    GL11.glPopMatrix();
  }
}

Fixed version (ground truth):
@Override public void renderTileEntityAt(TileEntity t,double x,double y,double z,float f){
  super.renderTileEntityAt(t,x,y,z,f);
  if (t instanceof TileTurret) {
    TileTurret tileEntity=(TileTurret)t;
    GL11.glPushMatrix();
    GL11.glTranslatef((float)x + 0.5f,(float)y + 1f,(float)z + 0.5f);
    GL11.glScalef(0.7f,0.7f,0.7f);
    this.setTextureBaseOnState(tileEntity);
    render(tileEntity.getYawServo().getRotation(),tileEntity.getPitchServo().getRotation());
    GL11.glPopMatrix();
  }
}
Program: 169851
Project: 169851
Buggy source:
@Override public void renderTileEntityAt(TileEntity t,double x,double y,double z,float f){
  super.renderTileEntityAt(t,x,y,z,f);
  if (t instanceof TileEntityTurret) {
    TileEntityTurret tileEntity=(TileEntityTurret)t;
    GL11.glPushMatrix();
    GL11.glTranslatef((float)x + 0.5f,(float)y + 1.5f,(float)z + 0.5f);
    this.setTextureBaseOnState(tileEntity);
    render(tileEntity.getYawServo().getRotation(),tileEntity.getPitchServo().getRotation());
    GL11.glPopMatrix();
  }
}

Fixed version (ground truth):
@Override public void renderTileEntityAt(TileEntity t,double x,double y,double z,float f){
  super.renderTileEntityAt(t,x,y,z,f);
  if (t instanceof TileTurret) {
    TileTurret tileEntity=(TileTurret)t;
    GL11.glPushMatrix();
    GL11.glTranslatef((float)x + 0.5f,(float)y + 1.5f,(float)z + 0.5f);
    this.setTextureBaseOnState(tileEntity);
    render(tileEntity.getYawServo().getRotation(),tileEntity.getPitchServo().getRotation());
    GL11.glPopMatrix();
  }
}
Program: 169852
Project: 169852
Buggy source:
@Override public void renderTileEntityAt(TileEntity t,double x,double y,double z,float f){
  super.renderTileEntityAt(t,x,y,z,f);
  if (t instanceof TileEntityRailGun) {
    TileEntityRailGun tileEntity=(TileEntityRailGun)t;
    GL11.glPushMatrix();
    GL11.glTranslatef((float)x + 0.5F,(float)y + 2.2F,(float)z + 0.5F);
    GL11.glScalef(1.5f,1.5f,1.5f);
    this.bindTexture(TEXTURE);
    GL11.glRotatef(180F,0F,0F,1F);
    GL11.glRotatef(180F,0F,1F,0F);
    MODEL.render((float)Math.toRadians(tileEntity.getYawServo().getRotation()),(float)Math.toRadians(tileEntity.getPitchServo().getRotation()),0.0625F);
    GL11.glPopMatrix();
  }
}

Fixed version (ground truth):
@Override public void renderTileEntityAt(TileEntity t,double x,double y,double z,float f){
  super.renderTileEntityAt(t,x,y,z,f);
  if (t instanceof TileRailGun) {
    TileRailGun tileEntity=(TileRailGun)t;
    GL11.glPushMatrix();
    GL11.glTranslatef((float)x + 0.5F,(float)y + 2.2F,(float)z + 0.5F);
    GL11.glScalef(1.5f,1.5f,1.5f);
    this.bindTexture(TEXTURE);
    GL11.glRotatef(180F,0F,0F,1F);
    GL11.glRotatef(180F,0F,1F,0F);
    MODEL.render((float)Math.toRadians(tileEntity.getYawServo().getRotation()),(float)Math.toRadians(tileEntity.getPitchServo().getRotation()),0.0625F);
    GL11.glPopMatrix();
  }
}
Program: 169853
Project: 169853
Buggy source:
public void setTextureBaseOnState(TileEntityTurret tileEntity){
  EntityPlayer player=this.getPlayer();
  if (tileEntity.getPlatform() != null) {
    if (tileEntity.getPlatform().getOwnerGroup().isMemeber(player.username)) {
      this.bindTexture(TEXTURE_FILE);
      return;
    }
 else     if (tileEntity.getPlatform().getUserAccess(player.username) != null) {
      this.bindTexture(TEXTURE_FILE_FRIENDLY);
      return;
    }
  }
  this.bindTexture(TEXTURE_FILE_HOSTILE);
}

Fixed version (ground truth):
public void setTextureBaseOnState(TileTurret tileEntity){
  EntityPlayer player=this.getPlayer();
  if (tileEntity.getPlatform() != null) {
    if (tileEntity.getPlatform().canUse(Nodes.GROUP_USER_NODE,player)) {
      this.bindTexture(TEXTURE_FILE);
      return;
    }
 else     if (tileEntity.getPlatform().canUse(Nodes.GROUP_USER_NODE,player)) {
      this.bindTexture(TEXTURE_FILE_FRIENDLY);
      return;
    }
  }
  this.bindTexture(TEXTURE_FILE_HOSTILE);
}
Program: 169855
Project: 169855
Buggy source:
public ItemICBMBase(int id,String name){
  super(Settings.CONFIGURATION.getItem("String_Node_Str",id).getInt(id));
  this.setUnlocalizedName(Reference.PREFIX + name);
  this.setCreativeTab(CreativeTabICBM.INSTANCE);
  this.setTextureName(Reference.PREFIX + name);
}

Fixed version (ground truth):
public ItemICBMBase(int id,String name){
  super(Settings.CONFIGURATION.getItem(name,id).getInt(id));
  this.setUnlocalizedName(Reference.PREFIX + name);
  this.setCreativeTab(CreativeTabICBM.INSTANCE);
  this.setTextureName(Reference.PREFIX + name);
}
Program: 169858
Project: 169858
Buggy source:
@ForgeSubscribe public void creeperDropEvent(LivingDropsEvent evt){
  if (evt.entityLiving instanceof EntityCreeper) {
    if (ICBMExplosion.CREEPER_DROP_SULFER) {
      evt.entityLiving.dropItem(this.itemSulfurDust.itemID,1 + evt.entityLiving.worldObj.rand.nextInt(6));
    }
  }
}

Fixed version (ground truth):
@ForgeSubscribe public void creeperDropEvent(LivingDropsEvent evt){
  if (evt.entityLiving instanceof EntityCreeper) {
    if (CREEPER_DROP_SULFER) {
      evt.entityLiving.dropItem(this.itemSulfurDust.itemID,1 + evt.entityLiving.worldObj.rand.nextInt(6));
    }
  }
}
Program: 169859
Project: 169859
Buggy source:
@ForgeSubscribe public void creeperDeathEvent(LivingDeathEvent evt){
  if (evt.entityLiving instanceof EntityCreeper) {
    if (ICBMExplosion.CREEPER_BLOW_UP_IN_FIRE) {
      if (evt.source == DamageSource.onFire || evt.source == DamageSource.inFire) {
        evt.setCanceled(true);
        boolean flag=evt.entityLiving.worldObj.getGameRules().getGameRuleBooleanValue("String_Node_Str");
        if (((EntityCreeper)evt.entityLiving).getPowered()) {
          evt.entityLiving.worldObj.createExplosion(evt.entityLiving,evt.entityLiving.posX,evt.entityLiving.posY,evt.entityLiving.posZ,6f,flag);
        }
 else {
          evt.entityLiving.worldObj.createExplosion(evt.entityLiving,evt.entityLiving.posX,evt.entityLiving.posY,evt.entityLiving.posZ,3f,flag);
        }
      }
    }
  }
}

Fixed version (ground truth):
@ForgeSubscribe public void creeperDeathEvent(LivingDeathEvent evt){
  if (evt.entityLiving instanceof EntityCreeper) {
    if (CREEPER_BLOW_UP_IN_FIRE) {
      if (evt.source == DamageSource.onFire || evt.source == DamageSource.inFire) {
        evt.setCanceled(true);
        boolean flag=evt.entityLiving.worldObj.getGameRules().getGameRuleBooleanValue("String_Node_Str");
        if (((EntityCreeper)evt.entityLiving).getPowered()) {
          evt.entityLiving.worldObj.createExplosion(evt.entityLiving,evt.entityLiving.posX,evt.entityLiving.posY,evt.entityLiving.posZ,6f,flag);
        }
 else {
          evt.entityLiving.worldObj.createExplosion(evt.entityLiving,evt.entityLiving.posX,evt.entityLiving.posY,evt.entityLiving.posZ,3f,flag);
        }
      }
    }
  }
}
Program: 169860
Project: 169860
Buggy source:
public GuiLauncherScreen(TileLauncherScreen par2ICBMTileEntityMissileLauncher){
  this.tileEntity=par2ICBMTileEntityMissileLauncher;
}

Fixed version (ground truth):
public GuiLauncherScreen(TileLauncherScreen tileEntity){
  super(tileEntity);
  this.tileEntity=tileEntity;
}
Program: 169861
Project: 169861
Buggy source:
/** 
 * Adds the buttons (and other controls) to the screen in question. 
 */
@Override public void initGui(){
  super.initGui();
  this.tFX=new GuiTextField(fontRenderer,110,37,45,12);
  this.tFZ=new GuiTextField(fontRenderer,110,52,45,12);
  this.tFY=new GuiTextField(fontRenderer,110,67,45,12);
  this.tFGaoDu=new GuiTextField(fontRenderer,110,82,45,12);
  this.tFFreq=new GuiTextField(fontRenderer,110,97,45,12);
  this.tFFreq.setMaxStringLength(4);
  this.tFX.setMaxStringLength(6);
  this.tFZ.setMaxStringLength(6);
  this.tFY.setMaxStringLength(3);
  this.tFGaoDu.setMaxStringLength(3);
  this.tFFreq.setText(this.tileEntity.getFrequency() + "String_Node_Str");
  this.tFGaoDu.setText(this.tileEntity.gaoDu + "String_Node_Str");
  if (this.tileEntity.getTarget() == null) {
    this.tFX.setText(Math.round(this.tileEntity.xCoord) + "String_Node_Str");
    this.tFZ.setText(Math.round(this.tileEntity.zCoord) + "String_Node_Str");
    this.tFY.setText("String_Node_Str");
  }
 else {
    this.tFX.setText(Math.round(this.tileEntity.getTarget().x) + "String_Node_Str");
    this.tFZ.setText(Math.round(this.tileEntity.getTarget().z) + "String_Node_Str");
    this.tFY.setText(Math.round(this.tileEntity.getTarget().y) + "String_Node_Str");
  }
  PacketDispatcher.sendPacketToServer(ICBMCore.PACKET_TILE.getPacket(this.tileEntity,-1,true));
}

Fixed version (ground truth):
/** 
 * Adds the buttons (and other controls) to the screen in question. 
 */
@Override public void initGui(){
  super.initGui();
  this.tFX=new GuiTextField(fontRenderer,110,37,45,12);
  this.tFZ=new GuiTextField(fontRenderer,110,52,45,12);
  this.tFY=new GuiTextField(fontRenderer,110,67,45,12);
  this.tFGaoDu=new GuiTextField(fontRenderer,110,82,45,12);
  this.tFFreq=new GuiTextField(fontRenderer,110,97,45,12);
  this.tFFreq.setMaxStringLength(4);
  this.tFX.setMaxStringLength(6);
  this.tFZ.setMaxStringLength(6);
  this.tFY.setMaxStringLength(3);
  this.tFGaoDu.setMaxStringLength(3);
  this.tFFreq.setText(this.tileEntity.getFrequency() + "String_Node_Str");
  this.tFGaoDu.setText(this.tileEntity.gaoDu + "String_Node_Str");
  if (this.tileEntity.getTarget() == null) {
    this.tFX.setText(Math.round(this.tileEntity.xCoord) + "String_Node_Str");
    this.tFZ.setText(Math.round(this.tileEntity.zCoord) + "String_Node_Str");
    this.tFY.setText("String_Node_Str");
  }
 else {
    this.tFX.setText(Math.round(this.tileEntity.getTarget().x) + "String_Node_Str");
    this.tFZ.setText(Math.round(this.tileEntity.getTarget().z) + "String_Node_Str");
    this.tFY.setText(Math.round(this.tileEntity.getTarget().y) + "String_Node_Str");
  }
}
Program: 169862
Project: 169862
Buggy source:
public Packet getDescriptionPacket2(){
  return ICBMCore.PACKET_TILE.getPacket(this,3,this.energy.getEnergy(),this.targetPos.x,this.targetPos.y,this.targetPos.z);
}

Fixed version (ground truth):
public Packet getDescriptionPacket2(){
  return ICBMCore.PACKET_TILE.getPacket(this,4,this.energy.getEnergy(),this.targetPos.intX(),this.targetPos.intY(),this.targetPos.intZ());
}
Program: 169863
Project: 169863
Buggy source:
@Override public void onReceivePacket(ByteArrayDataInput data,EntityPlayer player,Object... extra){
  try {
switch (data.readInt()) {
case 0:
{
        this.fangXiang=data.readByte();
        this.tier=data.readInt();
        this.setFrequency(data.readInt());
        this.gaoDu=data.readShort();
        break;
      }
case 1:
{
      this.setFrequency(data.readInt());
      break;
    }
case 2:
{
    this.targetPos=new Vector3(data.readDouble(),data.readDouble(),data.readDouble());
    if (this.getTier() < 2) {
      this.targetPos.y=0;
    }
    break;
  }
case 3:
{
  this.gaoDu=(short)Math.max(Math.min(data.readShort(),Short.MAX_VALUE),3);
  break;
}
case 4:
{
this.energy.setEnergy(data.readLong());
this.targetPos=new Vector3(data.readDouble(),data.readDouble(),data.readDouble());
break;
}
}
}
 catch (Exception e) {
e.printStackTrace();
}
}

Fixed version (ground truth):
@Override public void onReceivePacket(ByteArrayDataInput data,EntityPlayer player,Object... extra){
  try {
switch (data.readInt()) {
case -1:
{
        if (data.readBoolean())         this.playersUsing.add(player);
 else         this.playersUsing.remove(player);
        break;
      }
case 0:
{
      this.fangXiang=data.readByte();
      this.tier=data.readInt();
      this.setFrequency(data.readInt());
      this.gaoDu=data.readShort();
      break;
    }
case 1:
{
    this.setFrequency(data.readInt());
    break;
  }
case 2:
{
  this.targetPos=new Vector3(data.readDouble(),data.readDouble(),data.readDouble());
  if (this.getTier() < 2) {
    this.targetPos.y=0;
  }
  break;
}
case 3:
{
this.gaoDu=(short)Math.max(Math.min(data.readShort(),Short.MAX_VALUE),3);
break;
}
case 4:
{
this.energy.setEnergy(data.readLong());
this.targetPos=new Vector3(data.readInt(),data.readInt(),data.readInt());
break;
}
}
}
 catch (Exception e) {
e.printStackTrace();
}
}
Program: 169864
Project: 169864
Buggy source:
@Override public void updateEntity(){
  super.updateEntity();
  if (this.laucherBase == null) {
    for (byte i=2; i < 6; i++) {
      Vector3 position=new Vector3(this.xCoord,this.yCoord,this.zCoord);
      position.modifyPositionFromSide(ForgeDirection.getOrientation(i));
      TileEntity tileEntity=this.worldObj.getBlockTileEntity(position.intX(),position.intY(),position.intZ());
      if (tileEntity != null) {
        if (tileEntity instanceof TileLauncherBase) {
          this.laucherBase=(TileLauncherBase)tileEntity;
          this.fangXiang=i;
        }
      }
    }
  }
 else {
    if (this.laucherBase.isInvalid()) {
      this.laucherBase=null;
    }
  }
  if (isPowered) {
    isPowered=false;
    this.launch();
  }
  if (!this.worldObj.isRemote) {
    if (this.ticks % 3 == 0) {
      if (this.targetPos == null) {
        this.targetPos=new Vector3(this.xCoord,0,this.zCoord);
      }
      for (      EntityPlayer wanJia : this.playersUsing) {
        PacketDispatcher.sendPacketToPlayer(this.getDescriptionPacket2(),(Player)wanJia);
      }
    }
    if (this.ticks % 600 == 0) {
      this.worldObj.markBlockForUpdate(this.xCoord,this.yCoord,this.zCoord);
    }
  }
}

Fixed version (ground truth):
@Override public void updateEntity(){
  super.updateEntity();
  if (this.laucherBase == null) {
    for (byte i=2; i < 6; i++) {
      Vector3 position=new Vector3(this.xCoord,this.yCoord,this.zCoord);
      position.modifyPositionFromSide(ForgeDirection.getOrientation(i));
      TileEntity tileEntity=this.worldObj.getBlockTileEntity(position.intX(),position.intY(),position.intZ());
      if (tileEntity != null) {
        if (tileEntity instanceof TileLauncherBase) {
          this.laucherBase=(TileLauncherBase)tileEntity;
          this.fangXiang=i;
        }
      }
    }
  }
 else {
    if (this.laucherBase.isInvalid()) {
      this.laucherBase=null;
    }
  }
  if (isPowered) {
    isPowered=false;
    this.launch();
  }
  if (!this.worldObj.isRemote) {
    if (this.ticks % 3 == 0) {
      if (this.targetPos == null) {
        this.targetPos=new Vector3(this.xCoord,0,this.zCoord);
      }
      for (      EntityPlayer players : this.playersUsing) {
        PacketDispatcher.sendPacketToPlayer(this.getDescriptionPacket2(),(Player)players);
      }
    }
    if (this.ticks % 600 == 0) {
      this.worldObj.markBlockForUpdate(this.xCoord,this.yCoord,this.zCoord);
    }
  }
}
Program: 169865
Project: 169865
Buggy source:
public long getEnergyCapacity(){
switch (this.getTier()) {
case 0:
    return 500000;
case 1:
  return 800000;
}
return 1000000;
}

Fixed version (ground truth):
public long getEnergyCapacity(){
switch (this.getTier()) {
case 0:
    return 5000000;
case 1:
  return 8000000;
}
return 10000000;
}
Program: 169867
Project: 169867
Buggy source:
@Override public Object getClientGuiElement(int ID,EntityPlayer entityPlayer,World world,int x,int y,int z){
  TileEntity tileEntity=world.getBlockTileEntity(x,y,z);
  if (tileEntity instanceof TileEntityCruiseLauncher) {
    return new GuiCruiseLauncher(entityPlayer.inventory,(TileEntityCruiseLauncher)tileEntity);
  }
 else   if (tileEntity instanceof TileEntityLauncherScreen) {
    return new GuiLauncherScreen(((TileEntityLauncherScreen)tileEntity));
  }
 else   if (tileEntity instanceof TileEntityRadarStation) {
    return new GuiRadarStation(((TileEntityRadarStation)tileEntity));
  }
 else   if (tileEntity instanceof TileEMPTower) {
    return new GuiEmpTower((TileEMPTower)tileEntity);
  }
 else   if (tileEntity instanceof TileLauncherBase) {
    return new GuiLauncherBase(entityPlayer.inventory,(TileLauncherBase)tileEntity);
  }
 else   if (tileEntity instanceof TileMissileCoordinator) {
    return new GuiMissileCoordinator(entityPlayer.inventory,(TileMissileCoordinator)tileEntity);
  }
 else   if (tileEntity instanceof TileMissileAssembler) {
    return new GuiMissileTable(entityPlayer.inventory,((TileMissileAssembler)tileEntity));
  }
  return null;
}

Fixed version (ground truth):
@Override public Object getClientGuiElement(int ID,EntityPlayer entityPlayer,World world,int x,int y,int z){
  TileEntity tileEntity=world.getBlockTileEntity(x,y,z);
  if (tileEntity instanceof TileCruiseLauncher) {
    return new GuiCruiseLauncher(entityPlayer.inventory,(TileCruiseLauncher)tileEntity);
  }
 else   if (tileEntity instanceof TileLauncherScreen) {
    return new GuiLauncherScreen(((TileLauncherScreen)tileEntity));
  }
 else   if (tileEntity instanceof TileRadarStation) {
    return new GuiRadarStation(((TileRadarStation)tileEntity));
  }
 else   if (tileEntity instanceof TileEMPTower) {
    return new GuiEmpTower((TileEMPTower)tileEntity);
  }
 else   if (tileEntity instanceof TileLauncherBase) {
    return new GuiLauncherBase(entityPlayer.inventory,(TileLauncherBase)tileEntity);
  }
 else   if (tileEntity instanceof TileMissileCoordinator) {
    return new GuiMissileCoordinator(entityPlayer.inventory,(TileMissileCoordinator)tileEntity);
  }
 else   if (tileEntity instanceof TileMissileAssembler) {
    return new GuiMissileTable(entityPlayer.inventory,((TileMissileAssembler)tileEntity));
  }
  return null;
}