Using Eye Tracking Technology to Analyze the Impact of Stylistic Inconsistency on Code Readability.
Abstract
A number of research efforts have focused in the area of programming style. However, to the best of our knowledge, there is little sound and solid evidence of how and to what extent can stylistic inconsistency impact the readability and maintainability of the source code. To bridge the research gap, we design an empirical experiment in which eye tracking technology is introduced to quantitatively reflect developers' cognitive efforts and mental processes when encountering the inconsistency issue. Index Terms-programming style, stylistic inconsistency, eye tracking technology, code readability, program comprehension I. C ONTEXT AND P ROBLEM S TATEMENT Programming style can be viewed as a kind of personal preferences when writing the source code, which commonly relates to the program's visual appearance (e.g., naming of variables, how and when to use comments, indentation and alignment). Due to different experiences and personalities, developers usually have their very own programming styles, yet these individually preferred programming styles may well conflict with each other. When collaborating, it is highly likely to degrade the readability and maintainability of the source code being produced. The problem is referred to as stylistic inconsistency in our previous research [2]. However, to the best of our knowledge, there is little valid and reliable evidence of how and to what extent stylistic inconsistency affects the comprehensibility of the source code, which is the fundamental problem that should be resolved first in this context. Thus, we carefully plan an empirical experiment with which to bridge the research gap. The expected contribution of our work is two-fold: 1) Provide solid evidence of the impact of stylistic inconsistency on source code comprehension. 2) Present a useful and reusable research framework for analyzing the influences different stylistic factors have upon code readability. To accurately reflect developers' cognitive efforts required to comprehend a given program, we introduce eye tracking technology to capture ocular indices (e.g., gaze position, pupil size) as objective measurements. Basically, eye movements can be characterized as a se