Next Article in Journal
Radiation Efficiency Enhancement of Graphene Plasmonic Devices Using Matching Circuits
Previous Article in Journal
A Survey on Contrastive Self-Supervised Learning
Article

Enhanced Bug Prediction in JavaScript Programs with Hybrid Call-Graph Based Invocation Metrics

1
Department of Software Engineering, University of Szeged, Dugonics tér 13., 6720 Szeged, Hungary
2
MTA-SZTE Research Group on Artificial Intelligence, Dugonics tér 13., 6720 Szeged, Hungary
*
Author to whom correspondence should be addressed.
Technologies 2021, 9(1), 3; https://doi.org/10.3390/technologies9010003
Received: 22 November 2020 / Revised: 18 December 2020 / Accepted: 23 December 2020 / Published: 30 December 2020
Bug prediction aims at finding source code elements in a software system that are likely to contain defects. Being aware of the most error-prone parts of the program, one can efficiently allocate the limited amount of testing and code review resources. Therefore, bug prediction can support software maintenance and evolution to a great extent. In this paper, we propose a function level JavaScript bug prediction model based on static source code metrics with the addition of a hybrid (static and dynamic) code analysis based metric of the number of incoming and outgoing function calls (HNII and HNOI). Our motivation for this is that JavaScript is a highly dynamic scripting language for which static code analysis might be very imprecise; therefore, using a purely static source code features for bug prediction might not be enough. Based on a study where we extracted 824 buggy and 1943 non-buggy functions from the publicly available BugsJS dataset for the ESLint JavaScript project, we can confirm the positive impact of hybrid code metrics on the prediction performance of the ML models. Depending on the ML algorithm, applied hyper-parameters, and target measures we consider, hybrid invocation metrics bring a 2–10% increase in model performances (i.e., precision, recall, F-measure). Interestingly, replacing static NOI and NII metrics with their hybrid counterparts HNOI and HNII in itself improves model performances; however, using them all together yields the best results. View Full-Text
Keywords: bug prediction; hybrid code analysis; call-graph; source code metrics bug prediction; hybrid code analysis; call-graph; source code metrics
Show Figures

Figure 1

MDPI and ACS Style

Antal, G.; Tóth, Z.; Hegedűs, P.; Ferenc, R. Enhanced Bug Prediction in JavaScript Programs with Hybrid Call-Graph Based Invocation Metrics. Technologies 2021, 9, 3. https://doi.org/10.3390/technologies9010003

AMA Style

Antal G, Tóth Z, Hegedűs P, Ferenc R. Enhanced Bug Prediction in JavaScript Programs with Hybrid Call-Graph Based Invocation Metrics. Technologies. 2021; 9(1):3. https://doi.org/10.3390/technologies9010003

Chicago/Turabian Style

Antal, Gábor; Tóth, Zoltán; Hegedűs, Péter; Ferenc, Rudolf. 2021. "Enhanced Bug Prediction in JavaScript Programs with Hybrid Call-Graph Based Invocation Metrics" Technologies 9, no. 1: 3. https://doi.org/10.3390/technologies9010003

Find Other Styles
Note that from the first issue of 2016, MDPI journals use article numbers instead of page numbers. See further details here.

Article Access Map by Country/Region

1
Search more from Scilit
 
Search
Back to TopTop