/GrowingBugRepository

A bug repository that keeps growing

Primary LanguagePerl

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.

Project ID Project name SubProject name Number of bugs Bug IDs
1 Chart jfreechart 26 1-26
2 Cli commons-cli 41 1-5,7-42
3 Closure closure-compiler 174 1-62,64-92,94-176
4 Codec commons-codec 18 1-18
5 Collections commons-collections 8 25-31,35
6 Compress commons-compress 51 1-48,50,52-53
7 Csv commons-csv 17 1-17
8 Gson gson 18 1-18
9 JacksonCore jackson-core 29 1-26,28-30
10 JacksonDatabind jackson-databind 151 1-117,119,121-126,
128-129,131-133,135-156
11 JacksonXml jackson-dataformat-xml 6 1-6
12 Jsoup jsoup 93 1-93
13 JxPath commons-jxpath 22 1-22
14 Lang commons-lang 72 1,3-33,35-65,69,71,73,
76,80-84
15 Math_4j commons-math4j 105 1-105
16 Mockito mockito 38 1-38
17 Time joda-time 26 1-20,22-27
18 Dbutils commons-dbutils 2 1-2
19 Functor commons-functor 2 1-2
20 Imaging commons-imaging 10 1,3-8,10-11,14
21 IO commons-io 21 1-3,5-6,8-18,
22,25,27,29-30
22 JXR maven-jxr 1 1
23 MShade maven-shade-plugin 6 1-4,6-7
24 Tika tika 5 1-2,5-7
25 Validator commons-validator 21 1-2,4,6-9,11,
13-25
26 Pool commons-pool 18 1-2,5-7,10-14,
16,20-21,24,
26-27,29-30
27 Email commons-email 3 3-5
28 Graph commons-graph 3 1-3
29 Net commons-net 14 9,10,12,
14-18,20-21,
23-26
30 Numbers_angle commons-numbers-angle commons-numbers-angle 2 1-2
31 Geometry_core commons-geometry-core commons-geometry-core 2 1,3
32 MGpg maven-gpg-plugin 1 1
33 Text commons-text 4 1-2,4-5
34 Tika_core tika-core tika-core 6 4,6,9,11,
17,20
35 Tika_app tika-app tika-app 2 1,3
36 Shiro_core shiro-core core 9 37,40,46,52,98,
144,176,181,202
37 Jena_core jena-core jena-core 1 2
38 Shiro_web shiro-web web 3 1,3,7
39 MDeploy maven-deploy-plugin 1 1
40 Jackrabbit_filevault
_vault_validation
jackrabbit-filevault-vault-validation vault-validation 4 1-4
41 Jackrabbit_oak_core oak-core oak-core 5 1-5
42 Doxia_module_apt doxia-module-apt doxia-modules/doxia-module-apt 1 1
43 Xmlgraphics xmlgraphics-commons 2 1-2
44 Rdf_jena commons-rdf-jena commons-rdf-jena 1 1
45 Maven_checkstyle_plugin maven-checkstyle-plugin 1 1
46 James_project_core james-project-core core 1 1
47 Pdfbox_fontbox pdfbox-fontbox fontbox 5 1-5
48 AaltoXml aalto-xml 4 1-4
49 HttpClient5 httpclient5 httpclient5 6 1-2,4-7
50 jackson_modules
_java8_datetime
jackson-modules-java8-datetime datetime 5 1-5
51 Pdfbox_pdfbox pdfbox-pdfbox pdfbox 3 1-3
52 Storm_client storm-client storm-client 2 1-2
53 James_mime4j_core James-mime4j-core core 8 1-8
54 JacksonDataformatsText
_yaml
jackson-dataformats-text-yaml yaml 6 1-2,4-7
55 JacksonDataformatsText
_properties
jackson-dataformats-text-properties properties 2 1-2
56 JacksonDataformatBinary
_avro
jackson-dataformats-binary-avro avro 2 1-2
57 JacksonDataformatBinary
_cbor
jackson-dataformats-binary-cbor cbor 5 1-5
58 JavaClassmate java-classmate 2 1-2
59 JacksonModuleJsonSchema jackson-module-jsonSchema 1 1
60 JacksonDatatypeJoda jackson-datatype-joda 3 1-3
61 Bcel commons-bcel 6 1-6
62 JacksonDataformatBinary
_protobuf
jackson-dataformats-binary-protobuf protobuf 4 1-4
63 Jackrabbit_filevault
_vault_core
jackrabbit-filevault-vault-core vault-core 1 1
64 JacksonDatatypeJsr310 jackson-datatype-jsr310 4 1-4
65 JacksonDataformatBinary
_smile
jackson-dataformats-binary-smile smile 2 1-2
66 JacksonModuleAfterburner jackson-module-afterburner 3 1-3
67 Woodstox woodstox 7 1-7
68 MetaModel_core MetaModel-core core 9 1-9
69 MetaModel_csv MetaModel-csv csv 1 1
70 MetaModel_excel MetaModel-excel excel 1 1
71 MetaModel_jdbc MetaModel-jdbc jdbc 3 1-3
72 MetaModel_pojo MetaModel-pojo pojo 1 1
73 MetaModel_salesforce MetaModel-salesforce salesforce 1 1
74 Wink_common wink-common wink-common 4 1-4
75 Xbean_naming xbean-naming xbean-naming 1 1
76 James_project_
server_container_core
james-project-server-container-core server/container/core 1 1
77 Johnzon_core johnzon-core johnzon-core 10 1-2,4-11
78 Nifi_mock nifi-mock nifi-mock 2 1-2
79 Rat_core apache-rat-core apache-rat-core 1 1
80 Rat_plugin apache-rat-plugin apache-rat-plugin 1 1
81 Tez_common tez-common tez-common 1 1
82 Tinkerpop_gremlin_core gremlin-core gremlin-core 1 1
83 Webbeans_web webbeans-web webbeans-web 1 1
84 Hono_client hono-client client 4 1-4
85 Httpcomponents_core_h2 httpcore5-h2 httpcore5-h2 1 1
86 Httpcomponents_core
_httpcore5
httpcore5 httpcore5 3 1-3
87 Johnzon_jsonb johnzon-jsonb johnzon-jsonb 6 1-6
88 Johnzon_jaxrs johnzon-jaxrs johnzon-jaxrs 1 1
89 Hbase_common hbase-common hbase-common 1 1
90 Incubator_tamaya_api incubator-retired-tamaya-api code/api 2 1-2
91 James_project_
mailet_standard
james-project-mailet-standard mailet/standard 1 1
92 Johnzon_jsonschema johnzon-jsonschema johnzon-jsonschema 2 1-2
93 Johnzon_mapper johnzon-mapper johnzon-mapper 6 1-6
94 Karaf_main karaf-main main 1 1
95 Appformer_uberfire_
commons_editor_backend
uberfire-commons-editor-backend uberfire-extensions/uberfire-commons-editor/uberfire-commons-editor-backend 1 1
96 Kie_pmml_commons kie-pmml-commons kie-pmml-trusty/kie-pmml-commons 3 1-3
97 Kie_memory_compiler kie-memory-compiler kie-memory-compiler 1 1
98 Jbpm_human
_task_workitems
jbpm-human-task-workitems jbpm-human-task/jbpm-human-task-workitems 1 1
99 Drools_traits drools-traits drools-traits 1 1
100 Drools_model_compiler drools-model-compiler drools-model/drools-model-compiler 1 1
101 Appformer_uberfire
_security_management
_client
uberfire-security-management-client uberfire-extensions/uberfire-security/uberfire-security-management/uberfire-security-management-client 1 1
102 Appformer_uberfire
_workbench_client
uberfire-workbench-client uberfire-workbench/uberfire-workbench-client 3 1-3
103 Deltaspike_api deltaspike-core-api deltaspike/core/api 6 1-6
104 Flume_ngcore flume-ng-core flume-ng-core 2 1-2
105 Jandex jandex 6 1-6
106 Kogito_editors
_java_kie_wb_common
_stunner_widgets
kie-wb-common-stunner-widgets kie-wb-common-stunner/kie-wb-common-stunner-client/kie-wb-common-stunner-widgets 1 1
107 Ognl commons-ognl 1 1
108 Qpid_client qpid-jms-client qpid-jms-client 8 1-8
109 Switchyard_admin switchyard-admin admin 1 1
110 Weld_se_core weld-se-core environments/se/core 1 1
111 Jboss_modules jboss-modules 7 1-7
112 Jboss_threads jboss-threads 1 1
113 Minaftp_api ftpserver-api ftplet-api 1 1
114 Sling_validation sling-org-apache-sling-validation-core 1 1
115 Switchyard_config switchyard-config config 1 1
116 Switchyard_validate switchyard-validate validate 1 1
117 Vysper_nbxml vysper-nbxml nbxml 2 1-2
118 Wildfly_naming_client wildfly-naming-client 2 1-2
119 Dosgi_common dosgi-common common 2 1-2
120 Fluo_api fluo-api modules/api 4 1-4
121 Hivemall_core core core 3 1-3
122 Knox_assertion_common gateway-provider-
identity-assertion
-common
gateway-provider-
identity-assertion
-common
1 1
123 Oozie_client oozie-client client 2 1-2
124 Qpidjms_client qpidjms-client client 3 1-3
125 Rdf4j_query rdf4j-query core/query 4 1-4
126 Rdf4j_rio_api rdf4j-rio-api core/rio/api 2 1-2
127 Rdf4j_rio_jsonld rdf4j-rio-jsonld core/rio/jsonld 2 1-2
128 Rdf4j_rio_rdfjson rdf4j-rio-rdfjson core/rio/rdfjson 2 1-2
129 Rdf4j_rio_rdfxml rdf4j-rio-rdfxml core/rio/rdfxml 3 1-3
130 Rdf4j_rio_turtle rdf4j-rio-turtle core/rio/turtle 11 1-11
131 Sentry_ccommon sentry-core-common sentry-core/sentry-core-common 2 1-2
132 Sling_apiregions sling-apiregions 3 1-3
133 Sling_cpconverter sling-cpconverter 3 1-3
134 Sling_feature sling-feature 3 1-3
135 Tiles_api tiles-api tiles-api 2 1-2
136 Tiles_core tiles-core tiles-core 3 1-3
137 Twill_dcore twill-discovery-core twill-discovery-core 1 1
138 Maven2_artifact maven-artifact maven-artifact 2 1-2
139 Maven2_project maven-project maven-project 2 1-2
140 Math commons-math 35 1-35
141 Wicket_request wicket-request wicket-request 6 1-6
142 Cayenne_xmpp cayenne-xmpp cayenne-xmpp 1 1
143 Wicket_util wicket-util wicket-util 4 1-4
144 Wicket_spring wicket-spring wicket-spring 1 1
145 Cayenne_jgroups cayenne-jgroups cayenne-jgroups 1 1
146 Cayenne_jms cayenne-jms cayenne-jms 1 1

Setting up GrowingBugs

Requirements

  • Java 1.8
  • Git >= 1.9
  • SVN >= 1.8
  • Perl >= 5.0.12
  • Curl

Steps to set up GrowingBugs

  1. Clone GrowingBugs:

    • git clone https://github.com/liuhuigmail/GrowingBugRepository.git
  2. 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
  3. Add GrowingBugs's executables to your PATH:

    • export PATH=$PATH:"path2growingbugs"/framework/bin

Using GrowingBugs

  1. 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 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.

  2. 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.

GrowingBugRepository's docker image has been uploaded to Ali Cloud, you can use docker pull registry.cn-hangzhou.aliyuncs.com/bit-zhuzhihao/growingbugrepository:0.2 to pull.

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} }