Program: 13587
Project: 13587
Buggy source:
protected int handleIntentMessage(Intent intent){
  int what=intent.getIntExtra(SensorbergServiceMessage.EXTRA_GENERIC_TYPE,-1);
  Logger.log.serviceHandlesMessage(SensorbergServiceMessage.stringFrom(what));
  if (!isBootstrapperInitialized()) {
    logError("String_Node_Str");
    return stopSensorbergService();
  }
switch (what) {
case SensorbergServiceMessage.MSG_BEACON_LAYOUT_UPDATE:
    bootstrapper.updateBeaconLayout();
  break;
case SensorbergServiceMessage.MSG_SDK_SCANNER_MESSAGE:
Bundle message=intent.getParcelableExtra(SensorbergServiceMessage.EXTRA_GENERIC_WHAT);
bootstrapper.scanner.handlePlatformMessage(message);
break;
case SensorbergServiceMessage.MSG_SETTINGS_UPDATE:
bootstrapper.updateSettings();
break;
case SensorbergServiceMessage.MSG_UPLOAD_HISTORY:
bootstrapper.uploadHistory();
break;
case SensorbergServiceMessage.GENERIC_TYPE_BEACON_ACTION:
{
presentBeaconEvent(intent);
break;
}
case SensorbergServiceMessage.MSG_APPLICATION_IN_FOREGROUND:
{
bootstrapper.hostApplicationInForeground();
break;
}
case SensorbergServiceMessage.MSG_APPLICATION_IN_BACKGROUND:
{
bootstrapper.hostApplicationInBackground();
break;
}
case SensorbergServiceMessage.MSG_CONVERSION:
updateActionConversion(intent);
break;
case SensorbergServiceMessage.MSG_ATTRIBUTES:
updateAttributes(intent);
break;
case SensorbergServiceMessage.MSG_SET_API_TOKEN:
{
setApiToken(intent);
break;
}
case SensorbergServiceMessage.MSG_REGISTER_PRESENTATION_DELEGATE:
{
registerPresentationDelegate(intent);
break;
}
case SensorbergServiceMessage.MSG_UNREGISTER_PRESENTATION_DELEGATE:
{
unregisterPresentationDelegate(intent);
break;
}
case SensorbergServiceMessage.MSG_PING:
{
bootstrapper.startScanning();
break;
}
case SensorbergServiceMessage.MSG_BLUETOOTH:
{
processBluetoothStateMessage(intent);
break;
}
case SensorbergServiceMessage.MSG_SET_API_ADVERTISING_IDENTIFIER:
{
setAdvertisingIdentifier(intent);
break;
}
case SensorbergServiceMessage.MSG_LOCATION_SERVICES_IS_SET:
{
if (intent.getBooleanExtra(SensorbergServiceMessage.EXTRA_LOCATION_PERMISSION,false)) {
Logger.log.debug("String_Node_Str");
bootstrapper.stopScanning();
}
 else {
bootstrapper.startScanning();
bootstrapper.startGeofences();
Logger.log.debug("String_Node_Str");
}
}
case SensorbergServiceMessage.MSG_LOCATION_UPDATED:
{
onLocationChanged(intent);
break;
}
case SensorbergServiceMessage.MSG_LOCATION_ENABLED:
{
if (bootstrapper.geofenceAvailable) {
bootstrapper.geofenceManager.ping();
}
break;
}
case SensorbergServiceMessage.MSG_GEOFENCE_EVENT:
{
onGeofenceEvent(intent);
break;
}
case SensorbergServiceMessage.MSG_GEOFENCE_NOT_AVAILABLE:
{
onGeofenceNotAvailable(intent);
break;
}
}
return START_STICKY;
}

Fixed version (ground truth):
protected int handleIntentMessage(Intent intent){
  int what=intent.getIntExtra(SensorbergServiceMessage.EXTRA_GENERIC_TYPE,-1);
  Logger.log.serviceHandlesMessage(SensorbergServiceMessage.stringFrom(what));
  if (!isBootstrapperInitialized()) {
    logError("String_Node_Str");
    return stopSensorbergService();
  }
switch (what) {
case SensorbergServiceMessage.MSG_BEACON_LAYOUT_UPDATE:
    bootstrapper.updateBeaconLayout();
  break;
case SensorbergServiceMessage.MSG_SDK_SCANNER_MESSAGE:
Bundle message=intent.getParcelableExtra(SensorbergServiceMessage.EXTRA_GENERIC_WHAT);
bootstrapper.scanner.handlePlatformMessage(message);
break;
case SensorbergServiceMessage.MSG_SETTINGS_UPDATE:
bootstrapper.updateSettings();
break;
case SensorbergServiceMessage.MSG_UPLOAD_HISTORY:
bootstrapper.uploadHistory();
break;
case SensorbergServiceMessage.GENERIC_TYPE_BEACON_ACTION:
{
presentBeaconEvent(intent);
break;
}
case SensorbergServiceMessage.MSG_APPLICATION_IN_FOREGROUND:
{
bootstrapper.hostApplicationInForeground();
break;
}
case SensorbergServiceMessage.MSG_APPLICATION_IN_BACKGROUND:
{
bootstrapper.hostApplicationInBackground();
break;
}
case SensorbergServiceMessage.MSG_CONVERSION:
updateActionConversion(intent);
break;
case MSG_ATTRIBUTES:
bootstrapper.reloadAttributes();
break;
case SensorbergServiceMessage.MSG_SET_API_TOKEN:
{
setApiToken(intent);
break;
}
case SensorbergServiceMessage.MSG_REGISTER_PRESENTATION_DELEGATE:
{
registerPresentationDelegate(intent);
break;
}
case SensorbergServiceMessage.MSG_UNREGISTER_PRESENTATION_DELEGATE:
{
unregisterPresentationDelegate(intent);
break;
}
case SensorbergServiceMessage.MSG_PING:
{
bootstrapper.startScanning();
break;
}
case SensorbergServiceMessage.MSG_BLUETOOTH:
{
processBluetoothStateMessage(intent);
break;
}
case SensorbergServiceMessage.MSG_SET_API_ADVERTISING_IDENTIFIER:
{
setAdvertisingIdentifier(intent);
break;
}
case SensorbergServiceMessage.MSG_LOCATION_SERVICES_IS_SET:
{
if (intent.getBooleanExtra(SensorbergServiceMessage.EXTRA_LOCATION_PERMISSION,false)) {
Logger.log.debug("String_Node_Str");
bootstrapper.stopScanning();
}
 else {
bootstrapper.startScanning();
bootstrapper.startGeofences();
Logger.log.debug("String_Node_Str");
}
}
case SensorbergServiceMessage.MSG_LOCATION_UPDATED:
{
onLocationChanged(intent);
break;
}
case SensorbergServiceMessage.MSG_LOCATION_ENABLED:
{
if (bootstrapper.geofenceAvailable) {
bootstrapper.geofenceManager.ping();
}
break;
}
case SensorbergServiceMessage.MSG_GEOFENCE_EVENT:
{
onGeofenceEvent(intent);
break;
}
case SensorbergServiceMessage.MSG_GEOFENCE_NOT_AVAILABLE:
{
onGeofenceNotAvailable(intent);
break;
}
}
return START_STICKY;
}