Program: 38566
Project: 38566
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  ImageFilterRS.setRenderScriptContext(this);
  setContentView(R.layout.filtershow_activity);
  ActionBar actionBar=getActionBar();
  actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
  actionBar.setCustomView(R.layout.filtershow_actionbar);
  actionBar.getCustomView().setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View view){
      saveImage();
    }
  }
);
  mImageLoader=new ImageLoader(getApplicationContext());
  LinearLayout listFilters=(LinearLayout)findViewById(R.id.listFilters);
  LinearLayout listBorders=(LinearLayout)findViewById(R.id.listBorders);
  mImageShow=(ImageShow)findViewById(R.id.imageShow);
  mImageCurves=(ImageCurves)findViewById(R.id.imageCurves);
  mImageBorders=(ImageBorder)findViewById(R.id.imageBorder);
  mImageStraighten=(ImageStraighten)findViewById(R.id.imageStraighten);
  mImageZoom=(ImageZoom)findViewById(R.id.imageZoom);
  mImageCrop=(ImageCrop)findViewById(R.id.imageCrop);
  mImageRotate=(ImageRotate)findViewById(R.id.imageRotate);
  mImageFlip=(ImageFlip)findViewById(R.id.imageFlip);
  mImageViews.add(mImageShow);
  mImageViews.add(mImageCurves);
  mImageViews.add(mImageBorders);
  mImageViews.add(mImageStraighten);
  mImageViews.add(mImageZoom);
  mImageViews.add(mImageCrop);
  mImageViews.add(mImageRotate);
  mImageViews.add(mImageFlip);
  mListFx=findViewById(R.id.fxList);
  mListBorders=findViewById(R.id.bordersList);
  mListGeometry=findViewById(R.id.geometryList);
  mListFilterButtons=findViewById(R.id.filterButtonsList);
  mListColors=findViewById(R.id.colorsFxList);
  mListViews.add(mListFx);
  mListViews.add(mListBorders);
  mListViews.add(mListGeometry);
  mListViews.add(mListFilterButtons);
  mListViews.add(mListColors);
  mFxButton=(ImageButton)findViewById(R.id.fxButton);
  mBorderButton=(ImageButton)findViewById(R.id.borderButton);
  mGeometryButton=(ImageButton)findViewById(R.id.geometryButton);
  mColorsButton=(ImageButton)findViewById(R.id.colorsButton);
  mImageShow.setImageLoader(mImageLoader);
  mImageCurves.setImageLoader(mImageLoader);
  mImageCurves.setMaster(mImageShow);
  mImageBorders.setImageLoader(mImageLoader);
  mImageBorders.setMaster(mImageShow);
  mImageStraighten.setImageLoader(mImageLoader);
  mImageStraighten.setMaster(mImageShow);
  mImageZoom.setImageLoader(mImageLoader);
  mImageZoom.setMaster(mImageShow);
  mImageCrop.setImageLoader(mImageLoader);
  mImageCrop.setMaster(mImageShow);
  mImageRotate.setImageLoader(mImageLoader);
  mImageRotate.setMaster(mImageShow);
  mImageFlip.setImageLoader(mImageLoader);
  mImageFlip.setMaster(mImageShow);
  mPanelController.addImageView(findViewById(R.id.imageShow));
  mPanelController.addImageView(findViewById(R.id.imageCurves));
  mPanelController.addImageView(findViewById(R.id.imageBorder));
  mPanelController.addImageView(findViewById(R.id.imageStraighten));
  mPanelController.addImageView(findViewById(R.id.imageCrop));
  mPanelController.addImageView(findViewById(R.id.imageRotate));
  mPanelController.addImageView(findViewById(R.id.imageFlip));
  mPanelController.addImageView(findViewById(R.id.imageZoom));
  mPanelController.addPanel(mFxButton,mListFx,0);
  mPanelController.addPanel(mBorderButton,mListBorders,1);
  mPanelController.addPanel(mGeometryButton,mListGeometry,2);
  mPanelController.addComponent(mGeometryButton,findViewById(R.id.straightenButton));
  mPanelController.addComponent(mGeometryButton,findViewById(R.id.cropButton));
  mPanelController.addComponent(mGeometryButton,findViewById(R.id.rotateButton));
  mPanelController.addComponent(mGeometryButton,findViewById(R.id.flipButton));
  mPanelController.addPanel(mColorsButton,mListColors,3);
  mPanelController.addComponent(mColorsButton,findViewById(R.id.vignetteButton));
  mPanelController.addComponent(mColorsButton,findViewById(R.id.curvesButtonRGB));
  mPanelController.addComponent(mColorsButton,findViewById(R.id.sharpenButton));
  mPanelController.addComponent(mColorsButton,findViewById(R.id.vibranceButton));
  mPanelController.addComponent(mColorsButton,findViewById(R.id.contrastButton));
  mPanelController.addComponent(mColorsButton,findViewById(R.id.saturationButton));
  mPanelController.addComponent(mColorsButton,findViewById(R.id.wbalanceButton));
  mPanelController.addComponent(mColorsButton,findViewById(R.id.hueButton));
  mPanelController.addComponent(mColorsButton,findViewById(R.id.exposureButton));
  mPanelController.addComponent(mColorsButton,findViewById(R.id.shadowRecoveryButton));
  mPanelController.addView(findViewById(R.id.applyEffect));
  findViewById(R.id.resetOperationsButton).setOnClickListener(createOnClickResetOperationsButton());
  ListView operationsList=(ListView)findViewById(R.id.operationsList);
  operationsList.setAdapter(mImageShow.getHistoryAdapter());
  operationsList.setOnItemClickListener(this);
  ListView imageStateList=(ListView)findViewById(R.id.imageStateList);
  imageStateList.setAdapter(mImageShow.getImageStateAdapter());
  mImageLoader.setAdapter((HistoryAdapter)mImageShow.getHistoryAdapter());
  fillListImages(listFilters);
  fillListBorders(listBorders);
  SeekBar seekBar=(SeekBar)findViewById(R.id.filterSeekBar);
  seekBar.setMax(200);
  mImageShow.setSeekBar(seekBar);
  mImageZoom.setSeekBar(seekBar);
  mPanelController.setRowPanel(findViewById(R.id.secondRowPanel));
  mPanelController.setUtilityPanel(this,findViewById(R.id.filterButtonsList),findViewById(R.id.applyEffect));
  mPanelController.setMasterImage(mImageShow);
  mPanelController.setCurrentPanel(mFxButton);
  Intent intent=getIntent();
  String data=intent.getDataString();
  if (data != null) {
    Uri uri=Uri.parse(data);
    mImageLoader.loadBitmap(uri);
  }
 else {
    pickImage();
  }
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  ImageFilterRS.setRenderScriptContext(this);
  setContentView(R.layout.filtershow_activity);
  ActionBar actionBar=getActionBar();
  actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
  actionBar.setCustomView(R.layout.filtershow_actionbar);
  actionBar.getCustomView().setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View view){
      saveImage();
    }
  }
);
  mImageLoader=new ImageLoader(getApplicationContext());
  LinearLayout listFilters=(LinearLayout)findViewById(R.id.listFilters);
  LinearLayout listBorders=(LinearLayout)findViewById(R.id.listBorders);
  mImageShow=(ImageShow)findViewById(R.id.imageShow);
  mImageCurves=(ImageCurves)findViewById(R.id.imageCurves);
  mImageBorders=(ImageBorder)findViewById(R.id.imageBorder);
  mImageStraighten=(ImageStraighten)findViewById(R.id.imageStraighten);
  mImageZoom=(ImageZoom)findViewById(R.id.imageZoom);
  mImageCrop=(ImageCrop)findViewById(R.id.imageCrop);
  mImageRotate=(ImageRotate)findViewById(R.id.imageRotate);
  mImageFlip=(ImageFlip)findViewById(R.id.imageFlip);
  mImageViews.add(mImageShow);
  mImageViews.add(mImageCurves);
  mImageViews.add(mImageBorders);
  mImageViews.add(mImageStraighten);
  mImageViews.add(mImageZoom);
  mImageViews.add(mImageCrop);
  mImageViews.add(mImageRotate);
  mImageViews.add(mImageFlip);
  mListFx=findViewById(R.id.fxList);
  mListBorders=findViewById(R.id.bordersList);
  mListGeometry=findViewById(R.id.geometryList);
  mListFilterButtons=findViewById(R.id.filterButtonsList);
  mListColors=findViewById(R.id.colorsFxList);
  mListViews.add(mListFx);
  mListViews.add(mListBorders);
  mListViews.add(mListGeometry);
  mListViews.add(mListFilterButtons);
  mListViews.add(mListColors);
  mFxButton=(ImageButton)findViewById(R.id.fxButton);
  mBorderButton=(ImageButton)findViewById(R.id.borderButton);
  mGeometryButton=(ImageButton)findViewById(R.id.geometryButton);
  mColorsButton=(ImageButton)findViewById(R.id.colorsButton);
  mImageShow.setImageLoader(mImageLoader);
  mImageCurves.setImageLoader(mImageLoader);
  mImageCurves.setMaster(mImageShow);
  mImageBorders.setImageLoader(mImageLoader);
  mImageBorders.setMaster(mImageShow);
  mImageStraighten.setImageLoader(mImageLoader);
  mImageStraighten.setMaster(mImageShow);
  mImageZoom.setImageLoader(mImageLoader);
  mImageZoom.setMaster(mImageShow);
  mImageCrop.setImageLoader(mImageLoader);
  mImageCrop.setMaster(mImageShow);
  mImageRotate.setImageLoader(mImageLoader);
  mImageRotate.setMaster(mImageShow);
  mImageFlip.setImageLoader(mImageLoader);
  mImageFlip.setMaster(mImageShow);
  mPanelController.addImageView(findViewById(R.id.imageShow));
  mPanelController.addImageView(findViewById(R.id.imageCurves));
  mPanelController.addImageView(findViewById(R.id.imageBorder));
  mPanelController.addImageView(findViewById(R.id.imageStraighten));
  mPanelController.addImageView(findViewById(R.id.imageCrop));
  mPanelController.addImageView(findViewById(R.id.imageRotate));
  mPanelController.addImageView(findViewById(R.id.imageFlip));
  mPanelController.addImageView(findViewById(R.id.imageZoom));
  mPanelController.addPanel(mFxButton,mListFx,0);
  mPanelController.addPanel(mBorderButton,mListBorders,1);
  mPanelController.addPanel(mGeometryButton,mListGeometry,2);
  mPanelController.addComponent(mGeometryButton,findViewById(R.id.straightenButton));
  mPanelController.addComponent(mGeometryButton,findViewById(R.id.cropButton));
  mPanelController.addComponent(mGeometryButton,findViewById(R.id.rotateButton));
  mPanelController.addComponent(mGeometryButton,findViewById(R.id.flipButton));
  mPanelController.addPanel(mColorsButton,mListColors,3);
  mPanelController.addComponent(mColorsButton,findViewById(R.id.vignetteButton));
  mPanelController.addComponent(mColorsButton,findViewById(R.id.curvesButtonRGB));
  mPanelController.addComponent(mColorsButton,findViewById(R.id.sharpenButton));
  mPanelController.addComponent(mColorsButton,findViewById(R.id.vibranceButton));
  mPanelController.addComponent(mColorsButton,findViewById(R.id.contrastButton));
  mPanelController.addComponent(mColorsButton,findViewById(R.id.saturationButton));
  mPanelController.addComponent(mColorsButton,findViewById(R.id.wbalanceButton));
  mPanelController.addComponent(mColorsButton,findViewById(R.id.hueButton));
  mPanelController.addComponent(mColorsButton,findViewById(R.id.exposureButton));
  mPanelController.addComponent(mColorsButton,findViewById(R.id.shadowRecoveryButton));
  mPanelController.addView(findViewById(R.id.applyEffect));
  findViewById(R.id.resetOperationsButton).setOnClickListener(createOnClickResetOperationsButton());
  ListView operationsList=(ListView)findViewById(R.id.operationsList);
  operationsList.setAdapter(mImageShow.getHistoryAdapter());
  operationsList.setOnItemClickListener(this);
  ListView imageStateList=(ListView)findViewById(R.id.imageStateList);
  imageStateList.setAdapter(mImageShow.getImageStateAdapter());
  mImageLoader.setAdapter((HistoryAdapter)mImageShow.getHistoryAdapter());
  fillListImages(listFilters);
  fillListBorders(listBorders);
  SeekBar seekBar=(SeekBar)findViewById(R.id.filterSeekBar);
  seekBar.setMax(200);
  mImageShow.setSeekBar(seekBar);
  mImageZoom.setSeekBar(seekBar);
  mPanelController.setRowPanel(findViewById(R.id.secondRowPanel));
  mPanelController.setUtilityPanel(this,findViewById(R.id.filterButtonsList),findViewById(R.id.applyEffect));
  mPanelController.setMasterImage(mImageShow);
  mPanelController.setCurrentPanel(mFxButton);
  Intent intent=getIntent();
  String data=intent.getDataString();
  if (data != null) {
    Uri uri=Uri.parse(data);
    mImageLoader.loadBitmap(uri,getScreenImageSize());
  }
 else {
    pickImage();
  }
}