Program: 87091
Project: 87091
Buggy source:
protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.share_photo);
  Display display=getWindowManager().getDefaultDisplay();
  screenWidth=(int)(display.getWidth() * 0.95);
  margin=(int)((display.getWidth() - screenWidth) / 2);
  btnSelectGroup=(Button)findViewById(R.id.groups_spinner);
  comment=(EditText)findViewById(R.id.edit_message);
  imageView=(ImageView)findViewById(R.id.image1);
  LayoutParams params=(LayoutParams)imageView.getLayoutParams();
  params.width=screenWidth;
  params.height=screenWidth;
  params.setMargins(0,margin,0,margin);
  imageView.setLayoutParams(params);
  locationImg=(ImageView)findViewById(R.id.img_location_ok);
  locationTxt=(TextView)findViewById(R.id.txt_location);
  imageLoader=ImageLoader.getInstance();
  mLocationManager=(LocationManager)getSystemService(Context.LOCATION_SERVICE);
  final boolean gpsEnabled=mLocationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);
  if (!gpsEnabled) {
    Util.createGpsDisabledAlert(this);
  }
  Intent intent=getIntent();
  if (intent.getType() != null && intent.getType().indexOf("String_Node_Str") != -1) {
    fileUri=(Uri)intent.getParcelableExtra(Intent.EXTRA_STREAM);
    if (fileUri != null) {
      String path=Util.getRealPathFromURI(this,fileUri);
      fileUri=Uri.parse(path);
      rotation=Util.getRotationDegrees(fileUri.getPath());
      imageView.setImageBitmap(Util.decodeSampledBitmapFromFile(path,screenWidth,screenWidth,rotation));
      setupGps();
    }
  }
 else {
    if (fileUri == null) {
      Intent cameraIntent=new Intent(this,CameraActivity.class);
      startActivityForResult(cameraIntent,TAKE_PICTURE);
    }
  }
}

Fixed version (ground truth):
protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.share_photo);
  Display display=getWindowManager().getDefaultDisplay();
  screenWidth=(int)(display.getWidth() * 0.95);
  margin=(int)((display.getWidth() - screenWidth) / 2);
  btnSelectGroup=(Button)findViewById(R.id.groups_spinner);
  comment=(EditText)findViewById(R.id.edit_message);
  imageView=(ImageView)findViewById(R.id.image1);
  LayoutParams params=(LayoutParams)imageView.getLayoutParams();
  params.width=screenWidth;
  params.height=screenWidth;
  params.setMargins(0,margin,0,margin);
  imageView.setLayoutParams(params);
  locationImg=(ImageView)findViewById(R.id.img_location_ok);
  locationTxt=(TextView)findViewById(R.id.txt_location);
  imageLoader=ImageLoader.getInstance();
  mLocationManager=(LocationManager)getSystemService(Context.LOCATION_SERVICE);
  final boolean gpsEnabled=mLocationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);
  if (!gpsEnabled) {
    Util.createGpsDisabledAlert(this);
  }
  Intent intent=getIntent();
  if (intent.getType() != null && intent.getType().indexOf("String_Node_Str") != -1) {
    fileUri=(Uri)intent.getParcelableExtra(Intent.EXTRA_STREAM);
    if (fileUri != null) {
      String path=Util.getRealPathFromURI(this,fileUri);
      fileUri=Uri.parse(path);
      rotation=Util.getRotationDegrees(fileUri.getPath());
      imageView.setImageBitmap(Util.decodeSampledBitmapFromFile(path,screenWidth,screenWidth,rotation));
      setupGps();
    }
  }
 else {
    Intent cameraIntent=new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
    fileUri=Util.getOutputMediaFileUri(Util.MEDIA_TYPE_IMAGE);
    cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT,fileUri);
    startActivityForResult(cameraIntent,TAKE_PICTURE);
  }
}