Program: 94702
Project: 94702
Buggy source:
@Override public boolean executeAsyncAction(Action action,ICommandListener listener){
  String type=action.getType();
  Bundle data=action.getData();
switch (type) {
case MissionActions.ACTION_GOTO_WAYPOINT:
    int missionItemIndex=data.getInt(MissionActions.EXTRA_MISSION_ITEM_INDEX);
  CommonApiUtils.gotoWaypoint(this,missionItemIndex,listener);
return true;
case StateActions.ACTION_ARM:
return performArming(data,listener);
case StateActions.ACTION_SET_VEHICLE_MODE:
return setVehicleMode(data,listener);
case ControlActions.ACTION_DO_GUIDED_TAKEOFF:
return performTakeoff(data,listener);
case ControlActions.ACTION_SET_CONDITION_YAW:
float turnSpeed=2;
ParameterManager parameterManager=getParameterManager();
if (parameterManager != null) {
Parameter turnSpeedParam=parameterManager.getParameter("String_Node_Str");
if (turnSpeedParam != null) {
turnSpeed=(float)turnSpeedParam.getValue();
}
}
float targetAngle=data.getFloat(ControlActions.EXTRA_YAW_TARGET_ANGLE);
float yawRate=data.getFloat(ControlActions.EXTRA_YAW_CHANGE_RATE);
boolean isClockwise=yawRate >= 0;
boolean isRelative=data.getBoolean(ControlActions.EXTRA_YAW_IS_RELATIVE);
MavLinkCommands.setConditionYaw(this,targetAngle,Math.abs(yawRate) * turnSpeed,isClockwise,isRelative,listener);
return true;
case ControlActions.ACTION_SET_VELOCITY:
return setVelocity(data,listener);
case ControlActions.ACTION_ENABLE_MANUAL_CONTROL:
return enableManualControl(data,listener);
case ExperimentalActions.ACTION_SEND_MAVLINK_MESSAGE:
data.setClassLoader(MavlinkMessageWrapper.class.getClassLoader());
MavlinkMessageWrapper messageWrapper=data.getParcelable(ExperimentalActions.EXTRA_MAVLINK_MESSAGE);
CommonApiUtils.sendMavlinkMessage(this,messageWrapper);
return true;
case ACTION_REQUEST_HOME_UPDATE:
requestHomeUpdate();
return true;
default :
CommonApiUtils.postErrorEvent(CommandExecutionError.COMMAND_UNSUPPORTED,listener);
return true;
}
}

Fixed version (ground truth):
@Override public boolean executeAsyncAction(Action action,ICommandListener listener){
  String type=action.getType();
  Bundle data=action.getData();
switch (type) {
case MissionActions.ACTION_GOTO_WAYPOINT:
    int missionItemIndex=data.getInt(MissionActions.EXTRA_MISSION_ITEM_INDEX);
  CommonApiUtils.gotoWaypoint(this,missionItemIndex,listener);
return true;
case StateActions.ACTION_ARM:
return performArming(data,listener);
case StateActions.ACTION_SET_VEHICLE_MODE:
return setVehicleMode(data,listener);
case ControlActions.ACTION_DO_GUIDED_TAKEOFF:
return performTakeoff(data,listener);
case ControlActions.ACTION_SET_CONDITION_YAW:
float turnSpeed=2;
ParameterManager parameterManager=getParameterManager();
if (parameterManager != null) {
Parameter turnSpeedParam=parameterManager.getParameter("String_Node_Str");
if (turnSpeedParam != null) {
turnSpeed=(float)turnSpeedParam.getValue();
}
}
float targetAngle=data.getFloat(ControlActions.EXTRA_YAW_TARGET_ANGLE);
float yawRate=data.getFloat(ControlActions.EXTRA_YAW_CHANGE_RATE);
boolean isClockwise=yawRate >= 0;
boolean isRelative=data.getBoolean(ControlActions.EXTRA_YAW_IS_RELATIVE);
MavLinkCommands.setConditionYaw(this,targetAngle,Math.abs(yawRate) * turnSpeed,isClockwise,isRelative,listener);
return true;
case ControlActions.ACTION_SET_VELOCITY:
return setVelocity(data,listener);
case ControlActions.ACTION_ENABLE_MANUAL_CONTROL:
return enableManualControl(data,listener);
case ExperimentalActions.ACTION_SEND_MAVLINK_MESSAGE:
data.setClassLoader(MavlinkMessageWrapper.class.getClassLoader());
MavlinkMessageWrapper messageWrapper=data.getParcelable(ExperimentalActions.EXTRA_MAVLINK_MESSAGE);
CommonApiUtils.sendMavlinkMessage(this,messageWrapper);
return true;
case ACTION_REQUEST_HOME_UPDATE:
requestHomeUpdate();
return true;
case CapabilityActions.ACTION_CHECK_FEATURE_SUPPORT:
return checkFeatureSupport(data,listener);
default :
CommonApiUtils.postErrorEvent(CommandExecutionError.COMMAND_UNSUPPORTED,listener);
return true;
}
}