Assessing and Improving an Evaluation Dataset for Detecting Semantic Code Clones via Deep Learning

Author:

Yu Hao1ORCID,Hu Xing2ORCID,Li Ge3ORCID,Li Ying4ORCID,Wang Qianxiang5ORCID,Xie Tao3ORCID

Affiliation:

1. School of Software and Microelectronics, Peking University, Beijing, China

2. School of Software Technology, Zhejiang University, Ningbo, China

3. Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education, Beijing, China

4. National Research Center of Software Engineering, Peking University, Beijing, China

5. Huawei Technologies Co., Ltd., Beijing, China

Abstract

In recent years, applying deep learning to detect semantic code clones has received substantial attention from the research community. Accordingly, various evaluation benchmark datasets, with the most popular one as BigCloneBench, are constructed and selected as benchmarks to assess and compare different deep learning models for detecting semantic clones. However, there is no study to investigate whether an evaluation benchmark dataset such as BigCloneBench is properly used to evaluate models for detecting semantic code clones. In this article, we present an experimental study to show that BigCloneBench typically includes semantic clone pairs that use the same identifier names, which however are not used in non-semantic-clone pairs. Subsequently, we propose an undesirable-by-design Linear-Model that considers only which identifiers appear in a code fragment; this model can achieve high effectiveness for detecting semantic clones when evaluated on BigCloneBench, even comparable to state-of-the-art deep learning models recently proposed for detecting semantic clones. To alleviate these issues, we abstract a subset of the identifier names (including type, variable, and method names) in BigCloneBench to result in AbsBigCloneBench and use AbsBigCloneBench to better assess the effectiveness of deep learning models on the task of detecting semantic clones.

Funder

Key-Area Research and Development Program of Guangdong Province

National Natural Science Foundation of China

Tencent Foundation or XPLORER PRIZE

Publisher

Association for Computing Machinery (ACM)

Subject

Software

Reference51 articles.

1. The adverse effects of code duplication in machine learning models of code

2. Comparison and Evaluation of Clone Detection Tools

3. Avishkar Bhoopchand Tim Rocktäschel Earl Barr and Sebastian Riedel. 2016. Learning Python Code Suggestion with a Sparse Pointer Network. (2016). arxiv:cs.NE/1611.08307

4. Synthesizing benchmarks for predictive modeling

Cited by 4 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Assessing and Improving Dataset and Evaluation Methodology in Deep Learning for Code Clone Detection;2023 IEEE 34th International Symposium on Software Reliability Engineering (ISSRE);2023-10-09

2. GPTCloneBench: A comprehensive benchmark of semantic clones and cross-language clones using GPT-3 model and SemanticCloneBench;2023 IEEE International Conference on Software Maintenance and Evolution (ICSME);2023-10-01

3. Keeping Pace with Ever-Increasing Data: Towards Continual Learning of Code Intelligence Models;2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE);2023-05

4. BigCloneBench Considered Harmful for Machine Learning;2022 IEEE 16th International Workshop on Software Clones (IWSC);2022-10

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3