Understanding misunderstandings in source code

Dan Gopstein, Jake Iannacone, Yu Yan, Lois DeLong, Yanyan Zhuang, Martin K.C. Yeh, Justin Cappos

    Research output: Chapter in Book/Report/Conference proceedingConference contribution

    Abstract

    Humans often mistake the meaning of source code, and so misjudge a program's true behavior. These mistakes can be caused by extremely small, isolated patterns in code, which can lead to signiicant runtime errors. These patterns are used in large, popular software projects and even recommended in style guides. To identify code patterns that may confuse programmers we extracted a preliminary set of atoms of confusion' from known confusing code. We show empirically in an experiment with 73 participants that these code patterns can lead to a signiicantly increased rate of misunderstanding versus equivalent code without the patterns. We then go on to take larger confusing programs and measure (in an experiment with 43 participants) the impact, in terms of programmer confusion, of removing these confusing patterns. All of our instruments, analysis code, and data are publicly available online for replication, experimentation, and feedback.

    Original languageEnglish (US)
    Title of host publicationESEC/FSE 2017 - Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering
    EditorsAndrea Zisman, Eric Bodden, Wilhelm Schafer, Arie van Deursen
    PublisherAssociation for Computing Machinery
    Pages129-139
    Number of pages11
    ISBN (Electronic)9781450351058
    DOIs
    StatePublished - Aug 21 2017
    Event11th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE 2017 - Paderborn, Germany
    Duration: Sep 4 2017Sep 8 2017

    Publication series

    NameProceedings of the ACM SIGSOFT Symposium on the Foundations of Software Engineering
    VolumePart F130154

    Other

    Other11th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE 2017
    CountryGermany
    CityPaderborn
    Period9/4/179/8/17

    Keywords

    • Program understanding
    • Programming languages

    ASJC Scopus subject areas

    • Software

    Fingerprint Dive into the research topics of 'Understanding misunderstandings in source code'. Together they form a unique fingerprint.

    Cite this