Program: 72881
Project: 72881
Buggy source:
public void startText(ITextContent text){
  IStyle mergedStyle=text.getStyle();
  logger.log(Level.FINE,"String_Node_Str");
  DimensionType x=text.getX();
  DimensionType y=text.getY();
  DimensionType width=text.getWidth();
  DimensionType height=text.getHeight();
  String textValue=text.getText();
  if (textValue == null || textValue == "String_Node_Str") {
    textValue="String_Node_Str";
  }
  int display;
  if (textValue != null && textValue.indexOf('\n') >= 0) {
    display=getElementType(x,y,width,height,mergedStyle);
  }
 else {
    display=getElementType(x,y,null,null,mergedStyle);
  }
  String tagName;
  boolean metadataOutput=false;
  if (enableMetadata) {
    metadataOutput=metadataEmitter.startText(text,HTMLEmitterUtil.getTagByType(display,DISPLAY_FLAG_ALL));
  }
  tagName=openTagByType(display,DISPLAY_FLAG_ALL);
  String styleClass=text.getStyleClass();
  setStyleName(styleClass);
  if (!metadataOutput) {
    outputBookmark(text,tagName);
  }
  writer.attribute(HTMLTags.ATTR_TITLE,text.getHelpText());
  StringBuffer styleBuffer=new StringBuffer();
  htmlEmitter.buildTextStyle(text,styleBuffer,display);
  writer.attribute(HTMLTags.ATTR_STYLE,styleBuffer.toString());
  htmlEmitter.handleVerticalAlignBegin(text);
  String url=validate(text.getHyperlinkAction());
  if (url != null) {
    outputAction(text.getHyperlinkAction(),url);
    writer.text(textValue);
    writer.closeTag(HTMLTags.TAG_A);
  }
 else {
    writer.text(textValue);
  }
  htmlEmitter.handleVerticalAlignEnd(text);
  writer.closeTag(tagName);
  if (enableMetadata) {
    metadataEmitter.endText(text);
  }
}

Fixed version (ground truth):
public void startText(ITextContent text){
  IStyle mergedStyle=text.getStyle();
  logger.log(Level.FINE,"String_Node_Str");
  DimensionType x=text.getX();
  DimensionType y=text.getY();
  DimensionType width=text.getWidth();
  DimensionType height=text.getHeight();
  String textValue=text.getText();
  if (textValue == null || textValue == "String_Node_Str") {
    textValue="String_Node_Str";
  }
  int display;
  if (textValue != null && textValue.indexOf('\n') >= 0) {
    display=getElementType(x,y,width,height,mergedStyle);
  }
 else {
    display=getElementType(x,y,null,null,mergedStyle);
  }
  String tagName;
  boolean metadataOutput=false;
  if (enableMetadata) {
    metadataOutput=metadataEmitter.startText(text,HTMLEmitterUtil.getTagByType(display,DISPLAY_FLAG_ALL));
  }
  tagName=openTagByType(display,DISPLAY_FLAG_ALL);
  String styleClass=text.getStyleClass();
  setStyleName(styleClass,text);
  if (!metadataOutput) {
    outputBookmark(text,tagName);
  }
  writer.attribute(HTMLTags.ATTR_TITLE,text.getHelpText());
  StringBuffer styleBuffer=new StringBuffer();
  htmlEmitter.buildTextStyle(text,styleBuffer,display);
  writer.attribute(HTMLTags.ATTR_STYLE,styleBuffer.toString());
  htmlEmitter.handleVerticalAlignBegin(text);
  String url=validate(text.getHyperlinkAction());
  if (url != null) {
    outputAction(text.getHyperlinkAction(),url);
    writer.text(textValue);
    writer.closeTag(HTMLTags.TAG_A);
  }
 else {
    writer.text(textValue);
  }
  htmlEmitter.handleVerticalAlignEnd(text);
  writer.closeTag(tagName);
  if (enableMetadata) {
    metadataEmitter.endText(text);
  }
}