Enhancing Python Compiler Error Messages via Stack

Background: Compilers tend to produce cryptic and uninformative error messages, leaving programmers confused and requiring them to spend precious time to resolve the underlying error. To find help, programmers often take to online question-and-answer forums such as Stack Overflow to start discussion threads about the errors they encountered. Aims: We conjecture that information from Stack Overflow threads which discuss compiler errors can be automatically collected and repackaged to provide programmers with enhanced compiler error messages, thus saving programmers' time and energy. Method: We present Pycee, a plugin integrated with the popular Sublime Text IDE to provide enhanced compiler error messages for the Python programming language. Pycee automatically queries Stack Overflow to provide customised and summarised information within the IDE. We evaluated two Pycee variants through a think-aloud user study during which 16 programmers completed Python programming tasks while using Pycee. Results: The majority of participants agreed that Pycee was helpful while completing the study tasks. When compared to a baseline relying on the official Python documentation to enhance compiler error messages, participants generally preferred Pycee in terms of helpfulness, citing concrete suggestions for fixes and example code as major benefits. Conclusions: Our results confirm that data from online sources such as Stack Overflow can be successfully used to automatically enhance compiler error messages. Our work opens up venues for future work to further enhance compiler error messages as well as to automatically reuse content from Stack Overflow for other aspects of programming.

[1]  Martin P. Robillard,et al.  Code fragment summarization , 2013, ESEC/FSE 2013.

[2]  Frank Maurer,et al.  What makes a good code example?: A study of programming Q&A in StackOverflow , 2012, 2012 28th IEEE International Conference on Software Maintenance (ICSM).

[3]  M. Maia,et al.  Ranking crowd knowledge to assist software development , 2014, ICPC 2014.

[4]  Christoph Treude,et al.  NLP2Code: Code Snippet Content Assist via Natural Language Tasks , 2017, 2017 IEEE International Conference on Software Maintenance and Evolution (ICSME).

[5]  Gail C. Murphy,et al.  Summarizing software artifacts: a case study of bug reports , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[6]  Paulo Gomes,et al.  Context-based recommendation to support problem solving in software development , 2012, 2012 Third International Workshop on Recommendation Systems for Software Engineering (RSSE).

[7]  Gabriele Bavota,et al.  Automatic query reformulations for text retrieval in software engineering , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[8]  Pedro Antunes,et al.  Reviewing the quality of awareness support in collaborative applications , 2010, J. Syst. Softw..

[9]  Rex B. Kline,et al.  Usability measurement and metrics: A consolidated model , 2006, Software Quality Journal.

[10]  Rebecca T. Mercuri,et al.  Identifying and correcting Java programming errors for introductory computer science students , 2003, SIGCSE.

[11]  Christoph Treude,et al.  TaskNav: Task-Based Navigation of Software Documentation , 2015, 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering.

[12]  Jinqiu Yang,et al.  AutoComment: Mining question and answer sites for automatic comment generation , 2013, 2013 28th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[13]  Gaurav Khandelwal,et al.  Bing developer assistant: improving developer productivity by recommending sample code , 2016, SIGSOFT FSE.

[14]  Giuseppe Bianco,et al.  Toxic Code Snippets on Stack Overflow , 2018, IEEE Transactions on Software Engineering.

[15]  David Lo,et al.  Query expansion via WordNet for effective code search , 2015, 2015 IEEE 22nd International Conference on Software Analysis, Evolution, and Reengineering (SANER).

[16]  Christoph Treude,et al.  How do programmers ask and answer questions on the web?: NIER track , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[17]  Brett A. Becker,et al.  Effective compiler error message enhancement for novice programming students , 2016, Comput. Sci. Educ..

[18]  Gail C. Murphy,et al.  Automatic Summarization of Bug Reports , 2014, IEEE Transactions on Software Engineering.

[19]  Lori L. Pollock,et al.  Automatic generation of natural language summaries for Java classes , 2013, 2013 21st International Conference on Program Comprehension (ICPC).

[20]  Collin McMillan,et al.  Automatic Source Code Summarization of Context for Java Methods , 2016, IEEE Transactions on Software Engineering.

[21]  John Homer,et al.  On Novices' Interaction with Compiler Error Messages: A Human Factors Approach , 2017, ICER.

[22]  David Lo,et al.  SEWordSim: software-specific word similarity database , 2014, ICSE Companion.

[23]  Christoph Treude,et al.  Automatically Generating Documentation for Lambda Expressions in Java , 2019, 2019 IEEE/ACM 16th International Conference on Mining Software Repositories (MSR).

[24]  Andrian Marcus,et al.  On the Use of Automated Text Summarization Techniques for Summarizing Source Code , 2010, 2010 17th Working Conference on Reverse Engineering.

[25]  V. Javier Traver,et al.  On Compiler Error Messages: What They Say and What They Mean , 2010, Adv. Hum. Comput. Interact..

[26]  Westley Weimer,et al.  Automatic documentation inference for exceptions , 2008, ISSTA '08.

[27]  Bertrand Meyer,et al.  Compiler error messages: what can help novices? , 2008, SIGCSE '08.

[28]  Andreas Stefik,et al.  An Empirical Investigation into Programming Language Syntax , 2013, TOCE.

[29]  Romain Rouvoy,et al.  Debugging with the Crowd: A Debug Recommendation System Based on StackOverflow , 2014, ERCIM News.

[30]  Hans Peter Luhn,et al.  The Automatic Creation of Literature Abstracts , 1958, IBM J. Res. Dev..

[31]  Nicholas A. Kraft,et al.  What information about code snippets is available in different software-related documents? An exploratory study , 2017, 2017 IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER).

[32]  Martin P. Robillard,et al.  Patterns of Knowledge in API Reference Documentation , 2013, IEEE Transactions on Software Engineering.

[33]  Gabriele Bavota,et al.  Mining StackOverflow to turn the IDE into a self-confident programming prompter , 2014, MSR 2014.

[34]  Kathi Fisler,et al.  Mind your language: on novices' interactions with error messages , 2011, Onward! 2011.

[35]  Christoph Treude,et al.  Crowd Documentation : Exploring the Coverage and the Dynamics of API Discussions on Stack Overflow , 2012 .

[36]  Christoph Treude,et al.  Understanding Stack Overflow Code Fragments , 2017, 2017 IEEE International Conference on Software Maintenance and Evolution (ICSME).

[37]  Philip J. Guo Online python tutor: embeddable web-based program visualization for cs education , 2013, SIGCSE '13.

[38]  Marcelo de Almeida Maia,et al.  Redocumenting APIs with crowd knowledge: a coverage analysis based on question types , 2016, Journal of the Brazilian Computer Society.

[39]  Christoph Treude,et al.  Extracting Development Tasks to Navigate Software Documentation , 2015, IEEE Transactions on Software Engineering.

[40]  Luca Ponzanelli,et al.  Holistic recommender systems for software engineering , 2014, ICSE Companion.

[41]  Michele Lanza,et al.  Seahawk: Stack Overflow in the IDE , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[42]  Gail C. Murphy,et al.  Generating natural language summaries for crosscutting source code concerns , 2011, 2011 27th IEEE International Conference on Software Maintenance (ICSM).

[43]  Emerson R. Murphy-Hill,et al.  Compiler error notifications revisited: an interaction-first approach for helping developers more effectively comprehend and resolve error notifications , 2014, ICSE Companion.

[44]  Anselm L. Strauss,et al.  Basics of qualitative research : techniques and procedures for developing grounded theory , 1998 .

[45]  Paul Ralph,et al.  Grounded Theory in Software Engineering Research: A Critical Review and Guidelines , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE).

[46]  Richard L. Wexelblat,et al.  Maxims for malfeasant designers, or how to design languages to make programming as difficult as possible , 1976, ICSE '76.

[47]  Mik Kersten,et al.  Using task context to improve programmer productivity , 2006, SIGSOFT '06/FSE-14.

[48]  Christoph Treude,et al.  Augmenting API Documentation with Insights from Stack Overflow , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE).

[49]  Kristi Jackson,et al.  Qualitative Data Analysis with NVivo , 2007 .

[50]  Brett A. Becker An Effective Approach to Enhancing Compiler Error Messages , 2016, SIGCSE.