Bachelor Thesis BCLR-2023-03

BibliographySevik, Gamze: How Are Different Asynchronous Programming Constructs in JavaScript Related to Software Quality? A Repository Mining Study on GitHub.
University of Stuttgart, Faculty of Computer Science, Electrical Engineering, and Information Technology, Bachelor Thesis No. 3 (2023).
55 pages, english.
Abstract

JavaScript is one of the most popular programming languages used in both client-side and serverside applications, thus providing “full-stack” development capabilities. Especially in modern web development, responsiveness and overall scalability and performance of an application play a crucial role. This is ensured by the dynamic, asynchronous, event-driven nature, and non-blocking I/O model of JavaScript. To take advantage of these characteristics, there are asynchronous patterns such as callbacks, promises and async/await enable asynchrony in JavaScript. Despite the advantages that these constructs offer, their use can also lead to problems such as “callback hell”, which makes it error-prone, and difficult to understand and maintain the code. However, choosing the right asynchronous pattern and understanding asynchronous applications is challenging for developers and can easily lead to low-quality code. Regarding these challenges, this thesis addresses the arising question: How are different asynchronous programming constructs in JavaScript related to software quality? A large-scale mining software repository study was conducted on GitHub, to examine the relationship between asynchronous programming constructs in JavaScript and software quality. A total of 533 JavaScript repositories with over 1.5 million lines of code were collected and analyzed for functional correctness and maintainability per asynchronous programming construct. The two software quality characteristics were each divided into two metrics, resulting in the following: The metrics for functional correctness are the average time a bug issue is open and percentage of bug-fix commits, and those for maintainability are code smells per LoC and cognitive complexity per LoC. With the use of a static analysis tool, SonarQube, the metrics for maintainability were collected. In contrast, the metrics for functional correctness were obtained through the GitHub API and calculated and scored differently for each metric. After data collection, a hypothesis was formulated for each metric and tested using a Kruskal-Wallis test. The results of the hypothesis testing showed that maintainability differed between repositories using different asynchronous programming constructs in JavaScript, whereas functional correctness did not. Specifically, repositories using async/await showed better code quality and code understandability, while those using callback performed the worst. In conclusion, this study sheds light on how different asynchronous programming constructs are related to software quality. This may help developers in making more informed decisions when choosing asynchronous programming constructs for their projects and how to use them in a way that ensures high-quality software.

Department(s)University of Stuttgart, Institute of Software Technology, Empirical Software Engineering
Superviser(s)Wagner, Prof. Stefan; Bogner, Dr. Justus
Entry dateApril 18, 2023
New Report   New Article   New Monograph   Computer Science