Program: 1292
Project: 1292
Buggy source:
@Override public boolean onInterceptTouchEvent(MotionEvent ev){
  int action=ev.getAction();
  View v;
  if (mPositionScroller != null) {
    mPositionScroller.stop();
  }
  if (!mIsAttached) {
    return false;
  }
  if (mFastScroller != null && mFastScroller.onInterceptTouchEvent(ev)) {
    return true;
  }
switch (action & MotionEvent.ACTION_MASK) {
case MotionEvent.ACTION_DOWN:
{
      int touchMode=mTouchMode;
      if (touchMode == TOUCH_MODE_OVERFLING || touchMode == TOUCH_MODE_OVERSCROLL) {
        mMotionCorrection=0;
        return true;
      }
      final int x=(int)ev.getX();
      final int y=(int)ev.getY();
      mActivePointerId=ev.getPointerId(0);
      int motionPosition=findMotionRow(y);
      if (touchMode != TOUCH_MODE_FLING && motionPosition >= 0) {
        v=getChildAt(motionPosition - mFirstPosition);
        mMotionViewOriginalTop=v.getTop();
        mMotionX=x;
        mMotionY=y;
        mMotionPosition=motionPosition;
        mTouchMode=TOUCH_MODE_DOWN;
        clearScrollingCache();
      }
      mLastY=Integer.MIN_VALUE;
      initOrResetVelocityTracker();
      mVelocityTracker.addMovement(ev);
      if (touchMode == TOUCH_MODE_FLING) {
        return true;
      }
      break;
    }
case MotionEvent.ACTION_MOVE:
{
switch (mTouchMode) {
case TOUCH_MODE_DOWN:
      int pointerIndex=ev.findPointerIndex(mActivePointerId);
    if (pointerIndex == -1) {
      pointerIndex=0;
      mActivePointerId=ev.getPointerId(pointerIndex);
    }
  final int y=(int)ev.getY(pointerIndex);
initVelocityTrackerIfNotExists();
mVelocityTracker.addMovement(ev);
if (startScrollIfNeeded(y)) {
return true;
}
break;
}
break;
}
case MotionEvent.ACTION_CANCEL:
case MotionEvent.ACTION_UP:
{
mTouchMode=TOUCH_MODE_REST;
mActivePointerId=INVALID_POINTER;
recycleVelocityTracker();
reportScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE);
break;
}
case MotionEvent.ACTION_POINTER_UP:
{
onSecondaryPointerUp(ev);
break;
}
}
return false;
}

Fixed version (ground truth):
@Override public boolean onInterceptTouchEvent(MotionEvent ev){
  int action=ev.getAction();
  View v;
  if (mPositionScroller != null) {
    mPositionScroller.stop();
  }
  if (!isAttachedToWindow()) {
    return false;
  }
  if (mFastScroller != null && mFastScroller.onInterceptTouchEvent(ev)) {
    return true;
  }
switch (action & MotionEvent.ACTION_MASK) {
case MotionEvent.ACTION_DOWN:
{
      int touchMode=mTouchMode;
      if (touchMode == TOUCH_MODE_OVERFLING || touchMode == TOUCH_MODE_OVERSCROLL) {
        mMotionCorrection=0;
        return true;
      }
      final int x=(int)ev.getX();
      final int y=(int)ev.getY();
      mActivePointerId=ev.getPointerId(0);
      int motionPosition=findMotionRow(y);
      if (touchMode != TOUCH_MODE_FLING && motionPosition >= 0) {
        v=getChildAt(motionPosition - mFirstPosition);
        mMotionViewOriginalTop=v.getTop();
        mMotionX=x;
        mMotionY=y;
        mMotionPosition=motionPosition;
        mTouchMode=TOUCH_MODE_DOWN;
        clearScrollingCache();
      }
      mLastY=Integer.MIN_VALUE;
      initOrResetVelocityTracker();
      mVelocityTracker.addMovement(ev);
      if (touchMode == TOUCH_MODE_FLING) {
        return true;
      }
      break;
    }
case MotionEvent.ACTION_MOVE:
{
switch (mTouchMode) {
case TOUCH_MODE_DOWN:
      int pointerIndex=ev.findPointerIndex(mActivePointerId);
    if (pointerIndex == -1) {
      pointerIndex=0;
      mActivePointerId=ev.getPointerId(pointerIndex);
    }
  final int y=(int)ev.getY(pointerIndex);
initVelocityTrackerIfNotExists();
mVelocityTracker.addMovement(ev);
if (startScrollIfNeeded(y)) {
return true;
}
break;
}
break;
}
case MotionEvent.ACTION_CANCEL:
case MotionEvent.ACTION_UP:
{
mTouchMode=TOUCH_MODE_REST;
mActivePointerId=INVALID_POINTER;
recycleVelocityTracker();
reportScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE);
break;
}
case MotionEvent.ACTION_POINTER_UP:
{
onSecondaryPointerUp(ev);
break;
}
}
return false;
}