Return
An API recommendation method fusing context and semantic
DOI:10.1016/j.asej.2026.104354.png)
Abstract
En 中文
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-contextAPI 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.
Keywords:
API recommendation
Programming context
Tensor factorization
Context matching
Natural language query
Journal
IF:
5.9
Papers:
3.4K
Citations:
1.2W
Organization
No organization information available
Cited Papers
No cited papers available

