Program: 71655
Project: 71655
Buggy source:
public void startContainer(IContent content,boolean isFirst,IContentEmitter emitter,boolean visible){
switch (content.getContentType()) {
case IContent.TABLE_CONTENT:
    nestCount++;
  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) {
      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=getPageIndex((ICellContent)content);
if (index != currentIndex) {
currentIndex=index;
repeatCells(emitter);
}
currentBuffer=buffers[currentIndex];
}
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));
}
}

Fixed version (ground truth):
public void startContainer(IContent content,boolean isFirst,IContentEmitter emitter,boolean visible){
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) {
            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=getPageIndex((ICellContent)content);
if (index != currentIndex) {
currentIndex=index;
repeatCells(emitter);
}
currentBuffer=buffers[currentIndex];
}
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));
}
}