e3b370606f2372227e63e82544917c0d65a73a25,scripts/house_contacts.py,,run,#,12

Before Change


		lastname = mi.find("lastname").text

		//TODO: follow up, why no official name?
		if mi.find("official-name") is None:
			print("Warning: No official-name tag for %s" % ssdd)
			officialname = None
		else:
			officialname = mi.find("official-name").text

		office_room = mi.find("office-room").text
		office_building = mi.find("office-building").text

		office_building_full = office_building.replace("RHOB", "Rayburn HOB")

After Change


		firstname = mi.find("firstname").text
		middlename = mi.find("middlename").text //could be empty
		lastname = mi.find("lastname").text
		listname = mi.find("namelist").text
		officialname = mi.find("official-name").text
		formalname = mi.find("formal-name").text

		office_room = mi.find("office-room").text
		office_building = mi.find("office-building").text

		office_building_full = office_building.replace("RHOB", "Rayburn HOB")
		office_building_full = office_building_full.replace("CHOB", "Cannon HOB")
		office_building_full = office_building_full.replace("LHOB", "Longworth HOB")

		office_zip = mi.find("office-zip").text
		office_zip_suffix = mi.find("office-zip-suffix").text

		office = "{} {}".format(office_room, office_building_full.replace("HOB", "House Office Building"))
		address = "{} {}; Washington DC {}-{}".format(office_room, office_building_full, office_zip, office_zip_suffix)

		phone = mi.find("phone").text
		phone_parsed = re.sub("^\((\d\d\d)\) ", lambda m : m.group(1) + "-", phone) // replace (XXX) area code with XXX- for compatibility w/ existing format

		moc["name"]["list"] = listname
		moc["name"]["official_full"] = officialname
		moc["name"]["formal"] = formalname

		moc["name"]["first"] = firstname
		if (middlename):
			moc["name"]["middle"] = middlename
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: unitedstates/congress-legislators
Commit Name: e3b370606f2372227e63e82544917c0d65a73a25
Time: 2016-03-05
Author: jconline@gmail.com
File Name: scripts/house_contacts.py
Class Name:
Method Name: run


Project Name: unitedstates/congress-legislators
Commit Name: e3b370606f2372227e63e82544917c0d65a73a25
Time: 2016-03-05
Author: jconline@gmail.com
File Name: scripts/house_contacts.py
Class Name:
Method Name: run


Project Name: merenlab/anvio
Commit Name: a418fad157e09696b953f8c2b0d132576fd7bfca
Time: 2020-03-26
Author: iva.veseli@gmail.com
File Name: anvio/kegg.py
Class Name: KeggModulesDatabase
Method Name: recursive_definition_unroller


Project Name: shibing624/pycorrector
Commit Name: b3349272475868db067a4e01795e19d3b9e57c63
Time: 2018-03-07
Author: xuming624@qq.com
File Name: pycorrector/cn_spell.py
Class Name:
Method Name: correct