
Ifeanyi Rowland Onyenweaku et al., IJNSR, 2021; 6:16 Research Article IJNSR (2021) 6:16 International Journal of Natural Science and Reviews (ISSN:2576-5086) A SonarQube Static Analysis of the Spectral Workbench Ifeanyi Rowland Onyenweaku1*, Michael Scott Brown2, Michael Pelosi3, M. H. Shahine1 1Harrisburg University of Science and Technology, Harrisburg, Pennsylvania, United States. 2University of Maryland Global Campus, Adelphi, Maryland, United States. 3Texas A&M Texarkana, Texarkana, Texas, United States. ABSTRACT The Spectral Workbench is an open-source, community driven *Correspondence to Author: software suite to obtain and disseminate spectral data. It Ifeanyi Rowland Onyenweaku consists of a client application that collects spectral readings Harrisburg University of Science and a server application that is an online database of spectral and Technology, Harrisburg, Penns- data. It is difficult to detect software defects in the Spectral ylvania, United States. Workbench application. A static analysis tool, SonarQube, was selected to find these defects. Numerous defects were detected and documented. SonarQube will increase the reliability of How to cite this article: the Spectral Workbench, which provides numerous benefits Ifeanyi Rowland Onyenweaku, Mic- including increased confidence in its data and effectiveness hael Scott Brown, Michael Pelosi, which will drive additional number of users for spectral repository M. H. Shahine. A SonarQube Stat- data collection. ic Analysis of the Spectral Work- bench. International Journal of Nat- Keywords: SonarQube; Static analysis; Defects; Security; Spec- ural Science and Reviews, 2021; tral Workbench 6:16. eSciPub LLC, Houston, TX USA. Website: https://escipub.com/ IJSNR: https://escipub.com/international-journal-of-natural-science-and-reviews/ 1 Ifeanyi Rowland Onyenweaku et al., IJNSR, 2021; 6:16 1. Introduction run analysis on the program. SonarQube is a The Spectral Workbench [1] is an open-source tool that supports the framework, programming software suite. Anyone can use a spectrometer language and libraries being used in Spectral or simple cell phone to collect spectral (light Workbench. Once the analysis is run on the Ja- Wavelength spectrum) data using an applica- vaScript core of Spectral Workbench, thus re- tion. Then it can be uploaded it to the second sults are generated and grouped into different application in the suite - the web-based reposi- categories according to the severity of the issues tory. The publicly available repository is used for or non-issue results. Here, the fix suggestions research and education. Currently there are over are taken and implemented by the engineer or 100,000 recordings in the repository that range by the tool as set in the selected analytic tool, from argon to a leaf. therefore, eliminating the defects. A Pull Re- It is difficult to detect defects in software [2]. The quest with those changes are done to the main Spectral Workbench is not immune to this prob- master branch of the program repository. This lem. Software is very complex and introducing creates a basis to suggest to the Public Lab defects is common. Normally software develop- team to integrate a static analysis tool to their ment teams use a variety of techniques to locate new code review process. This enables the Ja- defects and resolve them, but defects still make vaScript core of Spectral Workbench to have a it into production software. definite method to detect defects for every new Over the past decades numerous methods to code push. detect defects have been developed. All meth- In order for the Spectral Workbench to be suc- ods can be divided into Static and Dynamic cessful, users need to have faith that the appli- Analysis [3]. Static analysis only looks at the cations are reliable. The Spectral Workbench source code while Dynamic analysis executes community depends upon a large number of the program. Static analysis is a popular method people donating time to scan and upload sub- of detecting software defects [3]. jects. It also depends upon researchers and ed- The approach to this research was to conduct ucators to be able to quickly and reliably locate static analysis on the JavaScript Project of Spec- scans and download them. This makes the reli- tral Workbench. This JavaScript program is used ability of Spectral Workbench critical to its suc- to record, manipulate, and analyze spectral cess. data. This program is built on JavaScript which 2. Literature Review uses the node.js package. The code base as of This Literature Review is organized into three version 0.1.6, Fall 2020 was used in this re- sections. There is a detailed review of the Spec- search. tral Workbench, followed by a similar review of To detect defects in the JavaScript code of SonarQube. Then there is a review of similar re- Spectral Workbench, this research approach is search that addresses the same problem using to conduct a static analysis on the program. This static analysis as this research. enables the developers to find defects, under- 2.1 Spectral Workbench Background stand the code structure, and know the test cov- Spectral Workbench is an open-source program erage percentage in a program. This helps the that performs low-cost [5] dynamic analysis [1]. developers detect the defects in the program, These results are shared online. The results and hence, resolve them. Presently, there are from this analysis are used for various purposes Jasmine tests that can be run to find defects in not excluding the measurement of gases in the the application, however, this dynamic analysis atmosphere, measurement of the artificial light will enhance the testing of Spectral Workbench sources, and the verification of Beer’s Law. and increase its quality. Beer's Law states that the concentration of a This research uses the following static analysis chemical solution is directly proportional to its tool. SonarQube [4] static analysis tool is used to absorption of light [6]. This is the attenuation of IJSNR: https://escipub.com/international-journal-of-natural-science-and-reviews/ 2 Ifeanyi Rowland Onyenweaku et al., IJNSR, 2021; 6:16 light to the properties of the material through If the concentration of a solution that makes up which the light travels. The Spectral Workbench a compound is thick, the light absorbed is high, program was originally written on Ruby on rails, and if the concentration is diluted, the light but its second version is written on JavaScript. absorbed is lower. Therefore, spectrometer in There is also a client program that captures this case will use a sample of a known scans and a server website to upload, store and concentration to discover the concen- tration of search the database records for them. This an unknown sample. research is focused on the client program. The Furthermore, spectral workbench enables the Spectral Workbench is not the only product that comparison of different oil samples and residues does this [7]. in UV light. This will help determine if there are 2.2 Importance of Spectral Workbench harmful substances to our everyday oil use by The Spectral workbench program is an differentiating the different oil substances via important program as it gives its users the ability spectrometer. In this activity, some of the ex- to perform experiments that will help solve pro- pected results are to find what a suspected blems. These experiments help determine the motor oil residue, baby oil, BP oil spill and more composition of gases, artificial light measure- look like. This way you can compare the com- ments, comparisons of oil samples and residues ponents of our everyday home oil liquids. The in UV lights and much more. Spectral Workbench is important to the field of One of the main activities that Spectral work- Natural Sciences. bench helps with is the measurement of gases 2.3 Structure of Spectral Workbench in the atmosphere. In this activity, one can easily Spectral workbench has a unique structure step outside and point the spectrometer at the which has been developed over many years. sky or a cloud. When this is done, molecules This program is made up of three major classes. between the spectrometer and the sun (the light These classes are core classes, API classes source) can be seen or noticed. These are seen and the UI classes. These classes are structured in the form of lines, which are also known as around a series of JavaScript classes shown in Frauenhofer lines. These molecules include Figure 1. carbon dioxide, oxygen, ozone and more. With The Core classes of spectral workbench are the this activity, one can tell if his environment is commonly used and useful API methods [1]. One polluted, high in oxygen or low in oxygen. of the core classes is the index file that is the root Just as one can point the spectrometer to a of all the other classes of the Core classes. natural source of light to recognize the atmos- Another core class is the Graph.js class. This is pheric molecules present in their environ- ment, the base class for the display for spectral one can also point to an artificial source of light workbench. It is the class that generates the for example a light bulb. This is also known as graph and chart that the client sees after Flame spectroscopy. Here the spectrometer is performing a spectral activity. Another core class used to determine emissions seen when gases is the Image.js class. This class handles the or liquids are exposed to UV lights, lasers, or flu- display of the image above the graph. The orescent bulbs. Importer.js class is another class from the Core Another example activity that shows the use of class group that handles the importation of spectral workbench is the Beer’s law parsing of the server-side data requests to Sets experiment.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages15 Page
-
File Size-