Given name could include both first and middle name
557424
def given(self):
        """"""
        if self._primary.value[0] and self._primary.value[2]:
            return self._primary.value[0] + ' ' + self._primary.value[2]
        return self._primary.value[0] or self._primary.value[2]
851378
def entry_name(options = {})
      default = options[:count] == 1 ? model_name.human : model_name.human.pluralize
      model_name.human(options.reverse_merge(default: default))
    end
49705
def first_name(anon, obj, field, val):
    
    return anon.faker.first_name(field=field)
458539
public function setNames($firstname, $lastname, $fullname)
    {

        $names = array(0 => '', 1 => '');
        if (!empty($fullname)) {
            $this->fullname = trim($fullname);
            $names = preg_split("/[\s]+/", $this->fullname, 2);
        }
        if (!empty($firstname)) {
            $this->firstname = trim($firstname);
            $names[0] = $this->firstname;
        } else if (!empty($names[0])) {
            $this->firstname = $names[0];
        } else {
            $this->firstname = 'User';
        }
        if (!empty($lastname)) {
            $this->lastname = trim($lastname);
            $names[1] = $this->lastname;
        } else if (!empty($names[1])) {
            $this->lastname = $names[1];
        } else {
            $this->lastname = $this->ltiUserId;
        }
        if (empty($this->fullname)) {
            $this->fullname = "{$this->firstname} {$this->lastname}";
        }

    }
769361
def _unique_name(name, seen):
        """"""
        if name in seen:
            n = seen[name]
            while (name + ".%d" % n) in seen:
                n += 1
            seen[name] = n + 1
            name += ".%d" % n
        seen[name] = 1
        return name
236549
def could_be(self, other):
        """"""
        # TODO: Some suffix and title differences should be allowed
        if type(other) is not type(self):
            return NotImplemented
        if self == other:
            return True
        for attr in ['title', 'firstname', 'middlename', 'nickname', 'prefix', 'lastname', 'suffix']:
            if attr not in self or attr not in other:
                continue
            puncmap = dict((ord(char), None) for char in string.punctuation)
            s = self[attr].lower().translate(puncmap)
            o = other[attr].lower().translate(puncmap)
            if s == o:
                continue
            if attr in {'firstname', 'middlename', 'lastname'}:
                if (({len(comp) for comp in s.split()} == {1} and [el[0] for el in o.split()] == s.split()) or
                        ({len(comp) for comp in o.split()} == {1} and [el[0] for el in s.split()] == o.split())):
                    continue
            return False
        return True
406101
def get_user_name(user, full_name=True):
     # noqa
    try:
        if full_name:
            name = ' '.join([user.first_name, user.last_name])
        else:
            name = user.first_name
    except AttributeError:
        name = None

    return name
792441
def last_first_initial(self):
        
        return ("{}{} ".format(self.last_name, ", " + self.first_name[:1] + "." if self.first_name else "") + ("({}) ".format(self.nickname)
                                                                                                               if self.nickname else ""))
181772
public void setFirstName(String firstName)
        throws IllegalArgumentException
    {
        if(Text.isNull(firstName))
            return;
        if(!this.firstName.equals(firstName))
        {
            this.firstName = firstName;
        }
    }
319863
def name():
        
        result = ""

        if RandomBoolean.chance(3, 5):
            result += random.choice(_name_prefixes) + " "

        result += random.choice(_first_names) + " " + random.choice(_last_names)

        if RandomBoolean.chance(5, 10):
            result += " " + random.choice(_name_suffixes)

        return result
1213461
def name_variants(self):
        
        fields = 'indexed_name initials surname given_name doc_count'
        variant = namedtuple('Variant', fields)
        path = ['author-profile', 'name-variant']
        out = [variant(indexed_name=var['indexed-name'], surname=var['surname'],
                       doc_count=var.get('@doc-count'), initials=var['initials'],
                       given_name=var.get('given-name'))
               for var in listify(chained_get(self._json, path, []))]
        return out or None
1112864
def _get_user(self, user):
        """"""
        return ' '.join([user.username, user.first_name, user.last_name])
1262705
def username(self, default=None):
        '''
        
        '''
        if self.lis_person_name_given:
            return self.lis_person_name_given
        elif self.lis_person_name_family:
            return self.lis_person_name_family
        elif self.lis_person_name_full:
            return self.lis_person_name_full
        else:
            return default
935357
def _fullname(o):
    """"""
    return o.__module__ + "." + o.__name__ if o.__module__ else o.__name__
408314
def lastname(self, value, case, gender=None):
        
        """
        if not value:
            raise ValueError('Lastname cannot be empty.')

        return self.__inflect(value, case, 'lastname', gender)
107983
function(firstName, lang) {
  if (lang && male[firstName] && male[firstName][lang] && female[firstName] && female[firstName][lang]) {
    return 'unisex';
  } else if (lang && male[firstName] && male[firstName][lang]) {
    return 'male';
  } else if (lang && female[firstName] && female[firstName][lang]) {
    return 'female';
  } else if (male[firstName] && female[firstName]) {
    return 'unisex';
  } else if (male[firstName]) {
    return 'male';
  } else if (female[firstName]) {
    return 'female';
  }
  return 'unknown';
}
1316472
public void setFullName(String fullName) {
        int ind = fullName.indexOf(' ');
        if (ind != -1) {
            this.firstName = fullName.substring(0, ind);
            this.lastName = fullName.substring(ind + 1);
        } else {
            this.firstName = fullName;
        }
    }