Program: 124025
Project: 124025
Buggy source:
protected void restoreWidgetValuesForPOJO(){
  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();
    }
    shellLauncherButton.setSelection(settings.getBoolean(STORE_SHELL_LAUNCHER_ID));
    systemRoutineButton.setSelection(settings.getBoolean(STORE_SYSTEM_ROUTINE_ID));
    userRoutineButton.setSelection(settings.getBoolean(STORE_USER_ROUTINE_ID));
    modelButton.setSelection(settings.getBoolean(STORE_MODEL_ID));
    jobItemButton.setSelection(settings.getBoolean(STORE_JOB_ID));
    exportDependencies.setEnabled(settings.getBoolean(STORE_JOB_ID));
    exportDependencies.setSelection(settings.getBoolean(STORE_DEPENDENCIES_ID));
    jobScriptButton.setSelection(settings.getBoolean(STORE_SOURCE_ID));
    contextButton.setSelection(settings.getBoolean(STORE_CONTEXT_ID));
    applyToChildrenButton.setSelection(settings.getBoolean(APPLY_TO_CHILDREN_ID));
    chkButton.setSelection(settings.getBoolean(EXTRACT_ZIP_FILE));
    zipOption=String.valueOf(chkButton.getSelection());
  }
  launcherCombo.setItems(JobScriptsManager.getLauncher());
  if (JobScriptsManager.getLauncher().length > 0) {
    launcherCombo.select(0);
  }
  if (getProcessItem() != null && contextCombo != null) {
    ProcessItem item=getProcessItem();
    try {
      String id=item.getProperty().getId();
      IRepositoryViewObject lastVersion=ProxyRepositoryFactory.getInstance().getLastVersion(id);
      item=(ProcessItem)lastVersion.getProperty().getItem();
    }
 catch (    PersistenceException e) {
      throw new RuntimeException(e);
    }
    List<String> contextNames;
    contextNames=getJobContexts(item);
    contextCombo.setItems(contextNames.toArray(new String[contextNames.size()]));
    if (contextNames.size() > 0) {
      contextCombo.select(0);
    }
  }
}

Fixed version (ground truth):
protected void restoreWidgetValuesForPOJO(){
  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();
    }
    shellLauncherButton.setSelection(settings.getBoolean(STORE_SHELL_LAUNCHER_ID));
    systemRoutineButton.setSelection(settings.getBoolean(STORE_SYSTEM_ROUTINE_ID));
    userRoutineButton.setSelection(settings.getBoolean(STORE_USER_ROUTINE_ID));
    modelButton.setSelection(settings.getBoolean(STORE_MODEL_ID));
    jobItemButton.setSelection(settings.getBoolean(STORE_JOB_ID));
    exportDependencies.setEnabled(settings.getBoolean(STORE_JOB_ID));
    exportDependencies.setSelection(settings.getBoolean(STORE_DEPENDENCIES_ID));
    jobScriptButton.setSelection(settings.getBoolean(STORE_SOURCE_ID));
    contextButton.setSelection(settings.getBoolean(STORE_CONTEXT_ID));
    applyToChildrenButton.setSelection(settings.getBoolean(APPLY_TO_CHILDREN_ID));
    chkButton.setSelection(settings.getBoolean(EXTRACT_ZIP_FILE));
    zipOption=String.valueOf(chkButton.getSelection());
  }
  launcherCombo.setItems(JobScriptsManager.getLauncher());
  if (JobScriptsManager.getLauncher().length > 0) {
    launcherCombo.select(0);
  }
  if (getProcessItem() != null && contextCombo != null) {
    ProcessItem item=getProcessItem();
    try {
      String id=item.getProperty().getId();
      IRepositoryViewObject lastVersion=ProxyRepositoryFactory.getInstance().getLastVersion(id);
      item=(ProcessItem)lastVersion.getProperty().getItem();
    }
 catch (    PersistenceException e) {
      throw new RuntimeException(e);
    }
    List<String> contextNames;
    contextNames=getJobContexts(item);
    contextCombo.setItems(contextNames.toArray(new String[contextNames.size()]));
    if (contextNames.size() > 0) {
      contextCombo.select(0);
    }
  }
}