Program: 192488
Project: 192488
Buggy source:
@Override public boolean onTouchEvent(MotionEvent ev){
  if (!isEnabled()) {
    return false;
  }
  trackVelocity(ev);
  final int action=ev.getActionMasked();
  if (DEBUG_SCALE)   Log.d(TAG,"String_Node_Str" + MotionEvent.actionToString(action) + "String_Node_Str"+ mExpanding+ (0 != (mExpansionStyle & BLINDS) ? "String_Node_Str" : "String_Node_Str")+ (0 != (mExpansionStyle & PULL) ? "String_Node_Str" : "String_Node_Str")+ (0 != (mExpansionStyle & STRETCH) ? "String_Node_Str" : "String_Node_Str"));
  mSGD.onTouchEvent(ev);
  final int x=(int)mSGD.getFocusX();
  final int y=(int)mSGD.getFocusY();
  if (mOnlyMovements) {
    mLastMotionY=ev.getRawY();
    return false;
  }
switch (action) {
case MotionEvent.ACTION_DOWN:
    mWatchingForPull=mScrollAdapter != null && isInside(mScrollAdapter.getHostView(),x,y);
  mResizedView=findView(x,y);
mInitialTouchY=ev.getY();
break;
case MotionEvent.ACTION_MOVE:
{
if (mWatchingForPull) {
final float yDiff=ev.getRawY() - mInitialTouchY;
if (yDiff > mTouchSlop) {
  if (DEBUG)   Log.v(TAG,"String_Node_Str" + yDiff + "String_Node_Str");
  mWatchingForPull=false;
  if (mResizedView != null && !isFullyExpanded(mResizedView)) {
    if (startExpanding(mResizedView,BLINDS)) {
      mInitialTouchY=ev.getRawY();
      mLastMotionY=ev.getRawY();
      mHasPopped=false;
    }
  }
}
}
if (mExpanding && 0 != (mExpansionStyle & BLINDS)) {
final float rawHeight=ev.getRawY() - mLastMotionY + mCurrentHeight;
final float newHeight=clamp(rawHeight);
boolean isFinished=false;
boolean expanded=false;
if (rawHeight > mNaturalHeight) {
  isFinished=true;
  expanded=true;
}
if (rawHeight < mSmallSize) {
  isFinished=true;
  expanded=false;
}
if (!mHasPopped) {
  if (mEventSource != null) {
    mEventSource.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY);
  }
  mHasPopped=true;
}
mScaler.setHeight(newHeight);
mLastMotionY=ev.getRawY();
if (isFinished) {
  mCallback.expansionStateChanged(false);
}
 else {
  mCallback.expansionStateChanged(true);
}
return true;
}
if (mExpanding) {
updateExpansion();
mLastMotionY=ev.getRawY();
return true;
}
break;
}
case MotionEvent.ACTION_POINTER_UP:
case MotionEvent.ACTION_POINTER_DOWN:
if (DEBUG) Log.d(TAG,"String_Node_Str");
mInitialTouchY+=mSGD.getFocusY() - mLastFocusY;
mInitialTouchSpan+=mSGD.getCurrentSpan() - mLastSpanY;
break;
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL:
if (DEBUG) Log.d(TAG,"String_Node_Str");
finishExpanding(false,getCurrentVelocity());
clearView();
break;
}
mLastMotionY=ev.getRawY();
maybeRecycleVelocityTracker(ev);
return mResizedView != null;
}

Fixed version (ground truth):
@Override public boolean onTouchEvent(MotionEvent ev){
  if (!isEnabled()) {
    return false;
  }
  trackVelocity(ev);
  final int action=ev.getActionMasked();
  if (DEBUG_SCALE)   Log.d(TAG,"String_Node_Str" + MotionEvent.actionToString(action) + "String_Node_Str"+ mExpanding+ (0 != (mExpansionStyle & BLINDS) ? "String_Node_Str" : "String_Node_Str")+ (0 != (mExpansionStyle & PULL) ? "String_Node_Str" : "String_Node_Str")+ (0 != (mExpansionStyle & STRETCH) ? "String_Node_Str" : "String_Node_Str"));
  mSGD.onTouchEvent(ev);
  final int x=(int)mSGD.getFocusX();
  final int y=(int)mSGD.getFocusY();
  if (mOnlyMovements) {
    mLastMotionY=ev.getRawY();
    return false;
  }
switch (action) {
case MotionEvent.ACTION_DOWN:
    mWatchingForPull=mScrollAdapter != null && isInside(mScrollAdapter.getHostView(),x,y);
  mResizedView=findView(x,y);
mInitialTouchX=ev.getX();
mInitialTouchY=ev.getY();
break;
case MotionEvent.ACTION_MOVE:
{
if (mWatchingForPull) {
final float yDiff=ev.getRawY() - mInitialTouchY;
final float xDiff=ev.getRawX() - mInitialTouchX;
if (yDiff > mTouchSlop && yDiff > Math.abs(xDiff)) {
if (DEBUG) Log.v(TAG,"String_Node_Str" + yDiff + "String_Node_Str");
mWatchingForPull=false;
if (mResizedView != null && !isFullyExpanded(mResizedView)) {
  if (startExpanding(mResizedView,BLINDS)) {
    mInitialTouchY=ev.getRawY();
    mLastMotionY=ev.getRawY();
    mHasPopped=false;
  }
}
}
}
if (mExpanding && 0 != (mExpansionStyle & BLINDS)) {
final float rawHeight=ev.getRawY() - mLastMotionY + mCurrentHeight;
final float newHeight=clamp(rawHeight);
boolean isFinished=false;
boolean expanded=false;
if (rawHeight > mNaturalHeight) {
isFinished=true;
expanded=true;
}
if (rawHeight < mSmallSize) {
isFinished=true;
expanded=false;
}
if (!mHasPopped) {
if (mEventSource != null) {
  mEventSource.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY);
}
mHasPopped=true;
}
mScaler.setHeight(newHeight);
mLastMotionY=ev.getRawY();
if (isFinished) {
mCallback.expansionStateChanged(false);
}
 else {
mCallback.expansionStateChanged(true);
}
return true;
}
if (mExpanding) {
updateExpansion();
mLastMotionY=ev.getRawY();
return true;
}
break;
}
case MotionEvent.ACTION_POINTER_UP:
case MotionEvent.ACTION_POINTER_DOWN:
if (DEBUG) Log.d(TAG,"String_Node_Str");
mInitialTouchY+=mSGD.getFocusY() - mLastFocusY;
mInitialTouchSpan+=mSGD.getCurrentSpan() - mLastSpanY;
break;
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL:
if (DEBUG) Log.d(TAG,"String_Node_Str");
finishExpanding(false,getCurrentVelocity());
clearView();
break;
}
mLastMotionY=ev.getRawY();
maybeRecycleVelocityTracker(ev);
return mResizedView != null;
}