Bug analysis tool

See script/bug-analysis/README.md for details.