paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Towards Better Answers: Automated Stack Overflow Post Updating

面向更好的答案:自动更新 Stack Overflow 帖子
ICSE 2025 IEEE/ACM 47th International Conference on Software Engineering (ICSE)2025匹配度 3/10 · 该论文属于 LLM 用于软件工程/开发者工具的方向(自动更新 Stack Overflow 帖子以提升代码片段质量),与画像关注的静态分析、Agentic 程序分析、浮点/贝叶斯程序分析等核心问题均无交集;它只是把 LLM 当作代码文本修改的工具,且基于 CodeLlama 这类较旧模型微调,而非建立在当前强模型之上。引用 1 inbox
Yubo Mai, Zhipeng Gao, Haoye Wang, Tingting Bi, Xing Hu, Xin Xia, Jianling Sun
crossref: 2026-09-12

AI 速览

一句话:提出 SOUP 框架,利用评论自动预测有效修改并更新 Stack Overflow 帖子,提升代码片段质量。

Stack Overflow 上的代码片段常被开发者复用,但其中可能包含缺陷或非最优实现。评论虽能指出问题并给出改进建议,却常被忽略,导致问题代码未被更新。本文提出 SOUP 框架,将任务分解为有效评论-编辑预测(VCP)与自动帖子更新(APU)。作者采用低秩适配(LoRA)微调 CodeLlama 完成 VCP,并构建包含 78k 有效评论-编辑对的数据集用于 APU,随后评测多个大语言模型在 APU 上的表现。实验表明 SOUP 在多项基准上取得良好效果;在 Stack Overflow 真实场景中,提交的 50 条编辑有 21 条被维护者验证并接受,证明了其实用价值。

问题
Stack Overflow 代码片段常被复用但可能包含缺陷,评论虽指出问题却常被忽略,导致问题代码未被更新。
方法
提出 SOUP 框架,包含有效评论-编辑预测(VCP)与自动帖子更新(APU);用 LoRA 微调 CodeLlama 做 VCP,并构建 78k 有效评论-编辑对数据集用于 APU,评测多个大语言模型。
评估
在基准上测试 VCP/APU 性能;并在 Stack Overflow 真实场景提交 50 条生成的编辑,其中 21 条被维护者验证并接受。
原文摘要(Abstract)

Utilizing code snippets on Stack Overflow (SO) is a common practice among developers for problem-solving. Although SO code snippets serve as valuable resources, it is important to acknowledge their imperfections, reusing problematic code snippets can lead to the introduction of suboptimal or buggy code into software projects. SO comments often point out weaknesses of a post and provide valuable insights to improve the quality of answers, while SO comments are usually missed and/or ignored, leaving these problematic code snippets untouched. In this work, we first investigate the task of automatic SO posts updating based on their associated comments. We introduce a novel framework, named SOUP (Stack Overflow Updator for Post) for this task. SOUP addresses two key tasks: Valid Comment-Edit Prediction (VCP) and Automatic Post Updating (APU). We fine-tuned a large language model, CodeLlama, using low-rank adaptation techniques to complete the VCP task, and constructed a dataset containing 78k valid comment-edit pairs for the APU task. Subsequently, we tested the performance of multiple large language models on the APU task. Extensive experimental results show the promising performance of our model over a set of benchmarks. Moreover, we also perform an in-the-wild evaluation on Stack Overflow, we submitted 50 edits generated by our approach to Stack Overflow posts and 21 of them have been verified and accepted by SO maintainers, further proving the practical value of SOUP.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8703,
  title = {Towards Better Answers: Automated Stack Overflow Post Updating},
  author = {Yubo Mai and Zhipeng Gao and Haoye Wang and Tingting Bi and Xing Hu and Xin Xia and Jianling Sun},
  booktitle = {ICSE},
  year = {2025},
  doi = {10.1109/icse55347.2025.00024}
}