Program: 78962
Project: 78962
Buggy source:
/** 
 * output the row. row is output as: row start, cells*, row end.
 * @param rowIndex the index in the rows
 * @param row row design
 * @param emitter output emitter
 */
protected void accessRow(RowDesign row,IContentEmitter emitter){
  if (rowClosed) {
    IRowContent rowContent=report.createRowContent();
    IContent parent=context.getContent();
    context.pushContent(rowContent);
    initializeContent(parent,row,rowContent);
    processStyle(row,rowContent);
    processVisibility(row,rowContent);
    processBookmark(row,rowContent);
    processAction(row,rowContent);
    if (emitter != null) {
      emitter.startRow(rowContent);
    }
    rowClosed=false;
  }
  for (int j=0; j < row.getCellCount(); j++) {
    CellDesign cell=row.getCell(j);
    if (cell != null) {
      ICellContent cellContent=report.createCellContent();
      IContent parent=context.getContent();
      context.pushContent(cellContent);
      initializeContent(parent,cell,cellContent);
      cellContent.setColumn(cell.getColumn());
      cellContent.setColSpan(cell.getColSpan());
      cellContent.setRowSpan(cell.getRowSpan());
      processStyle(cell,cellContent);
      processVisibility(cell,cellContent);
      processBookmark(cell,cellContent);
      processAction(cell,cellContent);
      if (emitter != null) {
        emitter.startCell(cellContent);
      }
      for (int m=0; m < cell.getContentCount(); m++) {
        ReportItemDesign item=cell.getContent(m);
        if (item != null) {
          if (layoutEmitter != null) {
            item.accept(this.visitor,layoutEmitter.getCellEmitter());
          }
 else {
            item.accept(this.visitor,emitter);
          }
        }
      }
      if (emitter != null) {
        emitter.endCell(cellContent);
      }
      context.popContent();
    }
  }
  boolean closeRow=true;
  if (closeRow) {
    emitter.endRow((IRowContent)context.getContent());
    context.popContent();
    rowClosed=true;
  }
}

Fixed version (ground truth):
/** 
 * output the row. row is output as: row start, cells*, row end.
 * @param rowIndex the index in the rows
 * @param row row design
 * @param emitter output emitter
 */
protected void accessRow(RowDesign row,IContentEmitter emitter,boolean runScript){
  if (rowClosed) {
    IRowContent rowContent=report.createRowContent();
    assert(rowContent instanceof RowContent);
    IContent parent=context.getContent();
    context.pushContent(rowContent);
    initializeContent(parent,row,rowContent);
    processStyle(row,rowContent);
    processVisibility(row,rowContent);
    processBookmark(row,rowContent);
    processAction(row,rowContent);
    if (context.isInFactory() && runScript) {
      DetailRowScriptExecutor.handleOnCreate((RowContent)rowContent,null,context);
    }
    if (emitter != null) {
      emitter.startRow(rowContent);
    }
    rowClosed=false;
  }
  for (int j=0; j < row.getCellCount(); j++) {
    CellDesign cell=row.getCell(j);
    if (cell != null) {
      ICellContent cellContent=report.createCellContent();
      assert(cellContent instanceof CellContent);
      IContent parent=context.getContent();
      context.pushContent(cellContent);
      initializeContent(parent,cell,cellContent);
      cellContent.setColumn(cell.getColumn());
      cellContent.setColSpan(cell.getColSpan());
      cellContent.setRowSpan(cell.getRowSpan());
      processStyle(cell,cellContent);
      processVisibility(cell,cellContent);
      processBookmark(cell,cellContent);
      processAction(cell,cellContent);
      if (context.isInFactory()) {
        CellScriptExecutor.handleOnCreate((CellContent)cellContent,null,context);
      }
      if (emitter != null) {
        emitter.startCell(cellContent);
      }
      for (int m=0; m < cell.getContentCount(); m++) {
        ReportItemDesign item=cell.getContent(m);
        if (item != null) {
          if (layoutEmitter != null) {
            item.accept(this.visitor,layoutEmitter.getCellEmitter());
          }
 else {
            item.accept(this.visitor,emitter);
          }
        }
      }
      if (emitter != null) {
        emitter.endCell(cellContent);
      }
      context.popContent();
    }
  }
  boolean closeRow=true;
  if (closeRow) {
    emitter.endRow((IRowContent)context.getContent());
    context.popContent();
    rowClosed=true;
  }
}