Skip to main content

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

Metadata

Release files for batcore 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for batcore 0.1.1
File Size Uploaded
batcore-0.1.1.tar.gz 36.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for batcore 0.1.1
File Interpreter ABI Platform
batcore-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 85.6 kB

Release files / batcore-0.1.1.tar.gz

Download URL batcore-0.1.1.tar.gz
Size 36.3 kB
Tags Source
SHA-256 checksum
How to use checksums
312faefd4785ed7cc22140301d38a7ec64961e3585f39e82c393b685c1708f75
BLAKE2b-256 checksum
How to use checksums
a5a48d61c1599bb03fb0fa849e0ef7559d561993dd0fe1f857ce999eeac1b623
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.7

Release files / batcore-0.1.1-py3-none-any.whl

Download URL batcore-0.1.1-py3-none-any.whl
Size 49.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f6d26f55e13b630370d737e8d25abc2d6e3bf7aae27a36883e036af15fce715
BLAKE2b-256 checksum
How to use checksums
86b0744922aeedded9c59e3a01ad80a8b0ce6c0e695c6ea5eeb5675aa92a0615
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page