Program: 198994
Project: 198994
Buggy source:
@Override public void handleMessage(Message msg){
  if (Console.Enabled) {
    Console.log(Constants.Log.App.SystemUIHandshake,"String_Node_Str",msg);
  }
  Context context=mContext.get();
  if (context == null)   return;
  if (msg.what == AlternateRecentsComponent.MSG_UPDATE_FOR_CONFIGURATION) {
    RecentsTaskLoader.initialize(context);
    RecentsConfiguration config=RecentsConfiguration.reinitialize(context);
    config.updateOnConfigurationChange();
    try {
      Bundle data=msg.getData();
      Rect windowRect=data.getParcelable(AlternateRecentsComponent.KEY_WINDOW_RECT);
      Rect systemInsets=data.getParcelable(AlternateRecentsComponent.KEY_SYSTEM_INSETS);
      TaskStack stack=new TaskStack(context);
      TaskStackView tsv=new TaskStackView(context,stack);
      TaskStackViewLayoutAlgorithm algo=tsv.getStackAlgorithm();
      Bundle replyData=new Bundle();
      TaskViewTransform transform;
      Rect taskStackBounds=new Rect();
      config.getTaskStackBounds(windowRect.width(),windowRect.height(),taskStackBounds);
      stack.addTask(new Task());
      tsv.computeRects(taskStackBounds.width(),taskStackBounds.height() - systemInsets.top - systemInsets.bottom,0,0);
      tsv.setStackScrollToInitialState();
      transform=algo.getStackTransform(0,tsv.getStackScroll());
      transform.rect.offset(taskStackBounds.left,taskStackBounds.top);
      replyData.putParcelable(AlternateRecentsComponent.KEY_SINGLE_TASK_STACK_RECT,new Rect(transform.rect));
      stack.addTask(new Task());
      tsv.computeRects(taskStackBounds.width(),taskStackBounds.height() - systemInsets.top - systemInsets.bottom,0,0);
      tsv.setStackScrollToInitialState();
      transform=algo.getStackTransform(1,tsv.getStackScroll());
      transform.rect.offset(taskStackBounds.left,taskStackBounds.top);
      replyData.putParcelable(AlternateRecentsComponent.KEY_TWO_TASK_STACK_RECT,new Rect(transform.rect));
      stack.addTask(new Task());
      tsv.computeRects(taskStackBounds.width(),taskStackBounds.height() - systemInsets.top - systemInsets.bottom,0,0);
      tsv.setStackScrollToInitialState();
      transform=algo.getStackTransform(2,tsv.getStackScroll());
      transform.rect.offset(taskStackBounds.left,taskStackBounds.top);
      replyData.putParcelable(AlternateRecentsComponent.KEY_MULTIPLE_TASK_STACK_RECT,new Rect(transform.rect));
      data.putParcelable(AlternateRecentsComponent.KEY_CONFIGURATION_DATA,replyData);
      Message reply=Message.obtain(null,AlternateRecentsComponent.MSG_UPDATE_FOR_CONFIGURATION,0,0);
      reply.setData(data);
      msg.replyTo.send(reply);
    }
 catch (    RemoteException re) {
      re.printStackTrace();
    }
  }
 else   if (msg.what == AlternateRecentsComponent.MSG_HIDE_RECENTS) {
    Intent intent=new Intent(RecentsService.ACTION_HIDE_RECENTS_ACTIVITY);
    intent.setPackage(context.getPackageName());
    intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
    if (msg.arg1 != 0) {
      intent.putExtra(RecentsService.EXTRA_TRIGGERED_FROM_ALT_TAB,true);
    }
    context.sendBroadcast(intent);
  }
 else   if (msg.what == AlternateRecentsComponent.MSG_TOGGLE_RECENTS) {
    Intent intent=new Intent(RecentsService.ACTION_TOGGLE_RECENTS_ACTIVITY);
    intent.setPackage(context.getPackageName());
    intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
    context.sendBroadcast(intent);
    if (Console.Enabled) {
      Console.logTraceTime(Constants.Log.App.TimeRecentsStartup,Constants.Log.App.TimeRecentsStartupKey,"String_Node_Str");
      Console.logTraceTime(Constants.Log.App.TimeRecentsLaunchTask,Constants.Log.App.TimeRecentsLaunchKey,"String_Node_Str");
    }
  }
 else   if (msg.what == AlternateRecentsComponent.MSG_START_ENTER_ANIMATION) {
    Intent intent=new Intent(RecentsService.ACTION_START_ENTER_ANIMATION);
    intent.setPackage(context.getPackageName());
    intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
    context.sendBroadcast(intent);
  }
}

Fixed version (ground truth):
@Override public void handleMessage(Message msg){
  if (Console.Enabled) {
    Console.log(Constants.Log.App.SystemUIHandshake,"String_Node_Str",msg);
  }
  Context context=mContext.get();
  if (context == null)   return;
  if (msg.what == AlternateRecentsComponent.MSG_UPDATE_FOR_CONFIGURATION) {
    RecentsTaskLoader.initialize(context);
    RecentsConfiguration config=RecentsConfiguration.reinitialize(context);
    config.updateOnConfigurationChange();
    try {
      Bundle data=msg.getData();
      Rect windowRect=data.getParcelable(AlternateRecentsComponent.KEY_WINDOW_RECT);
      Rect systemInsets=data.getParcelable(AlternateRecentsComponent.KEY_SYSTEM_INSETS);
      TaskStack stack=new TaskStack();
      TaskStackView tsv=new TaskStackView(context,stack);
      TaskStackViewLayoutAlgorithm algo=tsv.getStackAlgorithm();
      Bundle replyData=new Bundle();
      TaskViewTransform transform;
      Rect taskStackBounds=new Rect();
      config.getTaskStackBounds(windowRect.width(),windowRect.height(),taskStackBounds);
      stack.addTask(new Task());
      tsv.computeRects(taskStackBounds.width(),taskStackBounds.height() - systemInsets.top - systemInsets.bottom,0,0);
      tsv.setStackScrollToInitialState();
      transform=algo.getStackTransform(0,tsv.getStackScroll());
      transform.rect.offset(taskStackBounds.left,taskStackBounds.top);
      replyData.putParcelable(AlternateRecentsComponent.KEY_SINGLE_TASK_STACK_RECT,new Rect(transform.rect));
      stack.addTask(new Task());
      tsv.computeRects(taskStackBounds.width(),taskStackBounds.height() - systemInsets.top - systemInsets.bottom,0,0);
      tsv.setStackScrollToInitialState();
      transform=algo.getStackTransform(1,tsv.getStackScroll());
      transform.rect.offset(taskStackBounds.left,taskStackBounds.top);
      replyData.putParcelable(AlternateRecentsComponent.KEY_TWO_TASK_STACK_RECT,new Rect(transform.rect));
      stack.addTask(new Task());
      tsv.computeRects(taskStackBounds.width(),taskStackBounds.height() - systemInsets.top - systemInsets.bottom,0,0);
      tsv.setStackScrollToInitialState();
      transform=algo.getStackTransform(2,tsv.getStackScroll());
      transform.rect.offset(taskStackBounds.left,taskStackBounds.top);
      replyData.putParcelable(AlternateRecentsComponent.KEY_MULTIPLE_TASK_STACK_RECT,new Rect(transform.rect));
      data.putParcelable(AlternateRecentsComponent.KEY_CONFIGURATION_DATA,replyData);
      Message reply=Message.obtain(null,AlternateRecentsComponent.MSG_UPDATE_FOR_CONFIGURATION,0,0);
      reply.setData(data);
      msg.replyTo.send(reply);
    }
 catch (    RemoteException re) {
      re.printStackTrace();
    }
  }
 else   if (msg.what == AlternateRecentsComponent.MSG_HIDE_RECENTS) {
    Intent intent=new Intent(RecentsService.ACTION_HIDE_RECENTS_ACTIVITY);
    intent.setPackage(context.getPackageName());
    intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
    if (msg.arg1 != 0) {
      intent.putExtra(RecentsService.EXTRA_TRIGGERED_FROM_ALT_TAB,true);
    }
    context.sendBroadcast(intent);
  }
 else   if (msg.what == AlternateRecentsComponent.MSG_TOGGLE_RECENTS) {
    Intent intent=new Intent(RecentsService.ACTION_TOGGLE_RECENTS_ACTIVITY);
    intent.setPackage(context.getPackageName());
    intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
    context.sendBroadcast(intent);
    if (Console.Enabled) {
      Console.logTraceTime(Constants.Log.App.TimeRecentsStartup,Constants.Log.App.TimeRecentsStartupKey,"String_Node_Str");
      Console.logTraceTime(Constants.Log.App.TimeRecentsLaunchTask,Constants.Log.App.TimeRecentsLaunchKey,"String_Node_Str");
    }
  }
 else   if (msg.what == AlternateRecentsComponent.MSG_START_ENTER_ANIMATION) {
    Intent intent=new Intent(RecentsService.ACTION_START_ENTER_ANIMATION);
    intent.setPackage(context.getPackageName());
    intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
    context.sendBroadcast(intent);
  }
}