Program: 111141
Project: 111141
Buggy source:
@Override public void onScroll(AbsListView listview,int firstVisibleItem,int visibleItemCount,int totalItemCount){
  int scrollY=QuickReturnUtils.getScrollY(listview);
  int diff=mPrevScrollY - scrollY;
  if (diff != 0) {
switch (mQuickReturnType) {
case HEADER:
      if (diff < 0) {
        mHeaderDiffTotal=Math.max(mHeaderDiffTotal + diff,mMinHeaderTranslation);
      }
 else {
        mHeaderDiffTotal=Math.min(Math.max(mHeaderDiffTotal + diff,mMinHeaderTranslation),0);
      }
    if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.HONEYCOMB) {
      mHeaderAnim=new TranslateAnimation(0,0,mHeaderDiffTotal,mHeaderDiffTotal);
      mHeaderAnim.setFillAfter(true);
      mHeaderAnim.setDuration(0);
      mHeader.startAnimation(mHeaderAnim);
    }
 else {
      mHeader.setTranslationY(mHeaderDiffTotal);
    }
  break;
case FOOTER:
if (diff < 0) {
  mFooterDiffTotal=Math.max(mFooterDiffTotal + diff,-mMinFooterTranslation);
}
 else {
  mFooterDiffTotal=Math.min(Math.max(mFooterDiffTotal + diff,-mMinFooterTranslation),0);
}
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.HONEYCOMB) {
mFooterAnim=new TranslateAnimation(0,0,-mFooterDiffTotal,-mFooterDiffTotal);
mFooterAnim.setFillAfter(true);
mFooterAnim.setDuration(0);
mFooter.startAnimation(mFooterAnim);
}
 else {
mFooter.setTranslationY(-mFooterDiffTotal);
}
break;
case BOTH:
if (diff < 0) {
mHeaderDiffTotal=Math.max(mHeaderDiffTotal + diff,mMinHeaderTranslation);
mFooterDiffTotal=Math.max(mFooterDiffTotal + diff,-mMinFooterTranslation);
}
 else {
mHeaderDiffTotal=Math.min(Math.max(mHeaderDiffTotal + diff,mMinHeaderTranslation),0);
mFooterDiffTotal=Math.min(Math.max(mFooterDiffTotal + diff,-mMinFooterTranslation),0);
}
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.HONEYCOMB) {
mHeaderAnim=new TranslateAnimation(0,0,mHeaderDiffTotal,mHeaderDiffTotal);
mHeaderAnim.setFillAfter(true);
mHeaderAnim.setDuration(0);
mHeader.startAnimation(mHeaderAnim);
mFooterAnim=new TranslateAnimation(0,0,-mFooterDiffTotal,-mFooterDiffTotal);
mFooterAnim.setFillAfter(true);
mFooterAnim.setDuration(0);
mFooter.startAnimation(mFooterAnim);
}
 else {
mHeader.setTranslationY(mHeaderDiffTotal);
mFooter.setTranslationY(-mFooterDiffTotal);
}
default :
break;
}
}
mPrevScrollY=scrollY;
}

Fixed version (ground truth):
@Override public void onScroll(AbsListView listview,int firstVisibleItem,int visibleItemCount,int totalItemCount){
  int scrollY=QuickReturnUtils.getScrollY(listview);
  int diff=mPrevScrollY - scrollY;
  Log.d(getClass().getSimpleName(),"String_Node_Str" + scrollY);
  Log.d(getClass().getSimpleName(),"String_Node_Str" + diff);
  if (diff != 0) {
switch (mQuickReturnType) {
case HEADER:
      if (diff < 0) {
        mHeaderDiffTotal=Math.max(mHeaderDiffTotal + diff,mMinHeaderTranslation);
      }
 else {
        mHeaderDiffTotal=Math.min(Math.max(mHeaderDiffTotal + diff,mMinHeaderTranslation),0);
      }
    mHeader.setTranslationY(mHeaderDiffTotal);
  break;
case FOOTER:
if (diff < 0) {
  mFooterDiffTotal=Math.max(mFooterDiffTotal + diff,-mMinFooterTranslation);
}
 else {
  mFooterDiffTotal=Math.min(Math.max(mFooterDiffTotal + diff,-mMinFooterTranslation),0);
}
mFooter.setTranslationY(-mFooterDiffTotal);
break;
case BOTH:
if (diff < 0) {
mHeaderDiffTotal=Math.max(mHeaderDiffTotal + diff,mMinHeaderTranslation);
mFooterDiffTotal=Math.max(mFooterDiffTotal + diff,-mMinFooterTranslation);
}
 else {
mHeaderDiffTotal=Math.min(Math.max(mHeaderDiffTotal + diff,mMinHeaderTranslation),0);
mFooterDiffTotal=Math.min(Math.max(mFooterDiffTotal + diff,-mMinFooterTranslation),0);
}
mHeader.setTranslationY(mHeaderDiffTotal);
mFooter.setTranslationY(-mFooterDiffTotal);
default :
break;
}
}
mPrevScrollY=scrollY;
}