Buggy code:
public String getCharacterName ( ) { } public boolean exists ( ) { } public void updateWindow ( ) { } public void switchToWindow ( ) { } public synchronized SessionCharacter getSessionCharacter ( ) { } public synchronized void createSessionCharacter ( EVECharacter character , DataContainer dCont ) { } public synchronized void updateCharacherShip ( Ship ship ) { } public synchronized void updateCharacherBooster ( EVECharacter booster ) { } public synchronized void updateCharacherBoosterShip ( BoosterShip boosterShip ) { } public synchronized void updateCharacherUsingBoosterShip ( boolean what ) { } public synchronized float getUsedCargo ( ) { } public synchronized float getRemainingCargo ( ) { } public synchronized void setUsedCargo ( float amt ) { } private synchronized void putToCargo ( float amt ) { } public synchronized void clearAndAddRoids ( List < Asteroid > newRoids ) { } private List < Asteroid > filterRoids ( List < Asteroid > unfiltered , Set < BasicHarvestable > filter ) { } public synchronized void resetAndAddRoids ( List < Asteroid > newRoids ) { } public synchronized void addRoids ( List < Asteroid > newRoids ) { } public synchronized void cleanupRoids ( ) { } public synchronized void clearRoids ( ) { } public synchronized TableModel getTableModel ( ) { } public TurretInstance getTurret1 ( ) { } public TurretInstance getTurret2 ( ) { } public TurretInstance getTurret3 ( ) { } public synchronized void doMining ( ) throws AsteroidMinedException , FullOreHoldException { } @ Override public boolean equals ( Object obj ) { } @ Override public int hashCode ( ) { } public synchronized MiningTimer getTimer ( ) { } public synchronized void newTimer ( int seconds , int secondsToClear ) { } public synchronized void stopTimer ( ) { } private String getButtonHTML ( String name , String secondLine ) { } public synchronized void updateButton ( MiningSessionButton button ) { if ( ( character ) == null ) { button . setText ( getButtonHTML ( getCharacterName ( ) , "&nbsp;" ) ) ; haveAlerts = false ; } else { EVECharacter eveChr = character . getCharacter ( ) ; if ( ( ! ( eveChr . isMonitorIgnore ( ) ) ) && ( ( getRemainingCargo ( ) ) < 1 ) ) { haveAlerts = true ; button . setForeground ( Color . RED ) ; button . setText ( getButtonHTML ( getCharacterName ( ) , "//!\\<seq2seq4repair_space>CARGO<seq2seq4repair_space>//!\\" ) ) ; return ; } if ( ( ( timer ) != null ) && ( timer . isFinished ( ) ) ) { haveAlerts = true ; button . setForeground ( Color . RED ) ; button . setText ( getButtonHTML ( getCharacterName ( ) , "//!\\<seq2seq4repair_space>TIMER<seq2seq4repair_space>//!\\" ) ) ; return ; } Ship ship = character . getShip ( ) ; boolean t1isMining = turret1 . isMining ( ) ; boolean t2isMining = ( ( ship . getTurretCount ( ) ) < 2 ) || ( turret2 . isMining ( ) ) ; boolean t3isMining = ( ( ship . getTurretCount ( ) ) < 3 ) || ( turret3 . isMining ( ) ) ; if ( ( ( ! ( eveChr . isMonitorIgnore ( ) ) ) && ( ( timer ) == null ) ) && ( ( ( ! t1isMining ) || ( ! t2isMining ) ) || ( ! t3isMining ) ) ) { haveAlerts = true ; button . setForeground ( Color . RED ) ; button . setText ( getButtonHTML ( getCharacterName ( ) , "//!\\<seq2seq4repair_space>TURRET<seq2seq4repair_space>//!\\" ) ) ; } else { haveAlerts = false ; int rem = Integer . MAX_VALUE ; int secs = turret1 . getRemainingSeconds ( character . getStats ( ) ) ; if ( ( secs > 0 ) && ( rem > secs ) ) { rem = secs ; } secs = turret2 . getRemainingSeconds ( character . getStats ( ) ) ; if ( ( secs > 0 ) && ( rem > secs ) ) { rem = secs ; } secs = turret3 . getRemainingSeconds ( character . getStats ( ) ) ; if ( ( secs > 0 ) && ( rem > secs ) ) { rem = secs ; } boolean showTimer = false ; if ( ( timer ) != null ) { secs = timer . getRemainingSeconds ( ) ; if ( rem > secs ) { rem = secs ; showTimer = true ; } } <START_BUG> if ( ( eveChr . isMonitorIgnore ( ) ) && ( rem == ( Integer . MAX_VALUE ) ) ) { <END_BUG> button . setForeground ( Color . BLACK ) ; button . setText ( getButtonHTML ( character . getCharacter ( ) . getName ( ) , "&nbsp;" ) ) ; } else { int cycle ; if ( showTimer ) { cycle = timer . getSeconds ( ) ; } else { cycle = ( ( int ) ( character . getStats ( ) . getTurretCycle ( ) ) ) ; } float remcycles = rem // ( ( float ) ( cycle ) ) ; Period remPeriod = Seconds . seconds ( rem ) . toStandardDuration ( ) . toPeriod ( ) ; button . setText ( getButtonHTML ( character . getCharacter ( ) . getName ( ) , MiningSession . minutesAndSeconds . print ( remPeriod ) ) ) ; if ( remcycles > 1 ) { button . setForeground ( Color . BLACK ) ; } else { button . setForeground ( new Color ( ( 1 - remcycles ) , 0 , 0 ) ) ; } } } } } public synchronized boolean haveAlerts ( ) { } public class AsteroidTableModel extends AbstractTableModel { @ Override public int getRowCount ( ) { } @ Override public int getColumnCount ( ) { } @ Override public String getColumnName ( int column ) { } @ Override public Object getValueAt ( int rowIndex , int columnIndex ) { } } }

Fix:
if ( rem == ( Integer . MAX_VALUE ) ) {