Program: 40200
Project: 40200
Buggy source:
@Override protected void onActivityResult(int requestCode,int resultCode,Intent data){
  Log.i("String_Node_Str","String_Node_Str");
  Log.i("String_Node_Str","String_Node_Str" + requestCode + "String_Node_Str"+ resultCode+ "String_Node_Str"+ ((null != data) ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str");
  if (REQUEST_IMAGE_CAPTURE == requestCode && RESULT_OK == resultCode) {
    Log.i("String_Node_Str","String_Node_Str");
    if (doUseImageDataFromIntent()) {
      Log.i("String_Node_Str","String_Node_Str");
      Bundle extras=data.getExtras();
      Log.i("String_Node_Str","String_Node_Str");
      Bitmap bmp=(Bitmap)extras.get("String_Node_Str");
      try {
        Log.i("String_Node_Str","String_Node_Str");
        FileOutputStream out=new FileOutputStream(mCurrentPhotoPath);
        Log.i("String_Node_Str","String_Node_Str");
        bmp.compress(Bitmap.CompressFormat.PNG,100,out);
        out.flush();
        out.close();
        Log.i("String_Node_Str","String_Node_Str");
      }
 catch (      Exception e) {
        Log.e("String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
      }
    }
    resizePictureToThumbnail(mCurrentPhotoPath);
    Log.i("String_Node_Str","String_Node_Str");
    documentPartsDataSource.ensureConnectionIsOpen();
    documentPartsDataSource.createDocument(FileType.fromInt(selectedFileTypeId),mCurrentPhotoFilename);
    Log.i("String_Node_Str","String_Node_Str");
    refreshDocumentPartList();
  }
 else   if (RESULT_OK == resultCode && UCrop.REQUEST_CROP == requestCode) {
    Log.i("String_Node_Str","String_Node_Str");
    final Uri resultUri=UCrop.getOutput(data);
    resizePictureToThumbnail(resultUri.getPath());
    Log.i("String_Node_Str","String_Node_Str" + resultUri);
    refreshDocumentPartList();
  }
 else   if (UCrop.RESULT_ERROR == resultCode) {
    Log.i("String_Node_Str","String_Node_Str");
    final Throwable cropError=UCrop.getError(data);
    Log.i("String_Node_Str","String_Node_Str" + cropError.getLocalizedMessage());
  }
 else {
    Log.i("String_Node_Str","String_Node_Str" + resultCode + "String_Node_Str"+ requestCode+ "String_Node_Str");
  }
  Log.i("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Override protected void onActivityResult(int requestCode,int resultCode,Intent data){
  Log.i("String_Node_Str","String_Node_Str");
  Log.i("String_Node_Str","String_Node_Str" + requestCode + "String_Node_Str"+ resultCode+ "String_Node_Str"+ ((null != data) ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str");
  if (REQUEST_IMAGE_CAPTURE == requestCode && RESULT_OK == resultCode) {
    Log.i("String_Node_Str","String_Node_Str");
    if (doUseImageDataFromIntent()) {
      Log.i("String_Node_Str","String_Node_Str");
      Bundle extras=data.getExtras();
      Log.i("String_Node_Str","String_Node_Str");
      Bitmap bmp=(Bitmap)extras.get("String_Node_Str");
      try {
        Log.i("String_Node_Str","String_Node_Str");
        FileOutputStream out=new FileOutputStream(mCurrentPhotoPath);
        Log.i("String_Node_Str","String_Node_Str");
        bmp.compress(Bitmap.CompressFormat.PNG,100,out);
        out.flush();
        out.close();
        Log.i("String_Node_Str","String_Node_Str");
      }
 catch (      Exception e) {
        Log.e("String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
        Toast.makeText(getApplicationContext(),getString(R.string.camera_general_error),Toast.LENGTH_LONG).show();
        return;
      }
    }
    resizePictureToThumbnail(mCurrentPhotoPath);
    Log.i("String_Node_Str","String_Node_Str");
    documentPartsDataSource.ensureConnectionIsOpen();
    documentPartsDataSource.createDocument(FileType.fromInt(selectedFileTypeId),mCurrentPhotoFilename);
    Log.i("String_Node_Str","String_Node_Str");
    refreshDocumentPartList();
  }
 else   if (RESULT_OK == resultCode && UCrop.REQUEST_CROP == requestCode) {
    Log.i("String_Node_Str","String_Node_Str");
    final Uri resultUri=UCrop.getOutput(data);
    resizePictureToThumbnail(resultUri.getPath());
    Log.i("String_Node_Str","String_Node_Str" + resultUri);
    refreshDocumentPartList();
  }
 else   if (UCrop.RESULT_ERROR == resultCode) {
    Log.i("String_Node_Str","String_Node_Str");
    final Throwable cropError=UCrop.getError(data);
    Log.i("String_Node_Str","String_Node_Str" + cropError.getLocalizedMessage());
  }
 else {
    Log.i("String_Node_Str","String_Node_Str" + resultCode + "String_Node_Str"+ requestCode+ "String_Node_Str");
  }
  Log.i("String_Node_Str","String_Node_Str");
}