nus-yam/ex-repair huggingface dataset:
Program: 169967
Project: 169967
Buggy source:
@Override public void init(){
  super.init();
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityGunTurret.class,new RenderGunTurret());
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAATurret.class,new RenderAATurret());
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRailTurret.class,new RenderRailgun());
  RenderingRegistry.registerEntityRenderingHandler(EntityFakeMountable.class,new RenderFakeMountable());
  RenderingRegistry.registerBlockHandler(new BlockRenderingHandler());
}

Fixed version (ground truth):
@Override public void init(){
  super.init();
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityGunTurret.class,new RenderGunTurret());
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAATurret.class,new RenderAATurret());
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRailgun.class,new RenderRailgun());
  RenderingRegistry.registerEntityRenderingHandler(EntityFakeMountable.class,new RenderFakeMountable());
  RenderingRegistry.registerBlockHandler(new BlockRenderingHandler());
}
Program: 169968
Project: 169968
Buggy source:
public void init(){
  GameRegistry.registerTileEntity(TileEntityGunTurret.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TileEntityAATurret.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TileEntityRailTurret.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TileEntityTurretPlatform.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TileEntityMulti.class,"String_Node_Str");
}

Fixed version (ground truth):
public void init(){
  GameRegistry.registerTileEntity(TileEntityGunTurret.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TileEntityAATurret.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TileEntityRailgun.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TileEntityTurretPlatform.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TileEntityMulti.class,"String_Node_Str");
}
Program: 169969
Project: 169969
Buggy source:
/** 
 * Draw the foreground layer for the GuiContainer (everything in front of the items) 
 */
@Override protected void drawGuiContainerForegroundLayer(int x,int y){
  this.fontRenderer.drawString("String_Node_Str",8,30,4210752);
  String color="String_Node_Str";
  if (!this.tileEntity.isDisabled() && this.tileEntity.wattsReceived >= this.tileEntity.getWattBuffer()) {
    color="String_Node_Str";
  }
  TileEntityTurretBase turret=this.tileEntity.getTurret(false);
  if (turret != null && turret.getFiringRequest() > 0) {
    this.fontRenderer.drawString("String_Node_Str",85,43,4210752);
    this.fontRenderer.drawString(color + ElectricityDisplay.getDisplayShort(Math.min(this.tileEntity.wattsReceived,turret.getFiringRequest()),ElectricUnit.JOULES) + "String_Node_Str"+ ElectricityDisplay.getDisplayShort(this.tileEntity.getTurret(false).getFiringRequest(),ElectricUnit.JOULES),87,53,4210752);
  }
  this.fontRenderer.drawString("String_Node_Str",87,66,4210752);
  super.drawGuiContainerForegroundLayer(x,y);
}

Fixed version (ground truth):
/** 
 * Draw the foreground layer for the GuiContainer (everything in front of the items) 
 */
@Override protected void drawGuiContainerForegroundLayer(int x,int y){
  this.fontRenderer.drawString("String_Node_Str",8,30,4210752);
  TileEntityTurretBase turret=this.tileEntity.getTurret(false);
  if (turret != null && turret.getFiringRequest() > 0) {
    String color="String_Node_Str";
    if (!this.tileEntity.isDisabled() && this.tileEntity.wattsReceived >= turret.getFiringRequest()) {
      color="String_Node_Str";
    }
    this.fontRenderer.drawString("String_Node_Str",85,43,4210752);
    this.fontRenderer.drawString(color + ElectricityDisplay.getDisplayShort(Math.min(this.tileEntity.wattsReceived,turret.getFiringRequest()),ElectricUnit.JOULES) + "String_Node_Str"+ ElectricityDisplay.getDisplayShort(this.tileEntity.getTurret(false).getFiringRequest(),ElectricUnit.JOULES),87,53,4210752);
  }
  this.fontRenderer.drawString("String_Node_Str",87,66,4210752);
  super.drawGuiContainerForegroundLayer(x,y);
}
Program: 169970
Project: 169970
Buggy source:
@Override public ElectricityPack getRequest(){
  if (this.getTurret(false) != null) {
    if (this.wattsReceived < this.getTurret(false).getFiringRequest()) {
      return new ElectricityPack(Math.max(turret.getRunningRequest() / this.getTurret(false).getVoltage(),0),this.getTurret(false).getVoltage());
    }
  }
  return new ElectricityPack();
}

Fixed version (ground truth):
@Override public ElectricityPack getRequest(){
  if (this.getTurret(false) != null) {
    if (this.wattsReceived < this.getTurret(false).getFiringRequest()) {
      return new ElectricityPack(Math.max(turret.getFiringRequest() / this.getTurret(false).getVoltage(),0),this.getTurret(false).getVoltage());
    }
  }
  return new ElectricityPack();
}
Program: 169971
Project: 169971
Buggy source:
public boolean isRunning(){
  return !this.isDisabled() && (this.getTurret(false) != null && this.getTurret(false).getRunningRequest() <= this.wattsReceived || this.runPowerless);
}

Fixed version (ground truth):
public boolean isRunning(){
  return !this.isDisabled() && (this.getTurret(false) != null && this.wattsReceived >= this.getTurret(false).getFiringRequest() || this.runPowerless);
}
Program: 169972
Project: 169972
Buggy source:
@Override public void updateEntity(){
  super.updateEntity();
  if (!this.isDisabled()) {
    TileEntityTurretBase turret=this.getTurret(false);
    if (this.isRunning() && turret != null) {
      this.wattsReceived-=turret.getRunningRequest();
    }
  }
}

Fixed version (ground truth):
@Override public void updateEntity(){
  super.updateEntity();
}
Program: 169973
Project: 169973
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 TileEntityTurretBase) {
    this.turret=null;
    return ((TileEntityTurretBase)ent).destroy(false);
  }
  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 + deployDirection.offsetX,this.yCoord + deployDirection.offsetY,this.zCoord + deployDirection.offsetZ);
  if (ent instanceof TileEntityTurretBase) {
    this.turret=null;
    return ((TileEntityTurretBase)ent).destroy(false);
  }
  return false;
}
Program: 169974
Project: 169974
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 TileEntityRailTurret) {
    TileEntityRailTurret tileEntity=(TileEntityRailTurret)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.bindTextureByName(ZhuYaoBase.MODEL_PATH + TEXTURE_FILE);
    GL11.glRotatef(180F,0F,0F,1F);
    GL11.glRotatef(180F,0F,1F,0F);
    MODEL.render(tileEntity.currentRotationYaw,tileEntity.currentRotationPitch,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 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.bindTextureByName(ZhuYaoBase.MODEL_PATH + TEXTURE_FILE);
    GL11.glRotatef(180F,0F,0F,1F);
    GL11.glRotatef(180F,0F,1F,0F);
    MODEL.render(tileEntity.currentRotationYaw,tileEntity.currentRotationPitch,0.0625F);
    GL11.glPopMatrix();
  }
}
Program: 169975
Project: 169975
Buggy source:
@Override public void init(){
  super.init();
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityGunTurret.class,new RenderGunTurret());
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAATurret.class,new RenderAATurret());
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRailgun.class,new RenderRailgun());
  RenderingRegistry.registerEntityRenderingHandler(EntityFakeMountable.class,new RenderFakeMountable());
  RenderingRegistry.registerBlockHandler(new BlockRenderingHandler());
}

Fixed version (ground truth):
@Override public void init(){
  super.init();
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityGunTurret.class,new RenderGunTurret());
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAATurret.class,new RenderAATurret());
  ClientRegistry.bindTileEntitySpecialRenderer(TCiGuiPao.class,new RenderRailgun());
  RenderingRegistry.registerEntityRenderingHandler(EntityFakeMountable.class,new RenderFakeMountable());
  RenderingRegistry.registerBlockHandler(new BlockRenderingHandler());
}
Program: 169976
Project: 169976
Buggy source:
public void init(){
  GameRegistry.registerTileEntity(TileEntityGunTurret.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TileEntityAATurret.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TileEntityRailgun.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TPaoDaiZhan.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TileEntityMulti.class,"String_Node_Str");
}

Fixed version (ground truth):
public void init(){
  GameRegistry.registerTileEntity(TileEntityGunTurret.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TileEntityAATurret.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TCiGuiPao.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TPaoDaiZhan.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TileEntityMulti.class,"String_Node_Str");
}
Program: 169977
Project: 169977
Buggy source:
@Override public void readFromNBT(NBTTagCompound nbt){
  super.readFromNBT(nbt);
  NBTTagList var2=nbt.getTagList("String_Node_Str");
  this.containingItems=new ItemStack[this.getSizeInventory()];
  for (int var3=0; var3 < var2.tagCount(); ++var3) {
    NBTTagCompound var4=(NBTTagCompound)var2.tagAt(var3);
    byte var5=var4.getByte("String_Node_Str");
    if (var5 >= 0 && var5 < this.containingItems.length) {
      this.containingItems[var5]=ItemStack.loadItemStackFromNBT(var4);
    }
  }
}

Fixed version (ground truth):
@Override public void readFromNBT(NBTTagCompound nbt){
  super.readFromNBT(nbt);
  this.wattsReceived=nbt.getDouble("String_Node_Str");
  NBTTagList var2=nbt.getTagList("String_Node_Str");
  this.containingItems=new ItemStack[this.getSizeInventory()];
  for (int var3=0; var3 < var2.tagCount(); ++var3) {
    NBTTagCompound var4=(NBTTagCompound)var2.tagAt(var3);
    byte var5=var4.getByte("String_Node_Str");
    if (var5 >= 0 && var5 < this.containingItems.length) {
      this.containingItems[var5]=ItemStack.loadItemStackFromNBT(var4);
    }
  }
}
Program: 169978
Project: 169978
Buggy source:
@Override public void writeToNBT(NBTTagCompound nbt){
  super.writeToNBT(nbt);
  NBTTagList itemTag=new NBTTagList();
  for (int slots=0; slots < this.containingItems.length; ++slots) {
    if (this.containingItems[slots] != null) {
      NBTTagCompound itemNbtData=new NBTTagCompound();
      itemNbtData.setByte("String_Node_Str",(byte)slots);
      this.containingItems[slots].writeToNBT(itemNbtData);
      itemTag.appendTag(itemNbtData);
    }
  }
  nbt.setTag("String_Node_Str",itemTag);
}

Fixed version (ground truth):
@Override public void writeToNBT(NBTTagCompound nbt){
  super.writeToNBT(nbt);
  nbt.setDouble("String_Node_Str",this.wattsReceived);
  NBTTagList itemTag=new NBTTagList();
  for (int slots=0; slots < this.containingItems.length; ++slots) {
    if (this.containingItems[slots] != null) {
      NBTTagCompound itemNbtData=new NBTTagCompound();
      itemNbtData.setByte("String_Node_Str",(byte)slots);
      this.containingItems[slots].writeToNBT(itemNbtData);
      itemTag.appendTag(itemNbtData);
    }
  }
  nbt.setTag("String_Node_Str",itemTag);
}
Program: 169979
Project: 169979
Buggy source:
@Override public void onReceive(ElectricityPack electricityPack){
  if (UniversalElectricity.isVoltageSensitive) {
    if (electricityPack.voltage > this.getVoltage()) {
      TPaoDaiBase turret=this.getTurret(false);
      if (turret != null && turret instanceof IHealthTile) {
        ((IHealthTile)this.turret).onDamageTaken(CustomDamageSource.electrocution,Integer.MAX_VALUE);
      }
      return;
    }
  }
  this.prevWatts=this.wattsReceived;
  this.wattsReceived=Math.min(this.wattsReceived + electricityPack.getWatts(),this.getWattBuffer());
  if ((this.prevWatts <= this.getRequest().getWatts() && this.wattsReceived >= this.getRequest().getWatts()) && !(this.prevWatts == this.wattsReceived)) {
    this.worldObj.markBlockForUpdate(this.xCoord,this.yCoord,this.zCoord);
  }
}

Fixed version (ground truth):
@Override public void onReceive(ElectricityPack electricityPack){
  if (UniversalElectricity.isVoltageSensitive) {
    if (electricityPack.voltage > this.getVoltage()) {
      TPaoDaiBase turret=this.getTurret(false);
      if (turret != null && turret instanceof IHealthTile) {
        ((IHealthTile)this.turret).onDamageTaken(CustomDamageSource.electrocution,Integer.MAX_VALUE);
      }
      return;
    }
  }
  this.wattsReceived=Math.min(this.wattsReceived + electricityPack.getWatts(),this.getWattBuffer());
  if ((this.prevWatts <= this.getRequest().getWatts() && this.wattsReceived >= this.getRequest().getWatts()) && !(this.prevWatts == this.wattsReceived)) {
    this.worldObj.markBlockForUpdate(this.xCoord,this.yCoord,this.zCoord);
  }
}
Program: 169980
Project: 169980
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.bindTextureByName(ZhuYaoBase.MODEL_PATH + TEXTURE_FILE);
    GL11.glRotatef(180F,0F,0F,1F);
    GL11.glRotatef(180F,0F,1F,0F);
    MODEL.render(tileEntity.currentRotationYaw,tileEntity.currentRotationPitch,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 TCiGuiPao) {
    TCiGuiPao tileEntity=(TCiGuiPao)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.bindTextureByName(ZhuYaoBase.MODEL_PATH + TEXTURE_FILE);
    GL11.glRotatef(180F,0F,0F,1F);
    GL11.glRotatef(180F,0F,1F,0F);
    MODEL.render(tileEntity.currentRotationYaw,tileEntity.currentRotationPitch,0.0625F);
    GL11.glPopMatrix();
  }
}
Program: 169981
Project: 169981
Buggy source:
/** 
 * Draw the foreground layer for the GuiContainer (everything in front of the items) 
 */
@Override protected void drawGuiContainerForegroundLayer(int x,int y){
  this.fontRenderer.drawString("String_Node_Str",8,30,4210752);
  TPaoDaiBase turret=this.tileEntity.getTurret(false);
  if (turret != null && turret.getFiringRequest() > 0) {
    String color="String_Node_Str";
    if (!this.tileEntity.isDisabled() && this.tileEntity.wattsReceived >= turret.getFiringRequest()) {
      color="String_Node_Str";
    }
    this.fontRenderer.drawString("String_Node_Str",85,43,4210752);
    this.fontRenderer.drawString(color + ElectricityDisplay.getDisplayShort(Math.min(this.tileEntity.wattsReceived,turret.getFiringRequest()),ElectricUnit.JOULES) + "String_Node_Str"+ ElectricityDisplay.getDisplayShort(this.tileEntity.getTurret(false).getFiringRequest(),ElectricUnit.JOULES),87,53,4210752);
  }
  this.fontRenderer.drawString("String_Node_Str",87,66,4210752);
  super.drawGuiContainerForegroundLayer(x,y);
}

Fixed version (ground truth):
/** 
 * Draw the foreground layer for the GuiContainer (everything in front of the items) 
 */
@Override protected void drawGuiContainerForegroundLayer(int x,int y){
  this.fontRenderer.drawString("String_Node_Str",8,30,4210752);
  TPaoDaiBase turret=this.tileEntity.getTurret(false);
  if (turret != null && turret.getFiringRequest() > 0) {
    String color="String_Node_Str";
    if (this.tileEntity.isRunning()) {
      color="String_Node_Str";
    }
    this.fontRenderer.drawString("String_Node_Str",85,43,4210752);
    this.fontRenderer.drawString(color + ElectricityDisplay.getDisplayShort(Math.min(this.tileEntity.wattsReceived,turret.getFiringRequest()),ElectricUnit.JOULES) + "String_Node_Str"+ ElectricityDisplay.getDisplayShort(this.tileEntity.getTurret(false).getFiringRequest(),ElectricUnit.JOULES),87,53,4210752);
  }
  this.fontRenderer.drawString("String_Node_Str",87,66,4210752);
  super.drawGuiContainerForegroundLayer(x,y);
}
Program: 169982
Project: 169982
Buggy source:
public TileEntityAATurret(){
  this.targetAir=true;
  this.baseTargetRange=60;
  this.maxTargetRange=200;
  this.idleRtSpeed=4f;
  this.targetRtSpeed=10f;
  this.maxHeat=600;
  this.minFiringDelay=1;
  this.baseFiringDelay=3;
}

Fixed version (ground truth):
public TileEntityAATurret(){
  this.targetAir=true;
  this.baseTargetRange=60;
  this.maxTargetRange=200;
  this.idleRtSpeed=4f;
  this.targetRtSpeed=10f;
  this.minFiringDelay=1;
  this.baseFiringDelay=3;
}
Program: 169983
Project: 169983
Buggy source:
@Override public double getFiringRequest(){
  return 1;
}

Fixed version (ground truth):
@Override public double getFiringRequest(){
  return 25;
}
Program: 169984
Project: 169984
Buggy source:
public TileEntityGunTurret(){
  this.targetPlayers=true;
  this.targetHostile=true;
  this.baseTargetRange=20;
  this.maxTargetRange=90;
  this.idleRtSpeed=2f;
  this.targetRtSpeed=4f;
  this.maxHeat=400;
  this.baseFiringDelay=10;
  this.minFiringDelay=5;
}

Fixed version (ground truth):
public TileEntityGunTurret(){
  this.targetPlayers=true;
  this.targetHostile=true;
  this.baseTargetRange=20;
  this.maxTargetRange=90;
  this.idleRtSpeed=2f;
  this.targetRtSpeed=4f;
  this.baseFiringDelay=10;
  this.minFiringDelay=5;
}
Program: 169985
Project: 169985
Buggy source:
public TileEntityLaserTurret(){
  this.targetPlayers=true;
  this.targetHostile=true;
  this.baseTargetRange=30;
  this.maxTargetRange=90;
  this.idleRtSpeed=3f;
  this.targetRtSpeed=6f;
  this.maxHeat=1000;
  this.baseFiringDelay=20;
  this.minFiringDelay=10;
}

Fixed version (ground truth):
public TileEntityLaserTurret(){
  this.targetPlayers=true;
  this.targetHostile=true;
  this.baseTargetRange=30;
  this.maxTargetRange=90;
  this.idleRtSpeed=3f;
  this.targetRtSpeed=6f;
  this.baseFiringDelay=20;
  this.minFiringDelay=10;
}
Program: 169986
Project: 169986
Buggy source:
@Override public void init(){
  super.init();
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityGunTurret.class,new RenderGunTurret());
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAATurret.class,new RenderAATurret());
  ClientRegistry.bindTileEntitySpecialRenderer(TCiGuiPao.class,new RenderRailgun());
  RenderingRegistry.registerEntityRenderingHandler(EntityFakeMountable.class,new RenderFakeMountable());
  RenderingRegistry.registerBlockHandler(new BlockRenderingHandler());
}

Fixed version (ground truth):
@Override public void init(){
  super.init();
  ClientRegistry.bindTileEntitySpecialRenderer(TQiang.class,new RenderGunTurret());
  ClientRegistry.bindTileEntitySpecialRenderer(TFanKong.class,new RenderAATurret());
  ClientRegistry.bindTileEntitySpecialRenderer(TCiGuiPao.class,new RCiGuiPao());
  RenderingRegistry.registerEntityRenderingHandler(EJia.class,new REJia());
  RenderingRegistry.registerBlockHandler(new BlockRenderingHandler());
}
Program: 169987
Project: 169987
Buggy source:
public void init(){
  GameRegistry.registerTileEntity(TileEntityGunTurret.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TileEntityAATurret.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TCiGuiPao.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TPaoDaiZhan.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TileEntityMulti.class,"String_Node_Str");
}

Fixed version (ground truth):
public void init(){
  GameRegistry.registerTileEntity(TQiang.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TFanKong.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TCiGuiPao.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TPaoDaiZhan.class,"String_Node_Str");
  GameRegistry.registerTileEntity(TileEntityMulti.class,"String_Node_Str");
}
Program: 169988
Project: 169988
Buggy source:
@Override @PreInit public void preInit(FMLPreInitializationEvent event){
  super.preInit(event);
  NetworkRegistry.instance().registerGuiHandler(this,ZhuYaoGangShao.proxy);
  MinecraftForge.EVENT_BUS.register(this);
  ZhuYaoBase.CONFIGURATION.load();
  blockTurret=new BlockTurret(BLOCK_ID_PREFIX);
  blockPlatform=new BlockTurretPlatform(BLOCK_ID_PREFIX + 1);
  itemAmmo=new ItemAmmo(ITEM_ID_PREFIX + 1);
  itemUpgrades=new ItPaoTaiUpgrades(ITEM_ID_PREFIX + 2);
  ZhuYaoBase.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(EntityFakeMountable.class,"String_Node_Str",EntityRegistry.findGlobalUniqueEntityId());
  EntityRegistry.registerModEntity(EntityFakeMountable.class,"String_Node_Str",ENTITY_ID_PREFIX + 7,this,50,5,true);
  EntityRegistry.registerGlobalEntityID(EntityTileDamage.class,"String_Node_Str",EntityRegistry.findGlobalUniqueEntityId());
  EntityRegistry.registerModEntity(EntityTileDamage.class,"String_Node_Str",ENTITY_ID_PREFIX + 8,this,50,5,true);
  ICBMTab.itemStack=new ItemStack(blockTurret);
  proxy.preInit();
}

Fixed version (ground truth):
@Override @PreInit public void preInit(FMLPreInitializationEvent event){
  super.preInit(event);
  NetworkRegistry.instance().registerGuiHandler(this,ZhuYaoGangShao.proxy);
  MinecraftForge.EVENT_BUS.register(this);
  ZhuYaoBase.CONFIGURATION.load();
  blockTurret=new BlockTurret(BLOCK_ID_PREFIX);
  blockPlatform=new BlockTurretPlatform(BLOCK_ID_PREFIX + 1);
  itemAmmo=new ItemAmmo(ITEM_ID_PREFIX + 1);
  itemUpgrades=new ItPaoTaiUpgrades(ITEM_ID_PREFIX + 2);
  ZhuYaoBase.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(EJia.class,"String_Node_Str",EntityRegistry.findGlobalUniqueEntityId());
  EntityRegistry.registerModEntity(EJia.class,"String_Node_Str",ENTITY_ID_PREFIX + 7,this,50,5,true);
  EntityRegistry.registerGlobalEntityID(EntityTileDamage.class,"String_Node_Str",EntityRegistry.findGlobalUniqueEntityId());
  EntityRegistry.registerModEntity(EntityTileDamage.class,"String_Node_Str",ENTITY_ID_PREFIX + 8,this,50,5,true);
  ICBMTab.itemStack=new ItemStack(blockTurret);
  proxy.preInit();
}
Program: 169989
Project: 169989
Buggy source:
public boolean useAmmunition(ItemStack ammoStack){
  if (ammoStack != null) {
    for (int i=0; i < TPaoDaiZhan.UPGRADE_START_INDEX; i++) {
      ItemStack itemStack=this.containingItems[i];
      if (itemStack != null) {
        if (itemStack.isItemEqual(ammoStack)) {
          itemStack.stackSize--;
          if (itemStack.stackSize <= 0) {
            itemStack=null;
          }
          this.setInventorySlotContents(i,itemStack);
          return true;
        }
      }
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean useAmmunition(ItemStack ammoStack){
  if (ammoStack != null) {
    if (ammoStack.getItemDamage() == AmmoType.BULLETINF.ordinal()) {
      return true;
    }
    for (int i=0; i < TPaoDaiZhan.UPGRADE_START_INDEX; i++) {
      ItemStack itemStack=this.containingItems[i];
      if (itemStack != null) {
        if (itemStack.isItemEqual(ammoStack)) {
          itemStack.stackSize--;
          if (itemStack.stackSize <= 0) {
            itemStack=null;
          }
          this.setInventorySlotContents(i,itemStack);
          return true;
        }
      }
    }
  }
  return false;
}
Program: 169990
Project: 169990
Buggy source:
@Override public void renderInventoryBlock(Block block,int metadata,int modelID,RenderBlocks renderer){
  if (modelID == ID) {
    GL11.glPushMatrix();
    if (metadata == TurretType.GUN.ordinal()) {
      GL11.glTranslatef(0.1f,1f,0f);
      GL11.glBindTexture(GL11.GL_TEXTURE_2D,FMLClientHandler.instance().getClient().renderEngine.getTexture(ZhuYaoBase.MODEL_PATH + RenderGunTurret.TEXTURE_FILE));
      RenderGunTurret.render(0,0);
    }
 else     if (metadata == TurretType.AA.ordinal()) {
      GL11.glTranslatef(0.2f,0.3f,0);
      GL11.glScalef(0.45f,0.45f,0.45f);
      GL11.glBindTexture(GL11.GL_TEXTURE_2D,FMLClientHandler.instance().getClient().renderEngine.getTexture(ZhuYaoBase.MODEL_PATH + RenderAATurret.TEXTURE_FILE));
      RenderAATurret.render(0,0);
    }
 else     if (metadata == TurretType.RAILGUN.ordinal()) {
      GL11.glTranslatef(0f,0.9f,0f);
      GL11.glRotatef(180f,0f,0f,1f);
      GL11.glBindTexture(GL11.GL_TEXTURE_2D,FMLClientHandler.instance().getClient().renderEngine.getTexture(ZhuYaoBase.MODEL_PATH + RenderRailgun.TEXTURE_FILE));
      RenderRailgun.MODEL.render(90,0,0.0625F);
    }
    GL11.glPopMatrix();
  }
}

Fixed version (ground truth):
@Override public void renderInventoryBlock(Block block,int metadata,int modelID,RenderBlocks renderer){
  if (modelID == ID) {
    GL11.glPushMatrix();
    if (metadata == TurretType.GUN.ordinal()) {
      GL11.glTranslatef(0.1f,1f,0f);
      GL11.glBindTexture(GL11.GL_TEXTURE_2D,FMLClientHandler.instance().getClient().renderEngine.getTexture(ZhuYaoBase.MODEL_PATH + RenderGunTurret.TEXTURE_FILE));
      RenderGunTurret.render(0,0);
    }
 else     if (metadata == TurretType.AA.ordinal()) {
      GL11.glTranslatef(0.2f,0.3f,0);
      GL11.glScalef(0.45f,0.45f,0.45f);
      GL11.glBindTexture(GL11.GL_TEXTURE_2D,FMLClientHandler.instance().getClient().renderEngine.getTexture(ZhuYaoBase.MODEL_PATH + RenderAATurret.TEXTURE_FILE));
      RenderAATurret.render(0,0);
    }
 else     if (metadata == TurretType.RAILGUN.ordinal()) {
      GL11.glTranslatef(0f,0.9f,0f);
      GL11.glRotatef(180f,0f,0f,1f);
      GL11.glBindTexture(GL11.GL_TEXTURE_2D,FMLClientHandler.instance().getClient().renderEngine.getTexture(ZhuYaoBase.MODEL_PATH + RCiGuiPao.TEXTURE_FILE));
      RCiGuiPao.MODEL.render(90,0,0.0625F);
    }
    GL11.glPopMatrix();
  }
}
Program: 169991
Project: 169991
Buggy source:
public static void render(float renderYaw,float renderPitch){
  GL11.glRotatef(180F,0F,0F,1F);
  GL11.glRotatef(180F,0F,1F,0F);
  GL11.glRotatef(renderYaw,0F,1F,0F);
  MODEL.renderBody(0.0625F);
  MODEL.renderRadar(0.0625F);
  renderPitch=(float)Math.toRadians(renderPitch);
  if (renderPitch <= 0.8F && renderPitch >= -1.5F && renderPitch != 0) {
    MODEL.renderCannon(0.0625F,renderPitch);
  }
 else {
    MODEL.renderCannon(0.0625F,-0.6F);
  }
}

Fixed version (ground truth):
public static void render(float renderYaw,float renderPitch){
  GL11.glRotatef(180F,0F,0F,1F);
  GL11.glRotatef(180F,0F,1F,0F);
  GL11.glRotatef(renderYaw,0F,1F,0F);
  MODEL.renderBody(0.0625F);
  MODEL.renderRadar(0.0625F);
  MODEL.renderCannon(0.0625F,(float)Math.toRadians(renderPitch));
}
Program: 169992
Project: 169992
Buggy source:
/** 
 * Sets the target of the sentry if it doesn't have one or was overridden
 */
public boolean setTarget(Entity target,boolean override);

Fixed version (ground truth):
/** 
 * Sets the target of the sentry if it doesn't have one or was overridden
 */
public void setTarget(Entity target);
Program: 169993
Project: 169993
Buggy source:
public static TileDamageSource doLaserDamage(TPaoDaiBase tileEntity){
  return (TileDamageSource)(new TileDamageSource("String_Node_Str",tileEntity).setProjectile());
}

Fixed version (ground truth):
public static TileDamageSource doLaserDamage(TPaoDaiBase tileEntity){
  return (TileDamageSource)(new TileDamageSource("String_Node_Str",tileEntity).setDamageBypassesArmor().setProjectile());
}
Program: 169994
Project: 169994
Buggy source:
public void renderYawPitch(float f5,float rotation){
  body.render(f5);
  bodyTop.render(f5);
  bodyRight.render(f5);
  bodyLeft.render(f5);
  leftBarrel.render(f5);
  rightBarrel.render(f5);
  l1.render(f5);
  r1.render(f5);
  l2.rotateAngleZ=-rotation;
  l2.render(f5);
  l3.rotateAngleZ=-rotation;
  l3.render(f5);
  l4.rotateAngleZ=-rotation;
  l4.render(f5);
  l5.rotateAngleZ=-rotation;
  l5.render(f5);
  r2.rotateAngleZ=rotation;
  r2.render(f5);
  r3.rotateAngleZ=rotation;
  r3.render(f5);
  r4.rotateAngleZ=rotation;
  r4.render(f5);
  r5.rotateAngleZ=rotation;
  r5.render(f5);
  lCap.render(f5);
  rCap.render(f5);
  Hat.render(f5);
  LowerHat.render(f5);
  BatteryPack.render(f5);
  MiddleWire.render(f5);
  BatWire.render(f5);
  HatWire.render(f5);
  Details.render(f5);
  RightFootStrength.render(f5);
  LeftFootStrength.render(f5);
  FrontDetail.render(f5);
  LeftFootBase.render(f5);
  RightFootBase.render(f5);
  lEar1.render(f5);
  lEar2.render(f5);
  rEar1.render(f5);
  rEar2.render(f5);
}

Fixed version (ground truth):
public void renderYawPitch(float f5,float rotation){
  body.render(f5);
  bodyTop.render(f5);
  bodyRight.render(f5);
  bodyLeft.render(f5);
  leftBarrel.render(f5);
  rightBarrel.render(f5);
  l1.render(f5);
  r1.render(f5);
  l2.rotateAngleZ=-rotation;
  l2.render(f5);
  l3.rotateAngleZ=-rotation;
  l3.render(f5);
  l4.rotateAngleZ=-rotation;
  l4.render(f5);
  l5.rotateAngleZ=-rotation;
  l5.render(f5);
  r2.rotateAngleZ=rotation;
  r2.render(f5);
  r3.rotateAngleZ=rotation;
  r3.render(f5);
  r4.rotateAngleZ=rotation;
  r4.render(f5);
  r5.rotateAngleZ=rotation;
  r5.render(f5);
  lCap.render(f5);
  rCap.render(f5);
  Hat.render(f5);
  LowerHat.render(f5);
  BatteryPack.render(f5);
  MiddleWire.render(f5);
  BatWire.render(f5);
  HatWire.render(f5);
  lEar1.render(f5);
  lEar2.render(f5);
  rEar1.render(f5);
  rEar2.render(f5);
}
Program: 169995
Project: 169995
Buggy source:
public void renderYaw(float f5){
  basePlate.render(f5);
  leftMount.render(f5);
  rightMount.render(f5);
}

Fixed version (ground truth):
public void renderYaw(float f5){
  basePlate.render(f5);
  leftMount.render(f5);
  rightMount.render(f5);
  Details.render(f5);
  FrontDetail.render(f5);
  RightFootStrength.render(f5);
  LeftFootStrength.render(f5);
  LeftFootBase.render(f5);
  RightFootBase.render(f5);
}
Program: 169996
Project: 169996
Buggy source:
public boolean canEntityBeSeen(Entity entity){
  return this.canEntityBeSeen(Vector3.add(new Vector3(entity),new Vector3(0,entity.getEyeHeight(),0)));
}

Fixed version (ground truth):
public boolean canEntityBeSeen(Entity entity){
  Vector3 target=Vector3.add(new Vector3(entity),new Vector3(0,entity.getEyeHeight(),0));
  return this.canPositionBeSeen(target);
}
Program: 169997
Project: 169997
Buggy source:
@Override protected boolean onUpdateTask(){
  super.onUpdateTask();
  if (this.tileEntity instanceof IAutoSentry) {
    if (!this.tileEntity.isValidTarget(this.tileEntity.getTarget())) {
      this.tileEntity.setTarget(null,true);
      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.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;
}
Program: 169999
Project: 169999
Buggy source:
public boolean canUserAccess(String username){
  return (this.getUserAccess(username).ordinal() > AccessLevel.BASIC.ordinal());
}

Fixed version (ground truth):
public boolean canUserAccess(String username){
  return (this.getUserAccess(username).ordinal() >= AccessLevel.USER.ordinal());
}
Program: 170000
Project: 170000
Buggy source:
@Override public boolean canPlayerUse(EntityPlayer var1,ISpecialAccess mm){
  return mm.getUserAccess(var1.username).ordinal() >= AccessLevel.BASIC.ordinal() || var1.capabilities.isCreativeMode;
}

Fixed version (ground truth):
@Override public boolean canPlayerUse(EntityPlayer var1,ISpecialAccess mm){
  return mm.getUserAccess(var1.username).ordinal() >= AccessLevel.USER.ordinal() || var1.capabilities.isCreativeMode;
}
Program: 170002
Project: 170002
Buggy source:
/** 
 * Inherit this function to receive packets. Make sure this function is supered.
 * @throws IOException
 */
public void onReceivePacket(int packetID,EntityPlayer player,ByteArrayDataInput dataStream) throws IOException {
  if (packetID == TurretPacketType.ROTATION.ordinal()) {
    this.setRotation(dataStream.readFloat(),dataStream.readFloat());
  }
 else   if (packetID == TurretPacketType.DESCRIPTION.ordinal()) {
    short size=dataStream.readShort();
    if (size > 0) {
      byte[] byteCode=new byte[size];
      dataStream.readFully(byteCode);
      this.readFromNBT(CompressedStreamTools.decompress(byteCode));
    }
  }
 else   if (packetID == TurretPacketType.STATS.ordinal()) {
    this.health=dataStream.readInt();
  }
 else   if (packetID == TurretPacketType.MOUNT.ordinal()) {
    this.mount(player);
  }
}

Fixed version (ground truth):
/** 
 * Inherit this function to receive packets. Make sure this function is supered.
 * @throws IOException
 */
public void onReceivePacket(int packetID,EntityPlayer player,ByteArrayDataInput dataStream) throws IOException {
  if (packetID == TurretPacketType.ROTATION.ordinal()) {
    this.setRotation(dataStream.readFloat(),dataStream.readFloat());
  }
 else   if (packetID == TurretPacketType.DESCRIPTION.ordinal()) {
    short size=dataStream.readShort();
    if (size > 0) {
      byte[] byteCode=new byte[size];
      dataStream.readFully(byteCode);
      this.readFromNBT(CompressedStreamTools.decompress(byteCode));
    }
  }
 else   if (packetID == TurretPacketType.STATS.ordinal()) {
    this.health=dataStream.readInt();
  }
}
Program: 170003
Project: 170003
Buggy source:
@Override public Vector3 getMuzzle(){
  return this.getCenter().add(Vector3.multiply(LookHelper.getDeltaPositionFromRotation(this.currentRotationYaw,this.currentRotationPitch),1));
}

Fixed version (ground truth):
@Override public Vector3 getMuzzle(){
  return this.getCenter().add(Vector3.multiply(CalculationHelper.getDeltaPositionFromRotation(this.currentRotationYaw,this.currentRotationPitch),1));
}
Program: 170004
Project: 170004
Buggy source:
@Override public void onWeaponActivated(){
  this.tickSinceFired+=this.baseFiringDelay;
}

Fixed version (ground truth):
@Override public void onWeaponActivated(){
  this.tickSinceFired+=this.getFireDelay();
}
Program: 170005
Project: 170005
Buggy source:
@Override public void setRotation(float yaw,float pitch){
  this.wantedRotationYaw=MathHelper.wrapAngleTo180_float(yaw);
  this.wantedRotationPitch=MathHelper.wrapAngleTo180_float(pitch);
}

Fixed version (ground truth):
@Override public void setRotation(float yaw,float pitch){
  this.wantedRotationYaw=MathHelper.wrapAngleTo180_float(yaw);
  if (!this.allowFreePitch) {
    this.wantedRotationPitch=Math.max(Math.min(MathHelper.wrapAngleTo180_float(pitch),this.maxPitch),this.minPitch);
  }
 else {
    this.wantedRotationPitch=MathHelper.wrapAngleTo180_float(pitch);
  }
}
Program: 170006
Project: 170006
Buggy source:
public void drawParticleStreamTo(Vector3 endPosition){
  if (this.worldObj.isRemote) {
    Vector3 startPosition=this.getMuzzle();
    Vector3 direction=LookHelper.getDeltaPositionFromRotation(this.currentRotationYaw,this.currentRotationPitch);
    double xoffset=0;
    double yoffset=0;
    double zoffset=0;
    Vector3 horzdir=direction.normalize();
    horzdir.y=0;
    horzdir=horzdir.normalize();
    double cx=startPosition.x + direction.x * xoffset - direction.y * horzdir.x * yoffset - horzdir.z * zoffset;
    double cy=startPosition.y + direction.y * xoffset + (1 - Math.abs(direction.y)) * yoffset;
    double cz=startPosition.z + direction.x * xoffset - direction.y * horzdir.x * yoffset + horzdir.x * zoffset;
    double dx=endPosition.x - cx;
    double dy=endPosition.y - cy;
    double dz=endPosition.z - cz;
    double ratio=Math.sqrt(dx * dx + dy * dy + dz * dz);
    while (Math.abs(cx - endPosition.x) > Math.abs(dx / ratio)) {
      this.worldObj.spawnParticle("String_Node_Str",cx,cy,cz,0.0D,0.0D,0.0D);
      cx+=dx * 0.1 / ratio;
      cy+=dy * 0.1 / ratio;
      cz+=dz * 0.1 / ratio;
    }
  }
}

Fixed version (ground truth):
public void drawParticleStreamTo(Vector3 endPosition){
  if (this.worldObj.isRemote) {
    Vector3 startPosition=this.getMuzzle();
    Vector3 direction=CalculationHelper.getDeltaPositionFromRotation(this.currentRotationYaw,this.currentRotationPitch);
    double xoffset=0;
    double yoffset=0;
    double zoffset=0;
    Vector3 horzdir=direction.normalize();
    horzdir.y=0;
    horzdir=horzdir.normalize();
    double cx=startPosition.x + direction.x * xoffset - direction.y * horzdir.x * yoffset - horzdir.z * zoffset;
    double cy=startPosition.y + direction.y * xoffset + (1 - Math.abs(direction.y)) * yoffset;
    double cz=startPosition.z + direction.x * xoffset - direction.y * horzdir.x * yoffset + horzdir.x * zoffset;
    double dx=endPosition.x - cx;
    double dy=endPosition.y - cy;
    double dz=endPosition.z - cz;
    double ratio=Math.sqrt(dx * dx + dy * dy + dz * dz);
    while (Math.abs(cx - endPosition.x) > Math.abs(dx / ratio)) {
      this.worldObj.spawnParticle("String_Node_Str",cx,cy,cz,0.0D,0.0D,0.0D);
      cx+=dx * 0.1 / ratio;
      cy+=dy * 0.1 / ratio;
      cz+=dz * 0.1 / ratio;
    }
  }
}
Program: 170007
Project: 170007
Buggy source:
@Override public int getEntityLifespan(ItemStack itemStack,World world){
  if (itemStack != null && itemStack.getItemDamage() == types.BULLETINF.ordinal()) {
    return 40;
  }
  return 6000;
}

Fixed version (ground truth):
@Override public int getEntityLifespan(ItemStack itemStack,World world){
  if (itemStack != null && itemStack.getItemDamage() == types.BULLETINF.ordinal()) {
    return 40;
  }
  return super.getEntityLifespan(itemStack,world);
}
Program: 170008
Project: 170008
Buggy source:
public void renderBlockGravity(Block par1Block,int metadata,RenderBlocks renderer){
  float var6=0.5F;
  float var7=1.0F;
  float var8=0.8F;
  float var9=0.6F;
  Tessellator tess=Tessellator.instance;
  tess.startDrawingQuads();
  float var12=1.0F;
  tess.setColorOpaque_F(var6 * var12,var6 * var12,var6 * var12);
  renderer.renderFaceYNeg(par1Block,-0.5D,-0.5D,-0.5D,par1Block.getIcon(0,metadata));
  tess.setColorOpaque_F(var7 * var12,var7 * var12,var7 * var12);
  renderer.renderFaceYPos(par1Block,-0.5D,-0.5D,-0.5D,par1Block.getIcon(1,metadata));
  tess.setColorOpaque_F(var8 * var12,var8 * var12,var8 * var12);
  renderer.renderFaceZNeg(par1Block,-0.5D,-0.5D,-0.5D,par1Block.getIcon(2,metadata));
  tess.setColorOpaque_F(var8 * var12,var8 * var12,var8 * var12);
  renderer.renderFaceZPos(par1Block,-0.5D,-0.5D,-0.5D,par1Block.getIcon(3,metadata));
  tess.setColorOpaque_F(var9 * var12,var9 * var12,var9 * var12);
  renderer.renderFaceXNeg(par1Block,-0.5D,-0.5D,-0.5D,par1Block.getIcon(4,metadata));
  tess.setColorOpaque_F(var9 * var12,var9 * var12,var9 * var12);
  renderer.renderFaceXPos(par1Block,-0.5D,-0.5D,-0.5D,par1Block.getIcon(5,metadata));
  tess.draw();
}

Fixed version (ground truth):
public void renderBlockGravity(Block block,int metadata,RenderBlocks renderer){
  float var6=0.5F;
  float var7=1.0F;
  float var8=0.8F;
  float var9=0.6F;
  Tessellator tess=Tessellator.instance;
  tess.startDrawingQuads();
  float var12=1.0F;
  tess.setColorOpaque_F(var6 * var12,var6 * var12,var6 * var12);
  renderer.renderFaceYNeg(block,-0.5D,-0.5D,-0.5D,renderer.getBlockIconFromSideAndMetadata(block,0,metadata));
  tess.setColorOpaque_F(var7 * var12,var7 * var12,var7 * var12);
  renderer.renderFaceYPos(block,-0.5D,-0.5D,-0.5D,renderer.getBlockIconFromSideAndMetadata(block,1,metadata));
  tess.setColorOpaque_F(var8 * var12,var8 * var12,var8 * var12);
  renderer.renderFaceZNeg(block,-0.5D,-0.5D,-0.5D,renderer.getBlockIconFromSideAndMetadata(block,2,metadata));
  tess.setColorOpaque_F(var8 * var12,var8 * var12,var8 * var12);
  renderer.renderFaceZPos(block,-0.5D,-0.5D,-0.5D,renderer.getBlockIconFromSideAndMetadata(block,3,metadata));
  tess.setColorOpaque_F(var9 * var12,var9 * var12,var9 * var12);
  renderer.renderFaceXNeg(block,-0.5D,-0.5D,-0.5D,renderer.getBlockIconFromSideAndMetadata(block,4,metadata));
  tess.setColorOpaque_F(var9 * var12,var9 * var12,var9 * var12);
  renderer.renderFaceXPos(block,-0.5D,-0.5D,-0.5D,renderer.getBlockIconFromSideAndMetadata(block,5,metadata));
  tess.draw();
}
Program: 170009
Project: 170009
Buggy source:
@Init public void init(FMLInitializationEvent event){
  if (!isInit) {
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestBlock("String_Node_Str",0);
    BasicComponents.requestBlock("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestBlock("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.register(this,this.getChannel());
    isInit=true;
  }
}

Fixed version (ground truth):
@Init public void init(FMLInitializationEvent event){
  if (!isInit) {
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestBlock("String_Node_Str",0);
    BasicComponents.requestBlock("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestBlock("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.requestItem("String_Node_Str",0);
    BasicComponents.register(this,this.getChannel());
    isInit=true;
  }
}
Program: 170011
Project: 170011
Buggy source:
public BICBM(int id,String name,Material material){
  super(ZhuYaoBase.CONFIGURATION.getBlock(name,id).getInt(),material);
  this.setUnlocalizedName(ZhuYaoBase.PREFIX + name);
  this.setCreativeTab(ICBMTab.INSTANCE);
}

Fixed version (ground truth):
public BICBM(int id,String name,Material material){
  super(ZhuYaoBase.CONFIGURATION.getBlock(name,id).getInt(id),material);
  this.setUnlocalizedName(ZhuYaoBase.PREFIX + name);
  this.setCreativeTab(ICBMTab.INSTANCE);
}
Program: 170012
Project: 170012
Buggy source:
@Override @PreInit public void preInit(FMLPreInitializationEvent event){
  super.preInit(event);
  NetworkRegistry.instance().registerGuiHandler(this,ZhuYaoGangShao.proxy);
  MinecraftForge.EVENT_BUS.register(this);
  ZhuYaoBase.CONFIGURATION.load();
  blockTurret=new BlockTurret(BLOCK_ID_PREFIX);
  blockPlatform=new BlockTurretPlatform(BLOCK_ID_PREFIX + 1);
  blockFake=new BlockMulti(ZhuYaoBase.CONFIGURATION.getBlock("String_Node_Str",BLOCK_ID_PREFIX + 2).getInt());
  itemAmmo=new ItemAmmo(ITEM_ID_PREFIX + 1);
  ZhuYaoBase.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");
  GameRegistry.registerBlock(blockFake,"String_Node_Str");
  EntityRegistry.registerGlobalEntityID(EntityFakeMountable.class,"String_Node_Str",EntityRegistry.findGlobalUniqueEntityId());
  EntityRegistry.registerModEntity(EntityFakeMountable.class,"String_Node_Str",ENTITY_ID_PREFIX + 7,this,50,5,true);
  ICBMTab.itemStack=new ItemStack(blockTurret);
  proxy.preInit();
}

Fixed version (ground truth):
@Override @PreInit public void preInit(FMLPreInitializationEvent event){
  super.preInit(event);
  NetworkRegistry.instance().registerGuiHandler(this,ZhuYaoGangShao.proxy);
  MinecraftForge.EVENT_BUS.register(this);
  ZhuYaoBase.CONFIGURATION.load();
  blockTurret=new BlockTurret(BLOCK_ID_PREFIX);
  blockPlatform=new BlockTurretPlatform(BLOCK_ID_PREFIX + 1);
  itemAmmo=new ItemAmmo(ITEM_ID_PREFIX + 1);
  ZhuYaoBase.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(EntityFakeMountable.class,"String_Node_Str",EntityRegistry.findGlobalUniqueEntityId());
  EntityRegistry.registerModEntity(EntityFakeMountable.class,"String_Node_Str",ENTITY_ID_PREFIX + 7,this,50,5,true);
  ICBMTab.itemStack=new ItemStack(blockTurret);
  proxy.preInit();
}
Program: 170013
Project: 170013
Buggy source:
@Override public void onCreate(Vector3 position){
  this.worldObj.setBlock(position.intX(),position.intY() + 1,position.intZ(),ZhuYaoGangShao.blockFake.blockID,0,2);
  ((TileEntityMulti)this.worldObj.getBlockTileEntity(position.intX(),position.intY() + 1,position.intZ())).setMainBlock(position);
}

Fixed version (ground truth):
@Override public void onCreate(Vector3 position){
  this.worldObj.setBlock(position.intX(),position.intY() + 1,position.intZ(),ZhuYaoBase.bJia.blockID,0,2);
  ((TileEntityMulti)this.worldObj.getBlockTileEntity(position.intX(),position.intY() + 1,position.intZ())).setMainBlock(position);
}