Assessing the Code Clone Detection Capability of Large Language Models

要約

この研究は、コード クローン検出タスクにおける 2 つの高度なラージ言語モデル (LLM)、GPT-3.5 および GPT-4 のパフォーマンスを評価することを目的としています。
評価には、BigCloneBench (人工) と GPTCloneBench (LLM 生成) の 2 つのデータセットをソースとして、異なるクローン タイプと類似性レベルのさまざまなコード ペアでモデルをテストすることが含まれます。
この研究の結果は、GPT-4 がすべてのクローン タイプにわたって一貫して GPT-3.5 を上回っていることを示しています。
コード クローンの識別における GPT の精度とコードの類似性の間に相関関係が観察され、両方の GPT モデルは最も複雑なタイプ 4 コード クローンの検出において低い有効性を示しました。
さらに、GPT モデルは、人間が生成したコードと比較して、LLM が生成したコード内のコード クローンを識別するパフォーマンスが高いことを示しています。
ただし、驚くべき精度には達しません。
これらの結果は、LLM 機能、特にコード クローンの認識と、自己生成されたコード クローンに対する傾向の緩和において、継続的な拡張が不可欠であることを強調しています。これは、LLM 対応のソフトウェア エンジニアがより多くなっているため、問題になる可能性があります。
コード生成ツールとコードリファクタリングツール。

要約(オリジナル)

This study aims to assess the performance of two advanced Large Language Models (LLMs), GPT-3.5 and GPT-4, in the task of code clone detection. The evaluation involves testing the models on a variety of code pairs of different clone types and levels of similarity, sourced from two datasets: BigCloneBench (human-made) and GPTCloneBench (LLM-generated). Findings from the study indicate that GPT-4 consistently surpasses GPT-3.5 across all clone types. A correlation was observed between the GPTs’ accuracy at identifying code clones and code similarity, with both GPT models exhibiting low effectiveness in detecting the most complex Type-4 code clones. Additionally, GPT models demonstrate a higher performance identifying code clones in LLM-generated code compared to humans-generated code. However, they do not reach impressive accuracy. These results emphasize the imperative for ongoing enhancements in LLM capabilities, particularly in the recognition of code clones and in mitigating their predisposition towards self-generated code clones–which is likely to become an issue as software engineers are more numerous to leverage LLM-enabled code generation and code refactoring tools.

arxiv情報

著者 Zixian Zhang,Takfarinas Saber
発行日 2024-07-02 16:20:44+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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