Program: 120649
Project: 120649
Buggy source:
protected void restoreWidgetValuesForPOJO(){
  IDialogSettings settings=getDialogSettings();
  if (settings != null) {
    String[] directoryNames=settings.getArray(STORE_DESTINATION_NAMES_ID);
    String fileName=getDefaultFileNameWithType();
    if (!fileName.endsWith(FileConstants.ZIP_FILE_SUFFIX)) {
      fileName=fileName + FileConstants.ZIP_FILE_SUFFIX;
    }
    if (directoryNames != null && directoryNames.length > 0) {
      for (int i=0; i < directoryNames.length; i++) {
        if (directoryNames[i].toLowerCase().endsWith(FileConstants.ZIP_FILE_SUFFIX)) {
          directoryNames[i]=(directoryNames[i].charAt(0) + "String_Node_Str").toUpperCase() + directoryNames[i].substring(1);
          addDestinationItem(directoryNames[i]);
        }
      }
      setDestinationValue(directoryNames[0].substring(0,(directoryNames[0].lastIndexOf("String_Node_Str") + 1)) + fileName);
    }
 else {
      setDefaultDestination();
    }
    shellLauncherButton.setSelection(settings.getBoolean(STORE_SHELL_LAUNCHER_ID));
    jobItemButton.setSelection(settings.getBoolean(STORE_JOB_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);
    }
  }
  log4jLevelCombo.setItems(Log4jPrefsSettingManager.getLevel());
  if (Log4jPrefsSettingManager.getLevel().length > 0) {
    log4jLevelCombo.select(0);
  }
}

Fixed version (ground truth):
protected void restoreWidgetValuesForPOJO(){
  IDialogSettings settings=getDialogSettings();
  if (settings != null) {
    String[] directoryNames=settings.getArray(STORE_DESTINATION_NAMES_ID);
    String fileName=getDefaultFileNameWithType();
    if (!fileName.endsWith(FileConstants.ZIP_FILE_SUFFIX)) {
      fileName=fileName + FileConstants.ZIP_FILE_SUFFIX;
    }
    if (directoryNames != null && directoryNames.length > 0) {
      for (int i=0; i < directoryNames.length; i++) {
        if (directoryNames[i].toLowerCase().endsWith(FileConstants.ZIP_FILE_SUFFIX)) {
          directoryNames[i]=(directoryNames[i].charAt(0) + "String_Node_Str").toUpperCase() + directoryNames[i].substring(1);
          addDestinationItem(directoryNames[i]);
        }
      }
      setDestinationValue(directoryNames[0].substring(0,(directoryNames[0].lastIndexOf("String_Node_Str") + 1)) + fileName);
    }
 else {
      setDefaultDestination();
    }
    shellLauncherButton.setSelection(settings.getBoolean(STORE_SHELL_LAUNCHER_ID));
    jobItemButton.setSelection(settings.getBoolean(STORE_JOB_ID));
    jobScriptButton.setSelection(settings.getBoolean(STORE_SOURCE_ID));
    contextButton.setSelection(settings.getBoolean(STORE_CONTEXT_ID));
    applyToChildrenButton.setSelection(settings.getBoolean(APPLY_TO_CHILDREN_ID));
    applyLog4jToChildrenButton.setSelection(settings.getBoolean(APPLY_LOG4J_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);
    }
  }
  if (log4jLevelCombo != null) {
    log4jLevelCombo.setItems(Log4jPrefsSettingManager.getLevel());
    if (Log4jPrefsSettingManager.getLevel().length > 0) {
      log4jLevelCombo.select(0);
    }
  }
}