
tems.
Our contributions include a comprehensive anal-
ysis of similarity measures and their impact on rec-
ommendation quality, which elevates the state of TPL
recommender systems.
2 RELATED WORK
Third-party library (TPL) recommendation systems
have gained attention for accelerating software devel-
opment by assisting developers in selecting appropri-
ate libraries. Early research focused on recommend-
ing specific APIs or program snippets within TPLs.
Zheng et al. (Zheng et al., 2011) proposed an ap-
proach for API replacement during software develop-
ment, while Thung et al. (Thung et al., 2013b) lever-
aged textual feature requests to suggest relevant API
methods.
Beyond API recommendations, researchers have
explored app-library usage patterns to recommend en-
tire TPLs. Saied et al. (Saied and Sahraoui, 2016)
developed COUPMiner, which combined client- and
library-based mining to uncover trends in the use of
app-library. Ouni et al. (Ouni et al., 2017) introduced
LibFinder, which used semantic similarity between
source codes and TPLs for library detection. More
recently, Saied et al. (Saied et al., 2018) proposed
LibCUP, a multilayer clustering approach for catego-
rizing TPLs based on usage history.
Collaborative filtering (CF) has played a signif-
icant role in the recommendation of TPL. LibRec
(Thung et al., 2013a) was among the first to apply
CF to Java projects, integrating association rule min-
ing. Nguyen et al. (Nguyen et al., 2020) introduced
CrossRec, a CF-based approach for open-source soft-
ware projects, while He et al. (He et al., 2020) de-
veloped LibSeek, which incorporated matrix factor-
ization and adaptive weighting for diversified recom-
mendations. However, these approaches primarily
relied on low-order interactions, often overlooking
high-order dependencies. To address this, GRec (Li
et al., 2021) modeled the relationships between the
application and the library as graphs, using graph neu-
ral networks (GNNs) to capture low- and high-order
interactions, significantly enhancing the precision of
the recommendation. HGNRec (Li et al., 2024) fur-
ther refined this approach by decomposing the app-
library graph into two homogeneous graphs for effi-
cient aggregation of interaction patterns.
Despite advances in TPL recommendation, the
impact of similarity measures on TPL recommen-
dations remains underexplored. This work bridges
this gap by systematically evaluating their effects
on TPL prediction and recommendation, drawing in-
sights from similarity-based classification techniques.
3 MOTIVATING EXAMPLE
Figure 1 illustrates the role of similarity measures in
interactions between the app and the library. The left-
most graph represents an interaction graph, where
apps (A1–A6) are connected to libraries (L1–L5) based
on usage, with edges indicating app-library utiliza-
tion. The middle graph highlights Similar Apps (e.g.,
A1, A2, and A5), identified using measures like Jaccard
or Cosine, reflecting shared library usage. The right-
most graph identifies Similar Libraries (e.g., L1, L2,
and L4), representing frequently used libraries across
different apps. These similarity patterns improve the
recommendation process by identifying libraries rele-
vant to a given application.
This example demonstrates the importance of sim-
ilarity measures in capturing both low-order (direct)
and high-order (indirect) interactions within app-
library graphs:
• Low-order interactions: Libraries directly con-
nected to an app (e.g., L1 and L2 for A1) are pri-
mary recommendation candidates.
• High-order interactions: Libraries connected via
multiple hops (e.g., L4 and L5) capture broader
patterns of co-usage, providing additional recom-
mendations.
Despite their importance in the TPL recommenda-
tion, the impact of similarity measures remains under-
explored. This study investigates their role in shaping
app-library relationships and improving recommen-
dation effectiveness.
4 METHODOLOGY
The effectiveness of third-party library (TPL) recom-
mendation relies on accurately identifying libraries
most likely to be adopted by an application based on
app-library interaction patterns. This study integrates
K-Nearest Neighbor (KNN) similarity measures with
Graph Neural Networks (GNN) to analyze the im-
pact of different distance measures on recommenda-
tion performance, addressing the gap in understand-
ing their role in TPL recommendations.
At the core of this methodology is the app-library
interaction matrix, a binary representation that indi-
cates whether an application has utilized a particu-
lar library. From this matrix, App Similarity Matri-
ces and Library Similarity Matrices are constructed
ENASE 2025 - 20th International Conference on Evaluation of Novel Approaches to Software Engineering
636