Program: 10829
Project: 10829
Buggy source:
private void update(boolean validateCredentials){
  isFinished=true;
  setWizardError(null);
  String selection=urlWidget.getURLSelection();
  if (CloudFoundryURLNavigation.canEnableCloudFoundryNavigation(selection)) {
    cfSignupButton.setVisible(true);
  }
 else {
    cfSignupButton.setVisible(false);
  }
  String urlText=urlWidget.getURLSelection();
  String userName=emailText.getText();
  String password=passwordText.getText();
  if (spaceChangeHandler != null && !spaceChangeHandler.isDescriptorAlreadySet(urlText,userName,password)) {
    spaceChangeHandler.clearSetDescriptor();
  }
  if (folder.getSelectionIndex() == 0) {
    String message="String_Node_Str";
    isFinished=false;
    if (userName == null || userName.trim().length() == 0) {
      message="String_Node_Str";
    }
 else     if (password == null || password.trim().length() == 0) {
      message="String_Node_Str";
    }
 else     if (urlCombo.getSelectionIndex() < 0) {
      message=NLS.bind("String_Node_Str",service);
    }
 else {
      isFinished=true;
      message=NLS.bind(DEFAULT_DESCRIPTION,service);
    }
    validateButton.setEnabled(isFinished);
    registerAccountButton.setEnabled(CloudFoundryBrandingExtensionPoint.supportsRegistration(serverTypeId,urlCombo.getText()));
    setWizardDescription(message);
    if (wizardHandle != null) {
      wizardHandle.update();
    }
 else     if (getWizardContainer() != null && getWizardContainer().getCurrentPage() != null) {
      getWizardContainer().updateButtons();
    }
  }
 else   if (folder.getSelectionIndex() == 1) {
    setWizardDescription(NLS.bind("String_Node_Str",service));
  }
  if (isFinished && validateCredentials) {
    String errorMsg=CloudUiUtil.validateCredentials(cfServer,userName,password,urlText,true,getRunnableContext());
    if (errorMsg == null) {
      if (spaceChangeHandler != null) {
        try {
          CloudSpacesDescriptor descriptor=spaceChangeHandler.getUpdatedDescriptor(urlText,userName,password,getRunnableContext());
          if (descriptor == null) {
            setWizardError("String_Node_Str");
            isFinished=false;
          }
 else {
            setWizardInformation("String_Node_Str");
          }
        }
 catch (        CoreException e) {
          isFinished=false;
          setWizardError("String_Node_Str" + e.getMessage() != null ? "String_Node_Str" + e.getMessage() : "String_Node_Str");
        }
      }
 else {
        isFinished=false;
        setWizardError("String_Node_Str");
      }
    }
 else {
      setWizardError(errorMsg);
    }
  }
}

Fixed version (ground truth):
private void update(boolean validateCredentials){
  isFinished=true;
  setWizardError(null);
  String selection=urlWidget.getURLSelection();
  if (CloudFoundryURLNavigation.canEnableCloudFoundryNavigation(selection)) {
    cfSignupButton.setVisible(true);
  }
 else {
    cfSignupButton.setVisible(false);
  }
  String urlText=urlWidget.getURLSelection();
  String userName=emailText.getText();
  String password=passwordText.getText();
  if (folder.getSelectionIndex() == 0) {
    String message="String_Node_Str";
    isFinished=false;
    if (userName == null || userName.trim().length() == 0) {
      message="String_Node_Str";
    }
 else     if (password == null || password.trim().length() == 0) {
      message="String_Node_Str";
    }
 else     if (urlCombo.getSelectionIndex() < 0) {
      message=NLS.bind("String_Node_Str",service);
    }
 else {
      isFinished=true;
      message=NLS.bind(DEFAULT_DESCRIPTION,service);
    }
    validateButton.setEnabled(isFinished);
    registerAccountButton.setEnabled(CloudFoundryBrandingExtensionPoint.supportsRegistration(serverTypeId,urlCombo.getText()));
    setWizardDescription(message);
  }
 else   if (folder.getSelectionIndex() == 1) {
    setWizardDescription(NLS.bind("String_Node_Str",service));
    isFinished=false;
  }
  if (isFinished) {
    if (validateCredentials) {
      String errorMsg=CloudUiUtil.validateCredentials(cfServer,userName,password,urlText,true,getRunnableContext());
      if (errorMsg == null) {
        try {
          CloudSpacesDescriptor descriptor=spaceChangeHandler.getUpdatedDescriptor(urlText,userName,password,getRunnableContext());
          if (descriptor == null) {
            setWizardError("String_Node_Str");
            isFinished=false;
          }
 else {
            setWizardInformation(VALID_ACCOUNT_MESSAGE);
          }
        }
 catch (        CoreException e) {
          isFinished=false;
          setWizardError("String_Node_Str" + (e.getMessage() != null ? "String_Node_Str" + e.getMessage() : "String_Node_Str") + "String_Node_Str");
        }
      }
 else {
        isFinished=false;
        setWizardError(errorMsg);
      }
    }
 else {
      if (!spaceChangeHandler.matchesCurrentDescriptor(urlText,userName,password)) {
        spaceChangeHandler.clearSetDescriptor();
        isFinished=false;
        setWizardInformation("String_Node_Str");
      }
 else {
        setWizardInformation(VALID_ACCOUNT_MESSAGE);
      }
    }
  }
  if (wizardHandle != null) {
    wizardHandle.update();
  }
 else   if (getWizardContainer() != null && getWizardContainer().getCurrentPage() != null) {
    getWizardContainer().updateButtons();
  }
}