1e56357baee99a5fa02d54df0db476c58258ffbf,plantcv-pipeline.py,,db_connect,#Any#,368
Before Change
// Delete the existing database if create is true
if args.create:
if os.path.isfile(args.db):
response = raw_input(
"WARNING: SQLite database file $sqldb already exists are you sure you want to delete it? (y/n): ")
if response == "y":
os.remove(args.db)
else:
exit_message("Okay, stopping")
After Change
if row["max"] is not None:
args.image_id = row["max"]
if os.path.isfile(args.db)==False:
// Connect to the database
args.connect = sqlite3.connect(args.db)
// Replace the row_factory result constructor with a dictionary constructor
args.connect.row_factory = dict_factory
// Change the text output format from unicode to UTF-8
args.connect.text_factory = str
// Database handler
args.sq = args.connect.cursor()
// Run and image IDs
args.run_id = 0
args.image_id = 0
return args
//////////////////////////////////////////////////////////////////////////////////////
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: danforthcenter/plantcv
Commit Name: 1e56357baee99a5fa02d54df0db476c58258ffbf
Time: 2017-02-03
Author: mgehan@danforthcenter.org
File Name: plantcv-pipeline.py
Class Name:
Method Name: db_connect
Project Name: danforthcenter/plantcv
Commit Name: 4bd9e98e3a538f9ef3676db3f2f3947de138e256
Time: 2017-02-20
Author: maxjfeldman@gmail.com
File Name: plantcv-pipeline.py
Class Name:
Method Name: db_connect
Project Name: TheAlgorithms/Python
Commit Name: b6c3fa8992e1f3430e623b6c4b1268c89e26f71f
Time: 2019-05-17
Author: 44716380+weixuanhu@users.noreply.github.com
File Name: searches/interpolation_search.py
Class Name:
Method Name: