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-cor114 [2013/12/09 16:52]
behnam_ghavimi
teaching:labs:mdse:2013:bug_descriptions:jt-bug-cor114 [2018/05/09 01:59] (current)
Line 1: Line 1:
 +====== cor114-(SA_FIELD_SELF_COMPARISON) ======
  
 +SA: Self comparison of field with itself
 +
 +===== Inspired by =====
 +
 +  * [[http://​findbugs.sourceforge.net/​bugDescriptions.html#​SA_FIELD_SELF_COMPARISON | SA_FIELD_SELF_COMPARISON]]
 +
 +===== Original Description =====
 +
 +"This method compares a field with itself, and may indicate a type or a logic error. Make sure that you are comparing the right things."​ -- 2013-12-09 ​
 +
 +
 +
 +===== Detailed Description =====
 +
 +//It will happen when we have a condition which one not local element compare with itself.It seems wrong as it always true or false so it should compare with the other element// ​
 +
 +===== Sample Problem Scenario =====
 +
 +//Here we have one example for this problem(it can be occurred in while or for condition as well://
 +<code Java>
 +public class test {static int y=0;
 + public static void find2(Integer x) {
 +
 +   if (y>=y){
 +     x=0;
 +   }
 + }
 +}
 +</​Code>​
 +
 +
 +===== Sample Counter Scenario =====
 +
 +<code Java>
 +public class test {static int y=0;
 + public static void find2(Integer x) {
 +
 +   if (x>=x){
 +     x=0;
 +   }
 + }
 +}
 +</​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-cor114.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019