andstor commited on
Commit
7a41c99
·
1 Parent(s): f2b208f

Delete README copy.md

Browse files
Files changed (1) hide show
  1. README copy.md +0 -173
README copy.md DELETED
@@ -1,173 +0,0 @@
1
- ---
2
- language:
3
- - en
4
- license: mit
5
- task_categories:
6
- - text-generation
7
- dataset_info:
8
- features:
9
- - name: id
10
- dtype: string
11
- - name: t
12
- dtype: string
13
- - name: t_tc
14
- dtype: string
15
- - name: fm
16
- dtype: string
17
- - name: fm_fc
18
- dtype: string
19
- - name: fm_fc_c
20
- dtype: string
21
- - name: fm_fc_c_m
22
- dtype: string
23
- - name: fm_fc_c_m_f
24
- dtype: string
25
- configs:
26
- - config_name: fm
27
- data_files:
28
- - split: train
29
- path: data/fm/train-*
30
- - split: test
31
- path: data/fm/test-*
32
- - split: validation
33
- path: data/fm/validation-*
34
- - config_name: fm_t
35
- data_files:
36
- - split: train
37
- path: data/fm_t/train-*
38
- - split: test
39
- path: data/fm_t/test-*
40
- - split: validation
41
- path: data/fm_t/validation-*
42
- - config_name: fm_fc_t_tc
43
- data_files:
44
- - split: train
45
- path: data/fm_fc_t_tc/train-*
46
- - split: test
47
- path: data/fm_fc_t_tc/test-*
48
- - split: validation
49
- path: data/fm_fc_t_tc/validation-*
50
- - config_name: fm_fc_c
51
- data_files:
52
- - split: train
53
- path: data/fm_fc_c/train-*
54
- - split: test
55
- path: data/fm_fc_c/test-*
56
- - split: validation
57
- path: data/fm_fc_c/validation-*
58
- - config_name: fm_fc_c_t_tc
59
- data_files:
60
- - split: train
61
- path: data/fm_fc_c_t_tc/train-*
62
- - split: test
63
- path: data/fm_fc_c_t_tc/test-*
64
- - split: validation
65
- path: data/fm_fc_c_t_tc/validation-*
66
- - config_name: fm_fc_c_m
67
- data_files:
68
- - split: train
69
- path: data/fm_fc_c_m/train-*
70
- - split: test
71
- path: data/fm_fc_c_m/test-*
72
- - split: validation
73
- path: data/fm_fc_c_m/validation-*
74
- - config_name: fm_fc_c_m_t_tc
75
- data_files:
76
- - split: train
77
- path: data/fm_fc_c_m_t_tc/train-*
78
- - split: test
79
- path: data/fm_fc_c_m_t_tc/test-*
80
- - split: validation
81
- path: data/fm_fc_c_m_t_tc/validation-*
82
- - config_name: fm_fc_c_m_f
83
- data_files:
84
- - split: train
85
- path: data/fm_fc_c_m_f/train-*
86
- - split: test
87
- path: data/fm_fc_c_m_f/test-*
88
- - split: validation
89
- path: data/fm_fc_c_m_f/validation-*
90
- - config_name: fm_fc_c_m_f_t_tc
91
- data_files:
92
- - split: train
93
- path: data/fm_fc_c_m_f_t_tc/train-*
94
- - split: test
95
- path: data/fm_fc_c_m_f_t_tc/test-*
96
- - split: validation
97
- path: data/fm_fc_c_m_f_t_tc/validation-*
98
- tags:
99
- - unit test
100
- - java
101
- - code
102
- ---
103
-
104
- ## Dataset Description
105
- Microsoft created the methods2test dataset, consisting of Java Junit test cases with its corresponding focal methods.
106
- It contains 780k pairs of JUnit test cases and focal methods which were extracted from a total of 91K
107
- Java open source project hosted on GitHub.
108
-
109
- This is smaller subset of the assembled version of the methods2test dataset.
110
- It provides convenient access to the different context levels based on the raw source code (e.g. newlines are preserved). The test cases and associated classes are also made available.
111
- The subset is created by randomly selecting only one sample from each of the 91k projects.
112
-
113
-
114
- The mapping between test case and focal methods are based heuristics rules and Java developer's best practice.
115
-
116
- More information could be found here:
117
- - [methods2test Github repo](https://github.com/microsoft/methods2test)
118
- - [Methods2Test: A dataset of focal methods mapped to test cases](https://arxiv.org/pdf/2203.12776.pdf)
119
-
120
- ## Dataset Schema
121
- ```
122
- t: <TEST_CASE>
123
- t_tc: <TEST_CASE> <TEST_CLASS_NAME>
124
- fm: <FOCAL_METHOD>
125
- fm_fc: <FOCAL_CLASS_NAME> <FOCAL_METHOD>
126
- fm_fc_c: <FOCAL_CLASS_NAME> <FOCAL_METHOD> <CONTRSUCTORS>
127
- fm_fc_c_m: <FOCAL_CLASS_NAME> <FOCAL_METHOD> <CONTRSUCTORS> <METHOD_SIGNATURES>
128
- fm_fc_c_m_f: <FOCAL_CLASS_NAME> <FOCAL_METHOD> <CONTRSUCTORS> <METHOD_SIGNATURES> <FIELDS>
129
- ```
130
-
131
- ## Focal Context
132
- - fm: this representation incorporates exclusively the source
133
- code of the focal method. Intuitively, this contains the most
134
- important information for generating accurate test cases for
135
- the given method.
136
- - fm+fc: this representations adds the focal class name, which
137
- can provide meaningful semantic information to the model.
138
- - fm+fc+c: this representation adds the signatures of the constructor methods of the focal class. The idea behind this
139
- augmentation is that the test case may require instantiating
140
- an object of the focal class in order to properly test the focal
141
- method.
142
- - fm+fc+c+m: this representation adds the signatures of the
143
- other public methods in the focal class. The rationale which
144
- motivated this inclusion is that the test case may need to
145
- invoke other auxiliary methods within the class (e.g., getters,
146
- setters) to set up or tear down the testing environment.
147
- - fm+fc+c+m+f : this representation adds the public fields of
148
- the focal class. The motivation is that test cases may need to
149
- inspect the status of the public fields to properly test a focal
150
- method.
151
-
152
- ![image/png](https://huggingface.co/datasets/andstor/methods2test/resolve/main/figure-1-focal-context.png)
153
-
154
- The different levels of focal contexts are the following:
155
- ```
156
- T: test case
157
- T_TC: test case + test class name
158
- FM: focal method
159
- FM_FC: focal method + focal class name
160
- FM_FC_C: focal method + focal class name + constructor signatures
161
- FM_FC_C_M: focal method + focal class name + constructor signatures + public method signatures
162
- FM_FC_C_M_F: focal method + focal class name + constructor signatures + public method signatures + public fields
163
- ```
164
-
165
- ## Limitations
166
- The original authors validate the heuristics by inspecting a
167
- statistically significant sample (confidence level of 95% within 10%
168
- margin of error) of 97 samples from the training set. Two authors
169
- independently evaluated the sample, then met to discuss the disagreements. We found that 90.72% of the samples have a correct
170
- link between the test case and the corresponding focal method
171
-
172
- ## Contribution
173
- All thanks to the original authors.