diff --git "a/data/php-keep.json" "b/data/php-keep.json" deleted file mode 100644--- "a/data/php-keep.json" +++ /dev/null @@ -1,2417 +0,0 @@ -[ - { - "name": "HumanEval_24_largest_divisor", - "language": "php", - "prompt": ">> largest_divisor(15)\n// 5\nfunction largest_divisor($n) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_24_largest_divisor.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return largest_divisor(...$args);\n}\n\nfunction test(): void {\n if (candidate(3) !== 1) { throw new Exception(\"Test failed!\"); }\n if (candidate(7) !== 1) { throw new Exception(\"Test failed!\"); }\n if (candidate(10) !== 5) { throw new Exception(\"Test failed!\"); }\n if (candidate(100) !== 50) { throw new Exception(\"Test failed!\"); }\n if (candidate(49) !== 7) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_47_median", - "language": "php", - "prompt": ">> median([3, 1, 2, 4, 5])\n// 3\n// >>> median([-10, 4, 6, 1000, 10, 20])\n// 15.0\nfunction median($l) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_47_median.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return median(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(3, 1, 2, 4, 5)) !== 3) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(-10, 4, 6, 1000, 10, 20)) !== 8.0) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(5)) !== 5) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(6, 5)) !== 5.5) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(8, 1, 3, 9, 9, 2, 7)) !== 7) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_160_do_algebra", - "language": "php", - "prompt": " result = 9\n// Note:\n// The length of operator list is equal to the length of operand list minus one.\n// Operand is a list of of non-negative integers.\n// Operator list has at least one operator, and operand list has at least two operands.\nfunction do_algebra($operator, $operand) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_160_do_algebra.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return do_algebra(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(\"**\", \"*\", \"+\"), array(2, 3, 4, 5)) !== 37) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(\"+\", \"*\", \"-\"), array(2, 3, 4, 5)) !== 9) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(\"//\", \"*\"), array(7, 3, 4)) !== 8) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_35_max_element", - "language": "php", - "prompt": ">> max_element([1, 2, 3])\n// 3\n// >>> max_element([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])\n// 123\nfunction max_element($l) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_35_max_element.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return max_element(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(1, 2, 3)) !== 3) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(5, 3, -5, 2, -3, 3, 9, 0, 124, 1, -10)) !== 124) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_135_can_arrange", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_41_car_race_collision", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_134_check_if_last_char_is_a_letter", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_31_is_prime", - "language": "php", - "prompt": ">> is_prime(6)\n// False\n// >>> is_prime(101)\n// True\n// >>> is_prime(11)\n// True\n// >>> is_prime(13441)\n// True\n// >>> is_prime(61)\n// True\n// >>> is_prime(4)\n// False\n// >>> is_prime(1)\n// False\nfunction is_prime($n) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_31_is_prime.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return is_prime(...$args);\n}\n\nfunction test(): void {\n if (candidate(6) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(101) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(11) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(13441) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(61) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(4) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(1) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(5) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(11) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(17) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(85) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(77) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(255379) !== false) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_104_unique_digits", - "language": "php", - "prompt": ">> unique_digits([15, 33, 1422, 1])\n// [1, 15, 33]\n// >>> unique_digits([152, 323, 1422, 10])\n// []\nfunction unique_digits($x) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_104_unique_digits.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return unique_digits(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(15, 33, 1422, 1)) !== array(1, 15, 33)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(152, 323, 1422, 10)) !== array()) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(12345, 2033, 111, 151)) !== array(111, 151)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(135, 103, 31)) !== array(31, 135)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_11_string_xor", - "language": "php", - "prompt": ">> string_xor('010', '110')\n// '100'\nfunction string_xor($a, $b) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_11_string_xor.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return string_xor(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"111000\", \"101010\") !== \"010010\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"1\", \"1\") !== \"0\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"0101\", \"0000\") !== \"0101\") { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_60_sum_to_n", - "language": "php", - "prompt": ">> sum_to_n(30)\n// 465\n// >>> sum_to_n(100)\n// 5050\n// >>> sum_to_n(5)\n// 15\n// >>> sum_to_n(10)\n// 55\n// >>> sum_to_n(1)\n// 1\nfunction sum_to_n($n) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_60_sum_to_n.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return sum_to_n(...$args);\n}\n\nfunction test(): void {\n if (candidate(1) !== 1) { throw new Exception(\"Test failed!\"); }\n if (candidate(6) !== 21) { throw new Exception(\"Test failed!\"); }\n if (candidate(11) !== 66) { throw new Exception(\"Test failed!\"); }\n if (candidate(30) !== 465) { throw new Exception(\"Test failed!\"); }\n if (candidate(100) !== 5050) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_151_double_the_difference", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_23_strlen", - "language": "php", - "prompt": ">> strlen('')\n// 0\n// >>> strlen('abc')\n// 3\nfunction strlen($string) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_23_strlen.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return strlen(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"\") !== 0) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"x\") !== 1) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"asdasnakj\") !== 9) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_91_is_bored", - "language": "php", - "prompt": ">> is_bored(\"Hello world\")\n// 0\n// >>> is_bored(\"The sky is blue. The sun is shining. I love this weather\")\n// 1\nfunction is_bored($S) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_91_is_bored.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return is_bored(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"Hello world\") !== 0) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"Is the sky blue?\") !== 0) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"I love It !\") !== 1) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"bIt\") !== 0) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"I feel good today. I will be productive. will kill It\") !== 2) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"You and I are going for a walk\") !== 0) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_64_vowels_count", - "language": "php", - "prompt": ">> vowels_count(\"abcde\")\n// 2\n// >>> vowels_count(\"ACEDY\")\n// 3\nfunction vowels_count($s) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_64_vowels_count.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return vowels_count(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"abcde\") !== 2) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"Alone\") !== 3) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"key\") !== 2) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"bye\") !== 1) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"keY\") !== 2) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"bYe\") !== 1) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"ACEDY\") !== 3) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_55_fib", - "language": "php", - "prompt": ">> fib(10)\n// 55\n// >>> fib(1)\n// 1\n// >>> fib(8)\n// 21\nfunction fib($n) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_55_fib.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return fib(...$args);\n}\n\nfunction test(): void {\n if (candidate(10) !== 55) { throw new Exception(\"Test failed!\"); }\n if (candidate(1) !== 1) { throw new Exception(\"Test failed!\"); }\n if (candidate(8) !== 21) { throw new Exception(\"Test failed!\"); }\n if (candidate(11) !== 89) { throw new Exception(\"Test failed!\"); }\n if (candidate(12) !== 144) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_144_simplify", - "language": "php", - "prompt": "/ where both numerator and denominator are positive whole numbers.\n// You can assume that x, and n are valid fractions, and do not have zero as denominator.\n// simplify(\"1/5\", \"5/1\") = True\n// simplify(\"1/6\", \"2/1\") = False\n// simplify(\"7/10\", \"10/2\") = False\nfunction simplify($x, $n) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_144_simplify.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return simplify(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"1/5\", \"5/1\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"1/6\", \"2/1\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"5/1\", \"3/1\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"7/10\", \"10/2\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"2/10\", \"50/10\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"7/2\", \"4/2\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"11/6\", \"6/1\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"2/3\", \"5/2\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"5/2\", \"3/5\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"2/4\", \"8/4\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"2/4\", \"4/2\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"1/5\", \"5/1\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"1/5\", \"1/5\") !== false) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_98_count_upper", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_115_max_fill", - "language": "php", - "prompt": " 0 | 1\n// * 1 <= capacity <= 10\nfunction max_fill($grid, $capacity) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_115_max_fill.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return max_fill(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(array(0, 0, 1, 0), array(0, 1, 0, 0), array(1, 1, 1, 1)), 1) !== 6) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(array(0, 0, 1, 1), array(0, 0, 0, 0), array(1, 1, 1, 1), array(0, 1, 1, 1)), 2) !== 5) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(array(0, 0, 0), array(0, 0, 0)), 5) !== 0) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(array(1, 1, 1, 1), array(1, 1, 1, 1)), 2) !== 4) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(array(1, 1, 1, 1), array(1, 1, 1, 1)), 9) !== 2) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_120_maximum", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_93_encode", - "language": "php", - "prompt": ">> encode('test')\n// 'TGST'\n// >>> encode('This is a message')\n// 'tHKS KS C MGSSCGG'\nfunction encode($message) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_93_encode.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return encode(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"TEST\") !== \"tgst\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"Mudasir\") !== \"mWDCSKR\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"YES\") !== \"ygs\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"This is a message\") !== \"tHKS KS C MGSSCGG\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"I DoNt KnOw WhAt tO WrItE\") !== \"k dQnT kNqW wHcT Tq wRkTg\") { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_51_remove_vowels", - "language": "php", - "prompt": ">> remove_vowels('')\n// ''\n// >>> remove_vowels('abcdef')\n// 'bcdf'\n// >>> remove_vowels('aaaaa')\n// ''\n// >>> remove_vowels('aaBAA')\n// 'B'\n// >>> remove_vowels('zbcd')\n// 'zbcd'\nfunction remove_vowels($text) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_51_remove_vowels.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return remove_vowels(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"\") !== \"\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"abcdef\\nghijklm\") !== \"bcdf\\nghjklm\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"fedcba\") !== \"fdcb\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"eeeee\") !== \"\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"acBAA\") !== \"cB\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"EcBOO\") !== \"cB\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"ybcd\") !== \"ybcd\") { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_30_get_positive", - "language": "php", - "prompt": ">> get_positive([-1, 2, -4, 5, 6])\n// [2, 5, 6]\n// >>> get_positive([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])\n// [5, 3, 2, 3, 9, 123, 1]\nfunction get_positive($l) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_30_get_positive.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return get_positive(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(-1, -2, 4, 5, 6)) !== array(4, 5, 6)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(5, 3, -5, 2, 3, 3, 9, 0, 123, 1, -10)) !== array(5, 3, 2, 3, 3, 9, 123, 1)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(-1, -2)) !== array()) { throw new Exception(\"Test failed!\"); }\n if (candidate(array()) !== array()) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_15_string_sequence", - "language": "php", - "prompt": ">> string_sequence(0)\n// '0'\n// >>> string_sequence(5)\n// '0 1 2 3 4 5'\nfunction string_sequence($n) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_15_string_sequence.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return string_sequence(...$args);\n}\n\nfunction test(): void {\n if (candidate(0) !== \"0\") { throw new Exception(\"Test failed!\"); }\n if (candidate(3) !== \"0 1 2 3\") { throw new Exception(\"Test failed!\"); }\n if (candidate(10) !== \"0 1 2 3 4 5 6 7 8 9 10\") { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_100_make_a_pile", - "language": "php", - "prompt": ">> make_a_pile(3)\n// [3, 5, 7]\nfunction make_a_pile($n) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_100_make_a_pile.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return make_a_pile(...$args);\n}\n\nfunction test(): void {\n if (candidate(3) !== array(3, 5, 7)) { throw new Exception(\"Test failed!\"); }\n if (candidate(4) !== array(4, 6, 8, 10)) { throw new Exception(\"Test failed!\"); }\n if (candidate(5) !== array(5, 7, 9, 11, 13)) { throw new Exception(\"Test failed!\"); }\n if (candidate(6) !== array(6, 8, 10, 12, 14, 16)) { throw new Exception(\"Test failed!\"); }\n if (candidate(8) !== array(8, 10, 12, 14, 16, 18, 20, 22)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_112_reverse_delete", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_27_flip_case", - "language": "php", - "prompt": ">> flip_case('Hello')\n// 'hELLO'\nfunction flip_case($string) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_27_flip_case.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return flip_case(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"\") !== \"\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"Hello!\") !== \"hELLO!\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"These violent delights have violent ends\") !== \"tHESE VIOLENT DELIGHTS HAVE VIOLENT ENDS\") { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_161_solve", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_29_filter_by_prefix", - "language": "php", - "prompt": ">> filter_by_prefix([], 'a')\n// []\n// >>> filter_by_prefix(['abc', 'bcd', 'cde', 'array'], 'a')\n// ['abc', 'array']\nfunction filter_by_prefix($strings, $prefix) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_29_filter_by_prefix.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return filter_by_prefix(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(), \"john\") !== array()) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(\"xxx\", \"asd\", \"xxy\", \"john doe\", \"xxxAAA\", \"xxx\"), \"xxx\") !== array(\"xxx\", \"xxxAAA\", \"xxx\")) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_102_choose_num", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_143_words_in_sentence", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_5_intersperse", - "language": "php", - "prompt": ">> intersperse([], 4)\n// []\n// >>> intersperse([1, 2, 3], 4)\n// [1, 4, 2, 4, 3]\nfunction intersperse($numbers, $delimeter) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_5_intersperse.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return intersperse(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(), 7) !== array()) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(5, 6, 3, 2), 8) !== array(5, 8, 6, 8, 3, 8, 2)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(2, 2, 2), 2) !== array(2, 2, 2, 2, 2)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_76_is_simple_power", - "language": "php", - "prompt": " true\n// is_simple_power(2, 2) => true\n// is_simple_power(8, 2) => true\n// is_simple_power(3, 2) => false\n// is_simple_power(3, 1) => false\n// is_simple_power(5, 3) => false\nfunction is_simple_power($x, $n) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_76_is_simple_power.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return is_simple_power(...$args);\n}\n\nfunction test(): void {\n if (candidate(16, 2) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(143214, 16) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(4, 2) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(9, 3) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(16, 4) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(24, 2) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(128, 4) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(12, 6) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(1, 1) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(1, 12) !== true) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_75_is_multiply_prime", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_157_right_angle_triangle", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_92_any_int", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_33_sort_third", - "language": "php", - "prompt": ">> sort_third([1, 2, 3])\n// [1, 2, 3]\n// >>> sort_third([5, 6, 3, 4, 8, 9, 2])\n// [2, 6, 3, 4, 8, 9, 5]\nfunction sort_third($l) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_33_sort_third.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return sort_third(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(5, 6, 3, 4, 8, 9, 2)) !== array(2, 6, 3, 4, 8, 9, 5)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(5, 8, 3, 4, 6, 9, 2)) !== array(2, 8, 3, 4, 6, 9, 5)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(5, 6, 9, 4, 8, 3, 2)) !== array(2, 6, 9, 4, 8, 3, 5)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(5, 6, 3, 4, 8, 9, 2, 1)) !== array(2, 6, 3, 4, 8, 9, 5, 1)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_53_add", - "language": "php", - "prompt": ">> add(2, 3)\n// 5\n// >>> add(5, 7)\n// 12\nfunction add($x, $y) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_53_add.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return add(...$args);\n}\n\nfunction test(): void {\n if (candidate(0, 1) !== 1) { throw new Exception(\"Test failed!\"); }\n if (candidate(1, 0) !== 1) { throw new Exception(\"Test failed!\"); }\n if (candidate(2, 3) !== 5) { throw new Exception(\"Test failed!\"); }\n if (candidate(5, 7) !== 12) { throw new Exception(\"Test failed!\"); }\n if (candidate(7, 5) !== 12) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_69_search", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_82_prime_length", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_58_common", - "language": "php", - "prompt": ">> common([1, 4, 3, 34, 653, 2, 5], [5, 7, 1, 5, 9, 653, 121])\n// [1, 5, 653]\n// >>> common([5, 3, 2, 8], [3, 2])\n// [2, 3]\nfunction common($l1, $l2) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_58_common.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return common(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(1, 4, 3, 34, 653, 2, 5), array(5, 7, 1, 5, 9, 653, 121)) !== array(1, 5, 653)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(5, 3, 2, 8), array(3, 2)) !== array(2, 3)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(4, 3, 2, 8), array(3, 2, 4)) !== array(2, 3, 4)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(4, 3, 2, 8), array()) !== array()) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_139_special_factorial", - "language": "php", - "prompt": " 0\n// For example:\n// >>> special_factorial(4)\n// 288\n// The function will receive an integer as input and should return the special\n// factorial of this integer.\nfunction special_factorial($n) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_139_special_factorial.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return special_factorial(...$args);\n}\n\nfunction test(): void {\n if (candidate(4) !== 288) { throw new Exception(\"Test failed!\"); }\n if (candidate(5) !== 34560) { throw new Exception(\"Test failed!\"); }\n if (candidate(7) !== 125411328000) { throw new Exception(\"Test failed!\"); }\n if (candidate(1) !== 1) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_110_exchange", - "language": "php", - "prompt": " \"YES\"\n// exchange([1, 2, 3, 4], [1, 5, 3, 4]) => \"NO\"\n// It is assumed that the input lists will be non-empty.\nfunction exchange($lst1, $lst2) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_110_exchange.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return exchange(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(1, 2, 3, 4), array(1, 2, 3, 4)) !== \"YES\") { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 2, 3, 4), array(1, 5, 3, 4)) !== \"NO\") { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 2, 3, 4), array(2, 1, 4, 3)) !== \"YES\") { throw new Exception(\"Test failed!\"); }\n if (candidate(array(5, 7, 3), array(2, 6, 4)) !== \"YES\") { throw new Exception(\"Test failed!\"); }\n if (candidate(array(5, 7, 3), array(2, 6, 3)) !== \"NO\") { throw new Exception(\"Test failed!\"); }\n if (candidate(array(3, 2, 6, 1, 8, 9), array(3, 5, 5, 1, 1, 1)) !== \"NO\") { throw new Exception(\"Test failed!\"); }\n if (candidate(array(100, 200), array(200, 200)) !== \"YES\") { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_122_add_elements", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_150_x_or_y", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_45_triangle_area", - "language": "php", - "prompt": ">> triangle_area(5, 3)\n// 7.5\nfunction triangle_area($a, $h) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_45_triangle_area.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return triangle_area(...$args);\n}\n\nfunction test(): void {\n if (candidate(5, 3) !== 7.5) { throw new Exception(\"Test failed!\"); }\n if (candidate(2, 2) !== 2.0) { throw new Exception(\"Test failed!\"); }\n if (candidate(10, 8) !== 40.0) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_130_tri", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_119_match_parens", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_26_remove_duplicates", - "language": "php", - "prompt": ">> remove_duplicates([1, 2, 3, 2, 4])\n// [1, 3, 4]\nfunction remove_duplicates($numbers) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_26_remove_duplicates.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return remove_duplicates(...$args);\n}\n\nfunction test(): void {\n if (candidate(array()) !== array()) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 2, 3, 4)) !== array(1, 2, 3, 4)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 2, 3, 2, 4, 3, 5)) !== array(1, 4, 5)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_13_greatest_common_divisor", - "language": "php", - "prompt": ">> greatest_common_divisor(3, 5)\n// 1\n// >>> greatest_common_divisor(25, 15)\n// 5\nfunction greatest_common_divisor($a, $b) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_13_greatest_common_divisor.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return greatest_common_divisor(...$args);\n}\n\nfunction test(): void {\n if (candidate(3, 7) !== 1) { throw new Exception(\"Test failed!\"); }\n if (candidate(10, 15) !== 5) { throw new Exception(\"Test failed!\"); }\n if (candidate(49, 14) !== 7) { throw new Exception(\"Test failed!\"); }\n if (candidate(144, 60) !== 12) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_48_is_palindrome", - "language": "php", - "prompt": ">> is_palindrome('')\n// True\n// >>> is_palindrome('aba')\n// True\n// >>> is_palindrome('aaaaa')\n// True\n// >>> is_palindrome('zbcd')\n// False\nfunction is_palindrome($text) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_48_is_palindrome.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return is_palindrome(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"aba\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"aaaaa\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"zbcd\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"xywyx\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"xywyz\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"xywzx\") !== false) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_62_derivative", - "language": "php", - "prompt": ">> derivative([3, 1, 2, 4, 5])\n// [1, 4, 12, 20]\n// >>> derivative([1, 2, 3])\n// [2, 6]\nfunction derivative($xs) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_62_derivative.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return derivative(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(3, 1, 2, 4, 5)) !== array(1, 4, 12, 20)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 2, 3)) !== array(2, 6)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(3, 2, 1)) !== array(2, 2)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(3, 2, 1, 0, 4)) !== array(2, 2, 0, 16)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1)) !== array()) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_67_fruit_distribution", - "language": "php", - "prompt": "19 - 5 - 6 = 8\n// fruit_distribution(\"0 apples and 1 oranges\",3) -> 3 - 0 - 1 = 2\n// fruit_distribution(\"2 apples and 3 oranges\", 100) -> 100 - 2 - 3 = 95\n// fruit_distribution(\"100 apples and 1 oranges\",120) -> 120 - 100 - 1 = 19\nfunction fruit_distribution($s, $n) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_67_fruit_distribution.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return fruit_distribution(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"5 apples and 6 oranges\", 19) !== 8) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"5 apples and 6 oranges\", 21) !== 10) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"0 apples and 1 oranges\", 3) !== 2) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"1 apples and 0 oranges\", 3) !== 2) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"2 apples and 3 oranges\", 100) !== 95) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"2 apples and 3 oranges\", 5) !== 0) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"1 apples and 100 oranges\", 120) !== 19) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_77_iscube", - "language": "php", - "prompt": " True\n// iscube(2) ==> False\n// iscube(-1) ==> True\n// iscube(64) ==> True\n// iscube(0) ==> True\n// iscube(180) ==> False\nfunction iscube($a) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_77_iscube.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return iscube(...$args);\n}\n\nfunction test(): void {\n if (candidate(1) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(2) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(-1) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(64) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(180) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(1000) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(0) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(1729) !== false) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_116_sort_array", - "language": "php", - "prompt": ">> sort_array([1, 5, 2, 3, 4]) == [1, 2, 3, 4, 5]\n// >>> sort_array([-2, -3, -4, -5, -6]) == [-6, -5, -4, -3, -2]\n// >>> sort_array([1, 0, 2, 3, 4]) [0, 1, 2, 3, 4]\nfunction sort_array($arr) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_116_sort_array.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return sort_array(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(1, 5, 2, 3, 4)) !== array(1, 2, 4, 3, 5)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(-2, -3, -4, -5, -6)) !== array(-4, -2, -6, -5, -3)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 0, 2, 3, 4)) !== array(0, 1, 2, 4, 3)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array()) !== array()) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(2, 5, 77, 4, 5, 3, 5, 7, 2, 3, 4)) !== array(2, 2, 4, 4, 3, 3, 5, 5, 5, 7, 77)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(3, 6, 44, 12, 32, 5)) !== array(32, 3, 5, 6, 12, 44)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(2, 4, 8, 16, 32)) !== array(2, 4, 8, 16, 32)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(2, 4, 8, 16, 32)) !== array(2, 4, 8, 16, 32)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_113_odd_count", - "language": "php", - "prompt": ">> odd_count(['1234567'])\n// [\"the number of odd elements 4n the str4ng 4 of the 4nput.\"]\n// >>> odd_count(['3',\"11111111\"])\n// [\"the number of odd elements 1n the str1ng 1 of the 1nput.\",\n// \"the number of odd elements 8n the str8ng 8 of the 8nput.\"]\nfunction odd_count($lst) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_113_odd_count.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return odd_count(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(\"1234567\")) !== array(\"the number of odd elements 4n the str4ng 4 of the 4nput.\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(\"3\", \"11111111\")) !== array(\"the number of odd elements 1n the str1ng 1 of the 1nput.\", \"the number of odd elements 8n the str8ng 8 of the 8nput.\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(\"271\", \"137\", \"314\")) !== array(\"the number of odd elements 2n the str2ng 2 of the 2nput.\", \"the number of odd elements 3n the str3ng 3 of the 3nput.\", \"the number of odd elements 2n the str2ng 2 of the 2nput.\")) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_61_correct_bracketing", - "language": "php", - "prompt": ">> correct_bracketing(\"(\")\n// False\n// >>> correct_bracketing(\"()\")\n// True\n// >>> correct_bracketing(\"(()())\")\n// True\n// >>> correct_bracketing(\")(()\")\n// False\nfunction correct_bracketing($brackets) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_61_correct_bracketing.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return correct_bracketing(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"()\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"(()())\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"()()(()())()\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"()()((()()())())(()()(()))\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"((()())))\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\")(()\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"(\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"((((\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\")\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"(()\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"()()(()())())(()\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"()()(()())()))()\") !== false) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_66_digitSum", - "language": "php", - "prompt": " 0\n// digitSum(\"abAB\") => 131\n// digitSum(\"abcCd\") => 67\n// digitSum(\"helloE\") => 69\n// digitSum(\"woArBld\") => 131\n// digitSum(\"aAaaaXa\") => 153\nfunction digitSum($s) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_66_digitSum.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return digitSum(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"\") !== 0) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"abAB\") !== 131) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"abcCd\") !== 67) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"helloE\") !== 69) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"woArBld\") !== 131) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"aAaaaXa\") !== 153) { throw new Exception(\"Test failed!\"); }\n if (candidate(\" How are yOu?\") !== 151) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"You arE Very Smart\") !== 327) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_149_sorted_list_sum", - "language": "php", - "prompt": " [\"aa\"]\n// assert list_sort([\"ab\", \"a\", \"aaa\", \"cd\"]) => [\"ab\", \"cd\"]\nfunction sorted_list_sum($lst) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_149_sorted_list_sum.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return sorted_list_sum(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(\"aa\", \"a\", \"aaa\")) !== array(\"aa\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(\"school\", \"AI\", \"asdf\", \"b\")) !== array(\"AI\", \"asdf\", \"school\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(\"d\", \"b\", \"c\", \"a\")) !== array()) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(\"d\", \"dcba\", \"abcd\", \"a\")) !== array(\"abcd\", \"dcba\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(\"AI\", \"ai\", \"au\")) !== array(\"AI\", \"ai\", \"au\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(\"a\", \"b\", \"b\", \"c\", \"c\", \"a\")) !== array()) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(\"aaaa\", \"bbbb\", \"dd\", \"cc\")) !== array(\"cc\", \"dd\", \"aaaa\", \"bbbb\")) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_128_prod_signs", - "language": "php", - "prompt": ">> prod_signs([1, 2, 2, -4]) == -9\n// >>> prod_signs([0, 1]) == 0\n// >>> prod_signs([]) == None\nfunction prod_signs($arr) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_128_prod_signs.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return prod_signs(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(1, 2, 2, -4)) !== -9) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(0, 1)) !== 0) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 1, 1, 2, 3, -1, 1)) !== -10) { throw new Exception(\"Test failed!\"); }\n if (candidate(array()) !== null) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(2, 4, 1, 2, -1, -1, 9)) !== 20) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(-1, 1, -1, 1)) !== 4) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(-1, 1, 1, 1)) !== -4) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(-1, 1, 1, 0)) !== 0) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_42_incr_list", - "language": "php", - "prompt": ">> incr_list([1, 2, 3])\n// [2, 3, 4]\n// >>> incr_list([5, 3, 5, 2, 3, 3, 9, 0, 123])\n// [6, 4, 6, 3, 4, 4, 10, 1, 124]\nfunction incr_list($l) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_42_incr_list.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return incr_list(...$args);\n}\n\nfunction test(): void {\n if (candidate(array()) !== array()) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(3, 2, 1)) !== array(4, 3, 2)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(5, 2, 5, 2, 3, 3, 9, 0, 123)) !== array(6, 3, 6, 3, 4, 4, 10, 1, 124)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_9_rolling_max", - "language": "php", - "prompt": ">> rolling_max([1, 2, 3, 2, 3, 4, 2])\n// [1, 2, 3, 3, 3, 4, 4]\nfunction rolling_max($numbers) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_9_rolling_max.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return rolling_max(...$args);\n}\n\nfunction test(): void {\n if (candidate(array()) !== array()) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 2, 3, 4)) !== array(1, 2, 3, 4)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(4, 3, 2, 1)) !== array(4, 4, 4, 4)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(3, 2, 3, 100, 3)) !== array(3, 3, 3, 100, 100)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_1_separate_paren_groups", - "language": "php", - "prompt": ">> separate_paren_groups('( ) (( )) (( )( ))')\n// ['()', '(())', '(()())']\nfunction separate_paren_groups($paren_string) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_1_separate_paren_groups.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return separate_paren_groups(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"(()()) ((())) () ((())()())\") !== array(\"(()())\", \"((()))\", \"()\", \"((())()())\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"() (()) ((())) (((())))\") !== array(\"()\", \"(())\", \"((()))\", \"(((())))\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"(()(())((())))\") !== array(\"(()(())((())))\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"( ) (( )) (( )( ))\") !== array(\"()\", \"(())\", \"(()())\")) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_101_words_string", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_137_compare_one", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_22_filter_integers", - "language": "php", - "prompt": ">> filter_integers(['a', 3.14, 5])\n// [5]\n// >>> filter_integers([1, 2, 3, 'abc', {}, []])\n// [1, 2, 3]\nfunction filter_integers($values) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_22_filter_integers.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return filter_integers(...$args);\n}\n\nfunction test(): void {\n if (candidate(array()) !== array()) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(4, array(), array(), 23.2, 9, \"adasd\")) !== array(4, 9)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(3, \"c\", 3, 3, \"a\", \"b\")) !== array(3, 3, 3)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_37_sort_even", - "language": "php", - "prompt": ">> sort_even([1, 2, 3])\n// [1, 2, 3]\n// >>> sort_even([5, 6, 3, 4])\n// [3, 6, 5, 4]\nfunction sort_even($l) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_37_sort_even.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return sort_even(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(1, 2, 3)) !== array(1, 2, 3)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10)) !== array(-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(5, 8, -12, 4, 23, 2, 3, 11, 12, -10)) !== array(-12, 8, 3, 4, 5, 2, 12, 11, 23, -10)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_152_compare", - "language": "php", - "prompt": " [0,0,0,0,3,3]\n// compare([0,5,0,0,0,4],[4,1,1,0,0,-2]) -> [4,4,1,0,0,6]\nfunction compare($game, $guess) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_152_compare.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return compare(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(1, 2, 3, 4, 5, 1), array(1, 2, 3, 4, 2, -2)) !== array(0, 0, 0, 0, 3, 3)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(0, 0, 0, 0, 0, 0), array(0, 0, 0, 0, 0, 0)) !== array(0, 0, 0, 0, 0, 0)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 2, 3), array(-1, -2, -3)) !== array(2, 4, 6)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 2, 3, 5), array(-1, 2, 3, 4)) !== array(2, 0, 0, 1)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_107_even_odd_palindrome", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_46_fib4", - "language": "php", - "prompt": " 0\n// fib4(1) -> 0\n// fib4(2) -> 2\n// fib4(3) -> 0\n// fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).\n// Please write a function to efficiently compute the n-th element of the fib4 number sequence. Do not use recursion.\n// >>> fib4(5)\n// 4\n// >>> fib4(6)\n// 8\n// >>> fib4(7)\n// 14\nfunction fib4($n) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_46_fib4.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return fib4(...$args);\n}\n\nfunction test(): void {\n if (candidate(5) !== 4) { throw new Exception(\"Test failed!\"); }\n if (candidate(8) !== 28) { throw new Exception(\"Test failed!\"); }\n if (candidate(10) !== 104) { throw new Exception(\"Test failed!\"); }\n if (candidate(12) !== 386) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_163_generate_integers", - "language": "php", - "prompt": " [2, 4, 6, 8]\n// generate_integers(8, 2) => [2, 4, 6, 8]\n// generate_integers(10, 14) => []\nfunction generate_integers($a, $b) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_163_generate_integers.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return generate_integers(...$args);\n}\n\nfunction test(): void {\n if (candidate(2, 10) !== array(2, 4, 6, 8)) { throw new Exception(\"Test failed!\"); }\n if (candidate(10, 2) !== array(2, 4, 6, 8)) { throw new Exception(\"Test failed!\"); }\n if (candidate(132, 2) !== array(2, 4, 6, 8)) { throw new Exception(\"Test failed!\"); }\n if (candidate(17, 89) !== array()) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_4_mean_absolute_deviation", - "language": "php", - "prompt": ">> mean_absolute_deviation([1.0, 2.0, 3.0, 4.0])\n// 1.0\nfunction mean_absolute_deviation($numbers) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_4_mean_absolute_deviation.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return mean_absolute_deviation(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(1.0, 2.0)) !== 0.5) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1.0, 2.0, 3.0, 4.0)) !== 1.0) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1.0, 2.0, 3.0, 4.0, 5.0)) !== 1.2) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_89_encrypt", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_123_get_odd_collatz", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_18_how_many_times", - "language": "php", - "prompt": ">> how_many_times('', 'a')\n// 0\n// >>> how_many_times('aaa', 'a')\n// 3\n// >>> how_many_times('aaaa', 'aa')\n// 3\nfunction how_many_times($string, $substring) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_18_how_many_times.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return how_many_times(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"\", \"x\") !== 0) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"xyxyxyx\", \"x\") !== 4) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"cacacacac\", \"cac\") !== 4) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"john doe\", \"john\") !== 1) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_109_move_one_ball", - "language": "php", - "prompt": "True\n// Explanation: By performin 2 right shift operations, non-decreasing order can\n// be achieved for the given array.\n// move_one_ball([3, 5, 4, 1, 2])==>False\n// Explanation:It is not possible to get non-decreasing order for the given\n// array by performing any number of right shift operations.\nfunction move_one_ball($arr) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_109_move_one_ball.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return move_one_ball(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(3, 4, 5, 1, 2)) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(3, 5, 10, 1, 2)) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(4, 3, 1, 2)) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(3, 5, 4, 1, 2)) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(array()) !== true) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_145_order_by_points", - "language": "php", - "prompt": ">> order_by_points([1, 11, -1, -11, -12]) == [-1, -11, 1, -12, 11]\n// >>> order_by_points([]) == []\nfunction order_by_points($nums) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_145_order_by_points.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return order_by_points(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(1, 11, -1, -11, -12)) !== array(-1, -11, 1, -12, 11)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1234, 423, 463, 145, 2, 423, 423, 53, 6, 37, 3457, 3, 56, 0, 46)) !== array(0, 2, 3, 6, 53, 423, 423, 423, 1234, 145, 37, 46, 56, 463, 3457)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array()) !== array()) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, -11, -32, 43, 54, -98, 2, -3)) !== array(-3, -32, -98, -11, 1, 2, 43, 54)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)) !== array(1, 10, 2, 11, 3, 4, 5, 6, 7, 8, 9)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(0, 6, 6, -76, -21, 23, 4)) !== array(-76, -21, 0, 4, 23, 6, 6)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_25_factorize", - "language": "php", - "prompt": ">> factorize(8)\n// [2, 2, 2]\n// >>> factorize(25)\n// [5, 5]\n// >>> factorize(70)\n// [2, 5, 7]\nfunction factorize($n) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_25_factorize.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return factorize(...$args);\n}\n\nfunction test(): void {\n if (candidate(2) !== array(2)) { throw new Exception(\"Test failed!\"); }\n if (candidate(4) !== array(2, 2)) { throw new Exception(\"Test failed!\"); }\n if (candidate(8) !== array(2, 2, 2)) { throw new Exception(\"Test failed!\"); }\n if (candidate(57) !== array(3, 19)) { throw new Exception(\"Test failed!\"); }\n if (candidate(3249) !== array(3, 3, 19, 19)) { throw new Exception(\"Test failed!\"); }\n if (candidate(185193) !== array(3, 3, 3, 19, 19, 19)) { throw new Exception(\"Test failed!\"); }\n if (candidate(20577) !== array(3, 19, 19, 19)) { throw new Exception(\"Test failed!\"); }\n if (candidate(18) !== array(2, 3, 3)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_52_below_threshold", - "language": "php", - "prompt": ">> below_threshold([1, 2, 4, 10], 100)\n// True\n// >>> below_threshold([1, 20, 4, 10], 5)\n// False\nfunction below_threshold($l, $t) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_52_below_threshold.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return below_threshold(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(1, 2, 4, 10), 100) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 20, 4, 10), 5) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 20, 4, 10), 21) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 20, 4, 10), 22) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 8, 4, 10), 11) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 8, 4, 10), 10) !== false) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_103_rounded_avg", - "language": "php", - "prompt": " \"0b11\"\n// rounded_avg(7, 5) => -1\n// rounded_avg(10, 20) => \"0b1111\"\n// rounded_avg(20, 33) => \"0b11010\"\nfunction rounded_avg($n, $m) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_103_rounded_avg.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return rounded_avg(...$args);\n}\n\nfunction test(): void {\n if (candidate(1, 5) !== \"0b11\") { throw new Exception(\"Test failed!\"); }\n if (candidate(7, 13) !== \"0b1010\") { throw new Exception(\"Test failed!\"); }\n if (candidate(964, 977) !== \"0b1111001010\") { throw new Exception(\"Test failed!\"); }\n if (candidate(996, 997) !== \"0b1111100100\") { throw new Exception(\"Test failed!\"); }\n if (candidate(560, 851) !== \"0b1011000010\") { throw new Exception(\"Test failed!\"); }\n if (candidate(185, 546) !== \"0b101101110\") { throw new Exception(\"Test failed!\"); }\n if (candidate(362, 496) !== \"0b110101101\") { throw new Exception(\"Test failed!\"); }\n if (candidate(350, 902) !== \"0b1001110010\") { throw new Exception(\"Test failed!\"); }\n if (candidate(197, 233) !== \"0b11010111\") { throw new Exception(\"Test failed!\"); }\n if (candidate(7, 5) !== -1) { throw new Exception(\"Test failed!\"); }\n if (candidate(5, 1) !== -1) { throw new Exception(\"Test failed!\"); }\n if (candidate(5, 5) !== \"0b101\") { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_6_parse_nested_parens", - "language": "php", - "prompt": ">> parse_nested_parens('(()()) ((())) () ((())()())')\n// [2, 3, 1, 3]\nfunction parse_nested_parens($paren_string) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_6_parse_nested_parens.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return parse_nested_parens(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"(()()) ((())) () ((())()())\") !== array(2, 3, 1, 3)) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"() (()) ((())) (((())))\") !== array(1, 2, 3, 4)) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"(()(())((())))\") !== array(4)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_121_solution", - "language": "php", - "prompt": " 12\n// solution([3, 3, 3, 3, 3]) ==> 9\n// solution([30, 13, 24, 321]) ==>0\nfunction solution($lst) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_121_solution.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return solution(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(5, 8, 7, 1)) !== 12) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(3, 3, 3, 3, 3)) !== 9) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(30, 13, 24, 321)) !== 0) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(5, 9)) !== 5) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(2, 4, 8)) !== 0) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(30, 13, 23, 32)) !== 23) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(3, 13, 2, 9)) !== 3) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_147_get_max_triples", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_148_bf", - "language": "php", - "prompt": " (\"Saturn\", \"Uranus\")\n// bf(\"Earth\", \"Mercury\") ==> (\"Venus\")\n// bf(\"Mercury\", \"Uranus\") ==> (\"Venus\", \"Earth\", \"Mars\", \"Jupiter\", \"Saturn\")\nfunction bf($planet1, $planet2) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_148_bf.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return bf(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"Jupiter\", \"Neptune\") !== array(\"Saturn\", \"Uranus\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"Earth\", \"Mercury\") !== array(\"Venus\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"Mercury\", \"Uranus\") !== array(\"Venus\", \"Earth\", \"Mars\", \"Jupiter\", \"Saturn\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"Neptune\", \"Venus\") !== array(\"Earth\", \"Mars\", \"Jupiter\", \"Saturn\", \"Uranus\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"Earth\", \"Earth\") !== array()) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"Mars\", \"Earth\") !== array()) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"Jupiter\", \"Makemake\") !== array()) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_90_next_smallest", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_19_sort_numbers", - "language": "php", - "prompt": ">> sort_numbers('three one five')\n// 'one three five'\nfunction sort_numbers($numbers) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_19_sort_numbers.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return sort_numbers(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"\") !== \"\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"three\") !== \"three\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"three five nine\") !== \"three five nine\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"five zero four seven nine eight\") !== \"zero four five seven eight nine\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"six five four three two one zero\") !== \"zero one two three four five six\") { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_154_cycpattern_check", - "language": "php", - "prompt": " False\n// cycpattern_check(\"hello\",\"ell\") => True\n// cycpattern_check(\"whassup\",\"psus\") => False\n// cycpattern_check(\"abab\",\"baa\") => True\n// cycpattern_check(\"efef\",\"eeff\") => False\n// cycpattern_check(\"himenss\",\"simen\") => True\nfunction cycpattern_check($a, $b) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_154_cycpattern_check.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return cycpattern_check(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"xyzw\", \"xyw\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"yello\", \"ell\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"whattup\", \"ptut\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"efef\", \"fee\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"abab\", \"aabb\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"winemtt\", \"tinem\") !== true) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_79_decimal_to_binary", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_7_filter_by_substring", - "language": "php", - "prompt": ">> filter_by_substring([], 'a')\n// []\n// >>> filter_by_substring(['abc', 'bacd', 'cde', 'array'], 'a')\n// ['abc', 'bacd', 'array']\nfunction filter_by_substring($strings, $substring) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_7_filter_by_substring.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return filter_by_substring(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(), \"john\") !== array()) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(\"xxx\", \"asd\", \"xxy\", \"john doe\", \"xxxAAA\", \"xxx\"), \"xxx\") !== array(\"xxx\", \"xxxAAA\", \"xxx\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(\"xxx\", \"asd\", \"aaaxxy\", \"john doe\", \"xxxAAA\", \"xxx\"), \"xx\") !== array(\"xxx\", \"aaaxxy\", \"xxxAAA\", \"xxx\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(\"grunt\", \"trumpet\", \"prune\", \"gruesome\"), \"run\") !== array(\"grunt\", \"prune\")) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_155_even_odd_count", - "language": "php", - "prompt": " (1, 1)\n// even_odd_count(123) ==> (1, 2)\nfunction even_odd_count($num) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_155_even_odd_count.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return even_odd_count(...$args);\n}\n\nfunction test(): void {\n if (candidate(7) !== array(0, 1)) { throw new Exception(\"Test failed!\"); }\n if (candidate(-78) !== array(1, 1)) { throw new Exception(\"Test failed!\"); }\n if (candidate(3452) !== array(2, 2)) { throw new Exception(\"Test failed!\"); }\n if (candidate(346211) !== array(3, 3)) { throw new Exception(\"Test failed!\"); }\n if (candidate(-345821) !== array(3, 3)) { throw new Exception(\"Test failed!\"); }\n if (candidate(-2) !== array(1, 0)) { throw new Exception(\"Test failed!\"); }\n if (candidate(-45347) !== array(2, 3)) { throw new Exception(\"Test failed!\"); }\n if (candidate(0) !== array(1, 0)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_158_find_max", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_83_starts_one_ends", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_136_largest_smallest_integers", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_68_pluck", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_108_count_nums", - "language": "php", - "prompt": " 0.\n// If a number is negative, then its first signed digit will be negative:\n// e.g. -123 has signed digits -1, 2, and 3.\n// >>> count_nums([]) == 0\n// >>> count_nums([-1, 11, -11]) == 1\n// >>> count_nums([1, 1, 2]) == 3\nfunction count_nums($arr) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_108_count_nums.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return count_nums(...$args);\n}\n\nfunction test(): void {\n if (candidate(array()) !== 0) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(-1, -2, 0)) !== 0) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 1, 2, -2, 3, 4, 5)) !== 6) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 6, 9, -6, 0, 1, 5)) !== 5) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 100, 98, -7, 1, -1)) !== 4) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(12, 23, 34, -45, -56, 0)) !== 5) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(0, 1)) !== 1) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1)) !== 1) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_129_minPath", - "language": "php", - "prompt": "= 2) and a positive integer k, \n// each cell of the grid contains a value. Every integer in the range [1, N * N]\n// inclusive appears exactly once on the cells of the grid.\n// You have to find the minimum path of length k in the grid. You can start\n// from any cell, and in each step you can move to any of the neighbor cells,\n// in other words, you can go to cells which share an edge with you current\n// cell.\n// Please note that a path of length k means visiting exactly k cells (not\n// necessarily distinct).\n// You CANNOT go off the grid.\n// A path A (of length k) is considered less than a path B (of length k) if\n// after making the ordered lists of the values on the cells that A and B go\n// through (let's call them lst_A and lst_B), lst_A is lexicographically less\n// than lst_B, in other words, there exist an integer index i (1 <= i <= k)\n// such that lst_A[i] < lst_B[i] and for any j (1 <= j < i) we have\n// lst_A[j] = lst_B[j].\n// It is guaranteed that the answer is unique.\n// Return an ordered list of the values on the cells that the minimum path go through.\n// Examples:\n// Input: grid = [ [1,2,3], [4,5,6], [7,8,9]], k = 3\n// Output: [1, 2, 1]\n// Input: grid = [ [5,9,3], [4,1,6], [7,8,2]], k = 1\n// Output: [1]\nfunction minPath($grid, $k) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_129_minPath.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return minPath(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(array(1, 2, 3), array(4, 5, 6), array(7, 8, 9)), 3) !== array(1, 2, 1)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(array(5, 9, 3), array(4, 1, 6), array(7, 8, 2)), 1) !== array(1)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(array(1, 2, 3, 4), array(5, 6, 7, 8), array(9, 10, 11, 12), array(13, 14, 15, 16)), 4) !== array(1, 2, 1, 2)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(array(6, 4, 13, 10), array(5, 7, 12, 1), array(3, 16, 11, 15), array(8, 14, 9, 2)), 7) !== array(1, 10, 1, 10, 1, 10, 1)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(array(8, 14, 9, 2), array(6, 4, 13, 15), array(5, 7, 1, 12), array(3, 10, 11, 16)), 5) !== array(1, 7, 1, 7, 1)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(array(11, 8, 7, 2), array(5, 16, 14, 4), array(9, 3, 15, 6), array(12, 13, 10, 1)), 9) !== array(1, 6, 1, 6, 1, 6, 1, 6, 1)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(array(12, 13, 10, 1), array(9, 3, 15, 6), array(5, 16, 14, 4), array(11, 8, 7, 2)), 12) !== array(1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(array(2, 7, 4), array(3, 1, 5), array(6, 8, 9)), 8) !== array(1, 3, 1, 3, 1, 3, 1, 3)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(array(6, 1, 5), array(3, 8, 9), array(2, 7, 4)), 8) !== array(1, 5, 1, 5, 1, 5, 1, 5)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(array(1, 2), array(3, 4)), 10) !== array(1, 2, 1, 2, 1, 2, 1, 2, 1, 2)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(array(1, 3), array(3, 2)), 10) !== array(1, 3, 1, 3, 1, 3, 1, 3, 1, 3)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_70_strange_sort_list", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_162_string_to_md5", - "language": "php", - "prompt": ">> string_to_md5('Hello world') == '3e25960a79dbc69b674cd4ec67a72c62'\nfunction string_to_md5($text) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_162_string_to_md5.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return string_to_md5(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"Hello world\") !== \"3e25960a79dbc69b674cd4ec67a72c62\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"\") !== null) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"A B C\") !== \"0ef78513b0cb8cef12743f5aeb35f888\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"password\") !== \"5f4dcc3b5aa765d61d8327deb882cf99\") { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_118_get_closest_vowel", - "language": "php", - "prompt": " \"u\"\n// get_closest_vowel(\"FULL\") ==> \"U\"\n// get_closest_vowel(\"quick\") ==> \"\"\n// get_closest_vowel(\"ab\") ==> \"\"\nfunction get_closest_vowel($word) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_118_get_closest_vowel.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return get_closest_vowel(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"yogurt\") !== \"u\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"full\") !== \"u\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"easy\") !== \"\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"eAsy\") !== \"\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"ali\") !== \"\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"bad\") !== \"a\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"most\") !== \"o\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"ab\") !== \"\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"ba\") !== \"\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"quick\") !== \"\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"anime\") !== \"i\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"Asia\") !== \"\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"Above\") !== \"o\") { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_44_change_base", - "language": "php", - "prompt": ">> change_base(8, 3)\n// '22'\n// >>> change_base(8, 2)\n// '1000'\n// >>> change_base(7, 2)\n// '111'\nfunction change_base($x, $base) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_44_change_base.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return change_base(...$args);\n}\n\nfunction test(): void {\n if (candidate(8, 3) !== \"22\") { throw new Exception(\"Test failed!\"); }\n if (candidate(9, 3) !== \"100\") { throw new Exception(\"Test failed!\"); }\n if (candidate(234, 2) !== \"11101010\") { throw new Exception(\"Test failed!\"); }\n if (candidate(16, 2) !== \"10000\") { throw new Exception(\"Test failed!\"); }\n if (candidate(8, 2) !== \"1000\") { throw new Exception(\"Test failed!\"); }\n if (candidate(7, 2) !== \"111\") { throw new Exception(\"Test failed!\"); }\n if (candidate(2, 3) !== \"2\") { throw new Exception(\"Test failed!\"); }\n if (candidate(3, 4) !== \"3\") { throw new Exception(\"Test failed!\"); }\n if (candidate(4, 5) !== \"4\") { throw new Exception(\"Test failed!\"); }\n if (candidate(5, 6) !== \"5\") { throw new Exception(\"Test failed!\"); }\n if (candidate(6, 7) !== \"6\") { throw new Exception(\"Test failed!\"); }\n if (candidate(7, 8) !== \"7\") { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_0_has_close_elements", - "language": "php", - "prompt": ">> has_close_elements([1.0, 2.0, 3.0], 0.5)\n// False\n// >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)\n// True\nfunction has_close_elements($numbers, $threshold) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_0_has_close_elements.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return has_close_elements(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(1.0, 2.0, 3.9, 4.0, 5.0, 2.2), 0.3) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1.0, 2.0, 3.9, 4.0, 5.0, 2.2), 0.05) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1.0, 2.0, 5.9, 4.0, 5.0), 0.95) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1.0, 2.0, 5.9, 4.0, 5.0), 0.8) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1.0, 2.0, 3.0, 4.0, 5.0, 2.0), 0.1) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1.1, 2.2, 3.1, 4.1, 5.1), 1.0) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1.1, 2.2, 3.1, 4.1, 5.1), 0.5) !== false) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_132_is_nested", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_28_concatenate", - "language": "php", - "prompt": ">> concatenate([])\n// ''\n// >>> concatenate(['a', 'b', 'c'])\n// 'abc'\nfunction concatenate($strings) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_28_concatenate.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return concatenate(...$args);\n}\n\nfunction test(): void {\n if (candidate(array()) !== \"\") { throw new Exception(\"Test failed!\"); }\n if (candidate(array(\"x\", \"y\", \"z\")) !== \"xyz\") { throw new Exception(\"Test failed!\"); }\n if (candidate(array(\"x\", \"y\", \"z\", \"w\", \"k\")) !== \"xyzwk\") { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_39_prime_fib", - "language": "php", - "prompt": ">> prime_fib(1)\n// 2\n// >>> prime_fib(2)\n// 3\n// >>> prime_fib(3)\n// 5\n// >>> prime_fib(4)\n// 13\n// >>> prime_fib(5)\n// 89\nfunction prime_fib($n) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_39_prime_fib.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return prime_fib(...$args);\n}\n\nfunction test(): void {\n if (candidate(1) !== 2) { throw new Exception(\"Test failed!\"); }\n if (candidate(2) !== 3) { throw new Exception(\"Test failed!\"); }\n if (candidate(3) !== 5) { throw new Exception(\"Test failed!\"); }\n if (candidate(4) !== 13) { throw new Exception(\"Test failed!\"); }\n if (candidate(5) !== 89) { throw new Exception(\"Test failed!\"); }\n if (candidate(6) !== 233) { throw new Exception(\"Test failed!\"); }\n if (candidate(7) !== 1597) { throw new Exception(\"Test failed!\"); }\n if (candidate(8) !== 28657) { throw new Exception(\"Test failed!\"); }\n if (candidate(9) !== 514229) { throw new Exception(\"Test failed!\"); }\n if (candidate(10) !== 433494437) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_20_find_closest_elements", - "language": "php", - "prompt": ">> find_closest_elements([1.0, 2.0, 3.0, 4.0, 5.0, 2.2])\n// (2.0, 2.2)\n// >>> find_closest_elements([1.0, 2.0, 3.0, 4.0, 5.0, 2.0])\n// (2.0, 2.0)\nfunction find_closest_elements($numbers) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_20_find_closest_elements.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return find_closest_elements(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(1.0, 2.0, 3.9, 4.0, 5.0, 2.2)) !== array(3.9, 4.0)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1.0, 2.0, 5.9, 4.0, 5.0)) !== array(5.0, 5.9)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1.0, 2.0, 3.0, 4.0, 5.0, 2.2)) !== array(2.0, 2.2)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1.0, 2.0, 3.0, 4.0, 5.0, 2.0)) !== array(2.0, 2.0)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1.1, 2.2, 3.1, 4.1, 5.1)) !== array(2.2, 3.1)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_78_hex_key", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_97_multiply", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_21_rescale_to_unit", - "language": "php", - "prompt": ">> rescale_to_unit([1.0, 2.0, 3.0, 4.0, 5.0])\n// [0.0, 0.25, 0.5, 0.75, 1.0]\nfunction rescale_to_unit($numbers) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_21_rescale_to_unit.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return rescale_to_unit(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(2.0, 49.9)) !== array(0.0, 1.0)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(100.0, 49.9)) !== array(1.0, 0.0)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1.0, 2.0, 3.0, 4.0, 5.0)) !== array(0.0, 0.25, 0.5, 0.75, 1.0)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(2.0, 1.0, 5.0, 3.0, 4.0)) !== array(0.25, 0.0, 1.0, 0.5, 0.75)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(12.0, 11.0, 15.0, 13.0, 14.0)) !== array(0.25, 0.0, 1.0, 0.5, 0.75)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_131_digits", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_153_Strongest_Extension", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_111_histogram", - "language": "php", - "prompt": " 2, \"b\" => 2)) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"a b c a b\") !== array(\"a\" => 2, \"b\" => 2)) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"a b c d g\") !== array(\"a\" => 1, \"b\" => 1, \"c\" => 1, \"d\" => 1, \"g\" => 1)) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"r t g\") !== array(\"r\" => 1, \"t\" => 1, \"g\" => 1)) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"b b b b a\") !== array(\"b\" => 4)) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"r t g\") !== array(\"r\" => 1, \"t\" => 1, \"g\" => 1)) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"\") !== array()) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"a\") !== array(\"a\" => 1)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_43_pairs_sum_to_zero", - "language": "php", - "prompt": ">> pairs_sum_to_zero([1, 3, 5, 0])\n// False\n// >>> pairs_sum_to_zero([1, 3, -2, 1])\n// False\n// >>> pairs_sum_to_zero([1, 2, 3, 7])\n// False\n// >>> pairs_sum_to_zero([2, 4, -5, 3, 5, 7])\n// True\n// >>> pairs_sum_to_zero([1])\n// False\nfunction pairs_sum_to_zero($l) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_43_pairs_sum_to_zero.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return pairs_sum_to_zero(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(1, 3, 5, 0)) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 3, -2, 1)) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 2, 3, 7)) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(2, 4, -5, 3, 5, 7)) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1)) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(-3, 9, -1, 3, 2, 30)) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(-3, 9, -1, 3, 2, 31)) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(-3, 9, -1, 4, 2, 30)) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(-3, 9, -1, 4, 2, 31)) !== false) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_74_total_match", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_65_circular_shift", - "language": "php", - "prompt": " number of digits, return digits reversed.\n// >>> circular_shift(12, 1)\n// \"21\"\n// >>> circular_shift(12, 2)\n// \"12\"\nfunction circular_shift($x, $shift) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_65_circular_shift.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return circular_shift(...$args);\n}\n\nfunction test(): void {\n if (candidate(100, 2) !== \"001\") { throw new Exception(\"Test failed!\"); }\n if (candidate(12, 2) !== \"12\") { throw new Exception(\"Test failed!\"); }\n if (candidate(97, 8) !== \"79\") { throw new Exception(\"Test failed!\"); }\n if (candidate(12, 1) !== \"21\") { throw new Exception(\"Test failed!\"); }\n if (candidate(11, 101) !== \"11\") { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_57_monotonic", - "language": "php", - "prompt": ">> monotonic([1, 2, 4, 20])\n// True\n// >>> monotonic([1, 20, 4, 10])\n// False\n// >>> monotonic([4, 1, 0, -10])\n// True\nfunction monotonic($l) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_57_monotonic.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return monotonic(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(1, 2, 4, 10)) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 2, 4, 20)) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 20, 4, 10)) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(4, 1, 0, -10)) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(4, 1, 1, 0)) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 2, 3, 2, 5, 60)) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 2, 3, 4, 5, 60)) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(9, 9, 9, 9)) !== true) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_138_is_equal_to_sum_even", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_17_parse_music", - "language": "php", - "prompt": ">> parse_music('o o| .| o| o| .| .| .| .| o o')\n// [4, 2, 1, 2, 2, 1, 1, 1, 1, 4, 4]\nfunction parse_music($music_string) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_17_parse_music.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return parse_music(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"\") !== array()) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"o o o o\") !== array(4, 4, 4, 4)) { throw new Exception(\"Test failed!\"); }\n if (candidate(\".| .| .| .|\") !== array(1, 1, 1, 1)) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"o| o| .| .| o o o o\") !== array(2, 2, 1, 1, 4, 4, 4, 4)) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"o| .| o| .| o o| o o|\") !== array(2, 1, 2, 1, 4, 2, 4, 2)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_142_sum_squares", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_40_triples_sum_to_zero", - "language": "php", - "prompt": ">> triples_sum_to_zero([1, 3, 5, 0])\n// False\n// >>> triples_sum_to_zero([1, 3, -2, 1])\n// True\n// >>> triples_sum_to_zero([1, 2, 3, 7])\n// False\n// >>> triples_sum_to_zero([2, 4, -5, 3, 9, 7])\n// True\n// >>> triples_sum_to_zero([1])\n// False\nfunction triples_sum_to_zero($l) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_40_triples_sum_to_zero.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return triples_sum_to_zero(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(1, 3, 5, 0)) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 3, 5, -1)) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 3, -2, 1)) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 2, 3, 7)) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 2, 5, 7)) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(2, 4, -5, 3, 9, 7)) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1)) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 3, 5, -100)) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(100, 3, 5, -100)) !== false) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_56_correct_bracketing", - "language": "php", - "prompt": "\".\n// return True if every opening bracket has a corresponding closing bracket.\n// >>> correct_bracketing(\"<\")\n// False\n// >>> correct_bracketing(\"<>\")\n// True\n// >>> correct_bracketing(\"<<><>>\")\n// True\n// >>> correct_bracketing(\"><<>\")\n// False\nfunction correct_bracketing($brackets) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_56_correct_bracketing.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return correct_bracketing(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"<>\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"<<><>>\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"<><><<><>><>\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"<><><<<><><>><>><<><><<>>>\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"<<<><>>>>\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"><<>\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"<\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"<<<<\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\">\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"<<>\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"<><><<><>><>><<>\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"<><><<><>><>>><>\") !== false) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_146_specialFilter", - "language": "php", - "prompt": " 1 \n// specialFilter([33, -2, -3, 45, 21, 109]) => 2\nfunction specialFilter($nums) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_146_specialFilter.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return specialFilter(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(5, -2, 1, -5)) !== 0) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(15, -73, 14, -15)) !== 1) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(33, -2, -3, 45, 21, 109)) !== 2) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(43, -12, 93, 125, 121, 109)) !== 4) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(71, -2, -33, 75, 21, 19)) !== 3) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1)) !== 0) { throw new Exception(\"Test failed!\"); }\n if (candidate(array()) !== 0) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_95_check_dict_case", - "language": "php", - "prompt": " \"pineapple\", \"b\" => \"banana\")) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(\"p\" => \"pineapple\", \"A\" => \"banana\", \"B\" => \"banana\")) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(\"p\" => \"pineapple\", \"5\" => \"banana\", \"a\" => \"apple\")) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(\"Name\" => \"John\", \"Age\" => \"36\", \"City\" => \"Houston\")) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(\"STATE\" => \"NC\", \"ZIP\" => \"12345\")) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(\"fruit\" => \"Orange\", \"taste\" => \"Sweet\")) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array()) !== false) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_125_split_words", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_63_fibfib", - "language": "php", - "prompt": ">> fibfib(1)\n// 0\n// >>> fibfib(5)\n// 4\n// >>> fibfib(8)\n// 24\nfunction fibfib($n) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_63_fibfib.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return fibfib(...$args);\n}\n\nfunction test(): void {\n if (candidate(2) !== 1) { throw new Exception(\"Test failed!\"); }\n if (candidate(1) !== 0) { throw new Exception(\"Test failed!\"); }\n if (candidate(5) !== 4) { throw new Exception(\"Test failed!\"); }\n if (candidate(8) !== 24) { throw new Exception(\"Test failed!\"); }\n if (candidate(10) !== 81) { throw new Exception(\"Test failed!\"); }\n if (candidate(12) !== 274) { throw new Exception(\"Test failed!\"); }\n if (candidate(14) !== 927) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_133_sum_squares", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_85_add", - "language": "php", - "prompt": " 2\nfunction add($lst) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_85_add.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return add(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(4, 88)) !== 88) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(4, 5, 6, 7, 2, 122)) !== 122) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(4, 0, 6, 7)) !== 0) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(4, 4, 6, 8)) !== 12) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_34_unique", - "language": "php", - "prompt": ">> unique([5, 3, 5, 2, 3, 3, 9, 0, 123])\n// [0, 2, 3, 5, 9, 123]\nfunction unique($l) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_34_unique.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return unique(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(5, 3, 5, 2, 3, 3, 9, 0, 123)) !== array(0, 2, 3, 5, 9, 123)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_140_fix_spaces", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_49_modp", - "language": "php", - "prompt": ">> modp(3, 5)\n// 3\n// >>> modp(1101, 101)\n// 2\n// >>> modp(0, 101)\n// 1\n// >>> modp(3, 11)\n// 8\n// >>> modp(100, 101)\n// 1\nfunction modp($n, $p) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_49_modp.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return modp(...$args);\n}\n\nfunction test(): void {\n if (candidate(3, 5) !== 3) { throw new Exception(\"Test failed!\"); }\n if (candidate(1101, 101) !== 2) { throw new Exception(\"Test failed!\"); }\n if (candidate(0, 101) !== 1) { throw new Exception(\"Test failed!\"); }\n if (candidate(3, 11) !== 8) { throw new Exception(\"Test failed!\"); }\n if (candidate(100, 101) !== 1) { throw new Exception(\"Test failed!\"); }\n if (candidate(30, 5) !== 4) { throw new Exception(\"Test failed!\"); }\n if (candidate(31, 5) !== 3) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_124_valid_date", - "language": "php", - "prompt": " True\n// valid_date('15-01-2012') => False\n// valid_date('04-0-2040') => False\n// valid_date('06-04-2020') => True\n// valid_date('06/04/2020') => False\nfunction valid_date($date) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_124_valid_date.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return valid_date(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"03-11-2000\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"15-01-2012\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"04-0-2040\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"06-04-2020\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"01-01-2007\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"03-32-2011\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"04-31-3000\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"06-06-2005\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"21-31-2000\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"04-12-2003\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"04122003\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"20030412\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"2003-04\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"2003-04-12\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"04-2003\") !== false) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_86_anti_shuffle", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_126_is_sorted", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_80_is_happy", - "language": "php", - "prompt": " False\n// is_happy(aa) => False\n// is_happy(abcd) => True\n// is_happy(aabb) => False\n// is_happy(adb) => True\n// is_happy(xyy) => False\nfunction is_happy($s) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_80_is_happy.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return is_happy(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"a\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"aa\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"abcd\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"aabb\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"adb\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"xyy\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"iopaxpoi\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"iopaxioi\") !== false) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_72_will_it_fly", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_88_sort_array", - "language": "php", - "prompt": " []\n// * sort_array([5]) => [5]\n// * sort_array([2, 4, 3, 0, 1, 5]) => [0, 1, 2, 3, 4, 5]\n// * sort_array([2, 4, 3, 0, 1, 5, 6]) => [6, 5, 4, 3, 2, 1, 0]\nfunction sort_array($array) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_88_sort_array.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return sort_array(...$args);\n}\n\nfunction test(): void {\n if (candidate(array()) !== array()) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(5)) !== array(5)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(2, 4, 3, 0, 1, 5)) !== array(0, 1, 2, 3, 4, 5)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(2, 4, 3, 0, 1, 5, 6)) !== array(6, 5, 4, 3, 2, 1, 0)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(2, 1)) !== array(1, 2)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(15, 42, 87, 32, 11, 0)) !== array(0, 11, 15, 32, 42, 87)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(21, 14, 23, 11)) !== array(23, 21, 14, 11)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_96_count_up_to", - "language": "php", - "prompt": " [2,3]\n// count_up_to(11) => [2,3,5,7]\n// count_up_to(0) => []\n// count_up_to(20) => [2,3,5,7,11,13,17,19]\n// count_up_to(1) => []\n// count_up_to(18) => [2,3,5,7,11,13,17]\nfunction count_up_to($n) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_96_count_up_to.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return count_up_to(...$args);\n}\n\nfunction test(): void {\n if (candidate(5) !== array(2, 3)) { throw new Exception(\"Test failed!\"); }\n if (candidate(6) !== array(2, 3, 5)) { throw new Exception(\"Test failed!\"); }\n if (candidate(7) !== array(2, 3, 5)) { throw new Exception(\"Test failed!\"); }\n if (candidate(10) !== array(2, 3, 5, 7)) { throw new Exception(\"Test failed!\"); }\n if (candidate(0) !== array()) { throw new Exception(\"Test failed!\"); }\n if (candidate(22) !== array(2, 3, 5, 7, 11, 13, 17, 19)) { throw new Exception(\"Test failed!\"); }\n if (candidate(1) !== array()) { throw new Exception(\"Test failed!\"); }\n if (candidate(18) !== array(2, 3, 5, 7, 11, 13, 17)) { throw new Exception(\"Test failed!\"); }\n if (candidate(47) !== array(2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43)) { throw new Exception(\"Test failed!\"); }\n if (candidate(101) !== array(2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_12_longest", - "language": "php", - "prompt": ">> longest([])\n// >>> longest(['a', 'b', 'c'])\n// 'a'\n// >>> longest(['a', 'bb', 'ccc'])\n// 'ccc'\nfunction longest($strings) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_12_longest.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return longest(...$args);\n}\n\nfunction test(): void {\n if (candidate(array()) !== null) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(\"x\", \"y\", \"z\")) !== \"x\") { throw new Exception(\"Test failed!\"); }\n if (candidate(array(\"x\", \"yyy\", \"zzzz\", \"www\", \"kkkk\", \"abc\")) !== \"zzzz\") { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_105_by_length", - "language": "php", - "prompt": " sort arr -> [1, 1, 2, 2, 3, 4, 5, 8] \n// -> reverse arr -> [8, 5, 4, 3, 2, 2, 1, 1]\n// return [\"Eight\", \"Five\", \"Four\", \"Three\", \"Two\", \"Two\", \"One\", \"One\"]\n// If the array is empty, return an empty array:\n// arr = []\n// return []\n// If the array has any strange number ignore it:\n// arr = [1, -1 , 55] \n// -> sort arr -> [-1, 1, 55]\n// -> reverse arr -> [55, 1, -1]\n// return = ['One']\nfunction by_length($arr) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_105_by_length.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return by_length(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(2, 1, 1, 4, 5, 8, 2, 3)) !== array(\"Eight\", \"Five\", \"Four\", \"Three\", \"Two\", \"Two\", \"One\", \"One\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(array()) !== array()) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, -1, 55)) !== array(\"One\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, -1, 3, 2)) !== array(\"Three\", \"Two\", \"One\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(9, 4, 8)) !== array(\"Nine\", \"Eight\", \"Four\")) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_106_f", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_36_fizz_buzz", - "language": "php", - "prompt": ">> fizz_buzz(50)\n// 0\n// >>> fizz_buzz(78)\n// 2\n// >>> fizz_buzz(79)\n// 3\nfunction fizz_buzz($n) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_36_fizz_buzz.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return fizz_buzz(...$args);\n}\n\nfunction test(): void {\n if (candidate(50) !== 0) { throw new Exception(\"Test failed!\"); }\n if (candidate(78) !== 2) { throw new Exception(\"Test failed!\"); }\n if (candidate(79) !== 3) { throw new Exception(\"Test failed!\"); }\n if (candidate(100) !== 3) { throw new Exception(\"Test failed!\"); }\n if (candidate(200) !== 6) { throw new Exception(\"Test failed!\"); }\n if (candidate(4000) !== 192) { throw new Exception(\"Test failed!\"); }\n if (candidate(10000) !== 639) { throw new Exception(\"Test failed!\"); }\n if (candidate(100000) !== 8026) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_2_truncate_number", - "language": "php", - "prompt": ">> truncate_number(3.5)\n// 0.5\nfunction truncate_number($number) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_2_truncate_number.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return truncate_number(...$args);\n}\n\nfunction test(): void {\n if (candidate(3.5) !== 0.5) { throw new Exception(\"Test failed!\"); }\n if (candidate(1.25) !== 0.25) { throw new Exception(\"Test failed!\"); }\n if (candidate(123.0) !== 0.0) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_8_sum_product", - "language": "php", - "prompt": ">> sum_product([])\n// (0, 1)\n// >>> sum_product([1, 2, 3, 4])\n// (10, 24)\nfunction sum_product($numbers) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_8_sum_product.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return sum_product(...$args);\n}\n\nfunction test(): void {\n if (candidate(array()) !== array(0, 1)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 1, 1)) !== array(3, 1)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(100, 0)) !== array(100, 0)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(3, 5, 7)) !== array(15, 105)) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(10)) !== array(10, 10)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_87_get_row", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_159_eat", - "language": "php", - "prompt": " [11, 4]\n// * eat(4, 8, 9) -> [12, 1]\n// * eat(1, 10, 10) -> [11, 0]\n// * eat(2, 11, 5) -> [7, 0]\n// Variables:\n// @number : integer\n// the number of carrots that you have eaten.\n// @need : integer\n// the number of carrots that you need to eat.\n// @remaining : integer\n// the number of remaining carrots thet exist in stock\n// Constrain:\n// * 0 <= number <= 1000\n// * 0 <= need <= 1000\n// * 0 <= remaining <= 1000\n// Have fun :)\nfunction eat($number, $need, $remaining) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_159_eat.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return eat(...$args);\n}\n\nfunction test(): void {\n if (candidate(5, 6, 10) !== array(11, 4)) { throw new Exception(\"Test failed!\"); }\n if (candidate(4, 8, 9) !== array(12, 1)) { throw new Exception(\"Test failed!\"); }\n if (candidate(1, 10, 10) !== array(11, 0)) { throw new Exception(\"Test failed!\"); }\n if (candidate(2, 11, 5) !== array(7, 0)) { throw new Exception(\"Test failed!\"); }\n if (candidate(4, 5, 7) !== array(9, 2)) { throw new Exception(\"Test failed!\"); }\n if (candidate(4, 5, 1) !== array(5, 0)) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_84_solve", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_94_skjkasdkd", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_73_smallest_change", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_81_numerical_letter_grade", - "language": "php", - "prompt": " 3.7 A \n// > 3.3 A- \n// > 3.0 B+\n// > 2.7 B \n// > 2.3 B-\n// > 2.0 C+\n// > 1.7 C\n// > 1.3 C-\n// > 1.0 D+ \n// > 0.7 D \n// > 0.0 D-\n// 0.0 E\n// Example:\n// grade_equation([4.0, 3, 1.7, 2, 3.5]) ==> ['A+', 'B', 'C-', 'C', 'A-']\nfunction numerical_letter_grade($grades) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_81_numerical_letter_grade.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return numerical_letter_grade(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(4.0, 3, 1.7, 2, 3.5)) !== array(\"A+\", \"B\", \"C-\", \"C\", \"A-\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1.2)) !== array(\"D+\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(0.5)) !== array(\"D-\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(0.0)) !== array(\"E\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1.0, 0.3, 1.5, 2.8, 3.3)) !== array(\"D\", \"D-\", \"C-\", \"B\", \"B+\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(0.0, 0.7)) !== array(\"E\", \"D-\")) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_71_triangle_area", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_54_same_chars", - "language": "php", - "prompt": ">> same_chars('eabcdzzzz', 'dddzzzzzzzddeddabc')\n// True\n// >>> same_chars('abcd', 'dddddddabc')\n// True\n// >>> same_chars('dddddddabc', 'abcd')\n// True\n// >>> same_chars('eabcd', 'dddddddabc')\n// False\n// >>> same_chars('abcd', 'dddddddabce')\n// False\n// >>> same_chars('eabcdzzzz', 'dddzzzzzzzddddabc')\n// False\nfunction same_chars($s0, $s1) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_54_same_chars.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return same_chars(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"eabcdzzzz\", \"dddzzzzzzzddeddabc\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"abcd\", \"dddddddabc\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"dddddddabc\", \"abcd\") !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"eabcd\", \"dddddddabc\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"abcd\", \"dddddddabcf\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"eabcdzzzz\", \"dddzzzzzzzddddabc\") !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"aabb\", \"aaccc\") !== false) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_114_minSubArraySum", - "language": "php", - "prompt": "", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_117_select_words", - "language": "php", - "prompt": " [\"little\"]\n// select_words(\"Mary had a little lamb\", 3) ==> [\"Mary\", \"lamb\"]\n// select_words(\"simple white space\", 2) ==> []\n// select_words(\"Hello world\", 4) ==> [\"world\"]\n// select_words(\"Uncle sam\", 3) ==> [\"Uncle\"]\nfunction select_words($s, $n) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_117_select_words.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return select_words(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"Mary had a little lamb\", 4) !== array(\"little\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"Mary had a little lamb\", 3) !== array(\"Mary\", \"lamb\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"simple white space\", 2) !== array()) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"Hello world\", 4) !== array(\"world\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"Uncle sam\", 3) !== array(\"Uncle\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"\", 4) !== array()) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"a b c d e f\", 1) !== array(\"b\", \"c\", \"d\", \"f\")) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_14_all_prefixes", - "language": "php", - "prompt": ">> all_prefixes('abc')\n// ['a', 'ab', 'abc']\nfunction all_prefixes($string) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_14_all_prefixes.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return all_prefixes(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"\") !== array()) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"asdfgh\") !== array(\"a\", \"as\", \"asd\", \"asdf\", \"asdfg\", \"asdfgh\")) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"WWW\") !== array(\"W\", \"WW\", \"WWW\")) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_99_closest_integer", - "language": "php", - "prompt": ">> closest_integer(\"10\")\n// 10\n// >>> closest_integer(\"15.3\")\n// 15\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.\nfunction closest_integer($value) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_99_closest_integer.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return closest_integer(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"10\") !== 10) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"14.5\") !== 15) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"-15.5\") !== -16) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"15.3\") !== 15) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"0\") !== 0) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_141_file_name_check", - "language": "php", - "prompt": " 'Yes'\n// file_name_check(\"1example.dll\") # => 'No' (the name should start with a latin alphapet letter)\nfunction file_name_check($file_name) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_141_file_name_check.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return file_name_check(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"example.txt\") !== \"Yes\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"1example.dll\") !== \"No\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"s1sdf3.asd\") !== \"No\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"K.dll\") !== \"Yes\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"MY16FILE3.exe\") !== \"Yes\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"His12FILE94.exe\") !== \"No\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"_Y.txt\") !== \"No\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"?aREYA.exe\") !== \"No\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"/this_is_valid.dll\") !== \"No\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"this_is_valid.wow\") !== \"No\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"this_is_valid.txt\") !== \"Yes\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"this_is_valid.txtexe\") !== \"No\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"#this2_i4s_5valid.ten\") !== \"No\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"@this1_is6_valid.exe\") !== \"No\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"this_is_12valid.6exe4.txt\") !== \"No\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"all.exe.txt\") !== \"No\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"I563_No.exe\") !== \"Yes\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"Is3youfault.txt\") !== \"Yes\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"no_one#knows.dll\") !== \"Yes\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"1I563_Yes3.exe\") !== \"No\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"I563_Yes3.txtt\") !== \"No\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"final..txt\") !== \"No\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"final132\") !== \"No\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"_f4indsartal132.\") !== \"No\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\".txt\") !== \"No\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"s.\") !== \"No\") { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_127_intersection", - "language": "php", - "prompt": " \"NO\"\n// intersection((-1, 1), (0, 4)) ==> \"NO\"\n// intersection((-3, -1), (-5, 5)) ==> \"YES\"\nfunction intersection($interval1, $interval2) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_127_intersection.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return intersection(...$args);\n}\n\nfunction test(): void {\n if (candidate(array(1, 2), array(2, 3)) !== \"NO\") { throw new Exception(\"Test failed!\"); }\n if (candidate(array(-1, 1), array(0, 4)) !== \"NO\") { throw new Exception(\"Test failed!\"); }\n if (candidate(array(-3, -1), array(-5, 5)) !== \"YES\") { throw new Exception(\"Test failed!\"); }\n if (candidate(array(-2, 2), array(-4, 0)) !== \"YES\") { throw new Exception(\"Test failed!\"); }\n if (candidate(array(-11, 2), array(-1, -1)) !== \"NO\") { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 2), array(3, 5)) !== \"NO\") { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 2), array(1, 2)) !== \"NO\") { throw new Exception(\"Test failed!\"); }\n if (candidate(array(-2, -2), array(-3, -2)) !== \"NO\") { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_59_largest_prime_factor", - "language": "php", - "prompt": " 1 and is not a prime.\n// >>> largest_prime_factor(13195)\n// 29\n// >>> largest_prime_factor(2048)\n// 2\nfunction largest_prime_factor($n) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_59_largest_prime_factor.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return largest_prime_factor(...$args);\n}\n\nfunction test(): void {\n if (candidate(15) !== 5) { throw new Exception(\"Test failed!\"); }\n if (candidate(27) !== 3) { throw new Exception(\"Test failed!\"); }\n if (candidate(63) !== 7) { throw new Exception(\"Test failed!\"); }\n if (candidate(330) !== 11) { throw new Exception(\"Test failed!\"); }\n if (candidate(13195) !== 29) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_16_count_distinct_characters", - "language": "php", - "prompt": ">> count_distinct_characters('xyzXYZ')\n// 3\n// >>> count_distinct_characters('Jerry')\n// 4\nfunction count_distinct_characters($string) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_16_count_distinct_characters.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return count_distinct_characters(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"\") !== 0) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"abcde\") !== 5) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"abcdecadeCADE\") !== 5) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"aaaaAAAAaaaa\") !== 1) { throw new Exception(\"Test failed!\"); }\n if (candidate(\"Jerry jERRY JeRRRY\") !== 5) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_3_below_zero", - "language": "php", - "prompt": ">> below_zero([1, 2, 3])\n// False\n// >>> below_zero([1, 2, -4, 5])\n// True\nfunction below_zero($operations) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_3_below_zero.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return below_zero(...$args);\n}\n\nfunction test(): void {\n if (candidate(array()) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 2, -3, 1, 2, -3)) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, 2, -4, 5, 6)) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, -1, 2, -2, 5, -5, 4, -4)) !== false) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, -1, 2, -2, 5, -5, 4, -5)) !== true) { throw new Exception(\"Test failed!\"); }\n if (candidate(array(1, -2, 2, -2, 5, -5, 4, -4)) !== true) { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_10_make_palindrome", - "language": "php", - "prompt": ">> make_palindrome('')\n// ''\n// >>> make_palindrome('cat')\n// 'catac'\n// >>> make_palindrome('cata')\n// 'catac'\nfunction make_palindrome($string) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_10_make_palindrome.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return make_palindrome(...$args);\n}\n\nfunction test(): void {\n if (candidate(\"\") !== \"\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"x\") !== \"x\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"xyz\") !== \"xyzyx\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"xyx\") !== \"xyx\") { throw new Exception(\"Test failed!\"); }\n if (candidate(\"jerry\") !== \"jerryrrej\") { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - }, - { - "name": "HumanEval_156_int_to_mini_roman", - "language": "php", - "prompt": ">> int_to_mini_roman(19) == 'xix'\n// >>> int_to_mini_roman(152) == 'clii'\n// >>> int_to_mini_roman(426) == 'cdxxvi'\nfunction int_to_mini_roman($number) {\n", - "doctests": "keep", - "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/originals/HumanEval_156_int_to_mini_roman.py", - "prompt_terminology": "verbatim", - "tests": "function candidate(...$args) {\n return int_to_mini_roman(...$args);\n}\n\nfunction test(): void {\n if (candidate(19) !== \"xix\") { throw new Exception(\"Test failed!\"); }\n if (candidate(152) !== \"clii\") { throw new Exception(\"Test failed!\"); }\n if (candidate(251) !== \"ccli\") { throw new Exception(\"Test failed!\"); }\n if (candidate(426) !== \"cdxxvi\") { throw new Exception(\"Test failed!\"); }\n if (candidate(500) !== \"d\") { throw new Exception(\"Test failed!\"); }\n if (candidate(1) !== \"i\") { throw new Exception(\"Test failed!\"); }\n if (candidate(4) !== \"iv\") { throw new Exception(\"Test failed!\"); }\n if (candidate(43) !== \"xliii\") { throw new Exception(\"Test failed!\"); }\n if (candidate(90) !== \"xc\") { throw new Exception(\"Test failed!\"); }\n if (candidate(94) !== \"xciv\") { throw new Exception(\"Test failed!\"); }\n if (candidate(532) !== \"dxxxii\") { throw new Exception(\"Test failed!\"); }\n if (candidate(900) !== \"cm\") { throw new Exception(\"Test failed!\"); }\n if (candidate(994) !== \"cmxciv\") { throw new Exception(\"Test failed!\"); }\n if (candidate(1000) !== \"m\") { throw new Exception(\"Test failed!\"); }\n}\n\ntest();", - "stop_tokens": [ - "\nfunction", - "\n?>", - "\n//", - "\n#" - ] - } -] \ No newline at end of file