private String extractUserName(String emailAddress){
  if (emailAddress != null) {
    String[] parts=emailAddress.split("@");
    if (parts.length > 0) {
      if (parts[0] != null) {
        return parts[0];
      }
    }
  }
  return "";
}

private String extractUserName ( String emailAddress ) { if ( emailAddress != null ) { String [ ] parts = emailAddress . split ( "@" ) ; if ( parts . length > 0 ) { if ( parts [ 0 ] != null ) { return parts [ 0 ] ; } } } return "" ; }
extracts user name from email address
