Here is a video explaining how our algorithm works on a motivating example.
Here is a case where data dependencies were recovered using RecovSlicing.
Recovering data dependencies with RecovSlicing ultimately enabled the successful identification of the root cause.
The bug originates from the Defects4j dataset, specifically from Cli 11.
Defects4j citation: https://github.com/rjust/defects4j
Install Eclipse:
You can download and install it from the official website https://www.eclipse.org/downloads/
Install RecovSlicing Plug-in:
You need to download two compressed files: junit_lib.zip and plugins.zip. Unzip junit_lib.zip and plugins.zip, then put them in the Eclipse.app/Contents/Eclipse/dropins path. After completing these operations, your Eclipse.app/Contents/Eclipse/dropins directory should have two folders, junit_lib and plugins.
Run RecovSlicing:
Restart eclipse, and you will see the RecovSlicing UI on the eclipse interface. For specific UI introduction and usage methods, please refer to the following introduction.
In the RecovSlicing Perspective in Eclipse, there are 5 components acting as the visual aid of RecovSlicing, namely:
Buggy Trace View: Execution Trace (Buggy Version)
Correct Trace View: Execution Trace (Working Version)
Compare View: Source Code of the Program
Step Properties View: Variables in the Focal Step
Console: Logging of Debugging Information, LLM Prompts and Responses
You can use this 'Recover All Data Dependency' button to generate trace:
Or you can use this 'Recov Slicing Evaluation' button to batch run dataset:
Before using the 'Recover All Data Dependency' button, you need to set configuration in preferences. The specific operation is as follows: you can click Eclipse-> preferences-> Microbat Debugging, set your Java (1.8) home path; step limit (the maximum trace length you want to generate, in the experiment we use 100,000); variable layer (the number of variable expansion layers, here we set it to 1)
Next, you need to set configurations in RecovSlicing Setting. In Experiment Settings, check Enable Tracerecov and Enable Tracerecov in Auto Root Cause Localization. In LLM Model Setting, select your LLM Model and set the API Key.
Finally, set the path and other information of the project you need to use in Tregression (Defects4j).
If you want use the 'Recov Slicing Evaluation' button, you need prepare your dataset, and then open eclipse, click File -> Open File in eclipse, select running_configs/run_configs.txt in the repo, and click Open. Before running you need select the configuration file to be executed, and then click the Execute button in the toolbar.