Atoms of Confusion in Java

Conference Paper (2021)
Author(s)

Chris Langhout (Student TU Delft)

Maurício Aniche (TU Delft - Software Engineering)

Research Group
Software Engineering
Copyright
© 2021 Chris Langhout, Maurício Aniche
DOI related publication
https://doi.org/10.1109/ICPC52881.2021.00012
More Info
expand_more
Publication Year
2021
Language
English
Copyright
© 2021 Chris Langhout, Maurício Aniche
Research Group
Software Engineering
Pages (from-to)
25-35
ISBN (print)
978-1-6654-1404-3
ISBN (electronic)
978-1-6654-1403-6
Reuse Rights

Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons.

Abstract

Although writing code seems trivial at times, problems arise when humans misinterpret what the code actually does. One of the potential causes are "atoms of confusion", the smallest possible patterns of misinterpretable source code. Previous research has investigated the impact of atoms of confusion in C code. Results show that developers make significantly more mistakes in code where atoms are present.

In this paper, we replicate the work of Gopstein et al. to the Java language. After deriving a set of atoms of confusion for Java, we perform a two-phase experiment with 132 computer science students (i.e., novice developers).

Our results show that (i) participants are 2.7 up to 56 times more likely to make mistakes in code snippets affected by 7 out of the 14 studied atoms of confusion, and (2) when faced with both versions of the code snippets, participants perceived the version affected by the atom of confusion to be more confusing and/or less readable in 10 out of the 14 studied atoms of confusion.

Files

License info not available