An API recommendation method fusing context and semantic

In modern software development, API recommendation systems play a crucial role in enhancing development efficiency. Query-based API recommendation better aligns with developers’ actual needs because developers often express programming tasks through natural-language queries and partial code contexts. However, traditional methods relying mainly on keyword matching or static code analysis struggle to jointly capture query semantics and programming context, which may lead to inaccurate or poorly ranked recommendations. To address this problem, we propose the Context-enhanced Query-based API Recommendation Approach (CQARA). CQARA enriches query expressions through synonym substitution, constructs a multidimensional query-context-API triplet tensor, applies non-negative tensor factorization to recover latent associations under sparse observations, and uses the BLAST algorithm for local context-sequence matching and API re-ranking. Experiments on real-world datasets show that CQARA consistently improves class-level and method-level API recommendation performance over representative baselines across SuccessRate, Recall, MAP, MRR, and NDCG.

Authors

Institutions

Publication Details

Journal
Ain Shams Engineering Journal
Published
2026-07-25
DOI
https://doi.org/10.1016/j.asej.2026.104354
Primary Topic
Recommender Systems and Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

An API recommendation method fusing context and semantic

Shi Cheng, Jinfeng He, Zelin Wang, Zihan Zhu et al.
Ain Shams Engineering Journal
Recommender Systems and Techniques
article

An API recommendation method fusing context and semantic

Shi Cheng, Jinfeng He, Zelin Wang, Zihan Zhu, Yifei Shao
article en

Abstract

In modern software development, API recommendation systems play a crucial role in enhancing development efficiency. Query-based API recommendation better aligns with developers’ actual needs because developers often express programming tasks through natural-language queries and partial code contexts. However, traditional methods relying mainly on keyword matching or static code analysis struggle to jointly capture query semantics and programming context, which may lead to inaccurate or poorly ranked recommendations. To address this problem, we propose the Context-enhanced Query-based API Recommendation Approach (CQARA). CQARA enriches query expressions through synonym substitution, constructs a multidimensional query-context-API triplet tensor, applies non-negative tensor factorization to recover latent associations under sparse observations, and uses the BLAST algorithm for local context-sequence matching and API re-ranking. Experiments on real-world datasets show that CQARA consistently improves class-level and method-level API recommendation performance over representative baselines across SuccessRate, Recall, MAP, MRR, and NDCG.

Ain Shams Engineering JournalVol. 17(10)
Nantong University (CN)
Reduced inequalities
Openalex Percentile: Top 3%
Recommender Systems and Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.