SDA SE Wiki

Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
teaching:labs:mdse:2013:bug_descriptions:jt-bug-cor48 [2013/12/02 17:32]
127.0.0.1 external edit
teaching:labs:mdse:2013:bug_descriptions:jt-bug-cor48 [2018/05/09 01:59] (current)
Line 1: Line 1:
 +====== Bug 48 ======
  
 +//Replace all placeholder words (written with underscores) by their suitable counterparts in the context of your Bug.//
 +
 +===== Inspired by =====
 +
 +  * [[http://​findbugs.sourceforge.net/​bugDescriptions.html#​VA_FORMAT_STRING_BAD_CONVERSION | FS: The type of a supplied argument doesn'​t match format specifier (VA_FORMAT_STRING_BAD_CONVERSION)]]
 +
 +===== Original Description =====
 +
 +"One of the arguments is uncompatible with the corresponding format string specifier. As a result, this will generate a runtime 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 ​
 +
 +
 +===== Detailed Description =====
 +
 +//Add here your own description,​ which explains the issue in more detail.// ​
 +
 +===== Sample Problem Scenario =====
 +
 +<code Java>
 + public static void main(String[] args) {
 +
 + String.format("​%d","​1"​);​
 +
 + }
 +</​Code>​
 +
 +
 +===== Sample Fix =====
 +
 +Fix-1
 +
 +Change the format specifier according to the given argument
 +<code Java>
 + public static void main(String[] args) {
 +
 + String.format("​%s","​1"​);​
 +
 + }
 +</​Code>​
 +
 +Fix-2
 +Change the argument according to format specifier
 +
 +<code Java>
 + public static void main(String[] args) {
 +
 + String.format("​%d",​1);​
 +
 + }
 +</​Code>​
 +
 +===== Evaluation Results =====
 +
 +^  Benchmark project ​ ^  Precision ​             ^^^  Recall ​               ^^^
 +|                     ​| ​ FB    |  JT    |  Delta  |  FB    |  JT    |  Delta |
 +|  Project ...        |  ...%  |  ...%  |  ...%   ​| ​ ...%  |  ...%  |  ...%  |  ​
 +|  Project ...        |  ...%  |  ...%  |  ...%   ​| ​ ...%  |  ...%  |  ...%  |   
 +FB = FindBugs, JT = JTransformer,​ Delta = JTransformer - FindBugs
 + 
teaching/labs/mdse/2013/bug_descriptions/jt-bug-cor48.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019