paper-with-me

Papers

The Struggles of LLMs in Cross-lingual Code Clone Detection

2024-08-08 · Micheline Bénédicte Moumoula, Abdoul Kader Kabore, Jacques Klein, Tegawendé Bissyande

With the involvement of multiple programming languages in modern software development, cross-lingual code clone detection has gained traction within the software engineering community. Numerous studies have explored this topic, proposing various promising approaches. Inspired by the significant advances in machine learning in recent years, particularly Large Language Models (LLMs), which have demonstrated their ability to tackle various tasks, this paper revisits cross-lingual code clone detection. We evaluate the performance of five (05) LLMs and eight prompts (08) for the identification of cross-lingual code clones. Additionally, we compare these results against two baseline methods. Finally, we evaluate a pre-trained embedding model to assess the effectiveness of the generated representations for classifying clone and non-clone pairs. The studies involving LLMs and Embedding models are evaluated using two widely used cross-lingual datasets, XLCoST and CodeNet. Our results show that LLMs can achieve high F1 scores, up to 0.99, for straightforward programming examples. However, they not only perform less well on programs associated with complex programming challenges but also do not necessarily understand the meaning of "code clones" in a cross-lingual setting. We show that embedding models used to represent code fragments from different programming languages in the same representation space enable the training of a basic classifier that outperforms all LLMs by ~1 and ~20 percentage points on the XLCoST and CodeNet datasets, respectively. This finding suggests that, despite the apparent capabilities of LLMs, embeddings provided by embedding models offer suitable representations to achieve state-of-the-art performance in cross-lingual code clone detection.

📄 PDF Abstract BibTeX arXiv:2408.04430

Code (1)

trux-dtf/clccd 공식 구현

Tasks

Clone Detection

Similar Papers 제목 키워드 기반

CCT-Code: Cross-Consistency Training for Multilingual Clone Detection and Code Search

2023-05-19 · Anton Tikhonov, Nikita Sorokin, Dmitry Abulkhanov, Irina Piontkovskaya 외

We consider the well-known and important tasks of clone detection and information retrieval for source code. The most standard setup is to search clones inside the same language code snippets. But it is also useful to fi…

Clone DetectionCode SearchDecoderInformation Retrieval+1

Investigating the Efficacy of Large Language Models for Code Clone Detection

2024-01-24 · Mohamad Khajezade, Jie JW Wu, Fatemeh Hendijani Fard, Gema Rodríguez-Pérez 외

Large Language Models (LLMs) have demonstrated remarkable success in various natural language processing and software engineering tasks, such as code generation. The LLMs are mainly utilized in the prompt-based zero/few-…

Clone DetectionCode Comment GenerationCode GenerationComment Generation

Source Code is a Graph, Not a Sequence: A Cross-Lingual Perspective on Code Clone Detection

2023-12-27 · Mohammed Ataaur Rahaman, Julia Ive

Source code clone detection is the task of finding code fragments that have the same or similar functionality, but may differ in syntax or structure. This task is important for software maintenance, reuse, and quality as…

Clone Detection

AdaCCD: Adaptive Semantic Contrasts Discovery Based Cross Lingual Adaptation for Code Clone Detection

2023-11-13 · Yangkai Du, Tengfei Ma, Lingfei Wu, Xuhong Zhang 외

Code Clone Detection, which aims to retrieve functionally similar programs from large code bases, has been attracting increasing attention. Modern software often involves a diverse range of programming languages. However…

Clone DetectionContrastive Learning

Assessing the Code Clone Detection Capability of Large Language Models

2024-07-02 · Zixian Zhang, Takfarinas Saber

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 dif…

Clone DetectionCode Generation