$ account rjust
Defects4J is a hybrid research framework and curated bug database for Java programs. In production, its Perl-based CLI (`framework/bin/defects4j`) checks out 854 known bugs across 17 open-source Java projects, reconstructs buggy or fixed revisions from version control, applies source/test patches, compiles with the project's original build system (Ant/Maven/Gradle), and executes selected relevant or triggering tests. It also supports coverage analysis, mutation testing, test generation via EvoSuite/Randoop, and metadata export for downstream research tools. The framework is commonly used as an oracle for fault localization, automated program repair, regression testing, and test-suite adequacy experiments. Architecturally, the repository is a modular Perl framework: `framework/bin/defects4j` dispatches to `d4j-*` subcommands, while core modules (`Project.pm`, `Vcs.pm`, `DB.pm`, `Coverage.pm`, `Mutation.pm`, `Query.pm`) provide project abstraction, VCS handling, bug-database lookups, and analysis orchestration. The dataset itself lives under `framework/projects/`, with per-bug artifacts such as `commit-db`, `patches/*.src.patch` and `*.test.patch`, `relevant_tests/`, `loaded_classes/`, and build-file snapshots. A separate `framework/bug-mining/` pipeline automates the discovery and curation of new bugs from issue trackers and commit history. External dependencies include Git/SVN, Java 8/11, JUnit, Ant/Maven/Gradle, Cobertura, Major mutation framework, EvoSuite, and Randoop. The repo is therefore both a usable command-line tool and a large, carefully versioned research dataset.