Buggy code:
public class DeviceIntentService extends ConvenientIntentService { public DeviceIntentService ( ) { } @ Override protected STATE handleIntent ( Intent intent , boolean doRefresh , ResultReceiver resultReceiver ) { String deviceName = intent . getStringExtra ( DEVICE_NAME ) ; Device device = INSTANCE . getDeviceForName ( deviceName , doRefresh ) ; <START_BUG> Log . e ( DeviceIntentService . class . getName ( ) , intent . getAction ( ) ) ; <END_BUG> String action = intent . getAction ( ) ; if ( action . equals ( DEVICE_GRAPH ) ) { return graphIntent ( intent , device , resultReceiver ) ; } else if ( action . equals ( DEVICE_TOGGLE_STATE ) ) { return toggleIntent ( device ) ; } else if ( action . equals ( DEVICE_SET_STATE ) ) { return setStateIntent ( intent , device ) ; } else if ( action . equals ( DEVICE_DIM ) ) { return dimIntent ( intent , device ) ; } else if ( action . equals ( DEVICE_SET_DAY_TEMPERATURE ) ) { double dayTemperature = intent . getDoubleExtra ( DEVICE_TEMPERATURE , ( - 1 ) ) ; FHTService . INSTANCE . setDayTemperature ( ( ( FHTDevice ) ( device ) ) , dayTemperature ) ; } else if ( action . equals ( DEVICE_SET_NIGHT_TEMPERATURE ) ) { double nightTemperature = intent . getDoubleExtra ( DEVICE_TEMPERATURE , ( - 1 ) ) ; FHTService . INSTANCE . setNightTemperature ( ( ( FHTDevice ) ( device ) ) , nightTemperature ) ; } else if ( action . equals ( DEVICE_SET_MODE ) ) { FHTMode mode = ( ( FHTMode ) ( intent . getSerializableExtra ( DEVICE_MODE ) ) ) ; FHTService . INSTANCE . setMode ( ( ( FHTDevice ) ( device ) ) , mode ) ; } else if ( action . equals ( DEVICE_SET_TIMETABLE ) ) { FHTService . INSTANCE . setTimetableFor ( ( ( FHTDevice ) ( device ) ) ) ; } else if ( action . equals ( DEVICE_SET_WINDOW_OPEN_TEMPERATURE ) ) { double temperature = intent . getDoubleExtra ( DEVICE_TEMPERATURE , ( - 1 ) ) ; FHTService . INSTANCE . setWindowOpenTemp ( ( ( FHTDevice ) ( device ) ) , temperature ) ; } else if ( action . equals ( DEVICE_SET_DESIRED_TEMPERATURE ) ) { double temperature = intent . getDoubleExtra ( DEVICE_TEMPERATURE , ( - 1 ) ) ; FHTService . INSTANCE . setDesiredTemperature ( ( ( FHTDevice ) ( device ) ) , temperature ) ; } else if ( action . equals ( DEVICE_RESET_TIMETABLE ) ) { FHTService . INSTANCE . resetTimetable ( ( ( FHTDevice ) ( device ) ) ) ; } else if ( action . equals ( DEVICE_RENAME ) ) { String newName = intent . getStringExtra ( DEVICE_NEW_NAME ) ; DeviceService . INSTANCE . renameDevice ( device , newName ) ; } else if ( action . equals ( DEVICE_DELETE ) ) { DeviceService . INSTANCE . deleteDevice ( device ) ; } else if ( action . equals ( DEVICE_MOVE_ROOM ) ) { String newRoom = intent . getStringExtra ( DEVICE_NEW_ROOM ) ; DeviceService . INSTANCE . moveDevice ( device , newRoom ) ; } else if ( action . equals ( DEVICE_SET_ALIAS ) ) { String newAlias = intent . getStringExtra ( DEVICE_NEW_ALIAS ) ; DeviceService . INSTANCE . setAlias ( device , newAlias ) ; } return STATE . SUCCESS ; } private STATE dimIntent ( Intent intent , Device device ) { } private STATE setStateIntent ( Intent intent , Device device ) { } private STATE toggleIntent ( Device device ) { } private STATE graphIntent ( Intent intent , Device device , ResultReceiver resultReceiver ) { } }

Fix:
Log . d ( DeviceIntentService . class . getName ( ) , intent . getAction ( ) ) ;