An Empirical Study on Bugs in Python Interpreters
- 20 April 2022
- journal article
- research article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Reliability
- Vol. 71 (2) , 716-734
Abstract
Python is an interpreted programming language that has been widely used in many fields. The successful execution of a Python program depends on both the correctness of Python program and the correctness of Python interpreter. As an infrastructure software, there are many bugs in the Python interpreter. Exploring the bugs in Python interpreters can help developers and maintainers of Python interpreters detect and fix bugs and help users of Python avoid risks. In this article, we conduct an empirical study on the bugs in two mainstream Python interpreters: CPython and PyPy. By analyzing 25 958 fixed bugs, 18 824 revisions, 2 116 test cases, and root causes of randomly sampled 510 bugs, we have summarized the following findings. 1)The distribution of bugs in the Python interpreter is so uneven that the vast majority of bugs are distributed in a few components and source files. 2)The scales of the testing programs that reveal bugs are small. 3)The fixing works seem to be not complicated since the number of modified source files and lines of code are limited; however, most bugs need a long time to be fixed; nearly 15% of the bugs need more than one year to fix. 4)The priorities of bugs are independent of their locations, but they significantly correlate with duration of bugs. 5)Semantic bugs are the most frequent root causes of bugs, and their proportion exceeds other types of root causes. These results could indicate some potential problems during the detecting and fixing of Python interpreter’s bugs, and provide some assistance to developers and maintainers of Python interpreters, users of Python, as well as researchers in related fields.Keywords
Funding Information
- National Natural Science Foundation of China (61772259, 61872177)
- Nanjing University of Posts and Telecommunications (NY220015)
This publication has 39 references indexed in Scilit:
- Finding deep compiler bugs via guided stochastic program mutation2015
- Performance Research and Optimization on CPython’s Interpreter2015
- DRONE: Predicting Priority of Reported Bugs by Multi-factor Analysis2013
- Bug characteristics in open source softwareEmpirical Software Engineering, 2013
- Mining explicit rules for software process evaluation2013
- Improving random test sets using the diversity oriented test data generation2007
- Have things changed now?2006
- Failure classification and analysis of the Java Virtual Machine2006
- Component-Based Software: An Overview of Testing2003
- The structure and performance of interpretersACM SIGPLAN Notices, 1996