Program: 191048
Project: 191048
Buggy source:
@Override public void start(){
  sDebugFlags=new RecentsDebugFlags(mContext);
  sSystemServicesProxy=SystemServicesProxy.getInstance(mContext);
  sTaskLoader=new RecentsTaskLoader(mContext);
  sConfiguration=new RecentsConfiguration(mContext);
  UiModeManager uiModeManager=(UiModeManager)mContext.getSystemService(Context.UI_MODE_SERVICE);
  if (uiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_TELEVISION) {
    mImpl=new RecentsTvImpl(mContext);
  }
 else {
    mImpl=new RecentsImpl(mContext);
  }
  if ("String_Node_Str".equals(Build.TYPE) || "String_Node_Str".equals(Build.TYPE)) {
    String cnStr=SystemProperties.get(RECENTS_OVERRIDE_SYSPROP_KEY);
    if (!cnStr.isEmpty()) {
      mOverrideRecentsPackageName=cnStr;
    }
  }
  EventBus.getDefault().register(this,EVENT_BUS_PRIORITY);
  EventBus.getDefault().register(sSystemServicesProxy,EVENT_BUS_PRIORITY);
  EventBus.getDefault().register(sTaskLoader,EVENT_BUS_PRIORITY);
  final int processUser=sSystemServicesProxy.getProcessUser();
  if (sSystemServicesProxy.isSystemUser(processUser)) {
    mSystemToUserCallbacks=new RecentsSystemUser(mContext,mImpl);
    IntentFilter filter=new IntentFilter();
    filter.addAction(Intent.ACTION_USER_UNLOCKED);
    mContext.registerReceiverAsUser(mSystemUserUnlockedReceiver,UserHandle.SYSTEM,filter,null,null);
  }
 else {
    registerWithSystemUser();
  }
  putComponent(Recents.class,this);
}

Fixed version (ground truth):
@Override public void start(){
  sDebugFlags=new RecentsDebugFlags(mContext);
  sSystemServicesProxy=SystemServicesProxy.getInstance(mContext);
  sTaskLoader=new RecentsTaskLoader(mContext);
  sConfiguration=new RecentsConfiguration(mContext);
  UiModeManager uiModeManager=(UiModeManager)mContext.getSystemService(Context.UI_MODE_SERVICE);
  if (uiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_TELEVISION) {
    mImpl=new RecentsTvImpl(mContext);
  }
 else {
    mImpl=new RecentsImpl(mContext);
  }
  if ("String_Node_Str".equals(Build.TYPE) || "String_Node_Str".equals(Build.TYPE)) {
    String cnStr=SystemProperties.get(RECENTS_OVERRIDE_SYSPROP_KEY);
    if (!cnStr.isEmpty()) {
      mOverrideRecentsPackageName=cnStr;
    }
  }
  EventBus.getDefault().register(this,EVENT_BUS_PRIORITY);
  EventBus.getDefault().register(sSystemServicesProxy,EVENT_BUS_PRIORITY);
  EventBus.getDefault().register(sTaskLoader,EVENT_BUS_PRIORITY);
  final int processUser=sSystemServicesProxy.getProcessUser();
  if (sSystemServicesProxy.isSystemUser(processUser)) {
    mSystemToUserCallbacks=new RecentsSystemUser(mContext,mImpl);
    IntentFilter filter=new IntentFilter();
    filter.addAction(Intent.ACTION_USER_UNLOCKED);
    mContext.registerReceiverAsUser(mSystemUserUnlockedReceiver,UserHandle.SYSTEM,filter,null,null);
  }
 else {
    registerWithSystemUser();
  }
  putComponent(Recents.class,this);
  long lastVisibleTaskActiveTime=Prefs.getLong(mContext,Prefs.Key.OVERVIEW_LAST_STACK_TASK_ACTIVE_TIME,-1);
  if (lastVisibleTaskActiveTime != -1) {
    long uptime=SystemClock.elapsedRealtime();
    Settings.Secure.putLongForUser(mContext.getContentResolver(),Settings.Secure.OVERVIEW_LAST_VISIBLE_TASK_ACTIVE_UPTIME,uptime - Math.max(0,System.currentTimeMillis() - lastVisibleTaskActiveTime),processUser);
    Prefs.remove(mContext,Prefs.Key.OVERVIEW_LAST_STACK_TASK_ACTIVE_TIME);
  }
}