Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positives by Slicer4J #28

Open
shrBadihi opened this issue Apr 6, 2023 · 0 comments
Open

False positives by Slicer4J #28

shrBadihi opened this issue Apr 6, 2023 · 0 comments

Comments

@shrBadihi
Copy link

While I was working with slicer4J I discovered the below two false positives in the slice (statements that are irrelevant to the criteria but exist in the slice).

Issue 1: performing backward slice from produce (line 11) should not include the statements related to sum (line 10).
image
In the slice-dependencies.log there is the below dependency which caused the statement depending on sum to be included in the slice:
(testDebug:10) virtualinvoke $stack12.<java.io.PrintStream: void println(double)>(sum) <--data:java.lang.System.out-- testDebug:11

Issue 2: performing backward slice from line 22 should not include lines 1 and 2. In the slice-dependencies.log, these two lines are included in the slice because the control dependency of Func() (line 10) on them. Since C is depending on Func(), the lines 1 and 2 are eventually in the slice. This was the essence of the issue but I attached one of the defects4J cases (Math 37) which slicing from line 1054 in org.apache.commons.math.complex.ComplexTest includes lines 39 and 40 in this file.
bug.zip

1: A = Func(1)
2: B = Func(2)
3: C = Func(3)
....
10: Func(){…}
...
20: Test(A, 10)
21: Test(B, 20)
22: Test(C, 30) ==> slicing critters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant