我们是在岩石上建造的吗?数据预处理对代码摘要的重要性
Are We Building on the Rock? On the Importance of Data Preprocessing for Code Summarization
摘要:
代码摘要,即生成代码中有用的注释的任务,长期以来一直受到关注。大多数现有的代码摘要模型都是在广泛使用的代码注释基准数据集上训练和验证的。然而,很少有人知道从现实世界的项目构建的基准数据集的质量。基准数据集是否如预期的那样好?为了弥补这一差距,我们进行了系统的研究,以评估和提高广泛用于代码摘要任务的四个基准数据集的质量。首先,我们提出了一个自动化的代码注释清理工具,可以准确地检测噪声数据所造成的不适当的数据预处理操作从现有的基准数据集。然后,我们应用该工具进一步评估四个基准数据集的数据质量,基于检测到的噪声。最后,我们进行了比较实验,研究噪声数据对代码摘要模型性能的影响。结果表明,这些数据预处理噪声广泛存在于所有四个基准测试数据集中,去除这些噪声数据可以显著提高代码摘要的性能。我们相信,这些发现和见解将有助于更好地理解代码摘要任务中的数据质量,并为相关研究和实践铺平道路。
英文摘要:
Code summarization, the task of generating useful comments given the code, has long been of interest. Most of the existing code summarization models are trained and validated on widely-used code comment benchmark datasets. However, little is known about the quality of the benchmark datasets built from real-world projects. Are the benchmark datasets as good as expected? To bridge the gap, we conduct a systematic research to assess and improve the quality of four benchmark datasets widely used for code summarization tasks. First, we propose an automated code-comment cleaning tool that can accurately detect noisy data caused by inappropriate data preprocessing operations from existing benchmark datasets. Then, we apply the tool to further assess the data quality of the four benchmark datasets, based on the detected noises. Finally, we conduct comparative experiments to investigate the impact of noisy data on the performance of code summarization models. The results show that these data preprocessing noises widely exist in all four benchmark datasets, and removing these noisy data leads to a significant improvement on the performance of code summarization. We believe that the findings and insights will enable a better understanding of data quality in code summarization tasks, and pave the way for relevant research and practice.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。