Buggy code:
public class NPC extends Player { static int RookValue = 44 ; static int RookRank = 6 ; static int notFound = - 1 ; int handValue = 0 ; int longestSuitLength = 0 ; int maxBid = 200 ; int numberOfTimesAskedToBid = 0 ; boolean [ ] discarded = new boolean [ 15 ] ; int numberPossibleCards = 15 ; private boolean testCheck = true ; public NPC ( ) { } @ Override public Suit chooseTrump ( ) { } @ Override public boolean [ ] chooseDiscards ( ) { } public void bidOrPass ( boolean bid ) { int bidChance = 2 ; Random generator = new Random ( ) ; int randomNumber = - 1 ; longestSuitLength = longestSuit ( ) ; if ( ( ( longestSuitLength ) >= 5 ) && ( ( findRook ( ) ) != ( - 1 ) ) ) { bidChance = 7 ; } else if ( ( longestSuitLength ) >= 5 ) { bidChance = 6 ; } if ( ( longestSuitLength ) >= 7 ) { bidChance = 8 ; if ( ( findRook ( ) ) != ( - 1 ) ) { bidChance = 9 ; } } if ( ( longestSuitLength ) >= 3 ) { bidChance = 3 ; if ( ( findRook ( ) ) != ( - 1 ) ) { bidChance = 2 ; } } bidChance -= numberOfTimesAskedToBid ; <START_BUG> if ( bidChance == 0 ) { <END_BUG> bidding = false ; } else { randomNumber = generator . nextInt ( bidChance ) ; if ( randomNumber == 1 ) { bidding = false ; } else { bidding = bid ; } } ( numberOfTimesAskedToBid ) ++ ; } public int bid ( int highBid ) { } public void setHighBidder ( int amount ) { } public int lead ( ) { } public int playFollowLeadCard ( Card [ ] trick ) { } public ArrayList < Card > winningCards ( ) { } public boolean checkOthersOutOfTrump ( ) { } public Card [ ] getValidLeadCards ( ) { } public int getValidLeadMaxIndex ( ) { } public int hasNonTrumpWinners ( ArrayList < Card > potentialWinners ) { } public Card [ ] getValidFollowCards ( Card [ ] trick ) { } public int getValidFollowMaxIndex ( Card [ ] trick ) { } public int getHandIndexOf ( Card searchCard ) { } public int hasHighTrump ( ArrayList < Card > potentialWinners ) { } public Card getCurrentHighCard ( Card [ ] trick ) { } public Boolean partnerCurrentlyWinning ( Card [ ] trick ) { } public int playerHasTrump ( ) { } public int hasRookCatchers ( ) { } public int GetThrowAwayBidTeamLeadCard ( ) { } public int getThrowAwaySetTeamLeadCard ( ) { } public boolean currentHighShouldWin ( Card [ ] trick , Card currentHighCard ) { } public int getNonWinnerPointsCard ( Card [ ] validCards , int maxIndex , boolean trumpLed ) { } public int getAnyPointsCard ( Card [ ] validCards , int maxIndex , boolean trumpLed ) { } public boolean stillHasTrump ( ) { } public boolean partnerMayLose ( Card [ ] trick , Card currentHighCard ) { } public int getHandWinner ( Card [ ] trick , Card currentHighCard , Card [ ] validCards , int maxIndex ) { } public int findThrowAwayCard ( Card [ ] validCards , int maxIndex , boolean trumpLed ) { } public int canTrumpIn ( Card [ ] validCards , int maxIndex ) { } public boolean trickHasPoints ( Card [ ] trick ) { } public boolean notLastTrump ( ) { } public int hasRook ( ) { } private void setStrongestSuitToFalse ( ) { } private void resetDiscardedValues ( ) { } private void setRankOneCardsToFalse ( ) { } private Suit determineSecondLongestSuit ( ) { } private boolean determineSuitsOfEqualLengthPresent ( ) { } private void attemptToShortSuit ( ) { } private void choosePossibleWinnersToKeep ( ) { } }

Fix:
if ( bidChance <= 0 ) {