File size: 11,055 Bytes
61790a1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
{
  "scope": "Tiny sanity check on operation families used in the original completion templates. NOT an unseen-task benchmark or a general coding accuracy claim. JavaScript/TypeScript tests check extracted arithmetic return expressions, not full-program correctness. HTML checks only balanced tags. No generated code was executed.",
  "summary": {
    "python": {
      "passed": 6,
      "total": 11
    },
    "javascript": {
      "passed": 7,
      "total": 11
    },
    "typescript": {
      "passed": 9,
      "total": 11
    },
    "html": {
      "balanced_tag_samples": 2,
      "total": 4
    }
  },
  "results": [
    {
      "language": "python",
      "task": "add",
      "passed_safe_arithmetic_checks": true,
      "prefix": "def add(a, b):\n",
      "continuation": "    return a + b\n\n",
      "error": ""
    },
    {
      "language": "python",
      "task": "subtract",
      "passed_safe_arithmetic_checks": true,
      "prefix": "def subtract(a, b):\n",
      "continuation": "    return a - b\n\n",
      "error": ""
    },
    {
      "language": "python",
      "task": "multiply",
      "passed_safe_arithmetic_checks": true,
      "prefix": "def multiply(a, b):\n",
      "continuation": "    return a * b\n\n",
      "error": ""
    },
    {
      "language": "python",
      "task": "average",
      "passed_safe_arithmetic_checks": true,
      "prefix": "def average(a, b):\n",
      "continuation": "    return (a + b) / 2\n\n",
      "error": ""
    },
    {
      "language": "python",
      "task": "maximum",
      "passed_safe_arithmetic_checks": true,
      "prefix": "def maximum(a, b):\n",
      "continuation": "    return a if a > b else b\n\n",
      "error": ""
    },
    {
      "language": "python",
      "task": "minimum",
      "passed_safe_arithmetic_checks": true,
      "prefix": "def minimum(a, b):\n",
      "continuation": "    return a if a < b else b\n\n",
      "error": ""
    },
    {
      "language": "python",
      "task": "square",
      "passed_safe_arithmetic_checks": false,
      "prefix": "def square(a):\n",
      "continuation": "    return a * b\n\n",
      "error": "Expression outside the safe arithmetic subset"
    },
    {
      "language": "python",
      "task": "absolute",
      "passed_safe_arithmetic_checks": false,
      "prefix": "def absolute(a):\n",
      "continuation": "    return abs(n)\n\n",
      "error": "Expression outside the safe arithmetic subset"
    },
    {
      "language": "python",
      "task": "increment",
      "passed_safe_arithmetic_checks": false,
      "prefix": "def increment(a):\n",
      "continuation": "    return a + b\n\n",
      "error": "Expression outside the safe arithmetic subset"
    },
    {
      "language": "python",
      "task": "decrement",
      "passed_safe_arithmetic_checks": false,
      "prefix": "def decrement(a):\n",
      "continuation": "    return a - b\n\n",
      "error": "Expression outside the safe arithmetic subset"
    },
    {
      "language": "python",
      "task": "is_even",
      "passed_safe_arithmetic_checks": false,
      "prefix": "def is_even(a):\n",
      "continuation": "    return a + b\n\n",
      "error": "Expression outside the safe arithmetic subset"
    },
    {
      "language": "javascript",
      "task": "add",
      "passed_safe_arithmetic_checks": true,
      "prefix": "function add(a, b) {\n",
      "continuation": "  return a + b;\n}\n\n",
      "error": ""
    },
    {
      "language": "javascript",
      "task": "subtract",
      "passed_safe_arithmetic_checks": true,
      "prefix": "function subtract(a, b) {\n",
      "continuation": "  return a - b;\n}\n\n",
      "error": ""
    },
    {
      "language": "javascript",
      "task": "multiply",
      "passed_safe_arithmetic_checks": true,
      "prefix": "function multiply(a, b) {\n",
      "continuation": "  return a * b;\n}\n\n",
      "error": ""
    },
    {
      "language": "javascript",
      "task": "average",
      "passed_safe_arithmetic_checks": true,
      "prefix": "function average(a, b) {\n",
      "continuation": "  return (a + b) / 2;\n}\n\n",
      "error": ""
    },
    {
      "language": "javascript",
      "task": "maximum",
      "passed_safe_arithmetic_checks": true,
      "prefix": "function maximum(a, b) {\n",
      "continuation": "  return a > b ? a : b;\n}\n\n",
      "error": ""
    },
    {
      "language": "javascript",
      "task": "minimum",
      "passed_safe_arithmetic_checks": true,
      "prefix": "function minimum(a, b) {\n",
      "continuation": "  return a < b ? a : b;\n}\n\n",
      "error": ""
    },
    {
      "language": "javascript",
      "task": "square",
      "passed_safe_arithmetic_checks": false,
      "prefix": "function square(a) {\n",
      "continuation": "  return a * y;\n}\n\n",
      "error": "Expression outside the safe arithmetic subset"
    },
    {
      "language": "javascript",
      "task": "absolute",
      "passed_safe_arithmetic_checks": false,
      "prefix": "function absolute(a) {\n",
      "continuation": "  return Math.abs(n);\n}\n\n",
      "error": "Expression outside the safe arithmetic subset"
    },
    {
      "language": "javascript",
      "task": "increment",
      "passed_safe_arithmetic_checks": false,
      "prefix": "function increment(a) {\n",
      "continuation": "  return a + b;\n}\n\n",
      "error": "Expression outside the safe arithmetic subset"
    },
    {
      "language": "javascript",
      "task": "decrement",
      "passed_safe_arithmetic_checks": true,
      "prefix": "function decrement(a) {\n",
      "continuation": "  return a - 1;\n}\n\n",
      "error": ""
    },
    {
      "language": "javascript",
      "task": "is_even",
      "passed_safe_arithmetic_checks": false,
      "prefix": "function is_even(a) {\n",
      "continuation": "  return a - left;\n}\n\n",
      "error": "Expression outside the safe arithmetic subset"
    },
    {
      "language": "typescript",
      "task": "add",
      "passed_safe_arithmetic_checks": true,
      "prefix": "function add(a: number, b: number): number {\n",
      "continuation": "  return a + b;\n}\n\n",
      "error": ""
    },
    {
      "language": "typescript",
      "task": "subtract",
      "passed_safe_arithmetic_checks": true,
      "prefix": "function subtract(a: number, b: number): number {\n",
      "continuation": "  return a - b;\n}\n\n",
      "error": ""
    },
    {
      "language": "typescript",
      "task": "multiply",
      "passed_safe_arithmetic_checks": true,
      "prefix": "function multiply(a: number, b: number): number {\n",
      "continuation": "  return a * b;\n}\n\n",
      "error": ""
    },
    {
      "language": "typescript",
      "task": "average",
      "passed_safe_arithmetic_checks": true,
      "prefix": "function average(a: number, b: number): number {\n",
      "continuation": "  return (a + b) / 2;\n}\n\n",
      "error": ""
    },
    {
      "language": "typescript",
      "task": "maximum",
      "passed_safe_arithmetic_checks": true,
      "prefix": "function maximum(a: number, b: number): number {\n",
      "continuation": "  return a > b ? a : b;\n}\n\n",
      "error": ""
    },
    {
      "language": "typescript",
      "task": "minimum",
      "passed_safe_arithmetic_checks": true,
      "prefix": "function minimum(a: number, b: number): number {\n",
      "continuation": "  return a < b ? a : b;\n}\n\n",
      "error": ""
    },
    {
      "language": "typescript",
      "task": "square",
      "passed_safe_arithmetic_checks": false,
      "prefix": "function square(a: number): number {\n",
      "continuation": "  return a * left;\n}\n\n",
      "error": "Expression outside the safe arithmetic subset"
    },
    {
      "language": "typescript",
      "task": "absolute",
      "passed_safe_arithmetic_checks": false,
      "prefix": "function absolute(a: number): number {\n",
      "continuation": "  return Math.abs(number);\n}\n\n",
      "error": "Expression outside the safe arithmetic subset"
    },
    {
      "language": "typescript",
      "task": "increment",
      "passed_safe_arithmetic_checks": true,
      "prefix": "function increment(a: number): number {\n",
      "continuation": "  return a + 1;\n}\n\n",
      "error": ""
    },
    {
      "language": "typescript",
      "task": "decrement",
      "passed_safe_arithmetic_checks": true,
      "prefix": "function decrement(a: number): number {\n",
      "continuation": "  return a - 1;\n}\n\n",
      "error": ""
    },
    {
      "language": "typescript",
      "task": "is_even",
      "passed_safe_arithmetic_checks": true,
      "prefix": "function is_even(a: number): boolean {\n",
      "continuation": "  return a % 2 === 0;\n}\n\n",
      "error": ""
    }
  ],
  "html_samples": [
    {
      "prefix": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n",
      "continuation": "  <meta charset=\"utf-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n  <title>Gallery 38</title>\n</head>\n<body>\n  <main>\n    <form action=\"/submit\" method=\"post\">\n      <label for=\"name\">Name</label>\n      <input id=\"name\" name=\"name\" type=\"text\" required>\n      <button type=\"submit\">Send</button>\n    </form>\n  </main>\n</body>\n</html>\n\n",
      "balanced_tags": true,
      "unclosed_tags": [],
      "errors": []
    },
    {
      "prefix": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"utf-8\">\n  <title>Demo</title>\n</head>\n<body>\n",
      "continuation": "  <main>\n    <form action=\"/submit\" method=\"post\">\n      <label for=\"name\">Name</label>\n      <input id=\"name\" name=\"name\" type=\"text\" required>\n      <button type=\"submit\">Send</button>\n    </form>\n  </main>\n</body>\n</html>\n\n",
      "balanced_tags": true,
      "unclosed_tags": [],
      "errors": []
    },
    {
      "prefix": "<form action=\"/submit\" method=\"post\">\n",
      "continuation": "      <label for=\"name\">Name</label>\n      <input id=\"name\" name=\"name\" type=\"text\" required>\n      <button type=\"submit\">Send</button>\n    </form>\n  </main>\n</body>\n</html>\n\n",
      "balanced_tags": false,
      "unclosed_tags": [],
      "errors": [
        "Unexpected closing tag main",
        "Unexpected closing tag body",
        "Unexpected closing tag html"
      ]
    },
    {
      "prefix": "<ul>\n",
      "continuation": "  <li>One</li>\n      <li>Oranges</li>\n    </ul>\n  </main>\n</body>\n</html>\n\n",
      "balanced_tags": false,
      "unclosed_tags": [],
      "errors": [
        "Unexpected closing tag main",
        "Unexpected closing tag body",
        "Unexpected closing tag html"
      ]
    }
  ]
}