Program: 174572
Project: 174572
Buggy source:
/** 
 * Methods related to entity death.                      
 */
public void onDeath(DamageSource cause){
  if (!this.world.isRemote) {
    if (this.isFusion()) {
      this.unfuse();
      this.setDead();
    }
 else {
      ItemStack stack=new ItemStack(this.droppedGemItem);
      boolean shattered=false;
      boolean enchanted=false;
      if (cause.getEntity() instanceof EntityLivingBase) {
        ItemStack heldItem=((EntityLivingBase)cause.getEntity()).getHeldItemMainhand();
        if (heldItem.isItemEnchanted()) {
          NBTTagList enchantments=heldItem.getEnchantmentTagList();
          for (int i=0; i < enchantments.tagCount(); i++) {
            if (enchantments.getCompoundTagAt(i).getInteger("String_Node_Str") == Enchantment.getEnchantmentID(ModEnchantments.BREAKING_POINT)) {
              if (cause.getEntity() instanceof EntityPlayer) {
                EntityPlayer player=(EntityPlayer)cause.getEntity();
                player.addStat(ModAchievements.NOW_THATS_A_WEAPON);
              }
              stack=new ItemStack(this.droppedCrackedGemItem);
              enchanted=true;
              shattered=true;
            }
 else             if (enchantments.getCompoundTagAt(i).getInteger("String_Node_Str") == Enchantment.getEnchantmentID(ModEnchantments.FAIR_FIGHT)) {
              if (cause.getEntity() instanceof EntityPlayer) {
                EntityPlayer player=(EntityPlayer)cause.getEntity();
                player.addStat(ModAchievements.MY_BEST_WORK);
              }
              stack=new ItemStack(this.droppedGemItem);
              enchanted=true;
            }
          }
        }
 else         if (heldItem.getItem() == ModItems.GEM_STAFF) {
          stack=new ItemStack(this.droppedGemItem);
          enchanted=true;
        }
      }
      if (!enchanted) {
        if (this.rand.nextInt(80) == 0) {
          stack=new ItemStack(this.droppedCrackedGemItem);
          shattered=true;
        }
 else {
          stack=new ItemStack(this.droppedGemItem);
        }
      }
      if (shattered) {
        this.playSound(ModSounds.GEM_SHATTER,3.0F,1.0F);
        cause=new ShatterDamage();
      }
 else {
        this.playSound(ModSounds.GEM_POOF,3.0F,1.0F);
        cause=new PoofDamage();
      }
      if (cause.getEntity() instanceof EntitySlag) {
        cause=new SlagDamage();
      }
      if (this.world.getGameRules().getBoolean("String_Node_Str")) {
        for (        EntityPlayer playerIn : this.world.playerEntities) {
          if (EntityPlayer.getUUID(playerIn.getGameProfile()).equals(this.getOwnerId())) {
            playerIn.sendMessage(cause.getDeathMessage(this));
          }
 else {
            for (            UUID ownerId : this.jointOwners) {
              if (EntityPlayer.getUUID(playerIn.getGameProfile()).equals(ownerId)) {
                playerIn.sendMessage(cause.getDeathMessage(this));
              }
            }
          }
        }
      }
      if (!stack.isEmpty()) {
        ((ItemGem)stack.getItem()).setData(this,stack);
        this.entityDropItem(stack,0.0F);
      }
    }
  }
  super.onDeath(cause);
}

Fixed version (ground truth):
/** 
 * Methods related to entity death.					  
 */
public void onDeath(DamageSource cause){
  if (!this.world.isRemote) {
    if (this.isFusion()) {
      this.unfuse();
      this.setDead();
    }
 else {
      ItemStack stack=new ItemStack(this.droppedGemItem);
      boolean shattered=false;
      boolean enchanted=false;
      if (cause.getEntity() instanceof EntityLivingBase) {
        ItemStack heldItem=((EntityLivingBase)cause.getEntity()).getHeldItemMainhand();
        if (heldItem.isItemEnchanted()) {
          NBTTagList enchantments=heldItem.getEnchantmentTagList();
          for (int i=0; i < enchantments.tagCount(); i++) {
            if (enchantments.getCompoundTagAt(i).getInteger("String_Node_Str") == Enchantment.getEnchantmentID(ModEnchantments.BREAKING_POINT)) {
              if (cause.getEntity() instanceof EntityPlayer) {
                EntityPlayer player=(EntityPlayer)cause.getEntity();
                player.addStat(ModAchievements.NOW_THATS_A_WEAPON);
              }
              stack=new ItemStack(this.droppedCrackedGemItem);
              enchanted=true;
              shattered=true;
            }
 else             if (enchantments.getCompoundTagAt(i).getInteger("String_Node_Str") == Enchantment.getEnchantmentID(ModEnchantments.FAIR_FIGHT)) {
              if (cause.getEntity() instanceof EntityPlayer) {
                EntityPlayer player=(EntityPlayer)cause.getEntity();
                player.addStat(ModAchievements.MY_BEST_WORK);
              }
              stack=new ItemStack(this.droppedGemItem);
              enchanted=true;
            }
          }
        }
 else         if (heldItem.getItem() == ModItems.GEM_STAFF) {
          stack=new ItemStack(this.droppedGemItem);
          enchanted=true;
        }
      }
      if (!enchanted) {
        if (this.rand.nextInt(80) == 0) {
          stack=new ItemStack(this.droppedCrackedGemItem);
          shattered=true;
        }
 else {
          stack=new ItemStack(this.droppedGemItem);
        }
      }
      if (shattered) {
        this.playSound(ModSounds.GEM_SHATTER,3.0F,1.0F);
        cause=new ShatterDamage();
      }
 else {
        this.playSound(ModSounds.GEM_POOF,3.0F,1.0F);
        cause=new PoofDamage();
      }
      if (cause.getEntity() instanceof EntitySlag) {
        cause=new SlagDamage();
      }
      if (this.world.getGameRules().getBoolean("String_Node_Str")) {
        for (        EntityPlayer playerIn : this.world.playerEntities) {
          if (EntityPlayer.getUUID(playerIn.getGameProfile()).equals(this.getOwnerId())) {
            playerIn.sendMessage(cause.getDeathMessage(this));
          }
 else {
            for (            UUID ownerId : this.jointOwners) {
              if (EntityPlayer.getUUID(playerIn.getGameProfile()).equals(ownerId)) {
                playerIn.sendMessage(cause.getDeathMessage(this));
              }
            }
          }
        }
      }
      if (!stack.isEmpty()) {
        ((ItemGem)stack.getItem()).setData(this,stack);
        this.entityDropItem(stack,0.0F);
      }
    }
  }
  super.onDeath(cause);
}