GitCF improves spotting missing code changes using multiple commit clues
GitCF: Reducing Incomplete Changes by Exploiting Multiple Similarities Among Commits
Software Engineering
Summary
Developers often miss parts of their code changes, which causes problems later. The authors created GitCF, a tool that looks at both which files were changed before and the text written about those changes to suggest what else to update. By comparing the current change with past ones in many ways, GitCF can better guess missing edits. Tests on many open-source projects showed GitCF is better than older methods at finding what should be updated together.
What this means in practice
- •For software developers: Identify missing code locations to update during a change by using GitCF's combined similarity approach over past commits.
- •For software quality assurance teams: Improve detection of incomplete code changes in repositories by integrating GitCF to recommend overlooked modifications before finalizing commits.
Authors
Yuto Kitabayashi, Takashi Kobayashi
Abstract
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.