--- dataset_info: - config_name: Python features: - name: problem_id dtype: string - name: language dtype: string - name: original_status dtype: string - name: fail dtype: string - name: pass dtype: string - name: change dtype: string - name: i1 dtype: uint32 - name: i2 dtype: uint32 - name: j1 dtype: uint32 - name: j2 dtype: uint32 - name: error dtype: string - name: stderr dtype: string - name: stdout dtype: string - name: description dtype: string - name: input dtype: string - name: output dtype: string splits: - name: train num_bytes: 8237153 num_examples: 2557 - name: validation num_bytes: 3497872 num_examples: 1105 - name: test num_bytes: 205241 num_examples: 100 download_size: 19290233 dataset_size: 11940266 - config_name: C++ features: - name: problem_id dtype: string - name: language dtype: string - name: original_status dtype: string - name: fail dtype: string - name: pass dtype: string - name: change dtype: string - name: i1 dtype: uint32 - name: i2 dtype: uint32 - name: j1 dtype: uint32 - name: j2 dtype: uint32 - name: error dtype: string - name: stderr dtype: string - name: stdout dtype: string - name: description dtype: string - name: input dtype: string - name: output dtype: string splits: - name: train num_bytes: 482930200 num_examples: 68621 - name: validation num_bytes: 1129323 num_examples: 125 - name: test num_bytes: 40048505 num_examples: 4769 download_size: 378900920 dataset_size: 524108028 --- # About the Dataset The source code used to generate the dataset can be found on [GitHub](https://github.com/alexjercan/bug-detection/tree/master/bugnet) The dataset is based on the [CodeNet project](https://github.com/IBM/Project_CodeNet) and contains Python and C++ code submissions for online coding competitions. The data is obtained by selecting consecutive attempts of a single user that resulted in fixing a buggy submission. Thus the data is represented by code pairs and annotated by the diff and error of each changed instruction. We have already tokenized all the source code files and kept the same format as in the original dataset. The upgrade made compared to CodeNetPy is that we only keep one line errors. This means that the task of bug detection and repair will be easier to manage. We also removed all the files that fail on linters, so that we are focusing only on bugs that cannot be identified easily. The resulting dataset file will be a csv with the following columns: - `problem_id`: The id of the problem, matches with the id from Project_CodeNet - `language`: The programming language of the submission (`Python` or `C++`) - `original_status`: The status of the initial submission (`TLE`, `MLE`, anything that is not `Accepted`) - `fail`: The initial (buggy) source code formatted (`black` or `clang-fromat`) - `pass`: The modified (accepted) source code formatted(`black` or `clang-format` - `change`: The change that was made (`replace`, `insert`, `delete`) - `i1`: Start of the change in the buggy source (the line; starting with 1) - `i2`: End of the change in the buggy source (not inclusive; for `insert` we have `i1 == i2`) - `j1`: Start of the change in the accepted source (the line; starting with 1) - `j2`: End of the change in the accepted source (not inclusive; for `delete` we have `j1 == j2`) - `error`: The error that was obtained running the buggy source code on the input/output examples - `stderr`: The full output of stderr of running the buggy source code on the input/output examples - `stdout`: The full output of stdout of running the buggy source code on the input/output examples - `description`: The problem statement in html format - `input`: The input for the test case - `output`: The output for the test case