Program: 52645
Project: 52645
Buggy source:
/** 
 * Animate the fling of the given   {@link View} at position <code>pos</code> and calls the onFling handler when the animation has finished.
 * @param v The  {@link View} to fling.
 * @param pos The position of the element in ListView.
 * @param velocity The velocity to use. The harder you fling the faster the animation will be.
 */
@TargetApi(14) private void animateFling(final View v,final int pos,float velocity){
  if (android.os.Build.VERSION.SDK_INT >= 14 && v != null) {
    int parentWidth=((View)v.getParent()).getWidth();
    if (parentWidth > v.getTranslationX()) {
      v.animate().alpha(0).translationX(parentWidth).setDuration((long)((parentWidth - v.getTranslationX()) / velocity)).setListener(new AnimatorListener(){
        @Override public void onAnimationStart(        Animator animation){
        }
        @Override public void onAnimationRepeat(        Animator animation){
        }
        @Override public void onAnimationEnd(        Animator animation){
          if (mListener != null) {
            if (!mListener.onFling(mListView,pos)) {
              resetView(v);
            }
          }
        }
        @Override public void onAnimationCancel(        Animator animation){
          if (mListener != null) {
            if (!mListener.onFling(mListView,pos)) {
              resetView(v);
            }
          }
        }
      }
).start();
    }
  }
 else {
    if (mListener != null) {
      if (!mListener.onFling(mListView,pos)) {
        resetView(v);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Animate the fling of the given   {@link View} at position <code>pos</code> and calls the onFling handler when the animation has finished.
 * @param v The  {@link View} to fling.
 * @param pos The position of the element in ListView.
 * @param velocity The velocity to use. The harder you fling the faster the animation will be.
 */
@TargetApi(14) private void animateFling(final View v,final int pos,float velocity){
  if (android.os.Build.VERSION.SDK_INT >= 14 && v != null) {
    int parentWidth=((View)v.getParent()).getWidth();
    if (parentWidth > v.getTranslationX()) {
      v.animate().alpha(0).translationX(parentWidth).setDuration((long)((parentWidth - v.getTranslationX()) / velocity)).setListener(new AnimatorListener(){
        @Override public void onAnimationStart(        Animator animation){
        }
        @Override public void onAnimationRepeat(        Animator animation){
        }
        @Override public void onAnimationEnd(        Animator animation){
          if (mListener != null) {
            if (!mListener.onFling(mListView,pos)) {
              resetView(v);
            }
          }
        }
        @Override public void onAnimationCancel(        Animator animation){
          if (mListener != null) {
            if (!mListener.onFling(mListView,pos)) {
              resetView(v);
            }
          }
        }
      }
).start();
    }
 else     if (mListener != null) {
      if (!mListener.onFling(mListView,pos)) {
        resetView(v);
      }
    }
  }
 else {
    if (mListener != null) {
      if (!mListener.onFling(mListView,pos)) {
        resetView(v);
      }
    }
  }
}