API Usage Recommendation Via Multi-View Heterogeneous Graph Representation Learning
Developers often need to decide which APIs to use for the functions being implemented. With the ever-growing number of APIs and libraries, it becomes increasingly difficult for developers to find appropriate APIs, indicating the necessity of automatic API usage recommendation. Previous studies adopt...
Gespeichert in:
| Veröffentlicht in: | IEEE transactions on software engineering Jg. 49; H. 5; S. 3289 - 3304 |
|---|---|
| Hauptverfasser: | , , , , , |
| Format: | Journal Article |
| Sprache: | Englisch |
| Veröffentlicht: |
New York
IEEE
01.05.2023
IEEE Computer Society |
| Schlagworte: | |
| ISSN: | 0098-5589, 1939-3520 |
| Online-Zugang: | Volltext |
| Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
| Abstract | Developers often need to decide which APIs to use for the functions being implemented. With the ever-growing number of APIs and libraries, it becomes increasingly difficult for developers to find appropriate APIs, indicating the necessity of automatic API usage recommendation. Previous studies adopt statistical models or collaborative filtering methods to mine the implicit API usage patterns for recommendation. However, they rely on the occurrence frequencies of APIs for mining usage patterns, thus prone to fail for the low-frequency APIs. Besides, prior studies generally regard the API call interaction graph as homogeneous graph, ignoring the rich information (e.g., edge types) in the structure graph. In this work, we propose a novel method named MEGA for improving the recommendation accuracy especially for the low-frequency APIs. Specifically, besides call interaction graph , MEGA considers another two new heterogeneous graphs: global API co-occurrence graph enriched with the API frequency information and hierarchical structure graph enriched with the project component information. With the three multi-view heterogeneous graphs, MEGA can capture the API usage patterns more accurately. Experiments on three Java benchmark datasets demonstrate that MEGA significantly outperforms the baseline models by at least 19% with respect to the Success Rate@1 metric. Especially, for the low-frequency APIs, MEGA also increases the baselines by at least 55% regarding the Success Rate@1 score. |
|---|---|
| AbstractList | Developers often need to decide which APIs to use for the functions being implemented. With the ever-growing number of APIs and libraries, it becomes increasingly difficult for developers to find appropriate APIs, indicating the necessity of automatic API usage recommendation. Previous studies adopt statistical models or collaborative filtering methods to mine the implicit API usage patterns for recommendation. However, they rely on the occurrence frequencies of APIs for mining usage patterns, thus prone to fail for the low-frequency APIs. Besides, prior studies generally regard the API call interaction graph as homogeneous graph, ignoring the rich information (e.g., edge types) in the structure graph. In this work, we propose a novel method named MEGA for improving the recommendation accuracy especially for the low-frequency APIs. Specifically, besides call interaction graph , MEGA considers another two new heterogeneous graphs: global API co-occurrence graph enriched with the API frequency information and hierarchical structure graph enriched with the project component information. With the three multi-view heterogeneous graphs, MEGA can capture the API usage patterns more accurately. Experiments on three Java benchmark datasets demonstrate that MEGA significantly outperforms the baseline models by at least 19% with respect to the Success Rate@1 metric. Especially, for the low-frequency APIs, MEGA also increases the baselines by at least 55% regarding the Success Rate@1 score. |
| Author | Chen, Yujia Gao, Cuiyun Peng, Yun Lyu, Michael R. Xia, Xin Ren, Xiaoxue |
| Author_xml | – sequence: 1 givenname: Yujia orcidid: 0000-0003-2901-0643 surname: Chen fullname: Chen, Yujia email: yujiachen@stu.hit.edu.cn organization: Harbin Institute of Technology, Shenzhen, Guangdong Province, China – sequence: 2 givenname: Cuiyun orcidid: 0000-0001-8513-6836 surname: Gao fullname: Gao, Cuiyun email: gcyydxf@gmail.com organization: Harbin Institute of Technology, Shenzhen, Guangdong Province, China – sequence: 3 givenname: Xiaoxue surname: Ren fullname: Ren, Xiaoxue email: xiaoxueren@cse.cuhk.edu.hk organization: The Chinese University of Hong Kong, Hong Kong – sequence: 4 givenname: Yun orcidid: 0000-0003-1936-5598 surname: Peng fullname: Peng, Yun email: ypeng@cse.cuhk.edu.hk organization: The Chinese University of Hong Kong, Hong Kong – sequence: 5 givenname: Xin orcidid: 0000-0002-6302-3256 surname: Xia fullname: Xia, Xin email: xin.xia@acm.org organization: Software Engineering Application Technology Lab, Huawei, China – sequence: 6 givenname: Michael R. surname: Lyu fullname: Lyu, Michael R. email: lyu@cse.cuhk.edu.hk organization: The Chinese University of Hong Kong, Hong Kong |
| BookMark | eNp9kD1PwzAQhi1UJNrCzsAQiTnFsWPHHquqtJWKQPRjtZzkXFy1TrETIf49qdIBMTDd8j7v3T0D1HOVA4TuEzxKEiyf1qvpiGBCR5QwQpi8Qv1EUhlTRnAP9TGWImZMyBs0CGGPMWZZxvpoNX5bRJugdxC9Q1Edj-BKXdvKRVuro5fmUNt4a-ErmkMNvtqBg6oJ0czr00dLnDwEcHVHLEF7Z93uFl0bfQhwd5lDtHmerifzePk6W0zGy7ggktRxBkAokbwwJhV5qQVPS25KUVAAMAXhGeQkEYZnmkpTEqKZ4bk2SU6NoRnQIXrsek---mwg1GpfNd61KxURScpSglPZpniXKnwVggejCtsdXHttDyrB6ixQtQLVWaC6CGxB_Ac8eXvU_vs_5KFDbPvCrzhmgjFOfwAuEn7O |
| CODEN | IESEDJ |
| CitedBy_id | crossref_primary_10_1007_s10115_025_02441_2 crossref_primary_10_1109_TR_2024_3361922 crossref_primary_10_1142_S0218194025500275 crossref_primary_10_1002_smr_2658 crossref_primary_10_1016_j_jss_2024_112296 crossref_primary_10_3390_computers14040119 crossref_primary_10_1002_smr_70015 crossref_primary_10_1016_j_engappai_2024_109395 crossref_primary_10_1109_ACCESS_2024_3505943 crossref_primary_10_1145_3712188 crossref_primary_10_1016_j_ipm_2023_103618 crossref_primary_10_1145_3664651 crossref_primary_10_1007_s10515_024_00425_0 crossref_primary_10_1145_3680469 |
| Cites_doi | 10.1145/371920.372071 10.1109/WCRE.2011.24 10.1145/2950290.2950319 10.1145/1595696.1595767 10.1109/SANER50967.2021.00013 10.1145/1287624.1287630 10.1109/TNN.2008.2005605 10.1145/3238147.3238216 10.1145/2950290.2950333 10.1109/ASE.2013.6693088 10.1145/3397271.3401142 10.1109/tse.2022.3197063 10.1145/3238147.3238191 10.1145/3269206.3271739 10.1109/ICSE.2019.00109 10.1109/MS.2009.193 10.1109/ICSE.2015.336 10.1109/TSE.2019.2910516 10.1145/2464526.2464552 10.1109/MSR.2013.6624045 10.1007/978-1-4612-4380-9_16 10.1145/3397271.3401141 10.1145/3468264.3473111 10.1007/s11390-019-1956-2 10.1109/ICSE.2012.6227236 10.1007/978-3-642-03013-0_15 10.1109/ASE.2019.00061 10.1145/2950290.2950334 10.1109/ICSM.2012.6405249 10.1198/tech.2006.s437 10.1109/ICSE.2012.6227140 |
| ContentType | Journal Article |
| Copyright | Copyright IEEE Computer Society 2023 |
| Copyright_xml | – notice: Copyright IEEE Computer Society 2023 |
| DBID | 97E RIA RIE AAYXX CITATION JQ2 K9. |
| DOI | 10.1109/TSE.2023.3252259 |
| DatabaseName | IEEE Xplore (IEEE) IEEE All-Society Periodicals Package (ASPP) 1998–Present IEEE Electronic Library (IEL) CrossRef ProQuest Computer Science Collection ProQuest Health & Medical Complete (Alumni) |
| DatabaseTitle | CrossRef ProQuest Health & Medical Complete (Alumni) ProQuest Computer Science Collection |
| DatabaseTitleList | ProQuest Health & Medical Complete (Alumni) |
| Database_xml | – sequence: 1 dbid: RIE name: IEEE Electronic Library (IEL) url: https://ieeexplore.ieee.org/ sourceTypes: Publisher |
| DeliveryMethod | fulltext_linktorsrc |
| Discipline | Computer Science |
| EISSN | 1939-3520 |
| EndPage | 3304 |
| ExternalDocumentID | 10_1109_TSE_2023_3252259 10058556 |
| Genre | orig-research |
| GrantInformation_xml | – fundername: Natural Science Foundation of Guangdong Province grantid: 2023A1515011959 funderid: 10.13039/501100003453 – fundername: Shenzhen Basic Research grantid: JCYJ20220531095214031 – fundername: National Key R&D Program of China grantid: 2022YFB3103900 – fundername: Guangdong Provincial Key Laboratory of Novel Security Intelligence Technologies grantid: 2022B1212010005 – fundername: National Natural Science Foundation of China grantid: 62002084 funderid: 10.13039/501100001809 – fundername: Major Key Project of PCL grantid: PCL2022A03; PCL2021A02; PCL2021A09 |
| GroupedDBID | --Z -DZ -~X .DC 0R~ 29I 4.4 5GY 6IK 85S 8R4 8R5 97E AAJGR AARMG AASAJ AAWTH ABAZT ABPPZ ABQJQ ABVLG ACGFO ACGOD ACIWK ACNCT AENEX AGQYO AHBIQ AKJIK AKQYR ALMA_UNASSIGNED_HOLDINGS ASUFR ATWAV BEFXN BFFAM BGNUA BKEBE BKOMP BPEOZ CS3 DU5 EBS EDO EJD HZ~ I-F IEDLZ IFIPE IPLJI JAVBF LAI M43 MS~ O9- OCL P2P Q2X RIA RIE RNS RXW S10 TAE TN5 TWZ UHB UPT WH7 YZZ AAYXX CITATION JQ2 K9. |
| ID | FETCH-LOGICAL-c292t-7ee23296cff48bda864d6fd8c3eeefc267eb218f67a39fd22a5f6baf1b3ff37e3 |
| IEDL.DBID | RIE |
| ISICitedReferencesCount | 22 |
| ISICitedReferencesURI | http://www.webofscience.com/api/gateway?GWVersion=2&SrcApp=Summon&SrcAuth=ProQuest&DestLinkType=CitingArticles&DestApp=WOS_CPL&KeyUT=000991628700014&url=https%3A%2F%2Fcvtisr.summon.serialssolutions.com%2F%23%21%2Fsearch%3Fho%3Df%26include.ft.matches%3Dt%26l%3Dnull%26q%3D |
| ISSN | 0098-5589 |
| IngestDate | Sun Nov 30 04:20:13 EST 2025 Sat Nov 29 03:10:27 EST 2025 Tue Nov 18 20:53:11 EST 2025 Wed Aug 27 02:22:07 EDT 2025 |
| IsPeerReviewed | true |
| IsScholarly | true |
| Issue | 5 |
| Language | English |
| License | https://ieeexplore.ieee.org/Xplorehelp/downloads/license-information/IEEE.html https://doi.org/10.15223/policy-029 https://doi.org/10.15223/policy-037 |
| LinkModel | DirectLink |
| MergedId | FETCHMERGED-LOGICAL-c292t-7ee23296cff48bda864d6fd8c3eeefc267eb218f67a39fd22a5f6baf1b3ff37e3 |
| Notes | ObjectType-Article-1 SourceType-Scholarly Journals-1 ObjectType-Feature-2 content type line 14 |
| ORCID | 0000-0003-1936-5598 0000-0001-8513-6836 0000-0002-6302-3256 0000-0003-2901-0643 |
| PQID | 2814542049 |
| PQPubID | 21418 |
| PageCount | 16 |
| ParticipantIDs | ieee_primary_10058556 crossref_citationtrail_10_1109_TSE_2023_3252259 proquest_journals_2814542049 crossref_primary_10_1109_TSE_2023_3252259 |
| PublicationCentury | 2000 |
| PublicationDate | 2023-05-01 |
| PublicationDateYYYYMMDD | 2023-05-01 |
| PublicationDate_xml | – month: 05 year: 2023 text: 2023-05-01 day: 01 |
| PublicationDecade | 2020 |
| PublicationPlace | New York |
| PublicationPlace_xml | – name: New York |
| PublicationTitle | IEEE transactions on software engineering |
| PublicationTitleAbbrev | TSE |
| PublicationYear | 2023 |
| Publisher | IEEE IEEE Computer Society |
| Publisher_xml | – name: IEEE – name: IEEE Computer Society |
| References | ref13 ref35 ref12 Glorot (ref27) 2010; 9 ref34 ref15 (ref4) 2022 ref14 ref36 ref31 ref30 ref11 ref33 ref10 ref32 ref2 Cosmo (ref23) 2017 ref1 ref17 Agarap (ref22) 2018 ref16 ref19 ref18 Kingma (ref28) 2015 ref24 ref26 ref25 ref20 Amann (ref37) 2019 ref21 ref29 ref8 ref7 ref9 ref3 ref6 ref5 |
| References_xml | – ident: ref13 doi: 10.1145/371920.372071 – ident: ref1 doi: 10.1109/WCRE.2011.24 – ident: ref11 doi: 10.1145/2950290.2950319 – year: 2022 ident: ref4 article-title: JDK 18 documentation – ident: ref35 doi: 10.1145/1595696.1595767 – start-page: 265 volume-title: Proc. IEEE 16th Int. Conf. Mining Softw. Repositories year: 2019 ident: ref37 article-title: Investigating next steps in static API-misuse detection – ident: ref14 doi: 10.1109/SANER50967.2021.00013 – ident: ref7 doi: 10.1145/1287624.1287630 – ident: ref15 doi: 10.1109/TNN.2008.2005605 – volume-title: Proc. 3rd Int. Conf. Learn. Representations year: 2015 ident: ref28 article-title: Adam: A method for stochastic optimization – ident: ref34 doi: 10.1145/3238147.3238216 – ident: ref26 doi: 10.1145/2950290.2950333 – ident: ref32 doi: 10.1109/ASE.2013.6693088 – ident: ref29 doi: 10.1145/3397271.3401142 – ident: ref16 doi: 10.1109/tse.2022.3197063 – ident: ref33 doi: 10.1145/3238147.3238191 – ident: ref20 doi: 10.1145/3269206.3271739 – volume: 9 start-page: 249 volume-title: Proc. 13th Int. Conf. Artif. Intell. Statist. year: 2010 ident: ref27 article-title: Understanding the difficulty of training deep feedforward neural networks – ident: ref12 doi: 10.1109/ICSE.2019.00109 – ident: ref5 doi: 10.1109/MS.2009.193 – ident: ref17 doi: 10.1109/ICSE.2015.336 – volume-title: Proc. 14th Int. Conf. Digit. Preservation year: 2017 ident: ref23 article-title: Software heritage: Why and how to preserve software source code – ident: ref2 doi: 10.1109/TSE.2019.2910516 – ident: ref3 doi: 10.1145/2464526.2464552 – ident: ref10 doi: 10.1109/MSR.2013.6624045 – ident: ref31 doi: 10.1007/978-1-4612-4380-9_16 – ident: ref21 doi: 10.1145/3397271.3401141 – ident: ref25 doi: 10.1145/3468264.3473111 – ident: ref19 doi: 10.1007/s11390-019-1956-2 – ident: ref36 doi: 10.1109/ICSE.2012.6227236 – ident: ref9 doi: 10.1007/978-3-642-03013-0_15 – year: 2018 ident: ref22 article-title: Deep learning using rectified linear units (RELU) – ident: ref18 doi: 10.1109/ASE.2019.00061 – ident: ref24 doi: 10.1145/2950290.2950334 – ident: ref6 doi: 10.1109/ICSM.2012.6405249 – ident: ref30 doi: 10.1198/tech.2006.s437 – ident: ref8 doi: 10.1109/ICSE.2012.6227140 |
| SSID | ssj0005775 ssib053395008 |
| Score | 2.5477996 |
| Snippet | Developers often need to decide which APIs to use for the functions being implemented. With the ever-growing number of APIs and libraries, it becomes... |
| SourceID | proquest crossref ieee |
| SourceType | Aggregation Database Enrichment Source Index Database Publisher |
| StartPage | 3289 |
| SubjectTerms | API recommendation Application programming interface Benchmark testing Codes graph representation learning Graph representations Graphical representations Graphs Java multi-view heterogeneous graphs Programming Recommender systems Representation learning Software Source coding Statistical models Use statistics |
| Title | API Usage Recommendation Via Multi-View Heterogeneous Graph Representation Learning |
| URI | https://ieeexplore.ieee.org/document/10058556 https://www.proquest.com/docview/2814542049 |
| Volume | 49 |
| WOSCitedRecordID | wos000991628700014&url=https%3A%2F%2Fcvtisr.summon.serialssolutions.com%2F%23%21%2Fsearch%3Fho%3Df%26include.ft.matches%3Dt%26l%3Dnull%26q%3D |
| hasFullText | 1 |
| inHoldings | 1 |
| isFullTextHit | |
| isPrint | |
| journalDatabaseRights | – providerCode: PRVIEE databaseName: IEEE Electronic Library (IEL) customDbUrl: eissn: 1939-3520 dateEnd: 99991231 omitProxy: false ssIdentifier: ssj0005775 issn: 0098-5589 databaseCode: RIE dateStart: 19750101 isFulltext: true titleUrlDefault: https://ieeexplore.ieee.org/ providerName: IEEE |
| link | http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwlV1LT8MwDI7YxIELzyHGSzlw4dDR5d3jhDbGBU0aTLtVTeOgSbBObIO_T5K2DAmBxK2H2GrtOLYb2x9CV0yQmHPQkUwAIuehIVLWmijWjIHzv1pZHcAm5MODmk6TUdWsHnphACAUn0HHP4a7fFPka_-rzFl47KJbLhqoIaUom7U29RxS8npAJucqqe8k4-TmcdzveJjwDiUu3PBjSb_5oACq8uMkDu5lsPfPF9tHu1UciXul4g_QFswP0V6N0YArkz1C497oHj_56jHsM81Xx6hEUcKTWYZD-200mcEHHvq6mMJtJyjWS3zn51g7isWmO2mOq1mszy30NOg_3g6jCkghyklCVpEEcIFTInJrmdImU4IZYY3KqfsSmxMhXX7dVVbIjCbWEJJxK3Rmu5paSyXQY9ScF3M4QVhR67gQp1kBLKY0c-EW5MYYzWycKd5GN7Vo07yaMu7BLl7SkG3ESeqUkXplpJUy2uj6i2JRTtj4Y23LC__bulLubXReqy-tbHCZEtVlnBGXAp3-QnaGdjz3sn7xHDVXb2u4QNv5-2q2fLsM2-sTkyrOxg |
| linkProvider | IEEE |
| linkToHtml | http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwlV1LT8MwDLZ4SXBhPMV45sCFQ0eXV9MjQoMhYEJiIG5V2zhoEmyIbfD3SdIUkBBI3HpI0tZfXNuN7Q_gkEsaC4FFlKSIkbXQGCljdBQXnKO1v4UyhSebSHo99fCQ3oRidV8Lg4g--Qxb7tKf5etROXW_yqyGx9a7FXIW5h11VijX-sroSBJRt8gUQqX1qWScHvdvOy1HFN5i1DocrjHpNyvkaVV-fIu9gTlr_PPRVmA5eJLkpIJ-FWZwuAaNmqWBBKVdh9uTmwty5_LHiIs1n-1CFY8SuR_kxBfgRvcDfCddlxkzshsKR9MxOXedrO2Ml6_6pCEJ3VgfN-DurNM_7UaBSiEqaUonUYJoXadUlsZwVehcSa6l0apk9k1MSWViI-y2MjLJWWo0pbkwsshNu2DGsATZJswNR0PcAqKYsatQi61EHjOWW4cLS611wU2cK9GE41q0WRn6jDu6i6fMxxtxmlkwMgdGFsBowtHnjJeqx8YfYzec8L-Nq-TehN0avixo4Tijqs0FpzYI2v5l2gEsdvvXV9nVRe9yB5bcnapsxl2Ym7xOcQ8WyrfJYPy677faB4Gd0g8 |
| 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=API+Usage+Recommendation+Via+Multi-View+Heterogeneous+Graph+Representation+Learning&rft.jtitle=IEEE+transactions+on+software+engineering&rft.au=Chen%2C+Yujia&rft.au=Gao%2C+Cuiyun&rft.au=Ren%2C+Xiaoxue&rft.au=Peng%2C+Yun&rft.date=2023-05-01&rft.pub=IEEE&rft.issn=0098-5589&rft.volume=49&rft.issue=5&rft.spage=3289&rft.epage=3304&rft_id=info:doi/10.1109%2FTSE.2023.3252259&rft.externalDocID=10058556 |
| thumbnail_l | http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/lc.gif&issn=0098-5589&client=summon |
| thumbnail_m | http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/mc.gif&issn=0098-5589&client=summon |
| thumbnail_s | http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/sc.gif&issn=0098-5589&client=summon |