Program: 30708
Project: 30708
Buggy source:
/** 
 * Checks and refills empty area on the left edge of screen
 */
@Override protected void refillLeftSide(){
  final int leftScreenEdge=getScrollX();
  final int dspNextViewsRight=mCurrentlyLayoutedViewsLeftEdgeDsp;
  int dspLeftScreenEdge=pxToDsp(leftScreenEdge);
  if (dspLeftScreenEdge < 0)   dspLeftScreenEdge--;
  int end=mAdapter.getEnd();
  if (dspLeftScreenEdge >= dspNextViewsRight || end == 0)   return;
  int dspModuloLeftScreenEdge=dspLeftScreenEdge % end;
  int dspModuloNextViewsRight=dspNextViewsRight % end;
  int dspOffsetLeftScreenEdge=dspLeftScreenEdge / end;
  int dspOffsetNextViewsRight=dspNextViewsRight / end;
  if (dspModuloLeftScreenEdge < 0) {
    dspModuloLeftScreenEdge+=end;
    dspOffsetLeftScreenEdge-=1;
  }
  if (dspModuloNextViewsRight < 0) {
    dspModuloNextViewsRight+=end;
    dspOffsetNextViewsRight-=1;
  }
  View[] list;
  if (dspModuloLeftScreenEdge > dspModuloNextViewsRight) {
    View[] list1, list2;
    list1=mAdapter.getViewsByRightSideRange(dspModuloLeftScreenEdge,end);
    list2=mAdapter.getViewsByRightSideRange(0,dspModuloNextViewsRight);
    translateLayoutParams(list1,dspOffsetLeftScreenEdge);
    translateLayoutParams(list2,dspOffsetNextViewsRight);
    list=ToolBox.concatenateArray(list1,list2);
  }
 else {
    list=mAdapter.getViewsByRightSideRange(dspModuloLeftScreenEdge,dspModuloNextViewsRight);
    translateLayoutParams(list,dspOffsetLeftScreenEdge);
  }
  int dspMostLeft=dspNextViewsRight;
  LayoutParams lp;
  for (int i=0; i < list.length; i++) {
    lp=(LayoutParams)list[i].getLayoutParams();
    if (lp.dspLeft < dspMostLeft)     dspMostLeft=lp.dspLeft;
    addViewInLayout(list[i],-1,list[i].getLayoutParams(),true);
  }
  if (list.length > 0) {
    layoutNewChildren(list);
  }
  mCurrentlyLayoutedViewsLeftEdgeDsp=dspMostLeft;
}

Fixed version (ground truth):
/** 
 * Checks and refills empty area on the left edge of screen
 */
@Override protected void refillLeftSide(){
  final int leftScreenEdge=getScrollX();
  final int dspNextViewsRight=mCurrentlyLayoutedViewsLeftEdgeDsp;
  int dspLeftScreenEdge=pxToDsp(leftScreenEdge);
  if (dspLeftScreenEdge <= 0)   dspLeftScreenEdge--;
  int end=mAdapter.getEnd();
  if (dspLeftScreenEdge >= dspNextViewsRight || end == 0)   return;
  int dspModuloLeftScreenEdge=dspLeftScreenEdge % end;
  int dspModuloNextViewsRight=dspNextViewsRight % end;
  int dspOffsetLeftScreenEdge=dspLeftScreenEdge / end;
  int dspOffsetNextViewsRight=dspNextViewsRight / end;
  if (dspModuloLeftScreenEdge < 0) {
    dspModuloLeftScreenEdge+=end;
    dspOffsetLeftScreenEdge-=1;
  }
  if (dspModuloNextViewsRight < 0) {
    dspModuloNextViewsRight+=end;
    dspOffsetNextViewsRight-=1;
  }
  View[] list;
  if (dspModuloLeftScreenEdge > dspModuloNextViewsRight) {
    View[] list1, list2;
    list1=mAdapter.getViewsByRightSideRange(dspModuloLeftScreenEdge,end);
    list2=mAdapter.getViewsByRightSideRange(0,dspModuloNextViewsRight);
    translateLayoutParams(list1,dspOffsetLeftScreenEdge);
    translateLayoutParams(list2,dspOffsetNextViewsRight);
    list=ToolBox.concatenateArray(list1,list2);
  }
 else {
    list=mAdapter.getViewsByRightSideRange(dspModuloLeftScreenEdge,dspModuloNextViewsRight);
    translateLayoutParams(list,dspOffsetLeftScreenEdge);
  }
  int dspMostLeft=dspNextViewsRight;
  LayoutParams lp;
  for (int i=0; i < list.length; i++) {
    lp=(LayoutParams)list[i].getLayoutParams();
    if (lp.dspLeft < dspMostLeft)     dspMostLeft=lp.dspLeft;
    addViewInLayout(list[i],-1,list[i].getLayoutParams(),true);
  }
  if (list.length > 0) {
    layoutNewChildren(list);
  }
  mCurrentlyLayoutedViewsLeftEdgeDsp=dspMostLeft;
}