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.
“One of the arguments is incompatible with the corresponding format string specifier. As a result, this will generate a run-time exception when executed. For example, String.format(”%d“, “1”) will generate an exception, since the String “1” is incompatible with the format specifier %d.” – 2013-12-02
Due to incompatible format specifier for integer and float, during the execution of the program it generates run-time exception. Whereas the IDE does not recognize the error.
<code Java>
public static void main(String[] args) {
String.format("%d","1"); String.format("%f","1"); String.format("%d", 1.5); }
</Code>
Change the format specifier according to the given argument <code Java>
public static void main(String[] args) {
String.format("%s","1"); String.format("%s","1"); String.format("%f", 1.5); }
</Code>
Benchmark project | Precision | Recall | ||||
---|---|---|---|---|---|---|
FB | JT | Delta | FB | JT | Delta | |
Project … | …% | …% | …% | …% | …% | …% |
Project … | …% | …% | …% | …% | …% | …% |
FB = FindBugs, JT = JTransformer, Delta = JTransformer - FindBugs