Searching by Code: a New SearchBySnippet Dataset and SnippeR Retrieval Model for Searching by Code Snippets

要約

コード検索は、近年多くの開発が行われている重要なタスクです。
ただし、これまでの試みでは主に、テキスト クエリによるコードの検索の問題が考慮されていました。
コード スニペット (および場合によっては関連するトレースバック) をクエリとして使用し、バグ修正手順とコード サンプルによる回答を探すことは、既存のアプローチではカバーされない自然なユース ケースであると私たちは主張します。
さらに、既存のデータセットは、テキストとしての全文説明ではなく、コードから抽出されたコメントを使用しているため、このユースケースには適していません。
StackOverflow データに基づいたコードによる検索のユースケースを実装する新しい SearchBySnippet データセットを紹介します。
この設定では、微調整を行った後でも、既存のアーキテクチャは最も単純な BM25 ベースラインに達しないことがわかります。
SearchBySnippet データセットのいくつかの強力なベースラインを上回り、0.451 Recall@10 という結果をもたらした新しい単一エンコーダー モデル SnippeR を紹介します。
私たちは、コード検索評価の新しい重要なベンチマークとして SearchBySnippet データセットと SnippeR を提案します。

要約(オリジナル)

Code search is an important task that has seen many developments in recent years. However, previous attempts have mostly considered the problem of searching for code by a text query. We argue that using a code snippet (and possibly an associated traceback) as a query and looking for answers with bugfixing instructions and code samples is a natural use case that is not covered by existing approaches. Moreover, existing datasets use comments extracted from code rather than full-text descriptions as text, making them unsuitable for this use case. We present a new SearchBySnippet dataset implementing the search-by-code use case based on StackOverflow data; it turns out that in this setting, existing architectures fall short of the simplest BM25 baseline even after fine-tuning. We present a new single encoder model SnippeR that outperforms several strong baselines on the SearchBySnippet dataset with a result of 0.451 Recall@10; we propose the SearchBySnippet dataset and SnippeR as a new important benchmark for code search evaluation.

arxiv情報

著者 Ivan Sedykh,Dmitry Abulkhanov,Nikita Sorokin,Sergey Nikolenko,Valentin Malykh
発行日 2023-05-19 12:09:30+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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