Program: 124023
Project: 124023
Buggy source:
protected void restoreWidgetValuesForESB(){
  IDialogSettings settings=getDialogSettings();
  if (settings != null) {
    String[] directoryNames=settings.getArray(STORE_DESTINATION_NAMES_ID);
    if (directoryNames != null && directoryNames.length > 0) {
      String fileName=this.getDefaultFileName().get(0) + "String_Node_Str" + this.getDefaultFileName().get(1)+ getOutputSuffix();
      for (int i=0; i < directoryNames.length; i++) {
        String destination=new Path(directoryNames[i]).append(fileName).toOSString();
        addDestinationItem(destination);
        setDestinationValue(destination);
      }
    }
 else {
      setDefaultDestination();
    }
    IDialogSettings section=getDialogSettings().getSection(DESTINATION_FILE);
    if (section == null) {
      section=getDialogSettings().addNewSection(DESTINATION_FILE);
    }
    if (exportDependencies != null && !exportDependencies.isDisposed()) {
      exportDependencies.setSelection(settings.getBoolean(STORE_DEPENDENCIES_ID));
    }
    if (jobScriptButton != null && !jobScriptButton.isDisposed()) {
      jobScriptButton.setSelection(settings.getBoolean(STORE_SOURCE_ID));
    }
    if (contextButton != null && !contextButton.isDisposed()) {
      contextButton.setSelection(settings.getBoolean(STORE_CONTEXT_ID));
    }
    if (applyToChildrenButton != null && !applyToChildrenButton.isDisposed()) {
      applyToChildrenButton.setSelection(settings.getBoolean(APPLY_TO_CHILDREN_ID));
    }
    if (jobItemButton != null && !jobItemButton.isDisposed()) {
      jobItemButton.setSelection(settings.getBoolean(STORE_JOB_ID));
    }
    if (section.get(ESB_EXPORT_TYPE) != null) {
      esbTypeCombo.setText(section.get(ESB_EXPORT_TYPE));
      if (section.get(ESB_SERVICE_NAME) != null) {
        esbServiceName.setText(section.get(ESB_SERVICE_NAME));
      }
      if (section.get(ESB_CATEGORY) != null) {
        esbCategory.setText(section.get(ESB_CATEGORY));
      }
      if (section.get(QUERY_MESSAGE_NAME) != null) {
        esbQueueMessageName.setText(section.get(QUERY_MESSAGE_NAME));
      }
    }
  }
  if (getProcessItem() != null && contextCombo != null) {
    try {
      setProcessItem((ProcessItem)ProxyRepositoryFactory.getInstance().getUptodateProperty(getProcessItem().getProperty()).getItem());
    }
 catch (    PersistenceException e) {
      e.printStackTrace();
    }
    List<String> contextNames=getJobContexts(getProcessItem());
    contextCombo.setItems(contextNames.toArray(new String[contextNames.size()]));
    if (contextNames.size() > 0) {
      contextCombo.select(0);
    }
  }
}

Fixed version (ground truth):
protected void restoreWidgetValuesForESB(){
  IDialogSettings settings=getDialogSettings();
  if (settings != null) {
    String[] directoryNames=settings.getArray(STORE_DESTINATION_NAMES_ID);
    if (directoryNames != null && directoryNames.length > 0) {
      String fileName=getDefaultFileNameWithType();
      for (int i=0; i < directoryNames.length; i++) {
        String destination=new Path(directoryNames[i]).append(fileName).toOSString();
        addDestinationItem(destination);
        setDestinationValue(destination);
      }
    }
 else {
      setDefaultDestination();
    }
    IDialogSettings section=getDialogSettings().getSection(DESTINATION_FILE);
    if (section == null) {
      section=getDialogSettings().addNewSection(DESTINATION_FILE);
    }
    if (exportDependencies != null && !exportDependencies.isDisposed()) {
      exportDependencies.setSelection(settings.getBoolean(STORE_DEPENDENCIES_ID));
    }
    if (jobScriptButton != null && !jobScriptButton.isDisposed()) {
      jobScriptButton.setSelection(settings.getBoolean(STORE_SOURCE_ID));
    }
    if (contextButton != null && !contextButton.isDisposed()) {
      contextButton.setSelection(settings.getBoolean(STORE_CONTEXT_ID));
    }
    if (applyToChildrenButton != null && !applyToChildrenButton.isDisposed()) {
      applyToChildrenButton.setSelection(settings.getBoolean(APPLY_TO_CHILDREN_ID));
    }
    if (jobItemButton != null && !jobItemButton.isDisposed()) {
      jobItemButton.setSelection(settings.getBoolean(STORE_JOB_ID));
    }
    if (section.get(ESB_EXPORT_TYPE) != null) {
      esbTypeCombo.setText(section.get(ESB_EXPORT_TYPE));
      if (section.get(ESB_SERVICE_NAME) != null) {
        esbServiceName.setText(section.get(ESB_SERVICE_NAME));
      }
      if (section.get(ESB_CATEGORY) != null) {
        esbCategory.setText(section.get(ESB_CATEGORY));
      }
      if (section.get(QUERY_MESSAGE_NAME) != null) {
        esbQueueMessageName.setText(section.get(QUERY_MESSAGE_NAME));
      }
    }
  }
  if (getProcessItem() != null && contextCombo != null) {
    try {
      setProcessItem((ProcessItem)ProxyRepositoryFactory.getInstance().getUptodateProperty(getProcessItem().getProperty()).getItem());
    }
 catch (    PersistenceException e) {
      e.printStackTrace();
    }
    List<String> contextNames=getJobContexts(getProcessItem());
    contextCombo.setItems(contextNames.toArray(new String[contextNames.size()]));
    if (contextNames.size() > 0) {
      contextCombo.select(0);
    }
  }
}