Program: 38584
Project: 38584
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  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);
  mImageViews.add(mImageShow);
  mImageViews.add(mImageCurves);
  mImageViews.add(mImageBorders);
  mImageViews.add(mImageStraighten);
  mListFx=findViewById(R.id.fxList);
  mListBorders=findViewById(R.id.bordersList);
  mListGeometry=findViewById(R.id.gemoetryList);
  mListColors=findViewById(R.id.colorsFxList);
  mListViews.add(mListFx);
  mListViews.add(mListBorders);
  mListViews.add(mListGeometry);
  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);
  mBottomPanelButtons.add(mFxButton);
  mBottomPanelButtons.add(mBorderButton);
  mBottomPanelButtons.add(mGeometryButton);
  mBottomPanelButtons.add(mColorsButton);
  mFxButton.setSelected(true);
  mVignetteButton=(ImageButton)findViewById(R.id.vignetteButton);
  mCurvesButtonRGB=(ImageButton)findViewById(R.id.curvesButtonRGB);
  mSharpenButton=(ImageButton)findViewById(R.id.sharpenButton);
  mVibranceButton=(ImageButton)findViewById(R.id.vibranceButton);
  mContrastButton=(ImageButton)findViewById(R.id.contrastButton);
  mSaturationButton=(ImageButton)findViewById(R.id.saturationButton);
  mTintButton=(ImageButton)findViewById(R.id.tintButton);
  mExposureButton=(ImageButton)findViewById(R.id.exposureButton);
  mShadowRecoveryButton=(ImageButton)findViewById(R.id.shadowRecoveryButton);
  mColorsPanelButtons.add(mVignetteButton);
  mColorsPanelButtons.add(mCurvesButtonRGB);
  mColorsPanelButtons.add(mSharpenButton);
  mColorsPanelButtons.add(mContrastButton);
  mColorsPanelButtons.add(mSaturationButton);
  mColorsPanelButtons.add(mTintButton);
  mColorsPanelButtons.add(mVibranceButton);
  mColorsPanelButtons.add(mExposureButton);
  mColorsPanelButtons.add(mShadowRecoveryButton);
  findViewById(R.id.showOriginalButton).setOnTouchListener(createOnTouchShowOriginalButton());
  findViewById(R.id.straightenButton).setOnClickListener(createOnClickStraightenButton());
  findViewById(R.id.cropButton).setOnClickListener(createOnClickCropButton());
  findViewById(R.id.rotateButton).setOnClickListener(createOnClickRotateButton());
  findViewById(R.id.flipButton).setOnClickListener(createOnClickFlipButton());
  mVignetteButton.setOnClickListener(createOnClickVignetteButton());
  mCurvesButtonRGB.setOnClickListener(createOnClickCurvesRGBButton());
  mSharpenButton.setOnClickListener(createOnClickSharpenButton());
  mContrastButton.setOnClickListener(createOnClickContrastButton());
  mSaturationButton.setOnClickListener(createOnClickSaturationButton());
  mTintButton.setOnClickListener(createOnClickTintButton());
  mVibranceButton.setOnClickListener(createOnClickVibranceButton());
  mExposureButton.setOnClickListener(createOnClickExposureButton());
  mShadowRecoveryButton.setOnClickListener(createOnClickShadowRecoveryButton());
  mFxButton.setOnClickListener(createOnClickFxButton());
  mBorderButton.setOnClickListener(createOnClickBorderButton());
  mGeometryButton.setOnClickListener(createOnClickGeometryButton());
  mColorsButton.setOnClickListener(createOnClickColorsButton());
  findViewById(R.id.resetOperationsButton).setOnClickListener(createOnClickResetOperationsButton());
  ListView operationsList=(ListView)findViewById(R.id.operationsList);
  operationsList.setAdapter(mImageShow.getListAdapter());
  operationsList.setOnItemClickListener(this);
  mImageLoader.setAdapter((HistoryAdapter)mImageShow.getListAdapter());
  fillListImages(listFilters);
  fillListBorders(listBorders);
  mImageShow.setImageLoader(mImageLoader);
  mImageCurves.setImageLoader(mImageLoader);
  mImageCurves.setMaster(mImageShow);
  mImageBorders.setImageLoader(mImageLoader);
  mImageBorders.setMaster(mImageShow);
  mImageStraighten.setImageLoader(mImageLoader);
  mImageStraighten.setMaster(mImageShow);
  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);
  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);
  mImageViews.add(mImageShow);
  mImageViews.add(mImageCurves);
  mImageViews.add(mImageBorders);
  mImageViews.add(mImageStraighten);
  mListFx=findViewById(R.id.fxList);
  mListBorders=findViewById(R.id.bordersList);
  mListGeometry=findViewById(R.id.gemoetryList);
  mListColors=findViewById(R.id.colorsFxList);
  mListViews.add(mListFx);
  mListViews.add(mListBorders);
  mListViews.add(mListGeometry);
  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);
  mBottomPanelButtons.add(mFxButton);
  mBottomPanelButtons.add(mBorderButton);
  mBottomPanelButtons.add(mGeometryButton);
  mBottomPanelButtons.add(mColorsButton);
  mFxButton.setSelected(true);
  mVignetteButton=(ImageButton)findViewById(R.id.vignetteButton);
  mCurvesButtonRGB=(ImageButton)findViewById(R.id.curvesButtonRGB);
  mSharpenButton=(ImageButton)findViewById(R.id.sharpenButton);
  mVibranceButton=(ImageButton)findViewById(R.id.vibranceButton);
  mContrastButton=(ImageButton)findViewById(R.id.contrastButton);
  mSaturationButton=(ImageButton)findViewById(R.id.saturationButton);
  mTintButton=(ImageButton)findViewById(R.id.tintButton);
  mExposureButton=(ImageButton)findViewById(R.id.exposureButton);
  mShadowRecoveryButton=(ImageButton)findViewById(R.id.shadowRecoveryButton);
  mColorsPanelButtons.add(mVignetteButton);
  mColorsPanelButtons.add(mCurvesButtonRGB);
  mColorsPanelButtons.add(mSharpenButton);
  mColorsPanelButtons.add(mContrastButton);
  mColorsPanelButtons.add(mSaturationButton);
  mColorsPanelButtons.add(mTintButton);
  mColorsPanelButtons.add(mVibranceButton);
  mColorsPanelButtons.add(mExposureButton);
  mColorsPanelButtons.add(mShadowRecoveryButton);
  findViewById(R.id.showOriginalButton).setOnTouchListener(createOnTouchShowOriginalButton());
  findViewById(R.id.straightenButton).setOnClickListener(createOnClickStraightenButton());
  findViewById(R.id.cropButton).setOnClickListener(createOnClickCropButton());
  findViewById(R.id.rotateButton).setOnClickListener(createOnClickRotateButton());
  findViewById(R.id.flipButton).setOnClickListener(createOnClickFlipButton());
  mVignetteButton.setOnClickListener(createOnClickVignetteButton());
  mCurvesButtonRGB.setOnClickListener(createOnClickCurvesRGBButton());
  mSharpenButton.setOnClickListener(createOnClickSharpenButton());
  mContrastButton.setOnClickListener(createOnClickContrastButton());
  mSaturationButton.setOnClickListener(createOnClickSaturationButton());
  mTintButton.setOnClickListener(createOnClickTintButton());
  mVibranceButton.setOnClickListener(createOnClickVibranceButton());
  mExposureButton.setOnClickListener(createOnClickExposureButton());
  mShadowRecoveryButton.setOnClickListener(createOnClickShadowRecoveryButton());
  mFxButton.setOnClickListener(createOnClickFxButton());
  mBorderButton.setOnClickListener(createOnClickBorderButton());
  mGeometryButton.setOnClickListener(createOnClickGeometryButton());
  mColorsButton.setOnClickListener(createOnClickColorsButton());
  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);
  mImageShow.setImageLoader(mImageLoader);
  mImageCurves.setImageLoader(mImageLoader);
  mImageCurves.setMaster(mImageShow);
  mImageBorders.setImageLoader(mImageLoader);
  mImageBorders.setMaster(mImageShow);
  mImageStraighten.setImageLoader(mImageLoader);
  mImageStraighten.setMaster(mImageShow);
  Intent intent=getIntent();
  String data=intent.getDataString();
  if (data != null) {
    Uri uri=Uri.parse(data);
    mImageLoader.loadBitmap(uri);
  }
 else {
    pickImage();
  }
}