Logo image
Out of Context: How important is Local Context in Neural Program Repair?
Conference proceeding   Peer reviewed

Out of Context: How important is Local Context in Neural Program Repair?

Julian Aron Prenner and R Robbes
ICSE '24: Proceedings of the IEEE/ACM 46th International Conference on Software Engineering, Lisbon, Portugal, April 14 - 20, 2024, pp.1-13
46th International Conference on Software Engineering, ICSE 2024 (Lisbon, 14/07/2024–20/04/2024)
2024
Handle:
https://hdl.handle.net/10863/51379

Abstract

automated program repair data-driven software engineering
Deep learning source code models have been applied very successfully to the problem of automated program repair. One of the standing issues is the small input window of current models which often cannot fully fit the context code required for a bug fix (e.g., method or class declarations of a project). Instead, input is often restricted to the local context, that is, the lines below and above the bug location. In this work we study the importance of this local context on repair success: how much local context is needed?; is context before or after the bug location more important? how is local context tied to the bug type? To answer these questions we train and evaluate Transformer models in many different local context configurations on three datasets and two programming languages. Our results indicate that overall repair success increases with the size of the local context (albeit not for all bug types) and confirm the common practice that roughly 50-60% of the input window should be used for context leading the bug. Our results are not only relevant for researchers working on Transformer-based APR tools but also for benchmark and dataset creators who must decide what and how much context to include in their datasets.
url
https://doi.org/10.1145/3597503.3639086View

Details

Metrics

1 Record Views
Logo image