Program: 13934
Project: 13934
Buggy source:
private MediaModel queueFileForUpload(Uri uri,String mimeType,ArrayList<Long> mediaIdOut,String startingState){
  String path=getRealPathFromURI(uri);
  if (TextUtils.isEmpty(path)) {
    Toast.makeText(this,R.string.editor_toast_invalid_path,Toast.LENGTH_SHORT).show();
    return null;
  }
  File file=new File(path);
  if (!file.exists()) {
    Toast.makeText(this,R.string.file_not_found,Toast.LENGTH_SHORT).show();
    return null;
  }
  MediaModel media=mMediaStore.instantiateMediaModel();
  AppLog.i(T.MEDIA,"String_Node_Str" + media.getId());
  String filename=org.wordpress.android.fluxc.utils.MediaUtils.getFileName(path);
  String fileExtension=org.wordpress.android.fluxc.utils.MediaUtils.getExtension(path);
  if (mimeType == null) {
    mimeType=getContentResolver().getType(uri);
    if (mimeType == null) {
      mimeType=MimeTypeMap.getSingleton().getMimeTypeFromExtension(fileExtension);
    }
    if (mimeType == null) {
      mimeType="String_Node_Str";
    }
  }
  if (fileExtension == null) {
    fileExtension=MimeTypeMap.getSingleton().getExtensionFromMimeType(mimeType);
    filename+="String_Node_Str" + fileExtension;
  }
  media.setFileName(filename);
  media.setFilePath(path);
  media.setLocalSiteId(mSite.getId());
  media.setFileExtension(fileExtension);
  media.setMimeType(mimeType);
  media.setUploadState(MediaUploadState.QUEUED.toString());
  media.setUploadDate(DateTimeUtils.iso8601UTCFromTimestamp(System.currentTimeMillis() / 1000));
  mDispatcher.dispatch(MediaActionBuilder.newUpdateMediaAction(media));
  mPendingUploads.add(media);
  startMediaUploadService();
  return media;
}

Fixed version (ground truth):
private MediaModel queueFileForUpload(Uri uri,String mimeType,ArrayList<Long> mediaIdOut,String startingState){
  String path=getRealPathFromURI(uri);
  if (TextUtils.isEmpty(path)) {
    Toast.makeText(this,R.string.editor_toast_invalid_path,Toast.LENGTH_SHORT).show();
    return null;
  }
  File file=new File(path);
  if (!file.exists()) {
    Toast.makeText(this,R.string.file_not_found,Toast.LENGTH_SHORT).show();
    return null;
  }
  MediaModel media=mMediaStore.instantiateMediaModel();
  AppLog.i(T.MEDIA,"String_Node_Str" + media.getId());
  String filename=org.wordpress.android.fluxc.utils.MediaUtils.getFileName(path);
  String fileExtension=org.wordpress.android.fluxc.utils.MediaUtils.getExtension(path);
  if (mimeType == null) {
    mimeType=getContentResolver().getType(uri);
    if (mimeType == null) {
      mimeType=MimeTypeMap.getSingleton().getMimeTypeFromExtension(fileExtension);
    }
    if (mimeType == null) {
      mimeType="String_Node_Str";
    }
  }
  if (fileExtension == null) {
    fileExtension=MimeTypeMap.getSingleton().getExtensionFromMimeType(mimeType);
    filename+="String_Node_Str" + fileExtension;
  }
  if (org.wordpress.android.fluxc.utils.MediaUtils.isVideoMimeType(mimeType)) {
    media.setThumbnailUrl(getVideoThumbnail(path));
  }
  media.setFileName(filename);
  media.setFilePath(path);
  media.setLocalSiteId(mSite.getId());
  media.setFileExtension(fileExtension);
  media.setMimeType(mimeType);
  media.setUploadState(MediaUploadState.QUEUED.toString());
  media.setUploadDate(DateTimeUtils.iso8601UTCFromTimestamp(System.currentTimeMillis() / 1000));
  mDispatcher.dispatch(MediaActionBuilder.newUpdateMediaAction(media));
  mPendingUploads.add(media);
  startMediaUploadService();
  return media;
}