Assessing the Code Clone Detection Capability of Large Language Models

被引:0
|
作者
Zhang, Zixian [1 ]
Saber, Takfarinas [1 ]
机构
[1] Univ Galway, Sch Comp Sci, Galway, Ireland
基金
爱尔兰科学基金会;
关键词
Code Clone Detection; Large Language Models (LLMs); GPT-3.5; GPT-4; Semantic Analysis;
D O I
10.1109/ICCQ60895.2024.10576803
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页数:9
相关论文
共 50 条
  • [31] Conversational Complexity for Assessing Risk in Large Language Models
    Burden, John
    Cebrian, Manuel
    Hernandez-Orallo, Jose
    arXiv,
  • [32] Deep Learning Code Fragments for Code Clone Detection
    White, Martin
    Tufano, Michele
    Vendome, Christopher
    Poshyvanyk, Denys
    2016 31ST IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE), 2016, : 87 - 98
  • [33] A Systematic Review on Code Clone Detection
    Ul Ain, Qurat
    Butt, Wasi Haider
    Anwar, Muhammad Waseem
    Azam, Farooque
    Maqbool, Bilal
    IEEE ACCESS, 2019, 7 : 86121 - 86144
  • [34] Generalizability of Code Clone Detection on CodeBERT
    Sonnekalb, Tim
    Gruner, Bernd
    Brust, Clemens-Alexander
    Mäder, Patrick
    arXiv, 2022,
  • [35] On Precision of Code Clone Detection Tools
    Farmahinifarahani, Farima
    Saini, Vaibhav
    Yang, Di
    Sajnani, Hitesh
    Lopes, Cristina V.
    2019 IEEE 26TH INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION AND REENGINEERING (SANER), 2019, : 84 - 94
  • [36] Generalizability of Code Clone Detection on CodeBERT
    Sonnekalb, Tim
    Gruner, Bernd
    Brust, Clemens-Alexander
    Mäder, Patrick
    ACM International Conference Proceeding Series, 2022,
  • [37] Improving Cross-Language Code Clone Detection via Code Representation Learning and Graph Neural Networks
    Mehrotra, Nikita
    Sharma, Akash
    Jindal, Anmol
    Purandare, Rahul
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2023, 49 (11) : 4846 - 4868
  • [38] CLCDSA: Cross Language Code Clone Detection using Syntactical Features and API Documentation
    Nafi, Kawser Wazed
    Kar, Tonny Shekha
    Roy, Banani
    Roy, Chanchal K.
    Schneider, Kevin A.
    34TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE 2019), 2019, : 1026 - 1037
  • [39] Generalizability of Code Clone Detection on CodeBERT
    Sonnekalb, Tim
    Gruner, Bernd
    Brust, Clemens-Alexander
    Maeder, Patrick
    PROCEEDINGS OF THE 37TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING, ASE 2022, 2022,
  • [40] Code Clone Detection using Wavelets
    Karus, Siim
    Kilgi, Karl
    2015 IEEE 9TH INTERNATIONAL WORKSHOP ON SOFTWARE CLONES (IWSC), 2015, : 8 - 14