Program: 69949
Project: 69949
Buggy source:
protected int createVmsUser(Identity identity) throws VmsNotAvailableException {
  try {
    UserServiceStub userWs=getUserWebService();
    UserServiceStub.CreateUserRequest createRequest=new UserServiceStub.CreateUserRequest();
    UserServiceStub.Newusertype user=new UserServiceStub.Newusertype();
    User olatUser=identity.getUser();
    user.setUsername("String_Node_Str" + WebappHelper.getInstanceId() + "String_Node_Str"+ identity.getName());
    user.setSurname(olatUser.getProperty(UserConstants.LASTNAME,null));
    user.setFirstname(olatUser.getProperty(UserConstants.FIRSTNAME,null));
    user.setEmail(olatUser.getProperty(UserConstants.EMAIL,null));
    user.setPassword("String_Node_Str");
    UserServiceStub.Idlist customerIds=new UserServiceStub.Idlist();
    customerIds.set_int(new int[]{viteroModule.getCustomerId()});
    user.setCustomeridlist(customerIds);
    String language=identity.getUser().getPreferences().getLanguage();
    if (StringHelper.containsNonWhitespace(language) && language.startsWith("String_Node_Str")) {
      user.setLocale("String_Node_Str");
    }
 else {
      user.setLocale("String_Node_Str");
    }
    user.setPcstate("String_Node_Str");
    user.setTimezone(viteroModule.getTimeZoneId());
    String street=olatUser.getProperty(UserConstants.STREET,null);
    if (StringHelper.containsNonWhitespace(street)) {
      user.setStreet(street);
    }
    String zip=olatUser.getProperty(UserConstants.ZIPCODE,null);
    if (StringHelper.containsNonWhitespace(zip)) {
      user.setZip(zip);
    }
    String city=olatUser.getProperty(UserConstants.CITY,null);
    if (StringHelper.containsNonWhitespace(city)) {
      user.setCity(city);
    }
    String country=olatUser.getProperty(UserConstants.COUNTRY,null);
    if (StringHelper.containsNonWhitespace(country)) {
      user.setCountry(country);
    }
    String mobile=olatUser.getProperty(UserConstants.TELMOBILE,null);
    if (StringHelper.containsNonWhitespace(mobile)) {
      user.setMobile(mobile);
    }
    String phonePrivate=olatUser.getProperty(UserConstants.TELPRIVATE,null);
    if (StringHelper.containsNonWhitespace(phonePrivate)) {
      user.setPhone(phonePrivate);
    }
    String phoneOffice=olatUser.getProperty(UserConstants.TELOFFICE,null);
    if (StringHelper.containsNonWhitespace(phoneOffice)) {
      user.setPhone(phoneOffice);
    }
    String institution=olatUser.getProperty(UserConstants.INSTITUTIONALNAME,null);
    if (StringHelper.containsNonWhitespace(institution)) {
      user.setCompany(institution);
    }
    user.setTechnicalnote("String_Node_Str");
    createRequest.setUser(user);
    UserServiceStub.CreateUserResponse response=userWs.createUser(createRequest);
    Userid userId=response.getCreateUserResponse();
    storePortrait(identity,userId.getUserid());
    return userId.getUserid();
  }
 catch (  AxisFault f) {
    ErrorCode code=handleAxisFault(f);
switch (code) {
default :
      logAxisError("String_Node_Str",f);
  }
  return -1;
}
catch (RemoteException e) {
  logError("String_Node_Str",e);
  return -1;
}
}

Fixed version (ground truth):
private final int createVmsUser(Identity identity) throws VmsNotAvailableException {
  String username=null;
  try {
    UserServiceStub userWs=getUserWebService();
    UserServiceStub.CreateUserRequest createRequest=new UserServiceStub.CreateUserRequest();
    UserServiceStub.Newusertype user=new UserServiceStub.Newusertype();
    User olatUser=identity.getUser();
    username="String_Node_Str" + WebappHelper.getInstanceId() + "String_Node_Str"+ identity.getName();
    user.setUsername(username);
    user.setSurname(olatUser.getProperty(UserConstants.LASTNAME,null));
    user.setFirstname(olatUser.getProperty(UserConstants.FIRSTNAME,null));
    user.setEmail(olatUser.getProperty(UserConstants.EMAIL,null));
    user.setPassword("String_Node_Str");
    UserServiceStub.Idlist customerIds=new UserServiceStub.Idlist();
    customerIds.set_int(new int[]{viteroModule.getCustomerId()});
    user.setCustomeridlist(customerIds);
    String language=identity.getUser().getPreferences().getLanguage();
    if (StringHelper.containsNonWhitespace(language) && language.startsWith("String_Node_Str")) {
      user.setLocale("String_Node_Str");
    }
 else {
      user.setLocale("String_Node_Str");
    }
    user.setPcstate("String_Node_Str");
    user.setTimezone(viteroModule.getTimeZoneId());
    String street=olatUser.getProperty(UserConstants.STREET,null);
    if (StringHelper.containsNonWhitespace(street)) {
      user.setStreet(street);
    }
    String zip=olatUser.getProperty(UserConstants.ZIPCODE,null);
    if (StringHelper.containsNonWhitespace(zip)) {
      user.setZip(zip);
    }
    String city=olatUser.getProperty(UserConstants.CITY,null);
    if (StringHelper.containsNonWhitespace(city)) {
      user.setCity(city);
    }
    String country=olatUser.getProperty(UserConstants.COUNTRY,null);
    if (StringHelper.containsNonWhitespace(country)) {
      user.setCountry(country);
    }
    String mobile=olatUser.getProperty(UserConstants.TELMOBILE,null);
    if (StringHelper.containsNonWhitespace(mobile)) {
      user.setMobile(mobile);
    }
    String phonePrivate=olatUser.getProperty(UserConstants.TELPRIVATE,null);
    if (StringHelper.containsNonWhitespace(phonePrivate)) {
      user.setPhone(phonePrivate);
    }
    String phoneOffice=olatUser.getProperty(UserConstants.TELOFFICE,null);
    if (StringHelper.containsNonWhitespace(phoneOffice)) {
      user.setPhone(phoneOffice);
    }
    String institution=olatUser.getProperty(UserConstants.INSTITUTIONALNAME,null);
    if (StringHelper.containsNonWhitespace(institution)) {
      user.setCompany(institution);
    }
    user.setTechnicalnote("String_Node_Str");
    createRequest.setUser(user);
    UserServiceStub.CreateUserResponse response=userWs.createUser(createRequest);
    Userid userId=response.getCreateUserResponse();
    storePortrait(identity,userId.getUserid());
    return userId.getUserid();
  }
 catch (  AxisFault f) {
    ErrorCode code=handleAxisFault(f);
switch (code) {
default :
      logAxisError("String_Node_Str",f);
  }
  return -1;
}
catch (RemoteException e) {
  logError("String_Node_Str",e);
  return -1;
}
}