Skip to main content
QUICK REVIEW

[论文解读] Modeling Sampling Workflows for Code Repositories

Romain Lefeuvre, Maïwenn Le Goasteller|arXiv (Cornell University)|Jan 27, 2026
Software Engineering ResearchComputer Science被引用 0
一句话总结

本文提出一个领域特定语言(DSL)和基于 Python 的流式 API,明确描述并推理代码托管库数据的多阶段采样工作流,从而实现代表性与可推广性评估,并通过 MSR 案例研究得到验证。

ABSTRACT

Empirical software engineering research often depends on datasets of code repository artifacts, where sampling strategies are employed to enable large-scale analyses. The design and evaluation of these strategies are critical, as they directly influence the generalizability of research findings. However, sampling remains an underestimated aspect in software engineering research: we identify two main challenges related to (1) the design and representativeness of sampling approaches, and (2) the ability to reason about the implications of sampling decisions on generalizability. To address these challenges, we propose a Domain-Specific Language (DSL) to explicitly describe complex sampling strategies through composable sampling operators. This formalism supports both the specification and the reasoning about the generalizability of results based on the applied sampling strategies. We implement the DSL as a Python-based fluent API, and demonstrate how it facilitates representativeness reasoning using statistical indicators extracted from sampling workflows. We validate our approach through a case study of MSR papers involving code repository sampling. Our results show that the DSL can model the sampling strategies reported in recent literature.

研究动机与目标

  • Address the challenge of designing and evaluating multistage sampling strategies for software repository datasets.
  • Provide explicit workflow-based representations to improve clarity, reproducibility, and reasoning about generalizability.
  • Enable automated computation of indicators to assess representativeness at each workflow stage.

提出的方法

  • Introduce a metamodel for sampling workflows with Elements, Operators, and Metadata.
  • Implement an internal DSL as a Python fluent API to model and execute sampling workflows.
  • Provide default loaders (JSON, CSV) and a Software Heritage-based loader to run workflows on real data.
  • Demonstrate the approach with a running example of active repositories sampled by commit activity and contributor count.
  • Show how to compute representativeness indicators and sample size guidance (e.g., Cochran’s formula) along the workflow.

实验结果

研究问题

  • RQ1RQ1: What types of sampling strategies are used in the MSR literature?
  • RQ2RQ2: Do MSR studies using sampling discuss generalizability or representativeness?
  • RQ3RQ3: Can the DSL concepts capture the complexity of MSR sampling strategies?
  • RQ4RQ4: What causes incomplete modeling of sampling strategies?

主要发现

  • The DSL can model a variety of multistage sampling strategies reported in MSR literature.
  • In their case study, 53.8% of MSR papers analyzed perform sampling on code repositories.
  • The workflow execution supports representativeness reasoning through distributions and statistical tests at intermediate stages.
  • Cochran’s formula can be applied within random and stratified random operators to justify sample size inside workflows.
  • Explicit workflow representations help identify ambiguities in sampling strategy descriptions and potentially improve reproducibility.
  • The approach supports automatic computation of indicators (e.g., distributions, sample size) at each workflow stage.

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。