arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.25778cs.SEcs.AIcs.IR
收藏

代码评估指标能否检测代码抄袭?

Can Code Evaluation Metrics Detect Code Plagiarism?

University of Warwick(沃里克大学)

Fahad Ebrahim, Mike Joy

AI总结:

本文通过两个公开标注数据集比较评估五种代码评估指标在不同修改层级下的抄袭检测性能,发现CrystalBLEU等指标在部分层级表现优异,但整体上Dolos仍表现最佳。

摘要:

源代码抄袭检测(SCPD)在软件工程教育中维护公平性和学术诚信至关重要。代码评估指标(CEMs)用于评估代码生成任务,但其在不同修改层级(L1-L6)上可靠检测抄袭仍不明确。本文通过ConPlag(原始和模板自由版本)和IRPlag两个公开标注数据集,评估了CodeBLEU、CrystalBLEU、RUBY、Tree Structured Edit Distance(TSED)和CodeBERTScore五种CEMs。性能通过无阈值排名方法评估,包括整体、各数据集和各层级抄袭性能。结果与最先进的SCPDTs(JPlag和Dolos)进行比较。研究发现,未经预处理时,Dolos在整体排名性能上最高,而CrystalBLEU、CodeBLEU和RUBY在JPlag上表现更优。性能在L1最强,从L4开始下降,而CrystalBLEU在L6仍具竞争力。经过预处理后,CrystalBLEU在整体表现上超越Dolos。各数据集中,Dolos在ConPlag原始数据集上表现最佳,而CrystalBLEU在其余数据集上表现最佳。在抄袭层级上,Dolos在L4仍最强,而CrystalBLEU在大部分困难层级领先。这些结果表明,CEMs在排名指标上与专用工具相当。

英文摘要:

Source Code Plagiarism Detection (SCPD) plays an important role in maintaining fairness and academic integrity in software engineering education. Code Evaluation Metrics (CEMs) are developed for assessing code generation tasks. However, it remains unclear whether such metrics can reliably detect plagiarism across different levels of modification (L1-L6), increasing in complexity. In this paper, we perform a comparative empirical study using two open-source labelled datasets, ConPlag (raw and template-free versions) and IRPlag. We evaluate five CEMs, namely CodeBLEU, CrystalBLEU, RUBY, Tree Structured Edit Distance (TSED), and CodeBERTScore. The performance is evaluated using threshold-free ranking-based measures to assess overall, per dataset, and per-level plagiarism performance. The results are compared against state-of-the-art (SOTA) Source Code Plagiarism Detection Tools (SCPDTs), JPlag and Dolos. Our findings show that without preprocessing, Dolos achieves the highest overall ranking performance, while among the individual metrics, CrystalBLEU, CodeBLEU, and RUBY outperform JPlag. Performance is strongest at L1 and drops from L4 onward, while CrystalBLEU remains competitive on L6. With preprocessing, CrystalBLEU surpasses Dolos overall. Per dataset, Dolos achieved the best ranking on the ConPlag raw dataset, while CrystalBLEU was the best-performing metric on the remaining datasets. At the plagiarism levels, Dolos remains strongest on L4, while Crystal-BLEU leads most of the remaining difficult levels. These results indicate that CEMs are comparable to dedicated tools in terms of ranking metrics.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑