paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Code Understanding Linter to Detect Variable Misuse

用于检测变量误用的代码理解 Linter
ASE Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering2022匹配度 7/10 · 该论文利用代码语言模型改进静态分析(检测Python变量误用),属于AI→PL方向,且包含工业界落地评估与假阳性分析,与用户对‘LLM/Agent改进静态分析’和‘工业案例’的兴趣吻合。但它未涉及Agentic程序、浮点或贝叶斯程序分析,且基于的代码语言模型可能并非当前强LLM。引用 0 inbox
Yeonhee Ryou, Sangwoo Joh, Joonmo Yang, Sujin Kim, Youil Kim
crossref: 2026-09-12

AI 速览

一句话:提出基于代码语言模型的代码审查工具,检测 Python 变量误用并生成修复建议。

本文报告了 Code Understanding Linter 的开发经验,这是一种基于代码语言模型的自动代码审查工具,用于检测 Python 代码中的变量误用缺陷并建议修复方式。为提升实用性,作者提出组合两种不同语言模型、过滤模型的无意义输出,以及将模型输出解释为开发者友好的诊断信息。工具在三星电子包含真实 Python 代码的代码仓库上评估。实验表明该工具能发现真实代码中隐藏的缺陷,但误报率远高于预期。作者人工调查所有误报,讨论了语言模型的局限性及可能的解决方向。

问题
真实代码中的变量误用缺陷难以自动发现,而直接使用代码语言模型进行审查会产生大量噪声输出。
方法
设计并实现 Code Understanding Linter,组合两种代码语言模型、过滤无意义输出,并将模型输出转译为开发者友好的诊断与修复建议。
评估
在三星电子真实 Python 代码仓库上评估,工具能发现隐藏缺陷,但误报率远超预期;通过人工分析全部误报总结语言模型的局限。
原文摘要(Abstract)

We share our experience in developing Code Understanding Linter, an automated code review tool based on language models of code. We introduce several ideas to make the tool be more practical, including combining two different language models, filtering meaningless outputs from the model, and generating developer-friendly diagnosis messages by interpreting the outputs from the model. On top of those ideas, we describe the design and implementation of an automated code review tool to detect variable-misuse defects in Python codes and suggest how to fix them. We evaluated the tool with a set of code repositories in Samsung Electronics, which contains real-world Python codes. Our experiment proves that our tool can discover hidden defects in the real-world codes, but the false positive rate is far higher than we expected. After manually investigating every false positives, we discuss the limitations of the language models and possible solutions.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot7360,
  title = {Code Understanding Linter to Detect Variable Misuse},
  author = {Yeonhee Ryou and Sangwoo Joh and Joonmo Yang and Sujin Kim and Youil Kim},
  booktitle = {ASE},
  year = {2022},
  doi = {10.1145/3551349.3559497}
}