arrow
Return

The sampling threat when mining generalizable inter-library usage patterns

delete2025-10-01
delete0
PRE
AI
Y
Yunior Pacheco *
C
Coen De Roover
J
Johannes Härtel
DOI:10.1016/j.scico.2025.103393delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Tool support in software engineering often relies on relationships, regularities, patterns, or rules mined from other users' code. Examples include approaches to bug prediction, code recommendation, and code autocompletion. Mining is typically performed on samples of code rather than the entirety of available software projects. While sampling is crucial for scaling data analysis, it can affect the generalization of the mined patterns. This paper focuses on sampling software projects filtered for specific libraries and frameworks, and on mining patterns that connect different libraries. We call these inter-library patterns. We observe that limiting the sample to a specific library may hinder the generalization of inter-library patterns, posing a threat to their use or interpretation. Using a simulation and a real case study, we show this threat for different sampling methods. Our simulation shows that only when sampling for the disjunction of both libraries involved in the implication of a pattern, the implication generalizes well. Additionally, we show that real empirical data sampled using the GitHub search API does not behave as expected from our simulation. This identifies a potential threat relevant for many studies that use the GitHub search API for studying inter-library patterns.
Keywords:
Sampling
Usage patterns
Inter-library
Dataset
Data mining

Journal

S
Science of Computer Programming
IF:
1.4
Papers:
50
Citations:
1.6K

Organization

V
vrije universiteit amsterdam
Scholars:
3.1K
Papers: 1.4K
Citations: 0
V
Vrije Universiteit Brussel
Scholars:
1.4W
Papers: 1.3W
Citations: 129
Cited Papers

Cited Papers

An in-depth study of the promises and perils of mining GitHub
err2015-09-05
err175
PREAI
errKalliamvakou, Eirini; Gousios, Georgios; Blincoe, Kelly; Singer, Leif; German, Daniel M.; Damian, Daniela
errShare
errSave
Using simulation studies to evaluate statistical methods
err2019-01-16
err0
errOAAI
errTim P. Morris; Ian R. White; Michael J. Crowther
errShare
errSave
errShare
errSave
Understanding the API usage in Java
err2016-05-01
err45
PREAI
errQiu, Dong; Li, Bixin; Leung, Hareton
errShare
errSave
Improving reusability of software libraries through usage pattern mining
err2018-11-01
err41
errOAAI
errSaied, Mohamed Aymen; Ouni, Ali; Sahraoui, Houari; Kula, Raula Gaikovina; Inoue, Katsuro; Lo, David
errShare
errSave
API Usage Recommendation Via Multi-View Heterogeneous Graph Representation Learning
err2023-05-01
err10
errOAAI
errChen, Yujia; Gao, Cuiyun; Ren, Xiaoxue; Peng, Yun; Xia, Xin; Lyu, Michael R. R.
errShare
errSave
Automated API Property Inference Techniques
err2013-05-01
err144
errOAAI
errRobillard, Martin P.; Bodden, Eric; Kawrykow, David; Mezini, Mira; Ratchford, Tristan
errShare
errSave
researcher View more