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-cor63 [2014/03/27 11:58]
malte.mauelshagen
teaching:labs:mdse:2013:bug_descriptions:jt-bug-cor63 [2018/05/09 01:59] (current)
Line 1: Line 1:
 +====== Bug Cor 63 ======
  
 +
 +===== Inspired by =====
 +
 +  * [[http://​findbugs.sourceforge.net/​bugDescriptions.html#​IJU_SETUP_NO_SUPER | IJU_SETUP_NO_SUPER]]
 +
 +===== Original Description =====
 +
 +"Class is a JUnit TestCase and implements the setUp method. The setUp method should call super.setUp(),​ but doesn'​t."​ -- 2014-01-30 ​
 +
 +===== Detailed Description =====
 +
 +In JUnit 3 in every class that inherits from TestCase the developer has to define a setup method where preparations for the test runs are located. In order to assure correct execution, the super method of the setup method has to be called within.
 +
 +<note warning>
 +This bug applies to the version 3 of the JUnit library, which is not the current one anymore.
 +</​note>​
 +
 +
 +===== Sample Problem Scenario =====
 +<code Java>
 + ​ protected void setUp() throws Exception {
 + //Comment
 + System.out.println("​Setting up test"​);​
 + doSomePreparations();​
 +
 + }
 +</​Code>​
 +
 +===== Sample Fix =====
 +
 +<code Java>
 +  protected void setUp() throws Exception {
 + super.setup();​
 + //Comment
 + System.out.println("​Setting up test"​);​
 + doSomePreparations();​
 +                ​
 + }
 +</​Code>​
 +
 +
 +===== Evaluation Results =====
 +
 +^  Benchmark project ​ ^ Time ^ # Hits ^^  Precision ​             ^^^  Recall ​               ^^^
 +|                     || FB | JT | FB    |  JT    |  Delta  |  FB    |  JT    |  Delta |
 +|  Apache Tomcat ​     |< 1s|0|0| ​ 100%  | 100%  |  0  |  100%  |  100%  |  0  |  ​
 +|  Argo UML           |< 1s|0|0| ​ 100%  | 100%  |  0  |  100%  |  100%  |  0  | /* Done! */
 +|  AWT                |< 1s|0|0| ​ 100%  | 100%  |  0  |  100%  |  100%  |  0  |
 +|  Jakarta ​           |< 1s|0|0| ​ 100%  | 100%  |  0  |  100%  |  100%  |  0  |  ​
 +|  Java IO            |< 1s|0|0| ​ 100%  | 100%  |  0  |  100%  |  100%  |  0  |  ​
 +|  JHotDraw ​          |< 1s|0|0| ​ 100%  | 100%  |  0  |  100%  |  100%  |  0  |  ​
 +|  jrefactory ​        |< 1s|0|0| ​ 100%  | 100%  |  0  |  100%  |  100%  |  0  |
 +|  JServlet ​          |< 1s|0|0| ​ 100%  | 100%  |  0  |  100%  |  100%  |  0  |
 +|  JUnit              |4s|0|1| ​ 100%  | 0%  |  -100%  |  100%  |  100%  |  0  |  <- The TestCase class itself was detected! |
 +|  Lexi               |< 1s|0|0| ​ 100%  | 100%  |  0  |  100%  |  100%  |  0  |
 +|  Mapper XML         |< 1s|0|0| ​ 100%  | 100%  |  0  |  100%  |  100%  |  0  |  ​
 +|  nutch              |< 1s|0|0| ​ 100%  | 100%  |  0  |  100%  |  100%  |  0  |  ​
 +|  PMD                |< 1s|0|0| ​ 100%  | 100%  |  0  |  100%  |  100%  |  0  |  ​
 +|  quickuml ​          |< 1s|0|0| ​ 100%  | 100%  |  0  |  100%  |  100%  |  0  |  ​
 +
 +FB = FindBugs, JT = JTransformer,​ Delta = JTransformer - FindBug
 +
 +All measurements were taken on a machine with the following properties:
 +  * JT Version: 4.0.0
 +  * Eclipse Kepler
 +  * Windows 8.1
 +  * i5 2,30Ghz
 +  * 8 GB Main Memory
 +  * SSD Hardrive
 +
 + 
teaching/labs/mdse/2013/bug_descriptions/jt-bug-cor63.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019