Program: 111142
Project: 111142
Buggy source:
@Override public void onScrollChanged(ScrollView who,int l,int t,int oldl,int oldt){
  int diff=oldt - t;
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);
}
break;
}
}

Fixed version (ground truth):
@Override public void onScrollChanged(ScrollView who,int l,int t,int oldl,int oldt){
  int diff=oldt - t;
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);
break;
}
}