Giter Site home page Giter Site logo

sd-sbfl's Introduction

SD-SBFL Hybrid

This repository contains the implementation of a hybrid model of Spectrum Based Fault Localization and Statistical Debugging, as proposed in my Bachelor's Thesis. It was specifically designed for conducting an empirical study on the bugs listed in BugsInPy.

Setup

This framework will only run on Linux. Windows is not supported.

Make sure that Git, GNU Make, and all necessary software for building Python from source are installed on your system. The debugger also requires Pyenv to function correctly. Installation instructions can be found here.

Once Pyenv is installed, you can run make. This will clone the BugsInPy repository and set up a Pyenv environment for running the debugger.

Note: Any actions performed by make can be reverted with make clean.

Usage

Recording Events

Before running any of the scripts, activate the Pyenv environment with $(cat activate).

To start a test-run for a specific bug, run

python run_single_test.py -p <project_name> -i <bug_id> [-o <output_file>] 

The selected project is then cloned to a temporary folder and a pyenv environment is set up to replicate the environment in which the bug occurs. The test-run itself may take anywhere from a few minutes to several hours, depending on the project you choose. The recorded events are pickled and then dumped to /TestWrapper/results.pickle.gz (unless another destination was specified with -o).

Alternatively, you can use

python test_complete_application.py -p <project_name>

to test all bugs for a specific application at once. In this case, the results are dumped to /results/<project_name>/.

Evaluation

Translation step

Before you can evaluate the recorded events, they require a translation step. This is separate from the Recording process due to performance reasons.

python translate.py -rd <results_directory>

The output is written to /results_translated/.

Final Evaluation

To evaluate the recorded events with a basic configuration, use

python evaluate.py -r ./results_translated

For an evaluation involving more complex configurations, you may append -a. This will start an evaluation with every configuration presented in my thesis. Output files are written to /results_evaluation/.

If you wish to view the results of a previous evaluation, use

python view_results.py -r <result_file>

Acknowledgements

This repository contains code originally from The Debugging Book (see the /debuggingbook folder). It was slightly modified so that no third-party packages are required to run it.

sd-sbfl's People

Contributors

tristan-hornetz avatar dependabot[bot] avatar

Watchers

 avatar

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.