Program: 120647
Project: 120647
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 (applyLog4jToChildrenButton != null) {
      settings.put(APPLY_LOG4J_TO_CHILDREN_ID,applyLog4jToChildrenButton.getSelection());
    }
    if (log4jLevelCombo != null) {
      settings.put(LOG4J_LEVEL_ID,log4jLevelCombo.getText());
    }
    if (getCurrentExportType1().equals(JobExportType.POJO)) {
      settings.put(STORE_SHELL_LAUNCHER_ID,shellLauncherButton.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 (applyLog4jToChildrenButton != null && !applyLog4jToChildrenButton.isDisposed()) {
      settings.put(APPLY_LOG4J_TO_CHILDREN_ID,applyLog4jToChildrenButton.getSelection());
    }
    if (log4jLevelCombo != null && !log4jLevelCombo.isDisposed()) {
      settings.put(LOG4J_LEVEL_ID,log4jLevelCombo.getText());
    }
    if (getCurrentExportType1().equals(JobExportType.POJO)) {
      settings.put(STORE_SHELL_LAUNCHER_ID,shellLauncherButton.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());
    }
  }
}