Defects4J Documentation
Command-line interface
- defects4j: command-line interface to Defects4J.
- bids: Lists all bug IDs for a project
- checkout: checkout a particular project version.
- compile: compile a checked-out project version.
- coverage: run code coverage analysis for a checked-out project version.
- env: print environtment information for debugging
- export: export a version-specific property.
- info: print information for a specific project or bug
- monitor: monitor class loader while running a single test class or test method.
- mutation: run mutation analysis for a checked-out project version.
- pids: Lists all project IDs
- query: query the metadata for a project to obtain CSV-formatted results.
- test: run tests on a checked-out project version.
Core modules
- Constants: defines/exports all framework-wide constants.
- Coverage: helper subroutines for code coverage analysis.
- DB: defines/exports all constants and subroutines related to database backends.
- Log: a simple log file abstraction.
- Mutation: helper subroutines for mutation analysis.
- Project: interface and abstraction for all projects.
- Query: Infrastructure for querying the metadata for project and
version-specific properties.
- Utils: some useful helper subroutines.
- Vcs: a simple abstraction for version control systems.
Test execution framework
- gen_tests: generate a test suite using one of the supported test generators.
- run_bug_detection: bug detection analysis for generated test suites.
- run_coverage: code coverage analysis for generated test suites.
- run_klocs: count test suite KLOCS.
- run_mutation: mutation analysis for generated test suites.
Util scripts
- create_bugs_table: populate bugs table with id, name, and number of bugs per project.
- create_mml: create a Major-compatible MML file, which defines program mutations.
- fix_test_suite: remove failing tests from test suite until all tests pass.
- get_gradle_dependencies: obtain a list of all gradle versions used in the
entire history of a particular project and collect all gradle dependencies
required to compile all bugs of that project.
- get_modified_classes: determine the set of classes modified by the src patch.
- get_relevant_tests: determine the set of relevant tests for a set of bugs of a given project.
- merge_tests: replace test methods with a different version.
- rm_broken_tests: remove broken test methods from a set of test classes.
- sanity_check: perform sanity check for a project or project version.