Program: 15212
Project: 15212
Buggy source:
@Override protected Boolean doInBackground(Post... posts){
  post=posts[0];
  nm=(NotificationManager)context.getSystemService("String_Node_Str");
  String postOrPage=(String)(post.isPage() ? context.getResources().getText(R.string.page_id) : context.getResources().getText(R.string.post_id));
  String message=context.getResources().getText(R.string.uploading) + "String_Node_Str" + postOrPage;
  n=new Notification(R.drawable.notification_icon,message,System.currentTimeMillis());
  Intent notificationIntent=new Intent(context,Posts.class);
  notificationIntent.setData((Uri.parse("String_Node_Str" + post.blogID)));
  notificationIntent.putExtra("String_Node_Str",true);
  PendingIntent pendingIntent=PendingIntent.getActivity(context,0,notificationIntent,Intent.FLAG_ACTIVITY_CLEAR_TOP);
  n.setLatestEventInfo(context,message,message,pendingIntent);
  notificationID=22 + Integer.valueOf(post.blogID);
  nm.notify(notificationID,n);
  if (post.post_status == null) {
    post.post_status="String_Node_Str";
  }
  Boolean publishThis=false;
  boolean mediaError=false;
  Spannable s;
  String descriptionContent="String_Node_Str", moreContent="String_Node_Str";
  int moreCount=1;
  if (post.getMt_text_more() != null)   moreCount++;
  for (int x=0; x < moreCount; x++) {
    if (x == 0)     s=(Spannable)WPHtml.fromHtml(post.getDescription(),context,post);
 else     s=(Spannable)WPHtml.fromHtml(post.getMt_text_more(),context,post);
    WPImageSpan[] click_spans=s.getSpans(0,s.length(),WPImageSpan.class);
    if (click_spans.length != 0) {
      for (int i=0; i < click_spans.length; i++) {
        String prompt=context.getResources().getText(R.string.uploading_media_item) + String.valueOf(i + 1);
        n.setLatestEventInfo(context,context.getResources().getText(R.string.uploading) + "String_Node_Str" + postOrPage,prompt,n.contentIntent);
        nm.notify(notificationID,n);
        WPImageSpan wpIS=click_spans[i];
        int start=s.getSpanStart(wpIS);
        int end=s.getSpanEnd(wpIS);
        MediaFile mf=new MediaFile();
        mf.setPostID(post.getId());
        mf.setTitle(wpIS.getTitle());
        mf.setCaption(wpIS.getCaption());
        mf.setDescription(wpIS.getDescription());
        mf.setFeatured(wpIS.isFeatured());
        mf.setFileName(wpIS.getImageSource().toString());
        mf.setHorizontalAlignment(wpIS.getHorizontalAlignment());
        mf.setWidth(wpIS.getWidth());
        String imgHTML=uploadImage(mf);
        if (imgHTML != null) {
          SpannableString ss=new SpannableString(imgHTML);
          s.setSpan(ss,start,end,Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
          s.removeSpan(wpIS);
        }
 else {
          mediaError=true;
        }
      }
    }
    if (x == 0)     descriptionContent=WPHtml.toHtml(s);
 else     moreContent=WPHtml.toHtml(s);
  }
  if (!mediaError) {
    JSONArray categories=post.getCategories();
    String[] theCategories=null;
    if (categories != null) {
      theCategories=new String[categories.length()];
      for (int i=0; i < categories.length(); i++) {
        try {
          theCategories[i]=categories.getString(i);
        }
 catch (        JSONException e) {
          e.printStackTrace();
        }
      }
    }
    Map<String,Object> contentStruct=new HashMap<String,Object>();
    if (!post.isPage) {
      HashMap<?,?> globalSettings=WordPress.wpDB.getNotificationOptions(context);
      boolean taglineValue=false;
      String tagline="String_Node_Str";
      if (globalSettings != null) {
        if (globalSettings.get("String_Node_Str").toString().equals("String_Node_Str")) {
          taglineValue=true;
        }
        if (taglineValue) {
          tagline=globalSettings.get("String_Node_Str").toString();
          if (tagline != null) {
            String tag="String_Node_Str" + tagline + "String_Node_Str";
            if (moreContent == "String_Node_Str")             descriptionContent+=tag;
 else             moreContent+=tag;
          }
        }
      }
      if (!post.getWP_post_format().equals("String_Node_Str")) {
        if (!post.getWP_post_format().equals("String_Node_Str"))         contentStruct.put("String_Node_Str",post.getWP_post_format());
      }
    }
    contentStruct.put("String_Node_Str",(post.isPage) ? "String_Node_Str" : "String_Node_Str");
    contentStruct.put("String_Node_Str",post.title);
    long pubDate=post.date_created_gmt;
    if (pubDate != 0) {
      Date date=new Date(pubDate);
      contentStruct.put("String_Node_Str",date);
    }
    descriptionContent=descriptionContent.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str");
    moreContent=moreContent.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str");
    if (!moreContent.equals("String_Node_Str")) {
      descriptionContent=descriptionContent + "String_Node_Str" + moreContent;
      post.mt_text_more="String_Node_Str";
    }
    descriptionContent=descriptionContent.replaceAll("String_Node_Str","String_Node_Str");
    contentStruct.put("String_Node_Str",descriptionContent);
    if (!post.isPage) {
      if (post.mt_keywords != "String_Node_Str") {
        contentStruct.put("String_Node_Str",post.mt_keywords);
      }
      if (theCategories != null) {
        if (theCategories.length > 0)         contentStruct.put("String_Node_Str",theCategories);
      }
    }
    contentStruct.put((post.isPage) ? "String_Node_Str" : "String_Node_Str",post.post_status);
    Double latitude=0.0;
    Double longitude=0.0;
    if (!post.isPage) {
      latitude=(Double)post.getLatitude();
      longitude=(Double)post.getLongitude();
      if (latitude > 0) {
        HashMap<Object,Object> hLatitude=new HashMap<Object,Object>();
        hLatitude.put("String_Node_Str","String_Node_Str");
        hLatitude.put("String_Node_Str",latitude);
        HashMap<Object,Object> hLongitude=new HashMap<Object,Object>();
        hLongitude.put("String_Node_Str","String_Node_Str");
        hLongitude.put("String_Node_Str",longitude);
        HashMap<Object,Object> hPublic=new HashMap<Object,Object>();
        hPublic.put("String_Node_Str","String_Node_Str");
        hPublic.put("String_Node_Str",1);
        Object[] geo={hLatitude,hLongitude,hPublic};
        contentStruct.put("String_Node_Str",geo);
      }
    }
    XMLRPCClient client=new XMLRPCClient(post.blog.getUrl(),post.blog.getHttpuser(),post.blog.getHttppassword());
    n.setLatestEventInfo(context,message,message,n.contentIntent);
    nm.notify(notificationID,n);
    if (post.wp_password != null) {
      contentStruct.put("String_Node_Str",post.wp_password);
    }
    Object[] params;
    if (post.isLocalDraft() && !post.uploaded)     params=new Object[]{post.blog.getBlogId(),post.blog.getUsername(),post.blog.getPassword(),contentStruct,publishThis};
 else     params=new Object[]{post.getPostid(),post.blog.getUsername(),post.blog.getPassword(),contentStruct,publishThis};
    try {
      client.call((post.isLocalDraft() && !post.uploaded) ? "String_Node_Str" : "String_Node_Str",params);
      post.setUploaded(true);
      post.update();
      return true;
    }
 catch (    final XMLRPCException e) {
      error=e.getLocalizedMessage();
    }
  }
  return false;
}

Fixed version (ground truth):
@Override protected Boolean doInBackground(Post... posts){
  post=posts[0];
  nm=(NotificationManager)context.getSystemService("String_Node_Str");
  String postOrPage=(String)(post.isPage() ? context.getResources().getText(R.string.page_id) : context.getResources().getText(R.string.post_id));
  String message=context.getResources().getText(R.string.uploading) + "String_Node_Str" + postOrPage;
  n=new Notification(R.drawable.notification_icon,message,System.currentTimeMillis());
  Intent notificationIntent=new Intent(context,Posts.class);
  notificationIntent.setData((Uri.parse("String_Node_Str" + post.blogID)));
  notificationIntent.putExtra("String_Node_Str",true);
  PendingIntent pendingIntent=PendingIntent.getActivity(context,0,notificationIntent,Intent.FLAG_ACTIVITY_CLEAR_TOP);
  n.setLatestEventInfo(context,message,message,pendingIntent);
  notificationID=22 + Integer.valueOf(post.blogID);
  nm.notify(notificationID,n);
  if (post.post_status == null) {
    post.post_status="String_Node_Str";
  }
  Boolean publishThis=false;
  boolean mediaError=false;
  Spannable s;
  String descriptionContent="String_Node_Str", moreContent="String_Node_Str";
  int moreCount=1;
  if (post.getMt_text_more() != null)   moreCount++;
  for (int x=0; x < moreCount; x++) {
    if (x == 0)     s=(Spannable)WPHtml.fromHtml(post.getDescription(),context,post);
 else     s=(Spannable)WPHtml.fromHtml(post.getMt_text_more(),context,post);
    WPImageSpan[] click_spans=s.getSpans(0,s.length(),WPImageSpan.class);
    if (click_spans.length != 0) {
      for (int i=0; i < click_spans.length; i++) {
        String prompt=context.getResources().getText(R.string.uploading_media_item) + String.valueOf(i + 1);
        n.setLatestEventInfo(context,context.getResources().getText(R.string.uploading) + "String_Node_Str" + postOrPage,prompt,n.contentIntent);
        nm.notify(notificationID,n);
        WPImageSpan wpIS=click_spans[i];
        int start=s.getSpanStart(wpIS);
        int end=s.getSpanEnd(wpIS);
        MediaFile mf=new MediaFile();
        mf.setPostID(post.getId());
        mf.setTitle(wpIS.getTitle());
        mf.setCaption(wpIS.getCaption());
        mf.setDescription(wpIS.getDescription());
        mf.setFeatured(wpIS.isFeatured());
        mf.setFileName(wpIS.getImageSource().toString());
        mf.setHorizontalAlignment(wpIS.getHorizontalAlignment());
        mf.setWidth(wpIS.getWidth());
        String imgHTML=uploadImage(mf);
        if (imgHTML != null) {
          SpannableString ss=new SpannableString(imgHTML);
          s.setSpan(ss,start,end,Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
          s.removeSpan(wpIS);
        }
 else {
          mediaError=true;
        }
      }
    }
    if (x == 0)     descriptionContent=WPHtml.toHtml(s);
 else     moreContent=WPHtml.toHtml(s);
  }
  if (!mediaError) {
    JSONArray categories=post.getCategories();
    String[] theCategories=null;
    if (categories != null) {
      theCategories=new String[categories.length()];
      for (int i=0; i < categories.length(); i++) {
        try {
          theCategories[i]=categories.getString(i);
        }
 catch (        JSONException e) {
          e.printStackTrace();
        }
      }
    }
    Map<String,Object> contentStruct=new HashMap<String,Object>();
    if (!post.isPage) {
      HashMap<?,?> globalSettings=WordPress.wpDB.getNotificationOptions(context);
      boolean taglineValue=false;
      String tagline="String_Node_Str";
      if (globalSettings != null) {
        if (globalSettings.get("String_Node_Str").toString().equals("String_Node_Str")) {
          taglineValue=true;
        }
        if (taglineValue) {
          tagline=globalSettings.get("String_Node_Str").toString();
          if (tagline != null) {
            String tag="String_Node_Str" + tagline + "String_Node_Str";
            if (moreContent == "String_Node_Str")             descriptionContent+=tag;
 else             moreContent+=tag;
          }
        }
      }
      if (!post.getWP_post_format().equals("String_Node_Str")) {
        if (!post.getWP_post_format().equals("String_Node_Str"))         contentStruct.put("String_Node_Str",post.getWP_post_format());
      }
    }
    contentStruct.put("String_Node_Str",(post.isPage) ? "String_Node_Str" : "String_Node_Str");
    contentStruct.put("String_Node_Str",post.title);
    long pubDate=post.date_created_gmt;
    if (pubDate != 0) {
      Date dateCreated=new Date(pubDate);
      contentStruct.put("String_Node_Str",dateCreated);
      Date date_created_gmt=new Date(pubDate + (dateCreated.getTimezoneOffset() * 60000));
      contentStruct.put("String_Node_Str",date_created_gmt);
    }
    descriptionContent=descriptionContent.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str");
    moreContent=moreContent.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str");
    if (!moreContent.equals("String_Node_Str")) {
      descriptionContent=descriptionContent + "String_Node_Str" + moreContent;
      post.mt_text_more="String_Node_Str";
    }
    descriptionContent=descriptionContent.replaceAll("String_Node_Str","String_Node_Str");
    contentStruct.put("String_Node_Str",descriptionContent);
    if (!post.isPage) {
      if (post.mt_keywords != "String_Node_Str") {
        contentStruct.put("String_Node_Str",post.mt_keywords);
      }
      if (theCategories != null) {
        if (theCategories.length > 0)         contentStruct.put("String_Node_Str",theCategories);
      }
    }
    contentStruct.put((post.isPage) ? "String_Node_Str" : "String_Node_Str",post.post_status);
    Double latitude=0.0;
    Double longitude=0.0;
    if (!post.isPage) {
      latitude=(Double)post.getLatitude();
      longitude=(Double)post.getLongitude();
      if (latitude > 0) {
        HashMap<Object,Object> hLatitude=new HashMap<Object,Object>();
        hLatitude.put("String_Node_Str","String_Node_Str");
        hLatitude.put("String_Node_Str",latitude);
        HashMap<Object,Object> hLongitude=new HashMap<Object,Object>();
        hLongitude.put("String_Node_Str","String_Node_Str");
        hLongitude.put("String_Node_Str",longitude);
        HashMap<Object,Object> hPublic=new HashMap<Object,Object>();
        hPublic.put("String_Node_Str","String_Node_Str");
        hPublic.put("String_Node_Str",1);
        Object[] geo={hLatitude,hLongitude,hPublic};
        contentStruct.put("String_Node_Str",geo);
      }
    }
    XMLRPCClient client=new XMLRPCClient(post.blog.getUrl(),post.blog.getHttpuser(),post.blog.getHttppassword());
    n.setLatestEventInfo(context,message,message,n.contentIntent);
    nm.notify(notificationID,n);
    if (post.wp_password != null) {
      contentStruct.put("String_Node_Str",post.wp_password);
    }
    Object[] params;
    if (post.isLocalDraft() && !post.uploaded)     params=new Object[]{post.blog.getBlogId(),post.blog.getUsername(),post.blog.getPassword(),contentStruct,publishThis};
 else     params=new Object[]{post.getPostid(),post.blog.getUsername(),post.blog.getPassword(),contentStruct,publishThis};
    try {
      client.call((post.isLocalDraft() && !post.uploaded) ? "String_Node_Str" : "String_Node_Str",params);
      post.setUploaded(true);
      post.update();
      return true;
    }
 catch (    final XMLRPCException e) {
      error=e.getLocalizedMessage();
    }
  }
  return false;
}