Buggy code:
public class RiskBoard { private int numberOfPlayers ; private Iterator < Player > itr ; private ArrayList < Player > players ; private Integer [ ] numPlayerArray = new Integer [ ] { 1 , 2 , 3 , 4 , 5 , 6 } ; private String [ ] playerName = new String [ ] { "Player<seq2seq4repair_space>One" , "Player<seq2seq4repair_space>Two" , "Player<seq2seq4repair_space>Three" , "Player<seq2seq4repair_space>Four" , "Player<seq2seq4repair_space>Five" , "Player<seq2seq4repair_space>Six" } ; private Color [ ] playerColor = new Color [ ] { Color . RED , Color . BLACK , Color . BLUE , Color . GREEN , Color . ORANGE , Color . DARK_GRAY } ; private ArrayList < Territory > territories ; private ArrayList < Territory > Asia ; private ArrayList < Territory > Europe ; private ArrayList < Territory > Africa ; private ArrayList < Territory > Australia ; private ArrayList < Territory > NA ; private ArrayList < Territory > SA ; private ArrayList < Army > armies ; private ArrayList < Card > cards ; private HashMap < String , ArrayList < Territory > > nameToNeigbhors ; private HashMap < String , Point > nameToCoordinates ; private Player currentPlayer ; private JFrame frame ; private JPanel panel ; private ArrayList < Army > setupBattle ; private String phase = "" ; private JLabel playerColorBox ; private JLabel playerLabel ; private JLabel phaseLabel ; private JButton phaseChangeButton ; private int numberDeployed = 0 ; private int numberAllowed ; private int cardArmies = 3 ; private boolean playedCards = false ; public RiskBoard ( ) { } private void checkForVictory ( ) { } public void selectNumberOfPlayers ( ) { } public void initialGame ( int numberOfPlayers ) { } private void setUpPlayers ( ) { } private void setUpTerritories ( ) { } private void setUpCard ( ) { } private void setUpArmy ( ) { } private void setUpNeighborsMap ( ) { } private void assignNeighbors ( Territory t ) { } private void setUpCoordinatesMap ( ) { } private void assignCoordinates ( Territory t ) { } private Player randomPlayer ( ) { } private boolean allHaveMax ( ArrayList < Player > players , int max ) { } @ SuppressWarnings ( "serial" ) public void display ( ) throws IOException { } public ArrayList < Player > getPlayers ( ) { } public Player getNextPlayer ( ) { } public Player getCurrentPlayer ( ) { } public String getLabelText ( ) { } public ArrayList < Territory > getTerritories ( ) { } public ArrayList < Territory > getAsiaTerritories ( ) { } public ArrayList < Territory > getEuropeTerritories ( ) { } public ArrayList < Territory > getAfricaTerritories ( ) { } public ArrayList < Territory > getAustralaTerritories ( ) { } public ArrayList < Territory > getNATerritories ( ) { } public ArrayList < Territory > getSATerritories ( ) { } public Territory getTerritoryNamed ( String string ) throws Exception { } public ArrayList < Army > getBattleSetup ( ) { } public Army getArmy ( int i ) { } public void endDeployment ( ) { } public void endTurn ( ) { } private void calculateNumberDeployable ( ) { } protected int accountForCountries ( ) { } public void updateMenuBar ( ) { } public String generatePlayerTurnString ( ) { } public String getPhase ( ) { } public JButton getPhaseChangeButton ( ) { } public JFrame getFrame ( ) { } public int getNumberDeployed ( ) { } public void increaseNumberDeployed ( ) { } public int getNumberAllowed ( ) { } public void giveWinnerCard ( Player localP ) throws IOException { Image artilleryImage = ImageIO . read ( new File ( "artillery.png" ) ) ; Image scaledArtilleryImage = artilleryImage . getScaledInstance ( 70 , 90 , Image . SCALE_SMOOTH ) ; Icon artilleryIcon = new ImageIcon ( scaledArtilleryImage ) ; Image cavalryImage = ImageIO . read ( new File ( "cavalry.png" ) ) ; Image scaledCavalryImage = cavalryImage . getScaledInstance ( 70 , 90 , Image . SCALE_SMOOTH ) ; Icon cavalryIcon = new ImageIcon ( scaledCavalryImage ) ; Image wariorImage = ImageIO . read ( new File ( "warior.png" ) ) ; Image scaledWariorImage = wariorImage . getScaledInstance ( 70 , 90 , Image . SCALE_SMOOTH ) ; Icon wariorIcon = new ImageIcon ( scaledWariorImage ) ; Random gen = new Random ( ) ; int cardNum = 0 ; switch ( cardNum ) { case 1 : Card c1 = new Card ( "artillery" , localP ) ; c1 . addMouseListener ( new CardListener ( c1 ) ) ; localP . addCard ( c1 ) ; c1 . setIcon ( artilleryIcon ) ; this . cards . add ( c1 ) ; case 2 : Card c2 = new Card ( "cavalry" , localP ) ; c2 . addMouseListener ( new CardListener ( c2 ) ) ; localP . addCard ( c2 ) ; c2 . setIcon ( cavalryIcon ) ; this . cards . add ( c2 ) ; case 3 : Card c3 = new Card ( "warior" , localP ) ; c3 . addMouseListener ( new CardListener ( c3 ) ) ; localP . addCard ( c3 ) ; c3 . setIcon ( wariorIcon ) ; this . cards . add ( c3 ) ; } System . out . println ( ( ( ( ( "Gave<seq2seq4repair_space>Card<seq2seq4repair_space>" + "Size:<seq2seq4repair_space>" ) + ( localP . getCards ( ) . size ( ) ) ) + "CardNum:<seq2seq4repair_space>" ) + cardNum ) ) ; <START_BUG> if ( ( localP . getCards ( ) . size ( ) ) == 5 ) { <END_BUG> forceDeployment ( localP ) ; } } private void forceDeployment ( Player localP ) { } }

Fix:
if ( ( localP . getCards ( ) . size ( ) ) >= 5 ) {