Program: 199012
Project: 199012
Buggy source:
/** 
 * This is called with the size of the space not including the top or right insets, or the search bar height in portrait (but including the search bar width in landscape, since we want to draw under it.
 */
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  if (Console.Enabled) {
    Console.log(Constants.Log.UI.MeasureAndLayout,"String_Node_Str","String_Node_Str" + new Rect(left,top,right,bottom),Console.AnsiGreen);
  }
  if (Constants.Log.UI.MeasureAndLayout) {
    Console.log("String_Node_Str" + mStackAlgorithm.mRect);
    Console.log("String_Node_Str" + mStackAlgorithm.mStackRect);
    Console.log("String_Node_Str" + mStackAlgorithm.mStackRectSansPeek);
    Console.log("String_Node_Str" + mStackAlgorithm.mTaskRect);
  }
  int childCount=getChildCount();
  for (int i=0; i < childCount; i++) {
    TaskView t=(TaskView)getChildAt(i);
    t.layout(mStackAlgorithm.mTaskRect.left,mStackAlgorithm.mStackRectSansPeek.top,mStackAlgorithm.mTaskRect.right,mStackAlgorithm.mStackRectSansPeek.top + mStackAlgorithm.mTaskRect.height());
  }
  if (mAwaitingFirstLayout) {
    mAwaitingFirstLayout=false;
    mUIDozeTrigger.startDozing();
    int offsetTopAlign=-mStackAlgorithm.mTaskRect.top;
    int offscreenY=mStackAlgorithm.mRect.bottom - (mStackAlgorithm.mTaskRect.top - mStackAlgorithm.mRect.top);
    for (int i=childCount - 1; i >= 0; i--) {
      TaskView tv=(TaskView)getChildAt(i);
      tv.prepareEnterRecentsAnimation((i == (getChildCount() - 1)),offsetTopAlign,offscreenY,mStackAlgorithm.mTaskRect);
    }
    if (mStartEnterAnimationRequestedAfterLayout) {
      startEnterRecentsAnimation(mStartEnterAnimationContext);
      mStartEnterAnimationRequestedAfterLayout=false;
      mStartEnterAnimationContext=null;
    }
    if (mConfig.launchedWithAltTab) {
      focusTask(Math.max(0,mStack.getTaskCount() - 2),false);
    }
  }
}

Fixed version (ground truth):
/** 
 * This is called with the size of the space not including the top or right insets, or the search bar height in portrait (but including the search bar width in landscape, since we want to draw under it.
 */
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  if (Console.Enabled) {
    Console.log(Constants.Log.UI.MeasureAndLayout,"String_Node_Str","String_Node_Str" + new Rect(left,top,right,bottom),Console.AnsiGreen);
  }
  if (Constants.Log.UI.MeasureAndLayout) {
    Console.log("String_Node_Str" + mStackAlgorithm.mRect);
    Console.log("String_Node_Str" + mStackAlgorithm.mStackRect);
    Console.log("String_Node_Str" + mStackAlgorithm.mStackRectSansPeek);
    Console.log("String_Node_Str" + mStackAlgorithm.mTaskRect);
  }
  int childCount=getChildCount();
  for (int i=0; i < childCount; i++) {
    TaskView t=(TaskView)getChildAt(i);
    t.layout(mStackAlgorithm.mTaskRect.left,mStackAlgorithm.mStackRectSansPeek.top,mStackAlgorithm.mTaskRect.right,mStackAlgorithm.mStackRectSansPeek.top + mStackAlgorithm.mTaskRect.height());
  }
  if (mAwaitingFirstLayout) {
    mAwaitingFirstLayout=false;
    int offsetTopAlign=-mStackAlgorithm.mTaskRect.top;
    int offscreenY=mStackAlgorithm.mRect.bottom - (mStackAlgorithm.mTaskRect.top - mStackAlgorithm.mRect.top);
    for (int i=childCount - 1; i >= 0; i--) {
      TaskView tv=(TaskView)getChildAt(i);
      tv.prepareEnterRecentsAnimation((i == (getChildCount() - 1)),offsetTopAlign,offscreenY,mStackAlgorithm.mTaskRect);
    }
    if (mStartEnterAnimationRequestedAfterLayout) {
      startEnterRecentsAnimation(mStartEnterAnimationContext);
      mStartEnterAnimationRequestedAfterLayout=false;
      mStartEnterAnimationContext=null;
    }
    if (mConfig.launchedWithAltTab) {
      focusTask(Math.max(0,mStack.getTaskCount() - 2),false);
    }
 else {
      focusTask(Math.max(0,mStack.getTaskCount() - 1),false);
    }
  }
}