Program: 20460
Project: 20460
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  boardLoadable=new Loadable();
  threadLoadable=new Loadable();
  boardFragment=ThreadFragment.newInstance(this);
  threadFragment=ThreadFragment.newInstance(this);
  FragmentTransaction ft=getFragmentManager().beginTransaction();
  ft.replace(R.id.left_pane,boardFragment);
  ft.replace(R.id.right_pane,threadFragment);
  ft.commitAllowingStateLoss();
  final ActionBar actionBar=getActionBar();
  boardSpinner=new Spinner(actionBar.getThemedContext());
  boardSpinner.setAdapter(new BoardSpinnerAdapter(this));
  boardSpinner.setOnItemSelectedListener(this);
  actionBar.setCustomView(boardSpinner);
  actionBar.setDisplayShowCustomEnabled(true);
  updatePaneState();
  updateActionBarState();
  Intent startIntent=getIntent();
  Uri startUri=startIntent.getData();
  if (savedInstanceState != null) {
    threadLoadable.readFromBundle(this,"String_Node_Str",savedInstanceState);
    startLoadingThread(threadLoadable);
    Loadable tmp=new Loadable();
    tmp.readFromBundle(this,"String_Node_Str",savedInstanceState);
    loadBoard(tmp.board);
  }
 else {
    if (startUri != null) {
      handleIntentURI(startUri);
    }
    if (boardLoadable.mode == Loadable.Mode.INVALID) {
      List<String> savedValues=ChanApplication.getBoardManager().getSavedValues();
      if (savedValues.size() > 0) {
        loadBoard(savedValues.get(0));
      }
    }
  }
  Bundle extras=startIntent.getExtras();
  if (extras != null) {
    int pinId=extras.getInt("String_Node_Str",-2);
    if (pinId != -2) {
      if (pinId == -1) {
        pinDrawer.openDrawer(pinDrawerView);
      }
 else {
        Pin pin=ChanApplication.getPinnedManager().findPinById(pinId);
        if (pin != null) {
          startLoadingThread(pin.loadable);
        }
      }
    }
  }
  ignoreNextOnItemSelected=true;
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  boardLoadable=new Loadable();
  threadLoadable=new Loadable();
  boardFragment=ThreadFragment.newInstance(this);
  threadFragment=ThreadFragment.newInstance(this);
  FragmentTransaction ft=getFragmentManager().beginTransaction();
  ft.replace(R.id.left_pane,boardFragment);
  ft.replace(R.id.right_pane,threadFragment);
  ft.commitAllowingStateLoss();
  final ActionBar actionBar=getActionBar();
  boardSpinner=new Spinner(actionBar.getThemedContext());
  boardSpinner.setAdapter(new BoardSpinnerAdapter(this));
  boardSpinner.setOnItemSelectedListener(this);
  actionBar.setCustomView(boardSpinner);
  actionBar.setDisplayShowCustomEnabled(true);
  updatePaneState();
  Intent startIntent=getIntent();
  Uri startUri=startIntent.getData();
  if (savedInstanceState != null) {
    threadLoadable.readFromBundle(this,"String_Node_Str",savedInstanceState);
    startLoadingThread(threadLoadable);
    Loadable tmp=new Loadable();
    tmp.readFromBundle(this,"String_Node_Str",savedInstanceState);
    loadBoard(tmp.board);
  }
 else {
    if (startUri != null) {
      handleIntentURI(startUri);
    }
    if (boardLoadable.mode == Loadable.Mode.INVALID) {
      List<String> savedValues=ChanApplication.getBoardManager().getSavedValues();
      if (savedValues.size() > 0) {
        loadBoard(savedValues.get(0));
      }
    }
  }
  Bundle extras=startIntent.getExtras();
  if (extras != null) {
    int pinId=extras.getInt("String_Node_Str",-2);
    if (pinId != -2) {
      if (pinId == -1) {
        pinDrawer.openDrawer(pinDrawerView);
      }
 else {
        Pin pin=ChanApplication.getPinnedManager().findPinById(pinId);
        if (pin != null) {
          startLoadingThread(pin.loadable);
        }
      }
    }
  }
  ignoreNextOnItemSelected=true;
}