Replication package for the paper: Harnessing Test Call Structures for Improved Fault Localization Effectiveness
<p>This repository contains the replication package for the paper <strong>"Harnessing Test Call Structures for Improved Fault Localization Effectiveness"</strong>. The package includes the necessary scripts, data, and instructions to reproduce the results presented in the study, focusing on the effectiveness of Spectrum-Based Fault Localization (SBFL) using the Barinel algorithm.</p> <h3>Description of Folders and Files:</h3> <ul> <li><strong>algorithms/</strong>: Contains the SBFL algorithms implemented for this study. Note that only the Barinel algorithm was used in the presented results.</li> <li><strong>base/</strong>: Contains the scripts needed for calculating spectra for SBFL.</li> <li><strong>D4J/</strong>: Contains the Defects4J projects. These need to be unpacked using the appropriate scripts provided in this folder.</li> <li><strong>changeset.json</strong>: Contains metadata about changesets for the projects analyzed in this study.</li> <li><strong>main.py</strong>: The main script for calculating ranks and metrics for the selected projects and heuristics.</li> <li><strong>SBFL ranks.csv</strong>: Contains the SBFL ranks calculated from the analysis.</li> </ul> <h2>Requirements</h2> <p>To run the scripts, you will need:</p> <ul> <li><strong>Python 3.9</strong></li> <li><strong>Defects4J</strong>: The <code>D4J</code> folder should contain unpacked Defects4J projects. Please ensure you have followed the instructions in the <code>D4J</code> folder to unpack the projects accordingly.</li> <li><strong>Required Python packages</strong> (install using <code><a href="http://localhost:63343/markdownPreview/1636345610/markdown-preview-index-2076127249.html?_ijt=mqjd55qrfb1m1q15g8bm74pk1u#"></a>pip</code>): <code><a href="http://localhost:63343/markdownPreview/1636345610/markdown-preview-index-2076127249.html?_ijt=mqjd55qrfb1m1q15g8bm74pk1u#"></a>pip install -r requirements.txt</code></li> <li><strong>Prepare the Defects4J Projects</strong>: <ul> <li>Navigate to the <code>D4J</code> directory.</li> <li>Run the provided scripts to unpack the necessary Defects4J projects.</li> <li>Ensure that each project folder is structured properly to be used by the <code>main.py</code> script.</li> </ul> </li> </ul> <h2>Running the Main Script</h2> <p>The main analysis script is <code>main.py</code>, which calculates the SBFL ranks using the Barinel algorithm based on the selected heuristics.</p> <h3>Usage</h3> <p>To run the main script:</p> <div></div> <pre><code><a href="http://localhost:63343/markdownPreview/1636345610/markdown-preview-index-2076127249.html?_ijt=mqjd55qrfb1m1q15g8bm74pk1u#"></a>python main.py </code></pre> <h3>Parameters and Settings:</h3> <ul> <li><strong>Projects and Ranges</strong>: The projects are defined in the <code>projects</code> list, with their respective bug ranges in the <code>ranges</code> list. The script iterates over these projects and bug IDs to calculate SBFL ranks.</li> </ul> <h3>Outputs:</h3> <ul> <li>The script outputs the ranks and coverage metrics directly to the console. Results can be redirected or saved as needed.</li> <li>It uses the <code>Ranks.RankContainer</code> class to calculate and print the minimum suspiciousness ranks for the selected metrics.</li> </ul>
ShareScore
32/100
Overall dataset sharing score
Score breakdown
These five areas show where the dataset supports — or may limit — practical reuse.
- Stewardship
- 4
- Harmonization
- 4
- Access
- 16
- Reuse readiness
- 8
- Engagement
- 0