paperbot · PL 论文追踪

全部论文 待读 收藏

P2 HECS: A Hypergraph Learning-Based System for Detecting Extract Class Refactoring Opportunities

HECS:一种基于超图学习的抽取类重构机会检测系统
ISSTA Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis2024匹配度 3/10 · 论文属于机器学习辅助软件工程/重构机会检测,与“PL+AI”大方向有弱关联;但其核心是超图学习检测抽取类重构,并非面向ML/Agentic程序的静态分析、LLM/Agent改进静态分析或形式化验证,也不涉及浮点程序分析或贝叶斯程序分析。引用 1 inbox
Luqiao Wang, Qiangqiang Wang, Jiaqi Wang, Yutong Zhao, Minjie Wei, Zhou Quan, Di Cui, Qingshan Li
crossref: 2026-09-12

AI 速览

一句话:提出 HECS,用类内依赖超图与超图神经网络结合大模型,更准确地检测抽取类重构机会。

抽取类重构是改善大类设计的重要手段,但传统检测工具通常基于类内元素间一对一的直接依赖图,难以刻画真实代码中的一对多依赖,导致重构建议的准确性与相关性不足。本文提出 HECS,一种基于超图学习的抽取类重构机会检测工具:针对每个目标类构建类内依赖超图以建模多元关系,利用预训练代码模型为节点赋予属性,并训练增强的超图神经网络;同时结合大语言模型将预测结果转化为可落地的重构建议。在大规模数据集与真实世界数据集上的评估表明,与 JDeodorant、SSECS 和 LLMRefactor 相比,HECS 的精确率提升 38.5%、召回率提升 9.7%、F1 提升 44.4%,验证了超图建模对重构机会检测的有效性。

问题
传统抽取类重构检测工具依赖类内一对一直接依赖图,难以建模一对多依赖关系,导致重构建议的准确性和相关性不足。
方法
为每个目标类构建类内依赖超图,使用预训练代码模型为节点赋予属性,训练增强的超图神经网络进行预测,并结合大语言模型生成可实践的重构建议。
评估
在大规模数据集和真实世界数据集上,与 JDeodorant、SSECS 和 LLMRefactor 进行对比,精确率提升 38.5%、召回率提升 9.7%、F1 提升 44.4%。
原文摘要(Abstract)

HECS is an advanced tool designed for Extract Class refactoring by leveraging hypergraph learning to model complex dependencies within large classes. Unlike traditional tools that rely on direct one-to-one dependency graphs, HECS uses intra-class dependency hypergraphs to capture one-to-many relationships. This allows HECS to provide more accurate and relevant refactoring suggestions. The tool constructs hypergraphs for each target class, attributes nodes using a pre-trained code model, and trains an enhanced hypergraph neural network. Coupled with a large language model, HECS delivers practical refactoring suggestions. In evaluations on large-scale and real-world datasets, HECS achieved a 38.5% increase in precision, 9.7% in recall, and 44.4% in f1-measure compared to JDeodorant, SSECS, and LLMRefactor. These improvements make HECS a valuable tool for developers, offering practical insights and enhancing existing refactoring techniques.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8516,
  title = {HECS: A Hypergraph Learning-Based System for Detecting Extract Class Refactoring Opportunities},
  author = {Luqiao Wang and Qiangqiang Wang and Jiaqi Wang and Yutong Zhao and Minjie Wei and Zhou Quan and Di Cui and Qingshan Li},
  booktitle = {ISSTA},
  year = {2024},
  doi = {10.1145/3650212.3685307}
}