Title
Evaluating Refactorings For Disciplining #Ifdef Annotations: An Eye Tracking Study With Novices
Abstract
The C preprocessor is widely used in practice. Conditional compilation with #ifdef annotations allows developers to flexibly introduce variability in their programs. Developers can use disciplined annotations, entirely enclosing full statements with preprocessor directives, or undisciplined ones, enclosing only parts of the statements. Despite some debate, there is no consensus on whether a developer should use exclusively disciplined annotations. While one prior study found undisciplined annotations more time-consuming and error-prone, another study found no difference between disciplined and undisciplined annotations regarding task completion time and accuracy. In this article, we evaluate whether three fine-grained refactorings to discipline #ifdef annotations correlate with improvements in code comprehension and visual effort with an eye tracker. We conduct a controlled experiment with 64 human subjects who were majoritarily novices in the C programming language. We observed statistically significant differences for two refactorings to discipline annotations with respect to the analyzed metrics (time, fixation duration, fixation count, and regressions count) in the code regions changed by each refactoring.
Year
DOI
Venue
2021
10.1007/s10664-021-10002-8
EMPIRICAL SOFTWARE ENGINEERING
Keywords
DocType
Volume
Refactoring, #ifdefs, Eye tracking, Code comprehension, Disciplined annotations, Undisciplined annotations
Journal
26
Issue
ISSN
Citations 
5
1382-3256
0
PageRank 
References 
Authors
0.34
0
8
Name
Order
Citations
PageRank
José Aldo Silva da Costa100.34
Rohit Gheyi261840.66
Márcio Ribeiro336332.81
Sven Apel43980184.13
Vander Alves500.34
Baldoino Fonseca610316.57
Flávio Medeiros71317.32
Alessandro Garcia800.68