Code2API: A Tool for Generating Reusable APIs from Stack Overflow Code Snippets
This program is tentative and subject to change.
As developers increasingly turn to Stack Overflow for solutions to technical problems, the challenges of how to incorporate code snippets for reusing arise. One way is to transform code snippets into APIs that developers can directly adopt in their daily development. However, it is often costly and error-prone for developers to manually perform this transformation (referred to as AIPzation task) due to different actions to be taken (e.g., summarizing proper method names, inferring input parameters list and return statements). To help developers quickly reuse code snippets in Stack Overflow, in this paper, we propose Code2API, a Google Chrome extension that uses Large Language Models (LLMs) to automatically perform APIzation of code snippets on Stack Overflow. Code2API guides LLMs through well-designed prompts to generate reusalbe APIs, using Chain-of-Thought reasoning and few-shot in-context learning to help LLMs understand and solve the APIzation task in a developer-like manner. The evaluation results show that for 66.0% input parameters, 65.0% return statements, and 43.5% method implementations, our Code2API generated equivalent results with human developers. In terms of method names, 74.3% method names generated by \toolname are considered as meaningful and descriptive by developers, far superior to the result of APIzator (10.0%), and even surpassed the human level performance (60.0%). In the overall API quality evaluation, 50.5% of user selections chose our Code2API generated APIs as their first choice, while 48.0% chose human written APIs and only 1.5% chose APIzator’s, further demonstrating that \toolname has achieved comparable to or even superior performance to human developers. Furthermore, Code2API demonstrated consistently good performance in different programming languages (e.g., Python and Java), proving it can be easily extended to other programming languages without sacrificing performance.
This program is tentative and subject to change.
Thu 26 JunDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
14:00 - 15:30 | |||
14:00 25mTalk | The First Prompt Counts the Most! An Evaluation of Large Language Models on Iterative Example-based Code Generation Research Papers Yingjie Fu Peking University, Bozhou Li Peking University, Linyi Li Simon Fraser University, Wentao Zhang Peking University, Tao Xie Peking University | ||
14:25 25mTalk | VerLog: Enhancing Release Note Generation for Android Apps using Large Language Models Research Papers Jiawei Guo University at Buffalo, SUNY, Haoran Yang Washington State University, Haipeng Cai University at Buffalo, SUNY | ||
14:50 25mTalk | Can LLMs replace Human Evaluators? An Empirical Study of LLM-as-a-Judge in Software Engineering Tasks Research Papers Ruiqi Wang Harbin Institute of Technology, Shenzhen, Jiyu Guo Harbin Institute of Technology, Shenzhen, Cuiyun Gao Harbin Institute of Technology, Guodong Fan Shandong Agriculture and Engineering University, Chun Yong Chong Huawei, Xin Xia Huawei DOI Pre-print | ||
15:15 15mDemonstration | Code2API: A Tool for Generating Reusable APIs from Stack Overflow Code Snippets Tool Demonstrations Yubo Mai Zhejiang University, Zhipeng Gao Shanghai Institute for Advanced Study - Zhejiang University, Xing Hu Zhejiang University, Lingfeng Bao Zhejiang University, Jingyuan Chen , JianLing Sun Zhejiang University |