This repository is the official artifact and source code of the tool ODIN, accepted at the SAC 2026 Conference.
Paper Title: An Empirical Study on Spectrum Based Fault Localization Heuristics
- Python version 3.11 is required
- Dependencies are included in
requirements.txtfile - Install using:
./install_dependecies.sh - For other Python versions, manually install:
- matplotlib
- numpy
- pandas
- scikit-learn
- scipy
- seaborn
We have provided shell scripts to run all the experiments and generate the experimental results provided in the paper.
python3 main.py --paperThis will utilize the spectrums that we sampled for our paper and perform the experiments. All experimental results will be available in ./paper/. The directory './paper/' contains all figures and data in their respective RQ folder. for example, if you want to see the results of RQ1 from the paper, please navigate to 'paper/experiment_type/RQ1', it will contain the images related to RQ1.
python3 main.py --resimulate --outputpath ./resimulated_results/If you are interested in running the ODIN sampler and sampling fresh spectrums using all the configurations specified in Section 5 of the paper, please invoke the above given command. Note that, resampling the spectrums and generating the experimental results using this script takes around 10 hours in our system which has AMD Ryzen 9 9950X 16-Core Processor, with 16 cores and 32 threads @5.7GHz and 32 GB of RAM. All experimental results will be available in the specified output folder given in the command line argument.
Use sampler.py with the following parameters:
| Parameter | Description | Default Value |
|---|---|---|
-n |
Number of spectrums | 1 |
-c |
Components per spectrum | 100 |
-b |
Buggy components | 1 |
-t |
Test cases | 10 |
-g |
Flakiness (false-fail probability) | 0.0 |
-d |
Bug-triggering probabilities | [1.0] |
-o |
Output path | "./generated_spectrums/" |
python3 sampler.py -n 10 -c 100 -b 2 -t 20 -g 0.0 -d [1.0,1.0] -o "TEST_SPECTRUMS/"This generates 10 spectrums with:
- 100 components each
- 20 test cases
- 2 buggy components
- No false fails
- Output saved to "TEST_SPECTRUMS/"
- Processor: AMD Ryzen 9 9950X 16-Core Processor
- RAM: 32GB
- RAM: 8GB
- Processor: Multi-core recommended
- Storage: 12GB minimum
- Component sizes: 1000, 5000, and 10000
- Ranks of buggy components are saved (~4GB) instead of full spectrums (>300GB)
- Generates
synth_clusters.jsonin the provided output directory/folder for plot generation (RQs)
install_dependecies.sh: Installs Python dependenciesRQ1.py,RQ2.py,RQ3.py: Research question analysis scriptsSpectrumGenerator.py: ODIN sampler implementationmetrics.py: Contains all 37 metrics used in the papersampler.py: Spectrum sampling utilityrun_main_single.py: The script for sampling spectrums with 100% coverage as per prior single bug theoretical analysisrun_main_multi.py: The script for sampling spectrums with 100% coverage as per prior multi bug theoretical analysis underSxandSzconstraintrun_main_multi_relaxed.py: This script relaxes onlySxandSzconstraint ofrun_main_multi.pyand samples spectrums.frameworkXieEtAl.py: contains utlity functions which contains the preassumptions of prior theoretical works for generating and validating new spectrums.
config1.py: Main configurationconfig_theoritical.py: Theoretical sampling parametersconfig_single.py: Single bug analysis parameters underprefect detectionscenarioconfig_multi.py: Multi-bug analysis parameters under contrainedSxandSzconfig_multi_relaxed.py: Multi-bug analysis parametersconfig_user.py: Custom experiment configuration
data_experiment/
├── output_multi/
│ └── synthetic_clusters.json
├── output_multi_relaxed/
│ └── synthetic_clusters.json
├── output_single/
│ └── synthetic_clusters.json
└── outputs_theoritical/
└── synthetic_clusters.json
Each synthetic_clusters.json contains pre-sampled ranks of buggy components for different control parameters.