Buggy code:
public class NearbyActivity extends BaseActivity implements StationInfoFragment . OnStationInfoFragmentInteractionListener , StationListFragment . OnStationListFragmentInteractionListener , StationMapFragment . OnStationMapFragmentInteractionListener { private StationMapFragment mStationMapFragment = null ; private StationListFragment mStationListFragment = null ; private StationInfoFragment mStationInfoFragment = null ; private static final String PREF_WEBTASK_LAST_TIMESTAMP_MS = "last_refresh_timestamp" ; private static final String PREF_NETWORK_NAME = "network_name" ; private static final String PREF_NETWORK_ID = "network_id" ; private static final String PREF_NETWORK_LATITUDE = "network_lat" ; private static final String PREF_NETWORK_LONGITUDE = "network_lng" ; private static final String PREF_NETWORK_HREF = "network_href" ; private Handler mUpdateRefreshHandler = null ; private Runnable mUpdateRefreshRunnableCode = null ; private NearbyActivity . DownloadWebTask mDownloadWebTask = null ; private NearbyActivity . RedrawMarkersTask mRedrawMarkersTask = null ; private NearbyActivity . FindNetworkTask mFindNetworkTask = null ; private StationsNetwork mStationsNetwork ; private LatLng mCurrentUserLatLng = null ; private TextView mUpdateTextView ; private View mDownloadBar ; private boolean mRefreshMarkers = true ; private boolean mLookingForBike = true ; private MenuItem mParkingSwitch ; private MenuItem mRefreshMenuItem ; private MenuItem mFavoriteMenuItem ; private MenuItem mDirectionsMenuItem ; private CameraPosition mUnselectStationCameraPosition ; private CameraPosition mSavedInstanceCameraPosition ; @ Override protected int getSelfNavDrawerItem ( ) { } @ Override public void onStart ( ) { } @ Override public void onResume ( ) { } @ Override public void onPause ( ) { } @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onSaveInstanceState ( Bundle outState ) { } @ Override protected void onPostCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override protected void onNavDrawerStateChanged ( boolean isOpen , boolean isAnimating ) { } private void setOnClickFindSwitchListener ( ) { } private void stopUIRefresh ( ) { } private void setupUI ( ) { if ( ( mUpdateRefreshRunnableCode ) == null ) { mUpdateRefreshRunnableCode = createUpdateRefreshRunnableCode ( ) ; mUpdateRefreshHandler . post ( mUpdateRefreshRunnableCode ) ; } SharedPreferences sp = PreferenceManager . getDefaultSharedPreferences ( this ) ; String currNetworkId = sp . getString ( NearbyActivity . PREF_NETWORK_ID , "none" ) ; if ( ! ( currNetworkId . equalsIgnoreCase ( "none" ) ) ) { if ( mStationMapFragment . isMapReady ( ) ) { if ( ( ( ( mStationsNetwork ) != null ) && ( mRefreshMarkers ) ) && ( ( mRedrawMarkersTask ) == null ) ) { mRedrawMarkersTask = new NearbyActivity . RedrawMarkersTask ( ) ; mRedrawMarkersTask . execute ( ) ; mRefreshMarkers = false ; } if ( null != ( mSavedInstanceCameraPosition ) ) { mStationMapFragment . doInitialCameraSetup ( CameraUpdateFactory . newCameraPosition ( mSavedInstanceCameraPosition ) , false ) ; mSavedInstanceCameraPosition = null ; } if ( null != ( mStationListFragment ) ) { mStationListFragment . setupUI ( mStationsNetwork , mCurrentUserLatLng , mLookingForBike ) ; <START_BUG> if ( ! ( mParkingSwitch . isVisible ( ) ) ) <END_BUG> mParkingSwitch . setVisible ( true ) ; } } } } private Runnable createUpdateRefreshRunnableCode ( ) { } private void setDownloadBarListener ( ) { } private void setRefreshActionButtonState ( final boolean refreshing ) { } @ Override public void onStationMapFragmentInteraction ( Uri uri ) { } private void cancelDownloadWebTask ( ) { } @ Override public void onStationListFragmentInteraction ( Uri uri ) { } private void setupFavoriteActionIcon ( StationItem station ) { } @ Override public void onStationInfoFragmentInteraction ( Uri uri ) { } public class RedrawMarkersTask extends AsyncTask < Void , Void , Void > { @ Override protected void onPreExecute ( ) { } @ Override protected Void doInBackground ( Void ... voids ) { } @ Override protected void onCancelled ( Void aVoid ) { } @ Override protected void onPostExecute ( Void aVoid ) { } } public class FindNetworkTask extends AsyncTask < Void , Void , Void > { @ Override protected void onPreExecute ( ) { } @ Override protected void onCancelled ( ) { } @ Override protected Void doInBackground ( Void ... voids ) { } @ Override protected void onProgressUpdate ( Void ... values ) { } @ Override protected void onPostExecute ( Void aVoid ) { } } public class addNetworkDatabase extends AsyncTask < Void , Void , Void > { @ Override protected Void doInBackground ( Void ... params ) { } } public class DownloadWebTask extends AsyncTask < Void , Void , Void > { @ Override protected Void doInBackground ( Void ... aVoid ) { } @ Override protected void onPreExecute ( ) { } @ Override protected void onCancelled ( Void aVoid ) { } @ Override protected void onPostExecute ( Void aVoid ) { } } }

Fix:
if ( ( null != ( mParkingSwitch ) ) && ( ! ( mParkingSwitch . isVisible ( ) ) ) )