Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering
Replace all placeholder words (written with underscores) by their suitable counterparts in the context of your Bug.
“The code contains a conditional test is performed twice, one right after the other (e.g., x == 0 || x == 0). Perhaps the second occurrence is intended to be something else (e.g., x == 0 || y == 0).” – 2013-10-28
In the given statement one cannot have same conditional tests performed twice, whereas the second occurrence of the condition is intended to perform some other conditional test.
<code Java> public class BugCor112 {
int x;
int y; String result; void findRpc() { if (x == 0 || x == 0) { result = "Error: Repeated Conditional Test"; } }
</Code>
<code Java> public class BugCor112 {
int x;
int y; String result; void findRpc() { if (x == 0) { result = "Good: No Repeated Conditional Test"; } }
</Code>
Benchmark project | Precision | Recall | ||||
---|---|---|---|---|---|---|
FB | JT | Delta | FB | JT | Delta | |
Project … | …% | …% | …% | …% | …% | …% |
Project … | …% | …% | …% | …% | …% | …% |
FB = FindBugs, JT = JTransformer, Delta = JTransformer - FindBugs