Buggy code:
public class WifiSyncService extends IntentService { public static final String CALLER_INTENT = "CallerIntent" ; public static String TAG = WifiSyncService . class . getSimpleName ( ) ; private boolean isHandling = false ; private static WifiSyncService instance ; public WifiSyncService ( ) { } public static WifiSyncService getInstance ( ) { } public boolean isHandlingIntent ( ) { } @ Override protected void onHandleIntent ( Intent intent ) { } private List < APLNetworkId > getConfigsToCheck ( Intent intent ) { } private void syncProxyConfigurations ( List < APLNetworkId > configurations ) { Map < APLNetworkId , WifiConfiguration > configuredNetworks = APL . getConfiguredNetworks ( ) ; Timber . d ( "Configured<seq2seq4repair_space>%d<seq2seq4repair_space>Wi-Fi<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>device" , configuredNetworks . size ( ) ) ; if ( configurations . isEmpty ( ) ) { Timber . d ( "No<seq2seq4repair_space>configurations<seq2seq4repair_space>specificed,<seq2seq4repair_space>must<seq2seq4repair_space>sync<seq2seq4repair_space>all<seq2seq4repair_space>of<seq2seq4repair_space>them!" ) ; configurations . addAll ( configuredNetworks . keySet ( ) ) ; } Timber . d ( "Analyzing<seq2seq4repair_space>%d<seq2seq4repair_space>Wi-Fi<seq2seq4repair_space>networks<seq2seq4repair_space>of<seq2seq4repair_space>%d<seq2seq4repair_space>total" , configurations . size ( ) , configuredNetworks . size ( ) ) ; int upserted = 0 ; int removed = 0 ; for ( APLNetworkId aplNetworkId : configurations ) { try { App . getTraceUtils ( ) . partialTrace ( WifiSyncService . TAG , "syncAP" , ( "Handling<seq2seq4repair_space>network:<seq2seq4repair_space>" + ( aplNetworkId . toString ( ) ) ) , DEBUG ) ; if ( configuredNetworks . containsKey ( aplNetworkId ) ) { WifiConfiguration wifiConfiguration = configuredNetworks . get ( aplNetworkId ) ; App . getTraceUtils ( ) . partialTrace ( WifiSyncService . TAG , "syncAP" , String . format ( "Got<seq2seq4repair_space>WifiConfiguration:<seq2seq4repair_space>ID<seq2seq4repair_space>'%d'" , wifiConfiguration . networkId ) , DEBUG ) ; WiFiApConfig wiFiApConfig = APL . getWiFiAPConfiguration ( wifiConfiguration ) ; App . getTraceUtils ( ) . partialTrace ( WifiSyncService . TAG , "syncAP" , String . format ( "Got<seq2seq4repair_space>WiFiApConfig:<seq2seq4repair_space>'%s'" , wiFiApConfig . toShortString ( ) ) , DEBUG ) ; WiFiAPEntity wiFiAPEntity = App . getDBManager ( ) . upsertWifiAP ( wiFiApConfig ) ; App . getTraceUtils ( ) . partialTrace ( WifiSyncService . TAG , "syncAP" , String . format ( "Upserted<seq2seq4repair_space>WiFiAPEntity:<seq2seq4repair_space>'%s'" , wiFiAPEntity . toString ( ) ) , DEBUG ) ; App . getWifiNetworksManager ( ) . updateWifiConfig ( wiFiApConfig ) ; App . getTraceUtils ( ) . partialTrace ( WifiSyncService . TAG , "syncAP" , String . format ( "Updated<seq2seq4repair_space>in<seq2seq4repair_space>memory<seq2seq4repair_space>networks<seq2seq4repair_space>status<seq2seq4repair_space>with<seq2seq4repair_space>WifiConfig:<seq2seq4repair_space>'%s'" , wiFiAPEntity . toString ( ) ) , DEBUG ) ; upserted ++ ; } else { App . getDBManager ( ) . deleteWifiAP ( aplNetworkId ) ; App . getTraceUtils ( ) . partialTrace ( WifiSyncService . TAG , "syncAP" , ( "deleteWifiAP:<seq2seq4repair_space>" + ( aplNetworkId . toString ( ) ) ) , DEBUG ) ; App . getWifiNetworksManager ( ) . removeWifiConfig ( aplNetworkId ) ; App . getTraceUtils ( ) . partialTrace ( WifiSyncService . TAG , "syncAP" , ( "removeWifiConfig:<seq2seq4repair_space>" + ( aplNetworkId . toString ( ) ) ) , DEBUG ) ; removed ++ ; } } catch ( Exception e ) { <START_BUG> Timber . e ( e , "Exception<seq2seq4repair_space>during<seq2seq4repair_space>ProxySyncService" ) ; <END_BUG> } } Timber . i ( "Analyzed<seq2seq4repair_space>%d<seq2seq4repair_space>Wi-Fi<seq2seq4repair_space>networks<seq2seq4repair_space>of<seq2seq4repair_space>%d<seq2seq4repair_space>total<seq2seq4repair_space>(%d<seq2seq4repair_space>upserted,<seq2seq4repair_space>%d<seq2seq4repair_space>removed)" , configurations . size ( ) , configuredNetworks . size ( ) , upserted , removed ) ; Timber . d ( ( "Sending<seq2seq4repair_space>broadcast<seq2seq4repair_space>intent<seq2seq4repair_space>" + ( Intents . PROXY_REFRESH_UI ) ) ) ; Intent intent = new Intent ( Intents . PROXY_REFRESH_UI ) ; getApplicationContext ( ) . sendBroadcast ( intent ) ; } }

Fix:
Timber . e ( e , "Exception<seq2seq4repair_space>during<seq2seq4repair_space>WifiSyncService" ) ;