Exception-aware Lifecycle Model Construction for Framework APIs
- URL: http://arxiv.org/abs/2401.02660v1
- Date: Fri, 5 Jan 2024 06:35:47 GMT
- Title: Exception-aware Lifecycle Model Construction for Framework APIs
- Authors: Jiwei Yan, Jinhao Huang, Hengqin Yang, Jun Yan
- Abstract summary: This paper adopts a static analysis technique to extract exception summary information in the framework API code.
It generates exception-aware API lifecycle models for the given framework/library project.
Compared to the exception-unaware API lifecycle modeling on 60 versions, JavaExp can identify 18% times more API changes.
- Score: 4.333061751230906
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: The implementation of complex software systems usually depends on low-level
frameworks or third-party libraries. During their evolution, the APIs adding
and removing behaviors may cause unexpected compatibility problems. So,
precisely analyzing and constructing the framework/ library's API lifecycle
model is of great importance. Existing works have proposed the API
existence-changing model for defect detection, while not considering the
influence of semantic changes in APIs. In some cases, developers will not
remove or deprecate APIs but modify their semantics by adding, removing, or
modifying their exception-thrown code, which may bring potential defects to
upper-level code. Therefore, besides the API existence model, it is also
necessary for developers to be concerned with the exception-related code
evolution in APIs, which requires the construction of exception-aware API
lifecycle models for framework/library projects. To achieve automatic
exception-aware API lifecycle model construction, this paper adopts a static
analysis technique to extract exception summary information in the framework
API code and adopts a multi-step matching strategy to obtain the changing
process of exceptions. Then, it generates exception-aware API lifecycle models
for the given framework/library project. With this approach, the API lifecycle
extraction tool, JavaExP, is implemented, which is based on Java bytecode
analysis. Compared to the state-of-the-art tool, JavaExP achieves both a higher
F1 score (+60%) and efficiency (+7x), whose precision of exception matching and
changing results is 98%. Compared to the exception-unaware API lifecycle
modeling on 60 versions, JavaExp can identify 18% times more API changes. Among
the 75,433 APIs under analysis, 20% of APIs have changed their
exception-throwing behavior at least once after API introduction, which may
bring many hidden compatibility issues.
Related papers
- Automated Update of Android Deprecated API Usages with Large Language Models [8.507162624206956]
This paper introduces GUPPY, an automated approach that utilizes large language models (LLMs) to update Android API usages.
GUPPY uses GPT-4, one of the most powerful LLMs, to update deprecated-API usages, ensuring compatibility in both the old and new API levels.
Our evaluation, conducted on 360 benchmark API usages from 20 deprecated APIs and an additional 156 deprecated API usages from the latest API levels 33 and 34, demonstrates GUPPY's advantages over the state-of-the-art techniques.
arXiv Detail & Related papers (2024-11-07T03:01:50Z) - A Systematic Evaluation of Large Code Models in API Suggestion: When, Which, and How [53.65636914757381]
API suggestion is a critical task in modern software development.
Recent advancements in large code models (LCMs) have shown promise in the API suggestion task.
arXiv Detail & Related papers (2024-09-20T03:12:35Z) - FANTAstic SEquences and Where to Find Them: Faithful and Efficient API Call Generation through State-tracked Constrained Decoding and Reranking [57.53742155914176]
API call generation is the cornerstone of large language models' tool-using ability.
Existing supervised and in-context learning approaches suffer from high training costs, poor data efficiency, and generated API calls that can be unfaithful to the API documentation and the user's request.
We propose an output-side optimization approach called FANTASE to address these limitations.
arXiv Detail & Related papers (2024-07-18T23:44:02Z) - WorldAPIs: The World Is Worth How Many APIs? A Thought Experiment [49.00213183302225]
We propose a framework to induce new APIs by grounding wikiHow instruction to situated agent policies.
Inspired by recent successes in large language models (LLMs) for embodied planning, we propose a few-shot prompting to steer GPT-4.
arXiv Detail & Related papers (2024-07-10T15:52:44Z) - A Large-scale Investigation of Semantically Incompatible APIs behind Compatibility Issues in Android Apps [13.24503570840706]
We conduct a large-scale discovery of incompatible APIs in the Android Open Source Project (AOSP)
We propose a unified framework to detect incompatible APIs, especially for semantic changes.
Our approach detects 5,481 incompatible APIs spanning from version 4 to version 33.
arXiv Detail & Related papers (2024-06-25T10:12:37Z) - A Solution-based LLM API-using Methodology for Academic Information Seeking [49.096714812902576]
SoAy is a solution-based LLM API-using methodology for academic information seeking.
It uses code with a solution as the reasoning method, where a solution is a pre-constructed API calling sequence.
Results show a 34.58-75.99% performance improvement compared to state-of-the-art LLM API-based baselines.
arXiv Detail & Related papers (2024-05-24T02:44:14Z) - RESTRuler: Towards Automatically Identifying Violations of RESTful
Design Rules in Web APIs [3.4711214580685557]
We present RESTRuler, a Java-based open-source tool that uses static analysis to detect design rule violations in OpenAPI descriptions.
For robustness, RESTRuler successfully analyzed 99% of the used real-world OpenAPI definitions.
For performance efficiency, the tool performed well for the majority of files and could analyze 84% in less than 23 seconds with low CPU and RAM usage.
arXiv Detail & Related papers (2024-02-21T11:25:22Z) - Continual Learning From a Stream of APIs [90.41825351073908]
Continual learning (CL) aims to learn new tasks without forgetting previous tasks.
Existing CL methods require a large amount of raw data, which is often unavailable due to copyright considerations and privacy risks.
This paper considers two practical-yet-novel CL settings: data-efficient CL (DECL-APIs) and data-free CL (DFCL-APIs)
arXiv Detail & Related papers (2023-08-31T11:16:00Z) - Private-Library-Oriented Code Generation with Large Language Models [52.73999698194344]
This paper focuses on utilizing large language models (LLMs) for code generation in private libraries.
We propose a novel framework that emulates the process of programmers writing private code.
We create four private library benchmarks, including TorchDataEval, TorchDataComplexEval, MonkeyEval, and BeatNumEval.
arXiv Detail & Related papers (2023-07-28T07:43:13Z) - HAPI: A Large-scale Longitudinal Dataset of Commercial ML API
Predictions [35.48276161473216]
We present HAPI, a longitudinal dataset of 1,761,417 instances of commercial ML API applications.
Each instance consists of a query input for an API along with the API's output prediction/annotation and confidence scores.
arXiv Detail & Related papers (2022-09-18T01:52:16Z) - API2Com: On the Improvement of Automatically Generated Code Comments
Using API Documentations [0.0]
We propose API2Com, a model that leverages the Application Programming Interface Documentations (API Docs) as a knowledge resource for comment generation.
We apply the model on a large Java dataset of over 130,000 methods and evaluate it using both Transformer and RNN-base architectures.
arXiv Detail & Related papers (2021-03-19T07:29:40Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.