Program: 65355
Project: 65355
Buggy source:
static void handleElement(Element ele,Map<Element,StyleProperties> cssStyles,IContent content,ActionContent action,int index,int nestCount){
  StyleProperties sp=cssStyles.get(ele);
  if (sp != null) {
    if ("String_Node_Str".equals(sp.getStyle().getDisplay())) {
      return;
    }
  }
  String lTagName=ele.getTagName().toLowerCase();
  if (lTagName.equals(TAG_A)) {
    IContainerContent container=content.getReportContent().createContainerContent();
    addChild(content,container);
    handleStyle(ele,cssStyles,container);
    ActionContent actionContent=handleAnchor(ele,container,action);
    processNodes(ele,cssStyles,content,actionContent,0);
  }
 else   if (lTagName.equals(TAG_IMG)) {
    outputImg(ele,cssStyles,content);
  }
 else   if (lTagName.equals(TAG_OBJECT)) {
    outputEmbedContent(ele,cssStyles,content);
  }
 else   if (lTagName.equals(TAG_BR)) {
    ILabelContent label=content.getReportContent().createLabelContent();
    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 (lTagName.equals(TAG_UL) || lTagName.equals(TAG_OL)) {
    IReportContent report=content.getReportContent();
    ITableContent table=report.createTableContent();
    addChild(content,table);
    Column column1=new Column(report);
    column1.setWidth(new DimensionType(2,"String_Node_Str"));
    table.addColumn(column1);
    column1=new Column(report);
    table.addColumn(column1);
    handleStyle(ele,cssStyles,table);
    processNodes(ele,cssStyles,table,action,nestCount);
  }
 else   if (lTagName.equals(TAG_LI) && ele.getParentNode().getNodeType() == Node.ELEMENT_NODE) {
    IReportContent report=content.getReportContent();
    IRowContent row=report.createRowContent();
    addChild(content,row);
    handleStyle(ele,cssStyles,row);
    StyleDeclaration style=new StyleDeclaration(content.getCSSEngine());
    style.setProperty(IStyle.STYLE_VERTICAL_ALIGN,CSSValueConstants.TOP_VALUE);
    style.setProperty(IStyle.STYLE_PADDING_BOTTOM,IStyle.NUMBER_0);
    style.setProperty(IStyle.STYLE_PADDING_LEFT,IStyle.NUMBER_0);
    style.setProperty(IStyle.STYLE_PADDING_RIGHT,IStyle.NUMBER_0);
    style.setProperty(IStyle.STYLE_PADDING_TOP,IStyle.NUMBER_0);
    ICellContent orderCell=report.createCellContent();
    orderCell.setRowSpan(1);
    orderCell.setColumn(0);
    orderCell.setColSpan(1);
    orderCell.setInlineStyle(style);
    addChild(row,orderCell);
    TextContent text=(TextContent)report.createTextContent();
    addChild(orderCell,text);
    boolean nestList=false;
    int count=ele.getChildNodes().getLength();
    if (count == 1) {
      Node firstChild=ele.getFirstChild();
      String nodeName=firstChild.getNodeName();
      if (TAG_OL.equals(nodeName) || TAG_UL.equals(nodeName)) {
        nestList=true;
      }
    }
    Object value=cssStyles.get(ele.getParentNode()).getProperty(LIST_STYLE_TYPE);
    String styleType="String_Node_Str";
    if (value != null)     styleType=value.toString();
    BulletFrame frame=new BulletFrame(styleType);
    if (ele.getParentNode().getNodeName().equals(TAG_OL) && !nestList) {
      text.setText(frame.paintBullet(index) + "String_Node_Str");
    }
 else     if (ele.getParentNode().getNodeName().equals(TAG_UL) && !nestList) {
      text.setText(frame.paintBullet(index));
      if ("String_Node_Str".equals(text.getText())) {
        text.setText("String_Node_Str");
      }
    }
    ICellContent childCell=report.createCellContent();
    childCell.setRowSpan(1);
    childCell.setColumn(1);
    childCell.setColSpan(1);
    childCell.setInlineStyle(style);
    addChild(row,childCell);
    processNodes(ele,cssStyles,childCell,action,nestCount + 1);
  }
 else   if (lTagName.equals(TAG_DD) || lTagName.equals(TAG_DT)) {
    IContainerContent container=content.getReportContent().createContainerContent();
    addChild(content,container);
    handleStyle(ele,cssStyles,container);
    if (lTagName.equals(TAG_DD)) {
      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=(TextContent)content.getReportContent().createTextContent();
      addChild(container,text);
      if (ele.getParentNode().getNodeName().equals(TAG_DL)) {
        text.setText("String_Node_Str");
      }
      style.setTextIndent("String_Node_Str");
      text.setInlineStyle(style);
      IContainerContent childContainer=content.getReportContent().createContainerContent();
      childContainer.setInlineStyle(style);
      addChild(container,childContainer);
      processNodes(ele,cssStyles,container,action,nestCount + 1);
    }
 else {
      processNodes(ele,cssStyles,container,action,nestCount);
    }
  }
 else   if (TAG_TABLE.equals(lTagName)) {
    TableProcessor.processTable(ele,cssStyles,content,action);
  }
 else   if (htmlBlockDisplay.contains(lTagName) || htmlInlineDisplay.contains(lTagName)) {
    IContainerContent container=content.getReportContent().createContainerContent();
    handleStyle(ele,cssStyles,container);
    addChild(content,container);
    processNodes(ele,cssStyles,container,action,nestCount);
  }
 else {
    processNodes(ele,cssStyles,content,action,nestCount);
  }
}

Fixed version (ground truth):
static void handleElement(Element ele,Map<Element,StyleProperties> cssStyles,IContent content,ActionContent action,int index,int nestCount){
  StyleProperties sp=cssStyles.get(ele);
  if (sp != null) {
    if ("String_Node_Str".equals(sp.getStyle().getDisplay())) {
      return;
    }
  }
  String lTagName=ele.getTagName().toLowerCase();
  if (lTagName.equals(TAG_A)) {
    IContainerContent container=content.getReportContent().createContainerContent();
    addChild(content,container);
    handleStyle(ele,cssStyles,container);
    ActionContent actionContent=handleAnchor(ele,container,action);
    processNodes(ele,cssStyles,content,actionContent,0);
  }
 else   if (lTagName.equals(TAG_IMG)) {
    outputImg(ele,cssStyles,content);
  }
 else   if (lTagName.equals(TAG_OBJECT)) {
    outputEmbedContent(ele,cssStyles,content);
  }
 else   if (lTagName.equals(TAG_BR)) {
    ILabelContent label=content.getReportContent().createLabelContent();
    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 (lTagName.equals(TAG_UL) || lTagName.equals(TAG_OL)) {
    IReportContent report=content.getReportContent();
    ITableContent table=report.createTableContent();
    addChild(content,table);
    Column column1=new Column(report);
    column1.setWidth(new DimensionType(2,"String_Node_Str"));
    table.addColumn(column1);
    column1=new Column(report);
    table.addColumn(column1);
    handleStyle(ele,cssStyles,table);
    processNodes(ele,cssStyles,table,action,nestCount);
  }
 else   if (lTagName.equals(TAG_LI) && ele.getParentNode().getNodeType() == Node.ELEMENT_NODE) {
    IReportContent report=content.getReportContent();
    IRowContent row=report.createRowContent();
    addChild(content,row);
    handleStyle(ele,cssStyles,row);
    StyleDeclaration style=new StyleDeclaration(content.getCSSEngine());
    style.setProperty(IStyle.STYLE_VERTICAL_ALIGN,CSSValueConstants.TOP_VALUE);
    style.setProperty(IStyle.STYLE_PADDING_BOTTOM,IStyle.NUMBER_0);
    style.setProperty(IStyle.STYLE_PADDING_LEFT,IStyle.NUMBER_0);
    style.setProperty(IStyle.STYLE_PADDING_RIGHT,IStyle.NUMBER_0);
    style.setProperty(IStyle.STYLE_PADDING_TOP,IStyle.NUMBER_0);
    ICellContent orderCell=report.createCellContent();
    orderCell.setRowSpan(1);
    orderCell.setColumn(0);
    orderCell.setColSpan(1);
    orderCell.setInlineStyle(style);
    addChild(row,orderCell);
    TextContent text=(TextContent)report.createTextContent();
    addChild(orderCell,text);
    boolean nestList=false;
    int count=ele.getChildNodes().getLength();
    if (count == 1) {
      Node firstChild=ele.getFirstChild();
      String nodeName=firstChild.getNodeName();
      if (TAG_OL.equals(nodeName) || TAG_UL.equals(nodeName)) {
        nestList=true;
      }
    }
    Object value=cssStyles.get(ele.getParentNode()).getProperty(LIST_STYLE_TYPE);
    String styleType="String_Node_Str";
    if (value != null)     styleType=value.toString();
    if (ele.getParentNode().getNodeName().equals(TAG_OL) && !nestList) {
      if ("String_Node_Str".equals(styleType))       styleType=BulletFrame.CSS_LISTSTYLETYPE_DECIMAL;
      BulletFrame frame=new BulletFrame(styleType);
      text.setText(frame.paintBullet(index) + "String_Node_Str");
    }
 else     if (ele.getParentNode().getNodeName().equals(TAG_UL) && !nestList) {
      BulletFrame frame=new BulletFrame(styleType);
      text.setText(frame.paintBullet(index));
      if ("String_Node_Str".equals(text.getText())) {
        text.setText("String_Node_Str");
      }
    }
    ICellContent childCell=report.createCellContent();
    childCell.setRowSpan(1);
    childCell.setColumn(1);
    childCell.setColSpan(1);
    childCell.setInlineStyle(style);
    addChild(row,childCell);
    processNodes(ele,cssStyles,childCell,action,nestCount + 1);
  }
 else   if (lTagName.equals(TAG_DD) || lTagName.equals(TAG_DT)) {
    IContainerContent container=content.getReportContent().createContainerContent();
    addChild(content,container);
    handleStyle(ele,cssStyles,container);
    if (lTagName.equals(TAG_DD)) {
      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=(TextContent)content.getReportContent().createTextContent();
      addChild(container,text);
      if (ele.getParentNode().getNodeName().equals(TAG_DL)) {
        text.setText("String_Node_Str");
      }
      style.setTextIndent("String_Node_Str");
      text.setInlineStyle(style);
      IContainerContent childContainer=content.getReportContent().createContainerContent();
      childContainer.setInlineStyle(style);
      addChild(container,childContainer);
      processNodes(ele,cssStyles,container,action,nestCount + 1);
    }
 else {
      processNodes(ele,cssStyles,container,action,nestCount);
    }
  }
 else   if (TAG_TABLE.equals(lTagName)) {
    TableProcessor.processTable(ele,cssStyles,content,action);
  }
 else   if (htmlBlockDisplay.contains(lTagName) || htmlInlineDisplay.contains(lTagName)) {
    IContainerContent container=content.getReportContent().createContainerContent();
    handleStyle(ele,cssStyles,container);
    addChild(content,container);
    processNodes(ele,cssStyles,container,action,nestCount);
  }
 else {
    processNodes(ele,cssStyles,content,action,nestCount);
  }
}