Buggy code:
public class FavouritesListViewAdapter extends ArrayAdapter < BusServices > { private ArrayList < BusServices > items ; private Context context ; public FavouritesListViewAdapter ( Context context , int textViewResourceId , ArrayList < BusServices > objects ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { View v = convertView ; if ( v == null ) { LayoutInflater inflater = ( ( LayoutInflater ) ( getContext ( ) . getSystemService ( LAYOUT_INFLATER_SERVICE ) ) ) ; v = inflater . inflate ( listview_bus_numbers , parent , false ) ; } BusServices i = items . get ( position ) ; TextView busOperator = ( ( TextView ) ( v . findViewById ( tvBusOperator ) ) ) ; TextView busNumber = ( ( TextView ) ( v . findViewById ( tvBusService ) ) ) ; TextView busArrivalNow = ( ( TextView ) ( v . findViewById ( tvBusArrivalNow ) ) ) ; TextView busArrivalNext = ( ( TextView ) ( v . findViewById ( tvBusArrivalNext ) ) ) ; TextView operatingStatus = ( ( TextView ) ( v . findViewById ( tvBusStatus ) ) ) ; TextView stopName = ( ( TextView ) ( v . findViewById ( tvBusStopName ) ) ) ; if ( busOperator != null ) { busOperator . setText ( i . getOperator ( ) ) ; if ( i . getOperator ( ) . equalsIgnoreCase ( "SMRT" ) ) { busOperator . setTextColor ( RED ) ; } else if ( i . getOperator ( ) . equalsIgnoreCase ( "SBST" ) ) { busOperator . setTextColor ( MAGENTA ) ; } } if ( busNumber != null ) { busNumber . setText ( i . getServiceNo ( ) ) ; } if ( stopName != null ) { stopName . setVisibility ( VISIBLE ) ; if ( ( i . getStopName ( ) ) == null ) { stopName . setText ( i . getStopID ( ) ) ; } else { stopName . setText ( ( ( ( ( i . getStopName ( ) ) + "<seq2seq4repair_space>(" ) + ( i . getStopID ( ) ) ) + ")" ) ) ; } } if ( i . isObtainedNextData ( ) ) { if ( operatingStatus != null ) { operatingStatus . setText ( i . getOperatingStatus ( ) ) ; if ( ( i . getOperatingStatus ( ) . contains ( "Not" ) ) || ( i . getOperatingStatus ( ) . contains ( "not" ) ) ) { operatingStatus . setTextColor ( RED ) ; } else { operatingStatus . setTextColor ( GREEN ) ; } } if ( ! ( ( i . getOperatingStatus ( ) . contains ( "Not" ) ) || ( i . getOperatingStatus ( ) . contains ( "not" ) ) ) ) { if ( busArrivalNow != null ) { if ( ( i . getCurrentBus ( ) . getEstimatedArrival ( ) ) == null ) { busArrivalNow . setText ( "-" ) ; busArrivalNow . setTextColor ( GRAY ) ; } else { long est = parseEstimateArrival ( i . getCurrentBus ( ) . getEstimatedArrival ( ) ) ; if ( est <= 0 ) busArrivalNow . setText ( "Arr" ) ; else if ( est == 1 ) busArrivalNow . setText ( ( est + "<seq2seq4repair_space>min" ) ) ; else busArrivalNow . setText ( ( est + "<seq2seq4repair_space>mins" ) ) ; applyColorLoad ( busArrivalNow , i . getCurrentBus ( ) ) ; } } if ( busArrivalNext != null ) { if ( ( i . getNextBus ( ) . getEstimatedArrival ( ) ) == null ) { busArrivalNext . setText ( "-" ) ; busArrivalNext . setTextColor ( GRAY ) ; } else { long est = parseEstimateArrival ( i . getNextBus ( ) . getEstimatedArrival ( ) ) ; <START_BUG> if ( est == 0 ) <END_BUG> busArrivalNext . setText ( "Arr" ) ; else if ( est == 1 ) busArrivalNext . setText ( ( est + "<seq2seq4repair_space>min" ) ) ; else busArrivalNext . setText ( ( est + "<seq2seq4repair_space>mins" ) ) ; applyColorLoad ( busArrivalNext , i . getNextBus ( ) ) ; } } } else { if ( busArrivalNow != null ) { busArrivalNow . setText ( "-" ) ; busArrivalNow . setTextColor ( GRAY ) ; } if ( busArrivalNext != null ) { busArrivalNext . setText ( "-" ) ; busArrivalNext . setTextColor ( GRAY ) ; } } } else { if ( busArrivalNow != null ) { busArrivalNow . setText ( "..." ) ; busArrivalNow . setTextColor ( GRAY ) ; } if ( busArrivalNext != null ) { busArrivalNext . setText ( "..." ) ; busArrivalNext . setTextColor ( GRAY ) ; } } return v ; } private void applyColorLoad ( TextView view , BusStatus obj ) { } private long parseEstimateArrival ( String arrivalString ) { } private Calendar splitDate ( String dateString ) { } @ Override public int getCount ( ) { } @ Override public BusServices getItem ( int arg0 ) { } public void updateAdapter ( ArrayList < BusServices > newArrayData ) { } }

Fix:
if ( est <= 0 )