Buggy code:
public static void showPromoDialog ( final Activity activity , final boolean onExit ) { } @ Override public void onActivityCreated ( Bundle savedInstanceState ) { } public void showProblemToast ( ) { } boolean isMapLoaded ( ) { } void loadMapRoutes ( ) { } void processMarker ( Marker marker ) { } Map . Entry < Integer , Integer > getNearestBusDelay ( int targetDelay ) { } void loadTaxiPage ( String url ) { } void startLoadingBusLocations ( ) { } void continueLoadingBusLocations ( ) { } void stopLoadingBusLocations ( ) { } private Integer getColor ( int i ) { } private int getDelayFromSelectedSchedule ( int targetDelay , int route ) { } private class GetBusLocationsTask extends TimerTask { public void run ( ) { } private class BusLocationLoader implements WebHelper . Parser { @ Override public void parse ( String line ) throws Exception { JSONArray jsonArray = new JSONArray ( line ) ; String id ; String time ; int bearing ; int routeNum ; int routeId ; int type ; LatLng latLng ; JSONObject bus ; for ( int i = 0 ; i < ( jsonArray . length ( ) ) ; i ++ ) { bus = ( ( JSONObject ) ( jsonArray . get ( i ) ) ) ; id = String . valueOf ( bus . get ( "id" ) ) ; time = ( ( String ) ( bus . get ( "dt" ) ) ) ; bearing = ( ( Integer ) ( bus . get ( "dg" ) ) ) ; JSONArray jLatLng = ( ( JSONArray ) ( bus . get ( "lc" ) ) ) ; latLng = new LatLng ( Double . valueOf ( ( ( String ) ( jLatLng . get ( 0 ) ) ) ) , Double . valueOf ( ( ( String ) ( jLatLng . get ( 1 ) ) ) ) ) ; routeNum = Integer . valueOf ( ( ( String ) ( bus . get ( "rn" ) ) ) ) ; routeId = Integer . valueOf ( ( ( String ) ( bus . get ( "rid" ) ) ) ) ; type = Integer . valueOf ( ( ( String ) ( bus . get ( "md" ) ) ) ) ; if ( Bus . isActive ( id ) ) { Bus . updateBus ( id , latLng , 0 , bearing , time ) ; } else { Bus . addToList ( new Bus ( id , latLng , 0 , bearing , type , routeId , time , routeNum ) ) ; } } } } } private class GetBusStopsTask extends AsyncTask < Void , Void , Void > { final ArrayList < MarkerOptions > busMarkerOptionsArray = new ArrayList < MarkerOptions > ( ) ; private Exception e ; @ Override protected Void doInBackground ( Void ... params ) { } @ Override public void onPostExecute ( Void arg0 ) { } private class BusStopsLoader implements WebHelper . Parser { @ Override public void parse ( String line ) throws Exception { JSONArray jsonArray = new JSONArray ( line ) ; JSONObject stop ; int id ; double lat ; double lng ; String name ; for ( int i = 0 ; i < ( jsonArray . length ( ) ) ; i ++ ) { stop = ( ( JSONObject ) ( jsonArray . get ( i ) ) ) ; id = Integer . valueOf ( ( ( String ) ( stop . get ( "id" ) ) ) ) ; JSONArray lc = ( ( JSONArray ) ( stop . get ( "lc" ) ) ) ; lat = Double . parseDouble ( ( ( String ) ( lc . get ( 0 ) ) ) ) ; lng = Double . parseDouble ( ( ( String ) ( lc . get ( 1 ) ) ) ) ; name = decodeFromUtf8 ( ( ( String ) ( stop . get ( "name" ) ) ) ) ; if ( ! ( descStopIdMap . containsValue ( id ) ) ) { <START_BUG> busMarkerOptionsArray . add ( new MarkerOptions ( ) . position ( new LatLng ( lat , lng ) ) . title ( name ) . icon ( BitmapDescriptorFactory . fromAsset ( "bustop31.png" ) ) ) ; <END_BUG> descStopIdMap . put ( name , id ) ; } } } } } private String decodeFromUtf8 ( String name ) { } private class GetBusRoutesTask extends AsyncTask < Void , Void , Void > { final ArrayList < PolylineOptions > busRoutesOptionsArray = new ArrayList < PolylineOptions > ( ) ; private Exception e ; @ Override protected Void doInBackground ( Void ... params ) { } @ Override public void onPostExecute ( Void arg0 ) { } private class BusRoutesLoader implements WebHelper . Parser { @ Override public void parse ( String line ) throws Exception { JSONArray jsonArray = new JSONArray ( line ) ; JSONArray subArray ; JSONArray coordinates ; double lat ; double lng ; for ( int i = 0 ; i < ( jsonArray . length ( ) ) ; i ++ ) { subArray = ( ( JSONArray ) ( jsonArray . get ( i ) ) ) ; PolylineOptions busRoutesOptions = new PolylineOptions ( ) ; for ( int j = 0 ; j < ( subArray . length ( ) ) ; j ++ ) { coordinates = ( ( JSONArray ) ( subArray . get ( j ) ) ) ; lat = Double . parseDouble ( ( ( String ) ( coordinates . get ( 0 ) ) ) ) ; lng = Double . parseDouble ( ( ( String ) ( coordinates . get ( 1 ) ) ) ) ; busRoutesOptions . add ( new LatLng ( lat , lng ) ) ; } busRoutesOptionsArray . add ( busRoutesOptions ) ; } }

Fix:
busMarkerOptionsArray . add ( new MarkerOptions ( ) . position ( new LatLng ( lat , lng ) ) . title ( name ) . icon ( BitmapDescriptorFactory . fromResource ( bustop31 ) ) ) ;