Program: 191859
Project: 191859
Buggy source:
@Override public void onBeginDrag(View v){
  TaskView tv=(TaskView)v;
  tv.setClipViewInStack(false);
  tv.setTouchEnabled(false);
  final ViewParent parent=mSv.getParent();
  if (parent != null) {
    parent.requestDisallowInterceptTouchEvent(true);
  }
  mSv.addIgnoreTask(tv.getTask());
  mCurrentTasks=mSv.getStack().getStackTasks();
  MutableBoolean isFrontMostTask=new MutableBoolean(false);
  Task anchorTask=mSv.findAnchorTask(mCurrentTasks,isFrontMostTask);
  TaskStackLayoutAlgorithm layoutAlgorithm=mSv.getStackAlgorithm();
  TaskStackViewScroller stackScroller=mSv.getScroller();
  if (anchorTask != null) {
    mSv.getCurrentTaskTransforms(mCurrentTasks,mCurrentTaskTransforms);
    float prevAnchorTaskScroll=0;
    boolean pullStackForward=mCurrentTasks.size() > 0;
    if (pullStackForward) {
      prevAnchorTaskScroll=layoutAlgorithm.getStackScrollForTask(anchorTask);
    }
    mSv.updateLayoutAlgorithm(false);
    float newStackScroll=stackScroller.getStackScroll();
    if (isFrontMostTask.value) {
      newStackScroll=stackScroller.getBoundedStackScroll(newStackScroll);
    }
 else     if (pullStackForward) {
      float anchorTaskScroll=layoutAlgorithm.getStackScrollForTaskIgnoreOverrides(anchorTask);
      float stackScrollOffset=(anchorTaskScroll - prevAnchorTaskScroll);
      if (layoutAlgorithm.getFocusState() != TaskStackLayoutAlgorithm.STATE_FOCUSED) {
        stackScrollOffset*=0.75f;
      }
      newStackScroll=stackScroller.getBoundedStackScroll(stackScroller.getStackScroll() + stackScrollOffset);
    }
    mSv.bindVisibleTaskViews(newStackScroll,true);
    mSv.getLayoutTaskTransforms(newStackScroll,TaskStackLayoutAlgorithm.STATE_UNFOCUSED,mCurrentTasks,true,mFinalTaskTransforms);
    mTargetStackScroll=newStackScroll;
  }
}

Fixed version (ground truth):
@Override public void onBeginDrag(View v){
  TaskView tv=(TaskView)v;
  tv.setClipViewInStack(false);
  tv.setTouchEnabled(false);
  final ViewParent parent=mSv.getParent();
  if (parent != null) {
    parent.requestDisallowInterceptTouchEvent(true);
  }
  mSv.addIgnoreTask(tv.getTask());
  mCurrentTasks=new ArrayList<Task>(mSv.getStack().getStackTasks());
  MutableBoolean isFrontMostTask=new MutableBoolean(false);
  Task anchorTask=mSv.findAnchorTask(mCurrentTasks,isFrontMostTask);
  TaskStackLayoutAlgorithm layoutAlgorithm=mSv.getStackAlgorithm();
  TaskStackViewScroller stackScroller=mSv.getScroller();
  if (anchorTask != null) {
    mSv.getCurrentTaskTransforms(mCurrentTasks,mCurrentTaskTransforms);
    float prevAnchorTaskScroll=0;
    boolean pullStackForward=mCurrentTasks.size() > 0;
    if (pullStackForward) {
      prevAnchorTaskScroll=layoutAlgorithm.getStackScrollForTask(anchorTask);
    }
    mSv.updateLayoutAlgorithm(false);
    float newStackScroll=stackScroller.getStackScroll();
    if (isFrontMostTask.value) {
      newStackScroll=stackScroller.getBoundedStackScroll(newStackScroll);
    }
 else     if (pullStackForward) {
      float anchorTaskScroll=layoutAlgorithm.getStackScrollForTaskIgnoreOverrides(anchorTask);
      float stackScrollOffset=(anchorTaskScroll - prevAnchorTaskScroll);
      if (layoutAlgorithm.getFocusState() != TaskStackLayoutAlgorithm.STATE_FOCUSED) {
        stackScrollOffset*=0.75f;
      }
      newStackScroll=stackScroller.getBoundedStackScroll(stackScroller.getStackScroll() + stackScrollOffset);
    }
    mSv.bindVisibleTaskViews(newStackScroll,true);
    mSv.getLayoutTaskTransforms(newStackScroll,TaskStackLayoutAlgorithm.STATE_UNFOCUSED,mCurrentTasks,true,mFinalTaskTransforms);
    mTargetStackScroll=newStackScroll;
  }
}