paperbot · PL 论文追踪

全部论文 待读 收藏

P2 API Design Implications of Boilerplate Client Code

样板客户端代码的 API 设计启示
ASE 2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE)2019匹配度 2/10 · 该论文属于软件工程/API设计领域,使用AST比较与图划分挖掘客户端代码中的样板代码,与用户的PL→AI、AI→PL、浮点程序分析或贝叶斯程序分析等核心方向无直接交集,仅涉及静态分析技术但未与LLM/Agent或浮点/贝叶斯分析结合。引用 0 inbox
Daye Nam
crossref: 2026-09-12

AI 速览

一句话:研究样板代码的属性,并提出结合 API 使用挖掘、AST 比较与图划分,从客户端代码中自动挖掘样板以辅助 API 设计评审。

设计可用的 API 对开发者生产力和软件质量至关重要,但十分困难。本文关注“样板代码”(boilerplate)——需要在多处几乎不加修改地重复出现的代码片段,API 设计专家认为它可能指示 API 可用性问题。作者首先考察哪些属性使代码可被视为样板代码,然后提出一种从大量客户端代码中自动挖掘样板代码的新方法。该技术将已有的 API 使用挖掘算法与基于 AST 比较和图划分的新过滤器结合。借助识别出的样板代码候选,作者讨论了该技术如何帮助 API 设计者评审设计决策并发现可用性问题。

问题
API 可用性设计困难,而客户端代码中的样板代码常被视为 API 可用性问题的潜在指标。
方法
作者分析样板代码的判定属性,并组合现有 API 使用挖掘算法与 AST 比较、图划分过滤器,从大量客户端代码中自动识别样板代码候选。
评估
摘要未报告定量评估;作者基于挖掘出的候选样板代码,讨论其在 API 设计评审和可用性问题识别中的潜在应用。
原文摘要(Abstract)

Designing usable APIs is critical to developers' productivity and software quality but is quite difficult. In this paper, I focus on "boilerplate" code, sections of code that have to be included in many places with little or no alteration, which many experts in API design have said can be an indicator of API usability problems. I investigate what properties make code count as boilerplate, and present a novel approach to automatically mine boilerplate code from a large set of client code. The technique combines an existing API usage mining algorithm, with novel filters using AST comparison and graph partitioning. With boilerplate candidates identified by the technique, I discuss how this technique could help API designers in reviewing their design decisions and identifying usability issues.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot5224,
  title = {API Design Implications of Boilerplate Client Code},
  author = {Daye Nam},
  booktitle = {ASE},
  year = {2019},
  doi = {10.1109/ase.2019.00153}
}