Skip to main content

BaTCoRe

Project description

BaT CoRe: Baselines and testing framework for code reviewer recommendations

Framework

This repository provides a framework for testing code review recommendation algorithms.

Model creation

  • RecommenderBase is a simple interface for a generic recommender algorithm. It has a fit method that trains model on a given data and a predict method that predicts reviewers for the given pulls.
  • BanRecommenderBase is an in interface derived from RecommenderBase that implements by candidate filtering by their activity and ownership of the pull request

Dataset creation

  • DatasetBase is an interface that encapsulates any preprocessing needed for the dataset with a method preprocess.

  • GerritLoader is a class that deals with the data loader from the PullExtractor tool: loads it, reformats it, and performs some high-level preprocessing (empty data removal, bot removal, alias matching, user encoding)

  • StandardDataset an implementation of DatasetBase. Receives GerritLoader object and performs all the preprocessing that can be needed for a specific model

  • SpecialDatasets has implementations of datasets that are unique to a specific recommender

  • get_gerrit_dataset helping function for dataset creation. Dataset for a specific model can be created as get_gerrit_dataset(gerritloader_object, model_cls=RecommenderBase_class)

  • StreamLoaderBase is an interface that encapsulates iteration over data. The interface views data as a temporal stream of events and yields pairs of consecutive segments of the stream - train (any set of events), test (a pull request event)

Testing of models

  • TesterBase is class that has test_recommender method. This method takes RecommenderBase and StreamLoaderBase and iterates over the dataset, retrains model on new train data, and calculates its predictions.
  • RecTester an implementation of TesterBase that calculates metrics standard for recommendation systems (mrr, accuracy, etc)
  • SimulTester an implementation of TesterBase that tester for project-based metrics on a simulated history (Mirsaeedi, Rigby, 2020). Metrics for the simulated testing can be found in Counter.

An example of usage can be found in example.py

Baselines

Framework contains implementations of the following models (baselines\models)

  • RevFinder, Who Should Review My Code?, Thongtanunam et al., 2015
  • Tie, Who Should Review This Change?, Xin Xia et al., 2015
  • ACRec, Who Should Comment on This Pull Request?, Jiang et al. 2017
  • cHRec, Automatically Recommending Peer Reviewers in Modern Code Review, Zanjani et al., 2015
  • CN, What Can We Learn from Code Review and Bug Assignment?, Yu et al., 2015
  • RevRec, Search-Based Peer Reviewers Recommendation in Modern Code Review, Ouni et al., 2016
  • WRC, Automatically Recommending Code Reviewers Based on Their Expertise: An Empirical Comparison, Hannebauer et al., 2016
  • xFinder, Assigning change requests to software developers, Kagdi et al., 2011

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

batcore-0.1.1.tar.gz (36.3 kB view details)

Uploaded Source

Built Distribution

batcore-0.1.1-py3-none-any.whl (49.3 kB view details)

Uploaded Python 3

File details

Details for the file batcore-0.1.1.tar.gz.

File metadata

  • Download URL: batcore-0.1.1.tar.gz
  • Upload date:
  • Size: 36.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.7

File hashes

Hashes for batcore-0.1.1.tar.gz
Algorithm Hash digest
SHA256 312faefd4785ed7cc22140301d38a7ec64961e3585f39e82c393b685c1708f75
MD5 621f91d86e93cc4da9407692816337f9
BLAKE2b-256 a5a48d61c1599bb03fb0fa849e0ef7559d561993dd0fe1f857ce999eeac1b623

See more details on using hashes here.

File details

Details for the file batcore-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: batcore-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 49.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.7

File hashes

Hashes for batcore-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4f6d26f55e13b630370d737e8d25abc2d6e3bf7aae27a36883e036af15fce715
MD5 36350be88b60cb9b9ec1a8376776e176
BLAKE2b-256 86b0744922aeedded9c59e3a01ad80a8b0ce6c0e695c6ea5eeb5675aa92a0615

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page