PRIME-Py: Python Repository Inspection and Metric Extraction Dataset
收藏Zenodo2026-05-12 更新2026-05-26 收录
下载链接:
https://zenodo.org/doi/10.5281/zenodo.20094325
下载链接
链接失效反馈官方服务:
资源简介:
PRIME-Py: Python Repository Inspection and Metric Extraction Dataset
PRIME-Py is a large-scale dataset of 1,997,535 Python functions extracted from 2,797 open-source GitHub repositories, annotated with Structural Design Symptom (SDS) labels across five sub-types organized into two categories.
SDS Categories and Detection Thresholds
Size-Based SDS
Long Method — NLOC > 14 (75th percentile of training corpus)
High Cyclomatic Complexity — CC > 10
Long Parameter List — parameters > 5
Complexity-Based SDS
Spaghetti Code — branch count > 12
High Fan-Out — outgoing calls > 15
All detection thresholds are grounded in published empirical research: Chen et al. (2018, Information and Software Technology); McCabe (1976, IEEE TSE); Palomba et al. (2018, Empirical Software Engineering).
Dataset Contents
train_labelled.parquet — 1,554,896 functions from 2,237 projects (training split)
val_labelled.parquet — 165,226 functions from 280 projects (validation split)
test_labelled.parquet — 277,413 functions from 280 projects (test split)
gold_standard.parquet — 192 manually annotated functions with inter-rater reliability labels
schema.csv — full column schema with types, descriptions, and counting rules
Splits are performed at the project level (seed=42, 80/10/10) to prevent data leakage. No function from the same project appears in more than one split.
Features
Structural metrics: NLOC, cyclomatic complexity, parameter count, token count, branch count, outgoing and incoming call counts
Lexical features: class membership, variable counts, function body line type distributions
Semantic features: SEBIS CodeTrans T5 semantic function summaries
Label Validation
Labels are validated at three independent levels:
Pylint static analysis agreement — Long Parameter List (κ=0.801), Spaghetti Code (κ=0.837)
Inter-rater reliability study — 192-function sample, two independent software engineering practitioners
Two-interpretation benchmark validation against Sandouka and Aljamaan (2023, PeerJ Computer Science)
Replication Package
The complete replication package — including labeling scripts, Pylint matching scripts, benchmark validation scripts, annotation materials, and folder documentation — is available at: https://github.com/rehaidib/PRIME-Py
Associated Paper
(Under Review) Alehaidib R, Ghoneim A, Alrashoud M. 2026. Large-Scale Automated Detection of Structural Design Symptoms in Python Open-Source Software: An Empirical Study. PeerJ Computer Science. [DOI when published]
License
Creative Commons Attribution 4.0 International (CC BY 4.0)
提供机构:
Zenodo创建时间:
2026-05-09



