Program: 75897
Project: 75897
Buggy source:
public void addRow(RowArea rowArea,boolean finished,boolean repeated){
  if (!repeated) {
    firstRow=false;
  }
  hasDropCell=!finished;
  Row lastRow=(Row)rows.getCurrent();
  Row row=new Row(rowArea,start,columnNumber,finished,repeated);
  int rowHeight=rowArea.getHeight();
  HashSet dropCells=new HashSet();
  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 (cell != null && (cell.getRowSpan() > 1 || cell.getRowSpan() < 0)) {
      hasDropCell=true;
    }
    if (lastCell != null && (lastCell.getRowSpan() > 1 || lastCell.getRowSpan() < 0)) {
      if (cell == null) {
        DummyCell dummyCell=null;
        if (lastCell instanceof DummyCell) {
          DummyCell refDummy=((DummyCell)lastCell);
          dummyCell=new DummyCell(refDummy.getCell());
          if (lastCell.getRowSpan() > 0) {
            dummyCell.setRowSpan(lastCell.getRowSpan() - 1);
          }
 else {
            dummyCell.setRowSpan(lastCell.getRowSpan());
          }
          dummyCell.setHeight(refDummy.getHeight() - rowHeight);
        }
 else {
          dummyCell=new DummyCell(lastCell);
          if (lastCell.getRowSpan() > 0) {
            dummyCell.setRowSpan(lastCell.getRowSpan() - 1);
          }
 else {
            dummyCell.setRowSpan(lastCell.getRowSpan());
          }
          dummyCell.setHeight(lastCell.getHeight() - lastRow.getArea().getHeight() - rowHeight);
        }
        row.addArea(dummyCell);
        if (dummyCell.getRowSpan() == 1) {
          if (dummyCell.getHeight() < 0) {
            CellArea cArea=dummyCell.getCell();
            if (!dropCells.contains(cArea)) {
              cArea.setHeight(cArea.getHeight() - dummyCell.getHeight());
              verticalAlign(cArea);
              dropCells.add(cArea);
            }
          }
        }
 else {
          hasDropCell=true;
        }
        i=i + dummyCell.getColSpan() - 1;
      }
    }
  }
  rows.add(row);
}

Fixed version (ground truth):
public void addRow(RowArea rowArea,boolean finished,boolean repeated){
  if (!repeated) {
    firstRow=false;
  }
  hasDropCell=!finished;
  Row lastRow=(Row)rows.getCurrent();
  Row row=new Row(rowArea,start,columnNumber,finished,repeated);
  int rowHeight=rowArea.getHeight();
  HashSet dropCells=new HashSet();
  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 (cell != null && (cell.getRowSpan() > 1 || isDropCell(cell))) {
      hasDropCell=true;
    }
    if (lastCell != null && (lastCell.getRowSpan() > 1 || isDropCell(lastCell))) {
      if (cell == null) {
        DummyCell dummyCell=null;
        if (lastCell instanceof DummyCell) {
          DummyCell refDummy=((DummyCell)lastCell);
          dummyCell=new DummyCell(refDummy.getCell());
          if (lastCell.getRowSpan() > 0) {
            dummyCell.setRowSpan(lastCell.getRowSpan() - 1);
          }
 else {
            dummyCell.setRowSpan(lastCell.getRowSpan());
          }
          dummyCell.setHeight(refDummy.getHeight() - rowHeight);
        }
 else {
          dummyCell=new DummyCell(lastCell);
          if (lastCell.getRowSpan() > 0) {
            dummyCell.setRowSpan(lastCell.getRowSpan() - 1);
          }
 else {
            dummyCell.setRowSpan(lastCell.getRowSpan());
          }
          dummyCell.setHeight(lastCell.getHeight() - lastRow.getArea().getHeight() - rowHeight);
        }
        row.addArea(dummyCell);
        if (dummyCell.getRowSpan() == 1) {
          if (dummyCell.getHeight() < 0) {
            CellArea cArea=dummyCell.getCell();
            if (!dropCells.contains(cArea)) {
              cArea.setHeight(cArea.getHeight() - dummyCell.getHeight());
              verticalAlign(cArea);
              dropCells.add(cArea);
            }
          }
        }
 else {
          hasDropCell=true;
        }
        i=i + dummyCell.getColSpan() - 1;
      }
    }
  }
  rows.add(row);
}