Program: 123299
Project: 123299
Buggy source:
@Override protected void internalSaveWidgetValues(){
  IDialogSettings settings=getDialogSettings();
  if (settings != null) {
    if (getCurrentExportType1().equals(JobExportType.PETALSESB)) {
      String[] directoryNames=settings.getArray(PETALS_EXPORT_DESTINATIONS);
      if (directoryNames == null)       directoryNames=new String[0];
      directoryNames=addToHistory(directoryNames,saDestinationFilePath);
      settings.put(PETALS_EXPORT_DESTINATIONS,directoryNames);
      return;
    }
    String[] directoryNames=settings.getArray(STORE_DESTINATION_NAMES_ID);
    if (directoryNames == null) {
      directoryNames=new String[0];
    }
    String destinationValue=getDestinationValue();
    directoryNames=addToHistory(directoryNames,destinationValue);
    settings.put(STORE_EXPORTTYPE_ID,getCurrentExportType1().toString());
    settings.put(STORE_DESTINATION_NAMES_ID,directoryNames);
    if (getCurrentExportType1().equals(JobExportType.OSGI)) {
      return;
    }
    if (contextButton != null) {
      settings.put(STORE_CONTEXT_ID,contextButton.getSelection());
    }
    if (jobScriptButton != null && !jobScriptButton.isDisposed()) {
      settings.put(STORE_SOURCE_ID,jobScriptButton.getSelection());
    }
    if (applyToChildrenButton != null) {
      settings.put(APPLY_TO_CHILDREN_ID,applyToChildrenButton.getSelection());
    }
    if (jobItemButton != null && !jobItemButton.isDisposed()) {
      settings.put(STORE_JOB_ID,jobItemButton.getSelection());
    }
    if (exportDependencies != null && !exportDependencies.isDisposed()) {
      settings.put(STORE_DEPENDENCIES_ID,exportDependencies.getSelection());
    }
    if (getCurrentExportType1().equals(JobExportType.POJO)) {
      settings.put(STORE_SHELL_LAUNCHER_ID,shellLauncherButton.getSelection());
      settings.put(STORE_SYSTEM_ROUTINE_ID,systemRoutineButton.getSelection());
      settings.put(STORE_USER_ROUTINE_ID,userRoutineButton.getSelection());
      settings.put(STORE_MODEL_ID,modelButton.getSelection());
      settings.put(EXTRACT_ZIP_FILE,chkButton.getSelection());
      return;
    }
 else     if (getCurrentExportType1().equals(JobExportType.WSZIP)) {
      settings.put(STORE_WEBXML_ID,webXMLButton.getSelection());
      settings.put(STORE_CONFIGFILE_ID,configFileButton.getSelection());
      settings.put(STORE_AXISLIB_ID,axisLibButton.getSelection());
      settings.put(STORE_WSDD_ID,wsddButton.getSelection());
      settings.put(STORE_WSDL_ID,wsdlButton.getSelection());
      settings.put(EXTRACT_ZIP_FILE,chkButton.getSelection());
    }
  }
}

Fixed version (ground truth):
@Override protected void internalSaveWidgetValues(){
  IDialogSettings settings=getDialogSettings();
  if (settings != null) {
    if (getCurrentExportType1().equals(JobExportType.PETALSESB)) {
      String[] directoryNames=settings.getArray(PETALS_EXPORT_DESTINATIONS);
      if (directoryNames == null) {
        directoryNames=new String[0];
      }
      directoryNames=addToHistory(directoryNames,saDestinationFilePath);
      settings.put(PETALS_EXPORT_DESTINATIONS,directoryNames);
      return;
    }
    String[] directoryNames=settings.getArray(STORE_DESTINATION_NAMES_ID);
    if (directoryNames == null) {
      directoryNames=new String[0];
    }
    String destinationValue=getDestinationValue();
    directoryNames=addToHistory(directoryNames,destinationValue);
    settings.put(STORE_EXPORTTYPE_ID,getCurrentExportType1().toString());
    settings.put(STORE_DESTINATION_NAMES_ID,directoryNames);
    if (getCurrentExportType1().equals(JobExportType.OSGI)) {
      return;
    }
    if (contextButton != null) {
      settings.put(STORE_CONTEXT_ID,contextButton.getSelection());
    }
    if (jobScriptButton != null && !jobScriptButton.isDisposed()) {
      settings.put(STORE_SOURCE_ID,jobScriptButton.getSelection());
    }
    if (applyToChildrenButton != null) {
      settings.put(APPLY_TO_CHILDREN_ID,applyToChildrenButton.getSelection());
    }
    if (jobItemButton != null && !jobItemButton.isDisposed()) {
      settings.put(STORE_JOB_ID,jobItemButton.getSelection());
    }
    if (exportDependencies != null && !exportDependencies.isDisposed()) {
      settings.put(STORE_DEPENDENCIES_ID,exportDependencies.getSelection());
    }
    if (getCurrentExportType1().equals(JobExportType.POJO)) {
      settings.put(STORE_SHELL_LAUNCHER_ID,shellLauncherButton.getSelection());
      settings.put(STORE_SYSTEM_ROUTINE_ID,systemRoutineButton.getSelection());
      settings.put(STORE_USER_ROUTINE_ID,userRoutineButton.getSelection());
      settings.put(STORE_MODEL_ID,modelButton.getSelection());
      settings.put(EXTRACT_ZIP_FILE,chkButton.getSelection());
      return;
    }
 else     if (getCurrentExportType1().equals(JobExportType.WSZIP)) {
      settings.put(STORE_WEBXML_ID,webXMLButton.getSelection());
      settings.put(STORE_CONFIGFILE_ID,configFileButton.getSelection());
      settings.put(STORE_AXISLIB_ID,axisLibButton.getSelection());
      settings.put(STORE_WSDD_ID,wsddButton.getSelection());
      settings.put(STORE_WSDL_ID,wsdlButton.getSelection());
      settings.put(EXTRACT_ZIP_FILE,chkButton.getSelection());
    }
  }
}