Program: 38469
Project: 38469
Buggy source:
private void fillListBorders(LinearLayout listBorders){
  int p=0;
  ImageFilter[] borders=new ImageFilter[12];
  borders[p++]=new ImageFilterBorder(null);
  Drawable npd1=getResources().getDrawable(R.drawable.filtershow_border_4x5);
  borders[p++]=new ImageFilterBorder(npd1);
  Drawable npd2=getResources().getDrawable(R.drawable.filtershow_border_brush);
  borders[p++]=new ImageFilterBorder(npd2);
  Drawable npd3=getResources().getDrawable(R.drawable.filtershow_border_grunge);
  borders[p++]=new ImageFilterBorder(npd3);
  Drawable npd4=getResources().getDrawable(R.drawable.filtershow_border_sumi_e);
  borders[p++]=new ImageFilterBorder(npd4);
  Drawable npd5=getResources().getDrawable(R.drawable.filtershow_border_tape);
  borders[p++]=new ImageFilterBorder(npd5);
  borders[p++]=new ImageFilterParametricBorder(Color.BLACK,mImageBorderSize,0);
  borders[p++]=new ImageFilterParametricBorder(Color.BLACK,mImageBorderSize,mImageBorderSize);
  borders[p++]=new ImageFilterParametricBorder(Color.WHITE,mImageBorderSize,0);
  borders[p++]=new ImageFilterParametricBorder(Color.WHITE,mImageBorderSize,mImageBorderSize);
  int creamColor=Color.argb(255,237,237,227);
  borders[p++]=new ImageFilterParametricBorder(creamColor,mImageBorderSize,0);
  borders[p++]=new ImageFilterParametricBorder(creamColor,mImageBorderSize,mImageBorderSize);
  ImageSmallFilter previousFilter=null;
  for (int i=0; i < p; i++) {
    ImageSmallBorder filter=new ImageSmallBorder(this);
    if (i == 0) {
      mNullBorderFilter=filter;
    }
 else {
      filter.setNulfilter(mNullBorderFilter);
    }
    borders[i].setName(getString(R.string.borders));
    filter.setImageFilter(borders[i]);
    filter.setController(this);
    filter.setBorder(true);
    filter.setImageLoader(mImageLoader);
    filter.setShowTitle(false);
    listBorders.addView(filter);
    previousFilter=filter;
  }
}

Fixed version (ground truth):
private void fillListBorders(LinearLayout listBorders){
  int p=0;
  ImageFilter[] borders=new ImageFilter[12];
  borders[p++]=new ImageFilterBorder(null);
  Drawable npd1=getResources().getDrawable(R.drawable.filtershow_border_4x5);
  borders[p++]=new ImageFilterBorder(npd1);
  Drawable npd2=getResources().getDrawable(R.drawable.filtershow_border_brush);
  borders[p++]=new ImageFilterBorder(npd2);
  Drawable npd3=getResources().getDrawable(R.drawable.filtershow_border_grunge);
  borders[p++]=new ImageFilterBorder(npd3);
  Drawable npd4=getResources().getDrawable(R.drawable.filtershow_border_sumi_e);
  borders[p++]=new ImageFilterBorder(npd4);
  Drawable npd5=getResources().getDrawable(R.drawable.filtershow_border_tape);
  borders[p++]=new ImageFilterBorder(npd5);
  borders[p++]=new ImageFilterParametricBorder(Color.BLACK,mImageBorderSize,0);
  borders[p++]=new ImageFilterParametricBorder(Color.BLACK,mImageBorderSize,mImageBorderSize);
  borders[p++]=new ImageFilterParametricBorder(Color.WHITE,mImageBorderSize,0);
  borders[p++]=new ImageFilterParametricBorder(Color.WHITE,mImageBorderSize,mImageBorderSize);
  int creamColor=Color.argb(255,237,237,227);
  borders[p++]=new ImageFilterParametricBorder(creamColor,mImageBorderSize,0);
  borders[p++]=new ImageFilterParametricBorder(creamColor,mImageBorderSize,mImageBorderSize);
  for (int i=0; i < p; i++) {
    borders[i].setName(getString(R.string.borders));
    FilterIconButton b=setupFilterButton(borders[i],listBorders,mBorderButton);
    if (i == 0) {
      mNullBorderFilter=b;
      mNullBorderFilter.setSelected(true);
    }
  }
}