CupCleaner: 一种用于评论更新的混合数据清洗方法
CupCleaner: A Hybrid Data Cleaning Approach for Comment Updating
AI总结:
CupCleaner通过结合静态语义和动态损失信息,有效清洗评论更新数据集,提升模型性能和输出可靠性。
摘要:
评论更新是软件演进中新兴的任务,旨在自动修订源代码注释以符合代码更改。该任务在软件开发过程中维持代码-注释一致性方面发挥着重要作用。近年来,基于深度学习的方法在通过学习代码编辑与相应注释修改之间的复杂模式来解决评论更新问题方面展现出巨大潜力。然而,这些基于学习的方法的有效性严重依赖于训练数据的质量。现有数据集通常是通过挖掘来自GitHub等开源仓库的版本历史构建的,在评论编辑方面往往缺乏质量控制。因此,这些数据集可能包含噪声或不一致的样本,这会阻碍模型学习和泛化。在本文中,我们专注于清理现有的评论更新数据集,考虑数据在更新场景中的特性及其对模型训练过程的影响。我们提出了一种名为CupCleaner(评论更新的清洁器)的混合统计方法来实现这一目的。具体来说,我们结合数据样本中的静态语义信息和训练过程中的动态损失信息来清洁数据集。实验结果表明,在相同的测试集上,单独的静态策略和动态策略可以显著过滤掉一部分数据并提高模型的性能。此外,采用模型集成方法可以结合静态和动态清洗的特征,进一步提高模型的性能和输出结果的可靠性。
英文摘要:
Comment updating is an emerging task in software evolution that aims to automatically revise source code comments in accordance with code changes. This task plays a vital role in maintaining code-comment consistency throughout software development. Recently, deep learning-based approaches have shown great potential in addressing comment updating by learning complex patterns between code edits and corresponding comment modifications. However, the effectiveness of these learning-based approaches heavily depends on the quality of training data. Existing datasets are typically constructed by mining version histories from open-source repositories such as GitHub, where there is often a lack of quality control over comment edits. As a result, these datasets may contain noisy or inconsistent samples that hinder model learning and generalization. In this paper, we focus on cleaning existing comment updating datasets, considering both the data's characteristics in the updating scenario and their implications on the model training process. We propose a hybrid statistical approach named CupCleaner (Comment UPdating's CLEANER) to achieve this purpose. Specifically, we combine static semantic information within data samples and dynamic loss information during the training process to clean the dataset. Experimental results demonstrate that, on the same test set, both the individual static strategy and the dynamic strategy can significantly filter out a portion of the data and enhance the performance of the model. Furthermore, employing a model ensemble approach can combine the characteristics of static and dynamic cleaning, further enhancing the performance of the model and the reliability of its output results.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。