Program: 69458
Project: 69458
Buggy source:
public void startContainer(IContent content,boolean isFirst,IContentEmitter emitter,boolean visible) throws BirtException {
switch (content.getContentType()) {
case IContent.TABLE_CONTENT:
    nestCount++;
  if (buffers == null) {
    ITableContent table=(ITableContent)content;
    boolean hasPageBreak=hasPageBreak(table);
    if (hasPageBreak) {
      if (currentTableIndex < 0) {
        INode[] nodeList=currentBuffer.getNodeStack();
        pageBreakIndexs=getPageBreakIndex(table);
        repeatEnd=getRepeatEnd(table);
        currentBuffer.startContainer(createTable(table,pageBreakIndexs,0),isFirst,emitter,visible);
        currentTableIndex=nestCount;
        buffers=new IPageBuffer[pageBreakIndexs.length];
        buffers[0]=currentBuffer;
        String tableId=table.getInstanceID().toUniqueString();
        currentBuffer.addTableColumnHint(new TableColumnHint(tableId,0,pageBreakIndexs[0] + 1));
        for (int i=1; i < pageBreakIndexs.length; i++) {
          buffers[i]=new TableBreakBuffer(null,context);
          INode[] list=new INode[nodeList.length + 1];
          ITableContent newTable=createTable(table,pageBreakIndexs,i);
          list[0]=new ContainerBufferNode(newTable,emitter,null,true);
          for (int j=0; j < nodeList.length; j++) {
            list[j + 1]=nodeList[j];
          }
          buffers[i].openPage(list);
          if (hasRepeatedColumn && repeatEnd > repeatStart) {
            buffers[i].addTableColumnHint(new TableColumnHint(tableId,repeatStart,repeatEnd - repeatStart));
          }
          buffers[i].addTableColumnHint(new TableColumnHint(tableId,pageBreakIndexs[i - 1] + 1,pageBreakIndexs[i] - pageBreakIndexs[i - 1]));
        }
      }
    }
 else {
      currentBuffer.startContainer(content,isFirst,emitter,visible);
    }
  }
 else {
    currentBuffer.startContainer(content,isFirst,emitter,visible);
  }
break;
case IContent.TABLE_GROUP_CONTENT:
case IContent.TABLE_BAND_CONTENT:
case IContent.ROW_CONTENT:
if (currentTableIndex == nestCount && currentTableIndex > 0) {
currentIndex=0;
currentBuffer=buffers[0];
startContainerInPages(content,isFirst,emitter,visible);
if (hasRepeatedColumn) {
  repeatEvent.clear();
}
}
 else {
currentBuffer.startContainer(content,isFirst,emitter,visible);
}
break;
case IContent.CELL_CONTENT:
if (currentTableIndex == nestCount && currentTableIndex > 0) {
if (hasRepeatedColumn && isRepeatedCell((ICellContent)content)) {
isRepeatStatus=true;
}
int index=getStartPageIndex((ICellContent)content);
if (index != currentIndex) {
currentIndex=index;
repeatCells(emitter);
}
currentBuffer=buffers[currentIndex];
if (isRepeatCellContent) {
if (currentIndex >= 1) {
ICellContent cc=(ICellContent)content;
int start=cc.getColumn();
if (start > pageBreakIndexs[currentIndex - 1] + 1) repeatCellContent(emitter);
repeatCellContentEvent.clear();
isRepeatCellContent=false;
}
}
if (((ICellContent)content).repeatContent()) {
int colSpan=((ICellContent)content).getColSpan();
if (colSpan > 1) {
int col=((ICellContent)content).getColumn();
if (col + colSpan > pageBreakIndexs[currentIndex] + 1) {
  isRepeatCellContent=true;
}
}
}
}
currentBuffer.startContainer(content,isFirst,emitter,visible);
break;
default :
currentBuffer.startContainer(content,isFirst,emitter,visible);
break;
}
if (isRepeatStatus) {
repeatEvent.add(new ContentEvent(content,visible,ContentEvent.START_CONTAINER_EVENT));
}
if (isRepeatCellContent) {
repeatCellContentEvent.add(new ContentEvent(content,visible,ContentEvent.START_CONTAINER_EVENT));
}
}

Fixed version (ground truth):
public void startContainer(IContent content,boolean isFirst,IContentEmitter emitter,boolean visible) throws BirtException {
switch (content.getContentType()) {
case IContent.TABLE_CONTENT:
    nestCount++;
  if (buffers == null) {
    ITableContent table=(ITableContent)content;
    boolean hasPageBreak=hasPageBreak(table);
    if (hasPageBreak) {
      if (currentTableIndex < 0) {
        INode[] nodeList=currentBuffer.getNodeStack();
        pageBreakIndexs=getPageBreakIndex(table);
        repeatEnd=getRepeatEnd(table);
        currentBuffer.startContainer(createTable(table,pageBreakIndexs,0),isFirst,emitter,visible);
        currentTableIndex=nestCount;
        buffers=new IPageBuffer[pageBreakIndexs.length];
        buffers[0]=currentBuffer;
        String tableId=table.getInstanceID().toUniqueString();
        currentBuffer.addTableColumnHint(new TableColumnHint(tableId,0,pageBreakIndexs[0] + 1));
        for (int i=1; i < pageBreakIndexs.length; i++) {
          buffers[i]=new TableBreakBuffer(null,context);
          INode[] list=new INode[nodeList.length + 1];
          ITableContent newTable=createTable(table,pageBreakIndexs,i);
          list[0]=new ContainerBufferNode(newTable,emitter,null,true);
          for (int j=0; j < nodeList.length; j++) {
            list[j + 1]=nodeList[j];
          }
          buffers[i].openPage(list);
          if (hasRepeatedColumn && repeatEnd > repeatStart) {
            buffers[i].addTableColumnHint(new TableColumnHint(tableId,repeatStart,repeatEnd - repeatStart));
          }
          buffers[i].addTableColumnHint(new TableColumnHint(tableId,pageBreakIndexs[i - 1] + 1,pageBreakIndexs[i] - pageBreakIndexs[i - 1]));
        }
      }
    }
 else {
      currentBuffer.startContainer(content,isFirst,emitter,visible);
    }
  }
 else {
    currentBuffer.startContainer(content,isFirst,emitter,visible);
  }
break;
case IContent.TABLE_GROUP_CONTENT:
case IContent.TABLE_BAND_CONTENT:
case IContent.ROW_CONTENT:
if (currentTableIndex == nestCount && currentTableIndex > 0) {
currentIndex=0;
currentBuffer=buffers[0];
startContainerInPages(content,isFirst,emitter,visible);
if (hasRepeatedColumn) {
  repeatEvent.clear();
}
}
 else {
currentBuffer.startContainer(content,isFirst,emitter,visible);
}
break;
case IContent.CELL_CONTENT:
if (currentTableIndex == nestCount && currentTableIndex > 0) {
if (hasRepeatedColumn && isRepeatedCell((ICellContent)content)) {
isRepeatStatus=true;
}
int index=getStartPageIndex((ICellContent)content);
if (index != currentIndex) {
for (int i=currentIndex + 1; i <= index; i++) {
currentBuffer=buffers[i];
repeatCells(emitter);
}
currentIndex=index;
}
currentBuffer=buffers[currentIndex];
if (isRepeatCellContent) {
if (currentIndex >= 1) {
ICellContent cc=(ICellContent)content;
int start=cc.getColumn();
if (start > pageBreakIndexs[currentIndex - 1] + 1) repeatCellContent(emitter);
repeatCellContentEvent.clear();
isRepeatCellContent=false;
}
}
if (((ICellContent)content).repeatContent()) {
int colSpan=((ICellContent)content).getColSpan();
if (colSpan > 1) {
int col=((ICellContent)content).getColumn();
if (col + colSpan > pageBreakIndexs[currentIndex] + 1) {
  isRepeatCellContent=true;
}
}
}
}
currentBuffer.startContainer(content,isFirst,emitter,visible);
break;
default :
currentBuffer.startContainer(content,isFirst,emitter,visible);
break;
}
if (isRepeatStatus) {
repeatEvent.add(new ContentEvent(content,visible,ContentEvent.START_CONTAINER_EVENT));
}
if (isRepeatCellContent) {
repeatCellContentEvent.add(new ContentEvent(content,visible,ContentEvent.START_CONTAINER_EVENT));
}
}