GitCF:利用提交间的多重相似性减少不完整变更
GitCF: Reducing Incomplete Changes by Exploiting Multiple Similarities Among Commits
- School of Computing Institute of Science Tokyo(东京科学大学理工学院)
机构由 AI 辅助整理,请以论文原文为准。
AI总结:
GitCF通过结合提交中修改元素集合与文本内容两类相似性,推荐额外变更位置,在17个开源项目的543个不完整变更上,五项指标均优于现有基线,显著提升Hit@10。
AI中文摘要:
软件开发人员常常难以识别其变更所影响的所有位置,而这些遗漏经常导致不完整的变更。为缓解此问题,已有多种方法被提出,用于推荐应与开发人员当前变更一同修改的额外位置。其中一大类技术从仓库修订历史中挖掘共同变更规则,但由于它们仅依赖于哪些元素被一同修改,因此无法推荐很少共同变更的元素,并且忽略了随提交附带的文本信息。第二类技术确实利用了文本信息,但其文本信息来源于源代码或变更请求,而非提交历史,且未将开发人员当前的变更作为输入。为解决这些局限,我们提出GitCF,一种变更推荐方法,它将开发人员当前的变更与修订历史中的过往变更进行比较,并结合两类相似性来源推荐额外的变更位置:被修改的元素集合以及提交的文本内容,包括提交消息、代码差异和关联的问题描述。我们在来自17个开源项目的543个不完整变更上评估GitCF,其中不完整变更指某次提交中遗漏的修改在后续提交中被补充,并与三种基于共同变更规则的技术进行比较。GitCF在所有五项指标(MAP、Recall@10、Recall@20、Hit@10和Hit@20)上均优于最强基线;特别是,它将Hit@10从0.322提升至0.403,且平均精度的改进具有统计显著性。
英文摘要:
Software developers often struggle to identify all locations that their changes affect, and incomplete changes frequently result from these omissions. To mitigate this problem, several approaches have been proposed to recommend additional locations that should be modified together with a developer's current change. A large class of these techniques mines co-change rules from repository revision histories, but because they rely solely on which elements have been modified together, they cannot recommend elements that have rarely co-changed, and they disregard the textual information that accompanies commits. A second class of techniques does exploit textual information, but it derives it from the source code or from a change request rather than from commit history, and it does not use the developer's current change as its input. To address these limitations, we propose GitCF, a change recommendation method that compares a developer's current change with past changes in the revision history and recommends additional change locations by combining two sources of similarity: the set of modified elements and the textual content of commits, including commit messages, code diffs, and linked issue descriptions. We evaluate GitCF on 543 incomplete changes from 17 open-source projects, where an incomplete change denotes a commit in which an omitted modification is supplied in a later commit, comparing it against three co-change-rule-based techniques. GitCF outperforms the strongest baseline on all five metrics (MAP, Recall@10, Recall@20, Hit@10, and Hit@20); in particular, it raises Hit@10 from 0.322 to 0.403, and the improvement in average precision is statistically significant.