Program: 192864
Project: 192864
Buggy source:
public TaskStackView(Context context,TaskStack stack){
  super(context);
  SystemServicesProxy ssp=Recents.getSystemServices();
  Resources res=context.getResources();
  setStack(stack);
  mViewPool=new ViewPool<>(context,this);
  mInflater=LayoutInflater.from(context);
  mLayoutAlgorithm=new TaskStackLayoutAlgorithm(context);
  mStackScroller=new TaskStackViewScroller(context,mLayoutAlgorithm);
  mStackScroller.setCallbacks(this);
  mTouchHandler=new TaskStackViewTouchHandler(context,this,mStackScroller);
  mAnimationHelper=new TaskStackAnimationHelper(context,this);
  mFastOutSlowInInterpolator=AnimationUtils.loadInterpolator(context,com.android.internal.R.interpolator.fast_out_slow_in);
  mTaskCornerRadiusPx=res.getDimensionPixelSize(R.dimen.recents_task_view_rounded_corners_radius);
  mDividerSize=ssp.getDockedDividerSize(context);
  int taskBarDismissDozeDelaySeconds=getResources().getInteger(R.integer.recents_task_bar_dismiss_delay_seconds);
  mUIDozeTrigger=new DozeTrigger(taskBarDismissDozeDelaySeconds,new Runnable(){
    @Override public void run(){
      List<TaskView> taskViews=getTaskViews();
      int taskViewCount=taskViews.size();
      for (int i=0; i < taskViewCount; i++) {
        TaskView tv=taskViews.get(i);
        tv.startNoUserInteractionAnimation();
      }
    }
  }
);
  setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
  mFreeformWorkspaceBackground=(GradientDrawable)getContext().getDrawable(R.drawable.recents_freeform_workspace_bg);
  mFreeformWorkspaceBackground.setCallback(this);
  if (ssp.hasFreeformWorkspaceSupport()) {
    mFreeformWorkspaceBackground.setColor(getContext().getColor(R.color.recents_freeform_workspace_bg_color));
  }
}

Fixed version (ground truth):
public TaskStackView(Context context,TaskStack stack){
  super(context);
  SystemServicesProxy ssp=Recents.getSystemServices();
  Resources res=context.getResources();
  setStack(stack);
  mViewPool=new ViewPool<>(context,this);
  mInflater=LayoutInflater.from(context);
  mLayoutAlgorithm=new TaskStackLayoutAlgorithm(context,this);
  mStackScroller=new TaskStackViewScroller(context,this,mLayoutAlgorithm);
  mTouchHandler=new TaskStackViewTouchHandler(context,this,mStackScroller);
  mAnimationHelper=new TaskStackAnimationHelper(context,this);
  mFastOutSlowInInterpolator=AnimationUtils.loadInterpolator(context,com.android.internal.R.interpolator.fast_out_slow_in);
  mTaskCornerRadiusPx=res.getDimensionPixelSize(R.dimen.recents_task_view_rounded_corners_radius);
  mDividerSize=ssp.getDockedDividerSize(context);
  int taskBarDismissDozeDelaySeconds=getResources().getInteger(R.integer.recents_task_bar_dismiss_delay_seconds);
  mUIDozeTrigger=new DozeTrigger(taskBarDismissDozeDelaySeconds,new Runnable(){
    @Override public void run(){
      List<TaskView> taskViews=getTaskViews();
      int taskViewCount=taskViews.size();
      for (int i=0; i < taskViewCount; i++) {
        TaskView tv=taskViews.get(i);
        tv.startNoUserInteractionAnimation();
      }
    }
  }
);
  setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
  mFreeformWorkspaceBackground=(GradientDrawable)getContext().getDrawable(R.drawable.recents_freeform_workspace_bg);
  mFreeformWorkspaceBackground.setCallback(this);
  if (ssp.hasFreeformWorkspaceSupport()) {
    mFreeformWorkspaceBackground.setColor(getContext().getColor(R.color.recents_freeform_workspace_bg_color));
  }
}