Program: 167292
Project: 167292
Buggy source:
@SuppressWarnings("String_Node_Str") public UserEditPanel(ApplicationContext context,User user){
  this.context=context;
  this.user=user;
  FormLayout form=new FormLayout();
  form.setSpacing(true);
  NativeSelect authField=new NativeSelect("String_Node_Str");
  authField.setWidth(16,Unit.EM);
  authField.setHeight(2.15f,Unit.EM);
  authField.setNullSelectionAllowed(false);
  authField.setValidationVisible(false);
  authField.setInvalidAllowed(false);
  authField.addItem(User.AUTH_METHOD_INTERNAL);
  authField.addItem(User.AUTH_METHOD_LDAP);
  if (StringUtils.isNotBlank(user.getAuthMethod())) {
    authField.addItem(user.getAuthMethod());
    authField.setValue(user.getAuthMethod());
  }
  authField.setImmediate(true);
  authField.setRequired(true);
  authField.setRequiredError("String_Node_Str");
  form.addComponent(authField);
  TextField loginField=new TextField("String_Node_Str",StringUtils.trimToEmpty(user.getLoginId()));
  form.addComponent(loginField);
  loginField.addValueChangeListener(new LoginChangeListener());
  loginField.focus();
  TextField nameField=new TextField("String_Node_Str",StringUtils.trimToEmpty(user.getName()));
  nameField.addValueChangeListener(new NameChangeListener());
  form.addComponent(nameField);
  PasswordField passwordField=new PasswordField("String_Node_Str",NOCHANGE);
  passwordField.addValueChangeListener(new PasswordChangeListener());
  form.addComponent(passwordField);
  if (User.AUTH_METHOD_INTERNAL.equals(authField.getValue())) {
    passwordField.setVisible(true);
    passwordField.setRequired(true);
  }
 else {
    passwordField.setVisible(false);
    passwordField.setRequired(false);
  }
  authField.addListener(new Property.ValueChangeListener(){
    private static final long serialVersionUID=1L;
    public void valueChange(    ValueChangeEvent event){
      boolean requirePassword=event.getProperty().getValue().equals(User.AUTH_METHOD_INTERNAL);
      passwordField.setVisible(requirePassword);
      passwordField.setRequired(requirePassword);
      user.setAuthMethod((String)event.getProperty().getValue());
      save(user);
    }
  }
);
  List<Group> groups=context.getOperationsSerivce().findGroups();
  groupsById=new HashMap<String,Group>();
  TwinColSelect groupSelect=new TwinColSelect();
  for (  Group group : groups) {
    groupSelect.addItem(group.getId());
    groupSelect.setItemCaption(group.getId(),group.getName());
    groupsById.put(group.getId(),group);
  }
  lastGroups=new HashSet<String>();
  for (  Group group : user.getGroups()) {
    lastGroups.add(group.getId());
  }
  groupSelect.setValue(lastGroups);
  groupSelect.setRows(20);
  groupSelect.setNullSelectionAllowed(true);
  groupSelect.setMultiSelect(true);
  groupSelect.setImmediate(true);
  groupSelect.setLeftColumnCaption("String_Node_Str");
  groupSelect.setRightColumnCaption("String_Node_Str");
  groupSelect.addValueChangeListener(new GroupChangeListener());
  form.addComponent(groupSelect);
  addComponent(form);
  setMargin(true);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public UserEditPanel(ApplicationContext context,User user){
  this.context=context;
  this.user=user;
  FormLayout form=new FormLayout();
  form.setSpacing(true);
  NativeSelect authField=new NativeSelect("String_Node_Str");
  authField.setWidth(16,Unit.EM);
  authField.setHeight(2.15f,Unit.EM);
  authField.setNullSelectionAllowed(false);
  authField.setValidationVisible(false);
  authField.setInvalidAllowed(false);
  authField.addItem(User.AUTH_METHOD_INTERNAL);
  authField.addItem(User.AUTH_METHOD_LDAP);
  if (StringUtils.isNotBlank(user.getAuthMethod())) {
    authField.addItem(user.getAuthMethod());
    authField.setValue(user.getAuthMethod());
  }
  authField.setImmediate(true);
  authField.setRequired(true);
  authField.setRequiredError("String_Node_Str");
  form.addComponent(authField);
  TextField loginField=new TextField("String_Node_Str",StringUtils.trimToEmpty(user.getLoginId()));
  form.addComponent(loginField);
  loginField.addValueChangeListener(new LoginChangeListener());
  loginField.focus();
  TextField nameField=new TextField("String_Node_Str",StringUtils.trimToEmpty(user.getName()));
  nameField.addValueChangeListener(new NameChangeListener());
  form.addComponent(nameField);
  PasswordField passwordField=new PasswordField("String_Node_Str",NOCHANGE);
  passwordField.addValueChangeListener(new PasswordChangeListener());
  form.addComponent(passwordField);
  if (User.AUTH_METHOD_INTERNAL.equals(authField.getValue())) {
    passwordField.setVisible(true);
    passwordField.setRequired(true);
  }
 else {
    passwordField.setVisible(false);
    passwordField.setRequired(false);
  }
  authField.addListener(new Property.ValueChangeListener(){
    private static final long serialVersionUID=1L;
    public void valueChange(    ValueChangeEvent event){
      boolean requirePassword=event.getProperty().getValue().equals(User.AUTH_METHOD_INTERNAL);
      passwordField.setVisible(requirePassword);
      passwordField.setRequired(requirePassword);
      user.setAuthMethod((String)event.getProperty().getValue());
      save(user);
    }
  }
);
  List<Group> groups=context.getOperationsService().findGroups();
  groupsById=new HashMap<String,Group>();
  TwinColSelect groupSelect=new TwinColSelect();
  for (  Group group : groups) {
    groupSelect.addItem(group.getId());
    groupSelect.setItemCaption(group.getId(),group.getName());
    groupsById.put(group.getId(),group);
  }
  lastGroups=new HashSet<String>();
  for (  Group group : user.getGroups()) {
    lastGroups.add(group.getId());
  }
  groupSelect.setValue(lastGroups);
  groupSelect.setRows(20);
  groupSelect.setNullSelectionAllowed(true);
  groupSelect.setMultiSelect(true);
  groupSelect.setImmediate(true);
  groupSelect.setLeftColumnCaption("String_Node_Str");
  groupSelect.setRightColumnCaption("String_Node_Str");
  groupSelect.addValueChangeListener(new GroupChangeListener());
  form.addComponent(groupSelect);
  addComponent(form);
  setMargin(true);
}