Toward Understanding Bugs in Swift Programming Language
Qianyue Wu, Sijie Yu, Ziyuan Wang, Nannan Wang, Yaping Feng · 2023
Swift programming language has been widely used in IOS application development and has formed a perfect Apple development ecosystem due to its syntactic simplicity and functionality. However, as a complex programming language, Swift inevitably has problems, which may cause the program to fail to run normally. In this paper, we empirically analyze the ones in the Swift language. We collected 7446 bugs and 2749 revisions and manually analyzed the root causes of 180 bugs. We found that defects in Swift are unevenly distributed in components and source files; the test cases are small in size, and the complexity and workload of defect fixing are not significant; the symptoms of defects manifest themselves in various forms, but mainly in the form of Crash; and the root causes of defects are mostly semantic bugs. The conclusions drawn based on the findings are helpful for the development, testing, maintenance, and application of the Swift programming language.