<commit_before>Flypaper
========
Flypaper detects buggy files in your code base.
The original idea for this project came from:  
http://google-engtools.blogspot.com/2011/12/bug-prediction-at-google.html

How It Works
------------
Flypaper's underlying principle is that if a file has required frequent
modification to fix bugs in the past, then there's probably something about
that file which makes it more likely to generate bugs.  If you know which files
in your code base tend to attract the most bugs you can treat them differently,
by soliciting more code reviews, generally being more careful while editing
them, or even refactoring them entirely.

In order to use Flypaper, you must have done a few things first:
1. Kept track of bugs with some bug tracking system where bugs have IDs.
2. Made commits to your version control system with the bug IDs mentioned in the
   commit message.
3. You must be able to get a list of the bug IDs from your bug tracking system.

You invoke flypaper like this:  
    ./flypaper.py --buglist [filename] --repo [repository directory]--startdate 2011-01-01

Flypaper will then output a list of filenames with corresponding bugginess
scores sorted by bugginess.  The bugginess of a file is determined by the number
and recency of bugs that were fixed by modifying the given file.  The formula
used is:  
    bugginess = sum(1/1+e^(-3t+3))
Where t is the timestamp of the bug-fixing commit.  The timestamp used in the
equation is normalized from 0 to 1, where 0 is the startdate and 1 is now
(where now is when the algorithm was run).  For more explanation about this
formula, take a look at the article which inspired this project here:  
http://google-engtools.blogspot.com/2011/12/bug-prediction-at-google.html
<commit_msg>update README with new launch description<commit_after>Flypaper
========
Flypaper detects buggy files in your code base.
The original idea for this project came from:  
http://google-engtools.blogspot.com/2011/12/bug-prediction-at-google.html

How It Works
------------
Flypaper's underlying principle is that if a file has required frequent
modification to fix bugs in the past, then there's probably something about
that file which makes it more likely to generate bugs.  If you know which files
in your code base tend to attract the most bugs you can treat them differently,
by soliciting more code reviews, generally being more careful while editing
them, or even refactoring them entirely.

In order to use Flypaper, you must have done a few things first:
1. Kept track of bugs with some bug tracking system where bugs have IDs.
2. Made commits to your version control system with the bug IDs mentioned in the
   commit message.
3. You must be able to get a list of the bug IDs from your bug tracking system.

You invoke flypaper like this:  
    ./flypaper --buglist [filename] --repo [repository directory] --startdate 2011-01-01

Flypaper will then output a list of filenames with corresponding bugginess
scores sorted by bugginess.  The bugginess of a file is determined by the number
and recency of bugs that were fixed by modifying the given file.  The formula
used is:  
    bugginess = sum(1/1+e^(-3t+3))
Where t is the timestamp of the bug-fixing commit.  The timestamp used in the
equation is normalized from 0 to 1, where 0 is the startdate and 1 is now
(where now is when the algorithm was run).  For more explanation about this
formula, take a look at the article which inspired this project here:  
http://google-engtools.blogspot.com/2011/12/bug-prediction-at-google.html

{'fraction_non_alphanumeric': 0.0581787521079258, 'fraction_numerical': 0.017425519955030916, 'mean_word_length': 3.9293628808864267, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6211743', 'n_tokens_mistral': 987, 'n_tokens_neox': 913, 'n_words': 534}