Program: 174581
Project: 174581
Buggy source:
public EntityCarnelian(World worldIn){
  super(worldIn);
  this.setSize(0.9F,2.3F);
  this.isImmuneToFire=true;
  this.isSoldier=true;
  this.setValidCut(GemCuts.FACETED);
  this.setValidCut(GemCuts.CABOCHON);
  this.setValidCut(GemCuts.SQUARE);
  this.setValidPlacement(GemPlacements.BACK_OF_HEAD);
  this.setValidPlacement(GemPlacements.FOREHEAD);
  this.setValidPlacement(GemPlacements.LEFT_EYE);
  this.setValidPlacement(GemPlacements.RIGHT_EYE);
  this.setValidPlacement(GemPlacements.NOSE);
  this.setValidPlacement(GemPlacements.LEFT_CHEEK);
  this.setValidPlacement(GemPlacements.RIGHT_CHEEK);
  this.setValidPlacement(GemPlacements.LEFT_SHOULDER);
  this.setValidPlacement(GemPlacements.RIGHT_SHOULDER);
  this.setValidPlacement(GemPlacements.LEFT_HAND);
  this.setValidPlacement(GemPlacements.RIGHT_HAND);
  this.setValidPlacement(GemPlacements.BACK);
  this.setValidPlacement(GemPlacements.CHEST);
  this.setValidPlacement(GemPlacements.BELLY);
  this.setValidPlacement(GemPlacements.LEFT_THIGH);
  this.setValidPlacement(GemPlacements.RIGHT_THIGH);
  this.setValidPlacement(GemPlacements.LEFT_KNEE);
  this.setValidPlacement(GemPlacements.RIGHT_KNEE);
  this.stayAI=new EntityAIStay(this);
  this.tasks.addTask(2,new EntityAIMoveTowardsTarget(this,0.414D,32.0F));
  this.tasks.addTask(3,new EntityAIMoveTowardsRestriction(this,1.0D));
  this.tasks.addTask(4,new EntityAIFollowDiamond(this,1.0D));
  this.tasks.addTask(5,new EntityAIStandGuard(this,0.6D));
  this.tasks.addTask(6,new EntityAIWatchClosest(this,EntityPlayer.class,16.0F));
  this.tasks.addTask(6,new EntityAIWatchClosest(this,EntityMob.class,16.0F));
  this.tasks.addTask(7,new EntityAILookIdle(this));
  this.targetTasks.addTask(1,new EntityAIDiamondHurtByTarget(this));
  this.targetTasks.addTask(2,new EntityAIDiamondHurtTarget(this));
  this.targetTasks.addTask(3,new EntityAIHurtByTarget(this,false,new Class[0]));
  this.targetTasks.addTask(4,new EntityAINearestAttackableTarget<EntityLiving>(this,EntityLiving.class,10,true,false,new Predicate<EntityLiving>(){
    public boolean apply(    EntityLiving input){
      return input != null && IMob.VISIBLE_MOB_SELECTOR.apply(input);
    }
  }
));
  this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(200.0D);
  this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(12.0D);
  this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.4D);
  this.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).setBaseValue(1.0D);
  this.droppedGemItem=ModItems.CARNELIAN_GEM;
  this.droppedCrackedGemItem=ModItems.CRACKED_CARNELIAN_GEM;
  this.dataManager.register(CHARGED,false);
}

Fixed version (ground truth):
public EntityCarnelian(World worldIn){
  super(worldIn);
  this.setSize(0.9F,2.3F);
  this.isImmuneToFire=true;
  this.isSoldier=true;
  this.setCutPlacement(GemCuts.FACETED,GemPlacements.BACK_OF_HEAD);
  this.setCutPlacement(GemCuts.FACETED,GemPlacements.FOREHEAD);
  this.setCutPlacement(GemCuts.FACETED,GemPlacements.LEFT_EYE);
  this.setCutPlacement(GemCuts.FACETED,GemPlacements.RIGHT_EYE);
  this.setCutPlacement(GemCuts.FACETED,GemPlacements.NOSE);
  this.setCutPlacement(GemCuts.FACETED,GemPlacements.LEFT_CHEEK);
  this.setCutPlacement(GemCuts.FACETED,GemPlacements.RIGHT_CHEEK);
  this.setCutPlacement(GemCuts.FACETED,GemPlacements.LEFT_SHOULDER);
  this.setCutPlacement(GemCuts.FACETED,GemPlacements.RIGHT_SHOULDER);
  this.setCutPlacement(GemCuts.FACETED,GemPlacements.LEFT_HAND);
  this.setCutPlacement(GemCuts.FACETED,GemPlacements.RIGHT_HAND);
  this.setCutPlacement(GemCuts.FACETED,GemPlacements.BACK);
  this.setCutPlacement(GemCuts.FACETED,GemPlacements.CHEST);
  this.setCutPlacement(GemCuts.FACETED,GemPlacements.BELLY);
  this.setCutPlacement(GemCuts.FACETED,GemPlacements.LEFT_THIGH);
  this.setCutPlacement(GemCuts.FACETED,GemPlacements.RIGHT_THIGH);
  this.setCutPlacement(GemCuts.FACETED,GemPlacements.LEFT_KNEE);
  this.setCutPlacement(GemCuts.FACETED,GemPlacements.RIGHT_KNEE);
  this.setCutPlacement(GemCuts.CABOCHON,GemPlacements.BACK_OF_HEAD);
  this.setCutPlacement(GemCuts.CABOCHON,GemPlacements.FOREHEAD);
  this.setCutPlacement(GemCuts.CABOCHON,GemPlacements.LEFT_EYE);
  this.setCutPlacement(GemCuts.CABOCHON,GemPlacements.RIGHT_EYE);
  this.setCutPlacement(GemCuts.CABOCHON,GemPlacements.NOSE);
  this.setCutPlacement(GemCuts.CABOCHON,GemPlacements.LEFT_CHEEK);
  this.setCutPlacement(GemCuts.CABOCHON,GemPlacements.RIGHT_CHEEK);
  this.setCutPlacement(GemCuts.CABOCHON,GemPlacements.LEFT_SHOULDER);
  this.setCutPlacement(GemCuts.CABOCHON,GemPlacements.RIGHT_SHOULDER);
  this.setCutPlacement(GemCuts.CABOCHON,GemPlacements.LEFT_HAND);
  this.setCutPlacement(GemCuts.CABOCHON,GemPlacements.RIGHT_HAND);
  this.setCutPlacement(GemCuts.CABOCHON,GemPlacements.BACK);
  this.setCutPlacement(GemCuts.CABOCHON,GemPlacements.CHEST);
  this.setCutPlacement(GemCuts.CABOCHON,GemPlacements.BELLY);
  this.setCutPlacement(GemCuts.CABOCHON,GemPlacements.LEFT_THIGH);
  this.setCutPlacement(GemCuts.CABOCHON,GemPlacements.RIGHT_THIGH);
  this.setCutPlacement(GemCuts.CABOCHON,GemPlacements.LEFT_KNEE);
  this.setCutPlacement(GemCuts.CABOCHON,GemPlacements.RIGHT_KNEE);
  this.stayAI=new EntityAIStay(this);
  this.tasks.addTask(2,new EntityAIMoveTowardsTarget(this,0.414D,32.0F));
  this.tasks.addTask(3,new EntityAIMoveTowardsRestriction(this,1.0D));
  this.tasks.addTask(4,new EntityAIFollowDiamond(this,1.0D));
  this.tasks.addTask(5,new EntityAIStandGuard(this,0.6D));
  this.tasks.addTask(6,new EntityAIWatchClosest(this,EntityPlayer.class,16.0F));
  this.tasks.addTask(6,new EntityAIWatchClosest(this,EntityMob.class,16.0F));
  this.tasks.addTask(7,new EntityAILookIdle(this));
  this.targetTasks.addTask(1,new EntityAIDiamondHurtByTarget(this));
  this.targetTasks.addTask(2,new EntityAIDiamondHurtTarget(this));
  this.targetTasks.addTask(3,new EntityAIHurtByTarget(this,false,new Class[0]));
  this.targetTasks.addTask(4,new EntityAINearestAttackableTarget<EntityLiving>(this,EntityLiving.class,10,true,false,new Predicate<EntityLiving>(){
    public boolean apply(    EntityLiving input){
      return input != null && IMob.VISIBLE_MOB_SELECTOR.apply(input);
    }
  }
));
  this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(200.0D);
  this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(12.0D);
  this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.4D);
  this.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).setBaseValue(1.0D);
  this.droppedGemItem=ModItems.CARNELIAN_GEM;
  this.droppedCrackedGemItem=ModItems.CRACKED_CARNELIAN_GEM;
  this.dataManager.register(CHARGED,false);
}