arXiv:2610.22544cs.SEOct 2026

Manuscript Offprint

arXiv:2610.22544

SIEVE: A Parameterized GitHub Corpus Builder for Software Engineering Research

Musfiqur Rahman, Mahi Begoug, Emad Shihab

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Musfiqur Rahman

musfiqur.rahman@mail.concordia.ca

Mahi Begoug

mahi.begoug@concordia.ca

Emad Shihab

emad.shihab@concordia.ca

Department of Computer Science and Software Engineering

Concordia University

Montreal, Canada

Abstract—Software engineering research increasingly relies on large, richly annotated corpora of real-world code. Still, researchers typically assemble these with ad-hoc scripts or static, pre-built datasets that offer no control over corpus composition. This leaves a gap for a reusable tool that goes below the repository level and builds annotated, function- and class-level code corpora under researcher-specified criteria. We present SIEVE (Software Ingestion & Extraction for Verifiable Evaluation), an open-source, parameterized GitHub corpus builder that, unlike repository-level mining tools, works at code granularity: it locates individual functions, methods, and classes in repositories and extracts them as records, giving direct control over corpus construction based on several criteria, including widely used programming languages (Python, Java, JavaScript, C++), repository quality, and creation date. To support software engineering research and LLM evaluation on real-world code, SIEVE extracts CodeSearchNet- and OpenClassGen-compatible records, each annotated with 22 structural metrics and AST-derived features, and optionally with a CodeBERT-based P(AI-generated) score (F1=0.9478, AUROC=0.9902), alongside the third-party dependencies declared in each repository's package manifest. These annotations enable researchers to conduct structural analyses, investigate code dependencies, assess AI-generated code, and construct customized benchmarks for evaluating LLMs, including under temporal constraints. A manual validation of 400 records in four languages and two granularities shows 100% accuracy in code metrics and import detection, 99.0% in source completeness, and 99.5% in metadata accuracy. SIEVE is publicly available with a live demo at https://mrahman2025-sieve.hf.space.

Index Terms—code corpus, large language models, software engineering, GitHub mining

I. INTRODUCTION

Mining Software Repositories (MSR) research increasingly depends on large, richly annotated corpora of real-world source code drawn from open-source projects on GitHub [1], [2]. Such corpora have long supported a wide range of research questions, such as mining GitHub data to build statistical language models of source code [3], studying the naturalness of software [4], [5], and studying how programming language choice relates to code quality [6]. More recently, they have enabled the evaluation of large language models (LLMs) on code generation and detection [7]–[10], the comparison of LLM-generated and human-written code [11], [12], and analyses of dependency and library usage across ecosystems [13]–[15]. Each use case places different demands on the corpus: some require multiple programming languages [6], [14], others a specific granularity of source code, such as functions [7], [16], classes [9], [17], or files [18], and some precise control over when a repository was created relative to a reference date [19], [20].

In practice, collecting such corpora from GitHub is laborious: API rate limits and result caps make large-scale sampling slow and incomplete [21], [22], and few public tools exist for extracting information from repositories [23], so researchers often resort to study-specific scripts When they reuse existing infrastructure instead, it typically covers only part of the need (Section II). Specialized GitHub-mining tools, including SEART GHS [21] and GHTorrent [24], support the sampling and filtering of repositories; however, they do not perform source-code extraction. Furthermore, existing static code datasets, such as CodeSearchNet [16], OpenClassGen [25], and The Stack [18], provide pre-collected code corpora but do not allow researchers to explicitly control repository creation dates during dataset construction. Hence, the lack of a unified framework increases research costs and the risk of errors, as researchers repeatedly re-implement GitHub repository discovery, repository quality filtering, multilingual parsing, and metric computation from scratch for each study, and reproducing repository-based studies can be difficult [26]. In addition, this constraint is particularly restrictive for tasks that demand fine-grained temporal control. For instance, assessing LLMs on code from repositories created after their training cutoff necessitates identifying and curating such repositories. Riddell et al. [19] report that up to 20.8% of MBPP and 18.9% of HumanEval solutions appear in open pre-training corpora such as The Stack, and that models perform significantly better on problems whose solutions appear in the training data. These findings highlight the need for reproducible corpus construction with temporal filtering, which can help reduce contamination risks in LLM evaluation.

In this paper, we present SIEVE (Software Ingestion & Extraction for Verifiable Evaluation), an open-source, parameterized GitHub corpus builder. Unlike repository-level mining tools, it operates at code granularity: it locates functions, methods, and classes in the source files of the selected repositories and returns each as a record with its file path, line span, and commit SHA, from which a commit-pinned GitHub permalink can be built. SIEVE gives researchers direct control over corpus composition along the dimensions that matter most for SE research, including programming language, code granularity, repository quality, and repository creation date.

From an architectural perspective, our tool integrates several key components into a unified pipeline, including repository discovery, multilingual code extraction, deduplication, structural metric computation, AI-generated-code scoring, dependency extraction, and export to CodeSearchNet- and OpenClassGen-compatible formats [16], [25].

We evaluate SIEVE along three dimensions: (i) extraction correctness, through a manual audit of 400 extracted records spanning four programming languages and two code granularities, assessing source completeness, metadata accuracy, import detection, and structural metric correctness, with accuracy between 99.0%99.0\% and 100%100\% across these dimensions; (ii) predictive performance, by evaluating the integrated CodeBERT-based AI-generated-code classifier on a held-out test set of 11,419 samples, which yields an F1-score of 0.9478 and an AUROC of 0.9902; and (iii) perceived usability, through an anonymous survey of 26 SE researchers (Section V).

Open source tool and documentation. All resources related to SIEVE are publicly available. See the Tool and Data Availability section.

References (49)