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.
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.
Original language | English |
---|---|
Title of host publication | 29th IEEE/ACM International Conference on Program Comprehension (ICPC 2021) |
Editors | L. O'Conner |
Place of Publication | Piscataway |
Publisher | IEEE |
Pages | 25-35 |
Number of pages | 11 |
ISBN (Electronic) | 978-1-6654-1403-6 |
ISBN (Print) | 978-1-6654-1404-3 |
DOIs | |
Publication status | Published - 2021 |
Event | 2021 IEEE/ACM 29th International Conference on Program Comprehension (ICPC) - Virtual at Madrid, Spain Duration: 20 May 2021 → 21 May 2021 Conference number: 29th |
Publication series
Name | IEEE International Conference on Program Comprehension |
---|---|
Volume | 2021-May |
Conference
Conference | 2021 IEEE/ACM 29th International Conference on Program Comprehension (ICPC) |
---|---|
Country/Territory | Spain |
City | Virtual at Madrid |
Period | 20/05/21 → 21/05/21 |
Bibliographical note
Accepted author manuscriptKeywords
- atoms of confusion
- empirical software engineering
- program comprehension
- software engineering