Program: 95193
Project: 95193
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_flight);
  fragmentManager=getSupportFragmentManager();
  failsafeTextView=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){
      mapFragment.goToMyLocation();
      updateMapLocationButtons(AutoPanMode.DISABLED);
    }
  }
);
  mGoToMyLocation.setOnLongClickListener(new View.OnLongClickListener(){
    @Override public boolean onLongClick(    View v){
      mapFragment.goToMyLocation();
      updateMapLocationButtons(AutoPanMode.USER);
      return true;
    }
  }
);
  mGoToDroneLocation.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      mapFragment.goToDroneLocation();
      updateMapLocationButtons(AutoPanMode.DISABLED);
    }
  }
);
  mGoToDroneLocation.setOnLongClickListener(new View.OnLongClickListener(){
    @Override public boolean onLongClick(    View v){
      mapFragment.goToDroneLocation();
      updateMapLocationButtons(AutoPanMode.DRONE);
      return true;
    }
  }
);
  editorTools=fragmentManager.findFragmentById(R.id.editorToolsFragment);
  if (editorTools == null) {
    editorTools=new FlightActionsFragment();
    fragmentManager.beginTransaction().add(R.id.editorToolsFragment,editorTools).commit();
  }
  View telemetryView=findViewById(R.id.telemetryFragment);
  mIsPhone=telemetryView == 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();
    }
  }
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_flight);
  fragmentManager=getSupportFragmentManager();
  failsafeView=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){
      mapFragment.goToMyLocation();
      updateMapLocationButtons(AutoPanMode.DISABLED);
    }
  }
);
  mGoToMyLocation.setOnLongClickListener(new View.OnLongClickListener(){
    @Override public boolean onLongClick(    View v){
      mapFragment.goToMyLocation();
      updateMapLocationButtons(AutoPanMode.USER);
      return true;
    }
  }
);
  mGoToDroneLocation.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      mapFragment.goToDroneLocation();
      updateMapLocationButtons(AutoPanMode.DISABLED);
    }
  }
);
  mGoToDroneLocation.setOnLongClickListener(new View.OnLongClickListener(){
    @Override public boolean onLongClick(    View v){
      mapFragment.goToDroneLocation();
      updateMapLocationButtons(AutoPanMode.DRONE);
      return true;
    }
  }
);
  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);
  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();
    }
  }
}