{"id":19889792,"url":"https://github.com/haaleo/bug-prediction","last_synced_at":"2026-03-13T11:33:00.242Z","repository":{"id":49306968,"uuid":"187623180","full_name":"HaaLeo/bug-prediction","owner":"HaaLeo","description":"Python package to predict bugs using the complexity of code changes","archived":false,"fork":false,"pushed_at":"2021-06-18T21:03:59.000Z","size":404,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T04:32:44.825Z","etag":null,"topics":["bug","bug-detection","bug-prediction","bugs","change","complexity","entropy","fault","fault-detection","fault-prediction","prediciton"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HaaLeo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-20T10:56:46.000Z","updated_at":"2025-04-03T03:39:19.000Z","dependencies_parsed_at":"2022-09-23T00:12:00.599Z","dependency_job_id":null,"html_url":"https://github.com/HaaLeo/bug-prediction","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaaLeo%2Fbug-prediction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaaLeo%2Fbug-prediction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaaLeo%2Fbug-prediction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaaLeo%2Fbug-prediction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HaaLeo","download_url":"https://codeload.github.com/HaaLeo/bug-prediction/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252088212,"owners_count":21692759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bug","bug-detection","bug-prediction","bugs","change","complexity","entropy","fault","fault-detection","fault-prediction","prediciton"],"created_at":"2024-11-12T18:11:47.248Z","updated_at":"2026-03-13T11:33:00.194Z","avatar_url":"https://github.com/HaaLeo.png","language":"Python","readme":"# bugprediction\n\n[![Stars](https://img.shields.io/github/stars/HaaLeo/bug-prediction.svg?label=Stars\u0026logo=github\u0026style=flat-square)](https://github.com/HaaLeo/bug-prediction/stargazers)  \n[![Build Status](https://img.shields.io/travis/HaaLeo/bug-prediction/master.svg?style=flat-square)](https://travis-ci.org/HaaLeo/bug-prediction) [![Codecov](https://img.shields.io/codecov/c/github/HaaLeo/bug-prediction.svg?style=flat-square)](https://codecov.io/gh/HaaLeo/bug-prediction) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)  \n[![Donate](https://img.shields.io/badge/☕️-Buy%20Me%20a%20Coffee-blue.svg?\u0026style=flat-square)](https://www.paypal.me/LeoHanisch/3eur)\n\n## Description\n\nThis repository enables you to calculate the history complexity metric Ahmed E. Hassan introduced at the [2009 IEEE 31st International Conference on Software Engineering](https://ieeexplore.ieee.org/document/5070510) in May 2009 (DOI: 10.1109/ICSE.2009.5070510) and use it for the prediction of the amount of bugs.\nThe implementation was part of the course [Software Qualität](https://campus.tum.de/tumonline/wbLv.wbShowLVDetail?pStpSpNr=950402174) at the Technical University of Munich in summer 2019.  \nThe training data set was derived from the data set that Marco D'Ambros, Michele Lanza and Romain Robbes used in their paper [An Extensive Comparison of Bug Prediction Approaches](https://ieeexplore.ieee.org/document/5463279). The original data set is available at http://bug.inf.usi.ch/index.php.\n\n## Installation\n\n### From Source\n\n```\ngit clone git@github.com:HaaLeo/bug-prediction.git\ncd bug-prediction\n\npipenv install\npipenv shell\n\npython -m bugprediction --version\n```\n\n## Usage\n\nTo print all available options:\n\n```\npython -m bugprediction --help\n```\n\nTraining is currently only possible from source. To do so run the edit the `train.py` to your needs and run it.\n\n\n### API\nIn order to use the API you need to bundle and install the package:\n\n```\npython setup.py sdist bdist_wheel\npip install dist/bugprediction-0.0.1.tar.gz\n```\n\nThen you can use tha API like shown bellow:\n\n```python\nfrom bugprediction import calculate_hcm, predict\n\nhistory_complexity_metric, _ = calculate_hcm(**kwargs)\nprediction_map = predict(hcm_map, **args)\n```\n\n## Contribution\n\nIf you found a bug or are missing a feature do not hesitate to [file an issue](https://github.com/HaaLeo/bug-prediction/issues/new/choose).  \nPull Requests are welcome!\n\n## Support\nWhen you like this package make sure to [star the repository](https://github.com/HaaLeo/bug-prediction/stargazers). I am always looking for new ideas and feedback.  \nIn addition, it is possible to [donate via paypal](https://www.paypal.me/LeoHanisch/3eur).\n","funding_links":["https://www.paypal.me/LeoHanisch/3eur"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaaleo%2Fbug-prediction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaaleo%2Fbug-prediction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaaleo%2Fbug-prediction/lists"}