Write a Blog >>
MSR 2022
Mon 23 - Tue 24 May 2022
co-located with ICSE 2022

JavaScript (JS) is one of the most popular programming languages, and widely used for web apps, mobile apps, desktop clients, and even backend development. Due to its dynamic and flexible nature, however, JS applications often have a reputation for poor software quality. As a type-safe superset of JavaScript, TypeScript (TS) offers features to address these prejudices. However, there is currently insufficient empirical evidence to broadly support the claim that TS applications exhibit better software quality than JS applications.

We therefore conducted a repository mining study based on 604 GitHub projects (299 for JS, 305 for TS) with over 16M LoC. Using SonarQube and the GitHub API, we collected and analyzed four facets of software quality: a) code quality (# of code smells per LoC), b) code understandability (cognitive complexity per LoC), c) bug proneness (bug fix commit ratio), and d) bug resolution time (mean time a bug issue is open). For TS, we also collected how frequently the type-safety ignoring any type was used per project via ESLint.

The analysis indicates that TS applications exhibit significantly better code quality and understandability than JS applications. Contrary to expectations, however, bug proneness and bug resolution time of our TS sample were not significantly lower than for JS: the mean bug fix commit ratio of TS projects was more than 60% larger (0.126 vs. 0.206), and TS projects needed on average more than an additional day to fix bugs (31.86 vs. 33.04 days). Furthermore, reducing the usage of the any type in TS apps appears to be beneficial: its frequency was significantly correlated with all metrics except bug proneness, even though the correlations were of small strengths (Spearman’s rho between 0.17 and 0.26).

Our results indicate that the perceived positive influence of TypeScript for avoiding bugs in comparison to JavaScript may be more complicated than assumed. While using TS seems to have benefits, it does not automatically lead to less and easier to fix bugs. However, more research is needed in this area, especially concerning the potential influence of project complexity and developer experience.

Fri 20 May

Displayed time zone: Eastern Time (US & Canada) change

04:00 - 04:50
Session 14: Software Quality Technical Papers / Industry Track / Data and Tool Showcase Track at MSR Main room - even hours
Chair(s): Chakkrit Tantithamthavorn Monash University, Simone Scalabrino University of Molise
04:00
4m
Short-paper
Evaluating the effectiveness of local explanation methods on source code-based defect prediction models
Technical Papers
Yuxiang Gao Jiangsu Normal University, Yi Zhu Jiangsu Normal University, Qiao YU Jiangsu Normal University
Pre-print
04:04
7m
Talk
Problems and Solutions in Applying Continuous Integration and Delivery to 20 Open-Source Cyber-Physical Systems
Technical Papers
Fiorella Zampetti University of Sannio, Italy, Vittoria Nardone University of Sannio, Massimiliano Di Penta University of Sannio, Italy
04:11
7m
Talk
To Type or Not to Type? A Systematic Comparison of the Software Quality of JavaScript and TypeScript Applications on GitHub
Technical Papers
Justus Bogner University of Stuttgart, Institute of Software Engineering, Empirical Software Engineering Group, Manuel Merkel University of Stuttgart
Pre-print
04:18
7m
Talk
Using Bandit Algorithms for Selecting Feature Reduction Techniques in Software Defect Prediction
Technical Papers
Masateru Tsunoda Kindai University, Akito Monden Okayama University, Koji Toda Fukuoka Institute of Technology, Amjed Tahir Massey University, Kwabena Ebo Bennin Wageningen University and Research, Keitaro Nakasai National Institute of Technology, Kagoshima College, Masataka Nagura Nanzan University, Kenichi Matsumoto Nara Institute of Science and Technology
Pre-print
04:25
4m
Talk
Constructing Dataset of Functionally Equivalent Java Methods Using Automated Test Generation Techniques
Data and Tool Showcase Track
Yoshiki Higo Osaka University, Shinsuke Matsumoto Osaka University, Shinji Kusumoto Osaka University, Kazuya Yasuda Hitachi, Ltd.
Media Attached
04:29
7m
Talk
Extracting corrective actions from code repositories
Industry Track
Yegor Bugayenko Huawei, Kirill Daniakin Innopolis University, Mirko Farina Innopolis University, Firas Jolha Innopolis University, Artem Kruglov Innopolis University, Witold Pedrycz University of Alberta, Giancarlo Succi Innopolis University
04:36
14m
Live Q&A
Discussions and Q&A
Technical Papers


Information for Participants