Buggy code:
public class Player implements Serializable { private static final long serialVersionUID = 4084261472014880590L ; int ID ; int victoryPoints = 0 ; int gold = 10 ; int health = 0 ; int fatigue = 0 ; int fame = 0 ; int notoriety = 0 ; int finalScore = 0 ; public int order ; boolean hidden = false ; boolean dead = false ; boolean blocked = false ; boolean goneInCave = false ; boolean finishedDaylight = false ; boolean finishedBasic = false ; boolean addedSunlight = false ; Character character ; CombatMoves moves ; Player target ; Clearing location ; Clearing lastMove ; ArrayList < Armour > armour = new ArrayList < Armour > ( ) ; ArrayList < Weapon > weapons = new ArrayList < Weapon > ( ) ; ArrayList < Treasure > treasures = new ArrayList < Treasure > ( ) ; ArrayList < Object > discoveries = new ArrayList < Object > ( ) ; ArrayList < Phase > phases = new ArrayList < Phase > ( ) ; public Player ( Character character , int ID ) { } public void calculatePhases ( ) { } public Weapon getActiveWeapon ( ) { for ( int i = 0 ; i < ( weapons . size ( ) ) ; i ++ ) { if ( ( this . weapons . get ( i ) . isActive ( ) ) == true ) { return this . weapons . get ( i ) ; } } <START_BUG> return null ; <END_BUG> } public Player getTarget ( ) { } public void setDaylight ( Boolean s ) { } public Boolean getDaylight ( ) { } public CombatMoves getMoves ( ) { } public void setMoves ( CombatMoves m ) { } public void setTarget ( Player p ) { } public int getID ( ) { } public void addDiscovery ( Object o ) { } public ArrayList < Object > getDiscoveries ( ) { } public boolean knowsPath ( Path r ) { } public void unAlertWeapons ( ) { } public ArrayList < Phase > getPhases ( ) { } public void setCharacter ( Character character ) { } public Character getCharacter ( ) { } public void setHealth ( int health ) { } public int getHealth ( ) { } public void setBlocked ( boolean block ) { } public boolean isBlocked ( ) { } public int getGold ( ) { } public void addGold ( int gold ) { } public boolean removeGold ( int gold ) { } public void setOrder ( int order ) { } public int getOrder ( ) { } public boolean isHidden ( ) { } public void setHidden ( boolean hide ) { } public boolean isDead ( ) { } public void kill ( ) { } public int getFatigue ( ) { } public void setFatigue ( int fatigue ) { } public int getNotoriety ( ) { } public void addNotoriety ( int not ) { } public void removeNotoriety ( int not ) { } public int getFame ( ) { } public void addFame ( int fame ) { } public void removeFame ( int fame ) { } public int getVictoryPoints ( ) { } public void addVictoryPoints ( int victoryPoints ) { } public Clearing getLocation ( ) { } public void setLocation ( Clearing location ) { } public ArrayList < Weapon > getWeapons ( ) { } public void addWeapon ( Weapon weapon ) { } public void removeWeaponsWithHigherWeight ( ItemWeight weight ) { } public void removeArmourWithHigherWeight ( ItemWeight weight ) { } public void checkAndAddSunlight ( ) { } public void setFinalScore ( int score ) { } public int getFinalScore ( ) { } public void addTreasure ( Treasure treasure ) { } public ArrayList < Treasure > getTreasures ( ) { } public ArrayList < Armour > getArmour ( ) { } public boolean getFinishedBasic ( ) { } public void setFinishedBasic ( boolean b ) { } public boolean hasGoneInCave ( ) { } public void setGoneInCave ( boolean cave ) { } public void setLastMove ( Clearing newClearing ) { } public Clearing getLastMove ( ) { } public void usePhase ( Phase data ) { } }

Fix:
return new Weapon ( WeaponName . FIST ) ;