paperbot · PL 论文追踪

全部论文 待读 收藏

We Must Have Missed This Comment: Detecting and Repairing Stale Function References in Linux Kernel Comments

我们一定漏掉了这条注释:检测与修复 Linux 内核注释中过时的函数引用
ASE Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering2026引用 0 inbox
Kexin Sun, Yunbo Lyu, Xutong Ma, Hongyu Kuang, Ratnadira Widyasari, He Zhang, Xiaoxing Ma, Julia Lawall, David Lo
crossref: 2026-10-09

AI 速览

一句话:提出 ReCite 三阶段方法,检测并修复 Linux 内核注释中因函数重构或删除而过时的函数引用。

Linux 内核持续演化,注释中引用的函数可能被重构或删除,导致注释过时并误导维护者。已有代码-注释一致性工作主要针对 Javadoc 与其直接标注函数之间的语义错位,无法处理这类由外部代码演化引起的过时引用。本文提出 ReCite,包含三个阶段:检测注释中无法在当前代码库解析的函数形式符号;通过 Git 历史追踪每个未解析符号的演化过程;结合演化历史与当前代码上下文,利用 LLM 生成修复建议。在 Linux 内核 v6.18-rc1 上,ReCite 检测到 869 个过时引用并给出修复建议。对 200 个抽样修复的人工评估显示,178 个(89.0%)提供了有用指导,其中 85 个(42.5%)可直接应用;提交的 75 个补丁中已有 50 个被接受。作者还对所有未解析的函数形式符号进行了实证研究。

问题
Linux 内核注释中引用的函数可能因代码独立演化而被重构或删除,造成注释过时,现有面向 Javadoc 直接标注函数的检测方法无法处理这种外部引发的过时引用。
方法
ReCite 分三阶段:检测当前代码库中无法解析的函数形式符号,利用 Git 历史追踪其演化,并基于演化历史与当前代码上下文用 LLM 生成修复建议。
评估
在 Linux 内核 v6.18-rc1 上检测到 869 个过时引用;抽样 200 个修复建议进行人工评估,178 个有用、85 个可直接应用,提交的 75 个补丁中 50 个被接受,并对所有未解析函数形式符号进行了实证分析。
原文摘要(Abstract)

As the Linux kernel evolves, code comments may become outdated, as the functions they reference can be refactored or removed independently without corresponding updates to the comments. Such stale function references can mislead maintainers and thus hinder code comprehension. Prior work on detecting code-comment inconsistency mainly focused on addressing semantic misalignment between Javadoc comments and their directly annotated functions, making them inapplicable to this type of externally induced staleness in the Linux kernel. Therefore, we propose ReCite, a three-stage approach to identify and repair such stale references: (1) detecting unresolved function-form symbols—symbols in comments that appear to reference functions but for which no matching function can be found in the current codebase, (2) tracing the evolution history of each unresolved symbol through the Git history, and (3) generating LLM-based repair suggestions grounded in the evolution history and current code context. On Linux kernel v6.18-rc1, ReCite detects 869 stale references with generated repair suggestions. A manual evaluation on 200 sampled repairs shows that 178 (89.0%) provide useful repair guidance, with 85 (42.5%) directly applicable. Of our 75 submitted patches, 50 have been accepted. We also empirically study all unresolved function-form symbols.

链接与引用

DOI 原文 · arXiv ·

BibTeX
@inproceedings{paperbot12494,
  title = {We Must Have Missed This Comment: Detecting and Repairing Stale Function References in Linux Kernel Comments},
  author = {Kexin Sun and Yunbo Lyu and Xutong Ma and Hongyu Kuang and Ratnadira Widyasari and He Zhang and Xiaoxing Ma and Julia Lawall and David Lo},
  booktitle = {ASE},
  year = {2026},
  doi = {10.1145/3832783.3837474}
}