Code Monkey home page Code Monkey logo

bug-localization's Introduction

Bug Localization

This folder contains code for Bug Localization benchmark. Challenge: given an issue with bug description, identify the files within the project that need to be modified to address the reported bug.

We provide scripts for data collection and processing, data exploratory analysis as well as several baselines implementations for the task solution.

๐Ÿ’พ Install dependencies

We provide dependencies for pip dependency manager, so please run the following command to install all required packages:

pip install -r requirements.txt

Bug Localization task: given an issue with bug description, identify the files within the project that need to be modified to address the reported bug

๐Ÿค— Load data

All data is stored in HuggingFace ๐Ÿค—. It contains:

  • Dataset with bug localization data (with issue description, sha of repo with initial state and to the state after issue fixation). You can access data using datasets library:

    from datasets import load_dataset
    
    # Select a configuration from ["py", "java", "kt", "mixed"]
    configuration = "py"
    # Select a split from ["dev", "train", "test"]
    split = "dev"
    # Load data
    dataset = load_dataset("JetBrains-Research/lca-bug-localization", configuration, split=split)

    where labels are:
    dev - all collected data
    test - manually selected data (labeling artifacts)
    train - all collected data which is not in test
    and configurations are:
    py -- only .py files in diff
    java -- only .java files in diff
    kt -- only .kt files in diff
    mixed -- at least on of the .py, .java or .kt file and maybe file(s) with another extensions in diff

  • Archived repos (from which we can extract repo content on different stages and get diffs which contains bugs fixations).
    They are stored in .tar.gz so you need to run script to load them and unzip:

    1. Set repos_path in config to directory where you want to store repos
    2. Run load_data_from_hf.py which will load all repos from HF and unzip them

โš™๏ธ Run Baseline

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.