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

Both sides previous revision Previous revision
Next revision
Previous revision
teaching:labs:mdse:2013:bug_descriptions:jt-bug-cor47 [2013/12/02 17:44]
priyanka.dank created
teaching:labs:mdse:2013:bug_descriptions:jt-bug-cor47 [2018/05/09 01:59] (current)
Line 1: Line 1:
 +====== Bug 47 ======
  
 +Format string placeholder incompatible with passed argument (VA_FORMAT_STRING_BAD_ARGUMENT)
 +===== Inspired by =====
 +
 +  * [[http://​findbugs.sourceforge.net/​bugDescriptions.html#​VA_FORMAT_STRING_BAD_CONVERSION]]
 +
 +===== Original Description =====
 +
 +"The format string placeholder is incompatible with the corresponding argument. For example, System.out.printf("​%d\n",​ "​hello"​);​
 +The %d placeholder requires a numeric argument, but a string value is passed instead. A runtime exception will occur when this statement is executed."​ -- 2013-12-02 ​
 +
 +===== Detailed Description =====
 +
 +
 +
 +===== Sample Problem Scenario =====
 +
 + class Sample {
 +                public static void main(String[] args){ ​    
 +                System.out.printf("​%d\n","​hello"​);​
 +        ​
 +              }       
 +        }
 +
 +
 +
 +       
 +===== Sample Fix =====
 +
 +      class Sample {
 +                public static void main(String[] args){ ​    
 +                System.out.printf("​%s\n","​hello"​);​
 +        ​
 +              }       
 +        }
 +
 +       class Sample {
 +                public static void main(String[] args){ ​    
 +                System.out.printf("​%d\n",​12);​
 +        ​
 +              }       
 +        }
 +
 +===== 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-cor47.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019