Program: 167279
Project: 167279
Buggy source:
public LoginDialog(ApplicationContext context,LoginListener loginListener){
  super("String_Node_Str");
  this.context=context;
  this.loginListener=loginListener;
  settings=new TypedProperties();
  settings.putAll(context.getOperationsSerivce().findGlobalSettingsAsMap());
  passwordExpiresInDays=settings.getInt(GlobalSetting.PASSWORD_EXPIRE_DAYS,60);
  setWidth(300,Unit.PIXELS);
  setResizable(false);
  setModal(true);
  setClosable(false);
  LoginForm loginForm=new LoginForm(){
    @Override protected Component createContent(    TextField userNameField,    PasswordField passwordField,    Button loginButton){
      VerticalLayout layout=new VerticalLayout();
      layout.setMargin(true);
      layout.setSpacing(true);
      LoginDialog.this.userNameField=userNameField;
      userNameField.setWidth(100,Unit.PERCENTAGE);
      LoginDialog.this.passwordField=passwordField;
      passwordField.setWidth(100,Unit.PERCENTAGE);
      passwordField.setNullRepresentation("String_Node_Str");
      layout.addComponent(userNameField);
      layout.addComponent(passwordField);
      validatePasswordField=new PasswordField("String_Node_Str");
      validatePasswordField.setWidth(100,Unit.PERCENTAGE);
      validatePasswordField.setNullRepresentation("String_Node_Str");
      validatePasswordField.setVisible(false);
      layout.addComponent(validatePasswordField);
      HorizontalLayout buttonLayout=new HorizontalLayout();
      loginButton.setStyleName(ValoTheme.BUTTON_PRIMARY);
      LoginDialog.this.loginButton=loginButton;
      buttonLayout.addComponent(loginButton);
      buttonLayout.setWidth(100,Unit.PERCENTAGE);
      layout.addComponent(buttonLayout);
      buttonLayout.addComponent(loginButton);
      buttonLayout.setComponentAlignment(loginButton,Alignment.BOTTOM_RIGHT);
      userNameField.focus();
      return layout;
    }
  }
;
  loginForm.addLoginListener((e) -> login((String)userNameField.getValue(),(String)passwordField.getValue()));
  loginForm.setWidth(300,Unit.PIXELS);
  setContent(loginForm);
}

Fixed version (ground truth):
public LoginDialog(ApplicationContext context,LoginListener loginListener){
  super("String_Node_Str");
  this.context=context;
  this.loginListener=loginListener;
  settings=new TypedProperties();
  settings.putAll(context.getOperationsService().findGlobalSettingsAsMap());
  passwordExpiresInDays=settings.getInt(GlobalSetting.PASSWORD_EXPIRE_DAYS,60);
  setWidth(300,Unit.PIXELS);
  setResizable(false);
  setModal(true);
  setClosable(false);
  LoginForm loginForm=new LoginForm(){
    @Override protected Component createContent(    TextField userNameField,    PasswordField passwordField,    Button loginButton){
      VerticalLayout layout=new VerticalLayout();
      layout.setMargin(true);
      layout.setSpacing(true);
      LoginDialog.this.userNameField=userNameField;
      userNameField.setWidth(100,Unit.PERCENTAGE);
      LoginDialog.this.passwordField=passwordField;
      passwordField.setWidth(100,Unit.PERCENTAGE);
      passwordField.setNullRepresentation("String_Node_Str");
      layout.addComponent(userNameField);
      layout.addComponent(passwordField);
      validatePasswordField=new PasswordField("String_Node_Str");
      validatePasswordField.setWidth(100,Unit.PERCENTAGE);
      validatePasswordField.setNullRepresentation("String_Node_Str");
      validatePasswordField.setVisible(false);
      layout.addComponent(validatePasswordField);
      HorizontalLayout buttonLayout=new HorizontalLayout();
      loginButton.setStyleName(ValoTheme.BUTTON_PRIMARY);
      LoginDialog.this.loginButton=loginButton;
      buttonLayout.addComponent(loginButton);
      buttonLayout.setWidth(100,Unit.PERCENTAGE);
      layout.addComponent(buttonLayout);
      buttonLayout.addComponent(loginButton);
      buttonLayout.setComponentAlignment(loginButton,Alignment.BOTTOM_RIGHT);
      userNameField.focus();
      return layout;
    }
  }
;
  loginForm.addLoginListener((e) -> login((String)userNameField.getValue(),(String)passwordField.getValue()));
  loginForm.setWidth(300,Unit.PIXELS);
  setContent(loginForm);
}