Program: 95166
Project: 95166
Buggy source:
/** 
 * Warn the user if needed via the TTSNotificationProvider module
 */
@Override public void onDroneEvent(DroneEventsType event,Drone drone){
  if (tts != null) {
switch (event) {
case INVALID_POLYGON:
      Toast.makeText(context,R.string.exception_draw_polygon,Toast.LENGTH_SHORT).show();
    break;
case ARMING:
  speakArmedState(drone.state.isArmed());
break;
case ARMING_STARTED:
speak("String_Node_Str");
break;
case BATTERY:
batteryDischargeNotification(drone.battery.getBattRemain());
break;
case MODE:
speakMode(drone.state.getMode());
break;
case MISSION_SENT:
Toast.makeText(context,"String_Node_Str",Toast.LENGTH_SHORT).show();
speak("String_Node_Str");
break;
case GPS_FIX:
speakGpsMode(drone.GPS.getFixTypeNumeric());
break;
case MISSION_RECEIVED:
Toast.makeText(context,"String_Node_Str",Toast.LENGTH_SHORT).show();
speak("String_Node_Str");
break;
case HEARTBEAT_FIRST:
statusInterval=new DroidPlannerPrefs(context).getSpokenStatusInterval();
setupPeriodicSpeechOutput(statusInterval,drone);
speak("String_Node_Str");
break;
case HEARTBEAT_TIMEOUT:
if (!Calibration.isCalibrating()) {
speak("String_Node_Str");
handler.removeCallbacks(watchdogCallback);
}
break;
case HEARTBEAT_RESTORED:
statusInterval=new DroidPlannerPrefs(context).getSpokenStatusInterval();
setupPeriodicSpeechOutput(statusInterval,drone);
speak("String_Node_Str");
break;
case DISCONNECTED:
handler.removeCallbacks(watchdogCallback);
break;
case MISSION_WP_UPDATE:
speak("String_Node_Str" + drone.missionStats.getCurrentWP());
break;
case FOLLOW_START:
speak("String_Node_Str");
break;
case PERIODIC_SPEECH:
break;
case FAILSAFE:
String failsafe=drone.state.getFailsafe();
if (drone.state.isFailsafe()) {
speak(failsafe);
}
default :
break;
}
}
}

Fixed version (ground truth):
/** 
 * Warn the user if needed via the TTSNotificationProvider module
 */
@Override public void onDroneEvent(DroneEventsType event,Drone drone){
  if (tts != null) {
switch (event) {
case INVALID_POLYGON:
      Toast.makeText(context,R.string.exception_draw_polygon,Toast.LENGTH_SHORT).show();
    break;
case ARMING:
  speakArmedState(drone.state.isArmed());
break;
case ARMING_STARTED:
speak("String_Node_Str");
break;
case BATTERY:
batteryDischargeNotification(drone.battery.getBattRemain());
break;
case MODE:
speakMode(drone.state.getMode());
break;
case MISSION_SENT:
Toast.makeText(context,"String_Node_Str",Toast.LENGTH_SHORT).show();
speak("String_Node_Str");
break;
case GPS_FIX:
speakGpsMode(drone.GPS.getFixTypeNumeric());
break;
case MISSION_RECEIVED:
Toast.makeText(context,"String_Node_Str",Toast.LENGTH_SHORT).show();
speak("String_Node_Str");
break;
case HEARTBEAT_FIRST:
statusInterval=new DroidPlannerPrefs(context).getSpokenStatusInterval();
setupPeriodicSpeechOutput(statusInterval,drone);
speak("String_Node_Str");
break;
case HEARTBEAT_TIMEOUT:
if (!Calibration.isCalibrating()) {
speak("String_Node_Str");
handler.removeCallbacks(watchdogCallback);
}
break;
case HEARTBEAT_RESTORED:
statusInterval=new DroidPlannerPrefs(context).getSpokenStatusInterval();
setupPeriodicSpeechOutput(statusInterval,drone);
speak("String_Node_Str");
break;
case DISCONNECTED:
handler.removeCallbacks(watchdogCallback);
break;
case MISSION_WP_UPDATE:
speak("String_Node_Str" + drone.missionStats.getCurrentWP());
break;
case FOLLOW_START:
speak("String_Node_Str");
break;
case FAILSAFE:
String failsafe=drone.state.getFailsafe();
if (drone.state.isFailsafe()) {
speak(failsafe);
}
default :
break;
}
}
}