Program: 169723
Project: 169723
Buggy source:
/** 
 * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer 
 */
@Override public ItemStack onItemRightClick(ItemStack par1ItemStack,World world,EntityPlayer player){
  if (world.isRemote) {
    MovingObjectPosition objectMouseOver=player.rayTrace(BAN_JING * 2,1);
    if (objectMouseOver != null && objectMouseOver.typeOfHit == EnumMovingObjectType.TILE) {
      int blockId=world.getBlockId(objectMouseOver.blockX,objectMouseOver.blockY,objectMouseOver.blockZ);
      int blockMetadata=world.getBlockMetadata(objectMouseOver.blockX,objectMouseOver.blockY,objectMouseOver.blockZ);
      if (this.getLauncherCountDown(par1ItemStack) > 0) {
        return par1ItemStack;
      }
      if (blockId == ICBMExplosion.blockMachine.blockID) {
        return par1ItemStack;
      }
 else {
        int airStrikeFreq=this.getFrequency(par1ItemStack);
        if (airStrikeFreq > 0) {
          if (this.getEnergy(par1ItemStack) >= YONG_DIAN_LIANG) {
            Vector3 position=new Vector3(player.posX,player.posY,player.posZ);
            boolean doAirStrike=false;
            int errorCount=0;
            for (            IBlockFrequency blockFrequency : FrequencyGrid.instance().get(world,position,ItemLaserDesignator.BAN_JING,airStrikeFreq)) {
              if (blockFrequency instanceof TileLauncherPrefab) {
                TileLauncherPrefab missileLauncher=(TileLauncherPrefab)blockFrequency;
                double yHit=objectMouseOver.blockY;
                if (missileLauncher instanceof TileLauncherScreen) {
                  if (missileLauncher.getTarget() != null)                   yHit=missileLauncher.getTarget().y;
 else                   yHit=0;
                }
                missileLauncher.setTarget(new Vector3(objectMouseOver.blockX,yHit,objectMouseOver.blockZ));
                PacketDispatcher.sendPacketToServer(ICBMCore.PACKET_TILE.getPacket(missileLauncher,2,missileLauncher.getTarget().intX(),missileLauncher.getTarget().intY(),missileLauncher.getTarget().intZ()));
                if (missileLauncher.canLaunch()) {
                  doAirStrike=true;
                }
 else {
                  errorCount++;
                  player.addChatMessage("String_Node_Str" + errorCount + "String_Node_Str"+ missileLauncher.getStatus());
                }
              }
            }
            if (doAirStrike && this.getLauncherCountDown(par1ItemStack) >= 0) {
              PacketDispatcher.sendPacketToServer(ICBMCore.PACKET_ITEM.getPacket(player,objectMouseOver.blockX,objectMouseOver.blockY,objectMouseOver.blockZ));
              player.addChatMessage(LanguageUtility.getLocal("String_Node_Str"));
            }
          }
 else {
            player.addChatMessage(LanguageUtility.getLocal("String_Node_Str"));
          }
        }
 else {
          player.addChatMessage(LanguageUtility.getLocal("String_Node_Str"));
        }
      }
    }
  }
  return par1ItemStack;
}

Fixed version (ground truth):
/** 
 * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer 
 */
@Override public ItemStack onItemRightClick(ItemStack par1ItemStack,World world,EntityPlayer player){
  if (world.isRemote) {
    MovingObjectPosition objectMouseOver=player.rayTrace(BAN_JING * 2,1);
    if (objectMouseOver != null && objectMouseOver.typeOfHit == EnumMovingObjectType.TILE) {
      int blockId=world.getBlockId(objectMouseOver.blockX,objectMouseOver.blockY,objectMouseOver.blockZ);
      int blockMetadata=world.getBlockMetadata(objectMouseOver.blockX,objectMouseOver.blockY,objectMouseOver.blockZ);
      if (this.getLauncherCountDown(par1ItemStack) > 0) {
        return par1ItemStack;
      }
      if (blockId == ICBMExplosion.blockMachine.blockID) {
        return par1ItemStack;
      }
 else {
        int airStrikeFreq=this.getFrequency(par1ItemStack);
        if (airStrikeFreq > 0) {
          if (this.getEnergy(par1ItemStack) >= energyCost) {
            Vector3 position=new Vector3(player.posX,player.posY,player.posZ);
            boolean doAirStrike=false;
            int errorCount=0;
            for (            IBlockFrequency blockFrequency : FrequencyGrid.instance().get(world,position,ItemLaserDesignator.BAN_JING,airStrikeFreq)) {
              if (blockFrequency instanceof TileLauncherPrefab) {
                TileLauncherPrefab missileLauncher=(TileLauncherPrefab)blockFrequency;
                double yHit=objectMouseOver.blockY;
                if (missileLauncher instanceof TileLauncherScreen) {
                  if (missileLauncher.getTarget() != null)                   yHit=missileLauncher.getTarget().y;
 else                   yHit=0;
                }
                missileLauncher.setTarget(new Vector3(objectMouseOver.blockX,yHit,objectMouseOver.blockZ));
                PacketDispatcher.sendPacketToServer(ICBMCore.PACKET_TILE.getPacket(missileLauncher,2,missileLauncher.getTarget().intX(),missileLauncher.getTarget().intY(),missileLauncher.getTarget().intZ()));
                if (missileLauncher.canLaunch()) {
                  doAirStrike=true;
                }
 else {
                  errorCount++;
                  player.addChatMessage("String_Node_Str" + errorCount + "String_Node_Str"+ missileLauncher.getStatus());
                }
              }
            }
            if (doAirStrike && this.getLauncherCountDown(par1ItemStack) >= 0) {
              PacketDispatcher.sendPacketToServer(ICBMCore.PACKET_ITEM.getPacket(player,objectMouseOver.blockX,objectMouseOver.blockY,objectMouseOver.blockZ));
              player.addChatMessage(LanguageUtility.getLocal("String_Node_Str"));
            }
          }
 else {
            player.addChatMessage(LanguageUtility.getLocal("String_Node_Str"));
          }
        }
 else {
          player.addChatMessage(LanguageUtility.getLocal("String_Node_Str"));
        }
      }
    }
  }
  return par1ItemStack;
}