Table of Contents
Fetching ...

Modeling Sampling Workflows for Code Repositories

Romain Lefeuvre, Maïwenn Le Goasteller, Jessie Galasso, Benoit Combemale, Quentin Perez, Houari Sahraoui

TL;DR

This paper tackles the challenge of designing representative samples from software repository datasets, where multistage and heterogeneous data sources complicate generalizability. It introduces a domain-specific language (DSL) implemented as a Python fluent API to explicitly describe sampling workflows, enabling automatic execution and representativeness reasoning through indicators at each stage. The metamodel covers Elements, Sets, and a rich set of Operators (Filter, Random, Systematic, Grouping, and composites) along with metadata constraints, facilitating modeling of complex sampling strategies reported in MSR literature. A case study on 65 MSR papers demonstrates the DSL’s expressiveness: 24 of 35 code-repository sampling workflows could be captured, with remaining ambiguities traced to descriptor gaps in the source studies. Overall, the approach enhances reproducibility and provides automated tools to argue about the generalizability of findings derived from sampled code repositories.

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.

Modeling Sampling Workflows for Code Repositories

TL;DR

This paper tackles the challenge of designing representative samples from software repository datasets, where multistage and heterogeneous data sources complicate generalizability. It introduces a domain-specific language (DSL) implemented as a Python fluent API to explicitly describe sampling workflows, enabling automatic execution and representativeness reasoning through indicators at each stage. The metamodel covers Elements, Sets, and a rich set of Operators (Filter, Random, Systematic, Grouping, and composites) along with metadata constraints, facilitating modeling of complex sampling strategies reported in MSR literature. A case study on 65 MSR papers demonstrates the DSL’s expressiveness: 24 of 35 code-repository sampling workflows could be captured, with remaining ambiguities traced to descriptor gaps in the source studies. Overall, the approach enhances reproducibility and provides automated tools to argue about the generalizability of findings derived from sampled code repositories.

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.
Paper Structure (24 sections, 7 figures)

This paper contains 24 sections, 7 figures.

Figures (7)

  • Figure 1: Different levels of generalization reasoning with different type for representativeness argument
  • Figure 2: Metamodel of the Sampling Workflow Domain Specific Language
  • Figure 3: Modeled workflow of our running example
  • Figure 4: Generated visualization of the workflow execution, with the distribution of the number of commits.
  • Figure 5: Case study sampling workflow
  • ...and 2 more figures