Atoms of Confusion in Java
Authors:
- 1 May 2021
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 25-35
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 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 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.Keywords
All Related Versions
This publication has 18 references indexed in Scilit:
- Understanding misunderstandings in source code2017
- Novice Java Programming MistakesACM Transactions on Computing Education, 2017
- Comprehending Studies on Program Comprehension2017
- Syntax, Predicates, Idioms - What Really Affects Code Complexity?2017
- Effects of Variable Names on Comprehension: An Empirical Study2017
- Program Comprehension: Past, Present, and Future2016
- When to use the B onferroni correctionOphthalmic and Physiological Optics, 2014
- Likert scales: how to (ab)use themMedical Education, 2004
- An empirical investigation of the influence of a type of side effects on program comprehensionIEEE Transactions on Software Engineering, 2003
- Preprogramming Knowledge: A Major Source of Misconceptions in Novice ProgrammersHuman–Computer Interaction, 1985