Recovering Fine-Grained Code Change Rationale from Multiple Software Artifacts

Under review · ACM Transactions on Software Engineering and Methodology, 2026

Mehedi Sun, Antu Saha, Nadeeshan De Silva, Antonio Mastropaolo, and Oscar Chaparro. Recovering Fine-Grained Code Change Rationale from Multiple Software Artifacts. Under review at ACM Transactions on Software Engineering and Methodology.

Abstract

Understanding the reasons behind past code changes is important for refactoring, code review, and debugging, but code-change rationale is often fragmented across commit messages, issue reports, pull requests, and code reviews. This work contributes an empirical study of nine rationale components across artifacts linked to 63 commits from five widely used open-source Java projects. The study finds that rationale is highly fragmented: no single artifact type consistently captures every component.

Building on these findings, we introduce Argus, an LLM-based approach that identifies sentences expressing Goal, Need, and Alternatives across a commit’s artifacts and synthesizes concise rationale summaries. The evaluation shows that Argus outperforms an alternative approach for rationale identification and generates summaries rated accurate relative to reference summaries. A user study with 12 Java programmers found that the summaries supported code-change understanding and could help with code review, documentation, and debugging.