h4iku commited on
Commit
0241905
1 Parent(s): d1230ad

Add README

Browse files
Files changed (1) hide show
  1. README.md +136 -0
README.md ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - code
4
+ pretty_name: CoCoNuT-Python(2010)
5
+ ---
6
+
7
+ # Dataset Card for CoCoNuT-Python(2010)
8
+
9
+ ## Dataset Description
10
+
11
+ - **Homepage:** [CoCoNuT training data](https://github.com/lin-tan/CoCoNut-Artifact/releases/tag/training_data_1.0.0)
12
+ - **Repository:** [CoCoNuT repository](https://github.com/lin-tan/CoCoNut-Artifact)
13
+ - **Paper:** [CoCoNuT: Combining Context-Aware Neural Translation Models using Ensemble for Program Repair](https://dl.acm.org/doi/abs/10.1145/3395363.3397369)
14
+
15
+ ### Dataset Summary
16
+
17
+ Part of the data used to train the models in the "CoCoNuT: Combining Context-Aware Neural Translation Models using Ensemble for Program Repair" paper.
18
+ These datasets contain raw data extracted from GitHub, GitLab, and Bitbucket, and have neither been shuffled nor tokenized.
19
+ The year in the dataset’s name is the cutting year that shows the year of the newest commit in the dataset.
20
+
21
+ ### Languages
22
+
23
+ - Python
24
+
25
+ ## Dataset Structure
26
+
27
+ ### Data Fields
28
+
29
+ The dataset consists of 4 columns: `add`, `rem`, `context`, and `meta`.
30
+ These match the original dataset files: `add.txt`, `rem.txt`, `context.txt`, and `meta.txt`.
31
+
32
+ ### Data Instances
33
+
34
+ There is a mapping between the 4 columns for each instance.
35
+ For example:
36
+
37
+ 5 first rows of `rem` (i.e., the buggy line/hunk):
38
+
39
+ ```
40
+ 1 public synchronized StringBuffer append(char ch)
41
+ 2 ensureCapacity_unsynchronized(count + 1); value[count++] = ch; return this;
42
+ 3 public String substring(int beginIndex, int endIndex)
43
+ 4 if (beginIndex < 0 || endIndex > count || beginIndex > endIndex) throw new StringIndexOutOfBoundsException(); if (beginIndex == 0 && endIndex == count) return this; int len = endIndex - beginIndex; return new String(value, beginIndex + offset, len, (len << 2) >= value.length);
44
+ 5 public Object next() {
45
+ ```
46
+
47
+ 5 first rows of add (i.e., the fixed line/hunk):
48
+
49
+ ```
50
+ 1 public StringBuffer append(Object obj)
51
+ 2 return append(obj == null ? "null" : obj.toString());
52
+ 3 public String substring(int begin)
53
+ 4 return substring(begin, count);
54
+ 5 public FSEntry next() {
55
+ ```
56
+
57
+ These map to the 5 instances:
58
+
59
+ ```diff
60
+ - public synchronized StringBuffer append(char ch)
61
+ + public StringBuffer append(Object obj)
62
+ ```
63
+
64
+ ```diff
65
+ - ensureCapacity_unsynchronized(count + 1); value[count++] = ch; return this;
66
+ + return append(obj == null ? "null" : obj.toString());
67
+ ```
68
+
69
+ ```diff
70
+ - public String substring(int beginIndex, int endIndex)
71
+ + public String substring(int begin)
72
+ ```
73
+
74
+ ```diff
75
+ - if (beginIndex < 0 || endIndex > count || beginIndex > endIndex) throw new StringIndexOutOfBoundsException(); if (beginIndex == 0 && endIndex == count) return this; int len = endIndex - beginIndex; return new String(value, beginIndex + offset, len, (len << 2) >= value.length);
76
+ + return substring(begin, count);
77
+ ```
78
+
79
+ ```diff
80
+ - public Object next() {
81
+ + public FSEntry next() {
82
+ ```
83
+
84
+ `context` contains the associated "context". Context is the (in-lined) buggy function (including the buggy lines and comments).
85
+ For example, the context of
86
+
87
+ ```
88
+ public synchronized StringBuffer append(char ch)
89
+ ```
90
+
91
+ is its associated function:
92
+
93
+ ```java
94
+ public synchronized StringBuffer append(char ch) { ensureCapacity_unsynchronized(count + 1); value[count++] = ch; return this; }
95
+ ```
96
+
97
+ `meta` contains some metadata about the project:
98
+
99
+ ```
100
+ 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/68a6301301378680519f2b146daec37812a1bc22/StringBuffer.java/buggy/core/src/classpath/java/java/lang/StringBuffer.java
101
+ ```
102
+
103
+ `1056` is the project id. `/local/...` is the absolute path to the buggy file. This can be parsed to extract the commit id: `68a6301301378680519f2b146daec37812a1bc22`, the file name: `StringBuffer.java` and the original path within the project
104
+ `core/src/classpath/java/java/lang/StringBuffer.java`
105
+
106
+ | Number of projects | Number of Instances |
107
+ | ------------------ |-------------------- |
108
+ | 13,899 | 480,777 |
109
+
110
+ ## Dataset Creation
111
+
112
+ ### Curation Rationale
113
+
114
+ Data is collected to train automated program repair (APR) models.
115
+
116
+ ### Citation Information
117
+
118
+ ```bib
119
+ @inproceedings{lutellierCoCoNuTCombiningContextaware2020,
120
+ title = {{{CoCoNuT}}: Combining Context-Aware Neural Translation Models Using Ensemble for Program Repair},
121
+ shorttitle = {{{CoCoNuT}}},
122
+ booktitle = {Proceedings of the 29th {{ACM SIGSOFT International Symposium}} on {{Software Testing}} and {{Analysis}}},
123
+ author = {Lutellier, Thibaud and Pham, Hung Viet and Pang, Lawrence and Li, Yitong and Wei, Moshi and Tan, Lin},
124
+ year = {2020},
125
+ month = jul,
126
+ series = {{{ISSTA}} 2020},
127
+ pages = {101--114},
128
+ publisher = {{Association for Computing Machinery}},
129
+ address = {{New York, NY, USA}},
130
+ doi = {10.1145/3395363.3397369},
131
+ url = {https://doi.org/10.1145/3395363.3397369},
132
+ urldate = {2022-12-06},
133
+ isbn = {978-1-4503-8008-9},
134
+ keywords = {AI and Software Engineering,Automated program repair,Deep Learning,Neural Machine Translation}
135
+ }
136
+ ```