Program: 3142
Project: 3142
Buggy source:
/** 
 * Blur the given bitmap and add it to the activity.
 * @param bkg  should be a bitmap of the background.
 * @param view background view.
 */
private void blur(Bitmap bkg,View view){
  long startMs=System.currentTimeMillis();
  mBlurredBackgroundLayoutParams=new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT,FrameLayout.LayoutParams.MATCH_PARENT);
  Bitmap overlay=null;
  int actionBarHeight=0;
  try {
    if (mHoldingActivity instanceof ActionBarActivity) {
      ActionBar supportActionBar=((ActionBarActivity)mHoldingActivity).getSupportActionBar();
      if (supportActionBar != null) {
        actionBarHeight=supportActionBar.getHeight();
      }
    }
 else     if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
      android.app.ActionBar actionBar=mHoldingActivity.getActionBar();
      if (actionBar != null) {
        actionBarHeight=actionBar.getHeight();
      }
    }
  }
 catch (  NoClassDefFoundError e) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
      android.app.ActionBar actionBar=mHoldingActivity.getActionBar();
      if (actionBar != null) {
        actionBarHeight=actionBar.getHeight();
      }
    }
  }
  int statusBarHeight=0;
  if ((mHoldingActivity.getWindow().getAttributes().flags & WindowManager.LayoutParams.FLAG_FULLSCREEN) == 0) {
    statusBarHeight=getStatusBarHeight();
  }
  final int topOffset=actionBarHeight + statusBarHeight;
  final int bottomOffset=getNavigationBarOffset();
  Rect srcRect=new Rect(0,actionBarHeight + statusBarHeight,bkg.getWidth(),bkg.getHeight() - bottomOffset);
  double height=Math.ceil((view.getMeasuredHeight() - topOffset - bottomOffset) / mDownScaleFactor);
  double width=Math.ceil((view.getWidth() * height / (view.getMeasuredHeight() - topOffset - bottomOffset)));
  overlay=Bitmap.createBitmap((int)width,(int)height,Bitmap.Config.RGB_565);
  try {
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB || mHoldingActivity instanceof ActionBarActivity) {
      mBlurredBackgroundLayoutParams.setMargins(0,actionBarHeight,0,0);
      mBlurredBackgroundLayoutParams.gravity=Gravity.TOP;
    }
  }
 catch (  NoClassDefFoundError e) {
    mBlurredBackgroundLayoutParams.setMargins(0,0,0,0);
  }
  Canvas canvas=new Canvas(overlay);
  Paint paint=new Paint();
  paint.setFlags(Paint.FILTER_BITMAP_FLAG);
  final RectF destRect=new RectF(0,0,overlay.getWidth(),overlay.getHeight());
  canvas.drawBitmap(bkg,srcRect,destRect,paint);
  overlay=FastBlurHelper.doBlur(overlay,mBlurRadius,false);
  if (mDebudEnable) {
    String blurTime=(System.currentTimeMillis() - startMs) + "String_Node_Str";
    Log.d(TAG,"String_Node_Str" + mBlurRadius);
    Log.d(TAG,"String_Node_Str" + mDownScaleFactor);
    Log.d(TAG,"String_Node_Str" + blurTime);
    Log.d(TAG,"String_Node_Str" + bkg.getRowBytes() + "String_Node_Str"+ overlay.getRowBytes()+ "String_Node_Str");
    Rect bounds=new Rect();
    Canvas canvas1=new Canvas(overlay);
    paint.setColor(Color.BLACK);
    paint.setAntiAlias(true);
    paint.setTextSize(20.0f);
    paint.getTextBounds(blurTime,0,blurTime.length(),bounds);
    canvas1.drawText(blurTime,2,bounds.height(),paint);
  }
  mBlurredBackgroundView=new ImageView(mHoldingActivity);
  mBlurredBackgroundView.setImageDrawable(new BitmapDrawable(mHoldingActivity.getResources(),overlay));
}

Fixed version (ground truth):
/** 
 * Blur the given bitmap and add it to the activity.
 * @param bkg  should be a bitmap of the background.
 * @param view background view.
 */
private void blur(Bitmap bkg,View view){
  long startMs=System.currentTimeMillis();
  mBlurredBackgroundLayoutParams=new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT,FrameLayout.LayoutParams.MATCH_PARENT);
  Bitmap overlay=null;
  int actionBarHeight=0;
  try {
    if (mHoldingActivity instanceof ActionBarActivity) {
      ActionBar supportActionBar=((ActionBarActivity)mHoldingActivity).getSupportActionBar();
      if (supportActionBar != null) {
        actionBarHeight=supportActionBar.getHeight();
      }
    }
 else     if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
      android.app.ActionBar actionBar=mHoldingActivity.getActionBar();
      if (actionBar != null) {
        actionBarHeight=actionBar.getHeight();
      }
    }
  }
 catch (  NoClassDefFoundError e) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
      android.app.ActionBar actionBar=mHoldingActivity.getActionBar();
      if (actionBar != null) {
        actionBarHeight=actionBar.getHeight();
      }
    }
  }
  int statusBarHeight=0;
  if ((mHoldingActivity.getWindow().getAttributes().flags & WindowManager.LayoutParams.FLAG_FULLSCREEN) == 0) {
    statusBarHeight=getStatusBarHeight();
  }
  final int topOffset=actionBarHeight + statusBarHeight;
  final int bottomOffset=getNavigationBarOffset();
  Rect srcRect=new Rect(0,actionBarHeight + statusBarHeight,bkg.getWidth(),bkg.getHeight() - bottomOffset);
  double height=Math.ceil((view.getMeasuredHeight() - topOffset - bottomOffset) / mDownScaleFactor);
  double width=Math.ceil((view.getWidth() * height / (view.getMeasuredHeight() - topOffset - bottomOffset)));
  overlay=Bitmap.createBitmap((int)width,(int)height,Bitmap.Config.RGB_565);
  try {
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB || mHoldingActivity instanceof ActionBarActivity) {
      mBlurredBackgroundLayoutParams.setMargins(0,actionBarHeight,0,0);
      mBlurredBackgroundLayoutParams.gravity=Gravity.TOP;
    }
  }
 catch (  NoClassDefFoundError e) {
    mBlurredBackgroundLayoutParams.setMargins(0,0,0,0);
  }
  Canvas canvas=new Canvas(overlay);
  Paint paint=new Paint();
  paint.setFlags(Paint.FILTER_BITMAP_FLAG);
  final RectF destRect=new RectF(0,0,overlay.getWidth(),overlay.getHeight());
  canvas.drawBitmap(bkg,srcRect,destRect,paint);
  overlay=FastBlurHelper.doBlur(overlay,mBlurRadius,false);
  if (mDebugEnable) {
    String blurTime=(System.currentTimeMillis() - startMs) + "String_Node_Str";
    Log.d(TAG,"String_Node_Str" + mBlurRadius);
    Log.d(TAG,"String_Node_Str" + mDownScaleFactor);
    Log.d(TAG,"String_Node_Str" + blurTime);
    Log.d(TAG,"String_Node_Str" + bkg.getRowBytes() + "String_Node_Str"+ overlay.getRowBytes()+ "String_Node_Str");
    Rect bounds=new Rect();
    Canvas canvas1=new Canvas(overlay);
    paint.setColor(Color.BLACK);
    paint.setAntiAlias(true);
    paint.setTextSize(20.0f);
    paint.getTextBounds(blurTime,0,blurTime.length(),bounds);
    canvas1.drawText(blurTime,2,bounds.height(),paint);
  }
  mBlurredBackgroundView=new ImageView(mHoldingActivity);
  mBlurredBackgroundView.setImageDrawable(new BitmapDrawable(mHoldingActivity.getResources(),overlay));
}