Program: 66752
Project: 66752
Buggy source:
protected void addCaption(String caption) throws BirtException {
  if (caption == null || "String_Node_Str".equals(caption)) {
    return;
  }
  ReportContent report=(ReportContent)content.getReportContent();
  IRowContent row=report.createRowContent();
  row.setParent(content);
  ICellContent cell=report.createCellContent();
  cell.setColSpan(getColumnCount());
  cell.setColumn(0);
  StyleDeclaration cstyle=new StyleDeclaration(report.getCSSEngine());
  cstyle.setProperty(IStyle.STYLE_BORDER_TOP_STYLE,IStyle.HIDDEN_VALUE);
  cstyle.setProperty(IStyle.STYLE_BORDER_LEFT_STYLE,IStyle.HIDDEN_VALUE);
  cstyle.setProperty(IStyle.STYLE_BORDER_RIGHT_STYLE,IStyle.HIDDEN_VALUE);
  cell.setInlineStyle(cstyle);
  cell.setParent(row);
  ILabelContent captionLabel=report.createLabelContent();
  captionLabel.setParent(cell);
  captionLabel.setText(caption);
  StyleDeclaration style=new StyleDeclaration(report.getCSSEngine());
  style.setProperty(IStyle.STYLE_TEXT_ALIGN,IStyle.CENTER_VALUE);
  captionLabel.setInlineStyle(style);
  RowArea captionRow=new RowArea(this,context,row);
  captionRow.isDummy=true;
  captionRow.setParent(this);
  captionRow.setWidth(width);
  captionRow.initialize();
  CellArea captionCell=new CellArea(captionRow,context,cell);
  captionCell.setWidth(width);
  captionCell.setMaxAvaWidth(width);
  captionCell.initialize();
  captionCell.isDummy=true;
  captionRow.children.add(captionCell);
  BlockTextArea captionText=new BlockTextArea(captionCell,context,captionLabel);
  captionText.isDummy=true;
  captionText.layout();
  int h=captionText.getAllocatedHeight();
  captionCell.setContentHeight(h);
  captionRow.setHeight(captionCell.getAllocatedHeight());
  captionRow.finished=true;
  add(captionRow);
  if (repeatList == null) {
    repeatList=new ArrayList();
  }
  repeatList.add(captionRow);
  update(captionRow);
}

Fixed version (ground truth):
protected void addCaption(String caption) throws BirtException {
  if (caption == null || "String_Node_Str".equals(caption)) {
    return;
  }
  ReportContent report=(ReportContent)content.getReportContent();
  IRowContent row=report.createRowContent();
  row.setParent(content);
  ICellContent cell=report.createCellContent();
  cell.setColSpan(getColumnCount());
  cell.setColumn(0);
  StyleDeclaration cstyle=new StyleDeclaration(report.getCSSEngine());
  cstyle.setProperty(IStyle.STYLE_BORDER_TOP_STYLE,IStyle.HIDDEN_VALUE);
  cstyle.setProperty(IStyle.STYLE_BORDER_LEFT_STYLE,IStyle.HIDDEN_VALUE);
  cstyle.setProperty(IStyle.STYLE_BORDER_RIGHT_STYLE,IStyle.HIDDEN_VALUE);
  cell.setInlineStyle(cstyle);
  cell.setParent(row);
  ILabelContent captionLabel=report.createLabelContent();
  captionLabel.setParent(cell);
  captionLabel.setText(caption);
  StyleDeclaration style=new StyleDeclaration(report.getCSSEngine());
  style.setProperty(IStyle.STYLE_TEXT_ALIGN,IStyle.CENTER_VALUE);
  captionLabel.setInlineStyle(style);
  RowArea captionRow=new RowArea(this,context,row);
  captionRow.isDummy=true;
  captionRow.setParent(this);
  captionRow.setWidth(width);
  captionRow.initialize();
  CellArea captionCell=new CellArea(captionRow,context,cell);
  captionCell.setWidth(width);
  captionCell.setMaxAvaWidth(width);
  captionCell.initialize();
  captionCell.isDummy=true;
  captionCell.setRowSpan(1);
  captionRow.children.add(captionCell);
  BlockTextArea captionText=new BlockTextArea(captionCell,context,captionLabel);
  captionText.isDummy=true;
  captionText.layout();
  int h=captionText.getAllocatedHeight();
  captionCell.setContentHeight(h);
  captionRow.setHeight(captionCell.getAllocatedHeight());
  captionRow.finished=true;
  add(captionRow);
  if (repeatList == null) {
    repeatList=new ArrayList();
  }
  repeatList.add(captionRow);
  update(captionRow);
}