google/code_x_glue_cc_code_refinement
收藏数据集概述
数据集摘要
CodeXGLUE code-refinement 数据集,包含两个子集(small 和 medium),基于函数长度划分。数据集用于训练模型自动修复带有错误的代码。
支持的任务和排行榜
text2text-generation-other-debugging:用于训练模型自动修复带有错误的代码。
语言
- Java 编程语言
数据集结构
数据实例
medium
训练集示例: json { "buggy": "public static TYPE_1 init ( java.lang.String name , java.util.Date date ) { TYPE_1 VAR_1 = new TYPE_1 ( ) ; VAR_1 . METHOD_1 ( name ) ; java.util.Calendar VAR_2 = java.util.Calendar.getInstance ( ) ; VAR_2 . METHOD_2 ( date ) ; VAR_1 . METHOD_3 ( VAR_2 ) ; return VAR_1 ; } ", "fixed": "public static TYPE_1 init ( java.lang.String name , java.util.Date date ) { TYPE_1 VAR_1 = new TYPE_1 ( ) ; VAR_1 . METHOD_1 ( name ) ; java.util.Calendar VAR_2 = null ; if ( date != null ) { VAR_2 = java.util.Calendar.getInstance ( ) ; VAR_2 . METHOD_2 ( date ) ; } VAR_1 . METHOD_3 ( VAR_2 ) ; return VAR_1 ; } ", "id": 0 }
small
验证集示例: json { "buggy": "public java.util.List < TYPE_1 > METHOD_1 ( ) { java.util.ArrayList < TYPE_1 > VAR_1 = new java.util.ArrayList < TYPE_1 > ( ) ; for ( TYPE_2 VAR_2 : VAR_3 ) { VAR_1 . METHOD_2 ( VAR_2 . METHOD_1 ( ) ) ; } return VAR_1 ; } ", "fixed": "public java.util.List < TYPE_1 > METHOD_1 ( ) { return VAR_1 ; } ", "id": 0 }
数据字段
medium, small
| 字段名 | 类型 | 描述 |
|---|---|---|
| id | int32 | 样本的索引 |
| buggy | string | 带有错误的代码版本 |
| fixed | string | 正确的代码版本 |
数据分割
| 名称 | 训练集 | 验证集 | 测试集 |
|---|---|---|---|
| medium | 52364 | 6546 | 6545 |
| small | 46680 | 5835 | 5835 |
数据集创建
注释过程
通过过滤包含 "fix" 或 "solve" 以及 "bug"、"issue"、"problem" 或 "error" 的提交消息来自动注释。通过手动评估样本的正确性,确认 97.6% 为真阳性。
注释者
启发式方法和论文作者。
许可证信息
计算数据使用协议(C-UDA)许可证。
引用信息
bibtex @article{DBLP:journals/corr/abs-2102-04664, author = {Shuai Lu and Daya Guo and Shuo Ren and Junjie Huang and Alexey Svyatkovskiy and Ambrosio Blanco and Colin B. Clement and Dawn Drain and Daxin Jiang and Duyu Tang and Ge Li and Lidong Zhou and Linjun Shou and Long Zhou and Michele Tufano and Ming Gong and Ming Zhou and Nan Duan and Neel Sundaresan and Shao Kun Deng and Shengyu Fu and Shujie Liu}, title = {CodeXGLUE: {A} Machine Learning Benchmark Dataset for Code Understanding and Generation}, journal = {CoRR}, volume = {abs/2102.04664}, year = {2021} } @article{tufano2019empirical, title={An empirical study on learning bug-fixing patches in the wild via neural machine translation}, author={Tufano, Michele and Watson, Cody and Bavota, Gabriele and Penta, Massimiliano Di and White, Martin and Poshyvanyk, Denys}, journal={ACM Transactions on Software Engineering and Methodology (TOSEM)}, volume={28}, number={4}, pages={1--29}, year={2019}, publisher={ACM New York, NY, USA} }




