{"id":18485812,"url":"https://github.com/uds-se/sflkit","last_synced_at":"2025-04-08T19:32:59.490Z","repository":{"id":37265496,"uuid":"505093255","full_name":"uds-se/sflkit","owner":"uds-se","description":"A workbench for statistical fault localization.","archived":true,"fork":false,"pushed_at":"2025-02-11T16:50:58.000Z","size":30348,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-23T17:45:50.578Z","etag":null,"topics":["spectrum-based-fault-localization","statistical-debugging","statistical-fault-localization"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uds-se.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-19T11:43:56.000Z","updated_at":"2025-02-12T09:17:05.000Z","dependencies_parsed_at":"2023-09-23T04:36:28.932Z","dependency_job_id":"1a76be8d-ce4d-4871-8730-8a1797caf829","html_url":"https://github.com/uds-se/sflkit","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uds-se%2Fsflkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uds-se%2Fsflkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uds-se%2Fsflkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uds-se%2Fsflkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uds-se","download_url":"https://codeload.github.com/uds-se/sflkit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247912789,"owners_count":21017045,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["spectrum-based-fault-localization","statistical-debugging","statistical-fault-localization"],"created_at":"2024-11-06T12:46:30.305Z","updated_at":"2025-04-08T19:32:54.480Z","avatar_url":"https://github.com/uds-se.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SFLKit: A Workbench for Statistical Fault Localization\n\n[![Python Version](https://img.shields.io/pypi/pyversions/sflkit)](https://pypi.org/project/sflkit/)\n[![GitHub release](https://img.shields.io/github/v/release/uds-se/sflkit)](https://github.com/uds-se/sflkit/releases)\n[![PyPI](https://img.shields.io/pypi/v/sflkit)](https://pypi.org/project/sflkit/)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/uds-se/sflkit/test-sflkit.yml?branch=main)](https://img.shields.io/github/actions/workflow/status/uds-se/sflkit/test-sflkit.yml?branch=main)\n[![Coverage Status](https://coveralls.io/repos/github/uds-se/sflkit/badge.svg?branch=main)](https://coveralls.io/github/uds-se/sflkit?branch=main)\n[![Licence](https://img.shields.io/github/license/uds-se/sflkit)](https://img.shields.io/github/license/uds-se/sflkit)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nSFLKit (https://dl.acm.org/doi/10.1145/3540250.3558915) is an out-of-the-box library and tool for statistical fault \nlocalization. Statistical fault localization aims at detecting execution features that correlate with failures, such as \nwhether individual lines are part of the execution.\n\n## Language Support\n\nSFLKit supports currently Python 3 but we plan on releasing further language support.\n\n## Installation\n\nYou need to navigate to the root directory of SFLKit and run\n```sh\npip install sflkit\n```\nIf you have a separate Python 2 and Python 3 on your machine you may need to run\n```sh\npip3 install sflkit\n```\n\n## Execution\n\nTo execute SFLKit you need to create a config file matching your needs.\n\n### Config\n\n```ìni\n[target]\npath=/path/to/the/subject\nlanguage=Python|C                       ; The programming language used\n\n[events]\nevents=Event(,Event)*                   ; The events to investigate, overwritten by predicates.\npredicates=Predicate(,Pridcate)*        ; The predicates to investigate, overwrites events.\nmetrics=Metric(,Metric)*                ; The metrics used for investigation\npassing=/path(,path)*                   ; The event files of passing runs, if a dir is provided\n                                        ; all files inside the tree will be treated as event files\nfailing=/path(,path)*                   ; The event files of failing runs, if a dir is provided\n                                        ; all files inside the tree will be treated as event files\n\n[instrumentation]\npath=/path/to/the/instrumented/subject\nexclude=file(,file)*                    ; Files to exclude from the instrumentation, should be a python re pattern\n\n[test]\nrunner=TestRunner                       ; The testrunner class, None if no run needed\n```\n\nThis is the specification of the config file.\n\n### Usage\n\nThe general usage of SFLKit is\n```\nusage: sflkit [-h] [--debug] -c CONFIG {instrumentation,analyze} ...\n\nA workbench for statistical fault localization python programs and in the future other programs.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --debug               the debug flag to activate debug information\n  -c CONFIG, --config CONFIG\n                        path to the config file\n\ncommand:\n  The framework allows for the execution of various commands.\n\n  {instrumentation,analyze}\n                        the command to execute\n    instrumentation     execute the instrumentation of subject\n    analyze             execute the analysis of the collected predicates\n```\n\nIf you have adopted a config file for your investigations you need to execute\n```sh\nsflkit -c path/to/your/config instrument\n```\nto instrument the project defined by the file. \n\nAfter the instrumentation, you can run your tests or experiments. But keep in mind to preserve the `EVENTS_PATH` file \nfor each failing and passing run.\n\nIf you want to analyze your runs you need to execute\n```sh\nsflkit -c path/to/your/config analyze\n```\nwhich produces an output with the suggested code locations for the analysis objects and metrics defined in the config \nfile.\n\n## Citing SFLKit\n\nYou can cite SFLKit as following\n```bibtex\n@inproceedings{10.1145/3540250.3558915,\n  author = {Smytzek, Marius and Zeller, Andreas},\n  title = {SFLKit: a workbench for statistical fault localization},\n  year = {2022},\n  isbn = {9781450394130},\n  publisher = {Association for Computing Machinery},\n  address = {New York, NY, USA},\n  url = {https://doi.org/10.1145/3540250.3558915},\n  doi = {10.1145/3540250.3558915},\n  abstract = {Statistical fault localization aims at detecting execution features that correlate with failures, such as whether individual lines are part of the execution. We introduce SFLKit, an out-of-the-box workbench for statistical fault localization. The framework provides straightforward access to the fundamental concepts of statistical fault localization. It supports five predicate types, four coverage-inspired spectra, like lines, and 44 similarity coefficients, e.g., TARANTULA or OCHIAI, for statistical program analysis.  \n  SFLKit separates the execution of tests from the analysis of the results and is therefore independent of the used testing framework. It leverages program instrumentation to enable the logging of events and derives the predicates and spectra from these logs. This instrumentation allows for introducing multiple programming languages and the extension of new concepts in statistical fault localization. Currently, SFLKit supports the instrumentation of Python programs. It is highly configurable, requiring only the logging of the required events.},\n  booktitle = {Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering},\n  pages = {1701–1705},\n  numpages = {5},\n  keywords = {similarity coefficient, spectrum-based fault localization, statistical debugging, statistical fault localization},\n  location = {\u003cconf-loc\u003e, \u003ccity\u003eSingapore\u003c/city\u003e, \u003ccountry\u003eSingapore\u003c/country\u003e, \u003c/conf-loc\u003e},\n  series = {ESEC/FSE 2022}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuds-se%2Fsflkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuds-se%2Fsflkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuds-se%2Fsflkit/lists"}