Program: 78062
Project: 78062
Buggy source:
private void populateLists(){
  GraphicsEnvironment ge=GraphicsEnvironment.getLocalGraphicsEnvironment();
  String[] saFontNames=ge.getAvailableFontFamilyNames();
  String currentFont=ChartUIUtil.getFontName(fdCurrent);
  cmbFontNames.add(FONT_AUTO);
  if (FONT_AUTO.equals(currentFont)) {
    cmbFontNames.select(0);
  }
  for (int iC=0; iC < saFontNames.length; iC++) {
    cmbFontNames.add(saFontNames[iC]);
    if (saFontNames[iC].equalsIgnoreCase(currentFont)) {
      cmbFontNames.select(iC);
    }
  }
  if (cmbFontNames.getSelectionIndex() == -1) {
    cmbFontNames.select(0);
  }
  if (isAlignmentEnabled && fdCurrent.getAlignment() != null && fdCurrent.getAlignment().isSetHorizontalAlignment() && fdCurrent.getAlignment().isSetVerticalAlignment()) {
    HorizontalAlignment ha=fdCurrent.getAlignment().getHorizontalAlignment();
    VerticalAlignment va=fdCurrent.getAlignment().getVerticalAlignment();
    if (HorizontalAlignment.LEFT_LITERAL.equals(ha)) {
      if (VerticalAlignment.TOP_LITERAL.equals(va)) {
        btnATopLeft.setSelection(true);
      }
 else       if (VerticalAlignment.BOTTOM_LITERAL.equals(va)) {
        btnABottomLeft.setSelection(true);
      }
 else {
        btnACenterLeft.setSelection(true);
      }
    }
 else     if (HorizontalAlignment.RIGHT_LITERAL.equals(ha)) {
      if (VerticalAlignment.TOP_LITERAL.equals(va)) {
        btnATopRight.setSelection(true);
      }
 else       if (VerticalAlignment.BOTTOM_LITERAL.equals(va)) {
        btnABottomRight.setSelection(true);
      }
 else {
        btnACenterRight.setSelection(true);
      }
    }
 else {
      if (VerticalAlignment.TOP_LITERAL.equals(va)) {
        btnATopCenter.setSelection(true);
      }
 else       if (VerticalAlignment.BOTTOM_LITERAL.equals(va)) {
        btnABottomCenter.setSelection(true);
      }
 else {
        btnACenter.setSelection(true);
      }
    }
  }
}

Fixed version (ground truth):
private void populateLists(){
  GraphicsEnvironment ge=GraphicsEnvironment.getLocalGraphicsEnvironment();
  String[] saFontNames=ge.getAvailableFontFamilyNames();
  String currentFont=ChartUIUtil.getFontName(fdCurrent);
  cmbFontNames.add(FONT_AUTO);
  if (FONT_AUTO.equals(currentFont)) {
    cmbFontNames.select(0);
  }
  for (int iC=0; iC < saFontNames.length; iC++) {
    cmbFontNames.add(saFontNames[iC]);
    if (saFontNames[iC].equalsIgnoreCase(currentFont)) {
      cmbFontNames.select(iC + 1);
    }
  }
  if (cmbFontNames.getSelectionIndex() == -1) {
    cmbFontNames.select(0);
  }
  if (isAlignmentEnabled && fdCurrent.getAlignment() != null && fdCurrent.getAlignment().isSetHorizontalAlignment() && fdCurrent.getAlignment().isSetVerticalAlignment()) {
    HorizontalAlignment ha=fdCurrent.getAlignment().getHorizontalAlignment();
    VerticalAlignment va=fdCurrent.getAlignment().getVerticalAlignment();
    if (HorizontalAlignment.LEFT_LITERAL.equals(ha)) {
      if (VerticalAlignment.TOP_LITERAL.equals(va)) {
        btnATopLeft.setSelection(true);
      }
 else       if (VerticalAlignment.BOTTOM_LITERAL.equals(va)) {
        btnABottomLeft.setSelection(true);
      }
 else {
        btnACenterLeft.setSelection(true);
      }
    }
 else     if (HorizontalAlignment.RIGHT_LITERAL.equals(ha)) {
      if (VerticalAlignment.TOP_LITERAL.equals(va)) {
        btnATopRight.setSelection(true);
      }
 else       if (VerticalAlignment.BOTTOM_LITERAL.equals(va)) {
        btnABottomRight.setSelection(true);
      }
 else {
        btnACenterRight.setSelection(true);
      }
    }
 else {
      if (VerticalAlignment.TOP_LITERAL.equals(va)) {
        btnATopCenter.setSelection(true);
      }
 else       if (VerticalAlignment.BOTTOM_LITERAL.equals(va)) {
        btnABottomCenter.setSelection(true);
      }
 else {
        btnACenter.setSelection(true);
      }
    }
  }
}