Program: 33471
Project: 33471
Buggy source:
@Override public boolean onInterceptTouchEvent(MotionEvent ev){
  if (DEBUG)   Log.d(TAG,"String_Node_Str" + ev);
  ensureTarget();
  boolean handled=false;
  float curY=ev.getY();
  if (mInReturningAnimation && !isKeepTopRefreshingHead() && ev.getAction() == MotionEvent.ACTION_DOWN) {
    mInReturningAnimation=false;
  }
  if (!isEnabled()) {
    return false;
  }
  if (ev.getAction() == MotionEvent.ACTION_DOWN) {
    mCurrPercentage=0;
    mDownEvent=MotionEvent.obtain(ev);
    mPrevY=mDownEvent.getY();
    mCheckValidMotionFlag=true;
    checkHorizontalMove=true;
  }
 else   if (ev.getAction() == MotionEvent.ACTION_MOVE) {
    float yDiff=curY - mDownEvent.getY();
    if (yDiff < 0)     yDiff=-yDiff;
    if (enableHorizontalScroll) {
      MotionEvent event=MotionEvent.obtain(ev);
      int horizontalScrollDirection=ev.getX() > mDownEvent.getX() ? -1 : 1;
      float xDiff=Math.abs(ev.getX() - mDownEvent.getX());
      if (isHorizontalScroll) {
        if (DEBUG)         Log.d(TAG,"String_Node_Str");
        mPrevY=curY;
        checkHorizontalMove=false;
        return false;
      }
 else       if (xDiff <= mTouchSlop) {
        checkHorizontalMove=true;
      }
 else       if (canViewScrollHorizontally(mTarget,event,horizontalScrollDirection) && checkHorizontalMove && xDiff > 2 * yDiff) {
        if (DEBUG)         Log.d(TAG,"String_Node_Str");
        mPrevY=curY;
        isHorizontalScroll=true;
        checkHorizontalMove=false;
        return false;
      }
 else {
        checkHorizontalMove=false;
      }
    }
    if (yDiff < mTouchSlop) {
      mPrevY=curY;
      return false;
    }
  }
 else   if (ev.getAction() == MotionEvent.ACTION_UP) {
    if (enableHorizontalScroll && isHorizontalScroll) {
      if (DEBUG)       Log.d(TAG,"String_Node_Str");
      isHorizontalScroll=false;
      mPrevY=ev.getY();
      return false;
    }
 else     if (curY - mDownEvent.getY() < mTouchSlop) {
      mPrevY=ev.getY();
      return false;
    }
  }
  MotionEvent event=MotionEvent.obtain(ev);
  if (!mInReturningAnimation && !canViewScrollUp(mTarget,event)) {
    handled=onTouchEvent(ev);
    if (DEBUG)     Log.d(TAG,"String_Node_Str" + handled);
  }
 else {
    mPrevY=ev.getY();
  }
  boolean ret=!handled ? super.onInterceptTouchEvent(ev) : handled;
  if (DEBUG)   Log.d(TAG,"String_Node_Str" + ret);
  return ret;
}

Fixed version (ground truth):
@Override public boolean onInterceptTouchEvent(MotionEvent ev){
  if (DEBUG)   Log.d(TAG,"String_Node_Str" + ev);
  ensureTarget();
  boolean handled=false;
  float curY=ev.getY();
  if (mInReturningAnimation && !isKeepTopRefreshingHead() && ev.getAction() == MotionEvent.ACTION_DOWN) {
    mInReturningAnimation=false;
  }
  if (!isEnabled()) {
    return false;
  }
  if (ev.getAction() == MotionEvent.ACTION_DOWN) {
    mCurrPercentage=0;
    mDownEvent=MotionEvent.obtain(ev);
    mPrevY=mDownEvent.getY();
    mCheckValidMotionFlag=true;
    checkHorizontalMove=true;
  }
 else   if (ev.getAction() == MotionEvent.ACTION_MOVE) {
    float yDiff=Math.abs(curY - mDownEvent.getY());
    if (enableHorizontalScroll) {
      MotionEvent event=MotionEvent.obtain(ev);
      int horizontalScrollDirection=ev.getX() > mDownEvent.getX() ? -1 : 1;
      float xDiff=Math.abs(ev.getX() - mDownEvent.getX());
      if (isHorizontalScroll) {
        if (DEBUG)         Log.d(TAG,"String_Node_Str");
        mPrevY=curY;
        checkHorizontalMove=false;
        return false;
      }
 else       if (xDiff <= mTouchSlop) {
        checkHorizontalMove=true;
      }
 else       if (canViewScrollHorizontally(mTarget,event,horizontalScrollDirection) && checkHorizontalMove && xDiff > 2 * yDiff) {
        if (DEBUG)         Log.d(TAG,"String_Node_Str");
        mPrevY=curY;
        isHorizontalScroll=true;
        checkHorizontalMove=false;
        return false;
      }
 else {
        checkHorizontalMove=false;
      }
    }
    if (yDiff < mTouchSlop) {
      mPrevY=curY;
      return false;
    }
  }
 else   if (ev.getAction() == MotionEvent.ACTION_UP) {
    float yDiff=Math.abs(curY - mDownEvent.getY());
    if (enableHorizontalScroll && isHorizontalScroll) {
      if (DEBUG)       Log.d(TAG,"String_Node_Str");
      isHorizontalScroll=false;
      mPrevY=ev.getY();
      return false;
    }
 else     if (yDiff < mTouchSlop) {
      mPrevY=curY;
      return false;
    }
  }
  MotionEvent event=MotionEvent.obtain(ev);
  if (!mInReturningAnimation && !canViewScrollUp(mTarget,event)) {
    handled=onTouchEvent(ev);
    if (DEBUG)     Log.d(TAG,"String_Node_Str" + handled);
  }
 else {
    mPrevY=ev.getY();
  }
  boolean ret=!handled ? super.onInterceptTouchEvent(ev) : handled;
  if (DEBUG)   Log.d(TAG,"String_Node_Str" + ret);
  return ret;
}