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-cor118 [2013/12/15 18:05]
narges.tvs
teaching:labs:mdse:2013:bug_descriptions:jt-bug-cor118 [2018/05/09 01:59] (current)
Line 1: Line 1:
 +====== Bug Cor118-(SA_LOCAL_SELF_COMPUTATION) ======
  
 +//SA: Nonsensical self computation involving a variable (e.g., x & x)//
 +
 +===== Inspired by =====
 +
 +  * [[http://​findbugs.sourceforge.net/​bugDescriptions.html#​SA_LOCAL_SELF_COMPUTATION | SA_LOCAL_SELF_COMPUTATION]]
 +
 +===== Original Description =====
 +
 +"This method performs a nonsensical computation of a local variable with another reference to the same variable (e.g., x&x or x-x). Because of the nature of the computation,​ this operation doesn'​t seem to make sense, and may indicate a typo or a logic error. Double check the computation."​ -- 2013-12-09
 +
 +===== Detailed Description =====
 +
 +//When inside a method we use in both side of some special operators same local variable so always we have a fix result in these cases which makes that computation nonsense .// 
 +
 +===== Sample Problem Scenario =====
 +
 +//In below part we have an example://
 +<code Java>
 +public class test {static int y=0;
 +public static void find2(int x) {
 + 
 +   y=x-x;
 +    }
 + }
 +</​Code>​
 +
 +===== Sample Counter Scenario =====
 +
 +//Add here a minimal example where the problem **DOES NOT** occur.//
 +<code Java>
 + ​public class test {static int y=0;
 +public static void find2(int x) {
 + 
 +   x=y-y;
 +    }
 + }
 +</​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-cor118.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019