GPTCloneBench: A comprehensive benchmark of semantic clones and
cross-language clones using GPT-3 model and SemanticCloneBench
- URL: http://arxiv.org/abs/2308.13963v2
- Date: Fri, 1 Sep 2023 17:44:38 GMT
- Title: GPTCloneBench: A comprehensive benchmark of semantic clones and
cross-language clones using GPT-3 model and SemanticCloneBench
- Authors: Ajmain Inqiad Alam, Palash Ranjan Roy, Farouq Al-omari, Chanchal Kumar
Roy, Banani Roy, Kevin Schneider
- Abstract summary: We present a comprehensive semantic clone and cross-language clone benchmark, GPTCloneBench by exploiting SemanticCloneBench and OpenAI's GPT-3 model.
From 79,928 clone pairs of GPT-3 output, we created a benchmark with 37,149 true semantic clone pairs, 19,288 false semantic pairs(Type-1/Type-2), and 20,770 cross-language clones across four languages (Java, C, C#, and Python)
- Score: 1.8687918300580921
- License: http://creativecommons.org/licenses/by-nc-sa/4.0/
- Abstract: With the emergence of Machine Learning, there has been a surge in leveraging
its capabilities for problem-solving across various domains. In the code clone
realm, the identification of type-4 or semantic clones has emerged as a crucial
yet challenging task. Researchers aim to utilize Machine Learning to tackle
this challenge, often relying on the BigCloneBench dataset. However, it's worth
noting that BigCloneBench, originally not designed for semantic clone
detection, presents several limitations that hinder its suitability as a
comprehensive training dataset for this specific purpose. Furthermore, CLCDSA
dataset suffers from a lack of reusable examples aligning with real-world
software systems, rendering it inadequate for cross-language clone detection
approaches. In this work, we present a comprehensive semantic clone and
cross-language clone benchmark, GPTCloneBench by exploiting SemanticCloneBench
and OpenAI's GPT-3 model. In particular, using code fragments from
SemanticCloneBench as sample inputs along with appropriate prompt engineering
for GPT-3 model, we generate semantic and cross-language clones for these
specific fragments and then conduct a combination of extensive manual analysis,
tool-assisted filtering, functionality testing and automated validation in
building the benchmark. From 79,928 clone pairs of GPT-3 output, we created a
benchmark with 37,149 true semantic clone pairs, 19,288 false semantic
pairs(Type-1/Type-2), and 20,770 cross-language clones across four languages
(Java, C, C#, and Python). Our benchmark is 15-fold larger than
SemanticCloneBench, has more functional code examples for software systems and
programming language support than CLCDSA, and overcomes BigCloneBench's
qualities, quantification, and language variety limitations.
Related papers
- Large Language Models for cross-language code clone detection [3.5202378300682162]
Cross-lingual code clone detection has gained traction with the software engineering community.
Inspired by the significant advances in machine learning, this paper revisits cross-lingual code clone detection.
arXiv Detail & Related papers (2024-08-08T12:57:14Z) - Assessing the Code Clone Detection Capability of Large Language Models [0.0]
The evaluation involves testing the models on a variety of code pairs of different clone types and levels of similarity.
Findings indicate that GPT-4 consistently surpasses GPT-3.5 across all clone types.
arXiv Detail & Related papers (2024-07-02T16:20:44Z) - AdaCCD: Adaptive Semantic Contrasts Discovery Based Cross Lingual
Adaptation for Code Clone Detection [69.79627042058048]
AdaCCD is a novel cross-lingual adaptation method that can detect cloned codes in a new language without annotations in that language.
We evaluate the cross-lingual adaptation results of AdaCCD by constructing a multilingual code clone detection benchmark consisting of 5 programming languages.
arXiv Detail & Related papers (2023-11-13T12:20:48Z) - Unveiling the potential of large language models in generating semantic
and cross-language clones [8.791710193028905]
OpenAI's GPT model has potential in such clone generation as GPT is used for text generation.
In the realm of semantic clones, GPT-3 attains an impressive accuracy of 62.14% and 0.55 BLEU score, achieved through few-shot prompt engineering.
arXiv Detail & Related papers (2023-09-12T17:40:49Z) - ZC3: Zero-Shot Cross-Language Code Clone Detection [79.53514630357876]
We propose a novel method named ZC3 for Zero-shot Cross-language Code Clone detection.
ZC3 designs the contrastive snippet prediction to form an isomorphic representation space among different programming languages.
Based on this, ZC3 exploits domain-aware learning and cycle consistency learning to generate representations that are aligned among different languages are diacritical for different types of clones.
arXiv Detail & Related papers (2023-08-26T03:48:10Z) - Exploring Continual Learning for Code Generation Models [80.78036093054855]
Continual Learning (CL) is an important aspect that remains underexplored in the code domain.
We introduce a benchmark called CodeTask-CL that covers a wide range of tasks, including code generation, translation, summarization, and refinement.
We find that effective methods like Prompt Pooling (PP) suffer from catastrophic forgetting due to the unstable training of the prompt selection mechanism.
arXiv Detail & Related papers (2023-07-05T16:58:39Z) - CCT-Code: Cross-Consistency Training for Multilingual Clone Detection
and Code Search [4.192584020959536]
We formulate the multilingual clone detection problem and present XCD, a new benchmark dataset produced from the CodeForces submissions dataset.
We present a novel training procedure, called cross-consistency training (CCT), that we apply to train language models on source code in different programming languages.
The resulting CCT-LM model achieves new state of the art, outperforming existing approaches on the POJ-104 clone detection benchmark with 95.67% MAP and AdvTest code search benchmark with 47.18% MRR.
arXiv Detail & Related papers (2023-05-19T12:09:49Z) - Partial Network Cloning [58.83278629019384]
PNC conducts partial parametric "cloning" from a source network and then injects the cloned module to the target.
Our method yields a significant improvement of 5% in accuracy and 50% in locality when compared with parameter-tuning based methods.
arXiv Detail & Related papers (2023-03-19T08:20:31Z) - Zero-Shot Cross-lingual Semantic Parsing [56.95036511882921]
We study cross-lingual semantic parsing as a zero-shot problem without parallel data for 7 test languages.
We propose a multi-task encoder-decoder model to transfer parsing knowledge to additional languages using only English-Logical form paired data.
Our system frames zero-shot parsing as a latent-space alignment problem and finds that pre-trained models can be improved to generate logical forms with minimal cross-lingual transfer penalty.
arXiv Detail & Related papers (2021-04-15T16:08:43Z) - Semantic Clone Detection via Probabilistic Software Modeling [69.43451204725324]
This article contributes a semantic clone detection approach that detects clones that have 0% syntactic similarity.
We present SCD-PSM as a stable and precise solution to semantic clone detection.
arXiv Detail & Related papers (2020-08-11T17:54:20Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.