paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Augmenting stack overflow with API usage patterns mined from GitHub

用从 GitHub 挖掘的 API 使用模式增强 Stack Overflow
FSE Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering2018匹配度 2/10 · 论文聚焦从 GitHub 挖掘 API 使用模式并检测 Stack Overflow 代码片段中的 API 误用,属于开发者工具/API 挖掘;未涉及用户关心的 ML/Agentic 程序静态分析、LLM/Agent 辅助静态分析、浮点程序分析或贝叶斯程序分析。引用 20 inbox
Anastasia Reinhardt, Tianyi Zhang, Mihir Mathur, Miryung Kim
crossref: 2026-09-12

AI 速览

一句话:构建 Chrome 扩展 ExampleCheck,利用 GitHub 挖掘的 API 使用模式检测并解释 Stack Overflow 代码片段的 API 误用。

程序员常通过 Stack Overflow 学习新 API,但其中的代码片段未必完整或可靠。该论文提出 ExampleCheck:一个 Chrome 扩展,从 38 万个 GitHub 项目中挖掘常见 API 使用模式,并用这些模式检测 Stack Overflow 帖子里的 API 使用违规。它进一步量化给定片段与 GitHub 常见用法的一致程度,并展示如何修复检测到的违规。通过该工具,程序员可以识别 Stack Overflow 片段的陷阱,了解其偏离主流 API 使用模式的程度。

问题
Stack Overflow 上的代码片段在 API 使用上可能不完整或不可靠,程序员难以判断其是否符合常见实践。
方法
从 380K GitHub 项目挖掘 API 使用模式,并以此检测 Stack Overflow 帖子中的 API 使用违规,同时给出量化与修复提示。
评估
以 Chrome 扩展 ExampleCheck 形式实现并演示,展示其在 SO 片段上检测 API 使用违规、量化符合 GitHub 常见模式的程度,并给出修复方式。
原文摘要(Abstract)

Programmers often consult Q&A websites such as Stack Overflow (SO) to learn new APIs. However, online code snippets are not always complete or reliable in terms of API usage. To assess online code snippets, we build a Chrome extension, ExampleCheck that detects API usage violations in SO posts using API usage patterns mined from 380K GitHub projects. It quantifies how many GitHub examples follow common API usage and illustrates how to remedy the detected violation in a given SO snippet. With ExampleCheck, programmers can easily identify the pitfalls of a given SO snippet and learn how much it deviates from common API usage patterns in GitHub. The demo video is at https://youtu.be/WOnN-wQZsH0.

链接与引用

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

BibTeX
@inproceedings{paperbot4660,
  title = {Augmenting stack overflow with API usage patterns mined from GitHub},
  author = {Anastasia Reinhardt and Tianyi Zhang and Mihir Mathur and Miryung Kim},
  booktitle = {FSE},
  year = {2018},
  doi = {10.1145/3236024.3264585}
}