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

要約

深層学習ソース コード モデルは、自動プログラム修復の問題に非常にうまく適用されています。
解決されていない問題の 1 つは、現在のモデルの入力ウィンドウが小さいことであり、多くの場合、バグ修正に必要なコンテキスト コード (プロジェクトのメソッドやクラス宣言など) を完全に適合させることができません。
代わりに、入力はローカル コンテキスト、つまりバグの場所の上下の行に制限されることがよくあります。
この研究では、修復の成功におけるこのローカル コンテキストの重要性を研究します。どの程度のローカル コンテキストが必要か?
バグの場所の前後のコンテキストはどちらが重要ですか?
ローカルコンテキストはバグの種類とどのように結びついているのでしょうか?
これらの質問に答えるために、3 つのデータセットと 2 つのプログラミング言語を使用して、さまざまなローカル コンテキスト構成で Transformer モデルをトレーニングおよび評価します。
私たちの結果は、(すべてのバグ タイプではありませんが)ローカル コンテキストのサイズに応じて全体的な修復の成功率が増加することを示しており、バグを引き起こすコンテキストには入力ウィンドウのおよそ 50 ~ 60% を使用する必要があるという一般的な慣行を裏付けています。
私たちの結果は、Transformer ベースの APR ツールに取り組んでいる研究者だけでなく、データセットに何をどのくらいのコンテキストを含めるかを決定する必要があるベンチマーク作成者やデータセット作成者にも関係があります。

要約(オリジナル)

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.

arxiv情報

著者 Julian Aron Prenner,Romain Robbes
発行日 2023-12-08 11:49:02+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.SE パーマリンク