Program: 77090
Project: 77090
Buggy source:
private void handleElement(Element ele,boolean needEscape,HashMap cssStyles,IContent content,int index){
  IStyle cssStyle=(IStyle)cssStyles.get(ele);
  if (cssStyle != null) {
    if ("String_Node_Str".equals(cssStyle.getDisplay())) {
      return;
    }
  }
  String tagName=ele.getTagName();
  if (tagName.toLowerCase().equals("String_Node_Str")) {
    IContainerContent container=new ContainerContent((ReportContent)content.getReportContent());
    container.setParent(content);
    handleStyle(ele,cssStyles,container);
    ActionContent oldAction=action;
    handleAnchor(ele,container);
    processNodes(ele,needEscape,cssStyles,container);
    this.action=oldAction;
  }
 else   if (tagName.toLowerCase().equals("String_Node_Str")) {
    outputImg(ele,cssStyles,content);
  }
 else   if (tagName.toLowerCase().equals("String_Node_Str")) {
    ILabelContent label=new LabelContent((ReportContent)content.getReportContent());
    addChild(content,label);
    label.setText("String_Node_Str");
    StyleDeclaration inlineStyle=new StyleDeclaration(content.getCSSEngine());
    inlineStyle.setProperty(IStyle.STYLE_DISPLAY,CSSValueConstants.INLINE_VALUE);
    label.setInlineStyle(inlineStyle);
  }
 else   if (tagName.toLowerCase().equals("String_Node_Str") && ele.getParentNode().getNodeType() == Node.ELEMENT_NODE) {
    StyleDeclaration style=new StyleDeclaration(content.getCSSEngine());
    style.setProperty(IStyle.STYLE_DISPLAY,CSSValueConstants.BLOCK_VALUE);
    style.setProperty(IStyle.STYLE_VERTICAL_ALIGN,CSSValueConstants.MIDDLE_VALUE);
    IContainerContent container=new ContainerContent((ReportContent)content.getReportContent());
    container.setInlineStyle(style);
    addChild(content,container);
    handleStyle(ele,cssStyles,container);
    TextContent text=new TextContent((ReportContent)content.getReportContent());
    addChild(container,text);
    if (ele.getParentNode().getNodeName().equals("String_Node_Str")) {
      text.setText(new Integer(index).toString() + "String_Node_Str");
    }
 else     if (ele.getParentNode().getNodeName().equals("String_Node_Str")) {
      text.setText("String_Node_Str");
    }
    style=new StyleDeclaration(content.getCSSEngine());
    style.setProperty(IStyle.STYLE_DISPLAY,CSSValueConstants.INLINE_VALUE);
    style.setProperty(IStyle.STYLE_VERTICAL_ALIGN,CSSValueConstants.TOP_VALUE);
    text.setInlineStyle(style);
    IContainerContent childContainer=new ContainerContent((ReportContent)content.getReportContent());
    addChild(container,childContainer);
    childContainer.setInlineStyle(style);
    processNodes(ele,needEscape,cssStyles,childContainer);
  }
 else   if (tagName.toLowerCase().equals("String_Node_Str") || tagName.toLowerCase().equals("String_Node_Str")) {
    IContainerContent container=new ContainerContent((ReportContent)content.getReportContent());
    addChild(content,container);
    handleStyle(ele,cssStyles,container);
    if (tagName.toLowerCase().equals("String_Node_Str")) {
      StyleDeclaration style=new StyleDeclaration(content.getCSSEngine());
      style.setProperty(IStyle.STYLE_DISPLAY,CSSValueConstants.INLINE_VALUE);
      style.setProperty(IStyle.STYLE_VERTICAL_ALIGN,CSSValueConstants.TOP_VALUE);
      TextContent text=new TextContent((ReportContent)content.getReportContent());
      addChild(content,text);
      if (ele.getParentNode().getNodeName().equals("String_Node_Str")) {
        text.setText("String_Node_Str");
      }
      style.setTextIndent("String_Node_Str");
      text.setInlineStyle(style);
      IContainerContent childContainer=new ContainerContent((ReportContent)content.getReportContent());
      childContainer.setInlineStyle(style);
      addChild(container,childContainer);
      processNodes(ele,needEscape,cssStyles,container);
    }
 else {
      processNodes(ele,needEscape,cssStyles,container);
    }
  }
 else {
    IContainerContent container=new ContainerContent((ReportContent)content.getReportContent());
    handleStyle(ele,cssStyles,container);
    if (htmlDisplayMode.contains(ele.getTagName())) {
      addChild(content,container);
      processNodes(ele,needEscape,cssStyles,container);
    }
 else {
      if (inlineContainerStack.isEmpty()) {
        container.setParent(content);
      }
 else {
        container.setParent((IContent)inlineContainerStack.peek());
      }
      inlineContainerStack.push(container);
      processNodes(ele,needEscape,cssStyles,content);
      inlineContainerStack.pop();
    }
  }
}

Fixed version (ground truth):
private void handleElement(Element ele,boolean needEscape,HashMap cssStyles,IContent content,int index){
  IStyle cssStyle=(IStyle)cssStyles.get(ele);
  if (cssStyle != null) {
    if ("String_Node_Str".equals(cssStyle.getDisplay())) {
      return;
    }
  }
  String tagName=ele.getTagName();
  if (tagName.toLowerCase().equals("String_Node_Str")) {
    IContainerContent container=new ContainerContent((ReportContent)content.getReportContent());
    container.setParent(content);
    handleStyle(ele,cssStyles,container);
    ActionContent oldAction=action;
    handleAnchor(ele,container);
    processNodes(ele,needEscape,cssStyles,container);
    this.action=oldAction;
  }
 else   if (tagName.toLowerCase().equals("String_Node_Str")) {
    outputImg(ele,cssStyles,content);
  }
 else   if (tagName.toLowerCase().equals("String_Node_Str")) {
    ILabelContent label=new LabelContent((ReportContent)content.getReportContent());
    addChild(content,label);
    label.setText("String_Node_Str");
    StyleDeclaration inlineStyle=new StyleDeclaration(content.getCSSEngine());
    inlineStyle.setProperty(IStyle.STYLE_DISPLAY,CSSValueConstants.INLINE_VALUE);
    label.setInlineStyle(inlineStyle);
  }
 else   if (tagName.toLowerCase().equals("String_Node_Str") && ele.getParentNode().getNodeType() == Node.ELEMENT_NODE) {
    StyleDeclaration style=new StyleDeclaration(content.getCSSEngine());
    style.setProperty(IStyle.STYLE_DISPLAY,CSSValueConstants.BLOCK_VALUE);
    style.setProperty(IStyle.STYLE_VERTICAL_ALIGN,CSSValueConstants.MIDDLE_VALUE);
    IContainerContent container=new ContainerContent((ReportContent)content.getReportContent());
    container.setInlineStyle(style);
    addChild(content,container);
    handleStyle(ele,cssStyles,container);
    style=new StyleDeclaration(content.getCSSEngine());
    style.setProperty(IStyle.STYLE_DISPLAY,CSSValueConstants.INLINE_VALUE);
    style.setProperty(IStyle.STYLE_VERTICAL_ALIGN,CSSValueConstants.TOP_VALUE);
    IContainerContent orderContainer=new ContainerContent((ReportContent)content.getReportContent());
    CSSValue fontSizeValue=content.getComputedStyle().getProperty(IStyle.STYLE_FONT_SIZE);
    orderContainer.setWidth(new DimensionType(2.1 * PropertyUtil.getDimensionValue(fontSizeValue) / 1000.0,EngineIRConstants.UNITS_PT));
    orderContainer.setInlineStyle(style);
    addChild(container,orderContainer);
    TextContent text=new TextContent((ReportContent)content.getReportContent());
    addChild(orderContainer,text);
    if (ele.getParentNode().getNodeName().equals("String_Node_Str")) {
      text.setText(new Integer(index).toString() + "String_Node_Str");
    }
 else     if (ele.getParentNode().getNodeName().equals("String_Node_Str")) {
      text.setText("String_Node_Str");
    }
    text.setInlineStyle(style);
    IContainerContent childContainer=new ContainerContent((ReportContent)content.getReportContent());
    addChild(container,childContainer);
    childContainer.setInlineStyle(style);
    processNodes(ele,needEscape,cssStyles,childContainer);
  }
 else   if (tagName.toLowerCase().equals("String_Node_Str") || tagName.toLowerCase().equals("String_Node_Str")) {
    IContainerContent container=new ContainerContent((ReportContent)content.getReportContent());
    addChild(content,container);
    handleStyle(ele,cssStyles,container);
    if (tagName.toLowerCase().equals("String_Node_Str")) {
      StyleDeclaration style=new StyleDeclaration(content.getCSSEngine());
      style.setProperty(IStyle.STYLE_DISPLAY,CSSValueConstants.INLINE_VALUE);
      style.setProperty(IStyle.STYLE_VERTICAL_ALIGN,CSSValueConstants.TOP_VALUE);
      TextContent text=new TextContent((ReportContent)content.getReportContent());
      addChild(content,text);
      if (ele.getParentNode().getNodeName().equals("String_Node_Str")) {
        text.setText("String_Node_Str");
      }
      style.setTextIndent("String_Node_Str");
      text.setInlineStyle(style);
      IContainerContent childContainer=new ContainerContent((ReportContent)content.getReportContent());
      childContainer.setInlineStyle(style);
      addChild(container,childContainer);
      processNodes(ele,needEscape,cssStyles,container);
    }
 else {
      processNodes(ele,needEscape,cssStyles,container);
    }
  }
 else {
    IContainerContent container=new ContainerContent((ReportContent)content.getReportContent());
    handleStyle(ele,cssStyles,container);
    if (htmlDisplayMode.contains(ele.getTagName())) {
      addChild(content,container);
      processNodes(ele,needEscape,cssStyles,container);
    }
 else {
      if (inlineContainerStack.isEmpty()) {
        container.setParent(content);
      }
 else {
        container.setParent((IContent)inlineContainerStack.peek());
      }
      inlineContainerStack.push(container);
      processNodes(ele,needEscape,cssStyles,content);
      inlineContainerStack.pop();
    }
  }
}