Program: 67363
Project: 67363
Buggy source:
private void populateLists(){
  GraphicsEnvironment ge=GraphicsEnvironment.getLocalGraphicsEnvironment();
  String[] saFontNames=ge.getAvailableFontFamilyNames(Locale.ENGLISH);
  String currentFont=ChartUIUtil.getFontName(fdCurrent);
  cmbFontNames.add(ChartUIUtil.FONT_AUTO);
  if (ChartUIUtil.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);
      }
    }
  }
}

Fixed version (ground truth):
private void populateLists(){
  GraphicsEnvironment ge=GraphicsEnvironment.getLocalGraphicsEnvironment();
  String[] saFontNames=ge.getAvailableFontFamilyNames();
  String currentFont=ChartUIUtil.getFontName(fdCurrent);
  cmbFontNames.add(ChartUIUtil.FONT_AUTO);
  if (ChartUIUtil.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);
      }
    }
  }
}