Program: 24645
Project: 24645
Buggy source:
/** 
 * Character stats are directly affected by his attributes Therefore any change in attributes must be followed by call to this method
 */
public final void calculateStats(){
  int strength=attributes[STR] + bAttributes[STR];
  int vitality=attributes[VIT] + bAttributes[VIT];
  int dexterity=attributes[DEX] + bAttributes[DEX];
  int agility=attributes[AGI] + bAttributes[AGI];
  int intellect=attributes[INT] + bAttributes[INT];
  int wisdom=attributes[WIS] + bAttributes[WIS];
  int willpower=attributes[WIL] + bAttributes[WIL];
  int perception=attributes[PER] + bAttributes[PER];
  int luck=attributes[LUC] + bAttributes[LUC];
  stats[MAX_HP]=(int)((vitality * MODIFIER_VERY_HIGH + strength * MODIFIER_MEDIUM) * charClass.hp + MODIFIER_LEVEL * baseLevel * charClass.hp + (int)(vitality / 10) * charClass.hp);
  stats[MAX_SP]=(int)((wisdom * MODIFIER_VERY_HIGH + intellect * MODIFIER_MEDIUM + willpower * MODIFIER_VERY_LOW) * charClass.sp + MODIFIER_LEVEL * baseLevel * charClass.sp + (int)(wisdom / 10) * charClass.sp);
  stats[ATK]=(int)((strength * MODIFIER_VERY_HIGH + dexterity * MODIFIER_MEDIUM + perception * MODIFIER_LOW + luck * MODIFIER_VERY_LOW) + baseLevel + (int)(strength / 10) * ((int)(strength / 10) + 1));
  stats[MATK]=(int)((intellect * MODIFIER_VERY_HIGH + wisdom * MODIFIER_HIGH + willpower * MODIFIER_HIGH + dexterity * MODIFIER_MEDIUM + perception * MODIFIER_LOW + luck * MODIFIER_VERY_LOW) + baseLevel + (int)(intellect / 10) * ((int)(intellect / 10) + 1));
  stats[DEF]=(int)((vitality * MODIFIER_MEDIUM + perception * MODIFIER_LOW + strength * MODIFIER_VERY_LOW) + MODIFIER_LEVEL * baseLevel + (int)(vitality / 20) * (charClass.hp / 10));
  stats[MDEF]=(int)((willpower * MODIFIER_HIGH + wisdom * MODIFIER_MEDIUM + perception * MODIFIER_LOW + intellect * MODIFIER_VERY_LOW) + MODIFIER_LEVEL * baseLevel + (int)(willpower / 20) * (intellect / 10));
  stats[ASPD]=agility * MODIFIER_VERY_HIGH + dexterity * MODIFIER_LOW;
  stats[MSPD]=(int)((dexterity * MODIFIER_MEDIUM + willpower * MODIFIER_VERY_LOW + wisdom * MODIFIER_VERY_LOW + intellect * MODIFIER_VERY_LOW + perception * MODIFIER_VERY_LOW + luck * MODIFIER_VERY_LOW));
  stats[CRIT]=(int)((luck * MODIFIER_VERY_HIGH + dexterity * MODIFIER_VERY_LOW + perception * MODIFIER_VERY_LOW + wisdom * MODIFIER_VERY_LOW));
  stats[MCRIT]=(int)((luck * MODIFIER_HIGH + willpower * MODIFIER_LOW + perception * MODIFIER_VERY_LOW));
  atkCritDmg=2 + luck * 0.01;
  matkCritDmg=2 + luck * 0.01;
}

Fixed version (ground truth):
/** 
 * Character stats are directly affected by his attributes Therefore any change in attributes must be followed by call to this method
 */
public final void calculateStats(){
  int strength=attributes[STR] + bAttributes[STR];
  int vitality=attributes[VIT] + bAttributes[VIT];
  int dexterity=attributes[DEX] + bAttributes[DEX];
  int agility=attributes[AGI] + bAttributes[AGI];
  int intellect=attributes[INT] + bAttributes[INT];
  int wisdom=attributes[WIS] + bAttributes[WIS];
  int willpower=attributes[WIL] + bAttributes[WIL];
  int perception=attributes[PER] + bAttributes[PER];
  int luck=attributes[LUC] + bAttributes[LUC];
  stats[MAX_HP]=(int)((vitality * MODIFIER_VERY_HIGH + strength * MODIFIER_MEDIUM) * charClass.hp + MODIFIER_LEVEL * baseLevel * charClass.hp + (int)(vitality / 10) * charClass.hp);
  stats[MAX_SP]=(int)((wisdom * MODIFIER_VERY_HIGH + intellect * MODIFIER_MEDIUM + willpower * MODIFIER_VERY_LOW) * charClass.sp + MODIFIER_LEVEL * baseLevel * charClass.sp + (int)(wisdom / 10) * charClass.sp);
  stats[ATK]=(int)((strength * MODIFIER_VERY_HIGH + dexterity * MODIFIER_MEDIUM + perception * MODIFIER_LOW + luck * MODIFIER_VERY_LOW) + baseLevel + (int)(strength / 10) * ((int)(strength / 10) + 1));
  stats[MATK]=(int)((intellect * MODIFIER_VERY_HIGH + wisdom * MODIFIER_HIGH + willpower * MODIFIER_HIGH + dexterity * MODIFIER_MEDIUM + perception * MODIFIER_LOW + luck * MODIFIER_VERY_LOW) + baseLevel + (int)(intellect / 10) * ((int)(intellect / 10) + 1));
  stats[DEF]=(int)((vitality * MODIFIER_MEDIUM + perception * MODIFIER_LOW + strength * MODIFIER_VERY_LOW) + MODIFIER_LEVEL * baseLevel + (int)(vitality / 20) * (charClass.hp / 10));
  stats[MDEF]=(int)((willpower * MODIFIER_HIGH + wisdom * MODIFIER_MEDIUM + perception * MODIFIER_LOW + intellect * MODIFIER_VERY_LOW) + MODIFIER_LEVEL * baseLevel + (int)(willpower / 20) * (intellect / 10));
  stats[ASPD]=agility * MODIFIER_VERY_HIGH + dexterity * MODIFIER_LOW;
  stats[MSPD]=(int)((dexterity * MODIFIER_MEDIUM + willpower * MODIFIER_VERY_LOW + wisdom * MODIFIER_VERY_LOW + intellect * MODIFIER_VERY_LOW + perception * MODIFIER_VERY_LOW + luck * MODIFIER_VERY_LOW));
  stats[CRIT]=(int)((luck * MODIFIER_VERY_HIGH + dexterity * MODIFIER_VERY_LOW + perception * MODIFIER_VERY_LOW + wisdom * MODIFIER_VERY_LOW));
  stats[MCRIT]=(int)((luck * MODIFIER_HIGH + willpower * MODIFIER_LOW + perception * MODIFIER_VERY_LOW));
  atkCritDmg=2 + luck * 0.01f;
  matkCritDmg=2 + luck * 0.01f;
}