Program: 66459
Project: 66459
Buggy source:
/** 
 * Visits the children nodes of the specific node
 * @param ele the specific node
 * @param needEscape the flag indicating the content needs escaping
 * @param cssStyles
 * @param content the parent content of the element
 */
static void processNodes(Element ele,Map cssStyles,IContent content,ActionContent action,int nestCount){
  int level=0;
  for (Node node=ele.getFirstChild(); node != null; node=node.getNextSibling()) {
    if (node.getNodeName().equals(TAG_VALUEOF)) {
      if (node.getFirstChild() instanceof Element) {
        processNodes((Element)node.getFirstChild(),cssStyles,content,action,nestCount);
      }
    }
 else     if (node.getNodeName().equals(TAG_IMAGE)) {
      if (node.getFirstChild() instanceof Element) {
        processNodes((Element)node.getFirstChild(),cssStyles,content,action,nestCount);
      }
    }
 else     if (node.getNodeName().equals(TAG_SCRIPT)) {
      continue;
    }
 else     if (node.getNodeType() == Node.TEXT_NODE) {
      ILabelContent label=createLabel(node.getNodeValue(),content);
      if (action != null) {
        label.setHyperlinkAction(action);
      }
    }
 else     if (node.getNodeType() == Node.ELEMENT_NODE) {
      handleElement((Element)node,cssStyles,content,action,++level,nestCount);
    }
  }
}

Fixed version (ground truth):
/** 
 * Visits the children nodes of the specific node
 * @param ele the specific node
 * @param needEscape the flag indicating the content needs escaping
 * @param cssStyles
 * @param content the parent content of the element
 */
protected static void processNodes(Element ele,Map cssStyles,IContent content,ActionContent action,int nestCount){
  int level=0;
  for (Node node=ele.getFirstChild(); node != null; node=node.getNextSibling()) {
    if (node.getNodeName().equals(TAG_VALUEOF)) {
      if (node.getFirstChild() instanceof Element) {
        processNodes((Element)node.getFirstChild(),cssStyles,content,action,nestCount);
      }
    }
 else     if (node.getNodeName().equals(TAG_IMAGE)) {
      if (node.getFirstChild() instanceof Element) {
        processNodes((Element)node.getFirstChild(),cssStyles,content,action,nestCount);
      }
    }
 else     if (node.getNodeName().equals(TAG_SCRIPT)) {
      continue;
    }
 else     if (node.getNodeType() == Node.TEXT_NODE) {
      if (isInExcelMode) {
        if (isFirst) {
          isFirst=false;
          builder.append(node.getNodeValue());
          ILabelContent label=createLabel(node.getNodeValue(),content);
          firstLabel=label;
          if (action != null) {
            label.setHyperlinkAction(action);
          }
        }
 else {
          if (firstLabel != null) {
            firstLabel.setText(builder.append(node.getNodeValue()).toString());
            if (action != null) {
              firstLabel.setHyperlinkAction(action);
            }
          }
        }
      }
 else {
        ILabelContent label=createLabel(node.getNodeValue(),content);
        if (action != null) {
          label.setHyperlinkAction(action);
        }
      }
    }
 else     if (node.getNodeType() == Node.ELEMENT_NODE) {
      handleElement((Element)node,cssStyles,content,action,++level,nestCount);
    }
  }
}