Litcius/Paper detail

PyTER: effective program repair for Python type errors

Won-Seok Oh, Hakjoo Oh

2022Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering17 citationsDOI

Abstract

We present PyTER, an automated program repair (APR) technique for Python type errors. Python developers struggle with type error exceptions that are prevalent and difficult to fix. Despite the importance, however, automatically repairing type errors in dynamically typed languages such as Python has received little attention in the APR community and no existing techniques are readily available for practical use. PyTER is the first technique that is carefully designed to fix diverse type errors in real-world Python applications. To this end, we present a novel APR approach that uses dynamic and static analyses to infer correct and incorrect types of program variables, and leverage their difference to effectively identify faulty locations and patch candidates. We evaluated PyTER on 93 type errors collected from open-source projects. The result shows that PyTER is able to fix 48.4% of them with a precision of 77.6%.

Topics & Concepts

Python (programming language)Computer scienceProgramming languageLeverage (statistics)Artificial intelligenceSoftware Engineering ResearchSoftware Testing and Debugging TechniquesSoftware Reliability and Analysis Research