Lune

ICSE2020顶会

Demystify official API usage directives with crowdsourced API misuse scenarios, erroneous code examples and patches

Xiaoxue Ren, Jiamou Sun, Zhenchang Xing, Xin Xia, Jianling Sun

摘要

API usage directives in official API documentation describe the contracts, constraints and guidelines for using APIs in natural language. Through the investigation of API misuse scenarios on Stack Overflow, we identify three barriers that hinder the understanding of the API usage directives, i.e., lack of specific usage context, indirect relationships to cooperative APIs, and confusing APIs with subtle differences. To overcome these barriers, we develop a text mining approach to discover the crowdsourced API misuse scenarios on Stack Overflow and extract from these scenarios erroneous code examples and patches, as well as related API and confusing APIs to construct demystification reports to help developers understand the official API usage directives described in natural language. We apply our approach to API usage directives in official Android API documentation and android-tagged discussion threads on Stack Overflow. We extract 159,116 API misuse scenarios for 23,969 API usage directives of 3138 classes and 7471 methods, from which we generate the demystification reports. Our manual examination confirms that the extracted information in the generated demystification reports are of high accuracy. By a user study of 14 developers on 8 API-misuse related error scenarios, we show that our demystification reports help developer understand and debug API-misuse related program errors faster and more accurately, compared with reading only plain API usage-directive sentences.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 9 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • ARCLIN: Automated API Mention Resolution for Unformatted Texts 引用了 API-Misuse Detection Driven by Fine-Grained API-Constraint Knowledge Graph
  • From Misuse to Mastery: Enhancing Code Generation with Knowledge-Driven AI Chaining 引用了 API-Misuse Detection Driven by Fine-Grained API-Constraint Knowledge Graph
  • Improving API Knowledge Discovery with ML: A Case Study of Comparable API Methods 引用了 ARCLIN: Automated API Mention Resolution for Unformatted Texts
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper9

  1. API-Misuse Detection Driven by Fine-Grained API-Constraint Knowledge GraphXiaoxue Ren, Xinyuan Ye, Zhenchang Xing, Xin Xia 等ASE 2020 · 62 次引用
  2. PyART: Python API Recommendation in Real-TimeXincheng He, Lei Xu, Xiangyu Zhang, Rui Hao 等ICSE 2021 · 29 次引用
  3. From Misuse to Mastery: Enhancing Code Generation with Knowledge-Driven AI ChainingXiaoxue Ren, Xinyuan Ye, Dehai Zhao, Zhenchang Xing 等ASE 2023 · 28 次引用
  4. ARCLIN: Automated API Mention Resolution for Unformatted TextsYintong Huo, Yuxin Su, Hongming Zhang, Michael R. LyuICSE 2022 · 6 次引用
  5. Improving API Knowledge Discovery with ML: A Case Study of Comparable API MethodsDaye Nam, Brad A. Myers, Bogdan Vasilescu, Vincent J. HellendoornICSE 2023 · 6 次引用

相关 Paper

  1. When APIs are intentionally bypassed: an exploratory study of API workaroundsMaxime Lamothe, Weiyi ShangICSE 2020 · 14 次引用
  2. You Get Where You're Looking for: The Impact of Information Sources on Code SecurityYasemin Acar, Michael Backes, Sascha Fahl, Doowon Kim 等S&P 2016 · 325 次引用
  3. APICAD: Augmenting API Misuse Detection through Specifications from Code and DocumentsXiaoke Wang, Lei ZhaoICSE 2023 · 7 次引用
  4. SFA-Miner: Mining Path-Sensitive API Usage Patterns Via Symbolic Finite AutomataJiasheng Jiang, Mingwei Zheng, Qingkai Shi, Xiangyu ZhangS&P 2026 · 1 次引用
  5. ARBITRAR: User-Guided API Misuse DetectionZiyang Li, Aravind Machiry, Binghong Chen, Mayur Naik 等S&P 2021 · 30 次引用
黄昏的海面,两侧是细线勾勒的悬崖