updated readme.md
Browse files
README.md
CHANGED
@@ -1,3 +1,66 @@
|
|
1 |
---
|
2 |
license: mit
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: mit
|
3 |
---
|
4 |
+
|
5 |
+
### Dataset is imported from CodeXGLUE and pre-processed using their script.
|
6 |
+
|
7 |
+
# Where to find in Semeru:
|
8 |
+
The dataset can be found at /nfs/semeru/semeru_datasets/code_xglue/code-to-code/Clone-detection-BigCloneBench in Semeru
|
9 |
+
|
10 |
+
|
11 |
+
# CodeXGLUE -- Clone Detection (BCB)
|
12 |
+
|
13 |
+
## Task Definition
|
14 |
+
|
15 |
+
Given two codes as the input, the task is to do binary classification (0/1), where 1 stands for semantic equivalence and 0 for others. Models are evaluated by F1 score.
|
16 |
+
|
17 |
+
## Updates
|
18 |
+
|
19 |
+
2021-9-13: We have update the evaluater script. Since it's a binary classification, we use binary F1 score instead of "macro" F1 score.
|
20 |
+
|
21 |
+
## Dataset
|
22 |
+
|
23 |
+
The dataset we use is [BigCloneBench](https://www.cs.usask.ca/faculty/croy/papers/2014/SvajlenkoICSME2014BigERA.pdf) and filtered following the paper [Detecting Code Clones with Graph Neural Network and Flow-Augmented Abstract Syntax Tree](https://arxiv.org/pdf/2002.08653.pdf).
|
24 |
+
|
25 |
+
### Data Format
|
26 |
+
|
27 |
+
1. dataset/data.jsonl is stored in jsonlines format. Each line in the uncompressed file represents one function. One row is illustrated below.
|
28 |
+
|
29 |
+
- **func:** the function
|
30 |
+
|
31 |
+
- **idx:** index of the example
|
32 |
+
|
33 |
+
2. train.txt/valid.txt/test.txt provide examples, stored in the following format: idx1 idx2 label
|
34 |
+
|
35 |
+
### Data Statistics
|
36 |
+
|
37 |
+
Data statistics of the dataset are shown in the below table:
|
38 |
+
|
39 |
+
| | #Examples |
|
40 |
+
| ----- | :-------: |
|
41 |
+
| Train | 901,028 |
|
42 |
+
| Dev | 415,416 |
|
43 |
+
| Test | 415,416 |
|
44 |
+
|
45 |
+
|
46 |
+
|
47 |
+
|
48 |
+
|
49 |
+
## Reference
|
50 |
+
<pre><code>@inproceedings{svajlenko2014towards,
|
51 |
+
title={Towards a big data curated benchmark of inter-project code clones},
|
52 |
+
author={Svajlenko, Jeffrey and Islam, Judith F and Keivanloo, Iman and Roy, Chanchal K and Mia, Mohammad Mamun},
|
53 |
+
booktitle={2014 IEEE International Conference on Software Maintenance and Evolution},
|
54 |
+
pages={476--480},
|
55 |
+
year={2014},
|
56 |
+
organization={IEEE}
|
57 |
+
}
|
58 |
+
|
59 |
+
@inproceedings{wang2020detecting,
|
60 |
+
title={Detecting Code Clones with Graph Neural Network and Flow-Augmented Abstract Syntax Tree},
|
61 |
+
author={Wang, Wenhan and Li, Ge and Ma, Bo and Xia, Xin and Jin, Zhi},
|
62 |
+
booktitle={2020 IEEE 27th International Conference on Software Analysis, Evolution and Reengineering (SANER)},
|
63 |
+
pages={261--271},
|
64 |
+
year={2020},
|
65 |
+
organization={IEEE}
|
66 |
+
}</code></pre>
|