遇见数据集

Temporal Modeling of Change History for Black-Box Test Suite Minimization

收藏
Zenodo2026-04-11 更新2026-05-26 收录
官方服务:

资源简介:

Overview This is the replication package associated with the paper "Temporal Modeling of Change History for Black-Box Test Suite Minimization". The package provides code, datasets, and results to reproduce our approach, Temporal Risk-driven Test Suite Minimization (TRTM). Contents Data: We provide the intermediate and processed datasets generated throughout the pipeline in the Data directory, including commit history, class-level changes, test-case mappings, and computed risk scores. Code: We provide all scripts (Python and Bash) in the Code directory required to run the full TRTM pipeline, including environment setup (init.sh), data processing, risk score computation, and test suite minimization. Results: We provide in the Results directory the detailed outputs of our approach (TRTM), including minimized test suites, evaluation metrics (accuracy), and time analysis. For comparison, the replication package of the Change-proneness based Test suite Minimization (CTM) approach is available at https://doi.org/10.5281/zenodo.17103939. Requirements System git perl cpan or cpanm Java 8 (required for the pinned Defects4J version) Python Python 3.10+ pandas, numpy, scipy, pydriller Recommended Setup python3 -m venv .venv source .venv/bin/activate pip install --upgrade pip pip install pandas numpy scipy pydriller Run Location Run all commands from: TRTM/Code Pipeline Steps 1. bash init.sh Purpose: Initialize Defects4J and prepare checkouts. Input dirs: none (fresh setup) Output dirs: ./defects4j ./defects4j-projects 2. python build_commit_database.py Purpose: Build per-bug commit history CSVs. Input dirs: ./defects4j-projects ./defects4j/framework/projects Output dirs: ../Data/commit_database ../Results/time_analysis/commit_extraction 3. python trim_commit_db_to_buggy_revision.py Purpose: Trim commit history up to buggy revisions. Input dirs: ../Data/commit_database ./defects4j/framework/projects Output dirs: ../Data/commit_database_trimmed 4. python extract_file_change_history_from_db.py Purpose: Extract file-level change history. Input dirs: ../Data/commit_database_trimmed Output dirs: ../Data/file_changes ../Results/time_analysis/class_level_from_db 5. python merge_class_changes.py Purpose: Merge file-level changes into class-level changes. Input dirs: ../Data/file_changes Output dirs: ../Data/file_changes_merged_classes 6. python construct_test_case_class_mapping.py Purpose: Build test-case-to-class mappings from call graphs. Input dirs: ../Data/callgraphs ../Data/unique_test_cases.csv ../Data/faults_tests.csv Output dirs: ../Data/class_invocations 7. python calculate_test_case_risk_score.py Purpose: Compute test-case risk scores. Input dirs: ../Data/file_changes_merged_classes ../Data/class_invocations ../Data/commit_database_trimmed Output dirs: ../Data/risk_scores 8. python greedy_minimize.py Purpose: Run greedy minimization for budgets 25/50/75. Input dirs: ../Data/risk_scores Output dirs: ../Results/Minimization/Greedy/{25,50,75} 9. python evaluate.py Purpose: Evaluate minimized test sets and compute Accuracy/FDR per strategy. Input dirs: ../Results/Minimization/Greedy/{25,50,75} ../Data/faults_tests.csv Output dirs: ../Results/accuracy/Greedy/{25,50,75} 10. python summarize.py Purpose: Summarize per-project accuracy results by strategy and budget. Input dirs: ../Results/accuracy/Greedy/{25,50,75} Output dirs: ../Results/accuracy/Greedy/summary

提供机构:
Zenodo
创建时间:
2026-04-11
二维码
社区交流群
二维码
科研交流群
商业服务