Program: 94735
Project: 94735
Buggy source:
public static MissionItem getProxyMissionItem(org.droidplanner.services.android.core.mission.MissionItem itemImpl){
  if (itemImpl == null)   return null;
  MissionItem proxyMissionItem;
switch (itemImpl.getType()) {
case WAYPOINT:
{
      WaypointImpl source=(WaypointImpl)itemImpl;
      Waypoint temp=new Waypoint();
      temp.setCoordinate((source.getCoordinate()));
      temp.setAcceptanceRadius(source.getAcceptanceRadius());
      temp.setDelay(source.getDelay());
      temp.setOrbitalRadius(source.getOrbitalRadius());
      temp.setOrbitCCW(source.isOrbitCCW());
      temp.setYawAngle(source.getYawAngle());
      proxyMissionItem=temp;
      break;
    }
case SPLINE_WAYPOINT:
{
    SplineWaypointImpl source=(SplineWaypointImpl)itemImpl;
    SplineWaypoint temp=new SplineWaypoint();
    temp.setCoordinate((source.getCoordinate()));
    temp.setDelay(source.getDelay());
    proxyMissionItem=temp;
    break;
  }
case TAKEOFF:
{
  TakeoffImpl source=(TakeoffImpl)itemImpl;
  Takeoff temp=new Takeoff();
  temp.setTakeoffAltitude(source.getFinishedAlt());
  temp.setTakeoffPitch(source.getPitch());
  proxyMissionItem=temp;
  break;
}
case RTL:
{
ReturnToHomeImpl source=(ReturnToHomeImpl)itemImpl;
ReturnToLaunch temp=new ReturnToLaunch();
temp.setReturnAltitude(source.getHeight());
proxyMissionItem=temp;
break;
}
case LAND:
{
LandImpl source=(LandImpl)itemImpl;
Land temp=new Land();
temp.setCoordinate((source.getCoordinate()));
proxyMissionItem=temp;
break;
}
case DO_LAND_START:
{
DoLandStartImpl source=(DoLandStartImpl)itemImpl;
DoLandStart temp=new DoLandStart();
temp.setCoordinate((source.getCoordinate()));
proxyMissionItem=temp;
break;
}
case CIRCLE:
{
CircleImpl source=(CircleImpl)itemImpl;
Circle temp=new Circle();
temp.setCoordinate((source.getCoordinate()));
temp.setRadius(source.getRadius());
temp.setTurns(source.getNumberOfTurns());
proxyMissionItem=temp;
break;
}
case ROI:
{
RegionOfInterestImpl source=(RegionOfInterestImpl)itemImpl;
RegionOfInterest temp=new RegionOfInterest();
temp.setCoordinate((source.getCoordinate()));
proxyMissionItem=temp;
break;
}
case SURVEY:
{
SurveyImpl source=(SurveyImpl)itemImpl;
boolean isValid=true;
try {
source.build();
}
 catch (Exception e) {
isValid=false;
}
Survey temp=new Survey();
temp.setValid(isValid);
temp.setSurveyDetail(getSurveyDetail(source.surveyData));
temp.setPolygonPoints((source.polygon.getPoints()));
if (source.grid != null) {
temp.setGridPoints((source.grid.gridPoints));
temp.setCameraLocations((source.grid.getCameraLocations()));
}
temp.setPolygonArea(source.polygon.getArea().valueInSqMeters());
proxyMissionItem=temp;
break;
}
case SPLINE_SURVEY:
{
SplineSurveyImpl source=(SplineSurveyImpl)itemImpl;
boolean isValid=true;
try {
source.build();
}
 catch (Exception e) {
isValid=false;
}
Survey temp=new Survey();
temp.setValid(isValid);
temp.setSurveyDetail(getSurveyDetail(source.surveyData));
temp.setPolygonPoints((source.polygon.getPoints()));
if (source.grid != null) {
temp.setGridPoints((source.grid.gridPoints));
temp.setCameraLocations((source.grid.getCameraLocations()));
}
temp.setPolygonArea(source.polygon.getArea().valueInSqMeters());
proxyMissionItem=temp;
break;
}
case CYLINDRICAL_SURVEY:
{
StructureScannerImpl source=(StructureScannerImpl)itemImpl;
StructureScanner temp=new StructureScanner();
temp.setSurveyDetail(getSurveyDetail(source.getSurveyData()));
temp.setCoordinate((source.getCoordinate()));
temp.setRadius(source.getRadius());
temp.setCrossHatch(source.isCrossHatchEnabled());
temp.setHeightStep(source.getEndAltitude());
temp.setStepsCount(source.getNumberOfSteps());
temp.setPath((source.getPath()));
proxyMissionItem=temp;
break;
}
case CHANGE_SPEED:
{
ChangeSpeedImpl source=(ChangeSpeedImpl)itemImpl;
ChangeSpeed temp=new ChangeSpeed();
temp.setSpeed(source.getSpeed());
proxyMissionItem=temp;
break;
}
case CAMERA_TRIGGER:
{
CameraTriggerImpl source=(CameraTriggerImpl)itemImpl;
CameraTrigger temp=new CameraTrigger();
temp.setTriggerDistance(source.getTriggerDistance());
proxyMissionItem=temp;
break;
}
case EPM_GRIPPER:
{
EpmGripperImpl source=(EpmGripperImpl)itemImpl;
EpmGripper temp=new EpmGripper();
temp.setRelease(source.isRelease());
proxyMissionItem=temp;
break;
}
case SET_SERVO:
{
SetServoImpl source=(SetServoImpl)itemImpl;
SetServo temp=new SetServo();
temp.setChannel(source.getChannel());
temp.setPwm(source.getPwm());
proxyMissionItem=temp;
break;
}
case CONDITION_YAW:
{
ConditionYawImpl source=(ConditionYawImpl)itemImpl;
YawCondition temp=new YawCondition();
temp.setAngle(source.getAngle());
temp.setAngularSpeed(source.getAngularSpeed());
temp.setRelative(source.isRelative());
proxyMissionItem=temp;
break;
}
case SET_RELAY:
{
SetRelayImpl impl=(SetRelayImpl)itemImpl;
SetRelay proxy=new SetRelay();
proxy.setRelayNumber(impl.getRelayNumber());
proxy.setEnabled(impl.isEnabled());
proxyMissionItem=proxy;
break;
}
case DO_JUMP:
{
DoJumpImpl source=(DoJumpImpl)itemImpl;
DoJump proxy=new DoJump();
proxy.setWaypoint(source.getWaypoint());
proxy.setRepeatCount(source.getRepeatCount());
proxyMissionItem=proxy;
break;
}
default :
proxyMissionItem=null;
break;
}
return proxyMissionItem;
}

Fixed version (ground truth):
public static MissionItem getProxyMissionItem(org.droidplanner.services.android.core.mission.MissionItem itemImpl){
  if (itemImpl == null)   return null;
  MissionItem proxyMissionItem;
switch (itemImpl.getType()) {
case WAYPOINT:
{
      WaypointImpl source=(WaypointImpl)itemImpl;
      Waypoint temp=new Waypoint();
      temp.setCoordinate((source.getCoordinate()));
      temp.setAcceptanceRadius(source.getAcceptanceRadius());
      temp.setDelay(source.getDelay());
      temp.setOrbitalRadius(source.getOrbitalRadius());
      temp.setOrbitCCW(source.isOrbitCCW());
      temp.setYawAngle(source.getYawAngle());
      proxyMissionItem=temp;
      break;
    }
case SPLINE_WAYPOINT:
{
    SplineWaypointImpl source=(SplineWaypointImpl)itemImpl;
    SplineWaypoint temp=new SplineWaypoint();
    temp.setCoordinate((source.getCoordinate()));
    temp.setDelay(source.getDelay());
    proxyMissionItem=temp;
    break;
  }
case TAKEOFF:
{
  TakeoffImpl source=(TakeoffImpl)itemImpl;
  Takeoff temp=new Takeoff();
  temp.setTakeoffAltitude(source.getFinishedAlt());
  temp.setTakeoffPitch(source.getPitch());
  proxyMissionItem=temp;
  break;
}
case RTL:
{
ReturnToHomeImpl source=(ReturnToHomeImpl)itemImpl;
ReturnToLaunch temp=new ReturnToLaunch();
temp.setReturnAltitude(source.getHeight());
proxyMissionItem=temp;
break;
}
case LAND:
{
LandImpl source=(LandImpl)itemImpl;
Land temp=new Land();
temp.setCoordinate((source.getCoordinate()));
proxyMissionItem=temp;
break;
}
case DO_LAND_START:
{
DoLandStartImpl source=(DoLandStartImpl)itemImpl;
DoLandStart temp=new DoLandStart();
temp.setCoordinate((source.getCoordinate()));
proxyMissionItem=temp;
break;
}
case CIRCLE:
{
CircleImpl source=(CircleImpl)itemImpl;
Circle temp=new Circle();
temp.setCoordinate((source.getCoordinate()));
temp.setRadius(source.getRadius());
temp.setTurns(source.getNumberOfTurns());
proxyMissionItem=temp;
break;
}
case ROI:
{
RegionOfInterestImpl source=(RegionOfInterestImpl)itemImpl;
if (source.isReset()) {
ResetROI temp=new ResetROI();
proxyMissionItem=temp;
}
 else {
RegionOfInterest temp=new RegionOfInterest();
temp.setCoordinate((source.getCoordinate()));
proxyMissionItem=temp;
}
break;
}
case SURVEY:
{
SurveyImpl source=(SurveyImpl)itemImpl;
boolean isValid=true;
try {
source.build();
}
 catch (Exception e) {
isValid=false;
}
Survey temp=new Survey();
temp.setValid(isValid);
temp.setSurveyDetail(getSurveyDetail(source.surveyData));
temp.setPolygonPoints((source.polygon.getPoints()));
if (source.grid != null) {
temp.setGridPoints((source.grid.gridPoints));
temp.setCameraLocations((source.grid.getCameraLocations()));
}
temp.setPolygonArea(source.polygon.getArea().valueInSqMeters());
proxyMissionItem=temp;
break;
}
case SPLINE_SURVEY:
{
SplineSurveyImpl source=(SplineSurveyImpl)itemImpl;
boolean isValid=true;
try {
source.build();
}
 catch (Exception e) {
isValid=false;
}
Survey temp=new Survey();
temp.setValid(isValid);
temp.setSurveyDetail(getSurveyDetail(source.surveyData));
temp.setPolygonPoints((source.polygon.getPoints()));
if (source.grid != null) {
temp.setGridPoints((source.grid.gridPoints));
temp.setCameraLocations((source.grid.getCameraLocations()));
}
temp.setPolygonArea(source.polygon.getArea().valueInSqMeters());
proxyMissionItem=temp;
break;
}
case CYLINDRICAL_SURVEY:
{
StructureScannerImpl source=(StructureScannerImpl)itemImpl;
StructureScanner temp=new StructureScanner();
temp.setSurveyDetail(getSurveyDetail(source.getSurveyData()));
temp.setCoordinate((source.getCoordinate()));
temp.setRadius(source.getRadius());
temp.setCrossHatch(source.isCrossHatchEnabled());
temp.setHeightStep(source.getEndAltitude());
temp.setStepsCount(source.getNumberOfSteps());
temp.setPath((source.getPath()));
proxyMissionItem=temp;
break;
}
case CHANGE_SPEED:
{
ChangeSpeedImpl source=(ChangeSpeedImpl)itemImpl;
ChangeSpeed temp=new ChangeSpeed();
temp.setSpeed(source.getSpeed());
proxyMissionItem=temp;
break;
}
case CAMERA_TRIGGER:
{
CameraTriggerImpl source=(CameraTriggerImpl)itemImpl;
CameraTrigger temp=new CameraTrigger();
temp.setTriggerDistance(source.getTriggerDistance());
proxyMissionItem=temp;
break;
}
case EPM_GRIPPER:
{
EpmGripperImpl source=(EpmGripperImpl)itemImpl;
EpmGripper temp=new EpmGripper();
temp.setRelease(source.isRelease());
proxyMissionItem=temp;
break;
}
case SET_SERVO:
{
SetServoImpl source=(SetServoImpl)itemImpl;
SetServo temp=new SetServo();
temp.setChannel(source.getChannel());
temp.setPwm(source.getPwm());
proxyMissionItem=temp;
break;
}
case CONDITION_YAW:
{
ConditionYawImpl source=(ConditionYawImpl)itemImpl;
YawCondition temp=new YawCondition();
temp.setAngle(source.getAngle());
temp.setAngularSpeed(source.getAngularSpeed());
temp.setRelative(source.isRelative());
proxyMissionItem=temp;
break;
}
case SET_RELAY:
{
SetRelayImpl impl=(SetRelayImpl)itemImpl;
SetRelay proxy=new SetRelay();
proxy.setRelayNumber(impl.getRelayNumber());
proxy.setEnabled(impl.isEnabled());
proxyMissionItem=proxy;
break;
}
case DO_JUMP:
{
DoJumpImpl source=(DoJumpImpl)itemImpl;
DoJump proxy=new DoJump();
proxy.setWaypoint(source.getWaypoint());
proxy.setRepeatCount(source.getRepeatCount());
proxyMissionItem=proxy;
break;
}
default :
proxyMissionItem=null;
break;
}
return proxyMissionItem;
}