An Empirical Study on Dynamic Typing Related Practices in Python Systems
The dynamic typing discipline of Python allows developers to program at a high level of abstraction. However, type related bugs are commonly encountered in Python systems due to the lack of type declaration and static type checking. Especially, the misuse of dynamic typing discipline produces underlying bugs and increases maintenance efforts. In this paper, we introduce six types of dynamic typing related practices in Python programs, which are the common but potentially risky usage of dynamic typing discipline by developers. We also implement a tool named PYDYPE to detect them. Based on this tool, we conduct an empirical study on nine real-world Python systems (with the size of more than 460KLOC) to understand dynamic typing related practices. We investigate how widespread the dynamic typing related practices are, why they are introduced into the systems, whether their usage correlates with increased likelihood of bug occurring, and how developers fix dynamic typing related bugs. The results show that: (1) dynamic typing related practices exist inconsistently in different systems and Inconsistent Variable Types is most prevalent; (2) they are introduced into systems mainly during early development phase to promote development efficiency; (3) they have a significant positive correlation with bug occurring; (4) developers tend to add type checks or exception handling to fix dynamic typing related bugs. These results benefit future research in coding convention, language design, bug detection and fixing.
Wed 15 JulDisplayed time zone: (UTC) Coordinated Universal Time change
00:00 - 01:00 | Session 9: For DevelopersTool Demonstration / Research / ERA at ICPC Chair(s): Anderson Oliveira PUC-Rio | ||
00:00 12mPaper | An Empirical Study on Dynamic Typing Related Practices in Python Systems Research Zhifei Chen Nanjing University, Yanhui Li Department of Computer Science and Technology, Nanjing University, Bihuan Chen Fudan University, Wanwangying Ma Nanjing University, Lin Chen Nanjing University, Baowen Xu Nanjing University Media Attached | ||
00:12 12mPaper | Performing Tasks Can Improve Program Comprehension Mental Model of Novice Research Amal A. Shargabi Qassim University, Syed Ahmad Aljunid Universiti Teknologi MARA, Muthukkaruppan Annamalai Universiti Teknologi MARA, Abdullah Mohd Zin Universiti Kebangsaan Malaysia Media Attached | ||
00:24 12mPaper | SimplyHover: Improving Comprehension of else Statements Tool Demonstration Ahmad Jbara Computer and Cyber Sciences, Augusta University, Georgia, USA, Bar Ben Michael , Or Shacham , Omer Tavor Media Attached | ||
00:36 12mPaper | Combining biometric data with focused document types classifies a success of program comprehension ERA Toyomi Ishida Nara Institute of Science and Technology, Hidetake Uwano National Institute of Technology, Nara College, Japan, Yoshiharu Ikutani Nara Institute of Science and Technology Media Attached | ||
00:48 12mPaper | Program Comprehension in Virtual Reality ERA James Dominic Clemson University, Brock Tubre Clemson Universtiy, Jada Houser Clemson University, Charles Ritter Clemson University, Deborah Kunkel Clemson University, Paige Rodeghero Clemson University Media Attached |