Program: 193099
Project: 193099
Buggy source:
/** 
 * Called with the activity is first created. 
 */
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  mFinishedOnStartup=false;
  SystemServicesProxy ssp=Recents.getSystemServices();
  if (ssp == null) {
    mFinishedOnStartup=true;
    finish();
    return;
  }
  EventBus.getDefault().register(this,EVENT_BUS_PRIORITY);
  if (!RecentsDebugFlags.Static.DisableSearchBar) {
    mAppWidgetHost=new RecentsAppWidgetHost(this,RecentsAppWidgetHost.HOST_ID);
  }
  mPackageMonitor=new RecentsPackageMonitor();
  mPackageMonitor.register(this);
  setContentView(R.layout.recents);
  mRecentsView=(RecentsView)findViewById(R.id.recents_view);
  mRecentsView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
  mHistoryViewStub=(ViewStub)findViewById(R.id.history_view_stub);
  mScrimViews=new SystemBarScrimViews(this);
  getWindow().getAttributes().privateFlags|=WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY;
  Intent homeIntent=new Intent(Intent.ACTION_MAIN,null);
  homeIntent.addCategory(Intent.CATEGORY_HOME);
  homeIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
  mFinishLaunchHomeRunnable=new FinishRecentsRunnable(homeIntent);
  if (!RecentsDebugFlags.Static.DisableSearchBar) {
    mSearchWidgetInfo=ssp.getOrBindSearchAppWidget(this,mAppWidgetHost);
  }
  IntentFilter filter=new IntentFilter();
  filter.addAction(Intent.ACTION_SCREEN_OFF);
  if (!RecentsDebugFlags.Static.DisableSearchBar) {
    filter.addAction(SearchManager.INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED);
  }
  registerReceiver(mSystemBroadcastReceiver,filter);
}

Fixed version (ground truth):
/** 
 * Called with the activity is first created. 
 */
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  mFinishedOnStartup=false;
  SystemServicesProxy ssp=Recents.getSystemServices();
  if (ssp == null) {
    mFinishedOnStartup=true;
    finish();
    return;
  }
  EventBus.getDefault().register(this,EVENT_BUS_PRIORITY);
  if (RecentsDebugFlags.Static.EnableSearchBar) {
    mAppWidgetHost=new RecentsAppWidgetHost(this,RecentsAppWidgetHost.HOST_ID);
  }
  mPackageMonitor=new RecentsPackageMonitor();
  mPackageMonitor.register(this);
  setContentView(R.layout.recents);
  mRecentsView=(RecentsView)findViewById(R.id.recents_view);
  mRecentsView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
  mHistoryViewStub=(ViewStub)findViewById(R.id.history_view_stub);
  mScrimViews=new SystemBarScrimViews(this);
  getWindow().getAttributes().privateFlags|=WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY;
  Intent homeIntent=new Intent(Intent.ACTION_MAIN,null);
  homeIntent.addCategory(Intent.CATEGORY_HOME);
  homeIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
  mFinishLaunchHomeRunnable=new FinishRecentsRunnable(homeIntent);
  if (RecentsDebugFlags.Static.EnableSearchBar) {
    mSearchWidgetInfo=ssp.getOrBindSearchAppWidget(this,mAppWidgetHost);
  }
  IntentFilter filter=new IntentFilter();
  filter.addAction(Intent.ACTION_SCREEN_OFF);
  if (RecentsDebugFlags.Static.EnableSearchBar) {
    filter.addAction(SearchManager.INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED);
  }
  registerReceiver(mSystemBroadcastReceiver,filter);
}