I have a java file and I want to get all the lines that have impact on result of a specific line (Backward Slice Generation). I know the solution but is there any java code to do that?
as an example cosider the following code:
System.out.println("Start")
Random r = new Random();
int i = r.nextInt(10);
int n = 0;
if(i<8)
{
n = 1;
System.out.println("In if");
}
int j = n * i;
I need a code that find the following lines when I run it for line 10:
Random r = new Random();
int i = r.nextInt(10);
int n = 0;
if(i<8)
{
n = 1;
}
int j = n * i;