Abstract
The rapid expansion of Web APIs presents developers with significant challenges in selecting optimal API compositions. To address this issue, keyword-based API composition recommendation techniques have been proposed. However, these methods often suffer from popularity bias due to the influence of historical datasets and recommendation models. This bias leads to the disproportionate recommendation of popular APIs over less popular ones, potentially causing the Matthew effect and impeding the balanced development of the API ecosystem. Although several studies have identified and attempted to mitigate popularity bias, they have largely relied on static analysis without accounting for the dynamic nature of API recommendations. In this paper, we introduce a dynamic simulation framework for API composition recommendations, designed to explore the evolution of popularity bias within recommendation results, and propose a debiasing method for dynamic recommendations by combining the enhanced API correlation graph with the Determinantal Point Process (DPP) method. Finally, extensive experiments on real datasets show that the algorithm effectively alleviates the popularity bias problem while guaranteeing high recommendation accuracy.