Program: 95003
Project: 95003
Buggy source:
public static org.droidplanner.core.mission.MissionItem getMissionItem(Mission mission,MissionItem proxyItem){
  if (proxyItem == null)   return null;
  org.droidplanner.core.mission.MissionItem missionItem;
switch (proxyItem.getType()) {
case CAMERA_TRIGGER:
{
      CameraTrigger proxy=(CameraTrigger)proxyItem;
      org.droidplanner.core.mission.commands.CameraTrigger temp=new org.droidplanner.core.mission.commands.CameraTrigger(mission,new Length(proxy.getTriggerDistance()));
      missionItem=temp;
      break;
    }
case CHANGE_SPEED:
{
    ChangeSpeed proxy=(ChangeSpeed)proxyItem;
    org.droidplanner.core.mission.commands.ChangeSpeed temp=new org.droidplanner.core.mission.commands.ChangeSpeed(mission,new Speed(proxy.getSpeed()));
    missionItem=temp;
    break;
  }
case EPM_GRIPPER:
{
  EpmGripper proxy=(EpmGripper)proxyItem;
  org.droidplanner.core.mission.commands.EpmGripper temp=new org.droidplanner.core.mission.commands.EpmGripper(mission,proxy.isRelease());
  missionItem=temp;
  break;
}
case RETURN_TO_LAUNCH:
{
ReturnToLaunch proxy=(ReturnToLaunch)proxyItem;
ReturnToHome temp=new ReturnToHome(mission);
temp.setHeight(new Altitude(proxy.getReturnAltitude()));
missionItem=temp;
break;
}
case SET_SERVO:
{
SetServo proxy=(SetServo)proxyItem;
org.droidplanner.core.mission.commands.SetServo temp=new org.droidplanner.core.mission.commands.SetServo(mission,proxy.getChannel(),proxy.getPwm());
missionItem=temp;
break;
}
case TAKEOFF:
{
Takeoff proxy=(Takeoff)proxyItem;
org.droidplanner.core.mission.commands.Takeoff temp=new org.droidplanner.core.mission.commands.Takeoff(mission,new Altitude(proxy.getTakeoffAltitude()));
missionItem=temp;
break;
}
case CIRCLE:
{
Circle proxy=(Circle)proxyItem;
org.droidplanner.core.mission.waypoints.Circle temp=new org.droidplanner.core.mission.waypoints.Circle(mission,MathUtils.latLongAltToCoord3D(proxy.getCoordinate()));
temp.setRadius(proxy.getRadius());
temp.setTurns(proxy.getTurns());
missionItem=temp;
break;
}
case LAND:
{
Land proxy=(Land)proxyItem;
org.droidplanner.core.mission.waypoints.Land temp=new org.droidplanner.core.mission.waypoints.Land(mission,MathUtils.latLongToCoord2D(proxy.getCoordinate()));
missionItem=temp;
break;
}
case REGION_OF_INTEREST:
{
RegionOfInterest proxy=(RegionOfInterest)proxyItem;
org.droidplanner.core.mission.waypoints.RegionOfInterest temp=new org.droidplanner.core.mission.waypoints.RegionOfInterest(mission,MathUtils.latLongAltToCoord3D(proxy.getCoordinate()));
missionItem=temp;
break;
}
case SPLINE_WAYPOINT:
{
SplineWaypoint proxy=(SplineWaypoint)proxyItem;
org.droidplanner.core.mission.waypoints.SplineWaypoint temp=new org.droidplanner.core.mission.waypoints.SplineWaypoint(mission,MathUtils.latLongAltToCoord3D(proxy.getCoordinate()));
temp.setDelay(proxy.getDelay());
missionItem=temp;
break;
}
case STRUCTURE_SCANNER:
{
StructureScanner proxy=(StructureScanner)proxyItem;
org.droidplanner.core.mission.waypoints.StructureScanner temp=new org.droidplanner.core.mission.waypoints.StructureScanner(mission,MathUtils.latLongAltToCoord3D(proxy.getCoordinate()));
temp.setRadius((int)proxy.getRadius());
temp.setNumberOfSteps(proxy.getStepsCount());
temp.setAltitudeStep((int)proxy.getHeightStep());
temp.enableCrossHatch(proxy.isCrossHatch());
temp.setCamera(getCameraInfo(proxy.getSurveyDetail().getCameraDetail()));
missionItem=temp;
break;
}
case WAYPOINT:
{
Waypoint proxy=(Waypoint)proxyItem;
org.droidplanner.core.mission.waypoints.Waypoint temp=new org.droidplanner.core.mission.waypoints.Waypoint(mission,MathUtils.latLongAltToCoord3D(proxy.getCoordinate()));
temp.setAcceptanceRadius(proxy.getAcceptanceRadius());
temp.setDelay(proxy.getDelay());
temp.setOrbitCCW(proxy.isOrbitCCW());
temp.setOrbitalRadius(proxy.getOrbitalRadius());
temp.setYawAngle(proxy.getYawAngle());
missionItem=temp;
break;
}
case SURVEY:
{
Survey proxy=(Survey)proxyItem;
SurveyDetail surveyDetail=proxy.getSurveyDetail();
List<Coord2D> polygonPoints=MathUtils.latLongToCoord2D(proxy.getPolygonPoints());
org.droidplanner.core.mission.survey.Survey temp=new org.droidplanner.core.mission.survey.Survey(mission,polygonPoints);
if (surveyDetail != null) {
temp.update(surveyDetail.getAngle(),new Altitude(surveyDetail.getAltitude()),surveyDetail.getOverlap(),surveyDetail.getSidelap());
CameraDetail cameraDetail=surveyDetail.getCameraDetail();
if (cameraDetail != null) temp.setCameraInfo(getCameraInfo(cameraDetail));
}
try {
temp.build();
}
 catch (Exception e) {
Log.e(TAG,e.getMessage(),e);
}
missionItem=temp;
break;
}
case YAW_CONDITION:
{
YawCondition proxy=(YawCondition)proxyItem;
ConditionYaw temp=new ConditionYaw(mission,proxy.getAngle(),proxy.isRelative());
temp.setAngularSpeed(proxy.getAngularSpeed());
missionItem=temp;
break;
}
default :
missionItem=null;
break;
}
return missionItem;
}

Fixed version (ground truth):
public static org.droidplanner.core.mission.MissionItem getMissionItem(Mission mission,MissionItem proxyItem){
  if (proxyItem == null)   return null;
  org.droidplanner.core.mission.MissionItem missionItem;
switch (proxyItem.getType()) {
case CAMERA_TRIGGER:
{
      CameraTrigger proxy=(CameraTrigger)proxyItem;
      org.droidplanner.core.mission.commands.CameraTrigger temp=new org.droidplanner.core.mission.commands.CameraTrigger(mission,new Length(proxy.getTriggerDistance()));
      missionItem=temp;
      break;
    }
case CHANGE_SPEED:
{
    ChangeSpeed proxy=(ChangeSpeed)proxyItem;
    org.droidplanner.core.mission.commands.ChangeSpeed temp=new org.droidplanner.core.mission.commands.ChangeSpeed(mission,new Speed(proxy.getSpeed()));
    missionItem=temp;
    break;
  }
case EPM_GRIPPER:
{
  EpmGripper proxy=(EpmGripper)proxyItem;
  org.droidplanner.core.mission.commands.EpmGripper temp=new org.droidplanner.core.mission.commands.EpmGripper(mission,proxy.isRelease());
  missionItem=temp;
  break;
}
case RETURN_TO_LAUNCH:
{
ReturnToLaunch proxy=(ReturnToLaunch)proxyItem;
ReturnToHome temp=new ReturnToHome(mission);
temp.setHeight(new Altitude(proxy.getReturnAltitude()));
missionItem=temp;
break;
}
case SET_SERVO:
{
SetServo proxy=(SetServo)proxyItem;
org.droidplanner.core.mission.commands.SetServo temp=new org.droidplanner.core.mission.commands.SetServo(mission,proxy.getChannel(),proxy.getPwm());
missionItem=temp;
break;
}
case TAKEOFF:
{
Takeoff proxy=(Takeoff)proxyItem;
org.droidplanner.core.mission.commands.Takeoff temp=new org.droidplanner.core.mission.commands.Takeoff(mission,new Altitude(proxy.getTakeoffAltitude()));
missionItem=temp;
break;
}
case CIRCLE:
{
Circle proxy=(Circle)proxyItem;
org.droidplanner.core.mission.waypoints.Circle temp=new org.droidplanner.core.mission.waypoints.Circle(mission,MathUtils.latLongAltToCoord3D(proxy.getCoordinate()));
temp.setRadius(proxy.getRadius());
temp.setTurns(proxy.getTurns());
missionItem=temp;
break;
}
case LAND:
{
Land proxy=(Land)proxyItem;
org.droidplanner.core.mission.waypoints.Land temp=new org.droidplanner.core.mission.waypoints.Land(mission,MathUtils.latLongToCoord2D(proxy.getCoordinate()));
missionItem=temp;
break;
}
case REGION_OF_INTEREST:
{
RegionOfInterest proxy=(RegionOfInterest)proxyItem;
org.droidplanner.core.mission.waypoints.RegionOfInterest temp=new org.droidplanner.core.mission.waypoints.RegionOfInterest(mission,MathUtils.latLongAltToCoord3D(proxy.getCoordinate()));
missionItem=temp;
break;
}
case SPLINE_WAYPOINT:
{
SplineWaypoint proxy=(SplineWaypoint)proxyItem;
org.droidplanner.core.mission.waypoints.SplineWaypoint temp=new org.droidplanner.core.mission.waypoints.SplineWaypoint(mission,MathUtils.latLongAltToCoord3D(proxy.getCoordinate()));
temp.setDelay(proxy.getDelay());
missionItem=temp;
break;
}
case STRUCTURE_SCANNER:
{
StructureScanner proxy=(StructureScanner)proxyItem;
org.droidplanner.core.mission.waypoints.StructureScanner temp=new org.droidplanner.core.mission.waypoints.StructureScanner(mission,MathUtils.latLongAltToCoord3D(proxy.getCoordinate()));
temp.setRadius((int)proxy.getRadius());
temp.setNumberOfSteps(proxy.getStepsCount());
temp.setAltitudeStep((int)proxy.getHeightStep());
temp.enableCrossHatch(proxy.isCrossHatch());
CameraDetail camDetail=proxy.getSurveyDetail().getCameraDetail();
if (camDetail != null) temp.setCamera(getCameraInfo(camDetail));
missionItem=temp;
break;
}
case WAYPOINT:
{
Waypoint proxy=(Waypoint)proxyItem;
org.droidplanner.core.mission.waypoints.Waypoint temp=new org.droidplanner.core.mission.waypoints.Waypoint(mission,MathUtils.latLongAltToCoord3D(proxy.getCoordinate()));
temp.setAcceptanceRadius(proxy.getAcceptanceRadius());
temp.setDelay(proxy.getDelay());
temp.setOrbitCCW(proxy.isOrbitCCW());
temp.setOrbitalRadius(proxy.getOrbitalRadius());
temp.setYawAngle(proxy.getYawAngle());
missionItem=temp;
break;
}
case SURVEY:
{
Survey proxy=(Survey)proxyItem;
SurveyDetail surveyDetail=proxy.getSurveyDetail();
List<Coord2D> polygonPoints=MathUtils.latLongToCoord2D(proxy.getPolygonPoints());
org.droidplanner.core.mission.survey.Survey temp=new org.droidplanner.core.mission.survey.Survey(mission,polygonPoints);
if (surveyDetail != null) {
temp.update(surveyDetail.getAngle(),new Altitude(surveyDetail.getAltitude()),surveyDetail.getOverlap(),surveyDetail.getSidelap());
CameraDetail cameraDetail=surveyDetail.getCameraDetail();
if (cameraDetail != null) temp.setCameraInfo(getCameraInfo(cameraDetail));
}
try {
temp.build();
}
 catch (Exception e) {
Log.e(TAG,e.getMessage(),e);
}
missionItem=temp;
break;
}
case YAW_CONDITION:
{
YawCondition proxy=(YawCondition)proxyItem;
ConditionYaw temp=new ConditionYaw(mission,proxy.getAngle(),proxy.isRelative());
temp.setAngularSpeed(proxy.getAngularSpeed());
missionItem=temp;
break;
}
default :
missionItem=null;
break;
}
return missionItem;
}