Program: 20422
Project: 20422
Buggy source:
/** 
 * Parse the comment, subject, tripcodes, names etc. as spannables.<br> This is done on a background thread for performance, even when it is UI code.<br> The results will be placed on the Post.*Span members.
 * @param theme Theme to use for parsing
 * @param post  Post to get data from
 */
private void parseSpans(Theme theme,Post post){
  boolean anonymize=ChanSettings.anonymize.get();
  boolean anonymizeIds=ChanSettings.anonymizeIds.get();
  if (anonymize) {
    post.name="String_Node_Str";
    post.tripcode="String_Node_Str";
  }
  if (anonymizeIds) {
    post.id="String_Node_Str";
  }
  int detailsSizePx=sp(Integer.parseInt(ChanSettings.fontSize.get()) - 4);
  if (!TextUtils.isEmpty(post.subject)) {
    post.subjectSpan=new SpannableString(post.subject);
    if (!post.filterStub) {
      post.subjectSpan.setSpan(new ForegroundColorSpan(theme.subjectColor),0,post.subjectSpan.length(),0);
    }
  }
  if (!TextUtils.isEmpty(post.name) && !post.name.equals("String_Node_Str")) {
    post.nameSpan=new SpannableString(post.name);
    post.nameSpan.setSpan(new ForegroundColorSpan(theme.nameColor),0,post.nameSpan.length(),0);
  }
  if (!TextUtils.isEmpty(post.tripcode)) {
    post.tripcodeSpan=new SpannableString(post.tripcode);
    post.tripcodeSpan.setSpan(new ForegroundColorSpan(theme.nameColor),0,post.tripcodeSpan.length(),0);
    post.tripcodeSpan.setSpan(new AbsoluteSizeSpan(detailsSizePx),0,post.tripcodeSpan.length(),0);
  }
  if (!TextUtils.isEmpty(post.id)) {
    post.idSpan=new SpannableString("String_Node_Str" + post.id + "String_Node_Str");
    int hash=post.id.hashCode();
    int r=(hash >> 24) & 0xff;
    int g=(hash >> 16) & 0xff;
    int b=(hash >> 8) & 0xff;
    int idColor=(0xff << 24) + (r << 16) + (g << 8)+ b;
    boolean lightColor=(r * 0.299f) + (g * 0.587f) + (b * 0.114f) > 125f;
    int idBgColor=lightColor ? theme.idBackgroundLight : theme.idBackgroundDark;
    post.idSpan.setSpan(new ForegroundColorSpan(idColor),0,post.idSpan.length(),0);
    post.idSpan.setSpan(new BackgroundColorSpan(idBgColor),0,post.idSpan.length(),0);
    post.idSpan.setSpan(new AbsoluteSizeSpan(detailsSizePx),0,post.idSpan.length(),0);
  }
  if (!TextUtils.isEmpty(post.capcode)) {
    post.capcodeSpan=new SpannableString("String_Node_Str" + post.capcode);
    post.capcodeSpan.setSpan(new ForegroundColorSpan(theme.capcodeColor),0,post.capcodeSpan.length(),0);
    post.capcodeSpan.setSpan(new AbsoluteSizeSpan(detailsSizePx),0,post.capcodeSpan.length(),0);
  }
  post.nameTripcodeIdCapcodeSpan=new SpannableString("String_Node_Str");
  if (post.nameSpan != null) {
    post.nameTripcodeIdCapcodeSpan=TextUtils.concat(post.nameTripcodeIdCapcodeSpan,post.nameSpan,"String_Node_Str");
  }
  if (post.tripcodeSpan != null) {
    post.nameTripcodeIdCapcodeSpan=TextUtils.concat(post.nameTripcodeIdCapcodeSpan,post.tripcodeSpan,"String_Node_Str");
  }
  if (post.idSpan != null) {
    post.nameTripcodeIdCapcodeSpan=TextUtils.concat(post.nameTripcodeIdCapcodeSpan,post.idSpan,"String_Node_Str");
  }
  if (post.capcodeSpan != null) {
    post.nameTripcodeIdCapcodeSpan=TextUtils.concat(post.nameTripcodeIdCapcodeSpan,post.capcodeSpan,"String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Parse the comment, subject, tripcodes, names etc. as spannables.<br> This is done on a background thread for performance, even when it is UI code.<br> The results will be placed on the Post.*Span members.
 * @param theme Theme to use for parsing
 * @param post  Post to get data from
 */
private void parseSpans(Theme theme,Post post){
  boolean anonymize=ChanSettings.anonymize.get();
  boolean anonymizeIds=ChanSettings.anonymizeIds.get();
  if (anonymize) {
    post.name="String_Node_Str";
    post.tripcode="String_Node_Str";
  }
  if (anonymizeIds) {
    post.id="String_Node_Str";
  }
  int detailsSizePx=sp(Integer.parseInt(ChanSettings.fontSize.get()) - 4);
  if (!TextUtils.isEmpty(post.subject)) {
    post.subjectSpan=new SpannableString(post.subject);
    if (!post.filterStub) {
      post.subjectSpan.setSpan(new ForegroundColorSpanHashed(theme.subjectColor),0,post.subjectSpan.length(),0);
    }
  }
  if (!TextUtils.isEmpty(post.name) && !post.name.equals("String_Node_Str")) {
    post.nameSpan=new SpannableString(post.name);
    post.nameSpan.setSpan(new ForegroundColorSpanHashed(theme.nameColor),0,post.nameSpan.length(),0);
  }
  if (!TextUtils.isEmpty(post.tripcode)) {
    post.tripcodeSpan=new SpannableString(post.tripcode);
    post.tripcodeSpan.setSpan(new ForegroundColorSpanHashed(theme.nameColor),0,post.tripcodeSpan.length(),0);
    post.tripcodeSpan.setSpan(new AbsoluteSizeSpanHashed(detailsSizePx),0,post.tripcodeSpan.length(),0);
  }
  if (!TextUtils.isEmpty(post.id)) {
    post.idSpan=new SpannableString("String_Node_Str" + post.id + "String_Node_Str");
    int hash=post.id.hashCode();
    int r=(hash >> 24) & 0xff;
    int g=(hash >> 16) & 0xff;
    int b=(hash >> 8) & 0xff;
    int idColor=(0xff << 24) + (r << 16) + (g << 8)+ b;
    boolean lightColor=(r * 0.299f) + (g * 0.587f) + (b * 0.114f) > 125f;
    int idBgColor=lightColor ? theme.idBackgroundLight : theme.idBackgroundDark;
    post.idSpan.setSpan(new ForegroundColorSpanHashed(idColor),0,post.idSpan.length(),0);
    post.idSpan.setSpan(new BackgroundColorSpan(idBgColor),0,post.idSpan.length(),0);
    post.idSpan.setSpan(new AbsoluteSizeSpanHashed(detailsSizePx),0,post.idSpan.length(),0);
  }
  if (!TextUtils.isEmpty(post.capcode)) {
    post.capcodeSpan=new SpannableString("String_Node_Str" + post.capcode);
    post.capcodeSpan.setSpan(new ForegroundColorSpanHashed(theme.capcodeColor),0,post.capcodeSpan.length(),0);
    post.capcodeSpan.setSpan(new AbsoluteSizeSpanHashed(detailsSizePx),0,post.capcodeSpan.length(),0);
  }
  post.nameTripcodeIdCapcodeSpan=new SpannableString("String_Node_Str");
  if (post.nameSpan != null) {
    post.nameTripcodeIdCapcodeSpan=TextUtils.concat(post.nameTripcodeIdCapcodeSpan,post.nameSpan,"String_Node_Str");
  }
  if (post.tripcodeSpan != null) {
    post.nameTripcodeIdCapcodeSpan=TextUtils.concat(post.nameTripcodeIdCapcodeSpan,post.tripcodeSpan,"String_Node_Str");
  }
  if (post.idSpan != null) {
    post.nameTripcodeIdCapcodeSpan=TextUtils.concat(post.nameTripcodeIdCapcodeSpan,post.idSpan,"String_Node_Str");
  }
  if (post.capcodeSpan != null) {
    post.nameTripcodeIdCapcodeSpan=TextUtils.concat(post.nameTripcodeIdCapcodeSpan,post.capcodeSpan,"String_Node_Str");
  }
}