paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Detect Hidden Dependency to Untangle Commits

检测隐藏依赖以解开提交纠缠
ASE Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering2024匹配度 3/10 · 论文研究的是用异质图神经网络检测代码变更隐藏依赖以解开纠缠提交,属于 ML for SE/开发者工具方向。它与用户核心关注的静态分析、Agentic 程序、浮点程序分析、贝叶斯程序分析以及 LLM/Agent 与 PL 的交叉均无直接关系,仅共享“机器学习+代码图”这一宽泛背景。引用 10 inbox
Mengdan Fan, Wei Zhang, Haiyan Zhao, Guangtai Liang, Zhi Jin
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出 HD-GNN,通过细粒度全局异质有向图检测代码变更间的隐藏依赖,以解开纠缠提交。

在协作开发中,开发者常产生混杂多种目的的纠缠提交,增加后续理解难度。已有解缠方法依赖人工启发式规则或局部语句级依赖图,忽略全局上下文中的隐藏依赖。本文在实体级和语句级对代码变更的全局上下文建模,提出异质有向图神经网络 HD-GNN,通过聚合与变更相交的连通或非连通实体级子图来检测隐藏依赖,进而聚类解缠。在含1,612和14k纠缠提交的C#、Java数据集及600条人工验证数据上,该方法相较现有方法平均提升25%和19.2%,在人工验证集上优势显著,且未牺牲时间效率。

问题
纠缠提交将不同目的的代码变更混在一起,难以理解;已有方法依赖人工规则或局部依赖,忽略全局上下文的隐藏依赖。
方法
将代码变更的全局上下文建模为实体级和语句级的细粒度异质有向图,并设计 HD-GNN 聚合连通/非连通实体级子图以检测隐藏依赖并用于解缠。
评估
在 1,612 和 14k 个纠缠提交的 C#、Java 数据集及 600 个提交的人工验证集上,与现有方法对比,效果平均提升 25% 和 19.2%,且时间效率不降。
原文摘要(Abstract)

In collaborative software development, developers generally make code changes and commit the changes to the repositories. Among others, "making small, single-purpose commits" is considered the best practice for making commits, allowing the team to quickly understand the code changes. Rather than following best practices, developers often make tangled commits, which wrap code changes that implement different purposes. Such commits make it difficult for other developers to understand the code changes when conducting subsequent development. Early works on untangling code changes rely on human-specified heuristic rules or features, do not consider context, and are labor intensive. Recent works model the local context of code changes as a graph at the statement level, with statements as nodes and code dependencies as edges, and then cluster the changed statements. However, recent works ignore the hidden dependencies in the global context, e.g. a pair of tangled code changes may have no code dependency, and a pair of untangled code changes may have obvious code dependency. To solve this problem, we focus on detecting hidden dependencies among code changes. We model the global context of code changes as graphs at finer-grained, hierarchical levels, i.e., at both entity and statement levels. Then we propose a Heterogeneous Directed Graph Neural Network (HD-GNN) to detect hidden dependencies among code changes by aggregating the global context in both connected or disconnected entity-level subgraphs that intersected with the code changes. Evaluation of common C # and Java datasets with 1,612 and 14k tangled commits and manually validated datasets (MVD) with 600 commits shows that HD-GNN achieves an average enhancement of effectiveness of 25% and 19.2% compared to existing approaches and far superior to existing approaches in MVD, without sacrificing time efficiency.CCS CONCEPTS• Software and its engineering Software configuration management and version control→systems.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{Fan00LJ24,
  title = {Detect Hidden Dependency to Untangle Commits},
  author = {Mengdan Fan and Wei Zhang and Haiyan Zhao and Guangtai Liang and Zhi Jin},
  booktitle = {ASE},
  year = {2024},
  doi = {10.1145/3691620.3694996}
}