Program: 25600
Project: 25600
Buggy source:
@Override public void draw(Canvas canvas){
  if (info == null) {
    super.draw(canvas);
    if (bitmapFetcher != null) {
      if (bitmapFetcher.sampleWidth == 0 && bitmapFetcher.sampleHeight == 0) {
        if (canvas.getWidth() != 1)         bitmapFetcher.sampleWidth=canvas.getWidth();
        if (canvas.getHeight() != 1)         bitmapFetcher.sampleHeight=canvas.getHeight();
        bitmapFetcher.recomputeDecodeKey();
        BitmapInfo found=ion.bitmapCache.get(bitmapFetcher.bitmapKey);
        if (found != null) {
          bitmapFetcher=null;
          callback.onCompleted(null,found);
          return;
        }
      }
      callback.register(ion,bitmapFetcher.bitmapKey);
      if (BitmapFetcher.shouldDeferImageView(ion)) {
        bitmapFetcher.defer();
      }
 else {
        bitmapFetcher.execute();
      }
      bitmapFetcher=null;
    }
    return;
  }
  if (info.decoder != null) {
    drawDeepZoom(canvas);
    return;
  }
  if (info.drawTime == 0)   info.drawTime=SystemClock.uptimeMillis();
  long destAlpha=0xFF;
  if (fadeIn) {
    destAlpha=((SystemClock.uptimeMillis() - info.drawTime) << 8) / FADE_DURATION;
    destAlpha=Math.min(destAlpha,0xFF);
  }
  if (destAlpha == 255) {
    if (placeholder != null) {
      placeholder=null;
      setDrawableByLayerId(0,NULL_PLACEHOLDER);
    }
  }
 else {
    if (placeholder != null)     invalidateSelf();
  }
  if (info.gifDecoder != null) {
    super.draw(canvas);
    GifFrame frame=gifDecoder.getCurrentFrame();
    if (frame != null) {
      paint.setAlpha((int)destAlpha);
      canvas.drawBitmap(frame.image,null,getBounds(),paint);
      paint.setAlpha(0xFF);
      invalidateSelf();
    }
    return;
  }
  if (info.bitmap != null) {
    if (bitmapDrawable != null)     bitmapDrawable.setAlpha((int)destAlpha);
  }
 else {
    if (error != null)     error.setAlpha((int)destAlpha);
  }
  super.draw(canvas);
  if (true)   return;
  canvas.save();
  canvas.rotate(45);
  paint.setColor(Color.WHITE);
  canvas.drawRect(0,-10,7.5f,10,paint);
  int sourceColor;
  if (servedFrom == ResponseServedFrom.LOADED_FROM_CACHE)   sourceColor=Color.CYAN;
 else   if (servedFrom == ResponseServedFrom.LOADED_FROM_CONDITIONAL_CACHE)   sourceColor=Color.YELLOW;
 else   if (servedFrom == ResponseServedFrom.LOADED_FROM_MEMORY)   sourceColor=Color.GREEN;
 else   sourceColor=Color.RED;
  paint.setColor(sourceColor);
  canvas.drawRect(0,-9,6.5f,9,paint);
  canvas.restore();
}

Fixed version (ground truth):
@Override public void draw(Canvas canvas){
  if (info == null) {
    super.draw(canvas);
    if (bitmapFetcher != null) {
      if (bitmapFetcher.sampleWidth == 0 && bitmapFetcher.sampleHeight == 0) {
        if (canvas.getWidth() != 1)         bitmapFetcher.sampleWidth=canvas.getWidth();
        if (canvas.getHeight() != 1)         bitmapFetcher.sampleHeight=canvas.getHeight();
        bitmapFetcher.recomputeDecodeKey();
        BitmapInfo found=ion.bitmapCache.get(bitmapFetcher.bitmapKey);
        if (found != null) {
          bitmapFetcher=null;
          callback.onCompleted(null,found);
          return;
        }
      }
      callback.register(ion,bitmapFetcher.bitmapKey);
      if (BitmapFetcher.shouldDeferImageView(ion)) {
        bitmapFetcher.defer();
      }
 else {
        bitmapFetcher.execute();
      }
      bitmapFetcher=null;
    }
    return;
  }
  if (info.decoder != null) {
    drawDeepZoom(canvas);
    return;
  }
  if (info.drawTime == 0)   info.drawTime=SystemClock.uptimeMillis();
  long destAlpha=this.alpha;
  if (fadeIn) {
    destAlpha=((SystemClock.uptimeMillis() - info.drawTime) << 8) / FADE_DURATION;
    destAlpha=Math.min(destAlpha,this.alpha);
  }
  if (destAlpha == this.alpha) {
    if (placeholder != null) {
      placeholder=null;
      setDrawableByLayerId(0,NULL_PLACEHOLDER);
    }
  }
 else {
    if (placeholder != null)     invalidateSelf();
  }
  if (info.gifDecoder != null) {
    super.draw(canvas);
    GifFrame frame=gifDecoder.getCurrentFrame();
    if (frame != null) {
      paint.setAlpha((int)destAlpha);
      canvas.drawBitmap(frame.image,null,getBounds(),paint);
      paint.setAlpha(this.alpha);
      invalidateSelf();
    }
    return;
  }
  if (info.bitmap != null) {
    if (bitmapDrawable != null)     bitmapDrawable.setAlpha((int)destAlpha);
  }
 else {
    if (error != null)     error.setAlpha((int)destAlpha);
  }
  super.draw(canvas);
  if (true)   return;
  canvas.save();
  canvas.rotate(45);
  paint.setColor(Color.WHITE);
  canvas.drawRect(0,-10,7.5f,10,paint);
  int sourceColor;
  if (servedFrom == ResponseServedFrom.LOADED_FROM_CACHE)   sourceColor=Color.CYAN;
 else   if (servedFrom == ResponseServedFrom.LOADED_FROM_CONDITIONAL_CACHE)   sourceColor=Color.YELLOW;
 else   if (servedFrom == ResponseServedFrom.LOADED_FROM_MEMORY)   sourceColor=Color.GREEN;
 else   sourceColor=Color.RED;
  paint.setColor(sourceColor);
  canvas.drawRect(0,-9,6.5f,9,paint);
  canvas.restore();
}