Buggy code:
public class Player extends MobileObject { public Player ( ) { } private int hp = 0 ; private int maxHp = 0 ; private int attack = 0 ; private int defense = 0 ; private int strength = 0 ; private int level = 0 ; private int intelligence = 0 ; private int dexterity = 0 ; private int experience = 0 ; private int mana = 0 ; private int maxMana = 0 ; private int attackBonus = 0 ; private int defenseBonus = 0 ; private CharTile tile ; private Inventory inventory ; private SkillList skillList ; private int skillCounter = 0 ; private SelfAction revertSkill = null ; private Weapon currentWeapon ; private Armor currentArmor ; private Level [ ] levels = new Level [ ] { new Level ( 0 , 10 , 10 , 10 ) , new Level ( 200 , 10 , 10 , 10 ) , new Level ( 400 , 10 , 10 , 10 ) , new Level ( 800 , 10 , 10 , 10 ) , new Level ( 1600 , 10 , 10 , 10 ) , new Level ( 3200 , 15 , 15 , 15 ) , new Level ( 6400 , 15 , 15 , 15 ) , new Level ( 12800 , 15 , 15 , 15 ) , new Level ( 25600 , 15 , 15 , 15 ) , new Level ( 51200 , 15 , 15 , 15 ) , new Level ( 102400 , 20 , 20 , 20 ) } ; public void gainLevel ( ) { } private void calculateDerivedStats ( ) { this . maxHp = ( strength ) * 3 ; <START_BUG> this . maxMana = ( ( int ) ( ( intelligence ) * 1.5 ) ) ; <END_BUG> this . attack = ( strength ) + ( attackBonus ) ; this . defense = ( dexterity ) + ( defenseBonus ) ; if ( ( this . hp ) > ( this . maxHp ) ) this . hp = this . maxHp ; if ( ( this . mana ) > ( this . maxMana ) ) this . mana = this . maxMana ; } public boolean isReadyForNextLevel ( ) { } public Weapon getCurrentWeapon ( ) { } public Armor getCurrentArmor ( ) { } public void setCurrentWeapon ( Weapon weapon ) { } public void setCurrentArmor ( Armor armor ) { } public void unequipedArmor ( ) { } public void unequipedWeapon ( ) { } public void equipWeapon ( ) { } public void equipArmor ( ) { } public boolean isWeaponEquiped ( ) { } public boolean isArmorEquiped ( ) { } public void usedFood ( Food food ) { } public void usedPotion ( Potion potion ) { } public boolean usedScroll ( Scroll scroll ) { } public int getHp ( ) { } public void setHp ( int hp ) { } public int getMaxHp ( ) { } public int getAttack ( ) { } public int getDefense ( ) { } public int getStrength ( ) { } public void setStrength ( int strength ) { } public int getLevel ( ) { } public void setLevel ( int level ) { } public int getIntelligence ( ) { } public void setIntelligence ( int intelligence ) { } public int getDexterity ( ) { } public void setDexterity ( int dexterity ) { } public int getExperience ( ) { } public void setExperience ( int experience ) { } public int getMana ( ) { } public void setMana ( int mana ) { } public void setMaxMana ( int maxMana ) { } public void setMaxHp ( int maxHp ) { } public int getMaxMana ( ) { } public int getAttackBonus ( ) { } public void setAttackBonus ( int attackBonus ) { } public int getDefenseBonus ( ) { } public void setDefenseBonus ( int defenseBonus ) { } public CharTile getTile ( ) { } public void setTile ( CharTile tile ) { } public Inventory getInventory ( ) { } public void setInventory ( Inventory inventory ) { } public SkillList getSkillList ( ) { } public void setSkillList ( SkillList skillList ) { } public void addSkillType ( SkillType skill ) { } public void removeSkillType ( SkillType s ) { } public SkillAction getSkill ( int index ) { } public Menu getEquipMenu ( ) { } public Menu getSkillMenu ( ) { } public Menu getInventoryMenu ( ) { } public int getSkillCounter ( ) { } public void setSkillCounter ( int skillCounter ) { } public void incrementSkillCounter ( ) { } public void decrementSkillCounter ( ) { } public SelfAction getRevertSkill ( ) { } public void setRevertSkill ( SelfAction revertSkill ) { } public void checkStatus ( ) { } }

Fix:
this . maxMana = ( intelligence ) * 2 ;