File size: 86,674 Bytes
cff65dd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
{
 "checkpoint": "LFM-250M-CodeEnhanced",
 "base": "LiquidAI/LFM2.5-230M",
 "protocol": {
  "decoding": "greedy, chat template, per-language token budgets (Python 220, C 260, HTML 420)",
  "dev_set": "31 tasks = 12 HumanEval + 19 hand-written (used for model selection)",
  "confirmation_set": "53 tasks = 40 different HumanEval problems + 13 new hand-written tasks (never used for selection)",
  "checks": "generated code executed in a sandboxed subprocess (python -I, node, gcc -O1) against unit tests; HTML parsed for well-formedness and required elements; instruction tasks matched against output-format regexes"
 },
 "dev": {
  "summary": {
   "n": 31,
   "baseline_exec": 9,
   "candidate_exec": 13,
   "fixed": 6,
   "broken": 2
  },
  "baseline": {
   "exec_rate": 0.2903225806451613,
   "code_syntax_rate": 0.9285714285714286,
   "humaneval_pass_at_1": 0.08333333333333333,
   "nll": {
    "code": 1.5782920320828755,
    "general": 3.1935455203056335
   }
  },
  "candidate": {
   "exec_rate": 0.41935483870967744,
   "code_syntax_rate": 0.9285714285714286,
   "humaneval_pass_at_1": 0.16666666666666666,
   "nll": {
    "code": 1.5889519453048706,
    "general": 3.1689701676368713
   }
  },
  "per_category_baseline": {
   "c": {
    "n": 3,
    "syntax": 0.6666666666666666,
    "exec": 0.3333333333333333
   },
   "debug": {
    "n": 3,
    "syntax": 1.0,
    "exec": 0.0
   },
   "html": {
    "n": 3,
    "syntax": 0.6666666666666666,
    "exec": 0.6666666666666666
   },
   "instruction": {
    "n": 3,
    "syntax": 0.3333333333333333,
    "exec": 0.3333333333333333
   },
   "javascript": {
    "n": 4,
    "syntax": 1.0,
    "exec": 0.5
   },
   "python": {
    "n": 15,
    "syntax": 1.0,
    "exec": 0.2
   }
  },
  "per_category_candidate": {
   "c": {
    "n": 3,
    "syntax": 1.0,
    "exec": 0.3333333333333333
   },
   "debug": {
    "n": 3,
    "syntax": 1.0,
    "exec": 0.6666666666666666
   },
   "html": {
    "n": 3,
    "syntax": 0.6666666666666666,
    "exec": 0.6666666666666666
   },
   "instruction": {
    "n": 3,
    "syntax": 0.6666666666666666,
    "exec": 0.6666666666666666
   },
   "javascript": {
    "n": 4,
    "syntax": 0.75,
    "exec": 0.75
   },
   "python": {
    "n": 15,
    "syntax": 1.0,
    "exec": 0.2
   }
  },
  "tasks": [
   {
    "id": "he_HumanEval_98",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "fixed",
    "baseline_output": "```python\ndef count_upper(s):\n    return sum(1 for char in s if char.isupper() and (char.lower() in 'aeiou' or char == 'A' and char != 'e'))\n```",
    "candidate_output": "```python\ndef count_upper(s):\n    count = 0\n    for i in range(0, len(s), 2):\n        if s[i] in 'AEIOU':\n            count += 1\n    return count\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 19, in <module>\n  File \"<stdin>\", line 9, in check\nAssertionError",
    "candidate_detail": "PASS"
   },
   {
    "id": "he_HumanEval_107",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef even_odd_palindrome(n):\n    return (n // 2, n % 2)\n```",
    "candidate_output": "```python\ndef even_odd_palindrome(n):\n    count_even = 0\n    count_odd = 0\n    for i in range(1, n + 1):\n        if i % 2 == 0:\n            count_even += 1\n        else:\n            count_odd += 1\n    return (count_even, count_odd)\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 19, in <module>\n  File \"<stdin>\", line 7, in check\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 26, in <module>\n  File \"<stdin>\", line 14, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_10",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef make_palindrome(string: str) -> str:\n    \"\"\" Find the shortest palindrome that begins with a supplied string.\n    Algorithm idea is simple:\n    - Find the longest postfix of supplied string that is a palindrome.\n    - Append to the end of a string prefix that comes before the palindromic suffix.\n    >>> make_palindrome('')\n    ''\n    >>> make_palindrome('cat')\n    'catac'\n    >>> make_palindrome('cata')\n    'catac'\n    \"\"\"\n```",
    "candidate_output": "```python\ndef is_palindrome(string: str) -> bool:\n    \"\"\" Test if given string is a palindrome \"\"\"\n    return string == string[::-1]\n\n\ndef make_palindrome(string: str) -> str:\n    \"\"\" Find the shortest palindrome that begins with a supplied string.\n    Algorithm idea is simple:\n    - Find the longest postfix of supplied string that is a palindrome.\n    - Append to the end of a string prefix that comes before the palindromic suffix.\n    >>> make_palindrome('')\n    ''\n    >>> make_palindrome('cat')\n    'catac'\n    >>> make_palindrome('cata')\n    'catac'\n    \"\"\"\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 29, in <module>\n  File \"<stdin>\", line 23, in check\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 34, in <module>\n  File \"<stdin>\", line 28, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_66",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef digitSum(s):\n    return sum(ord(c) for c in s)\n```",
    "candidate_output": "```python\ndef digitSum(s):\n    return sum(int(ch) for ch in s if 97 <= ch <= 122)\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 21, in <module>\n  File \"<stdin>\", line 9, in check\nAssertionError: Error",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 21, in <module>\n  File \"<stdin>\", line 9, in check\n  File \"<stdin>\", line 2, in digitSum\n  File \"<stdin>\", line 2, in <genexpr>\nTypeError: '<=' not supported between instances of 'int' and 'str'"
   },
   {
    "id": "he_HumanEval_130",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef tri(n):\n    return [tri(i) for i in range(1, n+1)]\n```",
    "candidate_output": "```python\ndef tribonacci(n):\n    if n == 0:\n        return []\n    elif n == 1:\n        return [0]\n    elif n == 2:\n        return [0, 1]\n    else:\n        a, b = 0, 1\n        for _ in range(3, n+1):\n            a, b = b, a + b\n        return b\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 21, in <module>\n  File \"<stdin>\", line 8, in check\n  File \"<stdin>\", line 2, in tri\n  File \"<stdin>\", line 2, in tri\n  File \"<stdin>\", line 2, in tri\n  [Previous line repeated 995 more times]\nRecursionError: maximum recursion depth exceeded",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 31, in <module>\nNameError: name 'tri' is not defined"
   },
   {
    "id": "he_HumanEval_124",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef valid_date(date):\n    return len(date) == 1 and 1 <= len(date) <= 31 and 1 <= len(date) <= 30 and 1 <= len(date) <= 29\n```",
    "candidate_output": "```python\ndef valid_date(date):\n    if not date:\n        return False\n    days = len(date)\n    if (days < 1 or days > 31) or (days < 1 or days > 30) or (days < 2):\n        return False\n    months = [31 if m == 2 else m - 1 for m in range(3)]\n    return (months[0] <= date[0] <= months[1]) and (months[1] <= date[1] <= months[2])\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 39, in <module>\n  File \"<stdin>\", line 7, in check\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 45, in <module>\n  File \"<stdin>\", line 13, in check\n  File \"<stdin>\", line 8, in valid_date\nTypeError: '<=' not supported between instances of 'int' and 'str'"
   },
   {
    "id": "he_HumanEval_103",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef rounded_avg(n, m):\n    if n > m:\n        return -1\n    return round((n + m) / 2)\n```",
    "candidate_output": "```python\ndef rounded_avg(n, m):\n    if n > m:\n        return -1\n    return round((n + m) / 2, 2)\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 26, in <module>\n  File \"<stdin>\", line 9, in check\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 26, in <module>\n  File \"<stdin>\", line 9, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_77",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef iscube(a):\n    return a == a ** 3\n```",
    "candidate_output": "```python\ndef iscube(a):\n    return a == int(a ** 0.5) ** 2\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 20, in <module>\n  File \"<stdin>\", line 10, in check\nAssertionError: Fourth test error: False",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 20, in <module>\n  File \"<stdin>\", line 9, in check\n  File \"<stdin>\", line 2, in iscube\nTypeError: int() argument must be a string, a bytes-like object or a real number, not 'complex'"
   },
   {
    "id": "he_HumanEval_122",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef add_elements(arr, k):\n    return sum(int(x) for x in arr[:k] + arr[k:])\n```",
    "candidate_output": "```python\ndef add_elements(arr, k):\n    res = 0\n    for i in range(k):\n        res += int(arr[i]) * (10 ** (i - 1))\n    return res\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 16, in <module>\n  File \"<stdin>\", line 7, in check\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 19, in <module>\n  File \"<stdin>\", line 10, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_91",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef is_bored(S):\n    return S.startswith('I')\n```",
    "candidate_output": "```python\ndef is_bored(S):\n    return S.split('I')[0].lower() == 'b'\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 18, in <module>\n  File \"<stdin>\", line 8, in check\nAssertionError: Test 2",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 18, in <module>\n  File \"<stdin>\", line 9, in check\nAssertionError: Test 3"
   },
   {
    "id": "he_HumanEval_149",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef sorted_list_sum(lst):\n    return sorted(lst, key=len)\n```",
    "candidate_output": "```python\ndef sorted_list_sum(lst):\n    return sorted(lst, key=lambda x: (len(x), x))\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 18, in <module>\n  File \"<stdin>\", line 7, in check\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 18, in <module>\n  File \"<stdin>\", line 7, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_55",
    "category": "python",
    "baseline_exec": true,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef fib(n: int):\n    if n <= 0:\n        return 0\n    elif n == 1:\n        return 1\n    else:\n        a, b = 0, 1\n        for _ in range(2, n + 1):\n            a, b = b, a + b\n        return b\n```",
    "candidate_output": "```python\ndef fib(n: int) -> int:\n    if n <= 0:\n        return 0\n    elif n == 1:\n        return 1\n    else:\n        a, b = 0, 1\n        for _ in range(2, n + 1):\n            a, b = b, a + b\n        return b\n```",
    "baseline_detail": "PASS",
    "candidate_detail": "PASS"
   },
   {
    "id": "py_palindrome",
    "category": "python",
    "baseline_exec": true,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "def is_palindrome(s):\n    s = ''.join(c for c in s if c.isalnum()).lower()\n    return s == s[::-1]",
    "candidate_output": "```python\ndef is_palindrome(s):\n    s = ''.join(c for c in s if c.isalnum()).lower()\n    return s == s[::-1]\n```",
    "baseline_detail": "PASS",
    "candidate_detail": "PASS"
   },
   {
    "id": "py_merge",
    "category": "python",
    "baseline_exec": true,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "broken",
    "baseline_output": "```python\ndef merge_intervals(intervals):\n    if not intervals:\n        return []\n    \n    # Sort intervals by start time\n    intervals.sort(key=lambda x: x[0])\n    \n    merged = [intervals[0]]\n    for current in intervals[1:]:\n        last = merged[-1]\n        if current[0] <= last[1]:  # Overlapping intervals\n            merged[-1][1] = max(last[1], current[1])\n        else:\n            merged.append(current)\n    \n    return merged\n```",
    "candidate_output": "```python\ndef merge_intervals(intervals):\n    if not intervals:\n        return []\n\n    # Sort the intervals by their start time\n    intervals.sort(key=lambda x: x[0])\n\n    merged = [intervals[0]]\n\n    for current in intervals[1:]:\n        last_merged = merged[-1]\n        if current[0] <= last_merged[1]:  # Overlapping intervals\n            merged[-1] = (last_merged[0], max(last_merged[1], current[1]))\n        else:\n            merged.append(current)\n\n    return merged\n```",
    "baseline_detail": "PASS",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 20, in <module>\nAssertionError"
   },
   {
    "id": "py_wordcount",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\nimport string\n\ndef word_count(text):\n    words = text.split()\n    frequency = {}\n    for word in words:\n        cleaned_word = ''.join(char for char in word if char.isalnum() or char == string.punctuation)\n        frequency[cleaned_word] = frequency.get(cleaned_word, 0) + 1\n    return frequency\n```",
    "candidate_output": "```python\nimport re\nfrom collections import Counter\n\ndef word_count(text):\n    words = re.findall(r'\\b\\w+\\b', text)\n    return dict(Counter(words))\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 12, in <module>\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 9, in <module>\nAssertionError"
   },
   {
    "id": "js_reverse",
    "category": "javascript",
    "baseline_exec": true,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```javascript\nfunction reverseString(s) {\n    return s.split('').reverse().join('');\n}\n```",
    "candidate_output": "```javascript\nfunction reverseString(s) {\n  return s.split('').reverse().join('');\n}\n```",
    "baseline_detail": "PASS",
    "candidate_detail": "PASS"
   },
   {
    "id": "js_even_sum",
    "category": "javascript",
    "baseline_exec": false,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "fixed",
    "baseline_output": "```javascript\nfunction sumEven(nums) {\n    return nums.reduce((a, b) => a + b, 0);\n}\n```",
    "candidate_output": "```javascript\nfunction sumEven(nums) {\n  return nums.filter(num => num % 2 === 0).reduce((a, b) => a + b, 0);\n}\n```",
    "baseline_detail": "one",
    "candidate_detail": "PASS"
   },
   {
    "id": "js_capitalize",
    "category": "javascript",
    "baseline_exec": false,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "fixed",
    "baseline_output": "```javascript\nfunction capitalizeWords(str) {\n    return str.split(' ').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join('');\n}\n```",
    "candidate_output": "```javascript\nfunction capitalizeWords(str) {\n  return str.split(' ').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ');\n}\n```",
    "baseline_detail": "one",
    "candidate_detail": "PASS"
   },
   {
    "id": "js_flatten",
    "category": "javascript",
    "baseline_exec": true,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": false,
    "flip": "broken",
    "baseline_output": "```javascript\nfunction flatten(arr) {\n  return arr.reduce((acc, curr) => acc.concat(curr), []);\n}\n```",
    "candidate_output": "```javascript\nfunction flatten(arr) {\n  return arr.reduce((acc, curr) => acc.concat(curr), []));\n}\n```",
    "baseline_detail": "PASS",
    "candidate_detail": " at Object..js (node:internal/modules/cjs/loader:1961:10)\n    at Module.load (node:internal/modules/cjs/loader:1553:32)\n    at Module._load (node:internal/modules/cjs/loader:1355:12)\n    at wrapModuleLoad (node:internal/modules/cjs/loader:255:19)\n    at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:154:5)\n    at node:internal/main/run_main_module:33:47\n\nNode.js v24.15.0"
   },
   {
    "id": "html_click",
    "category": "html",
    "baseline_exec": true,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Clicked!</title>\n    <style>\n        h1 {\n            color: #333;\n            text-align: center;\n            margin-top: 50px;\n        }\n    </style>\n</head>\n<body>\n    <h1>Clicked!</h1>\n    <button id=\"btn\">Click Me</button>\n    <script>\n        document.getElementById('btn').addEventListener('click', function() {\n            alert('Button clicked!');\n        });\n    </script>\n</body>\n</html>",
    "candidate_output": "```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Clicked!</title>\n    <style>\n        body {\n            font-family: Arial, sans-serif;\n            background-color: #f4f4f4;\n            color: #333;\n            text-align: center;\n            padding: 20px;\n        }\n        h1 {\n            margin-top: 0;\n            text-align: center;\n            color: #007BFF;\n        }\n        button {\n            padding: 10px 20px;\n            font-size: 16px;\n            cursor: pointer;\n        }\n    </style>\n</head>\n<body>\n    <h1>Clicked!</h1>\n    <button id=\"btn\">Click Me</button>\n    <script>\n        document.getElementById('btn').addEventListener('click', function() {\n            alert('Button clicked!');\n        });\n    </script>\n</body>\n</html>\n```",
    "baseline_detail": "ok | inline_js_syntax=True",
    "candidate_detail": "ok | inline_js_syntax=True"
   },
   {
    "id": "html_form",
    "category": "html",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": false,
    "candidate_syntax": false,
    "flip": "same",
    "baseline_output": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>HTML Form</title>\n    <style>\n        body {\n            font-family: Arial, sans-serif;\n            background-color: #f4f4f4;\n            margin: 0;\n            padding: 20px;\n        }\n        form {\n            max-width: 400px;\n            margin: auto;\n            background-color: #fff;\n            padding: 20px;\n            border-radius: 8px;\n            box-shadow: 0 2px 5px rgba(0,0,0,0.1);\n        }\n        label {\n            display: block;\n            margin-top: 10px;\n            color: #333;\n        }\n        input {\n            width: 100%;\n            padding: 10px;\n            border: 1px solid #ccc;\n            border-radius: 4px;\n            font-size: 16px;\n        }\n        button {\n            width: 100%;\n            padding: 10px;\n            background-color: #007BFF;\n            color: #fff;\n            border: none;\n            border-radius: 4px;\n            cursor: pointer;\n        }\n        button:hover {\n            background-color: #0056b3;\n        }\n    </style>\n</head>\n<body>\n    <h1>HTML Form</h1>\n    <form>\n        <label for=\"name\">Name:</label>\n        <input type=\"text\" id=\"name\" name=\"name\" required>\n        <br>\n        <label for=\"email\">Email:</label>\n        <input type=\"email\" id=\"email\" name=\"email\" required>\n        <br>\n        <label for=\"message\">Message:</label>\n        <textarea id=\"message\" name=\"message\" required></textarea>\n        <br>\n       ",
    "candidate_output": "```html\n<!DOCTYPE html>\n<html>\n<head>\n    <title>HTML Form</title>\n</head>\n<body>\n    <h1>Create a Simple Form</h1>\n    <form action=\"#\" method=\"post\">\n        <label for=\"name\">Name:</label>\n        <input type=\"text\" id=\"name\" name=\"name\" required>\n        <br>\n        <label for=\"email\">Email:</label>\n        <input type=\"email\" id=\"email\" name=\"email\" required>\n        <br>\n        <label for=\"message\">Message:</label>\n        <textarea id=\"message\" name=\"message\" rows=\"4\" cols=\"50\"></textarea>\n        <br>\n        <input type=\"submit\" value=\"Submit\">\n    </form>\n</body>\n</html>\n```",
    "baseline_detail": "problems=['unclosed: html,body,form'] missing=['button']",
    "candidate_detail": "problems=[] missing=['button']"
   },
   {
    "id": "html_grid",
    "category": "html",
    "baseline_exec": true,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<title>Grid Layout Example</title>\n<style>\n  .grid {\n    display: grid;\n    grid-template-columns: repeat(3, 1fr);\n    gap: 10px;\n  }\n</style>\n</head>\n<body>\n\n<div class=\"grid\">\n  <div class=\"card\">Card 1</div>\n  <div class=\"card\">Card 2</div>\n  <div class=\"card\">Card 3</div>\n</div>\n\n</body>\n</html>",
    "candidate_output": "```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Grid Layout Example</title>\n    <style>\n        .grid {\n            display: grid;\n            grid-template-columns: repeat(3, 1fr);\n            gap: 10px;\n        }\n        .card {\n            background-color: #f0f0f0;\n            padding: 20px;\n            border-radius: 5px;\n            box-shadow: 0 2px 5px rgba(0,0,0,0.1);\n        }\n    </style>\n</head>\n<body>\n    <div class=\"grid\">\n        <div class=\"card\">Card 1</div>\n        <div class=\"card\">Card 2</div>\n        <div class=\"card\">Card 3</div>\n    </div>\n</body>\n</html>\n```",
    "baseline_detail": "ok",
    "candidate_detail": "ok"
   },
   {
    "id": "c_array_sum",
    "category": "c",
    "baseline_exec": true,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```c\nint arr_sum(int *a, int n) {\n    int sum = 0;\n    for (int i = 0; i < n; i++) {\n        sum += a[i];\n    }\n    return sum;\n}\n```",
    "candidate_output": "```c\n#include <stdio.h>\n\nint arr_sum(int *a, int n) {\n    int sum = 0;\n    for (int i = 0; i < n; i++) {\n        sum += a[i];\n    }\n    return sum;\n}\n```",
    "baseline_detail": "PASS",
    "candidate_detail": "PASS"
   },
   {
    "id": "c_vowels",
    "category": "c",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```c\n#include <ctype.h>\n\nint count_vowels(const char *s) {\n    int count = 0;\n    for (int i = 0; i < strlen(s); i++) {\n        if (isalpha(s[i])) {\n            count++;\n        }\n    }\n    return count;\n}\n```",
    "candidate_output": "```c\n#include <ctype.h>\nint count_vowels(const char *s) {\n    int count = 0;\n    for (int i = 0; i < strlen(s); i++) {\n        if (isalpha(s[i])) {\n            count++;\n        }\n    }\n    return count;\n}\n```",
    "baseline_detail": "",
    "candidate_detail": ""
   },
   {
    "id": "c_reverse_str",
    "category": "c",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": false,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```c\nvoid reverse_str(char *s) {\n    int left = 0;\n    int right = s.length - 1;\n    while (left < right) {\n        char temp = s[left];\n        s[left] = s[right];\n        s[right] = temp;\n        left++;\n        right--;\n    }\n}\n```",
    "candidate_output": "```c\n#include <stdio.h>\n#include <string.h>\n\nvoid reverse_str(char *s) {\n    int len = strlen(s);\n    for (int i = len - 1; i > 0; i--) {\n        char temp = s[i];\n        s[i] = s[0];\n        s[0] = temp;\n    }\n}\n```",
    "baseline_detail": "compile: C:\\Users\\ANUMIT~1\\AppData\\Local\\Temp\\dsh-Isunb4\\tmp4gwqmpvo\\m.c: In function 'reverse_str':\nC:\\Users\\ANUMIT~1\\AppData\\Local\\Temp\\dsh-Isunb4\\tmp4gwqmpvo\\m.c:6:18: error: request for member 'length' in something not a structure or union\n    6 |     int right = s.length - 1;\n      |                  ^",
    "candidate_detail": ""
   },
   {
    "id": "dbg_index",
    "category": "debug",
    "baseline_exec": false,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "fixed",
    "baseline_output": "```python\ndef last(xs):\n    return xs[-1]\n```",
    "candidate_output": "```python\ndef last(xs):\n    return xs[-1] if len(xs) > 0 else None\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 6, in <module>\n  File \"<stdin>\", line 2, in last\nIndexError: list index out of range",
    "candidate_detail": "PASS"
   },
   {
    "id": "dbg_offbyone",
    "category": "debug",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "def total(xs):\n    s = 0\n    for i in range(len(xs) - 1):\n        s += xs[i]\n    return s",
    "candidate_output": "```python\ndef total(xs):\n    s = 0\n    for i in range(len(xs) - 1):\n        s += xs[i]\n    return s\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 7, in <module>\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 8, in <module>\nAssertionError"
   },
   {
    "id": "dbg_js_coerce",
    "category": "debug",
    "baseline_exec": false,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "fixed",
    "baseline_output": "function same(a, b) { return a == b; }",
    "candidate_output": "```javascript\nfunction same(a, b) {\n    return a === b;\n}\n```",
    "baseline_detail": "b",
    "candidate_detail": "PASS"
   },
   {
    "id": "ins_one_word",
    "category": "instruction",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": false,
    "candidate_syntax": false,
    "flip": "same",
    "baseline_output": "which_keyword",
    "candidate_output": "which_keyword",
    "baseline_detail": "missing ^def$",
    "candidate_detail": "missing ^def$"
   },
   {
    "id": "ins_json",
    "category": "instruction",
    "baseline_exec": false,
    "candidate_exec": true,
    "baseline_syntax": false,
    "candidate_syntax": true,
    "flip": "fixed",
    "baseline_output": "```json\n{\"language\": \"python\"}\n```",
    "candidate_output": "{\"language\": \"python\"}",
    "baseline_detail": "missing ^\\s*\\{\\s*\"language\"\\s*:; forbidden ```",
    "candidate_detail": "ok"
   },
   {
    "id": "ins_bullets",
    "category": "instruction",
    "baseline_exec": true,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "- List of Python data structures: `list`, `dict`, `set`  \n- Tuple: `tuple`  \n- Ordered list: `list` or `deque` (for efficient append/remove operations)  ",
    "candidate_output": "- List: `list`, `dict`, `set`  \n- Data structure: `tuple`, `collections.Counter`, `OrderedDict`  \n- Data structure: `defaultdict`, `namedtuple`, `namedclass`",
    "baseline_detail": "ok",
    "candidate_detail": "ok"
   }
  ]
 },
 "confirmation": {
  "summary": {
   "n": 53,
   "baseline_exec": 12,
   "candidate_exec": 16,
   "fixed": 4,
   "broken": 0
  },
  "baseline": {
   "exec_rate": 0.22641509433962265,
   "code_syntax_rate": 0.9230769230769231,
   "humaneval_pass_at_1": 0.1,
   "nll": {
    "code": 1.5782920320828755,
    "general": 3.1935455203056335
   }
  },
  "candidate": {
   "exec_rate": 0.3018867924528302,
   "code_syntax_rate": 0.9615384615384616,
   "humaneval_pass_at_1": 0.15,
   "nll": {
    "code": 1.5889519453048706,
    "general": 3.1689701676368713
   }
  },
  "per_category_baseline": {
   "c": {
    "n": 2,
    "syntax": 1.0,
    "exec": 1.0
   },
   "debug": {
    "n": 2,
    "syntax": 0.5,
    "exec": 0.0
   },
   "html": {
    "n": 2,
    "syntax": 1.0,
    "exec": 1.0
   },
   "instruction": {
    "n": 1,
    "syntax": 0.0,
    "exec": 0.0
   },
   "javascript": {
    "n": 3,
    "syntax": 1.0,
    "exec": 0.6666666666666666
   },
   "python": {
    "n": 43,
    "syntax": 0.9302325581395349,
    "exec": 0.13953488372093023
   }
  },
  "per_category_candidate": {
   "c": {
    "n": 2,
    "syntax": 1.0,
    "exec": 1.0
   },
   "debug": {
    "n": 2,
    "syntax": 1.0,
    "exec": 0.5
   },
   "html": {
    "n": 2,
    "syntax": 1.0,
    "exec": 1.0
   },
   "instruction": {
    "n": 1,
    "syntax": 0.0,
    "exec": 0.0
   },
   "javascript": {
    "n": 3,
    "syntax": 1.0,
    "exec": 1.0
   },
   "python": {
    "n": 43,
    "syntax": 0.9534883720930233,
    "exec": 0.18604651162790697
   }
  },
  "tasks": [
   {
    "id": "he_HumanEval_86",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef anti_shuffle(s):\n    return ' '.join(word for word in s.split() if word != '')\n```",
    "candidate_output": "```python\ndef anti_shuffle(s):\n    return ' '.join(word for word in s.split() if word != '' and word != ' ')\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 18, in <module>\n  File \"<stdin>\", line 8, in check\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 18, in <module>\n  File \"<stdin>\", line 8, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_39",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef prime_fib(n: int):\n    def is_prime(num):\n        if num <= 1:\n            return False\n        for i in range(2, int(num**0.5) + 1):\n            if num % i == 0:\n                return False\n        return True\n\n    fib = [0, 1]\n    while fib[-1] < n:\n        fib.append(fib[-1] + fib[-2])\n    return fib[n]\n```",
    "candidate_output": "```python\ndef prime_fib(n: int) -> int:\n    if n == 0 or n == 1:\n        return 2\n    a, b = 0, 1\n    for _ in range(2, n + 1):\n        a, b = b, a + b\n    return b\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 33, in <module>\n  File \"<stdin>\", line 21, in check\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 27, in <module>\n  File \"<stdin>\", line 16, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_109",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef move_one_ball(arr):\n    return arr == sorted(arr)\n```",
    "candidate_output": "```python\ndef move_one_ball(arr):\n    n = len(arr)\n    for i in range(n // 2):\n        if arr[i] > arr[n - 1 - i]:\n            arr[i], arr[n - 1 - i] = arr[n - 1 - i], arr[i]\n    return True\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 14, in <module>\n  File \"<stdin>\", line 7, in check\nAssertionError: This prints if this assert fails 1 (good for debugging!)",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 18, in <module>\n  File \"<stdin>\", line 13, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_13",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef greatest_common_divisor(a: int, b: int) -> int:\n    return abs(a * b) // gcd(a, b)\n```",
    "candidate_output": "```python\ndef greatest_common_divisor(a: int, b: int) -> int:\n    if a == 0 or b == 0:\n        return 0\n    gcd = abs(a * b) // gcd(a, b)\n    for i in range(gcd + 1):\n        if (a % i) == 0 and (b % i) == 0:\n            return i\n    return gcd\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 18, in <module>\n  File \"<stdin>\", line 13, in check\n  File \"<stdin>\", line 2, in greatest_common_divisor\nNameError: name 'gcd' is not defined",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 24, in <module>\n  File \"<stdin>\", line 19, in check\n  File \"<stdin>\", line 4, in greatest_common_divisor\nUnboundLocalError: cannot access local variable 'gcd' where it is not associated with a value"
   },
   {
    "id": "he_HumanEval_19",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\nfrom typing import List\n\ndef sort_numbers(numbers: str) -> str:\n    \"\"\" Input is a space-delimited string of numberals from 'zero' to 'nine'.\n    Valid choices are 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight' and 'nine'.\n    Return the string with numbers sorted from smallest to largest\n    >>> sort_numbers('three one five')\n    'one three five'\n    \"\"\"\n```",
    "candidate_output": "```python\nfrom typing import List\n\ndef sort_numbers(numbers: str) -> str:\n    \"\"\" Input is a space-delimited string of numberals from 'zero' to 'nine'.\n    Valid choices are 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight' and 'nine'.\n    Return the string with numbers sorted from smallest to largest\n    >>> sort_numbers('three one five')\n    'one three five'\n    \"\"\"\n    return ' '.join(sorted(numbers))\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 26, in <module>\n  File \"<stdin>\", line 20, in check\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 27, in <module>\n  File \"<stdin>\", line 22, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_148",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef bf(planet1, planet2):\n    planets = [\"Mercury\", \"Venus\", \"Earth\", \"Mars\", \"Jupiter\", \"Saturn\", \"Uranus\", \"Neptune\"]\n    for planet in planets:\n        if planet1 <= planet <= planet2:\n            return (planet,)\n    return ()\n```",
    "candidate_output": "```python\ndef bf(planet1, planet2):\n    planets = [\"Mercury\", \"Venus\", \"Earth\", \"Mars\", \"Jupiter\", \"Saturn\", \"Uranus\", \"Neptune\"]\n    for i in range(len(planets)):\n        if (planet1 == planets[i] and planet2 == planets[(i + 1) % len(planets)]):\n            return (planets[i], planets[(i + 1) % len(planets)])\n    return ()\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 23, in <module>\n  File \"<stdin>\", line 11, in check\nAssertionError: First test error: 1",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 23, in <module>\n  File \"<stdin>\", line 11, in check\nAssertionError: First test error: 0"
   },
   {
    "id": "he_HumanEval_25",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\nfrom typing import List\n\ndef factorize(n: int) -> List[int]:\n    \"\"\" Return list of prime factors of given integer in the order from smallest to largest.\n    Each of the factors should be listed number of times corresponding to how many times it appears in factorization.\n    Input number should be equal to the product of all factors\n    >>> factorize(8)\n    [2, 2, 2]\n    >>> factorize(25)\n    [5, 5]\n    >>> factorize(70)\n    [2, 5, 7]\n    \"\"\"\n```",
    "candidate_output": "```python\nfrom typing import List\n\ndef factorize(n: int) -> List[int]:\n    \"\"\" Return list of prime factors of given integer in the order from smallest to largest.\n    Each of the factors should be listed number of times corresponding to how many times it appears in factorization.\n    Input number should be equal to the product of all factors\n    >>> factorize(8)\n    [2, 2, 2]\n    >>> factorize(25)\n    [5, 5]\n    >>> factorize(70)\n    [2, 5, 7]\n    \"\"\"\n    factors = []\n    for i in range(1, n + 1):\n        if n % i == 0:\n            factors.append(i)\n            if i != n // i:\n                factors.append(n // i)\n    return factors\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 33, in <module>\n  File \"<stdin>\", line 24, in check\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 40, in <module>\n  File \"<stdin>\", line 31, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_99",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": false,
    "flip": "same",
    "baseline_output": "```python\ndef closest_integer(value):\n    return int(round(value))\n```",
    "candidate_output": "```python\ndef closest_integer(value):\n    '''\n    Create a function that takes a value (string) representing a number\n    and returns the closest integer to it. If the number is equidistant\n    from two integers, round it away from zero.\n\n    Examples\n    >>> closest_integer(\"10\")\n    10\n    >>> closest_integer(\"15.3\")\n    15\n\n    Note:\n    Rounding away from zero means that if the given number is equidistant\n    from two integers, the one you should return is the one that is the\n    farthest from zero. For example closest_integer(\"14.5\") should\n    return 15 and closest_integer(\"-14.5\") should return -15.\n    ''\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 16, in <module>\n  File \"<stdin>\", line 7, in check\n  File \"<stdin>\", line 2, in closest_integer\nTypeError: type str doesn't define __round__ method",
    "candidate_detail": "File \"<stdin>\", line 2\n    '''\n    ^\nSyntaxError: unterminated triple-quoted string literal (detected at line 33)"
   },
   {
    "id": "he_HumanEval_15",
    "category": "python",
    "baseline_exec": true,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef string_sequence(n: int) -> str:\n    return ' '.join(str(i) for i in range(n+1))\n```",
    "candidate_output": "```python\ndef string_sequence(n: int) -> str:\n    return ' '.join(str(i) for i in range(n + 1))\n```",
    "baseline_detail": "PASS",
    "candidate_detail": "PASS"
   },
   {
    "id": "he_HumanEval_140",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef fix_spaces(text):\n    return text.replace(' ', '_')\n```",
    "candidate_output": "```python\ndef fix_spaces(text):\n    return ''.join(chr(65 + i) for i, ch in enumerate(text))\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 16, in <module>\n  File \"<stdin>\", line 12, in check\nAssertionError: This prints if this assert fails 4 (good for debugging!)",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 16, in <module>\n  File \"<stdin>\", line 7, in check\nAssertionError: This prints if this assert fails 1 (good for debugging!)"
   },
   {
    "id": "he_HumanEval_56",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef correct_bracketing(brackets: str):\n    \"\"\" brackets is a string of \"<\" and \">\".\n    return True if every opening bracket has a corresponding closing bracket.\n\n    >>> correct_bracketing(\"<\")\n    False\n    >>> correct_bracketing(\"<>\")\n    True\n    >>> correct_bracketing(\"<<><>>\")\n    True\n    >>> correct_bracketing(\"><<>\")\n    False\n    \"\"\"\n```",
    "candidate_output": "```python\ndef correct_bracketing(brackets: str) -> bool:\n    stack = []\n    for bracket in brackets:\n        if bracket == '(':\n            stack.append(bracket)\n        elif bracket == ')':\n            if not stack:\n                return False\n            stack.pop()\n    return len(stack) == 0\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 35, in <module>\n  File \"<stdin>\", line 21, in check\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 32, in <module>\n  File \"<stdin>\", line 22, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_9",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\nfrom typing import List, Tuple\n\ndef rolling_max(numbers: List[int]) -> List[int]:\n    max_so_far = numbers[0]\n    for num in numbers:\n        if num > max_so_far:\n            max_so_far = num\n    return [max_so_far]\n```",
    "candidate_output": "```python\nfrom typing import List, Tuple\n\ndef rolling_max(numbers: List[int]) -> List[int]:\n    max_so_far = numbers[0]\n    for num in numbers[1:]:\n        if num > max_so_far:\n            max_so_far = num\n    return [max_so_far]\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 24, in <module>\n  File \"<stdin>\", line 19, in check\n  File \"<stdin>\", line 4, in rolling_max\nIndexError: list index out of range",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 24, in <module>\n  File \"<stdin>\", line 19, in check\n  File \"<stdin>\", line 4, in rolling_max\nIndexError: list index out of range"
   },
   {
    "id": "he_HumanEval_23",
    "category": "python",
    "baseline_exec": true,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef strlen(string: str) -> int:\n    return len(string)\n```",
    "candidate_output": "```python\ndef strlen(string: str) -> int:\n    return len(string)\n```",
    "baseline_detail": "PASS",
    "candidate_detail": "PASS"
   },
   {
    "id": "he_HumanEval_119",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": false,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef match_parens(lst):\n    return 'Yes' if all(s == '(' for s in lst) and all(s == ')') for s in lst\n```",
    "candidate_output": "```python\ndef match_parens(lst):\n    stack = []\n    for s in lst:\n        if s == '(':\n            stack.append(s)\n        elif s == ')':\n            if not stack:\n                return False\n            stack.pop()\n    return len(stack) == 0\n```",
    "baseline_detail": "File \"<stdin>\", line 2\n    return 'Yes' if all(s == '(' for s in lst) and all(s == ')') for s in lst\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nSyntaxError: expected 'else' after 'if' expression",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 32, in <module>\n  File \"<stdin>\", line 15, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_115",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef max_fill(grid, capacity):\n    rows = len(grid)\n    cols = len(grid[0])\n    min_bucket_capacity = min(capacity, rows * cols)\n    return sum(1 for i in range(rows) if grid[i][0] == 0 and grid[i][cols-1] == 0)\n```",
    "candidate_output": "```python\ndef max_fill(grid, capacity):\n    rows = len(grid)\n    cols = len(grid[0])\n    dp = [[0 for _ in range(cols)] for _ in range(rows)]\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                dp[i][j] = min(dp[i-1][j], dp[i][j-1]) + 1\n    return sum(dp[rows-1][cols-1])\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 22, in <module>\n  File \"<stdin>\", line 12, in check\nAssertionError: Error",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 26, in <module>\n  File \"<stdin>\", line 16, in check\n  File \"<stdin>\", line 9, in max_fill\nTypeError: 'int' object is not iterable"
   },
   {
    "id": "he_HumanEval_18",
    "category": "python",
    "baseline_exec": true,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef how_many_times(string: str, substring: str) -> int:\n    return sum(1 for i in range(len(string)) if string[i:i+len(substring)] == substring)\n```",
    "candidate_output": "```python\ndef how_many_times(string: str, substring: str) -> int:\n    count = 0\n    for i in range(len(string)):\n        if string[i:i+len(substring)] == substring:\n            count += 1\n    return count\n```",
    "baseline_detail": "PASS",
    "candidate_detail": "PASS"
   },
   {
    "id": "he_HumanEval_63",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef fibfib(n: int):\n    if n <= 0:\n        return 0\n    elif n == 1 or n == 2:\n        return 0\n    else:\n        fib = [0] * (n + 1)\n        fib[0] = 0\n        fib[1] = 0\n        fib[2] = 1\n        for i in range(3, n + 1):\n            fib[i] = fib[i - 1] + fib[i - 2] + fib[i - 3]\n        return fib[n]\n```",
    "candidate_output": "```python\ndef fibfib(n):\n    if n == 0:\n        return 0\n    elif n == 1:\n        return 0\n    elif n == 2:\n        return 1\n    else:\n        a, b = 0, 1\n        for _ in range(3, n+1):\n            a, b = b, a + b\n        return b\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 30, in <module>\n  File \"<stdin>\", line 21, in check\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 29, in <module>\n  File \"<stdin>\", line 22, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_24",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef largest_divisor(n: int) -> int:\n    return n\n```",
    "candidate_output": "```python\ndef largest_divisor(n: int) -> int:\n    if n < 1:\n        return None\n    for i in range(1, n + 1):\n        if n % i == 0:\n            return i\n    return n\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 19, in <module>\n  File \"<stdin>\", line 13, in check\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 24, in <module>\n  File \"<stdin>\", line 20, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_116",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "fixed",
    "baseline_output": "```python\ndef sort_array(arr):\n    return sorted(arr, key=lambda x: bin(x).count('1'))\n```",
    "candidate_output": "```python\ndef sort_array(arr):\n    def count_ones(n):\n        return bin(n).count('1')\n    \n    arr.sort(key=lambda x: (count_ones(x), x))\n    return arr\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 21, in <module>\n  File \"<stdin>\", line 8, in check\nAssertionError",
    "candidate_detail": "PASS"
   },
   {
    "id": "he_HumanEval_16",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef count_distinct_characters(string: str) -> int:\n    return len(set(string))\n```",
    "candidate_output": "```python\ndef count_distinct_characters(string: str) -> int:\n    return len(set(string))\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 19, in <module>\n  File \"<stdin>\", line 15, in check\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 19, in <module>\n  File \"<stdin>\", line 15, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_32",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": false,
    "candidate_syntax": false,
    "flip": "same",
    "baseline_output": "```python\nimport math\n\ndef poly(xs: list, x: float):\n    \"\"\"\n    Evaluates polynomial with coefficients xs at point x.\n    return xs[0] + xs[1] * x + xs[1] * x^2 + .... xs[n] * x^n\n    \"\"\"\n    return sum([coeff * math.pow(x, i) for i, coeff in enumerate(xs)])\n\ndef find_zero(xs: list):\n    \"\"\" xs are coefficients of a polynomial.\n    find_zero find z such that poly(x) = 0.\n    find_zero returns only zero point, even if there are many.\n    Moreover, find_zero only takes list xs having even number of coefficients\n    and largest non zero coefficient as it guarantees\n    a solution.\n    >>> round(find_zero([1, 2]), 2) # f(x) = 1 + 2x\n    -0.5\n    >>> round(find_zero([-6",
    "candidate_output": "```python\nimport math\n\ndef poly(xs: list, x: float):\n    \"\"\"\n    Evaluates polynomial with coefficients xs at point x.\n    return xs[0] + xs[1] * x + xs[1] * x^2 + .... xs[n] * x^n\n    \"\"\"\n    return sum([coeff * math.pow(x, i) for i, coeff in enumerate(xs)])\n\ndef find_zero(xs: list):\n    \"\"\" xs are coefficients of a polynomial.\n    find_zero find x such that poly(x) = 0.\n    find_zero returns only zero point, even if there are many.\n    Moreover, find_zero only takes list xs having even number of coefficients\n    and largest non zero coefficient as it guarantees\n    a solution.\n    >>> round(find_zero([1, 2]), 2) # f(x) = 1 + 2x\n    -0.5\n    >>> round(find_zero([-6",
    "baseline_detail": "File \"<stdin>\", line 12\n    \"\"\" xs are coefficients of a polynomial.\n    ^\nSyntaxError: unterminated triple-quoted string literal (detected at line 44)",
    "candidate_detail": "File \"<stdin>\", line 12\n    \"\"\" xs are coefficients of a polynomial.\n    ^\nSyntaxError: unterminated triple-quoted string literal (detected at line 44)"
   },
   {
    "id": "he_HumanEval_59",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "fixed",
    "baseline_output": "```python\ndef largest_prime_factor(n: int):\n    if n <= 1:\n        return None\n    for i in range(2, int(n**0.5) + 1):\n        if n % i == 0:\n            return i\n    return n\n```",
    "candidate_output": "```python\ndef largest_prime_factor(n: int) -> int:\n    i = 2\n    while i * i <= n:\n        if n % i:\n            i += 1\n        else:\n            n //= i\n    return n\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 22, in <module>\n  File \"<stdin>\", line 15, in check\nAssertionError",
    "candidate_detail": "PASS"
   },
   {
    "id": "he_HumanEval_143",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": false,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef words_in_sentence(sentence):\n    words = sentence.split()\n    primes = [num for num in range(2, len(words)) if all(num % i != 0 for i in range(2, int(num**0.5)+1)))\n    return ' '.join(words)\n```",
    "candidate_output": "```python\ndef words_in_sentence(sentence):\n    import re\n    words = re.findall(r'\\b\\w+\\b', sentence)\n    primes = [num for num in words if num > 1 and all(num % i != 0 for i in range(2, int(num**0.5) + 1))]\n    return ' '.join(primes)\n```",
    "baseline_detail": "File \"<stdin>\", line 3\n    primes = [num for num in range(2, len(words)) if all(num % i != 0 for i in range(2, int(num**0.5)+1)))\n                                                                                                         ^\nSyntaxError: closing parenthesis ')' does not match opening parenthesis '['",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 21, in <module>\n  File \"<stdin>\", line 10, in check\n  File \"<stdin>\", line 4, in words_in_sentence\nTypeError: '>' not supported between instances of 'str' and 'int'"
   },
   {
    "id": "he_HumanEval_161",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef solve(s):\n    return s[::-1]\n```",
    "candidate_output": "```python\ndef solve(s):\n    result = \"\"\n    for char in s:\n        if 'a' <= char <= 'z':\n            result += char.upper()\n        elif 'A' <= char <= 'Z':\n            result += char.lower()\n        else:\n            result += char\n    return result\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 20, in <module>\n  File \"<stdin>\", line 7, in check\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 28, in <module>\n  File \"<stdin>\", line 16, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_160",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef do_algebra(operator, operand):\n    result = 0\n    for i in range(len(operator)):\n        if operator[i] == '+':\n            result += operand[i]\n        elif operator[i] == '-':\n            result -= operand[i]\n        elif operator[i] == '*':\n            result *= operand[i]\n        elif operator[i] == '/':\n            result = result // operand[i]\n        elif operator[i] == '//':\n            result = result % operand[i]\n        elif operator[i] == '**':\n            result = result ** operand[i]\n    return result\n```",
    "candidate_output": "```python\ndef do_algebra(operator, operand):\n    result = 0\n    for i in range(len(operand)):\n        if operator[i] == '+':\n            result += operand[i + 1]\n        elif operator[i] == '-':\n            result -= operand[i + 1]\n        elif operator[i] == '*':\n            result *= operand[i + 1]\n        elif operator[i] == '/':\n            result = result // operand[i + 1]\n        elif operator[i] == '//':\n            result = result % operand[i + 1]\n        elif operator[i] == '**':\n            result = result ** operand[i + 1]\n    return result\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 29, in <module>\n  File \"<stdin>\", line 21, in check\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 29, in <module>\n  File \"<stdin>\", line 21, in check\n  File \"<stdin>\", line 4, in do_algebra\nIndexError: list index out of range"
   },
   {
    "id": "he_HumanEval_135",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef can_arrange(arr):\n    for i in range(len(arr) - 1):\n        if arr[i] > arr[i + 1]:\n            return i\n    return -1\n```",
    "candidate_output": "```python\ndef can_arrange(arr):\n    arr.sort()\n    for i in range(len(arr) - 1):\n        if arr[i] > arr[i + 1]:\n            return i\n    return -1\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 19, in <module>\n  File \"<stdin>\", line 10, in check\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 20, in <module>\n  File \"<stdin>\", line 11, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_29",
    "category": "python",
    "baseline_exec": true,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\nfrom typing import List\n\ndef filter_by_prefix(strings: List[str], prefix: str) -> List[str]:\n    return [s for s in strings if s.startswith(prefix)]\n```",
    "candidate_output": "```python\nfrom typing import List\n\ndef filter_by_prefix(strings: List[str], prefix: str) -> List[str]:\n    return [s for s in strings if s.startswith(prefix)]\n```",
    "baseline_detail": "PASS",
    "candidate_detail": "PASS"
   },
   {
    "id": "he_HumanEval_5",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\nfrom typing import List\n\ndef intersperse(numbers: List[int], delimeter: int) -> List[int]:\n    return numbers + [delimeter] * (len(numbers) - len(delimeter))\n```",
    "candidate_output": "```python\nfrom typing import List\n\ndef intersperse(numbers: List[int], delimeter: int) -> List[int]:\n    result = []\n    for i in range(len(numbers) - 1):\n        result.append(numbers[i] + delimeter)\n    return result\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 19, in <module>\n  File \"<stdin>\", line 15, in check\n  File \"<stdin>\", line 4, in intersperse\nTypeError: object of type 'int' has no len()",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 22, in <module>\n  File \"<stdin>\", line 19, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_74",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef total_match(lst1, lst2):\n    return lst1 if len(lst1) < len(lst2) else lst2\n```",
    "candidate_output": "```python\ndef total_match(lst1, lst2):\n    return sorted(lst1) + sorted(lst2)\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 23, in <module>\n  File \"<stdin>\", line 13, in check\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 23, in <module>\n  File \"<stdin>\", line 9, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_117",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef select_words(s, n):\n    return [word for word in s.split() if len(set(word.lower()) - set('consonant')) == n]\n```",
    "candidate_output": "```python\ndef select_words(s, n):\n    result = []\n    for i in range(len(s)):\n        if s[i].isalpha() and s[i].isupper():\n            for j in range(i + 1, len(s)):\n                if s[j].islower():\n                    result.append(s[i])\n    return result\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 19, in <module>\n  File \"<stdin>\", line 7, in check\nAssertionError: First test error: []",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 25, in <module>\n  File \"<stdin>\", line 13, in check\nAssertionError: First test error: ['M', 'M', 'M', 'M', 'M', 'M', 'M', 'M', 'M', 'M', 'M', 'M', 'M', 'M', 'M', 'M', 'M']"
   },
   {
    "id": "he_HumanEval_147",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef get_max_triples(n):\n    return sum(1 for i in range(1, n) if (i % 3 == 0 and i != 0) or (i % 3 == 1 and i != 0) or (i % 3 == 2 and i != 0))\n```",
    "candidate_output": "```python\ndef get_max_triples(n):\n    count = 0\n    for i in range(1, n+1):\n        for j in range(i+1, n+1):\n            for k in range(j+1, n+1):\n                if (i + j + k) % 3 == 0:\n                    count += 1\n    return count\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 11, in <module>\n  File \"<stdin>\", line 6, in check\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 17, in <module>\n  File \"<stdin>\", line 12, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_38",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef decode_cyclic(s: str):\n    return decode_cyclic(s)\n```",
    "candidate_output": "```python\ndef encode_cyclic(s: str):\n    groups = [s[(3 * i):min((3 * i + 3), len(s))] for i in range((len(s) + 2) // 3)] \n    groups = [(group[1:] + group[0]) if len(group) == 3 else group for group in groups]\n    return \"\".join(groups)\n\ndef decode_cyclic(s: str):\n    return encode_cyclic(s)\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 20, in <module>\n  File \"<stdin>\", line 16, in check\nNameError: name 'encode_cyclic' is not defined. Did you mean: 'decode_cyclic'?",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 25, in <module>\n  File \"<stdin>\", line 22, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_54",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef same_chars(s0: str, s1: str):\n    return s0 == s1\n```",
    "candidate_output": "```python\ndef same_chars(s0: str, s1: str) -> bool:\n    return s0 == s1\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 19, in <module>\n  File \"<stdin>\", line 10, in check\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 19, in <module>\n  File \"<stdin>\", line 10, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_159",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef eat(number, need, remaining):\n    return [total for total in range(remaining + 1) if total >= need]\n```",
    "candidate_output": "```python\ndef eat(number, need, remaining):\n    if remaining == 0:\n        return [number]\n    else:\n        return [total - (number * need) for total in remaining]\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 19, in <module>\n  File \"<stdin>\", line 8, in check\nAssertionError: Error",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 22, in <module>\n  File \"<stdin>\", line 11, in check\n  File \"<stdin>\", line 5, in eat\nTypeError: 'int' object is not iterable"
   },
   {
    "id": "he_HumanEval_72",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef will_it_fly(q, w):\n    return sum(q) <= w\n```",
    "candidate_output": "```python\ndef will_it_fly(q,w):\n    if len(q) != len(str(w)):\n        return False\n    for i in range(len(q)):\n        if q[i] != str(w[i])[::-1]:\n            return False\n    return True\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 18, in <module>\n  File \"<stdin>\", line 8, in check\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 23, in <module>\n  File \"<stdin>\", line 12, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_154",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef cycpattern_check(a, b):\n    return b in a[::-1] or b in a + b\n```",
    "candidate_output": "```python\ndef cycpattern_check(a, b):\n    for i in range(len(a)):\n        if (b == a[i] or a[i] == 'abc' and b == 'ab') or (b == 'ab' and a[i] == 'ba' or a[i] == 'bb'):\n            return True\n    return False\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 19, in <module>\n  File \"<stdin>\", line 11, in check\nAssertionError: test #0",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 22, in <module>\n  File \"<stdin>\", line 15, in check\nAssertionError: test #1"
   },
   {
    "id": "he_HumanEval_76",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef is_simple_power(x, n):\n    return int(n**x) == x\n```",
    "candidate_output": "```python\ndef is_simple_power(x, n):\n    return int(n) ** x == x\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 21, in <module>\n  File \"<stdin>\", line 7, in check\nAssertionError: This prints if this assert fails 1 (good for debugging!)",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 21, in <module>\n  File \"<stdin>\", line 7, in check\nAssertionError: This prints if this assert fails 1 (good for debugging!)"
   },
   {
    "id": "he_HumanEval_40",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef triples_sum_to_zero(l: list):\n    return len(set(l)) == 3\n```",
    "candidate_output": "```python\ndef triples_sum_to_zero(l: list) -> bool:\n    count = {}\n    for num in l:\n        if num in count:\n            count[num] += 1\n        else:\n            count[num] = 1\n    for num, freq in count.items():\n        if freq == 3:\n            return True\n    return False\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 21, in <module>\n  File \"<stdin>\", line 15, in check\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 30, in <module>\n  File \"<stdin>\", line 21, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_134",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef check_if_last_char_is_a_letter(txt):\n    return txt[-1] in 'abcdefghijklmnopqrstuvwxyz' and not any(char in txt for char in 'abcdefghijklmnopqrstuvwxyz')\n```",
    "candidate_output": "```python\ndef check_if_last_char_is_a_letter(txt):\n    return any(char.isalpha() and char != ' ' for char in txt)\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 22, in <module>\n  File \"<stdin>\", line 8, in check\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 22, in <module>\n  File \"<stdin>\", line 7, in check\nAssertionError"
   },
   {
    "id": "he_HumanEval_112",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef reverse_delete(s, c):\n    return (s[::-1], True)\n```",
    "candidate_output": "```python\ndef reverse_delete(s, c):\n    res = ''\n    for i in range(len(s)):\n        if s[i] != c[i]:\n            res += s[i]\n    return (res, True)\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 16, in <module>\n  File \"<stdin>\", line 6, in check\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 20, in <module>\n  File \"<stdin>\", line 10, in check\n  File \"<stdin>\", line 4, in reverse_delete\nIndexError: string index out of range"
   },
   {
    "id": "c2_py_flatten",
    "category": "python",
    "baseline_exec": true,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef flatten(nested):\n    result = []\n    for item in nested:\n        if isinstance(item, list):\n            result.extend(flatten(item))\n        else:\n            result.append(item)\n    return result\n```\n\nThis function uses a helper function `flatten` to recursively process each element in the input list. If an element is a list itself, it calls itself with that sublist as the new input. Otherwise, it appends the element to the result list. The final flattened list is returned.",
    "candidate_output": "```python\ndef flatten(nested):\n    result = []\n    for item in nested:\n        if isinstance(item, list):\n            result.extend(flatten(item))\n        else:\n            result.append(item)\n    return result\n```",
    "baseline_detail": "PASS",
    "candidate_detail": "PASS"
   },
   {
    "id": "c2_py_anagram",
    "category": "python",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef is_anagram(a, b):\n    return sorted(a.lower()) == sorted(b.lower())\n```",
    "candidate_output": "```python\ndef is_anagram(a, b):\n    return sorted(a.lower()) == sorted(b.lower())\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 6, in <module>\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 6, in <module>\nAssertionError"
   },
   {
    "id": "c2_py_bsearch",
    "category": "python",
    "baseline_exec": true,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef binary_search(xs, target):\n    left, right = 0, len(xs) - 1\n    while left <= right:\n        mid = (left + right) // 2\n        if xs[mid] == target:\n            return mid\n        elif xs[mid] < target:\n            left = mid + 1\n        else:\n            right = mid - 1\n    return -1\n```",
    "candidate_output": "```python\ndef binary_search(xs, target):\n    low = 0\n    high = len(xs) - 1\n    while low <= high:\n        mid = (low + high) // 2\n        if xs[mid] == target:\n            return mid\n        elif xs[mid] < target:\n            low = mid + 1\n        else:\n            high = mid - 1\n    return -1\n```",
    "baseline_detail": "PASS",
    "candidate_detail": "PASS"
   },
   {
    "id": "c2_js_unique",
    "category": "javascript",
    "baseline_exec": true,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```javascript\nfunction unique(arr) {\n    return [...new Set(arr)];\n}\n```",
    "candidate_output": "```javascript\nfunction unique(arr) {\n  let result = [];\n  for (let i = 0; i < arr.length; i++) {\n    if (!result.includes(arr[i])) {\n      result.push(arr[i]);\n    }\n  }\n  return result;\n}\n```",
    "baseline_detail": "PASS",
    "candidate_detail": "PASS"
   },
   {
    "id": "c2_js_factorial",
    "category": "javascript",
    "baseline_exec": false,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "fixed",
    "baseline_output": "```javascript\nfunction factorial(n) {\n    if (n < 0) return 0;\n    return n * factorial(n - 1);\n}\n```",
    "candidate_output": "```javascript\nfunction factorial(n) {\n  if (n < 0) return 0;\n  let result = 1;\n  for (let i = 2; i <= n; i++) {\n    result *= i;\n  }\n  return result;\n}\n```",
    "baseline_detail": "a",
    "candidate_detail": "PASS"
   },
   {
    "id": "c2_js_avg",
    "category": "javascript",
    "baseline_exec": true,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```javascript\nfunction average(nums) {\n    if (nums.length === 0) return 0;\n    return nums.reduce((a, b) => a + b, 0) / nums.length;\n}\n```",
    "candidate_output": "```javascript\nfunction average(nums) {\n  if (nums.length === 0) return 0;\n  return nums.reduce((a, b) => a + b, 0) / nums.length;\n}\n```",
    "baseline_detail": "PASS",
    "candidate_detail": "PASS"
   },
   {
    "id": "c2_html_list",
    "category": "html",
    "baseline_exec": true,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>HTML Page</title>\n    <style>\n        body {\n            font-family: Arial, sans-serif;\n            background-color: #f4f4f4;\n            color: #333;\n        }\n        ul {\n            list-style-type: none;\n            padding: 0;\n            margin: 0;\n            display: flex;\n            justify-content: space-around;\n        }\n        li {\n            border-bottom: 1px solid #ccc;\n        }\n    </style>\n</head>\n<body>\n    <ul>\n        <li>Item 1</li>\n        <li>Item 2</li>\n        <li>Item 3</li>\n    </ul>\n</body>\n</html>",
    "candidate_output": "```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>HTML Page</title>\n    <style>\n        body {\n            font-family: Arial, sans-serif;\n            background-color: #f4f4f4;\n            color: #333;\n        }\n        ul {\n            list-style-type: none;\n            padding: 0;\n            margin: 0;\n            display: flex;\n            gap: 20px;\n        }\n        li {\n            padding: 10px;\n            border-bottom: 1px solid #ddd;\n        }\n    </style>\n</head>\n<body>\n    <ul>\n        <li>Item 1</li>\n        <li>Item 2</li>\n        <li>Item 3</li>\n    </ul>\n</body>\n</html>\n```",
    "baseline_detail": "ok",
    "candidate_detail": "ok"
   },
   {
    "id": "c2_html_table",
    "category": "html",
    "baseline_exec": true,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>HTML Table Example</title>\n    <style>\n        table {\n            width: 100%;\n            border-collapse: collapse;\n        }\n        th, td {\n            border: 1px solid #ddd;\n            padding: 8px;\n            text-align: left;\n        }\n    </style>\n</head>\n<body>\n    <h2>Table Example</h2>\n    <table>\n        <thead>\n            <tr>\n                <th>Header 1</th>\n                <th>Header 2</th>\n                <th>Header 3</th>\n            </tr>\n        </thead>\n        <tbody>\n            <tr>\n                <td>Row 1 Data 1</td>\n                <td>Row 1 Data 2</td>\n                <td>Row 1 Data 3</td>\n            </tr>\n            <tr>\n                <td>Row 2 Data 1</td>\n                <td>Row 2 Data 2</td>\n                <td>Row 2 Data 4</td>\n            </tr>\n            <tr>\n                <td>Row 3 Data 1</td>\n                <td>Row 3 Data 3</td>\n                <td>Row 3 Data 5</td>\n            </tr>\n        </tbody>\n    </table>\n</body>\n</html>",
    "candidate_output": "```html\n<!DOCTYPE html>\n<html>\n<head>\n    <title>HTML Table Example</title>\n</head>\n<body>\n    <h1>Table Example</h1>\n    <table border=\"1\">\n        <thead>\n            <tr>\n                <th>Header 1</th>\n                <th>Header 2</th>\n                <th>Header 3</th>\n            </tr>\n        </thead>\n        <tbody>\n            <tr>\n                <td>Row 1 Data</td>\n                <td>Row 1 Data</td>\n                <td>Row 1 Data</td>\n            </tr>\n            <tr>\n                <td>Row 2 Data</td>\n                <td>Row 2 Data</td>\n                <td>Row 2 Data</td>\n            </tr>\n            <tr>\n                <td>Row 3 Data</td>\n                <td>Row 3 Data</td>\n                <td>Row 3 Data</td>\n            </tr>\n        </tbody>\n    </table>\n</body>\n</html>\n```",
    "baseline_detail": "ok",
    "candidate_detail": "ok"
   },
   {
    "id": "c2_c_max",
    "category": "c",
    "baseline_exec": true,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```c\nint arr_max(int *a, int n) {\n    int max = *a;\n    for (int i = 0; i < n; i++) {\n        if (a[i] > max) {\n            max = a[i];\n        }\n    }\n    return max;\n}\n```",
    "candidate_output": "```c\n#include <stdio.h>\n\nint arr_max(int *a, int n) {\n    int max = a[0];\n    for (int i = 1; i < n; i++) {\n        if (a[i] > max) {\n            max = a[i];\n        }\n    }\n    return max;\n}\n```",
    "baseline_detail": "PASS",
    "candidate_detail": "PASS"
   },
   {
    "id": "c2_c_pow",
    "category": "c",
    "baseline_exec": true,
    "candidate_exec": true,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```c\n#include <stdio.h>\n\nlong ipow(int base, int exp) {\n    long result = 1;\n    while (exp > 0) {\n        if (exp % 2 == 1) {\n            result *= base;\n        }\n        base *= base;\n        exp /= 2;\n    }\n    return result;\n}\n```",
    "candidate_output": "```c\n#include <stdio.h>\n\nlong ipow(int base, int exp) {\n    long result = 1;\n    for (int i = 0; i < exp; i++) {\n        result *= base;\n    }\n    return result;\n}\n```",
    "baseline_detail": "PASS",
    "candidate_detail": "PASS"
   },
   {
    "id": "c2_dbg_range",
    "category": "debug",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": true,
    "candidate_syntax": true,
    "flip": "same",
    "baseline_output": "```python\ndef last_index(xs):\n    return xs[-1]\n```",
    "candidate_output": "```python\ndef last_index(xs):\n    if not xs:\n        raise IndexError(\"List is empty\")\n    return xs[-1]\n```",
    "baseline_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 5, in <module>\nAssertionError",
    "candidate_detail": "Traceback (most recent call last):\n  File \"<stdin>\", line 7, in <module>\nAssertionError"
   },
   {
    "id": "c2_dbg_js_empty",
    "category": "debug",
    "baseline_exec": false,
    "candidate_exec": true,
    "baseline_syntax": false,
    "candidate_syntax": true,
    "flip": "fixed",
    "baseline_output": "function maxOf(nums) { return Math.max(...nums); }\n\nconsole.log(maxOf([], [])); // Output: null\nconsole.log(maxOf([1], [2])); // Output: 2\nconsole.log(maxOf([], [3])); // Output: -Infinity\nconsole.log(maxOf([], [4])); // Output: -Infinity\nconsole.log(maxOf([], [5])); // Output: -Infinity\nconsole.log(maxOf([], [6])); // Output: -Infinity\nconsole.log(maxOf([], [7])); // Output: -Infinity\nconsole.log(maxOf([], [])); // Output: null\n```",
    "candidate_output": "```javascript\nfunction maxOf(nums) {\n  if (nums.length === 0) {\n    return null;\n  }\n  return Math.max(...nums);\n}\n```",
    "baseline_detail": " at Object..js (node:internal/modules/cjs/loader:1961:10)\n    at Module.load (node:internal/modules/cjs/loader:1553:32)\n    at Module._load (node:internal/modules/cjs/loader:1355:12)\n    at wrapModuleLoad (node:internal/modules/cjs/loader:255:19)\n    at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:154:5)\n    at node:internal/main/run_main_module:33:47\n\nNode.js v24.15.0",
    "candidate_detail": "PASS"
   },
   {
    "id": "c2_ins_number",
    "category": "instruction",
    "baseline_exec": false,
    "candidate_exec": false,
    "baseline_syntax": false,
    "candidate_syntax": false,
    "flip": "same",
    "baseline_output": "To solve the problem of multiplying 17 by 23, we can use the standard multiplication method:\n\n\\[\n17 \\times 23 = 391\n\\]\n\nThus, the final answer is \\(\\boxed{391}\\).",
    "candidate_output": "The integer result is 391.",
    "baseline_detail": "missing ^\\s*391\\s*$",
    "candidate_detail": "missing ^\\s*391\\s*$"
   }
  ]
 },
 "format_aware_nll": {
  "baseline": {
   "checkpoint": "models/LFM2.5-230M",
   "mbpp_val_instruction_nll": 1.6333381235599518,
   "general_nll": 3.1935455203056335
  },
  "candidate": {
   "checkpoint": "checkpoints/cand_lora_a50",
   "mbpp_val_instruction_nll": 1.1460291700703757,
   "general_nll": 3.1689701676368713
  }
 },
 "combined": {
  "summary": {
   "n": 84,
   "baseline_exec": 21,
   "candidate_exec": 29,
   "fixed": 10,
   "broken": 2
  },
  "mcnemar_p": 0.0386
 }
}