APIzation: Generating Reusable APIs from StackOverflow Code Snippets
Not on the map. Why?
Abstract (arXiv)
Developer forums like StackOverflow have become essential resources to modern software development practices. However, many code snippets lack a well-defined method declaration, and thus they are often incomplete for immediate reuse. Developers must adapt the retrieved code snippets by parameterizing the variables involved and identifying the return value. This activity, which we call APIzation of a code snippet, can be tedious and time-consuming. In this paper, we present APIzator to perform APIzations of Java code snippets automatically. APIzator is grounded by four common patterns that we extracted by studying real APIzations in GitHub. APIzator presents a static analysis algorithm that automatically extracts the method parameters and return statements. We evaluated APIzator with a ground-truth of 200 APIzations collected from 20 developers. For 113 (56.50 %) and 115 (57.50 %) APIzations, APIzator and the developers extracted identical parameters and return statements, respectively. For 163 (81.50 %) APIzations, either the parameters or the return statements were identical.
Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). First posted on arXiv 2 Sep 2021.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 3; 2025: 1; 2026: 2.
6 papers.
- 2024The Future of AI-Driven Software Engineeringcited by 23
- 2024Instruct or Interact? Exploring and Eliciting LLMs' Capability in Code Snippet Adaptation Through Prompt Engineeringcited by 6
- 2024ZS4C: Zero-Shot Synthesis of Compilable Code for Incomplete Code Snippets using LLMscited by 2
- 2026AdaptEval: A Benchmark for Evaluating Large Language Models on Code Snippet Adaptationcited by 1
- 2025Wired for Reuse: Automating Context-Aware Code Adaptation in IDEs via LLM-Based Agentcited by 0
- 2026Coding in a Bubble? Evaluating LLMs in Resolving Context Adaptation Bugs During Code Adaptationcited by 0
- 2026Coding in a Bubble? Evaluating LLMs in Resolving Context Adaptation Bugs During Code Adaptation10 Jan 2026
- 2026AdaptEval: A Benchmark for Evaluating Large Language Models on Code Snippet Adaptation8 Jan 2026
- 2025Wired for Reuse: Automating Context-Aware Code Adaptation in IDEs via LLM-Based Agent2 Jul 2025
- 2024Instruct or Interact? Exploring and Eliciting LLMs' Capability in Code Snippet Adaptation Through Prompt Engineering23 Nov 2024
- 2024The Future of AI-Driven Software Engineering11 Jun 2024
- 2024ZS4C: Zero-Shot Synthesis of Compilable Code for Incomplete Code Snippets using LLMs25 Jan 2024