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

要約

大規模なコード ベースから機能的に類似したプログラムを検索することを目的としたコード クローン検出への注目が高まっています。
最新のソフトウェアには、さまざまなプログラミング言語が含まれることがよくあります。
ただし、現在のコード クローン検出方法は、注釈付きデータが不十分であることと、独自のモデル設計上の制約があるため、一般にいくつかの人気のあるプログラミング言語のみに限定されています。
これらの問題に対処するために、新しい言語の注釈なしでその言語のクローンコードを検出できる新しい言語間適応手法である AdaCCD を紹介します。
AdaCCD は、事前トレーニングされたプログラミング言語モデルからの言語に依存しないコード表現を活用し、リソースが豊富な言語からリソースに乏しい言語に知識を伝達するための、適応的に洗練された対照学習フレームワークを提案します。
5 つのプログラミング言語で構成される多言語コード クローン検出ベンチマークを構築することにより、AdaCCD の言語間適応結果を評価します。
AdaCCD は他のベースラインに比べて大幅な改善を達成し、監視付き微調整に匹敵するパフォーマンスを達成します。

要約(オリジナル)

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, current code clone detection methods are generally limited to only a few popular programming languages due to insufficient annotated data as well as their own model design constraints. To address these issues, we present AdaCCD, a novel cross-lingual adaptation method that can detect cloned codes in a new language without annotations in that language. AdaCCD leverages language-agnostic code representations from pre-trained programming language models and propose an Adaptively Refined Contrastive Learning framework to transfer knowledge from resource-rich languages to resource-poor languages. We evaluate the cross-lingual adaptation results of AdaCCD by constructing a multilingual code clone detection benchmark consisting of 5 programming languages. AdaCCD achieves significant improvements over other baselines, and achieve comparable performance to supervised fine-tuning.

arxiv情報

著者 Yangkai Du,Tengfei Ma,Lingfei Wu,Xuhong Zhang,Shouling Ji
発行日 2024-03-06 17:46:50+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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