{"title":"TypeScript编程语言bug的实证研究","authors":"Ziyuan Wang, Yun Fang, Nannan Wang","doi":"10.1016/j.jss.2025.112445","DOIUrl":null,"url":null,"abstract":"<div><div>The TypeScript programming language adds static types to JavaScript, which can be seen as a superset of JavaScript. As special infrastructure software, programming languages may also have bugs, preventing the correct source code from being executed correctly and reliably. To deeply understand the characteristics of historical bugs in the TypeScript programming language, this paper conducts an empirical study. The study involved the versions and features of programming language affected by bugs, the symptoms caused by bugs, the efforts to fix bugs, and the root causes of bugs. By analyzing 8814 bug reports and 7974 pull requests in the repository of TypeScript, our findings reveal that programming language features most severely affected by bugs are “Name, Binding and Scope” and “data types”. The most frequent symptoms include “Behavior Error” and “Compile Error”. The most common root causes are “Missing Features”, “Wrong Control Flow”, “Data Type” errors, and “Processing” errors, all of which could be categorized into “Semantic” errors. Our findings could reveal some characteristics of bugs in TypeScript, provide potential help to developers, testers, and maintainers of TypeScript to improve the quality of TypeScript, and provide a better programming experience for users of TypeScript.</div></div>","PeriodicalId":51099,"journal":{"name":"Journal of Systems and Software","volume":"226 ","pages":"Article 112445"},"PeriodicalIF":3.7000,"publicationDate":"2025-03-31","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"An empirical study on bugs in TypeScript programming language\",\"authors\":\"Ziyuan Wang, Yun Fang, Nannan Wang\",\"doi\":\"10.1016/j.jss.2025.112445\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><div>The TypeScript programming language adds static types to JavaScript, which can be seen as a superset of JavaScript. As special infrastructure software, programming languages may also have bugs, preventing the correct source code from being executed correctly and reliably. To deeply understand the characteristics of historical bugs in the TypeScript programming language, this paper conducts an empirical study. The study involved the versions and features of programming language affected by bugs, the symptoms caused by bugs, the efforts to fix bugs, and the root causes of bugs. By analyzing 8814 bug reports and 7974 pull requests in the repository of TypeScript, our findings reveal that programming language features most severely affected by bugs are “Name, Binding and Scope” and “data types”. The most frequent symptoms include “Behavior Error” and “Compile Error”. The most common root causes are “Missing Features”, “Wrong Control Flow”, “Data Type” errors, and “Processing” errors, all of which could be categorized into “Semantic” errors. Our findings could reveal some characteristics of bugs in TypeScript, provide potential help to developers, testers, and maintainers of TypeScript to improve the quality of TypeScript, and provide a better programming experience for users of TypeScript.</div></div>\",\"PeriodicalId\":51099,\"journal\":{\"name\":\"Journal of Systems and Software\",\"volume\":\"226 \",\"pages\":\"Article 112445\"},\"PeriodicalIF\":3.7000,\"publicationDate\":\"2025-03-31\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Journal of Systems and Software\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S016412122500113X\",\"RegionNum\":2,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q1\",\"JCRName\":\"COMPUTER SCIENCE, SOFTWARE ENGINEERING\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Systems and Software","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S016412122500113X","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0
摘要
TypeScript编程语言为JavaScript添加了静态类型,它可以被视为JavaScript的超集。作为特殊的基础架构软件,编程语言也可能存在缺陷,从而使正确的源代码无法正确可靠地执行。为了深入了解TypeScript编程语言中历史bug的特点,本文进行了实证研究。该研究涉及受bug影响的编程语言的版本和特性、bug引起的症状、修复bug的努力以及bug的根本原因。通过分析TypeScript库中的8814个bug报告和7974个pull request,我们发现受bug影响最严重的编程语言特性是“Name, Binding and Scope”和“data types”。最常见的症状包括“行为错误”和“编译错误”。最常见的根本原因是“缺少功能”、“错误的控制流”、“数据类型”错误和“处理”错误,所有这些都可以归类为“语义”错误。我们的发现可以揭示TypeScript中的一些bug特征,为TypeScript的开发人员、测试人员和维护人员提供潜在的帮助,以提高TypeScript的质量,并为TypeScript的用户提供更好的编程体验。
An empirical study on bugs in TypeScript programming language
The TypeScript programming language adds static types to JavaScript, which can be seen as a superset of JavaScript. As special infrastructure software, programming languages may also have bugs, preventing the correct source code from being executed correctly and reliably. To deeply understand the characteristics of historical bugs in the TypeScript programming language, this paper conducts an empirical study. The study involved the versions and features of programming language affected by bugs, the symptoms caused by bugs, the efforts to fix bugs, and the root causes of bugs. By analyzing 8814 bug reports and 7974 pull requests in the repository of TypeScript, our findings reveal that programming language features most severely affected by bugs are “Name, Binding and Scope” and “data types”. The most frequent symptoms include “Behavior Error” and “Compile Error”. The most common root causes are “Missing Features”, “Wrong Control Flow”, “Data Type” errors, and “Processing” errors, all of which could be categorized into “Semantic” errors. Our findings could reveal some characteristics of bugs in TypeScript, provide potential help to developers, testers, and maintainers of TypeScript to improve the quality of TypeScript, and provide a better programming experience for users of TypeScript.
期刊介绍:
The Journal of Systems and Software publishes papers covering all aspects of software engineering and related hardware-software-systems issues. All articles should include a validation of the idea presented, e.g. through case studies, experiments, or systematic comparisons with other approaches already in practice. Topics of interest include, but are not limited to:
•Methods and tools for, and empirical studies on, software requirements, design, architecture, verification and validation, maintenance and evolution
•Agile, model-driven, service-oriented, open source and global software development
•Approaches for mobile, multiprocessing, real-time, distributed, cloud-based, dependable and virtualized systems
•Human factors and management concerns of software development
•Data management and big data issues of software systems
•Metrics and evaluation, data mining of software development resources
•Business and economic aspects of software development processes
The journal welcomes state-of-the-art surveys and reports of practical experience for all of these topics.