Buggy code:
public class MonitorView extends ClipsView implements Observer { final int Verbosity_HIGH = 2 ; final int Verbosity_MEDIUM = 1 ; final int Verbosity_LOW = 0 ; private MonitorModel model ; private JFrame view ; private JPanel mapPanelContainer ; private JPanel mapPanel ; private JLabel [ ] [ ] map ; private final int MAP_DIMENSION = 550 ; private final int DEFAULT_IMG_SIZE = 85 ; private JPanel cp_JPanel ; private ControlPanel cp_frame ; private int verbose_mode = Verbosity_MEDIUM ; PrintOutWindow outputFrame ; private final Map < String , String > map_img ; public MonitorView ( ) { } @ Override protected void onSetup ( ) { } @ Override protected void onAction ( ) { } @ Override protected void onDispose ( ) { } private void initializeInterface ( ) { } private void initializeMap ( ) { } private void updateMap ( ) throws IOException { Integer step = model . getStep ( ) ; Integer time = model . getTime ( ) ; <START_BUG> Integer leftTime = ( model . getMaxDuration ( ) ) - ( model . getTime ( ) ) ; <END_BUG> cp_frame . getTimeTextField ( ) . setText ( time . toString ( ) ) ; cp_frame . getLeftTimeTextField ( ) . setText ( leftTime . toString ( ) ) ; cp_frame . getStepTextField ( ) . setText ( step . toString ( ) ) ; String [ ] [ ] mapString = model . getMap ( ) ; int cellDimension = Math . round ( ( ( MAP_DIMENSION ) // ( map . length ) ) ) ; for ( int i = ( map . length ) - 1 ; i >= 0 ; i -- ) { for ( int j = 0 ; j < ( map [ 0 ] . length ) ; j ++ ) { @ SuppressWarnings ( "UnusedAssignment" ) String direction = "" ; ImageIcon icon ; Image image ; BufferedImage background ; BufferedImage robot ; if ( ( ( mapString [ i ] [ j ] . length ( ) ) >= 6 ) && ( mapString [ i ] [ j ] . substring ( 0 , 6 ) . equals ( "agent_" ) ) ) { direction = model . getDirection ( ) ; background = ImageIO . read ( new File ( ( ( "img" + ( File . separator ) ) + ( map_img . get ( mapString [ i ] [ j ] . substring ( 6 , mapString [ i ] [ j ] . length ( ) ) ) ) ) ) ) ; robot = ImageIO . read ( new File ( ( ( "img" + ( File . separator ) ) + ( map_img . get ( ( "agent_" + direction ) ) ) ) ) ) ; icon = overlapImages ( robot , background ) ; map [ i ] [ j ] . setToolTipText ( ( ( ( ( "Agent<seq2seq4repair_space>(" + ( i + 1 ) ) + ",<seq2seq4repair_space>" ) + ( j + 1 ) ) + ")" ) ) ; } else if ( ( ( mapString [ i ] [ j ] . length ( ) ) >= 7 ) && ( mapString [ i ] [ j ] . substring ( 0 , 7 ) . equals ( "person_" ) ) ) { String map_contains = mapString [ i ] [ j ] ; String [ ] person_info = map_contains . split ( "_" ) ; String path_image = ( ( ( "img" + ( File . separator ) ) + ( person_info [ 2 ] ) ) + "-" ) + ( map_img . get ( ( ( ( person_info [ 0 ] ) + "_" ) + ( person_info [ 1 ] ) ) ) ) ; File f = new File ( path_image ) ; if ( f . exists ( ) ) { icon = new ImageIcon ( path_image ) ; } else { icon = new ImageIcon ( ( ( "img" + ( File . separator ) ) + ( map_img . get ( ( ( ( person_info [ 0 ] ) + "_" ) + ( person_info [ 1 ] ) ) ) ) ) ) ; } map [ i ] [ j ] . setToolTipText ( ( ( ( ( ( ( ( "Client<seq2seq4repair_space>" + ( person_info [ 2 ] ) ) + "<seq2seq4repair_space>" ) + "(" ) + ( i + 1 ) ) + ",<seq2seq4repair_space>" ) + ( j + 1 ) ) + ")" ) ) ; } else if ( ( ( mapString [ i ] [ j ] . length ( ) ) >= 5 ) && ( mapString [ i ] [ j ] . substring ( 0 , 5 ) . equals ( "Table" ) ) ) { String map_contains = mapString [ i ] [ j ] ; String [ ] table_info = map_contains . split ( "_" ) ; String path_image = ( "img" + ( File . separator ) ) + ( map_img . get ( ( ( ( table_info [ 0 ] ) + "_" ) + ( table_info [ 1 ] ) ) ) ) ; icon = new ImageIcon ( path_image ) ; map [ i ] [ j ] . setToolTipText ( ( ( ( ( ( ( ( "Table<seq2seq4repair_space>" + ( table_info [ 2 ] ) ) + "<seq2seq4repair_space>" ) + "(" ) + ( i + 1 ) ) + ",<seq2seq4repair_space>" ) + ( j + 1 ) ) + ")" ) ) ; } else { icon = new ImageIcon ( ( ( "img" + ( File . separator ) ) + ( map_img . get ( mapString [ i ] [ j ] ) ) ) ) ;

Fix:
Integer leftTime = ( model . getMaxDuration ( ) ) - ( model . getStep ( ) ) ;