Recommending Analogical APIs via Knowledge Graph Embedding
Library migration, which re-implements the same software behavior by using a different library instead of using the current one, has been widely observed in software evolution. One essential part of library migration is to find an analogical API that could provide the same functionality as current o...
Saved in:
Main Authors | , , , , , , |
---|---|
Format | Journal Article |
Language | English |
Published |
22.08.2023
|
Subjects | |
Online Access | Get full text |
Cover
Loading…
Abstract | Library migration, which re-implements the same software behavior by using a
different library instead of using the current one, has been widely observed in
software evolution. One essential part of library migration is to find an
analogical API that could provide the same functionality as current ones.
However, given the large number of libraries/APIs, manually finding an
analogical API could be very time-consuming and error-prone. Researchers have
developed multiple automated analogical API recommendation techniques.
Documentation-based methods have particularly attracted significant interest.
Despite their potential, these methods have limitations, such as a lack of
comprehensive semantic understanding in documentation and scalability
challenges. In this work, we propose KGE4AR, a novel documentation-based
approach that leverages knowledge graph (KG) embedding to recommend analogical
APIs during library migration. Specifically, KGE4AR proposes a novel unified
API KG to comprehensively and structurally represent three types of knowledge
in documentation, which can better capture the high-level semantics. Moreover,
KGE4AR then proposes to embed the unified API KG into vectors, enabling more
effective and scalable similarity calculation. We build KGE4AR' s unified API
KG for 35,773 Java libraries and assess it in two API recommendation scenarios:
with and without target libraries. Our results show that KGE4AR substantially
outperforms state-of-the-art documentation-based techniques in both evaluation
scenarios in terms of all metrics (e.g., 47.1%-143.0% and 11.7%-80.6% MRR
improvements in each scenario). Additionally, we explore KGE4AR' s scalability,
confirming its effective scaling with the growing number of libraries. |
---|---|
AbstractList | Library migration, which re-implements the same software behavior by using a
different library instead of using the current one, has been widely observed in
software evolution. One essential part of library migration is to find an
analogical API that could provide the same functionality as current ones.
However, given the large number of libraries/APIs, manually finding an
analogical API could be very time-consuming and error-prone. Researchers have
developed multiple automated analogical API recommendation techniques.
Documentation-based methods have particularly attracted significant interest.
Despite their potential, these methods have limitations, such as a lack of
comprehensive semantic understanding in documentation and scalability
challenges. In this work, we propose KGE4AR, a novel documentation-based
approach that leverages knowledge graph (KG) embedding to recommend analogical
APIs during library migration. Specifically, KGE4AR proposes a novel unified
API KG to comprehensively and structurally represent three types of knowledge
in documentation, which can better capture the high-level semantics. Moreover,
KGE4AR then proposes to embed the unified API KG into vectors, enabling more
effective and scalable similarity calculation. We build KGE4AR' s unified API
KG for 35,773 Java libraries and assess it in two API recommendation scenarios:
with and without target libraries. Our results show that KGE4AR substantially
outperforms state-of-the-art documentation-based techniques in both evaluation
scenarios in terms of all metrics (e.g., 47.1%-143.0% and 11.7%-80.6% MRR
improvements in each scenario). Additionally, we explore KGE4AR' s scalability,
confirming its effective scaling with the growing number of libraries. |
Author | Du, Xueying Yang, Tianyong Yang, Yanjun Lou, Yiling Liu, Mingwei Zhou, Zhong Peng, Xin |
Author_xml | – sequence: 1 givenname: Mingwei surname: Liu fullname: Liu, Mingwei – sequence: 2 givenname: Yanjun surname: Yang fullname: Yang, Yanjun – sequence: 3 givenname: Yiling surname: Lou fullname: Lou, Yiling – sequence: 4 givenname: Xin surname: Peng fullname: Peng, Xin – sequence: 5 givenname: Zhong surname: Zhou fullname: Zhou, Zhong – sequence: 6 givenname: Xueying surname: Du fullname: Du, Xueying – sequence: 7 givenname: Tianyong surname: Yang fullname: Yang, Tianyong |
BackLink | https://doi.org/10.48550/arXiv.2308.11422$$DView paper in arXiv |
BookMark | eNotj71OwzAURj3AAIUHYMIvkHD9Eztmi6pSKiqBUPfoxr4OlhKnSqUCb49aOp3l09F3btlVnjIx9iCg1HVVwRPOP-lYSgV1KYSW8oY9f5KfxpFySLnnTcZh6pPHgTcfmwM_JuRvefoeKPTE1zPuv_hq7Cic1nfsOuJwoPsLF2z3stotX4vt-3qzbLYFGisL2ymjPKGvo3IVSatBey-lE0qH6CAggXAUK2NAGeuiBopd0A58bQ2hWrDHf-35fLuf04jzb3uKaM8R6g9WhUKd |
ContentType | Journal Article |
Copyright | http://creativecommons.org/licenses/by/4.0 |
Copyright_xml | – notice: http://creativecommons.org/licenses/by/4.0 |
DBID | AKY GOX |
DOI | 10.48550/arxiv.2308.11422 |
DatabaseName | arXiv Computer Science arXiv.org |
DatabaseTitleList | |
Database_xml | – sequence: 1 dbid: GOX name: arXiv.org url: http://arxiv.org/find sourceTypes: Open Access Repository |
DeliveryMethod | fulltext_linktorsrc |
ExternalDocumentID | 2308_11422 |
GroupedDBID | AKY GOX |
ID | FETCH-LOGICAL-a672-7b363ceac8f395e27404cc229134df90dae019ef56603679f40efbd490c876ea3 |
IEDL.DBID | GOX |
IngestDate | Mon Jan 08 05:44:23 EST 2024 |
IsDoiOpenAccess | true |
IsOpenAccess | true |
IsPeerReviewed | false |
IsScholarly | false |
Language | English |
LinkModel | DirectLink |
MergedId | FETCHMERGED-LOGICAL-a672-7b363ceac8f395e27404cc229134df90dae019ef56603679f40efbd490c876ea3 |
OpenAccessLink | https://arxiv.org/abs/2308.11422 |
ParticipantIDs | arxiv_primary_2308_11422 |
PublicationCentury | 2000 |
PublicationDate | 2023-08-22 |
PublicationDateYYYYMMDD | 2023-08-22 |
PublicationDate_xml | – month: 08 year: 2023 text: 2023-08-22 day: 22 |
PublicationDecade | 2020 |
PublicationYear | 2023 |
Score | 1.8970118 |
SecondaryResourceType | preprint |
Snippet | Library migration, which re-implements the same software behavior by using a
different library instead of using the current one, has been widely observed in... |
SourceID | arxiv |
SourceType | Open Access Repository |
SubjectTerms | Computer Science - Software Engineering |
Title | Recommending Analogical APIs via Knowledge Graph Embedding |
URI | https://arxiv.org/abs/2308.11422 |
hasFullText | 1 |
inHoldings | 1 |
isFullTextHit | |
isPrint | |
link | http://utb.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwdV07T8MwED61nVgQCFB5ygNrIHFcN2arqj4A8RiKlC3y4yx1CEJtqfj5nJ1UZWGNL0Mu8n3fZ_s-A9waAl1ViCzRpDUSYsQuUUgTzymCM1EQRuShUfjlVc4_xFM5KDvAdr0wevWz3Db-wGZ9T_y4uIvdnl3och6ObM3eymZzMlpxtfH7OOKY8dEfkJgewWHL7tio-R3H0MHPE3gIEq-uMfaPsOAC0pQbNnp_XLPtUrPn3cIWmwX_aDapDboQfQqL6WQxniftlQWJlkOiqiaXuaVaVvhcDZAUXyqs5TxsbzuvUqeRKBV64lCEHEPlRYreOKFSS1UJdX4GPVL92AdGzMtkyB3JDU_vZkYK45VAUUhprFfn0I8fWn01rhRVyEEVc3Dx_9AlHIT70sOiKOdX0NusvvGaUHVjbmJqfwHpSnWZ |
link.rule.ids | 228,230,786,891 |
linkProvider | Cornell University |
openUrl | ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.atitle=Recommending+Analogical+APIs+via+Knowledge+Graph+Embedding&rft.au=Liu%2C+Mingwei&rft.au=Yang%2C+Yanjun&rft.au=Lou%2C+Yiling&rft.au=Peng%2C+Xin&rft.date=2023-08-22&rft_id=info:doi/10.48550%2Farxiv.2308.11422&rft.externalDocID=2308_11422 |