Program: 70042
Project: 70042
Buggy source:
protected void drawCellDiagonal(CellArea cell){
  DiagonalInfo diagonalInfo=cell.getDiagonalInfo();
  if (diagonalInfo != null) {
    int startX=currentX + getX(cell);
    int startY=currentY + getY(cell);
    int width=getWidth(cell);
    int height=getHeight(cell);
    int dw=diagonalInfo.getDiagonalWidth();
switch (diagonalInfo.getDiagonalNumber()) {
case 2:
      pageGraphic.drawLine(startX,startY + dw / 2,startX + width,startY + height / 2 - dw / 2,getScaledValue(diagonalInfo.getDiagonalWidth()),diagonalInfo.getColor(),diagonalInfo.getDiagonalStyle());
    pageGraphic.drawLine(startX,startY + dw / 2,startX + width / 2,startY + height - dw / 2,getScaledValue(dw),diagonalInfo.getColor(),diagonalInfo.getDiagonalStyle());
  break;
case 3:
pageGraphic.drawLine(startX,startY + dw / 2,startX + width,startY + height - dw / 2,getScaledValue(dw),diagonalInfo.getColor(),diagonalInfo.getDiagonalStyle());
pageGraphic.drawLine(startX,startY + dw / 2,startX + width,startY + height / 2 - dw / 2,getScaledValue(dw),diagonalInfo.getColor(),diagonalInfo.getDiagonalStyle());
pageGraphic.drawLine(startX,startY + dw / 2,startX + width / 2,startY + height - dw / 2,getScaledValue(dw),diagonalInfo.getColor(),diagonalInfo.getDiagonalStyle());
break;
default :
pageGraphic.drawLine(startX,startY + dw / 2,startX + width,startY + height - dw / 2,getScaledValue(dw),diagonalInfo.getColor(),diagonalInfo.getDiagonalStyle());
break;
}
dw=diagonalInfo.getAntidiagonalWidth();
switch (diagonalInfo.getAntidiagonalNumber()) {
case 2:
pageGraphic.drawLine(startX,startY + height - dw / 2,startX + width / 2,startY + dw / 2,getScaledValue(diagonalInfo.getAntidiagonalWidth()),diagonalInfo.getColor(),diagonalInfo.getAntidiagonalStyle());
pageGraphic.drawLine(startX,startY + height - dw / 2,startX + width,startY + height / 2,getScaledValue(diagonalInfo.getAntidiagonalWidth()),diagonalInfo.getColor(),diagonalInfo.getAntidiagonalStyle());
break;
case 3:
pageGraphic.drawLine(startX,startY + height - dw / 2,startX + width / 2,startY + dw / 2,getScaledValue(diagonalInfo.getAntidiagonalWidth()),diagonalInfo.getColor(),diagonalInfo.getAntidiagonalStyle());
pageGraphic.drawLine(startX,startY + height - dw / 2,startX + width,startY + height / 2,getScaledValue(diagonalInfo.getAntidiagonalWidth()),diagonalInfo.getColor(),diagonalInfo.getAntidiagonalStyle());
pageGraphic.drawLine(startX,startY + height - dw / 2,startX + width,startY + dw / 2,getScaledValue(diagonalInfo.getAntidiagonalWidth()),diagonalInfo.getColor(),diagonalInfo.getAntidiagonalStyle());
break;
default :
pageGraphic.drawLine(startX,startY + height - dw / 2,startX + width,startY + dw / 2,getScaledValue(diagonalInfo.getAntidiagonalWidth()),diagonalInfo.getColor(),diagonalInfo.getAntidiagonalStyle());
break;
}
}
}

Fixed version (ground truth):
protected void drawCellDiagonal(CellArea cell){
  DiagonalInfo diagonalInfo=cell.getDiagonalInfo();
  if (diagonalInfo != null) {
    int startX=currentX + getX(cell);
    int startY=currentY + getY(cell);
    int width=getWidth(cell);
    int height=getHeight(cell);
    int dw=diagonalInfo.getDiagonalWidth();
    int ds=diagonalInfo.getDiagonalStyle();
    if (ds == DiagonalInfo.BORDER_STYLE_DOUBLE) {
      ds=DiagonalInfo.BORDER_STYLE_SOLID;
    }
switch (diagonalInfo.getDiagonalNumber()) {
case 2:
      pageGraphic.drawLine(startX,startY + dw / 2,startX + width,startY + height / 2 - dw / 2,getScaledValue(diagonalInfo.getDiagonalWidth()),diagonalInfo.getColor(),ds);
    pageGraphic.drawLine(startX,startY + dw / 2,startX + width / 2,startY + height - dw / 2,getScaledValue(dw),diagonalInfo.getColor(),ds);
  break;
case 3:
pageGraphic.drawLine(startX,startY + dw / 2,startX + width,startY + height - dw / 2,getScaledValue(dw),diagonalInfo.getColor(),ds);
pageGraphic.drawLine(startX,startY + dw / 2,startX + width,startY + height / 2 - dw / 2,getScaledValue(dw),diagonalInfo.getColor(),ds);
pageGraphic.drawLine(startX,startY + dw / 2,startX + width / 2,startY + height - dw / 2,getScaledValue(dw),diagonalInfo.getColor(),ds);
break;
default :
pageGraphic.drawLine(startX,startY + dw / 2,startX + width,startY + height - dw / 2,getScaledValue(dw),diagonalInfo.getColor(),ds);
break;
}
dw=diagonalInfo.getAntidiagonalWidth();
ds=diagonalInfo.getAntidiagonalStyle();
if (ds == DiagonalInfo.BORDER_STYLE_DOUBLE) {
ds=DiagonalInfo.BORDER_STYLE_SOLID;
}
switch (diagonalInfo.getAntidiagonalNumber()) {
case 2:
pageGraphic.drawLine(startX,startY + height - dw / 2,startX + width / 2,startY + dw / 2,getScaledValue(diagonalInfo.getAntidiagonalWidth()),diagonalInfo.getColor(),ds);
pageGraphic.drawLine(startX,startY + height - dw / 2,startX + width,startY + height / 2,getScaledValue(diagonalInfo.getAntidiagonalWidth()),diagonalInfo.getColor(),ds);
break;
case 3:
pageGraphic.drawLine(startX,startY + height - dw / 2,startX + width / 2,startY + dw / 2,getScaledValue(diagonalInfo.getAntidiagonalWidth()),diagonalInfo.getColor(),ds);
pageGraphic.drawLine(startX,startY + height - dw / 2,startX + width,startY + height / 2,getScaledValue(diagonalInfo.getAntidiagonalWidth()),diagonalInfo.getColor(),ds);
pageGraphic.drawLine(startX,startY + height - dw / 2,startX + width,startY + dw / 2,getScaledValue(diagonalInfo.getAntidiagonalWidth()),diagonalInfo.getColor(),ds);
break;
default :
pageGraphic.drawLine(startX,startY + height - dw / 2,startX + width,startY + dw / 2,getScaledValue(diagonalInfo.getAntidiagonalWidth()),diagonalInfo.getColor(),ds);
break;
}
}
}