4fead3fb508efeff7f4a5329627cfbe73ade7142,db_mgmt_cpe_dictionary.py,,,#,67
Before Change
name = x["name"]
title = x["title"][0]
if x["references"]:
cpeelement = {"id": name,"title": title, "references": x["references"]}
else:
cpeelement = {"id": name,"title": title}
entry = cpe.find(({"id": name}))
if entry.count() > 0:
if x["references"]:
cpe.update({"id": name}, {"$set":{"title": title, "references": x["references"]}})
After Change
bulk.find({"id": name}).upsert().update({"$set":{"title": title, "references": x["references"]}})
else:
bulk.find({"id": name}).upsert().update({"$set":{"title": title}})
bulk.execute()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: cve-search/cve-search
Commit Name: 4fead3fb508efeff7f4a5329627cfbe73ade7142
Time: 2015-02-19
Author: pieterjan.moreels@gmail.com
File Name: db_mgmt_cpe_dictionary.py
Class Name:
Method Name:
Project Name: cve-search/cve-search
Commit Name: 4fead3fb508efeff7f4a5329627cfbe73ade7142
Time: 2015-02-19
Author: pieterjan.moreels@gmail.com
File Name: db_mgmt_cpe_dictionary.py
Class Name:
Method Name:
Project Name: MolSSI/QCEngine
Commit Name: b0ad8540b0aafd020da4d524399edf7fd58a35fe
Time: 2019-06-13
Author: sjrl423@gmail.com
File Name: qcengine/programs/molpro.py
Class Name: MolproHarness
Method Name: compute
Project Name: MolSSI/QCEngine
Commit Name: 262c8e77b4d7a952c1367721ec62b89538704033
Time: 2019-03-15
Author: lori.burns@gmail.com
File Name: qcengine/programs/dftd3/runner.py
Class Name:
Method Name: module_driver