Program: 109843
Project: 109843
Buggy source:
/** 
 * Called each tick as long the item is on a player inventory. Uses by maps to check if is on a player hand and update it's contents.
 */
@Override public void onUpdate(ItemStack itemstack,World world,Entity entity,int par4,boolean par5){
  if (world.isRemote)   return;
  if (ticksUntilUpdate <= 0) {
    EntityPlayer player;
    if (entity instanceof EntityPlayer)     player=(EntityPlayer)entity;
 else     return;
    if (!isFullyUnderwater(world,player)) {
      return;
    }
    ItemStack helmetStack=player.getItemStackFromSlot(EntityEquipmentSlot.HEAD);
    ItemStack chestplateStack=player.getItemStackFromSlot(EntityEquipmentSlot.CHEST);
    ItemStack leggingsStack=player.getItemStackFromSlot(EntityEquipmentSlot.LEGS);
    ItemStack flippersStack=player.getItemStackFromSlot(EntityEquipmentSlot.FEET);
    if (!armorCheck(world,player,helmetStack,chestplateStack,leggingsStack,flippersStack))     return;
    player.setAir(300);
    float air=getTagCompound(chestplateStack).getFloat("String_Node_Str");
    AirType airType=chestplateStack.getItemDamage() >= 2 ? AirType.TRIMIX : AirType.REGULAR;
    chestplateStack.getTagCompound().setFloat("String_Node_Str",air - airType.getUsageRate());
    int currentDepth=MathHelper.floor(player.posY);
    if (currentDepth < chestplateStack.getTagCompound().getInteger("String_Node_Str") || chestplateStack.getTagCompound().getInteger("String_Node_Str") == 0)     chestplateStack.getTagCompound().setInteger("String_Node_Str",currentDepth);
    int waterBlocksAbove=0, waterBlocksBelow=0;
    int x=MathHelper.floor(player.posX);
    int y=MathHelper.floor(player.posY + player.height - 0.5);
    int z=MathHelper.floor(player.posZ);
    while (world.getBlockState(new BlockPos(x,y + waterBlocksAbove + 1,z)).getMaterial().isLiquid()) {
      waterBlocksAbove++;
    }
    while (world.getBlockState(new BlockPos(x,y - waterBlocksBelow - 1,z)).getMaterial().isLiquid()) {
      waterBlocksBelow++;
    }
    chestplateStack.getTagCompound().setInteger("String_Node_Str",waterBlocksAbove);
    chestplateStack.getTagCompound().setInteger("String_Node_Str",waterBlocksBelow);
    ticksUntilUpdate=UPDATE_RATE;
  }
 else   ticksUntilUpdate--;
}

Fixed version (ground truth):
/** 
 * Called each tick as long the item is on a player inventory. Uses by maps to check if is on a player hand and update it's contents.
 */
@Override public void onUpdate(ItemStack itemstack,World world,Entity entity,int par4,boolean par5){
  if (world.isRemote) {
    return;
  }
  if (ticksUntilUpdate <= 0) {
    EntityPlayer player;
    if (entity instanceof EntityPlayer)     player=(EntityPlayer)entity;
 else     return;
    if (!isFullyUnderwater(world,player)) {
      return;
    }
    ItemStack helmetStack=player.getItemStackFromSlot(EntityEquipmentSlot.HEAD);
    ItemStack chestplateStack=player.getItemStackFromSlot(EntityEquipmentSlot.CHEST);
    ItemStack leggingsStack=player.getItemStackFromSlot(EntityEquipmentSlot.LEGS);
    ItemStack flippersStack=player.getItemStackFromSlot(EntityEquipmentSlot.FEET);
    if (!armorCheck(world,player,helmetStack,chestplateStack,leggingsStack,flippersStack))     return;
    player.setAir(300);
    float air=getTagCompound(chestplateStack).getFloat("String_Node_Str");
    AirType airType=chestplateStack.getItemDamage() >= 2 ? AirType.TRIMIX : AirType.REGULAR;
    chestplateStack.getTagCompound().setFloat("String_Node_Str",air - airType.getUsageRate());
    int currentDepth=MathHelper.floor(player.posY);
    if (currentDepth < chestplateStack.getTagCompound().getInteger("String_Node_Str") || chestplateStack.getTagCompound().getInteger("String_Node_Str") == 0)     chestplateStack.getTagCompound().setInteger("String_Node_Str",currentDepth);
    int waterBlocksAbove=0, waterBlocksBelow=0;
    int x=MathHelper.floor(player.posX);
    int y=MathHelper.floor(player.posY + player.height - 0.5);
    int z=MathHelper.floor(player.posZ);
    while (world.getBlockState(new BlockPos(x,y + waterBlocksAbove + 1,z)).getMaterial().isLiquid()) {
      waterBlocksAbove++;
    }
    while (world.getBlockState(new BlockPos(x,y - waterBlocksBelow - 1,z)).getMaterial().isLiquid()) {
      waterBlocksBelow++;
    }
    chestplateStack.getTagCompound().setInteger("String_Node_Str",waterBlocksAbove);
    chestplateStack.getTagCompound().setInteger("String_Node_Str",waterBlocksBelow);
    ticksUntilUpdate=UPDATE_RATE;
  }
 else   ticksUntilUpdate--;
}