Error location in Python: where the mutants hide

Department of Computing Science, University of Alberta, Edmonton, Alberta, Canada
DOI
10.7287/peerj.preprints.1132v1
Subject Areas
Natural Language and Speech, Programming Languages, Software Engineering
Keywords
Software Engineering, Syntax, Fault Location, Dynamic Languages, Language Modelling, Python, Tool
Copyright
© 2015 Campbell et al.
Licence
This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, reproduction and adaptation in any medium and for any purpose provided that it is properly attributed. For attribution, the original author(s), title, publication source (PeerJ PrePrints) and either DOI or URL of the article must be cited.
Cite this article
Campbell JC, Hindle A, Amaral JN. 2015. Error location in Python: where the mutants hide. PeerJ PrePrints 3:e1132v1

Abstract

Dynamic scripting programming languages present a unique challenge to software engineering tools that depend on static analysis. Dynamic languages do not benefit from the full lexical and syntax analysis provided by compilers and static analysis tools. Prior work exploited a statically typed language (Java) and a simple \(n\)-gram language model to find syntax-error locations in programs. This work investigates whether \(n\)-gram-based error location on source code written in a dynamic language is effective without static analysis or compilation. UnnaturalCode.py is a syntax-error locator developed for the Python programming language. The UnnaturalCode.py approach is effective on Python code, but faces significantly more challenges than its Java counterpart did. UnnaturalCode.py generalizes the success of previous statically-typed approaches to a dynamically-typed language.

Author Comment

This will be submitted to a Software Engineering Journal or Conference for peer review.