Program: 95119
Project: 95119
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_flight);
  fragmentManager=getSupportFragmentManager();
  warningView=(TextView)findViewById(R.id.failsafeTextView);
  mSlidingDrawer=(SlidingDrawer)findViewById(R.id.SlidingDrawerRight);
  mSlidingDrawer.setOnDrawerCloseListener(new SlidingDrawer.OnDrawerCloseListener(){
    @Override public void onDrawerClosed(){
      updateMapPadding();
      GAUtils.sendTiming(new HitBuilders.TimingBuilder().setCategory(GAUtils.Category.FLIGHT_DATA_DETAILS_PANEL.toString()).setVariable(getString(R.string.ga_mode_details_close_panel)).setValue(System.currentTimeMillis()));
    }
  }
);
  mSlidingDrawer.setOnDrawerOpenListener(new SlidingDrawer.OnDrawerOpenListener(){
    @Override public void onDrawerOpened(){
      updateMapPadding();
      GAUtils.sendTiming(new HitBuilders.TimingBuilder().setCategory(GAUtils.Category.FLIGHT_DATA_DETAILS_PANEL.toString()).setVariable(getString(R.string.ga_mode_details_open_panel)).setValue(System.currentTimeMillis()));
    }
  }
);
  setupMapFragment();
  mLocationButtonsContainer=findViewById(R.id.location_button_container);
  mGoToMyLocation=(ImageButton)findViewById(R.id.my_location_button);
  mGoToDroneLocation=(ImageButton)findViewById(R.id.drone_location_button);
  mGoToMyLocation.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      if (mapFragment != null) {
        mapFragment.goToMyLocation();
        updateMapLocationButtons(AutoPanMode.DISABLED);
      }
    }
  }
);
  mGoToMyLocation.setOnLongClickListener(new View.OnLongClickListener(){
    @Override public boolean onLongClick(    View v){
      if (mapFragment != null) {
        mapFragment.goToMyLocation();
        updateMapLocationButtons(AutoPanMode.USER);
        return true;
      }
      return false;
    }
  }
);
  mGoToDroneLocation.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      if (mapFragment != null) {
        mapFragment.goToDroneLocation();
        updateMapLocationButtons(AutoPanMode.DISABLED);
      }
    }
  }
);
  mGoToDroneLocation.setOnLongClickListener(new View.OnLongClickListener(){
    @Override public boolean onLongClick(    View v){
      if (mapFragment != null) {
        mapFragment.goToDroneLocation();
        updateMapLocationButtons(AutoPanMode.DRONE);
        return true;
      }
      return false;
    }
  }
);
  editorTools=fragmentManager.findFragmentById(R.id.editorToolsFragment);
  if (editorTools == null) {
    editorTools=new FlightActionsFragment();
    fragmentManager.beginTransaction().add(R.id.editorToolsFragment,editorTools).commit();
  }
  mTelemetryView=findViewById(R.id.telemetryFragment);
  boolean mIsPhone=mTelemetryView == null;
  if (mIsPhone) {
    Fragment slidingDrawerContent=fragmentManager.findFragmentById(R.id.sliding_drawer_content);
    if (slidingDrawerContent == null) {
      slidingDrawerContent=new FlightSlidingDrawerContent();
      fragmentManager.beginTransaction().add(R.id.sliding_drawer_content,slidingDrawerContent).commit();
    }
  }
 else {
    Fragment telemetryFragment=fragmentManager.findFragmentById(R.id.telemetryFragment);
    if (telemetryFragment == null) {
      telemetryFragment=new TelemetryFragment();
      fragmentManager.beginTransaction().add(R.id.telemetryFragment,telemetryFragment).commit();
    }
    Fragment flightModePanel=fragmentManager.findFragmentById(R.id.sliding_drawer_content);
    if (flightModePanel == null) {
      flightModePanel=new FlightModePanel();
      fragmentManager.beginTransaction().add(R.id.sliding_drawer_content,flightModePanel).commit();
    }
  }
  DroneshareDialog.perhapsShow(this);
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_flight);
  fragmentManager=getSupportFragmentManager();
  warningView=(TextView)findViewById(R.id.failsafeTextView);
  mSlidingDrawer=(SlidingDrawer)findViewById(R.id.SlidingDrawerRight);
  mSlidingDrawer.setOnDrawerCloseListener(new SlidingDrawer.OnDrawerCloseListener(){
    @Override public void onDrawerClosed(){
      updateMapPadding();
      GAUtils.sendTiming(new HitBuilders.TimingBuilder().setCategory(GAUtils.Category.FLIGHT_DATA_DETAILS_PANEL).setVariable(getString(R.string.ga_mode_details_close_panel)).setValue(System.currentTimeMillis()));
    }
  }
);
  mSlidingDrawer.setOnDrawerOpenListener(new SlidingDrawer.OnDrawerOpenListener(){
    @Override public void onDrawerOpened(){
      updateMapPadding();
      GAUtils.sendTiming(new HitBuilders.TimingBuilder().setCategory(GAUtils.Category.FLIGHT_DATA_DETAILS_PANEL).setVariable(getString(R.string.ga_mode_details_open_panel)).setValue(System.currentTimeMillis()));
    }
  }
);
  setupMapFragment();
  mLocationButtonsContainer=findViewById(R.id.location_button_container);
  mGoToMyLocation=(ImageButton)findViewById(R.id.my_location_button);
  mGoToDroneLocation=(ImageButton)findViewById(R.id.drone_location_button);
  mGoToMyLocation.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      if (mapFragment != null) {
        mapFragment.goToMyLocation();
        updateMapLocationButtons(AutoPanMode.DISABLED);
      }
    }
  }
);
  mGoToMyLocation.setOnLongClickListener(new View.OnLongClickListener(){
    @Override public boolean onLongClick(    View v){
      if (mapFragment != null) {
        mapFragment.goToMyLocation();
        updateMapLocationButtons(AutoPanMode.USER);
        return true;
      }
      return false;
    }
  }
);
  mGoToDroneLocation.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      if (mapFragment != null) {
        mapFragment.goToDroneLocation();
        updateMapLocationButtons(AutoPanMode.DISABLED);
      }
    }
  }
);
  mGoToDroneLocation.setOnLongClickListener(new View.OnLongClickListener(){
    @Override public boolean onLongClick(    View v){
      if (mapFragment != null) {
        mapFragment.goToDroneLocation();
        updateMapLocationButtons(AutoPanMode.DRONE);
        return true;
      }
      return false;
    }
  }
);
  editorTools=fragmentManager.findFragmentById(R.id.editorToolsFragment);
  if (editorTools == null) {
    editorTools=new FlightActionsFragment();
    fragmentManager.beginTransaction().add(R.id.editorToolsFragment,editorTools).commit();
  }
  mTelemetryView=findViewById(R.id.telemetryFragment);
  boolean mIsPhone=mTelemetryView == null;
  if (mIsPhone) {
    Fragment slidingDrawerContent=fragmentManager.findFragmentById(R.id.sliding_drawer_content);
    if (slidingDrawerContent == null) {
      slidingDrawerContent=new FlightSlidingDrawerContent();
      fragmentManager.beginTransaction().add(R.id.sliding_drawer_content,slidingDrawerContent).commit();
    }
  }
 else {
    Fragment telemetryFragment=fragmentManager.findFragmentById(R.id.telemetryFragment);
    if (telemetryFragment == null) {
      telemetryFragment=new TelemetryFragment();
      fragmentManager.beginTransaction().add(R.id.telemetryFragment,telemetryFragment).commit();
    }
    Fragment flightModePanel=fragmentManager.findFragmentById(R.id.sliding_drawer_content);
    if (flightModePanel == null) {
      flightModePanel=new FlightModePanel();
      fragmentManager.beginTransaction().add(R.id.sliding_drawer_content,flightModePanel).commit();
    }
  }
  DroneshareDialog.perhapsShow(this);
}