semeru/code-code-translation-java-csharp
收藏资源简介:
--- license: mit Programminglanguage: "Java/C#" version: "N/A" Date: "Most likely 2020" Contaminated: "Very Likely" Size: "Standard Tokenizer" --- ### Dataset is imported from CodeXGLUE and pre-processed using their script. # Where to find in Semeru: The dataset can be found at /nfs/semeru/semeru_datasets/code_xglue/code-to-code/code-to-code-trans in Semeru # CodeXGLUE -- Code2Code Translation ## Task Definition Code translation aims to migrate legacy software from one programming language in a platform toanother. In CodeXGLUE, given a piece of Java (C#) code, the task is to translate the code into C# (Java) version. Models are evaluated by BLEU scores, accuracy (exactly match), and [CodeBLEU](https://github.com/microsoft/CodeXGLUE/blob/main/code-to-code-trans/CodeBLEU.MD) scores. ## Dataset The dataset is collected from several public repos, including Lucene(http://lucene.apache.org/), POI(http://poi.apache.org/), JGit(https://github.com/eclipse/jgit/) and Antlr(https://github.com/antlr/). We collect both the Java and C# versions of the codes and find the parallel functions. After removing duplicates and functions with the empty body, we split the whole dataset into training, validation and test sets. ### Data Format The dataset is in the "data" folder. Each line of the files is a function, and the suffix of the file indicates the programming language. ### Data Statistics Data statistics of the dataset are shown in the below table: | | #Examples | | ------- | :-------: | | Train | 10,300 | | Valid | 500 | | Test | 1,000 |
许可证:MIT协议 编程语言:Java/C# 版本:无可用信息 发布日期:大概率为2020年 数据集污染情况:极有可能存在污染 数据集规模:标准分词器 本数据集源自CodeXGLUE,并通过其官方脚本完成预处理。 # 在Semeru中的获取路径 该数据集可在Semeru平台的/nfs/semeru/semeru_datasets/code_xglue/code-to-code/code-to-code-trans路径下获取。 # CodeXGLUE —— 代码到代码翻译任务 ## 任务定义 代码翻译旨在将遗留软件从某一平台的编程语言迁移至另一平台的编程语言。在CodeXGLUE基准任务中,给定一段Java(或C#)代码,需将其转换为C#(或Java)版本的代码。模型的评估指标包含BLEU得分、准确率(完全匹配率)以及[CodeBLEU](https://github.com/microsoft/CodeXGLUE/blob/main/code-to-code-trans/CodeBLEU.MD)得分。 ## 数据集概况 本数据集采集自多个公开代码仓库,包括Lucene(http://lucene.apache.org/)、POI(http://poi.apache.org/)、JGit(https://github.com/eclipse/jgit/)以及Antlr(https://github.com/antlr/)。我们同时采集了对应代码的Java与C#双版本,并匹配得到并行函数对。在剔除重复样本与空体函数后,将完整数据集划分为训练集、验证集与测试集。 ### 数据格式 数据集存储于"data"文件夹中。文件内每一行对应一个函数,文件后缀名用于标识该文件内代码的编程语言。 ### 数据统计 本数据集的统计信息如下表所示: | | 样本数量 | | ------- | :-------: | | 训练集 | 10300 | | 验证集 | 500 | | 测试集 | 1000 |
数据集概述
数据集来源与处理
- 数据集从CodeXGLUE导入,并使用其提供的脚本进行预处理。
数据集存储位置
- 在Semeru系统中,数据集位于
/nfs/semeru/semeru_datasets/code_xglue/code-to-code/code-to-code-trans。
任务定义
- 代码翻译任务旨在将遗留软件从一个编程语言平台迁移到另一个。在CodeXGLUE中,任务是给定一段Java(C#)代码,将其翻译成C#(Java)版本。
评估指标
- 模型评估使用BLEU分数、准确性(完全匹配)和CodeBLEU分数。
数据集组成
- 数据集从Lucene、POI、JGit和Antlr等公共仓库收集,包含Java和C#版本的代码,并找到平行函数。
- 经过去重和去除空体函数后,数据集被分为训练集、验证集和测试集。
数据格式
- 数据集位于“data”文件夹中,每行代表一个函数,文件后缀表示编程语言。
数据统计
| #Examples | |
|---|---|
| Train | 10,300 |
| Valid | 500 |
| Test | 1,000 |




