File size: 3,981 Bytes
525f5af
 
 
 
 
 
49c33f2
 
525f5af
 
205c9b4
525f5af
205c9b4
525f5af
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3f802bb
 
525f5af
 
960335f
 
 
 
525f5af
 
3f802bb
 
525f5af
3f802bb
1a6113a
525f5af
3f802bb
525f5af
3f802bb
 
525f5af
 
 
 
49c33f2
 
525f5af
 
205c9b4
525f5af
205c9b4
525f5af
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3f802bb
 
525f5af
 
960335f
 
 
 
525f5af
 
3f802bb
 
525f5af
3f802bb
 
525f5af
3f802bb
 
 
 
525f5af
1f82590
 
 
560bdd9
1f82590
 
560bdd9
 
 
 
 
1f82590
 
560bdd9
 
 
1f82590
 
 
 
 
 
 
 
 
 
 
 
 
 
 
560bdd9
1f82590
 
560bdd9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
---
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