Download the project repositories and external libraries that are not included in the git repository for size purposes and to avoid redundancies. We provide a mechanism to download them automatically as follows:
Notably, GrowingBugs supports sub-projects that are not suported by Defects4J. To this end, yor should specify the sub-project with -s parameter in the checkout command. The preceding example common leverages -s core to check out sub-proejct core from the enclosing project Shiro_core. For the compile and test commands, you should also switch to the sub-project’s folder to compile and test the sub-project.
Change to the working directory, compile sources and tests, and run tests:
cd work_dir/subproject_name
defects4j compile
defects4j test
Example1:
cd /tmp/Shiro_core_37_buggy/core
defects4j compile
defects4j test
Example2:
cd /tmp/dbutils_1_buggy
defects4j compile
defects4j test
Currently, we resuse all APIs of Defects4J (more details at https://github.com/rjust/defects4j), and thus all applications relying on Defects4J could be transferred smoothly to GrowingBugs.
Docker Image
To free users (especially beginers) of the repository from the complex configuration of the environments, we create and publish a Docker image of the system. You may download it by the following command:
By simply loading the image with Docker, you can make the system ready for evaluation where all configurations (e.g., Java versions, paths, and even all data within the repository) should have been well set.
Copyright
Notably, this bug repository is based on the well-known Defects4Jhttps://github.com/rjust/defects4j. We reuse its source code as well as the bugs in Defects4J. The key difference is that growingBugs levearages BugBuilder[1] to exclude bug-irrelevarange changes from bug-fixing commmits automatically whereas Defects4J requests human experts to accomplish the same task. Consequently, growingBugs can keep growing automatically even without human intervention.
Versions
Because the bug repository keeps growing, let us known if you need a stable version for your study (e.g., evalutions for a research paper), and we will release a specific version where the bugs and patches are fixed (to faciliate the replication of your study).
Citation
If you are exploiting our dataset, please kindly cite the following paper:
[1] Yanjie Jiang, Hui Liu, Nan Niu, Lu Zhang, Yamin Hu. Extracting Concise Bug-Fixing Patches from Human-Written Patches in Version Control Systems. The 43rd International Conference on Software Engineering (ICSE), pp. 686-698, May, 2021 https://liuhuigmail.github.io/publishedPappers/ICSE2021.pdf
@INPROCEEDINGS {GrowingBugs, author = {Yanjie Jiang and Hui Liu and Nan Niu and Lu Zhang and Yamin Hu}, booktitle = {IEEE/ACM 43rd International Conference on Software Engineering (ICSE 2021)}, title = {Extracting Concise Bug-Fixing Patches from Human-Written Patches in Version Control Systems}, year = {2021}, pages = {686-698}, doi = {10.1109/ICSE43902.2021.00069}, url = {https://doi.ieeecomputersociety.org/10.1109/ICSE43902.2021.00069}, publisher = {IEEE Computer Society}, address = {Los Alamitos, CA, USA}, month = {may} }
A bug repository that keeps growing, called growingBugs
Notably, each bug is composed of a buggy version, a fixed version, a concise patch (bug-fixing changes only), and one or more triggering test cases.
Contents of growingBugs
To date, growingBugs contains
1358
bugs from open-source Java projects._vault_validation
_java8_datetime
_yaml
_properties
_avro
_cbor
_protobuf
_vault_core
_smile
server_container_core
_httpcore5
mailet_standard
commons_editor_backend
_task_workitems
_security_management_client
_workbench_client
_java_kie_wb_common_stunner_widgets
Setting up GrowingBugs
Requirements
Steps to set up GrowingBugs
Clone GrowingBugs:
git clone https://github.com/liuhuigmail/GrowingBugRepository.git
Initialize GrowingBugs:
Download the project repositories and external libraries that are not included in the git repository for size purposes and to avoid redundancies. We provide a mechanism to download them automatically as follows:
cd GrowingBugRepository
cpanm --installdeps .
./init.sh
./repos.sh
Add GrowingBugs’s executables to your PATH:
export PATH=$PATH:"path2growingbugs"/framework/bin
Using GrowingBugs
Checkout a buggy source code version (If the project doesn’t hava subproject,
-s
parameter can be ignored):defects4j checkout -p project_id -v version_id -w work_dir -s subproject_name
Example:
defects4j checkout -p Shiro_core -v 37b -w /tmp/Shiro_core_37_buggy -s core
defects4j checkout -p Dbutils -v 1b -w /tmp/dbutils_1_buggy
Notably, GrowingBugs supports sub-projects that are not suported by Defects4J. To this end, yor should specify the sub-project with
-s
parameter in thecheckout
command. The preceding example common leverages-s core
to check out sub-proejctcore
from the enclosing projectShiro_core
. For thecompile
andtest
commands, you should also switch to the sub-project’s folder to compile and test the sub-project.Change to the working directory, compile sources and tests, and run tests:
cd work_dir/subproject_name
defects4j compile
defects4j test
Example1:
cd /tmp/Shiro_core_37_buggy/core
defects4j compile
defects4j test
Example2:
cd /tmp/dbutils_1_buggy
defects4j compile
defects4j test
Currently, we resuse all APIs of Defects4J (more details at https://github.com/rjust/defects4j), and thus all applications relying on Defects4J could be transferred smoothly to GrowingBugs.
Docker Image
To free users (especially beginers) of the repository from the complex configuration of the environments, we create and publish a Docker image of the system. You may download it by the following command:
docker pull registry.cn-hangzhou.aliyuncs.com/bit-zhuzhihao/growingbugrepository:0.3
By simply loading the image with Docker, you can make the system ready for evaluation where all configurations (e.g., Java versions, paths, and even all data within the repository) should have been well set.
Copyright
Notably, this bug repository is based on the well-known Defects4J https://github.com/rjust/defects4j. We reuse its source code as well as the bugs in Defects4J. The key difference is that growingBugs levearages BugBuilder[1] to exclude bug-irrelevarange changes from bug-fixing commmits automatically whereas Defects4J requests human experts to accomplish the same task. Consequently, growingBugs can keep growing automatically even without human intervention.
Versions
Because the bug repository keeps growing, let us known if you need a stable version for your study (e.g., evalutions for a research paper), and we will release a specific version where the bugs and patches are fixed (to faciliate the replication of your study).
Citation
If you are exploiting our dataset, please kindly cite the following paper:
[1] Yanjie Jiang, Hui Liu, Nan Niu, Lu Zhang, Yamin Hu. Extracting Concise Bug-Fixing Patches from Human-Written Patches in Version Control Systems. The 43rd International Conference on Software Engineering (ICSE), pp. 686-698, May, 2021 https://liuhuigmail.github.io/publishedPappers/ICSE2021.pdf
@INPROCEEDINGS {GrowingBugs, author = {Yanjie Jiang and Hui Liu and Nan Niu and Lu Zhang and Yamin Hu}, booktitle = {IEEE/ACM 43rd International Conference on Software Engineering (ICSE 2021)}, title = {Extracting Concise Bug-Fixing Patches from Human-Written Patches in Version Control Systems}, year = {2021}, pages = {686-698}, doi = {10.1109/ICSE43902.2021.00069}, url = {https://doi.ieeecomputersociety.org/10.1109/ICSE43902.2021.00069}, publisher = {IEEE Computer Society}, address = {Los Alamitos, CA, USA}, month = {may} }