Indexed by:
Abstract:
The implementation of large-scale software systems usually depends on low-level frameworks, or third-party libraries. However, the evolution of these frameworks or libraries is independent of the upper-level applications, which brings challenges in upper-level code quality assurance. For instance, changcs in framework/library code, such as adding or removing APIs and altering API semantics, may result in inconsistencies among different versions of the framework/library codc. These inconsistencies can impact the quality of higher-level apps when developers update frameworks/libraries. To address this issue, analyzing the evolution process of framework/library codc APIs is essential. This analysis helps upper-level app developers swiftly choose compatible versions or adjust their code. In this contcxt. analyzing the evolution proccss corresponds to constructing a framework API lifccycle model. Nowadays, existing works propose the API existence-changing model for defect detection, while not considering the influence of semantic changes in APIs, especially exception-related code evolution. To fill this gap, this paper adopts static analysis techniques to cxtract exception summary information in the framework API code, proposes a multi-step matching strategy to obtain the changing process of exceptions, and finally generates exception-aware API lifecycle models for the given framework/library project. Our approach: (1) adopts control-dependency slicing analysis to cxtract the conditions of the ex- ception-thrown statements; uses a parameter tracing strategy to transform exception-throwing conditions into external-variable-related preconditions; and performs inter-procedure precondition construction by a bottom-up summary-based analysis. (2) proposes the exact-matching and adap- tive-matching strategies to analyze the framework/library codc changes including additions, deletions and modifications of APIs; generates exception-aware API lifecycle models which covcr seven API changing types. With this approach, the API lifecycle extraction tool, JavaExP. is implemented. which is based on Java bytecodc analysis. Compared to the state-of-the-art tool, the F1 scorc of cxccption summary information extracted by JavaExP has increased by 67.%, with a reduction in processing time by 87%. The evaluation of real-world projects shows that, compared to the exception-unaware API lifecycle modeling. 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. These APIs involve a total of more than 7K independent cxccption changcs. The overall results show that the exception-aware lifecycle modeling can dcscribc the evolution proccss of APIs more accurately. © 2024 Science Press. All rights reserved.
Keyword:
Reprint Author's Address:
Email:
Source :
Chinese Journal of Computers
ISSN: 0254-4164
Year: 2024
Issue: 9
Volume: 47
Page: 1989-20080
Cited Count:
SCOPUS Cited Count:
ESI Highly Cited Papers on the List: 0 Unfold All
WanFang Cited Count:
Chinese Cited Count:
30 Days PV: 12
Affiliated Colleges: