Skip to content

Run DebugPilot on Tregression

WYK edited this page Aug 5, 2023 · 17 revisions

Step 1 : Set up Microbat

Clone the Microbat and go to branch stepwiseProp:

git clone https://github.com/llmhyy/microbat.git
cd microbat
git checkout stepwiseProp

Set up Microbat following the instruction in Microbat

Step 2 : Set up Tregression

Clone the Tregression and go to branch stepwiseProp:

git clone https://github.com/llmhyy/tregression.git
cd tregression
git checkout stepwiseProp

Set up Tregression by following the instruction in Tregression

You may use your own Java project or you can download the Defects4j dataset.

Step 3 : Set up User Directory

Before running Tregression as Eclipse Plugin, please set up the user directory for VM runner.

In Run Configuration -> Eclipse Application -> Arguments -> VM Arguments, please add the following argument:

-Duser.dir=<path to microbat>

<path to microbat> should be the absolute path of git\microbat\microbat

Then you can run Tregression as Eclipse Application

Step 4 : DebugPilot Configuration

Configuration of DebugPilot can be found in Window -> Preference -> Debug Pilot Setting

Probability Propagation Method

Determine how the probability of correctness is propagated

Probability Propagation Method Description
None Do not perform probability propagation
SPP_RANDOM Step-wise probability propagation with random factor
SPP_COST Step-wise probability propagation with factor based on computational cost
SPP_CF (Default) * Step-wise probability propagation with factor based on computational cost and user feedback

Path Finding Method

Determine how the suggested path is constructed

Path Finding Method Description
RANDOM Construct random path. If use RANDOM, probability propagation is not needed so that it can be set to None
Greedy Construct path based on greedy strategy
Dijkstra Construct path based on dijkstra algorithm
DijkstraExp (Default) Combination of greedy and dijkstra which give the most reasonable path

Root Cause Locator

Determine how to locate the root cause

Root Cause Locator Description
PROBINFER Used when ProbInfer is selected in probability propagation method
SPP Used when SPP series are selected in probability propagation method

Step 5 : Run DebugPilot

Step 5.1 : Output Selection

Generate the trace by following regular Tregression process

Select the output of the program, which is assumed to be wrong:

Situation Selection
If a wrong variable is found, then check the output variable and then click the Outputs button to indicate the selected variables are wrong
If the last step is already in a wrong branch, you may click the control button and then click the output button to indicate that the step is in wrong branch

Step 5.2 : Construct Path

After selecting the outputs, you may click the debug pilot button on tool bar to construct a path

In the path view, you can observer the suggested path.

Step 5.3 : Give Feedback

Please follow the path to check is the feedback accurate. If an inaccurate feedback is given, you can give the ground truth feedback.

Debugpilot will assume the step user giving feedback is the first wrong prediction, such that every step before the target step will be considered as accurate.

Please give the feedback in Step Property View and then click the Feedback button to submit the feedback:

Continue the process until the root cause is found

Recommended Bug

Here are some recommended bug sample from Defects4j Lang to test DebugPilot:

  • Lang 22
  • Lang 61
  • Lang 44
  • Lang 45
  • Lang 7
  • Lang 40