Program: 111140
Project: 111140
Buggy source:
@Override public void onScrollStateChanged(AbsListView view,int scrollState){
  if (scrollState == SCROLL_STATE_IDLE) {
    int midHeader=-mMinHeaderTranslation / 2;
    int midFooter=mMinFooterTranslation / 2;
switch (mQuickReturnType) {
case HEADER:
      if (-mHeaderDiffTotal > 0 && -mHeaderDiffTotal < midHeader) {
        mHeader.setTranslationY(0);
        mHeaderDiffTotal=0;
      }
 else       if (-mHeaderDiffTotal < -mMinHeaderTranslation && -mHeaderDiffTotal >= midHeader) {
        mHeader.setTranslationY(mMinHeaderTranslation);
        mHeaderDiffTotal=mMinHeaderTranslation;
      }
    break;
case FOOTER:
  if (-mFooterDiffTotal > 0 && -mFooterDiffTotal < midFooter) {
    mFooter.setTranslationY(0);
    mFooterDiffTotal=0;
  }
 else   if (-mFooterDiffTotal < mMinFooterTranslation && -mFooterDiffTotal >= midFooter) {
    mFooter.setTranslationY(mMinFooterTranslation);
    mFooterDiffTotal=-mMinFooterTranslation;
  }
break;
case BOTH:
if (-mHeaderDiffTotal > 0 && -mHeaderDiffTotal < midHeader) {
mHeader.setTranslationY(0);
mHeaderDiffTotal=0;
}
 else if (-mHeaderDiffTotal < -mMinHeaderTranslation && -mHeaderDiffTotal >= midHeader) {
mHeader.setTranslationY(mMinHeaderTranslation);
mHeaderDiffTotal=mMinHeaderTranslation;
}
if (-mFooterDiffTotal > 0 && -mFooterDiffTotal < midFooter) {
mFooter.setTranslationY(0);
mFooterDiffTotal=0;
}
 else if (-mFooterDiffTotal < mMinFooterTranslation && -mFooterDiffTotal >= midFooter) {
mFooter.setTranslationY(mMinFooterTranslation);
mFooterDiffTotal=-mMinFooterTranslation;
}
break;
}
}
}

Fixed version (ground truth):
@Override public void onScrollStateChanged(AbsListView view,int scrollState){
  Log.d(getClass().getSimpleName(),"String_Node_Str" + scrollState);
  if (scrollState == SCROLL_STATE_IDLE) {
    int midHeader=-mMinHeaderTranslation / 2;
    int midFooter=mMinFooterTranslation / 2;
switch (mQuickReturnType) {
case HEADER:
      if (-mHeaderDiffTotal > 0 && -mHeaderDiffTotal < midHeader) {
        mHeader.setTranslationY(0);
        mHeaderDiffTotal=0;
      }
 else       if (-mHeaderDiffTotal < -mMinHeaderTranslation && -mHeaderDiffTotal >= midHeader) {
        mHeader.setTranslationY(mMinHeaderTranslation);
        mHeaderDiffTotal=mMinHeaderTranslation;
      }
    break;
case FOOTER:
  if (-mFooterDiffTotal > 0 && -mFooterDiffTotal < midFooter) {
    mFooter.setTranslationY(0);
    mFooterDiffTotal=0;
  }
 else   if (-mFooterDiffTotal < mMinFooterTranslation && -mFooterDiffTotal >= midFooter) {
    mFooter.setTranslationY(mMinFooterTranslation);
    mFooterDiffTotal=-mMinFooterTranslation;
  }
break;
case BOTH:
if (-mHeaderDiffTotal > 0 && -mHeaderDiffTotal < midHeader) {
mHeader.setTranslationY(0);
mHeaderDiffTotal=0;
}
 else if (-mHeaderDiffTotal < -mMinHeaderTranslation && -mHeaderDiffTotal >= midHeader) {
mHeader.setTranslationY(mMinHeaderTranslation);
mHeaderDiffTotal=mMinHeaderTranslation;
}
if (-mFooterDiffTotal > 0 && -mFooterDiffTotal < midFooter) {
mFooter.setTranslationY(0);
mFooterDiffTotal=0;
}
 else if (-mFooterDiffTotal < mMinFooterTranslation && -mFooterDiffTotal >= midFooter) {
mFooter.setTranslationY(mMinFooterTranslation);
mFooterDiffTotal=-mMinFooterTranslation;
}
break;
}
}
}