Buggy code:
public class MapFragment extends Fragment { GoogleMap map ; String TAG = "MapFragment" ; private FragmentManager fm ; private FragmentTransaction ft ; private SpeedFragment speedFragment = new SpeedFragment ( ) ; private RefreshRouteFragment refreshRouteFragment = new RefreshRouteFragment ( ) ; private CurrentAddressFragment currentAddressFragment = new CurrentAddressFragment ( ) ; private int animationSpeed ; LocationManager locationManager ; LocationListener locationListener ; private LatLng currentLocation ; private LatLng adjustedLocation ; float CURRENT_BEARING = 0 ; float ZOOM_LEVEL = 6 ; private boolean routeIsVisible = false ; private Boolean MyLocationClicked = true ; SharedPreferences sp ; SupportMapFragment thisMap ; GMapV2Direction md ; private LatLng fromPosition ; private LatLng toPosition ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public void onPause ( ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { final View v = inflater . inflate ( map_fragment , container , false ) ; locationManager = ( ( LocationManager ) ( this . getActivity ( ) . getSystemService ( LOCATION_SERVICE ) ) ) ; thisMap = ( ( SupportMapFragment ) ( this . getChildFragmentManager ( ) . findFragmentById ( mv ) ) ) ; if ( ( thisMap ) != null ) { mSetupMap ( ) ; } else { Log . d ( TAG , "<<<<<<<<<<<<<<<<<<supportmapfragment<seq2seq4repair_space>==<seq2seq4repair_space>null>>>>>>>>>>>>>>>>>>" ) ; } locationListener = new LocationListener ( ) { @ Override public void onLocationChanged ( Location location ) { currentLocation = new LatLng ( location . getLatitude ( ) , location . getLongitude ( ) ) ; <START_BUG> if ( ( location . getSpeed ( ) ) > 2.0 ) <END_BUG> CURRENT_BEARING = location . getBearing ( ) ; ZOOM_LEVEL = CarHUDMap . speedBasedZoom ( location . getSpeed ( ) , map . getCameraPosition ( ) . zoom ) ; setAdjustedLocation ( new CarHUDMap ( ) . getAdjustedCoordinates ( map , location , CURRENT_BEARING , getActivity ( ) ) ) ; setAnimationSpeed ( Integer . parseInt ( sp . getString ( "map_animation_speed" , "900" ) ) ) ; if ( MyLocationClicked ) { final CameraPosition cameraPosition = new CameraPosition ( getAdjustedLocation ( ) , ZOOM_LEVEL , CarHUDMap . getMaximumTilt ( ZOOM_LEVEL ) , CURRENT_BEARING ) ; map . animateCamera ( CameraUpdateFactory . newCameraPosition ( cameraPosition ) , getAnimationSpeed ( ) , null ) ; } currentAddressFragment . setCurrentLocation ( getLocationLatLng ( ) ) ; speedFragment . setSpeed ( location . getSpeed ( ) ) ; } @ Override public void onStatusChanged ( String provider , int status , Bundle extras ) { } @ Override public void onProviderEnabled ( String provider ) { } @ Override public void onProviderDisabled ( String provider ) { locationManager . removeUpdates ( locationListener ) ; } } ; startLocationListener ( ) ; return v ; } private void mSetupMap ( ) { } @ Override public void onResume ( ) { } @ Override public void onDestroy ( ) { } private OnMyLocationButtonClickListener myLocationListener = new OnMyLocationButtonClickListener ( ) { @ Override public boolean onMyLocationButtonClick ( ) { } } ; private OnMapClickListener mapClickListener = new GoogleMap . OnMapClickListener ( ) { @ Override public void onMapClick ( LatLng latLng ) { } } ; private OnMapLongClickListener mapLongClickListener = new GoogleMap . OnMapLongClickListener ( ) { @ Override public void onMapLongClick ( LatLng latLng ) { } } ; public void showNavigationDialog ( ) { } public LatLng getLocationLatLng ( ) { } class showRoute extends AsyncTask < Void , Void , Document > { Document doc ; PolylineOptions rectLine ; @ Override protected Document doInBackground ( Void ... params ) { } @ Override protected void onPostExecute ( Document result ) { } } public void updateRoute ( ) { } public void clearMap ( ) { } public boolean getRouteIsVisible ( ) { } public void setRouteIsVisible ( boolean routeIsVisible ) { } public void showRoute ( LatLng fromPosition , LatLng toPosition ) { } public void showRoute ( LatLng toPosition ) { } public void showRoute ( ) { } public void stopLocationListener ( ) { } public void startLocationListener ( ) { } public void setToPosition ( LatLng latLng ) { } public LatLng getToPosition ( ) { } public void setFromPosition ( LatLng latLng ) { } public void setAdjustedLocation ( LatLng adjustedLocation ) { } public LatLng getAdjustedLocation ( ) { } public void setAnimationSpeed ( int animationSpeed ) { } public int getAnimationSpeed ( ) { } public void writeToFile ( ) { } public void shakeMap ( ) { } }

Fix:
if ( ( location . getSpeed ( ) ) > 1.8 )