Master Thesis MSTR-2022-16

BibliographyHuber, Dominik: Neural models for automatic program repair vs. human developers.
University of Stuttgart, Faculty of Computer Science, Electrical Engineering, and Information Technology, Master Thesis No. 16 (2022).
67 pages, english.

On the field of automatic program repair, approaches for code repair increasingly employ neural models of code for a variety of tasks. However, the repair performance of APR approaches is relatively low, and the models behave similarly to black boxes in that it is hard to determine why models make certain predictions. A better understanding of how neural models for program repair arrive at their conclusions could lead to improved training methods, model architectures, and increased trust in model predictions. Many neural models feature attention mechanisms, which are one way of gaining insight into the models' reasoning. This thesis approaches this problem by developing an approach for tracking the attention and behavior of human developers working on code repair tasks. We employ the approach in a 27-participant human study and conduct a comparative analysis of the attention gathered from the humans and that extracted from two APR approaches. Regarding repair performance, we find that human developers drastically outperform current APR approaches, with ca. 70% of fix candidates being correct for the humans and only approximately 1% being correct for the models. We further find that there is a weak to moderate but statistically signi_cant correlation between the attention of the models and the humans (mean Spearman rank correlation between 0:34 and 0:43). The correlation analysis also shows that encoding input programs as an AST and limiting the areas of code visible to the model results in an overall more human-like attention distribution. We highlight di_erences in how much attention is paid to the buggy line, and recommend the introduction of a new hyperparameter to balance attention between the buggy line and the context. Finally, we identify two patterns in developer behavior that may benefit the design of future APR approaches.

Full text and
other links
Department(s)University of Stuttgart, Institute of Software Technology, Software Lab - Program Analysis
Superviser(s)Pradel, Prof. michael; Paltenghi, Matteo
Entry dateSeptember 16, 2022
   Publ. Computer Science