All Projects β†’ mozilla β†’ Bugbug

mozilla / Bugbug

Licence: mpl-2.0
Platform for Machine Learning projects on Software Engineering

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Bugbug

Design Patterns And Principles
A collection of a number of design patterns and principles written in Kotlin
Stars: ✭ 56 (-83.23%)
Mutual labels:  hacktoberfest, software-engineering
Tech Refrigerator
🍰 기술 냉μž₯κ³ μž…λ‹ˆλ‹€. πŸ›’ 기술 λ©΄μ ‘ , 전곡 μ‹œν—˜ , 지식 함양 λ“± λΆ„λͺ… 도움될 κ±°μ˜ˆμš”! 🀟
Stars: ✭ 699 (+109.28%)
Mutual labels:  hacktoberfest, software-engineering
Patternfly
This repo contains core (HTML/CSS) implementation for PatternFly. Issues related to CSS/HTML and layout should be filed here.
Stars: ✭ 328 (-1.8%)
Mutual labels:  hacktoberfest
Nnstreamer
πŸ”€ Neural Network (NN) Streamer, Stream Processing Paradigm for Neural Network Apps/Devices.
Stars: ✭ 329 (-1.5%)
Mutual labels:  hacktoberfest
Home Assistantconfig
🏠 Home Assistant configuration & Documentation for my Smart House. Write-ups, videos, part lists, and links throughout. Be sure to ⭐ it. Updated FREQUENTLY!
Stars: ✭ 3,687 (+1003.89%)
Mutual labels:  hacktoberfest
Animatedgradientview
🎞 Powerful gradient animations made simple for iOS.
Stars: ✭ 329 (-1.5%)
Mutual labels:  hacktoberfest
Chaos Mesh
A Chaos Engineering Platform for Kubernetes.
Stars: ✭ 4,265 (+1176.95%)
Mutual labels:  hacktoberfest
Personalsit.es
πŸ“‡ A little directory of people's personal sites
Stars: ✭ 329 (-1.5%)
Mutual labels:  hacktoberfest
Flopflip
🎚Flip or flop features in your React application in real-time backed by flag provider of your choice 🚦
Stars: ✭ 334 (+0%)
Mutual labels:  hacktoberfest
Quantumkatas
Tutorials and programming exercises for learning Q# and quantum computing
Stars: ✭ 3,713 (+1011.68%)
Mutual labels:  hacktoberfest
Open Pixel Art
A collaborative pixel art project to teach people how to contribute to open-source
Stars: ✭ 331 (-0.9%)
Mutual labels:  hacktoberfest
Ack3
ack is a grep-like search tool optimized for source code.
Stars: ✭ 330 (-1.2%)
Mutual labels:  hacktoberfest
Valgrind Macos
A valgrind mirror with latest macOS support
Stars: ✭ 324 (-2.99%)
Mutual labels:  hacktoberfest
Rf24mesh
OSI Layer 7 Mesh Networking for RF24Network & nrf24L01+ devices
Stars: ✭ 329 (-1.5%)
Mutual labels:  hacktoberfest
Plan
Player Analytics plugin for Minecraft Server platforms (Bukkit/Sponge/Nukkit/BungeeCord/Velocity) - View player activity of your server with ease. πŸ“†
Stars: ✭ 322 (-3.59%)
Mutual labels:  hacktoberfest
Dev Ios
DEV Community iOS App
Stars: ✭ 334 (+0%)
Mutual labels:  hacktoberfest
Openfoodfacts Server
Open Food Facts database and web interface - πŸͺπŸ¦‹ Perl, CSS and JS coders welcome 😊 For helping in Python, see Robotoff
Stars: ✭ 325 (-2.69%)
Mutual labels:  hacktoberfest
Limonengine
3D FPS game engine with full dynamic lighting and shadows
Stars: ✭ 331 (-0.9%)
Mutual labels:  hacktoberfest
Fastadapter
The bullet proof, fast and easy to use adapter library, which minimizes developing time to a fraction...
Stars: ✭ 3,512 (+951.5%)
Mutual labels:  hacktoberfest
Egeria
Open Metadata and Governance
Stars: ✭ 328 (-1.8%)
Mutual labels:  hacktoberfest

bugbug

Task Status codecov

Bugbug aims at leveraging machine learning techniques to help with bug and quality management, and other software engineering tasks (such as test selection and defect prediction).

Chat with us in the bugbug Matrix room.

More information on the Mozilla Hacks blog:

Classifiers

  • assignee - The aim of this classifier is to suggest an appropriate assignee for a bug.

  • backout - The aim of this classifier is to detect patches that might be more likely to be backed-out (because of build or test failures). It could be used for test prioritization/scheduling purposes.

  • bugtype - The aim of this classifier is to classify bugs according to their type. The labels are gathered automatically from bugs: right now they are "crash/memory/performance/security". The plan is to add more types after manual labeling.

  • component - The aim of this classifier is to assign product/component to (untriaged) bugs.

  • defect vs enhancement vs task - Extension of the defect classifier to detect differences also between feature requests and development tasks.

  • defect - Bugs on Bugzilla aren't always bugs. Sometimes they are feature requests, refactorings, and so on. The aim of this classifier is to distinguish between bugs that are actually bugs and bugs that aren't. The dataset currently contains 2110 bugs, the accuracy of the current classifier is ~93% (precision ~95%, recall ~94%).

  • devdocneeded - The aim of this classifier is to detect bugs which should be documented for developers.

  • duplicate - The aim of this classifier is to detect duplicate bugs.

  • qaneeded - The aim of this classifier is to detect bugs that would need QA verification.

  • regression vs non-regression - Bugzilla has a regression keyword to identify bugs that are regressions. Unfortunately it isn't used consistently. The aim of this classifier is to detect bugs that are regressions.

  • regressionrange - The aim of this classifier is to detect regression bugs that have a regression range vs those that don't.

  • regressor - The aim of this classifier is to detect patches which are more likely to cause regressions. It could be used to make riskier patches undergo more scrutiny.

  • spam - The aim of this classifier is to detect bugs which are spam.

  • stepstoreproduce - The aim of this classifier is to detect bugs that have steps to reproduce vs those that don't.

  • testfailure - The aim of this classifier is to detect patches that might be more likely to cause test failures.

  • testselect - The aim of this classifier is to select relevant tests to run for a given patch.

  • tracking - The aim of this classifier is to detect bugs to track.

  • uplift - The aim of this classifier is to detect bugs for which uplift should be approved and bugs for which uplift should not be approved.

Setup and Prerequisites

Install the Python dependencies:

pip3 install -r requirements.txt

You may also need pip install -r test-requirements.txt. Depending on the parts of bugbug you want to run, you might need to install dependencies from other requirement files (find them with find . -name "*requirements*").

Currently, Python 3.7+ is required. You can double check the version we use by looking at setup.py.

Also, libgit2 (needs v1.0.0, only in experimental on Debian), might be required (if you can't install it, skip this step).

sudo apt-get -t experimental install libgit2-dev

Auto-formatting

This project is using pre-commit. Please run pre-commit install to install the git pre-commit hooks on your clone.

Every time you will try to commit, pre-commit will run checks on your files to make sure they follow our style standards and they aren't affected by some simple issues. If the checks fail, pre-commit won't let you commit.

Usage

Training

Run the trainer.py script with the command python -m scripts.trainer (with --help to see the required and optional arguments of the command) to perform training (warning this takes 30min+).

Testing

To use a model to classify a given bug, you can run python -m scripts.bug_classifier MODEL_NAME --bug-id ID_OF_A_BUG_FROM_BUGZILLA. N.B.: If you run the classifier script without training a model first, it will automatically download an already trained model.

Example for the "defect" model

training To train the model for mode defect:

python3 -m scripts.trainer defect

testing To use the model to classify a given bug, you can run python -m scripts.bug_classifier defect --bug-id ID_OF_A_BUG_FROM_BUGZILLA.

Running the repository mining script

Note: This section is only necessary if you want to perform changes to the repository mining script. Otherwise, you can simply use the commits data we generate automatically.

  1. Clone https://hg.mozilla.org/mozilla-central/.
  2. Run ./mach vcs-setup in the directory where you have cloned mozilla-central.
  3. Enable the extensions mentioned in infra/hgrc. For example, if you are on Linux, you can add firefoxtree to the extensions section of the ~/.hgrc file as:
    firefoxtree = ~/.mozbuild/version-control-tools/hgext/firefoxtree
    
  4. Run the repository.py script, with the only argument being the path to the mozilla-central repository.

Note: If you run into problems, it's possible the version of Mercurial you are using is not supported. Check the Docker definition at infra/dockerfile.commit_retrieval to see what we are using in production.

Note: the script will take a long time to run (on my laptop more than 7 hours). If you want to test a simple change and you don't intend to actually mine the data, you can modify the repository.py script to limit the number of analyzed commits. Simply add limit=1024 to the call to the log command.

Structure of the project

  • bugbug/labels contains manually collected labels;
  • bugbug/db.py is an implementation of a really simple JSON database;
  • bugbug/bugzilla.py contains the functions to retrieve bugs from the Bugzilla tracking system;
  • bugbug/repository.py contains the functions to mine data from the mozilla-central (Firefox) repository;
  • bugbug/bug_features.py contains functions to extract features from bug/commit data;
  • bugbug/model.py contains the base class that all models derive from;
  • bugbug/models contains implementations of specific models;
  • bugbug/nn.py contains utility functions to include Keras models into a scikit-learn pipeline;
  • bugbug/utils.py contains misc utility functions;
  • bugbug/nlp contains utility functions for NLP;
  • bugbug/labels.py contains utility functions for handling labels;
  • bugbug/bug_snapshot.py contains a module to play back the history of a bug.

Using bugbug for non-Mozilla projects

Bugbug is focussing on Mozilla use-cases for Firefox and Bugzilla. However, we will be happy to accept pull requests adding support for other projects or bug trackers.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].