SFLKit: A Workbench for Statistical Fault Localization
SFLKit (https://dl.acm.org/doi/10.1145/3540250.3558915) is an out-of-the-box library and tool for statistical fault localization. Statistical fault localization aims at detecting execution features that correlate with failures, such as whether individual lines are part of the execution.
Language Support
SFLKit supports Python 3 and Java.
Python is instrumented with the standard ast module. Events can also be collected
without instrumenting anything, by tracing the program as it runs; see
sflkit.online.
Java is instrumented with jast and traced by the
jsflkit runtime, which produces the same events as the Python side, so every
spectrum, predicate and metric applies unchanged. A runner for
Defects4J collects traces per test.
Installation
You need to navigate to the root directory of SFLKit and run
pip install sflkit
If you have a separate Python 2 and Python 3 on your machine you may need to run
pip3 install sflkit
Execution
To execute SFLKit you need to create a config file matching your needs.
Config
[target]
path=/path/to/the/subject
language=Python|C ; The programming language used
[events]
events=Event(,Event)* ; The events to investigate, overwritten by predicates.
predicates=Predicate(,Pridcate)* ; The predicates to investigate, overwrites events.
metrics=Metric(,Metric)* ; The metrics used for investigation
passing=/path(,path)* ; The event files of passing runs, if a dir is provided
; all files inside the tree will be treated as event files
failing=/path(,path)* ; The event files of failing runs, if a dir is provided
; all files inside the tree will be treated as event files
[instrumentation]
path=/path/to/the/instrumented/subject
exclude=file(,file)* ; Files to exclude from the instrumentation, should be a python re pattern
[test]
runner=TestRunner ; The testrunner class, None if no run needed
This is the specification of the config file.
Usage
The general usage of SFLKit is
usage: sflkit [-h] [--debug] -c CONFIG {instrumentation,analyze} ...
A workbench for statistical fault localization python programs and in the future other programs.
optional arguments:
-h, --help show this help message and exit
--debug the debug flag to activate debug information
-c CONFIG, --config CONFIG
path to the config file
command:
The framework allows for the execution of various commands.
{instrumentation,analyze}
the command to execute
instrumentation execute the instrumentation of subject
analyze execute the analysis of the collected predicates
If you have adopted a config file for your investigations you need to execute
sflkit -c path/to/your/config instrument
to instrument the project defined by the file.
After the instrumentation, you can run your tests or experiments. But keep in mind to preserve the EVENTS_PATH file
for each failing and passing run.
If you want to analyze your runs you need to execute
sflkit -c path/to/your/config analyze
which produces an output with the suggested code locations for the analysis objects and metrics defined in the config file.
Citing SFLKit
You can cite SFLKit as following
@inproceedings{10.1145/3540250.3558915,
author = {Smytzek, Marius and Zeller, Andreas},
title = {SFLKit: a workbench for statistical fault localization},
year = {2022},
isbn = {9781450394130},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3540250.3558915},
doi = {10.1145/3540250.3558915},
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.
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.},
booktitle = {Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering},
pages = {1701–1705},
numpages = {5},
keywords = {similarity coefficient, spectrum-based fault localization, statistical debugging, statistical fault localization},
location = {<conf-loc>, <city>Singapore</city>, <country>Singapore</country>, </conf-loc>},
series = {ESEC/FSE 2022}
}
Metadata
Release files for sflkit 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sflkit-1.0.0.tar.gz | 159.5 kB | With provenance | Details for sflkit-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sflkit-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for sflkit-1.0.0-py3-none-any.whl |
Total release size: 296.4 kB
Release files / sflkit-1.0.0.tar.gz
| Download URL | sflkit-1.0.0.tar.gz |
|---|---|
| Size | 159.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dcd82c8e38fd0ce407f0cd14d20218e31be21560df31b68c568cfb3dbb298a4d
|
|
BLAKE2b-256 checksum How to use checksums |
b57a778ad1538b529c67148e3c64b00e02468a0781782613839c59f3c4c47bf1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logRelease files / sflkit-1.0.0-py3-none-any.whl
| Download URL | sflkit-1.0.0-py3-none-any.whl |
|---|---|
| Size | 136.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e4039b8d7f24d97cc67b25f2747577d05b40f089f4d6fd7b1423720b48128a6
|
|
BLAKE2b-256 checksum How to use checksums |
89c6dcb4013c29831c19a1c75cf58e9c6cc6b472ce75b9b46ae5b52a8653e83b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logSecurity for sflkit 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for sflkit-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.