3
3

More than 5 years have passed since last update.

mercurialでバグ予測ツールbugspotsつかった

Last updated at Posted at 2012-01-14

1.pythonモジュールのmercurialのインストールにかなり手こずった(たかのさんありがとう!)
http://qiita.com/items/1714

2.ソースはこちらのものを拝借
http://d.hatena.ne.jp/karronoli/20120109#1326111368

コミットログのコメントの中で'fix(es|ed)?|close(s|d)?'の正規表現にヒットするコミットをバグフィックスと見なしている。
コメントを日本語で残しているなら、"修正"とかしてもいいかもしれない。
読めばわかると思うけど、該当の文字列がヒットしないとエラーになる

3.理屈
http://www.publickey1.jp/blog/11/post_193.html

つまり、より高頻度にバグを修正し、かつ最近になって集中的に直しているほど、スコアが大きくなります。そしてスコアが大きいほど、相対的に見てそのコードにはバグがある可能性が高い、というのがこのアルゴリズムが示すところです。

4.出力結果
$python bugspots.py ~/test
['server/main.py: 0.000006', 'server/foo.py: 0.000006', 'server/bar.py: 0.000006', 'bugspots.py: 0.000006']

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3