The Power of Types: Exploring the Impact of Type Checking on Neural Bug Detection in Dynamically Typed Languages
Boqi Chen, Jos\'e Antonio Hern\'andez L\'opez, Gunter Mussbacher,, D\'aniel Varr\'o

TL;DR
This paper investigates how type checking influences neural bug detection in dynamically typed languages, revealing that integrating type information can improve detection accuracy, especially with type annotations, and that excluding type-related bugs from training enhances detection of other bugs.
Contribution
It systematically evaluates the role of type checking in neural bug detectors for dynamically typed languages and proposes methods to improve their effectiveness by leveraging type information.
Findings
Type-related bugs are prevalent in detection datasets.
Integrating type checkers with neural detectors benefits annotated code.
Removing type-related bugs from training improves detection of non-type bugs.
Abstract
Motivation: Automated bug detection in dynamically typed languages such as Python is essential for maintaining code quality. The lack of mandatory type annotations in such languages can lead to errors that are challenging to identify early with traditional static analysis tools. Recent progress in deep neural networks has led to increased use of neural bug detectors. In statically typed languages, a type checker is integrated into the compiler and thus taken into consideration when the neural bug detector is designed for these languages. Problem: However, prior studies overlook this aspect during the training and testing of neural bug detectors for dynamically typed languages. When an optional type checker is used, assessing existing neural bug detectors on bugs easily detectable by type checkers may impact their performance estimation. Moreover, including these bugs in the training…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Testing and Debugging Techniques · Teaching and Learning Programming
MethodsSparse Evolutionary Training · Focus
