nus-yam/ex-repair huggingface dataset:
Program: 169915
Project: 169915
Buggy source:
/** 
 * Ticks the block if it's been scheduled
 */
@Override public void updateTick(World world,int x,int y,int z,Random rand){
  if (!world.isRemote) {
    if (this.isRandomlyRadioactive) {
      AxisAlignedBB bounds=AxisAlignedBB.getBoundingBox(x - this.radius,y - this.radius,z - this.radius,x + this.radius,y + this.radius,z + this.radius);
      List<EntityLiving> entitiesNearby=world.getEntitiesWithinAABB(EntityLiving.class,bounds);
      for (      EntityLiving entity : entitiesNearby) {
        PoisonRadiation.INSTANCE.poisonEntity(new Vector3(x,y,z),entity,amplifier);
      }
    }
    if (this.canSpread) {
      for (int i=0; i < 4; ++i) {
        int newX=x + rand.nextInt(3) - 1;
        int newY=y + rand.nextInt(5) - 3;
        int newZ=z + rand.nextInt(3) - 1;
        int blockID=world.getBlockId(newX,newY,newZ);
        if (rand.nextFloat() > 0.4 && (blockID == Block.tilledField.blockID || blockID == Block.grass.blockID)) {
          world.setBlockMetadataWithNotify(newX,newY,newZ,this.blockID,2);
        }
      }
      if (rand.nextFloat() > 0.85) {
        world.setBlockMetadataWithNotify(x,y,z,Block.mycelium.blockID,2);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Ticks the block if it's been scheduled
 */
@Override public void updateTick(World world,int x,int y,int z,Random rand){
  if (!world.isRemote) {
    if (this.isRandomlyRadioactive) {
      AxisAlignedBB bounds=AxisAlignedBB.getBoundingBox(x - this.radius,y - this.radius,z - this.radius,x + this.radius,y + this.radius,z + this.radius);
      List<EntityLivingBase> entitiesNearby=world.getEntitiesWithinAABB(EntityLivingBase.class,bounds);
      for (      EntityLivingBase entity : entitiesNearby) {
        PoisonRadiation.INSTANCE.poisonEntity(new Vector3(x,y,z),entity,amplifier);
      }
    }
    if (this.canSpread) {
      for (int i=0; i < 4; ++i) {
        int newX=x + rand.nextInt(3) - 1;
        int newY=y + rand.nextInt(5) - 3;
        int newZ=z + rand.nextInt(3) - 1;
        int blockID=world.getBlockId(newX,newY,newZ);
        if (rand.nextFloat() > 0.4 && (blockID == Block.tilledField.blockID || blockID == Block.grass.blockID)) {
          world.setBlockMetadataWithNotify(newX,newY,newZ,this.blockID,2);
        }
      }
      if (rand.nextFloat() > 0.85) {
        world.setBlockMetadataWithNotify(x,y,z,Block.mycelium.blockID,2);
      }
    }
  }
}
Program: 169916
Project: 169916
Buggy source:
public void poisonEntity(Vector3 emitPosition,EntityLiving entity){
  this.poisonEntity(emitPosition,entity,0);
}

Fixed version (ground truth):
public void poisonEntity(Vector3 emitPosition,EntityLivingBase entity){
  this.poisonEntity(emitPosition,entity,0);
}
Program: 169918
Project: 169918
Buggy source:
@Override public void doExplode(){
  if (!this.worldObj.isRemote) {
    if (this.thread.isComplete) {
      for (      Vector3 targetPosition : this.thread.results) {
        int blockID=targetPosition.getBlockID(worldObj);
        if (blockID > 0) {
          if (blockID == Block.grass.blockID || blockID == Block.sand.blockID) {
            if (worldObj.rand.nextFloat() > 0.96) {
              targetPosition.setBlock(worldObj,ZhuYaoICBM.bFuShe.blockID);
            }
          }
          if (blockID == Block.stone.blockID) {
            if (worldObj.rand.nextFloat() > 0.99) {
              targetPosition.setBlock(worldObj,ZhuYaoICBM.bFuShe.blockID);
            }
          }
 else           if (blockID == Block.leaves.blockID) {
            targetPosition.setBlock(worldObj,0);
          }
 else           if (blockID == Block.tallGrass.blockID) {
            if (Math.random() * 100 > 50) {
              targetPosition.setBlock(worldObj,Block.cobblestone.blockID);
            }
 else {
              targetPosition.setBlock(worldObj,0);
            }
          }
 else           if (blockID == Block.tilledField.blockID) {
            targetPosition.setBlock(worldObj,ZhuYaoICBM.bFuShe.blockID);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
@Override public void doExplode(){
  if (!this.worldObj.isRemote) {
    if (this.thread.isComplete) {
      for (      Vector3 targetPosition : this.thread.results) {
        int blockID=targetPosition.getBlockID(this.worldObj);
        if (blockID > 0) {
          if (blockID == Block.grass.blockID || blockID == Block.sand.blockID) {
            if (this.worldObj.rand.nextFloat() > 0.96) {
              targetPosition.setBlock(this.worldObj,ZhuYaoICBM.bFuShe.blockID);
            }
          }
          if (blockID == Block.stone.blockID) {
            if (this.worldObj.rand.nextFloat() > 0.99) {
              targetPosition.setBlock(this.worldObj,ZhuYaoICBM.bFuShe.blockID);
            }
          }
 else           if (blockID == Block.leaves.blockID) {
            targetPosition.setBlock(this.worldObj,0);
          }
 else           if (blockID == Block.tallGrass.blockID) {
            if (Math.random() * 100 > 50) {
              targetPosition.setBlock(this.worldObj,Block.cobblestone.blockID);
            }
 else {
              targetPosition.setBlock(this.worldObj,0);
            }
          }
 else           if (blockID == Block.tilledField.blockID) {
            targetPosition.setBlock(this.worldObj,ZhuYaoICBM.bFuShe.blockID);
          }
 else           if (blockID == Block.waterStill.blockID || blockID == Block.waterMoving.blockID) {
            if (FluidRegistry.getFluid("String_Node_Str") != null) {
              targetPosition.setBlock(this.worldObj,FluidRegistry.getFluid("String_Node_Str").getBlockID());
            }
          }
        }
      }
      this.controller.endExplosion();
    }
  }
}
Program: 169919
Project: 169919
Buggy source:
@Override public void doPreExplode(){
  if (!worldObj.isRemote) {
    this.thread=new ThrSheXian(worldObj,position,(int)this.getRadius(),this.nengLiang,this.exploder);
    this.thread.run();
  }
}

Fixed version (ground truth):
@Override public void doPreExplode(){
  if (!this.worldObj.isRemote) {
    this.thread=new ThrSheXian(worldObj,position,(int)this.getRadius(),this.nengLiang,this.exploder);
    this.thread.run();
  }
}
Program: 169921
Project: 169921
Buggy source:
@SideOnly(Side.CLIENT) @Override public void registerIcons(IconRegister par1IconRegister){
  this.blockIcon=par1IconRegister.registerIcon(this.getUnlocalizedName2());
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public void registerIcons(IconRegister par1IconRegister){
  this.blockIcon=par1IconRegister.registerIcon(this.getUnlocalizedName().replace("String_Node_Str","String_Node_Str"));
}
Program: 169922
Project: 169922
Buggy source:
@SideOnly(Side.CLIENT) @Override public void registerIcons(IconRegister iconRegister){
  super.registerIcons(iconRegister);
  this.iconCompact=iconRegister.registerIcon(this.getUnlocalizedName2() + "String_Node_Str");
  this.iconReinforced=iconRegister.registerIcon(this.getUnlocalizedName2() + "String_Node_Str");
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public void registerIcons(IconRegister iconRegister){
  super.registerIcons(iconRegister);
  this.iconCompact=iconRegister.registerIcon(this.getUnlocalizedName().replace("String_Node_Str","String_Node_Str") + "String_Node_Str");
  this.iconReinforced=iconRegister.registerIcon(this.getUnlocalizedName().replace("String_Node_Str","String_Node_Str") + "String_Node_Str");
}
Program: 169923
Project: 169923
Buggy source:
@Override public void onEMP(World world,Vector3 position,IExplosive empExplosive){
  TileEntity tileEntity=position.getTileEntity(world);
  if (tileEntity instanceof TYinXing) {
    ((TYinXing)tileEntity).setFangGe(0,0);
    ((TYinXing)tileEntity).setQing(false);
    world.markBlockForRenderUpdate(position.intX(),position.intY(),position.intZ());
  }
}

Fixed version (ground truth):
@Override public void onEMP(World world,Vector3 position,IExplosion empExplosive){
  TileEntity tileEntity=position.getTileEntity(world);
  if (tileEntity instanceof TYinXing) {
    ((TYinXing)tileEntity).setFangGe(0,0);
    ((TYinXing)tileEntity).setQing(false);
    world.markBlockForRenderUpdate(position.intX(),position.intY(),position.intZ());
  }
}
Program: 169924
Project: 169924
Buggy source:
@SideOnly(Side.CLIENT) @Override public void registerIcons(IconRegister iconRegister){
  super.registerIcons(iconRegister);
  this.iconPoison=iconRegister.registerIcon(this.getUnlocalizedName2() + "String_Node_Str");
  this.iconFlammable=iconRegister.registerIcon(this.getUnlocalizedName2() + "String_Node_Str");
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public void registerIcons(IconRegister iconRegister){
  super.registerIcons(iconRegister);
  this.iconPoison=iconRegister.registerIcon(this.getUnlocalizedName().replace("String_Node_Str","String_Node_Str") + "String_Node_Str");
  this.iconFlammable=iconRegister.registerIcon(this.getUnlocalizedName().replace("String_Node_Str","String_Node_Str") + "String_Node_Str");
}
Program: 169925
Project: 169925
Buggy source:
@Override public boolean interact(EntityPlayer par1EntityPlayer){
  if (par1EntityPlayer.getCurrentEquippedItem() != null) {
    if (par1EntityPlayer.getCurrentEquippedItem().itemID == Item.flintAndSteel.itemID) {
      this.ignite();
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean interact(EntityPlayer par1EntityPlayer){
  if (par1EntityPlayer.getCurrentEquippedItem() != null) {
    if (par1EntityPlayer.getCurrentEquippedItem().itemID == Item.flintAndSteel.itemID) {
      this.ignite();
      return true;
    }
  }
  return false;
}
Program: 169926
Project: 169926
Buggy source:
@Override public IExplosive getExplosiveType(){
  return ZhaPin.list[this.haoMa];
}

Fixed version (ground truth):
@Override public IExplosive getExplosiveType(){
  return ZhaPinRegistry.get(this.haoMa);
}
Program: 169927
Project: 169927
Buggy source:
@Override protected void explodeCart(double par1){
  this.worldObj.spawnParticle("String_Node_Str",this.posX,this.posY,this.posZ,0.0D,0.0D,0.0D);
  ZhaPin.createBaoZha(this.worldObj,new Vector3(this),this,this.haoMa);
  this.setDead();
}

Fixed version (ground truth):
@Override protected void explodeCart(double par1){
  this.worldObj.spawnParticle("String_Node_Str",this.posX,this.posY,this.posZ,0.0D,0.0D,0.0D);
  this.getExplosiveType().createExplosion(this.worldObj,this.posX,this.posY,this.posZ,this);
  this.setDead();
}
Program: 169928
Project: 169928
Buggy source:
@Override public void getSubItems(int par1,CreativeTabs par2CreativeTabs,List par3List){
  for (int metadata=0; metadata < ZhaPin.E_ER_ID; metadata++) {
    par3List.add(new ItemStack(par1,1,metadata));
  }
}

Fixed version (ground truth):
@Override public void getSubItems(int par1,CreativeTabs par2CreativeTabs,List par3List){
  for (  ZhaPin zhaPin : ZhaPinRegistry.getAllZhaPin()) {
    if (zhaPin.getTier() <= 2) {
      par3List.add(new ItemStack(par1,1,zhaPin.getID()));
    }
  }
}
Program: 169929
Project: 169929
Buggy source:
@Override public String getUnlocalizedName(ItemStack itemstack){
  return "String_Node_Str" + ZhaPin.list[itemstack.getItemDamage()].getUnlocalizedName();
}

Fixed version (ground truth):
@Override public String getUnlocalizedName(ItemStack itemstack){
  return "String_Node_Str" + ZhaPinRegistry.get(itemstack.getItemDamage()).getUnlocalizedName();
}
Program: 169931
Project: 169931
Buggy source:
@Override public double getMaxElectricityStored(ItemStack itemStack){
  return 100000;
}

Fixed version (ground truth):
@Override public float getMaxElectricityStored(ItemStack itemStack){
  return 100000;
}
Program: 169933
Project: 169933
Buggy source:
/** 
 * Draw the background layer for the GuiContainer (everything behind the items)
 */
@Override protected void drawBackgroundLayer(int var2,int var3,float var1){
  this.mc.renderEngine.bindTexture(ZhuYaoICBM.GUI_PATH + "String_Node_Str");
  GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
  containerWidth=(this.width - this.xSize) / 2;
  containerHeight=(this.height - this.ySize) / 2;
  this.drawTexturedModalRect(containerWidth,containerHeight,0,0,this.xSize,this.ySize);
}

Fixed version (ground truth):
/** 
 * Draw the background layer for the GuiContainer (everything behind the items)
 */
@Override protected void drawBackgroundLayer(int var2,int var3,float var1){
  FMLClientHandler.instance().getClient().renderEngine.func_110577_a(TEXTURE);
  GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
  containerWidth=(this.width - this.xSize) / 2;
  containerHeight=(this.height - this.ySize) / 2;
  this.drawTexturedModalRect(containerWidth,containerHeight,0,0,this.xSize,this.ySize);
}
Program: 169934
Project: 169934
Buggy source:
/** 
 * Draw the foreground layer for the GuiContainer (everything in front of the items)
 */
@Override protected void drawForegroundLayer(int var2,int var3,float var1){
  this.fontRenderer.drawString("String_Node_Str",65,6,4210752);
  this.fontRenderer.drawString("String_Node_Str",12,30,4210752);
  this.textFieldBanJing.drawTextBox();
  this.fontRenderer.drawString("String_Node_Str",12,55,4210752);
  String mode="String_Node_Str";
  if (this.tileEntity.muoShi == 1) {
    mode="String_Node_Str";
  }
 else   if (this.tileEntity.muoShi == 2) {
    mode="String_Node_Str";
  }
  this.fontRenderer.drawString("String_Node_Str" + mode,12,105,4210752);
  String color="String_Node_Str";
  String status="String_Node_Str";
  if (this.tileEntity.isDisabled()) {
    status="String_Node_Str";
  }
 else   if (this.tileEntity.getJoules() < this.tileEntity.getMaxJoules()) {
    status="String_Node_Str";
  }
 else {
    color="String_Node_Str";
    status="String_Node_Str";
  }
  this.fontRenderer.drawString(color + "String_Node_Str" + status,12,120,4210752);
  this.fontRenderer.drawString("String_Node_Str" + this.tileEntity.getVoltage() + "String_Node_Str",12,135,4210752);
  this.fontRenderer.drawString(ElectricityDisplay.getDisplayShort(this.tileEntity.getJoules(),ElectricUnit.JOULES) + "String_Node_Str" + ElectricityDisplay.getDisplayShort(this.tileEntity.getMaxJoules(),ElectricUnit.JOULES),12,150,4210752);
}

Fixed version (ground truth):
/** 
 * Draw the foreground layer for the GuiContainer (everything in front of the items)
 */
@Override protected void drawForegroundLayer(int var2,int var3,float var1){
  this.fontRenderer.drawString("String_Node_Str",65,6,4210752);
  this.fontRenderer.drawString("String_Node_Str",12,30,4210752);
  this.textFieldBanJing.drawTextBox();
  this.fontRenderer.drawString("String_Node_Str",12,55,4210752);
  String mode="String_Node_Str";
  if (this.tileEntity.muoShi == 1) {
    mode="String_Node_Str";
  }
 else   if (this.tileEntity.muoShi == 2) {
    mode="String_Node_Str";
  }
  this.fontRenderer.drawString("String_Node_Str" + mode,12,105,4210752);
  String color="String_Node_Str";
  String status="String_Node_Str";
  if (this.tileEntity.getEnergyStored() < this.tileEntity.getMaxEnergyStored()) {
    status="String_Node_Str";
  }
 else {
    color="String_Node_Str";
    status="String_Node_Str";
  }
  this.fontRenderer.drawString(color + "String_Node_Str" + status,12,120,4210752);
  this.fontRenderer.drawString("String_Node_Str" + this.tileEntity.getVoltage() + "String_Node_Str",12,135,4210752);
  this.fontRenderer.drawString(ElectricityDisplay.getDisplayShort(this.tileEntity.getEnergyStored(),ElectricUnit.JOULES) + "String_Node_Str" + ElectricityDisplay.getDisplayShort(this.tileEntity.getMaxEnergyStored(),ElectricUnit.JOULES),12,150,4210752);
}
Program: 169935
Project: 169935
Buggy source:
/** 
 * Draw the background layer for the GuiContainer (everything behind the items)
 */
@Override protected void drawGuiContainerBackgroundLayer(float par1,int par2,int par3){
  this.mc.renderEngine.bindTexture(ZhuYaoICBM.GUI_PATH + "String_Node_Str");
  GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
  containerWidth=(this.width - this.xSize) / 2;
  containerHeight=(this.height - this.ySize) / 2;
  this.drawTexturedModalRect(containerWidth,containerHeight,0,0,this.xSize,this.ySize);
}

Fixed version (ground truth):
/** 
 * Draw the background layer for the GuiContainer (everything behind the items)
 */
@Override protected void drawGuiContainerBackgroundLayer(float par1,int par2,int par3){
  FMLClientHandler.instance().getClient().renderEngine.func_110577_a(TEXTURE);
  GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
  containerWidth=(this.width - this.xSize) / 2;
  containerHeight=(this.height - this.ySize) / 2;
  this.drawTexturedModalRect(containerWidth,containerHeight,0,0,this.xSize,this.ySize);
}
Program: 169936
Project: 169936
Buggy source:
@Override protected void drawBackgroundLayer(int var2,int var3,float var1){
  this.mc.renderEngine.bindTexture(ZhuYaoICBM.GUI_PATH + "String_Node_Str");
  GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
  containerWidth=(this.width - this.xSize) / 2;
  containerHeight=(this.height - this.ySize) / 2;
  this.drawTexturedModalRect(containerWidth,containerHeight,0,0,this.xSize,this.ySize);
}

Fixed version (ground truth):
@Override protected void drawBackgroundLayer(int var2,int var3,float var1){
  FMLClientHandler.instance().getClient().renderEngine.func_110577_a(TEXTURE);
  GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
  containerWidth=(this.width - this.xSize) / 2;
  containerHeight=(this.height - this.ySize) / 2;
  this.drawTexturedModalRect(containerWidth,containerHeight,0,0,this.xSize,this.ySize);
}
Program: 169939
Project: 169939
Buggy source:
public EntityTileDamagable(TPaoDaiBase 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(TPaoTaiBase host){
  this(host.worldObj);
  this.setPosition(host.xCoord + 0.5,host.yCoord,host.zCoord + 0.5);
  this.host=host;
}
Program: 169940
Project: 169940
Buggy source:
@Override public void readSpawnData(ByteArrayDataInput data){
  try {
    TileEntity tileEntity=this.worldObj.getBlockTileEntity(data.readInt(),data.readInt(),data.readInt());
    if (tileEntity instanceof TPaoDaiBase) {
      this.host=(TPaoDaiBase)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 TPaoTaiBase) {
      this.host=(TPaoTaiBase)tileEntity;
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 169941
Project: 169941
Buggy source:
public static TileDamageSource doBulletDamage(TPaoDaiBase tileEntity){
  return (TileDamageSource)(new TileDamageSource("String_Node_Str",tileEntity).setProjectile());
}

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

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

Fixed version (ground truth):
public TileDamageSource(String damageName,TPaoTaiBase tileEntity){
  super(damageName,tileEntity.getDamageEntity());
}
Program: 169944
Project: 169944
Buggy source:
@Override public boolean onMachineActivated(World world,int x,int y,int z,EntityPlayer player,int side,float hitX,float hitY,float hitZ){
  TileEntity tileEntity=world.getBlockTileEntity(x,y,z);
  if (tileEntity instanceof TPaoTaiZhan) {
    if (player.getCurrentEquippedItem() != null) {
      if (side == ((TPaoTaiZhan)tileEntity).deployDirection.ordinal() && player.getCurrentEquippedItem().itemID == ZhuYaoGangShao.blockTurret.blockID) {
        return false;
      }
    }
    if (((TPaoTaiZhan)tileEntity).getTurret(false) != null) {
      if (!world.isRemote) {
        player.openGui(ZhuYaoGangShao.instance,CommonProxy.GUI_PLATFORM_ID,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 player,int side,float hitX,float hitY,float hitZ){
  TileEntity tileEntity=world.getBlockTileEntity(x,y,z);
  if (tileEntity instanceof TPaoTaiZhan) {
    if (player.getCurrentEquippedItem() != null) {
      if (side == ((TPaoTaiZhan)tileEntity).getTurretDirection().ordinal() && player.getCurrentEquippedItem().itemID == ZhuYaoGangShao.blockTurret.blockID) {
        return false;
      }
    }
    if (((TPaoTaiZhan)tileEntity).getTurret() != null) {
      if (!world.isRemote) {
        player.openGui(ZhuYaoGangShao.instance,CommonProxy.GUI_PLATFORM_ID,world,x,y,z);
      }
    }
    return true;
  }
  return false;
}
Program: 169945
Project: 169945
Buggy source:
@Override public float getRequest(ForgeDirection direction){
  if (this.getTurret(false) != null) {
    if (this.getEnergyStored() < this.getTurret(false).getFiringRequest()) {
      Math.max(turret.getFiringRequest(),0);
    }
  }
  return 0;
}

Fixed version (ground truth):
@Override public float getRequest(ForgeDirection direction){
  if (this.getTurret() != null) {
    if (this.getEnergyStored() < this.getTurret().getFiringRequest()) {
      return Math.max(this.getTurret().getFiringRequest(),0);
    }
  }
  return 0;
}
Program: 169946
Project: 169946
Buggy source:
/** 
 * Gets the turret instance linked to this platform 
 */
public TPaoDaiBase getTurret(boolean getNew){
  Vector3 position=new Vector3(this);
  if (getNew || this.turret == null || this.turret.isInvalid() || !(new Vector3(this.turret).equals(position.clone().modifyPositionFromSide(this.deployDirection)))) {
    TileEntity tileEntity=position.clone().modifyPositionFromSide(this.deployDirection).getTileEntity(this.worldObj);
    if (tileEntity instanceof TPaoDaiBase) {
      this.turret=(TPaoDaiBase)tileEntity;
    }
 else {
      this.turret=null;
    }
  }
  return this.turret;
}

Fixed version (ground truth):
/** 
 * Gets the turret instance linked to this platform 
 */
public TPaoTaiBase 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 TPaoTaiBase) {
      this.cachedTurret=(TPaoTaiBase)tileEntity;
    }
 else {
      this.cachedTurret=null;
    }
  }
  return this.cachedTurret;
}
Program: 169947
Project: 169947
Buggy source:
public boolean isRunning(){
  return (this.getTurret(false) != null && this.getEnergyStored() >= this.getTurret(false).getFiringRequest());
}

Fixed version (ground truth):
public boolean isRunning(){
  return (this.getTurret() != null && this.getEnergyStored() >= this.getTurret().getFiringRequest());
}
Program: 169948
Project: 169948
Buggy source:
@Override public float receiveElectricity(ForgeDirection from,ElectricityPack receive,boolean doReceive){
  this.prevWatts=this.getEnergyStored();
  if (doReceive) {
    if (UniversalElectricity.isVoltageSensitive) {
      if (receive.voltage > this.getVoltage()) {
        TPaoDaiBase turret=this.getTurret(false);
        if (turret != null && turret instanceof IHealthTile) {
          ((IHealthTile)this.turret).onDamageTaken(CustomDamageSource.electrocution,Integer.MAX_VALUE);
        }
        return 0;
      }
    }
  }
  float returnValue=super.receiveElectricity(from,receive,doReceive);
  if ((this.prevWatts <= this.getRequest(null) && this.getEnergyStored() >= this.getRequest(null)) && !(this.prevWatts == this.getEnergyStored())) {
    this.worldObj.markBlockForUpdate(this.xCoord,this.yCoord,this.zCoord);
  }
  return returnValue;
}

Fixed version (ground truth):
@Override public float receiveElectricity(ElectricityPack receive,boolean doReceive){
  this.prevWatts=this.getEnergyStored();
  if (doReceive) {
    if (UniversalElectricity.isVoltageSensitive) {
      if (receive.voltage > this.getVoltage()) {
        TPaoTaiBase turret=this.getTurret();
        if (turret != null && turret instanceof IHealthTile) {
          ((IHealthTile)this.cachedTurret).onDamageTaken(CustomDamageSource.electrocution,Integer.MAX_VALUE);
        }
        return 0;
      }
    }
  }
  float returnValue=super.receiveElectricity(receive,doReceive);
  if ((this.prevWatts <= this.getRequest(null) && this.getEnergyStored() >= this.getRequest(null)) && !(this.prevWatts == this.getEnergyStored())) {
    this.worldObj.markBlockForUpdate(this.xCoord,this.yCoord,this.zCoord);
  }
  return returnValue;
}
Program: 169949
Project: 169949
Buggy source:
@Override public void updateEntity(){
  super.updateEntity();
  if (this.getTurret(false) != null) {
    this.setMaxEnergyStored(Math.max(turret.getFiringRequest(),0) * 2);
  }
 else {
    this.setMaxEnergyStored(0);
  }
  if (this.prevWatts != this.getEnergyStored()) {
    this.worldObj.markBlockForUpdate(this.xCoord,this.yCoord,this.zCoord);
  }
  if (!this.worldObj.isRemote) {
    for (int i=0; i < UPGRADE_START_INDEX; i++) {
      if (this.getEnergyStored() >= this.getRequest(null)) {
        break;
      }
      this.receiveElectricity(ElectricItemHelper.dischargeItem(this.getStackInSlot(i),this.getRequest(null)),true);
    }
  }
}

Fixed version (ground truth):
@Override public void updateEntity(){
  super.updateEntity();
  if (this.prevWatts != this.getEnergyStored()) {
    this.worldObj.markBlockForUpdate(this.xCoord,this.yCoord,this.zCoord);
  }
  if (!this.worldObj.isRemote) {
    for (int i=0; i < UPGRADE_START_INDEX; i++) {
      if (this.getEnergyStored() >= this.getRequest(null)) {
        break;
      }
      this.receiveElectricity(ElectricItemHelper.dischargeItem(this.getStackInSlot(i),this.getRequest(null)),true);
    }
  }
}
Program: 169950
Project: 169950
Buggy source:
/** 
 * if a sentry is spawned above the stand it is removed
 * @return
 */
public boolean destroyTurret(){
  TileEntity ent=this.worldObj.getBlockTileEntity(this.xCoord + deployDirection.offsetX,this.yCoord + deployDirection.offsetY,this.zCoord + deployDirection.offsetZ);
  if (ent instanceof TPaoDaiBase) {
    this.turret=null;
    ((TPaoDaiBase)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 TPaoTaiBase) {
    this.cachedTurret=null;
    ((TPaoTaiBase)ent).destroy(false);
    return true;
  }
  return false;
}
Program: 169951
Project: 169951
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 TPaoDaiBase) {
    TPaoDaiBase tileEntity=(TPaoDaiBase)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.currentRotationYaw,tileEntity.currentRotationPitch);
    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 TPaoTaiBase) {
    TPaoTaiBase tileEntity=(TPaoTaiBase)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.currentRotationYaw,tileEntity.currentRotationPitch);
    GL11.glPopMatrix();
  }
}
Program: 169952
Project: 169952
Buggy source:
public void setTextureBaseOnState(TPaoDaiBase tileEntity){
  EntityPlayer player=this.getPlayer();
  if (tileEntity.getPlatform() != null) {
    AccessLevel level=tileEntity.getPlatform().getUserAccess(player.username);
    if (level == AccessLevel.ADMIN) {
      this.func_110628_a(TEXTURE_FILE);
      return;
    }
 else     if (level.ordinal() >= AccessLevel.USER.ordinal()) {
      this.func_110628_a(TEXTURE_FILE_FRIENDLY);
      return;
    }
  }
  this.func_110628_a(TEXTURE_FILE_HOSTILE);
}

Fixed version (ground truth):
public void setTextureBaseOnState(TPaoTaiBase tileEntity){
  EntityPlayer player=this.getPlayer();
  if (tileEntity.getPlatform() != null) {
    AccessLevel level=tileEntity.getPlatform().getUserAccess(player.username);
    if (level == AccessLevel.ADMIN) {
      this.func_110628_a(TEXTURE_FILE);
      return;
    }
 else     if (level.ordinal() >= AccessLevel.USER.ordinal()) {
      this.func_110628_a(TEXTURE_FILE_FRIENDLY);
      return;
    }
  }
  this.func_110628_a(TEXTURE_FILE_HOSTILE);
}
Program: 169953
Project: 169953
Buggy source:
public void setTextureBaseOnState(TPaoDaiBase tileEntity){
  EntityPlayer player=this.getPlayer();
  if (tileEntity.getPlatform() != null) {
    AccessLevel level=tileEntity.getPlatform().getUserAccess(player.username);
    if (level == AccessLevel.ADMIN) {
      this.func_110628_a(TEXTURE_FILE);
      return;
    }
 else     if (level.ordinal() >= AccessLevel.USER.ordinal()) {
      this.func_110628_a(TEXTURE_FILE_FRIENDLY);
      return;
    }
  }
  this.func_110628_a(TEXTURE_FILE_HOSTILE);
}

Fixed version (ground truth):
public void setTextureBaseOnState(TPaoTaiBase tileEntity){
  EntityPlayer player=this.getPlayer();
  if (tileEntity.getPlatform() != null) {
    AccessLevel level=tileEntity.getPlatform().getUserAccess(player.username);
    if (level == AccessLevel.ADMIN) {
      this.func_110628_a(TEXTURE_FILE);
      return;
    }
 else     if (level.ordinal() >= AccessLevel.USER.ordinal()) {
      this.func_110628_a(TEXTURE_FILE_FRIENDLY);
      return;
    }
  }
  this.func_110628_a(TEXTURE_FILE_HOSTILE);
}
Program: 169954
Project: 169954
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 TPaoDaiBase) {
    TPaoDaiBase tileEntity=(TPaoDaiBase)t;
    GL11.glPushMatrix();
    GL11.glTranslatef((float)x + 0.5f,(float)y + 1.5f,(float)z + 0.5f);
    this.setTextureBaseOnState(tileEntity);
    render(tileEntity.currentRotationYaw,tileEntity.currentRotationPitch);
    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 TPaoTaiBase) {
    TPaoTaiBase tileEntity=(TPaoTaiBase)t;
    GL11.glPushMatrix();
    GL11.glTranslatef((float)x + 0.5f,(float)y + 1.5f,(float)z + 0.5f);
    this.setTextureBaseOnState(tileEntity);
    render(tileEntity.currentRotationYaw,tileEntity.currentRotationPitch);
    GL11.glPopMatrix();
  }
}
Program: 169955
Project: 169955
Buggy source:
public void setTextureBaseOnState(TPaoDaiBase tileEntity){
  EntityPlayer player=this.getPlayer();
  if (tileEntity.getPlatform() != null) {
    AccessLevel level=tileEntity.getPlatform().getUserAccess(player.username);
    if (level == AccessLevel.ADMIN) {
      this.func_110628_a(TEXTURE_FILE);
      return;
    }
 else     if (level.ordinal() >= AccessLevel.USER.ordinal()) {
      this.func_110628_a(TEXTURE_FILE_FRIENDLY);
      return;
    }
  }
  func_110628_a(TEXTURE_FILE_HOSTILE);
}

Fixed version (ground truth):
public void setTextureBaseOnState(TPaoTaiBase tileEntity){
  EntityPlayer player=this.getPlayer();
  if (tileEntity.getPlatform() != null) {
    AccessLevel level=tileEntity.getPlatform().getUserAccess(player.username);
    if (level == AccessLevel.ADMIN) {
      this.func_110628_a(TEXTURE_FILE);
      return;
    }
 else     if (level.ordinal() >= AccessLevel.USER.ordinal()) {
      this.func_110628_a(TEXTURE_FILE_FRIENDLY);
      return;
    }
  }
  func_110628_a(TEXTURE_FILE_HOSTILE);
}
Program: 169956
Project: 169956
Buggy source:
@Override public void updateScreen(){
  super.updateScreen();
  if (this.tileEntity.getTurret(false) == null) {
    this.mc.thePlayer.closeScreen();
  }
}

Fixed version (ground truth):
@Override public void updateScreen(){
  super.updateScreen();
  if (this.tileEntity.getTurret() == null) {
    this.mc.thePlayer.closeScreen();
  }
}
Program: 169957
Project: 169957
Buggy source:
@Override protected void actionPerformed(GuiButton button){
  if (tileEntity.getTurret(false) != null) {
switch (button.id) {
case 0:
{
        this.entityPlayer.openGui(ZhuYaoGangShao.instance,CommonProxy.GUI_PLATFORM_TERMINAL_ID,this.tileEntity.worldObj,this.tileEntity.xCoord,this.tileEntity.yCoord,this.tileEntity.zCoord);
        break;
      }
case 1:
{
      this.entityPlayer.openGui(ZhuYaoGangShao.instance,CommonProxy.GUI_PLATFORM_ACCESS_ID,this.tileEntity.worldObj,this.tileEntity.xCoord,this.tileEntity.yCoord,this.tileEntity.zCoord);
      break;
    }
case 2:
{
    this.entityPlayer.openGui(ZhuYaoGangShao.instance,CommonProxy.GUI_PLATFORM_ID,this.tileEntity.worldObj,this.tileEntity.xCoord,this.tileEntity.yCoord,this.tileEntity.zCoord);
    break;
  }
case 3:
{
}
}
}
}

Fixed version (ground truth):
@Override protected void actionPerformed(GuiButton button){
  if (tileEntity.getTurret() != null) {
switch (button.id) {
case 0:
{
        this.entityPlayer.openGui(ZhuYaoGangShao.instance,CommonProxy.GUI_PLATFORM_TERMINAL_ID,this.tileEntity.worldObj,this.tileEntity.xCoord,this.tileEntity.yCoord,this.tileEntity.zCoord);
        break;
      }
case 1:
{
      this.entityPlayer.openGui(ZhuYaoGangShao.instance,CommonProxy.GUI_PLATFORM_ACCESS_ID,this.tileEntity.worldObj,this.tileEntity.xCoord,this.tileEntity.yCoord,this.tileEntity.zCoord);
      break;
    }
case 2:
{
    this.entityPlayer.openGui(ZhuYaoGangShao.instance,CommonProxy.GUI_PLATFORM_ID,this.tileEntity.worldObj,this.tileEntity.xCoord,this.tileEntity.yCoord,this.tileEntity.zCoord);
    break;
  }
case 3:
{
}
}
}
}
Program: 169958
Project: 169958
Buggy source:
@Override public boolean onActivated(EntityPlayer entityPlayer){
  if (entityPlayer.isSneaking()) {
    this.tryActivateWeapon();
  }
 else {
    if (this.entityFake != null) {
      if (this.entityFake.riddenByEntity instanceof EntityPlayer) {
        EntityPlayer mountedPlayer=(EntityPlayer)this.entityFake.riddenByEntity;
        if (entityPlayer == mountedPlayer) {
          entityPlayer.unmountEntity(this.entityFake);
          this.entityFake.setDead();
          this.entityFake=null;
          if (!this.worldObj.isRemote) {
            PacketManager.sendPacketToClients(this.getRotationPacket());
          }
          return true;
        }
      }
      return false;
    }
 else {
      this.mount(entityPlayer);
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean onActivated(EntityPlayer entityPlayer){
  if (entityPlayer.isSneaking()) {
    this.tryActivateWeapon();
  }
 else {
    if (this.entityFake != null) {
      if (this.entityFake.riddenByEntity instanceof EntityPlayer) {
        EntityPlayer mountedPlayer=(EntityPlayer)this.entityFake.riddenByEntity;
        if (entityPlayer == mountedPlayer) {
          if (!this.worldObj.isRemote) {
            PacketManager.sendPacketToClients(this.getRotationPacket());
          }
          entityPlayer.unmountEntity(this.entityFake);
          this.entityFake.setDead();
          this.entityFake=null;
          return true;
        }
      }
      return false;
    }
 else {
      this.mount(entityPlayer);
    }
  }
  return true;
}
Program: 169959
Project: 169959
Buggy source:
public void mount(EntityPlayer entityPlayer){
  if (!this.worldObj.isRemote) {
    if (this.entityFake == null) {
      this.entityFake=new EJia(this.worldObj,new Vector3(this.xCoord + 0.5,this.yCoord + 1.2,this.zCoord + 0.5),this,true);
      this.worldObj.spawnEntityInWorld(entityFake);
    }
    entityPlayer.rotationYaw=this.currentRotationYaw;
    entityPlayer.rotationPitch=this.currentRotationPitch;
    entityPlayer.mountEntity(this.entityFake);
  }
}

Fixed version (ground truth):
public void mount(EntityPlayer entityPlayer){
  if (!this.worldObj.isRemote) {
    if (this.entityFake == null) {
      this.entityFake=new EJia(this.worldObj,new Vector3(this.xCoord + 0.5,this.yCoord + 1.2,this.zCoord + 0.5),this,true);
      this.worldObj.spawnEntityInWorld(this.entityFake);
    }
    entityPlayer.rotationYaw=this.currentRotationYaw;
    entityPlayer.rotationPitch=this.currentRotationPitch;
    entityPlayer.mountEntity(this.entityFake);
  }
}
Program: 169960
Project: 169960
Buggy source:
@Override public Object[] callMethod(IComputerAccess computer,int method,Object[] arguments) throws Exception {
  if (this.prevWatts < this.getRequest().getWatts() && this.wattsReceived < this.getRequest().getWatts()) {
    throw new Exception("String_Node_Str");
  }
  HashMap<String,Double> returnArray=new HashMap();
  int count=0;
switch (method) {
case 0:
    List<Entity> entities=RadarRegistry.getEntitiesWithinRadius(new Vector3(this).toVector2(),this.alarmBanJing);
  for (  Entity entity : entities) {
    returnArray.put("String_Node_Str" + count,entity.posX);
    returnArray.put("String_Node_Str" + count,entity.posY);
    returnArray.put("String_Node_Str" + count,entity.posZ);
  }
return new Object[]{returnArray};
case 1:
for (TileEntity jiQi : RadarRegistry.getTileEntitiesInArea(new Vector2(this.xCoord - TLeiDaTai.MAX_BIAN_JING,this.zCoord - TLeiDaTai.MAX_BIAN_JING),new Vector2(this.xCoord + TLeiDaTai.MAX_BIAN_JING,this.zCoord + TLeiDaTai.MAX_BIAN_JING))) {
returnArray.put("String_Node_Str" + count,(double)jiQi.xCoord);
returnArray.put("String_Node_Str" + count,(double)jiQi.yCoord);
returnArray.put("String_Node_Str" + count,(double)jiQi.zCoord);
}
return new Object[]{returnArray};
}
throw new Exception("String_Node_Str");
}

Fixed version (ground truth):
@Override public Object[] callMethod(IComputerAccess computer,int method,Object[] arguments) throws Exception {
  if (this.wattsReceived < this.getRequest().getWatts()) {
    throw new Exception("String_Node_Str");
  }
  HashMap<String,Double> returnArray=new HashMap();
  int count=0;
switch (method) {
case 0:
    List<Entity> entities=RadarRegistry.getEntitiesWithinRadius(new Vector3(this).toVector2(),this.alarmBanJing);
  for (  Entity entity : entities) {
    returnArray.put("String_Node_Str" + count,entity.posX);
    returnArray.put("String_Node_Str" + count,entity.posY);
    returnArray.put("String_Node_Str" + count,entity.posZ);
  }
return new Object[]{returnArray};
case 1:
for (TileEntity jiQi : RadarRegistry.getTileEntitiesInArea(new Vector2(this.xCoord - TLeiDaTai.MAX_BIAN_JING,this.zCoord - TLeiDaTai.MAX_BIAN_JING),new Vector2(this.xCoord + TLeiDaTai.MAX_BIAN_JING,this.zCoord + TLeiDaTai.MAX_BIAN_JING))) {
returnArray.put("String_Node_Str" + count,(double)jiQi.xCoord);
returnArray.put("String_Node_Str" + count,(double)jiQi.yCoord);
returnArray.put("String_Node_Str" + count,(double)jiQi.zCoord);
}
return new Object[]{returnArray};
}
throw new Exception("String_Node_Str");
}
Program: 169961
Project: 169961
Buggy source:
@Override public Packet getDescriptionPacket(){
  double sendDian=this.wattsReceived;
  if (sendDian > 0) {
    sendDian=this.getRequest().getWatts();
  }
  return PacketManager.getPacket(ZhuYaoZhaPin.CHANNEL,this,4,sendDian,this.disabledTicks);
}

Fixed version (ground truth):
@Override public Packet getDescriptionPacket(){
  return PacketManager.getPacket(ZhuYaoZhaPin.CHANNEL,this,4,this.wattsReceived,this.disabledTicks);
}
Program: 169962
Project: 169962
Buggy source:
@Override public void updateEntity(){
  super.updateEntity();
  try {
    if (!this.worldObj.isRemote) {
      if (this.ticks % 40 == 0) {
        PacketManager.sendPacketToClients(this.getDescriptionPacket(),this.worldObj,new Vector3(this),35);
      }
 else       if (this.ticks % 3 == 0) {
        for (        EntityPlayer wanJia : this.yongZhe) {
          PacketDispatcher.sendPacketToPlayer(this.getDescriptionPacket2(),(Player)wanJia);
        }
      }
    }
    if (!this.isDisabled()) {
      if (this.wattsReceived >= this.getRequest().getWatts()) {
        this.xuanZhuan+=0.05F;
        if (this.xuanZhuan > 360)         this.xuanZhuan=0;
        if (!this.worldObj.isRemote) {
          this.wattsReceived-=this.getRequest().getWatts();
        }
        int prevShuMu=this.xunZhaoEntity.size();
        this.doScan();
        if (prevShuMu != this.xunZhaoEntity.size()) {
          this.worldObj.notifyBlocksOfNeighborChange(this.xCoord,this.yCoord,this.zCoord,this.getBlockType().blockID);
        }
      }
 else {
        if (this.xunZhaoEntity.size() > 0) {
          this.worldObj.notifyBlocksOfNeighborChange(this.xCoord,this.yCoord,this.zCoord,this.getBlockType().blockID);
        }
        this.xunZhaoEntity.clear();
        this.xunZhaoJiQi.clear();
      }
    }
    if (this.ticks % 40 == 0) {
      this.worldObj.notifyBlocksOfNeighborChange(this.xCoord,this.yCoord,this.zCoord,this.getBlockType().blockID);
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void updateEntity(){
  super.updateEntity();
  try {
    if (!this.worldObj.isRemote) {
      if (this.ticks % 40 == 0) {
        PacketManager.sendPacketToClients(this.getDescriptionPacket(),this.worldObj,new Vector3(this),35);
      }
 else       if (this.ticks % 3 == 0) {
        for (        EntityPlayer wanJia : this.yongZhe) {
          PacketDispatcher.sendPacketToPlayer(this.getDescriptionPacket2(),(Player)wanJia);
        }
      }
    }
    if (!this.isDisabled()) {
      if (this.wattsReceived >= this.getRequest().getWatts()) {
        this.xuanZhuan+=0.05F;
        if (this.xuanZhuan > 360)         this.xuanZhuan=0;
        if (!this.worldObj.isRemote) {
          this.wattsReceived=Math.max(this.wattsReceived - this.getRequest().getWatts(),0);
        }
        int prevShuMu=this.xunZhaoEntity.size();
        this.doScan();
        if (prevShuMu != this.xunZhaoEntity.size()) {
          this.worldObj.notifyBlocksOfNeighborChange(this.xCoord,this.yCoord,this.zCoord,this.getBlockType().blockID);
        }
      }
 else {
        if (this.xunZhaoEntity.size() > 0) {
          this.worldObj.notifyBlocksOfNeighborChange(this.xCoord,this.yCoord,this.zCoord,this.getBlockType().blockID);
        }
        this.xunZhaoEntity.clear();
        this.xunZhaoJiQi.clear();
      }
    }
    if (this.ticks % 40 == 0) {
      this.worldObj.notifyBlocksOfNeighborChange(this.xCoord,this.yCoord,this.zCoord,this.getBlockType().blockID);
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 169963
Project: 169963
Buggy source:
@Override public String getEntityName(){
  if (this.host != null) {
    return this.host.getName();
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getEntityName(){
  if (this.host != null) {
    if (this.host.getPlatform() != null) {
      return this.host.getPlatform().getInvName();
    }
    return this.host.getName();
  }
  return "String_Node_Str";
}
Program: 169964
Project: 169964
Buggy source:
@Override public void readSpawnData(ByteArrayDataInput data){
  this.controller=this.worldObj.getBlockTileEntity(data.readInt(),data.readInt(),data.readInt());
  this.shouldSit=data.readBoolean();
}

Fixed version (ground truth):
@Override public void readSpawnData(ByteArrayDataInput data){
  try {
    this.controller=this.worldObj.getBlockTileEntity(data.readInt(),data.readInt(),data.readInt());
    this.shouldSit=data.readBoolean();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 169965
Project: 169965
Buggy source:
@Override protected boolean onFire(){
  if (!this.worldObj.isRemote) {
    if (this.getPlatform() != null) {
      if (this.target instanceof EntityLiving) {
        this.getPlatform().wattsReceived-=this.getFiringRequest();
        this.target.attackEntityFrom(TileDamageSource.doLaserDamage(this),1);
        this.target.setFire(60);
        return true;
      }
 else       if (this.target instanceof IAATarget) {
        if (this.worldObj.rand.nextFloat() > 0.2) {
          int damage=((IAATarget)this.target).doDamage(10);
          if (damage == -1 && this.worldObj.rand.nextFloat() > 0.7) {
            ((IAATarget)this.target).destroyCraft();
          }
 else           if (damage <= 0) {
            ((IAATarget)this.target).destroyCraft();
          }
        }
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
@Override protected boolean onFire(){
  if (!this.worldObj.isRemote) {
    if (this.getPlatform() != null) {
      if (this.target instanceof EntityLiving) {
        this.getPlatform().wattsReceived-=this.getFiringRequest();
        this.target.attackEntityFrom(TileDamageSource.doLaserDamage(this),2);
        this.target.setFire(2);
        return true;
      }
 else       if (this.target instanceof IAATarget) {
        if (this.worldObj.rand.nextFloat() > 0.2) {
          int damage=((IAATarget)this.target).doDamage(10);
          if (damage == -1 && this.worldObj.rand.nextFloat() > 0.7) {
            ((IAATarget)this.target).destroyCraft();
          }
 else           if (damage <= 0) {
            ((IAATarget)this.target).destroyCraft();
          }
        }
        return true;
      }
    }
  }
  return false;
}
Program: 169966
Project: 169966
Buggy source:
@Override public void processCommand(ICommandSender sender,String[] args){
  try {
    EntityPlayer entityPlayer=(EntityPlayer)sender;
    int dimension=entityPlayer.worldObj.getWorldInfo().getDimension();
    if (args[0].equalsIgnoreCase("String_Node_Str")) {
      int radius=parseInt(sender,args[1]);
      if (radius > 0 && radius < 10000) {
        EntityPlayer player=(EntityPlayer)sender;
        AxisAlignedBB bounds=AxisAlignedBB.getBoundingBox(player.posX - radius,player.posY - radius,player.posZ - radius,player.posX + radius,player.posY + radius,player.posZ + radius);
        List<Entity> entitiesNearby=player.worldObj.getEntitiesWithinAABB(Entity.class,bounds);
        for (        Entity entity : entitiesNearby) {
          if (entity instanceof EFeiBlock) {
            ((EFeiBlock)entity).setBlock();
          }
 else           if (entity instanceof EZhaPin) {
            entity.setDead();
          }
        }
        sender.sendChatToPlayer("String_Node_Str" + radius + "String_Node_Str");
        return;
      }
 else {
        throw new WrongUsageException("String_Node_Str");
      }
    }
  }
 catch (  Exception e) {
  }
  throw new WrongUsageException(this.getCommandUsage(sender));
}

Fixed version (ground truth):
@Override public void processCommand(ICommandSender sender,String[] args){
  try {
    EntityPlayer entityPlayer=(EntityPlayer)sender;
    int dimension=entityPlayer.worldObj.getWorldInfo().getDimension();
    if (args[0].equalsIgnoreCase("String_Node_Str")) {
      int radius=parseInt(sender,args[1]);
      if (radius > 0 && radius < Integer.MAX_VALUE) {
        EntityPlayer player=(EntityPlayer)sender;
        AxisAlignedBB bounds=AxisAlignedBB.getBoundingBox(player.posX - radius,player.posY - radius,player.posZ - radius,player.posX + radius,player.posY + radius,player.posZ + radius);
        List<Entity> entitiesNearby=player.worldObj.getEntitiesWithinAABB(Entity.class,bounds);
        for (        Entity entity : entitiesNearby) {
          if (entity instanceof EFeiBlock) {
            ((EFeiBlock)entity).setBlock();
          }
 else           if (entity instanceof EZhaPin) {
            entity.setDead();
          }
        }
        sender.sendChatToPlayer("String_Node_Str" + radius + "String_Node_Str");
        return;
      }
 else {
        throw new WrongUsageException("String_Node_Str");
      }
    }
  }
 catch (  Exception e) {
  }
  throw new WrongUsageException(this.getCommandUsage(sender));
}