Program: 120648
Project: 120648
Buggy source:
protected void restoreWidgetValuesForWS(){
  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++) {
        if (directoryNames[i].toLowerCase().endsWith(FileConstants.WAR_FILE_SUFFIX) || 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]);
        }
      }
      File dest=new File(new File(directoryNames[0]).getParentFile(),fileName);
      setDestinationValue(dest.getAbsolutePath());
    }
 else {
      setDefaultDestination();
    }
    webXMLButton.setSelection(settings.getBoolean(STORE_WEBXML_ID));
    configFileButton.setSelection(settings.getBoolean(STORE_CONFIGFILE_ID));
    axisLibButton.setSelection(settings.getBoolean(STORE_AXISLIB_ID));
    wsddButton.setSelection(settings.getBoolean(STORE_WSDD_ID));
    wsdlButton.setSelection(settings.getBoolean(STORE_WSDL_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));
    if (chkButton.isVisible()) {
      zipOption=String.valueOf(chkButton.getSelection());
    }
 else {
      zipOption="String_Node_Str";
    }
  }
  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 restoreWidgetValuesForWS(){
  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++) {
        if (directoryNames[i].toLowerCase().endsWith(FileConstants.WAR_FILE_SUFFIX) || 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]);
        }
      }
      File dest=new File(new File(directoryNames[0]).getParentFile(),fileName);
      setDestinationValue(dest.getAbsolutePath());
    }
 else {
      setDefaultDestination();
    }
    webXMLButton.setSelection(settings.getBoolean(STORE_WEBXML_ID));
    configFileButton.setSelection(settings.getBoolean(STORE_CONFIGFILE_ID));
    axisLibButton.setSelection(settings.getBoolean(STORE_AXISLIB_ID));
    wsddButton.setSelection(settings.getBoolean(STORE_WSDD_ID));
    wsdlButton.setSelection(settings.getBoolean(STORE_WSDL_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));
    if (chkButton.isVisible()) {
      zipOption=String.valueOf(chkButton.getSelection());
    }
 else {
      zipOption="String_Node_Str";
    }
  }
  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);
    }
  }
  if (log4jLevelCombo != null) {
    log4jLevelCombo.setItems(Log4jPrefsSettingManager.getLevel());
    if (Log4jPrefsSettingManager.getLevel().length > 0) {
      log4jLevelCombo.select(0);
    }
  }
}