Program: 70233
Project: 70233
Buggy source:
protected void writeCell(DataOutputStream out,CellDesign cell) throws IOException {
  writeReportItem(out,cell);
  int column=cell.getColumn();
  if (column != -1) {
    IOUtil.writeShort(out,FIELD_COLUMN);
    IOUtil.writeInt(out,column);
  }
  int colSpan=cell.getColSpan();
  if (colSpan != 1) {
    IOUtil.writeShort(out,FIELD_COL_SPAN);
    IOUtil.writeInt(out,colSpan);
  }
  int rowSpan=cell.getRowSpan();
  if (rowSpan != 1) {
    IOUtil.writeShort(out,FIELD_ROW_SPAN);
    IOUtil.writeInt(out,rowSpan);
  }
  String drop=cell.getDrop();
  if (drop != null) {
    IOUtil.writeShort(out,FIELD_DROP);
    IOUtil.writeString(out,drop);
  }
  boolean displayGroupIcon=cell.getDisplayGroupIcon();
  if (displayGroupIcon) {
    IOUtil.writeShort(out,FIELD_DISPLAY_GROUP_ICON);
    IOUtil.writeBool(out,displayGroupIcon);
  }
  if (cell.hasDiagonalLine()) {
    int diagonalNumber=cell.getDiagonalNumber();
    if (diagonalNumber > 0) {
      IOUtil.writeShort(out,FIELD_DIAGONAL_NUMBER);
      IOUtil.writeInt(out,diagonalNumber);
      String diagonalStyle=cell.getDiagonalStyle();
      if (diagonalStyle != null) {
        IOUtil.writeShort(out,FIELD_DIAGONAL_STYLE);
        IOUtil.writeString(out,diagonalStyle);
      }
      DimensionType diagonalWidth=cell.getDiagonalWidth();
      if (diagonalWidth != null) {
        IOUtil.writeShort(out,FIELD_DIAGONAL_WIDTH);
        writeDimension(out,diagonalWidth);
      }
    }
    int antidiagonalNumber=cell.getAntidiagonalNumber();
    if (antidiagonalNumber > 0) {
      IOUtil.writeShort(out,FIELD_ANTIDIAGONAL_NUMBER);
      IOUtil.writeInt(out,antidiagonalNumber);
      String antidiagonalStyle=cell.getAntidiagonalStyle();
      if (antidiagonalStyle != null) {
        IOUtil.writeShort(out,FIELD_ANTIDIAGONAL_STYLE);
        IOUtil.writeString(out,antidiagonalStyle);
      }
      DimensionType antidiagonalWidth=cell.getAntidiagonalWidth();
      if (antidiagonalWidth != null) {
        IOUtil.writeShort(out,FIELD_ANTIDIAGONAL_WIDTH);
        writeDimension(out,antidiagonalWidth);
      }
    }
  }
}

Fixed version (ground truth):
protected void writeCell(DataOutputStream out,CellDesign cell) throws IOException {
  writeReportItem(out,cell);
  int column=cell.getColumn();
  if (column != -1) {
    IOUtil.writeShort(out,FIELD_COLUMN);
    IOUtil.writeInt(out,column);
  }
  int colSpan=cell.getColSpan();
  if (colSpan != 1) {
    IOUtil.writeShort(out,FIELD_COL_SPAN);
    IOUtil.writeInt(out,colSpan);
  }
  int rowSpan=cell.getRowSpan();
  if (rowSpan != 1) {
    IOUtil.writeShort(out,FIELD_ROW_SPAN);
    IOUtil.writeInt(out,rowSpan);
  }
  String drop=cell.getDrop();
  if (drop != null) {
    IOUtil.writeShort(out,FIELD_DROP);
    IOUtil.writeString(out,drop);
  }
  Expression<String> headers=cell.getHeaders();
  if (headers != null) {
    IOUtil.writeShort(out,FIELD_HEADERS);
    write(out,headers);
  }
  String scope=cell.getScope();
  if (scope != null) {
    IOUtil.writeShort(out,FIELD_SCOPE);
    IOUtil.writeString(out,scope);
  }
  boolean displayGroupIcon=cell.getDisplayGroupIcon();
  if (displayGroupIcon) {
    IOUtil.writeShort(out,FIELD_DISPLAY_GROUP_ICON);
    IOUtil.writeBool(out,displayGroupIcon);
  }
  if (cell.hasDiagonalLine()) {
    int diagonalNumber=cell.getDiagonalNumber();
    if (diagonalNumber > 0) {
      IOUtil.writeShort(out,FIELD_DIAGONAL_NUMBER);
      IOUtil.writeInt(out,diagonalNumber);
      String diagonalStyle=cell.getDiagonalStyle();
      if (diagonalStyle != null) {
        IOUtil.writeShort(out,FIELD_DIAGONAL_STYLE);
        IOUtil.writeString(out,diagonalStyle);
      }
      DimensionType diagonalWidth=cell.getDiagonalWidth();
      if (diagonalWidth != null) {
        IOUtil.writeShort(out,FIELD_DIAGONAL_WIDTH);
        writeDimension(out,diagonalWidth);
      }
    }
    int antidiagonalNumber=cell.getAntidiagonalNumber();
    if (antidiagonalNumber > 0) {
      IOUtil.writeShort(out,FIELD_ANTIDIAGONAL_NUMBER);
      IOUtil.writeInt(out,antidiagonalNumber);
      String antidiagonalStyle=cell.getAntidiagonalStyle();
      if (antidiagonalStyle != null) {
        IOUtil.writeShort(out,FIELD_ANTIDIAGONAL_STYLE);
        IOUtil.writeString(out,antidiagonalStyle);
      }
      DimensionType antidiagonalWidth=cell.getAntidiagonalWidth();
      if (antidiagonalWidth != null) {
        IOUtil.writeShort(out,FIELD_ANTIDIAGONAL_WIDTH);
        writeDimension(out,antidiagonalWidth);
      }
    }
  }
}