Program: 94766
Project: 94766
Buggy source:
public void onVehicleTypeReceived(FirmwareType type){
  if (drone != null) {
    return;
  }
  final DroidPlannerPrefs dpPrefs=new DroidPlannerPrefs(context);
  final DroneInterfaces.Handler dpHandler=new DroneInterfaces.Handler(){
    @Override public void removeCallbacks(    Runnable thread){
      handler.removeCallbacks(thread);
    }
    @Override public void post(    Runnable thread){
      handler.post(thread);
    }
    @Override public void postDelayed(    Runnable thread,    long timeout){
      handler.postDelayed(thread,timeout);
    }
  }
;
switch (type) {
case ARDU_COPTER:
    if (isCompanionComputerEnabled()) {
      Timber.i("String_Node_Str");
      this.drone=new ArduSolo(context,mavClient,dpHandler,dpPrefs,new AndroidApWarningParser(),this,this);
    }
 else {
      Timber.i("String_Node_Str");
      this.drone=new ArduCopter(context,mavClient,dpHandler,dpPrefs,new AndroidApWarningParser(),this,this);
    }
  break;
case ARDU_SOLO:
Timber.i("String_Node_Str");
this.drone=new ArduSolo(context,mavClient,dpHandler,dpPrefs,new AndroidApWarningParser(),this,this);
break;
case ARDU_PLANE:
Timber.i("String_Node_Str");
this.drone=new ArduPlane(context,mavClient,dpHandler,dpPrefs,new AndroidApWarningParser(),this,this);
break;
case ARDU_ROVER:
Timber.i("String_Node_Str");
this.drone=new ArduRover(context,mavClient,dpHandler,dpPrefs,new AndroidApWarningParser(),this,this);
break;
case PX4_NATIVE:
Timber.i("String_Node_Str");
this.drone=new Px4Native(dpHandler,mavClient,new AndroidApWarningParser(),this);
break;
}
this.drone.getStreamRates().setRates(dpPrefs.getRates());
this.followMe=new Follow(this,handler,new FusedLocation(context,handler));
this.returnToMe=new ReturnToMe(this,new FusedLocation(context,handler,LocationRequest.PRIORITY_HIGH_ACCURACY,1000L,1000L,ReturnToMe.UPDATE_MINIMAL_DISPLACEMENT),this);
drone.addDroneListener(this);
drone.getParameters().setParameterListener(this);
drone.getMagnetometerCalibration().setListener(this);
}

Fixed version (ground truth):
public void onVehicleTypeReceived(FirmwareType type){
  if (drone != null) {
    return;
  }
  final DroidPlannerPrefs dpPrefs=new DroidPlannerPrefs(context);
  final DroneInterfaces.Handler dpHandler=new DroneInterfaces.Handler(){
    @Override public void removeCallbacks(    Runnable thread){
      handler.removeCallbacks(thread);
    }
    @Override public void post(    Runnable thread){
      handler.post(thread);
    }
    @Override public void postDelayed(    Runnable thread,    long timeout){
      handler.postDelayed(thread,timeout);
    }
  }
;
switch (type) {
case ARDU_COPTER:
    if (isCompanionComputerEnabled()) {
      Timber.i("String_Node_Str");
      this.drone=new ArduSolo(context,mavClient,dpHandler,dpPrefs,new AndroidApWarningParser(),this,this);
    }
 else {
      Timber.i("String_Node_Str");
      this.drone=new ArduCopter(context,mavClient,dpHandler,dpPrefs,new AndroidApWarningParser(),this,this);
    }
  break;
case ARDU_SOLO:
Timber.i("String_Node_Str");
this.drone=new ArduSolo(context,mavClient,dpHandler,dpPrefs,new AndroidApWarningParser(),this,this);
break;
case ARDU_PLANE:
Timber.i("String_Node_Str");
this.drone=new ArduPlane(context,mavClient,dpHandler,dpPrefs,new AndroidApWarningParser(),this,this);
break;
case ARDU_ROVER:
Timber.i("String_Node_Str");
this.drone=new ArduRover(context,mavClient,dpHandler,dpPrefs,new AndroidApWarningParser(),this,this);
break;
case PX4_NATIVE:
Timber.i("String_Node_Str");
this.drone=new Px4Native(dpHandler,mavClient,new AndroidApWarningParser(),this);
break;
}
this.followMe=new Follow(this,handler,new FusedLocation(context,handler));
this.returnToMe=new ReturnToMe(this,new FusedLocation(context,handler,LocationRequest.PRIORITY_HIGH_ACCURACY,1000L,1000L,ReturnToMe.UPDATE_MINIMAL_DISPLACEMENT),this);
final StreamRates streamRates=drone.getStreamRates();
if (streamRates != null) {
streamRates.setRates(dpPrefs.getRates());
}
drone.addDroneListener(this);
final Parameters parameters=drone.getParameters();
if (parameters != null) {
parameters.setParameterListener(this);
}
final MagnetometerCalibrationImpl magnetometer=drone.getMagnetometerCalibration();
if (magnetometer != null) {
magnetometer.setListener(this);
}
}