igrigorik / bugspots

Implementation of simple bug prediction hotspot heuristic

Home Page:http://google-engtools.blogspot.com/2011/12/bug-prediction-at-google.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stack trace when I run against my repo

mwarkentin opened this issue · comments

mwarkentin@Michaels-MacBook-Air wa (iteration-1.16) $ bugspots /Users/mwarkentin/WaveAccounting/wa
Scanning /Users/mwarkentin/WaveAccounting/wa repo
/Library/Ruby/Gems/1.8/gems/grit-2.4.1/lib/grit/git-ruby/internal/pack.rb:198:in `find_object_in_index': stack level too deep (SystemStackError)
    from /Library/Ruby/Gems/1.8/gems/grit-2.4.1/lib/grit/git-ruby/internal/pack.rb:233:in `find_object'
    from /Library/Ruby/Gems/1.8/gems/grit-2.4.1/lib/grit/git-ruby/internal/pack.rb:70:in `with_idx'
    from /Library/Ruby/Gems/1.8/gems/grit-2.4.1/lib/grit/git-ruby/internal/pack.rb:232:in `find_object'
    from /Library/Ruby/Gems/1.8/gems/grit-2.4.1/lib/grit/git-ruby/internal/pack.rb:115:in `[]'
    from /Library/Ruby/Gems/1.8/gems/grit-2.4.1/lib/grit/git-ruby/repository.rb:78:in `get_raw_object_by_sha1'
    from /Library/Ruby/Gems/1.8/gems/grit-2.4.1/lib/grit/git-ruby/repository.rb:77:in `each'
    from /Library/Ruby/Gems/1.8/gems/grit-2.4.1/lib/grit/git-ruby/repository.rb:77:in `get_raw_object_by_sha1'
    from /Library/Ruby/Gems/1.8/gems/grit-2.4.1/lib/grit/git-ruby/repository.rb:105:in `get_object_by_sha1'
     ... 1338 levels...
    from /Library/Ruby/Gems/1.8/gems/bugspots-0.0.1/lib/bugspots/scanner.rb:12:in `scan'
    from /Library/Ruby/Gems/1.8/gems/bugspots-0.0.1/bin/bugspots:18
    from /usr/bin/bugspots:19:in `load'
    from /usr/bin/bugspots:19

I can reproduce this error on my machine.

I have found that getting the rev-list with the native git command and then parsing the list with Grit worked for me to get around mojombo/grit#41.

This also allows for adding a "no-merges" option, related to #12.

Should be fixed in master -- can you guys confirm?

Installed latest (0.1.1), and got a new error. Guessing I need to install master directly from github? How would I do this?

mwarkentin@Michaels-MacBook-Air devenv (vagrant-refactor) $ bugspots ~/WaveAccounting/devenv/Projects/waveaccounting/
Scanning /Users/mwarkentin/WaveAccounting/devenv/Projects/waveaccounting/ repo
/Library/Ruby/Gems/1.8/gems/grit-2.4.1/lib/grit/git-ruby/internal/pack.rb:315:in `unpack_compressed': stack level too deep         (SystemStackError)
    from /Library/Ruby/Gems/1.8/gems/grit-2.4.1/lib/grit/git-ruby/internal/pack.rb:78:in `with_packfile'
    from /Library/Ruby/Gems/1.8/gems/grit-2.4.1/lib/grit/git-ruby/internal/pack.rb:312:in `unpack_compressed'
        from /Library/Ruby/Gems/1.8/gems/grit-2.4.1/lib/grit/git-ruby/internal/pack.rb:272:in `unpack_object'
    from /Library/Ruby/Gems/1.8/gems/grit-2.4.1/lib/grit/git-ruby/internal/pack.rb:242:in `parse_object'
    from /Library/Ruby/Gems/1.8/gems/grit-2.4.1/lib/grit/git-ruby/internal/pack.rb:78:in `with_packfile'
    from /Library/Ruby/Gems/1.8/gems/grit-2.4.1/lib/grit/git-ruby/internal/pack.rb:241:in `parse_object'
    from /Library/Ruby/Gems/1.8/gems/grit-2.4.1/lib/grit/git-ruby/internal/pack.rb:117:in `[]'
    from /Library/Ruby/Gems/1.8/gems/grit-2.4.1/lib/grit/git-ruby/repository.rb:78:in `get_raw_object_by_sha1'
     ... 1338 levels...
    from /Library/Ruby/Gems/1.8/gems/bugspots-0.1.1/lib/bugspots/scanner.rb:18:in `scan'
    from /Library/Ruby/Gems/1.8/gems/bugspots-0.1.1/bin/bugspots:50
    from /usr/bin/bugspots:19:in `load'
    from /usr/bin/bugspots:19
git clone git://github.com/igrigorik/bugspots.git
cd bugspots && rake install

Should do the trick.

Yep, seems to run fine now, thanks!

Thanks. 0.1.2 should be up on rubygems now!