The effects of beacons, comments, and tasks on program comprehension process in software maintenance

Program comprehension is the most important and frequent process in software maintenance. Extensive research has found that individual characteristics of programmers, differences of computer programs, and differences of task-driven motivations are the major factors that affect the program comprehension results. There is no study specifically addressing the program comprehension process. There is no study specifically focusing on the explanation of how the programmers’ comprehension process is affected by beacons, the in-line comments, and the task purposes. In addition, most of the studies conducted in the past used either verbal protocols or cloze procedures to collect data. The verbal protocols require subjects to organize their ideas for speaking aloud; the cloze procedures are difficult to grade a program comprehension performance. However, using an eye-tracker to collect eye-movement data that reflect the cognitive process during the program comprehension process can reduce these difficulties. Furthermore, advanced technology makes it possible to collect the eye movement data with minimum intrusion. The current body of literature in program comprehension shows that there are few studies using the eye-movement data to analyze program comprehension process, although the eye-movement data has been studied for decades in psychological experiments. This dissertation examines the program comprehension process by analyzing the eye-movement data. The results of this study suggest that code scanning sequences are affected by the presence of the comments and the motivations of the tasks. Programmers can chunk bigger code blocks in programs with comments than in programs without comments. Different beacon sets are identified for different tasks. The results reveal that the presence of the comments does not improve compound beacon identification efficiency. Instead, it decreases the compound beacon identification efficiency. This study demonstrates that the eye-movement data is useful to trace and analyze the program comprehension process. The findings of the dissertation may shed light on the benefits of the beacons in program comprehension for machine learning. In addition, learning and teaching computer programming languages can benefit from the findings in this study.