Program: 184696
Project: 184696
Buggy source:
private void setImage(int pos){
  if (!mLayoutComplete) {
    return;
  }
  final boolean left=(pos == mCurrentPosition - 1);
  final boolean right=(pos == mCurrentPosition + 1);
  mCurrentPosition=pos;
  ImageViewTouchBase current=mImageViews[1];
  current.mSuppMatrix.reset();
  current.setImageMatrix(current.getImageViewMatrix());
  if (false) {
    Log.v(TAG,"String_Node_Str");
    for (    ImageViewTouchBase ivtb : mImageViews)     ivtb.dump();
  }
  if (!mFirst) {
    if (left) {
      mImageViews[2].copyFrom(mImageViews[1]);
      mImageViews[1].copyFrom(mImageViews[0]);
    }
 else     if (right) {
      mImageViews[0].copyFrom(mImageViews[1]);
      mImageViews[1].copyFrom(mImageViews[2]);
    }
  }
  if (false) {
    Log.v(TAG,"String_Node_Str");
    for (    ImageViewTouchBase ivtb : mImageViews)     ivtb.dump();
  }
  for (  ImageViewTouchBase ivt : mImageViews) {
    ivt.mIsZooming=false;
  }
  int width=mImageViews[1].getWidth();
  int from;
  int to=width + sPadding;
  if (mFirst) {
    from=to;
    mFirst=false;
  }
 else {
    from=left ? (width + sPadding) + mScroller.getScrollX() : mScroller.getScrollX() - (width + sPadding);
  }
  if (sAnimateTransitions) {
    mScroller.scrollTo(from,0);
    animateScrollTo(to,0);
  }
 else {
    mScroller.scrollTo(to,0);
  }
  ImageGetterCallback cb=new ImageGetterCallback(){
    public void completed(    boolean wasCanceled){
      if (!mShowActionIcons) {
        mImageViews[1].setFocusableInTouchMode(true);
        mImageViews[1].requestFocus();
      }
    }
    public boolean wantsThumbnail(    int pos,    int offset){
      ImageViewTouchBase ivt=mImageViews[1 + offset];
      return ivt.mThumbBitmap == null;
    }
    public boolean wantsFullImage(    int pos,    int offset){
      ImageViewTouchBase ivt=mImageViews[1 + offset];
      if (ivt.mBitmapDisplayed != null && !ivt.mBitmapIsThumbnail) {
        return false;
      }
      if (offset != 0) {
        return false;
      }
      return true;
    }
    public int fullImageSizeToUse(    int pos,    int offset){
      final int imageViewSize=480;
      return imageViewSize;
    }
    public int[] loadOrder(){
      return sOrder_adjacents;
    }
    public void imageLoaded(    int pos,    int offset,    Bitmap bitmap,    boolean isThumb){
      ImageViewTouchBase ivt=mImageViews[1 + offset];
      if (offset == 0)       updateZoomButtonsEnabled();
      ivt.setImageBitmapResetBase(bitmap,isThumb,isThumb);
    }
  }
;
  if (mGetter != null) {
    mGetter.setPosition(pos,cb);
  }
  showOnScreenControls();
}

Fixed version (ground truth):
private void setImage(int pos){
  if (!mLayoutComplete)   return;
  final boolean left=(pos == mCurrentPosition - 1);
  final boolean right=(pos == mCurrentPosition + 1);
  mCurrentPosition=pos;
  ImageViewTouchBase current=mImageViews[1];
  current.mSuppMatrix.reset();
  current.setImageMatrix(current.getImageViewMatrix());
  if (false) {
    Log.v(TAG,"String_Node_Str");
    for (    ImageViewTouchBase ivtb : mImageViews)     ivtb.dump();
  }
  if (!mFirst) {
    if (left) {
      mImageViews[2].copyFrom(mImageViews[1]);
      mImageViews[1].copyFrom(mImageViews[0]);
    }
 else     if (right) {
      mImageViews[0].copyFrom(mImageViews[1]);
      mImageViews[1].copyFrom(mImageViews[2]);
    }
  }
  if (false) {
    Log.v(TAG,"String_Node_Str");
    for (    ImageViewTouchBase ivtb : mImageViews)     ivtb.dump();
  }
  for (  ImageViewTouchBase ivt : mImageViews) {
    ivt.mIsZooming=false;
  }
  int width=mImageViews[1].getWidth();
  int from;
  int to=width + sPadding;
  if (mFirst) {
    from=to;
    mFirst=false;
  }
 else {
    from=left ? (width + sPadding) + mScroller.getScrollX() : mScroller.getScrollX() - (width + sPadding);
  }
  if (sAnimateTransitions) {
    mScroller.scrollTo(from,0);
    animateScrollTo(to,0);
  }
 else {
    mScroller.scrollTo(to,0);
  }
  ImageGetterCallback cb=new ImageGetterCallback(){
    public void completed(    boolean wasCanceled){
      if (!mShowActionIcons) {
        mImageViews[1].setFocusableInTouchMode(true);
        mImageViews[1].requestFocus();
      }
    }
    public boolean wantsThumbnail(    int pos,    int offset){
      ImageViewTouchBase ivt=mImageViews[1 + offset];
      return ivt.mThumbBitmap == null;
    }
    public boolean wantsFullImage(    int pos,    int offset){
      ImageViewTouchBase ivt=mImageViews[1 + offset];
      if (ivt.mBitmapDisplayed != null && !ivt.mBitmapIsThumbnail) {
        return false;
      }
      if (offset != 0) {
        return false;
      }
      return true;
    }
    public int fullImageSizeToUse(    int pos,    int offset){
      final int imageViewSize=480;
      return imageViewSize;
    }
    public int[] loadOrder(){
      return sOrder_adjacents;
    }
    public void imageLoaded(    int pos,    int offset,    Bitmap bitmap,    boolean isThumb){
      ImageViewTouchBase ivt=mImageViews[1 + offset];
      if (offset == 0)       updateZoomButtonsEnabled();
      ivt.setImageBitmapResetBase(bitmap,isThumb,isThumb);
    }
  }
;
  if (mGetter != null) {
    mGetter.setPosition(pos,cb);
  }
  showOnScreenControls();
}