Program: 187211
Project: 187211
Buggy source:
public void run(){
  ServerManager sm=StoryMakerApp.getServerManager();
  sm.setContext(mActivity.getBaseContext());
  Message msg=mHandlerPub.obtainMessage(888);
  msg.getData().putString("String_Node_Str",getActivity().getString(R.string.rendering_clips_));
  mHandlerPub.sendMessage(msg);
  try {
    mActivity.mMPM.doExportMedia(exportFileName,doYouTube);
    mActivity.mdExported=mActivity.mMPM.getExportMedia();
    File mediaFile=new File(mActivity.mdExported.path);
    if (mediaFile.exists()) {
      Message message=mHandlerPub.obtainMessage(777);
      message.getData().putString("String_Node_Str",mActivity.mdExported.path);
      message.getData().putString("String_Node_Str",mActivity.mdExported.mimeType);
      if (doYouTube) {
        String mediaEmbed="String_Node_Str";
        if (mActivity.mMPM.mProject.getStoryType() == Project.STORY_TYPE_VIDEO || mActivity.mMPM.mProject.getStoryType() == Project.STORY_TYPE_ESSAY) {
          msg=mHandlerPub.obtainMessage(888);
          msg.getData().putString("String_Node_Str",getActivity().getString(R.string.uploading));
          msg.getData().putString("String_Node_Str",getActivity().getString(R.string.connecting_to_youtube_));
          mHandlerPub.sendMessage(msg);
          yts.setVideoFile(mediaFile,mActivity.mdExported.mimeType);
          yts.getAuthTokenWithPermission(mMediaUploadAccount);
          while (yts.videoId == null) {
            try {
              Thread.sleep(1000);
            }
 catch (            Exception e) {
            }
          }
          mediaEmbed="String_Node_Str" + yts.videoId + "String_Node_Str";
          message.getData().putString("String_Node_Str",yts.videoId);
        }
 else         if (mActivity.mMPM.mProject.getStoryType() == Project.STORY_TYPE_AUDIO) {
          boolean installed=SoundCloudUploader.isCompatibleSoundCloudInstalled(mActivity.getBaseContext());
          if (installed) {
            String scurl=SoundCloudUploader.buildSoundCloudURL(mMediaUploadAccount,mediaFile,title);
            mediaEmbed="String_Node_Str" + scurl + "String_Node_Str";
            SoundCloudUploader.uploadSound(mediaFile,title,desc,REQ_SOUNDCLOUD,mActivity);
          }
 else {
            SoundCloudUploader.installSoundCloud(mActivity.getBaseContext());
          }
        }
 else         if (sm.hasCreds()) {
          String murl=sm.addMedia(mActivity.mdExported.mimeType,mediaFile);
          mediaEmbed=murl;
        }
        if (doStoryMaker) {
          String descWithMedia=desc + "String_Node_Str" + mediaEmbed;
          String postId=sm.post(title,descWithMedia);
          String urlPost=sm.getPostUrl(postId);
          message.getData().putString("String_Node_Str",urlPost);
        }
      }
      mHandlerPub.sendMessage(message);
    }
 else {
      Message msgErr=new Message();
      msgErr.what=-1;
      msgErr.getData().putString("String_Node_Str","String_Node_Str");
      mHandlerPub.sendMessage(msgErr);
    }
  }
 catch (  XmlRpcFault e) {
    Message msgErr=new Message();
    msgErr.what=-1;
    msgErr.getData().putString("String_Node_Str",e.getLocalizedMessage());
    mHandlerPub.sendMessage(msgErr);
    Log.e(AppConstants.TAG,"String_Node_Str",e);
  }
catch (  Exception e) {
    Message msgErr=new Message();
    msgErr.what=-1;
    msgErr.getData().putString("String_Node_Str",e.getLocalizedMessage());
    mHandlerPub.sendMessage(msgErr);
    Log.e(AppConstants.TAG,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void run(){
  ServerManager sm=StoryMakerApp.getServerManager();
  sm.setContext(mActivity.getBaseContext());
  Message msg=mHandlerPub.obtainMessage(888);
  msg.getData().putString("String_Node_Str",getActivity().getString(R.string.rendering_clips_));
  mHandlerPub.sendMessage(msg);
  try {
    File fileExport=mActivity.mMPM.getExportMediaFile();
    boolean overwrite=false;
    mActivity.mMPM.doExportMedia(fileExport,doYouTube,overwrite);
    mActivity.mdExported=mActivity.mMPM.getExportMedia();
    File mediaFile=new File(mActivity.mdExported.path);
    if (mediaFile.exists()) {
      Message message=mHandlerPub.obtainMessage(777);
      message.getData().putString("String_Node_Str",mActivity.mdExported.path);
      message.getData().putString("String_Node_Str",mActivity.mdExported.mimeType);
      if (doYouTube) {
        String mediaEmbed="String_Node_Str";
        if (mActivity.mMPM.mProject.getStoryType() == Project.STORY_TYPE_VIDEO || mActivity.mMPM.mProject.getStoryType() == Project.STORY_TYPE_ESSAY) {
          msg=mHandlerPub.obtainMessage(888);
          msg.getData().putString("String_Node_Str",getActivity().getString(R.string.uploading));
          msg.getData().putString("String_Node_Str",getActivity().getString(R.string.connecting_to_youtube_));
          mHandlerPub.sendMessage(msg);
          yts.setVideoFile(mediaFile,mActivity.mdExported.mimeType);
          yts.getAuthTokenWithPermission(mMediaUploadAccount);
          while (yts.videoId == null) {
            try {
              Thread.sleep(1000);
            }
 catch (            Exception e) {
            }
          }
          mediaEmbed="String_Node_Str" + yts.videoId + "String_Node_Str";
          message.getData().putString("String_Node_Str",yts.videoId);
        }
 else         if (mActivity.mMPM.mProject.getStoryType() == Project.STORY_TYPE_AUDIO) {
          boolean installed=SoundCloudUploader.isCompatibleSoundCloudInstalled(mActivity.getBaseContext());
          if (installed) {
            String scurl=SoundCloudUploader.buildSoundCloudURL(mMediaUploadAccount,mediaFile,title);
            mediaEmbed="String_Node_Str" + scurl + "String_Node_Str";
            SoundCloudUploader.uploadSound(mediaFile,title,desc,REQ_SOUNDCLOUD,mActivity);
          }
 else {
            SoundCloudUploader.installSoundCloud(mActivity.getBaseContext());
          }
        }
 else         if (sm.hasCreds()) {
          String murl=sm.addMedia(mActivity.mdExported.mimeType,mediaFile);
          mediaEmbed=murl;
        }
        if (doStoryMaker) {
          String descWithMedia=desc + "String_Node_Str" + mediaEmbed;
          String[] categories=null;
          String postId=sm.post(title,descWithMedia,categories);
          String urlPost=sm.getPostUrl(postId);
          message.getData().putString("String_Node_Str",urlPost);
        }
      }
      mHandlerPub.sendMessage(message);
    }
 else {
      Message msgErr=new Message();
      msgErr.what=-1;
      msgErr.getData().putString("String_Node_Str","String_Node_Str");
      mHandlerPub.sendMessage(msgErr);
    }
  }
 catch (  XmlRpcFault e) {
    Message msgErr=new Message();
    msgErr.what=-1;
    msgErr.getData().putString("String_Node_Str",e.getLocalizedMessage());
    mHandlerPub.sendMessage(msgErr);
    Log.e(AppConstants.TAG,"String_Node_Str",e);
  }
catch (  Exception e) {
    Message msgErr=new Message();
    msgErr.what=-1;
    msgErr.getData().putString("String_Node_Str",e.getLocalizedMessage());
    mHandlerPub.sendMessage(msgErr);
    Log.e(AppConstants.TAG,"String_Node_Str",e);
  }
}