Program: 75896
Project: 75896
Buggy source:
public void updateRow(RowArea rowArea,int specifiedHeight,boolean finished){
  hasDropCell=!finished;
  Row lastRow=getPreviousRow();
  if (lastRow == null && existDropCells()) {
    lastRow=unresolvedRow;
  }
  Row row=new Row(rowArea,start,columnNumber,finished);
  int height=specifiedHeight;
  for (int i=0; i < columnNumber; i++) {
    CellArea lastCell=null;
    if (lastRow != null) {
      lastCell=lastRow.getCell(start + i);
    }
    CellArea cell=row.getCell(start + i);
    if (lastCell != null && (lastCell.getRowSpan() > 1 || lastCell.getRowSpan() < 0)) {
      if (cell != null) {
        row.remove(start + i);
      }
      if (lastCell.getRowSpan() == 2) {
        if (lastCell instanceof DummyCell) {
          height=Math.max(height,lastCell.getHeight());
        }
 else {
          height=Math.max(height,lastCell.getHeight() - lastRow.getArea().getHeight());
        }
      }
      i=i + lastCell.getColSpan() - 1;
    }
 else {
      if (cell != null) {
        if (cell.getRowSpan() == 1) {
          height=Math.max(height,cell.getHeight());
        }
      }
      if (cell == null) {
        ICellContent cellContent=null;
        if (unresolvedRow != null) {
          CellArea ca=unresolvedRow.getCell(i);
          if (ca != null) {
            ICellContent cc=(ICellContent)ca.getContent();
            cellContent=new ClonedCellContent(cc,getRowSpan(unresolvedRow,ca));
          }
        }
        if (cellContent == null) {
          cellContent=tableContent.getReportContent().createCellContent();
          cellContent.setColumn(i);
          cellContent.setColSpan(1);
          cellContent.setRowSpan(1);
          cellContent.setParent(rowArea.getContent());
        }
        int startColumn=cellContent.getColumn();
        int endColumn=cellContent.getColSpan() + startColumn;
        CellArea emptyCell=AreaFactory.createCellArea(cellContent);
        resolveBorderConflict(emptyCell,false);
        IStyle areaStyle=emptyCell.getStyle();
        areaStyle.setProperty(IStyle.STYLE_PADDING_TOP,IStyle.NUMBER_0);
        areaStyle.setProperty(IStyle.STYLE_MARGIN_TOP,IStyle.NUMBER_0);
        emptyCell.setWidth(getCellWidth(startColumn,endColumn));
        emptyCell.setPosition(layoutInfo.getXPosition(i),0);
        rowArea.addChild(emptyCell);
        i=i + emptyCell.getColSpan() - 1;
      }
    }
  }
  if (height > 0) {
    Iterator iter=rowArea.getChildren();
    while (iter.hasNext()) {
      CellArea cell=(CellArea)iter.next();
      if (cell.getRowSpan() == 1) {
        cell.setHeight(height);
        verticalAlign(cell);
      }
    }
    rowArea.setHeight(height);
  }
  if (firstRow && existDropCells()) {
    mergeDropCell(rowArea);
  }
}

Fixed version (ground truth):
public void updateRow(RowArea rowArea,int specifiedHeight,boolean finished){
  hasDropCell=!finished;
  Row lastRow=getPreviousRow();
  if (lastRow == null && existDropCells()) {
    lastRow=unresolvedRow;
  }
  Row row=new Row(rowArea,start,columnNumber,finished);
  int height=specifiedHeight;
  for (int i=0; i < columnNumber; i++) {
    CellArea lastCell=null;
    if (lastRow != null) {
      lastCell=lastRow.getCell(start + i);
    }
    CellArea cell=row.getCell(start + i);
    if (lastCell != null && (lastCell.getRowSpan() > 1 || isDropCell(lastCell))) {
      if (cell != null) {
        row.remove(start + i);
      }
      if (lastCell.getRowSpan() == 2) {
        if (lastCell instanceof DummyCell) {
          height=Math.max(height,lastCell.getHeight());
        }
 else {
          height=Math.max(height,lastCell.getHeight() - lastRow.getArea().getHeight());
        }
      }
      i=i + lastCell.getColSpan() - 1;
    }
 else {
      if (cell != null) {
        if (cell.getRowSpan() == 1) {
          height=Math.max(height,cell.getHeight());
        }
      }
      if (cell == null) {
        ICellContent cellContent=null;
        if (unresolvedRow != null) {
          CellArea ca=unresolvedRow.getCell(i);
          if (ca != null) {
            ICellContent cc=(ICellContent)ca.getContent();
            cellContent=new ClonedCellContent(cc,getRowSpan(unresolvedRow,ca));
          }
        }
        if (cellContent == null) {
          cellContent=tableContent.getReportContent().createCellContent();
          cellContent.setColumn(i);
          cellContent.setColSpan(1);
          cellContent.setRowSpan(1);
          cellContent.setParent(rowArea.getContent());
        }
        int startColumn=cellContent.getColumn();
        int endColumn=cellContent.getColSpan() + startColumn;
        CellArea emptyCell=AreaFactory.createCellArea(cellContent);
        resolveBorderConflict(emptyCell,false);
        IStyle areaStyle=emptyCell.getStyle();
        areaStyle.setProperty(IStyle.STYLE_PADDING_TOP,IStyle.NUMBER_0);
        areaStyle.setProperty(IStyle.STYLE_MARGIN_TOP,IStyle.NUMBER_0);
        emptyCell.setWidth(getCellWidth(startColumn,endColumn));
        emptyCell.setPosition(layoutInfo.getXPosition(i),0);
        rowArea.addChild(emptyCell);
        i=i + emptyCell.getColSpan() - 1;
      }
    }
  }
  if (specifiedHeight == 0 && isEmptyRow(row)) {
    height=getHeightOfEmptyRow(row);
  }
  if (height >= 0) {
    Iterator iter=rowArea.getChildren();
    while (iter.hasNext()) {
      CellArea cell=(CellArea)iter.next();
      if (cell.getRowSpan() == 1) {
        cell.setHeight(height);
        verticalAlign(cell);
      }
    }
    rowArea.setHeight(height);
  }
  if (firstRow && existDropCells()) {
    mergeDropCell(rowArea);
  }
}