Program: 10940
Project: 10940
Buggy source:
private void createExistingUserComposite(TabFolder folder){
  Composite composite=new Composite(folder,SWT.NONE);
  composite.setLayout(new GridLayout());
  composite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  Composite topComposite=new Composite(composite,SWT.NONE);
  topComposite.setLayout(new GridLayout(2,false));
  topComposite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false));
  Label emailLabel=new Label(topComposite,SWT.NONE);
  emailLabel.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,false,false));
  emailLabel.setText("String_Node_Str");
  emailText=new Text(topComposite,SWT.BORDER);
  emailText.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false));
  emailText.setEditable(true);
  emailText.setFocus();
  if (cfServer.getUsername() != null) {
    emailText.setText(cfServer.getUsername());
  }
  emailText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      cfServer.setUsername(emailText.getText());
      update(true);
    }
  }
);
  Label passwordLabel=new Label(topComposite,SWT.NONE);
  passwordLabel.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,false,false));
  passwordLabel.setText("String_Node_Str");
  passwordText=new Text(topComposite,SWT.PASSWORD | SWT.BORDER);
  passwordText.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false));
  passwordText.setEditable(true);
  if (cfServer.getPassword() != null) {
    passwordText.setText(cfServer.getPassword());
  }
  passwordText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      cfServer.setPassword(passwordText.getText());
      update(true);
    }
  }
);
  urlWidget=new CloudUrlWidget(cfServer){
    @Override protected void setUpdatedSelectionInServer(){
      String currentServerURL=cfServer.getUrl();
      String selection=urlWidget.getURLSelection();
      String selectedURL=selection != null ? CloudUiUtil.getUrlFromDisplayText(selection) : null;
      boolean shouldClearSpaces=currentServerURL == null || !currentServerURL.equals(selectedURL);
      super.setUpdatedSelectionInServer();
      if (selection != null) {
        update(shouldClearSpaces);
      }
    }
  }
;
  urlWidget.createControls(topComposite);
  urlCombo=urlWidget.getUrlCombo();
  cfServer.setUrl(CloudUiUtil.getUrlFromDisplayText(urlCombo.getItem(urlCombo.getSelectionIndex())));
  final Composite validateComposite=new Composite(composite,SWT.NONE);
  validateComposite.setLayout(new GridLayout(3,false));
  validateComposite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false));
  validateButton=new Button(validateComposite,SWT.PUSH);
  validateButton.setText("String_Node_Str");
  validateButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent event){
      String urlText=urlWidget.getURLSelection();
      String userName=emailText.getText();
      String password=passwordText.getText();
      String errorMsg=CloudUiUtil.validateCredentials(cfServer,userName,password,urlText,true,getRunnableContext());
      try {
        spacesDescriptor=cloudSpaceChangeListener != null ? cloudSpaceChangeListener.updateDescriptor(urlText,userName,password,getRunnableContext()) : null;
        update(false);
      }
 catch (      CoreException e) {
        CloudFoundryPlugin.logError(e);
        errorMsg=e.getLocalizedMessage();
      }
      if (errorMsg == null) {
        setWizardInformation("String_Node_Str");
      }
 else {
        setWizardError(errorMsg);
      }
    }
  }
);
  registerAccountButton=new Button(validateComposite,SWT.PUSH);
  registerAccountButton.setText("String_Node_Str");
  registerAccountButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent event){
      RegisterAccountWizard wizard=new RegisterAccountWizard(cfServer);
      WizardDialog dialog=new WizardDialog(validateComposite.getShell(),wizard);
      if (dialog.open() == Window.OK) {
        if (wizard.getEmail() != null) {
          emailText.setText(wizard.getEmail());
        }
        if (wizard.getPassword() != null) {
          passwordText.setText(wizard.getPassword());
        }
      }
    }
  }
);
  cfSignupButton=new Button(validateComposite,SWT.PUSH);
  cfSignupButton.setText("String_Node_Str");
  cfSignupButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      CloudFoundryURLNavigation.CF_SIGNUP_URL.navigateExternal();
    }
  }
);
  TabItem item=new TabItem(folder,SWT.NONE);
  item.setText("String_Node_Str");
  item.setControl(composite);
}

Fixed version (ground truth):
private void createExistingUserComposite(TabFolder folder){
  Composite composite=new Composite(folder,SWT.NONE);
  composite.setLayout(new GridLayout());
  composite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  Composite topComposite=new Composite(composite,SWT.NONE);
  topComposite.setLayout(new GridLayout(2,false));
  topComposite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false));
  Label emailLabel=new Label(topComposite,SWT.NONE);
  emailLabel.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,false,false));
  emailLabel.setText("String_Node_Str");
  emailText=new Text(topComposite,SWT.BORDER);
  emailText.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false));
  emailText.setEditable(true);
  emailText.setFocus();
  if (cfServer.hasValidServerData() && cfServer.getUsername() != null) {
    emailText.setText(cfServer.getUsername());
  }
  emailText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      cfServer.setUsername(emailText.getText());
      update(true);
    }
  }
);
  Label passwordLabel=new Label(topComposite,SWT.NONE);
  passwordLabel.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,false,false));
  passwordLabel.setText("String_Node_Str");
  passwordText=new Text(topComposite,SWT.PASSWORD | SWT.BORDER);
  passwordText.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false));
  passwordText.setEditable(true);
  if (cfServer.hasValidServerData() && cfServer.getPassword() != null) {
    passwordText.setText(cfServer.getPassword());
  }
  passwordText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      cfServer.setPassword(passwordText.getText());
      update(true);
    }
  }
);
  urlWidget=new CloudUrlWidget(cfServer){
    @Override protected void setUpdatedSelectionInServer(){
      String currentServerURL=cfServer.getUrl();
      String selection=urlWidget.getURLSelection();
      String selectedURL=selection != null ? CloudUiUtil.getUrlFromDisplayText(selection) : null;
      boolean shouldClearSpaces=currentServerURL == null || !currentServerURL.equals(selectedURL);
      super.setUpdatedSelectionInServer();
      if (selection != null) {
        update(shouldClearSpaces);
      }
    }
  }
;
  urlWidget.createControls(topComposite);
  urlCombo=urlWidget.getUrlCombo();
  cfServer.setUrl(CloudUiUtil.getUrlFromDisplayText(urlCombo.getItem(urlCombo.getSelectionIndex())));
  final Composite validateComposite=new Composite(composite,SWT.NONE);
  validateComposite.setLayout(new GridLayout(3,false));
  validateComposite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false));
  validateButton=new Button(validateComposite,SWT.PUSH);
  validateButton.setText("String_Node_Str");
  validateButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent event){
      String urlText=urlWidget.getURLSelection();
      String userName=emailText.getText();
      String password=passwordText.getText();
      String errorMsg=CloudUiUtil.validateCredentials(cfServer,userName,password,urlText,true,getRunnableContext());
      try {
        spacesDescriptor=cloudSpaceChangeListener != null ? cloudSpaceChangeListener.updateDescriptor(urlText,userName,password,getRunnableContext()) : null;
        update(false);
      }
 catch (      CoreException e) {
        errorMsg=e.getMessage();
      }
      if (errorMsg == null) {
        setWizardInformation("String_Node_Str");
      }
 else {
        setWizardError(errorMsg);
      }
    }
  }
);
  registerAccountButton=new Button(validateComposite,SWT.PUSH);
  registerAccountButton.setText("String_Node_Str");
  registerAccountButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent event){
      RegisterAccountWizard wizard=new RegisterAccountWizard(cfServer);
      WizardDialog dialog=new WizardDialog(validateComposite.getShell(),wizard);
      if (dialog.open() == Window.OK) {
        if (wizard.getEmail() != null) {
          emailText.setText(wizard.getEmail());
        }
        if (wizard.getPassword() != null) {
          passwordText.setText(wizard.getPassword());
        }
      }
    }
  }
);
  cfSignupButton=new Button(validateComposite,SWT.PUSH);
  cfSignupButton.setText("String_Node_Str");
  cfSignupButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      CloudFoundryURLNavigation.CF_SIGNUP_URL.navigateExternal();
    }
  }
);
  TabItem item=new TabItem(folder,SWT.NONE);
  item.setText("String_Node_Str");
  item.setControl(composite);
}