Program: 43129
Project: 43129
Buggy source:
/** 
 * Handle scrolling in response to an up or down arrow click.
 * @param direction The direction corresponding to the arrow key that waspressed
 * @return True if we consumed the event, false otherwise
 */
public boolean arrowScroll(int direction){
  View currentFocused=findFocus();
  if (currentFocused == this)   currentFocused=null;
  View nextFocused=FocusFinder.getInstance().findNextFocus(this,currentFocused,direction);
  final int maxJump=getMaxScrollAmount();
  if (nextFocused != null && isWithinDeltaOfScreen(nextFocused,maxJump)) {
    nextFocused.getDrawingRect(mTempRect);
    offsetDescendantRectToMyCoords(nextFocused,mTempRect);
    int scrollDelta=computeScrollDeltaToGetChildRectOnScreen(mTempRect);
    doScrollY(scrollDelta);
    nextFocused.requestFocus(direction);
  }
 else {
    int scrollDelta=maxJump;
    if (direction == View.FOCUS_UP && getScrollY() < scrollDelta) {
      scrollDelta=getScrollY();
    }
 else     if (direction == View.FOCUS_DOWN) {
      if (getChildCount() > 0) {
        int daBottom=getChildAt(0).getBottom();
        int screenBottom=getScrollY() + getHeight();
        if (daBottom - screenBottom < maxJump) {
          scrollDelta=daBottom - screenBottom;
        }
      }
    }
    if (scrollDelta == 0) {
      return false;
    }
    doScrollY(direction == View.FOCUS_DOWN ? scrollDelta : -scrollDelta);
  }
  if (currentFocused != null && currentFocused.isFocused() && isOffScreen(currentFocused)) {
    final int descendantFocusability=getDescendantFocusability();
    setDescendantFocusability(ViewGroup.FOCUS_BEFORE_DESCENDANTS);
    requestFocus();
    setDescendantFocusability(descendantFocusability);
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Handle scrolling in response to an up or down arrow click.
 * @param direction The direction corresponding to the arrow key that waspressed
 * @return True if we consumed the event, false otherwise
 */
public boolean arrowScroll(int direction){
  View currentFocused=findFocus();
  if (currentFocused == this)   currentFocused=null;
  View nextFocused=FocusFinder.getInstance().findNextFocus(this,currentFocused,direction);
  final int maxJump=getMaxScrollAmount();
  if (nextFocused != null && isWithinDeltaOfScreen(nextFocused,maxJump,getHeight())) {
    nextFocused.getDrawingRect(mTempRect);
    offsetDescendantRectToMyCoords(nextFocused,mTempRect);
    int scrollDelta=computeScrollDeltaToGetChildRectOnScreen(mTempRect);
    doScrollY(scrollDelta);
    nextFocused.requestFocus(direction);
  }
 else {
    int scrollDelta=maxJump;
    if (direction == View.FOCUS_UP && getScrollY() < scrollDelta) {
      scrollDelta=getScrollY();
    }
 else     if (direction == View.FOCUS_DOWN) {
      if (getChildCount() > 0) {
        int daBottom=getChildAt(0).getBottom();
        int screenBottom=getScrollY() + getHeight();
        if (daBottom - screenBottom < maxJump) {
          scrollDelta=daBottom - screenBottom;
        }
      }
    }
    if (scrollDelta == 0) {
      return false;
    }
    doScrollY(direction == View.FOCUS_DOWN ? scrollDelta : -scrollDelta);
  }
  if (currentFocused != null && currentFocused.isFocused() && isOffScreen(currentFocused)) {
    final int descendantFocusability=getDescendantFocusability();
    setDescendantFocusability(ViewGroup.FOCUS_BEFORE_DESCENDANTS);
    requestFocus();
    setDescendantFocusability(descendantFocusability);
  }
  return true;
}