Program: 143677
Project: 143677
Buggy source:
@SuppressWarnings("String_Node_Str") protected static String instrumentBodyText(CharSequence bodyText,int halign,int valign,boolean isHtml,Insets padding,String cssid,char mnemonic,String imgID,String imgURL,int height,boolean isButton,Cursor bodyCursor,boolean isAnchored){
  StringBuffer instrumentedBodyText=new StringBuffer();
  instrumentedBodyText.append("String_Node_Str" + (bodyCursor == null ? "String_Node_Str" : "String_Node_Str" + (bodyCursor.getType() == Cursor.HAND_CURSOR ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str") + "String_Node_Str");
  int top=0;
  int bottom=0;
  int left=0;
  int right=0;
  if (padding != null) {
    top=padding.top;
    bottom=padding.bottom;
    left=padding.left;
    right=padding.right;
  }
  if (halign != ISupportTextSetup.RIGHT && valign != ISupportTextSetup.CENTER)   instrumentedBodyText.append("String_Node_Str" + left + "String_Node_Str");
  if (halign != ISupportTextSetup.LEFT && valign != ISupportTextSetup.CENTER)   instrumentedBodyText.append("String_Node_Str" + right + "String_Node_Str");
  if (halign == ISupportTextSetup.LEFT)   instrumentedBodyText.append("String_Node_Str");
 else   if (halign == ISupportTextSetup.RIGHT)   instrumentedBodyText.append("String_Node_Str");
 else   instrumentedBodyText.append("String_Node_Str");
  if (cssid == null) {
    if (valign == ISupportTextSetup.TOP)     instrumentedBodyText.append("String_Node_Str" + top + "String_Node_Str");
 else     if (valign == ISupportTextSetup.BOTTOM)     instrumentedBodyText.append("String_Node_Str" + bottom + "String_Node_Str");
  }
  boolean isOnlyImgDisplay=(Strings.isEmpty(bodyText) && imgURL != null) || isHTMLWithOnlyImg(bodyText);
  if (isHtml || (valign == ISupportTextSetup.CENTER && cssid != null))   instrumentedBodyText.append("String_Node_Str");
  if (isHtml && valign != ISupportTextSetup.CENTER && cssid == null)   instrumentedBodyText.append("String_Node_Str");
 else   if ((cssid != null && !isHTMLWithOnlyImg(bodyText)) || (!isOnlyImgDisplay && valign != ISupportTextSetup.CENTER))   instrumentedBodyText.append("String_Node_Str");
 else   if (!isButton && !isHtml && imgURL == null) {
    int innerHeight=height;
    if (padding != null)     innerHeight-=padding.top + padding.bottom;
    instrumentedBodyText.append("String_Node_Str" + innerHeight + "String_Node_Str");
  }
  if (isAnchored) {
    instrumentedBodyText.append("String_Node_Str");
  }
  instrumentedBodyText.append("String_Node_Str");
  if (cssid != null) {
    instrumentedBodyText.append("String_Node_Str");
    instrumentedBodyText.append(cssid);
    instrumentedBodyText.append("String_Node_Str");
  }
  instrumentedBodyText.append("String_Node_Str");
  if (!Strings.isEmpty(bodyText)) {
    CharSequence bodyTextValue=bodyText;
    if (mnemonic > 0 && !isHtml) {
      StringBuffer sbBodyText=new StringBuffer(bodyTextValue);
      int mnemonicIdx=sbBodyText.indexOf(Character.toString(mnemonic));
      if (mnemonicIdx != -1) {
        sbBodyText.insert(mnemonicIdx + 1,"String_Node_Str");
        sbBodyText.insert(mnemonicIdx,"String_Node_Str");
        bodyTextValue=sbBodyText.toString();
      }
    }
    if (imgURL != null) {
      StringBuffer sb=new StringBuffer("String_Node_Str").append(imgID).append("String_Node_Str").append(imgURL).append("String_Node_Str").append(bodyTextValue);
      bodyTextValue=sb.toString();
    }
    instrumentedBodyText.append(bodyTextValue);
  }
 else   if (imgURL != null) {
    instrumentedBodyText.append("String_Node_Str");
    instrumentedBodyText.append(imgID);
    instrumentedBodyText.append("String_Node_Str");
    instrumentedBodyText.append(imgURL);
    instrumentedBodyText.append("String_Node_Str");
  }
  instrumentedBodyText.append("String_Node_Str");
  if (isOnlyImgDisplay) {
    String sValign=(valign == ISupportTextSetup.TOP) ? "String_Node_Str" : (valign == ISupportTextSetup.BOTTOM) ? "String_Node_Str" : "String_Node_Str";
    instrumentedBodyText=(new StringBuffer("String_Node_Str").append(sValign).append("String_Node_Str").append(instrumentedBodyText).append("String_Node_Str"));
  }
  return instrumentedBodyText.toString();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") protected static String instrumentBodyText(CharSequence bodyText,int halign,int valign,boolean isHtml,Insets padding,boolean isEmptyBorder,String cssid,char mnemonic,String imgID,String imgURL,int height,boolean isButton,Cursor bodyCursor,boolean isAnchored){
  StringBuffer instrumentedBodyText=new StringBuffer();
  instrumentedBodyText.append("String_Node_Str" + (bodyCursor == null ? "String_Node_Str" : "String_Node_Str" + (bodyCursor.getType() == Cursor.HAND_CURSOR ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str") + "String_Node_Str");
  int top=0;
  int bottom=0;
  int left=0;
  int right=0;
  if (padding != null && isEmptyBorder) {
    top=padding.top;
    bottom=padding.bottom;
    left=padding.left;
    right=padding.right;
  }
  if (halign != ISupportTextSetup.RIGHT && valign != ISupportTextSetup.CENTER)   instrumentedBodyText.append("String_Node_Str" + left + "String_Node_Str");
  if (halign != ISupportTextSetup.LEFT && valign != ISupportTextSetup.CENTER)   instrumentedBodyText.append("String_Node_Str" + right + "String_Node_Str");
  if (halign == ISupportTextSetup.LEFT)   instrumentedBodyText.append("String_Node_Str");
 else   if (halign == ISupportTextSetup.RIGHT)   instrumentedBodyText.append("String_Node_Str");
 else   instrumentedBodyText.append("String_Node_Str");
  if (cssid == null) {
    if (valign == ISupportTextSetup.TOP)     instrumentedBodyText.append("String_Node_Str" + top + "String_Node_Str");
 else     if (valign == ISupportTextSetup.BOTTOM)     instrumentedBodyText.append("String_Node_Str" + bottom + "String_Node_Str");
  }
  boolean isOnlyImgDisplay=(Strings.isEmpty(bodyText) && imgURL != null) || isHTMLWithOnlyImg(bodyText);
  if (isHtml || (valign == ISupportTextSetup.CENTER && cssid != null))   instrumentedBodyText.append("String_Node_Str");
  if (isHtml && valign != ISupportTextSetup.CENTER && cssid == null)   instrumentedBodyText.append("String_Node_Str");
 else   if ((cssid != null && !isHTMLWithOnlyImg(bodyText)) || (!isOnlyImgDisplay && valign != ISupportTextSetup.CENTER))   instrumentedBodyText.append("String_Node_Str");
 else   if (!isButton && !isHtml && imgURL == null) {
    int innerHeight=height;
    if (padding != null)     innerHeight-=padding.top + padding.bottom;
    instrumentedBodyText.append("String_Node_Str" + innerHeight + "String_Node_Str");
  }
  if (isAnchored) {
    instrumentedBodyText.append("String_Node_Str");
  }
  instrumentedBodyText.append("String_Node_Str");
  if (cssid != null) {
    instrumentedBodyText.append("String_Node_Str");
    instrumentedBodyText.append(cssid);
    instrumentedBodyText.append("String_Node_Str");
  }
  instrumentedBodyText.append("String_Node_Str");
  if (!Strings.isEmpty(bodyText)) {
    CharSequence bodyTextValue=bodyText;
    if (mnemonic > 0 && !isHtml) {
      StringBuffer sbBodyText=new StringBuffer(bodyTextValue);
      int mnemonicIdx=sbBodyText.indexOf(Character.toString(mnemonic));
      if (mnemonicIdx != -1) {
        sbBodyText.insert(mnemonicIdx + 1,"String_Node_Str");
        sbBodyText.insert(mnemonicIdx,"String_Node_Str");
        bodyTextValue=sbBodyText.toString();
      }
    }
    if (imgURL != null) {
      StringBuffer sb=new StringBuffer("String_Node_Str").append(imgID).append("String_Node_Str").append(imgURL).append("String_Node_Str").append(bodyTextValue);
      bodyTextValue=sb.toString();
    }
    instrumentedBodyText.append(bodyTextValue);
  }
 else   if (imgURL != null) {
    instrumentedBodyText.append("String_Node_Str");
    instrumentedBodyText.append(imgID);
    instrumentedBodyText.append("String_Node_Str");
    instrumentedBodyText.append(imgURL);
    instrumentedBodyText.append("String_Node_Str");
  }
  instrumentedBodyText.append("String_Node_Str");
  if (isOnlyImgDisplay) {
    String sValign=(valign == ISupportTextSetup.TOP) ? "String_Node_Str" : (valign == ISupportTextSetup.BOTTOM) ? "String_Node_Str" : "String_Node_Str";
    instrumentedBodyText=(new StringBuffer("String_Node_Str").append(sValign).append("String_Node_Str").append(instrumentedBodyText).append("String_Node_Str"));
  }
  return instrumentedBodyText.toString();
}