-
Notifications
You must be signed in to change notification settings - Fork 17
SQL Queries
Lewisham edited this page Mar 24, 2011
·
4 revisions
This page lists the queries we used to generate the numbers listed in our papers. Please email us if you have questions or comments.
Here are the SQL queries used to generate the numbers in the 2011 MSR paper.
select count(*) from scmlog
where repository_id = ?
select count(*) from hunks h, scmlog s
where h.commit_id = s.id
and s.repository_id = ?
select count(distinct f.file_name) from files f, file_types ft
where ft.file_id = f.id
and f.repository_id = ?
and ft.type = 'code'
select count(distinct bug_commit_id)
from hunk_blames hb, scmlog s, hunks h, file_types ft, files f
where hb.bug_commit_id = s.id
and hb.hunk_id = h.id
and h.file_id = f.id
and ft.file_id = f.id
and ft.type = 'code'
and s.repository_id = 1