Question

For this project, you can form a group and the maximum number of members in one group is 2. You should find your teammate by yourself. You can also work on

it individually. In this project, you will implement Spectrum-Based Fault Localization (SBFL) for real-world Java programs with unit tests. Specifically, you will calculate suspiciousness values of source code elements by using the 4 formulae in Page 9 of Module 6 slides. The program you will analyze is JFreeChart (https://github.com/jfree/ifreechart) and you don't need to collect its coverage information. Instead, the coverage data has been provided in D2L. You just need to write your own program by using any programming language (e.g., Java, Python, C++, etc.) to process the coverage data and calculate the suspiciousness values based on the 4 SBFL formulae. Explanation of the coverage data: 1. The coverage data (CoverageData.tar) is in the module "Course Project" in D2L as follows. Course Project - Add dates and restrictions... Print Settings/n1. The coverage data (CoverageData.tar) is in the module "Course Project" in D2L as follows. Course Project. Add dates and restrictions... Add a description... Upload / Create Project Instructions PDF document CoverageData.tar GZ File Existing Activities ✓ Bulk Edit Print A+ Settings 2. You need to uncompress the .tar file firstly and then you will find multiple .gz files. For each .gz file, you will find that the first line represents one test case and other lines represent the source code methods covered by this test. The example is as follows, and “true” just represents that the test case is a passed test. Please note that the tests and source code methods are represented by Java bytecode. You can learn Java bytecode by yourself if you are interested (https://www.irebel.com/blog/java- bytecode-tutorial). However, it is not required for this project. You just need to view them as unique tests and source code elements (source code methods)./nTest case org.jfree.chart. annotations.TextAnnotationTest.testEquals true org/jfree/chart/event/ChartChangeEvent::(Ljava/lang/Object;}V org/jfree/chart/event/ChartChange Event:: (Ljava/lang/Object; Lorg/jfree/chart/JFreeChart; Lorg/jfree/chart/event/ChartChange Event Type;) org/jfree/chart/annotations/TextAnnotation::(Ljava/lang/String;)V org/jfree/chart/annotations/TextAnnotation:getText: ()Ljava/lang/String; org/jfree/chart/annotations/TextAnnotation: setText: (Ljava/lang/String; )V org/jfree/chart/annotations/TextAnnotation:getFont: () Ljava/awt/Font; org/jfree/chart/annotations/TextAnnotation: setFont: (Ljava/awt/Font; )V org/jfree/chart/annotations/TextAnnotation:getPaint: ()Ljava/awt/Paint; org/jfree/chart/annotations/TextAnnotation:setPaint: (Ljava/awt/Paint; )V org/jfree/chart/annotations/TextAnnotation:getTextAnchor: ()Lorg/jfree/ui/TextAnchor; org/jfree/chart/annotations/TextAnnotation: setTextAnchor: (Lorg/jfree/ui/TextAnchor;)V org/jfree/chart/annotations/TextAnnotation:getRotationAnchor:()Lorg/jfree/ui/TextAnchor; org/jfree/chart/annotations/TextAnnotation:setRotationAnchor: (Lorg/jfree/ui/TextAnchor;)V org/jfree/chart/annotations/TextAnnotation:getRotationAngle: ()D org/jfree/chart/annotations/TextAnnotation: setRotationAngle: (D)V Source code method 3. You should write code to read all .gz files and convert the data required for SBFL. 4. There are no failed tests in the data. But you should manually set some tests as failed tests. Final Submission 1. Your code to process coverage data and to implement the 4 SBFL formulae in Page 9 of Module 6 slides. Please note that you should also provide one command to execute your program. The input of your program should be the coverage data and the output should be the ranking list of source code methods with the suspiciousness values. 2. The final list of source code methods with the suspiciousness values 3. One-page report to describe how you complete this project.

Fig: 1

Fig: 2

Fig: 3