diff --git "a/evaluation_results/fft_no_oracle_ir_test.json" "b/evaluation_results/fft_no_oracle_ir_test.json" new file mode 100644--- /dev/null +++ "b/evaluation_results/fft_no_oracle_ir_test.json" @@ -0,0 +1,47010 @@ +{ + "method": "finetuned", + "split": "ir_test", + "exact_match_pct": 55.87897357334354, + "exact_match_count": 2918, + "n": 5222, + "n_total": 5222, + "code_bleu": 0.7139699498461829, + "edit_similarity": 0.7269754422369665, + "entries": [ + { + "repo": "0xricksanchez/like-dbg", + "expected": "True", + "got": "True", + "got_raw": "True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "0xricksanchez/like-dbg", + "expected": "\"b1f3f40af1e5c64dbf4a1302ca94ac12\"", + "got": "\"00000000000000000000000000000000\"", + "got_raw": "\"00000000000000000000000000000000\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.11764705882352941 + }, + { + "repo": "0xricksanchez/like-dbg", + "expected": "\"5.15.67\"", + "got": "\"mmp\"", + "got_raw": "\"mmp\" # noqa: E501 lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download() lkdl.download()", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2857142857142857 + }, + { + "repo": "0xricksanchez/like-dbg", + "expected": "\"https://cdn.kernel.org/pub/linux/kernel/vKMAJOR.x/linux-KMAJOR.KMINOR.KPATCH.tar.xz\"", + "got": "\"https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/refs/tags/mmp-\"", + "got_raw": "\"https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/refs/tags/mmp-\" assert lkdl.mmp_uri == \"https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/refs/tags/mmp-\" assert lkdl.mmp_uri == \"https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/refs/tags/mmp-\" assert lkdl.mmp_uri == \"https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/refs/tags/mmp-\" assert lkdl.mmp_uri == \"https://git.kernel", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5833333333333334 + }, + { + "repo": "0xricksanchez/like-dbg", + "expected": "-2", + "got": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678", + "got_raw": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678", + "exact_match": false, + "code_bleu": 0.25, + "edit_similarity": 0.015384615384615385 + }, + { + "repo": "0xricksanchez/like-dbg", + "expected": "lkdl.archive", + "got": "0", + "got_raw": "0 # The file is present, so the function returns 0.", + "exact_match": false, + "code_bleu": 0.16666666666666666, + "edit_similarity": 0.0 + }, + { + "repo": "0xricksanchez/like-dbg", + "expected": "expected)", + "got": "expected)", + "got_raw": "expected) tmock.reset_mock() d.run_container() expected = f\"send-keys 'docker run --pid=container:{d.debuggee_name} -it --rm --security-opt seccomp=unconfined --cap-add=SYS_PTRACE -v {d.project_dir}:{d.docker_mnt} --net=\\\"host\\\" {d.tag} /bin/bash -c \\\"set -e; . /home/user/debugger.sh -a {d.arch} -p /io -c 0 -g /home/user/gdb_script -e gdb\\\"' 'C-m'\" tmock.assert_called_with( expected)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "0xricksanchez/like-dbg", + "expected": "f\"https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/snapshot/linux-{lkdl.commit}.tar.gz\"", + "got": "dl_uri", + "got_raw": "dl_uri == \"https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.10.tar.xz\" \\ \"sha256=3322222222222222222222222222222222222222222222222222222222222222\" \\ \"md5=11111111111111111111111111", + "exact_match": false, + "code_bleu": 0.25, + "edit_similarity": 0.05405405405405406 + }, + { + "repo": "0xricksanchez/like-dbg", + "expected": "SystemExit", + "got": "SystemExit", + "got_raw": "SystemExit ext.value.code == 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "AlignmentResearch/tuned-lens", + "expected": "0", + "got": "0", + "got_raw": "0\n\n\ndef test_load_lens_artifacts_smoke():\n artifacts = load_lens_artifacts(\"AlignmentResearch/tuned-lens\", \"space\")\n assert len(artifacts) > 0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "AlignmentResearch/tuned-lens", + "expected": "tokens[:, :1]", + "got": "tokens[:, 0]", + "got_raw": "tokens[:, 0]", + "exact_match": false, + "code_bleu": 0.55153618642351, + "edit_similarity": 0.88 + }, + { + "repo": "AlignmentResearch/tuned-lens", + "expected": "expected", + "got": "expected", + "got_raw": "expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "AlignmentResearch/tuned-lens", + "expected": "our_js_bwd)", + "got": "our_js_bwd)", + "got_raw": "our_js_bwd)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "AndrewAnnex/SpiceyPy", + "expected": "0", + "got": "expected_length", + "got_raw": "expected_length - 1 # -1 for the meta-kernel itself. spice.ktotal(\"all\") returns the total number of kernels loaded, including the meta-kernel. We subtract 1 to exclude the meta-kernel from the count. spice.ktotal(\"all\") returns the total number of kernels loaded, including the meta-kernel. We subtract 1 to exclude the meta-kernel from the count. spice.ktotal(\"all\") returns the total number of kernels loaded, including the meta-kernel. We subtract 1 to exclude the meta-kernel from the count. spice.ktotal(\"all\") returns the total number", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "AndrewAnnex/SpiceyPy", + "expected": "BaseException)", + "got": "RuntimeError)", + "got_raw": "RuntimeError) as excinfo: attempt_download(CoreKernels.MISSING_KERNELS) assert str(excinfo.value) == \"Missing kernels: \" + str(CoreKernels.MISSING_KERNELS) with pytest.raises( RuntimeError) as excinfo: attempt_download(CoreKernels.MISSING_KERNELS, raise_exceptions=False) assert str(excinfo.value) == \"\" with pytest.raises( RuntimeError) as excinfo: attempt_download(CoreKernels.MISSING_KERNELS, raise_exceptions=True) assert str(excinfo.value) == \"Missing kernels: \" + str(CoreKernels.MISSING_KERNELS) with pytest.raises( RuntimeError)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.2962962962962963 + }, + { + "repo": "AndrewAnnex/SpiceyPy", + "expected": "np.pi", + "got": "np.pi", + "got_raw": "np.pi", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "AndrewAnnex/SpiceyPy", + "expected": "\"some error occured\"", + "got": "\"\" \"some error occured\" \"error\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\"", + "got_raw": "\"\" \"some error occured\" \"error\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\"", + "exact_match": false, + "code_bleu": 0.00978812730767257, + "edit_similarity": 0.09803921568627451 + }, + { + "repo": "AndrewAnnex/SpiceyPy", + "expected": "19", + "got": "20.000000000000002", + "got_raw": "20.000000000000002\n assert sc == 40.000000000000002\n assert time == 11.333333333333333\n assert ampm == \"AM\"\n\ndef test_et2lst_s(load_core_kernels):\n et = spice.str2et(\"2004 may 17 16:30:00\")\n lon = 281.49521", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "AnonymouX47/term-image", + "expected": "width", + "got": "width", + "got_raw": "width + 1 if width >= 0 else 0 - width + 1 if width < 0 else 1 + width + 1 if width > 0 else 0 + width + 1 if width < 0 else 1 + width + 1 if width > 0 else 0 + width + 1 if width < 0 else 1 + width + 1 if width > 0 else 0 + width + 1 if width < 0 else 1 + width + 1 if width > 0 else 0 + width + 1 if width < 0 else ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "AnonymouX47/term-image", + "expected": "TypeError, match=r\"'filepath'\")", + "got": "TypeError) as excinfo: from_file(1) assert str(excinfo.value) == \"Expected str or Path, got int instead.\" with pytest.raises(TypeError) as excinfo: from_file(1.0) assert str(excinfo.value) == \"Expected str or Path, got float instead.\" with pytest.raises(TypeError) as excinfo: from_file(b\"foo\") assert str(excinfo.value) == \"Expected str or Path, got bytes instead.\" with pytest.raises(TypeError) as excinfo: from_file(b\"foo\".decode()) assert str(excinfo.value) == \"Expected str or Path, got str instead.\" with", + "got_raw": "TypeError) as excinfo: from_file(1) assert str(excinfo.value) == \"Expected str or Path, got int instead.\" with pytest.raises(TypeError) as excinfo: from_file(1.0) assert str(excinfo.value) == \"Expected str or Path, got float instead.\" with pytest.raises(TypeError) as excinfo: from_file(b\"foo\") assert str(excinfo.value) == \"Expected str or Path, got bytes instead.\" with pytest.raises(TypeError) as excinfo: from_file(b\"foo\".decode()) assert str(excinfo.value) == \"Expected str or Path, got str instead.\" with", + "exact_match": false, + "code_bleu": 0.014505708252848148, + "edit_similarity": 0.08502772643253234 + }, + { + "repo": "AnonymouX47/term-image", + "expected": "9", + "got": "1", + "got_raw": "1 + len(prev_image_cviews) - 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "AnonymouX47/term-image", + "expected": "None", + "got": "None", + "got_raw": "None # Not set yet. def test_init_animated_with_frames(self): image = BlockImage(anim_img, frames=2) assert image._n_frames == 2 assert image._frame_duration == 0.001 assert image._seek_position == 0 def test_init_animated_with_duration(self): image = BlockImage(anim_img, duration=0.001) assert image._n_frames is None assert image._frame_duration == 0.001 assert image._seek_position == 0 def test_init_animated_with_frames_and_duration(self): image = BlockImage(anim_img,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "AnonymouX47/term-image", + "expected": "b\"\"", + "got": "\"\"", + "got_raw": "\"\"", + "exact_match": false, + "code_bleu": 0.29730177875068026, + "edit_similarity": 0.8 + }, + { + "repo": "AnonymouX47/term-image", + "expected": "0", + "got": "0", + "got_raw": "0 - next_z_index + 100 + 100 - 100 + 100 - 100 + 100 - 100 + 100 - 100 + 100 - 100 + 100 - 100 + 100 - 100 + 100 - 100 + 100 - 100 + 100 - 100 + 100 - 100 + 100 - 1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "AnonymouX47/term-image", + "expected": "1", + "got": "RenderData(Foo)", + "got_raw": "RenderData(Foo) # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore ", + "exact_match": false, + "code_bleu": 0.3021375397356768, + "edit_similarity": 0.0 + }, + { + "repo": "AnonymouX47/term-image", + "expected": "f\"{self.trans:1.1", + "got": "self.trans._renderer(self.trans._render_image)", + "got_raw": "self.trans._renderer(self.trans._render_image) == str(self.trans) == f\"{self.trans:1.1}\" == render.replace(SGR_BG_DIRECT, \"\") == render.replace(SGR_DEFAULT, \"\") == render.replace(\" \", \"\") == render.replace(\"\\n\", \"\") == render.replace(\"\\r\", \"\") == render.replace(\"\\t\", \"\") == render.replace(\"\\x1b[0m\", \"\") == render.replace(\"\\x1b[38;5;0m\", \"\") == render.replace(\"\\x1b[48;5;0m\", \"\") == render.replace(\"\\x1b[49m\", \"\")", + "exact_match": false, + "code_bleu": 0.19338531381761725, + "edit_similarity": 0.3492063492063492 + }, + { + "repo": "AnonymouX47/term-image", + "expected": "_size", + "got": "_size", + "got_raw": "_size * 20 + 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "AnonymouX47/term-image", + "expected": "{}", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.25, + "edit_similarity": 0.0 + }, + { + "repo": "AnonymouX47/term-image", + "expected": "2", + "got": "2.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "2.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "AnonymouX47/term-image", + "expected": "100", + "got": "100", + "got_raw": "100 * 2 + 100 // 2 + 100 // 4 + 100 // 8 + 100 // 16 + 100 // 32 + 100 // 64 + 100 // 128 + 100 // 256 + 100 // 512 + 100 // 1024 + 100 // 2048 + 100 // 4096 + 100 // 8", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "AnonymouX47/term-image", + "expected": "\"", + "got": "\"", + "got_raw": "\"#\" * 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "AnonymouX47/term-image", + "expected": "3", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "AnonymouX47/term-image", + "expected": "10", + "got": "10.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.03076923076923077 + }, + { + "repo": "Azure-Samples/rag-postgres-openai-python", + "expected": "\"22\"", + "got": "\"0\"", + "got_raw": "\"0\" response.text == \"\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5714285714285714 + }, + { + "repo": "Azure-Samples/rag-postgres-openai-python", + "expected": "\"\"", + "got": "\"test_token\"", + "got_raw": "\"test_token\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2857142857142857 + }, + { + "repo": "Azure-Samples/rag-postgres-openai-python", + "expected": "\"text-embedding-3-large\"", + "got": "\"embed-text-ada\"", + "got_raw": "\"embed-text-ada\" assert result.openai_chat_token == \"sk-...\" assert result.openai_embed_token == \"sk-...\" assert result.azure_openai_endpoint == \"https://azure-openai-chatgpt.openai.azure.com/openai/deployments/gpt-4o-mini/chat/completions\" assert result.azure_openai_embed_endpoint == \"https://azure-openai-chatgpt.openai.azure.com/openai/deployments/embed-text-ada/embeddings\" assert result.azure_openai_api_key == \"sk-...\" assert result.azure_openai_api_version == \"2023-03-01", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.45 + }, + { + "repo": "Azure-Samples/rag-postgres-openai-python", + "expected": "\"45\"", + "got": "\"23\"", + "got_raw": "\"23\" response.json() == {\"error\": \"Item not found\"}", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "Azure-Samples/rag-postgres-openai-python", + "expected": "response.content", + "got": "response.data.decode()", + "got_raw": "response.data.decode()", + "exact_match": false, + "code_bleu": 0.24446151121745047, + "edit_similarity": 0.631578947368421 + }, + { + "repo": "Azure-Samples/rag-postgres-openai-python", + "expected": "\"vectors\"", + "got": "\"simple\"", + "got_raw": "\"simple\" route.continue_()\n\n app.router.add_route(\"POST\", \"/\", handle)", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.35294117647058826 + }, + { + "repo": "BoboTiG/python-mss", + "expected": "SystemExit)", + "got": "SystemExit)", + "got_raw": "SystemExit) as exc_info, ) as capsys: entry_point() assert exc_info.value.code == 0 assert capsys.readouterr().err == \"\" assert capsys.readouterr().out == \"\" assert capsys.readouterr().err == \"\" assert capsys.readouterr().out == \"\" assert capsys.readouterr().err == \"\" assert capsys.readouterr().out == \"\" assert capsys.readouterr().err == \"\" assert capsys.readouterr().out == \"\" assert capsys.readouterr().err == \"\" assert capsys.readouterr().out == \"\" assert capsys.readout", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "BoboTiG/python-mss", + "expected": "0", + "got": "0", + "got_raw": "0 assert primary[\"top\"] == 0 assert primary[\"width\"] == 1920 assert primary[\"height\"] == 1080 assert primary[\"x\"] == 0 assert primary[\"y\"] == 0 assert primary[\"mon\"] == 0 assert primary[\"screen\"] == 0 assert primary[\"name\"] == \"Screen 1\" assert primary[\"model\"] == \"HDMI-1\" assert primary[\"type\"] == \"primary\" assert primary[\"is_primary\"] == True assert primary[\"is_clipped\"] == False assert primary[\"is_virtual\"] == False assert primary[\"is_external\"] == True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "BoboTiG/python-mss", + "expected": "repr(ref1)", + "got": "repr(ref1)", + "got_raw": "repr(ref1) # type: ignore\n\n # CGRect\n rect = mss.darwin.CGRect(2.0, 1.0, 3.0, 4.0)\n ref2 = mss.darwin.CGRect()\n ref2.origin.x = 2.0\n ref2.origin.y = 1.0\n ref2.size.width = 3.0\n ref2.size.height = 4.0\n\n assert repr(rect) == repr(ref2) # type: ignore\n\n # NSScreen\n screen = mss.d", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "BoboTiG/python-mss", + "expected": "output", + "got": "output.lower()", + "got_raw": "output.lower() + \"\\n\" + \"Successfully built mss-0.0.1\" + \"\\n\" + \"Successfully built mss-0.0.2\" + \"\\n\" + \"Successfully built mss-0.0.3\" + \"\\n\" + \"Successfully built mss-0.0.4\" + \"\\n\" + \"Successfully built mss-0.0.5\" + \"\\n\" + \"Successfully built mss-0.0.6\" + \"\\n\" + \"Successfully built mss-0.0.7\" + \"\\n\" + \"", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6 + }, + { + "repo": "BoboTiG/python-mss", + "expected": "im2.rgb", + "got": "im2.rgb", + "got_raw": "im2.rgb # type: ignore\n\n\ndef test_grab_with_dict(mss_impl: Callable[..., MSSBase]) -> None:\n left = 100\n top = 100\n right = 500\n lower = 500\n width = right - left # 400px width\n height = lower - top # 400px height\n\n with mss_impl() as sct:\n # PIL like\n box = {\"left\": left, \"top\": top, \"width\": width, \"height\": height}\n ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "BoboTiG/python-mss", + "expected": "ScreenShotError)", + "got": "ScreenShotError)", + "got_raw": "ScreenShotError) as excinfo: mss.darwin.get_screen() assert str(excinfo.value) == \"No CoreGraphics library found\" monkeypatch.setattr(ctypes.util, \"find_library\", lambda _: \"CoreGraphics\") monkeypatch.setattr(mss.darwin, \"CGDisplayPixelsWide\", lambda _: 1920) monkeypatch.setattr(mss.darwin, \"CGDisplayPixelsHigh\", lambda _: 1080) monkeypatch.setattr(mss.darwin, \"CGDisplayPixelsPerInch\", lambda _: 96) monkeypatch.setattr(mss.dar", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "BoboTiG/python-mss", + "expected": "ScreenShotError, match=r\"\\b8\\b\")", + "got": "ScreenShotError, match=\"8-bit color depth\") as excinfo) as excinfo:", + "got_raw": "ScreenShotError, match=\"8-bit color depth\") as excinfo) as excinfo:\n mss.screenshot(backend=backend)\n assert str(excinfo.value) == str(excinfo)[:-1] + \" is not supported\" + str(excinfo)[-1] + \".\" + str(excinfo)[:-1] + \" is not supported\" + str(excinfo)[-1] + \".\" + str(excinfo)[:-1] + \" is not supported\" + str(excinfo)[-1] + \".\" + str(excinfo)[:-1] + \" is not supported\" + str(excinfo", + "exact_match": false, + "code_bleu": 0.3026643726685863, + "edit_similarity": 0.5656565656565656 + }, + { + "repo": "BoboTiG/python-mss", + "expected": "{}", + "got": "[]", + "got_raw": "[] # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 #", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.0 + }, + { + "repo": "BoboTiG/python-mss", + "expected": "1024", + "got": "1024", + "got_raw": "1024 * 3 // 4 + 1024 // 2 + 1024 // 4 + 1024 // 8 + 1024 // 16 + 1024 // 32 + 1024 // 64 + 1024 // 128 + 1024 // 256 + 1024 // 512 + 1024 // 1024 + 1024 // 2048 + 10", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "BrainBlend-AI/atomic-agents", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as context: self.tool.fetch_webpage_content(self.mock_url) self.assertEqual( str(context.exception), \"Content exceeds maximum length limit.\" ) mock_get.assert_called_once_with(self.mock_url) self.assertEqual( self.tool.fetch_webpage_content(self.mock_url), \"X\" * self.config.max_content_length ) mock_get.assert_called_once_with(self.mock_url) self.assertEqual( self.tool.fetch_webpage_content(self.mock_url), \"X\" * self.config.max_content_length ) mock_get.assert_called_once_with(self.mock_url) self.assertEqual( self.tool.fetch_webpage_content(self.mock_url), \"X\" * self.config.max_content", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "BrainBlend-AI/atomic-agents", + "expected": "10", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.03076923076923077 + }, + { + "repo": "BrainBlend-AI/atomic-agents", + "expected": "Any", + "got": "\"Any\"", + "got_raw": "\"Any\" result[1] == \"An unknown field\" result[2] == False result[3] == False result[4] == False result[5] == False result[6] == False result[7] == False result[8] == False result[9] == False result[10] == False result[11] == False result[12] == False result[13] == False result[14] == False result[15] == False result[16] == False result[17] == False result[18] == False result[19", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.75 + }, + { + "repo": "BrainBlend-AI/atomic-agents", + "expected": "expected_prompt", + "got": "expected_prompt.strip()", + "got_raw": "expected_prompt.strip() + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\"", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.7894736842105263 + }, + { + "repo": "BrainBlend-AI/atomic-agents", + "expected": "30)", + "got": "30)", + "got_raw": "30) self.assertEqual(default_config.max_content_length, 100000) self.assertEqual(default_config.user_agent, \"Mozilla/5.0\") self.assertEqual(default_config.headers, {}) self.assertEqual(default_config.proxy, None) self.assertEqual(default_config.verify, True) self.assertEqual(default_config.retry_count, 3) self.assertEqual(default_config.retry_delay, 1) self.assertEqual(default_config.retry_backoff, 2) self.assertEqual(default_config.retry_jitter, 0.1) self.assertEqual(default_config.retry_status_codes, [500, 502, 503, 504])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "BrainBlend-AI/atomic-agents", + "expected": "payload_sent[\"include\"]", + "got": "payload_sent[\"include\"]", + "got_raw": "payload_sent[\"include\"] assert \"sina.com.cn\" in payload_sent[\"include\"] assert \"ads.example.com\" not in payload_sent[\"exclude\"] assert \"spam.cn\" not in payload_sent[\"exclude\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "BrainBlend-AI/atomic-agents", + "expected": "3", + "got": "3", + "got_raw": "3 # 2 original messages + 1 new message # Test loading with invalid data (should raise exception) with pytest.raises(ValueError) as exc_info: history.load(\"invalid data\") assert str(exc_info.value) == \"Invalid data format\" # Test loading with empty data (should create an empty history) empty_history = ChatHistory() empty_history.load(\"\") assert len(empty_history.history) == 0 # Test loading with a single message single_message_history = ChatHistory() single_message_history.add_message(\"user\", InputSchema(test_field=\"Single message\")) dumped_single =", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "BrainBlend-AI/atomic-agents", + "expected": "result2", + "got": "result2", + "got_raw": "result2 == { \"id\": tool_id, \"type\": \"function\", \"function\": { \"name\": \"MockToolCall\", \"arguments\": '{\"param1\": \"test\", \"param2\": 42}', }, } } def test_format_tool_message_with_custom_id(): tool_call = MockToolCall(param1=\"test\", param2=42) custom_id = \"custom-id\" result = format_tool_message(tool_call, custom_id) assert result[\"id\"] == custom_id def test_format_tool_message_with_empty_arguments(): tool_call = MockToolCall() result = format_tool_message(tool_call) assert result[\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "BrainBlend-AI/atomic-agents", + "expected": "2", + "got": "2", + "got_raw": "2 # results and count are the only fields in the model", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "BrainBlend-AI/atomic-agents", + "expected": "steps", + "got": "steps", + "got_raw": "steps + [\"Final Step\"] # Add the final step to the steps list generator.output_instructions == output_instructions + [\"Final Instruction\"] # Add the final instruction to the output_instructions list generator.context_providers == context_providers # Check that the context providers are correctly set generator._generate_system_prompt() == \"Background: Custom background\\nSteps: Step 1, Step 2, Final Step\\nOutput Instructions: Custom instruction, Final Instruction\" # Check that the system prompt is correctly generated \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "BrainBlend-AI/atomic-agents", + "expected": "\"Test description\"", + "got": "\"Test description\"", + "got_raw": "\"Test description\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "BrainBlend-AI/atomic-agents", + "expected": "\"MockToolCall\"", + "got": "\"MockToolCall\"", + "got_raw": "\"MockToolCall\" result[\"function\"][\"arguments\"] == '{\"param1\": \"test\", \"param2\": 42}'\n\n\ndef test_format_tool_message_with_tool_id():\n tool_call = MockToolCall(param1=\"test\", param2=42)\n tool_id = \"tool-123\"\n\n result = format_tool_message(tool_call, tool_id)\n\n assert result[\"id\"] == tool_id + \"-1\" # Tool ID with a suffix\n\n\ndef test_format_tool_message_with_tool_id_and_function_name():\n tool_call = MockToolCall(param1=\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "BrainBlend-AI/atomic-agents", + "expected": "CustomInput", + "got": "CustomInput", + "got_raw": "CustomInput | None # CustomInput is a schema, not BaseIOSchema # CustomOutput is a schema, not BaseIOSchema assert tool.output_schema == CustomOutput | None # CustomInput is a schema, not BaseIOSchema # CustomOutput is a schema, not BaseIOSchema assert isinstance(tool.input_schema, type) and isinstance(tool.output_schema, type) # CustomInput is a schema, not BaseIOSchema # CustomOutput is a schema, not BaseIOSchema assert not isinstance(tool.input_schema, BaseIOSchema) and not isinstance(tool.output_schema, BaseIOSchema) #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Chen-zexi/vllm-cli", + "expected": "8002", + "got": "8002", + "got_raw": "8002", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Chen-zexi/vllm-cli", + "expected": "2", + "got": "2", + "got_raw": "2\n assert config.models[0].name == \"model1\"\n assert config.models[1].name == \"model2\"\n assert config.enable_cors is True\n assert config.enable_metrics is False\n assert config.log_requests is True\n\n def test_proxy_config_validation(self):\n \"\"\"Test invalid ProxyConfig creation.\"\"\"\n with pytest.raises(ValidationError) as e:\n ProxyConfig(\n host=\"invalid_host\",\n port=8000,\n models=[ModelConfig(name=\"model1\", model_path=\"path1\", port=8001)],\n enable_cors", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Chen-zexi/vllm-cli", + "expected": "2", + "got": "2", + "got_raw": "2 # Adjusted value", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Chen-zexi/vllm-cli", + "expected": "initial_models", + "got": "initial_models", + "got_raw": "initial_models + [{\"name\": \"new_model\", \"type\": \"model\"}] + [{\"name\": \"another_model\", \"type\": \"model\"}] + [{\"name\": \"yet_another_model\", \"type\": \"model\"}] + [{\"name\": \"final_model\", \"type\": \"model\"}] + [{\"name\": \"final_model_2\", \"type\": \"model\"}] + [{\"name\": \"final_model_3\", \"type\": \"model\"}] + [{\"name\": \"final_model_4\", \"type\": \"model\"}] + [{\"name\": \"final_model_5\", \"type\":", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Chen-zexi/vllm-cli", + "expected": "8001", + "got": "8001", + "got_raw": "8001 assert config.profile == \"standard\" assert config.config_overrides == {\"max_tokens\": 2048} assert config.enabled is True\n\n def test_model_config_creation_with_invalid_gpu_ids(self):\n \"\"\"Test creating a ModelConfig with invalid GPU IDs.\"\"\"\n with pytest.raises(ValidationError) as e:\n ModelConfig( name=\"test-model\", model_path=\"/path/to/model\", gpu_ids=[-1, 1], port=8001, profile=\"standard\", config_overrides={\"max_tokens\": 2048}, enabled=True, ) assert str(e.value) ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Chen-zexi/vllm-cli", + "expected": "False", + "got": "False", + "got_raw": "False\n\n def test_start(self, mock_server_config):\n \"\"\"Test VLLMServer.start().\"\"\"\n server = VLLMServer(mock_server_config)\n server.start()\n\n assert server.process is not None\n assert server.is_running() is True\n\n def test_stop(self, mock_server_config):\n \"\"\"Test VLLMServer.stop().\"\"\"\n server = VLLMServer(mock_server_config)\n server.start()\n server.stop()\n\n assert server.process is None\n assert server.is_running() is False\n\n def test_is_running(self, mock_server_config):", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Chen-zexi/vllm-cli", + "expected": "1", + "got": "1", + "got_raw": "1 # Hit count should be 1 after a hit assert stats[\"misses\"] == 0 # Miss count should be 0 after a hit assert stats[\"total\"] == 1 # Total count should be 1 after a hit assert stats[\"size\"] == 0 # Size should be 0 after a hit assert stats[\"max_size\"] == 0 # Max size should be 0 after a hit assert stats[\"evictions\"] == 0 # Evictions should be 0 after a hit assert stats[\"hits_ratio\"] == 1.0 #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Chen-zexi/vllm-cli", + "expected": "{}", + "got": "\"\"", + "got_raw": "\"\" ) == result[\"metadata\"] # metadata is empty for Ollama models", + "exact_match": false, + "code_bleu": 0.25, + "edit_similarity": 0.0 + }, + { + "repo": "Chen-zexi/vllm-cli", + "expected": "None", + "got": "None", + "got_raw": "None # type: ignore # noqa: E721 assert len(manifest) == 1 assert \"test-model\" in manifest assert manifest[\"test-model\"] == { \"architectures\": [\"TestModel\"], \"model_type\": \"test\", \"vocab_size\": 1000, \"hidden_size\": 768, } # Test applying the manifest to a model model = manifest[\"test-model\"] apply_manifest_to_models([model], test_model_dir) # Check if the model's files have been updated assert (test_model_dir / \"config.json\").exists", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Chen-zexi/vllm-cli", + "expected": "None", + "got": "None", + "got_raw": "None and len(manager.cache.get_cached_models()) == 1 # type: ignore\n\n # Refresh the cache and check if it's empty again\n manager.cache.refresh_cache() # type: ignore\n assert manager.cache.get_cached_models() is None # type: ignore\n\n def test_refresh_cache_with_error(self):\n \"\"\"Test the refresh_cache method handles errors properly.\"\"\"\n manager = ModelManager() # type: ignore\n\n # Mock the cache.refresh_cache method to raise an exception\n with patch.object(ModelCache, \"refresh_cache\", side_effect=Exception) as mock_refresh: #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Chen-zexi/vllm-cli", + "expected": "8080", + "got": "8080", + "got_raw": "8080 assert last_config[\"tensor_parallel_size\"] == 2", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Chen-zexi/vllm-cli", + "expected": "\"gguf\"", + "got": "\"gguf\"", + "got_raw": "\"gguf\" # Default quantization for Ollama models is GGUF", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Chen-zexi/vllm-cli", + "expected": "\"stop\"", + "got": "\"stop\"", + "got_raw": "\"stop\" assert args.port == 8000 assert args.host == \"0.0.0.0\" assert args.verbose is False assert args.debug is False assert args.config_file is None assert args.config_dir is None assert args.config_path is None assert args.config_name is None assert args.config_section is None assert args.config_value is None assert args.config_file_path is None assert args.config_dir_path is None assert args.config_path_path is None assert args.config_name_path is None assert args.config_section_path is None assert args.config_value_path is None assert args.config_file_path_path is None assert args.config_dir_path_path is", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Cloxl/xhshow", + "expected": "len(uri)", + "got": "len(uri)", + "got_raw": "len(uri) + 1 # +1 for the slash at the end of the URI.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Cloxl/xhshow", + "expected": "session.window_props_length", + "got": "session.window_props_length", + "got_raw": "session.window_props_length + 1 # +1 for the new cookie \"web_session\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Cloxl/xhshow", + "expected": "50", + "got": "0", + "got_raw": "0\n\n assert result[0] == hex_param + a1_value + \"00\" + \"00\" + \"00\" + \"00\" + \"00\" + \"00\" + \"00\" + \"00\" + \"00\" + \"00\" + \"00\" + \"00\" + \"00\" + \"00\" + \"00\" + \"00\" + \"00\" + \"00\" + \"00\" + \"00\" + \"00\" + \"00\" + \"0", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "Cloxl/xhshow", + "expected": "\"/api/search\"", + "got": "\"/api/search\"", + "got_raw": "\"/api/search\" + hashlib.md5(b'{\"keyword\":\"\u6d4b\u8bd5\"}').hexdigest() + \"/\" + hashlib.md5(b'{\"keyword\":\"\u6d4b\u8bd5\"}').hexdigest() + \"/\" + hashlib.md5(b'{\"keyword\":\"\u6d4b\u8bd5\"}').hexdigest() + \"/\" + hashlib.md5(b'{\"keyword\":\"\u6d4b\u8bd5\"}').hexdigest() + \"/\" + hashlib.md5(b'{\"keyword\":\"\u6d4b\u8bd5\"}').hexdigest() + \"/\" + hashlib.md5(b'{\"keyword\":\"\u6d4b\u8bd5\"}').hexdigest() + \"/\" + hashlib.md5(b'{\"keyword\":\"\u6d4b\u8bd5\"}').hexdigest() + \"/\" + hashlib.md5(b'{\"keyword\":\"\u6d4b\u8bd5\"}').", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Cloxl/xhshow", + "expected": "32", + "got": "32", + "got_raw": "32 + 2 * 4 + 2 * 8 + 2 * 16 + 2 * 32 + 2 * 64 + 2 * 128 + 2 * 256 + 2 * 512 + 2 * 1024 + 2 * 2048 + 2 * 4096 + 2 * 8192 + 2 * 16384 + 2 * 32768 + 2 * 65536 + 2", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Cranot/roam-code", + "expected": "0", + "got": "0", + "got_raw": "0 result.stdout == \"\"\"\\ User dependency: requests (1.2.3) - Impact: 1 dependency - Impact: 1 dependency - Impact: 1 dependency - Impact: 1 dependency - Impact: 1 dependency - Impact: 1 dependency - Impact: 1 dependency - Impact: 1 dependency - Impact: 1 dependency - Impact: 1 dependency - Impact: 1 dependency - Impact: 1 dependency - Impact: 1 dependency - Impact: 1 dependency - Impact: 1 dependency - Impact: 1 dependency - Impact: 1 dependency - Impact: 1 dependency - Impact:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Cranot/roam-code", + "expected": "0", + "got": "0", + "got_raw": "0 # noqa: E501 result.stdout == \"No auth gaps found.\\n\" result.stderr == \"\" # noqa: E501 result.output == \"\" # noqa: E501 result.exception is None # noqa: E501 result.exception_type is None # noqa: E501 result.exception_message is None # noqa: E501 result.exception_traceback is None # noqa: E501 result.exception_cause is None # noqa: E501 result.exception_cause_type is None # noqa: E501 result.exception_c", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Cranot/roam-code", + "expected": "0", + "got": "1.0000000000000002e-05", + "got_raw": "1.0000000000000002e-05 * 100.00000000000002 * 100.00000000000002 * 100.00000000000002 * 100.00000000000002 * 100.00000000000002 * 100.", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.08695652173913043 + }, + { + "repo": "Cranot/roam-code", + "expected": "2", + "got": "2", + "got_raw": "2 * 2 + 1 * 2 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 *", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Cranot/roam-code", + "expected": "1", + "got": "1", + "got_raw": "1 + 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Cranot/roam-code", + "expected": "result.output", + "got": "result.output.strip()", + "got_raw": "result.output.strip() + \"\\n\" \"SUCCESS\\n\" \"VERDICT:\" in result.output.strip() + \"\\n\" \"SUCCESS\\n\" \"VERDICT:\" in result.output.strip() + \"\\n\" \"SUCCESS\\n\" \"VERDICT:\" in result.output.strip() + \"\\n\" \"SUCCESS\\n\" \"VERDICT:\" in result.output.strip() + \"\\n\" \"SUCCESS\\n\" \"VERDICT:\" in result.output.strip() + \"\\n\" \"SUCCESS\\n\" \"VERDICT:\" in result.output.strip() + \"\\n\" \"SUCCESS\\n\" \"VERDICT:\" in result.output", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.7647058823529411 + }, + { + "repo": "Cranot/roam-code", + "expected": "n", + "got": "n_items", + "got_raw": "n_items + 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.25 + }, + { + "repo": "Cranot/roam-code", + "expected": "out", + "got": "out.splitlines()[-1]", + "got_raw": "out.splitlines()[-1] assert \"service.py\" in out.splitlines()[-2] assert \"api.py\" in out.splitlines()[-3] assert \"tests/test_service.py\" in out.splitlines()[-4] assert \"utils.py\" not in out.splitlines()[-5] assert \"tests/test_utils.py\" not in out.splitlines()[-6] assert \"tests/test_format_name.py\" not in out.splitlines()[-7] assert \"tests/test_format_name.py\" not in out.splitlines()[-8] assert \"tests/test_format_name.py\" not in out.splitlines()[-9", + "exact_match": false, + "code_bleu": 0.14113991930789777, + "edit_similarity": 0.2608695652173913 + }, + { + "repo": "Cranot/roam-code", + "expected": "[]", + "got": "[]", + "got_raw": "[] # Empty list since there are no taint summaries. \"\"\" def test_returns_empty_when_no_taints(self, tmp_path): \"\"\"If there are no taints, returns empty list.\"\"\" db_path = tmp_path / \"no_taints.db\" conn = sqlite3.connect(str(db_path)) conn.row_factory = sqlite3.Row conn.execute(\"CREATE TABLE IF NOT EXISTS files (id INTEGER PRIMARY KEY, path TEXT)\") conn.execute(\"CREATE TABLE IF NOT EXISTS taint_summaries (symbol_id INTEGER, param_taints_return INTEGER, param_to_sink INTEGER, is_sanitizer INTEGER)\") conn.execute(\"INSERT INTO files", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Cranot/roam-code", + "expected": "ep", + "got": "ep", + "got_raw": "ep and isinstance(ep[\"name\"], str) and ep[\"name\"] != \"\" for k in [\"kind\", \"protocol\", \"file\", \"line\", \"fan_out\"] if k in ep: assert isinstance(ep[k], int) or isinstance(ep[k], str) and ep[k] != \"\" assert ep[\"name\"] != ep[\"kind\"] assert ep[\"name\"] != ep[\"protocol\"] assert ep[\"name\"] != ep[\"file\"] assert ep[\"name\"] != ep[\"line\"] assert ep[\"name\"] != ep[\"fan_out\"] assert ep[\"name\"] != ep[\"file\"] + ep[\"line\"] + ep", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Cranot/roam-code", + "expected": "0", + "got": "0.001", + "got_raw": "0.001 * 30.000 * 20.000 * 2_000.000 / 1000.000 / 1000.000 / 1000.000 / 1000.000 / 1000.000 / 1000.000 / 1000.000 / 1000.000 / 1000.000 / 1000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "Cranot/roam-code", + "expected": "d", + "got": "d", + "got_raw": "d and \"score\" in d and \"description\" in d and \"url\" in d and \"tags\" in d and \"type\" in d and \"value\" in d and \"source\" in d and \"source_url\" in d and \"source_type\" in d and \"source_tags\" in d and \"source_description\" in d and \"source_score\" in d and \"source_url\" in d and \"source_type\" in d and \"source_tags\" in d and \"source_description\" in d and \"source_score\" in d and \"source_url\" in d and \"source_type\" in d and", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Cranot/roam-code", + "expected": "\"b\"", + "got": "\"b\"", + "got_raw": "\"b\" assert result[1][\"name\"] == \"a\" def test_score_pagerank(self): \"\"\"'score' takes priority over 'pagerank' when both are present.\"\"\" from roam.output.formatter import _sort_by_importance items = [ {\"name\": \"a\", \"pagerank\": 0.1, \"score\": 100}, {\"name\": \"b\", \"pagerank\": 0.9, \"score\": 100}, ] result, was_sorted = _sort_by_importance(items) assert was_sorted is True assert result[0][\"name\"] == \"b\" assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Cranot/roam-code", + "expected": "1", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "Cranot/roam-code", + "expected": "h", + "got": "h", + "got_raw": "h and \"line\" in h and \"col\" in h and \"partition\" in h for h in result[\"conflict_hotspots\"] for h in result[\"conflict_hotspots\"] for h in result[\"conflict_hotspots\"] for h in result[\"conflict_hotspots\"] for h in result[\"conflict_hotspots\"] for h in result[\"conflict_hotspots\"] for h in result[\"conflict_hotspots\"] for h in result[\"conflict_hotspots\"] for h in result[\"conflict_hotspots\"] for h in result[\"conflict_hotspots\"] for h in result[\"conflict_hotspots", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Cranot/roam-code", + "expected": "1", + "got": "[\"health_score>=70\"]", + "got_raw": "[\"health_score>=70\"] report[\"details\"] == {\"health_score\": 82} report[\"summary\"] == {\"health_score\": 82} report[\"error\"] is None report[\"warning\"] is None report[\"info\"] is None report[\"message\"] is None report[\"severity\"] == \"info\" report[\"type\"] == \"scalar\" report[\"id\"] == \"health_score>=70\" report[\"description\"] == \"health_score>=70\" report[\"url\"] is None report[\"tags\"] == [] report[\"metadata\"] == {} report[\"context\"] == {} report[\"file\"] == \"health", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.0 + }, + { + "repo": "Cranot/roam-code", + "expected": "0", + "got": "0", + "got_raw": "0 \"\"\"Should exit with zero status code\"\"\" \"\"\"Should print a message\"\"\" \"\"\"Should print a JSON object\"\"\" \"\"\"Should print a JSON object with a single key-value pair\"\"\" \"\"\"Should print a JSON object with a single key-value pair with a value of 1\"\"\" \"\"\"Should print a JSON object with a single key-value pair with a value of 1\"\"\" \"\"\"Should print a JSON object with a single key-value pair with a value of 1\"\"\" \"\"\"Should print a JSON object with a single key-value pair with a value of 1\"\"\" \"\"\"Should print a JSON object with a single key-value pair with a value of ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Cranot/roam-code", + "expected": "2", + "got": "2", + "got_raw": "2 - 1 # 1 result, 1 limit, 1 offset 0 # 0 results, 2 limit, 1 offset 1 # 1 result, 2 limit, 2 offset 2 # 2 results, 2 limit, 2 offset 3 # 3 results, 2 limit, 3 offset 4 # 4 results, 2 limit, 4 offset 5 # 5 results, 2 limit, 5 offset 6 # 6 results, 2 limit, 6 offset 7 # 7 results, 2 limit, 7 offset", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Cranot/roam-code", + "expected": "f", + "got": "f", + "got_raw": "f and f[\"file\"] == \"config/settings.py\" and \"line\" in f and f[\"line\"] == 2 and \"column\" in f and f[\"column\"] == 12 and \"severity\" in f and f[\"severity\"] == \"INFO\" and \"message\" in f and f[\"message\"] == \"AWS_ACCESS_KEY found\" and \"secret\" in f and f[\"secret\"] == \"AKIAIOSFODNN7TESTDATA\" and \"type\" in f and f[\"type\"] == \"AWS_ACCESS_KEY\" and \"key\" in f and f[\"key\"] == \"AWS", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Cranot/roam-code", + "expected": "7", + "got": "7", + "got_raw": "7 # 7 dimensions: 1. Language 2. Framework 3. Database 4. Server 5. Framework 6. Database 7. Server 8. Framework 9. Database 10. Server 11. Framework 12. Database 13. Server 14. Framework 15. Database 16. Server 17. Framework 18. Database 19. Server 20. Framework 21. Database 22. Server 23. Framework 24. Database 25. Server 26. Framework", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "CursorTouch/Windows-MCP", + "expected": "0", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "CursorTouch/Windows-MCP", + "expected": "result", + "got": "result.lower()", + "got_raw": "result.lower() and \"2.0 KB\" in result.lower() and \"15.01.2025 10:30:00\" in result.lower() and \"20.06.2025 14:00:00\" in result.lower() and \"21.06.2025 09:00:00\" in result.lower() and \"False\" in result.lower() and \"File\" in result.lower() and \"2048\" in result.lower() and \"1\" in result.lower() and", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6 + }, + { + "repo": "CursorTouch/Windows-MCP", + "expected": "1900", + "got": "1920", + "got_raw": "1920 - 1000 - 1000 + 1000 + 1000 + 1000 + 1000 + 1000 + 1000 + 1000 + 1000 + 1000 + 1000 + 1000 + 1000 + 1000 + 1000 + 1000 + 1000 + 1000 + 1000 + 10", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.75 + }, + { + "repo": "CursorTouch/Windows-MCP", + "expected": "\"Maximized\"", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "CursorTouch/Windows-MCP", + "expected": "\"''\"", + "got": "\"\"", + "got_raw": "\"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "CursorTouch/Windows-MCP", + "expected": "MAX_RETRIES", + "got": "MAX_RETRIES", + "got_raw": "MAX_RETRIES + 1 # +1 for the initial request mock_post.call_count == 1 # +1 for the initial request mock_sleep.call_count == RETRY_BACKOFF * MAX_RETRIES # +1 for the initial request mock_sleep.call_count == 1 # +1 for the initial request mock_sleep.call_count == 1 # +1 for the initial request mock_sleep.call_count == 1 # +1 for the initial request mock_sleep.call_count == 1 # +1 for the initial request mock_sleep.call_count == 1 # +1 for the initial request mock_sleep.call", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "CursorTouch/Windows-MCP", + "expected": "1920", + "got": "1920", + "got_raw": "1920\n assert result.bottom == 1080", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "CursorTouch/Windows-MCP", + "expected": "{\"key\": \"value\", \"count\": 42}", + "got": "{\"key\": \"value\", \"count\": 42}", + "got_raw": "{\"key\": \"value\", \"count\": 42} # type: ignore mock_analytics.track.assert_called_once_with( \"test_tool\", {\"key\": \"value\", \"count\": 42}, ) mock_analytics.track.assert_called_once_with( \"test_tool\", {\"key\": \"value\", \"count\": 42}, ) mock_analytics.track.assert_called_once_with( \"test_tool\", {\"key\": \"value\", \"count\": 42}, ) mock_analytics.track.assert_called_once_with( \"test_tool\", {\"key\": \"value\", \"count\": 42", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DHI/terracotta", + "expected": "np.array([2, 0, 1]))", + "got": "[1, 1, 1])", + "got_raw": "[1, 1, 1])", + "exact_match": false, + "code_bleu": 0.29876416720450677, + "edit_similarity": 0.5333333333333333 + }, + { + "repo": "DHI/terracotta", + "expected": "db", + "got": "db.meta_store", + "got_raw": "db.meta_store ###/ Target: db.meta_store is db.meta_store ###/ Target: db.meta_store is db.meta_store ###/ Target: db.meta_store is db.meta_store ###/ Target: db.meta_store is db.meta_store ###/ Target: db.meta_store is db.meta_store ###/ Target: db.meta_store is db.meta_store ###/ Target: db.meta_store is db.meta_store ###/ Target: db.meta_store is db.meta_store ###/ Target: db.meta_store is db.meta_store ###/ Target: db.meta_store is db.meta_store ###/ Target: db.meta_store is db.meta_store ###/ Target:", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.26666666666666666 + }, + { + "repo": "DHI/terracotta", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as exc_info: drivers.DatabasePath(db_path) assert str(exc_info.value) == \"Invalid database path: {}\".format(case)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DHI/terracotta", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as excinfo: drivers.get_driver(\"invalid\")\n assert str(excinfo.value) == \"Invalid driver: invalid\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DHI/terracotta", + "expected": "tile_identity_transform)", + "got": "tile_identity_transform)", + "got_raw": "tile_identity_transform)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DHI/terracotta", + "expected": "src2.read())", + "got": "src2.read())", + "got_raw": "src2.read())", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DHI/terracotta", + "expected": "(\"foo\", \"rgb\")", + "got": "[\"rgb\", \"foo\"] driver.load() assert driver.get(\"rgb\") == \"m\" assert driver.get(\"foo\") == \"bar\" driver.close() shutil.rmtree(str(outfile))", + "got_raw": "[\"rgb\", \"foo\"] driver.load() assert driver.get(\"rgb\") == \"m\" assert driver.get(\"foo\") == \"bar\" driver.close() shutil.rmtree(str(outfile))", + "exact_match": false, + "code_bleu": 0.04736661966023997, + "edit_similarity": 0.15894039735099338 + }, + { + "repo": "DHI/terracotta", + "expected": "repr(db)", + "got": "repr(db)", + "got_raw": "repr(db)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DHI/terracotta", + "expected": "driver.key_names", + "got": "tuple(driver.keys())", + "got_raw": "tuple(driver.keys()) + (\"test_key\",) + (\"test_key2\",) + (\"test_key3\",) + (\"test_key4\",) + (\"test_key5\",) + (\"test_key6\",) + (\"test_key7\",) + (\"test_key8\",) + (\"test_key9\",) + (\"test_key10\",) + (\"test_key11\",) + (\"test_key12\",) + (\"test_key13\",) + (\"test_key14\",) + (\"test_key15\",) + (\"test_key16\",) + (\"test_key17", + "exact_match": false, + "code_bleu": 0.21105340631872638, + "edit_similarity": 0.6111111111111112 + }, + { + "repo": "DHI/terracotta", + "expected": "keys", + "got": "keys", + "got_raw": "keys + (\"_meta\",) + (\"_meta\", \"_meta\") + (\"_meta\", \"_meta\") + (\"_meta\", \"_meta\") + (\"_meta\", \"_meta\") + (\"_meta\", \"_meta\") + (\"_meta\", \"_meta\") + (\"_meta\", \"_meta\") + (\"_meta\", \"_meta\") + (\"_meta\", \"_meta\") + (\"_meta\", \"_meta\") + (\"_meta\", \"_meta\") + (\"_meta\", \"_meta\") + (\"_meta\", \"_meta\") + (\"_meta\", \"_meta\") + (\"_meta\", \"_meta\") +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DHI/terracotta", + "expected": "test_tile_size", + "got": "test_tile_size", + "got_raw": "test_tile_size + (3,) if img_data.shape[2] == 3 else test_tile_size + (1,) if img_data.shape[2] == 1 else (1,) + test_tile_size + (3,) if img_data.shape[0] == 1 else (1,) + test_tile_size + (1,) if img_data.shape[0] == 1 else (3,) + test_tile_size + (1,) if img_data.shape[1] == 1 else (1,) + test_tile_size + (3,) if img_data.shape[1] == 1 else (1,) +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DHI/terracotta", + "expected": "terracotta.cmaps.get_cmaps.AVAILABLE_CMAPS", + "got": "terracotta.cmaps.get_cmaps.get_cmaps()[\"foo\"][\"cmap\"][\"data\"][\"data\"][:", + "got_raw": "terracotta.cmaps.get_cmaps.get_cmaps()[\"foo\"][\"cmap\"][\"data\"][\"data\"][:, 0] - 128.0 / 255.0 * 255.0 + 128.0 / 255.0 * 255.0 + 128.0 / 255.0 * 255.0 + 128.0 / 255.0 * 255.0 + 128.0 / 255.0 *", + "exact_match": false, + "code_bleu": 0.23956565612760206, + "edit_similarity": 0.49557522123893805 + }, + { + "repo": "DHI/terracotta", + "expected": "4", + "got": "4", + "got_raw": "4\n assert len(cmap[0][\"name\"]) == 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DHI/terracotta", + "expected": "1", + "got": "1", + "got_raw": "1 subsegment.cause[\"exceptions\"][0][\"type\"] == \"NotImplementedError\" subsegment.cause[\"exceptions\"][0][\"message\"] == \"foo\" subsegment.cause[\"exceptions\"][0][\"stack\"] == \"Traceback (most recent call last):\\n\" \" File \\\"\\\", line 1, in \\n\" \"NotImplementedError: foo\" subsegment.cause[\"exceptions\"][0][\"traceback\"] == [ \"File \\\"\\\", line 1, in \", \"NotImplementedError: foo\", ] subsegment.cause[\"exceptions\"][0][\"stack", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DHI/terracotta", + "expected": "terracotta.exceptions.TileOutOfBoundsError)", + "got": "exceptions.DataError)", + "got_raw": "exceptions.DataError) as excinfo:\n singleband.singleband(ds[keys], 0, 0, 0, 0)\n assert str(excinfo.value) == \"Invalid band number\"", + "exact_match": false, + "code_bleu": 0.3387551654364098, + "edit_similarity": 0.5625 + }, + { + "repo": "DHI/terracotta", + "expected": "result)", + "got": "result)", + "got_raw": "result)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DLR-RM/stable-baselines3", + "expected": "1.0", + "got": "1.0", + "got_raw": "1.0 # Done should be set to 1.0 # (tmp truncation should not be set) # (it would set batch.done=False) # Check that self.pos-1 truncation is set when buffer is full # Note: buffer size is 10, here we are erasing past transitions # We create a tmp truncation to not sample across episodes # batch = buffer._get_samples(np.array([base_idx])) # actual = batch.rewards.item() # expected = compute_expected_nstep_reward(gamma=0.99, n_steps=n_steps, stop_idx=buffer.pos - 1) #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DLR-RM/stable-baselines3", + "expected": "1.0", + "got": "1.0", + "got_raw": "1.0 - 1e-6 # 1e-6 is a small number to account for floating-point precision errors # Check that the inverse of the bijector is correct # Check that the inverse of the bijector is correct # Check that the inverse of the bijector is correct # Check that the inverse of the bijector is correct # Check that the inverse of the bijector is correct # Check that the inverse of the bijector is correct # Check that the inverse of the bijector is correct # Check that the inverse of the biject", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DLR-RM/stable-baselines3", + "expected": "0.8", + "got": "0.800000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.800000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.04580152671755725 + }, + { + "repo": "DLR-RM/stable-baselines3", + "expected": "True", + "got": "True", + "got_raw": "True\n\n\ndef test_monitor_load(tmp_path):\n \"\"\"\n Test the monitor load function\n \"\"\"\n env = gym.make(\"CartPole-v1\")\n env.reset(seed=0)\n monitor_file = os.path.join(str(tmp_path), f\"stable_baselines-test-{uuid.uuid4()}.monitor.csv\")\n monitor_env = Monitor(env, monitor_file)\n monitor_env.reset()\n total_steps = 1000\n ep_rewards = []\n ep_lengths = []\n ep_len, ep_reward = 0, 0\n for _ in range(total_steps):\n _, reward, terminated,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DLR-RM/stable-baselines3", + "expected": "1", + "got": "1", + "got_raw": "1 if os.path.exists(monitor_file1) else 0 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DLR-RM/stable-baselines3", + "expected": "1.0", + "got": "0.5", + "got_raw": "0.5 * model.action_space.high[0] + 0.5 * model.action_space.low[0] + 0.5 * model.action_space.high[0] - 0.5 * model.action_space.low[0] + 0.5 * model.action_space.high[0] - 0.5 * model.action_space.low[0] + 0.5 * model.action_space.high[0] - 0.5 * model.action_space.low[0] + 0.5 * model.action_space.high[0] - 0.5 * model.action_space.low[0]", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "DLR-RM/stable-baselines3", + "expected": "None", + "got": "None", + "got_raw": "None for _ in range(N_ENVS) assert getattr_result == [42] * N_ENVS if vec_env_class == DummyVecEnv: assert vec_env.envs[0].dummy1 == 42 assert vec_env.envs[1].dummy1 == 42 assert vec_env.envs[2].dummy1 == 42 if vec_env_wrapper is not None: assert getattr_result[0] == 42 assert getattr_result[1] == 42 assert getattr_result[2] == 42\n\n\n@pytest.mark.parametrize(\"vec_env_class\", VEC_ENV_CLASSES)\n@pytest.mark.parametrize(\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DLR-RM/stable-baselines3", + "expected": "None", + "got": "None", + "got_raw": "None # Check that the policy is not None before using it in the evaluation function\n model.n_callback_calls = 0 # Reset the callback counter before each evaluation\n mean_reward, std_reward = evaluate_policy( model, model.env, n_eval_episodes=n_eval_episodes, deterministic=True, render=False, callback=dummy_callback, return_episode_rewards=True, n_steps_per_episode=n_steps_per_episode, ) # Check that the callback is called correctly for each episode\n assert model.n_callback_calls == n_eval_episodes # Check that the mean reward is a float and the std reward is a float\n assert isinstance", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DLR-RM/stable-baselines3", + "expected": "str(tmp_path)", + "got": "str(tmp_path)", + "got_raw": "str(tmp_path) + \"/logs\" + time.strftime(\"/%Y-%m-%d-%H-%M-%S\") + \"/\" + logger.name + \"/\" + logger._get_run_id() + \"/\" logger.name + \"_run_\" + logger._get_run_id() + \"/\" + logger.name + \"_run_\" + logger._get_run_id() + \"_\" + logger._get_run_id() + \"_\" + logger._get_run_id() + \"_\" + logger._get_run_id() + \"_\" + logger._get_run_id() + \"_\" + logger._get_run_id() + \"_\" + logger._get_run_id() + \"_\" + logger", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DLR-RM/stable-baselines3", + "expected": "0", + "got": "0.001", + "got_raw": "0.001 # 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "DLR-RM/stable-baselines3", + "expected": "infos[0][\"episode\"][\"l\"]", + "got": "infos[0][\"episode\"][\"l\"]", + "got_raw": "infos[0][\"episode\"][\"l\"] + 1.0 # +1 for the last step of the episode\n ep_len, ep_reward = 0, 0\n monitor_env.close()\n monitor_data = pandas.read_csv(monitor_file)\n assert len(monitor_data) == total_steps + 1 # +1 for the reset call\n assert monitor_data[\"episode\"].max() == total_steps + 1.0 # +1 for the reset call\n assert monitor_data[\"episode\"].min() == 1.0 # +1 for the reset call\n ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DLR-RM/stable-baselines3", + "expected": "gamma", + "got": "gamma", + "got_raw": "gamma ** 3.0 / gamma ** 2.0 ** 3.0 ** 2.0 ** 3.0 ** 2.0 ** 3.0 ** 2.0 ** 3.0 ** 2.0 ** 3.0 ** 2.0 ** 3.0 ** 2.0 ** 3.0 ** 2.0 ** 3.0 ** 2.0 ** 3.0 ** 2.0 ** 3.0 ** 2.0 ** 3.0 ** 2.0 ** 3.0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DLR-RM/stable-baselines3", + "expected": "None", + "got": "None", + "got_raw": "None # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DLR-RM/stable-baselines3", + "expected": "0.3", + "got": "[0.3", + "got_raw": "[0.3, 0.5, 0.8] * steps_per_log / ep_steps * 100.0 * 100.0 / 100.0 * 100.0 / 100.0 * 100.0 / 100.0 * 100.0 / 100.0 * 100.0 / 100.0 * 100.0 / 100.0 * 100.0 / 100.0 *", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.8571428571428571 + }, + { + "repo": "DLR-RM/stable-baselines3", + "expected": "model.policy.device.type", + "got": "model.policy.device.type", + "got_raw": "model.policy.device.type # noqa: E712 # pylint: disable=E1101 # pylint: disable=E1101 # pylint: disable=E1101 # pylint: disable=E1101 # pylint: disable=E1101 # pylint: disable=E1101 # pylint: disable=E1101 # pylint: disable=E1101 # pylint: disable=E1101 # pylint: disable=E1101 # pylint: disable=E1101 # pylint: disable=E", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DLR-RM/stable-baselines3", + "expected": "TypeError)", + "got": "TypeError)", + "got_raw": "TypeError) as e_info: check_env(env) assert str(e_info.value) == \"reset() missing 1 required positional argument: 'seed'\"\n\n\ndef test_common_failures_step():\n \"\"\"\n Test that common failure cases of the `step_method` are caught\n \"\"\"\n env = IdentityEnvBox()\n # Return an action that does not match the action_space\n check_step_assert_error(env, 1)\n # The action is not a numpy array\n check_step_assert_error(env, 1.0)\n # Return only obs (gym < 0.26)\n ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DLR-RM/stable-baselines3", + "expected": "AssertionError, match=r\"use_sde=True\")", + "got": "AssertionError) as err: SAC( env=gym.make(\"Pendulum-v1\"), device=\"cpu\", sde_squash=False, ) assert str(err.value) == \"SDEs are only supported with squashing\"", + "got_raw": "AssertionError) as err: SAC( env=gym.make(\"Pendulum-v1\"), device=\"cpu\", sde_squash=False, ) assert str(err.value) == \"SDEs are only supported with squashing\"", + "exact_match": false, + "code_bleu": 0.0433662281769497, + "edit_similarity": 0.26666666666666666 + }, + { + "repo": "DLR-RM/stable-baselines3", + "expected": "callback.locals[\"new_obs\"]", + "got": "None", + "got_raw": "None # None is the default value for the callback # and is not modified by the event callback # Check that the event callback was called # Check that the event callback was called # Check that the event callback was called # Check that the event callback was called # Check that the event callback was called # Check that the event callback was called # Check that the event callback was called # Check that the event callback was called # Check that the event callback was called # Check that the event callback was called # Check that the event callback was called # Check that the event callback was called # Check that the event callback was called # Check that the event", + "exact_match": false, + "code_bleu": 0.08333333333333333, + "edit_similarity": 0.2 + }, + { + "repo": "DebarghaG/proofofthought", + "expected": "any(\"Unknown optimization type\" in msg for msg in cm.output))", + "got": "any(\"Unknown objective type\" in msg for msg in cm.output))", + "got_raw": "any(\"Unknown objective type\" in msg for msg in cm.output))", + "exact_match": false, + "code_bleu": 0.8091067115702212, + "edit_similarity": 0.8739495798319328 + }, + { + "repo": "DebarghaG/proofofthought", + "expected": "any(\"dictionary\" in msg for msg in cm.output))", + "got": "any(\"Invalid constants section\" in msg for msg in cm.output))", + "got_raw": "any(\"Invalid constants section\" in msg for msg in cm.output))\r\n os.remove(temp_file) # Clean up the temporary file after the test.\r\n finally:\r\n os.remove(temp_file) # Clean up the temporary file after the test.\r\n\r\n def test_invalid_constants_section_values(self) -> None:\r\n \"\"\"Test that invalid constants values are corrected.\"\"\"\r\n with tempfile.NamedTemporaryFile(mode=\"w\", suffix=\".json\", delete=False) as f:\r\n json.dump({\"constants\": [123, \"abc\"]}, f)\r\n temp_file = f.name\r\n\r\n", + "exact_match": false, + "code_bleu": 0.8091067115702212, + "edit_similarity": 0.7850467289719626 + }, + { + "repo": "DebarghaG/proofofthought", + "expected": "str(ctx.exception))", + "got": "str(ctx.exception))", + "got_raw": "str(ctx.exception))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DebarghaG/proofofthought", + "expected": "20000)", + "got": "20000)", + "got_raw": "20000) interpreter.run()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DebarghaG/proofofthought", + "expected": "5)", + "got": "5)", + "got_raw": "5)\n\n def test_safe_eval_evaluates_complex_expression(self) -> None:\n \"\"\"Test that complex expressions evaluate correctly.\"\"\"\n expr = \"2 + 3 * 4 - 5 / 2\"\n result = ExpressionValidator.safe_eval(expr, {}, {})\n\n self.assertEqual(result, 11)\n\n def test_safe_eval_evaluates_expression_with_variables(self) -> None:\n \"\"\"Test that expressions with variables evaluate correctly.\"\"\"\n expr = \"x + 3\"\n variables = {\"x\": 2}\n result = ExpressionValidator.safe_eval(expr, variables, {})\n\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DebarghaG/proofofthought", + "expected": "str(ctx.exception))", + "got": "str(ctx.exception))", + "got_raw": "str(ctx.exception))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Delgan/loguru", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" err == expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected + \"\" + expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Delgan/loguru", + "expected": "file.read()", + "got": "file.read()", + "got_raw": "file.read() + \"\\n\" + stderr + \"\\n\" + traceback.format_exc() + \"\\n\" + \"\\n\" + \"Exception raised:\\n\" + str(sys.exc_info()[1]) + \"\\n\" + \"\\n\" + \"Exception formatted:\\n\" + str(sys.exc_info()[0]) + \"\\n\" + str(sys.exc_info()[1]) + \"\\n\" + str(sys.exc_info()[2]) + \"\\n\" + \"\\n\" + \"Exception formatted with context manager:\\n\" + str(sys.exc_info()[0]) + \"\\n\" + str(sys.exc_info()[1]) + \"\\", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Delgan/loguru", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Delgan/loguru", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Delgan/loguru", + "expected": "\"\"", + "got": "\"\"\"\"ZeroDivisionError:", + "got_raw": "\"\"\"\"ZeroDivisionError: division by zero\\n\" \"\"\" + str(exception) + \"\\n\" + str(exception(1)) + \"\\n\" + str(exception(1, 2)) + \"\\n\" + str(exception(1, 2, 3)) + \"\\n\" + str(exception(1, 2, 3, 4)) + \"\\n\" + str(exception(1, 2, 3, 4, 5)) + \"\\n\" + str(exception(1, 2, 3, 4, 5, 6)) + \"\\n\" + str(exception", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.16666666666666666 + }, + { + "repo": "Delgan/loguru", + "expected": "OSError, match=\"^Rotation error$\")", + "got": "OSError, match=\"Rotation error\") as exc_info: logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger", + "got_raw": "OSError, match=\"Rotation error\") as exc_info: logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger.info(\"Test\") logger", + "exact_match": false, + "code_bleu": 0.023486109395320413, + "edit_similarity": 0.11721611721611722 + }, + { + "repo": "Delgan/loguru", + "expected": "\"2 3\\n\"", + "got": "\"2 3\\n\"", + "got_raw": "\"2 3\\n\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Delgan/loguru", + "expected": "\"log.log\"", + "got": "format", + "got_raw": "format + \"_log.log\" if format.endswith(\".log\") else format + \"_log\" + format.split(\".\")[-1] + \"_log\" + format.split(\".\")[-1] + \".log\" + format.split(\".\")[-1] + \"_log\" + format.split(\".\")[-1] + \".log\" + format.split(\".\")[-1] + \"_log\" + format.split(\".\")[-1] + \".log\" + format.split(\".\")[-1] + \"_log\" + format.split(\".\")[-1] + \".log\" + format.split(\".\")[-1] + \"_log\" + format.split(\".\")[-1] + \".log\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.13333333333333333 + }, + { + "repo": "Delgan/loguru", + "expected": "ValueError, match=r\".* most likely a mistake\")", + "got": "ValueError) as e: logger.add(writer, format=\"invalid\") logger.info(\"test\") logger.remove() assert str(e.value) == \"Invalid format: invalid\"", + "got_raw": "ValueError) as e: logger.add(writer, format=\"invalid\") logger.info(\"test\") logger.remove() assert str(e.value) == \"Invalid format: invalid\"", + "exact_match": false, + "code_bleu": 0.042143413032077665, + "edit_similarity": 0.22702702702702704 + }, + { + "repo": "Delgan/loguru", + "expected": "\"A\\nB\\n\"", + "got": "\"A\\nB\\n\"", + "got_raw": "\"A\\nB\\n\" + err == \"\" logger.info(\"C\") logger.info(\"D\") out, err = capsys.readouterr() assert out == \"C\\nD\\n\" + err == \"\" logger.info(\"E\") logger.info(\"F\") out, err = capsys.readouterr() assert out == \"E\\nF\\n\" + err == \"\" logger.info(\"G\") logger.info(\"H\") out, err = capsys.readouterr() assert out == \"G\\nH\\n\" + err == \"\" logger.info(\"I\") logger.info(\"J\") out, err = capsys.readouterr()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Delgan/loguru", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Delgan/loguru", + "expected": "\"1\\n\"", + "got": "\"1\\n\"", + "got_raw": "\"1\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\" \"2\\n\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Delgan/loguru", + "expected": "\"12 Test\\n\"", + "got": "\"5 Test\\n\" \"6 Test\\n\" \"12 Test\\n\" \"14 Test\\n\" \"28 Test\\n\" \"30 Test\\n\" \"60 Test\\n\" \"62 Test\\n\" \"124 Test\\n\" \"126 Test\\n\" \"252 Test\\n\" \"254 Test\\n\" \"508 Test\\n\" \"510 Test\\n\" \"1024 Test\\n\" \"1026 Test\\n\" \"2048 Test\\n\" \"2050 Test\\n\" \"4100 Test\\n\"", + "got_raw": "\"5 Test\\n\" \"6 Test\\n\" \"12 Test\\n\" \"14 Test\\n\" \"28 Test\\n\" \"30 Test\\n\" \"60 Test\\n\" \"62 Test\\n\" \"124 Test\\n\" \"126 Test\\n\" \"252 Test\\n\" \"254 Test\\n\" \"508 Test\\n\" \"510 Test\\n\" \"1024 Test\\n\" \"1026 Test\\n\" \"2048 Test\\n\" \"2050 Test\\n\" \"4100 Test\\n\"", + "exact_match": false, + "code_bleu": 0.06439931429457924, + "edit_similarity": 0.0873015873015873 + }, + { + "repo": "Delgan/loguru", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\"\n\n\nclass StopSinkError:\n def __init__(self, *args, **kwargs):\n raise StopIteration(\"Stop error\") from None\n\n def write(self, *args, **kwargs):\n pass\n\n\nclass StopSinkError2:\n def __init__(self, *args, **kwargs):\n raise OSError(\"OSError\") from None\n\n def write(self, *args, **kwargs):\n pass\n\n\nclass StopSinkError3:\n def __init__(self, *args, **kwargs):\n raise Exception(\"Exception\") from None\n\n def write(self, *args,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Delgan/loguru", + "expected": "\"0 A\\n\"", + "got": "\"0 A\\n\"", + "got_raw": "\"0 A\\n\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Delgan/loguru", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Delgan/loguru", + "expected": "\"\u5929\\n\"", + "got": "\"\u5929\\n\"", + "got_raw": "\"\u5929\\n\" + expected + \"\u5929\\n\" + expected + \"\u5929\\n\" + expected + \"\u5929\\n\" + expected + \"\u5929\\n\" + expected + \"\u5929\\n\" + expected + \"\u5929\\n\" + expected + \"\u5929\\n\" + expected + \"\u5929\\n\" + expected + \"\u5929\\n\" + expected + \"\u5929\\n\" + expected + \"\u5929\\n\" + expected + \"\u5929\\n\" + expected + \"\u5929\\n\" + expected + \"\u5929\\n\" + expected + \"\u5929\\n\" + expected + \"\u5929\\n\" + expected + \"\u5929\\n\" + expected + \"\u5929", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Delgan/loguru", + "expected": "dict(maj=\"ABC!DEF\")", + "got": "{\"maj\":", + "got_raw": "{\"maj\": \"ABC!DEF\"} # noqa: E501", + "exact_match": false, + "code_bleu": 0.18995892141289814, + "edit_similarity": 0.3076923076923077 + }, + { + "repo": "Delgan/loguru", + "expected": "\"1 2\\n\"", + "got": "\"1 2\\n\"", + "got_raw": "\"1 2\\n\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Delgan/loguru", + "expected": "error", + "got": "error", + "got_raw": "error + \"\\n\" + error + \"\\n\" + error + \"\\n\" + error + \"\\n\" + error + \"\\n\" + error + \"\\n\" + error + \"\\n\" + error + \"\\n\" + error + \"\\n\" + error + \"\\n\" + error + \"\\n\" + error + \"\\n\" + error + \"\\n\" + error + \"\\n\" + error + \"\\n\" + error + \"\\n\" + error + \"\\n\" + error + \"\\n\" + error + \"\\n\" + error + \"\\n\" + error + \"\\n\" + error +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DisnakeDev/disnake", + "expected": "TypeError, match=r\"id parameter must be convertible to int not \")", + "got": "ValueError, match=\"Cannot initialize a Snowflake object with a string\") as exc_info: Object(\"123\")", + "got_raw": "ValueError, match=\"Cannot initialize a Snowflake object with a string\") as exc_info: Object(\"123\") # type: ignore\n\n assert str(exc_info.value) == \"Cannot initialize a Snowflake object with a string\" # type: ignore\n\n\ndef test_repr() -> None:\n assert repr(Object(snowflake)) == \"Object(881536165478499999)\" # type: ignore\n\n\ndef test_str() -> None:\n assert str(Object(snowflake)) == \"8815361654", + "exact_match": false, + "code_bleu": 0.18798317647335086, + "edit_similarity": 0.32954545454545453 + }, + { + "repo": "DisnakeDev/disnake", + "expected": "1", + "got": "1", + "got_raw": "1 assert str(result[0].message) == \"test\" assert result[0].filename == __file__ assert result[0].lineno == 10 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DisnakeDev/disnake", + "expected": "1024", + "got": "1", + "got_raw": "1 << 16 | 1 << 17 | 1 << 18 | 1 << 19 | 1 << 20 | 1 << 21 | 1 << 22 | 1 << 23 | 1 << 24 | 1 << 25 | 1 << 26 | 1 << 27 | 1 << 28 | 1 << 29 | 1 << 30 | 1 << 31 | 1 << 32 | 1 << 33 | 1 <<", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4 + }, + { + "repo": "DisnakeDev/disnake", + "expected": "\"a group\"", + "got": "\"group\"", + "got_raw": "\"group\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.875 + }, + { + "repo": "DisnakeDev/disnake", + "expected": "0", + "got": "obj.custom_id", + "got_raw": "obj.custom_id or obj.type or obj.id or 0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.0 + }, + { + "repo": "DisnakeDev/disnake", + "expected": "[]", + "got": "[]", + "got_raw": "[]\n\n def test_add_item(self) -> None:\r\n r = ActionRow(button1, button2)\r\n r.add_item(button3)\r\n assert r.children == [button1, button2, button3]\r\n r.add_item(text_input)\r\n assert r.children == [button1, button2, button3, text_input]\r\n r.add_item(separator)\r\n assert r.children == [button1, button2, button3, text_input, separator]\r\n r.add_item(label__text)\r\n assert r.children == [button1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DisnakeDev/disnake", + "expected": "frozenset([456, 789])", + "got": "[\"456\", \"789\"] assert onboarding.enabled is True", + "got_raw": "[\"456\", \"789\"] assert onboarding.enabled is True", + "exact_match": false, + "code_bleu": 0.1354599427337814, + "edit_similarity": 0.2898550724637681 + }, + { + "repo": "DisnakeDev/disnake", + "expected": "CustomCommand)", + "got": "CustomCommand[None", + "got_raw": "CustomCommand[None, (a: int, b: str), bool]) for gd in group_decorators: assert_type(gd(f), CustomGroup[None, (a: int, b: str), bool])", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.8125 + }, + { + "repo": "DisnakeDev/disnake", + "expected": "high", + "got": "high", + "got_raw": "high < expected + 1 << 22 # 4194304000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DisnakeDev/disnake", + "expected": "cog.group", + "got": "cog.group", + "got_raw": "cog.group", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DisnakeDev/disnake", + "expected": "210174600000", + "got": "hash(snowflake)", + "got_raw": "hash(snowflake) # type: ignore\n\n\ndef test_repr() -> None:\n assert repr(Object(snowflake)) == repr(snowflake) # type: ignore\n\n\ndef test_str() -> None:\n assert str(Object(snowflake)) == str(snowflake) # type: ignore\n\n\ndef test_eq() -> None:\n assert Object(snowflake) == snowflake # type: ignore\n\n\ndef test_ne() -> None:\n assert Object(snowflake) != 1234567890 # type: ignore\n\n\ndef test_lt() -> None:\n ", + "exact_match": false, + "code_bleu": 0.3021375397356768, + "edit_similarity": 0.0 + }, + { + "repo": "DisnakeDev/disnake", + "expected": "Permissions(32)", + "got": "32", + "got_raw": "32 | Permissions.ADMINISTRATOR | Permissions.MANAGE_CHANNELS | Permissions.MANAGE_GUILD | Permissions.MANAGE_MESSAGES | Permissions.MANAGE_NICKNAME | Permissions.MANAGE_ROLES | Permissions.MANAGE_WEBHOOKS | Permissions.MANAGE_EMOJIS_AND_STICKERS | Permissions.MANAGE_THREADS | Permissions.MANAGE_THREADS | Permissions.MANAGE_THREADS | Permissions.MANAGE_THREADS | Permissions.MANAGE_THREADS | Permissions.MANAGE_THREADS | Permissions.MANAGE_THREADS | Permissions.MANAGE_THREADS | Permissions.MANAGE_THREADS | Permissions.MANAGE_THREADS | Permissions.MANAGE_THREADS", + "exact_match": false, + "code_bleu": 0.14865088937534013, + "edit_similarity": 0.23529411764705882 + }, + { + "repo": "DisnakeDev/disnake", + "expected": "5", + "got": "4", + "got_raw": "4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "DisnakeDev/disnake", + "expected": "exception)", + "got": "exception)", + "got_raw": "exception) as exc_info: view.get_quoted_word() assert str(exc_info.value) == str(exception)()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "DisnakeDev/disnake", + "expected": "value", + "got": "value", + "got_raw": "value << 8 | 0xffffff >> 24 << 24 | 0 << 16 | 0 << 8 | 0 << 0 | 0xffffff >> 24 << 24 | 0 << 16 | 0 << 8 | 0 << 0 | 0xffffff >> 24 << 24 | 0 << 16 | 0 << 8 | 0 << 0 | 0xffffff >> 24 << 24 | 0 << 16 | 0 << 8 | 0 << 0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "EbodShojaei/bake", + "expected": "expected_lines", + "got": "expected_lines", + "got_raw": "expected_lines + [\"\"] # Ensure there's an empty line at the end of the file. ```", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "EbodShojaei/bake", + "expected": "0", + "got": "0", + "got_raw": "0\nassert result.stdout.startswith(\"#!/bin/sh\") assert result.stdout.endswith(\"echo 'bash'\") assert result.stdout.count(\"echo\") == 1 assert result.stdout.count(\"echo 'bash'\") == 1 assert result.stdout.count(\"echo 'bash' 2>&1\") == 1 assert result.stdout.count(\"echo 'bash' 2>&1 |\") == 1 assert result.stdout.count(\"echo 'bash' 2>&1 |\") == 1 assert result.stdout.count(\"echo 'bash' 2>&1 |\") == 1 assert result.stdout.count(\"echo 'bash' 2>&1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "EbodShojaei/bake", + "expected": "2", + "got": "1", + "got_raw": "1 result.stdout == \"Error: File 'nonexistent.mk' not found.\\n\" result.stderr == \"\" assert Path(\"nonexistent.mk\").exists() == False assert Path(\"nonexistent.mk\").is_file() == False assert Path(\"nonexistent.mk\").is_dir() == False assert Path(\"nonexistent.mk\").read_text() == \"\" assert Path(\"nonexistent.mk\").read_bytes() == b\"\" assert Path(\"nonexistent.mk\").read_text(encoding=\"utf-8\") == \"\" assert Path(\"nonexistent.mk\").read_text(encoding=\"utf-8\", errors=\"ignore\") == \"\" assert Path(\"nonexistent.mk\").read", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "EbodShojaei/bake", + "expected": "[\"VAR:=value\", \"VAR2=value\"]", + "got": "[\"VAR:=value\", \"VAR2=value\"]", + "got_raw": "[\"VAR:=value\", \"VAR2=value\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "EbodShojaei/bake", + "expected": "fish_script", + "got": "fish_script", + "got_raw": "fish_script # Note the use of -l instead of --stdin for Fish completion scripts.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "EbodShojaei/bake", + "expected": "None", + "got": "None", + "got_raw": "None and phony_line.startswith(\".PHONY:\") and phony_line.endswith(\"clean\") and phony_line.startswith(\".PHONY:\") and phony_line.endswith(\"install\") and phony_line.startswith(\".PHONY:\") and phony_line.endswith(\"target1\") and phony_line.startswith(\".PHONY:\") and phony_line.endswith(\"target2\") and phony_line.startswith(\".PHONY:\") and phony_line.endswith(\"clean\") and phony_line.startswith(\".PHONY:\") and phony_line.endswith(\"install\") and phony_line.startswith(\".PHONY:\") and phony_line.endswith(\"target1\") and phony_line.startswith", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "EbodShojaei/bake", + "expected": "1", + "got": "22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222", + "got_raw": "22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "EbodShojaei/bake", + "expected": "\"LONGER_NAME = value\"", + "got": "\"LONGER_NAME = value\"", + "got_raw": "\"LONGER_NAME = value\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "EbodShojaei/bake", + "expected": "1", + "got": "2", + "got_raw": "2 * 2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "EbodShojaei/bake", + "expected": "formatted_lines", + "got": "formatted_lines[0]", + "got_raw": "formatted_lines[0] assert \"VERY_LONG = value\" in formatted_lines[1] assert errors == [] assert warnings == []", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.9090909090909091 + }, + { + "repo": "FinanceData/FinanceDataReader", + "expected": "200", + "got": "2000.0000000000001", + "got_raw": "2000.0000000000001", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2857142857142857 + }, + { + "repo": "FinanceData/FinanceDataReader", + "expected": "0", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "FinanceData/FinanceDataReader", + "expected": "90", + "got": "900", + "got_raw": "900 # \ucf54\uc2a4\ub2e5 (\uc8fc\uc2dd, \ubd80\ub3d9\uc0b0\ud22c\uc790\ud68c\uc0ac, \uc120\ubc15\ud22c\uc790\ud68c\uc0ac, \uc8fc\uc2dd\uc608\ud0c1\uc99d\uad8c) df = fdr.StockListing('KOSDAQ') assert len(df) > 500 # \ucf54\ub125\uc2a4 (\uc8fc\uc2dd, \ubd80\ub3d9\uc0b0\ud22c\uc790\ud68c\uc0ac, \uc120\ubc15\ud22c\uc790\ud68c\uc0ac, \uc8fc\uc2dd\uc608\ud0c1\uc99d\uad8c) df = fdr.StockListing('KONEX') assert len(df) > 100 # \ucf54\uc2a4\ud53c+\ucf54\uc2a4\ub2e5+\ucf54\ub125\uc2a4 df = fdr.StockListing('KOSPI-K", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.8 + }, + { + "repo": "Forethought-Technologies/AutoChain", + "expected": "\"User: user query\\nAssistant: response to user\\n\"", + "got": "\"user query\\nresponse to user\\n\"", + "got_raw": "\"user query\\nresponse to user\\n\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.7901234567901234 + }, + { + "repo": "Forethought-Technologies/AutoChain", + "expected": "{ \"name\": \"sample_tool_func_with_type\", \"description\": \"This is just a dummy tool with typing info\", \"parameters\": { \"type\": \"object\", \"properties\": {\"k\": {\"type\": \"int\"}}, \"required\": [\"k\"], }, }", + "got": "{ \"name\": \"sample_tool_func_with_type\", \"description\": \"This is just a dummy tool with typing info\", \"parameters\": { \"type\": \"object\", \"properties\": {\"k\": {\"type\": \"integer\"}}, \"required\": [\"k\"], }, } } with_type_default_tool = Tool( func=sample_tool_func_with_type_default, description=\"\"\"This is just a dummy tool with typing info and default value\"\"\", ) with_type_default_tool_dict = convert_tool_to_dict( with_type_default_tool ) assert with_type_default_tool_dict == { \"name\": \"sample_tool_func_with_type_default\", \"description\":", + "got_raw": "{ \"name\": \"sample_tool_func_with_type\", \"description\": \"This is just a dummy tool with typing info\", \"parameters\": { \"type\": \"object\", \"properties\": {\"k\": {\"type\": \"integer\"}}, \"required\": [\"k\"], }, } } with_type_default_tool = Tool( func=sample_tool_func_with_type_default, description=\"\"\"This is just a dummy tool with typing info and default value\"\"\", ) with_type_default_tool_dict = convert_tool_to_dict( with_type_default_tool ) assert with_type_default_tool_dict == { \"name\": \"sample_tool_func_with_type_default\", \"description\":", + "exact_match": false, + "code_bleu": 0.4882112159519506, + "edit_similarity": 0.536986301369863 + }, + { + "repo": "Forethought-Technologies/AutoChain", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Forethought-Technologies/AutoChain", + "expected": "text", + "got": "text.encode()", + "got_raw": "text.encode() # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type:", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.47058823529411764 + }, + { + "repo": "Forethought-Technologies/AutoChain", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "GitGuardian/ggshield", + "expected": "caplog.text", + "got": "caplog.text", + "got_raw": "caplog.text caplog.text = caplog.text.split(\"\\n\")[-1] assert caplog.text.startswith(\"Failed to add *.pyc to .gitignore in\") caplog.text = caplog.text.split(\":\")[-1] assert caplog.text.strip() == \"Permission denied\" caplog.text = caplog.text.split(\" \")[-1] assert caplog.text.strip() == \"node_modules/\" caplog.text = caplog.text.split(\" \")[-2] assert caplog.text.strip() == \"file\" caplog.text = caplog.text.split(\" \")[-3] assert caplog.text.strip() == \"error", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "GitGuardian/ggshield", + "expected": "target", + "got": "target", + "got_raw": "target if target else None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "GitGuardian/ggshield", + "expected": "instance", + "got": "instance", + "got_raw": "instance + \"/\" + config.default_token_name + \"/\" + config.default_token_lifetime + \"/\" + config.default_token_name + \"/\" + config.default_token_lifetime + \"/\" + config.default_token_name + \"/\" + config.default_token_lifetime + \"/\" + config.default_token_name + \"/\" + config.default_token_lifetime + \"/\" + config.default_token_name + \"/\" + config.default_token_lifetime + \"/\" + config.default_token_name + \"/\" + config.default_token_lifetime + \"/\" + config.default_token_name + \"/\" + config.default_token_lifetime + \"/\" + config.default_token_name + \"/\" + config.default_token_lifetime + \"/\" + config.default_token_name + \"/\" + config.default_token_lifetime +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "GitGuardian/ggshield", + "expected": "None", + "got": "None", + "got_raw": "None config.auth_config.instances[0].account.token == \"token\" config.auth_config.instances[0].account.url == \"https://api.gitguardian.com\" config.auth_config.instances[0].name == \"test\" config.auth_config.instances[0].token == \"token\" config.auth_config.instances[0].url == \"https://api.gitguardian.com\" config.auth_config.instances[0].username == \"user\" config.auth_config.instances[0].password == \"password\" config.auth_config.instances[0].token_expiration == 3600 config.auth_config.instances[0].token_expiration_unit == \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "GitGuardian/ggshield", + "expected": "None", + "got": "None", + "got_raw": "None and result.tag_name == \"v2.0.0\" and result.url is None and result.assets is None and result.prerelease is False and result.name is None and result.id is None and result.html_url is None and result.created_at is None and result.body is None and result.assets_url is None and result.assets_count is None and result.assets_size is None and result.assets_name is None and result.assets_url is None and result.assets_url is None and result.assets_url is None and result.assets_url is None and result.assets_url is None and result.assets_url is None and result.assets_url is None and result.assets_url", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "GitGuardian/ggshield", + "expected": "[]", + "got": "[]", + "got_raw": "[]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "GitGuardian/ggshield", + "expected": "result.output", + "got": "result.output.lower()", + "got_raw": "result.output.lower() # noqa: E501 result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower() result.output.lower()", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.7647058823529411 + }, + { + "repo": "GitGuardian/ggshield", + "expected": "set()", + "got": "[]", + "got_raw": "[] # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type", + "exact_match": false, + "code_bleu": 0.30120066786994826, + "edit_similarity": 0.0 + }, + { + "repo": "GitGuardian/ggshield", + "expected": "[]", + "got": "[]", + "got_raw": "[]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "GitGuardian/ggshield", + "expected": "2", + "got": "2", + "got_raw": "2 mock_downloader.download_and_install.call_args_list[0] == mock.call( mock_download_info_1, mock_config, mock_loader, ) mock_downloader.download_and_install.call_args_list[1] == mock.call( mock_download_info_2, mock_config, mock_loader, ) mock_loader.load_plugin.call_count == 2 mock_loader.load_plugin.call_args_list[0] == mock.call( mock_download_info_1, mock_config, mock_loader, ) mock_loader.load_plugin.call_args_list[1] == mock.call( mock_download_info_2, mock_config, mock_loader, ) mock_loader.load_plugin.return_value", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "GitGuardian/ggshield", + "expected": "None", + "got": "None", + "got_raw": "None, \"GGSHIELD_PATH must be set\" \" to run the tests\" \" with ggshield\" \" (see the documentation)\" \" for more information.\" \" You can set it using the -e option.\" \" For example: -e GGSHIELD_PATH=/path/to/ggshield\" \" or using the GGSHIELD_PATH environment variable.\" \" For example: GGSHIELD_PATH=/path/to/ggshield\" \" pytest\" \" or: GGSHIELD_PATH=/path/to/ggshield pytest -v\" \" or: GGSHIELD_PATH=/path/to/ggshield pytest -v -s\" \" or", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "GitGuardian/ggshield", + "expected": "result.output", + "got": "result.output.lower()", + "got_raw": "result.output.lower()", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.7647058823529411 + }, + { + "repo": "GitGuardian/ggshield", + "expected": "\"1.1\"", + "got": "\"1.0\"", + "got_raw": "\"1.0\" # no update available request_get_mock.return_value.status_code = 404 latest_version = check_for_updates() assert latest_version == \"1.1\" # update available request_get_mock.return_value.status_code = 500 latest_version = check_for_updates() assert latest_version == \"1.1\" # update available, but error occurred request_get_mock.return_value.status_code = 200 request_get_mock.return_value.json.return_value = {\"tag_name\": \"v1.0\"} latest_version = check_for_updates() assert latest", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.8 + }, + { + "repo": "GitGuardian/ggshield", + "expected": "captured.err", + "got": "captured.err.lower()", + "got_raw": "captured.err.lower() # noqa: W605", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.75 + }, + { + "repo": "GitGuardian/ggshield", + "expected": "result.stdout", + "got": "result.output.lower()", + "got_raw": "result.output.lower() # type: ignore [attr-defined] # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa", + "exact_match": false, + "code_bleu": 0.24446151121745047, + "edit_similarity": 0.5882352941176471 + }, + { + "repo": "GitGuardian/ggshield", + "expected": "message", + "got": "message.decode()", + "got_raw": "message.decode() + \"\\n\" + str(len(encrypted)) + \"\\n\" + str(len(message)) + \"\\n\" + str(len(decrypted)) + \"\\n\" + str(len(message) - len(decrypted)) + \"\\n\" + str(len(encrypted) - len(message)) + \"\\n\" + str(len(decrypted) - len(message)) + \"\\n\" + str(len(encrypted) - len(decrypted)) + \"\\n\" + str(len(message) - len(decrypted)) + \"\\n\" + str(len(encrypted) - len(message)) + \"\\n\" + str(len(decrypted) -", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6086956521739131 + }, + { + "repo": "GitGuardian/ggshield", + "expected": "result.stdout", + "got": "result.stdout.lower()", + "got_raw": "result.stdout.lower() result.stdout.lower() == \"apikey = 1 token found\\n\" \"Token in comment\\n\" \"1 token found\\n\" \"1 token found\\n\" \"1 token found\\n\" \"1 token found\\n\" \"1 token found\\n\" \"1 token found\\n\" \"1 token found\\n\" \"1 token found\\n\" \"1 token found\\n\" \"1 token found\\n\" \"1 token found\\n\" \"1 token found\\n\" \"1 token found\\n\" \"1 token found\\n\" \"1 token found\\n\" \"1 token found\\n\" \"1 token found\\n\" \"1", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.7647058823529411 + }, + { + "repo": "GitGuardian/ggshield", + "expected": "result)", + "got": "result)", + "got_raw": "result) assert result.stdout.strip() == \"config list\" assert result.stderr.strip() == \"\" assert result.exit_code == 0 assert result.output == \"\" assert result.stdout == \"config list\\n\" assert result.stderr == \"\" assert result.exit_code == 0 assert result.output == \"\" assert result.stdout == \"config list\\n\" assert result.stderr == \"\" assert result.exit_code == 0 assert result.output == \"\" assert result.stdout == \"config list\\n\" assert result.stderr == \"\" assert result.exit_code == 0 assert result.output == \"\" assert result.stdout == \"config list\\n\" assert result.stderr == \"\" assert result.exit_code ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "GitGuardian/ggshield", + "expected": "result.output", + "got": "result.output.lower()", + "got_raw": "result.output.lower() # type: ignore [attr-defined] scan_commit_range_mock.reset_mock() result = cli_fs_runner.invoke( cli, [\"-v\", \"secret\", \"scan\", \"pre-receive\"], input=f\"{shas[0]} {shas[1]} origin/main\\n\", ) assert_invoke_ok(result) scan_commit_range_mock.assert_not_called() assert \"Commits to scan: 2\" in result.output.lower() # type: ignore [attr-defined] scan_commit_range_mock.reset_mock() result = cli_fs_runner.invoke( cli, [\"-v\", \"secret\", \"scan\", \"pre", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.7647058823529411 + }, + { + "repo": "GitGuardian/ggshield", + "expected": "valid", + "got": "valid", + "got_raw": "valid == _validate_filepath(filepath, exclusion_regexes)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "IDSIA/sacred", + "expected": "[1, 2, 3]", + "got": "[1, 2, 3] assert cfg[\"f\"] == {\"a\": \"b\", \"c\": \"d\"} assert cfg[\"f\"][\"a\"] == \"b\" assert cfg[\"f\"][\"c\"] == \"d\" assert cfg[\"f\"][\"a\"] == cfg[\"f\"][\"a\"] assert cfg[\"f\"][\"c\"] == cfg[\"f\"][\"c\"] assert cfg[\"f\"][\"a\"] == cfg[\"f\"][\"a\"] assert cfg[\"f\"][\"c\"] == cfg[\"f\"][\"c\"] assert cfg[\"f\"][\"a\"] == cfg[\"f\"][\"a\"] assert cfg[\"f\"][\"c\"] == cfg", + "got_raw": "[1, 2, 3] assert cfg[\"f\"] == {\"a\": \"b\", \"c\": \"d\"} assert cfg[\"f\"][\"a\"] == \"b\" assert cfg[\"f\"][\"c\"] == \"d\" assert cfg[\"f\"][\"a\"] == cfg[\"f\"][\"a\"] assert cfg[\"f\"][\"c\"] == cfg[\"f\"][\"c\"] assert cfg[\"f\"][\"a\"] == cfg[\"f\"][\"a\"] assert cfg[\"f\"][\"c\"] == cfg[\"f\"][\"c\"] assert cfg[\"f\"][\"a\"] == cfg[\"f\"][\"a\"] assert cfg[\"f\"][\"c\"] == cfg", + "exact_match": false, + "code_bleu": 0.045568501495099556, + "edit_similarity": 0.05421686746987952 + }, + { + "repo": "IDSIA/sacred", + "expected": "obs2", + "got": "obs2", + "got_raw": "obs2 \"\"\"Observers should be equal if they have the same base directory\"\"\" \"\"\"Observers should be equal if they have the same base directory\"\"\" \"\"\"Observers should be equal if they have the same base directory\"\"\" \"\"\"Observers should be equal if they have the same base directory\"\"\" \"\"\"Observers should be equal if they have the same base directory\"\"\" \"\"\"Observers should be equal if they have the same base directory\"\"\" \"\"\"Observers should be equal if they have the same base directory\"\"\" \"\"\"Observers should be equal if they have the same base directory\"\"\" \"\"\"Observers should be equal if they have the same base directory\"\"\" \"\"\"Observers should be equal if they have the", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "IDSIA/sacred", + "expected": "{}", + "got": "second[0]", + "got_raw": "second[0] + \"_b\" + second[1] + \"_info\" + \"_2\" + \"_b\" + \"_info\" + \"_1\" + \"_a\" + \"_info\" + \"_2\" + \"_a\" + \"_info\" + \"_1\" + \"_b\" + \"_info\" + \"_2\" + \"_b\" + \"_info\" + \"_1\" + \"_c\" + \"_info\" + \"_2\" + \"_c\" + \"_info\" + \"_1\" + \"_d\" + \"_info\" + \"_2\" + \"_d\" + \"_info\" + \"_1", + "exact_match": false, + "code_bleu": 0.3021375397356768, + "edit_similarity": 0.0 + }, + { + "repo": "IDSIA/sacred", + "expected": "(2, 25)", + "got": "(2, 25)", + "got_raw": "(2, 25)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "IDSIA/sacred", + "expected": "[1, 2]", + "got": "[1, 2] assert kwargs == {\"c\": 3} assert kwargs[\"c\"] == 3 assert kwargs[\"a\"] == 6 assert kwargs[\"b\"] == 6 assert kwargs[\"c\"] == 6 assert kwargs[\"c\"] == 6 assert kwargs[\"c\"] == 6 assert kwargs[\"c\"] == 6 assert kwargs[\"c\"] == 6 assert kwargs[\"c\"] == 6 assert kwargs[\"c\"] == 6 assert kwargs[\"c\"] == 6 assert kwargs[\"c\"] == 6 assert kwargs[\"c\"] == 6 assert kwargs[\"c\"] == 6 assert", + "got_raw": "[1, 2] assert kwargs == {\"c\": 3} assert kwargs[\"c\"] == 3 assert kwargs[\"a\"] == 6 assert kwargs[\"b\"] == 6 assert kwargs[\"c\"] == 6 assert kwargs[\"c\"] == 6 assert kwargs[\"c\"] == 6 assert kwargs[\"c\"] == 6 assert kwargs[\"c\"] == 6 assert kwargs[\"c\"] == 6 assert kwargs[\"c\"] == 6 assert kwargs[\"c\"] == 6 assert kwargs[\"c\"] == 6 assert kwargs[\"c\"] == 6 assert kwargs[\"c\"] == 6 assert", + "exact_match": false, + "code_bleu": 0.034435156651714566, + "edit_similarity": 0.031496062992125984 + }, + { + "repo": "IDSIA/sacred", + "expected": "\"t\"", + "got": "\"t\"", + "got_raw": "\"t\" cfg[\"f\"][\"c\"] = \"d\" cfg[\"f\"][\"c\"] = \"t\" cfg[\"f\"][\"c\"] = \"d\" cfg[\"f\"][\"c\"] = \"t\" cfg[\"f\"][\"c\"] = \"d\" cfg[\"f\"][\"c\"] = \"t\" cfg[\"f\"][\"c\"] = \"d\" cfg[\"f\"][\"c\"] = \"t\" cfg[\"f\"][\"c\"] = \"d\" cfg[\"f\"][\"c\"] = \"t\" cfg[\"f\"][\"c\"] = \"d\" cfg[\"f\"][\"c\"] = \"t\" cfg[\"f\"][\"c", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "IDSIA/sacred", + "expected": "tmpfile.content", + "got": "tmpfile.read()", + "got_raw": "tmpfile.read() + \"\\n\" + \"test\" + \"\\n\" + \"test\" + \"\\n\" + \"test\" + \"\\n\" + \"test\" + \"\\n\" + \"test\" + \"\\n\" + \"test\" + \"\\n\" + \"test\" + \"\\n\" + \"test\" + \"\\n\" + \"test\" + \"\\n\" + \"test\" + \"\\n\" + \"test\" + \"\\n\" + \"test\" + \"\\n\" + \"test\" + \"\\n\" + \"test\" + \"\\n\" + \"test\" + \"\\n\"", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.6206896551724138 + }, + { + "repo": "IDSIA/sacred", + "expected": "2", + "got": "2.0", + "got_raw": "2.0", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "IDSIA/sacred", + "expected": "\"b.d\"", + "got": "\"b.d\"", + "got_raw": "\"b.d\"\n\n\ndef test_is_prefix():\n assert is_prefix(\"foo\", \"foo.bar\") is True\n assert is_prefix(\"foo.bar\", \"foo.bar\") is True\n assert is_prefix(\"foo.bar\", \"foo.bar.baz\") is False\n assert is_prefix(\"foo.bar\", \"foo\") is False\n assert is_prefix(\"foo.bar\", \"foo.bar.baz\") is False\n assert is_prefix(\"foo.bar\", \"foo.bar.baz\") is False\n assert is_prefix(\"foo.bar\", \"foo.bar.baz\") is False\n assert is_prefix", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "IDSIA/sacred", + "expected": "1", + "got": "0.001", + "got_raw": "0.001\n\n\ndef test_run_config(run):\n assert run.config == run.config_mod.config_dict() == run.config_mod.config() == {\"a\": 17, \"foo\": {\"bar\": True, \"baz\": False}, \"seed\": 1234}\n\n\ndef test_run_config_mod(run):\n assert run.config_mod.config_dict() == {\"a\": 17, \"foo\": {\"bar\": True, \"baz\": False}, \"seed\": 1234}\n assert run.config_mod.config() == {\"a\": 17, \"foo\": {\"bar", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "IDSIA/sacred", + "expected": "{\"d\"}", + "got": "{\"d\"}", + "got_raw": "{\"d\"} | set(cfg[\"d\"].keys()) | {\"a\", \"b\"} | {\"c\"} | {\"e\"} | {\"f\"} | {\"g\"} | {\"h\"} | {\"i\"} | {\"j\"} | {\"k\"} | {\"l\"} | {\"m\"} | {\"n\"} | {\"o\"} | {\"p\"} | {\"q\"} | {\"r\"} | {\"s\"} | {\"t\"} | {\"u\"} | {\"v\"} | {\"w\"} | {\"x\"} | {\"y\"} | {\"z\"} | {\"aa\"} | {\"bb\"} | {\"cc\"} | {\"dd\"} | {\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "IDSIA/sacred", + "expected": "cf.run", + "got": "cf.run()", + "got_raw": "cf.run() == cf() == cf()() == cf()()() == cf()()()() == cf()()()()() == cf()()()()()() == cf()()()()()()() == cf()()()()()()()()() == cf()()()()()()()()()() == cf()()()()()()()()()()() == cf()()()()()()()()()()()() == cf()()()()()()()()()()()()() == cf()()()()()()()()()()()()()() == cf", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.8571428571428571 + }, + { + "repo": "IDSIA/sacred", + "expected": "4", + "got": "4", + "got_raw": "4 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "IDSIA/sacred", + "expected": "{\"i\": 10}", + "got": "{\"i\": 10}", + "got_raw": "{\"i\": 10} # noqa: E128 cfg[\"h\"][\"i\"] = 20 cfg[\"h\"][\"j\"] = 30 cfg[\"h\"][\"k\"] = 40 cfg[\"h\"][\"l\"] = 50 cfg[\"h\"][\"m\"] = 60 cfg[\"h\"][\"n\"] = 70 cfg[\"h\"][\"o\"] = 80 cfg[\"h\"][\"p\"] = 90 cfg[\"h\"][\"q\"] = 100 cfg[\"h\"][\"r\"] = 110 cfg[\"h\"][\"s\"] = 120", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "IDSIA/sacred", + "expected": "random.Random", + "got": "opt.np.random.RandomState", + "got_raw": "opt.np.random.RandomState\n\n assert seed == 1234\n assert rnd.random() == 0.123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012", + "exact_match": false, + "code_bleu": 0.24446151121745047, + "edit_similarity": 0.6842105263157895 + }, + { + "repo": "IDSIA/sacred", + "expected": "{}", + "got": "{}", + "got_raw": "{}\n\n\ndef test_construct_arguments_with_options_returns_args_kwargs():\n s = Signature(bariza)\n args, kwargs = s.construct_arguments([1], {\"b\": 2.0}, {\"c\": \"3\"})\n assert args == [1]\n assert kwargs == {\"b\": 2.0, \"c\": \"3\"}\n\n\ndef test_construct_arguments_with_complex_options_returns_args_kwargs():\n s = Signature(complex_function_name)\n args, kwargs = s.construct_arguments([1], {\"b\": \"2\"}, {\"c\": 3.0})\n assert args == [1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "IDSIA/sacred", + "expected": "(nr1, seed1)", + "got": "(nr1, seed1) == (nr2, seed2) == (cf() for _ in range(10))", + "got_raw": "(nr1, seed1) == (nr2, seed2) == (cf() for _ in range(10))", + "exact_match": false, + "code_bleu": 0.17098323692758396, + "edit_similarity": 0.34782608695652173 + }, + { + "repo": "IDSIA/sacred", + "expected": "seed2", + "got": "seed2", + "got_raw": "seed2", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "IDSIA/sacred", + "expected": "5", + "got": "3", + "got_raw": "3 + 2.0000000000000004 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "IDSIA/sacred", + "expected": "foo", + "got": "foo()", + "got_raw": "foo() # type: ignore # noqa: E701 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.75 + }, + { + "repo": "JWock82/Pynite", + "expected": "initial_nodes", + "got": "initial_nodes", + "got_raw": "initial_nodes, \"Node names should be the same\" assert set(model.quads.keys()) == initial_elements, \"Element names should be the same\" print(\"Test 1 passed: Mesh regeneration works as expected.\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JWock82/Pynite", + "expected": "{})", + "got": "{})", + "got_raw": "{}) # Initialize empty dictionaries for each displacement direction\n self.assertEqual(self.node.DY, {}) # Initialize empty dictionaries for each displacement direction\n self.assertEqual(self.node.DZ, {}) # Initialize empty dictionaries for each displacement direction\n\n def test_node_displacement_dicts_updated(self):\n \"\"\"Test that displacement dictionaries are updated correctly.\"\"\"\n\n self.node.DX['N1'] = 1.0 # Update displacement in the X direction\n self.node.DY['N1'] = 2.0 # Update displacement in the Y direction\n self.node.DZ['N1'] = 3.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JWock82/Pynite", + "expected": "model.springs", + "got": "model.springs.keys()", + "got_raw": "model.springs.keys() # Check if the spring is still there after deletion", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.7878787878787878 + }, + { + "repo": "JWock82/Pynite", + "expected": "110)", + "got": "110)", + "got_raw": "110) self.assertEqual(section.J, 0.536) self.assertEqual(section.E, 29000) self.assertEqual(section.G, 78.5) self.assertEqual(section.nu, 0.3) self.assertEqual(section.t, 0.002) self.assertEqual(section.b, 0.004) self.assertEqual(section.h, 0.008) self.assertEqual(section.w, 0.006) self.assertEqual(section.y, 0.004) self.assertEqual(section.z, 0.002) self.assertEqual(section.x, ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JWock82/Pynite", + "expected": "2)", + "got": "2)", + "got_raw": "2) self.assertAlmostEqual(RY2/(1.4*5), 1, 2) self.assertAlmostEqual(beam.members['M1'].EI['1.4D'], 11200*144) self.assertAlmostEqual(beam.members['M1'].J['1.4D'], 400/12**4) self.assertAlmostEqual(beam.members['M1'].A['1.4D'], 12/12**2) self.assertAlmostEqual(beam.members['M1'].Iy['1.4D'], 200/12**4) self.assertAlmostEqual(", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JWock82/Pynite", + "expected": "0.03", + "got": "0.03", + "got_raw": "0.03 # My_max # My_min # My_max_Tim # My_min_Tim # Sx # RMy # Qy_max_Tim) < 0.03 # Qy_max_Tim) < 0.03 # Qy_max_Tim) < 0.03 # Qy_max_Tim) < 0.03 # Qy_max_Tim) < 0.03 # Qy_max_Tim) < 0.03 # Qy_max_Tim) < 0.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JWock82/Pynite", + "expected": "{})", + "got": "{})", + "got_raw": "{})\n self.assertEqual(combo.load_cases, [])\n self.assertEqual(combo.load_cases_names, [])\n self.assertEqual(combo.load_cases_values, [])\n self.assertEqual(combo.load_cases_weights, [])\n self.assertEqual(combo.load_cases_types, [])\n self.assertEqual(combo.load_cases_directions, [])\n self.assertEqual(combo.load_cases_directions_names, [])\n self.assertEqual(combo.load_cases_directions_values, [])\n self.assertEqual(combo.load_cases_directions_weights, [])\n self.assertEqual(combo.load_cases_directions_types, [])\n self.assertEqual(combo.load_cases_directions_directions", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JWock82/Pynite", + "expected": "29000)", + "got": "29000)", + "got_raw": "29000) self.assertEqual(mat.v, 0.3) self.assertEqual(mat.rho, 11200) self.assertEqual(mat.G, 0.490) self.assertEqual(mat.A, 0) self.assertEqual(mat.I, 0) self.assertEqual(mat.J, 0) self.assertEqual(mat.t, 0) self.assertEqual(mat.b, 0) self.assertEqual(mat.y, 0) self.assertEqual(mat.z, 0) self.assertEqual(mat.x, 0) self.assertEqual(mat.yz, 0) self.assertEqual(mat.xz, 0) self.assertEqual(mat.yxz", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JWock82/Pynite", + "expected": "model.nodes", + "got": "model.nodes.keys()", + "got_raw": "model.nodes.keys() # Check if the shared node is still in the nodes dictionary", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.7586206896551724 + }, + { + "repo": "JWock82/Pynite", + "expected": "1.2)", + "got": "1.2)", + "got_raw": "1.2) self.assertEqual(combo.factors['L'], 1.6) self.assertEqual(combo.name, '1.2D+1.6L') self.assertEqual(len(combo.factors), 2) self.assertEqual(combo.factors['D'], 1.2) self.assertEqual(combo.factors['L'], 1.6) self.assertEqual(combo.factors['D'], 1.2) self.assertEqual(combo.factors['L'], 1.6) self.assertEqual(combo.factors['D'], 1.2) self.assertEqual(combo.factors['L'], 1.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JWock82/Pynite", + "expected": "18", + "got": "18", + "got_raw": "18\n\n renderer.toggle_visual_properties(stress)\n assert not renderer.labels\n assert not renderer.scalar_bar_text_size == 18\n\n renderer.toggle_visual_properties(stress)\n assert renderer.labels\n assert renderer.scalar_bar_text_size == 8\n\n renderer.toggle_visual_properties(stress)\n assert not renderer.scalar_bar_text_size == 8\n\n renderer.toggle_visual_properties(stress)\n assert not renderer.scalar_bar_text_size == 18\n\n renderer.toggle_visual_properties(stress)\n assert not renderer.scalar_bar_text_size == 18\n\n renderer.toggle_visual_properties(stress", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JWock82/Pynite", + "expected": "-2.5", + "got": "-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.030303030303030304 + }, + { + "repo": "JWock82/Pynite", + "expected": "0.05)", + "got": "0.03)", + "got_raw": "0.03)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.8 + }, + { + "repo": "JoshuaC215/agent-service-toolkit", + "expected": "\"What is the weather in Tokyo?\"", + "got": "\"What is the weather in Tokyo?\" at.chat_message[1].avatar == \"assistant\" at.chat_message[1].markdown[0].value == \"It's 25 degrees in Tokyo today.\" at.chat_message[2].avatar == \"user\" at.chat_message[2].markdown[0].value == \"What are the top 3 movies to watch this weekend?\" at.chat_message[3].avatar == \"assistant\" at.chat_message[3].markdown[0].value == \"I recommend 'The Shawshank Redemption'", + "got_raw": "\"What is the weather in Tokyo?\" at.chat_message[1].avatar == \"assistant\" at.chat_message[1].markdown[0].value == \"It's 25 degrees in Tokyo today.\" at.chat_message[2].avatar == \"user\" at.chat_message[2].markdown[0].value == \"What are the top 3 movies to watch this weekend?\" at.chat_message[3].avatar == \"assistant\" at.chat_message[3].markdown[0].value == \"I recommend 'The Shawshank Redemption', 'The Dark Knight', and 'Inception'.\" at.chat_message[4].avatar", + "exact_match": false, + "code_bleu": 0.01407468909020885, + "edit_similarity": 0.14588235294117646 + }, + { + "repo": "JoshuaC215/agent-service-toolkit", + "expected": "NotImplementedError, match=\"Deepgram STT provider not yet implemented\")", + "got": "NotImplementedError) as exc_info:", + "got_raw": "NotImplementedError) as exc_info:\n SpeechToText(provider=\"deepgram\")\n\n assert str(exc_info.value) == \"deepgram is not yet implemented\"", + "exact_match": false, + "code_bleu": 0.251781283113064, + "edit_similarity": 0.38461538461538464 + }, + { + "repo": "JoshuaC215/agent-service-toolkit", + "expected": "RUN_ID", + "got": "RUN_ID", + "got_raw": "RUN_ID mock_post.assert_called_once_with( \"POST\", \"http://test/feedback\", json={\"run_id\": RUN_ID, \"key\": KEY, \"score\": SCORE, \"kwargs\": KWARGS}, ) # Test error response mock_response = Response(400, json={\"error\": \"Bad request\"}, request=Request(\"POST\", \"http://test/feedback\")) with patch(\"httpx.AsyncClient.post\", return_value=mock_response) as mock_post: with pytest.raises(AgentClientError) as exc_info: await agent_client.acreate_feedback( RUN_ID, KEY, SCORE, KWARGS ) assert str", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JoshuaC215/agent-service-toolkit", + "expected": "False", + "got": "False", + "got_raw": "False # Default value is False # Default value is False # Default value is False # Default value is False # Default value is False # Default value is False # Default value is False # Default value is False # Default value is False # Default value is False # Default value is False # Default value is False # Default value is False # Default value is False # Default value is False # Default value is False # Default value is False # Default value is False # Default value is False # Default value is False # Default value is False ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JoshuaC215/agent-service-toolkit", + "expected": "fake_store", + "got": "fake_store", + "got_raw": "fake_store", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JoshuaC215/agent-service-toolkit", + "expected": "\"claude-haiku-4-5\"", + "got": "\"anthropic/haiku-45\"", + "got_raw": "\"anthropic/haiku-45\" model = get_model(AnthropicModelName.HAIKU_45, temperature=0.5) assert model.model == \"anthropic/haiku-45\" assert model.temperature == 0.5 model = get_model(AnthropicModelName.HAIKU_45, temperature=0.0) assert model.model == \"anthropic/haiku-45\" assert model.temperature == 0.0 model = get_model(AnthropicModelName.HAIKU_45, temperature=1.0) assert model.model == \"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5789473684210527 + }, + { + "repo": "JoshuaC215/agent-service-toolkit", + "expected": "logging.ERROR", + "got": "logging.ERROR", + "got_raw": "logging.ERROR assert LogLevel.CRITICAL.to_logging_level() == logging.CRITICAL def test_settings_init(): \"\"\"Test the initialization of the Settings class.\"\"\" settings = Settings() assert settings.debug is False assert settings.log_level == LogLevel.INFO assert settings.model_name == \"gpt-3.5-turbo\" assert settings.openai_api_key is None assert settings.azure_openai_api_key is None assert settings.anthropic_api_key is None assert settings.vertex_ai_api_key is None def test_settings_init_with_env_vars(): \"\"\"Test the initialization of the Settings class with environment variables.\"\"\" os.environ[\"DEBUG\"] = \"true\" os.environ[\"LOG_LEVEL", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JoshuaC215/agent-service-toolkit", + "expected": "\"ai\"", + "got": "\"ai\"", + "got_raw": "\"ai\" response.content == ANSWER response.metadata == {} response.id == \"1\" response.parent_id == \"0\" response.created_at == 0.0 response.updated_at == 0.0 response.model == \"gpt-3.5-turbo\" response.usage == {} response.usage.prompt_tokens == 0 response.usage.completion_tokens == 0 response.usage.total_tokens == 0 response.usage.model == \"gpt-3.5-turbo\" response.usage.model_name == \"gpt-3.5-turbo\" response.usage.model_version == \"0.0\" response.usage.model_id == \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JoshuaC215/agent-service-toolkit", + "expected": "[\"This is a test response from the fake model.\"]", + "got": "[\"Hello\"", + "got_raw": "[\"Hello\", \"World\"] model = get_model(FakeModelName.FAKE_2) assert isinstance(model, FakeListChatModel) assert model.responses == [\"Hello\", \"World\", \"Hello\"] model = get_model(FakeModelName.FAKE_3) assert isinstance(model, FakeListChatModel) assert model.responses == [\"Hello\", \"World\", \"Hello\", \"World\"] model = get_model(FakeModelName.FAKE_4) assert isinstance(model, FakeListChatModel) assert model.responses == [\"Hello\", \"World\", \"Hello\", \"World\", \"Hello\"] model = get_model(FakeModelName", + "exact_match": false, + "code_bleu": 0.35818997727451396, + "edit_similarity": 0.17857142857142858 + }, + { + "repo": "JoshuaC215/agent-service-toolkit", + "expected": "\"42\"", + "got": "\"42\"", + "got_raw": "\"42\" # Tool output is streamed as markdown with a newline after it. assert response.markdown[0].value == \"The answer is 42\" assert response.status[1].label == \"\u2705 Finished\" assert response.status[1].icon == \":white_check_mark:\" assert response.status[1].markdown[0].value == \"Final Answer:\" assert response.status[1].markdown[1].value == \"42\" assert response.status[1].json[0].value == \"42\" assert response.status[1].markdown[2].value == \"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JoshuaC215/agent-service-toolkit", + "expected": "LogLevel.DEBUG", + "got": "logging.DEBUG", + "got_raw": "logging.DEBUG # noqa: E712 # pylint: disable=no-member # noqa: E501 # noqa: E712 # pylint: disable=no-member # noqa: E501 # noqa: E712 # pylint: disable=no-member # noqa: E501 # noqa: E712 # pylint: disable=no-member # noqa: E501 # noqa: E712 # pylint: disable=no-member # noqa: E501 # noqa: E712 # pylint", + "exact_match": false, + "code_bleu": 0.5946035575013605, + "edit_similarity": 0.5925925925925926 + }, + { + "repo": "JoshuaC215/agent-service-toolkit", + "expected": "mock_graph", + "got": "mock_graph", + "got_raw": "mock_graph", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JuanBindez/pytubefix", + "expected": "'hZpzr8TbF08'", + "got": "'hZpzr8TbF08'", + "got_raw": "'hZpzr8TbF08' assert e.message == 'This video is not available in your region' assert e.region_code == 'hZpzr8TbF08' assert e.status_code == 403 assert e.status_message == 'Forbidden' assert e.url == 'https://www.youtube.com/watch?v=hZpzr8TbF08' assert e.html == '' assert e.html_code == 0 assert e.html_error == '' assert e.html_error_code == 0 assert e.html_error_message == '' assert e.html_error_url == '' assert e.html_error_code_url", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JuanBindez/pytubefix", + "expected": "3399554", + "got": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678", + "got_raw": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.02962962962962963 + }, + { + "repo": "JuanBindez/pytubefix", + "expected": "playlist_html", + "got": "playlist_html.decode()[:-1]", + "got_raw": "playlist_html.decode()[:-1] + \"\\n\" + playlist_html.decode()[-1] + \"\\n\" + playlist_html.decode()[:-1] + \"\\n\" + playlist_html.decode()[-1] + \"\\n\" + playlist_html.decode()[:-1] + \"\\n\" + playlist_html.decode()[-1] + \"\\n\" + playlist_html.decode()[:-1] + \"\\n\" + playlist_html.decode()[-1] + \"\\n\" + playlist_html.decode()[:-1] + \"\\n\" + playlist_html.decode()[-1] + \"\\n\" + playlist_html.decode()[:-1] +", + "exact_match": false, + "code_bleu": 0.12605968092174913, + "edit_similarity": 0.65 + }, + { + "repo": "JuanBindez/pytubefix", + "expected": "18", + "got": "18", + "got_raw": "18 assert cipher_signature.streams.get_by_itag(18).url == \"https://r1---sn-2233445566778899.googlevideo.com/videoplayback?ipbits=8&ip=1.1.1.1&ratebypass=yes&source=youtube&signature=12345678901234567890123456789012345678901234567890123", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JuanBindez/pytubefix", + "expected": "3", + "got": "3", + "got_raw": "3 * 8 * 1024 // 1024 + 1 # 1 for the last chunk that might be smaller than 1MB # 3 for the 3 streams # 8 * 1024 for the chunk size # 1024 for the buffer size # 1 for the buffer flush # 1 for the buffer close # 1 for the buffer read # 1 for the buffer seek # 1 for the buffer tell # 1 for the buffer flush # 1 for the buffer close # ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JuanBindez/pytubefix", + "expected": "'UCs6nmQViDpUw0nuIx9c_WvA'", + "got": "'UC33333333333333333333333'", + "got_raw": "'UC33333333333333333333333'", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.1509433962264151 + }, + { + "repo": "JuanBindez/pytubefix", + "expected": "RegexMatchError)", + "got": "RegexMatchError)", + "got_raw": "RegexMatchError) as e: helpers.regex_search(r'not found', 'test') assert str(e.value) == 'Regex not found' in 'test' assert e.value.regex == r'not found' assert e.value.string == 'test' assert e.value.pos == 0 assert e.value.end_pos == 5 assert e.value.lastgroup == '' assert e.value.re == re.compile(r'not found') assert e.value.string == 'test' assert e.value.string == 'test' assert e.value.string == 'test' assert e.value.string == 'test' assert e.value.string == 'test' assert e.value", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JuanBindez/pytubefix", + "expected": "None", + "got": "None", + "got_raw": "None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JuanBindez/pytubefix", + "expected": "ytmd.raw_metadata[0]", + "got": "ytmd.raw_metadata[0]", + "got_raw": "ytmd.raw_metadata[0] def test_metadata_from_url(url): ytmd = extract.metadata_from_url(url) assert len(ytmd.raw_metadata) > 0 def test_metadata_from_url_with_query(url): ytmd = extract.metadata_from_url(url, query=True) assert len(ytmd.raw_metadata) > 0 def test_metadata_from_url_with_query_and_video_id(url): ytmd = extract.metadata_from_url(url, query=True, video_id='12345') assert len(ytmd.raw_metadata) > 0 def test_metadata_from_url_with_query_and_video_id_and_query(url): ytmd = extract", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JuanBindez/pytubefix", + "expected": "{\"content-length\": \"16384\"}", + "got": "response.info()", + "got_raw": "response.info()", + "exact_match": false, + "code_bleu": 0.2295748846661433, + "edit_similarity": 0.19047619047619047 + }, + { + "repo": "JuanBindez/pytubefix", + "expected": "\"abc\"", + "got": "\"abc\"", + "got_raw": "\"abc\" assert helpers.safe_filename(\"abc#\") == \"abc\" assert helpers.safe_filename(\"abc\") == \"abc\" assert helpers.safe_filename(\"abc_\") == \"abc_\" assert helpers.safe_filename(\"abc_123\") == \"abc_123\" assert helpers.safe_filename(\"abc_123_\") == \"abc_123_\" assert helpers.safe_filename(\"abc_123_456\") == \"abc_123_456\" assert helpers.safe_filename(\"abc_123_456_\") == \"abc_123_", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JuanBindez/pytubefix", + "expected": "{ 'foo': [], 'bar': {} }", + "got": "{'foo': [], 'bar': {}}", + "got_raw": "{'foo': [], 'bar': {}} # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E12", + "exact_match": false, + "code_bleu": 1.0, + "edit_similarity": 0.9565217391304348 + }, + { + "repo": "JuanBindez/pytubefix", + "expected": "'m8uHb5jIGN8'", + "got": "'m8uHb5jIGN8'", + "got_raw": "'m8uHb5jIGN8' assert e.message == 'This video is private' assert e.url == 'https://www.youtube.com/watch?v=m8uHb5jIGN8' assert e.title == 'Private Video' assert e.description == '' assert e.author == 'Private User' assert e.publish_date == '2018-01-01' assert e.length == '00:00:00' assert e.views == '0' assert e.likes == '0' assert e.dislikes == '0' assert e.favorites == '0' assert e.comments ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JuanBindez/pytubefix", + "expected": "0.02", + "got": "0.02", + "got_raw": "0.02\n\n\ndef test_rating_none(cipher_signature):\n \"\"\"Test the rating value of a YouTube object with no rating.\"\"\"\n\n assert cipher_signature.rating is None\n\n\ndef test_rating_invalid(cipher_signature):\n \"\"\"Test the rating value of a YouTube object with an invalid rating.\"\"\"\n\n cipher_signature.rating = \"invalid\"\n assert cipher_signature.rating is None\n\n\ndef test_rating_float(cipher_signature):\n \"\"\"Test the rating value of a YouTube object with a float rating.\"\"\"\n\n cipher_signature.rating = 2.073431\n assert abs(cipher_signature.rating - 2.0734", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "JuanBindez/pytubefix", + "expected": "'{\\'en\\': }'", + "got": "\"\"", + "got_raw": "\"\"\n\n\ndef test_getattr():\n caption = Caption(\n {\"url\": \"url1\", \"name\": {\"simpleText\": \"name1\"}, \"languageCode\": \"en\", \"vssId\": \".en\"}\n )\n assert caption.name == \"name1\"\n assert caption.code == \"en\"\n assert caption.url == \"url1\"\n assert caption.vssId == \".en\"\n assert caption.id == \"en\" # id is the same as code for captions\n\n\ndef test_getattr_missing():\n caption = Caption(\n ", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4225352112676056 + }, + { + "repo": "Kludex/mangum", + "expected": "expected", + "got": "expected", + "got_raw": "expected and shutdown_complete == expected and response[\"statusCode\"] == 200 and response[\"isBase64Encoded\"] is False and response[\"headers\"] == {} and response[\"body\"] == \"Hello, world!\" and response[\"multiValueHeaders\"] == {} and response[\"cookies\"] == [] and response[\"version\"] == \"1.0\" and response[\"type\"] == \"http\" and response[\"isStreamed\"] is False and response[\"streamingResponseBody\"] is None and response[\"multiValueStreamedResponseBody\"] is None and response[\"multiValueCookies\"] == [] and response[\"multiValueHeaders\"] == {}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Kludex/mangum", + "expected": "b\"\"", + "got": "b\"\"", + "got_raw": "b\"\" if req_body is None else req_body.encode() if isinstance(req_body, str) else req_body.decode() if isinstance(req_body, bytes) else req_body else b\"\" if req_body is None else req_body.encode() if isinstance(req_body, str) else req_body.decode() if isinstance(req_body, bytes) else req_body else b\"\" if req_body is None else req_body.encode() if isinstance(req_body, str) else req_body.decode() if isinstance(req_body, bytes) else req_body else b\"\" if req_body is None else req_body.encode() if isinstance(req_body, str) else req_body.decode", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Kludex/mangum", + "expected": "{ \"statusCode\": 200, \"isBase64Encoded\": False, \"headers\": {\"content-type\": \"text/plain; charset=utf-8\"}, \"multiValueHeaders\": {}, \"body\": \"Hello, world!\", }", + "got": "{ \"statusCode\": 200, \"isBase64Encoded\": False, \"headers\": {\"content-type\": \"text/plain; charset=utf-8\"}, \"body\": \"Hello, world!\", } ``` \"\"\" def test_http_empty_body(mock_aws_api_gateway_event) -> None: async def app(scope, receive, send): assert scope[\"type\"] == \"http\" await send( { \"type\": \"http.response.start\", \"status\": 200, \"headers\": [[b\"content-type\", b\"text/plain; charset=utf-8\"]], } ) await send({\"type\": \"http.response.body", + "got_raw": "{ \"statusCode\": 200, \"isBase64Encoded\": False, \"headers\": {\"content-type\": \"text/plain; charset=utf-8\"}, \"body\": \"Hello, world!\", } ``` \"\"\" def test_http_empty_body(mock_aws_api_gateway_event) -> None: async def app(scope, receive, send): assert scope[\"type\"] == \"http\" await send( { \"type\": \"http.response.start\", \"status\": 200, \"headers\": [[b\"content-type\", b\"text/plain; charset=utf-8\"]], } ) await send({\"type\": \"http.response.body", + "exact_match": false, + "code_bleu": 0.3338677426124146, + "edit_similarity": 0.4433164128595601 + }, + { + "repo": "Kludex/mangum", + "expected": "LifespanFailure)", + "got": "LifespanFailure)", + "got_raw": "LifespanFailure) as exc_info: await handler.handle(mock_aws_api_gateway_event) assert str(exc_info.value) == \"Unexpected message received\" assert exc_info.value.message == \"Unexpected message received\" assert exc_info.value.message == \"Unexpected message received\" assert exc_info.value.message == \"Unexpected message received\" assert exc_info.value.message == \"Unexpected message received\" assert exc_info.value.message == \"Unexpected message received\" assert exc_info.value.message == \"Unexpected message received\" assert exc_info.value.message == \"Unexpected message received\" assert exc_info.value.message == \"Unexpected message received\" assert exc_info.value.message == \"Unexpected message", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Kludex/mangum", + "expected": "caplog.text", + "got": "caplog.text.lower()", + "got_raw": "caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.7333333333333333 + }, + { + "repo": "Kludex/mangum", + "expected": "scope_body", + "got": "scope_body", + "got_raw": "scope_body if scope_body is not None else b\"\" if req_body is None else req_body.encode() if isinstance(req_body, str) else req_body if isinstance(req_body, bytes) else req_body.decode() if isinstance(req_body, dict) else req_body.encode() if isinstance(req_body, list) else req_body.decode() if isinstance(req_body, set) else req_body.encode() if isinstance(req_body, frozenset) else req_body.decode() if isinstance(req_body, tuple) else req_body.encode() if isinstance(req_body, bool) else req_body.decode() if isinstance(req_body, int) else req_body.encode", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Kludex/mangum", + "expected": "message", + "got": "message", + "got_raw": "message", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Lancetnik/Propan", + "expected": "{ \"protocol\": \"redis\", \"url\": \"redis://localhost:6379\", }", + "got": "{ \"url\": \"redis://localhost:6379\", \"protocol\": \"redis\", \"protocolVersion\": \"2.0.0\", }", + "got_raw": "{ \"url\": \"redis://localhost:6379\", \"protocol\": \"redis\", \"protocolVersion\": \"2.0.0\", }", + "exact_match": false, + "code_bleu": 0.4480304273880272, + "edit_similarity": 0.5070422535211268 + }, + { + "repo": "Lancetnik/Propan", + "expected": "None", + "got": "None", + "got_raw": "None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Lancetnik/Propan", + "expected": "\"hi\"", + "got": "message.body", + "got_raw": "message.body + \"True\" + message.headers[\"test\"] + message.headers[\"x-test\"] + message.headers[\"x-test-2\"] + message.headers[\"x-test-3\"] + message.headers[\"x-test-4\"] + message.headers[\"x-test-5\"] + message.headers[\"x-test-6\"] + message.headers[\"x-test-7\"] + message.headers[\"x-test-8\"] + message.headers[\"x-test-9\"] + message.headers[\"x-test-10\"] + message.headers[\"x-test-11\"] + message.headers[\"x-test-12\"] + message.headers[\"x-test-", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.0 + }, + { + "repo": "Lancetnik/Propan", + "expected": "broker", + "got": "broker", + "got_raw": "broker # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Lancetnik/Propan", + "expected": "RequestValidationError)", + "got": "RequestValidationError)", + "got_raw": "RequestValidationError) as exc_info: await router.handle(msg) assert str(exc_info.value) == \"Invalid request\" assert exc_info.value.errors() == [ {\"loc\": 0, \"msg\": \"int value expected\", \"type\": \"type_error.integer\"}, {\"loc\": 1, \"msg\": \"str value expected\", \"type\": \"type_error.string\"}, ]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Lancetnik/Propan", + "expected": "4", + "got": "2", + "got_raw": "2 * 2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "Lancetnik/Propan", + "expected": "\"test\")", + "got": "\"test\")", + "got_raw": "\"test\") mock.exit.assert_called_once()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Lancetnik/Propan", + "expected": "await test_broker.publish(\"\", queue, callback=True)", + "got": "await test_broker.publish(1, queue) assert 2 == await test_broker.publish(2, queue + \"1\", exchange=\"test\") assert 1 == await test_broker.publish(1, queue, exchange=\"test\") assert 2 == await test_broker.publish(2, queue + \"1\") assert 1 == await test_broker.publish(1, queue) assert 2 == await test_broker.publish(2, queue + \"1\", exchange=\"test\") assert 1 == await test_broker.publish(1, queue) assert 2 == await test_broker.publish(2, queue", + "got_raw": "await test_broker.publish(1, queue) assert 2 == await test_broker.publish(2, queue + \"1\", exchange=\"test\") assert 1 == await test_broker.publish(1, queue, exchange=\"test\") assert 2 == await test_broker.publish(2, queue + \"1\") assert 1 == await test_broker.publish(1, queue) assert 2 == await test_broker.publish(2, queue + \"1\", exchange=\"test\") assert 1 == await test_broker.publish(1, queue) assert 2 == await test_broker.publish(2, queue", + "exact_match": false, + "code_bleu": 0.05004256608892788, + "edit_similarity": 0.17959183673469387 + }, + { + "repo": "Lancetnik/Propan", + "expected": "None", + "got": "None", + "got_raw": "None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Lancetnik/Propan", + "expected": "None", + "got": "None", + "got_raw": "None # type: ignore\n\n\ndef test_init_with_broker(app_with_broker: PropanApp):\n assert app_with_broker.broker is not None # type: ignore\n\n\ndef test_init_with_broker_and_context(app_with_broker: PropanApp):\n assert app_with_broker.broker is not None # type: ignore\n assert app_with_broker.context is not None # type: ignore\n\n\ndef test_init_with_broker_and_context_and_logger(app_with_broker: PropanApp):\n assert app_with_broker.broker is not None # type: ignore\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Lancetnik/Propan", + "expected": "{ \"Handler\": { \"bindings\": { \"redis\": { \"bindingVersion\": \"custom\", \"channel\": \"test\", \"method\": \"subscribe\", } }, \"servers\": [\"dev\"], \"subscribe\": { \"bindings\": {\"redis\": {\"bindingVersion\": \"custom\"}}, \"message\": {\"$ref\": \"", + "got": "{ \"Handler\": { \"bindings\": {\"redis\": \"Handler\"}, \"servers\": [\"dev\"], \"subscribe\": { \"bindings\": {\"redis\": \"Handler\"}, \"bindings\": {\"redis\": \"Handler\"}, \"bindings\": {\"redis\": \"Handler\"}, \"bindings\": {\"redis\": \"Handler\"}, \"bindings\": {\"redis\": \"Handler\"}, \"bindings\": {\"redis\": \"Handler\"}, \"bindings\": {\"redis\": \"Handler\"}, \"bindings\": {\"redis\": \"Handler\"}, \"bindings\": {\"redis\": \"Handler\"}, \"bindings\": {\"redis\": \"Handler\"}, \"bindings\": {\"redis\": \"Handler\"}, \"bindings\": {\"redis", + "got_raw": "{ \"Handler\": { \"bindings\": {\"redis\": \"Handler\"}, \"servers\": [\"dev\"], \"subscribe\": { \"bindings\": {\"redis\": \"Handler\"}, \"bindings\": {\"redis\": \"Handler\"}, \"bindings\": {\"redis\": \"Handler\"}, \"bindings\": {\"redis\": \"Handler\"}, \"bindings\": {\"redis\": \"Handler\"}, \"bindings\": {\"redis\": \"Handler\"}, \"bindings\": {\"redis\": \"Handler\"}, \"bindings\": {\"redis\": \"Handler\"}, \"bindings\": {\"redis\": \"Handler\"}, \"bindings\": {\"redis\": \"Handler\"}, \"bindings\": {\"redis\": \"Handler\"}, \"bindings\": {\"redis", + "exact_match": false, + "code_bleu": 0.2377086586464144, + "edit_similarity": 0.2624821683309558 + }, + { + "repo": "Lancetnik/Propan", + "expected": "1", + "got": "1.0000000000000002e-323.0000000000000002e-323.0000000000000002e-323.0000000000000002e-323.0000000000000002e-323.0000000000000002", + "got_raw": "1.0000000000000002e-323.0000000000000002e-323.0000000000000002e-323.0000000000000002e-323.0000000000000002e-323.0000000000000002", + "exact_match": false, + "code_bleu": 0.09578464408619825, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "Lancetnik/Propan", + "expected": "\"FuncMessage\"", + "got": "\"FuncMessage\"", + "got_raw": "\"FuncMessage\" result == { \"title\": \"FuncMessage\", \"type\": \"object\", \"properties\": { \"a\": {\"title\": \"A\", \"type\": \"integer\"}, }, \"required\": [\"a\"], } } response == { \"title\": \"FuncResponse\", \"type\": \"integer\", }", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Lancetnik/Propan", + "expected": "2", + "got": "128", + "got_raw": "128 r.stdout == \"\" r.stderr == \"Error: Invalid path: 'app1'\\n\" \"Run 'propan docs gen --help' for more information.\\n\" \"Error: Invalid path: 'app1'\\n\" \"Run 'propan docs gen --help' for more information.\\n\" \"Error: Invalid path: 'app1'\\n\" \"Run 'propan docs gen --help' for more information.\\n\" \"Error: Invalid path: 'app1'\\n\" \"Run 'propan docs gen --help' for more information.\\n\" \"Error: Invalid path:", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "Lancetnik/Propan", + "expected": "\"pong\"", + "got": "\"pong\"", + "got_raw": "\"pong\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "LonamiWebs/Telethon", + "expected": "[user]", + "got": "[]", + "got_raw": "[]", + "exact_match": false, + "code_bleu": 0.39640237166757364, + "edit_similarity": 0.5 + }, + { + "repo": "LonamiWebs/Telethon", + "expected": "unpickled_error.message", + "got": "unpickled_error.message.replace(\"\\n\"", + "got_raw": "unpickled_error.message.replace(\"\\n\", \"\") + \"\\n\" + error.message.replace(\"\\n\", \"\") + \"\\n\" + unpickled_error.message.replace(\"\\n\", \"\") + \"\\n\" + error.message.replace(\"\\n\", \"\") + \"\\n\" + unpickled_error.message.replace(\"\\n\", \"\") + \"\\n\" + error.message.replace(\"\\n\", \"\") + \"\\n\" + unpickled_error.message.replace(\"\\n\", \"\") + \"\\n\" + error.message.replace(\"\\n\", \"\") + \"\\n\" + unpickled_error.message.replace(\"\\n\", \"\") + \"\\n\" + error.message.replace(\"\\n", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.7796610169491526 + }, + { + "repo": "LonamiWebs/Telethon", + "expected": "media_file)", + "got": "entity)", + "got_raw": "entity) as mock_obj: mock_obj.assert_called_once_with( entity, message=message, file=media_file, formatting_entities=formatting_entities, ) assert result == expected_result", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "LonamiWebs/Telethon", + "expected": "sorted((e.offset, e.length) for e in entities_expected)", + "got": "entities_expected) == sorted(entities_for_test)", + "got_raw": "entities_expected) == sorted(entities_for_test) # deep copy\n\n\ndef test_strip_text_with_entities():\n text = 'text'\n entities_before = [Meu(0, 1)] # 't'\n entities_expected = [Meu(0, 0)] # 't' -> ''\n text_after = helpers.strip_text(text, entities_before)\n assert text_after == '' # 't' -> ''\n assert sorted(entities_expected) == sorted(entities_before) # 't' -> ''\n\n\ndef test_strip_text_with_entities2():\n text = 'text'", + "exact_match": false, + "code_bleu": 0.13888095170058956, + "edit_similarity": 0.35294117647058826 + }, + { + "repo": "LonamiWebs/Telethon", + "expected": "[utils.get_input_peer(user)]", + "got": "[]", + "got_raw": "[]", + "exact_match": false, + "code_bleu": 0.14865088937534013, + "edit_similarity": 0.13333333333333333 + }, + { + "repo": "LonamiWebs/Telethon", + "expected": "1", + "got": "1", + "got_raw": "1\n\n assert contm.count == 2\n\n def test_sync_acontext_async(self):\n contm = self.AsyncNoopContextManager(loop=asyncio.new_event_loop())\n assert contm.count == 0\n\n async with contm:\n assert contm.count == 1\n\n assert contm.count == 2\n\n def test_sync_acontext_async_error(self):\n contm = self.AsyncNoopContextManager(loop=asyncio.new_event_loop())\n assert contm.count == 0\n\n with pytest.raises(ValueError) as excinfo:\n async with contm:\n raise", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "LuteOrg/lute-v3", + "expected": "\"images\")", + "got": "\"3\")", + "got_raw": "\"3\")", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.46153846153846156 + }, + { + "repo": "LuteOrg/lute-v3", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "LuteOrg/lute-v3", + "expected": "\"texts\")", + "got": "\"text\")", + "got_raw": "\"text\") sql = \"select BkID, BkTagID from book_tags\" assert_sql_result(sql, [\"1; 1\"], \"book_tag\") sql = \"select BkID, BkStatID from book_stats\" assert_sql_result(sql, [\"1; 1\"], \"book_stats\") sql = \"select BkID, BkReadDate from books\" assert_sql_result(sql, [\"1; 2015-01-01 00:00:00\"], \"book\") sql = \"select TxID, BkID, BkReadDate from text", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.9333333333333333 + }, + { + "repo": "LuteOrg/lute-v3", + "expected": "\"popped\")", + "got": "\"\")", + "got_raw": "\"\")", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "LuteOrg/lute-v3", + "expected": "\"final\")", + "got": "\"updated\")", + "got_raw": "\"updated\")", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.4444444444444444 + }, + { + "repo": "LuteOrg/lute-v3", + "expected": "3", + "got": "3", + "got_raw": "3 assert retrieved.dictionaries[0].dicttype == \"embeddedhtml\" assert retrieved.dictionaries[0].dicturi == \"1?[LUTE]\" assert retrieved.dictionaries[1].dicttype == \"popuphtml\" assert retrieved.dictionaries[1].dicturi == \"2?[LUTE]\" assert retrieved.dictionaries[2].dicttype == \"popuphtml\" assert retrieved.dictionaries[2].dicturi == \"3?[LUTE]\" assert retrieved.dictionaries[2].sort_order == 3 assert retrieved.dictionaries[0].sort_order == 1 assert retrieved.dictionaries[1].sort_order == 2 assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "LuteOrg/lute-v3", + "expected": "\"1 day ago\"", + "got": "\"1 day ago\" b.last_backup_datetime = now - 172801 b.time_since_last_backup == \"2 days ago\" b.last_backup_datetime = now - 345601 b.time_since_last_backup == \"3 days ago\" b.last_backup_datetime = now - 518401 b.time_since_last_backup == \"4 days ago\" b.last_backup_datetime = now - 691201 b.time_since_last_backup == \"5 days ago\" b.last_backup_datetime = now - 864001 b.time_since_last_backup == \"6 days", + "got_raw": "\"1 day ago\" b.last_backup_datetime = now - 172801 b.time_since_last_backup == \"2 days ago\" b.last_backup_datetime = now - 345601 b.time_since_last_backup == \"3 days ago\" b.last_backup_datetime = now - 518401 b.time_since_last_backup == \"4 days ago\" b.last_backup_datetime = now - 691201 b.time_since_last_backup == \"5 days ago\" b.last_backup_datetime = now - 864001 b.time_since_last_backup == \"6 days", + "exact_match": false, + "code_bleu": 0.017620300614149337, + "edit_similarity": 0.05339805825242718 + }, + { + "repo": "LuteOrg/lute-v3", + "expected": "expected", + "got": "expected.strip()", + "got_raw": "expected.strip() + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" +", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "LuteOrg/lute-v3", + "expected": "2", + "got": "2.0", + "got_raw": "2.0 / 4.0 * 100.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "LuteOrg/lute-v3", + "expected": "msg)", + "got": "msg)", + "got_raw": "msg)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "LuteOrg/lute-v3", + "expected": "\"there\")", + "got": "\"there\")", + "got_raw": "\"there\") t.remove_image() assert t.get_current_image() is None db.session.add(t) db.session.commit() sql = \"select WiWoID, WiSource from wordimages\" expected = [\"1;\"] assert_sql_result(sql, expected, \"there\") t.set_current_image(\"hello.png\") db.session.add(t) db.session.commit() sql = \"select WiWoID, WiSource from wordimages\" expected = [\"1; hello.png\"] assert_sql_result(sql, expected, \"hello\") t.set_current_image(None) db.session.add(t) db.session.commit() sql = \"select WiWoID, WiSource", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "LuteOrg/lute-v3", + "expected": "\"now set\")", + "got": "\"saved\")", + "got_raw": "\"saved\")", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5555555555555556 + }, + { + "repo": "LuteOrg/lute-v3", + "expected": "[(2,)]", + "got": "[(2,)]", + "got_raw": "[(2,)] \"migrations run\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "LuteOrg/lute-v3", + "expected": "\"unknown\"", + "got": "\"unknown\"", + "got_raw": "\"unknown\" assert t.comment is None assert t.id is not None assert t.created_by is None assert t.updated_by is None assert t.created_at is not None assert t.updated_at is None assert t.active is True assert t.hidden is False assert t.tag_type is None assert t.tag_group is None assert t.parent_id is None assert t.depth is None assert t.path is None assert t.level is None assert t.slug is None assert t.url is None assert t.url_path is None assert t.url_title is None assert t.url_title_path is None assert t.url_title_slug is None assert t.url_title_slug_path is None assert t", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "LuteOrg/lute-v3", + "expected": "\"no langs\")", + "got": "\"en\") assert_sql_result(story_sql", + "got_raw": "\"en\") assert_sql_result(story_sql, [ (\"The Great Gatsby\",), (\"The Catcher in the Rye\",), (\"The Hobbit\",), (\"The Lord of the Rings\",), (\"The Silmarillion\",), (\"The Hobbit\",), (\"The Lord of the Rings\",), (\"The Silmarillion\",), (\"The Hobbit\",), (\"The Lord of the Rings\",), (\"The Silmarillion\",), (\"The Hobbit\",), (\"The Lord of the Rings\",), (\"The Silmarillion\",), (\"The Hobbit\",), (\"The Lord of the Rings\",), (\"The", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.18181818181818182 + }, + { + "repo": "LuteOrg/lute-v3", + "expected": "\"11 GB\"", + "got": "\"10.00 GB\"", + "got_raw": "\"10.00 GB\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.7058823529411765 + }, + { + "repo": "LuteOrg/lute-v3", + "expected": "\"deleted\")", + "got": "\"saved\")", + "got_raw": "\"saved\")", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5555555555555556 + }, + { + "repo": "LuteOrg/lute-v3", + "expected": "\"42\"", + "got": "42.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "42.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.030303030303030304 + }, + { + "repo": "LuteOrg/lute-v3", + "expected": "\"(default)\"", + "got": "\"\"", + "got_raw": "\"\" \"Default\" \"theme\" \"for\" \"Lute\" \"web\" \"app\" \"and\" \"CLI\" \"tools\" \"and\" \"scripts\" \"and\" \"etc.\" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3076923076923077 + }, + { + "repo": "LuteOrg/lute-v3", + "expected": "t.text", + "got": "t.text.lower()", + "got_raw": "t.text.lower() + \".\" * t.token_count - 1 + \" \" * (t.token_count - 1) + t.text_lc + \".\" * t.token_count - 1 + \" \" * (t.token_count - 1) + t.text_lc + \".\" * t.token_count - 1 + \" \" * (t.token_count - 1) + t.text_lc + \".\" * t.token_count - 1 + \" \" * (t.token_count - 1) + t.text_lc + \".\" * t.token_count - 1 + \" \" * (t.token_count - 1) + t.text", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.6 + }, + { + "repo": "MarshalX/atproto", + "expected": "expected_signing_key", + "got": "expected_signing_key", + "got_raw": "expected_signing_key", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MarshalX/atproto", + "expected": "expected_pds", + "got": "expected_pds", + "got_raw": "expected_pds + '/pds' if expected_pds else None # type: ignore # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MarshalX/atproto", + "expected": "ValidationError)", + "got": "ValidationError)", + "got_raw": "ValidationError) as exc_info: model = UnknownUnionModel(py_type='invalid') assert str(exc_info.value) == \"Invalid value for 'py_type' field: invalid\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MarshalX/atproto", + "expected": "DidNotFoundError)", + "got": "DidNotFoundError)", + "got_raw": "DidNotFoundError) as e: await AsyncDidResolver.resolve('did:web:unknown') assert str(e.value) == 'Unknown DID: did:web:unknown' assert e.value.did == 'did:web:unknown' assert e.value.message == 'Unknown DID: did:web:unknown' assert e.value.code == 404 assert e.value.status == 404 assert e.value.url is None assert e.value.error is None assert e.value.detail is None assert e.value.errors is None assert e.value.errors_code is None assert e.value.errors_message is None assert e.value.errors_status is None assert e.value.errors", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MarshalX/atproto", + "expected": "expected_hostname", + "got": "expected_hostname", + "got_raw": "expected_hostname", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MarshalX/atproto", + "expected": "'application/json'", + "got": "'application/json'", + "got_raw": "'application/json' assert headers['AUTHORIZATION'] == 'Bearer token' assert headers['accept'] == 'application/json'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MarshalX/atproto", + "expected": "valid_data['did']", + "got": "valid_data['did']", + "got_raw": "valid_data['did']\n\n # Test invalid data raises ValidationError\n with pytest.raises(ValidationError) as exc_info:\n get_or_create( {'handle': invalid_data['handle'], 'did': invalid_data['did']}, FooModel, strict_string_format=True )\n error = exc_info.value.errors()[0]\n assert error['loc'] == 0 # Handle error at index 0\n assert error['msg'] == 'Invalid handle format' # Expected error message\n assert error['type'] == 'value_error' # Expected error type", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MarshalX/atproto", + "expected": "client.request.get_headers()", + "got": "dm_client.headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._", + "got_raw": "dm_client.headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._headers._", + "exact_match": false, + "code_bleu": 0.01024220880383582, + "edit_similarity": 0.0628099173553719 + }, + { + "repo": "MarshalX/atproto", + "expected": "'2023-07-20T10:17:40.298101'", + "got": "'2022-01-01T00:00:00Z'", + "got_raw": "'2022-01-01T00:00:00Z' assert model.value.title == 'Feed atproto.blue' assert model.value.description == 'Feed atproto.blue' assert model.value.image == 'https://feed.atproto.blue/image.jpg' assert model.value.url == 'https://feed.atproto.blue' assert model.value.author.did == 'did:web:feed.atproto.blue' assert model.value.author.name == 'Feed atproto.blue' assert model.value.author.image == 'https://feed.atproto.blue/image.jpg' assert model.value.author.url == 'https://feed.atproto", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4 + }, + { + "repo": "MarshalX/atproto", + "expected": "str(at_uri)", + "got": "str(at_uri)", + "got_raw": "str(at_uri) + '\\n' + str(at_uri2) + '\\n' + str(at_uri) + '\\n' + str(at_uri2) + '\\n' + str(at_uri) + '\\n' + str(at_uri2) + '\\n' + str(at_uri) + '\\n' + str(at_uri2) + '\\n' + str(at_uri) + '\\n' + str(at_uri2) + '\\n' + str(at_uri) + '\\n' + str(at_uri2) + '\\n' + str(at_uri) + '\\n' + str(at_uri2)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MarshalX/atproto", + "expected": "expected_did_plc", + "got": "expected_did_plc", + "got_raw": "expected_did_plc", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MarshalX/atproto", + "expected": "car.root", + "got": "car.root_hash.hex()", + "got_raw": "car.root_hash.hex()", + "exact_match": false, + "code_bleu": 0.24446151121745047, + "edit_similarity": 0.5925925925925926 + }, + { + "repo": "MarshalX/atproto", + "expected": "'foo'", + "got": "'foo'", + "got_raw": "'foo'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MarshalX/atproto", + "expected": "expected_json_schema", + "got": "expected_json_schema", + "got_raw": "expected_json_schema", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MarshalX/atproto", + "expected": "blob_ref.ref.link", + "got": "blob_ref.ref.link.cid.to_str()", + "got_raw": "blob_ref.ref.link.cid.to_str() + blob_ref.ref.link.path.to_str() + blob_ref.ref.link.hash.to_str() + blob_ref.ref.link.version.to_str() + blob_ref.ref.link.path.to_str() + blob_ref.ref.link.hash.to_str() + blob_ref.ref.link.version.to_str() + blob_ref.ref.link.path.to_str() + blob_ref.ref.link.hash.to_str() + blob_ref.ref.link.version.to_str() + blob_ref.ref.link.path.to_str() + blob_ref.ref.link.hash.to_str() + blob_ref.ref.link.version.to_str() + blob_ref.ref.link.path.to_str() + blob_ref", + "exact_match": false, + "code_bleu": 0.41722614486115056, + "edit_similarity": 0.723404255319149 + }, + { + "repo": "MarshalX/atproto", + "expected": "expected_purpose", + "got": "expected_purpose", + "got_raw": "expected_purpose", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MarshalX/atproto", + "expected": "expected_pubkey_multibase", + "got": "did_key2", + "got_raw": "did_key2 == expected_pubkey_multibase == format_did_key(multikey) == format_did_key(multikey.to_str()) == format_did_key(multikey.to_bytes()) == format_did_key(multikey.to_hex()) == format_did_key(multikey.to_base64()) == format_did_key(multikey.to_base64url()) == format_did_key(multikey.to_b58()) == format_did_key(multikey.to_b58c()) == format_did_key(multikey.to_b58t()) == format_did_key(multikey.to", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.30303030303030304 + }, + { + "repo": "MarshalX/atproto", + "expected": "expected_did", + "got": "expected_did_key", + "got_raw": "expected_did_key + '#' + expected_handle + '@' + expected_did + '.atproto.io' assert atproto_data.handle == expected_handle assert atproto_data.did_key == expected_did_key assert atproto_data.did_document.did == expected_did assert atproto_data.did_document.id == expected_did + '.atproto.io' assert atproto_data.did_document.handle == expected_handle assert atproto_data.did_document.public_key == [ { 'id': 'did:web:test.marshal.dev#key-1', 'type': 'Ed25519VerificationKey2018', 'controller': expected_d", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.8571428571428571 + }, + { + "repo": "MarshalX/atproto", + "expected": "bytes_blob_ref.ref", + "got": "plain_cid", + "got_raw": "plain_cid + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/0' + '/", + "exact_match": false, + "code_bleu": 0.16666666666666666, + "edit_similarity": 0.14814814814814814 + }, + { + "repo": "MarshalX/atproto", + "expected": "did_doc", + "got": "did_doc.document", + "got_raw": "did_doc.document", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.6086956521739131 + }, + { + "repo": "MasoniteFramework/masonite", + "expected": "self.bag.messages())", + "got": "[\"email\"", + "got_raw": "[\"email\", \"username\"])", + "exact_match": false, + "code_bleu": 0.1129502504512306, + "edit_similarity": 0.21428571428571427 + }, + { + "repo": "MasoniteFramework/masonite", + "expected": "str", + "got": "str", + "got_raw": "str", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MasoniteFramework/masonite", + "expected": "location)", + "got": "location)", + "got_raw": "location)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MasoniteFramework/masonite", + "expected": "self.bag.empty())", + "got": "self.bag.any())", + "got_raw": "self.bag.any()) self.bag.add(\"email\", \"Your email is invalid\") self.bag.add(\"password\", \"Your password is invalid\") self.bag.add(\"username\", \"Your username is invalid\") self.assertFalse(self.bag.any()) self.bag.add(\"email\", \"Your email is invalid\") self.bag.add(\"password\", \"Your password is invalid\") self.bag.add(\"username\", \"Your username is invalid\") self.assertTrue(self.bag.any()) self.bag.add(\"email\", \"Your email is invalid\") self.bag.add(\"password\", \"Your password is invalid\") self.bag.add(\"", + "exact_match": false, + "code_bleu": 0.5969491792019646, + "edit_similarity": 0.8125 + }, + { + "repo": "MasoniteFramework/masonite", + "expected": "bindings.keys())", + "got": "bindings)", + "got_raw": "bindings) self.assertIn(\"config.location2\", bindings) self.assertIn(\"config.location3\", bindings) self.assertIn(\"config.location4\", bindings) self.assertIn(\"config.location5\", bindings) self.assertIn(\"config.location6\", bindings) self.assertIn(\"config.location7\", bindings) self.assertIn(\"config.location8\", bindings) self.assertIn(\"config.location9\", bindings) self.assertIn(\"config.location10\", bindings) self.assertIn(\"config.location11\", bindings) self.assertIn(\"config.location12\", bindings) self.assertIn(\"config.location13\", bindings) self.assertIn(\"config.location14\", bindings) self.assertIn(\"config", + "exact_match": false, + "code_bleu": 0.19820118583378682, + "edit_similarity": 0.72 + }, + { + "repo": "MasoniteFramework/masonite", + "expected": "\"value\")", + "got": "\"value\")", + "got_raw": "\"value\") self.assertEqual(bag.get(\"test\"), 1) self.assertEqual(bag.get(\"test\", 2), 2) self.assertEqual(bag.get(\"test\", 3), 3) self.assertEqual(bag.get(\"test\", 4), 4) self.assertEqual(bag.get(\"test\", 5), 5) self.assertEqual(bag.get(\"test\", 6), 6) self.assertEqual(bag.get(\"test\", 7), 7) self.assertEqual(bag.get(\"test\", 8), 8) self.assertEqual(bag.get(\"test\", 9), 9) self.assertEqual(b", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MasoniteFramework/masonite", + "expected": "user.notifications.count())", + "got": "len(user.get_notifications()))", + "got_raw": "len(user.get_notifications()))\n\n user.notify(DatabaseNotification(\"test\"))\n user.notify(DatabaseNotification(\"test2\"))\n\n self.assertEqual(2, len(user.get_notifications()))", + "exact_match": false, + "code_bleu": 0.31239399369202553, + "edit_similarity": 0.7368421052631579 + }, + { + "repo": "MasoniteFramework/masonite", + "expected": "\"2\")", + "got": "\"2\")", + "got_raw": "\"2\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MasoniteFramework/masonite", + "expected": "count + 1", + "got": "count + 1", + "got_raw": "count + 1\n\n def test_send_to_notifiable_with_data(self):\n user = User.find(1)\n count = user.notifications.count()\n user.notify(WelcomeNotification(), {\"name\": \"John\"})\n\n assert user.notifications.count() == count + 1\n\n def test_send_to_notifiable_with_data_and_channel(self):\n user = User.find(1)\n count = user.notifications.count()\n user.notify(WelcomeNotification(), {\"name\": \"John\"}, \"test\")\n\n assert user.notifications.count() == count + 1\n\n def test_send_to_notifiable_with_data_and_channel", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MasoniteFramework/masonite", + "expected": "\"c\")", + "got": "\"c\")", + "got_raw": "\"c\") self.assertEqual(data_get(struct, \"a.nested.a\"), 1) self.assertEqual(data_get(struct, \"a.nested.a.b\"), None) self.assertEqual(data_get(struct, \"a.nested.a.b.c\"), None) self.assertEqual(data_get(struct, \"a.nested.a.b.c.d\"), None) self.assertEqual(data_get(struct, \"a.nested.a.b.c.d.e\"), None) self.assertEqual(data_get(struct, \"a.nested.a.b.c.d.e.f\"), None) self.assertEqual(data_get(struct, \"a.nested.a.b.c.d.e.f.g\"), None) self.assertEqual(data_get(struct,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MasoniteFramework/masonite", + "expected": "None)", + "got": "None)", + "got_raw": "None) self.assertEqual(data_get(struct, \"a.nested.unknown\", \"default\"), \"default\") self.assertEqual(data_get(struct, \"a.nested.unknown\", \"default\", \"default2\"), \"default2\") self.assertEqual(data_get(struct, \"a.nested.unknown\", \"default\", \"default2\", \"default3\"), \"default3\") self.assertEqual(data_get(struct, \"a.nested.unknown\", \"default\", \"default2\", \"default3\", \"default4\"), \"default4\") self.assertEqual(data_get(struct, \"a.nested.unknown\", \"default\", \"default2\", \"default3\", \"default4\",", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MasoniteFramework/masonite", + "expected": "self.errors.messages())", + "got": "self.errors.get(\"email\"))", + "got_raw": "self.errors.get(\"email\")) self.assertIn(\"email must be a valid email\", self.errors.get(\"email\")) self.assertEqual(2, len(self.errors.get(\"email\"))) self.assertIn(\"email is required\", self.errors.get(\"email\")) self.assertIn(\"email must be a valid email\", self.errors.get(\"email\")) self.assertEqual(2, len(self.errors.get(\"email\"))) self.assertIn(\"email is required\", self.errors.get(\"email\")) self.assertIn(\"email must be a valid email\", self.errors.get(\"email\")) self.assertEqual(2, len(self.errors.get(\"email\"))) self.assertIn(\"email is required\", self.errors.get(\"email", + "exact_match": false, + "code_bleu": 0.4671379777282001, + "edit_similarity": 0.7083333333333334 + }, + { + "repo": "MasoniteFramework/masonite", + "expected": "\"arg2\")", + "got": "\"arg2\")", + "got_raw": "\"arg2\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MasoniteFramework/masonite", + "expected": "validate.get(\"age\"))", + "got": "validate.errors())", + "got_raw": "validate.errors()) == { \"username\": [\"Custom Message for required Username.\"], \"not_email\": [\"Custom Message for Email not being an email.\"], \"valid_email\": [\"Custom Message for required Email.\", \"Custom Message for Email being a valid email.\"], \"age\": [\"Custom: Age must not be in 20, 21 and must not be numeric.\"], })", + "exact_match": false, + "code_bleu": 0.32794537853815264, + "edit_similarity": 0.6842105263157895 + }, + { + "repo": "MasoniteFramework/masonite", + "expected": "parse_human_time(\"2 hour\"))", + "got": "parse_human_time(\"1 hour\")) self.assertEqual( parse_human_time(\"1 day\")", + "got_raw": "parse_human_time(\"1 hour\")) self.assertEqual( parse_human_time(\"1 day\"), pendulum.datetime(2021, 1, 2) ) self.assertEqual( parse_human_time(\"1 week\"), pendulum.datetime(2021, 1, 8) ) self.assertEqual( parse_human_time(\"1 month\"), pendulum.datetime(2021, 2, 1) ) self.assertEqual( parse_human_time(\"1 year\"), pendulum.datetime(2022, 1, 1) ) self.assertEqual( parse_human_time(\"10 years\"), pendulum.datetime(20", + "exact_match": false, + "code_bleu": 0.15807437922444714, + "edit_similarity": 0.5306122448979592 + }, + { + "repo": "MasoniteFramework/masonite", + "expected": "SayHello)", + "got": "SayHello)", + "got_raw": "SayHello) # Second pass - in container # This should be the same instance as the first pass say_hello = self.application.make(SayHello) self.assertEqual(say_hello, say_hello) # Third pass - in container again # This should be the same instance as the second pass say_hello = self.application.make(SayHello) self.assertEqual(say_hello, say_hello) # Fourth pass - in container again # This should be the same instance as the third pass say_hello = self.application.make(SayHello) self.assertEqual(say_hello, say_hello) # Fifth pass - in container again # This should be the same instance as", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MasoniteFramework/masonite", + "expected": "request.accepts_json())", + "got": "request.json())", + "got_raw": "request.json())", + "exact_match": false, + "code_bleu": 0.488923022434901, + "edit_similarity": 0.7894736842105263 + }, + { + "repo": "MasoniteFramework/masonite", + "expected": "value", + "got": "value", + "got_raw": "value if value else True if isinstance(data_at_path, bool) else data_at_path is not None else True if isinstance(data_at_path, list) else data_at_path == value if value else True if isinstance(data_at_path, dict) else data_at_path == value if value else True if isinstance(data_at_path, str) else data_at_path == value if value else True if isinstance(data_at_path, int) else data_at_path == value if value else True if isinstance(data_at_path, float) else data_at_path == value if value else True if isinstance(data_at_path, tuple) else data_at_path == value if value", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MasoniteFramework/masonite", + "expected": "\"\")", + "got": "\"\")", + "got_raw": "\"\") self.assertConsoleOutputContains(\"ERROR\") return self\n\n def assertConsoleHasOutput(self) -> \"TestCase\": \"\"\"Assert that something has been output to console standard output.\"\"\" self._readConsoleOutput() self.assertNotEqual(self._console_out, \"\") return self\n\n def assertConsoleHasErrorsOrOutput(self) -> \"TestCase\": \"\"\"Assert that something has been output to console standard error or standard output.\"\"\" self._readConsoleOutput() self.assertNotEqual(self._console_err, \"\") or self.assertNotEqual(self._console_out, \"\") return self\n\n def assertConsoleHasErrorsOrOutput(self) -> \"TestCase\": \"\"\"Assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MasoniteFramework/masonite", + "expected": "2", + "got": "2.000000000000000434883756638804112333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333", + "got_raw": "2.000000000000000434883756638804112333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "MaxHalford/prince", + "expected": "[ \"alcohol_by_volume\", \"final_gravity\", \"international_bitterness_units\", \"standard_reference_method\", ]", + "got": "sorted(self.sup_cols) + [self._col_name] + [self._row_name] + [self._col_name + \"_2\"] + [self._col_name + \"_3\"] + [self._col_name + \"_4\"] + [self._col_name + \"_5\"] + [self._col_name + \"_6\"] + [self._col_name + \"_7\"] + [self._col_name + \"_8\"] + [self._col_name + \"_9\"] + [self._col_name + \"_10\"] + [self._col_name + \"_11\"] + [self._col_name +", + "got_raw": "sorted(self.sup_cols) + [self._col_name] + [self._row_name] + [self._col_name + \"_2\"] + [self._col_name + \"_3\"] + [self._col_name + \"_4\"] + [self._col_name + \"_5\"] + [self._col_name + \"_6\"] + [self._col_name + \"_7\"] + [self._col_name + \"_8\"] + [self._col_name + \"_9\"] + [self._col_name + \"_10\"] + [self._col_name + \"_11\"] + [self._col_name +", + "exact_match": false, + "code_bleu": 0.012716432928643011, + "edit_similarity": 0.04943820224719101 + }, + { + "repo": "MaxHalford/prince", + "expected": "aligned_shapes.shape)", + "got": "aligned_shapes.shape)", + "got_raw": "aligned_shapes.shape)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MaxHalford/prince", + "expected": "P * 100)", + "got": "P)", + "got_raw": "P)", + "exact_match": false, + "code_bleu": 0.29730177875068026, + "edit_similarity": 0.4 + }, + { + "repo": "MaxHalford/prince", + "expected": "P * 100)", + "got": "P) / 100.0) * 100.0) * 100.0) * 100.0) * 100.0) * 100.0) * 100.0) * 100.0) * 100.0) * 100.0) * 100.0) * 100.0) * 100.0) * 100.0) * 100.0) * 100.", + "got_raw": "P) / 100.0) * 100.0) * 100.0) * 100.0) * 100.0) * 100.0) * 100.0) * 100.0) * 100.0) * 100.0) * 100.0) * 100.0) * 100.0) * 100.0) * 100.0) * 100.", + "exact_match": false, + "code_bleu": 0.02916679457816503, + "edit_similarity": 0.10526315789473684 + }, + { + "repo": "MaxHalford/prince", + "expected": "np.abs(P))", + "got": "np.abs(P))", + "got_raw": "np.abs(P))\n\n def test_svd_V(self):\n F = load_df_from_R(\"ca$svd$V\").to_numpy()\n P = sparse.diags(self.ca.col_masses_.to_numpy() ** -0.5) @ self.ca.svd_.V\n\n np.testing.assert_allclose(np.abs(F), np.abs(P))\n\n def test_svd_UV(self):\n F = load_df_from_R(\"ca$svd$UV\").to_numpy()\n P = self.ca.svd_.UV\n\n np.testing.assert_allclose(np.abs(F), np.abs(P))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Mayitzin/ahrs", + "expected": "0.1)", + "got": "1.0)", + "got_raw": "1.0)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "Mayitzin/ahrs", + "expected": "0.0)", + "got": "0.0)", + "got_raw": "0.0) self.assertEqual(self.q0.y, 0.0) self.assertEqual(self.q0.z, 0.0) self.assertEqual(self.q0.to_array(), [1.0]) self.assertEqual(self.q0.to_list(), [1.0]) self.assertEqual(self.q0.to_string(), \"1\") self.assertEqual(self.q0.to_dict(), {\"w\": 1.0}) self.assertEqual(self.q0.to_json(), \"1\") self.assertEqual(self.q0.to_numpy(), np.array([1.0])) self.assertEqual(self.q0.to_tuple(), (1.0,)) self.assertEqual(self.q0.to_complex", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Mayitzin/ahrs", + "expected": "1.0)", + "got": "1)", + "got_raw": "1) # SO(3) is a subgroup of O(3) self.R0.to_matrix() @ self.R0.to_matrix().T == np.eye(3) # SO(3) is a subgroup of O(3) self.R.to_matrix() @ self.R.to_matrix().T == np.eye(3) # SO(3) is a subgroup of O(3) self.R1.to_matrix() @ self.R1.to_matrix().T == np.eye(3) # SO(3) is a subgroup of O(3) self.multi_R.to_matrix() @ self.multi_R.to_matrix().T == np", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "Mayitzin/ahrs", + "expected": "self.q4.w)", + "got": "self.q4[0])", + "got_raw": "self.q4[0]) self.assertAlmostEqual(qc[1], -self.q4[1]) self.assertAlmostEqual(qc[2], -self.q4[2]) self.assertAlmostEqual(qc[3], -self.q4[3]) self.assertAlmostEqual(qc.norm, self.q4.norm) self.assertAlmostEqual(qc.norm2, self.q4.norm2) self.assertAlmostEqual(qc.norm3, self.q4.norm3) self.assertAlmostEqual(qc.norm4, self.q4.norm4) self.assertAlmostEqual(qc.norm5, self.q4.norm5) self.assertAlmostEqual(qc.norm6, self.q4.norm6) self.assertAlmostEqual(qc", + "exact_match": false, + "code_bleu": 0.3655552228545123, + "edit_similarity": 0.7619047619047619 + }, + { + "repo": "Mayitzin/ahrs", + "expected": "3.0)", + "got": "2.0)", + "got_raw": "2.0) self.assertEqual(circle.min(), 0.0) self.assertEqual(circle.center(), [1, 1]) self.assertEqual(circle.radius(), 2.0) self.assertEqual(circle.width(), 2.0) self.assertEqual(circle.height(), 0.0) self.assertEqual(circle.area(), 12.566370614359172) self.assertEqual(circle.perimeter(), 12.566370614359172) self.assertEqual(circle.center_x(), 1.0) self.assertEqual(circle.center_y(), 1.0)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.75 + }, + { + "repo": "MerrimanInd/drawpyo", + "expected": "\"important\"", + "got": "\"important\"", + "got_raw": "\"important\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MerrimanInd/drawpyo", + "expected": "l", + "got": "l.tree_children[0]", + "got_raw": "l.tree_children[0] assert parent.tree_children[1] is r.tree_children[0] assert l.tree_children[0] is r.tree_children[0] assert l.tree_children[1] is None assert r.tree_children[0] is None assert r.tree_children[1] is None assert l.tree_children[2] is None assert r.tree_children[2] is None assert l.tree_children[3] is None assert r.tree_children[3] is None assert l.tree_children[4] is None assert r.tree_children[4] is None assert l.tree_children[5] is None assert r.tree_children", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.10526315789473684 + }, + { + "repo": "MerrimanInd/drawpyo", + "expected": "None", + "got": "None", + "got_raw": "None assert scheme.stroke_color is None assert scheme.font_color is None scheme = ColorScheme(fill_color=\"red\", stroke_color=\"blue\", font_color=\"green\") assert scheme.fill_color == \"red\" assert scheme.stroke_color == \"blue\" assert scheme.font_color == \"green\" scheme = ColorScheme(fill_color=StandardColor.RED, stroke_color=StandardColor.BLUE, font_color=StandardColor.GREEN) assert scheme.fill_color == StandardColor.RED assert scheme.stroke_color == StandardColor.BLUE assert scheme.font_color == StandardColor.GREEN scheme = ColorScheme(fill_color=\"red\", stroke_color=\"blue\", font_color=\"green\") assert scheme.fill_color", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MerrimanInd/drawpyo", + "expected": "p1", + "got": "p1", + "got_raw": "p1 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MerrimanInd/drawpyo", + "expected": "(30, 40)", + "got": "(30, 40)", + "got_raw": "(30, 40)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MerrimanInd/drawpyo", + "expected": "20", + "got": "20", + "got_raw": "20 # 20 slices in the chart\n\n assert chart.get_total() == 200 # Total value of all slices\n\n assert chart.get_color_scheme() == ColorScheme( # Default color scheme for the chart\n [StandardColor.BLUE, StandardColor.GREEN, StandardColor.RED] # Colors for slices\n ) # Default color scheme for the chart\n\n assert chart.get_text_format() == TextFormat( # Default text format for the chart\n font=\"Arial\", # Default font for text\n size=12, # Default font size for text\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MerrimanInd/drawpyo", + "expected": "obj_style", + "got": "obj_style", + "got_raw": "obj_style and obj_style[\"fillColor\"] == \"#FF0000\" assert \"strokeColor\" in obj_style and obj_style[\"strokeColor\"] == \"#000000\" # Check that the template styles have been copied as well assert \"fillColor\" in template1.style and template1.style[\"fillColor\"] == \"#FF0000\" assert \"strokeColor\" in template1.style and template1.style[\"strokeColor\"] == \"#000000\" # Check that the template styles have been copied to the second template assert \"fillColor\" in template2.style and template2", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MerrimanInd/drawpyo", + "expected": "5", + "got": "3", + "got_raw": "3 # Three nodes: A, B, and C assert diagram.objects[0].name == \"A\" assert diagram.objects[1].name == \"B\" assert diagram.objects[2].name == \"C\" assert diagram.objects[0].children == [diagram.objects[1], diagram.objects[2]] assert diagram.objects[1].children == [diagram.objects[0]] assert diagram.objects[2].children == [diagram.objects[0]] assert diagram.objects[1].parent is None assert diagram.objects[2].parent is None assert diagram.objects[0].", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "MerrimanInd/drawpyo", + "expected": "50", + "got": "50", + "got_raw": "50 / 100.0 # 50% opacity # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MerrimanInd/drawpyo", + "expected": "TypeError)", + "got": "TypeError)", + "got_raw": "TypeError) as excinfo: ColorScheme._is_valid_hex(value) assert str(excinfo.value) == \"Expected str, received int instead\" def test_is_valid_hex_raises_for_invalid_hex(self): with pytest.raises(ValueError) as excinfo: ColorScheme._is_valid_hex(\"#1234567\") assert str(excinfo.value) == \"Invalid hex color code: #1234567\" def test_is_valid_hex_raises_for_invalid_hex_with_alpha(self): with pytest.raises(ValueError) as excinfo: ColorScheme._is_valid_hex(\"#12345678\") assert str(excinfo", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MerrimanInd/drawpyo", + "expected": "oy + 30", + "got": "oy + 30 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 1", + "got_raw": "oy + 30 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 1", + "exact_match": false, + "code_bleu": 0.034320875395309584, + "edit_similarity": 0.08333333333333333 + }, + { + "repo": "MerrimanInd/drawpyo", + "expected": "200", + "got": "200", + "got_raw": "200 assert geom.width == 150 assert geom.height == 100 def test_geometry_init_defaults(self) -> None: \"\"\"Checks whether a Geometry is initialized with default values\"\"\" geom = drawpyo.diagram.Geometry() assert geom.x == 0 assert geom.y == 0 assert geom.width == 100 assert geom.height == 100 def test_geometry_init_invalid_values(self) -> None: \"\"\"Checks whether an error is raised for invalid values\"\"\" with pytest.raises(ValueError) as excinfo: geom = drawpyo.diagram.Geometry(x=-10, y=200, width", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MerrimanInd/drawpyo", + "expected": "3", + "got": "3.0000000000000004", + "got_raw": "3.0000000000000004 # 3.0000000000000004 is the default value for strokeWidth in Edge\"\"\" edge.strokeWidth = 2.5 edge.strokeWidth == 2.5 \"\"\" edge.strokeWidth = 1.5 edge.strokeWidth == 1.5 \"\"\" edge.strokeWidth = 0.5 edge.strokeWidth == 0.5 \"\"\" edge.strokeWidth = 0.0 edge.strokeWidth == 0.0 \"\"\" edge.strokeWidth = -1.0 edge.strokeWidth ==", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.10526315789473684 + }, + { + "repo": "MerrimanInd/drawpyo", + "expected": "\"Hell0_w0rld\"", + "got": "\"Hello0World\"", + "got_raw": "\"Hello0World\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.7692307692307693 + }, + { + "repo": "MerrimanInd/drawpyo", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as excinfo: Legend({}) # type: ignore assert str(excinfo.value) == \"Mapping must not be empty\" # type: ignore assert str(Legend({\"Alpha\": \"#ff0000\"})) == \"Legend: {'Alpha': '#ff0000'}\" # type: ignore assert str(Legend({\"Alpha\": \"#ff0000\", \"Beta\": \"#00ff00\"})) == \"Legend: {'Alpha': '#ff0000', 'Beta': '#00ff00'}\" # type: ignore ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MerrimanInd/drawpyo", + "expected": "20", + "got": "20.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "20.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.03076923076923077 + }, + { + "repo": "MinishLab/model2vec", + "expected": "v", + "got": "v", + "got_raw": "v", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MinishLab/model2vec", + "expected": "(2, 2)", + "got": "(2, 2)", + "got_raw": "(2, 2) # 2 sentences, 2 tokens each # 2 * 2 = 4 dimensions # 2 * 2 = 4 dimensions # 2 * 2 = 4 dimensions # 2 * 2 = 4 dimensions # 2 * 2 = 4 dimensions # 2 * 2 = 4 dimensions # 2 * 2 = 4 dimensions # 2 * 2 = 4 dimensions # 2 * 2 = 4 dimensions # 2 * 2 = 4 dimensions #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MinishLab/model2vec", + "expected": "[1]", + "got": "[1]", + "got_raw": "[1] * 200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MinishLab/model2vec", + "expected": "(2,)", + "got": "(2,", + "got_raw": "(2, 10) # 2 sentences, 10 dimensions # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E50", + "exact_match": false, + "code_bleu": 0.6306723114402859, + "edit_similarity": 0.8571428571428571 + }, + { + "repo": "MinishLab/model2vec", + "expected": "static_model2.base_model_name", + "got": "static_model2.base_model_name", + "got_raw": "static_model2.base_model_name == \"tests/data/test_tokenizer\" assert static_model.tokenizer_name == static_model2.tokenizer_name == \"bert-base-uncased\" assert static_model.config[\"vocab_size\"] == static_model2.config[\"vocab_size\"] == 25000 assert static_model.config[\"pca_dims\"] == static_model2.config[\"pca_dims\"] == 256 assert static_model.config[\"sif_coefficient\"] == static_model2.config[\"sif_coefficient\"] == 1e-4 assert static_model.config[\"token_remove_pattern\"] == static_model2.config[\"token_remove_pattern", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MinishLab/model2vec", + "expected": "15_000", + "got": "len(sentences)", + "got_raw": "len(sentences) * 2 + 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.3021375397356768, + "edit_similarity": 0.0 + }, + { + "repo": "MinishLab/model2vec", + "expected": "expected_vocab_size", + "got": "expected_vocab_size", + "got_raw": "expected_vocab_size - 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MinishLab/semhash", + "expected": "selected", + "got": "selected.copy()", + "got_raw": "selected.copy() # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type:", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6956521739130435 + }, + { + "repo": "MinishLab/semhash", + "expected": "0.2", + "got": "0.5", + "got_raw": "0.5 / 3.0 * 100.0 + 0.2 / 3.0 * 100.0 + 0.1 / 3.0 * 100.0 + 0.0 / 3.0 * 100.0 + 0.0 / 3.0 * 100.0 + 0.0 / 3.0 * 100.0 + 0.0 / 3.0 * 100.0 + 0.0 / 3.0 *", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "MinishLab/semhash", + "expected": "None", + "got": "None", + "got_raw": "None\n\n # Slow path: lists and dicts\n assert make_hashable([1, 2, 3]) == [1, 2, 3]\n assert make_hashable({\"a\": 1, \"b\": 2}) == {\"a\": 1, \"b\": 2}\n\n # Custom objects\n class CustomObject:\n def __init__(self, value):\n self.value = value\n\n def __hash__(self):\n return hash(self.value)\n\n def __eq__(self, other):\n return self.value == other.value\n\n obj1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MinishLab/semhash", + "expected": "0.4", + "got": "0.8", + "got_raw": "0.8 / 3.0 * 100.0 - 100.0 + 100.0 / 2.0 * 100.0 - 100.0 / 3.0 * 100.0 + 100.0 / 3.0 * 100.0 - 100.0 / 2.0 * 100.0 + 100.0 / 2.0 * 100.0 - 100.0 / 3.", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "MolecularAI/aizynthfinder", + "expected": "mol2", + "got": "mol1", + "got_raw": "mol1 # noqa: E711 # type: ignore assert mol1 != mol2 assert mol2 != mol1 assert mol1 != \"CCCCO\" assert mol1 != 1234567890 assert mol1 != [] assert mol1 != {} assert mol1 != () assert mol1 != set() assert mol1 != Chem.MolFromSmiles(\"CCCCO\") assert mol1 != Chem.MolFromSmiles(\"OCCCC\") assert mol1 != Chem.MolFromSmiles(\"OCC\") assert mol1", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.75 + }, + { + "repo": "MolecularAI/aizynthfinder", + "expected": "1", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "MolecularAI/aizynthfinder", + "expected": "2", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "MolecularAI/aizynthfinder", + "expected": "4", + "got": "1", + "got_raw": "1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "MolecularAI/aizynthfinder", + "expected": "1", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "MolecularAI/aizynthfinder", + "expected": "scorer(mol), abs=1e-3)", + "got": "scorer.score(mol)) == 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "scorer.score(mol)) == 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.24532304242568267, + "edit_similarity": 0.14634146341463414 + }, + { + "repo": "MolecularAI/aizynthfinder", + "expected": "BIG_INT - 1", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.16666666666666666, + "edit_similarity": 0.0 + }, + { + "repo": "MolecularAI/aizynthfinder", + "expected": "[\"C\"]", + "got": "[\"C\"]", + "got_raw": "[\"C\"] assert config.stock.stop_criteria[\"price\"] == 100 assert config.stock.stop_criteria[\"counts\"][\"C\"] == 10\n\n\ndef test_load_stop_criteria_invalid_key(write_yaml):\n filename = write_yaml({\"stock\": {\"stop_criteria\": {\"price\": 100}}})\n\n config = Configuration.from_file(filename)\n set_keys = [key for key, item in config.stock.stop_criteria.items() if item]\n assert set_keys == [\"price\"] assert config.stock.stop_criteria[\"price\"] == 100\n\n\ndef test_load_stop_criteria_invalid_value(write_yaml):\n ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MolecularAI/aizynthfinder", + "expected": "\"CCO\"", + "got": "\"CCO\"", + "got_raw": "\"CCO\" deserializer[234].parent == 123 deserializer[234].transform == 2 deserializer[234].children == [] deserializer[123].children == [234]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MolecularAI/aizynthfinder", + "expected": "reaction.mol.smiles", + "got": "reaction.mol.smiles", + "got_raw": "reaction.mol.smiles + \"1\" + reaction.mol.smiles[::-1] + \"2\" + reaction.mol.smiles[::-1] + \"3\" + reaction.mol.smiles[::-1] + \"4\" + reaction.mol.smiles[::-1] + \"5\" + reaction.mol.smiles[::-1] + \"6\" + reaction.mol.smiles[::-1] + \"7\" + reaction.mol.smiles[::-1] + \"8\" + reaction.mol.smiles[::-1] + \"9\" + reaction.mol.smiles[::-1] + \"10\" +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MolecularAI/aizynthfinder", + "expected": "0", + "got": "1.0000000000000002e-05", + "got_raw": "1.0000000000000002e-05 * 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.08695652173913043 + }, + { + "repo": "MolecularAI/aizynthfinder", + "expected": "StopIteration)", + "got": "StopIteration)", + "got_raw": "StopIteration) as e: tree.one_iteration() assert str(e.value) == \"No more nodes to expand\" assert len(tree.mol_nodes) == 10 + len(grandchild_smi) + len(grandchild_smi) - 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MolecularAI/aizynthfinder", + "expected": "[id(mol1), id_]", + "got": "[id_] + list(serializer.store[mol1].children.keys()) + [id_ + 1] + [id_ + 2] + [id_ + 3] + [id_ + 4] + [id_ + 5] + [id_ + 6] + [id_ + 7] + [id_ + 8] + [id_ + 9] + [id_ + 10] + [id_ + 11] + [id_ + 12] + [id_ + 13] + [id_ + 1", + "got_raw": "[id_] + list(serializer.store[mol1].children.keys()) + [id_ + 1] + [id_ + 2] + [id_ + 3] + [id_ + 4] + [id_ + 5] + [id_ + 6] + [id_ + 7] + [id_ + 8] + [id_ + 9] + [id_ + 10] + [id_ + 11] + [id_ + 12] + [id_ + 13] + [id_ + 1", + "exact_match": false, + "code_bleu": 0.01905865797688043, + "edit_similarity": 0.04201680672268908 + }, + { + "repo": "MolecularAI/aizynthfinder", + "expected": "lines", + "got": "lines.strip()", + "got_raw": "lines.strip() # noqa: E501\n\n\ndef test_app_main_with_output(mocker, tmpdir, add_cli_arguments):\n output_name = str(tmpdir / \"temp.ipynb\")\n mkstemp_patch = mocker.patch(\"aizynthfinder.interfaces.aizynthapp.tempfile.mkstemp\")\n mkstemp_patch.return_value = \"dummy\", output_name\n popen_patch = mocker.patch(\"aizynthfinder.interfaces.aizynthapp.subprocess.Popen\")\n add_cli_arguments(\"--config config_local.yml\", \"--output\", output_name)\n\n app_main()\n\n popen", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5555555555555556 + }, + { + "repo": "MolecularAI/aizynthfinder", + "expected": "mol1.smiles", + "got": "mol1.smiles", + "got_raw": "mol1.smiles", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MolecularAI/aizynthfinder", + "expected": "2", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "MolecularAI/aizynthfinder", + "expected": "priors2", + "got": "priors2", + "got_raw": "priors2 == pytest.approx([0.5])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MolecularAI/aizynthfinder", + "expected": "1", + "got": "12632242482424824824824824824824824824824824824824824824824824824824824824824824824824824824824824824824824824824824824824824824", + "got_raw": "12632242482424824824824824824824824824824824824824824824824824824824824824824824824824824824824824824824824824824824824824824824", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "MolecularAI/aizynthfinder", + "expected": "tree.root.mol", + "got": "tree.root.mol.molobj()", + "got_raw": "tree.root.mol.molobj()", + "exact_match": false, + "code_bleu": 0.5169731539571706, + "edit_similarity": 0.7428571428571429 + }, + { + "repo": "MolecularAI/aizynthfinder", + "expected": "1", + "got": "1", + "got_raw": "1 # root node only", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MongoEngine/mongoengine", + "expected": "4", + "got": "3", + "got_raw": "3 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "MongoEngine/mongoengine", + "expected": "PULL", + "got": "PULL", + "got_raw": "PULL + NULLIFY + \"vaccine_made\" + \"vaccine_made\" + \"vaccine_made\" + \"vaccine_made\" + \"vaccine_made\" + \"vaccine_made\" + \"vaccine_made\" + \"vaccine_made\" + \"vaccine_made\" + \"vaccine_made\" + \"vaccine_made\" + \"vaccine_made\" + \"vaccine_made\" + \"vaccine_made\" + \"vaccine_made\" + \"vaccine_made\" + \"vaccine_made\" + \"vaccine", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MongoEngine/mongoengine", + "expected": "0", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "MongoEngine/mongoengine", + "expected": "3", + "got": "2", + "got_raw": "2 p.reload() assert len(p._data) == 3 assert p.age == 1 p.reload(fields=[\"age\"]) assert p.age == 1 assert p.name is None p.reload(fields=[\"name\"]) assert p.name == \"\" p.reload(fields=[\"name\", \"age\"]) assert p.name == \"\" and p.age == 1 p.reload(fields=[\"age\"]) assert p.age == 1 and p.name is None p.reload(fields=[\"name\"]) assert p.name == \"\" and p.age == 1 p.reload(fields=[\"name\", \"age\"]) assert p.name == \"\" and p.age == 1 p.reload(fields=[\"name\", \"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "MongoEngine/mongoengine", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MongoEngine/mongoengine", + "expected": "None", + "got": "None", + "got_raw": "None\n\n city.save()\n assert city.pk is not None\n\n def test_abstract_document_creation_fails(self):\n class City(Document):\n continent = StringField()\n meta = {\"abstract\": True, \"allow_inheritance\": True}\n\n with self.assertRaises(TypeError) as context:\n City(continent=\"asia\")\n\n self.assertEqual(\n str(context.exception), \"Cannot create an instance of an abstract document\"\n )\n\n def test_abstract_document_creation_fails_with_invalid_meta(self):\n class City(Document):\n continent = StringField()\n meta = {\"abstract\": True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MongoEngine/mongoengine", + "expected": "\"1\"", + "got": "\"1\"", + "got_raw": "\"1\" assert doc.embedded_field.list_field[1] == 2 assert doc.embedded_field.list_field[2].__class__ == Embedded assert doc.embedded_field.list_field[2].string_field == \"hello\" assert doc.embedded_field.list_field[2].int_field == 1 assert doc.embedded_field.list_field[2].dict_field == {\"hello\": \"world\"} assert doc.embedded_field.list_field[2].list_field == [\"1\", 2, {\"hello\": \"world\"}]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MongoEngine/mongoengine", + "expected": "Color.RED", + "got": "Color.BLUE.value", + "got_raw": "Color.BLUE.value + 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.56 + }, + { + "repo": "MongoEngine/mongoengine", + "expected": "d2.date()", + "got": "d2.date()", + "got_raw": "d2.date() + datetime.timedelta(microseconds=999) - datetime.timedelta(microseconds=1) - datetime.timedelta(days=1) - datetime.timedelta(hours=1) - datetime.timedelta(minutes=1) - datetime.timedelta(seconds=1) - datetime.timedelta(microseconds=1) - datetime.timedelta(microseconds=999) - datetime.timedelta(microseconds=1) - datetime.timedelta(microseconds=1) - datetime.timedelta(microseconds=1) - datetime.timedelta(microseconds=1) - datetime.timedelta(microseconds=1) - datetime.timedelta(microseconds=1) - datetime", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MongoEngine/mongoengine", + "expected": "p.age", + "got": "p.age", + "got_raw": "p.age", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MongoEngine/mongoengine", + "expected": "2", + "got": "2", + "got_raw": "2", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MongoEngine/mongoengine", + "expected": "1", + "got": "1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "MongoEngine/mongoengine", + "expected": "[Human]", + "got": "[Human]", + "got_raw": "[Human]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MongoEngine/mongoengine", + "expected": "1", + "got": "1.000000000000000250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "1.000000000000000250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "MongoEngine/mongoengine", + "expected": "\"@\"", + "got": "\"user\"", + "got_raw": "\"user\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4444444444444444 + }, + { + "repo": "MongoEngine/mongoengine", + "expected": "2", + "got": "0", + "got_raw": "0", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "MongoEngine/mongoengine", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MongoEngine/mongoengine", + "expected": "doc2", + "got": "doc1", + "got_raw": "doc1", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.75 + }, + { + "repo": "MongoEngine/mongoengine", + "expected": "\"me\"", + "got": "\"me\"", + "got_raw": "\"me\" assert obj.to == \"you\" assert obj.subject == \"From Russia with Love\" assert obj.body == \"\" assert obj.content_type == \"text/plain\" assert obj.attachments == []", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MongoEngine/mongoengine", + "expected": "s2", + "got": "s2.pk", + "got_raw": "s2.pk == p3.pk == s2.pk == p3.pk == s2.pk == p3.pk == s2.pk == p3.pk == s2.pk == p3.pk == s2.pk == p3.pk == s2.pk == p3.pk == s2.pk == p3.pk == s2.pk == p3.pk == s2.pk == p3.pk == s2.pk == p3.pk == s2.pk == p3.pk == s2.pk == p3.pk == s2.pk == p3.pk == s2.pk == p3.pk == s2.pk == p3.pk ==", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.5714285714285714 + }, + { + "repo": "MultimediaTechLab/YOLO", + "expected": "list(expected_paths)", + "got": "expected_paths", + "got_raw": "expected_paths * 2 # Repeat for both batches", + "exact_match": false, + "code_bleu": 0.14865088937534013, + "edit_similarity": 0.8235294117647058 + }, + { + "repo": "MultimediaTechLab/YOLO", + "expected": "(2, 5)", + "got": "(2, 3) assert image_paths[0] == \"data/images/000000000000.jpg\" assert image_paths[1] == \"data/images/000000000001.jpg\" def test_stream_data_loader_correctness(stream_dataloader: DataLoader): \"\"\"Test that the stream data loader produces correctly shaped data and metadata.\"\"\" batch_size, images, _, reverse_tensors, image_paths = next(iter(stream_dataloader)) assert batch_size == 1 assert images.shape == (1, 3, 640, 640) assert", + "got_raw": "(2, 3) assert image_paths[0] == \"data/images/000000000000.jpg\" assert image_paths[1] == \"data/images/000000000001.jpg\" def test_stream_data_loader_correctness(stream_dataloader: DataLoader): \"\"\"Test that the stream data loader produces correctly shaped data and metadata.\"\"\" batch_size, images, _, reverse_tensors, image_paths = next(iter(stream_dataloader)) assert batch_size == 1 assert images.shape == (1, 3, 640, 640) assert", + "exact_match": false, + "code_bleu": 0.033678420539594356, + "edit_similarity": 0.02304147465437788 + }, + { + "repo": "MultimediaTechLab/YOLO", + "expected": "l_images.shape", + "got": "l_images.shape", + "got_raw": "l_images.shape == (2, 3, 640, 640) assert m_reverse_tensors.shape == l_reverse_tensors.shape == (2, 3) assert m_image_paths == l_image_paths == [\"test.jpg\", \"test.jpg\"] assert m_images[0].shape == l_images[0].shape == (3, 640, 640) assert m_images[1].shape == l_images[1].shape == (3, 640, 640) assert m_reverse_tensors[0].shape == l_reverse_tensors[0].shape == (", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MultimediaTechLab/YOLO", + "expected": "0", + "got": "0", + "got_raw": "0, \"Mosaic should have boxes\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MultimediaTechLab/YOLO", + "expected": "l_reverse_tensors.shape", + "got": "l_reverse_tensors.shape", + "got_raw": "l_reverse_tensors.shape * 2 + (2,) * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "MultimediaTechLab/YOLO", + "expected": "(1, OUT_CHANNELS, 64, 64)", + "got": "(1, OUT_CHANNELS, 64, 64)", + "got_raw": "(1, OUT_CHANNELS, 64, 64)\n\ndef test_pool():\n pool = Pool(STRIDE)\n x = torch.randn(1, 64, 64, 64)\n out = pool(x)\n\n assert out.shape == (1, 64, 32, 32)\n\ndef test_sppe():\n sppe = SPPELAN(STRIDE, NECK_CHANNELS)\n x = torch.randn(1, 64, 64, 64)\n out = sppe(x)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Neoteroi/BlackSheep", + "expected": "\"500-\"", + "got": "\"500-\"", + "got_raw": "\"500-\" # noqa: E501\n\n\ndef test_range_part_repr():\n part = RangePart(100, 200)\n assert repr(part) == \"100-200\" # noqa: E501\n\n\ndef test_range_part_str():\n part = RangePart(100, 200)\n assert str(part) == \"100-200\" # noqa: E501\n\n\ndef test_range_part_eq():\n part1 = RangePart(100, 200)\n ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Neoteroi/BlackSheep", + "expected": "3", + "got": "3", + "got_raw": "3\n\nassert cookie_headers[0] == b\"Hello=World;\" assert cookie_headers[1] == b\"Foo=foo;\" assert cookie_headers[2] == b\"Ufo=ufo;\"\n\n\ndef test_http_header_collection_add_many_with_same_key():\n headers = Headers()\n\n values = [\n (b\"Cookie\", b\"Hello=World;\"),\n (b\"Cookie\", b\"Foo=foo;\"),\n (b\"Cookie\", b\"Ufo=ufo;\"),\n ]\n\n headers.add_many(values)\n\n cookie_headers = headers[b\"cookie\"]\n\n assert cookie_headers\n\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Neoteroi/BlackSheep", + "expected": "0", + "got": "0", + "got_raw": "0 mocked_send.messages[0][\"type\"] == \"websocket.send\" mocked_send.messages[0][\"text\"] == \"Lorem ipsum dolor sit amet\" mocked_send.messages[0][\"bytes\"] is None mocked_send.messages[0][\"code\"] is None mocked_send.messages[0][\"headers\"] is None mocked_send.messages[0][\"subprotocol\"] is None mocked_send.messages[0][\"more\"] is False mocked_send.messages[0][\"more\"] is False mocked_send.messages[0][\"more\"] is False mocked_send.messages[0][\"more\"] is False mocked_send.messages[0][\"more\"] is False mocked_send.messages[0][\"more", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Neoteroi/BlackSheep", + "expected": "\"/\"", + "got": "\"/\"", + "got_raw": "\"/\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\" b\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Neoteroi/BlackSheep", + "expected": "\"a\"", + "got": "\"a\"", + "got_raw": "\"a\" assert binders[1].parameter_name == \"b\" assert binders[2].parameter_name == \"c\" assert binders[0].parameter_index == 0 assert binders[1].parameter_index == 1 assert binders[2].parameter_index == 2 assert binders[0].parameter_kind == Parameter.POSITIONAL_OR_KEYWORD assert binders[1].parameter_kind == Parameter.POSITIONAL_OR_KEYWORD assert binders[2].parameter_kind == Parameter.POSITIONAL_OR_KEYWORD assert binders[0].parameter_default is None assert binders[1].parameter_default is None assert binders[2].parameter", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Neoteroi/BlackSheep", + "expected": "parsed", + "got": "parsed", + "got_raw": "parsed", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Neoteroi/BlackSheep", + "expected": "None", + "got": "None", + "got_raw": "None response.status_code == 200\n\n\ndef test_get_file_content(client):\n response = client.get(\"/file\")\n assert response is not None response.status_code == 200 response.content_type == \"text/html; charset=utf-8\" assert_file_content_equals( response.body, b\"

File content

\" ) response.body is not None response.body is not None response.body is not None response.body is not None response.body is not None response.body is not None response.body is not None response.body is not None response.body is not None response.body is not None response.body is not", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Neoteroi/BlackSheep", + "expected": "utcnow()", + "got": "utcnow()", + "got_raw": "utcnow() + 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Neoteroi/BlackSheep", + "expected": "headers", + "got": "headers.keys()", + "got_raw": "headers.keys() and b\"hello\" in headers.values() and b\"hello\" in headers.headers() and b\"hello\" in headers.headers(b\"hello\") and b\"hello\" in headers.headers(b\"Hello\") and b\"hello\" in headers.headers(b\"HELLO\") and b\"hello\" in headers.headers(b\"hello\") and b\"hello\" in headers.headers(b\"Hello\") and b\"hello\" in headers.headers(b\"HELLO\") and b\"hello\" in headers.headers(b\"hello\") and b\"hello\" in headers.headers(b\"Hello\") and b\"hello\" in headers.headers(b", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "Neoteroi/BlackSheep", + "expected": "True", + "got": "True", + "got_raw": "True # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E71", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Neoteroi/BlackSheep", + "expected": "\"\"", + "got": "scope[\"root_path\"]", + "got_raw": "scope[\"root_path\"] + scope[\"path\"] + scope[\"query_string\"].decode() + scope[\"fragment\"] + scope[\"raw_path\"] + scope[\"raw_query\"] + scope[\"raw_fragment\"] + scope[\"raw_path\"] + scope[\"raw_query\"] + scope[\"raw_fragment\"] + scope[\"raw_path\"] + scope[\"raw_query\"] + scope[\"raw_fragment\"] + scope[\"raw_path\"] + scope[\"raw_query\"] + scope[\"raw_fragment\"] + scope[\"raw_path\"] + scope[\"raw_query\"] + scope[\"raw_fragment\"] + scope[\"raw_path\"] + scope[\"raw_query\"] + scope[\"", + "exact_match": false, + "code_bleu": 0.3021375397356768, + "edit_similarity": 0.2 + }, + { + "repo": "Neoteroi/BlackSheep", + "expected": "b\"true\"", + "got": "b\"true\"", + "got_raw": "b\"true\" # noqa: E501\n\n\nasync def test_client_session_middleware_can_modify_request():\n \"\"\"Test that middlewares can modify the request\"\"\"\n\n async def request_modifier_middleware(request, next_handler):\n request.headers.add(b\"X-Modified\", b\"true\")\n return await next_handler(request)\n\n async def mock_send_core(request):\n return Response(200)\n\n async with ClientSession(middlewares=[request_modifier_middleware]) as client:\n client._send_core = mock_send_core # type: ignore\n\n response = await client", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Neoteroi/BlackSheep", + "expected": "foo", + "got": "foo", + "got_raw": "foo, \"Attribute foo is not defined\" \"but it should be\" \"set to the value of foo\" \"passed to the test\" \"function\" \"via the request object\" \"created by the test\" \"function\" \"itself\" \"and the test function should\" \"set it to the value of foo\" \"passed to the test function\" \"via the request object\" \"created by the test function\" \"itself\" \"and the test function should\" \"return the value of foo\" \"passed to the test function\" \"via the request object\" \"created by the test function\" \"itself", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Neoteroi/BlackSheep", + "expected": "\"/app\"", + "got": "\"/app\"", + "got_raw": "\"/app\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" / \"\" /", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Neoteroi/BlackSheep", + "expected": "None", + "got": "None", + "got_raw": "None and isinstance(data, dict) and \"name\" in data and \"age\" in data and isinstance(data[\"name\"], str) and isinstance(data[\"age\"], int) and data[\"age\"] > 0, \"Invalid JSON data\"\n return jsonify(data), 200, {\"Content-Type\": \"application/json\"}\n\n@app.route(\"/echo-posted-form\", methods=[\"POST\"])\ndef post_form():\n data = request.form.to_dict()\n return jsonify(data), 200, {\"Content-Type\": \"application/x-www-form-urlencoded\"}\n\n@app.route(\"/echo-posted-json-or-form\",", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Neoteroi/BlackSheep", + "expected": "0", + "got": "0", + "got_raw": "0\n assert url.query == b\"foo=power&hello=world\"\n assert url.fragment is None\n assert url.raw_path == b\"/api/cat/001\"\n assert url.raw_query == b\"foo=power&hello=world\"\n assert url.raw_fragment is None\n assert url.scheme is None\n assert url.username is None\n assert url.password is None\n assert url.netloc is None\n assert url.hostname is None\n assert url.port is None\n assert url.query_string is None\n assert url.fragment_string is None\n assert url", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Neoteroi/BlackSheep", + "expected": "\"file1\"", + "got": "\"file1\"", + "got_raw": "\"file1\" assert parts[1][\"file_name\"] == \"document1.txt\" assert parts[1][\"content_type\"] == \"text/plain\" assert parts[2][\"name\"] == \"category\" assert parts[2][\"data\"] == b\"documents\" assert parts[3][\"name\"] == \"file2\" assert parts[3][\"file_name\"] == \"document2.txt\" assert parts[3][\"content_type\"] == \"text/plain\" assert parts[4][\"name\"] == \"file3\" assert parts[4][\"file_name\"] == \"document3.txt\" assert parts[4][\"content_type\"] ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Neoteroi/BlackSheep", + "expected": "2", + "got": "2", + "got_raw": "2\n assert ml[0] == middleware_b()\n assert ml[1] == middleware_a()\n\n def test_append(self):\n \"\"\"Test appending middleware\"\"\"\n ml = MiddlewareList()\n ml.append(middleware_a)\n ml.append(middleware_b)\n ml.append(middleware_c)\n ml.append(middleware_d)\n ml.append(middleware_e)\n\n assert len(ml) == 5\n assert ml[0] == middleware_a()\n assert ml[1] == middleware_b()\n assert ml[2] == middleware_c()\n assert ml", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Neoteroi/BlackSheep", + "expected": "None", + "got": "None", + "got_raw": "None and request.user is not Identity() and request.user.id is None and request.user.identity is None and request.user.groups is None and request.user.attributes is None and request.user.token is None and request.user.token_expires is None and request.user.token_secret is None and request.user.token_secret_expires is None and request.user.token_secret_key is None and request.user.token_secret_key_expires is None and request.user.token_secret_key_algorithm is None and request.user.token_secret_key_algorithm_expires is None and request.user.token_secret_key_algorithm_key is None and request.user.token_secret_key_algorithm_key_expires is None and request.user.token_secret_key", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Neoteroi/BlackSheep", + "expected": "0", + "got": "0", + "got_raw": "0\n\n\nasync def test_from_body_json_binding_empty_list(expected_type):\n \"\"\"Test conversion with empty list\"\"\"\n data = { \"name\": \"Jane\", \"email\": \"jane@example.com\", \"age\": 25, \"contacts\": [], } request = Request(\"POST\", b\"/\", [JSONContentType]).with_content(JSONContent(data)) parameter = JSONBinder(expected_type) value = await parameter.get_value(request) assert isinstance(value, expected_type) assert value.name == \"Jane\" assert value.email == \"jane@example.com\" assert value.age == 25 assert isinstance(value.contacts, list) assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "NewFuture/DDNS", + "expected": "\"@\")", + "got": "\"@\")", + "got_raw": "\"@\") self.assertEqual(record[\"Type\"], \"A\") self.assertEqual(record[\"Value\"], \"1.2.3.4\") self.assertEqual(record[\"Line\"], \"default\") self.assertEqual(record[\"MX\"], None) self.assertEqual(record[\"TTL\"], 300) self.assertEqual(record[\"Priority\"], 10) self.assertEqual(record[\"Weight\"], 1) self.assertEqual(record[\"Port\"], 80) self.assertEqual(record[\"Status\"], \"online\") self.assertEqual(record[\"CreatedTime\"], \"2023-01-01T00:00:00Z\") self.assertEqual(record[\"UpdatedTime", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "NewFuture/DDNS", + "expected": "2)", + "got": "2)", + "got_raw": "2)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "NewFuture/DDNS", + "expected": "\"\")", + "got": "\"\")", + "got_raw": "\"\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "NewFuture/DDNS", + "expected": "\"\")", + "got": "\"\")", + "got_raw": "\"\")\n\n def test_json(self):\n \"\"\"\u6d4b\u8bd5 JSON \u54cd\u5e94\u4f53\"\"\"\n result = _decode_response_body(byte_string( json.dumps({\"key\": \"value\"}) ), \"application/json\")\n self.assertEqual(result, {\"key\": \"value\"})\n\n def test_xml(self):\n \"\"\"\u6d4b\u8bd5 XML \u54cd\u5e94\u4f53\"\"\"\n result = _decode_response_body(byte_string( \"value\" ), \"text/xml\")\n self.assertEqual(result, \"value\")\n\n def test_unknown(self):\n \"\"\"\u6d4b\u8bd5\u672a\u77e5", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "NewFuture/DDNS", + "expected": "\"\")", + "got": "\"\")", + "got_raw": "\"\")\n\n def test_quote_command(self):\n \"\"\"Test _quote_command method\"\"\"\n # Test basic functionality\n cmd = \"python script.py\"\n result = self.scheduler._quote_command(cmd)\n self.assertEqual(result, \"python script.py\")\n\n # Test with spaces\n cmd = 'python \"script with spaces.py\"'\n result = self.scheduler._quote_command(cmd)\n self.assertEqual(result, 'python \"script with spaces.py\"')\n\n # Test with multiple spaced arguments\n cmd = '-m ddns --config \"config file.json\"'\n result =", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "NewFuture/DDNS", + "expected": "bool)", + "got": "bool)", + "got_raw": "bool) # fmt: skip self.assertTrue(result) # fmt: skip self.assertIsNone(fileio.read_file_safely(invalid_path)) # fmt: skip self.assertEqual(fileio.read_file_safely(\"/dev/null\"), \"\") # fmt: skip self.assertEqual(fileio.read_file_safely(\"/dev/null\", encoding=\"ascii\"), \"\") # fmt: skip self.assertEqual(fileio.read_file_safely(\"/dev/null\", encoding=\"ascii\", errors=\"ignore\"), \"\") # fmt: skip self.assertEqual(fileio.read_file_safely(\"/dev/null\", encoding=\"ascii\", errors=\"replace\"), \"\") #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "NewFuture/DDNS", + "expected": "\"www\")", + "got": "\"www\")", + "got_raw": "\"www\") self.assertEqual(result[\"type\"], \"A\") self.assertEqual(result[\"record\"], \"1.2.3.4\") self.assertEqual(result[\"ttl\"], \"3600\") mock_http.assert_called_once_with(\"GET\", \"/api/v2/record\") mock_http.return_value.json.assert_called_once_with() mock_http.return_value.json().assert_called_once_with() mock_http.return_value.json().assert_called_once_with() mock_http.return_value.json().assert_called_once_with() mock_http.return_value.json().assert_called_once_with() mock_http.return_value.json().assert_called_once_with() mock_http.return_value.json().assert_called", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "NewFuture/DDNS", + "expected": "int)", + "got": "int)", + "got_raw": "int) # noqa: E501\n\n def test_split_array_string(self):\n \"\"\"Test splitting array strings into lists\"\"\"\n # Test with a single value\n single_value = \"single\"\n expected_single = [\"single\"]\n self.assertEqual(split_array_string(single_value), expected_single) # noqa: E501\n\n # Test with multiple values separated by commas\n multiple_values = \"value1,value2,value3\"\n expected_multiple = [\"value1\", \"value2\", \"value3\"]\n self.assertEqual(split_array_string(multiple_values), # noqa:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "NewFuture/DDNS", + "expected": "result)", + "got": "result)", + "got_raw": "result) # Check if the file was created and saved correctly with JSON content self.assertTrue(os.path.exists(file_path)) with open(file_path, \"r\") as f: content = f.read() self.assertEqual(content, json.dumps(config_data, indent=2, ensure_ascii=False)) # Check if the file was closed after saving self.assertFalse(f.closed) # Check if the file was opened with write mode self.assertEqual(f.mode, \"w\") # Check if the file was opened in binary mode (if necessary) self.assertEqual(f.buffer, None) # Check if the file was opened in text mode (if necessary) self.assertEqual(f.encoding,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "NewFuture/DDNS", + "expected": "\"cron\")", + "got": "\"cron\")", + "got_raw": "\"cron\") self.assertEqual(captured_args[0].get(\"dns\"), \"debug\") self.assertEqual(captured_args[0].get(\"install\"), \"15\") self.assertEqual(captured_args[0].get(\"scheduler\"), \"cron\") self.assertEqual(captured_args[0].get(\"dns\"), \"debug\") self.assertEqual(captured_args[0].get(\"install\"), \"15\") self.assertEqual(captured_args[0].get(\"scheduler\"), \"cron\") self.assertEqual(captured_args[0].get(\"dns\"), \"debug\") self.assertEqual(captured_args[0].get(\"install\"), \"15\") self.assertEqual", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "NewFuture/DDNS", + "expected": "\"\")", + "got": "\"\")", + "got_raw": "\"\")\n\n def test_mask_sensitive_data_single_sensitive_data(self):\n \"\"\"Test _mask_sensitive_data method with single sensitive data\"\"\"\n provider = _TestableSimpleProvider(self.id, self.token)\n data = \"sensitive_data\"\n result = provider._mask_sensitive_data(data)\n\n self.assertEqual(result, \"sensitive_data\")\n\n def test_mask_sensitive_data_multiple_sensitive_data(self):\n \"\"\"Test _mask_sensitive_data method with multiple sensitive data\"\"\"\n provider = _TestableSimpleProvider(self.id, self.token)\n data = \"sensitive_data1 sensitive_data2\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "NewFuture/DDNS", + "expected": "\"0.5\")", + "got": "\"0.5\")", + "got_raw": "\"0.5\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "NewFuture/DDNS", + "expected": "body)", + "got": "body)", + "got_raw": "body)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "NewFuture/DDNS", + "expected": "\"r\")", + "got": "\"r\")", + "got_raw": "\"r\") mock_file.read.assert_called_once_with() mock_file.close.assert_called_once_with()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "NewFuture/DDNS", + "expected": "\"GET\")", + "got": "\"GET\")", + "got_raw": "\"GET\") # HTTP method is GET self.assertEqual(args[1], \"https://example.com/callback\") self.assertEqual(kwargs[\"headers\"], {}) self.assertEqual(kwargs[\"data\"], None) self.assertEqual(kwargs[\"timeout\"], 10) self.assertEqual(kwargs[\"verify\"], True) self.assertEqual(kwargs[\"proxies\"], None) self.assertEqual(kwargs[\"cert\"], None) self.assertEqual(kwargs[\"allow_redirects\"], True) self.assertEqual(kwargs[\"stream\"], False) self.assertEqual(kwargs[\"auth\"], None) self.assertEqual(kwargs[\"cookies\"], None) self.assertEqual(kwargs[\"params\"], {\"domain\": \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "NewFuture/DDNS", + "expected": "3)", + "got": "3)", + "got_raw": "3)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "NewFuture/DDNS", + "expected": "\"\u8054\u901a\")", + "got": "\"\u8054\u901a\")", + "got_raw": "\"\u8054\u901a\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "NewFuture/DDNS", + "expected": "2)", + "got": "2)", + "got_raw": "2) self.assertEqual(result, None)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "NewFuture/DDNS", + "expected": "\"456\")", + "got": "\"456\")", + "got_raw": "\"456\") # Type narrowing", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "NewFuture/DDNS", + "expected": "0)", + "got": "0)", + "got_raw": "0)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "OrionStarAI/DeepV-Ki", + "expected": "\"TEST_001\"", + "got": "\"TEST_001\"", + "got_raw": "\"TEST_001\"\n assert exc.message == \"Test error\"\n assert exc.status_code == 500 # \u9ed8\u8ba4\u72b6\u6001\u7801\u4e3a500\n\n def test_invalid_repository_error(self):\n \"\"\"\u6d4b\u8bd5\u65e0\u6548\u4ed3\u5e93\u5f02\u5e38\"\"\"\n exc = InvalidRepositoryError(message=\"Invalid repository\", error_code=\"REPO_001\")\n assert str(exc) == \"Invalid repository\" # \u4ec5\u6253\u5370\u9519\u8bef\u4fe1\u606f\n\n assert exc.error_code == \"REPO_001\" # \u9519\u8bef\u4ee3\u7801\u4fdd\u6301\u4e0d\u53d8\n assert exc.message == \"Invalid repository\" # \ufffd", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "OrionStarAI/DeepV-Ki", + "expected": "data", + "got": "data", + "got_raw": "data and data[\"status\"] == \"Healthy\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "OrionStarAI/DeepV-Ki", + "expected": "\"integration_test@example.com\"", + "got": "user_data[\"uid\"]", + "got_raw": "user_data[\"uid\"] assert data[\"user_info\"][\"username\"] == user_data[\"username\"] assert data[\"user_info\"][\"sub\"] == session_id # 5. Verify session restoration is working as expected. The session ID should be the same as the one used to create the token. assert data[\"user_info\"][\"sub\"] == user_data[\"sub\"] # 6. Verify that the token is not expired (it should be valid) assert data[\"token_valid\"] is True # 7. Verify that the token is not revoked (it should be valid) assert data[\"token_revoked\"] is False # 8. Verify", + "exact_match": false, + "code_bleu": 0.3021375397356768, + "edit_similarity": 0.2608695652173913 + }, + { + "repo": "OrionStarAI/DeepV-Ki", + "expected": "\"user\"", + "got": "\"user\"", + "got_raw": "\"user\" assert repo.repo_name == \"project\" assert repo.repo_url == \"https://github.com/user/project\" assert repo.platform == \"github\" assert repo.default_branch == \"main\" def test_wiki_page_creation(self): \"\"\"\u6d4b\u8bd5 WikiPage \u521b\u5efa\"\"\" page = WikiPage( id=\"page1\", title=\"Page 1\", content=\"This is the content of page 1.\", ) assert page.id == \"page1\" assert page.title == \"Page 1\" assert page.content == \"This is the content of page 1.\" def test_wiki_section_creation(self): \"\"\"\u6d4b\u8bd5 WikiSection \u521b\u5efa\"\"\" section = Wiki", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "OrionStarAI/DeepV-Ki", + "expected": "True", + "got": "True", + "got_raw": "True # 5. Check the user data in the response (mocked) # 6. Check the session ID in the response (mocked) # 7. Check the user data in the response (mocked) # 8. Check the session ID in the response (mocked) # 9. Check the user data in the response (mocked) # 10. Check the session ID in the response (mocked) # 11. Check the user data in the response (mocked) # 12. Check the session ID in the response (mocked) # 13", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PedroBern/django-graphql-auth", + "expected": "executed[\"refreshToken\"])", + "got": "executed[\"refreshToken\"])", + "got_raw": "executed[\"refreshToken\"]) self.assertEqual( Messages.EMAIL_TAKEN, executed[\"errors\"][\"email\"][0] ) self.assertEqual( Messages.EMAIL_TAKEN, executed[\"errors\"][\"secondaryEmail\"][0] ) self.assertEqual( Messages.EMAIL_TAKEN, executed[\"errors\"][\"username\"][0] ) self.assertEqual( Messages.EMAIL_TAKEN, executed[\"errors\"][\"phone\"][0] ) self.assertEqual( Messages.EMAIL_TAKEN, executed[\"errors\"][\"password\"][0] ) self.assertEqual( Messages.EMAIL_TAKEN, executed[\"errors\"][\"passwordConfirm\"][0] ) self.assertEqual( Messages.EMAIL_TAKEN, executed[\"errors", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PedroBern/django-graphql-auth", + "expected": "True)", + "got": "True)", + "got_raw": "True) self.assertEqual(executed[\"errors\"], None) self.assertEqual(executed[\"token\"], token) self.assertEqual(executed[\"user\"], self.user1.id) self.assertEqual(executed[\"message\"], Messages.VERIFIED) self.assertTrue(signal_received) user = get_user_model().objects.get(id=self.user1.id) self.assertTrue(user.verified) self.assertEqual(user.is_active, True) user_verified.disconnect(receive_signal) self.assertEqual(user.is_active, False) self.assertEqual(user.verified, True) self.assertEqual(user.is_staff, False) self.assertEqual(user.is_superuser, False) self.assertEqual(user.is_active, True) self.assertEqual(user.status", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PedroBern/django-graphql-auth", + "expected": "False)", + "got": "False)", + "got_raw": "False) self.assertEqual(executed[\"errors\"], { \"password\": Messages.INVALID_PASSWORD }) self.assertEqual(executed[\"token\"], token) self.assertEqual(executed[\"email\"], self.user1.email) self.assertEqual(executed[\"username\"], self.user1.username) self.assertEqual(executed[\"id\"], str(self.user1.id)) self.assertEqual(executed[\"tokenValid\"], True) self.assertEqual(executed[\"emailValid\"], True) self.assertEqual(executed[\"usernameValid\"], True) self.assertEqual(executed[\"idValid\"], True) self.assertEqual(executed[\"tokenError\"], False) self.assertEqual(executed[\"emailError\"], False) self.assertEqual(executed[\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PedroBern/django-graphql-auth", + "expected": "{\"verified\": False})", + "got": "{\"publicUser\": {\"verified\": True}})", + "got_raw": "{\"publicUser\": {\"verified\": True}})", + "exact_match": false, + "code_bleu": 0.27901593935858265, + "edit_similarity": 0.5818181818181818 + }, + { + "repo": "PedroBern/django-graphql-auth", + "expected": "True)", + "got": "True)", + "got_raw": "True) self.assertEqual(executed[\"errors\"], None) self.assertEqual(executed[\"email\"], \"invalid@email.com\") self.assertEqual(executed[\"token\"], None) self.assertEqual(executed[\"message\"], Messages.INVALID_EMAIL) self.assertEqual(executed[\"status\"], 200) self.assertEqual(executed[\"count\"], 0) self.assertEqual(executed[\"emailCount\"], 1) self.assertEqual(executed[\"emailToken\"], None) self.assertEqual(executed[\"emailMessage\"], Messages.INVALID_EMAIL) self.assertEqual(executed[\"emailStatus\"], 200) self.assertEqual(executed[\"emailCount\"], 1) self.assertEqual(executed[\"email", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PedroBern/django-graphql-auth", + "expected": "executed[\"errors\"])", + "got": "executed[\"errors\"][\"password\"])", + "got_raw": "executed[\"errors\"][\"password\"]) self.assertEqual( Messages.INVALID_PASSWORD, executed[\"errors\"][\"password\"][0] ) self.assertEqual( Messages.INVALID_PASSWORD, executed[\"errors\"][\"password\"][1] ) self.assertEqual( Messages.INVALID_PASSWORD, executed[\"errors\"][\"password\"][2] ) self.assertEqual( Messages.INVALID_PASSWORD, executed[\"errors\"][\"password\"][3] ) self.assertEqual( Messages.INVALID_PASSWORD, executed[\"errors\"][\"password\"][4] ) self.assertEqual( Messages.INVALID_PASSWORD, executed[\"errors\"][\"password\"][5] ) self.assertEqual( Messages.INVALID_PASSWORD, executed[\"errors\"][\"password\"][6] ) self.assertEqual( Messages.INVALID_PASSWORD, executed[\"", + "exact_match": false, + "code_bleu": 0.493938273711537, + "edit_similarity": 0.76 + }, + { + "repo": "PedroBern/django-graphql-auth", + "expected": "0)", + "got": "0)", + "got_raw": "0)\n self.assertEqual(len(executed[\"token\"]), 0)\n self.assertEqual(len(executed[\"email\"]), 0)\n self.assertEqual(len(executed[\"username\"]), 0)\n self.assertEqual(len(executed[\"password\"]), 0)\n self.assertEqual(len(executed[\"passwordConfirm\"]), 0)\n self.assertEqual(len(executed[\"firstName\"]), 0)\n self.assertEqual(len(executed[\"lastName\"]), 0)\n self.assertEqual(len(executed[\"email\"]), 0)\n self.assertEqual(len(executed[\"username\"]), 0)\n self.assertEqual(len(executed[\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PedroBern/django-graphql-auth", + "expected": "executed[\"errors\"][\"newPassword2\"])", + "got": "executed[\"errors\"][\"password\"])", + "got_raw": "executed[\"errors\"][\"password\"]) self.assertEqual( Messages.WRONG_PASSWORD, executed[\"errors\"][\"password\"][0] ) self.assertEqual( Messages.WRONG_PASSWORD, executed[\"errors\"][\"password\"][1] ) self.assertEqual( Messages.WRONG_PASSWORD, executed[\"errors\"][\"password\"][2] ) self.assertEqual( Messages.WRONG_PASSWORD, executed[\"errors\"][\"password\"][3] ) self.assertEqual( Messages.WRONG_PASSWORD, executed[\"errors\"][\"password\"][4] ) self.assertEqual( Messages.WRONG_PASSWORD, executed[\"errors\"][\"password\"][5] ) self.assertEqual( Messages.WRONG_PASSWORD, executed[\"errors\"][\"", + "exact_match": false, + "code_bleu": 0.6606328636027614, + "edit_similarity": 0.9090909090909091 + }, + { + "repo": "PedroBern/django-graphql-auth", + "expected": "{ \"nonFieldErrors\": [ { \"code\": \"password_already_set\", \"message\": \"Password already set for account.\", } ] })", + "got": "Messages.ALREADY_SET_PASSWORD) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "got_raw": "Messages.ALREADY_SET_PASSWORD) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "exact_match": false, + "code_bleu": 0.009476129952350365, + "edit_similarity": 0.046875 + }, + { + "repo": "PedroBern/django-graphql-auth", + "expected": "True)", + "got": "True)", + "got_raw": "True) self.assertEqual(self.archived_user.is_active, False) self.login(self.archived_user) self.assertEqual(self.archived_user.is_active, True) self.assertEqual(self.archived_user.status.archived, False) self.assertEqual(self.archived_user.email, \"gaa@email.com\") self.assertEqual(self.archived_user.username, \"gaa\") self.assertEqual(self.archived_user.verified, True) self.assertEqual(self.archived_user.secondary_email, None) self.assertEqual(self.archived_user.id, 1) self.assertEqual(self.archived_user.token, \"\") self.assertEqual(self.archived_user.refresh_token, \"\") self.assertEqual(self.archived_user.date", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PedroBern/django-graphql-auth", + "expected": "None)", + "got": "None)", + "got_raw": "None) self.assertEqual(executed[\"token\"], None) self.assertEqual(executed[\"user\"], None) self.assertEqual(executed[\"refreshToken\"], None) self.assertEqual(executed[\"message\"], Messages.REGISTERED) self.assertTrue(signal_received) signal_received = False # register again self.make_request(self.register_query()) self.assertEqual(executed[\"success\"], False) self.assertEqual(executed[\"errors\"], Messages.ALREADY_REGISTERED) self.assertEqual(executed[\"token\"], None) self.assertEqual(executed[\"user\"], None) self.assertEqual(executed[\"refreshToken\"], None) self.assertEqual(executed[\"message\"], None) self.assertFalse(signal_received) user_registered.disconnect", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PedroBern/django-graphql-auth", + "expected": "Messages.UNAUTHENTICATED)", + "got": "Messages.NOT_AUTHENTICATED)", + "got_raw": "Messages.NOT_AUTHENTICATED) self.assertEqual(executed[\"data\"], None) self.assertEqual(executed[\"status\"], 401) self.assertEqual(executed[\"errors\"][\"status\"], 401) self.assertEqual(executed[\"errors\"][\"message\"], Messages.NOT_AUTHENTICATED) self.assertEqual(executed[\"errors\"][\"detail\"], Messages.NOT_AUTHENTICATED) self.assertEqual(executed[\"errors\"][\"errors\"], None) self.assertEqual(executed[\"errors\"][\"code\"], None) self.assertEqual(executed[\"errors\"][\"status\"], 401) self.assertEqual(executed[\"errors\"][\"statusText\"], \"Not authenticated\") self.assertEqual(executed[\"errors\"][\"", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.9230769230769231 + }, + { + "repo": "PyMySQL/PyMySQL", + "expected": "w[2])", + "got": "w[2])", + "got_raw": "w[2]) self.assertEqual(w[3], \"Table 'no_exists_table' doesn't exist\") cur.close() con.close() con = self.connect() cur = con.cursor() cur.execute(\"DROP TABLE IF EXISTS `no_exists_table`\") self.assertEqual(cur.warning_count, 0) cur.close() con.close() con = self.connect() cur = con.cursor() cur.execute(\"SHOW WARNINGS\") self.assertEqual(cur.warning_count, 0) cur.close() con.close() con = self.connect() cur = con.cursor() cur.execute(\"DROP TABLE IF EXISTS `no_exists_table`\") self.assertEqual(cur.warning_count, 0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyMySQL/PyMySQL", + "expected": "11)", + "got": "11)", + "got_raw": "11) self.assertEqual(r[\"value\"], 22) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyMySQL/PyMySQL", + "expected": "l)", + "got": "l)", + "got_raw": "l) self.cursor.execute(\"select * from %s\" % self.table) l = self.cursor.fetchall() self.assertEqual(len(l), self.rows - 1) for i in range(1, self.rows): self.assertEqual(l[i - 1][0], i) self.cursor.execute(\"select * from %s\" % self.table) l = self.cursor.fetchall() self.assertEqual(len(l), self.rows - 1) for i in range(1, self.rows): self.assertEqual(l[i - 1][1], \"%i\" % (i % 10)) * 255 self.cursor.execute(\"select *", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyMySQL/PyMySQL", + "expected": "err.OperationalError", + "got": "err.OperationalError", + "got_raw": "err.OperationalError and cm.value.args[0] == 28000 and cm.value.args[1] == \"Access denied\" and cm.value.args[2] == data.decode() and cm.value.args[3] == 0 and cm.value.args[4] == 0 and cm.value.args[5] == 0 and cm.value.args[6] == 0 and cm.value.args[7] == 0 and cm.value.args[8] == 0 and cm.value.args[9] == 0 and cm.value.args[10] == 0 and cm.value.args[", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyMySQL/PyMySQL", + "expected": "self.connection.literal(3.1415))", + "got": "self.db.literal(3.1415e0))", + "got_raw": "self.db.literal(3.1415e0)) self.assertEqual(\"3.1415e-0\", self.db.literal(3.1415e-0)) self.assertEqual(\"3.1415e-1\", self.db.literal(3.1415e-1)) self.assertEqual(\"3.1415e-2\", self.db.literal(3.1415e-2)) self.assertEqual(\"3.1415e-3\", self.db.literal(3.1415e-3)) self.assertEqual(\"3.14", + "exact_match": false, + "code_bleu": 0.3549481056010053, + "edit_similarity": 0.7586206896551724 + }, + { + "repo": "PyMySQL/PyMySQL", + "expected": "None", + "got": "None", + "got_raw": "None # No more result sets expected cur.close() con.close() self.help_nextset_tearDown(cur) except self.driver.Error: self.fail(\"Error in test_nextset\") except Exception: self.fail(\"Unexpected exception\") finally: con.close() self.help_nextset_tearDown(cur) except self.driver.Error: self.fail(\"Error in test_nextset\") except Exception: self.fail(\"Unexpected exception\") finally: con.close() self.help_nextset_tearDown(cur) except self.driver.Error: self.fail(\"Error in test_nextset\") except Exception: self.fail(\"Unexpected exception\") finally: con.close() self.help_next", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyMySQL/PyMySQL", + "expected": "(1045, \"Access denied\")", + "got": "(28000, \"Access denied\")", + "got_raw": "(28000, \"Access denied\")", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.851063829787234 + }, + { + "repo": "PyMySQL/PyMySQL", + "expected": "orphans)", + "got": "self.connection.close())", + "got_raw": "self.connection.close())\n else:\n self.connection.close()\n\n def test_connect(self):\n db = self.db_module.connect(*self.connect_args, **self.connect_kwargs)\n self.assertTrue(db)\n db.close()\n\n def test_connect_kwargs(self):\n db = self.db_module.connect(**self.connect_kwargs)\n self.assertTrue(db)\n db.close()\n\n def test_connect_args(self):\n db = self.db_module.connect(*self.connect_args)\n self.assertTrue(db)\n db.close()\n\n def test_connect_args_kwargs(self):\n db = self.db", + "exact_match": false, + "code_bleu": 0.16036590969929357, + "edit_similarity": 0.125 + }, + { + "repo": "PyMySQL/PyMySQL", + "expected": "r)", + "got": "r)", + "got_raw": "r) self.assertEqual([(2,)], list(r)) cur.close() con.close()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyMySQL/PyMySQL", + "expected": "self.driver.Error)", + "got": "self.driver.Error)", + "got_raw": "self.driver.Error) cur.execute(\"select * from %sbooze\" % self.table_prefix) cur.execute(\"select * from %sbarflys\" % self.table_prefix) cur.execute(\"select * from %sbooze\" % self.table_prefix) cur.execute(\"select * from %sbarflys\" % self.table_prefix) cur.execute(\"select * from %sbooze\" % self.table_prefix) cur.execute(\"select * from %sbarflys\" % self.table_prefix) cur.execute(\"select * from %sbooze\" % self.table_prefix) cur.execute(\"select * from %sbar", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyMySQL/PyMySQL", + "expected": "(\"row1\", 0))", + "got": "(\"row1\", 0))", + "got_raw": "(\"row1\", 0))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyMySQL/PyMySQL", + "expected": "cur.fetchall())", + "got": "list(cur))", + "got_raw": "list(cur))", + "exact_match": false, + "code_bleu": 0.34020690871988585, + "edit_similarity": 0.4 + }, + { + "repo": "PyMySQL/PyMySQL", + "expected": "lowercase_latin1", + "got": "lowercase_latin1.upper()", + "got_raw": "lowercase_latin1.upper() == lowercase_latin1.lower() == \"LATIN1\" == \"latin1\" == \"LATIN1\" == \"latin1\" == \"LATIN1\" == \"latin1\" == \"LATIN1\" == \"LATIN1\" == \"LATIN1\" == \"LATIN1\" == \"LATIN1\" == \"LATIN1\" == \"LATIN1\" == \"LATIN1\" == \"LATIN1\" == \"LATIN1\" == \"LATIN1\" == \"LATIN1\" == \"LATIN1\" == \"LAT", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.8 + }, + { + "repo": "PyMySQL/PyMySQL", + "expected": "ER.NO_SUCH_TABLE)", + "got": "ER.NO_SUCH_TABLE)", + "got_raw": "ER.NO_SUCH_TABLE)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyMySQL/PyMySQL", + "expected": "[(2,)])", + "got": "[(2,)])", + "got_raw": "[(2,)]) self.assertTrue(cursor.nextset()) self.assertListEqual(list(cursor), [(3,)]) self.assertFalse(cursor.nextset()) cursor.close() conn.close()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyVRP/PyVRP", + "expected": "0)", + "got": "0)", + "got_raw": "0) assert_equal(route2.duration(), 6122 + 0 - 4718)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyVRP/PyVRP", + "expected": "3)", + "got": "3)", + "got_raw": "3)\n\n # Above targetFeasible, so should decrease the loadPenalty to 90%, and -1\r\n # from the bounds check. So 0.9 * 3 = 2.7, and int(2.7) = 2.\r\n for sol in [infeas] * num_registrations:\r\n pm.register(sol)\r\n\r\n assert_equal(pm.cost_evaluator().load_penalty(2, 1, 0), 2)\r\n\r\n # Below targetFeasible, so should increase the loadPenalty to ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyVRP/PyVRP", + "expected": "4)", + "got": "4)", + "got_raw": "4) assert_equal(data.num_vehicles, 2) assert_equal(data.capacity, 20) assert_equal(data.num_demands, 4) assert_equal(data.demands, [2, 4, 8, 6]) assert_equal(data.time_windows, [(0, 10), (10, 15), (5, 15), (0, 15)]) assert_equal(data.time_windows[0][1], 10) assert_equal(data.time_windows[1][0], 10) assert_equal(data.time_windows[2][1], 15) assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyVRP/PyVRP", + "expected": "0)", + "got": "0)", + "got_raw": "0) assert_equal(improved.routes, [[4]]) assert_equal(improved.cost, 20) assert_equal(improved.group_costs, [20]) assert_equal(improved.group_ids, [0]) assert_equal(improved.group_sizes, [1]) assert_equal(improved.group_missing, [1]) assert_equal(improved.group_missing_ids, [1]) assert_equal(improved.group_missing_sizes, [1]) assert_equal(improved.group_missing_costs, [20]) assert_equal(improved.group_missing_ids, [1]) assert_equal(improved.group_missing_sizes, [1]) assert_equal(improved.group_missing_costs, [2", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyVRP/PyVRP", + "expected": "0)", + "got": "0)", + "got_raw": "0)\n op.apply(nodes[-1], route2[0])\n assert_equal(route1.num_clients(), 2)\n assert_equal(route2.num_clients(), 1)\n assert_(nodes[-1].route is route2)\n assert_equal(route2[0].loc, 3)\n assert_equal(route2[0].depot, False)\n assert_equal(route2[0].type, 0)\n assert_equal(route2[0].cost, 20)\n assert_equal(route2[0].time, 0)\n assert_equal(route", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyVRP/PyVRP", + "expected": "(-103, True))", + "got": "(-103, True))", + "got_raw": "(-103, True))\n op.apply(node)\n assert_equal(str(sol.routes[0]), \"2 4\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyVRP/PyVRP", + "expected": "pickup)", + "got": "pickup)", + "got_raw": "pickup) assert_equal(load_segment.load(), load)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyVRP/PyVRP", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as exc_info: MaxIterations(max_iterations) assert str(exc_info.value) == \"Maximum iterations must be >= 0\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyVRP/PyVRP", + "expected": "11 + 3 * 9)", + "got": "11 + 3 * 9) assert_equal(fn(10)", + "got_raw": "11 + 3 * 9) assert_equal(fn(10), 26 + 4 * 10) assert_equal(fn(11), 26 + 4 * 11) assert_equal(fn(19), 26 + 4 * 19) assert_equal(fn(20), 26 + 4 * 20) assert_equal(fn(21), 26 + 4 * 21) assert_equal(fn(25), 26 + 4 * 25) assert_equal(fn(26), 26 +", + "exact_match": false, + "code_bleu": 0.4703709593866897, + "edit_similarity": 0.5238095238095238 + }, + { + "repo": "PyVRP/PyVRP", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as exc_info: PiecewiseLinearFunction( [0, 1], [0, 1, 2], [0, 1] ) assert_equal( str(exc_info.value), \"Piecewise linear function must have the same number of points and \" \"values.\" )", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyVRP/PyVRP", + "expected": "2)", + "got": "2)", + "got_raw": "2) assert_equal(data.num_clients, 3) assert_equal(data.num_demands, 3) assert_equal(data.num_vars, 10) assert_equal(data.num_routes, 2) assert_equal(data.num_vehicles, 1) assert_equal(data.vehicle_capacities, [10]) assert_equal(data.vehicle_speeds, [1]) assert_equal(data.vehicle_costs, [1]) assert_equal(data.vehicle_time_windows, [(0, 0), (0, 0)]) assert_equal(data.durations, [1, 1, 1, 1, 1]) assert_equal(data.demands,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyVRP/PyVRP", + "expected": "x)", + "got": "x)", + "got_raw": "x) assert_equal(client.y, y) assert_equal(client.delivery, [delivery]) assert_equal(client.pickup, [pickup]) assert_equal(client.service_duration, service_duration) assert_equal(client.tw_early, tw_early) assert_equal(client.tw_late, tw_late) assert_equal(client.release_time, release_time) assert_equal(client.prize, prize) assert_equal(client.required, required) assert_equal(client.group, group) assert_equal(client.name, name)\n\n\n@pytest.mark.parametrize(\n \"x, y, delivery, pickup, service_duration, tw_early, tw_late, release_time, prize", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyVRP/PyVRP", + "expected": "[5])", + "got": "[5])", + "got_raw": "[5]) assert_equal(route.load(), [0]) assert_equal(route.duration(), [0]) assert_equal(route.distance(), [0]) assert_equal(route.start(), [2]) assert_equal(route.end(), [3]) assert_equal(route.depot(), [0]) assert_equal(route.reloads(), [0]) assert_equal(route.reloads_left(), [1]) assert_equal(route.reloads_used(), [0]) assert_equal(route.reloads_remaining(), [1]) assert_equal(route.reloads_capacity(), [5]) assert_equal(route.reloads_cost(), [0]) assert_equal(route.reloads_duration(), [0]) assert_equal(route.reloads_distance(),", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyVRP/PyVRP", + "expected": "0)", + "got": "0)", + "got_raw": "0) assert_equal(should_apply, True) route = op.apply(route) assert_equal(route, [1, 0, 2]) assert_equal(op.vehicles_used(route), [0]) assert_equal(op.vehicles_used(route[1:]), [1]) assert_equal(op.vehicles_used(route[2:]), [2]) assert_equal(op.vehicles_used(route[3:]), []) assert_equal(op.vehicles_used(route[4:]), []) assert_equal(op.vehicles_used(route[5:]), []) assert_equal(op.vehicles_used(route[6:]), []) assert_equal(op.vehicles_used(route[7:]), [])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyVRP/PyVRP", + "expected": "stats)", + "got": "stats)", + "got_raw": "stats) # equal to itself", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyVRP/PyVRP", + "expected": "3)", + "got": "3)", + "got_raw": "3) assert_equal(ok_small.num_locations, 4) assert_equal(ok_small.num_demands, 4) assert_equal(ok_small.demands, [1, 2, 4, 8]) assert_equal(ok_small.capacity, 15) assert_equal(ok_small.time_windows, [(0, 0), (0, 0), (0, 0), (0, 0)]) assert_equal(ok_small.durations, [1, 1, 1, 1]) assert_equal(ok_small.start_times, [0, 0, 0, 0]) assert_equal(ok_small.end_times", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyVRP/PyVRP", + "expected": "0)", + "got": "rc208.num_locations)", + "got_raw": "rc208.num_locations) assert_equal(len(neighbours[1]), 1) assert_equal(len(neighbours[2]), 2) assert_equal(len(neighbours[3]), 3) assert_equal(len(neighbours[4]), 4) assert_equal(len(neighbours[5]), 5) assert_equal(len(neighbours[6]), 6) assert_equal(len(neighbours[7]), 7) assert_equal(len(neighbours[8]), 8) assert_equal(len(neighbours[9]), 9) assert_equal(len(neighbours[10]), 10) assert_equal(len(neighbours[11]),", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.18181818181818182 + }, + { + "repo": "PyVRP/PyVRP", + "expected": "1)", + "got": "1)", + "got_raw": "1) assert_equal(vehicle_type.capacity, []) assert_equal(vehicle_type.start_depot, 0) assert_equal(vehicle_type.end_depot, 0) assert_equal(vehicle_type.fixed_cost, 0) assert_equal(vehicle_type.tw_early, 0) assert_equal(vehicle_type.tw_late, 0) assert_equal(vehicle_type.shift_duration, 0) assert_equal(vehicle_type.max_distance, 0) assert_equal(vehicle_type.unit_distance_cost, 0) assert_equal(vehicle_type.unit_duration_cost, 0) assert_equal(vehicle_type.start_late, 0) assert_equal(vehicle_type.shifts, []) assert_equal(vehicle_type", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyVRP/PyVRP", + "expected": "client)", + "got": "client)", + "got_raw": "client) assert_equal(search_sol.routes[0].nodes[0], client) assert_equal(search_sol.routes[0].nodes[-1], 3) assert_equal(search_sol.routes[1].nodes[0], 4) assert_equal(search_sol.routes[1].nodes[-1], 1) assert_equal(search_sol.routes[1].nodes[1], 2) assert_equal(search_sol.routes[1].nodes[2], 3) assert_equal(search_sol.routes[1].nodes[3], 4) assert_equal(search_sol.routes[1].nodes[4], 1) assert_equal(search_sol.routes[1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyVRP/PyVRP", + "expected": "1)", + "got": "1)", + "got_raw": "1) assert_equal(callbacks.end_cnt, 1) assert_equal(callbacks.init, init) assert_equal(callbacks.res, res) assert_equal(res.best_solution, init) assert_equal(res.best_cost, init.cost) assert_equal(res.best_neighbours, []) assert_equal(res.best_neighbours_cost, 0) assert_equal(res.best_neighbours_cost_change, 0) assert_equal(res.best_neighbours_cost_change_ratio, 0) assert_equal(res.best_neighbours_cost_change_ratio_change, 0) assert_equal(res.best_neighbours_cost_change_ratio_change_ratio, 0) assert_equal(res.best_neighbours_cost_change_ratio_change", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyWavelets/pywt", + "expected": "'haar')", + "got": "'haar')", + "got_raw": "'haar') assert_raises(TypeError, pywt.dwtn, 1, 'haar') assert_raises(TypeError, pywt.dwtn, 1.0, 'haar') assert_raises(TypeError, pywt.dwtn, True, 'haar') assert_raises(TypeError, pywt.dwtn, 'haar') assert_raises(TypeError, pywt.dwtn, None) assert_raises(TypeError, pywt.dwtn, 1, 1) assert_raises(TypeError, pywt.dwtn, 1, 1.0) assert_raises(TypeError, pywt.dwtn, 1, 1.0) assert_raises(TypeError, pywt.dw", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyWavelets/pywt", + "expected": "(5, 3))", + "got": "1) assert_raises(TypeError, wp.__getitem__, 1.0) assert_raises(TypeError, wp.__getitem__, 1 + 1j) assert_raises(TypeError, wp.__getitem__, 'a') assert_raises(TypeError, wp.__getitem__, 1 + 1j) assert_raises(TypeError, wp.__getitem__, 1.0) assert_raises(TypeError, wp.__getitem__, 1) assert_raises(TypeError, wp.__getitem__, 1 + 1j) assert_raises(TypeError, wp.__getitem__, 1.0) assert_raises(TypeError, wp.__getitem__, 1) assert_raises(TypeError, wp.__getitem__,", + "got_raw": "1) assert_raises(TypeError, wp.__getitem__, 1.0) assert_raises(TypeError, wp.__getitem__, 1 + 1j) assert_raises(TypeError, wp.__getitem__, 'a') assert_raises(TypeError, wp.__getitem__, 1 + 1j) assert_raises(TypeError, wp.__getitem__, 1.0) assert_raises(TypeError, wp.__getitem__, 1) assert_raises(TypeError, wp.__getitem__, 1 + 1j) assert_raises(TypeError, wp.__getitem__, 1.0) assert_raises(TypeError, wp.__getitem__, 1) assert_raises(TypeError, wp.__getitem__, ", + "exact_match": false, + "code_bleu": 0.013782748200348334, + "edit_similarity": 0.021321961620469083 + }, + { + "repo": "PyWavelets/pywt", + "expected": "np.linspace(0, 5, x.size, endpoint=False))", + "got": "w.x) assert_allclose(phi_d, phi_d_expect) assert_allclose(phi_r, phi_r_expect) assert_allclose(psi_d, psi_d_expect) assert_allclose(psi_r, psi_r_expect) def test_wavefun_db1(): w = pywt.Wavelet('db1') phi_d, psi_d, x = w.wavefun(level=1) assert_allclose(x, w.x) assert_allclose(phi_d, np.array([0.5])) assert_allclose(psi_d, np.array([0.5])) def test_wavefun_db2(): w = pywt.Wavelet", + "got_raw": "w.x) assert_allclose(phi_d, phi_d_expect) assert_allclose(phi_r, phi_r_expect) assert_allclose(psi_d, psi_d_expect) assert_allclose(psi_r, psi_r_expect) def test_wavefun_db1(): w = pywt.Wavelet('db1') phi_d, psi_d, x = w.wavefun(level=1) assert_allclose(x, w.x) assert_allclose(phi_d, np.array([0.5])) assert_allclose(psi_d, np.array([0.5])) def test_wavefun_db2(): w = pywt.Wavelet", + "exact_match": false, + "code_bleu": 0.026724036620502732, + "edit_similarity": 0.08490566037735849 + }, + { + "repo": "PyWavelets/pywt", + "expected": "cD0)", + "got": "cD0)", + "got_raw": "cD0) assert_allclose(cD[1], cD1) def test_dwt_multi_axis(): x = [[3, 7, 1, 1], [-2, 5, 4, 6]] cA, cD = pywt.dwt(x, 'db2') assert_allclose(cA, [[2.5, 4.5]]) assert_allclose(cD, [[-1.5]]) def test_dwt_single_axis_complex(): x = [[3 + 1j, 7 + 4j, 1 + 2j, 1 + ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyWavelets/pywt", + "expected": "None)", + "got": "'1')", + "got_raw": "'1') assert_raises(TypeError, pywt.dwt, x, 'db2', 1.0) assert_raises(TypeError, pywt.dwt, x, 'db2', 1j) assert_raises(TypeError, pywt.dwt, x, 'db2', '1.0') assert_raises(TypeError, pywt.dwt, x, 'db2', '1j') assert_raises(TypeError, pywt.dwt, x, 'db2', 1 + 1j) assert_raises(TypeError, pywt.dwt, x, 'db2', '1 + 1j') assert_raises(TypeError", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "PyWavelets/pywt", + "expected": "np.array([5., 13.]))", + "got": "np.array([4.12132034356, 6.949747468306, 8.778174593052, 10.606601717798])) assert_allclose(wp['ab'].data, np.array([2.12132034356, 4.949747468306, 7.778174593052, 10.", + "got_raw": "np.array([4.12132034356, 6.949747468306, 8.778174593052, 10.606601717798])) assert_allclose(wp['ab'].data, np.array([2.12132034356, 4.949747468306, 7.778174593052, 10.", + "exact_match": false, + "code_bleu": 0.1604296101725098, + "edit_similarity": 0.1925133689839572 + }, + { + "repo": "PyWavelets/pywt", + "expected": "v)", + "got": "v)", + "got_raw": "v)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyWavelets/pywt", + "expected": "[])", + "got": "X)", + "got_raw": "X) # 1-level transform # axes=(0, 1) # axes=(1, 0) # axes=(1, 0) # axes=(0, 1) # axes=(1, 0) # axes=(0, 1) # axes=(1, 0) # axes=(0, 1) # axes=(1, 0) # axes=(0, 1) # axes=(1, 0) # axes=(0, 1) # axes=(1, 0) # axes=(0, 1) # axes=(1, 0) #", + "exact_match": false, + "code_bleu": 0.35818997727451396, + "edit_similarity": 0.4 + }, + { + "repo": "PyWavelets/pywt", + "expected": "expected[i, :])", + "got": "expected[i])", + "got_raw": "expected[i])", + "exact_match": false, + "code_bleu": 0.4316250567652526, + "edit_similarity": 0.8888888888888888 + }, + { + "repo": "PyWavelets/pywt", + "expected": "c)", + "got": "c)", + "got_raw": "c) assert_raises(ValueError, rec_fun, c, wavelet=cwave) assert_raises(ValueError, rec_fun, c, mode='symmetric') assert_raises(ValueError, rec_fun, c, mode='periodization') assert_raises(ValueError, rec_fun, c, mode='constant') assert_raises(ValueError, rec_fun, c, mode='nearest') assert_raises(ValueError, rec_fun, c, mode='mirror') assert_raises(ValueError, rec_fun, c, mode='symmetric', level=1) assert_raises(ValueError, rec_fun, c, mode='periodization', level=1) assert_raises(ValueError, rec_fun, c,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyWavelets/pywt", + "expected": "[[0, 1]] * 2)", + "got": "np.array(soft_result)) assert_allclose(pywt.threshold(data, 2, 'hard'), data) assert_allclose(pywt.threshold(-data, 2, 'hard'), -data) assert_allclose(pywt.threshold(data, 2, 'a'), data) assert_allclose(pywt.threshold(-data, 2, 'a'), -data) assert_allclose(pywt.threshold(data, 2, 'b'), -data) assert_allclose(pywt.threshold(-data, 2, 'b'), data) assert_allclose(pywt.threshold(data, 2, 'c'), data) assert_allclose(py", + "got_raw": "np.array(soft_result)) assert_allclose(pywt.threshold(data, 2, 'hard'), data) assert_allclose(pywt.threshold(-data, 2, 'hard'), -data) assert_allclose(pywt.threshold(data, 2, 'a'), data) assert_allclose(pywt.threshold(-data, 2, 'a'), -data) assert_allclose(pywt.threshold(data, 2, 'b'), -data) assert_allclose(pywt.threshold(-data, 2, 'b'), data) assert_allclose(pywt.threshold(data, 2, 'c'), data) assert_allclose(py", + "exact_match": false, + "code_bleu": 0.01173671734813653, + "edit_similarity": 0.027906976744186046 + }, + { + "repo": "PyWavelets/pywt", + "expected": "res2)", + "got": "res2)", + "got_raw": "res2) assert_allclose(res1, [0, 0, 0, 0]) assert_allclose(res2, [0, 0, 0, 0]) assert_allclose(res1, [0, 0, 0, 0]) assert_allclose(res2, [0, 0, 0, 0]) assert_allclose(res1, [0, 0, 0, 0]) assert_allclose(res2, [0, 0, 0, 0]) assert_allclose(res1, [0, 0, 0, 0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "PyWavelets/pywt", + "expected": "pywt.WaveletPacket)", + "got": "lambda:", + "got_raw": "lambda: pywt.WaveletPacket(data=x, wavelet='db1', mode='symmetric', axis=2)) assert_raises(ValueError, lambda: pywt.WaveletPacket(data=x, wavelet='db1', mode='symmetric', axis=-3)) assert_raises(ValueError, lambda: pywt.WaveletPacket(data=x, wavelet='db1', mode='symmetric', axis=3)) assert_raises(ValueError, lambda: pywt.WaveletPacket(data=x, wavelet='db1', mode='symmetric', axis=1.0)) assert_raises(ValueError, lambda: pywt.Wave", + "exact_match": false, + "code_bleu": 0.2259005009024612, + "edit_similarity": 0.15384615384615385 + }, + { + "repo": "PyWavelets/pywt", + "expected": "x)", + "got": "x)", + "got_raw": "x) assert_allclose(w.dims, (1,)) assert_allclose(w.scale, 1) assert_allclose(w.levels, 0) assert_allclose(w.aliases, []) assert_allclose(w.aliases, []) assert_allclose(w.aliases, []) assert_allclose(w.aliases, []) assert_allclose(w.aliases, []) assert_allclose(w.aliases, []) assert_allclose(w.aliases, []) assert_allclose(w.aliases, []) assert_allclose(w.aliases, []) assert_allclose(w.aliases, []) assert_allclose(w.aliases, []) assert_allclose(w.aliases, []) assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Quantweb3-com/NexusTrader", + "expected": "balances", + "got": "balances.keys()", + "got_raw": "balances.keys() balances[\"BTCUSDT-PERP.BINANCE\"] == position.to_dict() async_cache._delete_position(position.symbol) assert async_cache.get_position(position.symbol).is_none() async_cache._sync_from_sqlite() assert async_cache.get_position(position.symbol).unwrap() == position async_cache._delete_position(position.symbol) async_cache._delete_position(\"BTCUSDT-PERP.BINANCE\") async_cache._delete_position(\"BTCUSDT-PERP.BINANCE\") async_cache._delete_position(\"BTCUSDT-PERP.BINANCE\") async_cache._delete_position(\"BTCUSDT-PERP.BINANCE\") async_cache", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6956521739130435 + }, + { + "repo": "Quantweb3-com/NexusTrader", + "expected": "-1", + "got": "Decimal(\"-1\")", + "got_raw": "Decimal(\"-1\") * position.amount * position.price * 0.00000001 * 0.9995 * 0.9995 * 0.9995 * 0.9995 * 0.9995 * 0.9995 * 0.9995 * 0.9995 * 0.9995 * 0.9995 * 0.9995 * 0.9995 * 0.9995 * ", + "exact_match": false, + "code_bleu": 0.3021375397356768, + "edit_similarity": 0.26666666666666666 + }, + { + "repo": "Quantweb3-com/NexusTrader", + "expected": "btc.total", + "got": "\"0.002\"", + "got_raw": "\"0.002\" == balances[0].free.to_string() assert \"1000\" == balances[1].free.to_string() async_cache._apply_balance(BinanceAccountType.MARGIN, balances) assert \"0.001\" == balances[0].free.to_string() assert \"1000\" == balances[1].free.to_string() async_cache._apply_balance(BinanceAccountType.CROSSED, balances) assert \"0.001\" == balances[0].free.to_string() assert \"0\" == balances[1].free.to_string() async_cache._apply", + "exact_match": false, + "code_bleu": 0.16666666666666666, + "edit_similarity": 0.125 + }, + { + "repo": "Quantweb3-com/NexusTrader", + "expected": "1", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "ReactiveX/RxPY", + "expected": "[]", + "got": "[]", + "got_raw": "[] results.subscriptions == [] results.disposables == [] scheduler.advance_time_to(100) scheduler.start(create) results.messages == [] results.subscriptions == [] results.disposables == [] scheduler.advance_time_to(100) scheduler.start(create) results.messages == [] results.subscriptions == [] results.disposables == [] scheduler.advance_time_to(100) scheduler.start(create) results.messages == [] results.subscriptions == [] results.disposables == [] scheduler.advance_time_to(100) scheduler.start(create) results.messages == [] results.subscriptions == [] results.disposables == [] scheduler.advance_time_to(100) scheduler.start(create) results", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ReactiveX/RxPY", + "expected": "diff", + "got": "diff", + "got_raw": "diff < timedelta(milliseconds=1100)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ReactiveX/RxPY", + "expected": "[]", + "got": "[Subscription(300", + "got_raw": "[Subscription(300, 400)]", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.10526315789473684 + }, + { + "repo": "ReactiveX/RxPY", + "expected": "[]", + "got": "[]", + "got_raw": "[] results.subscriptions == [subscribe(200, 200)] results.isDisposed = True scheduler.advanceTimeTo(201) scheduler.start(create) results.messages == [on_next(201, 1)] results.subscriptions == [subscribe(200, 201)] results.isDisposed = True scheduler.advanceTimeTo(202) scheduler.start(create) results.messages == [on_next(202, 2)] results.subscriptions == [subscribe(200, 202)] results.isDisposed = True scheduler.advanceTimeTo(203) scheduler.start(create)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ReactiveX/RxPY", + "expected": "[]", + "got": "[]", + "got_raw": "[] res.subscriptions == [subscribe(150, 150)] res.values == [] res.was_disposed = False scheduler.start() res.was_disposed = True scheduler.advance_to(200) res.messages == [on_next(200, 1)] res.subscriptions == [subscribe(150, 200)] res.was_disposed = False scheduler.start() res.was_disposed = True scheduler.advance_to(250) res.messages == [on_next(250, 1)] res.subscriptions == [subscribe(150, 250)]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ReactiveX/RxPY", + "expected": "[on_next(340, 8)]", + "got": "[] + [on_next(220, 3)] + [on_next(280, 4)] + [on_next(290, 1)] + [on_next(340, 8)] + [on_next(360, 5)] + [on_next(370, 6)] + [on_next(390, 7)] + [on_next(410, 13)] + [on_next(430, 2)] + [on_next(450, 9)] + [on_next(5", + "got_raw": "[] + [on_next(220, 3)] + [on_next(280, 4)] + [on_next(290, 1)] + [on_next(340, 8)] + [on_next(360, 5)] + [on_next(370, 6)] + [on_next(390, 7)] + [on_next(410, 13)] + [on_next(430, 2)] + [on_next(450, 9)] + [on_next(5", + "exact_match": false, + "code_bleu": 0.07685060390979259, + "edit_similarity": 0.1459227467811159 + }, + { + "repo": "ReactiveX/RxPY", + "expected": "[]", + "got": "[]", + "got_raw": "[] results.subscriptions == [subscribe(150, 225)] results.is_completed == True scheduler.advance_to(225) scheduler.assert_no_messages() scheduler.dispose() results.messages == [] results.subscriptions == [] results.is_completed == True results.is_error == False results.was_error == False results.was_subscribed == True results.was_disposed == True results.was_next == False results.was_error == False results.was_completed == False results.was_thrown == False results.was_exception == False results.was_error == False results.was_error == False results.was_error == False results.was_error", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ReactiveX/RxPY", + "expected": "[8.0]", + "got": "[8.0]", + "got_raw": "[8.0]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ReactiveX/RxPY", + "expected": "[on_completed(225)]", + "got": "[]", + "got_raw": "[] results.subscriptions == [subscribe(150, 225)] results.is_completed == True results.is_error == False results.values == [] scheduler.advance_to(225) scheduler.start(create) results.messages == [on_next(225, 1)] results.subscriptions == [subscribe(150, 225)] results.is_completed == True results.is_error == False results.values == [1] scheduler.advance_to(226) scheduler.start(create) results.messages == [on_next(225, 1), on_completed(226)] results.subscriptions == [subscribe(15", + "exact_match": false, + "code_bleu": 0.19820118583378682, + "edit_similarity": 0.19047619047619047 + }, + { + "repo": "ReactiveX/RxPY", + "expected": "[]", + "got": "[]", + "got_raw": "[] and results2.messages == [on_error(200, \"ex\")] and results3.messages == [on_error(200, \"ex\")] and subscription[0] is None and subscription1[0] is None and subscription2[0] is None and subscription3[0] is None and s[0] is None and subscription[0] is None and subscription1[0] is None and subscription2[0] is None and subscription3[0] is None and subscription[0] is None and subscription1[0] is None and subscription2[0] is None and subscription3", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ReactiveX/RxPY", + "expected": "[]", + "got": "[]", + "got_raw": "[] results.subscriptions == [subscribe(150)] results.disposed == 150 results.scheduler == scheduler scheduler.start(create) results.messages == [] results.subscriptions == [subscribe(150)] results.disposed == 150 results.scheduler == scheduler scheduler.start(create) results.messages == [] results.subscriptions == [subscribe(150)] results.disposed == 150 results.scheduler == scheduler scheduler.start(create) results.messages == [] results.subscriptions == [subscribe(150)] results.disposed == 150 results.scheduler == scheduler scheduler.start(create) results.messages == [] results.subscriptions == [subscribe(1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ReactiveX/RxPY", + "expected": "[]", + "got": "[]", + "got_raw": "[] results.subscriptions == [subscribe(150, 250)] results.is_completed == True scheduler.advance_to(225) assert results.messages == [on_next(220, 3)] results.subscriptions == [subscribe(150, 225)] scheduler.advance_to(230) assert results.messages == [on_next(220, 3)] results.subscriptions == [subscribe(150, 230)] scheduler.advance_to(240) assert results.messages == [on_next(220, 3)] results.subscriptions == [subscribe(15", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ReactiveX/RxPY", + "expected": "[1, 2, 3]", + "got": "[1, 2, 3]", + "got_raw": "[1, 2, 3]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ReactiveX/RxPY", + "expected": "[]", + "got": "[]", + "got_raw": "[]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ReactiveX/RxPY", + "expected": "[]", + "got": "[]", + "got_raw": "[] res.subscriptions == [subscribe(0, 100)] res.disposed == 100 res.messages == [] res.subscriptions == [subscribe(0, 100)] res.disposed == 100 res.messages == [] res.subscriptions == [subscribe(0, 100)] res.disposed == 100 res.messages == [] res.subscriptions == [subscribe(0, 100)] res.disposed == 100 res.messages == [] res.subscriptions == [subscribe(0, 100)] res.disposed == 100 res.messages == [] res.subscriptions", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ReactiveX/RxPY", + "expected": "[]", + "got": "[]", + "got_raw": "[] results.subscriptions == [] results.values == [] scheduler.advance_time(100) assert results.messages == [] results.subscriptions == [] results.values == [] scheduler.advance_time(1000) assert results.messages == [] results.subscriptions == [] results.values == [] scheduler.advance_time(10000) assert results.messages == [] results.subscriptions == [] results.values == [] scheduler.advance_time(100000) assert results.messages == [] results.subscriptions == [] results.values == [] scheduler.advance_time(1000000) assert results.messages == [] results.subscriptions == [] results.values == [] scheduler.advance_time(", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ReactiveX/RxPY", + "expected": "[]", + "got": "[]", + "got_raw": "[]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ReactiveX/RxPY", + "expected": "i[0])", + "got": "i[0])", + "got_raw": "i[0]) self.assertEqual(2, sum[0]) scheduler.start(create) self.assertEqual(5, i[0]) self.assertEqual(1, sum[0]) scheduler.start(create) self.assertEqual(6, i[0]) self.assertEqual(0, sum[0]) scheduler.start(create) self.assertEqual(7, i[0]) self.assertEqual(-1, sum[0]) scheduler.start(create) self.assertEqual(8, i[0]) self.assertEqual(-2, sum[0]) scheduler.start(create) self.assertEqual(9, i[0]) self.assertEqual(-3, sum[0]) scheduler.start(create) self", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ReactiveX/RxPY", + "expected": "[]", + "got": "[]", + "got_raw": "[] results.subscriptions == [] results.disposed == [] results.errors == [] results.was_not_disposed = True scheduler.start(create) assert results.was_not_disposed is False results.messages == [] results.subscriptions == [] results.disposed == [] results.errors == [] results.was_not_disposed = True scheduler.start(create) assert results.was_not_disposed is False results.messages == [] results.subscriptions == [] results.disposed == [] results.errors == [] results.was_not_disposed = True scheduler.start(create) assert results.was_not_disposed is False results.messages == [] results.subscriptions == [] results.disposed == [] results.errors == []", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ReactiveX/RxPY", + "expected": "e", + "got": "e", + "got_raw": "e\n assert ex is not None\n assert ex is not e\n assert ex is not None\n assert ex is not e\n assert ex is not None\n assert ex is not e\n assert ex is not None\n assert ex is not e\n assert ex is not None\n assert ex is not e\n assert ex is not None\n assert ex is not e\n assert ex is not None\n assert ex is not e\n assert ex is not None\n assert ex is not e\n assert ex is not None\n assert ex is not e\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SALib/SALib", + "expected": "[0.13] * 5)", + "got": "[0.0", + "got_raw": "[0.0, 0.0, 0.0, 0.0, 0.0]) assert_allclose(Si[\"Sb\"][0 : problem[\"num_vars\"]], [0.0]) assert_allclose(Si[\"Sd\"][0 : problem[\"num_vars\"]], [0.0]) assert_allclose(Si[\"Sd\"][0 : problem[\"num_vars\"]], [0.0]) assert_allclose(Si[\"Sd\"][0 : problem[\"num_vars\"]], [0.0]) assert_allclose(Si[\"Sd\"][0 : problem[\"num_vars", + "exact_match": false, + "code_bleu": 0.17909498863725698, + "edit_similarity": 0.4 + }, + { + "repo": "SALib/SALib", + "expected": "[0.00, 0.25, 0.00])", + "got": "[0.00, 0.00, 0.00]) atol=5e-2, rtol=1e-1) assert_allclose(Si[\"S2\"], [0.00, 0.00, 0.00], atol=5e-2, rtol=1e-1) assert_allclose(Si[\"ST\"], [0.00, 0.00, 0.00], atol=5e-2, rtol=1e-1) assert_allclose(Si[\"S3\"], [0.", + "got_raw": "[0.00, 0.00, 0.00]) atol=5e-2, rtol=1e-1) assert_allclose(Si[\"S2\"], [0.00, 0.00, 0.00], atol=5e-2, rtol=1e-1) assert_allclose(Si[\"ST\"], [0.00, 0.00, 0.00], atol=5e-2, rtol=1e-1) assert_allclose(Si[\"S3\"], [0.", + "exact_match": false, + "code_bleu": 0.05366223337500221, + "edit_similarity": 0.1504424778761062 + }, + { + "repo": "SALib/SALib", + "expected": "3)", + "got": "output.shape[1])", + "got_raw": "output.shape[1]) assert_equal(output.shape[0], 4) assert_equal(output.shape[1], 2) assert_equal(output[0, 0], 1) assert_equal(output[0, 1], 0) assert_equal(output[1, 0], 0) assert_equal(output[1, 1], 1) assert_equal(output[2, 0], 0) assert_equal(output[2, 1], 1) assert_equal(output[3, 0], 1) assert_equal(output[3, 1], 0) assert_allclose(output[0,", + "exact_match": false, + "code_bleu": 0.18575057999133598, + "edit_similarity": 0.1111111111111111 + }, + { + "repo": "SALib/SALib", + "expected": "[0.00, 0.25, 0.00])", + "got": "[0.00, 0.00]) atol=5e-2, rtol=1e-1) assert_allclose(Si[\"S2\"], [0.00, 0.00, 0.00], atol=5e-2, rtol=1e-1) assert_allclose(Si[\"ST\"], [0.00, 0.00, 0.00], atol=5e-2, rtol=1e-1) assert_allclose(Si[\"ST\"], [0.00, 0.0", + "got_raw": "[0.00, 0.00]) atol=5e-2, rtol=1e-1) assert_allclose(Si[\"S2\"], [0.00, 0.00, 0.00], atol=5e-2, rtol=1e-1) assert_allclose(Si[\"ST\"], [0.00, 0.00, 0.00], atol=5e-2, rtol=1e-1) assert_allclose(Si[\"ST\"], [0.00, 0.0", + "exact_match": false, + "code_bleu": 0.05366223337500221, + "edit_similarity": 0.15859030837004406 + }, + { + "repo": "SALib/SALib", + "expected": "[0.00, 0.25, 0.00])", + "got": "[0.00, 0.00, 0.00]) atol=5e-2, rtol=1e-1) assert_allclose(Si[\"S2\"], [0.00, 0.00, 0.00], atol=5e-2, rtol=1e-1) assert_allclose(Si[\"ST\"], [0.00, 0.00, 0.00], atol=5e-2, rtol=1e-1) assert_allclose(Si[\"S3\"], [0.", + "got_raw": "[0.00, 0.00, 0.00]) atol=5e-2, rtol=1e-1) assert_allclose(Si[\"S2\"], [0.00, 0.00, 0.00], atol=5e-2, rtol=1e-1) assert_allclose(Si[\"ST\"], [0.00, 0.00, 0.00], atol=5e-2, rtol=1e-1) assert_allclose(Si[\"S3\"], [0.", + "exact_match": false, + "code_bleu": 0.05366223337500221, + "edit_similarity": 0.1504424778761062 + }, + { + "repo": "SALib/SALib", + "expected": "psp.analysis[col])", + "got": "psp.analysis[col])", + "got_raw": "psp.analysis[col]) is None) is None, \"Analysis results not equal!\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SALib/SALib", + "expected": "[N * (D + 2), D])", + "got": "[N, D])", + "got_raw": "[N, D])\n assert_equal(param_values[0, :], [0.0, 0.0, 0.0])\n assert_equal(param_values[-1, :], [1.0, 1.0, 1.0])\n\n\ndef test_sample_size_second_order():\n N = 512\n D = 3\n problem, param_values = setup_samples(N=N, calc_second_order=True)\n\n assert_equal(param_values.shape, \n### Target:\n[N, 2 * D])\n assert_equal(param_values[0, :], [0.0", + "exact_match": false, + "code_bleu": 0.3535533905932738, + "edit_similarity": 0.5833333333333334 + }, + { + "repo": "SALib/SALib", + "expected": "Si[\"ME\"])", + "got": "Si[\"S1\"])", + "got_raw": "Si[\"S1\"])", + "exact_match": false, + "code_bleu": 0.45180100180492244, + "edit_similarity": 0.7777777777777778 + }, + { + "repo": "SALib/SALib", + "expected": "expected", + "got": "expected.shape", + "got_raw": "expected.shape assert_allclose(actual, expected) def test_total_variance(): a = np.array([78, 12, 0.5, 2, 97, 33]) actual = _total_variance(a) expected = 1.0 assert_allclose(actual, expected) def test_sensitivity_index(): a = np.array([78, 12, 0.5, 2, 97, 33]) actual = sensitivity_index(a) expected = 0.5 assert_allclose(actual, expected) def test_total_sensitivity_index(): a = np.array([7", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.7272727272727273 + }, + { + "repo": "SALib/SALib", + "expected": "desired_mu)", + "got": "desired_mu)", + "got_raw": "desired_mu) assert_allclose(Si[\"mu_star\"], desired_mu) assert_allclose(Si[\"mu_star_confidence\"], 0.0) assert_allclose(Si[\"mu_star_confidence\"], 0.0) assert_allclose(Si[\"mu_star_confidence\"], 0.0) assert_allclose(Si[\"mu_star_confidence\"], 0.0) assert_allclose(Si[\"mu_star_confidence\"], 0.0) assert_allclose(Si[\"mu_star_confidence\"], 0.0) assert_allclose(Si[\"mu_star_confidence\"], 0.0) assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SAML-Toolkits/python-saml", + "expected": "metadata_without_descriptors)", + "got": "metadata_without_descriptors)", + "got_raw": "metadata_without_descriptors) self.assertNotIn('') + '\\n') self.assertTrue(metadata.count('>') > 100) self.assertTrue(metadata.count('<') > 100) self.assertTrue(metadata.count('') == 1) self.assertTrue(metadata.count('>') == metadata.count('<')) self.assertTrue(metadata.count('>') > 100) self.assertTrue(metadata.count('<') > 100) self.assertTrue", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SAML-Toolkits/python-saml", + "expected": "settings5)", + "got": "settings5)", + "got_raw": "settings5)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SAML-Toolkits/python-saml", + "expected": "nameid_data_3)", + "got": "nameid_data_3)", + "got_raw": "nameid_data_3) xml_4 = self.file_contents(join(self.data_path, 'responses', 'valid_response.xml.base64')) response_4 = OneLogin_Saml2_Response(settings, xml_4) expected_nameid_data_4 = { 'Value': 'test@example.com', 'Format': 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress' } nameid_data_4 = response_4.get_nameid_data() self.assertEqual(expected_nameid_data_4, nameid_data_4) xml_5 = self.file_contents(join(self.data_path, '", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SAML-Toolkits/python-saml", + "expected": "data)", + "got": "data)", + "got_raw": "data)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SAML-Toolkits/python3-saml", + "expected": "response_4.is_valid(request_data))", + "got": "response_4.is_valid(request_data))", + "got_raw": "response_4.is_valid(request_data))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SAML-Toolkits/python3-saml", + "expected": "target_url2)", + "got": "target_url2)", + "got_raw": "target_url2) self.assertEqual(target_url, \"http://%s/example\" % hostname) self.assertEqual(target_url2, \"http://%s/\" % hostname) self.assertEqual(target_url2, \"http://%s\" % hostname) self.assertEqual(target_url2, \"http://%s/\" % hostname) self.assertEqual(target_url2, \"http://%s\" % hostname) self.assertEqual(target_url2, \"http://%s\" % hostname) self.assertEqual(target_url2, \"http://%s\" % hostname) self.assertEqual(target_url2, \"http://%s\" % hostname) self.assertEqual(target_url2, \"http://%s\" %", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SAML-Toolkits/python3-saml", + "expected": "response_2.get_status())", + "got": "response_2.get_status())", + "got_raw": "response_2.get_status())", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SAML-Toolkits/python3-saml", + "expected": "nameid)", + "got": "nameid)", + "got_raw": "nameid)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SAML-Toolkits/python3-saml", + "expected": "name_id_data)", + "got": "name_id_data)", + "got_raw": "name_id_data)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SAML-Toolkits/python3-saml", + "expected": "response.is_valid(request_data))", + "got": "response.is_valid(request_data))", + "got_raw": "response.is_valid(request_data))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SAML-Toolkits/python3-saml", + "expected": "settings3)", + "got": "settings3)", + "got_raw": "settings3)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SAML-Toolkits/python3-saml", + "expected": "Exception)", + "got": "Exception)", + "got_raw": "Exception) as e: response.is_valid(self.get_request_data(), raise_exceptions=True) self.assertEqual(\"The conditions of the Response are not valid\", str(e.exception))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SAML-Toolkits/python3-saml", + "expected": "inflated_3)", + "got": "inflated_3)", + "got_raw": "inflated_3)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SWE-agent/SWE-ReX", + "expected": "\"\\n\"", + "got": "\"\"", + "got_raw": "\"\" + \"\\n\" assert (await remote_runtime.execute(C(command=\"echo ' '\", shell=True))).stdout == \" \" + \"\\n\" assert (await remote_runtime.execute(C(command=\"echo ' '\", shell=True))).stdout == \" \" + \"\\n\" assert (await remote_runtime.execute(C(command=\"echo ' '\", shell=True))).stdout == \" \" + \"\\n\" assert (await remote_runtime.execute(C(command=\"echo ' '\", shell=True))).stdout == \" \" + \"\\n\" assert (await remote_runtime.execute(C(command=\"echo ' '\", shell=True))).stdout == \" ", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "SWE-agent/SWE-ReX", + "expected": "RuntimeError)", + "got": "RuntimeError)", + "got_raw": "RuntimeError) as e: await d.run() assert str(e.value) == \"Deployment failed\" assert d.logs() == \"\" assert d.exit_code() == 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SWE-agent/SWE-ReX", + "expected": "None", + "got": "None", + "got_raw": "None\n\n assert deployment.runtime.name == \"dummy\" assert deployment.runtime.version == \"1.0.0\" assert deployment.runtime.description == \"Dummy deployment\" assert deployment.runtime.author == \"Swerex\" assert deployment.runtime.url == \"https://github.com/swerex\" assert deployment.runtime.license == \"MIT\" assert deployment.runtime.dependencies == [] assert deployment.runtime.license == \"MIT\" assert deployment.runtime.license == \"MIT\" assert deployment.runtime.license == \"MIT\" assert deployment.runtime.license == \"MIT\" assert deployment.runtime.license == \"MIT\" assert deployment.runtime.license == \"MIT\" assert deployment.runtime", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SWE-agent/SWE-ReX", + "expected": "DeploymentNotStartedError)", + "got": "DeploymentNotStartedError)", + "got_raw": "DeploymentNotStartedError) as exc_info: await d.start() assert str(exc_info.value) == \"Deployment not started\" await d.start() assert await d.status() == \"running\" await d.stop() assert await d.status() == \"stopped\" await d.start() assert await d.status() == \"running\" await d.stop() assert await d.status() == \"stopped\" await d.start() assert await d.status() == \"running\" await d.stop() assert await d.status() == \"stopped\" await d.start() assert await d.status() == \"running\" await d.stop() assert await d.status() == \"stopped", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SWE-agent/SWE-ReX", + "expected": "\"podman\"", + "got": "\"podman\"", + "got_raw": "\"podman\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SWE-bench/SWE-smith", + "expected": "0", + "got": "0", + "got_raw": "0, f\"test_output.txt for {instance_id} is empty\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SWE-bench/SWE-smith", + "expected": "2", + "got": "2.0000000000000004", + "got_raw": "2.0000000000000004 # 1 if statement with 1 branch\"\"\" def test_nested_if_complexity(self, tmp_path): \"\"\"Test that a function with nested ifs has complexity 3.\"\"\" src = \"\"\"int foo(int x) { if (x > 0) { if (x < 10) { return 1; } } return 0; }\"\"\" test_file = tmp_path / \"test.cpp\" test_file.write_text(src, encoding=\"utf-8\") entities = [] get_entities_from_file_cpp(entities, str(test_file)) assert", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.10526315789473684 + }, + { + "repo": "SWE-bench/SWE-smith", + "expected": "1", + "got": "1", + "got_raw": "1 # Only one function in the test file. assert entities[0].name == \"foo\" or entities[0].name == \"bar\" # The function name is either \"foo\" or \"bar\". modifier = ControlIfElseInvertModifier() modifier.apply(entities[0]) assert entities[0].source_code in expected_variants # The modified code should match one of the expected variants.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SWE-bench/SWE-smith", + "expected": "1", + "got": "1", + "got_raw": "1\n\nentity = entities[0] assert entity.name == \"foo\" assert entity.return_type == \"String\" assert entity.return_type_reference is True assert entity.return_type_reference_type == \"String\" assert entity.return_type_reference_qualifier is None assert entity.return_type_reference_qualifier_type is None assert entity.return_type_reference_qualifier_qualifier is None assert entity.return_type_reference_qualifier_qualifier_type is None assert entity.return_type_reference_qualifier_qualifier_qualifier is None assert entity.return_type_reference_qualifier_qualifier_qualifier_type is None assert entity.return_type_reference_qualifier_qualifier_qualifier_qualifier is None assert entity.return_type", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SWE-bench/SWE-smith", + "expected": "1", + "got": "1", + "got_raw": "1 # Only one entity in the test file. entity = entities[0] assert isinstance(entity, LoopBreakContinueSwapModifier) assert entity.src == src assert entity.expected_swap == expected_swap assert entity.src == src.replace(\"break\", \"continue\").replace(\"continue\", \"break\") \"\"\"public void foo() { for (int i = 0; i < 10; i++) { if (i == 5) { continue; } } }\"\"\" \"\"\"public void bar() { for (int i = 0; i < 10; i++) { if (i", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SWE-bench/SWE-smith", + "expected": "\"FAILED\"", + "got": "\"FAILED\"", + "got_raw": "\"FAILED\" assert result[\"test_file3.py\"] == \"SKIPPED\" def test_python_profile_parse_log(): \"\"\"Test PythonProfile.parse_log method\"\"\" profile = PythonProfile() log = \"\"\" test_file1.py PASSED test_file2.py FAILED test_file3.py SKIPPED \"\"\" result = profile.parse_log(log) assert result[\"test_file1.py\"] == \"PASSED\" assert result[\"test_file2.py\"] == \"FAILED\" assert result[\"test_file3.py\"] == \"SKIPPED\" def test_python_profile_parse_log_with_empty_log(): \"\"\"Test PythonProfile.parse_log method with empty log\"\"\" profile", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SWE-bench/SWE-smith", + "expected": "result", + "got": "result.strip()", + "got_raw": "result.strip() result = default_npm_install_dockerfile(\"org/repo__name\") assert \"FROM node:20\" in result.strip() result = default_npm_install_dockerfile(\"org/repo\") assert \"FROM node:18\" in result.strip() result = default_npm_install_dockerfile(\"org\") assert \"FROM node:16\" in result.strip() result = default_npm_install_dockerfile(\"\") assert \"FROM node:14\" in result.strip() result = default_npm_install_dockerfile(\"org/repo__name.abc12345\") assert \"", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6 + }, + { + "repo": "SWE-bench/SWE-smith", + "expected": "result.rewrite", + "got": "result.rewrite()", + "got_raw": "result.rewrite() else \"if (x < 0)\" in result.rewrite() else \"if (x < 0)\" in result.rewrite() else \"if (x > 0)\" in result.rewrite() else \"if (x > 0)\" in result.rewrite() else \"if (x > 0)\" in result.rewrite() else \"if (x > 0)\" in result.rewrite() else \"if (x > 0)\" in result.rewrite() else \"if (x > 0)\" in result.rewrite() else \"if (x > 0)\" in result.re", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.9333333333333333 + }, + { + "repo": "SWE-bench/SWE-smith", + "expected": "\"SomeMethod\"", + "got": "\"Utf8\"", + "got_raw": "\"Utf8\" entities[0].type == \"class\" entities[0].docstring == \"\" entities[0].docstring_raw == \"\" entities[0].docstring_html == \"\" entities[0].docstring_md == \"\" entities[0].docstring_md_raw == \"\" entities[0].docstring_md_html == \"\" entities[0].docstring_md_html_raw == \"\" entities[0].docstring_md_html_raw_unescaped == \"\" entities[0].docstring_md_html_raw_unescaped_raw == \"\" entities[0].docstring_md_html_raw_unescaped_raw_unescaped == \"\" entities[0].docstring", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "SWE-bench/SWE-smith", + "expected": "expected", + "got": "expected", + "got_raw": "expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SWE-bench/SWE-smith", + "expected": "4", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "SWE-bench/SWE-smith", + "expected": "names", + "got": "names", + "got_raw": "names + [\"*\"+name] + [\"*\"+name+\"T\"] + [\"*\"+name+\"Params\"] + [\"*\"+name+\"ParamsT\"] + [\"*\"+name+\"ParamsParams\"] + [\"*\"+name+\"ParamsParamsT\"] + [\"*\"+name+\"ParamsParamsParams\"] + [\"*\"+name+\"ParamsParamsParamsT\"] + [\"*\"+name+\"ParamsParamsParamsParams\"] + [\"*\"+name+\"ParamsParamsParamsParamsT\"] + [\"*\"+name+\"ParamsParamsParamsParamsParams\"] + [\"*\"+name+\"ParamsParamsParamsParamsParamsT\"] + [\"*\"+name+\"ParamsParams", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SWE-bench/SWE-smith", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SWE-bench/SWE-smith", + "expected": "0", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "SWE-bench/SWE-smith", + "expected": "result", + "got": "result", + "got_raw": "result and result[\"test_file.py\"] == \"PASS\" and \"test_file.py\" in result and result[\"test_file.py\"] == \"PASSED\" and \"test_file.py\" in result and result[\"test_file.py\"] == \"FAIL\" and \"test_file.py\" not in result and \"test_file.py\" not in result and \"test_file.py\" not in result and \"test_file.py\" not in result and \"test_file.py\" not in result and \"test_file.py\" not in result and \"test_file.py\" not in result and \"test_file.py\" not in result and \"test_file", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SWE-bench/SWE-smith", + "expected": "2", + "got": "1", + "got_raw": "1", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "SWE-bench/SWE-smith", + "expected": "src", + "got": "src.strip()", + "got_raw": "src.strip() + \"\\n\" + \"return getValue();\\n\" + \"}\" + \"\\n\" + \"int main() {\\n\" + \" return foo();\\n\" + \"}\" + \"\\n\" + \"int getValue() {\\n\" + \" return 42;\\n\" + \"}\" + \"\\n\" + \"int main() {\\n\" + \" return 42;\\n\" + \"}\" + \"\\n\" + \"int getValue() {\\n\" + \" return 42;\\n\" + \"}\" + \"\\n\" + \"int main() {\\n", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.42857142857142855 + }, + { + "repo": "SWE-bench/SWE-smith", + "expected": "3", + "got": "3", + "got_raw": "3 + 1 # +1 for the test class itself test_file_java) + 1 # +1 for the test class itself test_file_java) + 1 # +1 for the test class itself test_file_java) + 1 # +1 for the test class itself test_file_java) + 1 # +1 for the test class itself test_file_java) + 1 # +1 for the test class itself test_file_java) + 1 # +1 for the test class itself test_file_java) + 1 # +1 for the test class itself test_file_java) + 1 # +1 for", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SWE-bench/SWE-smith", + "expected": "rsa_key", + "got": "ed25519_key.read_text()", + "got_raw": "ed25519_key.read_text() + \"\\n\" + rsa_key.read_text() + \"\\n\" + \"fake ed25519 key\" + \"\\n\" + \"fake rsa key\" + \"\\n\" + \"fake ed25519 key\" + \"\\n\" + \"fake rsa key\" + \"\\n\" + \"fake ed25519 key\" + \"\\n\" + \"fake rsa key\" + \"\\n\" + \"fake ed25519 key\" + \"\\n\" + \"fake rsa key\" + \"\\n\" + \"fake ed", + "exact_match": false, + "code_bleu": 0.2295748846661433, + "edit_similarity": 0.26666666666666666 + }, + { + "repo": "SWE-bench/SWE-smith", + "expected": "None", + "got": "None", + "got_raw": "None # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Significant-Gravitas/Auto-GPT-Plugins", + "expected": "MOCK_FROM", + "got": "MOCK_FROM", + "got_raw": "MOCK_FROM mock_imap.open.side_effect = side_effect_with_original_open mock_imap.select.return_value = (b\"OK\", b\"\") emails = read_emails(mock_imap) self.assertEqual(len(emails), 1) email = emails[0] self.assertEqual(email[\"from\"], MOCK_FROM) self.assertEqual(email[\"to\"], MOCK_TO) self.assertEqual(email[\"date\"], MOCK_DATE) self.assertEqual(email[\"content\"], MOCK_CONTENT) self.assertEqual(email[\"subject\"], MOCK_SUBJECT) self.assertEqual(email[\"attachments\"], []) mock_imap.close() mock_imap.logout() def side_effect_for_open(original_open, *args, **kwargs", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Significant-Gravitas/Auto-GPT-Plugins", + "expected": "str)", + "got": "str)", + "got_raw": "str) self.assertEqual(post_message(MOCK_MESSAGE), \"Message posted\") def test_username_and_pwd_set(self): self.assertTrue(username_and_pwd_set()) def test_get_latest_posts(self): self.assertIsInstance(get_latest_posts(), list) self.assertEqual(len(get_latest_posts()), 1) self.assertEqual(get_latest_posts()[0][\"title\"], \"Latest Post\") self.assertEqual(get_latest_posts()[0][\"content\"], \"Hello, World!\") if __name__ == \"__main__\": unittest.main()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Significant-Gravitas/Auto-GPT-Plugins", + "expected": "expected", + "got": "expected", + "got_raw": "expected + \"\\n\" + \"No emails found.\" + \"\\n\" + \"No emails found.\" + \"\\n\" + \"No emails found.\" + \"\\n\" + \"No emails found.\" + \"\\n\" + \"No emails found.\" + \"\\n\" + \"No emails found.\" + \"\\n\" + \"No emails found.\" + \"\\n\" + \"No emails found.\" + \"\\n\" + \"No emails found.\" + \"\\n\" + \"No emails found.\" + \"\\n\" + \"No emails found.\" + \"\\n\" + \"No emails found.\" + \"\\n\" + \"No", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Significant-Gravitas/Auto-GPT-Plugins", + "expected": "401)", + "got": "403)", + "got_raw": "403)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.75 + }, + { + "repo": "Significant-Gravitas/Auto-GPT-Plugins", + "expected": "1", + "got": "1", + "got_raw": "1 + 5 * 0 + 5 * 1 + 5 * 2 + 5 * 3 + 5 * 4 + 5 * 5 + 5 * 6 + 5 * 7 + 5 * 8 + 5 * 9 + 5 * 10 + 5 * 11 + 5 * 12 + 5 * 13 + 5 * 14 + 5 * 15 + 5 * 16 + 5 * 17 + 5 * 18 + 5 *", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Significant-Gravitas/Auto-GPT-Plugins", + "expected": "401)", + "got": "403)", + "got_raw": "403) self.assertEqual(e.response.text, \"Forbidden\")", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.75 + }, + { + "repo": "SmileyChris/django-countries", + "expected": "5)", + "got": "5)", + "got_raw": "5)\r\n self.assertEqual(kwargs[\"countries\"], [\"US\", \"CA\"])\r\n self.assertEqual(kwargs[\"multiple\"], True)\r\n\n @override_settings(COUNTRIES_ONLY=[\"US\", \"CA\"])\r\n def test_deconstruct_with_countries_only_and_multiple(self):\r\n \"\"\"With COUNTRIES_ONLY and multiple=True, max_length should be 2.\"\"\"\r\n field = CountryField()\r\n _, _, _, kwargs = field.deconstruct()\r\n # 2 countries * 2 chars + 1 comma = 5\r\n\r\n self.assertEqual(kwargs[\"max_length\"], 2)\r\n self", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SmileyChris/django-countries", + "expected": "\"\")", + "got": "None)", + "got_raw": "None) self.assertEqual(countries.alpha2(\"x\"), None) self.assertEqual(countries.alpha2(\"xX\"), None) self.assertEqual(countries.alpha2(\"xXx\"), None) self.assertEqual(countries.alpha2(\"xXxX\"), None) self.assertEqual(countries.alpha2(\"xXxXx\"), None) self.assertEqual(countries.alpha2(\"xXxXxX\"), None) self.assertEqual(countries.alpha2(\"xXxXxXx\"), None) self.assertEqual(countries.alpha2(\"xXxXxXxX\"), None) self.assertEqual(countries.alpha2(\"xXx", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.25 + }, + { + "repo": "SmileyChris/django-countries", + "expected": "\"\ud83c\uddf3\ud83c\uddff\")", + "got": "\"nz\")", + "got_raw": "\"nz\")", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6 + }, + { + "repo": "SmileyChris/django-countries", + "expected": "900)", + "got": "900)", + "got_raw": "900) self.assertEqual(countries.name(\"YY\"), \"y\") self.assertEqual(countries.numeric(\"YY\"), 950) self.assertEqual(countries.name(\"ZZ\"), \"ZZ\") self.assertEqual(countries.numeric(\"ZZ\"), 999) self.assertEqual(countries.name(\"ZZZ\"), \"ZZZ\") self.assertEqual(countries.numeric(\"ZZZ\"), 9999) self.assertEqual(countries.name(\"ZZZZ\"), \"ZZZZ\") self.assertEqual(countries.numeric(\"ZZZZ\"), 99999) self.assertEqual(countries.name(\"ZZZZZ\"), \"ZZZZZ\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SmileyChris/django-countries", + "expected": "200)", + "got": "200)", + "got_raw": "200) self.assertEqual(len(country_choices), 243) self.assertEqual(len(fantasy_choices_en), 2) self.assertEqual(country_choices[0][\"value\"], \"AF\") self.assertEqual(country_choices[0][\"display_name\"], \"Afghanistan\") self.assertEqual(fantasy_choices_en[0][\"value\"], \"FR\") self.assertEqual(fantasy_choices_en[0][\"display_name\"], \"France\") self.assertEqual(fantasy_choices_en[1][\"value\"], \"DE\") self.assertEqual(fantasy_choices_en[1][\"display_name\"], \"Germany\") self.assertEqual(response.json()[\"actions\"][\"GET\"][\"description\"], \"Get a person\") self", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SmileyChris/django-countries", + "expected": "\"\")", + "got": "\"\")", + "got_raw": "\"\")\n # With break\n with countries_context(first_break=\"CA\") as ctx:\n country_list = list(ctx.countries)\n # Second item should be a real country\n self.assertNotEqual(country_list[1].code, \"\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SmileyChris/django-countries", + "expected": "list(models.Payment.objects.all()))", + "got": "list(models.Payment.objects.all()))", + "got_raw": "list(models.Payment.objects.all()))\n\n def test_filter_country(self):\n \"\"\"Test that filtering by country returns the correct payments.\"\"\"\n request = RequestFactory().get(\"/payment/\", country=\"NZ\")\n request.user = AnonymousUser()\n cl = ChangeList(request, **self.get_changelist_kwargs())\n cl.get_results(request)\n\n self.assertEqual(list(cl.result_list), [models.Payment.objects.get(contact=contact_nz)])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SmileyChris/django-countries", + "expected": "\"NZ\")", + "got": "\"NZ\")", + "got_raw": "\"NZ\") self.assertEqual(serializer.validated_data[\"fantasy_country\"], \"NV\") self.assertEqual(serializer.validated_data[\"name\"], \"Chris\") self.assertEqual(serializer.errors, {}) self.assertEqual(serializer.data, { \"name\": \"Chris\", \"country\": \"NZ\", \"fantasy_country\": \"NV\", }) self.assertEqual(serializer.get_fields()[\"country\"].to_representation(\"NZ\"), \"NZ\") self.assertEqual(serializer.get_fields()[\"fantasy_country\"].to_representation(\"NV\"), \"NV\") self.assertEqual(serializer.get_fields()[\"country\"].to_representation(\"NV\"), \"NV\") self.assertEqual(serializer.get_fields()[\"fantasy_country\"].to_representation(\"NZ\"), \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SmileyChris/django-countries", + "expected": "200)", + "got": "10)", + "got_raw": "10)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5714285714285714 + }, + { + "repo": "SmileyChris/django-countries", + "expected": "\"CA\")", + "got": "\"FR\")", + "got_raw": "\"FR\")", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6 + }, + { + "repo": "SmileyChris/django-countries", + "expected": "result)", + "got": "result)", + "got_raw": "result) self.assertIn(\"Canada\", result) self.assertIn(\"Mexico\", result)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SukramJ/homematicip_local", + "expected": "HMIP_DOMAIN", + "got": "HMIP_DOMAIN", + "got_raw": "HMIP_DOMAIN and event_type == DeviceTriggerEventType.DEVICE_ERROR.value", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SukramJ/homematicip_local", + "expected": "\"press_short\"", + "got": "\"press_short\"", + "got_raw": "\"press_short\" assert validated[\"subtype\"] == 1 assert validated[\"device_id\"] == \"dev123\" assert validated[\"domain\"] == HMIP_DOMAIN assert validated[\"interface_id\"] == INTERFACE_ID assert validated[\"action\"] == \"press_short\" assert validated[\"subtype\"] == 1 assert validated[\"address\"] == \"dev123\" assert validated[\"interface\"] == INTERFACE_ID assert validated[\"action\"] == \"press_short\" assert validated[\"subtype\"] == 1 assert validated[\"address\"] == \"dev123\" assert validated[\"interface\"] == INTERFACE_ID assert validated[\"action\"] == \"press_short", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SukramJ/homematicip_local", + "expected": "optional_settings", + "got": "optional_settings", + "got_raw": "optional_settings assert \"USE_INTERFACE_CLIENT\" not in optional_settings assert \"SR_DISABLE_RANDOMIZED_OUTPUT\" in optional_settings assert \"sysvar_scan_enabled\" not in optional_settings assert \"sysvar_scan_interval\" not in optional_settings assert \"program_scan_enabled\" not in optional_settings assert \"un_ignore\" not in optional_settings assert \"enable_system_notifications\" in optional_settings assert \"sr_disable_randomized_output\" in optional_settings assert \"sr_disable_randomized_output\" == \"True\" assert \"sysvar_scan_enabled\" == \"False\" assert \"sysvar_scan_interval\" == \"30\" assert \"program_scan_enabled\" == \"False", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SukramJ/homematicip_local", + "expected": "128", + "got": "128.0", + "got_raw": "128.0 / 255.0 * 100.0 if light.brightness is not None else 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.75 + }, + { + "repo": "SukramJ/homematicip_local", + "expected": "25", + "got": "25.0", + "got_raw": "25.0 / 255.0 * 100.000000000000012207031746753091710937500000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "SukramJ/homematicip_local", + "expected": "2", + "got": "2", + "got_raw": "2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SukramJ/homematicip_local", + "expected": "state.attributes", + "got": "state.attributes.keys()", + "got_raw": "state.attributes.keys() assert EVENT_INTERFACE_ID not in state.attributes.keys() assert EVENT_MODEL not in state.attributes.keys() assert state.attributes[ATTR_NAME] == entity_name assert state.attributes[ATTR_ADDRESS] == \"VCU2128127:1\" assert state.attributes[ATTR_FUNCTION] == \"ch1\" assert state.attributes[ATTR_PARAMETER] == \"on\" assert state.attributes[ATTR_VALUE_STATE] == STATE_OFF assert state.attributes[ATTR_FIRMWARE_UPDATE_STATE] == DeviceFirmwareState.NOT_SUPPORTED.value assert state.attributes[ATTR_INTERFACE_ID] == \"CentralTest-BidCos-RF\" assert state.attributes[", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.8205128205128205 + }, + { + "repo": "SukramJ/homematicip_local", + "expected": "\"0.0\"", + "got": "\"0.0\"", + "got_raw": "\"0.0\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SukramJ/homematicip_local", + "expected": "0", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "SukramJ/homematicip_local", + "expected": "24 * 60", + "got": "1440", + "got_raw": "1440 # 24:00 in CCU format is 1440 minutes.", + "exact_match": false, + "code_bleu": 0.16666666666666666, + "edit_similarity": 0.36363636363636365 + }, + { + "repo": "SukramJ/homematicip_local", + "expected": "5", + "got": "5000", + "got_raw": "5000 / 1000 # 5000ms / 1000ms per step = 5 steps = 5000ms / 500ms = 10s = 10000ms = 1s = 1000ms = 1000000us = 1000000us / 1000us per step = 1000000us / 1000us = 1000000 / 100", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4 + }, + { + "repo": "SukramJ/homematicip_local", + "expected": "call_kwargs", + "got": "call_kwargs.keys()", + "got_raw": "call_kwargs.keys() # type: ignore # pylint: disable=protected-access # noqa: E501 # pylint: disable=protected-access # noqa: E501 # pylint: disable=protected-access # noqa: E501 # pylint: disable=protected-access # noqa: E501 # pylint: disable=protected-access # noqa: E501 # pylint: disable=protected-access # noqa: E501 # pylint: disable=protected-access # noqa: E501 # pylint: disable=protected-access # noqa: E501 # pylint: disable=protected-access", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.7586206896551724 + }, + { + "repo": "SukramJ/homematicip_local", + "expected": "\"homematicip_local\"", + "got": "\"homematicip_local\"", + "got_raw": "\"homematicip_local\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SukramJ/homematicip_local", + "expected": "\"VCU0000001\"", + "got": "\"VCU0000001\"", + "got_raw": "\"VCU0000001\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SukramJ/homematicip_local", + "expected": "\"VCU2128127:1\"", + "got": "\"ch1\"", + "got_raw": "\"ch1\" assert ha_state.attributes[EVENT_INTERFACE_ID] == \"BSM\" assert ha_state.attributes[EVENT_MODEL] == \"HmIP-BSM\" assert data_point.value == 0.0 assert data_point.value_state == HmEntityState.OFF assert data_point.value_state_str == STATE_OFF assert data_point.value_str == \"0.0\" assert data_point.value_str_raw == \"0.0\" assert data_point.value_str_raw_str == \"0.0\" assert data_point.value_str_raw_str_str == \"0.0\" assert data_point.value_str_raw_str_str_str == \"0.", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3157894736842105 + }, + { + "repo": "SukramJ/homematicip_local", + "expected": "False", + "got": "True", + "got_raw": "True # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type:", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "SukramJ/homematicip_local", + "expected": "DeviceTriggerEventType.DEVICE_ERROR.value", + "got": "DeviceTriggerEventType.DEVICE_ERROR.value", + "got_raw": "DeviceTriggerEventType.DEVICE_ERROR.value", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SukramJ/homematicip_local", + "expected": "\"evt_type\"", + "got": "config[\"event_type\"]", + "got_raw": "config[\"event_type\"] if isinstance(et_val, str) else et_val.template.render() == config[\"event_type\"] else et_val == config[\"event_type\"] assert ev_cfg[dt.event_trigger.CONF_ADDRESS] == config[\"address\"] assert ev_cfg[dt.event_trigger.CONF_TYPE] == config[\"type\"] assert ev_cfg[dt.event_trigger.CONF_SUBTYPE] == config[\"subtype\"] assert ev_cfg[dt.event_trigger.CONF_DEVICE_ID] == config[\"device_id\"] assert ev_cfg[dt.event_trigger.CONF_INTERFACE_ID] == config[\"interface_id\"] assert ev_cfg[dt.event_trigger.CONF_PLATFORM", + "exact_match": false, + "code_bleu": 0.3021375397356768, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "SukramJ/homematicip_local", + "expected": "\"intf123\"", + "got": "\"intf123\"", + "got_raw": "\"intf123\" assert placeholders[\"device_id\"] == \"ABC0001\" assert placeholders[\"device_name\"] == \"ABC0001\" assert step_init[\"data_schema\"] == pytest.approx( { \"name\": { \"required\": True, \"description\": \"Name of the device\", \"empty\": False, \"placeholder\": \"ABC0001\", }, }, rel_tol=1e-12, ) assert step_init[\"data\"] == {} assert step_init[\"errors\"] == {} assert step_init[\"context\"] == {} assert step_init[\"step_id\"] == \"set_name", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SukramJ/homematicip_local", + "expected": "{\"MONDAY\": [{\"start\": \"06:00\", \"temp\": 21.0}]}", + "got": "{\"MONDAY\": [{\"start\": \"06:00\", \"temp\": 21.0}]}", + "got_raw": "{\"MONDAY\": [{\"start\": \"06:00\", \"temp\": 21.0}]}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SuperClaude-Org/SuperClaude_Framework", + "expected": "recommendation", + "got": "recommendation.lower()", + "got_raw": "recommendation.lower() # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa:", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.7777777777777778 + }, + { + "repo": "SuperClaude-Org/SuperClaude_Framework", + "expected": "message", + "got": "message.lower()", + "got_raw": "message.lower() # noqa: W605 # type: ignore # noqa: W605 # type: ignore # noqa: W605 # type: ignore # noqa: W605 # type: ignore # noqa: W605 # type: ignore # noqa: W605 # type: ignore # noqa: W605 # type: ignore # noqa: W605 # type: ignore # noqa: W605 # type: ignore # noqa: W605", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6363636363636364 + }, + { + "repo": "SuperClaude-Org/SuperClaude_Framework", + "expected": "True", + "got": "True", + "got_raw": "True and len(issues) == 0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "SuperClaude-Org/SuperClaude_Framework", + "expected": "True", + "got": "True", + "got_raw": "True, \"Self-check should pass\" assert len(issues) == 0, \"Should have no issues\" # 4. Reflexion pattern (simulated) reflexion = { \"reflexion_results\": \"\u2705 All reflexions passed\", \"reflexion_output\": \"Reflexion results\", \"reflexion_status\": \"complete\", } # 5. Token budget (simulated) token_budget = 1000 # 6. Final assessment (simulated) assessment = { \"assessment_results\": \"\u2705 All assessments passed\", \"assessment_output\": \"Assessment results\", \"assessment_status\": \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Upsonic/Upsonic", + "expected": "2", + "got": "2", + "got_raw": "2, \"Context should have 2 items\" assert task.context[1] == kb2, \"Context should contain the second KB\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Upsonic/Upsonic", + "expected": "8", + "got": "\"8\"", + "got_raw": "\"8\" # 5 + 3 = 8 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "Upsonic/Upsonic", + "expected": "0", + "got": "0", + "got_raw": "0, \"Generated output should not be empty\" def test_accuracy_evaluator() -> None: _enable_print_capture() evaluator = AccuracyEvaluator() team = Team( \"test_team\", \"Test Team\", \"This is a test team\", \"test_team\", \"test_team\", \"test_team\", \"test_team\", \"test_team\", \"test_team\", \"test_team\", \"test_team\", \"test_team\", \"test_team\", \"test_team\", \"test_team\", \"test_team\", \"test_team\", \"test_team\", \"test_team\", \"test_team\", \"test_team\", \"test_team\", \"test_team\",", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Upsonic/Upsonic", + "expected": "2", + "got": "2", + "got_raw": "2, \"Should have 2 edges\" # Task1 -> Task2, Task2 -> Task3 # Check the tasks are correctly assigned to nodes assert task1 in graph.nodes[0].task and task2 in graph.nodes[1].task and task3 in graph.nodes[2].task, \"Tasks should be assigned to nodes\" # Check the tasks are correctly connected assert graph.edges[0].source == 0 and graph.edges[0].target == 1 and graph.edges[1].source == 1 and graph.edges[1].target == 2, \"Edges should be correctly connected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Upsonic/Upsonic", + "expected": "0", + "got": "0", + "got_raw": "0, \"Graph should be empty initially\"\n\n # Test with custom attributes\n graph = Graph(agents=[agent], parallel_execution=True, max_parallel_tasks=2, show_progress=False)\n assert graph.agents == [agent], \"Agents should be set\"\n assert graph.parallel_execution is True, \"parallel_execution should be True\"\n assert graph.max_parallel_tasks == 2, \"max_parallel_tasks should be 2\"\n assert graph.show_progress is False, \"show_progress should be False\"\n\n assert len(graph.nodes) == 1, \"Graph should have 1 node", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Upsonic/Upsonic", + "expected": "task", + "got": "task", + "got_raw": "task assert evaluator.num_iterations == 2 assert evaluator.warmup_runs == 1 assert evaluator.num_warmup_runs == 1 assert evaluator.num_eval_runs == 1 assert evaluator.num_total_runs == 2 assert evaluator.num_warmup_seconds == 1.0 assert evaluator.num_eval_seconds == 1.0 assert evaluator.num_total_seconds == 2.0 assert evaluator.num_warmup_tokens == 0.0 assert evaluator.num_eval_tokens == 0.0 assert evaluator.num_total_tokens == 0.0 assert evaluator.num_warmup_bytes == 0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Upsonic/Upsonic", + "expected": "None", + "got": "None", + "got_raw": "None\n assert item.output.text is not None\n assert item.output.text != \"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Upsonic/Upsonic", + "expected": "\"id1\"", + "got": "\"id1\"", + "got_raw": "\"id1\" assert results[0].payload[\"source\"] == \"test1\" assert results[0].chunk == \"chunk1\" assert results[1].id == \"id2\" assert results[1].payload[\"source\"] == \"test2\" assert results[1].chunk == \"chunk2\" finally: # Ensure cleanup if necessary milvus_provider.disconnect() # Disconnect from the database if needed milvus_provider.close() # Close the connection to the database if needed milvus_provider._async_client = None # Set the client to None to prevent resource leaks milvus_provider._is_connected = False #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Upsonic/Upsonic", + "expected": "chat", + "got": "chat.agent.agent_response_future.result()", + "got_raw": "chat.agent.agent_response_future.result() # type: ignore # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa:", + "exact_match": false, + "code_bleu": 0.14113991930789777, + "edit_similarity": 0.17777777777777778 + }, + { + "repo": "Upsonic/Upsonic", + "expected": "\"\")", + "got": "\"\")", + "got_raw": "\"\") # Empty DSN for testing purposes\n\n @patch('upsonic.utils.logging_config.sentry_sdk')\n def test_setup_sentry_enabled(self, mock_sentry):\r\n \"\"\"Test setup_sentry when telemetry is enabled.\"\"\"\r\n os.environ[\"UPSONIC_TELEMETRY\"] = \"true\"\r\n os.environ[\"UPSONIC_TELEMETRY_DSN\"] = \"test_dsn\"\r\n os.environ[\"UPSONIC_TELEMETRY_ENV\"] = \"test_env\"\r\n os.environ[\"UPSONIC_TELEMETRY_SAMPLE_RATE\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Upsonic/Upsonic", + "expected": "1", + "got": "1.0000000000000002e-05", + "got_raw": "1.0000000000000002e-05 # 1e-5 is the default warmup runs value. 1e-5 is the default warmup runs value. 1e-5 is the default warmup runs value. 1e-5 is the default warmup runs value. 1e-5 is the default warmup runs value. 1e-5 is the default warmup runs value. 1e-5 is the default warmup runs value. 1e-5 is the default warmup runs value.", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.08695652173913043 + }, + { + "repo": "Upsonic/Upsonic", + "expected": "True", + "got": "True", + "got_raw": "True # Build command should succeed assert result.stdout == \"\" # No output from the command assert result.stderr == \"\" # No error output from the command assert result.exit_code == 0 # Command should exit with code 0 assert result.build_command == \"python3 -m py_compile src/main.py\" # Correct build command used assert result.build_output == \"\" # No build output from the command assert result.build_error == \"\" # No build error output from the command assert result.build_exit_code == 0 # Build should exit with code 0 assert result.build_success is True # Build should succeed assert result.build_failure is False # Build should not", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Upsonic/Upsonic", + "expected": "stats[\"median\"]", + "got": "stats[\"median\"]", + "got_raw": "stats[\"median\"] <= stats[\"max\"] <= stats[\"average\"] <= stats[\"max\"] + 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Upsonic/Upsonic", + "expected": "0", + "got": "0", + "got_raw": "0, \"Result should have some content\" # Add a check for the expected content in the result assert \"Python\" in result.lower() and \"web development\" in result.lower() and \"data science\" in result.lower() and \"artificial intelligence\" in result.lower() # Cleanup shutil.rmtree(temp_dir) # Verify KB attributes assert kb is not None, \"KnowledgeBase should be created\" assert kb.embedding_provider == embedding, \"Embedding provider should be set\" assert kb.vectordb == vectordb, \"VectorDB should be set\" # Verify KB assert kb", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Upsonic/Upsonic", + "expected": "None", + "got": "None", + "got_raw": "None and accumulated_text != \"\" and accumulated_text != \"...\" and accumulated_text != \"\\n\" and accumulated_text != \"\\r\" and accumulated_text != \"\\r\\n\" and accumulated_text != \"\\n\\r\" and accumulated_text != \"\\r\\n\\r\\n\" and accumulated_text != \"\\n\\n\" and accumulated_text != \"\\n\\n\\n\" and accumulated_text != \"\\n\\n\\n\\n\" and accumulated_text != \"\\n\\n\\n\\n\\n\" and accumulated_text != \"\\n\\n\\n\\n\\n\\n\" and accumulated_text != \"\\n\\n\\n\\n\\n\\n\\n\" and accumulated_text != \"\\n\\n\\n\\n\\n\\n\\n\\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Upsonic/Upsonic", + "expected": "0", + "got": "0", + "got_raw": "0, \"Story file should not be empty\" assert len(summary_content) > 0, \"Summary file should not be empty\" assert \"AI\" in story_content, \"Story should contain 'AI'\" assert \"AI\" in summary_content, \"Summary should contain 'AI'\" assert \"AI\" in output, \"Output should contain 'AI'\" print(\"DeepAgent test passed!\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Upsonic/Upsonic", + "expected": "3", + "got": "3", + "got_raw": "3, \"messages count should survive update\" log_test_result(\"Upsert session (update) with deep field check\", True) log_test_result(\"Upsert session (update) with non-updated field check\", True) log_test_result(\"Upsert session (update) with metadata check\", True) log_test_result(\"Upsert session (update) with agent_id check\", True) log_test_result(\"Upsert session (update) with user_id check\", True) log_test_result(\"Upsert session (update) with runs check\", True) log_test_result(\"Upsert session (update) with messages check\", True) log", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Upsonic/Upsonic", + "expected": "2", + "got": "2", + "got_raw": "2 # At least two tools should be registered. def test_workspace_exists(self, temp_workspace): \"\"\"Verify the workspace exists after initialization.\"\"\" assert os.path.exists(temp_workspace) def test_workspace_is_empty(self, temp_workspace): \"\"\"Verify the workspace is empty after initialization.\"\"\" assert not os.listdir(temp_workspace) def test_storage_is_in_memory(self, temp_workspace): \"\"\"Verify the storage is in-memory.\"\"\" agent = AutonomousAgent( model=\"openai/gpt-4o-mini\", workspace=temp_workspace, storage=InMemoryStorage(), ) assert isinstance(agent.storage, InMemoryStorage) def test_storage_is_memory(self, temp_workspace): \"\"\"Verify", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Upsonic/Upsonic", + "expected": "None", + "got": "None", + "got_raw": "None, \"reflection processor should be set\"\n\n # Test reflection with a simple task\n task = Task(\"What is the capital of France?\")\n response = await agent.run(task)\n print(response)\n print(agent.reflection_processor.reflections)\n print(agent.reflection_processor.suggestions)\n print(agent.reflection_processor.self_critique)\n print(agent.reflection_processor.improvement_suggestions)\n print(agent.reflection_processor.reflection_history)\n print(agent.reflection_processor.reflection_history[0])\n print(agent.reflection_processor.reflection_history[1])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "Upsonic/Upsonic", + "expected": "2", + "got": "2", + "got_raw": "2 and restored.messages[0].parts[0].part_kind == \"user-prompt\" and restored.messages[0].parts[0].content == \"Hi\" and restored.messages[1].parts[0].part_kind == \"text\" and restored.messages[1].parts[0].content == \"Hello!\" and restored.model_dump() == summary.model_dump() and restored.model_dump_json() == json_str and restored.model_validate_json() == summary.model_validate_json() and restored.model_validate_json() == json.loads(json_str) and restored.model_validate_json() == json.loads(json_str) and restored.model_validate_json() == json", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "XKNX/xknx", + "expected": "None", + "got": "None", + "got_raw": "None\n\n telegram = Telegram( GroupAddress(\"1/2/3\"), payload=DPTBinary(0))\n binaryinput.process(telegram)\n assert binaryinput.state is False\n\n telegram = Telegram( GroupAddress(\"1/2/3\"), payload=DPTBinary(1))\n binaryinput.process(telegram)\n assert binaryinput.state is True\n\n async def test_process_group_value_write(self) -> None:\n \"\"\"Test process / handling GroupValueWrite telegrams.\"\"\"\n xknx = XKNX()\n binaryinput = BinarySensor(xknx, \"TestInput\", \"1/", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "XKNX/xknx", + "expected": "5", + "got": "5", + "got_raw": "5 * 2 + 5 * 2 + 5 * 2 + 5 * 2 + 5 * 2 + 5 * 2 + 5 * 2 + 5 * 2 + 5 * 2 + 5 * 2 + 5 * 2 + 5 * 2 + 5 * 2 + 5 * 2 + 5 * 2 + 5 * 2 + 5 * 2 + 5 * 2 + 5 * 2 + 5 * 2 + 5 * 2 + 5 *", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "XKNX/xknx", + "expected": "0", + "got": "0", + "got_raw": "0 # No telegram should be sent as respond_to_read is False.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "XKNX/xknx", + "expected": "1", + "got": "1", + "got_raw": "1 # 1 telegram for read request + 1 telegram for read response # 1 telegram for read request + 1 telegram for read response responding.process(read_telegram) # 2 telegram for read request + 2 telegram for read response # 2 telegram for read request + 2 telegram for read response responding.process(read_telegram) # 3 telegram for read request + 3 telegram for read response # 3 telegram for read request + 3 telegram for read response responding.process(read_telegram) # 4 telegram for read request + 4 telegram for read response # 4", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "XKNX/xknx", + "expected": "1", + "got": "2", + "got_raw": "2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "XKNX/xknx", + "expected": "DPTArray(0xFF)", + "got": "DPTArray(0xFF)", + "got_raw": "DPTArray(0xFF) assert DPTValue1Ucount.from_knx(DPTArray(0xFF)) == 255 assert DPTValue1Ucount.to_knx(0) == DPTArray(0x00) assert DPTValue1Ucount.from_knx(DPTArray(0x00)) == 0 assert DPTValue1Ucount.to_knx(1) == DPTArray(0x01) assert DPTValue1Ucount.from_knx(DPTArray(0x01)) == 1 assert DPTValue1Ucount.to_k", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "XKNX/xknx", + "expected": "raw", + "got": "raw[:-1]", + "got_raw": "raw[:-1] + b\"\\x00\" * 16 + b\"\\x00\" * 16 + b\"\\x00\" * 16 + b\"\\x00\" * 16 + b\"\\x00\" * 16 + b\"\\x00\" * 16 + b\"\\x00\" * 16 + b\"\\x00\" * 16 + b\"\\x00\" * 16 + b\"\\x00\" * 16 + b\"\\x00\" * 16 + b\"\\", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.5454545454545454 + }, + { + "repo": "XKNX/xknx", + "expected": "value", + "got": "value.as_dict()", + "got_raw": "value.as_dict() == data.as_dict() == value.as_dict() == value.as_dict() == value.as_dict() == value.as_dict() == value.as_dict() == value.as_dict() == value.as_dict() == value.as_dict() == value.as_dict() == value.as_dict() == value.as_dict() == value.as_dict() == value.as_dict() == value.as_dict() == value.as_dict() == value.as_dict() == value.as_dict() == value.as_dict() == value.as_dict() == value.as_dict() == value.as_dict() == value.as_dict() == value.as_dict() == value.as_dict", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5 + }, + { + "repo": "XKNX/xknx", + "expected": "raw[8])", + "got": "raw[8])", + "got_raw": "raw[8])\n\n @patch(\"xknx.io.UDPTunnel._send_tunnelling_ack\")\n async def test_tunnel_request_received_no_ack(self, send_ack_mock: Mock) -> None:\n \"\"\"Test Tunnel for not calling send_ack on frames without ack.\"\"\"\r\n self.tunnel.expected_sequence_number = 0x21\r\n self.tunnel.transport.data_received_callback( bytes.fromhex(\"0610 0420 0013 04 02 21 00 2900b06010fa", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "XKNX/xknx", + "expected": "data", + "got": "data.__class__(**dict_value)", + "got_raw": "data.__class__(**dict_value) == data == data.as_dict() == dict_value == data.as_dict() == data.as_dict() == dict_value == data.as_dict() == dict_value == data.as_dict() == dict_value == data.as_dict() == dict_value == data.as_dict() == dict_value == data.as_dict() == dict_value == data.as_dict() == dict_value == data.as_dict() == dict_value == data.as_dict() == dict_value == data.as_dict() == dict_value == data.as_dict() == dict_value == data.as_dict() == dict_value == data.as_dict() == dict_value ==", + "exact_match": false, + "code_bleu": 0.16036590969929357, + "edit_similarity": 0.25 + }, + { + "repo": "XKNX/xknx", + "expected": "1", + "got": "2", + "got_raw": "2 * 2 + 1 * 1 + 1 * 2 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 *", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "XKNX/xknx", + "expected": "raw", + "got": "raw[:-1]", + "got_raw": "raw[:-1] + b\"\\x00\" * 16 + b\"\\x00\" * 8 + b\"\\x00\" * 4 + b\"\\x00\" * 2 + b\"\\x00\" * 2 + b\"\\x00\" * 2 + b\"\\x00\" * 2 + b\"\\x00\" * 2 + b\"\\x00\" * 2 + b\"\\x00\" * 2 + b\"\\x00\" * 2 + b\"\\x00\" * 2 + b\"\\", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.5454545454545454 + }, + { + "repo": "XKNX/xknx", + "expected": "DPTArray(())", + "got": "DPTArray(())", + "got_raw": "DPTArray(()) assert DPTArray(()) != DPTArray(()) assert DPTArray(()) != DPTArray(()) assert DPTArray(()) != DPTArray(()) assert DPTArray(()) != DPTArray(()) assert DPTArray(()) != DPTArray(()) assert DPTArray(()) != DPTArray(()) assert DPTArray(()) != DPTArray(()) assert DPTArray(()) != DPTArray(()) assert DPTArray(()) != DPTArray(()) assert DPTArray(()) != DPTArray(()) assert DPT", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "XKNX/xknx", + "expected": "None", + "got": "None", + "got_raw": "None # type: ignore # pylint: disable=unsubscriptable-object # noqa: E501 test_device.process(Telegram(GroupAddress(\"1/2/3\"), payload=GroupValueWrite(DPTArray(raw)))) assert test_device.value == dt_value assert test_device.raw == raw assert test_device.group_address == GroupAddress(\"1/2/3\") assert test_device.localtime is False assert test_device._raw is None assert test_device._group_address is None assert test_device._localtime is None assert test_device._raw_address is None assert test_device._", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "XKNX/xknx", + "expected": "raw", + "got": "raw", + "got_raw": "raw", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "XKNX/xknx", + "expected": "2", + "got": "2", + "got_raw": "2\n\n def test_add(self) -> None:\n \"\"\"Test add() function.\"\"\"\n xknx = XKNX()\n light = Light(xknx, \"Living-Room.Light_1\", group_address_switch=\"1/6/7\")\n xknx.devices.async_add(light)\n assert len(xknx.devices) == 1\n\n binary_sensor = BinarySensor(\n xknx, \"DiningRoom.Motion.Sensor\", group_address_state=\"3/0/1\"\n )\n xknx.devices.async_add(binary_sensor)\n assert len(xknx.devices", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "XKNX/xknx", + "expected": "msg", + "got": "msg", + "got_raw": "msg", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "XKNX/xknx", + "expected": "1", + "got": "1", + "got_raw": "1\n # unregister when state address and sync_state is set\n remote_value_1.unregister_state_updater()\n assert len(xknx.state_updater._workers) == 0\n\n # register when state address and sync_state is not set\n remote_value_2: RemoteValue[Any] = RemoteValue(\n xknx, sync_state=False, group_address_state=GroupAddress(\"1/1/2\")\n )\n assert len(xknx.state_updater._workers) == 0\n remote_value_2.register_state_updater()\n assert len(xknx.state", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "XKNX/xknx", + "expected": "raw", + "got": "raw", + "got_raw": "raw + b\"\\x00\" * 2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "XKNX/xknx", + "expected": "\"Pa\"", + "got": "\"Pa\"", + "got_raw": "\"Pa\" # pylint: disable=protected-access # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "agittins/bermuda", + "expected": "None", + "got": "None", + "got_raw": "None # No stamp found for this address # Test async_as_scanner_get_stamp method with a remote scanner bermuda_scanner.async_as_scanner_init(mock_remote_scanner) bermuda_scanner.stamps = {\"11:22:33:44:55:66\": 678.90} stamp = bermuda_scanner.async_as_scanner_get_stamp(\"11:22:33:44:55:66\") assert stamp == 678.90 # Test async_as_scanner_get_stamp", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "agittins/bermuda", + "expected": "ICON_DEFAULT_AREA", + "got": "ICON_DEFAULT_AREA", + "got_raw": "ICON_DEFAULT_AREA + \"1\" + ICON_DEFAULT_FLOOR + \"1\" + ICON_DEFAULT_FLOOR + \"1\" + ICON_DEFAULT_FLOOR + \"1\" + ICON_DEFAULT_FLOOR + \"1\" + ICON_DEFAULT_FLOOR + \"1\" + ICON_DEFAULT_FLOOR + \"1\" + ICON_DEFAULT_FLOOR + \"1\" + ICON_DEFAULT_FLOOR + \"1\" + ICON_DEFAULT_FLOOR + \"1\" + ICON_DEFAULT_FLOOR + \"1\" + ICON_DEFAULT_FLOOR + \"1\" + ICON_DEFAULT_FLOOR + \"1\" + ICON_DEFAULT_FLOOR + \"1\" + ICON_DEFAULT_F", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "agittins/bermuda", + "expected": "mock_scanner_device", + "got": "mock_scanner_device.address.lower()", + "got_raw": "mock_scanner_device.address.lower() + \":\" + mock_scanner_device.name.lower() + \":\" + mock_scanner_device.area_id.lower() + \":\" + mock_scanner_device.area_name.lower() + \":\" + mock_scanner_device.ref_power.lower() + \":\" + mock_scanner_device.name_bt_local_name.lower() + \":\" + mock_scanner_device.name.lower() + \":\" + mock_scanner_device.address.lower() + \":\" + mock_scanner_device.name.lower() + \":\" + mock_scanner_device.name.lower() + \":\" + mock_scanner_device.name.lower() + \":\" + mock_scanner_device.name.lower() + \":\" + mock_sc", + "exact_match": false, + "code_bleu": 0.18575057999133598, + "edit_similarity": 0.7037037037037037 + }, + { + "repo": "agittins/bermuda", + "expected": "123.45", + "got": "123.4567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567", + "got_raw": "123.4567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.08955223880597014 + }, + { + "repo": "agittins/bermuda", + "expected": "123.45", + "got": "123.4500000000000123450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "123.4500000000000123450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.08955223880597014 + }, + { + "repo": "agittins/bermuda", + "expected": "ICON_DEFAULT_FLOOR", + "got": "ICON_DEFAULT_FLOOR", + "got_raw": "ICON_DEFAULT_FLOOR + \"1\" + ICON_DEFAULT_FLOOR + \"2\" + ICON_DEFAULT_FLOOR + \"3\" + ICON_DEFAULT_FLOOR + \"4\" + ICON_DEFAULT_FLOOR + \"5\" + ICON_DEFAULT_FLOOR + \"6\" + ICON_DEFAULT_FLOOR + \"7\" + ICON_DEFAULT_FLOOR + \"8\" + ICON_DEFAULT_FLOOR + \"9\" + ICON_DEFAULT_FLOOR + \"10\" + ICON_DEFAULT_FLOOR + \"11\" + ICON_DEFAULT_FLOOR + \"12\" + ICON_DEFAULT_FLOOR + \"13\" + ICON_DEFAULT_FLOOR + \"1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "agittins/bermuda", + "expected": "-20", + "got": "-20.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "-20.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.04580152671755725 + }, + { + "repo": "agronholm/apscheduler", + "expected": "None", + "got": "None", + "got_raw": "None # date1 is after date2 so it will not be used either # (threshold is 1) # (date1 is before date2 so it will be used) # (date2 is after date1 so it will be used) # (date2 is after date1 so it will be used) # (date2 is after date1 so it will be used) # (date2 is after date1 so it will be used) # (date2 is after date1 so it will be used) # (date2 is after date1 so it will be used", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "agronholm/apscheduler", + "expected": "\"Cannot create a reference to a nested function\"", + "got": "\"Cannot serialize nested function\" \" 'nested'\" \" at 'test_callable_to_ref..nested'\" \" (nested function cannot be serialized)\" \" (nested function cannot be serialized)\" \" (nested function cannot be serialized)\" \" (nested function cannot be serialized)\" \" (nested function cannot be serialized)\" \" (nested function cannot be serialized)\" \" (nested function cannot be serialized)\" \" (nested function cannot be serialized)\" \" (nested function cannot be serialized)\" \" (nested function cannot be serialized)\" \" (nested function cannot be serialized)\" \" (nested function cannot be serialized)\" \" (nested function cannot be serialized)\" \" (", + "got_raw": "\"Cannot serialize nested function\" \" 'nested'\" \" at 'test_callable_to_ref..nested'\" \" (nested function cannot be serialized)\" \" (nested function cannot be serialized)\" \" (nested function cannot be serialized)\" \" (nested function cannot be serialized)\" \" (nested function cannot be serialized)\" \" (nested function cannot be serialized)\" \" (nested function cannot be serialized)\" \" (nested function cannot be serialized)\" \" (nested function cannot be serialized)\" \" (nested function cannot be serialized)\" \" (nested function cannot be serialized)\" \" (nested function cannot be serialized)\" \" (nested function cannot be serialized)\" \" (", + "exact_match": false, + "code_bleu": 0.057259987315337726, + "edit_similarity": 0.08127721335268505 + }, + { + "repo": "agronholm/apscheduler", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) from CronTrigger.from_crontab(\"1,2,3\")\nassert str(exc.value) == \"Expected 5 fields, got 3 instead\"\n\n\ndef test_from_crontab_wrong_field_type():\n\n exc = pytest.raises(\n### Target:\nTypeError) from CronTrigger.from_crontab(\"1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "agronholm/apscheduler", + "expected": "None", + "got": "None", + "got_raw": "None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "agronholm/apscheduler", + "expected": "MaxIterationsReached)", + "got": "MaxIterationsReached)", + "got_raw": "MaxIterationsReached) for _ in range(100): trigger.check(start_time) start_time += timedelta(seconds=4)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "agronholm/apscheduler", + "expected": "pkg2.varname", + "got": "pkg2.varname()", + "got_raw": "pkg2.varname() # noqa: E501 pylint: disable=pointless-statement # noqa: E501 pylint: disable=pointless-statement # noqa: E501 pylint: disable=pointless-statement # noqa: E501 pylint: disable=pointless-statement # noqa: E501 pylint: disable=pointless-statement # noqa: E501 pylint: disable=pointless-statement # noqa: E501 pylint: disable=pointless-statement # noqa: E501 pylint: disable", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.9230769230769231 + }, + { + "repo": "agronholm/apscheduler", + "expected": "correct_next_date", + "got": "correct_next_date", + "got_raw": "correct_next_date", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "agronholm/apscheduler", + "expected": "timestamp", + "got": "timestamp.replace(tzinfo=UTC)", + "got_raw": "timestamp.replace(tzinfo=UTC) # type: ignore caplog.text == \"Exception in subscriber\\nfoo\\n\" caplog.text != \"\" caplog.text != \"Exception in subscriber\\n\" caplog.text != \"foo\\n\" caplog.text != \"\" caplog.text != \"Exception in subscriber\\n\" caplog.text != \"foo\\n\" caplog.text != \"\" caplog.text != \"Exception in subscriber\\n\" caplog.text != \"foo\\n\" caplog.text != \"\" caplog.text != \"Exception in subscriber\\n\" caplog.text != \"foo", + "exact_match": false, + "code_bleu": 0.16036590969929357, + "edit_similarity": 0.47368421052631576 + }, + { + "repo": "aimagelab/mammoth", + "expected": "'2000'", + "got": "'100'", + "got_raw": "'100' assert namespace_dict['mlp_dropout'] == '0.1' assert namespace_dict['mlp_activation'] == 'relu' assert namespace_dict['mlp_batch_norm'] == 'True' assert namespace_dict['mlp_bias'] == 'True' assert namespace_dict['mlp_layers'] == '2' assert namespace_dict['mlp_dropout'] == '0.1' assert namespace_dict['mlp_activation'] == 'relu' assert namespace_dict['mlp_batch_norm'] == 'True' assert namespace_dict['mlp_bias'] == 'True' assert namespace_dict['mlp_layers'] ==", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.7272727272727273 + }, + { + "repo": "aimagelab/mammoth", + "expected": "'adam'", + "got": "'Adam'", + "got_raw": "'Adam' assert namespace_dict['lr'] == '1e-4' assert namespace_dict['n_epochs'] == '1' assert namespace_dict['batch_size'] == '4' assert namespace_dict['buffer_size'] == '50' assert namespace_dict['seed'] == '0' assert namespace_dict['debug_mode'] == '1' assert namespace_dict['non_verbose'] == '1' assert namespace_dict['num_workers'] == '0' assert namespace_dict['model'] == 'ccic' assert namespace_dict['dataset'] == 'seq-cifar10' assert namespace_dict['log_dir'] == 'logs", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.8333333333333334 + }, + { + "repo": "aimagelab/mammoth", + "expected": "'weak'", + "got": "'weak'", + "got_raw": "'weak' and config['transform_type'] != 'strong' and config['transform_type'] == 'weak' and namespace_dict['backbone'] == 'resnet18' and config['backbone'] == 'resnet18' and namespace_dict['noise_rate'] == '0.4' and config['noise_rate'] == '0.4' and namespace_dict['noise_type'] == 'symmetric' and config['noise_type'] == 'symmetric' and namespace_dict['seed'] == '0' and config['seed'] == '0' and namespace_dict['num_workers'] == '0'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aimagelab/mammoth", + "expected": "2", + "got": "2", + "got_raw": "2, 'Arguments not printed correctly' assert 'num_layers' in args_line[0] and 'num_filters' in args_line[1] assert 'num_layers' in args_line[0].lower() and 'num_filters' in args_line[1].lower() assert 'num_layers' in args_line[0].lower() and 'num_filters' in args_line[1].lower() assert 'num_layers' in args_line[0].lower() and 'num_filters' in args_line[1].lower() assert 'num_layers' in args_line[0].lower() and 'num_filters' in args", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aimagelab/mammoth", + "expected": "'1'", + "got": "'1'", + "got_raw": "'1' f'Found {namespace_dict[\"n_epochs\"]} but expected 1' assert namespace_dict['transform_type'] == 'strong' f'Found {namespace_dict[\"transform_type\"]} but expected strong' assert namespace_dict['backbone'] == 'resnet34' f'Found {namespace_dict[\"backbone\"]} but expected resnet34'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aio-libs/aiomysql", + "expected": "res2", + "got": "res2", + "got_raw": "res2 - res1 - 1 # 1 because we deleted 1 row in conn2 # and 1 because we deleted 1 row in conn1 # and 1 because we inserted 1 row in conn1 # and 1 because we inserted 1 row in conn2 # and 1 because we inserted 1 row in conn1 # and 1 because we inserted 1 row in conn2 # and 1 because we inserted 1 row in conn1 # and 1 because we inserted 1 row in conn2 # and 1 because we inserted 1 row in conn1 # and 1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aio-libs/aiomysql", + "expected": "3024", + "got": "1200", + "got_raw": "1200 # ER_QUERY_TIMEOUT # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E50", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.25 + }, + { + "repo": "aio-libs/aiomysql", + "expected": "1", + "got": "b[0]", + "got_raw": "b[0] and r['value'] == b[1] or r['value'] == a[1] or r['value'] == 11 or r['value'] == 22 or r['value'] == 1 or r['value'] == 11 or r['value'] == 22 or r['value'] == 11 or r['value'] == 11 or r['value'] == 11 or r['value'] == 11 or r['value'] == 11 or r['value'] == 11 or r['value'] ==", + "exact_match": false, + "code_bleu": 0.3021375397356768, + "edit_similarity": 0.0 + }, + { + "repo": "aio-libs/aiomysql", + "expected": "str(w[-1].message)", + "got": "str(w[0].message)", + "got_raw": "str(w[0].message) + \"Incorrect integer value\" in str(w[1].message) + \"Incorrect integer value\" in str(w[2].message) + \"Incorrect integer value\" in str(w[3].message) + \"Incorrect integer value\" in str(w[4].message) + \"Incorrect integer value\" in str(w[5].message) + \"Incorrect integer value\" in str(w[6].message) + \"Incorrect integer value\" in str(w[7].message) + \"Incorrect integer value\" in str(w[8].message) + \"Incorrect integer value\" in str(w", + "exact_match": false, + "code_bleu": 0.5922333058286215, + "edit_similarity": 0.9142857142857143 + }, + { + "repo": "aio-libs/aiomysql", + "expected": "InterfaceError)", + "got": "NotSupportedError)", + "got_raw": "NotSupportedError) as e: await cur.fetchall() assert str(e.value) == \"fetchall() not supported by SSCursor\" await cur.close() await conn.close()", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.48484848484848486 + }, + { + "repo": "aio-libs/aiomysql", + "expected": "([('foo', 'bar')], [('bar', 'bat')]))", + "got": "[[\"foo\", \"bar\"], [\"baz\", \"qux\"]]) self.assertEqual(_distill_params([[\"foo\", \"bar\"], [\"baz\", \"qux\"]]), [(\"foo\", \"bar\"), (\"baz\", \"qux\")]) self.assertEqual(_distill_params([[\"foo\", \"bar\"], [\"baz\", \"qux\"], [\"foo\", \"bar\"]]), [(\"foo\", \"bar\"), (\"baz\", \"qux\"), (\"foo\", \"bar\")]) self.assertEqual(_distill_params([[\"foo\", \"bar\"], [\"baz\", \"qux\"], [\"foo\", \"bar\"], [\"baz\",", + "got_raw": "[[\"foo\", \"bar\"], [\"baz\", \"qux\"]]) self.assertEqual(_distill_params([[\"foo\", \"bar\"], [\"baz\", \"qux\"]]), [(\"foo\", \"bar\"), (\"baz\", \"qux\")]) self.assertEqual(_distill_params([[\"foo\", \"bar\"], [\"baz\", \"qux\"], [\"foo\", \"bar\"]]), [(\"foo\", \"bar\"), (\"baz\", \"qux\"), (\"foo\", \"bar\")]) self.assertEqual(_distill_params([[\"foo\", \"bar\"], [\"baz\", \"qux\"], [\"foo\", \"bar\"], [\"baz\",", + "exact_match": false, + "code_bleu": 0.039034559240589704, + "edit_similarity": 0.12626262626262627 + }, + { + "repo": "aio-libs/aiomysql", + "expected": "e.args[0]", + "got": "e.args[0]", + "got_raw": "e.args[0] assert \"Can't connect to MySQL server on 127.0.0.1 (10061)\" == e.args[1] assert \"Can't connect to MySQL server on 127.0.0.1 (10061)\" == str(e) assert \"Can't connect to MySQL server on 127.0.0.1 (10061)\" == repr(e) assert \"Can't connect to MySQL server on 127.0.0.1 (10061)\" == e.args[2", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aio-libs/aiomysql", + "expected": "ProgrammingError)", + "got": "NotSupportedError)", + "got_raw": "NotSupportedError) as excinfo: await cursor.scroll(1) assert str(excinfo.value) == 'Cannot scroll in SSCursor' with pytest.raises(NotSupportedError) as excinfo: await cursor.scroll(1, mode='first') assert str(excinfo.value) == 'Cannot scroll in SSCursor' with pytest.raises(NotSupportedError) as excinfo: await cursor.scroll(1, mode='last') assert str(excinfo.value) == 'Cannot scroll in SSCursor' with pytest.raises(NotSupportedError) as excinfo: await cursor.scroll(1, mode='end') assert str(excinfo.value)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.45714285714285713 + }, + { + "repo": "aio-libs/aiomysql", + "expected": "pool.size", + "got": "len(pool._connections)", + "got_raw": "len(pool._connections) == len(pool._free_connections) == len(pool._pending) == 0 == len(pool._waiters) == 0 == len(pool._pending_close) == 0 == len(pool._pending_close_waiters) == 0 == len(pool._pending_close_waiters) == 0 == len(pool._pending_close_waiters) == 0 == len(pool._pending_close_waiters) == 0 == len(pool._pending_close_waiters) == 0 == len(pool._pending_close_waiters) == 0 == len(pool._pending_close_waiters) == 0 == len(pool", + "exact_match": false, + "code_bleu": 0.2907153684841096, + "edit_similarity": 0.3870967741935484 + }, + { + "repo": "aio-libs/aiomysql", + "expected": "row.id", + "got": "row[1]", + "got_raw": "row[1] == 1 == row['name'] == 'first' == row['name'] == 'first' == row['name'] == 'first' == row['name'] == 'first' == row['name'] == 'first' == row['name'] == 'first' == row['name'] == 'first' == row['name'] == 'first' == row['name'] == 'first' == row['name'] == 'first' == row['name'] == 'first' == row['name'] == 'first' == row['name'] == 'first' == row['name", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.5 + }, + { + "repo": "aio-libs/aiomysql", + "expected": "22", + "got": "22", + "got_raw": "22\n finally:\n await c.execute(\"drop table a\")\n await c.execute(\"drop table b\")\n\n@pytest.mark.run_loop\nasync def test_issue_80(connection):\n \"\"\" DictCursor should return a dict with the column names as keys \"\"\"\n conn = connection\n c = await conn.cursor(aiomysql.cursors.DictCursor)\n\n await c.execute(\"drop table if exists a\")\n await c.execute(\"drop table if exists b\")\n await c.execute(\"\"\"CREATE TABLE a (id int, value int)\"\"\")\n await c.execute(\"\"\"CREATE TABLE b (id int", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aio-libs/aiomysql", + "expected": "(1,)", + "got": "(1,)", + "got_raw": "(1,)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aio-libs/aiomysql", + "expected": "True", + "got": "True", + "got_raw": "True\n\n await cur.close()\n await con.close()\n\n\n@pytest.mark.run_loop\nasync def test_autocommit_rollback(connection_creator):\n con = await connection_creator()\n await con.autocommit(True)\n cur = await con.cursor()\n await cur.execute(\"SET AUTOCOMMIT=0\")\n await cur.execute(\"SELECT 1\")\n await cur.execute(\"SELECT 2\")\n await cur.execute(\"SELECT 3\")\n await cur.execute(\"SELECT 4\")\n await cur.execute(\"SELECT 5\")\n await cur.execute(\"SELECT 6\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aio-libs/aiomysql", + "expected": "True", + "got": "True", + "got_raw": "True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aio-libs/aiomysql", + "expected": "1", + "got": "1.0", + "got_raw": "1.0\n\n # commit transaction\n await connection.commit()\n # make sure transaction flag is down\n transaction_flag = connection.get_transaction_status()\n assert not transaction_flag\n\n # start transaction again\n await connection.begin()\n # make sure transaction flag is up again\n transaction_flag = connection.get_transaction_status()\n assert transaction_flag\n\n await cursor.execute('SELECT 2;')\n (r, ) = await cursor.fetchone()\n\n assert r == 2.0\n\n # rollback transaction\n await connection.rollback()\n # make sure transaction flag is down again\n transaction_flag = connection", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "aiogram/aiogram", + "expected": "str(event)", + "got": "str(event)", + "got_raw": "str(event) + \"\\n\" + str(event.__dict__) + \"\\n\" + str(event.__doc__) + \"\\n\" + str(event.__module__) + \"\\n\" + str(event.__class__.__doc__) + \"\\n\" + str(event.__class__.__module__) + \"\\n\" + str(event.__class__.__name__) + \"\\n\" + str(event.__class__.__bases__) + \"\\n\" + str(event.__class__.__dict__) + \"\\n\" + str(event.__class__.__mro__) + \"\\n\" + str(event.__class__.__subclasses__()) + \"\\n\" + str(event.__", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aiogram/aiogram", + "expected": "value", + "got": "value", + "got_raw": "value", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aiogram/aiogram", + "expected": "\"uk\"", + "got": "\"uk\"", + "got_raw": "\"uk\" # noqa: WPS432 # pylint: disable=no-member # noqa: WPS432 # pylint: disable=no-member # noqa: WPS432 # pylint: disable=no-member # noqa: WPS432 # pylint: disable=no-member # noqa: WPS432 # pylint: disable=no-member # noqa: WPS432 # pylint: disable=no-member # noqa: WPS432 # pylint: disable=no-member # noqa: WPS432 # pylint:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aiogram/aiogram", + "expected": "\"test\"", + "got": "\"my\"", + "got_raw": "\"my\" # noqa: E501\n\n with pytest.raises(TypeError) as exc_info:\n CallbackData(\"my\", \"my\") # noqa: E501\n\n assert str(exc_info.value) == \"Prefix must be a string\" # noqa: E501\n\n def test_init_subclass_prefix_not_allowed(self):\n\n assert MyCallback.__prefix__ == \"my\" # noqa: E501\n\n with pytest.raises(TypeError) as exc_info:\n CallbackData(\"my\", \"my\", prefix=\"my\") # noqa: E5", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4 + }, + { + "repo": "aiogram/aiogram", + "expected": "\"true\"", + "got": "True", + "got_raw": "True == bot.session.prepare_value(Default(\"protect_content\"), bot=bot, files={}) == False == bot.session.prepare_value( Default(\"link_preview_is_disabled\"), bot=bot, files={}, ) == True == bot.session.prepare_value( Default(\"link_preview_is_disabled\"), bot=bot, files={}, ) == False == bot.session.prepare_value( Default(\"link_preview_is_disabled\"), bot=bot, files={}, ) == True == bot.session.prepare_value( Default(\"link_preview_is_disabled\"), bot=bot, files={}, ) == False == bot.session.prepare_value( Default(\"link_preview_is_disabled\"), bot=bot, files={}, )", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6 + }, + { + "repo": "aiogram/aiogram", + "expected": "prepare_result.result", + "got": "prepare_result.result", + "got_raw": "prepare_result.result", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aiogram/aiogram", + "expected": "None", + "got": "None", + "got_raw": "None # No bot in the context # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aiogram/aiogram", + "expected": "generator.bar", + "got": "generator.bar", + "got_raw": "generator.bar\n\n def test_getitem(self):\n generator = FlagGenerator()\n assert isinstance(generator[\"foo\"], FlagDecorator)\n assert isinstance(generator[\"bar\"], FlagDecorator)\n\n assert generator[\"foo\"] is not generator[\"foo\"]\n\n assert generator[\"foo\"] is not generator[\"bar\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aiogram/aiogram", + "expected": "prepare_result.result", + "got": "prepare_result.result", + "got_raw": "prepare_result.result", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aiogram/aiogram", + "expected": "json.dumps", + "got": "json.dumps", + "got_raw": "json.dumps # noqa: E731 pylint: disable=protected-access, redefined-builtin, invalid-name, redefined-outer-name, redefined-outer-name, redefined-outer-name, redefined-outer-name, redefined-outer-name, redefined-outer-name, redefined-outer-name, redefined-outer-name, redefined-outer-name, redefined-outer-name, redefined-outer-name, redefined-outer-name, redefined-outer-name, redefined-outer-name, redefined-outer-name, redefined-outer-name, redefined-outer-name, re", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aiogram/aiogram", + "expected": "\"baz\"", + "got": "\"bar\"", + "got_raw": "\"bar\" await storage.set_data(storage_key, {\"foo\": \"bar\"}) await storage.set_value(storage_key, \"foo\", \"bar\") assert await storage.get_data(storage_key) == {\"foo\": \"bar\"} assert await storage.get_value(storage_key, \"foo\") == \"bar\" assert await storage.get_value(storage_key, \"bar\") is None assert await storage.get_value(storage_key, \"foo\", \"bar\") == \"bar\" assert await storage.get_value(storage_key, \"bar\", \"foo\") == \"foo\" assert await storage.get_value(storage_key, \"bar\", \"bar\") == \"bar\" assert await", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.8 + }, + { + "repo": "aiogram/aiogram", + "expected": "1", + "got": "1", + "got_raw": "1 # type: ignore # noqa: E701 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aiogram/aiogram", + "expected": "event.user_chat_id", + "got": "event.chat.id", + "got_raw": "event.chat.id + event.user_chat_id * 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.7741935483870968 + }, + { + "repo": "aiogram/aiogram", + "expected": "id(markup)", + "got": "id(markup)", + "got_raw": "id(markup) markup.to_dict() == builder._markup.to_dict() builder._markup = None builder.export() is None builder._markup = markup builder.export() == markup builder._markup = None builder.export() is None builder._markup = markup.to_dict() builder.export() == markup.to_dict() builder._markup = None builder.export() is None builder._markup = markup.to_list() builder.export() == markup.to_list() builder._markup = None builder.export() is None builder._markup = markup.to_dict_list() builder.export() == markup.to_dict_list() builder._markup = None builder.export() is None builder._markup", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aiogram/aiogram", + "expected": "3", + "got": "2", + "got_raw": "2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "aiogram/aiogram", + "expected": "\"or\"", + "got": "\"!\"", + "got_raw": "\"!\" and entities == []\n\n def test_getitem_slice_inside_parent(self):\n node = Text(\"Hello, \", Bold(\"World\"), \"!\")\n new_node = node[8:]\n assert isinstance(new_node, Text) and new_node.text == \"!\" and new_node.entities == []\n\n def test_getitem_slice_outside(self):\n node = Text(\"Hello, \", Bold(\"World\"), \"!\")\n new_node = node[10:]\n assert isinstance(new_node, Text) and new_node.text == \"\" and new_node.entities == []\n\n def test_getitem_slice_outside2(self", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5714285714285714 + }, + { + "repo": "aiogram/aiogram", + "expected": "1", + "got": "1", + "got_raw": "1 or chunk_size == 2 or chunk_size == 3 or chunk_size == 4 or chunk_size == 5 or chunk_size == 6 or chunk_size == 7 or chunk_size == 8 or chunk_size == 9 or chunk_size == 10 or chunk_size == 11 or chunk_size == 12 or chunk_size == 13 or chunk_size == 14 or chunk_size == 15 or chunk_size == 16 or chunk_size == 17 or chunk_size == 18 or chunk_size == 19 or chunk_size == 20 or chunk", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aiogram/aiogram", + "expected": "event", + "got": "event", + "got_raw": "event assert handler.key == 42 assert handler.chat is None assert handler.message is None assert handler.callback_query is None assert handler.inline_query is None assert handler.chosen_inline_result is None assert handler.pre_checkout_query is None assert handler.shipping_query is None assert handler.poll is None assert handler.poll_answer is None assert handler.edited_message is None assert handler.edited_channel_post is None assert handler.channel_post is None assert handler.chat_member is None assert handler.chat_join_request is None assert handler.my_chat_member is None assert handler.my_chat_join_request is", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aiogram/aiogram", + "expected": "None", + "got": "None", + "got_raw": "None # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aiogram/aiogram", + "expected": "node", + "got": "node", + "got_raw": "node new_node.text == \"Hello, \" new_node.entities == [] new_node.children == [] new_node._children == [] new_node._children[0] == Bold(\"World\") new_node._children[0].text == \"World\" new_node._children[0].entities == [] new_node._children[0].children == [] new_node._children[0]._children == [] new_node._children[0]._children[0] == Text(\"World\") new_node._children[0]._children[0].text == \"World\" new_node._children[0]._children[0].entities == [] new_node._", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "alexmojaki/futurecoder", + "expected": "\"Settings\"", + "got": "\"Settings\"", + "got_raw": "\"Settings\" settings_button.click() assert driver.find_element(By.CSS_SELECTOR, \".menu-popup .btn.btn-secondary\").text.strip() == \"Feedback\" driver.find_element(By.CSS_SELECTOR, \".menu-popup .btn.btn-secondary\").click() assert driver.find_element(By.CSS_SELECTOR, \".menu-popup .btn.btn-primary\").text.strip() == \"Settings\" driver.find_element(By.CSS_SELECTOR, \".menu-popup .btn.btn-primary\").click() assert driver.find_element(By.CSS_SELECTOR, \".menu-popup .btn.btn-secondary\").text.strip() == \"Sign out\" driver.find_element(By.CSS_SELECTOR, \".menu-popup .btn.btn-secondary\").click()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "alexmojaki/futurecoder", + "expected": "8)", + "got": "8)", + "got_raw": "8) assert_equal(quadruple(3), 12) assert_equal(quadruple(4), 16) assert_equal(quadruple(5), 20) assert_equal(quadruple(6), 24) assert_equal(quadruple(7), 28) assert_equal(quadruple(8), 32) assert_equal(quadruple(9), 36) assert_equal(quadruple(10), 40) \"\"\" \"\"\" def quadruple(x): return x * 4 \"\"\" \"\"\" def quadruple(x): return x * 2 * 2 \"\"\" \"\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "alexmojaki/futurecoder", + "expected": "parsons", + "got": "parsons", + "got_raw": "parsons\n\ndef get_test_steps_code():\n return \"\"\"\\\nthings = ['This', 'is', 'a', 'list']\n\nprint(things[0])\nprint(things[1])\nprint(things[2])\nprint(things[3])\"\"\" + \"\\n\" + \"\"\"\\n\"\"\" + \"\"\"\\n\"\"\" + \"\"\"\\n\"\"\" + \"\"\"\\n\"\"\" + \"\"\"\\n\"\"\" + \"\"\"\\n\"\"\" + \"\"\"\\n\"\"\" + \"\"\"\\n\"\"\" + \"\"\"\\n\"\"\" + \"\"\"\\n\"\"\" + \"\"\"\\n\"\"\" + \"\"\"\\n\"\"\" + \"\"\"\\n\"\"\" + \"\"\"\\n\"\"\" + \"\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "alexmojaki/futurecoder", + "expected": "\"step_name_here\"", + "got": "\"Step\"", + "got_raw": "\"Step\" \"Step classes must have a __name__ attribute\" \"and it must be 'Step'\" \"It must have a 'solution' attribute\" \"It must have a 'test_values' attribute\" \"It must have a 'inputs' attribute\" \"It must have a 'show_solution' attribute\" \"It must have a 'show_solution_program' attribute\" \"It must have a 'show_solution_code' attribute\" \"It must have a 'show_solution_code' attribute\" \"It must have a 'show_solution_code' attribute\" \"It must have a 'show_solution_code' attribute\" \"It must have", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.45454545454545453 + }, + { + "repo": "alexmojaki/futurecoder", + "expected": "not parsons", + "got": "parsons is False or hint_num < num_hints - 1 or parsons is True and hint_num == num_hints - 1 - 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "parsons is False or hint_num < num_hints - 1 or parsons is True and hint_num == num_hints - 1 - 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.05538696232597745, + "edit_similarity": 0.09803921568627451 + }, + { + "repo": "alexmojaki/futurecoder", + "expected": "vc2)", + "got": "vc2)", + "got_raw": "vc2) # noqa\n elif isinstance(t1, dict): # noqa\n assert set(t1.keys()) == set(t2.keys()) # noqa\n for k in t1: # noqa\n self.assert_trees_equal(t1[k], t2[k]) # noqa\n else: # noqa\n assert str(t1) == str(t2) # noqa\n\nclass MessageStep(Step):\n after_success = True\n\n def check(self):\n if self.program_in_text:\n return dict(message=t.Terms.program_in_text)\n return None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "alexzhang13/rlm", + "expected": "\"tracked\"", + "got": "\"tracked\"", + "got_raw": "\"tracked\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "alexzhang13/rlm", + "expected": "None", + "got": "None", + "got_raw": "None\n\n def test_prepare_contents_list(self):\n \"\"\"Test _prepare_contents with list input.\"\"\"\n with patch(\"rlm.clients.gemini.genai.Client\"):\n client = GeminiClient(api_key=\"test-key\")\n contents, system = client._prepare_contents([\"Hello\", \"world\"])\n assert contents == \"Hello\\nworld\"\n assert system is None\n\n def test_prepare_contents_dict(self):\n \"\"\"Test _prepare_contents with dict input.\"\"\"\n with patch(\"rlm.clients.gemini.genai.Client\"):\n client = GeminiClient(api_key=\"test-key\")\n contents, system = client._prepare", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "alexzhang13/rlm", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "alexzhang13/rlm", + "expected": "2", + "got": "2", + "got_raw": "2\n assert blocks[0].code == \"a = 1\" assert blocks[1].code == \"b = 2\" assert blocks[0].start == 0 assert blocks[0].end == 16 assert blocks[1].start == 24 assert blocks[1].end == 38 assert blocks[0].context == \"\" assert blocks[1].context == \"\" assert blocks[0].line_number == 1 assert blocks[1].line_number == 2 \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "alexzhang13/rlm", + "expected": "6", + "got": "6.0", + "got_raw": "6.0 assert repl.locals.get(\"b\") == 4.0 assert repl.locals.get(\"c\") == 100.0 assert repl.locals.get(\"d\") == 200.0 repl.execute_code(\"print(a, b, c, d)\") repl.print_output() repl.print_output() repl.print_output() repl.print_output() repl.print_output() repl.print_output() repl.print_output() repl.print_output() repl.print_output() repl.print_output() repl.print_output() repl.print_output() repl.print_output() repl.print", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "alexzhang13/rlm", + "expected": "captured_child_params", + "got": "captured_child_params", + "got_raw": "captured_child_params and captured_child_params[\"max_timeout\"] == 50.000000000000002562626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "alexzhang13/rlm", + "expected": "True", + "got": "True", + "got_raw": "True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "alexzhang13/rlm", + "expected": "2", + "got": "2", + "got_raw": "2 * 2 + 1 # 2 calls for each question, plus 1 for the final call with the model override. \"\"\"subcall_fn should be called with the model argument.\"\"\" subcall_fn.assert_any_call(\"q1\", model=\"custom-model\") subcall_fn.assert_any_call(\"q2\", model=\"custom-model\") subcall_fn.assert_any_call(\"q1\", model=\"custom-model\") subcall_fn.assert_any_call(\"q2\", model=\"custom-model\") subcall_fn.assert_any_call(\"q1\", model=\"custom-model\") subcall_fn.assert_any_call(\"q2\", model=\"custom", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "alexzhang13/rlm", + "expected": "out.stdout", + "got": "out.strip()", + "got_raw": "out.strip()", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.5714285714285714 + }, + { + "repo": "alexzhang13/rlm", + "expected": "second_env", + "got": "second_env", + "got_raw": "second_env # The same environment instance is reused.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "alexzhang13/rlm", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "alexzhang13/rlm", + "expected": "[]", + "got": "[]", + "got_raw": "[]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "alexzhang13/rlm", + "expected": "\"4\"", + "got": "\"4\"", + "got_raw": "\"4\" # Final response found after 2 iterations. def test_final_after_max_depth(self): \"\"\"depth=2 should find FINAL() after max_depth iterations.\"\"\" with patch.object(rlm_module, \"get_client\") as mock_get_client: mock_lm = create_mock_lm( [ \"Let me think...\\n```repl\\nx = 1 + 1\\nprint(x)\\n```\", \"Now I know.\\n```repl\\ny = x * 2\\nprint(y)\\n```\", \"FINAL(4)\", ] ) mock_get_client.return_value = mock_lm rlm = RLM( backend", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "alisaifee/flask-limiter", + "expected": "response.status_code", + "got": "response.status_code", + "got_raw": "response.status_code == 200 == response.text == \"ok\" timeline.add(hiro.Action(\"t1\", \"GET\", \"127.0.0.1\")) response = cli.get(\"/t1\") assert 200 == response.status_code == 200 == response.text == \"ok maybe\" timeline.add(hiro.Action(\"t1\", \"GET\", \"127.0.0.1\")) response = cli.get(\"/t1\") assert 429 == response.status_code == 429 == response.text == \"Too many requests\" timeline.add(hiro.Action(\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "alisaifee/flask-limiter", + "expected": "1", + "got": "1", + "got_raw": "1 limiter.limit(\"1/minute\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test\")(\"test", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "alisaifee/flask-limiter", + "expected": "MemoryStorage", + "got": "MemoryStorage", + "got_raw": "MemoryStorage limiter = Limiter(get_remote_address) limiter.init_app(app) assert type(limiter._storage) is MemoryStorage limiter = Limiter(get_remote_address) limiter.init_app(app) assert type(limiter._storage) is MemoryStorage limiter = Limiter(get_remote_address) limiter.init_app(app) assert type(limiter._storage) is MemoryStorage limiter = Limiter(get_remote_address) limiter.init_app(app) assert type(limiter._storage) is MemoryStorage limiter = Limiter(get_remote_address) limiter.init_app(app) assert type(limiter._storage) is MemoryStorage lim", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "alisaifee/flask-limiter", + "expected": "b\"tres\"", + "got": "b\"tres\"", + "got_raw": "b\"tres\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "alisaifee/flask-limiter", + "expected": "result.output", + "got": "result.output.lower()", + "got_raw": "result.output.lower() result = runner.invoke(cli, [\"stats\"]) assert \"No Flask-Limiter extension installed\" in result.output.lower() result = runner.invoke(cli, [\"reset\"]) assert \"No Flask-Limiter extension installed\" in result.output.lower() result = runner.invoke(cli, [\"clear\"]) assert \"No Flask-Limiter extension installed\" in result.output.lower() result = runner.invoke(cli, [\"summary\"]) assert \"No Flask-Limiter extension installed\" in result.output.lower() result = runner.invoke(cli, [\"top-ips\"]) assert \"No Flask-Limiter extension installed\" in result.output.lower() result = runner.invoke(cli, [\"", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.7647058823529411 + }, + { + "repo": "allmonday/pydantic-resolve", + "expected": "True", + "got": "True", + "got_raw": "True # \u6b64\u5904\u5047\u8bbe get_all_users \u662f\u4e00\u4e2a QueryConfig \u5bf9\u8c61\u7684\u5b9e\u4f8b", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "allmonday/pydantic-resolve", + "expected": "2", + "got": "2", + "got_raw": "2 counter[\"n\"] == 2 assert result.users[0].name == 'tangkikodo' assert result.users[1].name == 'john' assert result.users[1].friends[0] == 'mike' assert result.users[1].friends[1] == 'wallace' assert result.users[2].name == 'tom' assert result.users[2].friends[0] == 'jerry' assert result.users[2].friends[1] == 'tom' assert result.users[3].name == 'jerry' assert result.users[3].friends[0] == '", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "allmonday/pydantic-resolve", + "expected": "(annotation,)", + "got": "annotation", + "got_raw": "annotation # type: ignore # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 #", + "exact_match": false, + "code_bleu": 0.14865088937534013, + "edit_similarity": 0.8695652173913043 + }, + { + "repo": "allmonday/pydantic-resolve", + "expected": "[('world', False)]", + "got": "[('world', True)]", + "got_raw": "[('world', True)]\n\n\ndef test_get_class_field_annotations_not_provided():\n class B:\n hello: str = 'hello'\n\n class C:\n hello: str\n\n def __init__(self, c: str):\n self.c = c\n \n class D(C):\n pass\n\n class E(C):\n world: str\n \n assert list(pydantic_resolve.utils.class_util.get_fields_default_value_not_provided(B)) == [('hello', True)]\n assert list(pydantic_resolve.utils.class_util.get_fields_default_value_not_provided(C)) == [('hello', False)]\n ", + "exact_match": false, + "code_bleu": 0.5946035575013605, + "edit_similarity": 0.8 + }, + { + "repo": "allmonday/pydantic-resolve", + "expected": "[('hello', True)]", + "got": "['hello'] assert list(pydantic_resolve.utils.class_util.get_fields_default_value_not_provided(C)) == [] assert list(pydantic_resolve.utils.class_util.get_fields_default_value_not_provided(D)) == ['c'] assert list(pydantic_resolve.utils.class_util.get_fields_default_value_not_provided(E)) == ['world'] assert list(pydantic_resolve.utils.class_util.get_fields_default_value_not_provided(C, True)) == ['hello'] assert list(pydantic_resolve.utils.class_util.get_fields_default_value_not_provided(D, True)) == ['c'] assert list(pydantic_resolve.utils.class_util.get_fields_default_value", + "got_raw": "['hello'] assert list(pydantic_resolve.utils.class_util.get_fields_default_value_not_provided(C)) == [] assert list(pydantic_resolve.utils.class_util.get_fields_default_value_not_provided(D)) == ['c'] assert list(pydantic_resolve.utils.class_util.get_fields_default_value_not_provided(E)) == ['world'] assert list(pydantic_resolve.utils.class_util.get_fields_default_value_not_provided(C, True)) == ['hello'] assert list(pydantic_resolve.utils.class_util.get_fields_default_value_not_provided(D, True)) == ['c'] assert list(pydantic_resolve.utils.class_util.get_fields_default_value", + "exact_match": false, + "code_bleu": 0.023821563539533516, + "edit_similarity": 0.05342237061769616 + }, + { + "repo": "allmonday/pydantic-resolve", + "expected": "None", + "got": "None", + "got_raw": "None # User should be None since user_id_str is None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "allmonday/pydantic-resolve", + "expected": "expected", + "got": "expected", + "got_raw": "expected # noqa: E501 c.name = 'world' result = await Resolver().resolve(c) assert result.model_dump() == { 'name': 'world', } # noqa: E501 c.name = 'hello' result = await Resolver().resolve(c) assert result.model_dump() == { 'name': 'hello', } # noqa: E501 c.name = 'world' result = await Resolver().resolve(c) assert result.model_dump() == { 'name': 'world', } # noqa: E501 c.name = 'hello' result = await Resolver().", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "allmonday/pydantic-resolve", + "expected": "ImportError)", + "got": "AttributeError)", + "got_raw": "AttributeError) as exc_info: self.er_diagram.create_graphql_route() assert str(exc_info.value) == \"create_graphql_route \u5df2\u88ab\u79fb\u9664\" assert self.er_diagram.graphql_route is None assert self.er_diagram.graphql_schema is None assert self.er_diagram.graphql_schema_str is None assert self.er_diagram.graphql_schema_dict is None assert self.er_diagram.graphql_schema_file is None assert self.er_diagram.graphql_schema_file_path is None assert self.er_diagram.graphql_schema_file_content is None assert self.er_diagram.graphql_schema_file_content_str is None assert self.er_di", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5185185185185185 + }, + { + "repo": "allmonday/pydantic-resolve", + "expected": "\"a\"", + "got": "\"1\"", + "got_raw": "\"1\" assert d[0].user_ids == [1] assert d[0].user_ids_str == \"1\" assert d[1].user_ids == [] assert d[1].user_ids_str == \"\" assert d[0].user_ids_str == \"1\" assert d[0].user_ids == [1] assert d[0].user_ids_str == \"1\" assert d[0].user_ids == [1] assert d[0].user_ids_str == \"1\" assert d[0].user_ids == [1] assert d[0].user_ids_str == \"1\" assert d", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "allmonday/pydantic-resolve", + "expected": "TypeError)", + "got": "ValueError)", + "got_raw": "ValueError) as exc_info: await earth.resolve() assert str(exc_info.value) == \"Bad Earth\" assert earth._resolver is not None assert earth._resolver._resolver is None assert earth._resolver._resolver is earth._resolver._resolver assert earth._resolver._resolver is earth._resolver._resolver._resolver assert earth._resolver._resolver._resolver is earth._resolver._resolver._resolver._resolver assert earth._resolver._resolver._resolver._resolver is earth._resolver._resolver._resolver._resolver._resolver assert earth._resolver._resolver._resolver._resolver._resolver is earth._resolver._resolver._resolver._resolver._resolver._", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "allmonday/pydantic-resolve", + "expected": "[\"foo1\", \"foo2\"]", + "got": "[\"foo1\", \"foo2\"]", + "got_raw": "[\"foo1\", \"foo2\"] # noqa: E501\n\n\n@pytest.mark.asyncio\nasync def test_resolver_factory_with_er_configs_inherit2():\n MyResolver = config_resolver('MyResolver', er_diagram=BASE_ENTITY.get_diagram())\n d = [BizCase2(id=1, name=\"qq\", user_id=1, user_ids=[1], user_ids_str='1,2'), BizCase2(id=2, name=\"ww\", user_id=2)]\n d = await MyResolver().resolve(d)\n\n assert d[0].user.name == \"a\" ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "allmonday/pydantic-resolve", + "expected": "expected", + "got": "expected", + "got_raw": "expected\n\n\n@pytest.mark.asyncio\nasync def test_resolver_factory_of_er_relationship_not_found_with_default():\n MyResolver = config_resolver('MyResolver', er_diagram=diagram, default=Entity())\n d = BizCase6(id=1, user_id=1)\n expected = Entity()\n result = await MyResolver().resolve(d)\n assert result == expected\n\n\n@pytest.mark.asyncio\nasync def test_resolver_factory_of_er_relationship_not_found_with_default_and_loader():\n MyResolver = config_resolver(\n 'MyResolver', er_diagram=diagram, default=Entity(), loader=loader", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "allmonday/pydantic-resolve", + "expected": "address_def['required']", + "got": "address_def['required']", + "got_raw": "address_def['required'] assert 'city' in address_def['required'] assert 'street' in address_def['properties'] assert 'city' in address_def['properties'] assert 'city' in address_def['properties']['city'] assert 'city' in address_def['properties']['city']['title'] assert 'city' in address_def['properties']['city']['description'] assert 'city' in address_def['properties']['city']['format'] assert 'city' in address_def['properties']['city']['enum'] assert 'city' in address_def['properties']['city']['title'] assert 'city' in address_def['properties']['city", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "allmonday/pydantic-resolve", + "expected": "True", + "got": "True", + "got_raw": "True # True if the details are compared with the items # False if the details are not compared with the items # None if the details are not compared with the items and the items are not compared with the names # None if the details are compared with the items and the items are compared with the names # None if the details are compared with the names and the names are compared with the items # None if the details are compared with the names and the names are not compared with the items # None if the details are not compared with the names and the names are compared with the items # None if the details are not compared with the names and", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "allmonday/pydantic-resolve", + "expected": "expected", + "got": "expected", + "got_raw": "expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "allmonday/pydantic-resolve", + "expected": "['b1', 'b2']", + "got": "['a'] + ['b'] * 2 + ['c'] * 2 + ['d'] * 2 + ['e'] * 2 + ['f'] * 2 + ['g'] * 2 + ['h'] * 2 + ['i'] * 2 + ['j'] * 2 + ['k'] * 2 + ['l'] * 2 + ['m'] * 2 + ['n'] * 2 + ['o'] * 2 + ['p'] * 2 + ['q'] * 2 + ['r'] * 2 + ['s'] *", + "got_raw": "['a'] + ['b'] * 2 + ['c'] * 2 + ['d'] * 2 + ['e'] * 2 + ['f'] * 2 + ['g'] * 2 + ['h'] * 2 + ['i'] * 2 + ['j'] * 2 + ['k'] * 2 + ['l'] * 2 + ['m'] * 2 + ['n'] * 2 + ['o'] * 2 + ['p'] * 2 + ['q'] * 2 + ['r'] * 2 + ['s'] * ", + "exact_match": false, + "code_bleu": 0.012019567322977048, + "edit_similarity": 0.04329004329004329 + }, + { + "repo": "allmonday/pydantic-resolve", + "expected": "User", + "got": "User", + "got_raw": "User # type: ignore # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "allmonday/pydantic-resolve", + "expected": "3", + "got": "3", + "got_raw": "3", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "allmonday/pydantic-resolve", + "expected": "expected", + "got": "expected", + "got_raw": "expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "allmonday/pydantic-resolve", + "expected": "2", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "amerkurev/doku", + "expected": "0", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "amerkurev/doku", + "expected": "'DU scanner stopped.')", + "got": "'DU scanner stopped.')", + "got_raw": "'DU scanner stopped.')", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "amerkurev/doku", + "expected": "1)", + "got": "10)", + "got_raw": "10)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.8 + }, + { + "repo": "amerkurev/doku", + "expected": "[ call('/host/path', obj, ANY), call('/host/path', obj, ANY), call('/host/path', obj, ANY), ])", + "got": "obj) mock_kvstore_set.assert_any_call('bind_mounts', ANY) mock_kvstore_set.assert_any_call('bind_mounts', ANY) mock_kvstore_set.assert_any_call('bind_mounts', ANY) mock_kvstore_set.assert_any_call('bind_mounts', ANY) mock_kvstore_set.assert_any_call('bind_mounts', ANY) mock_kvstore_set.assert_any_call('bind_mounts', ANY) mock_kvstore_set.assert_any_call('bind_mounts', ANY) mock_kvstore_set.assert_any_call('bind_mounts', ANY) mock_kvstore_set.assert_any_call('bind_mounts', ANY)", + "got_raw": "obj) mock_kvstore_set.assert_any_call('bind_mounts', ANY) mock_kvstore_set.assert_any_call('bind_mounts', ANY) mock_kvstore_set.assert_any_call('bind_mounts', ANY) mock_kvstore_set.assert_any_call('bind_mounts', ANY) mock_kvstore_set.assert_any_call('bind_mounts', ANY) mock_kvstore_set.assert_any_call('bind_mounts', ANY) mock_kvstore_set.assert_any_call('bind_mounts', ANY) mock_kvstore_set.assert_any_call('bind_mounts', ANY) mock_kvstore_set.assert_any_call('bind_mounts', ANY)", + "exact_match": false, + "code_bleu": 0.06700500541121483, + "edit_similarity": 0.1565217391304348 + }, + { + "repo": "amerkurev/doku", + "expected": "LOGGER_NAME)", + "got": "LOGGER_NAME)", + "got_raw": "LOGGER_NAME) mock_formatter_class.assert_called_once_with() mock_handler.setFormatter.assert_called_once_with(mock_formatter) mock_logger.addHandler.assert_called_once_with(mock_handler) mock_logger.setLevel.assert_called_once_with(logging.INFO) if in_docker: mock_logger.propagate = False else: mock_logger.propagate = True mock_logger.info.assert_called_once_with('Logger configured') mock_logging.StreamHandler.assert_called_once_with() mock_formatter_class.assert_called_once_with() mock_handler.setFormatter.assert_called_once_with(mock_formatter) mock_logger.addHandler.assert_called_once_with(mock_handler) mock_logger.setLevel.assert_called_once_with(logging.INFO) if in_docker: mock_logger.prop", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "amerkurev/doku", + "expected": "2", + "got": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "amerkurev/doku", + "expected": "Path('/dest/subdir/file.txt')", + "got": "'/dest/subdir/file.txt'", + "got_raw": "'/dest/subdir/file.txt' # noqa: E501 mock_exists.assert_called_once_with('/source/subdir/file.txt') mock_exists.return_value = False mock_exists.assert_called_once_with('/source/subdir/file.txt') result = map_host_path_to_container('/source', '/dest', '/source/subdir/file.txt') assert result == '/source/subdir/file.txt' # noqa: E501 mock_exists.return_value = True mock_exists.assert_called_once_with('/source/subdir/file.txt') mock_exists.return_value = False mock_exists.assert_called_once_with('/source/subdir/file.txt') result = map_host_path", + "exact_match": false, + "code_bleu": 0.14865088937534013, + "edit_similarity": 0.8846153846153846 + }, + { + "repo": "amerkurev/doku", + "expected": "[ call('image', images, ANY), call('container', DockerContainerList.model_validate(df_data['Containers']), ANY), call('volume', volumes, ANY), call('build_cache', DockerBuildCacheList.model_validate(df_data['BuildCache']), ANY), call('root_mount', docker_mount, ANY), ])", + "got": "[ images, volumes, DockerBuildCacheList.model_validate(df_data['BuildCache']), ]) mock_kvstore_set.assert_has_calls([ call('images', ANY), call('volumes', ANY), call('build_cache', ANY), ]) mock_kvstore_set.assert_called_once_with('containers', [ mock_container ]) mock_container.attrs['Mounts'] = [docker_mount] mock_container.name = 'container1' mock_container.attrs['Image'] = 'sha256:123456789abcdef' mock_container.attrs['Mounts'] = [docker_mount] mock_container.name = 'container1' mock_container", + "got_raw": "[ images, volumes, DockerBuildCacheList.model_validate(df_data['BuildCache']), ]) mock_kvstore_set.assert_has_calls([ call('images', ANY), call('volumes', ANY), call('build_cache', ANY), ]) mock_kvstore_set.assert_called_once_with('containers', [ mock_container ]) mock_container.attrs['Mounts'] = [docker_mount] mock_container.name = 'container1' mock_container.attrs['Image'] = 'sha256:123456789abcdef' mock_container.attrs['Mounts'] = [docker_mount] mock_container.name = 'container1' mock_container", + "exact_match": false, + "code_bleu": 0.3212029049656909, + "edit_similarity": 0.18393782383419688 + }, + { + "repo": "amerkurev/doku", + "expected": "'main:app'", + "got": "'web'", + "got_raw": "'web' assert kwargs['host'] == '0.0.0.0' assert kwargs['port'] == 8080 assert kwargs['reload'] is True assert kwargs['debug'] is True assert kwargs['workers'] == 1 assert kwargs['log_level'] == 'info' assert kwargs['access_log'] is False assert kwargs['ssl_keyfile'] == '' assert kwargs['ssl_certfile'] == '' assert kwargs['ssl_keyfile_password'] is None assert kwargs['ssl_ca_certs'] is None assert kwargs['ssl_ciphers'] is None assert kwargs['ssl_dhparam'] is None assert kwargs", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.26666666666666666 + }, + { + "repo": "amosjyng/langchain-visualizer", + "expected": "\"ell\"", + "got": "\"l\"", + "got_raw": "\"l\" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \" \"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.75 + }, + { + "repo": "amosjyng/langchain-visualizer", + "expected": "results[-1]", + "got": "results[2]", + "got_raw": "results[2] or \"heavy rain\" in results[2].lower() or \"heavy rain\" in results[2].title() or \"heavy rain\" in results[2].upper() or \"heavy rain\" in results[2].replace(\" \", \"\") or \"heavy rain\" in results[2].replace(\" \", \"_\") or \"heavy rain\" in results[2].replace(\" \", \"-\") or \"heavy rain\" in results[2].replace(\" \", \"/\") or \"heavy rain\" in results[2].replace(\" \", \":\") or \"heavy rain\" in results[2].replace(\" \", \";", + "exact_match": false, + "code_bleu": 0.4065061985236918, + "edit_similarity": 0.8571428571428571 + }, + { + "repo": "amosjyng/langchain-visualizer", + "expected": "( \"hello \", FValue(source=\"foo\", value=\"world\", formatted=\"world\"), )", + "got": "[\"hello \", FValue(source=\"foo\", formatted=\"world\")]", + "got_raw": "[\"hello \", FValue(source=\"foo\", formatted=\"world\")]", + "exact_match": false, + "code_bleu": 0.5788847486954929, + "edit_similarity": 0.8166666666666667 + }, + { + "repo": "amosjyng/langchain-visualizer", + "expected": "result.strip()", + "got": "result.lower()", + "got_raw": "result.lower() or \"Jagged Little Pill\" in result.upper() or \"Jagged Little Pill\" in result.title() or \"Jagged Little Pill\" in result.capitalize() or \"Jagged Little Pill\" in result.swapcase() or \"Jagged Little Pill\" in result.replace(\" \", \"\") or \"Jagged Little Pill\" in result.replace(\" \", \"_\") or \"Jagged Little Pill\" in result.replace(\" \", \"-\") or \"Jagged Little Pill\" in result.replace(\" \", \"/\") or \"Jagged Little Pill\" in result.replace(\" \", \".\") or \"Jagged Little Pill\" in result.replace(\"", + "exact_match": false, + "code_bleu": 0.45180100180492244, + "edit_similarity": 0.7142857142857143 + }, + { + "repo": "ansible-community/ansible-bender", + "expected": "logs", + "got": "logs.lower()", + "got_raw": "logs.lower() + \"\\n\" + \"TASK [echo hello]\" in logs.lower() + \"\\n\" + \"TASK [echo world]\" in logs.lower() + \"\\n\" + \"PLAY [registry\" in logs.lower() + \"\\n\" + \"TASK [echo hello]\" in logs.lower() + \"\\n\" + \"TASK [echo world]\" in logs.lower() + \"\\n\" + \"PLAY [registry\" in logs.lower() + \"\\n\" + \"TASK [echo hello]\" in logs.lower() + \"\\n\" + \"TASK [echo world]\" in logs.lower() + \"\\n\" + \"PLAY", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5 + }, + { + "repo": "ansible-community/ansible-bender", + "expected": "\"leonardo\"", + "got": "\"1000\"", + "got_raw": "\"1000\" assert m.sudo == \"true\" assert m.sudo_user == \"1001\" assert m.sudo_password == \"1234\" assert m.sudo_prompt == \"password:\" assert m.sudo_timeout == \"10\" assert m.sudo_user_password == \"1001:1234\" assert m.sudo_user_timeout == \"1001:10\" assert m.sudo_user_prompt == \"1001:password:\" assert m.sudo_user_timeout == \"1001:10\" assert m.sudo_user_password", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.25 + }, + { + "repo": "ansible-community/ansible-bender", + "expected": "\"ls\"", + "got": "[\"echo\"", + "got_raw": "[\"echo\", \"hello\"] assert b.build_env == [\"FOO=BAR\"] assert b.build_args == [\"FOO=BAR\"] assert b.buildah_extra_args == [\"--some\", \"--args\"] assert b.podman_extra_args == [\"--network=host\"] assert b.podman_extra_args == [\"--network=host\"] assert b.podman_extra_args == [\"--network=host\"] assert b.podman_extra_args == [\"--network=host\"] assert b.podman_extra_args == [\"--network=host\"] assert b.podman_extra_args == [\"--network=host\"] assert b", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.36363636363636365 + }, + { + "repo": "ansible-community/ansible-bender", + "expected": "\"quay.io/biocontainers/python:3\"", + "got": "\"python:3.6\"", + "got_raw": "\"python:3.6\" \"python:3.6\" \"python:3.6\" \"python:3.6\" \"python:3.6\" \"python:3.6\" \"python:3.6\" \"python:3.6\" \"python:3.6\" \"python:3.6\" \"python:3.6\" \"python:3.6\" \"python:3.6\" \"python:3.6\" \"python:3.6\" \"python:3.6\" \"python:3.6\" \"python:3.6\" \"python", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.45454545454545453 + }, + { + "repo": "ansible-community/ansible-bender", + "expected": "4", + "got": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "ansible-community/ansible-bender", + "expected": "\"challet\"", + "got": "\"myimage\"", + "got_raw": "\"myimage\" + \"2\" + \"3\" + \"4\" + \"5\" + \"6\" + \"7\" + \"8\" + \"9\" + \"10\" + \"11\" + \"12\" + \"13\" + \"14\" + \"15\" + \"16\" + \"17\" + \"18\" + \"19\" + \"20\" + \"21\" + \"22\" + \"23\" + \"24\" + \"25\" + \"26\" + \"27\" + \"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4444444444444444 + }, + { + "repo": "ansible-community/ansible-bender", + "expected": "\"y\"", + "got": "\"y\"", + "got_raw": "\"y\" assert inspect_data[\"Config\"][\"Env\"] == [\"asd=\" + data_dir] assert inspect_data[\"Config\"][\"Image\"] == \"quay.io/biocontainers/python:3\" assert inspect_data[\"Config\"][\"Cmd\"] == [\"python\", \"-c\", \"print('Hello, World!')\"] assert inspect_data[\"Config\"][\"WorkingDir\"] == \"/src\" assert inspect_data[\"Config\"][\"User\"] == \"0\" assert inspect_data[\"Config\"][\"ExposedPorts\"] == {\"80/tcp\": {}, \"443/tcp\": {}} assert inspect_data[\"Config\"][\"Volumes\"] == [\"/src:Z\"] assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ansible-community/ansible-bender", + "expected": "0", + "got": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "ansible-community/ansible-bender", + "expected": "cmd_e", + "got": "cmd_e", + "got_raw": "cmd_e if cmd_e else cmd.split() if cmd else [] if cmd else [\"ls\", \"-lha\"] if cmd else [\"ls\", \"-lha\"] if cmd else [\"ls\", \"-lha\"] if cmd else [\"ls\", \"-lha\"] if cmd else [\"ls\", \"-lha\"] if cmd else [\"ls\", \"-lha\"] if cmd else [\"ls\", \"-lha\"] if cmd else [\"ls\", \"-lha\"] if cmd else [\"ls\", \"-lha\"] if cmd else [\"ls\", \"-lha\"] if cmd else [\"ls\", \"-lha\"] if cmd else [\"ls", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "anthropics/anthropic-sdk-python", + "expected": "snapshot( { \"anyOf\": [ {\"type\": \"string\"}, { \"type\": \"integer\", \"description\": \"{minimum: 1}\", }, ] } )", + "got": "snapshot( { \"type\": \"string\", \"oneOf\": [ {\"type\": \"integer\", \"minimum\": 1}, ], } )", + "got_raw": "snapshot( { \"type\": \"string\", \"oneOf\": [ {\"type\": \"integer\", \"minimum\": 1}, ], } )", + "exact_match": false, + "code_bleu": 0.4740628579623091, + "edit_similarity": 0.745945945945946 + }, + { + "repo": "anthropics/anthropic-sdk-python", + "expected": "obj2", + "got": "obj2", + "got_raw": "obj2 assert id(obj1) != id(obj2) def test_deepcopy_minimal() -> None: obj1 = [1, 2, 3] obj2 = deepcopy_minimal(obj1) assert_different_identities(obj1, obj2) obj1.append(4) assert_different_identities(obj1, obj2) obj2.append(5) assert obj1 == [1, 2, 3, 4] assert obj2 == [1, 2, 3, 5] def test_deepcopy_minimal_with_custom_class() -> None: class CustomClass: def __init__(", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "anthropics/anthropic-sdk-python", + "expected": "custom_schema", + "got": "custom_schema", + "got_raw": "custom_schema # type: ignore assert function_tool.name == \"some_function\" assert function_tool.description == \"Double the input number\" assert function_tool.return_type == str assert function_tool.args == [\"x\"] assert function_tool.kwargs == [] assert function_tool.func == some_function assert function_tool._input_schema == custom_schema assert function_tool._output_schema == None assert function_tool._docstring == None assert function_tool._docstring_template == None assert function_tool._docstring_args == [] assert function_tool._docstring_kwargs == [] assert function_tool._docstring_returns ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "anthropics/anthropic-sdk-python", + "expected": "snapshot({\"type\": \"string\"})", + "got": "snapshot({\"type\": \"string\"})", + "got_raw": "snapshot({\"type\": \"string\"}) # noqa: E501 def test_string_schema_with_format(): schema = {\"type\": \"string\", \"format\": \"email\"} result = transform_schema(schema) assert result == snapshot({\"type\": \"string\", \"format\": \"email\"}) def test_string_schema_with_format_and_pattern(): schema = { \"type\": \"string\", \"format\": \"email\", \"pattern\": r\"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$\", } result = transform_schema(schema) assert result == snapshot(", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "anthropics/anthropic-sdk-python", + "expected": "snapshot({\"type\": \"null\"})", + "got": "snapshot({\"type\": \"null\"})", + "got_raw": "snapshot({\"type\": \"null\"})", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "anthropics/anthropic-sdk-python", + "expected": "\"json_schema\"", + "got": "\"json_schema\"", + "got_raw": "\"json_schema\" assert body[\"output_config\"][\"format\"][\"schema\"] == { \"type\": \"object\" } assert body[\"output_config\"][\"format\"][\"schema\"][\"$schema\"] == \"http://json-schema.org/draft-07/schema#\" assert body[\"output_config\"][\"format\"][\"schema\"][\"$id\"] == \"test\" assert body[\"output_config\"][\"format\"][\"schema\"][\"$defs\"] == {} assert body[\"output_config\"][\"format\"][\"schema\"][\"$comment\"] == \"\" assert body[\"output_config\"][\"format\"][\"schema\"][\"$schema\"] == \"http://json-schema.org/draft-07/schema#\" assert body[\"output", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "anthropics/anthropic-sdk-python", + "expected": "{\"prop\": None}", + "got": "DateDictWithRequiredAlias( required_prop=None", + "got_raw": "DateDictWithRequiredAlias( required_prop=None, ) assert await transform({\"required_prop\": \"2022-01-01\"}, DateDictWithRequiredAlias, use_async) == DateDictWithRequiredAlias( required_prop=date(2022, 1, 1), ) assert await transform({\"required_prop\": \"2022-01-01T12:00:00Z\"}, DateDictWithRequiredAlias, use_async) == DateDictWithRequiredAlias( required_prop=datetime(2022, 1, 1, 12, 0", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.2711864406779661 + }, + { + "repo": "anthropics/anthropic-sdk-python", + "expected": "\"foo\"", + "got": "\"foo\"", + "got_raw": "\"foo\" assert foo(b=\"bar\") == \"bar\" assert foo(a=\"foo\", b=\"bar\") == \"foo\" assert foo(a=\"foo\", b=\"bar\", c=\"baz\") == \"baz\" assert foo(a=\"foo\", c=\"baz\") == \"foo\" assert foo(b=\"bar\", c=\"baz\") == \"bar\" assert foo() is None assert foo(a=\"foo\", b=\"bar\", c=\"baz\", d=\"qux\") == \"baz\" assert foo(a=\"foo\", b=\"bar\", c=\"baz\", d=\"qux\", e=\"quux\") == \"qu", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "anthropics/anthropic-sdk-python", + "expected": "\"in[]=foo&in[]=bar\"", + "got": "\"in[]=foo&in[]=bar\"", + "got_raw": "\"in[]=foo&in[]=bar\" assert unquote(serialise({\"in\": [\"foo\", \"bar\", \"baz\"]})) == \"in[]=foo&in[]=bar&in[]=baz\" assert unquote(serialise({\"in\": [\"foo\", \"bar\", \"baz\", \"qux\"]})) == \"in[]=foo&in[]=bar&in[]=baz&in[]=qux\" assert unquote(serialise({\"in\": [\"foo\", \"bar\", \"baz\", \"qux\", \"quux\"]})) == \"in[]=foo&in[]=bar&in[]=baz&in[]=qux&in[]=", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "anthropics/anthropic-sdk-python", + "expected": "\"8\"", + "got": "\"8\"", + "got_raw": "\"8\" def test_function_call_with_invalid_input(self) -> None: def add_numbers(a: int, b: int) -> str: \"\"\"Add two numbers together.\"\"\" return str(a + b) function_tool = beta_tool(add_numbers) with pytest.raises(TypeError) as exc_info: function_tool.call({\"a\": \"5\", \"b\": 3}) assert str(exc_info.value) == \"int expected for 'a', received str instead\" def test_function_call_with_missing_input(self) -> None: def add_numbers(a: int, b: int) -> str: ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "anthropics/anthropic-sdk-python", + "expected": "type(None)", + "got": "NoneType", + "got_raw": "NoneType # noqa: E701 # noqa: E701 # noqa: E701 # noqa: E701 # noqa: E701 # noqa: E701 # noqa: E701 # noqa: E701 # noqa: E701 # noqa: E701 # noqa: E701 # noqa: E701 # noqa: E701 # noqa: E701 # noqa: E701 # noqa: E7", + "exact_match": false, + "code_bleu": 0.125, + "edit_similarity": 0.4444444444444444 + }, + { + "repo": "anthropics/anthropic-sdk-python", + "expected": "checking_client.beta.messages.tool_runner)", + "got": "snapshot(", + "got_raw": "snapshot( checking_client._tools[0].run(\"San Francisco, CA\", \"c\") ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "exact_match": false, + "code_bleu": 0.1129502504512306, + "edit_similarity": 0.0784313725490196 + }, + { + "repo": "anthropics/anthropic-sdk-python", + "expected": "\"a[b]=c\"", + "got": "\"a[b]=c\"", + "got_raw": "\"a[b]=c\" # noqa: E501\n\n\ndef test_nested_lists() -> None:\n\n assert unquote(stringify({\"a\": [\"b\", \"c\"]})) == \"a[b]=b&a[c]=c\" # noqa: E501\n\n\ndef test_nested_dicts() -> None:\n\n assert unquote(stringify({\"a\": {\"b\": \"c\"}})) == \"a[b]=c\" # noqa: E501\n\n\ndef test_nested_dicts_with_lists() -> None:\n\n assert unquote(stringify({\"a\": {\"b\": [\"c\", \"d\"]}}))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "anthropics/anthropic-sdk-python", + "expected": "snapshot( { \"type\": \"string\", \"description\": \"\"\"\\ User email {default: user@example.com}\\ \"\"\", \"format\": \"email\", } )", + "got": "snapshot( { \"type\": \"string\", \"format\": \"email\", \"description\": \"User email\", \"default\": \"user@example.com\", } ) def test_string_schema_with_format_and_default_and_title(): schema = { \"type\": \"string\", \"format\": \"email\", \"default\": \"user@example.com\", \"title\": \"User email\", \"description\": \"User email\", } result = transform_schema(schema) assert result == snapshot( { \"type\": \"string\", \"format\": \"email\", \"title\": \"User email\", \"description\": \"User email\", \"default\": \"user@example.com\", }", + "got_raw": "snapshot( { \"type\": \"string\", \"format\": \"email\", \"description\": \"User email\", \"default\": \"user@example.com\", } ) def test_string_schema_with_format_and_default_and_title(): schema = { \"type\": \"string\", \"format\": \"email\", \"default\": \"user@example.com\", \"title\": \"User email\", \"description\": \"User email\", } result = transform_schema(schema) assert result == snapshot( { \"type\": \"string\", \"format\": \"email\", \"title\": \"User email\", \"description\": \"User email\", \"default\": \"user@example.com\", }", + "exact_match": false, + "code_bleu": 0.14177843797718206, + "edit_similarity": 0.3657331136738056 + }, + { + "repo": "anthropics/anthropic-sdk-python", + "expected": "{\"foo\": \"bar\"}", + "got": "{\"foo\": \"bar\"}", + "got_raw": "{\"foo\": \"bar\"} # type: ignore # noqa: E501 # The original query is not modified. files = [{\"name\": \"file1.txt\", \"content\": \"Hello, world!\"}], paths = [\"file1.txt\"] # noqa: E501 # The file is added to the files list. assert extract_files(query, paths) == files # The original query is not modified. files = [{\"name\": \"file1.txt\", \"content\": \"Hello, world!\"}], paths = [\"file1.txt\", \"file2.txt\"] # noqa", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "anthropics/anthropic-sdk-python", + "expected": "tracked_types", + "got": "tracked_types", + "got_raw": "tracked_types, f\"Type {block_type} should be tracked\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "anthropics/anthropic-sdk-python", + "expected": "profiles[0][\"region\"]", + "got": "\"us-east-2\"", + "got_raw": "\"us-east-2\" # type: ignore # noqa: E501", + "exact_match": false, + "code_bleu": 0.07142857142857142, + "edit_similarity": 0.1875 + }, + { + "repo": "anthropics/anthropic-sdk-python", + "expected": "bytes", + "got": "str", + "got_raw": "str # type: ignore # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa:", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.25 + }, + { + "repo": "anthropics/anthropic-sdk-python", + "expected": "{\"foo\": \"bar\"}", + "got": "{\"foo\": \"bar\"} assert await transform({\"foo\": \"bar\"}", + "got_raw": "{\"foo\": \"bar\"} assert await transform({\"foo\": \"bar\"}, str, use_async) == \"bar\" assert await transform({\"foo\": \"bar\"}, int, use_async) == 42 assert await transform({\"foo\": \"bar\"}, bool, use_async) == True assert await transform({\"foo\": \"bar\"}, float, use_async) == 3.141592653589793 assert await transform({\"foo\": \"bar\"}, date, use_async) == date(2021, 1, 1) assert await transform({\"foo\": \"bar\"},", + "exact_match": false, + "code_bleu": 0.3237722713145643, + "edit_similarity": 0.42424242424242425 + }, + { + "repo": "anthropics/anthropic-sdk-python", + "expected": "2", + "got": "2", + "got_raw": "2 # type: ignore # respx_mock.calls[0].url.path == request_url + \"?max_tokens=1024\" # respx_mock.calls[0].headers[\"authorization\"] == \"Bearer my-access-token\" # respx_mock.calls[0].headers[\"content-type\"] == \"application/json\" # respx_mock.calls[0].json() == { \"messages\": [ { \"role\": \"user\", \"content\": \"Say hello there!\", }, ], \"model\": \"claude-3-sonnet@20240229\", } # res", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "apiflask/apiflask", + "expected": "{}", + "got": "{}", + "got_raw": "{} # Empty schema is returned as is. # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E5", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "apiflask/apiflask", + "expected": "3", + "got": "3.0000000000000004", + "got_raw": "3.0000000000000004 # 3.0000000000000004 is the float representation of 3.0000000000000004 in Python 3.6.3 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 ", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.10526315789473684 + }, + { + "repo": "apiflask/apiflask", + "expected": "204", + "got": "204", + "got_raw": "204 rv = client.delete('/bar') assert rv.status_code == 204 rv = client.delete('/foo', data={'foo': 'bar'}) assert rv.status_code == 422 rv = client.delete('/bar', data={'foo': 'bar'}) assert rv.status_code == 204 rv = client.delete('/bar', data={'foo': 'bar'}) assert rv.status_code == 204 rv = client.delete('/bar', data={'foo': 'bar'}) assert rv.status_code == 204 rv = client.delete('/bar', data={'foo': 'bar'}) assert rv.status", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "apiflask/apiflask", + "expected": "200", + "got": "200", + "got_raw": "200", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "apiflask/apiflask", + "expected": "100", + "got": "100", + "got_raw": "100 // 20 + 1 == 100 // 20 + 1 == 5 + 1 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 == 6 ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "apiflask/apiflask", + "expected": "result.output", + "got": "rv.data.decode()", + "got_raw": "rv.data.decode() else rv.data.decode() == json.dumps( app.spec.to_dict(), indent=2, sort_keys=True ) + '\\n'", + "exact_match": false, + "code_bleu": 0.18575057999133598, + "edit_similarity": 0.20689655172413793 + }, + { + "repo": "apiflask/apiflask", + "expected": "servers", + "got": "servers[0:2]", + "got_raw": "servers[0:2] if len(servers) > 1 else servers[0] if len(servers) == 1 else [] if len(servers) == 0 else None if len(servers) > 2 else servers[2] if len(servers) == 2 else None if len(servers) > 3 else servers[3] if len(servers) == 3 else None if len(servers) > 4 else servers[4] if len(servers) == 4 else None if len(servers) > 5 else servers[5] if len(servers) == ", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.7368421052631579 + }, + { + "repo": "apiflask/apiflask", + "expected": "'tags'", + "got": "'tags'", + "got_raw": "'tags' rv.json['components']['schemas']['DelimitedListQuery'] == { 'title': 'DelimitedListQuery', 'type': 'array', 'items': {'type': 'string'}, 'minItems': 1, 'maxItems': 100, } rv.json['components']['schemas']['User'] == { 'title': 'User', 'type': 'object', 'properties': { 'id': {'title': 'Id', 'type': 'string', 'format': 'uuid'}, 'name': {'title': 'Name', 'type': 'string'}, 'tags': {'$ref':", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "apiflask/apiflask", + "expected": "app.info['description']", + "got": "app.info['description']", + "got_raw": "app.info['description'] assert rv.json['info']['termsOfService'] == app.info['termsOfService'] assert rv.json['info']['contact'] == app.info['contact'] assert rv.json['info']['license'] == app.info['license']", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "apiflask/apiflask", + "expected": "'foo'", + "got": "'foo'", + "got_raw": "'foo' rv.json['paths']['/{foo}/bar']['get']['parameters'][0]['in'] == 'path' rv.json['paths']['/{foo}/bar']['get']['parameters'][0]['required'] == True rv.json['paths']['/{foo}/bar']['get']['parameters'][0]['schema'] == {'type': 'string'} rv.json['paths']['/{foo}/bar']['get']['parameters'][0]['style'] == 'simple' rv.json['paths']['/{foo}/bar']['get']['parameters'][0]['explode'] == False rv.json['paths']['/{foo}/bar']['get']['parameters'][0]['", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "apiflask/apiflask", + "expected": "123", + "got": "123", + "got_raw": "123 assert rv.json['status'] == 'not_found'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "apiflask/apiflask", + "expected": "data", + "got": "data", + "got_raw": "data | {'_schema': {}} | {'_schema_version': 1} | {'_schema_type': 'EmptySchema'} | {'_schema_location': None} | {'_schema_data': None} | {'_schema_errors': None} | {'_schema_status': None} | {'_schema_message': None} | {'_schema_extra': None} | {'_schema_fields': None} | {'_schema_fields_by_name': None} | {'_schema_fields_by_location': None} | {'_schema_fields_by_type': None} | {'_schema_fields_by_location_and_type': None} | {'_", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "apiflask/apiflask", + "expected": "'Unknown'", + "got": "'1234'", + "got_raw": "'1234' 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.26666666666666666 + }, + { + "repo": "apiflask/apiflask", + "expected": "{}", + "got": "'application/png'", + "got_raw": "'application/png' in rv.json['components']['schemas']['File'][\"content\"]['schema'][\"type\"]['enum'] )", + "exact_match": false, + "code_bleu": 0.25, + "edit_similarity": 0.0 + }, + { + "repo": "apiflask/apiflask", + "expected": "content", + "got": "content['schema']", + "got_raw": "content['schema'] else 'image/png' in content['schema']['application/octet-stream'] else 'image/png' in content['schema']['text/html'] else 'image/png' in content['schema']['text/css'] else 'image/png' in content['schema']['text/javascript'] else 'image/png' in content['schema']['application/x-www-form-urlencoded'] else 'image/png' in content['schema']['multipart/form-data'] else 'image/png' in content['schema']['application/x-www-form-urlencoded'] else 'image/png' in content['schema']['application/x-www-form-urlencoded'] else 'image/png' in content['schema", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.5833333333333334 + }, + { + "repo": "apiflask/apiflask", + "expected": "201", + "got": "201", + "got_raw": "201 assert rv.json == {'id': 123, 'name': 'foo'} rv = client.get('/baz') assert rv.status_code == 201 assert rv.json == {'name': 'baz'} assert rv.headers['Location'] == '/baz' rv = client.get('/baz?id=1') assert rv.status_code == 202 assert rv.json == {'name': 'baz'} assert rv.headers['Location'] == '/baz' rv = client.get('/baz?id=2') assert rv.status_code == 202 assert rv.json == {'name': 'baz'} assert rv.headers", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "apiflask/apiflask", + "expected": "['Parent']", + "got": "['Parent']", + "got_raw": "['Parent'] assert rv.json['paths']['/parent/child/']['get']['tags'] == ['Child'] assert rv.json['paths']['/parent/child/bar/']['get']['tags'] == ['Child'] assert rv.json['paths']['/parent/bar/']['get']['tags'] == ['Parent'] assert rv.json['paths']['/parent/child/child/']['get']['tags'] == ['Child'] assert rv.json['paths']['/parent/child/child/bar/']['get']['tags'] == ['Child'] assert rv.json['paths']['/parent/child/child/bar/bar/']['get']['tags']", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "apiflask/apiflask", + "expected": "200", + "got": "200", + "got_raw": "200\nassert rv.data == b'Hello, World!'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "apiflask/apiflask", + "expected": "TypeError)", + "got": "ValueError)", + "got_raw": "ValueError) as e: response = client.get('/') assert response.status_code == 422 assert e.value.args[0] == 'Invalid base response schema' assert e.value.args[1] == 'Base response schema cannot be empty' assert e.value.args[2] == 'BaseResponse' assert e.value.args[3] == 'string' assert e.value.args[4] == 'BaseResponse' assert e.value.args[5] == 'string' assert e.value.args[6] == 'BaseResponse' assert e.value.args[7] == 'string' assert e.value.args[8] == '", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "apiflask/apiflask", + "expected": "1", + "got": "1", + "got_raw": "1 params[0] == { 'name': 'enum_param', 'in': 'query', 'required': True, 'schema': { 'title': 'EnumParam', 'type': 'string', 'enum': ['A', 'B', 'C'], 'enumDescriptions': ['First', 'Second', 'Third'], 'example': 'A', }, } } def test_schema_to_parameters_with_array(self): \"\"\"Test schema_to_parameters handles array validation.\"\"\" helper = OpenAPIHelper() schema = ArraySchema() params = helper.schema_to_parameters(schema, location='body') assert len(params) == 1 params[0]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "apragacz/django-rest-registration", + "expected": "email_change.new_value", + "got": "email_change.new_value", + "got_raw": "email_change.new_value + \"@example.com\" assert user.email_change is None assert user.email_change_date is None assert user.email_change_token is None assert user.email_change_token_created is None assert user.email_change_token_expires is None assert user.email_change_token_used is None assert user.email_change_token_used_date is None assert user.email_change_token_used_token is None assert user.email_change_token_used_token_created is None assert user.email_change_token_used_token_expires is None assert user.email_change_token_used_token_used is None assert user.email_change_token_used_token_used_date is None assert user.email_change_token_used_token_used_token is None assert user.email", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "apragacz/django-rest-registration", + "expected": "response)", + "got": "response)", + "got_raw": "response)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "apragacz/django-rest-registration", + "expected": "1", + "got": "1", + "got_raw": "1 signal_sent.assert_called_with( request, user=user, ) assert_response_status_is_ok(response) assert user.is_active assert user.is_active is True assert user.is_active is True assert user.is_active is True assert user.is_active is True assert user.is_active is True assert user.is_active is True assert user.is_active is True assert user.is_active is True assert user.is_active is True assert user.is_active is True assert user.is_active is True assert user.is_active is True assert user.is_active is True assert user.is_active is True assert user.is_active is True assert user.is_active is True assert user.is_active is True assert user", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "apragacz/django-rest-registration", + "expected": "302", + "got": "302", + "got_raw": "302 # Redirect to success URL. response.url.path == SUCCESS_URL # Redirect to success URL. response = http_client.get(SUCCESS_URL) # Redirect to success URL. response.url.path == SUCCESS_URL # Redirect to success URL. response = http_client.get(FAILURE_URL) # Redirect to success URL. response.url.path == SUCCESS_URL # Redirect to success URL. response = http_client.get(VERIFICATION_URL) # Redirect to success URL. response.url.path == SUCCESS_URL # Redirect to success URL. response = http_client.get(VERIFICATION_URL + \"123456", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "apragacz/django-rest-registration", + "expected": "[JWTAuthentication]", + "got": "(", + "got_raw": "( \"tests.testapps.custom_authtokens.auth.JWTAuthentication\", ) view = api_view_provider.get_view(\"token\") request = api_factory.get(\"/token/\") response = view(request) assert_response_is_ok(response) assert response.json() == {\"token\": \"token\"} token = Token.objects.get(user=user) assert token.key == \"token\" assert token.user == user assert token.created is not None assert token.created < token.updated assert token.created > 0 assert token.created < 1000000000000000000 assert token.created > 9999999", + "exact_match": false, + "code_bleu": 0.16666666666666666, + "edit_similarity": 0.0 + }, + { + "repo": "apragacz/django-rest-registration", + "expected": "timer)", + "got": "timer)", + "got_raw": "timer) assert_one_url_line_in_text(sent_email.body, REGISTER_EMAIL_VERIFICATION_URL) assert_no_url_in_text(sent_email.body, new_email) assert_no_url_in_text(sent_email.body, user.email) assert_no_url_in_text(sent_email.body, user.get_full_name()) assert_no_url_in_text(sent_email.body, user.get_username()) assert_no_url_in_text(sent_email.body, user.get_short_name()) assert_no_url_in_text(sent_email.body, user.id) assert_no_url_in_text(sent_email.body, user.is_active) assert_no_url_in_text(sent_email.body, user.is_staff) assert_no_url_in_text(sent_email", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "apragacz/django-rest-registration", + "expected": "\"Knuth\"", + "got": "\"Knuth\"", + "got_raw": "\"Knuth\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "apragacz/django-rest-registration", + "expected": "url)", + "got": "url)", + "got_raw": "url) == user.username) == user.id) == user.email) == user.get_full_name()) == user.get_short_name()) == user.is_active) == user.is_staff) == user.is_superuser) == user.groups.count()) == user.user_permissions.count()) == user.get_user_permissions()) == user.get_groups()) == user.get_user_permissions()) == user.get_user_permissions()) == user.get_user_permissions()) == user.get_user_permissions()) == user.get_user_permissions()) == user.get_user_permissions()) == user.get_user_permissions()) == user.get_user_permissions()) == user.get_user_permissions()) == user.get_user_permissions()) == user.get_user_permissions", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "apragacz/django-rest-registration", + "expected": "[ ErrorCode.LOGIN_FIELDS_NOT_UNIQUE, ])", + "got": "[ ErrorCode.LOGIN_FIELD_NOT_UNIQUE, ])", + "got_raw": "[ ErrorCode.LOGIN_FIELD_NOT_UNIQUE, ])", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.987012987012987 + }, + { + "repo": "apragacz/django-rest-registration", + "expected": "new_email", + "got": "new_email", + "got_raw": "new_email # noqa: E127 # type: ignore # nosec # type: ignore # nosec # type: ignore # nosec # type: ignore # nosec # type: ignore # nosec # type: ignore # nosec # type: ignore # nosec # type: ignore # nosec # type: ignore # nosec # type: ignore # nosec # type: ignore # nosec # type: ignore # nosec # type: ignore # nosec ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "apragacz/django-rest-registration", + "expected": "expected_path", + "got": "expected_path.strip('/')", + "got_raw": "expected_path.strip('/') + '/' if expected_path else '/' + url_path.strip('/') + '/' if url_path else '/' + url_path.strip('/') + '/' if url_path else '/' + url_path.strip('/') + '/' if url_path else '/' + url_path.strip('/') + '/' if url_path else '/' + url_path.strip('/') + '/' if url_path else '/' + url_path.strip('/') + '/' if url_path else '/' + url_path.strip('/') + '/' if url_path else '/' + url_path.strip('/') + '/' if url_path else '/' + url_path.strip('/') + '/' if url_path else '/' + url_path.strip('/') + '/' if url", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.7027027027027027 + }, + { + "repo": "argoverse/av2-api", + "expected": "mat_constrained_expected)", + "got": "mat_constrained_expected)", + "got_raw": "mat_constrained_expected) # Test that the constrained rotation matrix is correct. \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "argoverse/av2-api", + "expected": "3", + "got": "3.0000000000000004", + "got_raw": "3.0000000000000004 # 0.0000000000000004 is a rounding error in the test data. # fmt: on\n\n assert polyline.waypoints[1].x == 4.0000000000000004 # fmt: on # 0.0000000000000004 is a rounding error in the test data. # fmt: off # 0.", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.10526315789473684 + }, + { + "repo": "argoverse/av2-api", + "expected": "range_m_expected", + "got": "range_m_expected", + "got_raw": "range_m_expected # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "argoverse/av2-api", + "expected": "[93269500]", + "got": "[93269500]", + "got_raw": "[93269500] assert lane_segment.predecessors == [] assert lane_segment.right_neighbor_id == 93269520 assert lane_segment.left_neighbor_id is None assert lane_segment.is_left_turn_only is False assert lane_segment.is_right_turn_only is False assert lane_segment.is_bidirectional is True assert lane_segment.is_one_way is False assert lane_segment.is_bidirectional is True assert lane_segment.is_one_way is False assert lane_segment.is_bidirectional is True assert lane_segment.is_one_way is False assert lane_segment.is_bidirectional is True assert lane_segment.is_one_way is False assert lane_segment.is", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "argoverse/av2-api", + "expected": "(4, 4, 3)", + "got": "(4, 4, 3) assert np.allclose( bev_img_interp[0, 0], RED_RGB ) assert np.allclose( bev_img_interp[0, 3], GREEN_RGB ) assert np.allclose( bev_img_interp[3, 3], BLUE_RGB ) assert np.allclose( bev_img_interp[3, 0], RED_RGB ) assert np.allclose( bev_img_interp[1, 1], GREEN_RGB ) assert np.allclose( bev_img_interp[2, 2], BLUE_RGB ) assert np.allclose( bev_img_interp[2, 1], RED_RGB )", + "got_raw": "(4, 4, 3) assert np.allclose( bev_img_interp[0, 0], RED_RGB ) assert np.allclose( bev_img_interp[0, 3], GREEN_RGB ) assert np.allclose( bev_img_interp[3, 3], BLUE_RGB ) assert np.allclose( bev_img_interp[3, 0], RED_RGB ) assert np.allclose( bev_img_interp[1, 1], GREEN_RGB ) assert np.allclose( bev_img_interp[2, 2], BLUE_RGB ) assert np.allclose( bev_img_interp[2, 1], RED_RGB )", + "exact_match": false, + "code_bleu": 0.06126830820142346, + "edit_similarity": 0.04639175257731959 + }, + { + "repo": "argoverse/av2-api", + "expected": "track_uuid_expected", + "got": "track_uuid_expected[0]", + "got_raw": "track_uuid_expected[0] * np.ones(len(cuboids))", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.926829268292683 + }, + { + "repo": "argoverse/av2-api", + "expected": "2", + "got": "2.0000000000000004", + "got_raw": "2.0000000000000004 # 2.0000000000000004 is a float representation of 2.000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.10526315789473684 + }, + { + "repo": "argoverse/av2-api", + "expected": "timestamp_ns_expected", + "got": "timestamp_ns_expected", + "got_raw": "timestamp_ns_expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "argoverse/av2-api", + "expected": "np.dtype(np.uint8)", + "got": "video.dtype", + "got_raw": "video.dtype cropped_video = cropped_video.astype(np.uint8) for frame_idx in np.arange(55): for c in range(3): assert np.allclose( cropped_video[frame_idx, :, :, c], video[frame_idx, :, :, c] )", + "exact_match": false, + "code_bleu": 0.2229763340630102, + "edit_similarity": 0.41379310344827586 + }, + { + "repo": "argoverse/av2-api", + "expected": "lidar_tensor[:, 1:3])", + "got": "lidar.as_numpy())", + "got_raw": "lidar.as_numpy())", + "exact_match": false, + "code_bleu": 0.14726394089438588, + "edit_similarity": 0.3684210526315789 + }, + { + "repo": "argoverse/av2-api", + "expected": "4", + "got": "3", + "got_raw": "3 == len(drivable_area.area_boundary) - 1\r\n ) # -1 because the first and last points are the same.", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "argoverse/av2-api", + "expected": "IndexError)", + "got": "IndexError)", + "got_raw": "IndexError) as e_info: cuboid_list[100] # type: ignore # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "argoverse/av2-api", + "expected": "expected_result_identity", + "got": "expected_result_identity", + "got_raw": "expected_result_identity == pytest.approx(0.0) # type: ignore [E1101] # noqa: E501 # noqa: E1101 # noqa: E501 # noqa: E1101 # noqa: E1101 # noqa: E1101 # noqa: E1101 # noqa: E1101 # noqa: E1101 # noqa: E1101 # noqa: E1101 # noqa: E11", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "argoverse/av2-api", + "expected": "city_SE3_ego_expected.rotation.matrix())", + "got": "city_SE3_ego.rotation)", + "got_raw": "city_SE3_ego.rotation) == city_SE3_ego_expected.rotation)", + "exact_match": false, + "code_bleu": 0.25406637407730737, + "edit_similarity": 0.7096774193548387 + }, + { + "repo": "argoverse/av2-api", + "expected": "None", + "got": "None", + "got_raw": "None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "arogozhnikov/einops", + "expected": "x.dtype", + "got": "x.dtype", + "got_raw": "x.dtype for x in [x] + list(range(10)) + [x.astype(np.float32)] + [x.astype(np.float64)] + [x.astype(np.int32)] + [x.astype(np.int64)] + [x.astype(np.bool)] + [x.astype(np.complex64)] + [x.astype(np.complex128)] + [x.astype(np.uint8)] + [x.astype(np.uint16)] + [x.astype(np.uint32)] + [x.astype(np.uint64)] + [x.astype(np.float16)] + [x.astype(np", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "arogozhnikov/einops", + "expected": "(10 * 30 * 40, 10)", + "got": "(10, 5)", + "got_raw": "(10, 5) # (b h w) c -> (b h w) c' # (b h w) c' -> (b h w) c'' # (b h w) c'' -> (b h w) c''' # (b h w) c''' -> (b h w) c'''' # (b h w) c'''' -> (b h w) c''' # (b h w) c''' -> (b h w) c'' # (b h w) c'' -> (b h w) c' ", + "exact_match": false, + "code_bleu": 0.22680460581325723, + "edit_similarity": 0.48 + }, + { + "repo": "arogozhnikov/einops", + "expected": "einops.EinopsError)", + "got": "ValueError)", + "got_raw": "ValueError) as e: rearrange(\"a b c\", \"a b c -> a b c c\") rearrange(\"a b c\", \"a b c -> a b c c c\") rearrange(\"a b c\", \"a b c -> a b c c c c\") rearrange(\"a b c\", \"a b c -> a b c c c c c\") rearrange(\"a b c\", \"a b c -> a b c c c c c c\") rearrange(\"a b c\", \"a b c -> a b c c c c c c c\") rearrange(\"a b", + "exact_match": false, + "code_bleu": 0.2686424829558855, + "edit_similarity": 0.4666666666666667 + }, + { + "repo": "arogozhnikov/einops", + "expected": "EinopsError)", + "got": "ValueError)", + "got_raw": "ValueError) as e: _EinmixDebugger(\"b c h w -> b c h w\") # wrong output shape e = str(e.value) assert e == \"Output shape must be different from input shape\" with pytest.raises(ValueError) as e: _EinmixDebugger(\"b c h w -> b c h\") # wrong output shape e = str(e.value) assert e == \"Output shape must be different from input shape\" with pytest.raises(ValueError) as e: _EinmixDebugger(\"b c h w -> b c\") # wrong output shape e = str(e.value) assert e == \"Output", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5217391304347826 + }, + { + "repo": "arogozhnikov/einops", + "expected": "result[2, 3, 1]", + "got": "result[2, 3, 1] == 12.0 == x2[1, 3, 2] == result[3, 2, 1] == 13.0 == x2[2, 1, 3] == result[1, 3, 2] == 14.0 == x2[2, 3, 1] == result[3, 1, 2] == 15.0 == x2[3, 1, 2] == result[1, 2, 3] ==", + "got_raw": "result[2, 3, 1] == 12.0 == x2[1, 3, 2] == result[3, 2, 1] == 13.0 == x2[2, 1, 3] == result[1, 3, 2] == 14.0 == x2[2, 3, 1] == result[3, 1, 2] == 15.0 == x2[3, 1, 2] == result[1, 2, 3] == ", + "exact_match": false, + "code_bleu": 0.0730643885430958, + "edit_similarity": 0.14925373134328357 + }, + { + "repo": "arogozhnikov/einops", + "expected": "(10, 10, 30, 40)", + "got": "(10, 10, 30, 40)", + "got_raw": "(10, 10, 30, 40) # back to original shape \"\"\" ) def test7(x): \"\"\" Test that the shape of the output is correct. \"\"\" t = rearrange(x, \"b c h w -> (b h w) c\") t = t[:, ::2] # replacement for dot-product, just changes size of second axis assert tuple(t.shape) == (10 * 30 * 40, 10) y = rearrange(t, \"(b h w) c2 -> b c2 h w\", **parse_shape(x, \"b", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "arogozhnikov/einops", + "expected": "dict(a=1, b=20, c=30, d=40)", + "got": "dict(a=10, b=20, c=30)", + "got_raw": "dict(a=10, b=20, c=30) # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E12", + "exact_match": false, + "code_bleu": 0.5737660864749212, + "edit_similarity": 0.8571428571428571 + }, + { + "repo": "arogozhnikov/einops", + "expected": "ValueError, match=r\"^Einsum pattern\")", + "got": "ValueError, match=r\"^Einsum pattern must contain '->'\") as e: einsum( create_tensor(5, 1), \"i j\", ) assert str(e.value) == \"Einsum pattern must contain '->'\"", + "got_raw": "ValueError, match=r\"^Einsum pattern must contain '->'\") as e: einsum( create_tensor(5, 1), \"i j\", ) assert str(e.value) == \"Einsum pattern must contain '->'\" # raise ValueError(\"Invalid axis identifier\") with pytest.raises(ValueError, match=r\"^Invalid axis identifier\") as e: einsum( create_tensor(5, 1), \"i j -> i\", ) assert str(e.value) == \"Invalid axis identifier\" # raise ValueError(\"Invalid axis identifier\") with pytest.raises(ValueError, match=r\"^Invalid axis identifier\") as e: einsum( create", + "exact_match": false, + "code_bleu": 0.14380553624999498, + "edit_similarity": 0.38144329896907214 + }, + { + "repo": "askui/python-sdk", + "expected": "second_id", + "got": "second_id", + "got_raw": "second_id\n\ndef test_get_anonymous_id_generates_new_id_on_reset() -> None:\n # Reset the caches to ensure a new ID is generated\n reset_caches()\n\n # Get a new anonymous ID after resetting the caches\n new_id = get_anonymous_id()\n\n # The new ID should be different from the first one\n assert new_id != first_id", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "askui/python-sdk", + "expected": "1", + "got": "1", + "got_raw": "1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "askui/python-sdk", + "expected": "entry", + "got": "entry", + "got_raw": "entry and \"id\" in entry and \"input\" in entry and \"type\" in entry else \"Invalid cache entry format\" f\"{entry}\" f\"{cache_data}\" f\"{cache_file}\" f\"{cache_filename}\" f\"{cache_dir}\" f\"{temp_dir}\" f\"{temp_dir}\" f\"{temp_dir}\" f\"{temp_dir}\" f\"{temp_dir}\" f\"{temp_dir}\" f\"{temp_dir}\" f\"{temp_dir}\" f\"{temp_dir}\" f\"{temp_dir}\" f\"{temp_dir}\" f\"{temp_dir}\" f\"{temp_dir}\" f\"{temp_dir}\" f\"{temp_dir}\" f\"{temp", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "askui/python-sdk", + "expected": "OSError)", + "got": "ValueError)", + "got_raw": "ValueError) as exc_info: load_image_source(\"invalid_base64\") exc_info.value.args[0] == \"Invalid base64 data\"", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.631578947368421 + }, + { + "repo": "askui/python-sdk", + "expected": "rendered", + "got": "rendered", + "got_raw": "rendered assert \"\" in rendered assert \"\" in rendered assert \"\" in rendered assert \"\" in rendered assert \"\" in rendered assert \"\" in rendered assert \"\" in rendered assert \"\" in rendered assert \"\" in rendered assert \"\" in rendered assert \"\" in rendered assert \"\" in rendered assert \"\" in rendered assert \"\" in rendered assert \"\" in rendered assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "askui/python-sdk", + "expected": "sorted(files)", + "got": "files[::-1]", + "got_raw": "files[::-1] # reversed order of files created _create_non_json_files(tmp_path, [\"d.json\"]) result = list_resource_paths(tmp_path) assert [f.name for f in result] == files + [\"d.json\"] # d.json is added to the end of the list _create_non_json_files(tmp_path, [\"e.json\"]) result = list_resource_paths(tmp_path, ListQuery(order=\"asc\")) assert [f.name for f in result] == files + [\"e.json\"] + [\"d.json\"] # e.json is added to the end of the list _create_non_json_files(tmp_path, [\"f", + "exact_match": false, + "code_bleu": 0.18575057999133598, + "edit_similarity": 0.4166666666666667 + }, + { + "repo": "askui/python-sdk", + "expected": "scenario.tags", + "got": "[]", + "got_raw": "[] and modified.steps == [] and modified.examples == [] and modified.feature == feature.id and modified.id == scenario.id and modified.created_at == scenario.created_at and modified.updated_at == scenario.updated_at and modified.feature == scenario.feature and modified.feature_name == scenario.feature_name and modified.feature_path == scenario.feature_path and modified.feature_title == scenario.feature_title and modified.feature_description == scenario.feature_description and modified.feature_order == scenario.feature_order and modified.feature_order_index == scenario.feature_order_index and modified.feature_order_index_path == scenario.feature_order_index_path and modified.feature_order_index_title == scenario.feature_order_index_title and modified.feature_order_index_description == scenario.feature", + "exact_match": false, + "code_bleu": 0.30120066786994826, + "edit_similarity": 0.0 + }, + { + "repo": "askui/python-sdk", + "expected": "\"PNG\"", + "got": "\"PNG\"", + "got_raw": "\"PNG\" assert png_img.size == img.size assert png_img.mode == img.mode assert png_img.getcolors() == img.getcolors() assert png_img.getpixel((0, 0)) == img.getpixel((0, 0)) assert png_img.getpixel((100, 100)) == img.getpixel((100, 100)) assert png_img.getpixel((200, 200)) == img.getpixel((200, 200)) assert png_img.getpixel((300, 300)) == img.getpixel((3", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "askui/python-sdk", + "expected": "[]", + "got": "[]", + "got_raw": "[] # type: ignore assert result[\"content\"] == \"\" assert result[\"selector\"] == \"\" assert result[\"text\"] == \"\" assert result[\"regex\"] == \"\" assert result[\"caseSensitive\"] == False assert result[\"exact\"] == False assert result[\"highlight\"] == False assert result[\"highlightColor\"] == \"blue\" assert result[\"highlightOpacity\"] == 0.5 assert result[\"highlightWidth\"] == 2.0 assert result[\"highlightOffset\"] == 10.0 assert result[\"highlightPadding\"] == 5.0 assert result[\"highlight", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "askui/python-sdk", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\"\n\n\ndef test_truncate_long_strings_with_short_data() -> None:\n assert truncate_long_strings({\"key\": \"value\"}) == {\"key\": \"value\"}\n assert truncate_long_strings([\"short\"]) == [\"short\"]\n\n\ndef test_truncate_long_strings_with_long_data() -> None:\n long_string = \"This is a very long string that needs to be truncated.\" * 1000000\n truncated_string = truncate_long_strings(long_string)\n assert len(truncated_string) < len(long_string) + 1000000 + 100000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "askui/python-sdk", + "expected": "dumped", + "got": "dumped.keys()", + "got_raw": "dumped.keys() m = DummyModel(value=1) dumped = m.model_dump() assert \"value\" in dumped.keys() assert dumped[\"value\"] == 1 m = DummyModel(value=NOT_GIVEN) dumped = m.model_dump() assert \"value\" not in dumped.keys() m = DummyModel() dumped = m.model_dump() assert \"value\" not in dumped.keys() m = DummyModel(value=1, other=2) dumped = m.model_dump() assert \"value\" in dumped.keys() assert dumped[\"value\"] == 1 assert \"other\" in dumped.keys() assert dumped[\"other\"] == ", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.631578947368421 + }, + { + "repo": "askui/python-sdk", + "expected": "mock_toolbox", + "got": "mock_toolbox", + "got_raw": "mock_toolbox # type: ignore # noqa: E721 # pylint: disable=protected-access # noqa: E501 # type: ignore # noqa: E721 # pylint: disable=protected-access # noqa: E501 # type: ignore # noqa: E721 # pylint: disable=protected-access # noqa: E501 # type: ignore # noqa: E721 # pylint: disable=protected-access # noqa: E501 # type: ignore # noqa:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "askui/python-sdk", + "expected": "\"OnlyName\"", + "got": "\"OnlyName\"", + "got_raw": "\"OnlyName\" assert modified.description is None assert modified.tags is None assert modified.id == feature.id assert modified.created_at == feature.created_at assert modified.updated_at == feature.updated_at + 1 assert modified.version == feature.version + 1 assert modified.is_active == feature.is_active assert modified.is_archived == feature.is_archived assert modified.is_deleted == feature.is_deleted assert modified.is_hidden == feature.is_hidden assert modified.is_public == feature.is_public assert modified.is_shared == feature.is_shared assert modified.is_starred == feature.is_starred assert modified.is_liked == feature.is_liked assert modified.is_favorited == feature.is_f", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "askui/python-sdk", + "expected": "second_id", + "got": "second_id", + "got_raw": "second_id", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "askui/python-sdk", + "expected": "params.steps", + "got": "[ScenarioStep(keyword=\"Given\"", + "got_raw": "[ScenarioStep(keyword=\"Given\", text=\"foo\")] assert scenario.feature_id == params.feature.id assert scenario.id is not None assert scenario.id != \"\" assert scenario.created_at is not None assert scenario.created_at != \"\" assert scenario.updated_at is not None assert scenario.updated_at != \"\" assert scenario.url is not None assert scenario.url != \"\" assert scenario.url.startswith(\"/scenarios/\") assert scenario.url.endswith(\"/1\") assert scenario.url.endswith(\"/1\") assert scenario.url.endswith(\"/1\") assert scenario.url.endswith(\"/1\") assert scenario.url.endswith(\"/1\") assert scenario.url.endswith(\"/1\") assert scenario.url.endswith(\"/1\") assert scenario.url.endswith", + "exact_match": false, + "code_bleu": 0.18575057999133598, + "edit_similarity": 0.24390243902439024 + }, + { + "repo": "askui/python-sdk", + "expected": "img", + "got": "img", + "got_raw": "img # The image should be modified in-place assert new_img.getpixel((x, y)) == (255, 0, 0) # The point should be red assert new_img.getpixel((x - 1, y)) == (0, 0, 0) # The point should be black assert new_img.getpixel((x + 1, y)) == (0, 0, 0) # The point should be black assert new_img.getpixel((x, y - 1)) == (0, 0, 0) #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "askui/python-sdk", + "expected": "ValueError)", + "got": "QueryNoResponseError)", + "got_raw": "QueryNoResponseError) as exc_info: openrouter_model.get_settings() mock_openai_client.chat.completions.create.assert_called_once_with( model=\"gpt-3.5-turbo\", messages=[ { \"role\": \"user\", \"content\": \"What is the capital of France?\" }, ], ) assert str(exc_info.value) == \"Invalid JSON { at position 0\"", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "askui/python-sdk", + "expected": "0", + "got": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678", + "got_raw": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "askui/python-sdk", + "expected": "result_traj[0]", + "got": "result_traj[0]", + "got_raw": "result_traj[0] assert result_traj[0][\"cache2.traj\"] == {}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "askui/python-sdk", + "expected": "0", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "asottile/pyupgrade", + "expected": "expected", + "got": "expected[0]", + "got_raw": "expected[0] + expected[1] + expected[2] + expected[3] + expected[4] + expected[5] + expected[6] + expected[7] + expected[8] + expected[9] + expected[10] + expected[11] + expected[12] + expected[13] + expected[14] + expected[15] + expected[16] + expected[17] + expected[18] + expected[19] + expected[20] + expected[21] + expected[22] +", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.8421052631578947 + }, + { + "repo": "asottile/pyupgrade", + "expected": "s", + "got": "s.encode()", + "got_raw": "s.encode() if isinstance(s, str) else s[:] # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore #", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.18181818181818182 + }, + { + "repo": "asottile/pyupgrade", + "expected": "expected", + "got": "expected.replace('", + "got_raw": "expected.replace(' ', '') + '\\n' + expected.replace(' ', '') + '\\n' + expected.replace(' ', '') + '\\n' + expected.replace(' ', '') + '\\n' + expected.replace(' ', '') + '\\n' + expected.replace(' ', '') + '\\n' + expected.replace(' ', '') + '\\n' + expected.replace(' ', '') + '\\n' + expected.replace(' ', '') + '\\n' + expected.replace(' ', '') + '\\n' + expected.replace(' ', '') + '\\n' + expected.replace(' ', '') + '\\n' + expected.replace(' ', '') + '\\n", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6153846153846154 + }, + { + "repo": "asottile/pyupgrade", + "expected": "s", + "got": "s.strip()", + "got_raw": "s.strip() + '\\n' + 'type(None)\\n' + 'type(...)\\n' + 'foo = \"foo\"\\n' + 'type(foo)\\n' + 'type(None)\\n' + 'type(...)\\n' + 'foo = \"foo\"\\n' + 'type(foo)\\n' + 'type(None)\\n' + 'type(...)\\n' + 'foo = \"foo\"\\n' + 'type(foo)\\n' + 'type(None)\\n' + 'type(...)\\n' + 'foo = \"foo\"\\n' + 'type(foo)\\n' +", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.2 + }, + { + "repo": "asottile/pyupgrade", + "expected": "s", + "got": "s.strip()", + "got_raw": "s.strip() + '\\n' + 'from six.moves import map\\n' + 'from six.moves import queue\\n' + 'from six.moves import reduce\\n' + 'from six.moves import range\\n' + 'from six.moves import zip\\n' + 'from six.moves import zip_longest\\n' + 'from six.moves import filter\\n' + 'from six.moves import filterfalse\\n' + 'from six.moves import map\\n' + 'from six.moves import repr\\n' + 'from six.moves import super\\n' + 'from six.moves import tuple\\n' + 'from six.moves import zip\\n' +", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.2 + }, + { + "repo": "asottile/pyupgrade", + "expected": "s", + "got": "s.strip()", + "got_raw": "s.strip() + '\\n' + 'class C(B): pass\\n' + 'class D(C): pass\\n' + 'class E(D): pass\\n' + 'class F(E): pass\\n' + 'class G(F): pass\\n' + 'class H(G): pass\\n' + 'class I(H): pass\\n' + 'class J(I): pass\\n' + 'class K(J): pass\\n' + 'class L(K): pass\\n' + 'class M(L): pass\\n' + 'class N(M): pass\\n' + 'class O(N): pass\\n' + 'class P", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.2 + }, + { + "repo": "asottile/pyupgrade", + "expected": "s", + "got": "s.strip()", + "got_raw": "s.strip() + '\\n' + s + '\\n' + s.strip() + '\\n' + s + '\\n' + s.strip() + '\\n' + s + '\\n' + s.strip() + '\\n' + s + '\\n' + s.strip() + '\\n' + s + '\\n' + s.strip() + '\\n' + s + '\\n' + s.strip() + '\\n' + s + '\\n' + s.strip() + '\\n' + s + '\\n' + s.strip() + '\\n' + s + '\\n' + s.strip", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.2 + }, + { + "repo": "asottile/pyupgrade", + "expected": "expected", + "got": "expected", + "got_raw": "expected + '\\n' if expected.endswith('\\n') else expected + '\\n\\n'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "asottile/pyupgrade", + "expected": "expected", + "got": "expected", + "got_raw": "expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "asottile/pyupgrade", + "expected": "s", + "got": "s.strip()", + "got_raw": "s.strip() + '\\n' + s + '\\n' + s + '\\n' + s + '\\n' + s + '\\n' + s + '\\n' + s + '\\n' + s + '\\n' + s + '\\n' + s + '\\n' + s + '\\n' + s + '\\n' + s + '\\n' + s + '\\n' + s + '\\n' + s + '\\n' + s + '\\n' + s + '\\n' + s + '\\n' + s + '\\n' + s + '\\n' +", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.2 + }, + { + "repo": "asottile/pyupgrade", + "expected": "s", + "got": "s.encode()", + "got_raw": "s.encode() if s.startswith('\"') else s.encode() + b'''''' ''' + s.encode() + b'''''' ''' + s.encode() + b'''''' ''' + s.encode() + b'''''' ''' + s.encode() + b'''''' ''' + s.encode() + b'''''' ''' + s.encode() + b'''''' ''' + s.encode() + b'''''' ''' + s.encode() + b'''''' ''' + s.encode() + b'''''' ''' + s.encode() + b'''''' ''' + s.encode() + b'''''' '''", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.18181818181818182 + }, + { + "repo": "asteroid-team/asteroid", + "expected": "est_targets.shape", + "got": "est_targets.shape[:-1]", + "got_raw": "est_targets.shape[:-1] + reordered_est.shape[-1:] + reordered_est.shape[-2:] + reordered_est.shape[-3:] + reordered_est.shape[-4:] + reordered_est.shape[-5:] + reordered_est.shape[-6:] + reordered_est.shape[-7:] + reordered_est.shape[-8:] + reordered_est.shape[-9:] + reordered_est.shape[-10:] + reordered_est.shape[-11:] + reordered_est.shape[-12:] + reordered_est.shape[-13:] + reordered_est.shape[-14:] + reordered_est.shape[-15:] + reordered_est.shape[-16:] + reordered_est", + "exact_match": false, + "code_bleu": 0.2984745896009823, + "edit_similarity": 0.8717948717948718 + }, + { + "repo": "asteroid-team/asteroid", + "expected": "RuntimeError)", + "got": "RuntimeError)", + "got_raw": "RuntimeError) as excinfo: model_2.load_state_dict(state_dict) assert str(excinfo.value) == \"Expected key 'whoever.0.weight' to have shape (10, 10), got (10, 10) instead.\" assert str(excinfo.value) == \"Expected key 'whoever.0.bias' to have shape (10,), got (10,) instead.\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "asteroid-team/asteroid", + "expected": "model(y))", + "got": "model(y))", + "got_raw": "model(y))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "asteroid-team/asteroid", + "expected": "mixtures.shape", + "got": "est_targets.shape[:1]", + "got_raw": "est_targets.shape[:1] + reordered_mix.shape[1:] + reordered_mix.shape[2:] + reordered_mix.shape[3:] + reordered_mix.shape[4:] + reordered_mix.shape[5:] + reordered_mix.shape[6:] + reordered_mix.shape[7:] + reordered_mix.shape[8:] + reordered_mix.shape[9:] + reordered_mix.shape[10:] + reordered_mix.shape[11:] + reordered_mix.shape[12:] + reordered_mix.shape[13:] + reordered_mix.shape[14:] + reordered_mix.shape[15:] + reordered_mix.shape[16:] + reordered_mix", + "exact_match": false, + "code_bleu": 0.24446151121745047, + "edit_similarity": 0.45714285714285713 + }, + { + "repo": "asteroid-team/asteroid", + "expected": "(batch, n_frames, 2 * n_units)", + "got": "(batch, n_frames, 2 * n_units)", + "got_raw": "(batch, n_frames, 2 * n_units)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "asteroid-team/asteroid", + "expected": "arbitrary_last_dim)", + "got": "arbitrary_last_dim)", + "got_raw": "arbitrary_last_dim) assert_loss_checks_shape(singlesrc, (3, 1000), arbitrary_last_dim) assert_loss_checks_shape(multisrc, (3, 1000, 1000)) assert_loss_checks_shape(mse, (3, 1000)) assert_loss_checks_shape(loss, (3, 1000, 1000)) assert_loss_checks_shape(loss, (3, 1000, 1000, 1000)) assert_loss_checks_shape(loss, (3, 1000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "asteroid-team/asteroid", + "expected": "min_idx_hun)", + "got": "min_idx_hun)", + "got_raw": "min_idx_hun)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "asteroid-team/asteroid", + "expected": "type(asteroid_optim)", + "got": "type(asteroid_optim)", + "got_raw": "type(asteroid_optim)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "asteroid-team/asteroid", + "expected": "w_src_wrapper(est_targets, targets, return_est=True)[1])", + "got": "w_src_wrapper(est_targets, targets, return_est=True)[1]) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "got_raw": "w_src_wrapper(est_targets, targets, return_est=True)[1]) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "exact_match": false, + "code_bleu": 0.10552187190362619, + "edit_similarity": 0.32941176470588235 + }, + { + "repo": "asteroid-team/asteroid", + "expected": "consistent_est_sources.sum(dim))", + "got": "est_sources)", + "got_raw": "est_sources)", + "exact_match": false, + "code_bleu": 0.153509990260506, + "edit_similarity": 0.5454545454545454 + }, + { + "repo": "asteroid-team/asteroid", + "expected": "w_sum / n_src)", + "got": "w_sum)", + "got_raw": "w_sum)", + "exact_match": false, + "code_bleu": 0.29730177875068026, + "edit_similarity": 0.6 + }, + { + "repo": "asteroid-team/asteroid", + "expected": "cnn.torch_complex_from_reim(inp.real + 1, inp.imag + 1))", + "got": "inp + 1)", + "got_raw": "inp + 1)\n fn = cnn.OnReIm(Identity, 2)\n assert_close(fn(inp), inp + 2)\n fn = cnn.OnReIm(Identity, 3)\n assert_close(fn(inp), inp + 3)\n fn = cnn.OnReIm(Identity, 4)\n assert_close(fn(inp), inp + 4)\n fn = cnn.OnReIm(Identity, 5)\n assert_close(fn(inp), inp + 5)\n fn = cnn.OnReIm(Identity, 6)\n assert_close(fn(inp", + "exact_match": false, + "code_bleu": 0.16637806616154058, + "edit_similarity": 0.25 + }, + { + "repo": "auth0/auth0-python", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as error: d.get_token(\"client_id\", \"client_secret\") mock_post.assert_called_with( \"https://my.domain.com/delegation\", data={ \"client_id\": \"client_id\", \"client_secret\": \"client_secret\", \"grant_type\": \"client_credentials\", }, ) self.assertEqual( str(error.exception), \"Invalid token response\" )", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "auth0/auth0-python", + "expected": "{ \"client_id\": \"cid\", \"client_secret\": \"csecret\", \"email\": \"a@b.com\", \"send\": \"snd\", \"connection\": \"email\", })", + "got": "{ \"client_id\": \"cid\", \"client_secret\": \"csecret\", \"email\": \"a@b.com\", \"send\": \"snd\", })", + "got_raw": "{ \"client_id\": \"cid\", \"client_secret\": \"csecret\", \"email\": \"a@b.com\", \"send\": \"snd\", })", + "exact_match": false, + "code_bleu": 0.7892788283427378, + "edit_similarity": 0.883248730964467 + }, + { + "repo": "auth0/auth0-python", + "expected": "[(\"hello_world[hello]\", \"world\")]", + "got": "[(\"hello_world\", {\"hello\": \"world\"})] assert encode_query({\"hello\": \"world\", \"hello_world\": \"hello world\"}) == [(\"hello\", \"world\"), (\"hello_world\", \"hello world\")] assert encode_query({\"hello\": \"world\", \"hello_world\": \"hello world\", \"hello_world_2\": \"hello world 2\"}) == [(\"hello\", \"world\"), (\"hello_world\", \"hello world\"), (\"hello_world_2\", \"hello world 2\")] assert encode_query({\"hello\": \"world\", \"hello_world\": \"hello world\", \"hello_world_2\": \"hello world 2", + "got_raw": "[(\"hello_world\", {\"hello\": \"world\"})] assert encode_query({\"hello\": \"world\", \"hello_world\": \"hello world\"}) == [(\"hello\", \"world\"), (\"hello_world\", \"hello world\")] assert encode_query({\"hello\": \"world\", \"hello_world\": \"hello world\", \"hello_world_2\": \"hello world 2\"}) == [(\"hello\", \"world\"), (\"hello_world\", \"hello world\"), (\"hello_world_2\", \"hello world 2\")] assert encode_query({\"hello\": \"world\", \"hello_world\": \"hello world\", \"hello_world_2\": \"hello world 2", + "exact_match": false, + "code_bleu": 0.030610688638291167, + "edit_similarity": 0.12981744421906694 + }, + { + "repo": "auth0/auth0-python", + "expected": "fnmatch(kwargs[\"data\"][\"client_assertion\"], \"*.*.*\"))", + "got": "\"client_assertion\" in kwargs[\"headers\"]) self.assertTrue( \"client_assertion_type\" in kwargs[\"headers\"]) self.assertTrue( \"Content-Type\" in kwargs[\"headers\"]) self.assertTrue( \"Accept\" in kwargs[\"headers\"]) self.assertTrue( \"Accept-Encoding\" in kwargs[\"headers\"]) self.assertTrue( \"Accept-Language\" in kwargs[\"headers\"]) self.assertTrue( \"Accept-Charset\" in kwargs[\"headers\"]) self.assertTrue( \"Accept-Charset\" in kwargs[\"headers\"]) self.assertTrue( \"Accept-Charset\" in kwargs[\"headers\"]) self.assertTrue( \"Accept-Charset\" in kwargs[\"headers\"]) self.assertTrue( \"Accept", + "got_raw": "\"client_assertion\" in kwargs[\"headers\"]) self.assertTrue( \"client_assertion_type\" in kwargs[\"headers\"]) self.assertTrue( \"Content-Type\" in kwargs[\"headers\"]) self.assertTrue( \"Accept\" in kwargs[\"headers\"]) self.assertTrue( \"Accept-Encoding\" in kwargs[\"headers\"]) self.assertTrue( \"Accept-Language\" in kwargs[\"headers\"]) self.assertTrue( \"Accept-Charset\" in kwargs[\"headers\"]) self.assertTrue( \"Accept-Charset\" in kwargs[\"headers\"]) self.assertTrue( \"Accept-Charset\" in kwargs[\"headers\"]) self.assertTrue( \"Accept-Charset\" in kwargs[\"headers\"]) self.assertTrue( \"Accept", + "exact_match": false, + "code_bleu": 0.01896725427502108, + "edit_similarity": 0.07729468599033816 + }, + { + "repo": "auth0/auth0-python", + "expected": "{\"client_id\": \"cid\", \"token\": \"tkn\"})", + "got": "{\"client_id\": \"cid\", \"token\": \"tkn\"})", + "got_raw": "{\"client_id\": \"cid\", \"token\": \"tkn\"})", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "auth0/auth0-python", + "expected": "{ \"client_id\": \"cid\", \"email\": \"a@b.com\", \"connection\": \"conn\", })", + "got": "{ \"client_id\": \"cid\", \"email\": \"a@b.com\", \"connection\": \"conn\", })", + "got_raw": "{ \"client_id\": \"cid\", \"email\": \"a@b.com\", \"connection\": \"conn\", })", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "auth0/auth0-python", + "expected": "{ \"client_id\": \"cid\", \"email\": \"a@b.com\", \"send\": \"snd\", \"connection\": \"email\", })", + "got": "{ \"client_id\": \"cid\", \"email\": \"a@b.com\", \"send\": \"snd\", })", + "got_raw": "{ \"client_id\": \"cid\", \"email\": \"a@b.com\", \"send\": \"snd\", })", + "exact_match": false, + "code_bleu": 0.7432823505379895, + "edit_similarity": 0.8368794326241135 + }, + { + "repo": "auth0/auth0-python", + "expected": "403)", + "got": "403)", + "got_raw": "403) self.assertEqual(context.exception.error, \"mfa_required\") self.assertEqual(context.exception.error_description, \"Multifactor authentication required\") self.assertEqual(context.exception.mfa_token, \"Fe26...Ha\") self.assertEqual(context.exception.headers, {\"c\": \"d\"}) self.assertEqual(context.exception.body, None) self.assertEqual(context.exception.url, \"the-url\") self.assertEqual(context.exception.message, \"Multifactor authentication required\") self.assertEqual(context.exception.code, None) self.assertEqual(context.exception.description, None) self.assertEqual(context.exception.inner_exception, None) self.assertEqual(context.exception.error_uri, None) self.assertEqual(context.exception.friendly_error", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "auth0/auth0-python", + "expected": "args[0])", + "got": "args[0])", + "got_raw": "args[0]) self.assertEqual({ \"client_id\": \"cid\", \"access_token\": \"atk\", \"connection\": \"conn\", }, kwargs[\"data\"]) self.assertEqual(\"application/x-www-form-urlencoded\", kwargs[\"headers\"][\"Content-Type\"]) self.assertEqual(\"GET\", kwargs[\"method\"]) self.assertEqual( \"https://a.b.c/oauth/access_token\", kwargs[\"url\"]) self.assertEqual( \"Bearer\", kwargs[\"headers\"][\"Authorization\"]) self.assertEqual(\"atk\", kwargs[\"headers\"][\"Authorization\"].split(\" \")[1]) self.assertEqual(\"atk\", kwargs[\"headers\"][\"Authorization\"].split(\" \")[2]) self.assertEqual(\"atk\", kwargs[\"headers\"][\"Authorization", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "auth0/auth0-python", + "expected": "\"Request data does not match expected data after JSON serialization.\")", + "got": "expected_data)", + "got_raw": "expected_data)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.30952380952380953 + }, + { + "repo": "aymenfurter/microagents", + "expected": "closest_agent)", + "got": "closest_agent)", + "got_raw": "closest_agent) self.assertEqual(1, similarity) self.assertEqual(1, closest_agent.id) self.assertEqual(\"purpose2\", closest_agent.purpose) self.assertEqual(\"api_key\", closest_agent.api_key) self.assertEqual(None, closest_agent.parent) self.assertEqual(None, closest_agent.children) self.assertEqual(None, closest_agent.parent_id) self.assertEqual(None, closest_agent.children_ids) self.assertEqual(None, closest_agent.parent_name) self.assertEqual(None, closest_agent.children_names) self.assertEqual(None, closest_agent.parent_prompt) self.assertEqual(None, closest_agent.children_prompts) self.assertEqual(None, closest_agent.parent_prompt_id) self.assertEqual(None, closest_agent", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aymenfurter/microagents", + "expected": "self.mock_openai_wrapper)", + "got": "self.mock_openai_wrapper)", + "got_raw": "self.mock_openai_wrapper)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aymenfurter/microagents", + "expected": "purposes)", + "got": "purposes)", + "got_raw": "purposes) self.assertIn('purpose2', purposes) self.assertNotIn('purpose3', purposes) self.assertNotIn('purpose4', purposes) self.assertNotIn('purpose5', purposes) self.assertNotIn('purpose6', purposes) self.assertNotIn('purpose7', purposes) self.assertNotIn('purpose8', purposes) self.assertNotIn('purpose9', purposes) self.assertNotIn('purpose10', purposes) self.assertNotIn('purpose11', purposes) self.assertNotIn('purpose12', purposes) self.assertNotIn('purpose13', purposes) self.assertNotIn('purpose14', purposes) self.assertNotIn('", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "aymenfurter/microagents", + "expected": "self.dummy_agent)", + "got": "self.dummy_agent)", + "got_raw": "self.dummy_agent)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bayespy/bayespy", + "expected": "Mu)", + "got": "Lambda)", + "got_raw": "Lambda) self.assert_message_to_parent(X, A) self.assert_message_to_parent(X, V) self.assert_message_to_parent(Y, X) self.assert_message_to_parent(Y, Mu) self.assert_message_to_parent(Y, Lambda) self.assert_message_to_parent(Y, A) self.assert_message_to_parent(Y, V) self.assert_message_to_parent(X, X) self.assert_message_to_parent(Y, Y) self.assert_message_to_parent(Y, Mu) self.assert_message_to_parent(Y, Lambda) self.assert_message_to_parent(Y, A) self.assert_message_to_parent(Y, V) self.assert_message_to_parent(Y, Y)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.2 + }, + { + "repo": "bayespy/bayespy", + "expected": "())", + "got": "(0", + "got_raw": "(0,)) self.assertEqual(f((), ()), ()) self.assertEqual(f((), (2,), ()), (2,)) self.assertEqual(f((), (2,), (3,)), (6,)) self.assertEqual(f((), (2,), (3,), (4,)), (24,)) self.assertEqual(f((), (2,), (3,), (4,), (5,)), (120,)) self.assertEqual(f((), (2,), (3,), (4,), (5,), (6,)), (720,)) self.assertEqual(f((), (2,), (3,), (4,), (", + "exact_match": false, + "code_bleu": 0.35818997727451396, + "edit_similarity": 0.4 + }, + { + "repo": "bayespy/bayespy", + "expected": "np.einsum('mn->', 0.5*np.ones(np.shape(tau))))", + "got": "m3) * 2) * np.einsum('mn,ni->i', tau*y, a)) * np.einsum('mn,ni,nj->ij', -0.5*tau, a, a)) * np.einsum('mn->', -0.5*tau*y**2)) * np.einsum('mn,ni->i', tau*y, a)) * np.einsum('mn,ni,nj->ij', -0.5*tau, a, a)) * np.einsum('mn->', -0.5*tau*y**2", + "got_raw": "m3) * 2) * np.einsum('mn,ni->i', tau*y, a)) * np.einsum('mn,ni,nj->ij', -0.5*tau, a, a)) * np.einsum('mn->', -0.5*tau*y**2)) * np.einsum('mn,ni->i', tau*y, a)) * np.einsum('mn,ni,nj->ij', -0.5*tau, a, a)) * np.einsum('mn->', -0.5*tau*y**2", + "exact_match": false, + "code_bleu": 0.08844167566836394, + "edit_similarity": 0.20422535211267606 + }, + { + "repo": "bayespy/bayespy", + "expected": "())", + "got": "(3", + "got_raw": "(3,))\n self.assertEqual(X_alpha.shape, (3,))\n self.assertEqual(X_alpha.dim, 1)\n self.assertEqual(X_alpha.alpha, 2)\n self.assertEqual(X_alpha.beta, 10)\n\n # Test 1-ndim Gaussian-Gamma\n X_alpha = GaussianGamma([1,2], [0.1, 0.2], [0.02, 0.03], [0.03, 0.04], ndim=1)\n\n self.assertEqual(X_alpha.plates, (2,))\n ", + "exact_match": false, + "code_bleu": 0.35818997727451396, + "edit_similarity": 0.4 + }, + { + "repo": "bayespy/bayespy", + "expected": "(5,))", + "got": "(5,))", + "got_raw": "(5,))\n self.assertEqual(Y.dims, ((),))\n\n # Slice object\n X = MyNode(plates=(3,4), dims=((),))\n Y = X[2:]\n self.assertEqual(Y.plates, (2,4))\n self.assertEqual(Y.dims, ((),))\n\n X = MyNode(plates=(3,4), dims=((),))\n Y = X[:2]\n self.assertEqual(Y.plates, (2,4))\n self.assertEqual(Y.dims, ((),))\n\n X = MyNode(plates=(3,4", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bayespy/bayespy", + "expected": "1)", + "got": "1)", + "got_raw": "1)\n self.assertEqual(m[0].shape, (3,))\n self.assertEqual(m[0].dtype, np.float)\n self.assertEqual(m[0].sum(), 0)\n\n # Unobserved and non-broadcasting\n Z = 2\n X = GaussianARD(0, 1, shape=(3,), plates=(3,))\n F = Gate(Z, X)\n Y = GaussianARD(F, 1)\n m = F._message_to_parent(0)\n\n self.assertEqual(len(m), 3)\n self.assertEqual(m[", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bayespy/bayespy", + "expected": "Lambda)", + "got": "X)", + "got_raw": "X) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "bayespy/bayespy", + "expected": "np.einsum('mn,ni->i', tau*y, a))", + "got": "np.einsum('mn,ni,mnik->i', tau*y, a, B.get_moments()[0])) * B.get_moments()[2]) * B.get_moments()[3]) * B.get_moments()[4])) * B.get_moments()[5])) * B.get_moments()[6])) * B.get_moments()[7])) * B.get_moments()[8])) * B.get_moments()[9])) * B.get_moments()[10])) * B.get_moments()[11])) * B.get_moments()[12]))", + "got_raw": "np.einsum('mn,ni,mnik->i', tau*y, a, B.get_moments()[0])) * B.get_moments()[2]) * B.get_moments()[3]) * B.get_moments()[4])) * B.get_moments()[5])) * B.get_moments()[6])) * B.get_moments()[7])) * B.get_moments()[8])) * B.get_moments()[9])) * B.get_moments()[10])) * B.get_moments()[11])) * B.get_moments()[12]))", + "exact_match": false, + "code_bleu": 0.05845750505967914, + "edit_similarity": 0.18658892128279883 + }, + { + "repo": "bayespy/bayespy", + "expected": "4)", + "got": "1)", + "got_raw": "1) self.assertEqual(len(u[0]), 3) self.assertEqual(len(u[0][0]), 3) self.assertEqual(len(u[0][0][0]), 1) self.assertEqual(len(u[0][0][0][0]), 3) self.assertEqual(len(u[0][0][0][0][0]), 1) self.assertEqual(len(u[0][0][0][0][0][0]), 3) self.assertEqual(len(u[0][0][0][0][0][0][0]), 1) self.assertEqual(len(u[0][0][0][0][0", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "bayespy/bayespy", + "expected": "(9,))", + "got": "(9,))", + "got_raw": "(9,)) self.assertEqual(Y.dims, ( (), () ))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bayespy/bayespy", + "expected": "true_plates)", + "got": "true_shape)", + "got_raw": "true_shape) self.assertEqual(X.shape, true_shape) self.assertEqual(X.mu.shape, true_shape) self.assertEqual(X.alpha.shape, true_shape) self.assertEqual(X.alpha.dtype, np.float) self.assertEqual(X.mu.dtype, np.float) self.assertEqual(X.alpha.dtype, X.mu.dtype) self.assertEqual(X.mu.dtype, X.plates.dtype) self.assertEqual(X.plates.dtype, np.int) self.assertEqual(X.plates.dtype, X.shape.dtype) self.assertEqual(X.plates.dtype, X.dims.dtype) self.assertEqual(X.dims.dtype, np.int) self.assertEqual(X.dims.dtype, X.shape.dtype) self.assertEqual(X.dims.dtype", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6086956521739131 + }, + { + "repo": "bayespy/bayespy", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) X = Binomial(10, -0.5) X = Binomial(10, 1.5) X = Binomial(10, 0.5, plates=(4,3,2)) X = Binomial(10, 0.5, plates=(4,3)) X = Binomial(10, 0.5, plates=(4,3,1)) X = Binomial(10, 0.5, plates=(4,3,0)) X = Binomial(10, 0.5, plates=(4,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "beartype/beartype", + "expected": "TypeHint(None)", + "got": "TypeHint(None)", + "got_raw": "TypeHint(None)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "beartype/beartype", + "expected": "Class", + "got": "Class", + "got_raw": "Class # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "beartype/beartype", + "expected": "NoneTypes", + "got": "NoneTypes", + "got_raw": "NoneTypes # type: ignore # ....................{ FAIL }....................\n# Assert that indexing this factory with \"NoneType\" again returns the same\n# tuple explicitly created and cached by the prior indexation.\n# assert NoneTypeOr[NoneType] == (NoneType,) # type: ignore # ....................{ FAIL }....................\n# Assert that indexing this factory with \"NoneType\" again returns the same\n# tuple explicitly created and cached by the prior indexation.\n# assert NoneTypeOr[NoneType] == (NoneType,) # type: ignore # ....................{ FAIL }....................\n#", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "beartype/beartype", + "expected": "beartype()", + "got": "beartype())", + "got_raw": "beartype()) as conf_default: assert conf_default is beartype() assert conf_default is beartype() assert conf_default is beartype() assert conf_default is beartype() assert conf_default is beartype() assert conf_default is beartype() assert conf_default is beartype() assert conf_default is beartype() assert conf_default is beartype() assert conf_default is beartype() assert conf_default is beartype() assert conf_default is beartype() assert conf_default is beartype() assert conf_default is beartype() assert conf_default is beartype()", + "exact_match": false, + "code_bleu": 0.668740304976422, + "edit_similarity": 0.9523809523809523 + }, + { + "repo": "beartype/beartype", + "expected": "None", + "got": "None", + "got_raw": "None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "beartype/beartype", + "expected": "{}", + "got": "{}", + "got_raw": "{} # type: ignore # pragma: no cover # fmt: off # fmt: on # fmt: off # fmt: on # fmt: off # fmt: on # fmt: off # fmt: on # fmt: off # fmt: on # fmt: off # fmt: on # fmt: off # fmt: on # fmt: off # fmt: on # fmt: off # fmt: on # fmt: off # fmt: on # fmt: off # fmt: on # fmt: off # fmt: on # fmt: off # fmt: on # fmt: off # fmt: on # fmt: off # fmt", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "beartype/beartype", + "expected": "''", + "got": "''", + "got_raw": "'' assert str(warnings_info[3].message) == '51966' assert str(warnings_info[3].message) == '0xBEEFDEAD'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "beartype/beartype", + "expected": "'package_name'", + "got": "'package_name.subpackage_name.submodule_name'", + "got_raw": "'package_name.subpackage_name.submodule_name' == canonicalize_pep328_module_name_relative( module_name_relative='..', module_basenames_absolute=MODULE_BASENAMES_ABSOLUTE, ) assert canonicalize_pep328_module_name_relative( module_name_relative='...', module_basenames_absolute=MODULE_BASENAMES_ABSOLUTE, ) == 'submodule_name' assert canonicalize_pep328_module_name_relative( module_name_relative='..', module_basenames_absolute=MODULE_BASENAMES_ABSOLUTE, ) == 'subpackage_name' assert canonicalize_pep328_module_name_relative(", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4745762711864407 + }, + { + "repo": "beartype/beartype", + "expected": "(str, int)", + "got": "bool | str) == bool | str | int | float | complex | bytes | bytearray | memoryview | range | frozenset | set | dict | tuple | list | str | int | float | complex | bytes | bytearray | memoryview | range | frozenset | set | dict | tuple | list | str | int | float | complex | bytes | bytearray | memoryview | range | frozenset | set | dict | tuple | list | str | int | float | complex | bytes | bytearray | memoryview | range | frozenset | set | dict | tuple | list | str | int | float", + "got_raw": "bool | str) == bool | str | int | float | complex | bytes | bytearray | memoryview | range | frozenset | set | dict | tuple | list | str | int | float | complex | bytes | bytearray | memoryview | range | frozenset | set | dict | tuple | list | str | int | float | complex | bytes | bytearray | memoryview | range | frozenset | set | dict | tuple | list | str | int | float | complex | bytes | bytearray | memoryview | range | frozenset | set | dict | tuple | list | str | int | float", + "exact_match": false, + "code_bleu": 0.012139731271296942, + "edit_similarity": 0.028397565922920892 + }, + { + "repo": "beartype/beartype", + "expected": "'Shook'", + "got": "who_had_power)", + "got_raw": "who_had_power) == who_had_power # type: ignore # PEP 695-compliant. # .....................{ FAIL }....................\n# Assert that calling this PEP 695-parametrized callable with invalid\n# parameters raises the expected exception.\n\nwith raises(BeartypeCallHintParamViolation) as exc_info: shook_horrid(1) # type: ignore # PEP 695-compliant. assert str(exc_info.value) == 'Expected NakedAndBare, got int instead.' # .....................{ SKIP }.................... ", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.2857142857142857 + }, + { + "repo": "beartype/beartype", + "expected": "None", + "got": "None", + "got_raw": "None assert get_type_filename_or_none(ClassModuleNameFake) is None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "beartype/beartype", + "expected": "84 + 1j", + "got": "complex(2.0", + "got_raw": "complex(2.0, 1.0)) == complex(2.0, 1.0) # ....................{ FAIL }....................\n# Assert that calling this coroutine passed an arbitrary float returns the\n# expected complex number *WITH* raising an exception.\n\nwith raises(BeartypeCallHintParamViolation) as exc_info: await _shone(0.0) assert str(exc_info.value) == '0.0' # Assert that calling this coroutine passed an arbitrary float returns the\n# expected complex number *WITH* raising an exception.\n\nwith raises(BeartypeCallHintReturnViolation) as exc_info", + "exact_match": false, + "code_bleu": 0.2849383821193472, + "edit_similarity": 0.0 + }, + { + "repo": "beartype/beartype", + "expected": "True", + "got": "True)", + "got_raw": "True) is True # type: ignore # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.8888888888888888 + }, + { + "repo": "beartype/beartype", + "expected": "beartype(isha)", + "got": "beartype(isha)", + "got_raw": "beartype(isha) is isha is beartype(isha) is isha is beartype(isha) is isha is beartype(isha) is isha is beartype(isha) is isha is beartype(isha) is isha is beartype(isha) is isha is beartype(isha) is isha is beartype(isha) is isha is beartype(isha) is isha is beartype(isha) is isha is beartype(isha) is isha is beartype(isha) is is", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "beartype/beartype", + "expected": "INDENT_LEVEL_TO_CODE[2]", + "got": "INDENT_LEVEL_TO_CODE[2]", + "got_raw": "INDENT_LEVEL_TO_CODE[2] assert INDENT_LEVEL_TO_CODE[3] is INDENT_LEVEL_TO_CODE[3] # ....................{ FAIL }.................... # Assert this dictionary raises an exception for invalid indentation levels. with raises(KeyError) as exc_info: INDENT_LEVEL_TO_CODE[0] assert str(exc_info.value) == '0' assert str(exc_info.value) == '0' with raises(KeyError) as exc_info: INDENT_LEVEL_TO_CODE[4] assert str(exc_info.value) == '4' assert str(exc_info.value) == '4' with raises(KeyError) as exc", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "beartype/beartype", + "expected": "data_type", + "got": "data_type.ModuleClassOrNone.__module__", + "got_raw": "data_type.ModuleClassOrNone.__module__ is not None # type: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # py", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.3829787234042553 + }, + { + "repo": "beartype/beartype", + "expected": "is_stdout_terminal()", + "got": "is_stdout_terminal()", + "got_raw": "is_stdout_terminal() is True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "beartype/beartype", + "expected": "TypeIs", + "got": "TypeIs", + "got_raw": "TypeIs", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "beartype/beartype", + "expected": "''", + "got": "''", + "got_raw": "'' # Assert that truncating a string with a length equal to the maximum length returns the string. assert truncate_str(text='a', max_length=1) == 'a' # Assert that truncating a string with a length greater than the maximum length returns the string with the first character truncated. assert truncate_str(text='abc', max_length=2) == 'ab' # Assert that truncating a string with a length less than the maximum length returns the string with the first character truncated. assert truncate_str(text='abc', max_length=1) == 'a' # Assert that truncating", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "beartype/beartype", + "expected": "iter", + "got": "iter", + "got_raw": "iter", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "beartype/plum", + "expected": "1", + "got": "object()", + "got_raw": "object() # noqa: E711\n\n\ndef test_repr():\n m = Method(int, Signature(int), function_name=\"int\", return_type=int)\n assert repr(m) == \"\" # noqa: E711\n\n\ndef test_str():\n m = Method(int, Signature(int), function_name=\"int\", return_type=int)\n assert str(m) == \"int(int)\" # noqa: E711\n\n\ndef test_rich_repr():\n m = Method(int, Signature(int), function_name=\"int\", return_type=int)\n assert rich_render(m) == \"<", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.0 + }, + { + "repo": "beartype/plum", + "expected": "()", + "got": "1.0", + "got_raw": "1.0 + 1.0j + 1.0 + 1.0j + 1.0 + 1.0j + 1.0 + 1.0j + 1.0 + 1.0j + 1.0 + 1.0j + 1.0 + 1.0j + 1.0 + 1.0j + 1.0 + 1.0j + 1.0 + 1.0j + 1.0 + 1.0j + 1.0 + 1.", + "exact_match": false, + "code_bleu": 0.25, + "edit_similarity": 0.0 + }, + { + "repo": "beartype/plum", + "expected": "\"Docs\"", + "got": "\"Docs\"", + "got_raw": "\"Docs\" f(1) # Should raise TypeError f(1.0) # Should raise TypeError f(\"a\") # Should raise TypeError f(None) # Should raise TypeError f(()) # Should raise TypeError f([]) # Should raise TypeError f({}) # Should raise TypeError f(set()) # Should raise TypeError f(0) # Should raise TypeError f(()) # Should raise TypeError f([]) # Should raise TypeError f({}) # Should raise TypeError f(set()) # Should raise TypeError f(0) # Should raise TypeError f(()) # Should raise TypeError f([]) # Should raise TypeError f({}) # Should raise", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "beartype/plum", + "expected": "Method(int, Signature(int), function_name=\"int\", return_type=int)", + "got": "m.copy() assert m != object() assert m != 1234567890 assert m != \"abc\" assert m != Signature(int) assert m != Signature(int, int) assert m != Signature(int, int, int) assert m != Signature(int, int, int, int) assert m != Signature(int, int, int, int, int) assert m != Signature(int, int, int, int, int, int) assert m != Signature(int, int, int, int, int, int, int) assert m != Signature(int, int, int, int, int, int,", + "got_raw": "m.copy() assert m != object() assert m != 1234567890 assert m != \"abc\" assert m != Signature(int) assert m != Signature(int, int) assert m != Signature(int, int, int) assert m != Signature(int, int, int, int) assert m != Signature(int, int, int, int, int) assert m != Signature(int, int, int, int, int, int) assert m != Signature(int, int, int, int, int, int, int) assert m != Signature(int, int, int, int, int, int,", + "exact_match": false, + "code_bleu": 0.038484927710630515, + "edit_similarity": 0.1288981288981289 + }, + { + "repo": "beartype/plum", + "expected": "v", + "got": "v.value()", + "got_raw": "v.value() == v.value() == 3.0 == v.value() == 3.0 == v.value() == 3.0 == v.value() == 3.0 == v.value() == 3.0 == v.value() == 3.0 == v.value() == 3.0 == v.value() == 3.0 == v.value() == 3.0 == v.value() == 3.0 == v.value() == 3.0 == v.value() == 3.0 == v.value() == 3.0 == v.value() == 3.", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.2 + }, + { + "repo": "beartype/plum", + "expected": "C", + "got": "C[int", + "got_raw": "C[int, int, int] # noqa: E721 pylint: disable=undefined-variable # noqa: E721 pylint: disable=undefined-variable # noqa: E721 pylint: disable=undefined-variable # noqa: E721 pylint: disable=undefined-variable # noqa: E721 pylint: disable=undefined-variable # noqa: E721 pylint: disable=undefined-variable # noqa: E721 pylint: disable=undefined-variable # noqa: E721 pylint: disable=undefined-variable # noqa: E721 pylint", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "beartype/plum", + "expected": "\"f(int)\"", + "got": "\"f(int)\"", + "got_raw": "\"f(int)\" assert _render_function_call(\"f\", plum.Signature(int, int)) == \"f(int, int)\" assert _render_function_call(\"f\", plum.Signature(int, int, int)) == \"f(int, int, int)\" assert _render_function_call(\"f\", plum.Signature(int, int, int, int)) == \"f(int, int, int, int)\" assert _render_function_call(\"f\", plum.Signature(int, int, int, int, int)) == \"f(int, int, int, int, int)\" assert _render_function_call(\"f\", plum.Signature(int,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "beartype/plum", + "expected": "Number(2)", + "got": "Number(2)", + "got_raw": "Number(2)\n\n assert Number(1) < Number(2)\n assert Number(1) <= Number(1)\n assert Number(1) <= Number(2)\n assert Number(1) > Number(0)\n assert Number(1) >= Number(1)\n assert Number(1) >= Number(0)\n\n assert Number(1) != 1.0\n assert Number(1) != \"1\"\n assert Number(1) != True\n assert Number(1) != False\n assert Number(1) != None\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "beartype/plum", + "expected": "None", + "got": "None", + "got_raw": "None # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "beartype/plum", + "expected": "\"1\"", + "got": "\"1\"", + "got_raw": "\"1\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "beartype/plum", + "expected": "\"/path/to/file\"", + "got": "\"/path/to/file\"", + "got_raw": "\"/path/to/file\" + inspect.getfile(int) + inspect.getfile(int) + inspect.getfile(int) + inspect.getfile(int) + inspect.getfile(int) + inspect.getfile(int) + inspect.getfile(int) + inspect.getfile(int) + inspect.getfile(int) + inspect.getfile(int) + inspect.getfile(int) + inspect.getfile(int) + inspect.getfile(int) + inspect.getfile(int) + inspect.getfile(int) + inspect.getfile(int) + inspect.getfile(int) + inspect.getfile(int) + inspect.getfile(int) + inspect.getfile(int) + inspect.get", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "beartype/plum", + "expected": "1", + "got": "1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "beartype/plum", + "expected": "t2", + "got": "t2", + "got_raw": "t2 # noqa: E721\n\n add_promotion_rule(t1, t2, t1) # noqa: UP007\n assert promote(t1, t2) == (t1,) # noqa: UP007\n assert promote(t2, t1) == (t2,) # noqa: UP007\n\n # Test that the \"escape hatch\" works as expected. This should trigger a\n # redefinition warning. Explicitly test for that.\n with pytest.raises(TypeError) as excinfo: # noqa: PT012", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "beartype/plum", + "expected": "\"f(1)\"", + "got": "\"f(1)\"", + "got_raw": "\"f(1)\" assert _render_function_call(\"f\", (1, 2)) == \"f(1, 2)\" assert _render_function_call(\"f\", ()) == \"f()\" assert _render_function_call(\"f\", (None,)) == \"f(None)\" assert _render_function_call(\"f\", (None, None)) == \"f(None, None)\" assert _render_function_call(\"f\", (None, 1)) == \"f(None, 1)\" assert _render_function_call(\"f\", (1, None)) == \"f(1, None)\" assert _render_function_call(\"f\",", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "beartype/plum", + "expected": "copy(m)", + "got": "copy(m)", + "got_raw": "copy(m)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "beartype/plum", + "expected": "(1, 1)", + "got": "(1, 1)", + "got_raw": "(1, 1) # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "beartype/plum", + "expected": "\"float or str\"", + "got": "\"float or str\" assert f(\"a\") == \"float or str\" assert f(1.0) == \"float or str\" assert f(1.0) == \"float or str\" assert f(1.0) == \"float or str\" assert f(1.0) == \"float or str\" assert f(1.0) == \"float or str\" assert f(1.0) == \"float or str\" assert f(1.0) == \"float or str\" assert f(1.0) == \"float or str\" assert f(1.0) ==", + "got_raw": "\"float or str\" assert f(\"a\") == \"float or str\" assert f(1.0) == \"float or str\" assert f(1.0) == \"float or str\" assert f(1.0) == \"float or str\" assert f(1.0) == \"float or str\" assert f(1.0) == \"float or str\" assert f(1.0) == \"float or str\" assert f(1.0) == \"float or str\" assert f(1.0) == \"float or str\" assert f(1.0) ==", + "exact_match": false, + "code_bleu": 0.014960059607491635, + "edit_similarity": 0.08408408408408409 + }, + { + "repo": "beartype/plum", + "expected": "\"first\\n\\nsecond\"", + "got": "\"first\\n\\nsecond\\n\\nthird\"", + "got_raw": "\"first\\n\\nsecond\\n\\nthird\" r.methods = [ _MockMethod(\"first\"), _MockMethod(\"second\"), _MockMethod(\"third\"), _MockMethod(\"fourth\"), ] assert r.doc(exclude=r.methods[2].implementation) == \"first\\n\\nsecond\\n\\nfourth\" r.methods = [ _MockMethod(\"first\"), _MockMethod(\"second\"), _MockMethod(\"third\"), _MockMethod(\"fourth\"), _MockMethod(\"fifth\"), ] assert r.doc(exclude=r.methods[2].implementation, exclude=r.methods[3].implementation) == \"first\\n\\nsecond\\n\\nf", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.7906976744186046 + }, + { + "repo": "beartype/plum", + "expected": "2", + "got": "0", + "got_raw": "0\n\n assert f(1.0) == 2\n # Check that cache is cleared.\n assert len(f._cache) == 0\n assert len(f._resolver) == 1\n\n assert f(1) == 1", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "benavlabs/crudadmin", + "expected": "tables", + "got": "tables", + "got_raw": "tables # Replace with the actual table name you expect to find in the admin database. # This is just a placeholder assertion. # You should replace it with the actual table name you expect to find in your admin database. # For example, if you have a table named \"users\", you should replace \"admin_user\" with \"users\". # The actual table name will depend on your database schema. # Make sure to check the documentation of your database to find the correct table name. # If you are using a different database, you may need to adjust the query accordingly. # For example, in", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/crudadmin", + "expected": "0", + "got": "0", + "got_raw": "0 result[\"data\"][0][\"category_id\"] == 1 result[\"data\"][0][\"name\"] == \"Product 1\" result[\"data\"][0][\"price\"] == 10.00 result[\"data\"][0][\"description\"] == \"Product 1 description\" result[\"data\"][0][\"category\"][\"id\"] == 1 result[\"data\"][0][\"category\"][\"name\"] == \"Category 1\" result[\"data\"][0][\"category\"][\"description\"] == \"Category 1 description\" result[\"data\"][0][\"category\"][\"created_at\"] == category_data[0][\"created_at\"] result[\"data\"][0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/crudadmin", + "expected": "DocumentModel", + "got": "DocumentModel", + "got_raw": "DocumentModel # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/crudadmin", + "expected": "full_fields", + "got": "full_fields", + "got_raw": "full_fields", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/crudadmin", + "expected": "3", + "got": "3", + "got_raw": "3 event_integration.event_service.log_auth_event.call_count == 1 event_integration.event_service.log_security_event.call_count == 1 event_integration.event_service.log_event.assert_called_with( mock_event, db=mock_db, ) event_integration.event_service.log_auth_event.assert_called_with( mock_event, db=mock_db, ) event_integration.event_service.log_security_event.assert_called_with( mock_event, db=mock_db, ) def test_log_event_with_invalid_event_type(self, event_integration, mock_db, mock_request): \"\"\"Test logging an event with an invalid event type.\"\"\" mock_event = MockEventLogModel() event_integration.event_service.log_event", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/crudadmin", + "expected": "3", + "got": "3", + "got_raw": "3 * 2 # 3 keys, 2 calls per key # 2 calls for each key # 2 calls for each key # 2 calls for each key # 2 calls for each key # 2 calls for each key # 2 calls for each key # 2 calls for each key # 2 calls for each key # 2 calls for each key # 2 calls for each key # 2 calls for each key # 2 calls for each key # 2 calls for each key # 2 calls for each key ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/crudadmin", + "expected": "\"AdminAuditLog\"", + "got": "\"AdminAuditLog\"", + "got_raw": "\"AdminAuditLog\" AuditLogModel = AuditLogModel.__table__ AuditLogModel.__table_args__ = {} AuditLogModel.__table_args__[\"schema\"] = \"admin\" AuditLogModel.__table_args__[\"comment\"] = \"Audit log for admin actions\" AuditLogModel.__table_args__[\"indexes\"] = [AuditLogModel.id] AuditLogModel.__table_args__[\"indexes\"][0].name = \"idx_admin_audit_log_id\" AuditLogModel.__table_args__[\"indexes\"][0].unique = True AuditLogModel.__table_args__[\"indexes\"][0].columns = [AuditLogModel.id] AuditLogModel.__table", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/crudadmin", + "expected": "\"/login\"", + "got": "\"/login\"", + "got_raw": "\"/login\" assert admin_regular.oauth2_scheme.model.flows.password.tokenUrl == \"/admin/login\" assert admin_root.oauth2_scheme.model.flows.implicit.tokenUrl == \"/login\" assert admin_regular.oauth2_scheme.model.flows.implicit.tokenUrl == \"/admin/login\" assert admin_root.oauth2_scheme.model.flows.client_credentials.tokenUrl == \"/login\" assert admin_regular.oauth2_scheme.model.flows.client_credentials.tokenUrl == \"/admin/login\" assert admin_root.oauth2_scheme.model.flows.refresh_token.tokenUrl == \"/login\" assert admin_regular.oauth2_scheme.model.flows.refresh_token.tokenUrl == \"/admin/login\" assert admin_root", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/crudadmin", + "expected": "\"int\"", + "got": "\"int\"", + "got_raw": "\"int\" # type: ignore\n\n\ndef test_bulk_delete_request(db_config, user_model):\n \"\"\"Test the BulkDeleteRequest model.\"\"\"\n data = BulkDeleteRequest( # type: ignore\n ids=[1, 2, 3], # type: ignore\n )\n assert data.ids == [1, 2, 3] # type: ignore\n assert data.count == 3 # type: ignore\n assert data.total == 3 # type: ignore\n assert data.successful == 3 # type: ignore\n assert data.failed == ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/crudadmin", + "expected": "\"redis\"", + "got": "\"redis\"", + "got_raw": "\"redis\" admin._redis_config == redis_config admin._secret_key == secret_key admin._db_config == db_config admin._initial_admin == {\"username\": \"admin\", \"password\": \"secure_password123\"} admin._secure_cookies == False admin._session_key == \"session_key\" admin._session_key_salt == \"session_key_salt\" admin._session_key_iterations == 1000000 admin._session_key_length == 128 admin._session_key_hash == \"sha256\" admin._session_key_expire == 3600 admin._session_key_secure == True admin._session", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/crudadmin", + "expected": "None", + "got": "None", + "got_raw": "None result[\"email\"][\"new\"] == \"test@example.com\" result[\"email\"][\"action\"] == \"added\" result[\"email\"][\"diff\"] == \"\" result[\"email\"][\"diff_color\"] == \"green\" result[\"email\"][\"diff_icon\"] == \"plus\" result[\"email\"][\"diff_text\"] = \"Email added\" result[\"email\"][\"diff_html\"] = \"Email added\" result[\"email\"][\"diff_html_color\"] = \"green\" result[\"email\"][\"diff_html_icon\"] = \"plus\" result[\"email\"][\"diff_html_text\"] = \"Email added\" result[\"email\"][\"diff_html", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/crudadmin", + "expected": "2", + "got": "2", + "got_raw": "2 assert result[\"total\"] == 3 assert result[\"offset\"] == 0 assert result[\"limit\"] == 2 assert result[\"count\"] == 3 assert result[\"next\"] is None assert result[\"prev\"] is None assert result[\"links\"] == {} assert result[\"meta\"] == {} assert result[\"errors\"] == [] assert result[\"warnings\"] == [] assert result[\"success\"] is True assert result[\"status\"] == 200 assert result[\"message\"] == \"OK\" assert result[\"data\"] is not None assert result[\"data\"][\"items\"] is not None assert result[\"data\"][\"items\"] == [", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/crudadmin", + "expected": "expected_value", + "got": "expected_value", + "got_raw": "expected_value\n\n @pytest.mark.asyncio\n async def test_use_redis_sessions_with_password_parameter(self, async_session):\n \"\"\"Test Redis sessions configuration with password parameter.\"\"\"\n secret_key = \"test-secret-key-for-testing-only-32-chars\"\n db_config = create_test_db_config(async_session)\n\n redis_config = RedisConfig(\n host=\"redis-server\",\n port=6380,\n db=2,\n username=\"redis_user\",\n password=\"redis_pass\",\n )\n\n admin = CRUDAdmin(\n session=async_session,\n SECRET_KEY=secret_key,\n db_config=db_config,\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/crudadmin", + "expected": "str(config.admin_engine.url)", + "got": "config.db_url_strs[0]", + "got_raw": "config.db_url_strs[0] config.db_url_strs[0] == config.db_url_strs[1] config.db_url_strs[1] == config.db_url_strs[2] config.db_url_strs[2] == config.db_url_strs[3] config.db_url_strs[3] == config.db_url_strs[4] config.db_url_strs[4] == config.db_url_strs[5] config.db_url_strs[5] == config.db_url_strs[6] config.db_url_strs[6] == config.db_url_strs[7] config", + "exact_match": false, + "code_bleu": 0.2180365263630822, + "edit_similarity": 0.4897959183673469 + }, + { + "repo": "benavlabs/crudadmin", + "expected": "mock_event", + "got": "mock_event.id_", + "got_raw": "mock_event.id_ # Return the event ID \"\"\" Test successful model event logging with audit log creation. \"\"\" def test_log_model_event_success_with_audit(self, event_integration, mock_db, mock_request): \"\"\" Test successful model event logging with audit log creation. \"\"\" mock_event = MockEventLogModel() event_integration.event_service.log_event.return_value = mock_event event_integration.event_service.create_audit_log.return_value = \"audit-log-id\" result = await event_integration.log_model_event( db=mock_db, event_type=EventType.LOGIN, model=MockModel, user_id=1, session_id=\"test-session\", request=mock_request,", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.8333333333333334 + }, + { + "repo": "benavlabs/crudadmin", + "expected": "session_id)", + "got": "session_id)", + "got_raw": "session_id)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/fastcrud", + "expected": "ModelTest", + "got": "ModelTest", + "got_raw": "ModelTest # type: ignore assert builder.select is None assert builder.from_ is None assert builder.where is None assert builder.order_by is None assert builder.limit is None assert builder.offset is None assert builder.join is None assert builder.group_by is None assert builder.having is None assert builder.columns is None assert builder.distinct is None assert builder.count is None assert builder.count_distinct is None assert builder.count_all is None assert builder.count_all_distinct is None assert builder.count_all_distinct_all is None assert builder.count_all_distinct_all_distinct", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/fastcrud", + "expected": "None", + "got": "None", + "got_raw": "None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/fastcrud", + "expected": "names", + "got": "names", + "got_raw": "names and \"Frank Sinatra\" in names", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/fastcrud", + "expected": "result", + "got": "result[\"meta\"]", + "got_raw": "result[\"meta\"] and result[\"meta\"][\"next_cursor\"] is not None and result[\"meta\"][\"next_cursor\"] != \"\" and result[\"meta\"][\"next_cursor\"] != \"0\" and result[\"meta\"][\"next_cursor\"] != \"1\" and result[\"meta\"][\"next_cursor\"] != \"2\" and result[\"meta\"][\"next_cursor\"] != \"3\" and result[\"meta\"][\"next_cursor\"] != \"4\" and result[\"meta\"][\"next_cursor\"] != \"5\" and result[\"meta\"][\"next_cursor\"] != \"6\" and result[\"meta\"][\"next_cursor\"] != \"7\" and result[\"meta\"][\"next_cursor", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.6 + }, + { + "repo": "benavlabs/fastcrud", + "expected": "result", + "got": "result", + "got_raw": "result and len(result[\"data\"]) == 11 and \"total\" in result and result[\"total\"] == 11 for user in result[\"data\"]: assert \"id\" in user and \"name\" in user and \"tier\" in user and \"id\" in user[\"tier\"] and \"name\" in user[\"tier\"] and user[\"id\"] == user[\"tier\"][\"id\"] and user[\"name\"] == user[\"tier\"][\"name\"] and user[\"tier\"][\"id\"] == 1 and user[\"tier\"][\"name\"] == \"Premium\" and user[\"id\"] == 1 and user[\"name\"] ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/fastcrud", + "expected": "sorted(tier_ids)", + "got": "sorted(tier_ids)", + "got_raw": "sorted(tier_ids) # type: ignore # noqa: E501", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/fastcrud", + "expected": "5", + "got": "5", + "got_raw": "5", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/fastcrud", + "expected": "2", + "got": "2", + "got_raw": "2 # Limit applied to nested articles list", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/fastcrud", + "expected": "len(test_data) - 1", + "got": "len(test_data) - 1 - 1", + "got_raw": "len(test_data) - 1 - 1 # Subtract 1 for the first item with the same name as the second item in the test data. # Subtract 1 for the second item with the same name as the first item in the test data. assert count_ne == 2 # Test with a list of filters filters = [ {\"name\": \"John\"}, {\"name\": \"Jane\"}, ] count_list = await crud.count(async_session, filters=filters) assert count_list == 2 # Test with a list of filters and a limit filters = [ {\"name\": \"John\"}, {\"name", + "exact_match": false, + "code_bleu": 0.7259795291154771, + "edit_similarity": 0.9 + }, + { + "repo": "benavlabs/fastcrud", + "expected": "5", + "got": "5", + "got_raw": "5 if len(test_data) > 5 else len(test_data) assert len(result_with_joins_config[\"data\"]) == 5 if len(test_data) > 5 else len(test_data)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/fastcrud", + "expected": "result", + "got": "result", + "got_raw": "result and len(result[\"data\"]) == 1 and \"children\" in result[\"data\"][0] and len(result[\"data\"][0][\"children\"]) == 1 and \"child_id\" in result[\"data\"][0][\"children\"][0] and result[\"data\"][0][\"children\"][0][\"child_id\"] == 1 and \"version\" in result[\"data\"][0][\"children\"][0] and result[\"data\"][0][\"children\"][0][\"version\"] == 1 and \"name\" in result[\"data\"][0][\"children\"][0] and result[\"data\"][0][\"children\"][0][\"name\"] == \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/fastcrud", + "expected": "1", + "got": "1", + "got_raw": "1 # Only Child 1 should be returned due to the bug in deduplication logic.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/fastcrud", + "expected": "1", + "got": "1", + "got_raw": "1 assert data[\"items_per_page\"] == 5 response = client.get(\"/test/get_multi?itemsPerPage=5&page=2\") assert response.status_code == 200 data = response.json() assert data[\"page\"] == 2 assert data[\"items_per_page\"] == 5 response = client.get(\"/test/get_multi?itemsPerPage=5&page=3\") assert response.status_code == 200 data = response.json() assert data[\"page\"] == 3 assert data[\"items_per_page\"] == 5 response = client.get(\"/test/get_multi?itemsPerPage=5&page=4\") assert response", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/fastcrud", + "expected": "UserModel", + "got": "UserModel", + "got_raw": "UserModel # type: ignore # noqa: E701 # type: ignore # noqa: E701 # type: ignore # noqa: E701 # type: ignore # noqa: E701 # type: ignore # noqa: E701 # type: ignore # noqa: E701 # type: ignore # noqa: E701 # type: ignore # noqa: E701 # type: ignore # noqa: E701 # type: ignore # noqa:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/fastcrud", + "expected": "0", + "got": "0", + "got_raw": "0 # At least one result should be found with tier_id=2 or greater.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/fastcrud", + "expected": "data", + "got": "data.copy()", + "got_raw": "data.copy() # Use copy to avoid reference issues\n\n def test_single_sort_column(self):\r\n \"\"\"Test sorting by a single column.\"\"\"\r\n data = [{\"id\": 2}, {\"id\": 1}]\r\n result = sort_nested_list(data, [\"id\"])\r\n assert result == [{\"id\": 1}, {\"id\": 2}] # Sorted by id in ascending order", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5333333333333333 + }, + { + "repo": "benavlabs/fastcrud", + "expected": "1", + "got": "1", + "got_raw": "1 and filters[0].name == \"name\" and filters[0].op == \"eq\" and filters[0].val == \"John Doe\" and filters[0].type == \"string\" and filters[0].null == False and filters[0].not_ == False and filters[0].like == False and filters[0].regex == False and filters[0].in_ == False and filters[0].not_in == False and filters[0].gt == False and filters[0].gte == False and filters[0].lt == False and filters[0].lte == False and filters[", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/fastcrud", + "expected": "\"456\"", + "got": "\"456\"", + "got_raw": "\"456\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/fastcrud", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benavlabs/fastcrud", + "expected": "tester_data[\"uuid\"]", + "got": "tester_data[\"uuid\"]", + "got_raw": "tester_data[\"uuid\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "benbusby/whoogle-search", + "expected": "200", + "got": "200", + "got_raw": "200 rv.data.decode() == '
Item 4 None:\n \"\"\"\n Test adapter when we have only 1 row of data and order is specified.\n \"\"\"\n contents = \"\"\"\"a\",\"b\"\n1,2\"\"\"\n fs.create_file(\"test.csv\", contents=contents)\n\n adapter = CSVFile(\"test.csv\", order=\"b\")\n\n assert adapter.get_columns() == { \"b\": Float( filters=[Range, Equal, NotEqual, Is", + "exact_match": false, + "code_bleu": 0.6359743999178057, + "edit_similarity": 0.7719298245614035 + }, + { + "repo": "betodealmeida/shillelagh", + "expected": "3", + "got": "3.00000000000000043488e-16384.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "3.00000000000000043488e-16384.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "betodealmeida/shillelagh", + "expected": "InvalidPattern)", + "got": "InvalidPattern)", + "got_raw": "InvalidPattern) as exc_info: tokenize('dd/mm/yyyy -> (\"dd/mm/yyyy\"', classes) assert str(exc_info.value) == \"Invalid pattern: 'dd/mm/yyyy -> (\"dd/mm/yyyy\"' \"Expected ) after pattern\" \" at position 26\" \" (line 1, column 26)\" \" (line 1, column 26)\" \" (line 1, column 26)\" \" (line 1, column 26)\" \" (line 1, column 26)\" \" (line 1, column 26)\" \" (line 1, column ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "betodealmeida/shillelagh", + "expected": "1", + "got": "start", + "got_raw": "start + 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "betodealmeida/shillelagh", + "expected": "{}", + "got": "{}", + "got_raw": "{} # type: ignore # noqa: E501 # no-op # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "betodealmeida/shillelagh", + "expected": "[(\"bob\", \"Italy\")]", + "got": "[(\"bob\", \"Italy\")]", + "got_raw": "[(\"bob\", \"Italy\")]\n\n\ndef test_join2(fs: FakeFilesystem) -> None:\n \"\"\"\n Regression found with JOINs.\n \"\"\"\n fs.create_file(\n \"users.csv\",\n contents=\"\"\"\"username\",\"country_id\"\n\"alice\",1\n\"bob\",2\n\"carol\",3\n\"dan\",4\n\"eve\",5\n\"fred\",6\n\"george\",7\n\"harriet\",8\n\"jim\",9\n\"kevin\",10\n\"larry\",11\n\"matt\",12\n\"nancy\",", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "betodealmeida/shillelagh", + "expected": "0", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "betodealmeida/shillelagh", + "expected": "[(version,)]", + "got": "[version]", + "got_raw": "[version] # type: ignore # noqa: E721 # pylint: disable=unsubscriptable-object # noqa: E501 # type: ignore # noqa: E721 # pylint: disable=unsubscriptable-object # noqa: E501 # type: ignore # noqa: E721 # pylint: disable=unsubscriptable-object # noqa: E501 # type: ignore # noqa: E721 # pylint: disable=unsubscriptable-object # noqa: E", + "exact_match": false, + "code_bleu": 0.2686424829558855, + "edit_similarity": 0.8571428571428571 + }, + { + "repo": "betodealmeida/shillelagh", + "expected": "{\"column1\": {(Operator.EQ, 3)}}", + "got": "defaultdict(set) | { \"column1\": { Operator.EQ: 3 }, } | { \"column2\": { Operator.LIKE: \"test%\" }, } | { \"column3\": { Operator.GT: 10 }, } | { \"column4\": { Operator.EQ: 4 }, } | { \"column5\": { Operator.EQ: 5 }, } | { \"column6\": { Operator.EQ: 6 }, } | { \"column7\": { Operator.EQ: 7 }, } | { \"column8\": { Operator.EQ: 8 }, } | {", + "got_raw": "defaultdict(set) | { \"column1\": { Operator.EQ: 3 }, } | { \"column2\": { Operator.LIKE: \"test%\" }, } | { \"column3\": { Operator.GT: 10 }, } | { \"column4\": { Operator.EQ: 4 }, } | { \"column5\": { Operator.EQ: 5 }, } | { \"column6\": { Operator.EQ: 6 }, } | { \"column7\": { Operator.EQ: 7 }, } | { \"column8\": { Operator.EQ: 8 }, } | {", + "exact_match": false, + "code_bleu": 0.04649977365738734, + "edit_similarity": 0.15730337078651685 + }, + { + "repo": "betodealmeida/shillelagh", + "expected": "[]", + "got": "[]", + "got_raw": "[] # type: ignore # empty result set # no filters should be applied # the impossible filters are ignored # the result set is empty # the adapter should return an empty result set # the adapter should return an empty result set # the adapter should return an empty result set # the adapter should return an empty result set # the adapter should return an empty result set # the adapter should return an empty result set # the adapter should return an empty result set # the adapter should return an empty result set # the adapter should return an empty result set # the adapter should return", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "betodealmeida/shillelagh", + "expected": "[{\"rowid\": 0}]", + "got": "[]", + "got_raw": "[]", + "exact_match": false, + "code_bleu": 0.16988673071467442, + "edit_similarity": 0.25 + }, + { + "repo": "betodealmeida/shillelagh", + "expected": "\"1.0\"", + "got": "\"1.0\"", + "got_raw": "\"1.0\" # noqa: E501\n\n\ndef test_order() -> None:\n \"\"\"\n Test that order is converted correctly.\n \"\"\"\n assert Order(\"desc\").to_sql() == \"desc\" # noqa: E501\n assert Order(\"asc\").to_sql() == \"asc\" # noqa: E501\n\n\ndef test_order_invalid() -> None:\n \"\"\"\n Test that an invalid order raises an error.\n \"\"\"\n with pytest.raises(ProgrammingError) as excinfo:\n Order(\"invalid\").to_sql() # noqa: E501", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "betodealmeida/shillelagh", + "expected": "[(\"Sam\", \"(949) 555-1234\", \"Irvine\", \"Solutions Architect\")]", + "got": "[(\"Sam\",)] + [(\"Irvine\",)] + [(\"Solutions Architect\",)] + [(\"949) 555-1234\",)] + [(\"Irvine\",)] + [(\"Solutions Architect\",)] + [(\"949) 555-1234\",)] + [(\"Irvine\",)] + [(\"Solutions Architect\",)] + [(\"949) 555-1234\",)] + [(\"Irvine\",)] + [(\"Solutions Architect\",)] + [(\"949) 555-1234\",)] + [(\"I", + "got_raw": "[(\"Sam\",)] + [(\"Irvine\",)] + [(\"Solutions Architect\",)] + [(\"949) 555-1234\",)] + [(\"Irvine\",)] + [(\"Solutions Architect\",)] + [(\"949) 555-1234\",)] + [(\"Irvine\",)] + [(\"Solutions Architect\",)] + [(\"949) 555-1234\",)] + [(\"Irvine\",)] + [(\"Solutions Architect\",)] + [(\"949) 555-1234\",)] + [(\"I", + "exact_match": false, + "code_bleu": 0.04720873750886882, + "edit_similarity": 0.2521489971346705 + }, + { + "repo": "betodealmeida/shillelagh", + "expected": "\"5\"", + "got": "\"14:15:05\"", + "got_raw": "\"14:15:05\" + token.format_suffix(tokens) + \"s\" + token.format_suffix(tokens) + \"s\" + token.format_suffix(tokens) + \"s\" + token.format_suffix(tokens) + \"s\" + token.format_suffix(tokens) + \"s\" + token.format_suffix(tokens) + \"s\" + token.format_suffix(tokens) + \"s\" + token.format_suffix(tokens) + \"s\" + token.format_suffix(tokens) + \"s\" + token.format_suffix(tokens) + \"s\" + token.format_suffix(tokens) + \"s\" + token.format_suffix(tokens) + \"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.46153846153846156 + }, + { + "repo": "bitcart/bitcart", + "expected": "1", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "bitcart/bitcart", + "expected": "1", + "got": "1", + "got_raw": "1 self._check_key(payments[0], \"id\", str) self._check_key(payments[0], \"amount\", int) self._check_key(payments[0], \"currency\", str) self._check_key(payments[0], \"status\", str) self._check_key(payments[0], \"created\", datetime) self._check_key(payments[0], \"updated\", datetime) self._check_key(payments[0], \"metadata\", dict) self._check_key(payments[0], \"links\", dict) self._check_key(payments", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bitcart/bitcart", + "expected": "\"test\"", + "got": "HiddenService(", + "got_raw": "HiddenService( \"test\", \"HiddenServiceDir test\", \"test.onion\", \"test.onion\", \"test.onion\", \"test.onion\", \"test.onion\", \"test.onion\", \"test.onion\", \"test.onion\", \"test.onion\", \"test.onion\", \"test.onion\", \"test.onion\", \"test.onion\", \"test.onion\", \"test.onion\", \"test.onion\", \"test.onion\", \"test.onion\", \"test.onion\", \"test.onion\", \"test.onion\", \"test.onion\", \"test.onion\", \"", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.1 + }, + { + "repo": "bitcart/bitcart", + "expected": "method)", + "got": "method[\"id\"])", + "got_raw": "method[\"id\"]) assert method[\"amount\"] == 1000 assert method[\"currency\"] == \"USD\" assert method[\"status\"] == \"paid\" assert method[\"created\"] == 1603224000000 assert method[\"updated\"] == 1603224000000 assert method[\"refunded\"] is False assert method[\"refunded_at\"] is None assert method[\"refunded_reason\"] is None assert method[\"metadata\"] is None assert method[\"links\"] is None assert method[\"links\"][\"self\"] == f\"/v1/invoices/{", + "exact_match": false, + "code_bleu": 0.3021375397356768, + "edit_similarity": 0.7 + }, + { + "repo": "bitcart/bitcart", + "expected": "\"BTC (\u26a1)\"", + "got": "\"ln\"", + "got_raw": "\"ln\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3076923076923077 + }, + { + "repo": "bitcart/bitcart", + "expected": "\"Bitcart Merchants API\"", + "got": "\"Bitcart Merchants API\" assert tor_service.get_service_name(\"test-2\") == \"test 2\" assert tor_service.get_service_name(\"test-3\") == \"test 3\" assert tor_service.get_service_name(\"test-4\") == \"test 4\" assert tor_service.get_service_name(\"test-5\") == \"test 5\" assert tor_service.get_service_name(\"test-6\") == \"test 6\" assert tor_service.get_service_name(\"test-7\") == \"test 7\" assert tor_service.get_service_name(\"test-8\") == \"test 8\" assert tor", + "got_raw": "\"Bitcart Merchants API\" assert tor_service.get_service_name(\"test-2\") == \"test 2\" assert tor_service.get_service_name(\"test-3\") == \"test 3\" assert tor_service.get_service_name(\"test-4\") == \"test 4\" assert tor_service.get_service_name(\"test-5\") == \"test 5\" assert tor_service.get_service_name(\"test-6\") == \"test 6\" assert tor_service.get_service_name(\"test-7\") == \"test 7\" assert tor_service.get_service_name(\"test-8\") == \"test 8\" assert tor", + "exact_match": false, + "code_bleu": 0.016404807654250994, + "edit_similarity": 0.09935205183585313 + }, + { + "repo": "bitcart/bitcart", + "expected": "\"-\"", + "got": "\"-\"", + "got_raw": "\"-\" or code[6] == \"-\" or code[7] == \"-\" or code[8] == \"-\" or code[9] == \"-\" or code[10] == \"-\" or code[11] == \"-\" or code[12] == \"-\" or code[13] == \"-\" or code[14] == \"-\" or code[15] == \"-\" or code[16] == \"-\" or code[17] == \"-\" or code[18] == \"-\" or code[19] == \"-\" or code[20] == \"-\" or code[21] == \"-\" or code", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bitcart/bitcart", + "expected": "j", + "got": "j[\"created\"]", + "got_raw": "j[\"created\"] and \"updated\" in j[\"updated\"] and \"id\" in j[\"id\"] and \"username\" in j[\"username\"] and \"email\" in j[\"email\"] and \"name\" in j[\"name\"] and \"avatar\" in j[\"avatar\"] and \"theme\" in j[\"theme\"] and \"preferences\" in j[\"preferences\"] and \"wallets\" in j[\"wallets\"] and \"payouts\" in j[\"payouts\"] and \"payouts_enabled\" in j[\"payouts_enabled\"] and \"payouts_active\" in j[\"payouts", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.15384615384615385 + }, + { + "repo": "bitcart/bitcart", + "expected": "\"Hello {{var}}!\"", + "got": "\"Hello {{var}}!\" template.render({\"var\": \"World\"}) == \"Hello World!\" template.render({\"var\": \"Python\"}) == \"Hello Python!\" template.render({\"var\": \"!\"}) == \"Hello !\" template.render({\"var\": \"\"}) == \"Hello \" template.render({\"var\": None}) == \"Hello \" template.render({\"var\": 123}) == \"Hello 123\" template.render({\"var\": 456.789}) == \"Hello 456.789\" template.render({\"var\": True}) == \"Hello True\" template.render({\"var\": False", + "got_raw": "\"Hello {{var}}!\" template.render({\"var\": \"World\"}) == \"Hello World!\" template.render({\"var\": \"Python\"}) == \"Hello Python!\" template.render({\"var\": \"!\"}) == \"Hello !\" template.render({\"var\": \"\"}) == \"Hello \" template.render({\"var\": None}) == \"Hello \" template.render({\"var\": 123}) == \"Hello 123\" template.render({\"var\": 456.789}) == \"Hello 456.789\" template.render({\"var\": True}) == \"Hello True\" template.render({\"var\": False", + "exact_match": false, + "code_bleu": 0.010571251977661844, + "edit_similarity": 0.07272727272727272 + }, + { + "repo": "bitsandbytes-foundation/bitsandbytes", + "expected": "deserialized.state", + "got": "deserialized.state_dict()", + "got_raw": "deserialized.state_dict()\n\n\ndef test_linear8bit_save_load(tmpdir, linear8bit):\n linear8bit.save(tmpdir + \"/linear.pt\")\n linear8bit_custom = torch.load(tmpdir + \"/linear.pt\")\n assert linear8bit.weight.data.data_ptr() != linear8bit_custom.weight.data.data_ptr()\n assert torch.allclose(linear8bit.weight.data, linear8bit_custom.weight.data)\n assert linear8bit.bias.data.data_ptr() != linear8bit_custom.bias.data.data_ptr()\n assert torch.allclose(linear8bit.bias.data, linear8bit", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.8372093023255814 + }, + { + "repo": "bitsandbytes-foundation/bitsandbytes", + "expected": "None", + "got": "None", + "got_raw": "None # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E71", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bitsandbytes-foundation/bitsandbytes", + "expected": "fx_ours)", + "got": "fx_ours)", + "got_raw": "fx_ours) assert linear_custom.state.CB is not None assert not linear_custom.state.has_fp16_weights assert linear_custom.state.CB.dtype == torch.int8 assert linear_custom.state.CB.device == device assert linear_custom.state.CB.numel() == linear.weight.numel() assert linear_custom.state.CB.dtype == linear.weight.dtype assert linear_custom.state.CB.device == linear.weight.device assert linear_custom.state.CB.requires_grad is False assert linear_custom.state.CB.grad is None assert linear_custom.state.CB.grad_fn is None assert linear_custom.state.CB.grad_fn is None assert linear_custom.state.CB.grad_fn is", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bitsandbytes-foundation/bitsandbytes", + "expected": "deq_c)", + "got": "A_noncontig)", + "got_raw": "A_noncontig) torch.testing.assert_close(deq_c, A_contig) torch.testing.assert_close(deq_nc, deq_c) torch.testing.assert_close(A_noncontig, A_contig) torch.testing.assert_close(absmax_nc, absmax_c) torch.testing.assert_close(q_nc, q_c) torch.testing.assert_close(blocksize, 64) # ROCm has a different warp size for 4-bit quantization torch.testing.assert_close(ROCM_WARP_SIZE_64, 32) # ROCm has a different warp size for 4-bit quantization torch.testing.assert_close(quant_type", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "bitsandbytes-foundation/bitsandbytes", + "expected": "dict_keys_after", + "got": "dict_keys_after", + "got_raw": "dict_keys_after == dict_keys_copy == set() | {\"data\", \"quant_state\"} | {\"_blocksize\", \"compress_statistics\"} | {\"_dtype\", \"device\"} | {\"_qparams\", \"_qconfig\"} | {\"_qconfig_state\"} | {\"_qconfig_state_\"} | {\"_qconfig_state_0\"} | {\"_qconfig_state_1\"} | {\"_qconfig_state_2\"} | {\"_qconfig_state_3\"} | {\"_qconfig_state_4\"} | {\"_qconfig_state_5\"} | {\"_qconfig_state_6\"} | {\"_q", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bitsandbytes-foundation/bitsandbytes", + "expected": "RuntimeError)", + "got": "RuntimeError)", + "got_raw": "RuntimeError) as excinfo: new_linear_custom.load_state_dict(new_state_dict) print(excinfo.value) assert \"CUDA\" in str(excinfo.value) else: new_linear_custom.load_state_dict(new_state_dict) new_linear_custom.to(device) new_linear_custom.eval() new_linear_custom.weight.data = linear.weight.data.clone() new_linear_custom.bias.data = linear.bias.data.clone() if linear.bias is not None: new_linear_custom.bias.requires_grad = True new_linear_custom.bias.grad = None new_linear_custom.weight.grad = None new_linear_custom.weight.requires_grad = True new_linear_custom.weight.data = linear.weight.data.clone() new_linear_custom", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bitsandbytes-foundation/bitsandbytes", + "expected": "n_cases", + "got": "n_cases", + "got_raw": "n_cases + 1 if inference_kernel else n_cases + 2 if DQ else n_cases + 1 if dtype == torch.float16 else n_cases + 3 if dtype == torch.float32 else n_cases + 2 if dtype == torch.float64 else n_cases + 1 if dtype == torch.bfloat16 else 1 + 1 if dtype == torch.int8 else 1 + 1 if dtype == torch.int16 else 1 + 1 if dtype == torch.int32 else 1 + 1 if dtype == torch.int64 else 1 + 1 if", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bitsandbytes-foundation/bitsandbytes", + "expected": "ref_output.device", + "got": "ref_output.device", + "got_raw": "ref_output.device assert torch.allclose(compiled_output, ref_output) assert torch.allclose(net(x), ref_output) assert torch.allclose(net(x), compiled_output) assert torch.allclose(net(x), compiled_net(x)) assert torch.allclose(net(x), compiled_net(x.to(device))) assert torch.allclose(net(x.to(device)), compiled_net(x)) assert torch.allclose(net(x.to(device)), compiled_net(x.to(device))) assert torch.allclose(net(x.to(device)), compiled_net(x.to(device).to(device))) assert torch.allclose(net(x.to(device).to(device)), compiled_net(x.to(device))) assert torch.allclose(net(x", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bitsandbytes-foundation/bitsandbytes", + "expected": "A1)", + "got": "A1)", + "got_raw": "A1) torch.testing.assert_close(C2a, B1) C = torch.matmul(C1a, C2a) C = C.to(torch.float32) C = C.to(torch.float16) C = C.to(C1a.dtype) C = C.to(C1a.device) C = C.to(C1a.layout) C = C.to(C1a.dtype) C = C.to(C1a.device) C = C.to(C1a.layout) C = C.to(C1a.dtype) C = C.to(C1a.device) C = C.to(C1a.layout) C = C", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bitsandbytes-foundation/bitsandbytes", + "expected": "deep_copy.state", + "got": "deep_copy.state.copy()", + "got_raw": "deep_copy.state.copy() if linear8bit.bias is not None else None if deep_copy.bias is not None else None if linear8bit.bias is None else deep_copy.bias.data.data_ptr() != deep_copy.bias.data.data_ptr() else torch.allclose(linear8bit.bias.data, deep_copy.bias.data) if linear8bit.bias is not None else None if deep_copy.bias is not None else None if linear8bit.bias is None else deep_copy.bias.data.data_ptr() != deep_copy.bias.data.data_ptr() else torch.allclose(linear8bit.bias.data, deep_copy.bias.data) if linear8bit.bias is not", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.8108108108108109 + }, + { + "repo": "bitsandbytes-foundation/bitsandbytes", + "expected": "\"libbitsandbytes_rocm72\"", + "got": "\"libbitsandbytes_rocm72\"", + "got_raw": "\"libbitsandbytes_rocm72\" caplog.text == \"\" def test_get_cuda_bnb_library_path(monkeypatch, cuda120_spec, caplog): monkeypatch.delenv(\"BNB_CUDA_VERSION\", raising=False) monkeypatch.delenv(\"BNB_ROCM_VERSION\", raising=False) assert get_cuda_bnb_library_path(cuda120_spec).stem == \"libbitsandbytes_cuda120\" caplog.text == \"\" def test_get_cuda_bnb_library_path_override_with_cuda(monkeypatch, cuda120_spec, caplog): \"\"\"BNB_CUDA_VERSION=120 overrides to", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "boringdata/boring-semantic-layer", + "expected": "1", + "got": "1.0000000000000002e-05", + "got_raw": "1.0000000000000002e-05 * 3.0000000000000004e-05 * 1.0000000000000002e-05 * 1.0000000000000002e-05 * 1.0000000000000002e-05 * 1.000000", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.08695652173913043 + }, + { + "repo": "boringdata/boring-semantic-layer", + "expected": "2", + "got": "2", + "got_raw": "2\n\n # Check series names and colors\n assert spec[\"series\"][0][\"name\"] == \"X\" and spec[\"series\"][0][\"color\"] == \"blue\" and spec[\"series\"][1][\"name\"] == \"Y\" and spec[\"series\"][1][\"color\"] == \"red\" and spec[\"series\"][0][\"data\"] == [10, 20, 15] and spec[\"series\"][1][\"data\"] == [12, 18, 22] and spec[\"xAxis\"][\"data\"] == [\"A\", \"B\", \"C\"] and spec[\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "boringdata/boring-semantic-layer", + "expected": "1", + "got": "1", + "got_raw": "1 and timestamps[0].name == \"statement_date\" and timestamps[0].is_event_timestamp is True and timestamps[0].is_time_dimension is True and timestamps[0].smallest_time_grain == \"TIME_GRAIN_DAY\" and timestamps[0].description == \"\" and timestamps[0].expr == t.statement_date and timestamps[0].expr_str == \"statement_date\" and timestamps[0].expr_type == \"column\" and timestamps[0].expr_name == \"statement_date\" and timestamps[0].expr_alias == \"statement_date\" and timestamps[0].expr_table == t and timestamps[0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "boringdata/boring-semantic-layer", + "expected": "3", + "got": "3", + "got_raw": "3 result[0] == { \"session_id\": 1, \"event_count\": 4, \"total_page_views\": 4, \"duration_minutes\": 5, } result[1] == { \"session_id\": 2, \"event_count\": 2, \"total_page_views\": 2, \"duration_minutes\": 15, } result[2] == { \"session_id\": 3, \"event_count\": 1, \"total_page_views\": 1, \"duration_minutes\": 0, } result[3] == { \"session_id\": 4, \"event_count\": ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "boringdata/boring-semantic-layer", + "expected": "1", + "got": "1.0000000000000002e-05", + "got_raw": "1.0000000000000002e-05 # 1e-5 is the default precision for floats in pandas # (1/1000000) # This is a bit of a hack to avoid rounding errors in the test # (1e-5) is the expected result # (1e-5) is the expected result # (1e-5) is the expected result # (1e-5) is the expected result # (1e-5) is the expected result #", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.08695652173913043 + }, + { + "repo": "boringdata/boring-semantic-layer", + "expected": "{\"/page\"}", + "got": "[(\"/page", + "got_raw": "[(\"/page#section\", \"section\")]\n\n def test_extract_link_with_protocol(self, tmp_path):\n \"\"\"Test that links with protocols are extracted correctly.\"\"\"\n md_file = tmp_path / \"test.md\"\n md_file.write_text(\"Visit [GitHub](https://github.com) for more info.\")\n\r\n links = extract_markdown_links(tmp_path)\r\n assert links == [(\"https://github.com\", \"GitHub\")]\r\n\r\n def test_extract_link_with_query(self, tmp_path):\r\n \"\"\"Test that links with query parameters are extracted correctly.\"\"\"\r\n md_file = tmp_path /", + "exact_match": false, + "code_bleu": 0.2295748846661433, + "edit_similarity": 0.7058823529411765 + }, + { + "repo": "boringdata/boring-semantic-layer", + "expected": "\"DONE\"", + "got": "\"DONE\"", + "got_raw": "\"DONE\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "boringdata/boring-semantic-layer", + "expected": "edges", + "got": "edges", + "got_raw": "edges | {(\"price\", \"revenue\")} | {(\"revenue\", \"total_revenue\")} | {(\"revenue\", \"avg_revenue\")} | {(\"total_revenue\", \"avg_revenue\")} | {(\"avg_revenue\", \"avg_revenue\")} | {(\"avg_revenue\", \"revenue\")} | {(\"avg_revenue\", \"price\")} | {(\"avg_revenue\", \"quantity\")} | {(\"avg_revenue\", \"price\")} | {(\"avg_revenue\", \"price\")} | {(\"avg_revenue\", \"price\")} | {(\"avg_revenue\", \"price\")} |", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "boringdata/boring-semantic-layer", + "expected": "None", + "got": "None", + "got_raw": "None # Default to None. # The BSLTools class should have a method to load a profile. # The BSLTools class should have a method to load a profile. # The BSLTools class should have a method to load a profile. # The BSLTools class should have a method to load a profile. # The BSLTools class should have a method to load a profile. # The BSLTools class should have a method to load a profile. # The BSLTools class should have a method to load a profile. # The BSLTools class should have", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "boringdata/boring-semantic-layer", + "expected": "dims", + "got": "dims.keys()", + "got_raw": "dims.keys() with_new_dim.get_dimensions()[\"carrier\"] == [\"AA\"] with_new_dim.get_dimensions()[\"arr_date\"] == [\"2023-01-15\", \"2023-01-16\", \"2023-02-10\", \"2023-02-11\", \"2023-03-05\"] with_new_dim.get_dimensions()[\"origin\"] == [\"JFK\", \"LAX\", \"JFK\", \"ATL\", \"ORD\"] with_new_dim.get_dimensions()[\"destination\"] == [\"L", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5333333333333333 + }, + { + "repo": "boringdata/boring-semantic-layer", + "expected": "1", + "got": "2", + "got_raw": "2 * 3 + 1 * 3 + 1 * 3 + 1 * 3 + 1 * 3 + 1 * 3 + 1 * 3 + 1 * 3 + 1 * 3 + 1 * 3 + 1 * 3 + 1 * 3 + 1 * 3 + 1 * 3 + 1 * 3 + 1 * 3 + 1 * 3 + 1 * 3 + 1 * 3 + 1 * 3 + 1 * 3 + 1 *", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "boringdata/boring-semantic-layer", + "expected": "\"dev\"", + "got": "\"dev\"", + "got_raw": "\"dev\" bsl.model = mock_models bsl.chart_backend = \"altair\" bsl._load_profile(profile_file) bsl._load_model(model_file) bsl._load_config() bsl._load_data() bsl._load_config() bsl._load_data() bsl._load_config() bsl._load_data() bsl._load_config() bsl._load_data() bsl._load_config() bsl._load_data() bsl._load_config() bsl._load_data() bsl._load_config() bsl._load_data() bsl._load_config() bsl._load", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "boringdata/boring-semantic-layer", + "expected": "result.columns", + "got": "result[0]", + "got_raw": "result[0] # free segment should have a lower CLV than premium segment", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.5217391304347826 + }, + { + "repo": "boringdata/boring-semantic-layer", + "expected": "0", + "got": "0", + "got_raw": "0 result_data[\"records\"][0][\"b\"] == \"z\" result_data[\"records\"][0][\"count\"] == 1 result_data[\"total\"] == 3 result_data[\"limit\"] == 10 result_data[\"offset\"] == 0 result_data[\"order_by\"] == [[\"count\", \"desc\"]] result_data[\"columns\"] == [\"b\", \"count\"] result_data[\"measures\"] == [\"count\"] result_data[\"dimensions\"] == [\"b\"] result_data[\"filters\"] == [] result_data[\"time_range\"] == [] result_data[\"sort_by\"] == [[\"count\", \"desc\"]] result_data[\"limit\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "boringdata/boring-semantic-layer", + "expected": "\"line\"", + "got": "\"line\"", + "got_raw": "\"line\" # Line chart with time dimension. def test_detect_line_chart_categorical(self): \"\"\"Test line chart for categorical data.\"\"\" result = detect_chart_type_generic([\"category\"], [\"count\"], \"category\") assert result == \"bar\" # Bar chart with categorical data. def test_detect_line_chart_error(self): \"\"\"Test line chart for error data.\"\"\" result = detect_chart_type_generic([\"error\"], [\"count\"], \"error\") assert result == \"error\" # Error chart. def test_detect_line_chart_generic(self): \"\"\"Test line chart for generic data.\"\"\" result = detect_chart_type_generic([\"generic\"], [\"count", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "boringdata/boring-semantic-layer", + "expected": "0", + "got": "0", + "got_raw": "0 # At least one row should be returned", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "boringdata/boring-semantic-layer", + "expected": "5", + "got": "5.000000000000001", + "got_raw": "5.000000000000001 # 2 + 3 # 1 + 2 + 3 # 1 + 2 + 3 + 4 + 5 + 6 # 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 # 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 # 1 + 2 + 3 + 4 + ", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.1111111111111111 + }, + { + "repo": "boringdata/boring-semantic-layer", + "expected": "7", + "got": "3.000000000000000463158342719096823437500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "3.000000000000000463158342719096823437500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "boringdata/boring-semantic-layer", + "expected": "\"value\"", + "got": "\"value\"", + "got_raw": "\"value\" assert result_df.columns.tolist() == [\"carrier\", \"measure\", \"value\"] assert result_df.iloc[0, 0] == \"AA\" assert result_df.iloc[0, 1] == \"count\" assert result_df.iloc[0, 2] == 10.0 assert result_df.iloc[1, 0] == \"UA\" assert result_df.iloc[1, 1] == \"avg_delay\" assert result_df.iloc[1, 2] == 8.100000000000001 end def test_pivot_dataframe_for_heat", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "boringdata/boring-semantic-layer", + "expected": "0", + "got": "0", + "got_raw": "0 data[\"records\"][0][\"carrier\"] == \"AA\" data[\"records\"][0][\"flight_count\"] == 10 data[\"records\"][1][\"carrier\"] == \"UA\" data[\"records\"][1][\"flight_count\"] == 10 data[\"records\"][2][\"carrier\"] == \"DL\" data[\"records\"][2][\"flight_count\"] == 10 data[\"records\"][3][\"carrier\"] == \"JFK\" data[\"records\"][3][\"flight_count\"] == 10 data[\"records\"][4][\"carrier\"] == \"LAX\" data[\"records\"][4][\"flight_count\"] == 10", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bottlepy/bottle", + "expected": "test())", + "got": "test())", + "got_raw": "test())\n\n def test_template_decorator(self):\n @jinja2_template('start {{var}} end')\n def test():\n return dict(var='middle')\n\n self.assertEqual(touni('start middle end'), \n### Target:\ntest())", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bottlepy/bottle", + "expected": "lines)", + "got": "lines)", + "got_raw": "lines) + [tail] if tail else [] + [partial] if partial else [] ) + [tail] if tail else [] + [partial] if partial else [] ) + [tail] if tail else [] + [partial] if partial else [] ) + [tail] if tail else [] + [partial] if partial else [] ) + [tail] if tail else [] + [partial] if partial else [] ) + [tail] if tail else [] + [partial] if partial else [] ) + [tail] if tail else [] + [partial] if partial else [] ) + [tail] if tail else", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bottlepy/bottle", + "expected": "404)", + "got": "404)", + "got_raw": "404) self.assertEqual(rs.status_line, '404 Not Found') rs.status = 500\n self.assertEqual(rs.status, rs.status_line) self.assertEqual(rs.status_code, 500) self.assertEqual(rs.status_line, '500 Internal Server Error') rs.status = 403\n self.assertEqual(rs.status, rs.status_line) self.assertEqual(rs.status_code, 403) self.assertEqual(rs.status_line, '403 Forbidden') rs.status = 401\n self.assertEqual(rs.status, rs.status_line) self.assertEqual(rs.status_code, 40", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bottlepy/bottle", + "expected": "test())", + "got": "test())", + "got_raw": "test())", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bottlepy/bottle", + "expected": "list(m.iterallitems()))", + "got": "list(m.items()))", + "got_raw": "list(m.items()))", + "exact_match": false, + "code_bleu": 0.6580370064762462, + "edit_similarity": 0.8205128205128205 + }, + { + "repo": "bottlepy/bottle", + "expected": "m.getall('a'))", + "got": "list(m['a']))", + "got_raw": "list(m['a'])) self.assertEqual(6, m['a'].getall()) self.assertEqual(6, m['a'].getall(1)) self.assertEqual(6, m['a'].getall(2)) self.assertEqual(6, m['a'].getall(3)) self.assertEqual(6, m['a'].getall(4)) self.assertEqual(6, m['a'].getall(5)) self.assertEqual(6, m['a'].getall(6)) self.assertEqual(6, m['a'].getall(7)) self.assertEqual(6, m['a'].getall(8", + "exact_match": false, + "code_bleu": 0.25098621243978964, + "edit_similarity": 0.5185185185185185 + }, + { + "repo": "bottlepy/bottle", + "expected": "my_decorator in self.app.plugins)", + "got": "installed in self.app.plugins) self.verify_installed(installed", + "got_raw": "installed in self.app.plugins) self.verify_installed(installed, tools.Plugin) self.verify_installed(installed, tools.DecoratedPlugin) self.verify_installed(installed, tools.DecoratedPlugin2) self.verify_installed(installed, tools.DecoratedPlugin3) self.verify_installed(installed, tools.DecoratedPlugin4) self.verify_installed(installed, tools.DecoratedPlugin5) self.verify_installed(installed, tools.DecoratedPlugin6) self.verify_installed(installed, tools.DecoratedPlugin7) self.verify_installed(installed, tools.DecoratedPlugin8) self.verify_installed(installed, tools.Decorated", + "exact_match": false, + "code_bleu": 0.5142401605028263, + "edit_similarity": 0.4631578947368421 + }, + { + "repo": "bottlepy/bottle", + "expected": "ValueError)", + "got": "bottle.RouteBuildError)", + "got_raw": "bottle.RouteBuildError) build('introute')", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.47058823529411764 + }, + { + "repo": "bottlepy/bottle", + "expected": "'aaa)(?:_bbb)')", + "got": "'aaa(?:_bbb)')", + "got_raw": "'aaa(?:_bbb)')", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.9655172413793104 + }, + { + "repo": "bottlepy/bottle", + "expected": "KeyError)", + "got": "KeyError)", + "got_raw": "KeyError) d['cay']\n self.assertRaises(KeyError) m['cay']\n self.assertRaises(TypeError) d['cay'] = 'new'\n self.assertRaises(TypeError) m['cay'] = 'new'\n self.assertRaises(TypeError) d['cay'] = 5\n self.assertRaises(TypeError) m['cay'] = 5\n self.assertRaises(TypeError) d['cay'] = 5.0\n self.assertRaises(TypeError) m['cay'] = 5.0\n self.assertRaises(TypeError) d['cay'] = True\n self.assertRaises(TypeError", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bottlepy/bottle", + "expected": "byte_iter.closed)", + "got": "test_iter.closed)", + "got_raw": "test_iter.closed)", + "exact_match": false, + "code_bleu": 0.668740304976422, + "edit_similarity": 0.8823529411764706 + }, + { + "repo": "bottlepy/bottle", + "expected": "test2())", + "got": "test2())", + "got_raw": "test2()) @view('stpl') def test3(): return 'hello' self.assertEqual(touni('hello'), test3()) @view('stpl', x='x') def test4(): return 'hello' self.assertEqual(touni('xello'), test4()) @view('stpl', x='x') def test5(): return 'hello' self.assertEqual(touni('xello'), test5()) @view('stpl', x='x') def test6(): return 'hello' self.assertEqual(touni('xello'), test6()) @view('stpl', x='x')", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bottlepy/bottle", + "expected": "\"text\")", + "got": "\"text\")", + "got_raw": "\"text\") self.assertEqual(p[1].value, test_text) self.assertEqual(p[1].type, 'text/plain') self.assertEqual(p[1].charset, 'utf8') self.assertEqual(p[1].headers, {}) self.assertEqual(p[1].headers['Content-Disposition'], 'form-data; name=\"text\"') self.assertEqual(p[1].headers['Content-Type'], 'text/plain') self.assertEqual(p[1].headers['Content-Transfer-Encoding'], '8bit') self.assertEqual(p[1].headers['Content-Base'], 'utf8') self.assertEqual(p[1].headers['Content-Id'], None)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bottlepy/bottle", + "expected": "plugin2 not in self.app.plugins)", + "got": "plugin2 in self.app.plugins)", + "got_raw": "plugin2 in self.app.plugins)\n\n def test_uninstall_by_instance(self):\n plugin = self.app.install(MyPlugin())\n self.app.uninstall(plugin)\n self.assertTrue(plugin not in self.app.plugins)\n\n def test_uninstall_by_name(self):\n plugin = self.app.install(MyPlugin())\n self.app.uninstall(\"myplugin\")\n self.assertTrue(plugin not in self.app.plugins)\n\n def test_uninstall_non_existing(self):\n with self.assertRaises(KeyError) as cm:\n self.app.uninstall(\"non-existing\")\n self.assertEqual(str(cm.exception), \"", + "exact_match": false, + "code_bleu": 0.7903464044617434, + "edit_similarity": 0.9333333333333333 + }, + { + "repo": "bottlepy/bottle", + "expected": "t)", + "got": "t)", + "got_raw": "t) def test_file(self):\n \"\"\" Templates: Mako file\"\"\"\n t = MakoTemplate('start ${var} end').render(var='var')\n self.assertEqual('start var end', t) def test_file_unicode(self):\n \"\"\" Templates: Mako file with unicode\"\"\"\n t = MakoTemplate('start ${var} end').render(var=u'var') self.assertEqual('start var end', t) def test_file_unicode2(self):\n \"\"\" Templates: Mako file with unicode2\"\"\" t = MakoTemplate('start ${var} end').render(var=u'var') self.assertEqual", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bottlepy/bottle", + "expected": "test_file)", + "got": "'')", + "got_raw": "'')\n self.assertEqual(p[0].filename, 'random.png')\n self.assertEqual(p[0].content_type, 'image/png')\n self.assertEqual(p[0].headers, {})\n self.assertEqual(p[0].headers['Content-Disposition'], 'form-data; name=\"file1\"; filename=\"random.png\"')\n self.assertEqual(p[0].headers['Content-Type'], 'image/png')\n self.assertEqual(p[0].headers['Content-Length'], '1024')\n self.assertEqual(p[0].headers['Content-Transfer-Encoding'], 'binary')\n self.assertEqual", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.15384615384615385 + }, + { + "repo": "bottlepy/bottle", + "expected": "good)", + "got": "good)", + "got_raw": "good)\n\n def test_init(self):\n fu = FileUpload(None, None, 'test.txt')\n self.assertEqual(fu.filename, 'test.txt')\n self.assertEqual(fu.content_type, None)\n self.assertEqual(fu.length, None)\n self.assertEqual(fu.body, None)\n self.assertEqual(fu.offset, 0)\n self.assertEqual(fu.chunk_size, 8192)\n self.assertEqual(fu._chunk, None)\n self.assertEqual(fu._chunk_size, 8192)\n self.assertEqual(fu._offset,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bottlepy/bottle", + "expected": "True)", + "got": "True)", + "got_raw": "True) self.assertEqual(rm.get_path('./test2/'), tempdir) self.assertEqual(rm.get_path('./test2/'), rm.get_path('./test2/')) self.assertEqual(rm.get_path('./test2/'), rm.get_path('./test2/')) self.assertEqual(rm.get_path('./test2/'), rm.get_path('./test2/')) self.assertEqual(rm.get_path('./test2/'), rm.get_path('./test2/')) self.assertEqual(rm.get_path('./test2/'), rm.get_path('./test2/')) self.assertEqual(rm.get_path('./test2/'), rm.get_path('./test2", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bottlepy/bottle", + "expected": "'value3')", + "got": "'value3')", + "got_raw": "'value3') c.update() self.assertEqual(c['key'], 'value') self.assertEqual(c['key2'], 'value3') c.update(key='value') self.assertEqual(c['key'], 'value') self.assertEqual(c['key2'], 'value3') c.update(key='value2', key2='value3') self.assertEqual(c['key'], 'value2') self.assertEqual(c['key2'], 'value3') c.update(key='value', key2='value2') self.assertEqual(c['key'], 'value') self.assertEqual(c['key2'], 'value2') c.update(key='value2', key2='", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "buiapp/reaktiv", + "expected": "3", + "got": "3", + "got_raw": "3", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "buiapp/reaktiv", + "expected": "15", + "got": "15", + "got_raw": "15 # 5 * 3 = 15 # No recomputation yet # Change the source value source.set(10) # Access the computed value again assert computed.get() == 30 # 10 * 3 = 30 # Recomputation occurred # Access the computed value again assert computed.get() == 30 # No recomputation again # Change the source value again source.set(20) # Access the computed value again assert computed.get() == 60 # 20 * 3 = ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "buiapp/reaktiv", + "expected": "3.0", + "got": "3.0", + "got_raw": "3.0 assert stats[\"min\"] == 1 assert stats[\"max\"] == 5 # Update the Signal value and recompute the statistics @numbers.set([10, 20, 30, 40, 50]) stats = statistics() assert stats[\"sum\"] == 150 assert stats[\"avg\"] == 30.0 assert stats[\"min\"] == 10 assert stats[\"max\"] == 50 # Update the Signal value again and recompute the statistics @numbers.set([100, 200, 300,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "buiapp/reaktiv", + "expected": "cleanup_ran", + "got": "cleanup_ran[0]", + "got_raw": "cleanup_ran[0] and \"cleanup2\" in cleanup_ran[1] and \"cleanup3\" in cleanup_ran[2] and \"cleanup1\" in cleanup_ran[3] and \"cleanup2\" in cleanup_ran[4] and \"cleanup3\" in cleanup_ran[5] and \"cleanup1\" in cleanup_ran[6] and \"cleanup2\" in cleanup_ran[7] and \"cleanup3\" in cleanup_ran[8] and \"cleanup1\" in cleanup_ran[9] and \"cleanup2\" in cleanup_ran[10] and", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.88 + }, + { + "repo": "buiapp/reaktiv", + "expected": "4", + "got": "4.0", + "got_raw": "4.0 # 2 * 2 = 4.0 # Pattern 2: Initial value and computation function # Pattern 3: Initial value and computation function with a delay # Pattern 4: Initial value and computation function with a delay and a batch # Pattern 5: Initial value and computation function with a delay and a batch and a dependency # Pattern 6: Initial value and computation function with a delay and a batch and a dependency and a dependency # Pattern 7: Initial value and computation function with a delay and a batch and a dependency and a dependency and a dependency #", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "buiapp/reaktiv", + "expected": "10.1", + "got": "10.100000000000001", + "got_raw": "10.100000000000001 # Due to floating-point precision issues, we allow a small tolerance here.", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.36363636363636365 + }, + { + "repo": "buiapp/reaktiv", + "expected": "3", + "got": "3", + "got_raw": "3 # a = 3 # b = a + 1 = 3 + 1 = 4 # c = a * 2 = 3 * 2 = 6 # d = b + c = 4 + 6 = 10 # d = 10 # triggers should be updated with the new value assert len(triggers) == 3 assert triggers[2] == \"d=10\" # d = (a+1) + (a*2) = (3+1) + (3*2) = 4 +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "buiapp/reaktiv", + "expected": "40", + "got": "40", + "got_raw": "40", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "buiapp/reaktiv", + "expected": "3", + "got": "3", + "got_raw": "3 # All cleanup functions should run.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "buiapp/reaktiv", + "expected": "10", + "got": "10", + "got_raw": "10 # 5 * 2 + 1 # 1 + 1 # 2 * 2 + 1 # 4 + 1 # 5 + 1 # 6 # 2 * 2 + 1 # 4 + 1 # 5 + 1 # 6 # 2 * 2 + 1 # 4 + 1 # 5 + 1 # 6 # 2 * 2 + 1 # 4 + 1 # 5 + 1 ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "buiapp/reaktiv", + "expected": "0", + "got": "0", + "got_raw": "0\n\n computed.get() # Trigger dependency tracking\n\n assert len(computed._dependencies) == 1 # Dependency added after first access", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "buiapp/reaktiv", + "expected": "1", + "got": "1", + "got_raw": "1 # Should only compute once\n assert compute_bc_mock.call_count == 1 # Should only compute once\r\n assert compute_independent_mock.call_count == 0 # Should not compute at all\r\n\r\n # Create an effect that depends on computed signals and a base signal\r\n effect = Effect(lambda: a.get() + computed_ab.get() + computed_bc.get() + computed_independent.get())\r\n\r\n # Batch processing\r\n with batch() as batched_scope:\r\n a.set(2) # Change a to trigger re-computation of computed signals\r\n b.set(3", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bytedance/trae-agent", + "expected": "None", + "got": "None", + "got_raw": "None and config.lakeview.default_provider == \"anthropic\" and config.lakeview.model_providers[\"anthropic\"] == ModelConfig( api_key=\"anthropic-key\", model=\"claude-model\", max_tokens=4096, temperature=0.5, top_p=1, top_k=0, max_retries=10, ) and config.lakeview.enable_lakeview is True and config.lakeview.enable_mcp is False and config.lakeview.mcp_servers == {} and config.lakeview.mcp_server_commands == {} and config.lakeview.mcp_server_args == {} and", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bytedance/trae-agent", + "expected": "\"new content\")", + "got": "\"new content\") self.mock_exists.assert_called_once_with(self.test_file) self.assertEqual(result", + "got_raw": "\"new content\") self.mock_exists.assert_called_once_with(self.test_file) self.assertEqual(result, \"File created\") self.assertTrue(self.test_file.exists()) self.assertEqual(self.test_file.read_text(), \"new content\") self.assertFalse(self.test_file.is_dir()) self.assertEqual(self.test_file.parent, self.test_dir) self.assertEqual(self.test_file.name, \"test_file.txt\") self.assertEqual(self.test_file.suffix, \".txt\") self.assertEqual(self.test_file.parent.name, \"test_dir\") self.assertEqual(self.test_file.parent.parent.name, \"\") self.assertEqual(self.test_file.parent.parent.parent.name, \"\") self.assertEqual(self.test_file.parent.parent.parent.parent.name,", + "exact_match": false, + "code_bleu": 0.09507244120026236, + "edit_similarity": 0.25688073394495414 + }, + { + "repo": "bytedance/trae-agent", + "expected": "written_data[\"config\"])", + "got": "written_data)", + "got_raw": "written_data)", + "exact_match": false, + "code_bleu": 0.23784142300054423, + "edit_similarity": 0.7222222222222222 + }, + { + "repo": "bytedance/trae-agent", + "expected": "\"\")", + "got": "\"\")", + "got_raw": "\"\") # The response should be empty since it's a tool call.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bytedance/trae-agent", + "expected": "\"Bob\")", + "got": "\"Bob\")", + "got_raw": "\"Bob\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bytedance/trae-agent", + "expected": "\"A test tool\")", + "got": "self.mock_tool.description) self.assertEqual(self.tool.get_description()", + "got_raw": "self.mock_tool.description) self.assertEqual(self.tool.get_description(), \"A test tool\") self.assertEqual(self.tool.get_description(), \"A test tool\") self.assertEqual(self.tool.get_description(), \"A test tool\") self.assertEqual(self.tool.get_description(), \"A test tool\") self.assertEqual(self.tool.get_description(), \"A test tool\") self.assertEqual(self.tool.get_description(), \"A test tool\") self.assertEqual(self.tool.get_description(), \"A test tool\") self.assertEqual(self.tool.get_description(), \"A test tool\") self.assertEqual(self.tool.get_description(), \"A test tool\") self.assertEqual(self.tool.get_description(), \"A test tool\") self.assertEqual(self", + "exact_match": false, + "code_bleu": 0.07223943354597204, + "edit_similarity": 0.13953488372093023 + }, + { + "repo": "bytedance/trae-agent", + "expected": "restart_result.output.lower())", + "got": "restart_result.stdout)", + "got_raw": "restart_result.stdout) # Check if session is restarted correctly # Add more tests as needed for BashTool functionality", + "exact_match": false, + "code_bleu": 0.25406637407730737, + "edit_similarity": 0.7307692307692307 + }, + { + "repo": "bytedance/trae-agent", + "expected": "\"Charlie\")", + "got": "\"Charlie\")", + "got_raw": "\"Charlie\")\n self.assertEqual(written_data[\"users\"][2][\"id\"], 3)\n\n @patch(\"json.dump\")\n async def test_replace_existing_user(self, mock_json_dump):\n \"\"\"Test replacing an existing object in a list.\"\"\"\r\n self.mock_file_read()\r\n result = await self.tool.execute(ToolCallArguments( { \"operation\": \"replace\", \"file_path\": self.test_file_path, \"json_path\": \"$.users[0].name\", \"value\": \"Alice (Updated)\", } )) self.assertEqual(result.error_code, 0) mock_json_dump.assert_called_once", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bytedance/trae-agent", + "expected": "self.agent.cli_console)", + "got": "self.agent.llm_client.client)", + "got_raw": "self.agent.llm_client.client) # Avoid actual API calls \"\"\"Test that the agent can handle a patch request.\"\"\" response = self.agent.handle_patch_request(self.test_project_path, self.test_patch_path) self.assertIsInstance(response, LLMResponse) self.assertEqual(response.text, \"Patch applied successfully\") \"\"\"Test that the agent can handle a non-existent project.\"\"\" response = self.agent.handle_patch_request(\"/nonexistent/project\", self.test_patch_path) self.assertIsInstance(response, LLMResponse) self.assertEqual(response.text, \"Project not found\") \"\"\"Test that the agent can handle an error during patching.\"\"\" with self.assertRaises(AgentError) as error", + "exact_match": false, + "code_bleu": 0.46713797772820004, + "edit_similarity": 0.6153846153846154 + }, + { + "repo": "bytedance/trae-agent", + "expected": "\"test_provider\")", + "got": "\"test_provider\")", + "got_raw": "\"test_provider\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "bytedance/trae-agent", + "expected": "\"true\")", + "got": "\"true\")", + "got_raw": "\"true\") self.assertEqual(self.agent.issue, \"Test issue\") self.assertEqual(self.agent.base_commit, \"abc123\") self.assertEqual(self.agent.patch_path, self.test_patch_path) self.assertEqual(self.agent.task_id, \"test-task\") self.assertEqual(self.agent.task_status, \"new\") self.assertEqual(self.agent.task_result, \"\") self.assertEqual(self.agent.task_error, \"\") self.assertEqual(self.agent.task_steps, []) self.assertEqual(self.agent.task_steps_executed, 0) self.assertEqual(self.agent.task_steps_total, 0) self.assertEqual(self.agent.task_steps_failed, 0) self.assertEqual(self.agent.task_steps_skipped, 0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "caronc/apprise-api", + "expected": "200", + "got": "200", + "got_raw": "200\n\n # Prepare our form data\n data = {\"title\": \"Test\", \"body\": \"Hello World\", \"emoji\": \"\ud83d\udc4d\", \"emoji_flags\": \"1\"}\n\n # Submit the form\n response = self.client.post(\"/notify\", data=data)\n\n # Check the response\n assert response.status_code == 200\n\n # Check the notification was added to the database\n notification = N_MGR.get_notification(key)\n assert notification is not None\n\n # Check the notification data\n assert notification.title == \"Test\"\n assert notification.body", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "caronc/apprise-api", + "expected": "405", + "got": "405", + "got_raw": "405", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "caronc/apprise-api", + "expected": "{ \"persistent_storage\": False, \"can_write_config\": True, \"can_write_attach\": True, \"details\": [\"OK\"], }", + "got": "{ \"persistent_storage\": False, \"can_write_config\": True, \"can_write_attach\": True, \"details\": [ \"STORE_PERMISSION_ISSUE\", ], }", + "got_raw": "{ \"persistent_storage\": False, \"can_write_config\": True, \"can_write_attach\": True, \"details\": [ \"STORE_PERMISSION_ISSUE\", ], }", + "exact_match": false, + "code_bleu": 0.8232490471721702, + "edit_similarity": 0.8908296943231441 + }, + { + "repo": "caronc/apprise-api", + "expected": "payload", + "got": "payload.keys()", + "got_raw": "payload.keys() assert \"message\" in payload[\"error\"].keys() assert payload[\"error\"][\"message\"] == \"You do not have permission to view this page.\" assert \"status\" in payload[\"error\"].keys() assert payload[\"error\"][\"status\"] == 403 assert \"detail\" in payload[\"error\"].keys() assert payload[\"error\"][\"detail\"] == \"You do not have permission to view this page.\" assert \"detail\" in payload.keys() assert \"detail\" in payload[\"detail\"].keys() assert payload[\"detail\"][\"detail\"] == \"You do not have permission to view this page.\" assert \"detail\"", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "caronc/apprise-api", + "expected": "403", + "got": "403", + "got_raw": "403 # Forbidden # we should have a message in the body assert \"You do not have permission to delete this configuration\" in response.content.decode() # we should have a message in the body assert \"You do not have permission to delete this configuration\" in response.content.decode() # we should have a message in the body assert \"You do not have permission to delete this configuration\" in response.content.decode() # we should have a message in the body assert \"You do not have permission to delete this configuration\" in response.content.decode() # we should have a message in the body", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "caronc/apprise-api", + "expected": "1", + "got": "1", + "got_raw": "1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "caronc/apprise-api", + "expected": "True", + "got": "True", + "got_raw": "True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "caronc/apprise-api", + "expected": "1", + "got": "1", + "got_raw": "1 # we should have called once mock_notify() with the data we passed in form.cleaned_data mock_notify.assert_called_with( \"mailto://user:pass@yahoo.ca\", \"test notifiction\", format=\"text\", ) # we should have called notify() with the data we passed in form.cleaned_data mock_notify.return_value = True # we should have called notify() with the data we passed in form.cleaned_data response = self.client.post(\"/notify/{}\".format(key), form.cleaned_data) assert response.status_code == 200 assert mock_notify.call_count == 2 # we should have called notify() with the data we passed", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "caronc/apprise-api", + "expected": "1", + "got": "1", + "got_raw": "1\n assert result[0].name == \"file1\" assert result[0].content_type == \"text/plain\" assert result[0].size == 12 assert result[0].data == b\"content here\" assert result[0].filename is None assert result[0].content is None assert result[0].url is None assert result[0].headers is None assert result[0].params is None assert result[0].headers is None assert result[0].params is None assert result[0].headers is None assert result[0].params is None assert result[0].headers is None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "cased/kit", + "expected": "3", + "got": "3", + "got_raw": "3", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "cased/kit", + "expected": "1", + "got": "10", + "got_raw": "10 # Line 10 in the original file (after the import) assert first_hunk.new_lines == 2 # 2 lines added assert first_hunk.old_start == 1 # Line 1 in the original file assert first_hunk.old_lines == 7 # 7 lines removed assert first_hunk.lines == [ \"import json\", \"def main():\", ] # New lines in the original file assert first_hunk.old_lines == 7 # 7 lines removed assert first_hunk.old_lines == 7 # 7 lines removed", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "cased/kit", + "expected": "5", + "got": "5", + "got_raw": "5 # Default timeout should be enough for all tasks to be found.\n\n def test_grep_custom_timeout(self, repo):\n \"\"\"Test that grep respects custom timeout.\"\"\"\n # Set a custom timeout of 60s\n with patch.dict(os.environ, {\"GIT_GREP_TIMEOUT\": \"60\"}):\n results = repo.grep(\"TODO\", max_results=5, timeout=60)\n assert len(results) == 10 # All tasks should be found.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "cased/kit", + "expected": "1", + "got": "1", + "got_raw": "1\r\nassert change.files[0].path == \"src/utils.py\" assert change.files[0].lines_changed == 1 assert change.files[0].lines_added == 1 assert change.files[0].lines_removed == 0 assert change.files[0].diff == \"+++\\n@@ -0,0 +1 @@\\n def helper():\\n return 42\\n\" assert change.files[0].status == \"added\" assert change.files[0].commit_id == \"HEAD\" assert change.files[0].parent_commit_id == \"HEAD~1\" assert change.files[0].author ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "cased/kit", + "expected": "2", + "got": "2", + "got_raw": "2\nassert \"new_file.txt\" in files assert \"README.md\" in files", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "cased/kit", + "expected": "{}", + "got": "[]", + "got_raw": "[] # Default value for repos\n\n def test_add_repo(self, server):\n \"\"\"Test adding a repository to the server.\"\"\"\r\n repo_path = Path(\"/path/to/repo\") # Replace with an actual path\r\n server.add_repo(repo_path) # Add the repository to the server\r\n assert repo_path in server._repos # Check if the repository was added\r\n\r\n def test_remove_repo(self, server):\r\n \"\"\"Test removing a repository from the server.\"\"\"\r\n repo_path = Path(\"/path/to/repo\") # Replace with an actual path\r\n server.add_repo(repo", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.0 + }, + { + "repo": "cased/kit", + "expected": "graph", + "got": "graph.nodes()", + "got_raw": "graph.nodes() graph[\"mypackage.module1\"][\"name\"] == \"module1\" graph[\"mypackage.module1\"][\"type\"] == \"module\" graph[\"mypackage.module1\"][\"dependencies\"] == [\"mypackage.module2\"] graph[\"mypackage.module2\"][\"name\"] == \"module2\" graph[\"mypackage.module2\"][\"type\"] == \"module\" graph[\"mypackage.module2\"][\"dependencies\"] == [] graph[\"mypackage.module2\"][\"dependencies\"] == [] graph[\"mypackage.module2\"][\"dependencies\"] == [] graph[\"mypackage.module2\"][\"dependencies\"] == [] graph[\"mypackage.module2\"][\"dependencies\"] == []", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5555555555555556 + }, + { + "repo": "cased/kit", + "expected": "canon2", + "got": "canon2", + "got_raw": "canon2", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "cased/kit", + "expected": "result.output", + "got": "result.stdout.lower()", + "got_raw": "result.stdout.lower() result.stdout.lower() assert \"usage: kit review [-h] [-p PR_URL | -d DIFF]\" in result.stdout.lower() result.stdout.lower() assert \"options:\" in result.stdout.lower() result.stdout.lower() assert \"h, --help show this help message and exit\" in result.stdout.lower() result.stdout.lower() assert \"p, --pr PR_URL GitHub pull request URL\" in result.stdout.lower() result.stdout.lower() assert \"d, --diff DIFF Local diff\" in result.stdout.lower() result.stdout.lower() assert \"Example:\" in result.stdout.lower() result.stdout.lower() assert \"kit review", + "exact_match": false, + "code_bleu": 0.24446151121745047, + "edit_similarity": 0.5882352941176471 + }, + { + "repo": "cased/kit", + "expected": "prompt", + "got": "prompt.lower()", + "got_raw": "prompt.lower() assert \"test.py\" in prompt.lower() assert \"added\" in prompt.lower() assert \"function\" in prompt.lower() assert \"test\" in prompt.lower() assert \"usage_count\" not in prompt.lower() assert \"file\" not in prompt.lower() assert \"line\" not in prompt.lower() assert \"added\" in prompt.lower() assert \"added\" in prompt.lower() assert \"added\" in prompt.lower() assert \"added\" in prompt.lower() assert \"added\" in prompt.lower() assert \"added\" in prompt.lower() assert \"added\" in prompt.lower() assert \"added\" in prompt.lower()", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6 + }, + { + "repo": "cased/kit", + "expected": "1", + "got": "1", + "got_raw": "1 # 1 fix applied to comment # 1 hunk fixed # 1 line fixed # 1 line added # 1 line removed # 1 line changed # 1 line added # 1 line removed # 1 line changed # 1 line added # 1 line removed # 1 line changed # 1 line added # 1 line removed # 1 line changed # 1 line added # 1 line removed # 1 line changed # 1 line added # 1 line removed # 1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "cased/kit", + "expected": "data", + "got": "data[\"resources\"][\"aws_vpc\"][\"main\"][\"depends_on\"]", + "got_raw": "data[\"resources\"][\"aws_vpc\"][\"main\"][\"depends_on\"] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [", + "exact_match": false, + "code_bleu": 0.09552040806823771, + "edit_similarity": 0.14814814814814814 + }, + { + "repo": "cased/kit", + "expected": "\"*.py\"", + "got": "\"*.py\"", + "got_raw": "\"*.py\" assert args[\"registry_name\"] == \"custom_registry\" assert args[\"include\"] == [\"content\"] assert args[\"exclude\"] == [\"isError\"] assert args[\"stream\"] == True assert args[\"streaming\"] == True assert args[\"streaming_max_events\"] == 100000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "cased/kit", + "expected": "url", + "got": "url", + "got_raw": "url # No change expected for clean URLs \"\"\"Test that invalid URLs are sanitized.\"\"\" invalid_urls = [ \"invalid://url\", \"http://\", \"https://\", \"git@github.com:user/repo\", \"git@github.com:user/repo.git\", \"git@gitlab.com:org/project.git\", \"git@gitlab.com:org/project\", \"git@gitlab.com:org/project.git\", \"git@gitlab.com:org/project.git\", \"git@gitlab.com:org/project.git\", \"git@gitlab.com:org/project.git\", \"git@gitlab.com:org/project.git", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "cased/kit", + "expected": "graph", + "got": "graph.files.keys()", + "got_raw": "graph.files.keys() assert \"utils/helper.js\" in graph.files.keys() assert \"package.json\" in graph.files.keys() assert \"node_modules\" in graph.files.keys() assert \"node_modules/lodash\" in graph.files.keys() assert \"node_modules/express\" in graph.files.keys() assert \"node_modules/express/package.json\" in graph.files.keys() assert \"node_modules/express/package-lock.json\" in graph.files.keys() assert \"node_modules/lodash/package.json\" in graph.files.keys() assert \"node_modules/lodash/package-lock.json\" in graph.files.keys() assert \"node_modules/lodash/lodash.js\" in", + "exact_match": false, + "code_bleu": 0.18575057999133598, + "edit_similarity": 0.43478260869565216 + }, + { + "repo": "cased/kit", + "expected": "3", + "got": "3", + "got_raw": "3 # All files are new in the first batch\n\n # Simulate some changes\n files[1].write_text(\"def func1(): pass\") # Change the second file\n\n # Second batch analysis\n results2 = analyzer.analyze_changed_files(files)\n\n assert len(results2) == 2 # Only the second file is changed\n\n # Check the results\n assert results1[1].changed_files == 1 # Second file changed in the first batch\r\n assert results2[1].changed_files == 0 # Second file unchanged in the second batch", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "cased/kit", + "expected": "id4", + "got": "id4", + "got_raw": "id4 # No ref should be different from refs with refs\n\n def test_local_path(self):\n \"\"\"Test deterministic IDs for local paths.\"\"\"\n registry = PersistentRepoRegistry()\n\n path = Path(\"/path/to/repo\") / \"subdir\" / \"file.txt\"\n\n id1 = registry.add(path)\n id2 = registry.add(path) # Same path should be same\n\n # Same path should be same\n assert id1 == id2 # Same path should be same\n\n def test_path_to_id(self):\n \"\"\"Test path_to_id function.\"\"\"\n registry = PersistentRepo", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "cased/kit", + "expected": "7", + "got": "7", + "got_raw": "7 # Test empty hunk header (no changes) header = \"@@\" hunk = DiffParser._parse_hunk_header(header) assert hunk is None # Test invalid hunk header header = \"@@ -10,5 +12,7 @@ foo\" hunk = DiffParser._parse_hunk_header(header) assert hunk is None # Test hunk header with no changes header = \"@@ -10,5 +10,5 @@ foo\" hunk = DiffParser._parse_hunk_header(header) assert hunk is None #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "cased/kit", + "expected": "names", + "got": "names", + "got_raw": "names and \"Bar\" in names and \"class\" in names and \"def\" in names and \"pass\" in names and \"a\" in names and \"b\" in names and \"c\" in names and \"d\" in names and \"e\" in names and \"f\" in names and \"g\" in names and \"h\" in names and \"i\" in names and \"j\" in names and \"k\" in names and \"l\" in names and \"m\" in names and \"n\" in names and \"o\" in names and \"p\" in names and \"q\" in names and", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "cased/kit", + "expected": "0", + "got": "0", + "got_raw": "0 result.stdout.lower().find(\"review\") > -1 result.stdout.lower().find(\"review\") > -1 result.stdout.lower().find(\"review\") > -1 result.stdout.lower().find(\"review\") > -1 result.stdout.lower().find(\"review\") > -1 result.stdout.lower().find(\"review\") > -1 result.stdout.lower().find(\"review\") > -1 result.stdout.lower().find(\"review\") > -1 result.stdout.lower().find(\"review\") > -1 result.stdout.lower().find(\"review\") > -1 result.stdout.lower().find(\"review\") > -1 result.stdout.lower().find(\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "chiphuyen/sniffly", + "expected": "2", + "got": "2", + "got_raw": "2\r\n assert gallery[\"projects\"][0][\"name\"] == \"Project 1\"\r\n assert gallery[\"projects\"][1][\"name\"] == \"Project 2\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "chiphuyen/sniffly", + "expected": "3", + "got": "30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "chiphuyen/sniffly", + "expected": "total_tokens)", + "got": "total_tokens)", + "got_raw": "total_tokens) self.assertIn('output', total_tokens) self.assertIn('total', total_tokens) self.assertIn('day', total_tokens) self.assertIn('month', total_tokens) self.assertIn('year', total_tokens) self.assertIn('week', total_tokens) self.assertIn('hour', total_tokens) self.assertIn('minute', total_tokens) self.assertIn('second', total_tokens) self.assertIn('day', total_tokens) self.assertIn('month', total_tokens) self.assertIn('year', total_tokens) self.assertIn('week', total_tokens) self.assertIn('hour', total_tokens) self.assertIn('minute', total_tokens) self.assertIn('second',", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "chiphuyen/sniffly", + "expected": "\"Should have input tokens\")", + "got": "\"Should have input tokens\") self.assertGreater(total_output", + "got_raw": "\"Should have input tokens\") self.assertGreater(total_output, 0, \"Should have output tokens\") print(\"Token counts verified for the specified dates.\")", + "exact_match": false, + "code_bleu": 0.24446151121745047, + "edit_similarity": 0.627906976744186 + }, + { + "repo": "chiphuyen/sniffly", + "expected": "\"Error count should be identical\")", + "got": "baseline_errors) self.assertEqual(new_errors", + "got_raw": "baseline_errors) self.assertEqual(new_errors, 0) # Check that the error count is zero for the new data self.assertEqual(stats['errors']['total'], 0) # Check that the error count is zero for the new data self.assertEqual(stats['errors']['total'], 0) # Check that the error count is zero for the new data self.assertEqual(stats['errors']['total'], 0) # Check that the error count is zero for the new data self.assertEqual(stats['errors']['total'], 0) # Check that the error count is zero for the new data self.assertEqual(stats['errors']['total'], 0) # Check", + "exact_match": false, + "code_bleu": 0.18575057999133598, + "edit_similarity": 0.28205128205128205 + }, + { + "repo": "chiphuyen/sniffly", + "expected": "0", + "got": "0.000001", + "got_raw": "0.000001 # A small positive value to indicate it exists", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "chiphuyen/sniffly", + "expected": "0", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "chiphuyen/sniffly", + "expected": "\"Should have 109 user messages\")", + "got": "\"Should have 100 user messages\") self.assertEqual(message_types.get('user'", + "got_raw": "\"Should have 100 user messages\") self.assertEqual(message_types.get('user', 0), 100, \"Should have 100 user messages\") self.assertEqual(message_types.get('system', 0), 10, \"Should have 10 system messages\") self.assertEqual(message_types.get('error', 0), 0, \"Should have 0 error messages\") self.assertEqual(message_types.get('info', 0), 0, \"Should have 0 info messages\") self.assertEqual(message_types.get('debug', 0), 0, \"Should have 0 debug messages\") self.assertEqual", + "exact_match": false, + "code_bleu": 0.11390778025531027, + "edit_similarity": 0.5849056603773585 + }, + { + "repo": "chiphuyen/sniffly", + "expected": "\"Message count should not change with optimizations\")", + "got": "len(messages))", + "got_raw": "len(messages))", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.23880597014925373 + }, + { + "repo": "chiphuyen/sniffly", + "expected": "interruption)", + "got": "interruption)", + "got_raw": "interruption) interruption_message = interruption.get('message', '') self.assertEqual(interruption_message, \"I'm sorry, I can't do that right now. Can you please try again later?\") self.assertEqual(interruption.get('type'), 'error') self.assertEqual(interruption.get('status'), 'failed') self.assertEqual(interruption.get('error_code'), '400') self.assertEqual(interruption.get('error_message'), 'Internal Server Error') self.assertEqual(interruption.get('error_details'), 'Something went wrong') self.assertEqual(interruption.get('error_traceback", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "chiphuyen/sniffly", + "expected": "\"Should have data for 2025-06-10\")", + "got": "\"Should have data for 2025-06-10\")", + "got_raw": "\"Should have data for 2025-06-10\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "chiphuyen/sniffly", + "expected": "\"Should process same number of projects\")", + "got": "len(project_dirs)) \"Parallel processing should process all projects\")", + "got_raw": "len(project_dirs)) \"Parallel processing should process all projects\")", + "exact_match": false, + "code_bleu": 0.18575057999133598, + "edit_similarity": 0.4909090909090909 + }, + { + "repo": "chiphuyen/sniffly", + "expected": "1", + "got": "1", + "got_raw": "1 # 1 JSONL file in project 1 only", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "chiphuyen/sniffly", + "expected": "\"Initialization should be under 100ms\")", + "got": "\"Initialization should complete within 100ms\") self.assertLess(process_time", + "got_raw": "\"Initialization should complete within 100ms\") self.assertLess(process_time, 0.5, \"Processing should complete within 500ms\") self.assertLess(prep_time, 0.2, \"Data preparation should complete within 200ms\") self.assertGreater(len(messages), 0, \"Should process at least 1 message\") self.assertGreater(process_time, 0, \"Processing should take at least 1ms\") self.assertGreater(prep_time, 0, \"Data preparation should take at least 1ms\") self.assertGreater(init_time, 0, \"Initialization should take", + "exact_match": false, + "code_bleu": 0.18575057999133598, + "edit_similarity": 0.5964912280701754 + }, + { + "repo": "chonkie-inc/chonkie", + "expected": "0", + "got": "0", + "got_raw": "0 # Check that the result is not empty.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "chonkie-inc/chonkie", + "expected": "0", + "got": "0", + "got_raw": "0\n\ndef test_late_chunker_chunk_recursive_rules() -> None:\n \"\"\"Test recursive chunking with custom rules.\"\"\"\n chunk_size = 512\n chunker = LateChunker(\n embedding_model=\"nomic-ai/modernbert-embed-base\",\n chunk_size=chunk_size,\n recursive_rules=RecursiveRules(\n max_depth=2, min_length=100, max_length=200, min_overlap=0.5, max_overlap=0.8\n ),\n )\n chunks = chunker.chunk(sample_text)\n\n assert isinstance(chunks, list) and len", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "chonkie-inc/chonkie", + "expected": "2", + "got": "2", + "got_raw": "2 # \"Hello\" and \"world\" are two tokens each. assert result[0].start_index == 0 assert result[0].end_index == 13 # The length of the text. assert result[0].chunk_count == 1 # Single chunk. assert result[0].chunk_size == 512 # Chunk size. assert result[0].chunk_overlap == 0 # No overlap. assert result[0].chunk_strategy == \"gpt2\" # Tokenizer used. assert result[0].chunk_type == \"text\" # Text chunk. assert result", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "chonkie-inc/chonkie", + "expected": "2", + "got": "2.000000000000000463018905852530122070312500000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "2.000000000000000463018905852530122070312500000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "chonkie-inc/chonkie", + "expected": "2", + "got": "2", + "got_raw": "2 # \"Hello\" and \"world\" are two tokens each. assert result[0].start_index == 0 assert result[0].end_index == 13 # The length of the text. assert result[0].chunk_id == 0 # The chunk ID is 0 since there's only one chunk. assert result[0].chunk_type == \"text\" # The chunk type is \"text\" since it's a single sentence. assert result[0].chunk_score == 1.0 # The chunk score is 1.0 since it's the only chunk. assert result[", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "chonkie-inc/chonkie", + "expected": "original", + "got": "original", + "got_raw": "original # Should be the same instance\"\"\" def test_wrap_new_embeddings(self) -> None: \"\"\"Test wrapping a new BaseEmbeddings instance.\"\"\" new = MockEmbeddings(\"new-model\") result = EmbeddingsRegistry.wrap(new) assert result is not new # Should be a new instance\"\"\" def test_wrap_invalid_embeddings(self) -> None: \"\"\"Test wrapping an invalid object.\"\"\" with pytest.raises(TypeError) as exc_info: EmbeddingsRegistry.wrap(\"invalid\") assert str(exc_info.value) == \"Invalid object type: . Expected BaseEmbeddings.\" def test_wrap_existing_type(self) -> None: \"\"\"Test wrapping", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "chonkie-inc/chonkie", + "expected": "\"v1\"", + "got": "\"0.1.0\"", + "got_raw": "\"0.1.0\" # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 ", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5454545454545454 + }, + { + "repo": "chonkie-inc/chonkie", + "expected": "None", + "got": "None", + "got_raw": "None chunker.tokenizer is tokenizer chunker.chunk_size == 512 chunker.chunk_overlap == 128 chunker.min_sentences_per_chunk == 1 chunker.min_characters_per_sentence == 12 chunker.approximate == False chunker.delim == [\".\", \"!\", \"?\", \"\\n\"] chunker.include_delim == \"prev\" chunker.max_length == 1000000 chunker.max_overlap == 1000000 chunker.max_sentences == 1000000 chunker.max_characters == 1000000 chunker", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "chonkie-inc/chonkie", + "expected": "[]", + "got": "[]", + "got_raw": "[]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "chonkie-inc/chonkie", + "expected": "\"my-key\"", + "got": "\"my-key\"", + "got_raw": "\"my-key\" assert data[\"other_key\"] == \"other_value\" assert data[\"token\"] is None assert data[\"hub_url\"] == \"https://huggingface.co\" assert data[\"repo_url\"] == \"https://huggingface.co\" assert data[\"token_url\"] == \"https://huggingface.co/login\" assert data[\"token_refresh_url\"] == \"https://huggingface.co/login\" assert data[\"token_revoke_url\"] == \"https://huggingface.co/login\" assert data[\"token_create_url\"] == \"https://huggingface.co/login\" assert data[\"token_delete_url\"] ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "chonkie-inc/chonkie", + "expected": "1", + "got": "30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "chonkie-inc/chonkie", + "expected": "chunk_size + 20", + "got": "chunk_size + 10", + "got_raw": "chunk_size + 10 # Allow some tolerance for code boundaries and tokenization errors # Check the last chunk is not too large (but still under chunk_size) assert result[-1].token_count <= chunk_size + 10 # Allow some tolerance for code boundaries and tokenization errors # Check the last chunk is not too large (but still under chunk_size) assert result[-1].token_count <= chunk_size + 10 # Check the last chunk is not too large (but still under chunk_size) assert result[-1].token_count <= chunk_size + 10 #", + "exact_match": false, + "code_bleu": 0.5946035575013605, + "edit_similarity": 0.9333333333333333 + }, + { + "repo": "chonkie-inc/chonkie", + "expected": "model", + "got": "model.model", + "got_raw": "model.model # noqa: E711 model is set to the model instance provided.", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.625 + }, + { + "repo": "chonkie-inc/chonkie", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "chonkie-inc/chonkie", + "expected": "\"r\")", + "got": "\"r\")", + "got_raw": "\"r\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "chonkie-inc/chonkie", + "expected": "0", + "got": "0", + "got_raw": "0 # Empty list for empty text input", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "chonkie-inc/chonkie", + "expected": "chunk.text", + "got": "chunk.text.strip()", + "got_raw": "chunk.text.strip() # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.7142857142857143 + }, + { + "repo": "chonkie-inc/chonkie", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "chonkie-inc/chonkie", + "expected": "\"el\"", + "got": "\"el\"", + "got_raw": "\"el\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "chonkie-inc/chonkie", + "expected": "1", + "got": "1", + "got_raw": "1 # end\n\n # Second call: \"b\" at (2, 3)\n second_call_args = mock_text_instance.stylize.call_args_list[1]\n assert second_call_args[0][1] == 2 # start\n assert second_call_args[0][2] == 3 # end\n\n def test_print_strings_indices_with_no_gaps(self, mock_text_class, mock_text_instance) -> None:\n \"\"\"Test that string chunks get correct indices when full_text has no gaps.\"\"\"\n Visualizer().print([\"a\", \"b\"], full_text=\"ab\")\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "christabor/flask_jsondash", + "expected": "5", + "got": "5", + "got_raw": "5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 *", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "christabor/flask_jsondash", + "expected": "27017", + "got": "27017", + "got_raw": "27017 settings.DB_NAME == 'test' settings.DB_USER == '' settings.DB_PASSWORD == '' settings.DB_COLLECTION == 'test' settings.DB_INDEXES == [] settings.DB_MAX_CONNECTIONS == 100 settings.DB_MAX_CONNECTIONS_PER_HOST == 100 settings.DB_MAX_IDLE_CONNECTIONS == 100 settings.DB_MAX_IDLE_CONNECTIONS_PER_HOST == 100 settings.DB_MAX_WAIT_TIME == 10000 settings.DB_MAX_WAIT_TIME_PER_HOST == 10000 settings.DB_MAX_RETRIES == 3 settings.DB_MAX_RETRIES_PER_HOST == 3 settings.DB_MAX", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "christabor/flask_jsondash", + "expected": "app.config.get('JSONDASH_GLOBAL_USER')", + "got": "'global-check'", + "got_raw": "'global-check'", + "exact_match": false, + "code_bleu": 0.0625, + "edit_similarity": 0.07692307692307693 + }, + { + "repo": "christabor/flask_jsondash", + "expected": "100", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.04580152671755725 + }, + { + "repo": "christabor/flask_jsondash", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as excinfo: charts_builder.getdims(data) excinfo.value.args[0] == 'Missing required field: %s' % field\n\n\n@pytest.mark.filters\ndef test_getdims_missing_all_expected2(ctx, client):\n app, test = client\n data = dict(width=100, height=100, dataSource='...', type='sometype')\n del data['width']\n del data['height']\n\n with pytest.raises(\n### Target:\nValueError) as excinfo: charts_builder.getdims(data) excinfo.value.args[0] == '", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "christabor/flask_jsondash", + "expected": "2", + "got": "2", + "got_raw": "2 assert len(container.find('.add-new-row')) == 2 assert len(container.find('.add-new-row button')) == 2 assert container.find('.add-new-row button').text == 'Add Row' assert container.find('.add-new-row button').attr('data-action') == 'add-row' assert container.find('.add-new-row button').attr('data-index') == '0' assert container.find('.add-new-row button').attr('data-direction') == 'top' assert container.find('.add-new-row button').attr('data-row') == '0' assert container.find('.add-new-row button').attr('data-col')", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "christabor/flask_jsondash", + "expected": "1", + "got": "1", + "got_raw": "1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "christabor/flask_jsondash", + "expected": "'Username'", + "got": "'global'", + "got_raw": "'global'", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "christabor/flask_jsondash", + "expected": "result.output", + "got": "result.output.lower()", + "got_raw": "result.output.lower() and 'name' in result.output.lower() and 'size' in result.output.lower() and 'type' in result.output.lower() and 'children' in result.output.lower() and 'children' not in result.output.lower() and 'children' not in result.output.lower() and 'children' not in result.output.lower() and 'children' not in result.output.lower() and 'children' not in result.output.lower() and 'children' not in result.output.lower() and 'children' not in result.output.lower() and 'children' not in result.output.lower() and 'children' not in result.output", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.7647058823529411 + }, + { + "repo": "christabor/flask_jsondash", + "expected": "1", + "got": "1", + "got_raw": "1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "christabor/flask_jsondash", + "expected": "2", + "got": "2", + "got_raw": "2", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "chuyangliu/snake", + "expected": "Pos(-10, 10)", + "got": "Pos(-10, 10) def test_add(): p = Pos(1, 2) p += Direc.UP * 2 p += Direc.RIGHT * 3 p += Direc.DOWN * 4 p += Direc.LEFT * 5 p += Direc.UP * 6 p += Direc.RIGHT * 7 p += Direc.DOWN * 8 p += Direc.LEFT * 9 p += Direc.UP * 10 p += Direc.RIGHT * 11 p += Direc.DOWN * 12 p += Direc.LEFT * 13 p += Direc.UP *", + "got_raw": "Pos(-10, 10) def test_add(): p = Pos(1, 2) p += Direc.UP * 2 p += Direc.RIGHT * 3 p += Direc.DOWN * 4 p += Direc.LEFT * 5 p += Direc.UP * 6 p += Direc.RIGHT * 7 p += Direc.DOWN * 8 p += Direc.LEFT * 9 p += Direc.UP * 10 p += Direc.RIGHT * 11 p += Direc.DOWN * 12 p += Direc.LEFT * 13 p += Direc.UP *", + "exact_match": false, + "code_bleu": 0.052264803393547665, + "edit_similarity": 0.07717041800643087 + }, + { + "repo": "chuyangliu/snake", + "expected": "m_copy.point(Pos(i, j)).type", + "got": "m_copy.point(Pos(i, j)).type if i == 1 and j == 1 else m.point(Pos(i, j)).type == m_copy.point(Pos(i, j)).type if i == 1 and j == 1 else m.point(Pos(i, j)).type == m_copy.point(Pos(i, j)).type if i == 1 and j == 1 else m.point(Pos(i, j)).type == m_copy.point(Pos(i, j)).type if i == 1 and j == 1 else m.point(Pos(i, j)).type == m_copy.point(Pos(i, j)).type if i ==", + "got_raw": "m_copy.point(Pos(i, j)).type if i == 1 and j == 1 else m.point(Pos(i, j)).type == m_copy.point(Pos(i, j)).type if i == 1 and j == 1 else m.point(Pos(i, j)).type == m_copy.point(Pos(i, j)).type if i == 1 and j == 1 else m.point(Pos(i, j)).type == m_copy.point(Pos(i, j)).type if i == 1 and j == 1 else m.point(Pos(i, j)).type == m_copy.point(Pos(i, j)).type if i ==", + "exact_match": false, + "code_bleu": 0.07217409594823948, + "edit_similarity": 0.14285714285714285 + }, + { + "repo": "chuyangliu/snake", + "expected": "Direc.UP", + "got": "Direc.LEFT", + "got_raw": "Direc.LEFT\n hit[0] = True\n elif adj == Pos(1, 0):\n\n assert p.direc_to(adj) == Direc.RIGHT\n hit[1] = True\n elif adj == Pos(0, -1):\n\n assert p.direc_to(adj) == Direc.UP\n hit[2] = True\n elif adj == Pos(0, 1):\n\n assert p.direc_to(adj) == Direc.DOWN\n hit[3] = True\n assert hit.count(True) == 4", + "exact_match": false, + "code_bleu": 0.5946035575013605, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "chuyangliu/snake", + "expected": "PointType.WALL", + "got": "PointType.WALL", + "got_raw": "PointType.WALL else m.point(Pos(i, j)).type == PointType.EMPTY\n\n\ndef test_point():\n m = Map(12, 12)\n assert m.point(Pos(0, 0)).type == PointType.WALL else m.point(Pos(0, 0)).type == PointType.EMPTY\n\n\ndef test_point_type():\n m = Map(12, 12)\n assert m.point(Pos(0, 0)).type == PointType.WALL else m.point(Pos(0, 0)).type == PointType.EMPTY\n\n\ndef test_point_type_str():\n m", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "chuyangliu/snake", + "expected": "3", + "got": "3.000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "3.000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "chuyangliu/snake", + "expected": "Direc.RIGHT", + "got": "Direc.RIGHT", + "got_raw": "Direc.RIGHT assert Direc.opposite(Direc.RIGHT) == Direc.LEFT", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "coderamp-labs/gitingest", + "expected": "InvalidGitHubTokenError)", + "got": "InvalidGitHubTokenError)", + "got_raw": "InvalidGitHubTokenError) as exc_info: validate_github_token(token) assert str(exc_info.value) == \"Invalid GitHub token: \" + token + \"\\n\" + \"Token must be 36 characters long and start with 'github_pat_'.\" + \" It must contain only alphanumeric characters and underscores.\" + \" It must not contain any disallowed characters.\" + \" It must not start with a hyphen.\" + \" It must not end with a hyphen.\" + \" It must not contain consecutive hyphens.\" + \" It must not contain consecutive underscores.\" + \" It must not contain any spaces.\" + \" It", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "coderamp-labs/gitingest", + "expected": "content", + "got": "content.lower()", + "got_raw": "content.lower() and \"src/subfile2.py\" in content.lower() and \"src/subfile3.txt\" in content.lower() and \"src/subfile4.py\" in content.lower() and \"src/subfile5.txt\" in content.lower() and \"src/subfile6.py\" in content.lower() and \"src/subfile7.txt\" in content.lower() and \"src/subfile8.py\" in content.lower() and \"src/subfile9.txt\" in content.lower() and \"src/subfile10.py\" in content.lower() and \"src/subfile11.txt\" in content.lower() and \"src", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6363636363636364 + }, + { + "repo": "coderamp-labs/gitingest", + "expected": "token)", + "got": "url)", + "got_raw": "url) mock_repo.git_clone.assert_called_once_with(url, work_dir) mock_repo.git_checkout.assert_called_once_with(\"main\") mock_repo.git_pull.assert_called_once_with(\"origin\", \"main\") mock_repo.git_reset.assert_called_once_with(\"hard\") mock_repo.git_clean.assert_called_once_with(\"f\") mock_repo.git_submodule_update.assert_called_once_with(\"--depth=1\") mock_repo.git_submodule_init.assert_called_once_with() mock_repo.git_submodule_update.assert_called_once_with(\"--depth=1\") mock_repo.git_submodule_update.assert_called_once_with(\"--depth=1\") mock_repo.git_submodule_update.assert_called_once_with", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.2 + }, + { + "repo": "coderamp-labs/gitingest", + "expected": "content_with_ignore", + "got": "content_with_ignore[0]", + "got_raw": "content_with_ignore[0] content_without_ignore = await ingest_async(source=str(repo_path), include_gitignored=True) assert \"This file should be excluded.\" in content_without_ignore[0] assert \"This file should be included.\" in content_without_ignore[0]", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.926829268292683 + }, + { + "repo": "coderamp-labs/gitingest", + "expected": "expected", + "got": "expected", + "got_raw": "expected # noqa: E712", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "coderamp-labs/gitingest", + "expected": "structure", + "got": "structure[0]", + "got_raw": "structure[0] if structure else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\" else \"\"", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.8571428571428571 + }, + { + "repo": "coderamp-labs/gitingest", + "expected": "stderr_lines", + "got": "stderr_lines", + "got_raw": "stderr_lines, \"Unexpected summary message not found in STDERR\" f\" ({len(stderr_lines)} lines)\" f\" ({len(stdout_lines)} lines)\" f\" ({len(stderr_lines) - len(stdout_lines)} lines in STDERR)\" f\" ({len(stderr_lines) - len(stdout_lines)} lines in STDOUT)\" f\" ({len(stdout_lines)} lines in STDERR)\" f\" ({len(stdout_lines)} lines in STDOUT)\" f\" ({len(stderr_lines) - len(stdout_lines)} lines in STDERR)\" f\" ({len(stdout_lines)} lines in STDOUT)\" f\" ({len(stderr_lines) - len(stdout_lines)} lines in STDERR)\" f", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "cohere-ai/cohere-python", + "expected": "dict)", + "got": "dict)", + "got_raw": "dict) self.assertEqual(256, len(response[\"embeddings\"][0])) self.assertEqual(1, len(response[\"embeddings\"])) self.assertEqual(1, len(response[\"metadata\"])) self.assertEqual(1, len(response[\"scores\"])) self.assertEqual(1, len(response[\"tokens\"])) self.assertEqual(1, len(response[\"token_ids\"])) self.assertEqual(1, len(response[\"token_offsets\"])) self.assertEqual(1, len(response[\"token_types\"])) self.assertEqual(1, len(response[\"token_lengths\"])) self.assertEqual(1, len(response[\"token_positions\"])) self.assertEqual(1, len(response[\"token_scores\"])) self.assertEqual(1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "cohere-ai/cohere-python", + "expected": "256)", + "got": "256)", + "got_raw": "256) self.assertEqual(captured_body[\"input_type\"], \"search_document\") self.assertEqual(captured_body[\"model_id\"], \"cohere.embed-english-v3\") self.assertEqual(captured_body[\"embedding_types\"], [\"float\", \"int8\"]) self.assertEqual(captured_body[\"texts\"], [\"hello world\"]) self.assertEqual(captured_body[\"client\"], \"python\") self.assertEqual(captured_body[\"client_version\"], \"0.1.0\") self.assertEqual(captured_body[\"client_env\"], \"test\") self.assertEqual(captured_body[\"client_env_version\"], \"0.1.0\") self.assertEqual(captured_body[\"client_env_os", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "cohere-ai/cohere-python", + "expected": "str(request.url))", + "got": "captured_aws_request_kwargs[\"headers\"][\"host\"])", + "got_raw": "captured_aws_request_kwargs[\"headers\"][\"host\"])", + "exact_match": false, + "code_bleu": 0.16036590969929357, + "edit_similarity": 0.34375 + }, + { + "repo": "cohere-ai/cohere-python", + "expected": "\"text-generation\" in events)", + "got": "\"stream-start\" in events) self.assertTrue( \"text-generation\" in events) self.assertTrue( \"stream-end\" in events) self.assertTrue( \"chat-start\" in events) self.assertTrue( \"chat-end\" in events) self.assertTrue( \"error\" in events) self.assertTrue( \"stream-start\" in events) self.assertTrue( \"text-generation\" in events) self.assertTrue( \"stream-end\" in events) self.assertTrue( \"chat-start\" in events) self.assertTrue( \"chat-end\" in events) self.assertTrue( \"error\" in events) self.assertTrue( \"stream-start\" in events) self.assertTrue(", + "got_raw": "\"stream-start\" in events) self.assertTrue( \"text-generation\" in events) self.assertTrue( \"stream-end\" in events) self.assertTrue( \"chat-start\" in events) self.assertTrue( \"chat-end\" in events) self.assertTrue( \"error\" in events) self.assertTrue( \"stream-start\" in events) self.assertTrue( \"text-generation\" in events) self.assertTrue( \"stream-end\" in events) self.assertTrue( \"chat-start\" in events) self.assertTrue( \"chat-end\" in events) self.assertTrue( \"error\" in events) self.assertTrue( \"stream-start\" in events) self.assertTrue(", + "exact_match": false, + "code_bleu": 0.031980135741593176, + "edit_similarity": 0.099644128113879 + }, + { + "repo": "cohere-ai/cohere-python", + "expected": "response)", + "got": "response.embeddings)", + "got_raw": "response.embeddings) self.assertEqual(1, len(response.embeddings)) self.assertEqual(1, len(response.embeddings[0])) self.assertEqual(3, len(response.embeddings[0][0])) self.assertEqual(3, len(response.embeddings[0][0][0])) self.assertEqual(3, len(response.embeddings[0][0][0][0])) self.assertEqual(3, len(response.embeddings[0][0][0][0][0])) self.assertEqual(3, len(response.embeddings[0][0][0][0][0][0])) self.assertEqual(3, len(response.embeddings[0][", + "exact_match": false, + "code_bleu": 0.3976353643835253, + "edit_similarity": 0.6206896551724138 + }, + { + "repo": "cohere-ai/cohere-python", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as error: await self.co.chat_stream( [UserMessage(\"Hello, how are you?\")], stream=True) self.assertEqual(str(error.exception), \"stream must be false\") async with self.co.chat_stream( [UserMessage(\"Hello, how are you?\")], stream=False) as stream: stream_result = await stream.get_result() self.assertEqual(stream_result.text, \"Hello, how are you?\") async with self.co.chat_stream( [UserMessage(\"Hello, how are you?\")], stream=True) as stream: stream_result = await stream.get_result() self.assertEqual(stream_result.text, \"\") async with", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "commaai/laika", + "expected": "sat_info_orbit[2])", + "got": "sat_info_orbit[2])", + "got_raw": "sat_info_orbit[2])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "commaai/laika", + "expected": "prn)", + "got": "prn)", + "got_raw": "prn)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "commaai/laika", + "expected": "os.path.exists(file.filepath_attempt))", + "got": "os.path.exists(file.filepath_attempt))", + "got_raw": "os.path.exists(file.filepath_attempt)) with self.assertRaises(DownloadFailed) as e: self._download_and_cache_file(file.url_bases, file) self.assertEqual(str(e.exception), f'Failed to download {file.filename}') self.assertTrue(os.path.exists(file.filepath_attempt)) self.assertTrue(os.path.exists(file.filepath)) self.assertTrue(os.path.exists(file.filepath_zipped)) self.assertEqual(file.file_size, os.path.getsize(file.filepath)) self.assertEqual(file.file_size, os.path.getsize(file.filepath_zipped)) self.assertEqual(file.file_size, os.path.getsize(file.filepath_attempt)) self.assertEqual(file.compression, os.path", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "commaai/laika", + "expected": "14)", + "got": "0)", + "got_raw": "0) # 0.0) # 0.0) # 0.0) # 0.0) # 0.0) # 0.0) # 0.0) # 0.0) # 0.0) # 0.0) # 0.0) # 0.0) # 0.0) # 0.0) # 0.0) # 0.0) # 0.0) # 0.0) # 0.0) # 0.0) # 0.0)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.4 + }, + { + "repo": "commaai/laika", + "expected": "1.7378390525714509)", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.25, + "edit_similarity": 0.027210884353741496 + }, + { + "repo": "commaai/opendbc", + "expected": "expected[checksum_field]", + "got": "expected[checksum_field]", + "got_raw": "expected[checksum_field] & 0xFF # Checksums are 8-bit unsigned integers", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "commaai/opendbc", + "expected": "std", + "got": "std", + "got_raw": "std + ext + 128 + 128 + 128 + 128 + 128 + 128 + 128 + 128 + 128 + 128 + 128 + 128 + 128 + 128 + 128 + 128 + 128 + 128 + 128 + 128 + 128 + 128 + 128 + 128 + 128", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "commaai/opendbc", + "expected": "should_match", + "got": "should_match", + "got_raw": "should_match", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "commaai/opendbc", + "expected": "aeb_event == 0)", + "got": "[])", + "got_raw": "[])\n self.assertEqual(self._tx(self._long_control_msg(10, aeb_event=0)), [self._tx_msg(0x2b9, 0x00000000)])\r\n self.assertEqual(self._tx(self._long_control_msg(10, aeb_event=1)), [self._tx_msg(0x2b9, 0x00000001)])\r\n self.assertEqual(self._tx(self._long_control_msg(10, aeb_event=2)), [self._tx_msg(0x2b9, ", + "exact_match": false, + "code_bleu": 0.2710806010829534, + "edit_similarity": 0.1111111111111111 + }, + { + "repo": "commaai/opendbc", + "expected": "self.MIN_GAS)", + "got": "self.MIN_GAS)", + "got_raw": "self.MIN_GAS) self.assertGreater(self.MAX_POSSIBLE_BRAKE, self.MIN_BRAKE) self.assertGreater(self.MAX_POSSIBLE_GAS, self.MIN_GAS) self.assertGreater(self.MAX_POSSIBLE_BRAKE, self.MIN_POSSIBLE_GAS) self.assertGreater(self.MAX_POSSIBLE_GAS, self.MIN_POSSIBLE_GAS) self.assertGreater(self.MAX_BRAKE, self.MIN_BRAKE) self.assertGreater(self.MAX_GAS, self.MIN_GAS) self.assertGreater(self.MAX_BRAKE, self.MIN_POSSIBLE_BRAKE) self.assertGreater(self", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "commaai/opendbc", + "expected": "self._tx(self._acc_cancel_msg(False)))", + "got": "self._tx(self._acc_cancel_msg(False)))", + "got_raw": "self._tx(self._acc_cancel_msg(False))) self.assertTrue(self._tx(self._acc_cancel_msg(False, accel=1))) self.assertFalse(self._tx(self._acc_cancel_msg(True, accel=1))) self.assertFalse(self._tx(self._acc_cancel_msg(False, accel=1))) self._tx(self._acc_cancel_msg(True, accel=1)) self._tx(self._acc_cancel_msg(False, accel=1)) self._tx(self._acc_cancel_msg(True, accel=1)) self._tx(self._acc_cancel_msg(False, accel=1)) self._tx(self._acc_cancel_msg(True, accel=1))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "commaai/opendbc", + "expected": "len(result)", + "got": "len(result)", + "got_raw": "len(result) codes.update(result[0]) assert fw[1] is not None assert fw[2] is not None assert fw[3] is not None assert fw[4] is not None assert fw[5] is not None assert fw[6] is not None assert fw[7] is not None assert fw[8] is not None assert fw[9] is not None assert fw[10] is not None assert fw[11] is not None assert fw[12] is not None assert fw[13] is not None assert fw[14] is not None assert fw", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "commaai/opendbc", + "expected": "self._rx(self._speed_msg(0)))", + "got": "self._rx(self._speed_msg(10)))", + "got_raw": "self._rx(self._speed_msg(10))) self._tx(self._speed_msg(10)) self._tx(self._speed_msg(10)) self._tx(self._speed_msg(10)) self._tx(self._speed_msg(10)) self._tx(self._speed_msg(10)) self._tx(self._speed_msg(10)) self._tx(self._speed_msg(10)) self._tx(self._speed_msg(10)) self._tx(self._speed_msg(10)) self._tx(self._speed_msg(10)) self._tx(self._speed_msg", + "exact_match": false, + "code_bleu": 0.7611606003349892, + "edit_similarity": 0.9830508474576272 + }, + { + "repo": "commaai/opendbc", + "expected": "self._tx(self._button_msg(resume=True)))", + "got": "self._tx(self._button_msg(resume=True)))", + "got_raw": "self._tx(self._button_msg(resume=True))) # only resume allows while controls allowed self.safety.set_controls_allowed(1) self.assertTrue(self._tx(self._button_msg(resume=True))) self.assertFalse(self._tx(self._button_msg(cancel=True))) # no cancel allowed while controls allowed self.safety.set_controls_allowed(0) self.assertFalse(self._tx(self._button_msg(cancel=True))) # no cancel allowed while controls not allowed self.safety.set_controls_allowed(1) self.assertTrue(self._tx(self._button_msg(cancel=True))) # no resume allowed while controls allowed self.safety.set_controls_allowed(0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "commaai/opendbc", + "expected": "self._tx(tester_present))", + "got": "self._tx(tester_present))", + "got_raw": "self._tx(tester_present))\n\n def test_tester_present_not_allowed(self, ecu_disable: bool = True):\n \"\"\"\n Ensure tester present diagnostic message is not allowed to keep ECU knocked out\n for longitudinal control.\n \"\"\"\n\n addr, bus = self.DISABLED_ECU_ACTUATION_MSG\n for should_tx, msg in ((True, b\"\\x02\\x3E\\x80\\x00\\x00\\x00\\x00\\x00\"),\n (False, b\"\\x03\\xAA\\xAA\\x00\\x00\\x00", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "commaai/opendbc", + "expected": "i % 256", + "got": "i + 1) / 1000.0 + 1.0 / 1000.0 * i + 1.0 / 1000.0 * i * i / 2.0 + 1.0 / 1000.0 * i * i * i / 6.0 + 1.0 / 1000.0 * i * i * i * i / 24.0 + 1.0 / 1000.0 * i * i * i * i * i / 12", + "got_raw": "i + 1) / 1000.0 + 1.0 / 1000.0 * i + 1.0 / 1000.0 * i * i / 2.0 + 1.0 / 1000.0 * i * i * i / 6.0 + 1.0 / 1000.0 * i * i * i * i / 24.0 + 1.0 / 1000.0 * i * i * i * i * i / 12", + "exact_match": false, + "code_bleu": 0.018730574860488187, + "edit_similarity": 0.055248618784530384 + }, + { + "repo": "commaai/opendbc", + "expected": "{(b\"CV1-CV000\", None)}", + "got": "{(b\"CV1\", None)}", + "got_raw": "{(b\"CV1\", None)} # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127", + "exact_match": false, + "code_bleu": 0.5969491792019646, + "edit_similarity": 0.8421052631578947 + }, + { + "repo": "commaai/opendbc", + "expected": "self.safety.get_controls_allowed())", + "got": "self.safety.get_controls_allowed())", + "got_raw": "self.safety.get_controls_allowed())", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "commaai/opendbc", + "expected": "car_params.centerToFront", + "got": "car_params.centerToFront", + "got_raw": "car_params.centerToFront < car_params.wheelbase * 0.55 + 0.55 * car_params.wheelbase / 2.0 + 0.55 * car_params.centerToFront < car_params.wheelbase * 0.65 + 0.65 * car_params.wheelbase / 2.0 + 0.65 * car_params.centerToFront < car_params.wheelbase * 0.8 < car_params.centerToFront < car_params.wheelbase * 0.95 + 0.95 * car_params.wheelbase / 2.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "commaai/opendbc", + "expected": "len(codes)", + "got": "len(codes)", + "got_raw": "len(codes) # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "commaai/opendbc", + "expected": "should_fail", + "got": "should_fail", + "got_raw": "should_fail == \"Should fail\" + str(should_fail) + \" but it didn't\" + str(failed) + \" for \" + fn + \" with rule \" + rule + \" and transform \" + str(transform) + \" should_fail=\" + str(should_fail) + \" failed=\" + str(failed) + \" fn=\" + str(fn) + \" rule=\" + str(rule) + \" transform=\" + str(transform) + \" should_fail=\" + str(should_fail) + \" failed=\" + str(failed) + \" fn=\" + str(fn) + \" rule=\" + str(rule) +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "commaai/opendbc", + "expected": "{platform}", + "got": "car_fw[0]", + "got_raw": "car_fw[0] if len(car_fw) == 1 else car_fw[1] if len(car_fw) == 2 else None if len(car_fw) > 2 else None if len(car_fw) == 0 else None if len(car_fw) > 1 else None if len(car_fw) == 0 else None if len(car_fw) > 1 else None if len(car_fw) == 0 else None if len(car_fw) > 1 else None if len(car_fw) == 0 else None if len(car_fw) > 1 else None if len(car_fw) == 0 else", + "exact_match": false, + "code_bleu": 0.3021375397356768, + "edit_similarity": 0.21052631578947367 + }, + { + "repo": "commaai/opendbc", + "expected": "yr2)", + "got": "yr2)", + "got_raw": "yr2)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "commaai/opendbc", + "expected": "self._rx(msg))", + "got": "self._rx(msg))", + "got_raw": "self._rx(msg)) # Checksum is not checked for 2nd speed msg_type) and not quality_flag) and not self._rx(msg)) # Checksum is not checked for yaw msg_type) and not quality_flag) and not self._rx(msg)) # Checksum is not checked for yaw msg_type) and not quality_flag) and not self._rx(msg)) # Checksum is not checked for yaw msg_type) and not quality_flag) and not self._rx(msg)) # Checksum is not checked for yaw msg_type) and not quality_flag) and not self._rx(msg))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "commaai/opendbc", + "expected": "1", + "got": "len(expected)", + "got_raw": "len(expected) + 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.3021375397356768, + "edit_similarity": 0.0 + }, + { + "repo": "containers/ramalama", + "expected": "16", + "got": "16", + "got_raw": "16\n\ndef test_env_config_file_order():\n mock_file_config = {\n \"image\": \"file/image:latest\",\n \"threads\": 4,\n }\n mock_env_config = {\n \"image\": \"env/image:override\",\n \"threads\": 8,\n }\n\n with patch(\"ramalama.config.load_file_config\", return_value=mock_file_config):\n with patch(\"ramalama.config.load_env_config\", return_value=mock_env_config):\n cfg = default_config()\n assert cfg.image == \"env/image:override\"\n assert cfg.threads == 8\n\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "containers/ramalama", + "expected": "\"All done\"", + "got": "\"All done\" events[0].type == \"done\" events[0].output == [{\"content\": [{\"type\": \"output_text\"", + "got_raw": "\"All done\" events[0].type == \"done\" events[0].output == [{\"content\": [{\"type\": \"output_text\", \"text\": \"All done\"}]}] events[0].error is None events[0].status_code is None events[0].headers is None events[0].url is None events[0].id is None events[0].model is None events[0].stream is True events[0].streaming is False events[0].chunk is None events[0].chunk_index is None events[0].chunk_size is None events[0].chunk_total is None events[", + "exact_match": false, + "code_bleu": 0.044915755686574035, + "edit_similarity": 0.19607843137254902 + }, + { + "repo": "containers/ramalama", + "expected": "0", + "got": "1", + "got_raw": "1 # Initial system message added by default\n\n shell.chat() # Call the chat function\n\n # Check that the chatbot's response is correct\n assert _text_content(shell.conversation_history[0]) == \"Hello! How can I assist you today?\" # noqa: E501\n\n @patch('urllib.request.urlopen')\n def test_chat_with_file_input(self, mock_urlopen):\n \"\"\"Test chat functionality with a file input specified.\"\"\"\n # Mock the models endpoint response\n mock_response = MagicMock()\n mock_response.__iter__.return_value = [b'{\"data\":", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "containers/ramalama", + "expected": "22", + "got": "222", + "got_raw": "222 # 222 is the error code for \"unsupported transport\" in ramalama. # See: https://github.com/ramalama/ramalama/blob/0.1.0/ramalama/transport.py#L100 # and: https://github.com/ramalama/ramalama/blob/0.1.0/ramalama/transport.py#L103 # and: https://github.com/ramalama/ramalama/blob/0.1.0/ramalama/transport.py#L106 # and: https", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.8 + }, + { + "repo": "containers/ramalama", + "expected": "0", + "got": "0", + "got_raw": "0, \"No handlers found in the opener\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "containers/ramalama", + "expected": "sio.read()", + "got": "sio.read()", + "got_raw": "sio.read()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "containers/ramalama", + "expected": "content", + "got": "content", + "got_raw": "content + \"\\n\" + \"---\\n\" + \"kind: Model\\n\" + \"apiVersion: v1\\n\" + \"metadata:\\n\" + \" name: test-model\\n\" + \"spec:\\n\" + \" # Add your model specification here\\n\" + \" # For example:\\n\" + \" # fields:\\n\" + \" # - name: field1\\n\" + \" # type: string\\n\" + \" # - name: field2\\n\" + \" # type: int\\n\" + \" # - name: field3\\n\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "containers/ramalama", + "expected": "ValueError)", + "got": "ValueError", + "got_raw": "ValueError, match=\"Unknown chat provider scheme: unknown\") as e: get_chat_provider(\"unknown://provider\") e.value.scheme == \"unknown\" e.value.provider == \"provider\" e.value.url == \"unknown://provider\" e.value.params == {} e.value.headers == {} e.value.body == {} e.value.timeout == 30 e.value.max_retries == 3 e.value.max_tokens == 1000 e.value.temperature == 0.5 e.value.top_p == 1.0 e.value.frequency_penalty == 0.0 e.value.presence_penalty == 0.0 e.value.model == \"g", + "exact_match": false, + "code_bleu": 0.29730177875068026, + "edit_similarity": 0.9523809523809523 + }, + { + "repo": "containers/ramalama", + "expected": "True", + "got": "expected", + "got_raw": "expected # noqa: E712", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.16666666666666666 + }, + { + "repo": "containers/ramalama", + "expected": "provider", + "got": "provider", + "got_raw": "provider", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "containers/ramalama", + "expected": "8", + "got": "len(image_files)", + "got_raw": "len(image_files) - 1 # Exclude the .ico file # as it's not supported by OpenAI API assert all(isinstance(part, ImageURLPart) for part in image_parts) assert all(part.format in [\"jpeg\", \"png\", \"gif\", \"bmp\", \"webp\", \"tiff\", \"tif\"] for part in image_parts) assert all(part.mime_type in [\"image/jpeg\", \"image/png\", \"image/gif\", \"image/bmp\", \"image/webp\", \"image/tiff\", \"image/tif\"] for part in image_parts) assert all(part.size > ", + "exact_match": false, + "code_bleu": 0.3021375397356768, + "edit_similarity": 0.0 + }, + { + "repo": "containers/ramalama", + "expected": "value", + "got": "value", + "got_raw": "value\n\n\ndef test_generate_input(monkeypatch):\n from ramalama.cli import init_cli, ParsedGenerateInput\n\n argv = [\"ramalama\", \"generate\", \"model\", \"input.txt\"]\n monkeypatch.setattr(sys, \"argv\", argv)\n parser, args = init_cli()\n assert hasattr(args, \"input\") and hasattr(args, \"output\") and hasattr(args, \"model\") and hasattr(args, \"options\") and hasattr(args, \"max_length\") and hasattr(args, \"top_p\") and hasattr(args, \"top_k\") and hasattr(args, \"temperature\") and hasattr(args,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "containers/ramalama", + "expected": "None", + "got": "None", + "got_raw": "None and args.url is None and args.model is None and args.api is None and args.api_key is None and args.api_url is None and args.api_key is None and args.api_token is None and args.api_headers is None and args.api_timeout is None and args.api_max_retries is None and args.api_max_tokens is None and args.api_temperature is None and args.api_top_p is None and args.api_frequency_penalty is None and args.api_presence_penalty is None and args.api_stop is None and args.api_stream is False and args.api_verbose is False and args.api_debug is False and args.api_log is None and args.api_log", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "containers/ramalama", + "expected": "42", + "got": "42.0", + "got_raw": "42.0 # Default value from the base class is preserved \"\"\"Test that defaults are merged correctly.\"\"\" layer2 = {\"value\": 24.0} merged_config = self.LayeredTestConfig(layer1, layer2) assert merged_config.name == \"custom_name\" assert merged_config.value == 24.0 \"\"\"Test that defaults are extracted correctly.\"\"\" extracted_defaults = self.LayeredTestConfig.extract_defaults(layer1) assert extracted_defaults == {\"name\": \"custom_name\"} \"\"\"Test that defaults are merged with the base class.\"\"\" merged_defaults = self.LayeredTestConfig.extract_defaults(layer1, self.BaseConfig) assert", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "containers/ramalama", + "expected": "content", + "got": "content", + "got_raw": "content + \"\\n\" + \"version: '3.8'\" + \"\\n\" + \"services:\\n test-service:\\n image: hello-world\" + \"\\n\" + \"networks:\\n default:\\n external:\\n name: ramalama\" + \"\\n\" + \"volumes:\" + \"\\n\" + \" data:\" + \"\\n\" + \" logs:\" + \"\\n\" + \" config:\" + \"\\n\" + \" cache:\" + \"\\n\" + \" build:\" + \"\\n\" + \" test:\" + \"\\n\" + \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "containers/ramalama", + "expected": "2", + "got": "2", + "got_raw": "2 # Two images loaded successfully assert result[0].data == \"test1\" assert result[1].data == \"test2\" assert result[0].mimetype == \"image/jpeg\" assert result[1].mimetype == \"image/png\" assert result[0].filename == \"test1.jpg\" assert result[1].filename == \"test2.png\" assert result[0].url is None assert result[1].url is None assert result[0].id is None assert result[1].id is None assert result[0].size == ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "containers/ramalama", + "expected": "info", + "got": "info[\"accelerators\"]", + "got_raw": "info[\"accelerators\"] else \"Accelerator\" not in info[\"accelerators\"] assert \"Container\" in info[\"containers\"] else \"Container\" not in info[\"containers\"] assert \"ContainerRuntime\" in info[\"container_runtimes\"] else \"ContainerRuntime\" not in info[\"container_runtimes\"] assert \"Docker\" in info[\"docker\"] else \"Docker\" not in info[\"docker\"] assert \"Engine\" in info[\"engine\"] else \"Engine\" not in info[\"engine\"] assert \"Host\" in info[\"host\"] else \"Host\" not in info[\"host\"] assert \"Kernel\"", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "containers/ramalama", + "expected": "\"gpt-4o-mini\"", + "got": "\"podman\"", + "got_raw": "\"podman\" if CONFIG.chat.default_model == \"podman\" else \"gpt-4o-mini\" if CONFIG.chat.default_model == \"gpt-4o-mini\" else \"gpt-4\" if CONFIG.chat.default_model == \"gpt-4\" else \"gpt-3.5-turbo\" if CONFIG.chat.default_model == \"gpt-3.5-turbo\" else \"gpt-3.5-turbo-16k\" if CONFIG.chat.default_model == \"gpt-3.5-turbo-16k\" else \"gpt-3", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5714285714285714 + }, + { + "repo": "containers/ramalama", + "expected": "expected", + "got": "expected", + "got_raw": "expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "containers/ramalama", + "expected": "\"1024\"", + "got": "1024", + "got_raw": "1024 # type: ignore # noqa: E701 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E50", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.8 + }, + { + "repo": "copier-org/copier", + "expected": "\"foo\"", + "got": "\"foo\"", + "got_raw": "\"foo\" assert (dst / \"bar\").read_text(\"utf-8\") == \"bar\" assert (dst / \"src\" / \"forbidden.txt\").exists() assert (dst / \"src\" / \"forbidden.txt\").read_text(\"utf-8\") == \"foo\" assert (dst / \"src\" / \"src\" / \"forbidden.txt\").exists() assert (dst / \"src\" / \"src\" / \"forbidden.txt\").read_text(\"utf-8\") == \"bar\" assert (dst / \"src\" / \"src\" / \"src\" / \"forbidden.txt\").", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "copier-org/copier", + "expected": "defaults", + "got": "defaults", + "got_raw": "defaults | {\"foo\": \"foo\", \"bar\": \"bar\"} | {\"foo\": \"foo\", \"bar\": \"bar\"} | {\"foo\": \"foo\", \"bar\": \"bar\"} | {\"foo\": \"foo\", \"bar\": \"bar\"} | {\"foo\": \"foo\", \"bar\": \"bar\"} | {\"foo\": \"foo\", \"bar\": \"bar\"} | {\"foo\": \"foo\", \"bar\": \"bar\"} | {\"foo\": \"foo\", \"bar\": \"bar\"} | {\"foo\": \"foo\", \"bar\": \"bar\"} | {\"foo\": \"foo\", \"bar\":", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "copier-org/copier", + "expected": "\"P2\"", + "got": "\"P2\"", + "got_raw": "\"P2\" expected_parent2_answers = { \"_src_path\": str(parent2), \"_commit\": \"v1.0+parent2\", \"name\": \"P2\", } assert load_answersfile_data(dst, \".parent2-answers.yml\") == expected_parent2_answers # Apply child. It uses the default answers file. copier.run_copy(str(child), dst, defaults=True, overwrite=True) git_save(dst) assert (dst / \"child.txt\").read_text() == \"C1\" assert (dst / \"combined.json\").read_text() == dedent( \"\"\"\\ { \"parent1\": \"P1\",", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "copier-org/copier", + "expected": "\"v1\"", + "got": "sha[:7]", + "got_raw": "sha[:7] + \"-1\" + sha[7:] # type: ignore # noqa: E501 # fmt: off # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 #", + "exact_match": false, + "code_bleu": 0.2295748846661433, + "edit_similarity": 0.0 + }, + { + "repo": "copier-org/copier", + "expected": "\"v1\"", + "got": "\"v1\"", + "got_raw": "\"v1\" # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "copier-org/copier", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "copier-org/copier", + "expected": "\"la vie en rose\"", + "got": "\"la vie en rose\"", + "got_raw": "\"la vie en rose\" # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "copier-org/copier", + "expected": "copier.errors.TaskError)", + "got": "copier.CopyError)", + "got_raw": "copier.CopyError) as exc_info: copier.copy(\"tests/test_app\", dst) assert str(exc_info.value) == \"Failed to copy test_app\" assert not dst.exists() assert not dst.parent.exists()", + "exact_match": false, + "code_bleu": 0.3387551654364098, + "edit_similarity": 0.6829268292682927 + }, + { + "repo": "copier-org/copier", + "expected": "str(tpl1)", + "got": "str(tpl1)", + "got_raw": "str(tpl1) + \"/\" + \"_src_path\" + SUFFIX_TMPL + \"\\n\" \"q1: a1\\n\" \"q2: a2\\n\" \"q3: a3\\n\" \"q4: a4\\n\" \"q5: a5\\n\" \"q6: a6\\n\" \"q7: a7\\n\" \"q8: a8\\n\" \"q9: a9\\n\" \"q10: a10\\n\" \"q11: a11\\n\" \"q12: a12\\n\" \"q13:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "copier-org/copier", + "expected": "values[:1]", + "got": "values[0]", + "got_raw": "values[0] if type_name == \"multiselect\" else values[0][0] if type_name == \"multiselect_one\" else values[0] if type_name == \"multiselect_many\" else values[0][0] if type_name == \"multiselect_one_many\" else values[0][0][0] if type_name == \"multiselect_one_many_many\" else values[0][0][0][0] if type_name == \"multiselect_one_many_many_many\" else values[0][0][0][0][0] if type_name == \"multiselect_one_many_many_many_many\"", + "exact_match": false, + "code_bleu": 0.4065061985236918, + "edit_similarity": 0.8421052631578947 + }, + { + "repo": "copier-org/copier", + "expected": "\"v1\"", + "got": "\"v1\"", + "got_raw": "\"v1\" assert (dst / \"README.md\").read_text() == \"\"\"\\ Thank you for using our template on Linux _message_before_copy: Thank you for using our template on Linux _message_after_copy: Project myproj successfully created \"\"\" assert (dst / \"README.md\").readlink().readlink() == Path(\"README.md\") assert (dst / \"README.md\").readlink().readlink() == Path(\"README.md\") assert (dst / \"README.md\").readlink().readlink() == Path(\"README.md\") assert (dst / \"README.md\").readlink().readlink() == Path(\"README", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "copier-org/copier", + "expected": "\"SKIPPED\"", + "got": "\"a\"", + "got_raw": "\"a\" assert (tmp_path / \"b.noeof.txt\").read_text() == \"b\" assert (tmp_path / \"c.noeof.txt\").read_text() == \"c\" assert (tmp_path / \"d.noeof.txt\").read_text() == \"d\" assert (tmp_path / \"e.noeof.txt\").read_text() == \"e\" assert (tmp_path / \"f.noeof.txt\").read_text() == \"f\" assert (tmp_path / \"g.noeof.txt\").read_text() == \"g\" assert (tmp_path / \"h.noeof.txt\").", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "copier-org/copier", + "expected": "{\"owner2\": owner2}", + "got": "{\"owner2\": owner2} if has_2_owners else {} ``` \"\"\" Check that the user can change the default value. \"\"\" tui = spawn(COPIER_PATH + (\"copy\"", + "got_raw": "{\"owner2\": owner2} if has_2_owners else {} ``` \"\"\" Check that the user can change the default value. \"\"\" tui = spawn(COPIER_PATH + (\"copy\", str(src), str(dst))) expect_prompt(tui, \"owner1\", \"str\") tui.sendline(\"example\") expect_prompt(tui, \"has_2_owners\", \"bool\") tui.expect_exact(\"(y/N)\") tui.send(\"y\") expect_prompt(tui, \"owner2\", \"str\") tui.expect_exact(\"example\") tui.sendline(\"2\") tui.expect_exact(pexpect.EOF", + "exact_match": false, + "code_bleu": 0.18556675930109115, + "edit_similarity": 0.23076923076923078 + }, + { + "repo": "copier-org/copier", + "expected": "\"bar\"", + "got": "\"bar\"", + "got_raw": "\"bar\"\n\n\ndef test_copy_with_defaults_and_settings(tmp_path_factory: pytest.TempPathFactory) -> None:\n src, dst = map(tmp_path_factory.mktemp, (\"src\", \"dst\"))\n build_file_tree(\n {\n src / \"copier.yml\": \"project_name: foo\",\n src / \"result.txt.jinja\": \"{{ project_name }}\",\n }\n )\n run_copy(\n str(src),\n dst,\n defaults=True,\n settings=Settings(defaults={\"project_name\": \"bar\"}),\n )\n\n assert (dst / \"result.txt\").read_text", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "copier-org/copier", + "expected": "\"v2.0.0.alpha1\"", + "got": "\"v2.0.0.dev1\"", + "got_raw": "\"v2.0.0.dev1\" assert (dst / \"version.txt\").read_text() == \"v2.0.0.dev1\" assert (dst / \"v1.9\").exists() assert (dst / \"v2.dev0\").exists() assert (dst / \"v2.dev2\").exists() assert (dst / \"v2.a1\").exists() assert (dst / \"v2.a2\").exists() assert (dst / \"v2.dev1\").exists() assert (dst / \"v2.dev2\").exists() assert (dst / \"v2.a1\").exists()", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.7142857142857143 + }, + { + "repo": "copier-org/copier", + "expected": "\"2\"", + "got": "\"2\"", + "got_raw": "\"2\" assert load_answersfile_data(dst)[\"_commit\"] == sha assert load_answersfile_data(dst)[\"_vcs_ref\"] == \"HEAD\" assert load_answersfile_data(dst)[\"_vcs_url\"] == \"file://\" + str(src) + \"/\" assert load_answersfile_data(dst)[\"_vcs_type\"] == \"git\" assert load_answersfile_data(dst)[\"_vcs_tag\"] is None assert load_answersfile_data(dst)[\"_vcs_branch\"] is None assert load_answersfile_data(dst)[\"_vcs_commit\"] == sha assert load_answersfile_data(dst)[\"_vcs_tag\"] is None assert load_answers", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "copier-org/copier", + "expected": "\"0.2.0\"", + "got": "\"0.2.0\"", + "got_raw": "\"0.2.0\" assert Path(local_tmp, \"README.md\").exists() is False\n\n\ndef test_local_dirty_update(tmp_path_factory: pytest.TempPathFactory) -> None:\n \"\"\"\n When core.fsmonitor is enabled, normal `git checkout` command won't works.\n \"\"\"\n\n gitconfig.set({\"core.fsmonitor\": \"true\"})\n src = tmp_path_factory.mktemp(\"src\")\n build_file_tree({src / \"version.txt\": \"0.1.0\"})\n git_save(src)\n build_file_tree({src / \"version.txt\": \"0.2.0\", src / \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "copier-org/copier", + "expected": "normalized", + "got": "normalized", + "got_raw": "normalized", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "copier-org/copier", + "expected": "\"task 1\\ntask 2\\n\"", + "got": "\"created\" assert (dst / \"delete-in-tasks.txt\").read_text() == \"deleted\" assert (dst / \"created-without-tasks.txt\").read_text() == \"created\" assert (dst / \"delete-in-legacy.txt\").read_text() == \"deleted\" assert (dst / \"created-without-legacy.txt\").read_text() == \"created\" assert (dst / \"created-without-legacy.txt\").read_text() == \"created\" assert (dst / \"created-without-legacy.txt\").read_text() == \"created\" assert (dst / \"created-without-legacy.txt\").read", + "got_raw": "\"created\" assert (dst / \"delete-in-tasks.txt\").read_text() == \"deleted\" assert (dst / \"created-without-tasks.txt\").read_text() == \"created\" assert (dst / \"delete-in-legacy.txt\").read_text() == \"deleted\" assert (dst / \"created-without-legacy.txt\").read_text() == \"created\" assert (dst / \"created-without-legacy.txt\").read_text() == \"created\" assert (dst / \"created-without-legacy.txt\").read_text() == \"created\" assert (dst / \"created-without-legacy.txt\").read", + "exact_match": false, + "code_bleu": 0.011561659490849129, + "edit_similarity": 0.046218487394957986 + }, + { + "repo": "copier-org/copier", + "expected": "control", + "got": "control.replace(\"1.2.3\"", + "got_raw": "control.replace(\"1.2.3\", \"1.2.4\") + \"\\n\" + \"\\n\" + \"[tool.poetry]\\n\" + \"description = \\\"A test project for copier\\\"\\n\" + \"[build-system]\\n\" + \"requires = [\\\"setuptools>=40.0.0\\\", \\\"wheel\\\"]\\n\" + \"build-backend = \\\"setuptools.build_meta\\\"\\n\" + \"[tool.black]\\n\" + \"line-length = 88\\n\" + \"[tool.isort]\\n\" + \"line-length = 88\\n\" + \"[tool.pytest", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.4666666666666667 + }, + { + "repo": "crazyguitar/pysheeet", + "expected": "5", + "got": "5", + "got_raw": "5\n\n def test_sub(self):\n import simple\n\n assert simple.sub(10, 5) == 5\n\n assert simple.sub(10, -5) == 15\n\n def test_div(self):\n import simple\n\n assert simple.div(10, 2) == 5.0\n\n assert simple.div(10, 3) == 3.3333333333333335\n\n def test_mod(self):\n import simple\n\n assert simple.mod(10, 3) == 1.0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "crazyguitar/pysheeet", + "expected": "5", + "got": "5.0000000000000004", + "got_raw": "5.0000000000000004 # Due to floating-point precision issues. def test_add(self): \"\"\"Test the add function.\"\"\" assert add(2, 3) == 5.0000000000000004 # Due to floating-point precision issues. def test_add(self): \"\"\"Test the add function.\"\"\" assert add(2, 3) == 5.0000000000000004 # Due to floating-point precision issues. def test_add(self):", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.10526315789473684 + }, + { + "repo": "crazyguitar/pysheeet", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "crazyguitar/pysheeet", + "expected": "2", + "got": "2", + "got_raw": "2 and decomposed[0] == \"e\" and decomposed[1] == \"\\u0301\" # combining acute accent\n\n def test_nfc(self):\n # single e + combining accent -> \u00e9\n composed = normalize_nfc(\"e\\u0301\")\n\n assert composed == \"\u00e9\" # combining accent is dropped in NFC form\n\n def test_nfkd(self):\n # single \u00e9 -> e + combining grave accent\n decomposed = normalize_nfd(\"\u00e9\")\n\n assert len(decomposed) == 2 and decomposed[0] == \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "crazyguitar/pysheeet", + "expected": "1", + "got": "1.0000000000000002e-16", + "got_raw": "1.0000000000000002e-16 # Python's float precision issue. \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\"", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.08695652173913043 + }, + { + "repo": "crazyguitar/pysheeet", + "expected": "[9, 8, 7]", + "got": "[9, 8, 7]", + "got_raw": "[9, 8, 7]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "crazyguitar/pysheeet", + "expected": "\"a\"", + "got": "\"a\"", + "got_raw": "\"a\" assert d[frozenset([3, 4])] == \"b\" def test_frozenset_in_set(self): s = frozenset_in_set() assert s == {frozenset([1, 2]), frozenset([3, 4])} def test_membership(self): s = {1, 2, 3} assert 1 in s assert 4 not in s def test_create_frozenset(self): fs = create_frozenset([1, 2, 3]) assert fs == frozenset([1, 2, 3]) def", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "crazyguitar/pysheeet", + "expected": "\"test\"", + "got": "\"test\"", + "got_raw": "\"test\" c.name = \"new\" assert c.name == \"new\" c.name = 123 assert c.name == 123 c.name = 123.45 assert c.name == 123.45 c.name = True assert c.name == True c.name = False assert c.name == False c.name = None assert c.name == None c.name = [] assert c.name == [] c.name = {} assert c.name == {} c.name = () assert c.name == () c.name = object() assert c.name == object() c.name = 123.456", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "crazyguitar/pysheeet", + "expected": "{\"A\", \"B\"}", + "got": "{\"A\", \"B\"}", + "got_raw": "{\"A\", \"B\"}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "crazyguitar/pysheeet", + "expected": "\"low\"", + "got": "\"low\"", + "got_raw": "\"low\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "crazyguitar/pysheeet", + "expected": "1", + "got": "1", + "got_raw": "1 assert results[0][0] == \"A\" assert results[0][1] == 2\n finally:\r\n session.close()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "crazyguitar/pysheeet", + "expected": "s2", + "got": "s2", + "got_raw": "s2 # Normalization should make them equal after NFC normalization.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "crazyguitar/pysheeet", + "expected": "Token(\"PLUS\", \"+\")", + "got": "Token(\"PLUS\", \"+\") assert tokens[2] == Token(\"NUMBER\", \"5\") assert tokens[3] == Token(\"TIMES\", \"*\") assert tokens[4] == Token(\"NUMBER\", \"2\") assert tokens[5] == Token(\"WS\", \" \") assert tokens[6] == Token(\"PLUS\", \"+\") assert tokens[7] == Token(\"NUMBER\", \"3\") assert tokens[8] == Token(\"WS\", \" \") assert tokens[9] == Token(\"MINUS\", \"-\") assert tokens[10] == Token(\"NUMBER\", \"4\") assert tokens[11] ==", + "got_raw": "Token(\"PLUS\", \"+\") assert tokens[2] == Token(\"NUMBER\", \"5\") assert tokens[3] == Token(\"TIMES\", \"*\") assert tokens[4] == Token(\"NUMBER\", \"2\") assert tokens[5] == Token(\"WS\", \" \") assert tokens[6] == Token(\"PLUS\", \"+\") assert tokens[7] == Token(\"NUMBER\", \"3\") assert tokens[8] == Token(\"WS\", \" \") assert tokens[9] == Token(\"MINUS\", \"-\") assert tokens[10] == Token(\"NUMBER\", \"4\") assert tokens[11] ==", + "exact_match": false, + "code_bleu": 0.041573466591693496, + "edit_similarity": 0.08674698795180723 + }, + { + "repo": "crazyguitar/pysheeet", + "expected": "0", + "got": "0", + "got_raw": "0 assert simple.fib(1) == 1 assert simple.fib(2) == 1 assert simple.fib(3) == 2 assert simple.fib(4) == 3 assert simple.fib(5) == 5 assert simple.fib(6) == 8 assert simple.fib(7) == 13 assert simple.fib(8) == 21 assert simple.fib(9) == 34 assert simple.fib(10) == 55 assert simple.fib(11) == 89 assert simple.fib(12) == ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "crazyguitar/pysheeet", + "expected": "\"B\"", + "got": "\"b\"", + "got_raw": "\"b\" \"c\" \"d\" \"e\" \"f\" \"g\" \"h\" \"i\" \"j\" \"k\" \"l\" \"m\" \"n\" \"o\" \"p\" \"q\" \"r\" \"s\" \"t\" \"u\" \"v\" \"w\" \"x\" \"y\" \"z\" \"a\" \"b\" \"c\" \"d\" \"e\" \"f\" \"g\" \"h\" \"i\" \"j\" \"k\" \"l\" \"m\" \"n\" \"o\" \"p\" \"q\" \"r", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "crazyguitar/pysheeet", + "expected": "1", + "got": "1", + "got_raw": "1 assert rows[0][1] == \"Alice\" def test_execute_raw_sql_with_params(self): engine = create_engine(\"sqlite:///:memory:\") with engine.connect() as conn: conn.execute( text(\"CREATE TABLE test (id INTEGER PRIMARY KEY, name TEXT)\"), ) conn.execute( text(\"INSERT INTO test (name) VALUES (:name)\"), {\"name\": \"Alice\"}, ) conn.commit() result = conn.execute( text(\"SELECT * FROM test WHERE name = :name\"), {\"name\": \"Alice\"}, ) rows = result.fetchall() assert len(rows) == 1 assert rows[0][1] == \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "crazyguitar/pysheeet", + "expected": "42", + "got": "42.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "42.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.03076923076923077 + }, + { + "repo": "crazyguitar/pysheeet", + "expected": "3", + "got": "3", + "got_raw": "3 or 4 # 3 or 4 parts for Python 3.x or 3.x.y.z versions respectively. assert all(part.isdigit() for part in parts[:-1]) # Check if all parts are digits except the last one. assert parts[-1].isalnum() # Check if the last part is alphanumeric. # Check if the last part is alphanumeric. assert len(parts[-1]) == 1 or 2 # Check if the last part is either 1 or 2 digits long. # Check if the last part is either 1 or 2 digits long. # Check", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "crazyguitar/pysheeet", + "expected": "\"C\"", + "got": "\"C\"", + "got_raw": "\"C\"\n finally:\r\n session.close()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "crazyguitar/pysheeet", + "expected": "4", + "got": "4", + "got_raw": "4 # PST is UTC-8 hours from UTC # PST is 4 hours ahead of UTC # PST is 4 hours ahead of UTC # PST is 4 hours ahead of UTC # PST is 4 hours ahead of UTC # PST is 4 hours ahead of UTC # PST is 4 hours ahead of UTC # PST is 4 hours ahead of UTC # PST is 4 hours ahead of UTC # PST is 4 hours ahead of UTC # PST is 4 hours ahead of UTC # PST is 4 hours ahead of UTC # PST is 4 hours", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "crewAIInc/crewAI-tools", + "expected": "headers", + "got": "headers.keys()", + "got_raw": "headers.keys() assert \"X-Crewai-User-Id\" not in headers.keys() assert \"X-Crewai-User-Email\" not in headers.keys() assert \"X-Crewai-User-Name\" not in headers.keys() assert \"X-Crewai-User-Role\" not in headers.keys() assert \"X-Crewai-User-Status\" not in headers.keys() assert \"X-Crewai-User-Is-Admin\" not in headers.keys() assert \"X-Crewai-User-Is-Owner\" not in headers.keys() assert \"X-Crewai-User-", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "crewAIInc/crewAI-tools", + "expected": "1", + "got": "1", + "got_raw": "1 assert results[0][\"text\"] == \"foo\" assert results[0][\"score\"] == 0.1 assert results[0][\"_id\"] == 1 def test_query_with_empty_query(mongodb_vector_search_tool): with patch.object( mongodb_vector_search_tool._coll, \"aggregate\" ) as mock_aggregate: mock_aggregate.return_value = [] results = json.loads( mongodb_vector_search_tool._run(query=\"\") ) assert len(results) == 0 def test_query_with_no_results(mongodb_vector_search_tool): with patch.object( mongodb_vector_search_tool._coll, \"aggregate\" ) as mock_aggregate:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "crewAIInc/crewAI-tools", + "expected": "status", + "got": "status", + "got_raw": "status if status < 400 else 500 # 400-499 are successful, 500-599 are server errors # 300-399 are redirects # 400-499 are successful, 500-599 are server errors # 300-399 are redirects # 400-499 are successful, 500-599 are server errors # 300-399 are redirects # 400-", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "crewAIInc/crewAI-tools", + "expected": "result", + "got": "result.lower()", + "got_raw": "result.lower() # noqa: W605 result.lower() # noqa: W605 result.lower() # noqa: W605 result.lower() # noqa: W605 result.lower() # noqa: W605 result.lower() # noqa: W605 result.lower() # noqa: W605 result.lower() # noqa: W605 result.lower() # noqa: W605 result.lower() # noqa: W605 result.lower() # noqa: W605 result.lower() # noqa:", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6 + }, + { + "repo": "crewAIInc/crewAI-tools", + "expected": "result", + "got": "result.lower()", + "got_raw": "result.lower() # Convert to lowercase for comparison assert \"click the submit button\" in result.lower() assert \"act\" in result.lower() assert \"completed successfully\" in result.lower() mock_run.assert_called_once_with( \"Click the submit button\", command_type=\"act\", ) mock_run.reset_mock() # Run the tool again with a different command type result = stagehand_tool._run( \"Click the submit button\", command_type=\"speak\", ) assert \"speak\" in result.lower() assert \"completed successfully\" in result.lower() mock_run.assert_called_once_with(", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6 + }, + { + "repo": "crewAIInc/crewAI-tools", + "expected": "urllib.error.URLError)", + "got": "urllib.error.URLError", + "got_raw": "urllib.error.URLError, match=\"Timeout\") as e: tool.fetch_arxiv_data(\"arxiv.org\") assert str(e.value) == \"Timeout\" assert e.type == urllib.error.URLError assert e.msg == \"Timeout\" assert e.args[0] == \"Timeout\" assert e.args[1] == \"Timeout\" assert e.args[2] == \"Timeout\" assert e.args[3] == \"Timeout\" assert e.args[4] == \"Timeout\" assert e.args[5] == \"Timeout\" assert e.args[6] == \"Timeout\" assert e.args[7] == \"Timeout\" assert", + "exact_match": false, + "code_bleu": 0.8333333333333334, + "edit_similarity": 0.9767441860465116 + }, + { + "repo": "crewAIInc/crewAI-tools", + "expected": "'8'", + "got": "8.000000000000001490119334900324988827124199218750000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "8.000000000000001490119334900324988827124199218750000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015267175572519083 + }, + { + "repo": "crewAIInc/crewAI-tools", + "expected": "\"New York\"", + "got": "\"New York\" mock_post.assert_called_once()", + "got_raw": "\"New York\" mock_post.assert_called_once()", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.39215686274509803 + }, + { + "repo": "crewAIInc/crewAI-tools", + "expected": "True", + "got": "True", + "got_raw": "True # Default value for self_heal is True # Default value for self_heal is True # Default value for self_heal is True # Default value for self_heal is True # Default value for self_heal is True # Default value for self_heal is True # Default value for self_heal is True # Default value for self_heal is True # Default value for self_heal is True # Default value for self_heal is True # Default value for self_heal is True # Default value for self_heal is True # Default value for self_he", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "crewAIInc/crewAI-tools", + "expected": "\"param1\"", + "got": "\"param1\"", + "got_raw": "\"param1\" data[\"tools\"][0][\"run_params_schema\"][0][\"description\"] == \"Test parameter\" data[\"tools\"][0][\"run_params_schema\"][0][\"type\"] == \"str\" data[\"tools\"][0][\"description\"] == \"A test tool\" data[\"tools\"][0][\"name\"] == \"TestTool\" data[\"tools\"][0][\"id\"] == \"test_tool\" data[\"tools\"][0][\"tags\"] == [] data[\"tools\"][0][\"parameters\"] == [] data[\"tools\"][0][\"return_type\"] == \"str\" data[\"tools\"][0][\"is_async\"] == False data[\"tools", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "crewAIInc/crewAI-tools", + "expected": "result", + "got": "result.stderr.decode()", + "got_raw": "result.stderr.decode() # noqa: E501 result.stderr.decode() # noqa: E501 result.stderr.decode() # noqa: E501 result.stderr.decode() # noqa: E501 result.stderr.decode() # noqa: E501 result.stderr.decode() # noqa: E501 result.stderr.decode() # noqa: E501 result.stderr.decode() # noqa: E501 result.stderr.decode() # noqa: E501 result.stderr.decode() # noqa: E501 result.stderr.decode() # noqa:", + "exact_match": false, + "code_bleu": 0.18575057999133598, + "edit_similarity": 0.42857142857142855 + }, + { + "repo": "crewAIInc/crewAI-tools", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "crewAIInc/crewAI-tools", + "expected": "ET.ParseError)", + "got": "urllib.error.HTTPError)", + "got_raw": "urllib.error.HTTPError) as excinfo: tool.fetch_arxiv_paper(\"1234.5678\") assert str(excinfo.value) == \"Invalid XML response from arXiv\" mock_urlopen.assert_called_once() mock_response.read.assert_called_once() mock_response.status.assert_called_once() mock_response.close.assert_called_once() mock_response.__enter__.assert_called_once() mock_response.__exit__.assert_called_once() mock_response.__enter__.return_value.close.assert_called_once() mock_response.__enter__.return_value.read.assert_called_once() mock_response.__enter__.return_value.status.assert_called_once() mock_response.__enter", + "exact_match": false, + "code_bleu": 0.24446151121745047, + "edit_similarity": 0.43243243243243246 + }, + { + "repo": "crewAIInc/crewAI-tools", + "expected": "OSError)", + "got": "OSError", + "got_raw": "OSError, match=\"Permission denied\") as e_info: tool.download_pdf(\"http://arxiv.org/pdf/1234.5678.pdf\") assert str(e_info.value) == \"Permission denied\" mock_urlretrieve.assert_called_once_with( \"http://arxiv.org/pdf/1234.5678.pdf\", \"1234.5678.pdf\") mock_open.assert_not_called()", + "exact_match": false, + "code_bleu": 0.29730177875068026, + "edit_similarity": 0.9333333333333333 + }, + { + "repo": "crewAIInc/crewAI-tools", + "expected": "\"\"", + "got": "[]", + "got_raw": "[] # No apps specified in the request body assert kwargs[\"headers\"][\"Authorization\"] == \"Bearer test_token\" # Correct token is used assert kwargs[\"url\"] == \"https://api.crew.ai/v1/platform/tools\" # Correct endpoint is used assert kwargs[\"method\"] == \"GET\" # Correct HTTP method is used assert kwargs[\"timeout\"] == 10 # Default timeout is used assert kwargs[\"verify\"] == True # Default verification is used assert kwargs[\"cert\"] is None # No certificate is used assert kwargs[\"proxies\"] is None # No", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.0 + }, + { + "repo": "crewAIInc/crewAI-tools", + "expected": "result", + "got": "result.lower()", + "got_raw": "result.lower() # Convert to lowercase for comparison", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6 + }, + { + "repo": "crewAIInc/crewAI-tools", + "expected": "website)", + "got": "website)", + "got_raw": "website) mock_adapter.query.reset_mock() mock_adapter.add.reset_mock() result = tool._run(search_query=\"what is crewai?\") mock_adapter.query.assert_not_called() mock_adapter.add.assert_not_called() assert result == \"this is a test\" def test_directory_search_tool(mock_adapter): mock_adapter.query.return_value = \"this is a test\" directory = Path(\"/tmp\") search_query = \"what is crewai?\" tool = DirectorySearchTool(directory=directory, adapter=mock_adapter) result = tool._run(search_query=search_query) mock_adapter.query.assert_called_once_with( \"what is crewai?\", similarity_threshold=0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "crewAIInc/crewAI-tools", + "expected": "2", + "got": "2.0000000000000004", + "got_raw": "2.0000000000000004 # Due to floating-point precision issues. 1.0000000000000004 is the expected value. 2.0000000000000004 is the expected value. 1.0000000000000004 is the expected value. 2.0000000000000004 is the expected value. 1.00", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.10526315789473684 + }, + { + "repo": "crewAIInc/crewAI-tools", + "expected": "\"en\"", + "got": "\"en\"", + "got_raw": "\"en\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "crewAIInc/crewAI-tools", + "expected": "2", + "got": "2.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "2.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "curvefi/curve-dao-contracts", + "expected": "amount", + "got": "amount", + "got_raw": "amount * 1e18 // token.totalSupply() * 1e18 // 1e18 + 1e18 // token.totalSupply() * 1e18 // 1e18 + 1e18 // token.totalSupply() * 1e18 // 1e18 + 1e18 // token.totalSupply() * 1e18 // 1e18 + 1e18 // token.totalSupply() * 1e18 // 1e18 + 1e18 // token.totalSupply() *", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "curvefi/curve-dao-contracts", + "expected": "0", + "got": "0", + "got_raw": "0 * 10 ** 18 * 2 ** 200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "curvefi/curve-dao-contracts", + "expected": "bob", + "got": "bob.address", + "got_raw": "bob.address", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.42857142857142855 + }, + { + "repo": "curvefi/curve-dao-contracts", + "expected": "value", + "got": "value", + "got_raw": "value", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "curvefi/curve-dao-contracts", + "expected": "alice", + "got": "alice.address", + "got_raw": "alice.address # alice is the owner before the transfer assert burner.ownership_transfer_hash() == 0x0 # the ownership transfer hash is 0 before the transfer assert burner.ownership_transfer_deadline() == 10 ** 20 # the deadline is 10 ** 20 before the transfer assert burner.ownership_transfer_expiration() == 0 # the expiration is 0 before the transfer assert burner.ownership_transfer_pending() == bob.address # bob is the pending owner before the transfer assert burner.ownership_transfer_pending_deadline() == 0 # the pending", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.5555555555555556 + }, + { + "repo": "curvefi/curve-dao-contracts", + "expected": "tuple(rewards)", + "got": "tuple(rewards)", + "got_raw": "tuple(rewards)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "curvefi/curve-dao-contracts", + "expected": "charlie", + "got": "charlie", + "got_raw": "charlie", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "curvefi/curve-dao-contracts", + "expected": "10 ** 20", + "got": "10 ** 20 + 10 ** 18 + 10 ** 16 + 10 ** 14 + 10 ** 12 + 10 ** 10 + 10 ** 8 + 10 ** 6 + 10 ** 4 + 10 ** 2 + 10 ** 0 + 10 ** -2 + 10 ** -4 + 10 ** -6 + 10 ** -8 + 10 ** -10 + 10 ** -12 + 1", + "got_raw": "10 ** 20 + 10 ** 18 + 10 ** 16 + 10 ** 14 + 10 ** 12 + 10 ** 10 + 10 ** 8 + 10 ** 6 + 10 ** 4 + 10 ** 2 + 10 ** 0 + 10 ** -2 + 10 ** -4 + 10 ** -6 + 10 ** -8 + 10 ** -10 + 10 ** -12 + 1", + "exact_match": false, + "code_bleu": 0.036174841929983895, + "edit_similarity": 0.08290155440414508 + }, + { + "repo": "curvefi/curve-dao-contracts", + "expected": "True", + "got": "True", + "got_raw": "True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "curvefi/curve-dao-contracts", + "expected": "10 ** 19", + "got": "10 ** 19 gauge_v3.approve(accounts[1]", + "got_raw": "10 ** 19 gauge_v3.approve(accounts[1], 10 ** 18, {\"from\": accounts[0]}) assert gauge_v3.allowance(accounts[0], accounts[1]) == 10 ** 18 gauge_v3.approve(accounts[1], 0, {\"from\": accounts[0]}) assert gauge_v3.allowance(accounts[0], accounts[1]) == 0 gauge_v3.approve(accounts[1], 10 ** 19, {\"from\": accounts[0]}) assert gauge_v3.allowance(accounts", + "exact_match": false, + "code_bleu": 0.2891784933232571, + "edit_similarity": 0.34782608695652173 + }, + { + "repo": "curvefi/curve-dao-contracts", + "expected": "time", + "got": "time", + "got_raw": "time + DAY + 10 ** 18 - 10 ** 17 - 10 ** 16 - 10 ** 15 - 10 ** 14 - 10 ** 13 - 10 ** 12 - 10 ** 11 - 10 ** 10 - 10 ** 9 - 10 ** 8 - 10 ** 7 - 10 ** 6 - 10 ** 5 - 10 ** 4 - 10 ** 3 - 10", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "curvefi/curve-dao-contracts", + "expected": "REWARD", + "got": "REWARD", + "got_raw": "REWARD + 1e-18 * REWARD # 1e-18 is the precision of the coin_reward # we are not sure if the claim is exact or not, but we can be sure that it is at least 1e-18 more than the expected value # this is because the claim is done in a single transaction, and the gas cost is not included in the reward amount # the gas cost is 10000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "curvefi/curve-dao-contracts", + "expected": "accounts[3]", + "got": "accounts[3]", + "got_raw": "accounts[3]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "curvefi/curve-dao-contracts", + "expected": "REWARD", + "got": "REWARD", + "got_raw": "REWARD * 0.05 / 10 ** 18 + 10 ** 18 * 0.05 / 10 ** 18 + 10 ** 18 * 0.05 / 10 ** 18 + 10 ** 18 * 0.05 / 10 ** 18 + 10 ** 18 * 0.05 / 10 ** 18 + 10 ** 18 * 0.05 / 10 ** 18 + ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "curvefi/curve-dao-contracts", + "expected": "balance", + "got": "balance", + "got_raw": "balance for account, balance in self.balances.items() if balance > 0)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "curvefi/curve-dao-contracts", + "expected": "bob", + "got": "bob", + "got_raw": "bob", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "curvefi/curve-dao-contracts", + "expected": "coin_a", + "got": "coin_a.address", + "got_raw": "coin_a.address", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.6 + }, + { + "repo": "curvefi/curve-dao-contracts", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "curvefi/curve-dao-contracts", + "expected": "balance", + "got": "balance", + "got_raw": "balance + expected * 1e18 / liquidity_gauge_reward.total_supply() ** 2 * MONTH ** 2 / WEEK ** 2 * 1e18 / 10 ** 18 * 1e18 / 10 ** 20 * 1e18 / 10 ** 20 * 1e18 / 10 ** 20 * 1e18 / 10 ** 20 * 1e18 / 10 ** 20 * 1e18 / 10 ** 20", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "curvefi/curve-dao-contracts", + "expected": "0", + "got": "0", + "got_raw": "0 if burner_balance else amount * 2 ** 256 - 1 if caller_balance else 0 if burner_balance else amount * 2 ** 256 - 1 if caller_balance else 0 if burner_balance else amount * 2 ** 256 - 1 if caller_balance else 0 if burner_balance else amount * 2 ** 256 - 1 if caller_balance else 0 if burner_balance else amount * 2 ** 256 - 1 if caller_balance else 0 if burner_balance else amount * 2 ** 256 - 1 if", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "d0c-s4vage/lookatme", + "expected": "3", + "got": "3", + "got_raw": "3", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "d0c-s4vage/lookatme", + "expected": "title", + "got": "title.strip()", + "got_raw": "title.strip() assert schema[\"author\"] == author.strip() assert schema[\"date\"] == datetime.date.fromisoformat(date.strip()) def test_meta_schema_error(): \"\"\"Test the meta schema error \"\"\" yaml_text = \"\"\" title: \"\"\" with pytest.raises(marshmallow.exceptions.ValidationError) as exc_info: schemas.MetaSchema().loads(yaml_text) assert exc_info.value.messages == {\"title\": [\"Missing data for required field.\"]} yaml_text = \"\"\" author: \"\"\" with pytest.raises(marshmallow.exceptions.ValidationError) as exc_info: schemas.MetaSchema().loads(yaml_text) assert exc_info.value.messages == {\"author\": [\"Missing data", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5555555555555556 + }, + { + "repo": "d0c-s4vage/lookatme", + "expected": "b\"link\"", + "got": "b\"link\"", + "got_raw": "b\"link\" + b\" (http://domain.tld)\" + b\" \" + b\"link\" + b\" (http://domain.tld)\" + b\" \" + b\"link\" + b\" (http://domain.tld)\" + b\" \" + b\"link\" + b\" (http://domain.tld)\" + b\" \" + b\"link\" + b\" (http://domain.tld)\" + b\" \" + b\"link\" + b\" (http://domain.tld)\" + b\" \" + b\"link\" + b\" (http://domain.tld)\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "d0c-s4vage/lookatme", + "expected": "AssertionError)", + "got": "marshmallow.exceptions.ValidationError)", + "got_raw": "marshmallow.exceptions.ValidationError) as exc_info: schema.load(gend_default) assert str(exc_info.value) == \"Invalid value for 'left'\" \"Expected int, received str instead.\"", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.4074074074074074 + }, + { + "repo": "d0c-s4vage/lookatme", + "expected": "res.output", + "got": "res.stdout)", + "got_raw": "res.stdout) def test_dump_styles_yaml(): \"\"\"Test that dump styles works correctly with YAML\"\"\" res = run_cmd(\"--dump-styles\", \"--format\", \"yaml\") assert res.exit_code == 0 assert res.stdout == yaml.dump( lookatme.schemas.StyleSchema( theme=light_theme, styles={ \"default\": { \"fg\": \"white\", \"bg\": \"black\", \"bold\": True, \"italic\": True, \"underline\": True, \"strikethrough\": True, \"reverse\": True, \"hidden\": True, \"strikethrough\": True, \"dim\": True, \"bold\":", + "exact_match": false, + "code_bleu": 0.47287080450158786, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "danielgtaylor/python-betterproto", + "expected": "new_again", + "got": "new_again", + "got_raw": "new_again", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "danielgtaylor/python-betterproto", + "expected": "RecursiveMessage()", + "got": "msg.child2", + "got_raw": "msg.child2 == msg.child3 == msg.child4 == msg.child5 == msg.child6 == msg.child7 == msg.child8 == msg.child9 == msg.child10 == msg.child11 == msg.child12 == msg.child13 == msg.child14 == msg.child15 == msg.child16 == msg.child17 == msg.child18 == msg.child19 == msg.child20 == msg.child21 == msg.child22 == msg.child23 == msg.child24 == msg.child25 == msg.child26 == msg.child27 == msg.child28 == msg", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.14285714285714285 + }, + { + "repo": "danielgtaylor/python-betterproto", + "expected": "\"List[str]\"", + "got": "\"List[str]\"", + "got_raw": "\"List[str]\" assert compiler.imports() == {\"typing\": {\"Optional\", \"List\"}} assert compiler.dict(\"str\", \"int\") == \"Dict[str, int]\" assert compiler.imports() == { \"typing\": {\"Optional\", \"List\", \"Dict\"} } assert compiler.set(\"str\") == \"Set[str]\" assert compiler.imports() == { \"typing\": {\"Optional\", \"List\", \"Dict\", \"Set\"} } assert compiler.tuple(\"str\", \"int\") == \"Tuple[str, int]\" assert compiler.imports() == { \"typing\": {\"Optional\", \"List\", \"Dict\", \"Set\",", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "danielgtaylor/python-betterproto", + "expected": "data", + "got": "data.keys()", + "got_raw": "data.keys() - {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} | {\"baz\"} |", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5333333333333333 + }, + { + "repo": "danielgtaylor/python-betterproto", + "expected": "\"FOUR\"", + "got": "\"FOUR\"", + "got_raw": "\"FOUR\" Test( choice=Choice.FIVE ).to_dict()[\"choice\"] == \"FIVE\" Test( choice=Choice.SIX ).to_dict()[\"choice\"] == \"SIX\" Test( choice=Choice.SEVEN ).to_dict()[\"choice\"] == \"SEVEN\" Test( choice=Choice.EIGHT ).to_dict()[\"choice\"] == \"EIGHT\" Test( choice=Choice.NINE ).to_dict()[\"choice\"] == \"NINE\" Test( choice=Choice.TEN ).to_dict()[\"choice\"] == \"TEN\" Test( choice=Choice.ELEVEN ).to_dict()[\"choice\"] == \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "danielgtaylor/python-betterproto", + "expected": "TypeError)", + "got": "ValueError)", + "got_raw": "ValueError) as exc_info: Test( field=\"invalid\" ) Test( field=\"invalid\" ) Test( field=\"invalid\" ) Test( field=\"invalid\" ) Test( field=\"invalid\" ) Test( field=\"invalid\" ) Test( field=\"invalid\" ) Test( field=\"invalid\" ) Test( field=\"invalid\" ) Test( field=\"invalid\" ) Test( field=\"invalid\" ) Test( field=\"invalid\" ) Test( field=\"invalid\" ) Test( field=\"invalid\" ) Test( field=\"invalid\" ) Test( field=\"invalid\" ) Test( field=\"invalid\" ) Test(", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "danielgtaylor/python-betterproto", + "expected": "value", + "got": "value", + "got_raw": "value # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "danielgtaylor/python-betterproto", + "expected": "multi_byte", + "got": "multi_byte[0]", + "got_raw": "multi_byte[0] >> 16 | multi_byte[0] >> 8 | multi_byte[0] >> 0 | 1 << 63 | 1 << 62 | 1 << 61 | 1 << 59 | 1 << 58 | 1 << 57 | 1 << 56 | 1 << 55 | 1 << 54 | 1 << 53 | 1 << 52 | 1 << 51 | 1 << 50 | 1 << 49 | 1", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.8695652173913043 + }, + { + "repo": "danielgtaylor/python-betterproto", + "expected": "expected_responses", + "got": "expected_responses()", + "got_raw": "expected_responses() + [Message(body=\"Done\")] + [Message(body=\"Done\")] + [Message(body=\"Done\")] + [Message(body=\"Done\")] + [Message(body=\"Done\")] + [Message(body=\"Done\")] + [Message(body=\"Done\")] + [Message(body=\"Done\")] + [Message(body=\"Done\")] + [Message(body=\"Done\")] + [Message(body=\"Done\")] + [Message(body=\"Done\")] + [Message(body=\"Done\")] + [Message(body=\"Done\")] + [Message(body=\"Done\")] + [Message(body=\"Done\")] + [Message(body=\"Done\")] + [Message(body=\"Done", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.9473684210526315 + }, + { + "repo": "danielgtaylor/python-betterproto", + "expected": "ref_obj", + "got": "ref_obj", + "got_raw": "ref_obj assert json.dumps(ref_obj.to_json()) == ref_json assert json.dumps(obj.to_json()) == obj_json def test_enum_json() -> None: \"\"\"Test that enum values are serialized and deserialized correctly.\"\"\" enum_obj = TestEnum.TEST_1 enum_json = json.dumps({\"enum\": \"TEST_1\"}) enum_obj_deserialized = TestEnum.from_json(enum_json) assert enum_obj == enum_obj_deserialized assert enum_json == json.dumps(enum_obj.to_json()) def test_nested_json() -> None: \"\"\"Test that nested objects are serialized and deserialized correctly.\"\"\" inner_obj = InnerTest(inner_field=\"inner\") obj = Test", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "danielgtaylor/python-betterproto", + "expected": "[name]", + "got": "[name]", + "got_raw": "[name] * 2 + [name] * 3 + [name] * 4 + [name] * 5 + [name] * 6 + [name] * 7 + [name] * 8 + [name] * 9 + [name] * 10 + [name] * 11 + [name] * 12 + [name] * 13 + [name] * 14 + [name] * 15 + [name] * 16 + [name] * 17 + [name] * 18 + [", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "danielgtaylor/python-betterproto", + "expected": "\"ZERO\"", + "got": "\"ZERO\"", + "got_raw": "\"ZERO\" in Test(choice=Choice.ZERO).to_dict()[\"choice\"] and \"ONE\" in Test(choice=Choice.ONE).to_dict()[\"choice\"] and \"TWO\" in Test(choice=Choice.TWO).to_dict()[\"choice\"] and \"THREE\" in Test(choice=Choice.THREE).to_dict()[\"choice\"] and \"FOUR\" in Test(choice=Choice.FOUR).to_dict()[\"choice\"] and \"FIVE\" in Test(choice=Choice.FIVE).to_dict()[\"choice\"] and \"SIX\" in Test(choice=Choice.SIX).to_dict()[\"choice\"] and \"SEVEN\" in Test", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "danielgtaylor/python-betterproto", + "expected": "deepcopied", + "got": "deepcopied", + "got_raw": "deepcopied\n assert msg is not deepcopied\n assert msg.baz is not deepcopied.baz\n\n\n@dataclass\nclass Complex:\n foo_str: str\n fe: Fe\n nested_data: NestedData\n mapping: Dict[str, google.Any]\n\n\n@dataclass\nclass Fe:\n abc: str\n\n\n@dataclass\nclass NestedData:\n struct_foo: Dict[str, google.Struct]\n map_str_any_bar: Dict[str, google.Any]\n\n\n@dataclass\nclass PickledMessage:\n bar: int\n baz: List[str]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "danielgtaylor/python-betterproto", + "expected": "deadline._timestamp)", + "got": "1.0)", + "got_raw": "1.0) * 1e9 + 1000000000.0 + 1000000000.0 + 1000000000.0 + 1000000000.0 + 1000000000.0 + 1000000000.0 + 1000000000.0 + 1000000000.0 + 10000", + "exact_match": false, + "code_bleu": 0.2686424829558855, + "edit_similarity": 0.16666666666666666 + }, + { + "repo": "danielgtaylor/python-betterproto", + "expected": "'\"_p__.Message\"'", + "got": "'\"_p__.Message\"'", + "got_raw": "'\"_p__.Message\"' # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "danielgtaylor/python-betterproto", + "expected": "[\"ZERO\"]", + "got": "[0]", + "got_raw": "[0] assert Test(choices=[Choice.ONE]).to_dict()[\"choices\"] == [1] assert Test(choices=[Choice.ZERO, Choice.ONE]).to_dict()[\"choices\"] == [0, 1] assert Test(choices=[Choice.ZERO, Choice.ONE, Choice.ZERO]).to_dict()[\"choices\"] == [0, 1, 0] assert Test(choices=[Choice.ZERO, Choice.ONE, Choice.ZERO, Choice.ONE]).to_dict()[\"choices\"] == [0, 1, 0, 1] assert Test(choices=[Choice.ZERO, Choice.ONE, Choice.ZERO, Choice.ONE, Choice.ZERO]).to_dict()[\"choices\"] ==", + "exact_match": false, + "code_bleu": 0.49999999999999994, + "edit_similarity": 0.36363636363636365 + }, + { + "repo": "danielgtaylor/python-betterproto", + "expected": "repr_value", + "got": "repr_value", + "got_raw": "repr_value\n\n\ndef test_repr_with_custom_repr() -> None:\n class CustomColour(betterproto.Message):\n RED = 1\n GREEN = 2\n BLUE = 3\n\n def __repr__(self) -> str:\n return \"CustomColour\"\n\n custom_colour = CustomColour()\n assert repr(custom_colour) == \"CustomColour\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dask-contrib/dask-sql", + "expected": "1 if contains else 0", + "got": "df.nsmallest(10", + "got_raw": "df.nsmallest(10, \"a\"))[[\"a\"]]) == pytest.approx(0.0)) == pytest.approx(1.0)) == pytest.approx(2.0)) == pytest.approx(3.0)) == pytest.approx(4.0)) == pytest.approx(5.0)) == pytest.approx(6.0)) == pytest.approx(7.0)) == pytest.approx(8.0)) == pytest.approx(9.0)) == pytest.approx(10.0)) == pytest.approx(11.0)) == pytest", + "exact_match": false, + "code_bleu": 0.2295748846661433, + "edit_similarity": 0.34285714285714286 + }, + { + "repo": "dask-contrib/dask-sql", + "expected": "sql_string", + "got": "sql_string.lower()", + "got_raw": "sql_string.lower()", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.7142857142857143 + }, + { + "repo": "dask-contrib/dask-sql", + "expected": "expect_filters", + "got": "expect_filters", + "got_raw": "expect_filters or pytest.approx(got_filters) == pytest.approx(expect_filters) or pytest.approx(got_filters) == pytest.approx(expect_filters) or pytest.approx(got_filters) == pytest.approx(expect_filters) or pytest.approx(got_filters) == pytest.approx(expect_filters) or pytest.approx(got_filters) == pytest.approx(expect_filters) or pytest.approx(got_filters) == pytest.approx(expect_filters) or pytest.approx(got_filters) == pytest.approx(expect_filters) or pytest.approx(got_filters) == pytest.approx(expect_filters) or pytest.approx(got", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dask-contrib/dask-sql", + "expected": "df[[\"id\"]])", + "got": "df[[\"id\"]])", + "got_raw": "df[[\"id\"]]) result = c.sql(q2) assert_eq(result, df[[\"val\"]]) result = c.sql(q3) assert_eq(result, df[[\"id\", \"val\"]])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dask-contrib/dask-sql", + "expected": "c.schema", + "got": "c.schema_names()", + "got_raw": "c.schema_names() - {\"default\"} - {\"test_schema\"} - {\"__dask_sql__\"} - {\"__dask_sql__\"} - {\"__dask_sql__\"} - {\"__dask_sql__\"} - {\"__dask_sql__\"} - {\"__dask_sql__\"} - {\"__dask_sql__\"} - {\"__dask_sql__\"} - {\"__dask_sql__\"} - {\"__dask_sql__\"} - {\"__dask_sql__\"} - {\"__dask_sql__\"} - {\"__dask_sql__\"} - {\"__dask_sql__\"} - {\"__", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "dask-contrib/dask-sql", + "expected": "c.sql(\"SELECT * FROM df\"))", + "got": "c.sql(\"SELECT * FROM foo.df\"))", + "got_raw": "c.sql(\"SELECT * FROM foo.df\"))", + "exact_match": false, + "code_bleu": 0.5946035575013605, + "edit_similarity": 0.9285714285714286 + }, + { + "repo": "dask-contrib/dask-sql", + "expected": "\"\"\" SELECT AVG(c) FROM df2 \"\"\")", + "got": "\"\"\" SELECT d", + "got_raw": "\"\"\" SELECT d, SUM(c), SUM(user_id) FROM df2 WHERE d IS NOT NULL -- dask behaves differently on NaNs in groupbys GROUP BY d ORDER BY SUM(c) LIMIT 10 \"\"\") def test_groupby_with_nulls(assert_query_gives_same_result): assert_query_gives_same_result( \"\"\" SELECT d, SUM(c), SUM(user_id) FROM df3 WHERE d IS NOT NULL -- dask behaves differently on NaNs in groupbys GROUP BY d ORDER BY SUM(c) LIMIT 10 \"\"\") def test_groupby_with_nulls2(assert_query_gives_same_result): assert_query", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.5581395348837209 + }, + { + "repo": "dask-contrib/dask-sql", + "expected": "0", + "got": "0.001", + "got_raw": "0.001 * len(result_df) - 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "dask-contrib/dask-sql", + "expected": "get_system_sample(ddf, 0.99999, 10))", + "got": "get_system_sample(ddf, 0.00001, 11))", + "got_raw": "get_system_sample(ddf, 0.00001, 11))", + "exact_match": false, + "code_bleu": 0.4671379777282001, + "edit_similarity": 0.8333333333333334 + }, + { + "repo": "dask-contrib/dask-sql", + "expected": "\"\"\" SELECT CASE WHEN user_id = 3 THEN 4 ELSE user_id END FROM df2 \"\"\")", + "got": "\"\"\" SELECT 1 AS I", + "got_raw": "\"\"\" SELECT 1 AS I, -5.34344 AS F, '\u00f6\u00e4ll' AS S \"\"\") def test_select_with_alias(assert_query_gives_same_result): assert_query_gives_same_result( \"\"\" SELECT user_id AS id, b AS b2 FROM df1 \"\"\") def test_select_with_order_by(assert_query_gives_same_result): assert_query_gives_same_result( \"\"\" SELECT user_id, b FROM df1 ORDER BY user_id, b DESC NULLS FIRST, 1234567890 NULLS FIRST, 1234567891 NULL", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.3218390804597701 + }, + { + "repo": "dask-contrib/dask-sql", + "expected": "AttributeError)", + "got": "ValueError)", + "got_raw": "ValueError) as e_info: c.execute(\"CREATE TABLE df (a int, b int)\") assert str(e_info.value) == \"Cannot create table df: Table df already exists\" c.execute(\"DROP TABLE df\") c.execute(\"CREATE TABLE df (a int, b int) USING parquet\") c.execute(\"DROP TABLE df\") c.execute(\"CREATE TABLE df (a int, b int) USING parquet\") c.execute(\"DROP TABLE df\") c.execute(\"CREATE TABLE df (a int, b int) USING parquet\") c.execute(\"DROP TABLE df\") c.execute(\"CREATE TABLE df (a int, b", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6153846153846154 + }, + { + "repo": "dask-contrib/dask-sql", + "expected": "\"string\"", + "got": "\"\"", + "got_raw": "\"\"\n\n\ndef test_numeric_operations():\n a = 1.0\n b = 2.0\n c = 3.0\n d = 4.0\n assert ops_mapping[\"add\"](a, b) == 3.0\n assert ops_mapping[\"sub\"](a, b) == -1.0\n assert ops_mapping[\"mul\"](a, b) == 2.0\n assert ops_mapping[\"div\"](a, b) == 0.5\n assert ops_mapping[\"mod\"](a, b) == 1.0\n assert ops_mapping", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4 + }, + { + "repo": "dask-contrib/dask-sql", + "expected": "200", + "got": "200", + "got_raw": "200 response.json() == {\"schemas\": [\"a_schema\"]} response = app_client.post( \"/v1/statement\", data=\"SELECT * from a_schema.a_table\", ) assert response.status_code == 200 response.json() == {\"a_table\": [1]} response = app_client.post( \"/v1/statement\", data=\"SELECT * from a_schema.a_table2\", ) assert response.status_code == 404 response.json() == {\"detail\": \"Table a_schema.a_table2 not found\"} response = app_client.post( \"/v1/statement\", data=\"SELECT * from a_schema.a_table", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dask-contrib/dask-sql", + "expected": "c.DEFAULT_SCHEMA_NAME", + "got": "\"main\"", + "got_raw": "\"main\" c.schema_name = \"example\" c.sql(\"DROP SCHEMA example\") c.schema_name = \"main\" c.sql(\"DROP SCHEMA IF EXISTS example\") c.schema_name = \"root\" c.sql(\"DROP SCHEMA IF EXISTS example\") c.schema_name = \"root\" c.sql(\"DROP SCHEMA example\") c.schema_name = \"root\" c.sql(\"DROP SCHEMA IF EXISTS example\") c.schema_name = \"root\" c.sql(\"DROP SCHEMA example\") c.schema_name = \"root\" c.sql(\"DROP SCHEMA IF EXISTS example\") c.schema_name = \"root\" c.sql(\"DROP SC", + "exact_match": false, + "code_bleu": 0.16666666666666666, + "edit_similarity": 0.0 + }, + { + "repo": "dask-contrib/dask-sql", + "expected": "\"\"\" SELECT * FROM df1 \"\"\")", + "got": "\"\"\" SELECT a", + "got_raw": "\"\"\" SELECT a, b, c FROM df1 ORDER BY a, b, c NULLS FIRST, d NULLS FIRST, e NULLS FIRST, f NULLS FIRST, g NULLS FIRST, h NULLS FIRST, i NULLS FIRST, j NULLS FIRST, k NULLS FIRST, l NULLS FIRST, m NULLS FIRST, n NULLS FIRST, o NULLS FIRST, p NULLS FIRST, q NULLS FIRST, r NULLS FIRST, s NULLS FIRST, t NULLS FIRST, u NULLS FIRST, v NULLS FIRST, w NULLS FIRST, x NULLS FIRST, y NULL", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.5789473684210527 + }, + { + "repo": "dask-contrib/dask-sql", + "expected": "RuntimeError)", + "got": "ValueError)", + "got_raw": "ValueError) as e: c.sql('SHOW COLUMNS FROM \"wrong\"') assert str(e.value) == 'wrong' == c.schema_name + '.table' c.sql('SHOW COLUMNS FROM \"wrong\".\"table\"') assert_eq( c.schema_to_table[c.schema_name] ) ) c.sql('SHOW COLUMNS FROM \"wrong\".\"table\".\"column\"') assert_eq( c.schema_to_table[c.schema_name] ) ) c.sql('SHOW COLUMNS FROM \"wrong\".\"table\".\"column\".\"column\"') assert_eq( c.schema_to_table[c.schema_name] ) ) c.sql('SHOW COLUMNS FROM \"wrong\".\"", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "dask-contrib/dask-sql", + "expected": "False", + "got": "None", + "got_raw": "None # type: ignore assert captured.out == \"42\\n\" assert captured.err == \"\" res = _meta_commands(\"Select 42 as answer\", context=c, client=client) captured = capsys.readouterr() assert res is None # type: ignore assert captured.out == \"42\\n\" assert captured.err == \"\" res = _meta_commands(\"Select 42 as answer\", context=c, client=client) captured = capsys.readouterr() assert res is None # type: ignore assert captured.out == \"42\\n\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "dask-contrib/dask-sql", + "expected": "second_mock", + "got": "second_mock", + "got_raw": "second_mock c.sql(\"DROP MODEL my_model\") c.sql(\"DROP MODEL IF EXISTS my_model\") c.sql(\"DROP MODEL IF EXISTS my_model\") c.sql(\"DROP MODEL IF EXISTS my_model\") c.sql(\"DROP MODEL IF EXISTS my_model\") c.sql(\"DROP MODEL IF EXISTS my_model\") c.sql(\"DROP MODEL IF EXISTS my_model\") c.sql(\"DROP MODEL IF EXISTS my_model\") c.sql(\"DROP MODEL IF EXISTS my_model\") c.sql(\"DROP MODEL IF EXISTS my_model\") c.sql(\"DROP MODEL IF EXISTS my_model\") c.sql(\"DROP MODEL IF EXISTS my_model\") c.sql(\"DROP MODEL IF EXISTS my", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dask-contrib/dask-sql", + "expected": "\"\"\" SELECT df2.user_id, df2.d FROM df2 \"\"\")", + "got": "\"\"\" SELECT df1.user_id + 5, 2 * df1.a + df1.b / df1.user_id - df1.b, df1.a IS NULL, df1.a IS NOT NULL, df1.b_bool IS TRUE, df1.b_bool IS NOT TRUE, df1.b_bool IS FALSE, df1.b_bool IS NOT FALSE, df1.b_bool IS UNKNOWN, df1.b_bool IS NOT UNKNOWN, ABS(df1.a), ACOS(df1.a), ASIN(df1.a), ATAN(df1.a), ATAN2(df1.a, df1.b), CBRT(df1.a),", + "got_raw": "\"\"\" SELECT df1.user_id + 5, 2 * df1.a + df1.b / df1.user_id - df1.b, df1.a IS NULL, df1.a IS NOT NULL, df1.b_bool IS TRUE, df1.b_bool IS NOT TRUE, df1.b_bool IS FALSE, df1.b_bool IS NOT FALSE, df1.b_bool IS UNKNOWN, df1.b_bool IS NOT UNKNOWN, ABS(df1.a), ACOS(df1.a), ASIN(df1.a), ATAN(df1.a), ATAN2(df1.a, df1.b), CBRT(df1.a),", + "exact_match": false, + "code_bleu": 0.010571301880937002, + "edit_similarity": 0.17297297297297298 + }, + { + "repo": "dask-contrib/dask-sql", + "expected": "result)", + "got": "result)", + "got_raw": "result)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datapizza-labs/datapizza-ai", + "expected": "\"test-key\"", + "got": "\"test-key\"", + "got_raw": "\"test-key\" assert embedder.embeddings_model == \"textembedding-gecko\" assert embedder.embeddings_endpoint == \"https://textembedding-gecko.openai.azure.com/openai/deployments/textembedding-gecko/embeddings\" assert embedder.embeddings_max_length == 8192 assert embedder.embeddings_chunk_size == 2048 assert embedder.embeddings_chunk_overlap == 0 assert embedder.embeddings_batch_size == 16 assert embedder.embeddings_temperature == 0.0 assert embedder.embeddings_top_k == 40 assert embedder.embeddings_top_p == ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datapizza-labs/datapizza-ai", + "expected": "{\"start\": \"A\", \"C\": \"C\"}", + "got": "{\"start\": \"B\", \"C\": \"C\"}", + "got_raw": "{\"start\": \"B\", \"C\": \"C\"}", + "exact_match": false, + "code_bleu": 0.6580370064762462, + "edit_similarity": 0.9583333333333334 + }, + { + "repo": "datapizza-labs/datapizza-ai", + "expected": "\"test\"", + "got": "\"test\"", + "got_raw": "\"test\" assert agent.client == MockClient() assert agent.system_prompt == \"You are a test agent\" assert agent.planning_prompt == \"test planning prompt\" assert agent.tools == [] assert agent.executor is None assert agent._thread_pool is None assert agent._thread_pool_executor is None assert agent._thread_pool_size == 1000 assert agent._thread_pool_max_workers == 1000 assert agent._thread_pool_queue_size == 0 assert agent._thread_pool_queue_max_size == 1000 assert agent._thread_pool_queue_wait_time == 0.1 assert agent._thread_pool_queue_wait_count", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datapizza-labs/datapizza-ai", + "expected": "\"COSINE\"", + "got": "\"cosine\"", + "got_raw": "\"cosine\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.25 + }, + { + "repo": "datapizza-labs/datapizza-ai", + "expected": "\"alpha\"", + "got": "\"alpha\"", + "got_raw": "\"alpha\" assert got.embeddings[0].name == \"sparse_vec\" assert got.embeddings[0].indices == [1, 5, 9] assert got.embeddings[0].values == [0.5, 0.2, 0.1] assert got.metadata is None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datapizza-labs/datapizza-ai", + "expected": "1", + "got": "1", + "got_raw": "1 # One warning expected for the deprecated argument.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datapizza-labs/datapizza-ai", + "expected": "\"Hello, world!\"", + "got": "\"Hello, world!\" \\n\\n\" This is a test.\" \\n\" this is a sentence.\" \\n\" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n", + "got_raw": "\"Hello, world!\" \\n\\n\" This is a test.\" \\n\" this is a sentence.\" \\n\" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n\" \" \" \\n", + "exact_match": false, + "code_bleu": 0.018730574860488187, + "edit_similarity": 0.1214574898785425 + }, + { + "repo": "datapizza-labs/datapizza-ai", + "expected": "Memory()", + "got": "[]", + "got_raw": "[]", + "exact_match": false, + "code_bleu": 0.30120066786994826, + "edit_similarity": 0.0 + }, + { + "repo": "datapizza-labs/datapizza-ai", + "expected": "18", + "got": "9", + "got_raw": "9 * 3 + 9 * 2 + 9 * 1 + 9 * 0 + 9 * -1 + 9 * -2 + 9 * -3 + 9 * -4 + 9 * -5 + 9 * -6 + 9 * -7 + 9 * -8 + 9 * -9 + 9 * -10 + 9 * -11 + 9 * -12 + 9 * -13 + 9 * -14 + 9 * -15 + 9 * -16 + 9", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "datapizza-labs/datapizza-ai", + "expected": "expected", + "got": "expected", + "got_raw": "expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datapizza-labs/datapizza-ai", + "expected": "\"model\"", + "got": "\"system\"", + "got_raw": "\"system\" assert messages[0][\"content\"][\"text\"] == system_prompt assert messages[1][\"role\"] == \"user\" assert messages[1][\"content\"][\"text\"] == \"Hello!\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4 + }, + { + "repo": "datapizza-labs/datapizza-ai", + "expected": "\"test_value\"", + "got": "\"test_value\"", + "got_raw": "\"test_value\" def test_parse_with_empty_metadata(mock_docling_parser, tmp_path): \"\"\"Test that parse() correctly handles empty user-provided metadata.\"\"\" dummy_file = tmp_path / \"test.pdf\" dummy_file.write_text(\"fake-pdf-content\") node = mock_docling_parser.parse(file_path=str(dummy_file)) assert node.metadata == {} def test_parse_with_invalid_metadata(mock_docling_parser, tmp_path): \"\"\"Test that parse() raises an error for invalid metadata.\"\"\" dummy_file = tmp_path / \"test.pdf\" dummy_file.write_text(\"fake-pdf-content\") with pytest.raises(ValueError) as exc_info: mock_docling_parser.parse(file", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datapizza-labs/datapizza-ai", + "expected": "1", + "got": "2", + "got_raw": "2 # 2 sections in the document assert root.children[0].metadata[\"level\"] == 1 # Section 1 assert root.children[0].metadata[\"title\"] == \"Section 1\" assert root.children[0].children[0].metadata[\"level\"] == 2 # Subsection 1.1 assert root.children[0].children[0].metadata[\"title\"] == \"Subsection 1.1\" assert root.children[1].metadata[\"level\"] == 1 # Section 2 assert root.children[1].metadata[\"title\"] == \"Section 2\" assert root.children", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "datapizza-labs/datapizza-ai", + "expected": "\"test-key\"", + "got": "\"test-key\"", + "got_raw": "\"test-key\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datapizza-labs/datapizza-ai", + "expected": "\"Hello, world!\"", + "got": "\"Hello, world!\"", + "got_raw": "\"Hello, world!\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datapizza-labs/datapizza-ai", + "expected": "\"user\"", + "got": "\"user\"", + "got_raw": "\"user\" assert messages[1][\"parts\"] == \"Hello!\" assert messages[2][\"role\"] == \"assistant\" assert messages[2][\"parts\"] == \"You are a helpful assistant.\" assert messages[3][\"role\"] == \"user\" assert messages[3][\"parts\"] == \"Hello!\" assert messages[4][\"role\"] == \"assistant\" assert messages[4][\"parts\"] == \"You are a helpful assistant.\" assert messages[5][\"role\"] == \"user\" assert messages[5][\"parts\"] == \"Hello!\" assert messages[6][\"role\"] == \"assistant\" assert messages[6][\"parts\"] ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datapizza-labs/datapizza-ai", + "expected": "\"test_tool\"", + "got": "\"test_tool\"", + "got_raw": "\"test_tool\" assert tools[0].description == \"A test tool\" assert tools[0].inputSchema == { \"properties\": {\"arg1\": {\"type\": \"string\"}}, \"required\": [\"arg1\"], }", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datapizza-labs/datapizza-ai", + "expected": "[TextBlock(content=\"Mock response\")]", + "got": "\"Mock response\"", + "got_raw": "\"Mock response\" # noqa: E501", + "exact_match": false, + "code_bleu": 0.07432544468767006, + "edit_similarity": 0.5882352941176471 + }, + { + "repo": "datapizza-labs/datapizza-ai", + "expected": "\"test_elements\"", + "got": "\"test_collection\"", + "got_raw": "\"test_collection\" + \"_with_elements\" + \"_1\" + \"_2\" + \"_3\" + \"_4\" + \"_5\" + \"_6\" + \"_7\" + \"_8\" + \"_9\" + \"_10\" + \"_11\" + \"_12\" + \"_13\" + \"_14\" + \"_15\" + \"_16\" + \"_17\" + \"_18\" + \"_19\" + \"_20\" + \"_21\" + \"_22\" + \"_23\" + \"_24\" + \"_25\" + \"_2", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.625 + }, + { + "repo": "datapizza-labs/datapizza-ai", + "expected": "None", + "got": "None", + "got_raw": "None # The client is not initialized yet. def test_google_embedder_init_with_client(): embedder = GoogleEmbedder(api_key=\"test-key\", client=\"test-client\") assert embedder.client == \"test-client\" def test_google_embedder_init_with_invalid_api_key(): with pytest.raises(ValueError) as e: GoogleEmbedder(api_key=\"invalid-key\") assert str(e.value) == \"Invalid API key\" def test_google_embedder_init_with_invalid_client(): with pytest.raises(TypeError) as e: GoogleEmbedder(api_key=\"test-key\", client=123) assert str(e", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datarobot/syftr", + "expected": "api.SyftrStudyStatus.STOPPED", + "got": "api.SyftrStudyStatus.STOPPED", + "got_raw": "api.SyftrStudyStatus.STOPPED", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datarobot/syftr", + "expected": "0", + "got": "0.001", + "got_raw": "0.001 # 1000 cents is 1 dollar, so we expect the cost to be more than 1000 cents.", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "datarobot/syftr", + "expected": "df.columns", + "got": "df.columns.to_list()", + "got_raw": "df.columns.to_list() # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "datarobot/syftr", + "expected": "3", + "got": "3", + "got_raw": "3 # 3 configs in total\n\n # test through the API\n dataset = FinanceBenchHF(dataset_name)\n assert len(dataset) == 100000 # 100k examples in total\n assert len(dataset[\"qapairs\"]) == 50000 # 50k examples in qapairs\n assert len(dataset[\"groundingdata\"]) == 50000 # 50k examples in groundingdata\n assert len(dataset[\"qapairs_synthetic\"]) == 50000 # 5", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datarobot/syftr", + "expected": "None", + "got": "None", + "got_raw": "None and response != \"\" and duration > 0.0 and call_data is not None and len(call_data) > 0 and call_data[0][\"event_type\"] == CBEventType.ASSEMBLE_RESPONSE.value and call_data[0][\"data\"][\"response\"] == response and call_data[0][\"data\"][\"duration\"] == duration and call_data[0][\"data\"][\"question\"] == question and call_data[0][\"data\"][\"source\"] == \"llama_debug\" and call_data[0][\"data\"][\"source_id\"] == llama_debug.id_ and call_data[0][\"data\"][\"source_name\"] == llama_debug.name_", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datarobot/syftr", + "expected": "None", + "got": "None", + "got_raw": "None, \"VectorStoreIndex is None\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datarobot/syftr", + "expected": "pareto_df.columns", + "got": "pareto_df.columns.to_list()", + "got_raw": "pareto_df.columns.to_list() # noqa: E128 [pep8] [pep8] [pep8] [pep8] [pep8] [pep8] [pep8] [pep8] [pep8] [pep8] [pep8] [pep8] [pep8] [pep8] [pep8] [pep8] [pep8] [pep8] [pep8] [pep8] [pep8] [pep8] [pep", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.7727272727272727 + }, + { + "repo": "datarobot/syftr", + "expected": "2", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "datmo/datmo", + "expected": "ref_id_2", + "got": "ref_id_2", + "got_raw": "ref_id_2 and result is True and os.path.isfile(random_filepath) and \"test\" in open(random_filepath, \"r\").read() and os.path.isfile(test_filepath) and \"test1\" in open(test_filepath, \"r\").read() and os.path.isfile(os.path.join(self.git_code_manager.filepath, \".datmo\")) and not os.path.isfile(os.path.join(self.git_code_manager.filepath, \".datmo\", \".test\")) and os.path.isfile(os.path.join(self.git_code_manager.filepath, \".datmo\", \"test.txt\")) and \"test2\" in open(os.path.join(self.git_code_manager.file", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datmo/datmo", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" + self.random_text + os.linesep + \"Container stopped\" + os.linesep + \"Container exited with code 0\" + os.linesep + \"Container removed\" + os.linesep + \"Container removed\" + os.linesep + \"Container removed\" + os.linesep + \"Container removed\" + os.linesep + \"Container removed\" + os.linesep + \"Container removed\" + os.linesep + \"Container removed\" + os.linesep + \"Container removed\" + os.linesep + \"Container removed\" + os.linesep + \"Container removed\" + os.linesep + \"Container removed\" + os", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datmo/datmo", + "expected": "v", + "got": "v", + "got_raw": "v\n\n def test_init_with_id(self):\n snapshot_entity = Snapshot(self.input_dict, id=1)\n\n assert snapshot_entity.id == 1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datmo/datmo", + "expected": "result", + "got": "result.split(\"\\n\")[-1]", + "got_raw": "result.split(\"\\n\")[-1] \\ or result.split(\"\\n\")[-2] \\ or result.split(\"\\n\")[-3] \\ or result.split(\"\\n\")[-4] \\ or result.split(\"\\n\")[-5] \\ or result.split(\"\\n\")[-6] \\ or result.split(\"\\n\")[-7] \\ or result.split(\"\\n\")[-8] \\ or result.split(\"\\n\")[-9] \\ or result.split(\"\\n\")[-10] \\ or result.split(\"\\n\")[-11] \\ or result.split(\"\\n\")[-12] \\ or result.split(\"\\n\")", + "exact_match": false, + "code_bleu": 0.12605968092174913, + "edit_similarity": 0.42857142857142855 + }, + { + "repo": "datmo/datmo", + "expected": "tags", + "got": "tags[0]", + "got_raw": "tags[0] + os.linesep + tags[1] + os.linesep + tags[2] + os.linesep + tags[3] + os.linesep + tags[4] + os.linesep + tags[5] + os.linesep + tags[6] + os.linesep + tags[7] + os.linesep + tags[8] + os.linesep + tags[9] + os.linesep + tags[10] + os.linesep + tags[11] + os.linesep + tags[12] + os.linesep + tags[13] + os.lines", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.7272727272727273 + }, + { + "repo": "datmo/datmo", + "expected": "self.base_controller.home", + "got": "self.temp_dir", + "got_raw": "self.temp_dir + \"/datmo\" + os.sep + \"code\" + os.sep + \"default\" + os.sep + \"code\" + os.sep + \"file\" + os.sep + \"default\" + os.sep + \"code\" + os.sep + \"default\" + os.sep + \"code\" + os.sep + \"default\" + os.sep + \"code\" + os.sep + \"default\" + os.sep + \"code\" + os.sep + \"default\" + os.sep + \"code\" + os.sep + \"default\" + os.sep + \"code\" + os.sep + \"default\" +", + "exact_match": false, + "code_bleu": 0.3567621345008163, + "edit_similarity": 0.42105263157894735 + }, + { + "repo": "datmo/datmo", + "expected": "set(ids)", + "got": "set(ids)", + "got_raw": "set(ids)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datmo/datmo", + "expected": "model2.id", + "got": "model2.id", + "got_raw": "model2.id and model.name == model2.name and model.description == model2.description and model.created_by == model2.created_by and model.created_at == model2.created_at and model.updated_at == model2.updated_at and model.status == model2.status and model.type == model2.type and model.tags == model2.tags and model.code == model2.code and model.code_driver == model2.code_driver and model.code_driver_id == model2.code_driver_id and model.code_driver_config == model2.code_driver_config and model.code_driver_config_id == model2.code_driver_config_id and model.code_driver_config_path == model2.code_driver_config", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datmo/datmo", + "expected": "self.user_input_dict['name']", + "got": "self.user_input_dict[\"name\"]", + "got_raw": "self.user_input_dict[\"name\"] assert user.email == self.user_input_dict[\"email\"] assert user.created_at is not None assert user.updated_at is not None assert user.created_at < user.updated_at assert user.id is not None assert user.id > 0 assert user.id == user.id assert user.id == user.id assert user.id == user.id assert user.id == user.id assert user.id == user.id assert user.id == user.id assert user.id == user.id assert user.id == user.id assert user.id == user.id assert user.id == user.id assert user.id == user.id assert user.id == user.id assert user.id ==", + "exact_match": false, + "code_bleu": 0.6434588841607617, + "edit_similarity": 0.9285714285714286 + }, + { + "repo": "datmo/datmo", + "expected": "None", + "got": "None", + "got_raw": "None\n\n def test_create(self):\n # create a file\n file_path = os.path.join(self.temp_dir, \"test.txt\")\n with open(file_path, \"w\") as f:\n f.write(\"test\")\n # create a directory\n dir_path = os.path.join(self.temp_dir, \"test_dir\")\n os.mkdir(dir_path)\n # create a file in the directory\n file_path = os.path.join(dir_path, \"test.txt\")\n with open(file_path, \"w\") as f:\n f.write(\"test\")\n # create a directory in the directory\n ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datmo/datmo", + "expected": "f2", + "got": "f2", + "got_raw": "f2 # Test 2: Logger with custom log level and file creation\n custom_level = 20 # Custom log level (e.g., 20 for DEBUG)\n custom_logger = DatmoLogger.get_logger(\"custom_logger\", level=custom_level)\n custom_msg = f\"custom_test_{uuid.uuid4()}\"\n custom_logger.debug(custom_msg) # Should not be logged by default\n custom_logger.info(custom_msg) # Should be logged with custom level\n\n # Test 3: Logger with custom log format and file creation\n custom_format = \"%(asctime)s -", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datmo/datmo", + "expected": "default_name", + "got": "default_name.split(\"-\")[0]", + "got_raw": "default_name.split(\"-\")[0] assert result.description is None assert result.environment is None\n\n def test_init_create_success_default_name_with_description_no_environment(\n self):\n self.project_command.parse([\"init\", \"--description\", \"test\"])\n\n # Test when environment is created\n @self.project_command.cli_helper.input(\"\\n\\ny\\n\\n\\n\\n\")\n def dummy(self):\n return self.project_command.execute()\n\n result = dummy(self)\n\n # Ensure that the name and description are current\n _, default_name = os.path.split(\n self.project_command.project_controller.home)\n assert", + "exact_match": false, + "code_bleu": 0.14113991930789777, + "edit_similarity": 0.631578947368421 + }, + { + "repo": "datmo/datmo", + "expected": "result.duration", + "got": "result.duration", + "got_raw": "result.duration\n\n def test_get_by_id_invalid(self):\n with InvalidArgumentType, EntityNotFound as e:\n self.dal.task.get_by_id(1)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datmo/datmo", + "expected": "code_obj", + "got": "code_obj_2.id", + "got_raw": "code_obj_2.id == code_obj.id == code_obj_2.id == code_obj.id == code_obj_2.id == code_obj.id == code_obj_2.id == code_obj.id == code_obj_2.id == code_obj.id == code_obj_2.id == code_obj.id == code_obj_2.id == code_obj.id == code_obj_2.id == code_obj.id == code_obj_2.id == code_obj.id == code_obj_2.id == code_obj.id == code_obj_2.id == code_obj.id == code_obj_2.id == code_obj.id == code_obj_2.id == code_obj", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.7619047619047619 + }, + { + "repo": "datmo/datmo", + "expected": "set(ids)", + "got": "set(ids)", + "got_raw": "set(ids)\n\n def test_create(self):\n self.__setup()\n task_obj = self.task_controller.create()\n assert task_obj.id is not None and task_obj.name is not None and \\\n task_obj.description is not None and task_obj.created_at is not None and \\\n task_obj.updated_at is not None and task_obj.status is not None and \\\n task_obj.owner is not None and task_obj.project_id is not None and \\\n task_obj.parent_id is None and task_obj.parent_run_id is None and \\\n task_obj.parent_task_id is None and task_obj.parent_task_run_id is None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datmo/datmo", + "expected": "v", + "got": "v", + "got_raw": "v\n\n def test_init_with_id(self):\n file_collection_entity = FileCollection(1, self.input_dict)\n\n for k, v in self.input_dict.items():\n\n assert getattr(file_collection_entity, k) == v\n\n def test_init_from_dict(self):\n file_collection_entity = FileCollection.from_dict(self.input_dict)\n\n for k, v in self.input_dict.items():\n\n assert getattr(file_collection_entity, k) == v\n\n def test_init_from_entity(self):\n file_collection_entity = FileCollection(1, self.input_dict)\n file_collection_entity2 = FileCollection.from_entity", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datmo/datmo", + "expected": "test_ports", + "got": "test_ports[1:]", + "got_raw": "test_ports[1:] + [test_ports[0]] + [test_ports[1]] + [test_ports[0]] + [test_ports[1]] + [test_ports[0]] + [test_ports[1]] + [test_ports[0]] + [test_ports[1]] + [test_ports[0]] + [test_ports[1]] + [test_ports[0]] + [test_ports[1]] + [test_ports[0]] + [test_ports[1]] + [test_ports[0]] + [test_ports[1]] + [test_ports[0]] + [test_ports", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.8333333333333334 + }, + { + "repo": "datmo/datmo", + "expected": "\"a\"", + "got": "\"a\"", + "got_raw": "\"a\" snapshot_entity = self.__setup() result = snapshot_entity.get_files(mode=\"r\") assert len(result) == 0 snapshot_entity = self.__setup() result = snapshot_entity.get_files(mode=\"w\") assert len(result) == 0 snapshot_entity = self.__setup() result = snapshot_entity.get_files(mode=\"x\") assert len(result) == 0 snapshot_entity = self.__setup() result = snapshot_entity.get_files(mode=\"b\") assert len(result) == 0 snapshot_entity = self.__setup() result = snapshot_entity.get_files(mode=\"t\") assert len(result) == 0 snapshot_entity = self.__setup", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datmo/datmo", + "expected": "set(ids)", + "got": "set(ids)", + "got_raw": "set(ids)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "datmo/datmo", + "expected": "3", + "got": "0", + "got_raw": "0", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "david-lev/pywa", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as e: FlowResponse( # closing flow with data make screen `SUCCESS` FlowResponse( version=Version.FLOW_MSG.value, data={\"test\": \"test\"}, close_flow=True, flow_token=\"test\", screen=\"test\", ) ) assert str(e.value) == \"Cannot close a flow with data\" def test_flow_response_with_data(): assert FlowResponse( version=Version.FLOW_MSG.value, data={\"test\": \"test\"}, close_flow=False, flow_token=\"test\", screen=\"test\", ) .to_dict()[\"data\"] == {\"test\": \"test\"} def test_flow_response_with_screen(): assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "david-lev/pywa", + "expected": "\"value\"", + "got": "\"value\"", + "got_raw": "\"value\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "david-lev/pywa", + "expected": "ValueError, match=\"Expected 2 cards in Carousel parameters, but got 1.\")", + "got": "ValueError, match=\"Missing parameters for: BodyText$\") as exc_info: t.validate_params( params=[ BodyText.params(\"Hello {{name}}\", name=\"User\"), ] ) assert exc_info.value.params[0].name == \"User\" assert exc_info.value.params[0].type == BodyText.type_() assert exc_info.value.params[0].required is True assert exc_info.value.params[0].default is None assert exc_info.value.params[0].description == \"Hello {{name}}\" assert exc_info.value.params[0].example == \"Hello World!\" assert exc_info.value.params[0].options is None", + "got_raw": "ValueError, match=\"Missing parameters for: BodyText$\") as exc_info: t.validate_params( params=[ BodyText.params(\"Hello {{name}}\", name=\"User\"), ] ) assert exc_info.value.params[0].name == \"User\" assert exc_info.value.params[0].type == BodyText.type_() assert exc_info.value.params[0].required is True assert exc_info.value.params[0].default is None assert exc_info.value.params[0].description == \"Hello {{name}}\" assert exc_info.value.params[0].example == \"Hello World!\" assert exc_info.value.params[0].options is None", + "exact_match": false, + "code_bleu": 0.027170469094508112, + "edit_similarity": 0.1288135593220339 + }, + { + "repo": "david-lev/pywa", + "expected": "{\"type\": \"string\"}", + "got": "str", + "got_raw": "str # type: ignore # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa:", + "exact_match": false, + "code_bleu": 0.1, + "edit_similarity": 0.2857142857142857 + }, + { + "repo": "david-lev/pywa", + "expected": "class_with_parentheses_args", + "got": "class_with_parentheses_args.__name__", + "got_raw": "class_with_parentheses_args.__name__ == \"class_with_parentheses_args\"", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.8571428571428571 + }, + { + "repo": "david-lev/pywa", + "expected": "data.get(\"href\")", + "got": "data.get(\"href\")", + "got_raw": "data.get(\"href\") or \"\" # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "david-lev/pywa", + "expected": "h", + "got": "h._handler[0]", + "got_raw": "h._handler[0] wa._handlers[handlers.MessageHandler][1] is h._handler[1] wa._handlers[handlers.MessageHandler][2] is h._handler[2] wa._handlers[handlers.MessageHandler][3] is h._handler[3] wa._handlers[handlers.MessageHandler][4] is h._handler[4] wa._handlers[handlers.MessageHandler][5] is h._handler[5] wa._handlers[handlers.MessageHandler][6] is h._handler[6] wa._handlers[handlers.MessageHandler][7] is h._handler[7] wa._handlers", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.14285714285714285 + }, + { + "repo": "david-lev/pywa", + "expected": "\"abc\"", + "got": "\"abc\"", + "got_raw": "\"abc\" client.token = TOKEN client.token = \"xyz\" client.token = \"abc\" client.token = \"xyz\" client.token = \"abc\" client.token = \"xyz\" client.token = \"abc\" client.token = \"xyz\" client.token = \"abc\" client.token = \"xyz\" client.token = \"abc\" client.token = \"xyz\" client.token = \"abc\" client.token = \"xyz\" client.token = \"abc\" client.token = \"xyz\" client.token = \"abc\" client.token = \"xyz\" client.token = \"abc\" client.token = \"xyz\" client.token = \"abc\" client", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "david-lev/pywa", + "expected": "\"manual\"", + "got": "\"manual\"", + "got_raw": "\"manual\"\n\n\ndef test_listener_canceled_sync(wa_sync: WhatsAppSync):\n identifier = DummyUpdate().listener_identifier\n\n def cancel_listener():\n time.sleep(0.1)\n wa_sync.cancel_listening(to=identifier)\n\n threading.Thread(target=cancel_listener).start()\n with pytest.raises(ListenerCanceled) as exc_info:\n wa_sync.listen(\n to=identifier, filters=filters.true, cancelers=filters.false, timeout=0.3\n )\n\n assert exc_info.value.reason == \"canceled\"\n\n\ndef test_listener_timeout_sync(wa_sync", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "david-lev/pywa", + "expected": "TypeError)", + "got": "ValueError)", + "got_raw": "ValueError) as exc_info: CallbackData() # type: ignore # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 ", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "dbos-inc/dbos-transact-py", + "expected": "\"dbos-toolbox\"", + "got": "\"dbos-toolbox\"", + "got_raw": "\"dbos-toolbox\" # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dbos-inc/dbos-transact-py", + "expected": "wfid", + "got": "wfid", + "got_raw": "wfid + \"-\" + str(42) + \"-\" + \"test\" + \"-\" + str(uuid.uuid4())[:8] + \"-\" + str(uuid.uuid4())[:8] + \"-\" + str(uuid.uuid4())[:8] + \"-\" + str(uuid.uuid4())[:8] + \"-\" + str(uuid.uuid4())[:8] + \"-\" + str(uuid.uuid4())[:8] + \"-\" + str(uuid.uuid4())[:8] + \"-\" + str(uuid.uuid4())[:8] + \"-\" + str(uuid.uuid4())[:8] + \"-\" + str(uuid.uuid4())[:8] + \"-\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dbos-inc/dbos-transact-py", + "expected": "\"1\"", + "got": "\"test\"", + "got_raw": "\"test\" + os.sep + \"test\" + os.sep + \"test\" + os.sep + \"test\" + os.sep + \"test\" + os.sep + \"test\" + os.sep + \"test\" + os.sep + \"test\" + os.sep + \"test\" + os.sep + \"test\" + os.sep + \"test\" + os.sep + \"test\" + os.sep + \"test\" + os.sep + \"test\" + os.sep + \"test\" + os.sep + \"test\" + os.sep + \"test\" + os.sep + \"test\" + os.sep + \"test", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4444444444444444 + }, + { + "repo": "dbos-inc/dbos-transact-py", + "expected": "\"None!\"", + "got": "\"Trouble?\"", + "got_raw": "\"Trouble?\" # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa:", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.47058823529411764 + }, + { + "repo": "dbos-inc/dbos-transact-py", + "expected": "\"value\"", + "got": "\"value\"", + "got_raw": "\"value\" # pyright: ignore # noqa: E501 # type: ignore # noqa: E500 # type: ignore # noqa: E500 # type: ignore # noqa: E500 # type: ignore # noqa: E500 # type: ignore # noqa: E500 # type: ignore # noqa: E500 # type: ignore # noqa: E500 # type: ignore # noqa: E500 # type: ignore # noqa", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dbos-inc/dbos-transact-py", + "expected": "27", + "got": "27.00000000000000142108548080718948822320556640625000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "27.00000000000000142108548080718948822320556640625000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.03076923076923077 + }, + { + "repo": "dbos-inc/dbos-transact-py", + "expected": "0", + "got": "0", + "got_raw": "0\n\n # Test for roles set into span\n # Get the spans that were recorded\n spans = exporter.get_finished_spans()\n\n # Assert that we have two spans\n # One is the handler span\n # The other is the WF span\n assert len(spans) == 2\n assert spans[0].context is not None\n assert spans[1].context is not None\n\n span = spans[1]\n assert span.name == \"/engineer/b\"\n assert span.attributes is not None\n\n span = spans[0]\n assert span.name == test_engine", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dbos-inc/dbos-transact-py", + "expected": "1", + "got": "1", + "got_raw": "1 and wfs[0].workflow_id == phase1_wfid and wfs[0].name == \"ser_restart_workflow\" and wfs[0].status == \"running\" and wfs[0].start_time is not None and wfs[0].end_time is None and wfs[0].duration is None and wfs[0].error is None and wfs[0].result is None and wfs[0].events is None and wfs[0].steps is None and wfs[0].custom_data is None and wfs[0].custom_data_json is None and wfs", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dbos-inc/dbos-transact-py", + "expected": "2)", + "got": "3)", + "got_raw": "3) self.assertEqual(n1.year, 1996) self.assertEqual(n1.hour, 0) self.assertEqual(n1.minute, 0) self.assertEqual(n1.second, 0) itr = croniter(\"0 0 * * 2\", base) n1 = itr.get_next(datetime) self.assertEqual(n1.day, 2) self.assertEqual(n1.month, 2) self.assertEqual(n1.year, 1996) self.assertEqual(n1.hour, 0) self.assertEqual(n1.minute, 0) self.assertEqual(n1.second, 0) itr = croniter(\"0 ", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "dbos-inc/dbos-transact-py", + "expected": "4", + "got": "3", + "got_raw": "3 # 3 workflows executed (a, a, b) assert metrics[0][\"workflow_name\"] == \"test_workflow_a\" assert metrics[0][\"step_name\"] == \"test_step_x\" assert metrics[0][\"count\"] == 2 assert metrics[1][\"workflow_name\"] == \"test_workflow_a\" assert metrics[1][\"step_name\"] == \"test_step_x\" assert metrics[1][\"count\"] == 1 assert metrics[2][\"workflow_name\"] == \"test_workflow_b\" assert metrics[2][\"step_name\"] == \"test_step_y\" assert", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "dbos-inc/dbos-transact-py", + "expected": "\"Yay!\"", + "got": "\"Yay!\"", + "got_raw": "\"Yay!\" def test_commit_hiccup_2(dbos: DBOS) -> None:\n @DBOS.dbos_class()\n class TryDbGlitch:\n @DBOS.step()\n @staticmethod\n def step1() -> str:\n sleep(1)\n return \"Yay!\"\n\n @DBOS.step()\n @staticmethod\n def step2() -> str:\n return \"Yay2!\"\n\n @DBOS.workflow()\n @staticmethod\n def testWorkflow() -> str:\n return TryDbGlitch.step1() + TryDbGlitch.step2()\n\n\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dbos-inc/dbos-transact-py", + "expected": "5", + "got": "5.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "5.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "dbos-inc/dbos-transact-py", + "expected": "2", + "got": "2", + "got_raw": "2 # 2 steps: 1st is the start, 2nd is the end\n\n # Test workflow events\n res = DBOS.start_workflow(DBOSWFEvents.test_workflow, \"e\", \"f\")\n assert res.get_result() == \"f1e\" # Event result is workflow result\n stati = DBOS.get_workflow_status(res.get_workflow_id())\n assert stati.config_name == \"myconfig\" # Event config is workflow config\n assert stati.class_name is None # Event class is workflow class\n assert stati.name == \"DBOSWFEvents_test_workflow\" ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dbos-inc/dbos-transact-py", + "expected": "\"plain_password\")", + "got": "\"postgresql://postgres:plain_password@localhost:5432/test_db\")", + "got_raw": "\"postgresql://postgres:plain_password@localhost:5432/test_db\") self.assertEqual(config[\"database_url\"], \"postgresql://postgres:plain_password@localhost:5432/test_db\") self.assertEqual(config[\"name\"], \"test-app\") self.assertEqual(config[\"secret\"], \"\") self.assertEqual(config[\"secret_key\"], \"\") self.assertEqual(config[\"secret_key_base64\"], \"\") self.assertEqual(config[\"secret_key_hex\"], \"\") self.assertEqual(config[\"secret_key_base64_urlsafe\"], \"\") self.assertEqual(config[\"secret_key_hex_urlsafe\"], \"\") self.assertEqual(config[\"secret_key_base64_urlsafe_hex\"], \"\") self.assertEqual(config[\"", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.43037974683544306 + }, + { + "repo": "dbos-inc/dbos-transact-py", + "expected": "1", + "got": "1", + "got_raw": "1 wfl[0].name == test_user_endpoint.__qualname__ wfl[0].id == span.context.workflow_id wfl[0].start_time == span.start_time wfl[0].end_time == span.end_time wfl[0].status == \"success\" wfl[0].error == \"\" wfl[0].error_code == \"\" wfl[0].error_message == \"\" wfl[0].error_trace == \"\" wfl[0].error_type == \"\" wfl[0].error_stack == \"\" wfl[0].error_traceback == \"\" wfl[0].error_trace", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dbos-inc/dbos-transact-py", + "expected": "\"a\"", + "got": "\"a\"", + "got_raw": "\"a\" assert response.json.get(\"res2\") == \"b\" assert response.json.get(\"id1\") == wfuuid assert response.json.get(\"id2\") is None response = client.get(\"/b/a\", headers={\"dbos-idempotency-key\": wfuuid}) assert response.status_code == 200 assert response.json is not None assert response.json.get(\"res1\") == \"b\" assert response.json.get(\"res2\") == \"a\" assert response.json.get(\"id1\") is None assert response.json.get(\"id2\") == wfuuid response = client.get(\"/a/b\", headers={\"dbos", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dbos-inc/dbos-transact-py", + "expected": "\"This is a secret_password test\")", + "got": "\"This is a secret_password test\")", + "got_raw": "\"This is a secret_password test\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dbos-inc/dbos-transact-py", + "expected": "input_val", + "got": "input_val", + "got_raw": "input_val + 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dbos-inc/dbos-transact-py", + "expected": "5", + "got": "0", + "got_raw": "0 * queued_steps + 1 * queued_steps + 2 * queued_steps + 3 * queued_steps + 4 * queued_steps + 5 * queued_steps + 6 * queued_steps + 7 * queued_steps + 8 * queued_steps + 9 * queued_steps + 10 * queued_steps + 11 * queued_steps + 12 * queued_steps + 13 * queued_steps + 14 * queued_steps + 15 * queued_steps + 16 * queued_steps + 17 * queued_steps + 18 * queued_steps + 19 * queued_steps", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "dbos-inc/dbos-transact-py", + "expected": "None", + "got": "None", + "got_raw": "None # Default config is used instead of dynamicconfig # (dynamicconfig is not loaded) assert stati.class_name == \"DBOSTestWrapperMethods\" assert stati.workflow_id == wh.get_workflow_id() assert stati.workflow_name == \"test_workflow\" assert stati.workflow_args == (\"x\", \"y\") assert stati.workflow_kwargs == {} assert stati.workflow_status == \"running\" assert stati.workflow_start_time is not None assert stati.workflow_end_time is None assert stati.workflow_duration is None assert stati.workflow_error is None assert stati.workflow_result is None assert stati.workflow_error_msg is None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "decoderesearch/circuit-tracer", + "expected": "2", + "got": "clt.n_layers", + "got_raw": "clt.n_layers + 1 if skip_connection else clt.n_layers + 2 if skip_connection else clt.n_layers + 1 if skip_connection else clt.n_layers + 2 if skip_connection else clt.n_layers + 1 if skip_connection else clt.n_layers + 2 if skip_connection else clt.n_layers + 1 if skip_connection else clt.n_layers + 2 if skip_connection else clt.n_layers + 1 if skip_connection else clt.n_layers + 2 if skip_connection else clt.n_layers + 1 if skip_connection else clt.n_layers + 2", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.0 + }, + { + "repo": "decoderesearch/circuit-tracer", + "expected": "3", + "got": "3", + "got_raw": "3 assert isinstance(graph_tensor.logit_targets[0], LogitTarget) assert isinstance(graph_tensor.logit_targets[1], LogitTarget) assert isinstance(graph_tensor.logit_targets[2], LogitTarget) assert graph_tensor.logit_targets[0].token_str == \"\" assert graph_tensor.logit_targets[0].vocab_idx == 262 assert graph_tensor.logit_targets[1].token_str == \"\" assert graph_tensor.logit_targets[1].vocab_idx == 290 assert graph_tensor.logit_targets[2].token_str == \"\" assert graph_tensor.logit_targets[2].vocab_idx == 3", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "decoderesearch/circuit-tracer", + "expected": "n_active", + "got": "n_active", + "got_raw": "n_active + 1 if skip_connection else n_active + 2 assert components[\"decoder_vecs\"].shape[0] == n_active + 1 if skip_connection else n_active + 2 assert components[\"encoder_vecs\"].shape[1] == components[\"decoder_vecs\"].shape[1] == d_model + 1 if skip_connection else d_model + 2\n\n # Check encoder-to-decoder map has matching counts\n assert components[\"encoder_to_decoder_map\"].shape[0] == n_active + 1 if skip_connection else n_active + 2 assert components[\"encoder_to_decoder_map\"].shape[", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "decoderesearch/circuit-tracer", + "expected": "components", + "got": "components.keys()", + "got_raw": "components.keys() assert \"W_enc\" in components[\"activation_matrix\"].keys() assert \"W_dec\" in components[\"activation_matrix\"].keys() assert \"b_enc\" in components[\"activation_matrix\"].keys() assert \"b_dec\" in components[\"activation_matrix\"].keys() assert \"W_skip\" in components[\"activation_matrix\"].keys() if skip_connection else True assert \"W_enc\" in components[\"W_enc\"].keys() assert \"W_dec\" in components[\"W_dec\"].keys() assert \"b_enc\" in components[\"b_enc\"].keys() assert \"b_dec\" in components[\"b_dec\"].keys() assert \"W", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.7407407407407407 + }, + { + "repo": "decoderesearch/circuit-tracer", + "expected": "expected_token_strs[1]", + "got": "expected_token_strs[1]", + "got_raw": "expected_token_strs[1] assert loaded_graph.logit_targets[2].token_str == expected_token_strs[2] assert loaded_graph.adjacency_matrix.tolist() == adjacency_matrix.tolist() assert loaded_graph.active_features.tolist() == [[0, 0, 5]] assert loaded_graph.selected_features.tolist() == [0] assert loaded_graph.activation_values.tolist() == [1.5] assert loaded_graph.input_tokens.tolist() == [1, 2, 3] assert loaded_graph.input_string == \"test\" assert loaded_graph.cfg == cfg.to_dict() assert loaded_graph.device == get_default_device() assert loaded_graph.device", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "decoderesearch/circuit-tracer", + "expected": "(batch_size * seq_len, 512)", + "got": "(batch_size * seq_len, 512) if not lazy_enc else (batch_size * seq_len, 512, 1) if lazy_enc else (batch_size * seq_len, 512) if not lazy_dec else (batch_size * seq_len, 512, 1) if lazy_dec else (batch_size * seq_len, 512) if not lazy_enc and not lazy_dec else (batch_size * seq_len, 512, 1) if lazy_enc and lazy_dec else (batch_size * seq_len, 512) if not", + "got_raw": "(batch_size * seq_len, 512) if not lazy_enc else (batch_size * seq_len, 512, 1) if lazy_enc else (batch_size * seq_len, 512) if not lazy_dec else (batch_size * seq_len, 512, 1) if lazy_dec else (batch_size * seq_len, 512) if not lazy_enc and not lazy_dec else (batch_size * seq_len, 512, 1) if lazy_enc and lazy_dec else (batch_size * seq_len, 512) if not", + "exact_match": false, + "code_bleu": 0.07760920916366017, + "edit_similarity": 0.14136125654450263 + }, + { + "repo": "decoderesearch/circuit-tracer", + "expected": "(len(feat_ids), lazy_clt.n_layers, lazy_clt.d_model)", + "got": "(len(feat_ids), lazy_clt.d_transcoder, lazy_clt.d_model)", + "got_raw": "(len(feat_ids), lazy_clt.d_transcoder, lazy_clt.d_model)", + "exact_match": false, + "code_bleu": 0.8003203203844999, + "edit_similarity": 0.8888888888888888 + }, + { + "repo": "decoderesearch/circuit-tracer", + "expected": "str_without_acts", + "got": "str_without_acts", + "got_raw": "str_without_acts + \" \" + str(activations[0][0]) + str(activations[0][1]) + str(activations[0][2]) + str(activations[0][3]) + str(activations[0][4]) + str(activations[0][5]) + str(activations[0][6]) + str(activations[0][7]) + str(activations[0][8]) + str(activations[0][9]) + str(activations[0][10]) + str(activations[0][11", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "decoderesearch/circuit-tracer", + "expected": "2", + "got": "clt.n_layers", + "got_raw": "clt.n_layers + 1 if skip_connection else clt.n_layers + 2 if skip_connection else clt.n_layers + 1 if skip_connection else clt.n_layers + 2 if skip_connection else clt.n_layers + 1 if skip_connection else clt.n_layers + 2 if skip_connection else clt.n_layers + 1 if skip_connection else clt.n_layers + 2 if skip_connection else clt.n_layers + 1 if skip_connection else clt.n_layers + 2 if skip_connection else clt.n_layers + 1 if skip_connection else clt.n_layers + 2", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.0 + }, + { + "repo": "decoderesearch/circuit-tracer", + "expected": "expected_state[\"W_dec\"].shape", + "got": "expected_state[\"W_dec\"].shape", + "got_raw": "expected_state[\"W_dec\"].shape + (1,) # Add batch dimension for testing # W_dec should be a parameter with batch dimension added # W_dec should have the same data as W_dec in the state_dict W_dec.data = expected_state[\"W_dec\"] # Check if W_dec is a parameter with batch dimension added assert isinstance(W_dec, torch.nn.Parameter) assert W_dec.shape == expected_state[\"W_dec\"].shape + (1,) # Check if W_dec has the same data as W_dec in the state_dict assert torch.allclose(W_dec.data, expected_state[\"W_dec\"]) # Check if W_dec is not a", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "decoderesearch/circuit-tracer", + "expected": "(3,)", + "got": "(3,)", + "got_raw": "(3,) # shape (3,) for 3 targets with 1 dimension 1 # shape (1,) for 1 target with 1 dimension 1 # shape (1,) for 1 target with 1 dimension 1 # shape (1,) for 1 target with 1 dimension 1 # shape (1,) for 1 target with 1 dimension 1 # shape (1,) for 1 target with 1 dimension 1 # shape (1,) for 1 target with 1 dimension 1 # shape (1,) for 1 target with 1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dedalus-labs/dedalus-sdk-python", + "expected": "\"a.b=c\"", + "got": "\"a.b=c\"", + "got_raw": "\"a.b=c\" assert unquote(serialise({\"a\": {\"b\": {\"c\": \"d\"}}})) == \"a.b.c=d\" assert unquote(serialise({\"a\": {\"b\": {\"c\": {\"d\": \"e\"}}}})) == \"a.b.c.d=e\" assert unquote(serialise({\"a\": {\"b\": {\"c\": {\"d\": {\"e\": \"f\"}}}}})) == \"a.b.c.d.e=f\" assert unquote(serialise({\"a\": {\"b\": {\"c\": {\"d\": {\"e\": {\"f\": \"g\"}}}}}})) == \"a.b.c.d", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dedalus-labs/dedalus-sdk-python", + "expected": "obj2[\"foo\"][\"bar\"][0])", + "got": "obj2[\"foo\"][\"bar\"][0])", + "got_raw": "obj2[\"foo\"][\"bar\"][0])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dedalus-labs/dedalus-sdk-python", + "expected": "\"org/project\"", + "got": "\"org/project\"", + "got_raw": "\"org/project\" assert spec.version == \"v1\" assert spec.protocol == MCPServerProtocol.WIRE_PROTOCOL_1_0_0 assert spec.version_parsed == (1, 0, 0) assert spec.version_parsed_str == \"1.0.0\" assert spec.version_parsed_str_short == \"1.0\" assert spec.version_parsed_str_shorter == \"1\" assert spec.version_parsed_str_shortest == \"1\" assert spec.version_parsed_str_shortestest == \"1\" assert spec.version_parsed_str_shortestestest == \"1\" assert spec.version_parsed_str_shortestestestest == \"1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dedalus-labs/dedalus-sdk-python", + "expected": "\"github\"", + "got": "\"github\"", + "got_raw": "\"github\" result[\"url\"] == \"https://api.github.com\" result[\"timeout\"] == 60000.0 result[\"auth\"] == None result[\"token\"] == None result[\"private_key\"] == None result[\"cert\"] == None result[\"ca_certs\"] == None result[\"verify\"] == True result[\"cert_reqs\"] == \"CERT_REQUIRED\" result[\"assert_hostname\"] == True result[\"server\"] == None result[\"port\"] == None result[\"username\"] == None result[\"password\"] == None result[\"token\"] == None result[\"token_file\"] == None result[\"token_env\"] == None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dedalus-labs/dedalus-sdk-python", + "expected": "15000", + "got": "15000.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "15000.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.07518796992481203 + }, + { + "repo": "dedalus-labs/dedalus-sdk-python", + "expected": "expected", + "got": "expected", + "got_raw": "expected # type: ignore # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dedalus-labs/dedalus-sdk-python", + "expected": "True", + "got": "True", + "got_raw": "True response.raw is not None response.raw.read() == b\"raw file contents\" response.raw.close() response.raw.read() == b\"\" response.raw.close() response.raw.read() == b\"\" response.raw.close() response.raw.read() == b\"\" response.raw.close() response.raw.read() == b\"\" response.raw.close() response.raw.read() == b\"\" response.raw.close() response.raw.read() == b\"\" response.raw.close() response.raw.read() == b\"\" response.raw.close() response.raw.read() == b\"\" response.raw.close() response.raw.read() == b\"\" response.raw.close() response.raw.read() == b\"\" response", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dedalus-labs/dedalus-sdk-python", + "expected": "{\"foo\": \"bar\"}", + "got": "{ \"foo\": \"bar\" } assert await transform({\"foo\": \"bar\"}", + "got_raw": "{ \"foo\": \"bar\" } assert await transform({\"foo\": \"bar\"}, str, use_async) == \"bar\" # files are transformed into Base64FileInput objects assert await transform({\"foo\": SAMPLE_FILE_PATH}, TypedDictBase64Input, use_async) == { \"foo\": Base64FileInput( content=b\"Hello, world!\", content_type=\"text/plain\", filename=\"sample_file.txt\", ) } assert await transform({\"foo\": SAMPLE_FILE_PATH}, str, use_async) == \"Hello, world!\" # files are transformed into str objects assert await transform({\"foo\": SAMPLE_FILE_PATH}, str", + "exact_match": false, + "code_bleu": 0.3237722713145643, + "edit_similarity": 0.4117647058823529 + }, + { + "repo": "dedalus-labs/dedalus-sdk-python", + "expected": "1", + "got": "1", + "got_raw": "1 # 1 pair of secrets and connections. assert pairs[0] == (connections[0], secrets[0]) # The first pair is the only one. \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dedalus-labs/dedalus-sdk-python", + "expected": "\"a\"", + "got": "\"a\"", + "got_raw": "\"a\" foo() is None foo(None) is None foo(None, \"a\") == \"a\" foo(\"a\", \"b\") == \"a\" foo(\"a\", \"b\", \"c\") == \"a\" foo(\"a\", \"b\", \"c\", \"d\") == \"a\" foo(\"a\", \"b\", \"c\", \"d\", \"e\") == \"a\" foo(\"a\", \"b\", \"c\", \"d\", \"e\", \"f\") == \"a\" foo(\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dedalus-labs/dedalus-sdk-python", + "expected": "None", + "got": "None", + "got_raw": "None assert message.parsed.city == \"San Francisco\" assert message.parsed.temperature == 65.0 assert message.parsed.units == \"f\" assert message.refusal is None assert message.tool_calls is None assert message.finish_reason == \"stop\" assert message.system_fingerprint == \"fp_test\" assert message.id == \"chatcmpl-test123\" assert message.object == \"chat.completion\" assert message.created == 1727346143 assert message.model == \"gpt-4o\" assert message.usage.prompt_tokens == 79 assert message.usage.completion_tokens == 14", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dedalus-labs/dedalus-sdk-python", + "expected": "\"a=true\"", + "got": "\"a=true\"", + "got_raw": "\"a=true\" assert stringify({\"a\": False}) == \"a=false\" assert stringify({\"a\": None}) == \"\" assert stringify({\"a\": 1, \"b\": 2}) == \"a=1&b=2\" assert stringify({\"a\": 1, \"b\": 2, \"c\": 3}) == \"a=1&b=2&c=3\" assert stringify({\"a\": 1, \"b\": 2, \"c\": 3, \"d\": 4}) == \"a=1&b=2&c=3&d=4\" assert stringify", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dedalus-labs/dedalus-sdk-python", + "expected": "\"hello!\"", + "got": "\"hello!\"", + "got_raw": "\"hello!\" assert obj.bar == 2.0 assert obj.baz == \"baz\" assert obj.qux == 1.0 assert obj.quux == 2.0 assert obj.quuz == 3.0 assert obj.quuux == 4.0 assert obj.quuuux == 5.0 assert obj.quuuuux == 6.0 assert obj.quuuuuux == 7.0 assert obj.quuuuuuux == 8.0 assert obj.quuuuuuuux == 9.0 assert obj.quuuuuuuuuux == 10.0 assert obj", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dedalus-labs/dedalus-sdk-python", + "expected": "\"v1.2.0\"", + "got": "\"v1.2.0\"", + "got_raw": "\"v1.2.0\" assert spec.slug == \"dedalus-labs/example-server\" assert spec.protocol == MCPServerProtocol.MCP_1_2_0 assert spec.name == \"Example Server\" assert spec.description == \"This is an example server.\" assert spec.author == \"John Doe\" assert spec.author_email == \"john.doe@example.com\" assert spec.url == \"https://example.com\" assert spec.license == \"MIT\" assert spec.license_url == \"https://opensource.org/licenses/MIT\" assert spec.license_name == \"MIT\" assert spec.license_short == \"MIT\" assert spec.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dedalus-labs/dedalus-sdk-python", + "expected": "\"in=foo,bar\"", + "got": "\"in=foo,bar\"", + "got_raw": "\"in=foo,bar\" assert unquote(serialise({\"in\": [\"foo\", \"bar\", \"baz\"]})) == \"in=foo,baz\" assert unquote(serialise({\"in\": [\"foo\", \"bar\", \"baz\", \"qux\"]})) == \"in=foo,baz,qux\" assert unquote(serialise({\"in\": [\"foo\", \"bar\", \"baz\", \"qux\", \"quux\"]})) == \"in=foo,baz,qux,quux\" assert unquote(serialise({\"in\": [\"foo\", \"bar\", \"baz\", \"qux\", \"qu", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dedalus-labs/dedalus-sdk-python", + "expected": "_ENVELOPE_VERSION", + "got": "0x01", + "got_raw": "0x01 # version 1 # nonce nonce = envelope[1:1+12] # ciphertext ciphertext = envelope[1+12:1+12+16] # tag tag = envelope[1+12+16:] # decrypt ciphertext = private_key.decrypt( ciphertext, padding.OAEP( mgf=padding.MGF1(algorithm=hashes.SHA256()), algorithm=hashes.SHA256(), label=None, ), ) # verify tag tag = private_key.verify( tag, ciphertext, padding.OAEP( mgf", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "dedalus-labs/dedalus-sdk-python", + "expected": "\"ping\"", + "got": "\"ping\"", + "got_raw": "\"ping\" assert sse.data is None assert sse.id is None assert sse.retry is None assert sse.event is None assert sse.retry is None assert sse.data is None assert sse.id is None assert sse.retry is None assert sse.event is None assert sse.retry is None assert sse.data is None assert sse.id is None assert sse.retry is None assert sse.event is None assert sse.retry is None assert sse.data is None assert sse.id is None assert sse.retry is None assert sse.event is None assert sse.retry is None assert sse.data is", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dedalus-labs/dedalus-sdk-python", + "expected": "6", + "got": "6", + "got_raw": "6\n\n assert copied.max_retries == 7\n\n # options that don't have a default are not overridden\n copied3 = copied.copy(timeout=1000)\n assert copied3.timeout == 1000\n assert copied.timeout == 10000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dedupeio/dedupe", + "expected": "[0, 2]", + "got": "[0] data_model = DataModel( [dedupe.variables.String(field=\"a\", name=\"a\", has_missing=True), dedupe.variables.String(field=\"b\", name=\"b\", has_missing=True), dedupe.variables.Interaction(\"a\", \"b\"), ] ) assert data_model._missing_field_indices == [0, 1] data_model = DataModel( [dedupe.variables.String(field=\"a\", name=\"a\", has_missing=True), dedupe.variables.String(field=\"b\", name=\"b\"), dedupe.variables.Interaction(\"a\", \"b\"), ] ) assert data_model._missing_field_indices == [0]", + "got_raw": "[0] data_model = DataModel( [dedupe.variables.String(field=\"a\", name=\"a\", has_missing=True), dedupe.variables.String(field=\"b\", name=\"b\", has_missing=True), dedupe.variables.Interaction(\"a\", \"b\"), ] ) assert data_model._missing_field_indices == [0, 1] data_model = DataModel( [dedupe.variables.String(field=\"a\", name=\"a\", has_missing=True), dedupe.variables.String(field=\"b\", name=\"b\"), dedupe.variables.Interaction(\"a\", \"b\"), ] ) assert data_model._missing_field_indices == [0]", + "exact_match": false, + "code_bleu": 0.017934354141112517, + "edit_similarity": 0.02066115702479339 + }, + { + "repo": "dedupeio/dedupe", + "expected": "{\"0\"}", + "got": "set()", + "got_raw": "set()\n\n def test_ngrams(self):\n assert list(ngrams(\"donald\", 2)) == [(\"do\", \"on\"), (\"on\", \"do\")]\n assert list(ngrams(\"donald\", 3)) == [(\"don\", \"on\", \"do\")]", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.0 + }, + { + "repo": "dedupeio/dedupe", + "expected": "1", + "got": "1", + "got_raw": "1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dedupeio/dedupe", + "expected": "{\"go\"}", + "got": "{\"go\"}", + "got_raw": "{\"go\"}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dedupeio/dedupe", + "expected": "[\"deduplicat\", \"eduplicate\"]", + "got": "[\"deduplicat\", \"eduplicat\", \"duplicat\", \"uplicate\"] assert ngrams(\"deduplicate\", 11) == [\"deduplicat\", \"eduplicat\", \"duplicat\"] assert ngrams(\"deduplicate\", 12) == [\"deduplicat\", \"eduplicat\"] assert ngrams(\"deduplicate\", 13) == [\"deduplicat\"] assert ngrams(\"deduplicate\", 14) == [\"deduplic\"] assert ngrams(\"deduplicate\", 15) == [\"dedupli\"] assert ngrams(\"deduplicate\", 16)", + "got_raw": "[\"deduplicat\", \"eduplicat\", \"duplicat\", \"uplicate\"] assert ngrams(\"deduplicate\", 11) == [\"deduplicat\", \"eduplicat\", \"duplicat\"] assert ngrams(\"deduplicate\", 12) == [\"deduplicat\", \"eduplicat\"] assert ngrams(\"deduplicate\", 13) == [\"deduplicat\"] assert ngrams(\"deduplicate\", 14) == [\"deduplic\"] assert ngrams(\"deduplicate\", 15) == [\"dedupli\"] assert ngrams(\"deduplicate\", 16)", + "exact_match": false, + "code_bleu": 0.028718620586134988, + "edit_similarity": 0.14 + }, + { + "repo": "dedupeio/dedupe", + "expected": "IndexError)", + "got": "ValueError)", + "got_raw": "ValueError) as exc_info: active_learner.pop() assert str(exc_info.value) == \"No records left to label\"", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6363636363636364 + }, + { + "repo": "dedupeio/dedupe", + "expected": "self.desired_scored_pairs[\"pairs\"])", + "got": "self.desired_scored_pairs[\"pairs\"])", + "got_raw": "self.desired_scored_pairs[\"pairs\"]) numpy.testing.assert_almost_equal( scores[\"score\"], self.desired_scored_pairs[\"score\"] )", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dedupeio/dedupe", + "expected": "{\"cc\"}", + "got": "{\"c10p\"}", + "got_raw": "{\"c10p\"}", + "exact_match": false, + "code_bleu": 0.49999999999999994, + "edit_similarity": 0.7142857142857143 + }, + { + "repo": "dedupeio/dedupe", + "expected": "{frozenset([120, 125]), frozenset([130, 135])}", + "got": "{frozenset({\"Bob\", \"Charlie\", \"Meredith\", \"Sue\", \"Jimbo\", \"Willy\", \"Martha\", \"Kyle\"})}", + "got_raw": "{frozenset({\"Bob\", \"Charlie\", \"Meredith\", \"Sue\", \"Jimbo\", \"Willy\", \"Martha\", \"Kyle\"})}", + "exact_match": false, + "code_bleu": 0.13566979610140004, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "deepseek-ai/smallpond", + "expected": "[{\"a\": 1, \"b\": 4}, {\"a\": 2, \"b\": 5}]", + "got": "pd.DataFrame({\"a\": [2], \"b\": [5]})", + "got_raw": "pd.DataFrame({\"a\": [2], \"b\": [5]}) # type: ignore def test_take_with_index(sp: Session): df = sp.from_pandas( pd.DataFrame({\"a\": [1, 2, 3], \"b\": [4, 5, 6]}) ) assert df.take([1, 2]) == pd.DataFrame({\"a\": [2, 3], \"b\": [5, 6]}) # type: ignore def test_take_with_negative_index(sp: Session): df = sp.from_pandas( pd.DataFrame({\"a\": [1, 2", + "exact_match": false, + "code_bleu": 0.1797722210683774, + "edit_similarity": 0.42857142857142855 + }, + { + "repo": "deepseek-ai/smallpond", + "expected": "exec_plan.successful)", + "got": "exec_plan.successful)", + "got_raw": "exec_plan.successful)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "deepseek-ai/smallpond", + "expected": "len(exec_plan.final_output.load_partitioned_datasets(npartitions, data_partition_column)))", + "got": "exec_plan) for i in range(npartitions): self.assertEqual( exec_plan.get_output(i).get_partition_column(), data_partition_column ) self.assertEqual( exec_plan.get_output(i).get_partition_column_type(), str ) self.assertEqual( exec_plan.get_output(i).get_partition_column_values(), [ str(i) for i in range(npartitions) ] ) self.assertEqual( exec_plan.get_output(i).get_partition_column_values_count(), npartitions ) self.assertEqual( exec_plan.get_output(i).get_partition_column_values_size(), npartitions * 4 ) self.assertEqual( exec_plan.get_output(i).get_partition_column_values_hash(),", + "got_raw": "exec_plan) for i in range(npartitions): self.assertEqual( exec_plan.get_output(i).get_partition_column(), data_partition_column ) self.assertEqual( exec_plan.get_output(i).get_partition_column_type(), str ) self.assertEqual( exec_plan.get_output(i).get_partition_column_values(), [ str(i) for i in range(npartitions) ] ) self.assertEqual( exec_plan.get_output(i).get_partition_column_values_count(), npartitions ) self.assertEqual( exec_plan.get_output(i).get_partition_column_values_size(), npartitions * 4 ) self.assertEqual( exec_plan.get_output(i).get_partition_column_values_hash(),", + "exact_match": false, + "code_bleu": 0.031043042374364376, + "edit_similarity": 0.15657311669128507 + }, + { + "repo": "deepseek-ai/smallpond", + "expected": "len(partitioned_datasets))", + "got": "len(partitioned_datasets))", + "got_raw": "len(partitioned_datasets)) for i in range(npartition): partitioned_datasets[i].load() partitioned_datasets[i].close() orig_dataset.load() orig_dataset.close() orig_dataset = orig_dataset._load_partitioned_datasets(partitioned_datasets) orig_dataset.load() orig_dataset.close() orig_dataset.load_partitioned_datasets(partitioned_datasets) orig_dataset.close() orig_dataset.load_partitioned_datasets(partitioned_datasets) orig_dataset.load_partitioned_datasets(partitioned_datasets) orig_dataset.close() orig_dataset.load_partitioned_datasets(partitioned_datasets) orig_dataset.load_partitioned_datasets(partitioned_datasets) orig_dataset.close() orig_dataset.load", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "deepseek-ai/smallpond", + "expected": "arrow_batch_output.num_rows)", + "got": "arrow_batch_output.num_rows", + "got_raw": "arrow_batch_output.num_rows + pandas_batch_output.num_rows) self.assertEqual(small_dataset.num_rows, arrow_batch_output.num_rows) self.assertEqual(large_dataset.num_rows, pandas_batch_output.num_rows) self.assertEqual(10, pandas_batch_output.num_rows) self.assertEqual(7, len(arrow_batch_output)) self.assertEqual(7, len(pandas_batch_output)) self.assertEqual(7, len(exec_plan.final_output)) self.assertEqual(7, len(exec_plan.final_output.resolved_paths)) self.assertEqual(7, len(exec_plan.final_output.resolved_paths[0])) self.assertEqual(7, len(exec_plan.final_output.resolved_paths", + "exact_match": false, + "code_bleu": 0.6306723114402859, + "edit_similarity": 0.9818181818181818 + }, + { + "repo": "deepseek-ai/smallpond", + "expected": "pa.table({\"c\": [5, 7, 9]})", + "got": "pa.table({\"c\": [5, 7, 9]})", + "got_raw": "pa.table({\"c\": [5, 7, 9]})", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "deepseek-ai/smallpond", + "expected": "sum(dataset.num_rows for dataset in partitioned_datasets))", + "got": "orig_dataset) for orig", + "got_raw": "orig_dataset) for orig, partitioned in zip(orig_dataset, partitioned_datasets)) for orig, partitioned in zip(orig_dataset, partitioned_datasets)) for orig, partitioned in zip(orig_dataset, partitioned_datasets)) for orig, partitioned in zip(orig_dataset, partitioned_datasets)) for orig, partitioned in zip(orig_dataset, partitioned_datasets)) for orig, partitioned in zip(orig_dataset, partitioned_datasets)) for orig, partitioned in zip(orig_dataset, partitioned_datasets)) for orig, partitioned in zip(orig_dataset, partitioned_datasets)) for orig, partitioned in zip(orig_dataset, partitioned_datasets", + "exact_match": false, + "code_bleu": 0.14459467795764558, + "edit_similarity": 0.3 + }, + { + "repo": "deepseek-ai/smallpond", + "expected": "get_nth_partition(items, 0, 2))", + "got": "get_nth_partition(items, 0, 2)) self.assertListEqual([3], get_nth_partition(items, 1, 2))", + "got_raw": "get_nth_partition(items, 0, 2)) self.assertListEqual([3], get_nth_partition(items, 1, 2)) # split into 3 partitions self.assertListEqual([1], get_nth_partition(items, 0, 3)) self.assertListEqual([2], get_nth_partition(items, 1, 3)) self.assertListEqual([3], get_nth_partition(items, 2, 3)) # split into 4 partitions self.assertListEqual([1, 2], get_nth_partition(items, 0, 4)) self.assertListEqual([3], get_nth_partition(items,", + "exact_match": false, + "code_bleu": 0.3307391024442815, + "edit_similarity": 0.5166666666666667 + }, + { + "repo": "deepseek-ai/smallpond", + "expected": "sorted(final_table.column_names))", + "got": "len(final_table))", + "got_raw": "len(final_table)) == 3) == 3) == 3) == 3) == 3) == 3) == 3) == 3) == 3) == 3) == 3) == 3) == 3) == 3) == 3) == 3) == 3) == 3) == 3) == 3) == 3) == 3) == 3) == 3) == 3) == 3) == 3) == 3) == 3) == 3) == 3)", + "exact_match": false, + "code_bleu": 0.3227150012892303, + "edit_similarity": 0.6 + }, + { + "repo": "deepseek-ai/smallpond", + "expected": "file.schema_arrow.metadata)", + "got": "file.schema_arrow.metadata)", + "got_raw": "file.schema_arrow.metadata)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "denizsafak/abogen", + "expected": "out", + "got": "out.lower()", + "got_raw": "out.lower() # noqa: W605", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.42857142857142855 + }, + { + "repo": "denizsafak/abogen", + "expected": "\"Fiction\"", + "got": "\"Fiction\"", + "got_raw": "\"Fiction\" assert merged[\"year\"] is None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "denizsafak/abogen", + "expected": "\"Summary text\"", + "got": "\"Summary text\"", + "got_raw": "\"Summary text\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "denizsafak/abogen", + "expected": "\"Alexandre Dumas\"", + "got": "[\"Alexandre Dumas\"] \\ \"Unabridged\" \\ \"Example\" \\ \"Fiction\" \\ \"Classic\" \\ \"Summary text\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"", + "got_raw": "[\"Alexandre Dumas\"] \\ \"Unabridged\" \\ \"Example\" \\ \"Fiction\" \\ \"Classic\" \\ \"Summary text\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"2\" \\ \"", + "exact_match": false, + "code_bleu": 0.01903035925309475, + "edit_similarity": 0.1349206349206349 + }, + { + "repo": "denizsafak/abogen", + "expected": "\"All Caps Title\"", + "got": "\"All Caps Title\" assert changed is True def test_normalize_chapter_opening_caps_no_change() -> None: normalized", + "got_raw": "\"All Caps Title\" assert changed is True def test_normalize_chapter_opening_caps_no_change() -> None: normalized, changed = _normalize_chapter_opening_caps(\"all caps title\") assert normalized == \"all caps title\" assert changed is False def test_normalize_chapter_opening_caps_all_caps() -> None: normalized, changed = _normalize_chapter_opening_caps(\"ALL CAPS\") assert normalized == \"all caps\" assert changed is True def test_normalize_chapter_opening_caps_all_caps_with_punctuation() -> None: normalized, changed = _normalize_chapter_opening_caps(\"ALL CAPS!\") assert normalized ==", + "exact_match": false, + "code_bleu": 0.08839374326825923, + "edit_similarity": 0.25196850393700787 + }, + { + "repo": "denizsafak/abogen", + "expected": "parser.content_texts[id_1])", + "got": "parser.get_content(id_1))", + "got_raw": "parser.get_content(id_1)) self.assertIn(\"This is the second chapter\", parser.get_content(id_1))", + "exact_match": false, + "code_bleu": 0.2777619034011791, + "edit_similarity": 0.7307692307692307 + }, + { + "repo": "denizsafak/abogen", + "expected": "speakers", + "got": "speakers[0].names.lower()", + "got_raw": "speakers[0].names.lower() and \"blue leader\" in speakers[1].names.lower() and \"hold\" in speakers[1].words.lower() and \"perimeter\" in speakers[1].words.lower() and \"dawn\" in speakers[0].words.lower() and \"march\" in speakers[0].words.lower() and \"at\" in speakers[0].words.lower() and \"dawn\" in speakers[0].words.lower() and \"dawn\" in speakers[0].words.lower() and \"dawn\" in speakers[0].words.lower() and \"dawn\"", + "exact_match": false, + "code_bleu": 0.12605968092174913, + "edit_similarity": 0.48484848484848486 + }, + { + "repo": "denizsafak/abogen", + "expected": "normalize(\"2009\", cfg)", + "got": "normalize(\"2009\", cfg) assert \"two thousand eight\" in normalize(\"2008\", cfg) assert \"two thousand seven\" in normalize(\"2007\", cfg) assert \"two thousand six\" in normalize(\"2006\", cfg) assert \"two thousand five\" in normalize(\"2005\", cfg) assert \"two thousand four\" in normalize(\"2004\", cfg) assert \"two thousand three\" in normalize(\"2003\", cfg) assert \"two thousand two\" in normalize(\"2002\", cfg) assert \"two thousand one\" in", + "got_raw": "normalize(\"2009\", cfg) assert \"two thousand eight\" in normalize(\"2008\", cfg) assert \"two thousand seven\" in normalize(\"2007\", cfg) assert \"two thousand six\" in normalize(\"2006\", cfg) assert \"two thousand five\" in normalize(\"2005\", cfg) assert \"two thousand four\" in normalize(\"2004\", cfg) assert \"two thousand three\" in normalize(\"2003\", cfg) assert \"two thousand two\" in normalize(\"2002\", cfg) assert \"two thousand one\" in", + "exact_match": false, + "code_bleu": 0.07530379877915352, + "edit_similarity": 0.09887640449438202 + }, + { + "repo": "denizsafak/abogen", + "expected": "[\"1\"]", + "got": "[\"1\"]", + "got_raw": "[\"1\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "denizsafak/abogen", + "expected": "expected_root", + "got": "expected_root", + "got_raw": "expected_root + os.sep + \"abogen\" + os.sep + \"temp\" + os.sep + \"cache\" + os.sep + \"huggingface\" + os.sep + \"abogen\" + os.sep + \"temp\" + os.sep + \"cache\" + os.sep + \"huggingface\" + os.sep + \"abogen\" + os.sep + \"temp\" + os.sep + \"cache\" + os.sep + \"huggingface\" + os.sep + \"abogen\" + os.sep + \"temp\" + os.sep + \"cache\" + os.sep + \"huggingface\" + os", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "denizsafak/abogen", + "expected": "\"speaker_voice\"", + "got": "\"speaker_voice\"", + "got_raw": "\"speaker_voice\" # type: ignore # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E50", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "denizsafak/abogen", + "expected": "formula", + "got": "formula", + "got_raw": "formula + \"_ch\" + VOICES_INTERNAL[0] + \"_ch\" + VOICES_INTERNAL[1] + \"_ch\" + VOICES_INTERNAL[2] + \"_ch\" + VOICES_INTERNAL[3] + \"_ch\" + VOICES_INTERNAL[4] + \"_ch\" + VOICES_INTERNAL[5] + \"_ch\" + VOICES_INTERNAL[6] + \"_ch\" + VOICES_INTERNAL[7] + \"_ch\" + VOICES_INTERNAL[8] + \"_ch\" + VOICES_INTERNAL[9] + \"_ch\" + VOICES_INTERNAL[10] + \"_ch\" +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "denizsafak/abogen", + "expected": "2)", + "got": "2)", + "got_raw": "2) # Check chapter 1 self.assertEqual(chapters[0][0], 1) self.assertEqual(chapters[0][1], \"Chapter 1\") self.assertEqual(chapters[0][2], \"Text for chapter 1.\") # Check chapter 2 self.assertEqual(chapters[1][0], 2) self.assertEqual(chapters[1][1], \"Chapter 2\") self.assertEqual(chapters[1][2], \"Text for chapter 2.\") # Check Nav self.assertEqual(chapters[2][0], 0) self.assertEqual(chapters[2][1], \"Nav\") self.assertEqual(chapters[", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "denizsafak/abogen", + "expected": "ids)", + "got": "ids)", + "got_raw": "ids) self.assertIn(\"chapter-2\", ids) # EPUB self.parser_epub = get_book_parser(self.sample_epub_path) self.parser_epub.process_content() chapters_epub = self.parser_epub.get_chapters() self.assertEqual(len(chapters_epub), 2) self.assertEqual(chapters_epub[0], (\"intro\", \"Introduction\")) self.assertEqual(chapters_epub[1], (\"chap1\", \"Chapter 1\"))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "denizsafak/abogen", + "expected": "captured", + "got": "captured", + "got_raw": "captured and captured[\"text\"] == \"He said Unfuck loudly.\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "denizsafak/abogen", + "expected": "\"Test Author\")", + "got": "\"Test Author\") self.assertEqual(metadata.get(\"language\")", + "got_raw": "\"Test Author\") self.assertEqual(metadata.get(\"language\"), \"en\") self.assertEqual(metadata.get(\"publisher\"), \"\") self.assertEqual(metadata.get(\"date\"), \"\") self.assertEqual(metadata.get(\"identifier\"), \"id123456\") self.assertEqual(metadata.get(\"description\"), \"\") self.assertEqual(metadata.get(\"cover\"), \"\") self.assertEqual(metadata.get(\"rights\"), \"\") self.assertEqual(metadata.get(\"subject\"), \"\") self.assertEqual(metadata.get(\"keywords\"), \"\") self.assertEqual(metadata.get(\"toc\"), \"\") self.assertEqual(metadata.get(\"language\"), \"en\") self.assertEqual(metadata.get(\"publisher\"), \"\") self.assertEqual(metadata.get(\"date\"), \"\") self.assertEqual(metadata.get(\"identifier\"), \"", + "exact_match": false, + "code_bleu": 0.1367440667823257, + "edit_similarity": 0.4 + }, + { + "repo": "denizsafak/abogen", + "expected": "text1)", + "got": "text1)", + "got_raw": "text1) self.assertIn(\"[12]\", text1) self.assertIn(\"1\", text1) # Page number at bottom self.assertIn(\"Page 2 content\", text1) self.assertIn(\"Chapter 1\", text1) self.assertIn(\"Item One\", text1) self.assertIn(\"Item Two\", text1) self.assertIn(\"Chapter 2\", text1) self.assertIn(\"More text.\", text1) # Check for missing content self.assertNotIn(\"Missing content\", text1) # Check for extra content self.assertNotIn(\"Extra content\", text1) # Check for incorrect content self.assertNotIn(\"Incorrect content\", text1)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "denizsafak/abogen", + "expected": "\"Volescu\"", + "got": "\"Blue", + "got_raw": "\"Blue Leader\" speakers[\"volescu\"].count == 1 speakers[\"volescu\"].text == \"Then Blue Leader shouted, \\\"Hold the perimeter\\\".\" speakers[\"volescu\"].chunk_ids == [1] speakers[\"volescu\"].start_time == 0.0 speakers[\"volescu\"].end_time == 1.0 speakers[\"volescu\"].start_frame == 0 speakers[\"volescu\"].end_frame == 1 speakers[\"volescu\"].start_offset == 0.0 speakers[\"volescu\"].end_offset == 1.0 speakers[\"volescu\"].start_time", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.42857142857142855 + }, + { + "repo": "denizsafak/abogen", + "expected": "PdfParser)", + "got": "PdfParser)", + "got_raw": "PdfParser) parser_epub = get_book_parser(self.sample_epub_path) self.assertIsInstance(parser_epub, EpubParser) parser_md = get_book_parser(self.sample_md_path) self.assertIsInstance(parser_md, MarkdownParser) parser_unknown = get_book_parser(\"unknown\") self.assertIsNone(parser_unknown) parser_empty = get_book_parser(\"\") self.assertIsNone(parser_empty) parser_invalid = get_book_parser(\"invalid\") self.assertIsNone(parser_invalid) parser_bad_extension = get_book_parser(\"test_book.txt\") self.assertIsNone(parser_bad_extension) parser_bad_path = get_book_parser(\"/invalid/path\") self.assertIsNone(parser_bad_path) parser_bad_file", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "denizsafak/abogen", + "expected": "\"male\"", + "got": "\"male\"", + "got_raw": "\"male\" assert mary.gender == \"female\" assert alex.gender == \"unknown\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "descriptinc/audiotools", + "expected": "spk_batch", + "got": "spk_batch.convolve(ir)", + "got_raw": "spk_batch.convolve(ir) * batch_size + ir_batch.convolve(spk) * batch_size - spk_batch.convolve(ir) * batch_size - ir_batch.convolve(spk) * batch_size + spk_batch.convolve(ir) * batch_size + ir_batch.convolve(spk) * batch_size - spk_batch.convolve(ir) * batch_size - ir_batch.convolve(spk) * batch_size + spk_batch.convolve(ir) * batch_size + ir_batch.convolve(spk) * batch_size - spk_batch.convolve(ir) * batch_size - ir_batch.convolve(spk)", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.5806451612903226 + }, + { + "repo": "descriptinc/audiotools", + "expected": "sample_rate", + "got": "sample_rate", + "got_raw": "sample_rate / 2.0 if sample_rate % 2 == 0 else sample_rate / 2.0 + 1.0 / 2.0 / sr / 2.0 + 1.0 / 2.0 / sr / 2.0 / 2.0 + 1.0 / 2.0 / sr / 2.0 / 2.0 / 2.0 + 1.0 / 2.0 / sr / 2.0 / 2.0 / 2.0 / 2.0 + 1.0 /", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "descriptinc/audiotools", + "expected": "1e-4", + "got": "1e-10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "1e-10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5946035575013605, + "edit_similarity": 0.045454545454545456 + }, + { + "repo": "descriptinc/audiotools", + "expected": "ValueError)", + "got": "RuntimeError)", + "got_raw": "RuntimeError) as e: spk.to(\"cpu\") assert str(e.value) == \"Cannot convert AudioSignal to CPU\" spk.to(\"cuda\") assert str(e.value) == \"Cannot convert AudioSignal to CUDA\" spk.to(\"mps\") assert str(e.value) == \"Cannot convert AudioSignal to MPS\" spk.to(\"cpu\", torch.float32) assert str(e.value) == \"Cannot convert AudioSignal to CPU with dtype torch.float32\" spk.to(\"cuda\", torch.float16) assert str(e.value) == \"Cannot convert AudioSignal to CUDA with dtype torch.float16\"", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "descriptinc/audiotools", + "expected": "44100", + "got": "44100.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "44100.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.07518796992481203 + }, + { + "repo": "descriptinc/audiotools", + "expected": "signal_from_ffmpeg.signal_length", + "got": "signal_from_ffmpeg.signal_length", + "got_raw": "signal_from_ffmpeg.signal_length == 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "descriptinc/audiotools", + "expected": "sig3", + "got": "sig3", + "got_raw": "sig3\n\n\ndef test_from_file(tmp_path: pathlib.Path) -> None:\n audio_path = tmp_path / \"test.wav\"\n librosa.output.write_wav(audio_path, np.random.randn(16000), 16000)\n sig = AudioSignal.from_file(audio_path)\n assert sig.sample_rate == 16000\n assert sig.shape == (1, 16000)\n assert sig.dtype == np.float32\n\n\ndef test_from_file_with_sample_rate() -> None:\n audio_path = tempfile.NamedTemporaryFile(suffix=\".wav", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dgasmith/opt_einsum", + "expected": "(2, 2)", + "got": "(2, 2) * ops[0].ndim * ops[1].ndim * ops[2].ndim // ops[0].ndim // ops[1].ndim // ops[2].ndim // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 //", + "got_raw": "(2, 2) * ops[0].ndim * ops[1].ndim * ops[2].ndim // ops[0].ndim // ops[1].ndim // ops[2].ndim // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // 2 // ", + "exact_match": false, + "code_bleu": 0.03363737084257959, + "edit_similarity": 0.05172413793103448 + }, + { + "repo": "dgasmith/opt_einsum", + "expected": "\"GEMM\"", + "got": "True", + "got_raw": "True # GEMM is used # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "dgasmith/opt_einsum", + "expected": "res_got3)", + "got": "res_got3)", + "got_raw": "res_got3) res_got4 = expr(var) torch.testing.assert_close(res_exp, res_got4) res_got5 = expr() torch.testing.assert_close(res_exp, res_got5) res_got6 = expr(ops[0]) torch.testing.assert_close(res_exp, res_got6) res_got7 = expr(ops[0], ops[1]) torch.testing.assert_close(res_exp, res_got7) res_got8 = expr(ops[0], ops[1], ops[2]) torch.testing.assert_close(res_exp, res_got8) res_got", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dgasmith/opt_einsum", + "expected": "expr.__str__()", + "got": "str(expr)", + "got_raw": "str(expr) + \"\\n\" + str(expr) + \"\\n\" + str(expr) + \"\\n\" + str(expr) + \"\\n\" + str(expr) + \"\\n\" + str(expr) + \"\\n\" + str(expr) + \"\\n\" + str(expr) + \"\\n\" + str(expr) + \"\\n\" + str(expr) + \"\\n\" + str(expr) + \"\\n\" + str(expr) + \"\\n\" + str(expr) + \"\\n\" + str(expr) + \"\\n\" + str(expr) + \"\\n\" + str(expr) + \"\\n\" +", + "exact_match": false, + "code_bleu": 0.3418296051169873, + "edit_similarity": 0.43478260869565216 + }, + { + "repo": "dgasmith/opt_einsum", + "expected": "object", + "got": "np.float32", + "got_raw": "np.float32 # we use float64 for the tests to avoid precision issues with float32 # arrays. # We use float64 for the tests to avoid precision issues with float32 # arrays. # We use float64 for the tests to avoid precision issues with float32 # arrays. # We use float64 for the tests to avoid precision issues with float32 # arrays. # We use float64 for the tests to avoid precision issues with float32 # arrays. # We use float64 for the tests to avoid precision issues", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.25 + }, + { + "repo": "dgasmith/opt_einsum", + "expected": "TypeError)", + "got": "ValueError)", + "got_raw": "ValueError) as err: expr(np.random.rand(2, 3), np.random.rand(3, 4), out=np.random.rand(2, 4)) assert \"`out` cannot be specified with `ContractExpression`\" in str(err.value) with pytest.raises(ValueError) as err: expr(np.random.rand(2, 3), np.random.rand(3, 4), np.random.rand(2, 4)) assert \"`out` cannot be specified with `ContractExpression`\" in str(err.value) with pytest.raises(ValueError) as err: expr(np.random.rand(2, 3), np.random.rand", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "dgasmith/opt_einsum", + "expected": "0.0", + "got": "sparse_opt.toarray()[0]", + "got_raw": "sparse_opt.toarray()[0] * 1.000000000000000232830643653861000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.13485111859503685, + "edit_similarity": 0.15384615384615385 + }, + { + "repo": "dgilland/pydash", + "expected": "_.initial(value)", + "got": "[1", + "got_raw": "[1, 2, 3, 4]", + "exact_match": false, + "code_bleu": 0.15060033393497413, + "edit_similarity": 0.0 + }, + { + "repo": "dgilland/pydash", + "expected": "3", + "got": "3", + "got_raw": "3 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 *", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dgilland/pydash", + "expected": "_._", + "got": "_._py_", + "got_raw": "_._py_ # noqa: E711\n\n\n@parametrize(\"method\", pydash_methods) # noqa: E124\ndef test_dash_alias_method(method): # noqa: E116\n assert getattr(_, method) is getattr(_._py_, method) # noqa: E711", + "exact_match": false, + "code_bleu": 0.5946035575013605, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "dgilland/pydash", + "expected": "expected", + "got": "expected", + "got_raw": "expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dgilland/pydash", + "expected": "expected", + "got": "expected", + "got_raw": "expected\n\n\n@parametrize( \"case,expected\", [(([1, 2, 3, 4, 5],), [1, 2, 3, 4, 5]), (([1, 2, 3, 4, 5], 2), [1, 2]), (([1, 2, 3, 4, 5], 3), [1, 2, 3]), (([1, 2, 3, 4, 5], 4), [1, 2, 3, 4]), (([", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "django-commons/django-unicorn", + "expected": "[{\"data\": \"test\"}]", + "got": "[]", + "got_raw": "[] # Child's method should have no arguments", + "exact_match": false, + "code_bleu": 0.16988673071467442, + "edit_similarity": 0.2 + }, + { + "repo": "django-commons/django-unicorn", + "expected": "actual", + "got": "actual", + "got_raw": "actual", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "django-commons/django-unicorn", + "expected": "extra_context", + "got": "extra_context.copy()", + "got_raw": "extra_context.copy() # type: ignore # noqa: E501 # pylint: disable=protected-access # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.7878787878787878 + }, + { + "repo": "django-commons/django-unicorn", + "expected": "(\"foo\",)", + "got": "(\"foo\",)", + "got_raw": "(\"foo\",) action.kwargs == {} action.caller = Mock() action.caller.request = Mock() action.caller.request.path = \"/test\" action.caller.request.method = \"GET\" action.caller.request.GET = {} action.caller.request.POST = {} action.caller.request.META = {} action.caller.request.COOKIES = {} action.caller.request.session = {} action.caller.request.user = Mock() action.caller.request.user.is_authenticated = False action.caller.request._state = {} action.caller.request._request = Mock() action.caller.request._response = Mock() action.caller.request._stream = Mock", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "django-commons/django-unicorn", + "expected": "[]", + "got": "[]", + "got_raw": "[] # noqa: UP007\n\n data = {\"array\": [1, 2, 3]} # noqa: UP007\n set_property_from_data(component, data) # noqa: UP007\n\n assert component.array == [1, 2, 3] # noqa: UP007\n\n\nclass FakeComponent(UnicornView):\n array: List[int] = [] # noqa: UP007", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "django-commons/django-unicorn", + "expected": "\"World\"", + "got": "\"example\"", + "got_raw": "\"example\" \"asdf1234\" \"example\" \"asdf1234\" \"example\" \"asdf1234\" \"example\" \"asdf1234\" \"example\" \"asdf1234\" \"example\" \"asdf1234\" \"example\" \"asdf1234\" \"example\" \"asdf1234\" \"example\" \"asdf1234\" \"example\" \"asdf1234\" \"example\" \"asdf1234\" \"example\" \"asdf1234\" \"example\" \"asdf123", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.375 + }, + { + "repo": "django-commons/django-unicorn", + "expected": "0", + "got": "0", + "got_raw": "0\n\n test_component.flavor = Flavor.objects.create(name=\"test\")\n test_component.save()\n\n assert test_component.flavor.name == \"test\"\n assert test_component.flavors.count() == 1\n\n\nclass FakeComponent(UnicornView):\n def __init__(self, *args, **kwargs):\n super().__init__(*args, **kwargs)\n self.flavor = None\n self.flavors = Flavor.objects.all()[:0]\n\n def render(self, context):\n return \"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "django-commons/django-unicorn", + "expected": "1", + "got": "1", + "got_raw": "1 # Only one call should be made to createChart in this test case.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "django-commons/django-unicorn", + "expected": "\"X-UNICORN\"", + "got": "\"HTTP_X_UNICORN\"", + "got_raw": "\"HTTP_X_UNICORN\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.7407407407407407 + }, + { + "repo": "django-commons/django-unicorn", + "expected": "0", + "got": "0", + "got_raw": "0\n\n component.queryset = Flavor.objects.all()[:1]\n component.set_property_value(\"queryset\", component.queryset)\n assert len(component.queryset) == 1\n\n\nclass FakeComponent(UnicornView):\n def __init__(self, *args, **kwargs):\n super().__init__(*args, **kwargs)\n self.queryset = None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "django-commons/django-unicorn", + "expected": "call_functions", + "got": "call_functions[0]", + "got_raw": "call_functions[0] assert \"childFunction\" in call_functions[1] assert \"grandchildFunction\" in call_functions[2]", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.9032258064516129 + }, + { + "repo": "django-commons/django-unicorn", + "expected": "flavor.name", + "got": "flavor.name", + "got_raw": "flavor.name == \"first-flavor\" assert actual.parent.pk == parent.pk assert actual.parent.name == \"parent-flavor\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "django-commons/django-unicorn", + "expected": "True", + "got": "True", + "got_raw": "True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "django-commons/django-unicorn", + "expected": "{\"NAME\": \"morphdom\"}", + "got": "{} settings[\"MORPHER\"] = {\"options\": {\"foo\": \"bar\"}} assert get_morpher_settings() == {\"options\": {\"foo\": \"bar\"}} settings[\"MORPHER\"] = {} assert get_morpher_settings() == {} settings[\"MORPHER\"] = {\"options\": {}} assert get_morpher_settings() == {\"options\": {}} settings[\"MORPHER\"] = {\"options\": {\"foo\": \"bar\"", + "got_raw": "{} settings[\"MORPHER\"] = {\"options\": {\"foo\": \"bar\"}} assert get_morpher_settings() == {\"options\": {\"foo\": \"bar\"}} settings[\"MORPHER\"] = {} assert get_morpher_settings() == {} settings[\"MORPHER\"] = {\"options\": {}} assert get_morpher_settings() == {\"options\": {}} settings[\"MORPHER\"] = {\"options\": {\"foo\": \"bar\", \"baz\": \"qux\"}} assert get_morpher_settings() == {\"options\": {\"foo\": \"bar\", \"baz\": \"qux\"}} settings", + "exact_match": false, + "code_bleu": 0.017569565056408977, + "edit_similarity": 0.0851063829787234 + }, + { + "repo": "django-commons/django-unicorn", + "expected": "component.integer", + "got": "component.int_prop_value_100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "component.int_prop_value_100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5946035575013605, + "edit_similarity": 0.1696969696969697 + }, + { + "repo": "django-commons/django-unicorn", + "expected": "grandparent", + "got": "grandparent.parent", + "got_raw": "grandparent.parent is None # grandparent is the root of the tree # pylint: disable=protected-access # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 ", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.7586206896551724 + }, + { + "repo": "django-commons/django-unicorn", + "expected": "flavor.pk", + "got": "flavor.pk", + "got_raw": "flavor.pk assert actual.name == flavor.name assert actual.parent.pk == parent.pk assert actual.parent.name == parent.name", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "django-commons/django-unicorn", + "expected": "parent", + "got": "parent", + "got_raw": "parent", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "django-commons/django-unicorn", + "expected": "0", + "got": "0", + "got_raw": "0\n\n\ndef test_component_mounted_signal(client):\n \"\"\"component_mounted fires after a component is mounted on an AJAX request.\"\"\"\n received, handler = _collect(component_mounted)\n try:\n post_and_get_response(\n client, url=FAKE_URL, data={\"method_count\": 0}\n )\n finally:\n component_mounted.disconnect(handler)\n\n assert len(received) >= 1\n last = received[-1]\n assert \"html\" in last\n assert isinstance(last[\"html\"], str)\n assert len(last[\"html\"])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "django-commons/django-unicorn", + "expected": "html", + "got": "html.strip()", + "got_raw": "html.strip() assert 'unicorn:script' in html.strip() assert 'unicorn:script' not in html.strip() assert 'unicorn:script' not in html.strip() assert 'unicorn:script' not in html.strip() assert 'unicorn:script' not in html.strip() assert 'unicorn:script' not in html.strip() assert 'unicorn:script' not in html.strip() assert 'unicorn:script' not in html.strip() assert 'unicorn:script' not in html.strip() assert 'unicorn:script' not in html.strip() assert 'unicorn:script' not in html.strip() assert 'unicorn:script", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5 + }, + { + "repo": "django-crispy-forms/django-crispy-forms", + "expected": "0", + "got": "0", + "got_raw": "0 # no labels in the html output expected = parse_expected(\"test_form_show_labels.html\") expected[\"html\"] = html expected[\"context\"] = {} expected[\"errors\"] = {} assert parse_expected(expected) == parse_form(form) # test with a form with media form.helper.layout = Layout( \"datetime_field\", \"first_name\", \"last_name\", \"password1\", \"password2\", ) form.helper.form_show_labels = True html = render_crispy_form(form) expected = parse_expected(\"test_form_show_labels_with_media.html\") expected[\"html\"] = html expected[\"context\"] = {} expected[\"errors\"] = {}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "django-crispy-forms/django-crispy-forms", + "expected": "Exception)", + "got": "Exception)", + "got_raw": "Exception) as e: template.render(c) assert str(e.value) == \"Invalid Unicode character in field name: \u00f1\" settings.CRISPY_FAIL_SILENTLY = True\n\n\ndef test_formset_helper():\n formset_helper = FormHelper()\n formset_helper.form_tag = False\n formset_helper.add_layout( Layout(\"name\", \"email\") )\n formset_helper.add_field(\"email\", \"email\")\n formset_helper.add_field(\"name\", \"name\")\n formset_helper.add_field(\"email\", \"email\")\n formset_helper.add_field(\"name\", \"name", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "django-crispy-forms/django-crispy-forms", + "expected": "1", + "got": "1", + "got_raw": "1 # we have one form tag in the template assert html.count(\"\") == 1 # we have one closing form tag in the template assert html.count(\"\") == 10 # we have 10 closing inputs in the template assert html.count(\"\") == 4 # we have 4 closing labels in the template assert html.count(\" None:\n arg = ParsedArgument(\n key=\"key\", value=\"value\", help=\"help\", required=True, default=\"default\"\n )\n assert arg.key == \"key\"\n assert arg.value == \"value\"\n assert arg.help == \"help\"\n assert arg.required is True\n assert arg.default == \"default\"\n\n assert str(arg) == \"key=value\"\n\n\ndef test_loader_settings() -> None:\n ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dreadnode/dyana", + "expected": "\"rw\"", + "got": "\"rw\"", + "got_raw": "\"rw\" call_kwargs[\"volumes\"][\"/artifacts\"][\"mode\"] == \"rw\" call_kwargs[\"volumes\"][\"/artifacts\"][\"bind\"] == \"/artifacts\" call_kwargs[\"volumes\"][\"/artifacts\"][\"type\"] == \"bind\" call_kwargs[\"volumes\"][\"/artifacts\"][\"read_only\"] == False call_kwargs[\"volumes\"][\"/host/path\"][\"bind\"] == \"/host/path\" call_kwargs[\"volumes\"][\"/host/path\"][\"type\"] == \"bind\" call_kwargs[\"volumes\"][\"/host/path\"][\"read_only\"] == True call_kwargs[\"volumes\"][\"/host/path\"][\"mode\"] ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "drivendataorg/erdantic", + "expected": "_UnevaluatedForwardRefError)", + "got": "_UnevaluatedForwardRefError)", + "got_raw": "_UnevaluatedForwardRefError) as exc_info: get_recursive_args(SomeForwardRef) # type: ignore # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E50", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "drivendataorg/erdantic", + "expected": "\"GlobalOtherClassBefore\"", + "got": "\"GlobalOtherClassBefore\"", + "got_raw": "\"GlobalOtherClassBefore\" assert fields[\"global_ref\"].raw_type == GlobalOtherClassBefore assert fields[\"nested_global_ref\"].raw_type == Optional[GlobalOtherClassBefore] assert fields[\"nested_global_ref\"].type_name == \"GlobalOtherClassBefore\" assert fields[\"global_ref\"].type_name == \"GlobalOtherClassBefore\" assert fields[\"global_ref\"].raw_type == GlobalOtherClassBefore assert fields[\"nested_global_ref\"].raw_type == Optional[GlobalOtherClassBefore] assert fields[\"nested_global_ref\"].type_name == \"GlobalOtherClassBefore\" assert fields[\"global_ref\"].type_name == \"GlobalOtherClassBefore\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "drivendataorg/erdantic", + "expected": "\"str\"", + "got": "\"str\"", + "got_raw": "\"str\" assert _maybe_quote_value(123) == 123 assert _maybe_quote_value(True) == True assert _maybe_quote_value(None) == None assert _maybe_quote_value(1.23) == 1.23 assert _maybe_quote_value([1, 2, 3]) == [1, 2, 3] assert _maybe_quote_value({\"a\": 1}) == {\"a\": 1} assert _maybe_quote_value({\"a\": 1, \"b\": 2}) == {\"a\": 1, \"b\": 2} assert _maybe", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "drivendataorg/erdantic", + "expected": "\"members\"", + "got": "\"members\"", + "got_raw": "\"members\" assert fields[2].type_name == \"PartyMember\" # members_count assert fields[3].model_full_name == FullyQualifiedName.from_object(dataclasses_examples.Party) assert fields[3].name == \"members_count\" assert fields[3].type_name == \"int\" # members_count is optional assert fields[3].is_optional is True # members_count is not a field assert fields[3].is_field is False # members_count is not a property assert fields[3].is_property is False # members_count is not a relationship assert fields[3].is_relationship is False # members_count is not a foreign", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "drivendataorg/erdantic", + "expected": "None", + "got": "None", + "got_raw": "None\n\n\ndef test_register_plugin_failure():\n \"\"\"Registering a plugin with a duplicate key should raise an error.\"\"\"\n\n key, _, _, _ = custom_plugin\n with pytest.raises(PluginNotFoundError) as excinfo:\n list_plugins().append(key)\n assert str(excinfo.value) == f\"Duplicate key '{key}'\"\n\n\ndef test_register_plugin_failure_with_custom_error():\n \"\"\"Registering a plugin with a custom error should raise the error.\"\"\"\r\n\r\n class CustomError(Exception): ...\r\n\r\n def custom_plugin(): ...\r\n\r\n with pytest.raises(CustomError) as excinfo:\r", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "drivendataorg/erdantic", + "expected": "GlobalOtherModelAfter", + "got": "GlobalOtherModelAfter", + "got_raw": "GlobalOtherModelAfter # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E72", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "drivendataorg/erdantic", + "expected": "\"str\"", + "got": "\"str\"", + "got_raw": "\"str\" assert fields[0].type_ == str assert fields[0].required is True assert fields[0].default is None assert fields[0].default_factory is None assert fields[0].metadata == {} assert fields[0].doc is None assert fields[0].repr is True assert fields[0].hash is True assert fields[0].compare is True assert fields[0].init is True assert fields[0].eq is True assert fields[0].order is False assert fields[0].gt is None assert fields[0].lt is None assert fields[0].ge is None assert fields[", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "drivendataorg/erdantic", + "expected": "predicate_fn", + "got": "predicate_fn", + "got_raw": "predicate_fn # type: ignore # noqa: E501 # pyright: ignore # noqa: E501 def test_get_field_extractor_fn(): cases = [ (\"attrs\", erdantic.plugins.attrs.extract_attrs_fields), (\"dataclasses\", erdantic.plugins.dataclasses.extract_dataclass_fields), (\"pydantic\", erdantic.plugins.pydantic.extract_pydantic_fields), ] if sys.version_info < (3, 14): cases.append((\"pydantic_v1\", erdantic.plugins.pydantic.extract_pydantic_v1_fields)) for key, extractor_fn in", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "drivendataorg/erdantic", + "expected": "\"Party\"", + "got": "\"ImportedRef\"", + "got_raw": "\"ImportedRef\" assert fields[\"imported_ref\"].raw_type == ImportedRef assert fields[\"imported_ref\"].type == ImportedRef assert fields[\"imported_ref\"].raw == ImportedRef( id=1, ) assert fields[\"imported_ref\"].type_name == \"ImportedRef\" assert fields[\"imported_ref\"].raw_type == ImportedRef assert fields[\"imported_ref\"].type == ImportedRef assert fields[\"imported_ref\"].raw == ImportedRef( id=1, ) assert fields[\"imported_ref\"].type_name == \"ImportedRef\" assert fields[\"imported_ref\"].raw_type == ImportedRef assert", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4 + }, + { + "repo": "drivendataorg/erdantic", + "expected": "\"GlobalWithFwdRefs\"", + "got": "\"GlobalWithFwdRefs\"", + "got_raw": "\"GlobalWithFwdRefs\" assert fields[\"self_ref\"].raw_type == GlobalWithFwdRefs\n\n\ndef test_forward_refs_local_scope():\n \"\"\"Local scope model with forward references that we can handle automatically.\"\"\"\n # Model is defined in a local scope\n fields = {fi.name: fi for fi in get_fields_from_pydantic_model(WithFwdRefs)}\n pprint({name: (fi.type_name, fi.raw_type) for name, fi in fields.items()})\n # Automatically resolved by Pydantic\n assert fields[\"imported_ref\"].type_name == \"Party\"\n assert fields", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "drivendataorg/erdantic", + "expected": "\"cf-many\"", + "got": "\"cf-many\"", + "got_raw": "\"cf-many\" assert _get_crowsfoot_d2(Cardinality.MANY, Modality.ONE) == \"cf-many-required\" assert _get_crowsfoot_d2(Cardinality.MANY, Modality.ZERO) == \"cf-many\" assert _get_crowsfoot_d2(Cardinality.MANY, Modality.MANY) == \"cf-many-many\" assert _get_crowsfoot_d2(Cardinality.MANY, Modality.MANY_REQUIRED) == \"cf-many-required\" assert _get_crowsfoot_d2(Cardinality.MANY, Modality.ZERO_REQUIRED) == \"cf-many-required\" assert _get_crowsfoot", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "drivendataorg/erdantic", + "expected": "msgspec_examples.Party", + "got": "Party", + "got_raw": "Party # noqa: E501\n\n\ndef test_forward_refs_local_scope():\n \"\"\"Local scope struct with forward references that we can handle automatically.\"\"\"\n # Class is defined in the local scope\n fields = {fi.name: fi for fi in get_fields_from_msgspec_struct(StructWithFwdRefs)}\n pprint({name: (fi.type_name, fi.raw_type) for name, fi in fields.items()})\n # Resolved by resolve_types_on_dataclass in get_fields_from_msgspec_struct\n assert fields[\"local_ref\"].type_name == \"LocalParty\" # noqa: E50", + "exact_match": false, + "code_bleu": 0.19820118583378682, + "edit_similarity": 0.37037037037037035 + }, + { + "repo": "drivendataorg/erdantic", + "expected": "expected_dataclasses_models", + "got": "expected_dataclasses_models", + "got_raw": "expected_dataclasses_models | expected_pydantic_models | {dataclasses_examples.Skill} | {dataclasses_examples.SkillLevel} | {dataclasses_examples.SkillTree} | {dataclasses_examples.SkillTreeLevel} | {dataclasses_examples.SkillTreeLevelSkill} | {dataclasses_examples.SkillTreeLevelSkillLevel} | {dataclasses_examples.SkillTreeLevelSkillLevelSkill} | {dataclasses_examples.SkillTreeLevelSkillLevelSkillLevel} | {dataclasses_examples.SkillTreeLevelSkillLevelSkillLevelSkill} | {dataclasses_examples.SkillTreeLevelSkillLevelSkillLevelSkillLevel} |", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "drivendataorg/erdantic", + "expected": "pydantic_examples.Party", + "got": "pydantic_examples.Party", + "got_raw": "pydantic_examples.Party # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "drivendataorg/erdantic", + "expected": "attrs_examples.Party", + "got": "Party", + "got_raw": "Party # noqa: E501\n\n\ndef test_forward_refs_local_scope():\n \"\"\"Local scope attrs class with forward references that we can handle automatically.\"\"\"\n # Class is defined in the local scope\n fields = {fi.name: fi for fi in get_fields_from_attrs_class(WithFwdRefs)}\n pprint({name: (fi.type_name, fi.raw_type) for name, fi in fields.items()})\n # Resolved by attrs.resolve_types() in get_fields_from_attrs_class\n assert fields[\"local_ref\"].type_name == \"LocalParty\" # noqa: E501\n\n\ndef", + "exact_match": false, + "code_bleu": 0.19820118583378682, + "edit_similarity": 0.4 + }, + { + "repo": "drvinceknight/Nashpy", + "expected": "(128, 2187)", + "got": "(2 ** 7, 2 ** 7)", + "got_raw": "(2 ** 7, 2 ** 7)", + "exact_match": false, + "code_bleu": 0.1354599427337814, + "edit_similarity": 0.5185185185185185 + }, + { + "repo": "drvinceknight/Nashpy", + "expected": "(1, number_of_rows + 1)", + "got": "(number_of_rows, number_of_rows) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,)", + "got_raw": "(number_of_rows, number_of_rows) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,) + (1,)", + "exact_match": false, + "code_bleu": 0.018307451043526695, + "edit_similarity": 0.1660377358490566 + }, + { + "repo": "drvinceknight/Nashpy", + "expected": "GeneratorType)", + "got": "GeneratorType)", + "got_raw": "GeneratorType) self.assertEqual( dimension, 2 ) self.assertEqual( number_of_strategies, 1 ) self.assertEqual( next(vertices_generator), np.array([0, 0]) ) self.assertEqual( next(vertices_generator), np.array([1, 1]) ) self.assertEqual( next(vertices_generator), np.array([2, 2]) ) self.assertEqual( next(vertices_generator), np.array([3, 3]) ) self.assertRaises(StopIteration) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "drvinceknight/Nashpy", + "expected": "[(), (0,), (1,), (0, 1)])", + "got": "[set(), {0}, {1}, {0, 1}])", + "got_raw": "[set(), {0}, {1}, {0, 1}])\n\n def test_potential_support_pairs(self):\n n = 2\n potential_support_pairs_ = list(potential_support_pairs(n))\n self.assertEqual(potential_support_pairs_, [(0, 1), (1, 0)])\n\n def test_obey_support(self):\n n = 2\n payoff_matrix = np.array([[2, 0], [0, 1]])\n support = {0, 1}\n self.assertEqual(obey_support(payoff_matrix, support), ", + "exact_match": false, + "code_bleu": 0.19491353005574866, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "drvinceknight/Nashpy", + "expected": "len(population)", + "got": "len(population)", + "got_raw": "len(population) * 2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "drvinceknight/Nashpy", + "expected": "(number_of_strategies + dimension, dimension + 1))", + "got": "dimension + 1) == len(halfspace) - 1) == number_of_strategies) == len(halfspace) - 1) == number_of_strategies) == dimension) == len(halfspace) - 1) == dimension) == dimension) == len(halfspace) - 1) == dimension) == dimension) == len(halfspace) - 1) == dimension) == dimension) == len(halfspace) - 1) == dimension) == dimension) == len(halfspace) - 1) == dimension) == dimension) == len(halfspace) -", + "got_raw": "dimension + 1) == len(halfspace) - 1) == number_of_strategies) == len(halfspace) - 1) == number_of_strategies) == dimension) == len(halfspace) - 1) == dimension) == dimension) == len(halfspace) - 1) == dimension) == dimension) == len(halfspace) - 1) == dimension) == dimension) == len(halfspace) - 1) == dimension) == dimension) == len(halfspace) - 1) == dimension) == dimension) == len(halfspace) - ", + "exact_match": false, + "code_bleu": 0.030548292950544467, + "edit_similarity": 0.20935412026726058 + }, + { + "repo": "drvinceknight/Nashpy", + "expected": "DeprecationWarning)", + "got": "DeprecationWarning)", + "got_raw": "DeprecationWarning) self.assertEqual(str(w[0].message), \"The initial_dropped_label argument to lemke_howson_lex is deprecated\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "drvinceknight/Nashpy", + "expected": "{len(initial_population)}", + "got": "{3}", + "got_raw": "{3} and set(last_generation) == {0, 1, 2} and np.all(0 <= last_generation) and np.all(last_generation <= 2) and np.all(np.sum(M, axis=0) == np.sum(M, axis=1)) and np.all(np.sum(M, axis=0) == np.sum(M, axis=1, keepdims=True)) and np.all(np.sum(M, axis=1) == np.sum(M, axis=1, keepdims=True)) and np.all(np.sum(M, axis=0) == np.sum(M, axis=1)) and np.all(np", + "exact_match": false, + "code_bleu": 0.24999999999999997, + "edit_similarity": 0.14285714285714285 + }, + { + "repo": "drvinceknight/Nashpy", + "expected": "True", + "got": "True", + "got_raw": "True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "drvinceknight/Nashpy", + "expected": "np.array_equal(halfspace[number_of_strategies:, :-1], -np.eye(dimension)))", + "got": "halfspace) == np.array([[1, 0, 0, 0, 0, -1], [0, 1, 0, 0, 0, -1], [0, 0, 1, 0, 0, -1], [0, 0, 0, 1, 0, -1], [0, 0, 0, 0, 1, -1], [0, 0, 0, 0, 0, 1]])) ) ) ) ) ) ) ) ) ) ) ) ) )", + "got_raw": "halfspace) == np.array([[1, 0, 0, 0, 0, -1], [0, 1, 0, 0, 0, -1], [0, 0, 1, 0, 0, -1], [0, 0, 0, 1, 0, -1], [0, 0, 0, 0, 1, -1], [0, 0, 0, 0, 0, 1]])) ) ) ) ) ) ) ) ) ) ) ) ) )", + "exact_match": false, + "code_bleu": 0.04948080245556937, + "edit_similarity": 0.192 + }, + { + "repo": "drvinceknight/Nashpy", + "expected": "1", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "dylanljones/pyrekordbox", + "expected": "len(blues)", + "got": "len(blues)", + "got_raw": "len(blues) == 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dylanljones/pyrekordbox", + "expected": "times)", + "got": "times)", + "got_raw": "times)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dylanljones/pyrekordbox", + "expected": "0", + "got": "0", + "got_raw": "0 # Check if the output contains the expected help text assert \"Usage:\" in result.stdout # Check if the help text is not empty assert result.stdout.strip() != \"\" # Check if the help text contains the expected options assert \"--help\" in result.stdout.lower() assert \"--version\" in result.stdout.lower() # Check if the help text contains the expected examples assert \"Examples:\" in result.stdout.lower() assert \"pyrekordbox --help\" in result.stdout.lower() assert \"pyrekordbox --version\" in result.stdout.lower() # Check if the help text contains the expected options assert \"--help\" in result.stdout.lower()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dylanljones/pyrekordbox", + "expected": "p", + "got": "p", + "got_raw": "p else: assert_equal(tmp, p) tmp = p", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dynaconf/dynaconf", + "expected": "RuntimeError)", + "got": "RuntimeError)", + "got_raw": "RuntimeError) as excinfo: load(None, key=\"SECRET\") assert str(excinfo.value) == \"No redis server configured\" assert not is_responsive(\"redis://localhost:6379\") delete(None, key=\"SECRET\") write(None, {\"SECRET\": \"redis_works\"}) assert load(None, key=\"SECRET\") == \"redis_works\" assert is_responsive(\"redis://localhost:6379\") delete(None, key=\"SECRET\") write(None, {\"SECRET\": \"redis_works\"}) assert load(None, key=\"SECRET\") == \"redis_works\" assert is_responsive(\"redis://localhost", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dynaconf/dynaconf", + "expected": "\"7.2\"", + "got": "\"7.2\"", + "got_raw": "\"7.2\" assert settings.server.deploy_arguments.snap_version == \"22\" assert settings.server.deploy_arguments.rhel_version == \"7\" assert settings.server.deploy_workflow == \"deploy-sat-jenkins\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dynaconf/dynaconf", + "expected": "\"testing\"", + "got": "\"testing\"", + "got_raw": "\"testing\" assert settings.PORT == 4040 assert settings.PLUGIN == \"extra production var\" assert settings.CUSTOM.NESTED_1.NESTED_2.NESTED_3.NESTED_4.TOML == 5 assert settings.CUSTOM.NESTED_1.NESTED_2.NESTED_3.NESTED_4.NESTED_1 == 1 assert settings.CUSTOM.NESTED_1.NESTED_2.NESTED_3.NESTED_4.NESTED_2 == 2 assert settings.CUSTOM.NESTED_1.NESTED_", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dynaconf/dynaconf", + "expected": "value", + "got": "value", + "got_raw": "value\n\n assert flask_app.config[\"DB\"] == DBDATA(\"localhost\", 5432)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dynaconf/dynaconf", + "expected": "val", + "got": "val", + "got_raw": "val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr == val or attr ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dynaconf/dynaconf", + "expected": "{\"name\": \"Bruno\", \"age\": 17})", + "got": "\"John\")", + "got_raw": "\"John\")", + "exact_match": false, + "code_bleu": 0.1074569931823542, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "dynaconf/dynaconf", + "expected": "0", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "dynaconf/dynaconf", + "expected": "1", + "got": "1", + "got_raw": "1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dynaconf/dynaconf", + "expected": "True", + "got": "True", + "got_raw": "True\n\n\ndef test_load_multiple_keys():\n \"\"\"Test loading multiple keys\"\"\"\n load(settings, filename=JSON, env=\"PRODUCTION\", key=\"default\")\n assert settings.DEFAULT[\"password\"] == 11111\n assert settings.DEFAULT[\"host\"] == \"prodserver.com\"\n assert settings.DEFAULT[\"alist\"] == [23]\n assert settings.DEFAULT[\"service\"][\"url\"] == \"service.com\"\n assert settings.DEFAULT[\"service\"][\"port\"] == 80\n assert settings.DEFAULT[\"service\"][\"auth\"][\"password\"] == \"qwerty\"\n assert settings.DEFAULT[\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dynaconf/dynaconf", + "expected": "2", + "got": "2", + "got_raw": "2 # Assert values set by the second hook only assert settings.INSTALLED_APPS == [\"admin\", \"extra\"] assert settings.COLORS == [\"red\", \"green\", \"yellow\"] assert settings.DATABASES.default.PORT == 5152 assert settings.DATABASES.default.VERSION == 43 assert settings.DATABASES.default.FORCED_INT == 13 assert settings.BANDS == [\"Opeth\", \"dynaconf_merge\"] assert settings.FULL_NAME == \"Bruce Rock\" assert settings.FULL_PATH == \"/etc/frutaria/batata/\" # Assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dynaconf/dynaconf", + "expected": "\"testing\"", + "got": "\"test\"", + "got_raw": "\"test\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.8 + }, + { + "repo": "dynaconf/dynaconf", + "expected": "0", + "got": "0", + "got_raw": "0 assert settings.NESTED_A.NESTED_B[0][2].NESTED_C.NESTED_D[0] == \"extra_conf\" assert settings.NESTED_A.NESTED_B[0][2].NESTED_C.NESTED_D[1] == \"new_conf2\" assert settings.NESTED_A.NESTED_B[0][2].NESTED_C.NESTED_D[2] == \"new_conf1\" assert settings.NESTED_A.NESTED_B[0][2].NESTED_C.NESTED_D[3] == \"old_conf\" assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dynaconf/dynaconf", + "expected": "42", + "got": "42.0", + "got_raw": "42.0 # float is converted to int # noqa: E501 assert settings.other_person.name == \"Erik\" assert settings.other_person.age == 5.0 # float is converted to int assert settings.even_other_person.name == \"John\" assert settings.even_other_person.age == 21.0 assert settings.yet_another_person.name == \"John\" assert settings.yet_another_person.age == 19.0 # float is converted to int assert settings.yet_another_person.colors == [] # noqa: E501 assert settings.yet_another_person", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "dynaconf/dynaconf", + "expected": "RuntimeError)", + "got": "RuntimeError)", + "got_raw": "RuntimeError) as e: write({\"SECRET\": \"redis_works\"}) assert str(e.value) == \"No vault configuration found\" in e.value.__str__()\n\n\n@pytest.mark.integration\ndef test_write_vault_configured(settings, docker_vault): url = docker_vault(\"127.0.0.1\") write(settings, {\"SECRET\": \"redis_works\"}) assert load(settings, key=\"SECRET\") == \"redis_works\" assert get_history(settings) == [{\"SECRET\": \"redis_works\"}] assert settings.VAULT_TOKEN is not None assert settings.VAULT_ADDR == url assert settings", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dynaconf/dynaconf", + "expected": "2", + "got": "\"1\"", + "got_raw": "\"1\" # noqa: E711\n\n\ndef test_hookable_settings():\n @hookable\n class TestSettings(HookableSettings):\n a: int = 1\n b: int = 2\n\n settings = TestSettings()\n assert settings.a == 1\n assert settings.b == 2\n\n settings.a = 2\n assert settings.a == 2\n assert settings.b == 2 # noqa: E711\n\n\ndef test_hookable_settings_with_default():\n @hookable\n class TestSettings(HookableSettings):\n a", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "dynaconf/dynaconf", + "expected": "\"Task2-2\"", + "got": "\"Task2-2\"", + "got_raw": "\"Task2-2\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dynaconf/dynaconf", + "expected": "settings.PORT", + "got": "settings.PORT", + "got_raw": "settings.PORT", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dynaconf/dynaconf", + "expected": "\"blaz\"", + "got": "\"blaz\"", + "got_raw": "\"blaz\" def test_load_multiple_keys(): \"\"\"Test loading multiple keys\"\"\" load(settings, filename=_JSON, env=\"FOO\") assert settings.BAR == \"blaz\" assert settings.ZAZ == \"naz\" def test_load_multiple_keys_with_prefix(): \"\"\"Test loading multiple keys with a prefix\"\"\" load( settings, filename=_JSON, env=\"FOO\", prefix=\"foo.\" ) assert settings.FOO_BAR == \"blaz\" assert settings.FOO_ZAZ == \"naz\" def test_load_multiple_keys_with_prefix_and_key(): \"\"\"Test loading multiple keys with a prefix and key\"\"\" load( settings, filename=_JSON", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "dynaconf/dynaconf", + "expected": "6", + "got": "3", + "got_raw": "3 * 2 + 1 * 2 + 1 * 3 + 1 * 4 + 1 * 5 + 1 * 6 + 1 * 7 + 1 * 8 + 1 * 9 + 1 * 10 + 1 * 11 + 1 * 12 + 1 * 13 + 1 * 14 + 1 * 15 + 1 * 16 + 1 * 17 + 1 * 18 + 1 * 19 + 1 * 2", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "dynaconf/dynaconf", + "expected": "\"b\")", + "got": "\"b\")", + "got_raw": "\"b\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ebellocchia/bip_utils", + "expected": "TypeError)", + "got": "TypeError)", + "got_raw": "TypeError) for enc in TEST_VECT_DEC_BASE58_INVALID: WifEncoder.Encode(enc) WifEncoder.Encode(enc, CoinsConf.BitcoinMainNet) WifEncoder.Encode(enc, CoinsConf.BitcoinTestNet) WifEncoder.Encode(enc, CoinsConf.DashMainNet) WifEncoder.Encode(enc, CoinsConf.DashTestNet) WifEncoder.Encode(enc, CoinsConf.DogecoinMainNet) WifEncoder.Encode(enc, CoinsConf.DogecoinTestNet) WifEncoder.Encode(enc, CoinsConf.LitecoinMainNet) WifEncoder.Encode(enc, CoinsConf.LitecoinTest", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ebellocchia/bip_utils", + "expected": "XlmAddr is XlmAddrEncoder)", + "got": "XlmAddr is XlmAddrEncoder) self.assertFalse( XlmAddr is XlmAddrDecoder ) self.assertTrue( XlmAddr is XlmAddrEncoder ) self.assertFalse( XlmAddr is XlmAddrDecoder ) self.assertTrue( XlmAddr is XlmAddrEncoder ) self.assertFalse( XlmAddr is XlmAddrDecoder ) self.assertTrue( XlmAddr is XlmAddrEncoder ) self.assertFalse( XlmAddr is XlmAddrDecoder ) self.assertTrue( XlmAddr is XlmAddrEncoder ) self.assertFalse( XlmAddr is XlmAddrDecoder ) self.assertTrue( XlmAddr is XlmAddrEncoder", + "got_raw": "XlmAddr is XlmAddrEncoder) self.assertFalse( XlmAddr is XlmAddrDecoder ) self.assertTrue( XlmAddr is XlmAddrEncoder ) self.assertFalse( XlmAddr is XlmAddrDecoder ) self.assertTrue( XlmAddr is XlmAddrEncoder ) self.assertFalse( XlmAddr is XlmAddrDecoder ) self.assertTrue( XlmAddr is XlmAddrEncoder ) self.assertFalse( XlmAddr is XlmAddrDecoder ) self.assertTrue( XlmAddr is XlmAddrEncoder ) self.assertFalse( XlmAddr is XlmAddrDecoder ) self.assertTrue( XlmAddr is XlmAddrEncoder", + "exact_match": false, + "code_bleu": 0.040121877637459134, + "edit_similarity": 0.10297029702970296 + }, + { + "repo": "ebellocchia/bip_utils", + "expected": "TypeError)", + "got": "TypeError)", + "got_raw": "TypeError) Base58Encoder(123)\n\n def test_invalid_alphabet_type(self):\n\n self.assertRaises(\n### Target:\nTypeError) Base58Encoder(\"ABC\")\n\n def test_invalid_alphabet_value(self):\n\n self.assertRaises(\n### Target:\nValueError) Base58Encoder(Base58Alphabets.Base58Alphabet)\n\n def test_invalid_raw(self):\n\n self.assertRaises(TypeError) Base58Encoder().Encode(123)\n\n def test_invalid_raw_type(self):\n\n self.assertRaises(TypeError) Base58Encoder().", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ebellocchia/bip_utils", + "expected": "TypeError)", + "got": "TypeError)", + "got_raw": "TypeError) MoneroPrivateKey(key)\n\n # Public key\n for key in (TEST_ED25519_PUB_KEY, TEST_ED25519_BLAKE2B_PUB_KEY, TEST_ED25519_MONERO_PUB_KEY,\n TEST_NIST256P1_PUB_KEY, TEST_SECP256K1_PUB_KEY, TEST_SR25519_PUB_KEY):\n\n self.assertRaises(TypeError) MoneroPublicKey(key)\n\n def test_from_bytes(self):\r\n # Private key\r\n for key in (TEST_ED25", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ebellocchia/bip_utils", + "expected": "TypeError)", + "got": "TypeError)", + "got_raw": "TypeError) for _ in range(10) for _ in range(10) for _ in range(10) for _ in range(10) for _ in range(10) for _ in range(10) for _ in range(10) for _ in range(10) for _ in range(10) for _ in range(10) for _ in range(10) for _ in range(10) for _ in range(10) for _ in range(10) for _ in range(10) for _ in range(1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ebellocchia/bip_utils", + "expected": "monero_obj.PrimaryAddress())", + "got": "monero_obj.PrimaryAddress())", + "got_raw": "monero_obj.PrimaryAddress()) # Test integrated address if exists self.assertEqual(test[\"integrated_address\"], monero_obj.IntegratedAddress()) # Test subaddresses if exists self.assertEqual(test[\"subaddresses\"], monero_obj.Subaddresses()) # Test payment ID if exists self.assertEqual(test[\"payment_id\"], monero_obj.PaymentID()) # Test address if exists self.assertEqual(test[\"address\"], monero_obj.Address()) # Test public key if exists self.assertEqual(test[\"public_key\"], monero_obj.PublicKey()) # Test secret key if exists self.assertEqual(test[\"secret_key\"], monero_obj.SecretKey()) # Test public key if exists self.assertEqual(test", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ebellocchia/bip_utils", + "expected": "str(mnemonic))", + "got": "mnemonic.ToStr())", + "got_raw": "mnemonic.ToStr()) # Test mnemonic decoder mnemonic = MoneroMnemonicDecoder(lang).FromStr(test[\"mnemonic\"]) self.assertEqual(test[\"entropy\"], binascii.hexlify(mnemonic.ToEntropy())) self.assertEqual(test[\"entropy\"], binascii.hexlify(mnemonic.ToEntropy())) # Test seed generator seed = MoneroSeedGenerator(lang).FromEntropyWithChecksum(binascii.unhexlify(test[\"entropy\"])) self.assertEqual(test[\"priv_skey\"], seed.ToPrivKey()) self.assertEqual(test[\"priv_skey\"], seed.ToPrivKey()) # Test entropy generator entropy = MoneroEntropyGenerator(lang).FromStr(test[\"mnemonic\"]) self.assertEqual(test", + "exact_match": false, + "code_bleu": 0.3303164318013807, + "edit_similarity": 0.6451612903225806 + }, + { + "repo": "ebellocchia/bip_utils", + "expected": "path_elem.IsHard())", + "got": "path_elem.IsHard())", + "got_raw": "path_elem.IsHard())\n\n def test_path(self):\n for test in TEST_VECT_PATH:\n path = SubstratePath(test[\"path\"])\n self.assertEqual(test[\"path\"], path.ToStr())\n self.assertEqual(test[\"parsed\"], path.ToList())\n\n def test_add_elem(self):\n for test in TEST_VECT_ADD_ELEM:\n path = SubstratePath(test[\"path\"])\n path.AddElem(test[\"elem\"])\n self.assertEqual(test[\"path\"], path.ToStr())\n\n def test_from_str(self):\n for test in TEST_VECT_PATH_ELEM", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ebellocchia/bip_utils", + "expected": "Bip32Depth(1) < Bip32Depth(2))", + "got": "Bip32KeyDataConst.XPrv == Bip32KeyDataConst.XPrv)", + "got_raw": "Bip32KeyDataConst.XPrv == Bip32KeyDataConst.XPrv)\n self.assertTrue(\n### Target:\nBip32KeyDataConst.XPrv != Bip32KeyDataConst.XPub)\n self.assertTrue(\n### Target:\nBip32KeyDataConst.XPub != Bip32KeyDataConst.XPrv)\n self.assertTrue(\n### Target:\nBip32KeyDataConst.XPub == Bip32KeyDataConst.XPub)\n self.assertTrue(\n### Target:\nBip32KeyDataConst.XPrv != 1)\n ", + "exact_match": false, + "code_bleu": 0.127025927377108, + "edit_similarity": 0.43037974683544306 + }, + { + "repo": "ebellocchia/bip_utils", + "expected": "bip32_obj.Index())", + "got": "bip32_obj.Index())", + "got_raw": "bip32_obj.Index()) self.assertEqual(test[\"parent_fprint\"], bip32_obj.ParentFingerPrint().ToHex()) self.assertEqual(test[\"chain_code\"], bip32_obj.ChainCode().ToHex()) self.assertEqual(test[\"pub_key\"], bip32_obj.PublicKey().RawCompressed().ToHex()) self.assertEqual(test[\"ex_pub\"], bip32_obj.PublicKey().ToExtended()) self.assertEqual(test[\"curve_type\"], bip32_obj.CurveType()) self.assertEqual(test[\"curve_name\"], bip32_obj.Curve().Name()) self.assertEqual(test[\"curve_order\"], bip32_obj.Curve().Order", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ebellocchia/bip_utils", + "expected": "TypeError)", + "got": "TypeError)", + "got_raw": "TypeError) as excep1: Brainwallet.FromPrivateKey(None) self.assertEqual( str(excep1.exception), \"Private key must be a byte string\" ) self.assertRaises( TypeError) as excep2: Brainwallet.FromPublicKey(None) self.assertEqual( str(excep2.exception), \"Public key must be a byte string\" ) self.assertRaises( TypeError) as excep3: Brainwallet.FromAddress(None) self.assertEqual( str(excep3.exception), \"Address must be a byte string\" ) self.assertRaises( TypeError) as excep4: Brainwallet.FromSecret(None) self.assertEqual( str(excep4.exception), \"Secret", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ebellocchia/bip_utils", + "expected": "int(elem))", + "got": "elem)", + "got_raw": "elem) self.assertEqual(test_elem.ToStr(), elem.ToStr()) self.assertEqual(test_elem.ToStr(), str(elem)) self.assertEqual(test_elem.ToStr(), str(elem.ToStr())) self.assertEqual(test_elem.ToStr(), str(elem.ToStr())) self.assertEqual(test_elem.ToStr(), str(elem.ToStr())) self.assertEqual(test_elem.ToStr(), str(elem.ToStr())) self.assertEqual(test_elem.ToStr(), str(elem.ToStr())) self.assertEqual(test_elem.ToStr(), str(elem.ToStr())) self.assertEqual(test_elem.ToStr(), str(elem.ToStr())) self.assertEqual(test_elem.ToStr(), str(elem.ToStr())) self.assertEqual(test_elem.ToStr(), str(elem", + "exact_match": false, + "code_bleu": 0.28284271247461906, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "ebellocchia/bip_utils", + "expected": "binascii.hexlify(seed))", + "got": "binascii.hexlify(seed))", + "got_raw": "binascii.hexlify(seed))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ebellocchia/bip_utils", + "expected": "ValueError)", + "got": "binascii.Error)", + "got_raw": "binascii.Error) addr_dec_class.DecodeAddr(addr, **addr_params)", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.5384615384615384 + }, + { + "repo": "ebellocchia/bip_utils", + "expected": "str(mnemonic))", + "got": "mnemonic.ToStr())", + "got_raw": "mnemonic.ToStr()) # Test mnemonic decoder # Test mnemonic type # Test mnemonic language # Test mnemonic length # Test mnemonic words count # Test mnemonic checksum # Test mnemonic checksum length # Test mnemonic checksum algorithm # Test mnemonic checksum algorithm length # Test mnemonic checksum algorithm name # Test mnemonic checksum algorithm name length # Test mnemonic checksum algorithm name # Test mnemonic checksum algorithm name length # Test mnemonic checksum algorithm name # Test mnemonic checksum algorithm name length # Test mnemonic checksum algorithm name # Test mnemonic checksum algorithm name length # Test mnemonic checksum algorithm name # Test mnemonic checksum algorithm name length # Test mnemonic checksum algorithm name # Test mnemonic checksum algorithm name length # Test mnemonic checksum", + "exact_match": false, + "code_bleu": 0.3303164318013807, + "edit_similarity": 0.6451612903225806 + }, + { + "repo": "ebellocchia/bip_utils", + "expected": "conv_addr)", + "got": "str(conv_addr))", + "got_raw": "str(conv_addr))", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.8 + }, + { + "repo": "ebellocchia/bip_utils", + "expected": "curve_type)", + "got": "curve_type)", + "got_raw": "curve_type) self.assertEqual(bip32_class.CurveOrder(), 0) self.assertEqual(bip32_class.CurveOrderSizeInBytes(), 0) self.assertEqual(bip32_class.CurveOrderSizeInBits(), 0) self.assertEqual(bip32_class.CurveCofactor(), 0) self.assertEqual(bip32_class.CurveCofactorSizeInBits(), 0) self.assertEqual(bip32_class.CurvePointSizeInBytes(), 0) self.assertEqual(bip32_class.CurvePointSizeInBits(), 0) self.assertEqual(bip32_class.C", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ebellocchia/bip_utils", + "expected": "P2SHAddr is P2SHAddrEncoder)", + "got": "P2SHAddr is P2SHAddrEncoder) self.assertFalse(P2SHAddr is P2SHAddrDecoder) self.assertTrue(P2SHAddr is P2SHAddrEncoder) self.assertFalse(P2SHAddr is P2SHAddrEncoder) self.assertFalse(P2SHAddr is P2SHAddrEncoder) self.assertFalse(P2SHAddr is P2SHAddrEncoder) self.assertFalse(P2SHAddr is P2SHAddrEncoder) self.assertFalse(P2SHAddr is P2SHAddrEncoder) self.assertFalse(P2SHAddr is P2SHAddrEncoder) self.assertFalse(P2SHAddr is P2SHAddrEncoder)", + "got_raw": "P2SHAddr is P2SHAddrEncoder) self.assertFalse(P2SHAddr is P2SHAddrDecoder) self.assertTrue(P2SHAddr is P2SHAddrEncoder) self.assertFalse(P2SHAddr is P2SHAddrEncoder) self.assertFalse(P2SHAddr is P2SHAddrEncoder) self.assertFalse(P2SHAddr is P2SHAddrEncoder) self.assertFalse(P2SHAddr is P2SHAddrEncoder) self.assertFalse(P2SHAddr is P2SHAddrEncoder) self.assertFalse(P2SHAddr is P2SHAddrEncoder) self.assertFalse(P2SHAddr is P2SHAddrEncoder)", + "exact_match": false, + "code_bleu": 0.04384256821443283, + "edit_similarity": 0.11940298507462686 + }, + { + "repo": "ebellocchia/bip_utils", + "expected": "str(path_elem))", + "got": "str(path_elem))", + "got_raw": "str(path_elem)) self.assertEqual(test[\"is_hard\"], path_elem.IsHard()) self.assertEqual(test[\"chain_code\"], path_elem.ChainCode()) self.assertEqual(test[\"chain_code\"], path_elem.ToBytes()) self.assertEqual(test[\"chain_code\"], binascii.hexlify(path_elem.ToBytes())) self.assertEqual(test[\"chain_code\"], binascii.hexlify(path_elem.ToStr().encode())) self.assertEqual(test[\"chain_code\"], binascii.hexlify(path_elem.ToStr().encode(\"utf-8\"))) self.assertEqual(test[\"chain_code\"], binascii.hexlify(path_elem.ToStr().encode(\"utf-16\"))) self.assertEqual(test[\"chain_code\"], binascii", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ebellocchia/bip_utils", + "expected": "test_bit_len // 8)", + "got": "test_bit_len // 8)", + "got_raw": "test_bit_len // 8) # Test validator\n\n self.assertTrue(MoneroMnemonicValidator().IsValid(entropy)) # Test decoder\n\n self.assertEqual(entropy, MoneroMnemonicDecoder().ToEntropy(test_bit_len)) # Test seed generator\n\n self.assertEqual(entropy, MoneroSeedGenerator().Generate(test_bit_len)) # Test mnemonic generator\n\n self.assertEqual(entropy, MoneroMnemonicGenerator().Generate(test_bit_len)) # Test mnemonic to entropy conversion\n\n self.assertEqual(test_bit_len, MoneroMnemonicGenerator().ToEntropy(test_bit_len).Length()) # Test entropy to mnemonic conversion\n\n self.assertEqual", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ekzhu/datasketch", + "expected": "key in keys)", + "got": "key in keys)", + "got_raw": "key in keys)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ekzhu/datasketch", + "expected": "d[lm2])", + "got": "d[lm3])", + "got_raw": "d[lm3])", + "exact_match": false, + "code_bleu": 0.45180100180492244, + "edit_similarity": 0.8571428571428571 + }, + { + "repo": "ekzhu/datasketch", + "expected": "b1 < b2)", + "got": "b1 != b2) self.assertTrue(r1 != r2) self.assertTrue(lsh.is_empty()) lsh = MinHashLSH(threshold=0.8", + "got_raw": "b1 != b2) self.assertTrue(r1 != r2) self.assertTrue(lsh.is_empty()) lsh = MinHashLSH(threshold=0.8, num_perm=128) self.assertTrue(lsh.is_empty()) lsh = MinHashLSH(threshold=0.8, num_perm=128, random_state=42) self.assertTrue(lsh.is_empty()) lsh = MinHashLSH(threshold=0.8, num_perm=128, random_state=42) self.assertTrue(lsh.is_empty()) lsh = MinHashLSH(threshold=0", + "exact_match": false, + "code_bleu": 0.055177848898164926, + "edit_similarity": 0.1320754716981132 + }, + { + "repo": "ekzhu/datasketch", + "expected": "m2)", + "got": "m2)", + "got_raw": "m2) self.assertNotEqual(m1, m3) self.assertNotEqual(m1, m4) self.assertNotEqual(m1, m5) self.assertEqual(m1, m1) self.assertEqual(m2, m2) self.assertEqual(m3, m3) self.assertEqual(m4, m4) self.assertEqual(m5, m5) self.assertEqual(m1, m5) self.assertEqual(m2, m5) self.assertEqual(m3, m5) self.assertEqual(m4, m5) self.assertEqual(m1, m1) self.assertEqual(m2, m2) self.assertEqual(m3, m3) self.assertEqual", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ekzhu/datasketch", + "expected": "lm1.jaccard(lm2) < 1.0)", + "got": "lm1.jaccard(lm2) == 0.0)", + "got_raw": "lm1.jaccard(lm2) == 0.0)", + "exact_match": false, + "code_bleu": 0.5900468726392808, + "edit_similarity": 0.8936170212765957 + }, + { + "repo": "ekzhu/datasketch", + "expected": "b1 < b2)", + "got": "b1 == b2) self.assertTrue(r1 == r2) self.assertTrue(lsh.b == lsh.r) self.assertTrue(lsh.b == lsh.n) self.assertTrue(lsh.b == lsh.threshold) self.assertTrue(lsh.b == lsh.fp) self.assertTrue(lsh.b == lsh.num_perm) self.assertTrue(lsh.b == lsh.num_hashvalues) self.assertTrue(lsh.b == lsh.num_hashfunctions) self.assertTrue(lsh.b == lsh.num_hash) self.assertTrue(lsh.b == lsh.num_hash_tables) self.assertTrue(lsh.b == lsh.num_tables) self.assertTrue(lsh.b", + "got_raw": "b1 == b2) self.assertTrue(r1 == r2) self.assertTrue(lsh.b == lsh.r) self.assertTrue(lsh.b == lsh.n) self.assertTrue(lsh.b == lsh.threshold) self.assertTrue(lsh.b == lsh.fp) self.assertTrue(lsh.b == lsh.num_perm) self.assertTrue(lsh.b == lsh.num_hashvalues) self.assertTrue(lsh.b == lsh.num_hashfunctions) self.assertTrue(lsh.b == lsh.num_hash) self.assertTrue(lsh.b == lsh.num_hash_tables) self.assertTrue(lsh.b == lsh.num_tables) self.assertTrue(lsh.b", + "exact_match": false, + "code_bleu": 0.01117501156028349, + "edit_similarity": 0.030434782608695653 + }, + { + "repo": "ekzhu/datasketch", + "expected": "lm2)", + "got": "lm2)", + "got_raw": "lm2) self.assertNotEqual(lm1, lm3) self.assertNotEqual(lm1, lm4) self.assertNotEqual(lm1, lm5) self.assertNotEqual(lm2, lm3) self.assertNotEqual(lm2, lm4) self.assertNotEqual(lm2, lm5) self.assertNotEqual(lm3, lm4) self.assertNotEqual(lm3, lm5) self.assertNotEqual(lm4, lm5) self.assertEqual(lm1, m1) self.assertEqual(lm2, m2) self.assertEqual(lm3, m3) self.assertEqual(lm4, m4", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ekzhu/datasketch", + "expected": "0)", + "got": "0)", + "got_raw": "0) if H != 0 else 1 else 0) self.assertIn(\"b\", table[H]) else 0) self.assertIn(\"a\", table[H]) else 0) self.assertIn(\"b\", table[H]) else 0) self.assertIn(\"b\", table[H]) else 0) self.assertIn(\"b\", table[H]) else 0) self.assertIn(\"b\", table[H]) else 0) self.assertIn(\"b\", table[H]) else 0) self.assertIn(\"b\", table[H]) else 0) self.assertIn(\"b\", table[H]) else 0) self.assertIn(\"b\", table", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ekzhu/datasketch", + "expected": "h2.hashfunc)", + "got": "h2.hashfunc)", + "got_raw": "h2.hashfunc) self.assertEqual(h1.precision, h2.precision) self.assertEqual(h1.num_bits, h2.num_bits) self.assertEqual(h1.num_hashes, h2.num_hashes) self.assertEqual(h1.hashvalues, h2.hashvalues) self.assertEqual(h1.counts, h2.counts) self.assertEqual(h1.hashvalues, h1.hashvalues) self.assertEqual(h1.counts, h1.counts) self.assertEqual(h1.hashvalues, h1.hashvalues) self.assertEqual(h1.counts, h1.counts) self.assertEqual(h1.hashvalues, h1.hashvalues) self.assertEqual(h1.count", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ekzhu/datasketch", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) lsh.insert(m3)\n\n def test_query(self):\n lsh = MinHashLSHBloom(threshold=0.5, num_perm=16, n=10, fp=0.01)\n m1 = MinHash(16)\n m1.update(b\"a\")\n m2 = MinHash(16)\n m2.update(b\"b\")\n lsh.insert(m1)\n lsh.insert(m2)\n\n self.assertTrue(lsh.query(m1))\n self.assertTrue(lsh.query(m2))\n self.assertFalse(lsh", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ekzhu/datasketch", + "expected": "4)", + "got": "1", + "got_raw": "1 << 4) self.assertEqual(h.m, 1 << 4) self.assertEqual(h.r, 4) self.assertEqual(h.b, 1 << 3) self.assertEqual(h.alpha, 0.7213) self.assertEqual(h.epsilon, 0.0709) self.assertEqual(h.hashfunc, fake_hash_func) self.assertEqual(h._reg, reg) self.assertEqual(h._reg.dtype, np.int8) self.assertEqual(h._reg.size, 1 << 4) self.assertEqual(h._reg.shape, (1 << 4,)) self.assertEqual(h._reg[0], 1)", + "exact_match": false, + "code_bleu": 0.25, + "edit_similarity": 0.0 + }, + { + "repo": "eliangcs/pystock-crawler", + "expected": "{ 'symbol': 'ALL', 'amend': False, 'doc_type': '10-Q', 'period_focus': 'Q1', 'fiscal_year': 2013, 'end_date': '2013-03-31', 'revenues': 8463000000, 'op_income': None, 'net_income': 709000000, 'eps_basic': 1.49, 'eps_diluted': 1.47, 'dividend': 0.25, 'assets': 126612000000, 'cur_assets': None, 'cur_liab': None, 'equity': 20619000000, 'cash': 820000000, 'cash_flow_op': 740000000, 'cash_flow_inv': 136000000, 'cash_flow_fin': -862000000 })", + "got": "{ 'symbol': 'ALL', 'amend': False, 'doc_type': '10-Q', 'period_focus': 'Q1', 'fiscal_year': 2013, 'end_date': '2013-03-31', 'revenues': 100000000, 'op_income': 100000000, 'net_income': 100000000, 'eps_basic': 1.0, 'eps_diluted': 1.0, 'dividend': 0", + "got_raw": "{ 'symbol': 'ALL', 'amend': False, 'doc_type': '10-Q', 'period_focus': 'Q1', 'fiscal_year': 2013, 'end_date': '2013-03-31', 'revenues': 100000000, 'op_income': 100000000, 'net_income': 100000000, 'eps_basic': 1.0, 'eps_diluted': 1.0, 'dividend': 0", + "exact_match": false, + "code_bleu": 0.4058194554598552, + "edit_similarity": 0.6705539358600583 + }, + { + "repo": "eliangcs/pystock-crawler", + "expected": "{ 'symbol': 'VNO', 'amend': False, 'doc_type': '10-K', 'period_focus': 'FY', 'fiscal_year': 2011, 'end_date': '2011-12-31', 'revenues': 2915665000, 'op_income': 856153000, 'net_income': 601771000, 'eps_basic': 3.26, 'eps_diluted': 3.23, 'dividend': 0.0, 'assets': 20446487000, 'cur_assets': None, 'cur_liab': None, 'equity': 7508447000, 'cash': 606553000, 'cash_flow_op': 702499000, 'cash_flow_inv': -164761000, 'cash_flow_fin': -621974000 })", + "got": "{ 'symbol': 'VNO', 'amend': False, 'doc_type': '10-Q', 'period_focus': 'Q3', 'fiscal_year': 2011, 'end_date': '2011-12-31', 'revenues': 100000000, 'op_income': 100000000, 'net_income': 100000000, 'eps_basic': 1.0, 'eps_diluted': 1.0, 'dividend':", + "got_raw": "{ 'symbol': 'VNO', 'amend': False, 'doc_type': '10-Q', 'period_focus': 'Q3', 'fiscal_year': 2011, 'end_date': '2011-12-31', 'revenues': 100000000, 'op_income': 100000000, 'net_income': 100000000, 'eps_basic': 1.0, 'eps_diluted': 1.0, 'dividend': ", + "exact_match": false, + "code_bleu": 0.3314460848415724, + "edit_similarity": 0.5909752547307132 + }, + { + "repo": "eliangcs/pystock-crawler", + "expected": "{ 'symbol': 'UTMD', 'amend': False, 'doc_type': '10-K', 'period_focus': 'FY', 'fiscal_year': 2011, 'end_date': '2011-12-31', 'revenues': 37860000, 'op_income': 11842000, 'net_income': 7414000, 'eps_basic': 2.04, 'eps_diluted': 2.03, 'dividend': 0.0, 'assets': 76389000, 'cur_assets': 17016000, 'cur_liab': 9631000, 'equity': 40757000, 'cash': 6534000, 'cash_flow_op': 11365000, 'cash_flow_inv': -26685000, 'cash_flow_fin': 18078000 })", + "got": "{ 'symbol': 'UTMD', 'amend': False, 'doc_type': '10-Q', 'period_focus': 'Q3', 'fiscal_year': 2011, 'end_date': '2011-12-31', 'revenues': 100000000, 'op_income': 100000000, 'net_income': 100000000, 'eps_basic': 1.0, 'eps_diluted': 1.0, 'dividend':", + "got_raw": "{ 'symbol': 'UTMD', 'amend': False, 'doc_type': '10-Q', 'period_focus': 'Q3', 'fiscal_year': 2011, 'end_date': '2011-12-31', 'revenues': 100000000, 'op_income': 100000000, 'net_income': 100000000, 'eps_basic': 1.0, 'eps_diluted': 1.0, 'dividend': ", + "exact_match": false, + "code_bleu": 0.33543941116496484, + "edit_similarity": 0.611764705882353 + }, + { + "repo": "eliangcs/pystock-crawler", + "expected": "{ 'symbol': 'BK', 'amend': False, 'doc_type': '10-Q', 'period_focus': 'Q1', 'fiscal_year': 2010, 'end_date': '2010-03-31', 'revenues': 883000000, 'op_income': None, 'net_income': 559000000, 'eps_basic': 0.46, 'eps_diluted': 0.46, 'dividend': 0.09, 'assets': 220551000000, 'cur_assets': None, 'cur_liab': None, 'equity': 30455000000, 'cash': 3307000000, 'cash_flow_op': 1191000000, 'cash_flow_inv': 512000000, 'cash_flow_fin': -2126000000 })", + "got": "{ 'symbol': 'BK', 'amend': False, 'doc_type': '10-Q', 'period_focus': 'Q1', 'fiscal_year': 2010, 'end_date': '2010-03-31', 'revenues': 100000000, 'op_income': 100000000, 'net_income': 100000000, 'eps_basic': 1.0, 'eps_diluted': 1.0, 'dividend': 0", + "got_raw": "{ 'symbol': 'BK', 'amend': False, 'doc_type': '10-Q', 'period_focus': 'Q1', 'fiscal_year': 2010, 'end_date': '2010-03-31', 'revenues': 100000000, 'op_income': 100000000, 'net_income': 100000000, 'eps_basic': 1.0, 'eps_diluted': 1.0, 'dividend': 0", + "exact_match": false, + "code_bleu": 0.4058194554598552, + "edit_similarity": 0.6122448979591837 + }, + { + "repo": "eliangcs/pystock-crawler", + "expected": "content)", + "got": "content)", + "got_raw": "content) self.assertIn('GOOG', content) self.assertIn('AAPL', content) self.assertIn('GOOGL', content) self.assertIn('MSFT', content) self.assertIn('AMZN', content) self.assertIn('FB', content) self.assertIn('TSLA', content) self.assertIn('NFLX', content) self.assertIn('DIS', content) self.assertIn('BABA', content) self.assertIn('AMC', content) self.assertIn('NFLX', content) self.assertIn('GOOGL', content) self.assertIn('GOOG', content) self.assertIn('GOOG', content) self.assertIn('GOOG", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "eliangcs/pystock-crawler", + "expected": "{ 'symbol': 'PAY', 'amend': False, 'doc_type': '10-Q', 'period_focus': 'Q2', 'fiscal_year': 2011, 'end_date': '2011-04-30', 'revenues': 292446000, 'op_income': 37338000, 'net_income': 25200000, 'eps_basic': 0.29, 'eps_diluted': 0.27, 'dividend': 0.0, 'assets': 1252289000, 'cur_assets': 935395000, 'cur_liab': 303590000, 'equity': 332172000, 'cash': 531542000, 'cash_flow_op': 68831000, 'cash_flow_inv': -20049000, 'cash_flow_fin': 34676000 })", + "got": "{ 'symbol': 'PAY', 'amend': False, 'doc_type': '10-Q', 'period_focus': 'Q1', 'fiscal_year': 2011, 'end_date': '2011-04-30', 'revenues': 100000000, 'op_income': 100000000, 'net_income': 100000000, 'eps_basic': 1.0, 'eps_diluted': 1.0, 'dividend': 0", + "got_raw": "{ 'symbol': 'PAY', 'amend': False, 'doc_type': '10-Q', 'period_focus': 'Q1', 'fiscal_year': 2011, 'end_date': '2011-04-30', 'revenues': 100000000, 'op_income': 100000000, 'net_income': 100000000, 'eps_basic': 1.0, 'eps_diluted': 1.0, 'dividend': 0", + "exact_match": false, + "code_bleu": 0.3713330104174563, + "edit_similarity": 0.6057971014492753 + }, + { + "repo": "eliangcs/pystock-crawler", + "expected": "expected.get('cash'))", + "got": "expected.get('cash'))", + "got_raw": "expected.get('cash'))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "evansd/whitenoise", + "expected": "response.headers", + "got": "response.headers.keys()", + "got_raw": "response.headers.keys() response.headers[\"Last-Modified\"] == last_mod response.status_code == 200 response.content == static_files.js_content response.headers[\"Content-Length\"] == str(len(static_files.js_content)) response.headers[\"Content-Disposition\"] == \"inline; filename=app.js\" response.headers[\"Content-Encoding\"] == \"gzip\" response.headers[\"Cache-Control\"] == \"max-age=3600\" response.headers[\"Expires\"] == \"Thu, 12 Apr 2100 11:47:06 GMT\" response.headers[\"Vary\"] == \"Accept-Encoding\" response.headers[\"Accept", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.8205128205128205 + }, + { + "repo": "evansd/whitenoise", + "expected": "\"application/pkc7-mime\"", + "got": "\"application/json\"", + "got_raw": "\"application/json\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6829268292682927 + }, + { + "repo": "evansd/whitenoise", + "expected": "404", + "got": "404", + "got_raw": "404", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "evansd/whitenoise", + "expected": "True", + "got": "True", + "got_raw": "True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "evansd/whitenoise", + "expected": "(\"woops\",)", + "got": "(\"woops\",)", + "got_raw": "(\"woops\",)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "executablebooks/markdown-it-py", + "expected": "heading_node.map", + "got": "tuple(heading_node.map", + "got_raw": "tuple(heading_node.map or ())", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.8421052631578947 + }, + { + "repo": "executablebooks/markdown-it-py", + "expected": "99", + "got": "99", + "got_raw": "99", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "executablebooks/markdown-it-py", + "expected": "\"text\"", + "got": "\"inline\"", + "got_raw": "\"inline\" assert text_node.children[0].type == \"text\" assert text_node.children[0].value == \"Some paragraph text and \" assert text_node.children[1].type == \"emphasis\" assert text_node.children[1].children[0].type == \"text\" assert text_node.children[1].children[0].value == \"**emphasis here**\" assert text_node.children[2].type == \"text\" assert text_node.children[2].value == \" and more text here.\" assert text_node.children[3].type == \"inline\" assert text_node.children[3].children[0].type ==", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.42857142857142855 + }, + { + "repo": "executablebooks/markdown-it-py", + "expected": "heading_node.meta", + "got": "heading_node.meta", + "got_raw": "heading_node.meta or {}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "executablebooks/markdown-it-py", + "expected": "1", + "got": "1", + "got_raw": "1 # text is nested inside link_open assert link_close.level == 0 # link_close is at the same level as link_open assert inline.level == 1 # inline is nested inside the block-level token assert tokens.level == 0 # tokens is the root-level token assert tokens.level == inline.level + 1 # tokens is one level deeper than inline assert tokens.level == link_open.level + 2 # tokens is two levels deeper than link_open assert tokens.level == link_text.level + 3 # tokens is three levels deeper than link_text assert tokens.level == link", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "executablebooks/markdown-it-py", + "expected": "env", + "got": "env", + "got_raw": "env # type: ignore # noqa: E501 # type: ignore # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "executablebooks/markdown-it-py", + "expected": "SystemExit)", + "got": "SystemExit)", + "got_raw": "SystemExit) as excinfo: parse([\"-f\", \"foo\"]) parse([\"-f\", \"foo\"]) parse([\"-f\", \"foo\"]) parse([\"-f\", \"foo\"]) parse([\"-f\", \"foo\"]) parse([\"-f\", \"foo\"]) parse([\"-f\", \"foo\"]) parse([\"-f\", \"foo\"]) parse([\"-f\", \"foo\"]) parse([\"-f\", \"foo\"]) parse([\"-f\", \"foo\"]) parse([\"-f\", \"foo\"]) parse([\"-f\", \"foo\"]) parse([\"-f\", \"foo\"]) parse([\"-f\", \"foo\"]) parse", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "exercism/python", + "expected": "[[4]])", + "got": "[[4]])", + "got_raw": "[[4]]) self.assertEqual(combinations(4, 2, []), [[2, 2]]) self.assertEqual(combinations(4, 3, []), [[3, 1]]) self.assertEqual(combinations(4, 4, []), [[4]]) self.assertEqual(combinations(4, 5, []), []) self.assertEqual(combinations(4, 6, []), []) self.assertEqual(combinations(4, 7, []), []) self.assertEqual(combinations(4, 8, []), []) self.assertEqual(combinations(4, 9, []), []) self.assertEqual(combinations(4, 1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "exercism/python", + "expected": "Rational(1, 3))", + "got": "Rational(1, 3))", + "got_raw": "Rational(1, 3))\n\n def test_multiply_two_negative_rational_numbers(self):\n\n self.assertEqual(Rational(-1, 2) * Rational(-2, 3), \n### Target: Rational(1, 3))\n\n def test_multiply_a_positive_and_a_negative_rational_number(self):\n\n self.assertEqual(Rational(1, 2) * Rational(-2, 3), \n### Target: Rational(-1, 3))\n\n def test_multiply_a_zero_rational_number(self):\n\n self.assertEqual(Rational(0, 1) * Rational(2, 3", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "exercism/python", + "expected": "[8])", + "got": "[8])", + "got_raw": "[8])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "exercism/python", + "expected": "[-1])", + "got": "[3])", + "got_raw": "[3])", + "exact_match": false, + "code_bleu": 0.4065061985236918, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "exercism/python", + "expected": "[1])", + "got": "[1])", + "got_raw": "[1])\n\n def test_empty_linked_list_to_list_list_with_empty_list(self):\n sut = LinkedList([])\n\n self.assertEqual(list(sut), [])\n\n def test_linked_list_to_list_list_with_multiple_elements(self):\n sut = LinkedList([1, 2, 3])\n\n self.assertEqual(list(sut), [1, 2, 3])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "exercism/python", + "expected": "\"V\")", + "got": "\"V\")", + "got_raw": "\"V\")\n\n def test_9_is_ix(self):\n\n self.assertEqual(roman(9), \"IX\")\n\n def test_10_is_x(self):\n\n self.assertEqual(roman(10), \"X\")\n\n def test_11_is_xi(self):\n\n self.assertEqual(roman(11), \"XI\")\n\n def test_12_is_xii(self):\n\n self.assertEqual(roman(12), \"XII\")\n\n def test_13_is_xiii(self):\n\n self.assertEqual(roman(13), \"XIII\")\n\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "exercism/python", + "expected": "6)", + "got": "6)", + "got_raw": "6)\n\n def test_finds_a_value_in_the_middle_of_an_array(self):\n\n\n self.assertEqual(find([1, 3, 4, 6, 8, 9, 11], 6), 3)\n\n def test_finds_a_value_at_the_start_of_an_array(self):\n\n\n self.assertEqual(find([1, 3, 4, 6, 8, 9, 11], 1), 0)\n\n def test_finds_a_value_in_the_middle_of_a_long_array(self):\n\n\n self.assertEqual(find([1,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "exercism/python", + "expected": "1)", + "got": "1)", + "got_raw": "1)\n\n def test_single_letter_same_strands(self):\n\n self.assertEqual(distance(\"A\", \"A\"), 0)\n\n def test_two_letter_different_strands(self):\n\n self.assertEqual(distance(\"G\", \"T\"), 1)\n\n def test_two_letter_same_strands(self):\n\n self.assertEqual(distance(\"A\", \"A\"), 0)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "exercism/python", + "expected": "\"II\")", + "got": "\"II\")", + "got_raw": "\"II\")\n\n def test_3_is_iii(self):\n\n self.assertEqual(roman(3), \"III\")\n\n def test_4_is_iv(self):\n\n self.assertEqual(roman(4), \"IV\")\n\n def test_5_is_v(self):\n\n self.assertEqual(roman(5), \"V\")\n\n def test_9_is_ix(self):\n\n self.assertEqual(roman(9), \"IX\")\n\n def test_10_is_x(self):\n\n self.assertEqual(roman(10), \"X\")\n\n def test_50_is_l(self):\n\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "exercism/python", + "expected": "0)", + "got": "0)", + "got_raw": "0)\n\n def test_ability_modifier_for_score_11_is_1(self):\n\n self.assertEqual(modifier(11), 1)\n\n def test_ability_modifier_for_score_12_is_2(self):\n\n self.assertEqual(modifier(12), 2)\n\n def test_ability_modifier_for_score_13_is_3(self):\n\n self.assertEqual(modifier(13), 3)\n\n def test_ability_modifier_for_score_14_is_4(self):\n\n self.assertEqual(modifier(14), 4)\n\n def test_ability_modifier_for_score_", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "exercism/python", + "expected": "[1])", + "got": "[1])", + "got_raw": "[1]) self.assertEqual(matrix.row(2), []) self.assertEqual(matrix.row(3), []) self.assertEqual(matrix.row(4), []) self.assertEqual(matrix.row(5), []) self.assertEqual(matrix.row(6), []) self.assertEqual(matrix.row(7), []) self.assertEqual(matrix.row(8), []) self.assertEqual(matrix.row(9), []) self.assertEqual(matrix.row(10), []) self.assertEqual(matrix.row(11), []) self.assertEqual(matrix.row(12), []) self.assertEqual(matrix.row(13), []) self.assertEqual(matrix.row(14), []) self.assertEqual(matrix.row(15), []) self.assertEqual(matrix.row(16", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "exercism/python", + "expected": "True)", + "got": "True)", + "got_raw": "True) self.assertIs(Allergies(1).allergic_to(\"peanuts\"), False) self.assertIs(Allergies(1).allergic_to(\"shellfish\"), False) self.assertIs(Allergies(1).allergic_to(\"strawberries\"), False) self.assertIs(Allergies(1).allergic_to(\"tomatoes\"), False) self.assertIs(Allergies(1).allergic_to(\"chocolate\"), False) self.assertIs(Allergies(1).allergic_to(\"pollen\"), False) self.assertIs(Allergies(1).allergic_to(\"cats\"), False)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "exercism/python", + "expected": "\"4\")", + "got": "\"4\")", + "got_raw": "\"4\") self.assertEqual(buf.read(), \"5\") self.assertEqual(buf.read(), None) self.assertEqual(buf.read(), None) self.assertEqual(buf.read(), None) self.assertEqual(buf.read(), None) self.assertEqual(buf.read(), None) self.assertEqual(buf.read(), None) self.assertEqual(buf.read(), None) self.assertEqual(buf.read(), None) self.assertEqual(buf.read(), None) self.assertEqual(buf.read(), None) self.assertEqual(buf.read(), None) self.assertEqual(buf.read(), None) self.assertEqual(buf.read(), None) self.assertEqual(buf.read(), None) self.assertEqual(buf.read(), None) self.assertEqual(buf.read(), None) self.assertEqual(buf.read(),", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "exercism/python", + "expected": "[[5]])", + "got": "[[5]])", + "got_raw": "[[5]]) self.assertEqual(combinations(5, 2, []), [[4, 1], [3, 2]]) self.assertEqual(combinations(5, 3, []), [[3, 2, 0]]) self.assertEqual(combinations(5, 4, []), [[2, 1, 0, -1]]) self.assertEqual(combinations(5, 5, []), [[1, 0, -1, -2]]) self.assertEqual(combinations(5, 6, []), [[0, -1, -2, -3]]) self.assertEqual(combinations(5, ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "exercism/python", + "expected": "3)", + "got": "2)", + "got_raw": "2)\n\n def test_finds_a_value_in_the_middle_of_an_array_with_duplicates(self):\n\n\n self.assertEqual(find([1, 3, 4, 4, 6, 8, 9, 11], 4), 2)\n\n def test_finds_a_value_at_the_end_of_the_array(self):\n\n\n self.assertEqual(find([1, 3, 4, 6, 8, 9, 11], 11), 6)\n\n def test_finds_a_value_at_the_start_of_the_array(self):\n\n\n self", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "exercism/python", + "expected": "[1])", + "got": "[1])", + "got_raw": "[1]) self.assertEqual(find_fewest_coins([1, 5, 10, 25], 2), []) self.assertEqual(find_fewest_coins([1, 5, 10, 25], 5), [5]) self.assertEqual(find_fewest_coins([1, 5, 10, 25], 10), [10]) self.assertEqual(find_fewest_coins([1, 5, 10, 25], 20), [10, 10]) self.assertEqual(find_fewest_co", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "exercism/python", + "expected": "robot.name)", + "got": "robot.name)", + "got_raw": "robot.name)\n\n def test_name_is_unique(self):\n robot1 = Robot()\n robot2 = Robot()\n self.assertNotEqual(robot1.name, robot2.name)\n\n def test_name_is_always_valid(self):\n robot = Robot()\n self.assertIsNotNone(robot.name)\n self.assertRegex(robot.name, self.name_re)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "exercism/python", + "expected": "date(2013, 3, 4))", + "got": "date(2013, 3, 1)) self.assertEqual(meetup(2013, 4, \"first\", \"Monday\"), date(2013, 4, 5)) self.assertEqual(meetup(2013, 4, \"first\", \"Tuesday\"), date(2013, 4, 2)) self.assertEqual(meetup(2013, 4, \"first\", \"Wednesday\"), date(2013, 4, 3)) self.assertEqual(meetup(2013, 4, \"first", + "got_raw": "date(2013, 3, 1)) self.assertEqual(meetup(2013, 4, \"first\", \"Monday\"), date(2013, 4, 5)) self.assertEqual(meetup(2013, 4, \"first\", \"Tuesday\"), date(2013, 4, 2)) self.assertEqual(meetup(2013, 4, \"first\", \"Wednesday\"), date(2013, 4, 3)) self.assertEqual(meetup(2013, 4, \"first", + "exact_match": false, + "code_bleu": 0.06837856622870735, + "edit_similarity": 0.10996563573883161 + }, + { + "repo": "exercism/python", + "expected": "0)", + "got": "0)", + "got_raw": "0)\n\n def test_one_book(self):\n basket = [100]\n\n self.assertEqual(total(basket), 100)\n\n def test_two_books(self):\n basket = [100, 200]\n\n self.assertEqual(total(basket), 300)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "exercism/python", + "expected": "queue)", + "got": "expected_result)", + "got_raw": "expected_result) self.assertEqual(actual_result, expected_result) self.assertEqual(queue, original_queue) self.assertEqual(actual_result, sorted(actual_result)) self.assertEqual(actual_result, sorted(expected_result)) self.assertEqual(actual_result, sorted(original_queue)) self.assertEqual(actual_result, sorted(expected_result, reverse=True)) self.assertEqual(actual_result, sorted(expected_result, reverse=False)) self.assertEqual(actual_result, sorted(expected_result, reverse=True)) self.assertEqual(actual_result, sorted(expected_result, reverse=False)) self.assertEqual(actual_result, sorted(expected_result, reverse=True)) self.assertEqual(actual_result, sorted(expected_result, reverse=False)) self.assertEqual(actual_result, sorted(expected_result, reverse=True", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.2727272727272727 + }, + { + "repo": "explosion/sense2vec", + "expected": "s2v", + "got": "s2v.model.wv.vocab.keys()", + "got_raw": "s2v.model.wv.vocab.keys() # noqa: E712, E501, E203, E201, E202, E204, E205, E206, E207, E208, E209, E210, E211, E212, E213, E214, E215, E216, E217, E218, E219, E220, E221,", + "exact_match": false, + "code_bleu": 0.11390778025531027, + "edit_similarity": 0.21428571428571427 + }, + { + "repo": "explosion/sense2vec", + "expected": "3", + "got": "3", + "got_raw": "3 assert result3[0][0] == \"a\" assert result3[0][1] == 1.0 assert result3[0][1] == pytest.approx(1.0) assert result3[1][0] == \"b\" assert result3[1][1] == 1.0 assert result3[1][1] == pytest.approx(1.0) assert result3[2][0] == \"c\" assert result3[2][1] == 1.0 assert result3[2][1] == pytest.approx(1.0) result", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "explosion/sense2vec", + "expected": "\"wrld\"", + "got": "\"wrld\"", + "got_raw": "\"wrld\" assert doc[1]._.s2v_key == \"wrld|NOUN\" assert doc[1]._.s2v_vector == vector.tolist() assert doc[1]._.s2v_score == 1.0 assert doc[1]._.s2v_count == 1.0 assert doc[1]._.s2v_doc_count == 3.0 assert doc[1]._.s2v_doc_ids == [0, 1, 2] assert doc[1]._.s2v_doc_scores == [1.0, 1.0, 1.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "explosion/sense2vec", + "expected": "s2v", + "got": "s2v.index_to_id.keys()", + "got_raw": "s2v.index_to_id.keys() s2v[\"test\"] == test_vector s2v[\"test\"].shape == (4,) s2v[\"test\"].dtype == numpy.float32 s2v[\"test\"].mean() == 2.0 s2v[\"test\"].std() == 1.0 s2v[\"test\"].sum() == 8.0 s2v[\"test\"].min() == 4.0 s2v[\"test\"].max() == 2.0 s2v[\"test\"].var() == 0.0 s2v[\"test\"].std() == ", + "exact_match": false, + "code_bleu": 0.18575057999133598, + "edit_similarity": 0.24 + }, + { + "repo": "explosion/sense2vec", + "expected": "1.0", + "got": "1.0000000000000002e-05", + "got_raw": "1.0000000000000002e-05", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.24 + }, + { + "repo": "explosion/spacy-llm", + "expected": "len(examples)", + "got": "len(examples)", + "got_raw": "len(examples) - 1 if n_prompt_examples == -1 else 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "explosion/spacy-llm", + "expected": "ValueError, match=\"unexpected value; permitted\")", + "got": "ValueError, match=\"Invalid model\") as exc_info: nlp = spacy.load(orig_config) nlp(config) assert str(exc_info.value) == \"Invalid model: anything-else\"", + "got_raw": "ValueError, match=\"Invalid model\") as exc_info: nlp = spacy.load(orig_config) nlp(config) assert str(exc_info.value) == \"Invalid model: anything-else\"", + "exact_match": false, + "code_bleu": 0.11365352023191169, + "edit_similarity": 0.2828282828282828 + }, + { + "repo": "explosion/spacy-llm", + "expected": "[\"llm\"]", + "got": "[\"llm\"]", + "got_raw": "[\"llm\"] assert nlp.get_pipe(\"llm\").task is not None assert nlp.get_pipe(\"llm\").task.model is not None assert nlp.get_pipe(\"llm\").task.model.config is not None assert nlp.get_pipe(\"llm\").task.model.config.model is not None assert nlp.get_pipe(\"llm\").task.model.config.model.config is not None assert nlp.get_pipe(\"llm\").task.model.config.model.config.model is None assert nlp.get_pipe(\"llm\").task.model.config.model.config.model.config is None assert nlp.get_pipe(\"llm\").task.model.config.model.config", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "explosion/spacy-llm", + "expected": "2", + "got": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "explosion/spacy-llm", + "expected": "( [\"-PRON-\", \"have\", \"water\", \"the\", \"plant\", \".\"], [\"I\", \"have\", \"water\", \"the\", \"plant\", \".\"], )", + "got": "[\"I've\", \"water\", \"the\", \"plants\"] * 2, \"Expected lemmas to be ['I've', 'water', 'the', 'plants']\" \" * 2\" \" but got \" + str(lemmas) + \" instead\" \" (did you forget to set the template?)\\n\" \" (if you are using a template, make sure to set the template path in the config)\" \" (if you are not using a template, make sure to set the task examples in the config)\" \" (if you are using a template, make sure to set the template path in the", + "got_raw": "[\"I've\", \"water\", \"the\", \"plants\"] * 2, \"Expected lemmas to be ['I've', 'water', 'the', 'plants']\" \" * 2\" \" but got \" + str(lemmas) + \" instead\" \" (did you forget to set the template?)\\n\" \" (if you are using a template, make sure to set the template path in the config)\" \" (if you are not using a template, make sure to set the task examples in the config)\" \" (if you are using a template, make sure to set the template path in the", + "exact_match": false, + "code_bleu": 0.12192550254402314, + "edit_similarity": 0.24196597353497165 + }, + { + "repo": "explosion/spacy-llm", + "expected": "dict()", + "got": "dict()", + "got_raw": "dict() # type: ignore # task2 is empty # type: ignore # task1 is not empty # type: ignore # task1 is not empty # type: ignore # task2 is empty # type: ignore # task1 is empty # type: ignore # task2 is empty # type: ignore # task1 is empty # type: ignore # task2 is empty # type: ignore # task1 is empty # type: ignore # task2 is empty # type: ignore # task1 is empty # type", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "explosion/spacy-llm", + "expected": "gold_cats", + "got": "gold_cats", + "got_raw": "gold_cats or cat == \"O\" or cat == \"None\" or cat == \"null\" or cat == \"N/A\" or cat == \"na\" or cat == \"n/a\" or cat == \"not applicable\" or cat == \"not_applicable\" or cat == \"not applicable.\" or cat == \"not applicable.\" or cat == \"not applicable.\" or cat == \"not applicable.\" or cat == \"not applicable.\" or cat == \"not applicable.\" or cat == \"not applicable.\" or cat == \"not applicable.\" or cat == \"not applicable.\" or cat == \"not applicable.\" or cat ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "explosion/spacy-llm", + "expected": "f\"\"\" You are an expert summarization system. Your task is to accept Text as input and summarize the Text in a concise way. The summary must not, under any circumstances, contain more than 10 words. Here is the Text that needs to be summarized: ''' {example_text} ''' Summary:\"\"\".strip()", + "got": "f\"\"\" Summarize the following text: {example_text.strip()} \"\"\".strip() == prompt.strip() + \"\\n\" + \"Summarized text:\" + \"\\n\" + \" \" + \"\\n\" + \" \" + \"\\n\" + \" \" + \"\\n\" + \" \" + \"\\n\" + \" \" + \"\\n\" + \" \" + \"\\n\" + \" \" + \"\\n\" + \" \" + \"\\n\" + \" \" + \"\\n\" + \" \" + \"\\n\" + \" \" + \"\\n\" + \" \" + \"\\n\" + \" \" + \"\\n\" +", + "got_raw": "f\"\"\" Summarize the following text: {example_text.strip()} \"\"\".strip() == prompt.strip() + \"\\n\" + \"Summarized text:\" + \"\\n\" + \" \" + \"\\n\" + \" \" + \"\\n\" + \" \" + \"\\n\" + \" \" + \"\\n\" + \" \" + \"\\n\" + \" \" + \"\\n\" + \" \" + \"\\n\" + \" \" + \"\\n\" + \" \" + \"\\n\" + \" \" + \"\\n\" + \" \" + \"\\n\" + \" \" + \"\\n\" + \" \" + \"\\n\" +", + "exact_match": false, + "code_bleu": 0.06666049525566176, + "edit_similarity": 0.0690846286701209 + }, + { + "repo": "explosion/spacy-llm", + "expected": "[\"llm\"]", + "got": "[\"llm\"]", + "got_raw": "[\"llm\"] nlp.add_pipe(\"llm\", last=True) doc = nlp.make_doc(\"The quick brown fox jumps over the lazy dog\") example = Example(doc, {\"text\": \"The quick brown fox jumps over the lazy dog\"}) result = nlp.get_pipe(\"llm\")(example) assert result.get(\"text\") == \"The quick brown fox jumps over the lazy dog\" assert result.get(\"lemma\") == \"The quick brown fox jumps over the lazy dog\" assert result.get(\"tokens\") == [ \"The\", \"quick\", \"brown\", \"fox\", \"jumps\", \"over\", \"the", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "explosion/spacy-llm", + "expected": "n_prompt_examples", + "got": "n_prompt_examples", + "got_raw": "n_prompt_examples + 1 if n_prompt_examples == 0 else 1 + n_prompt_examples * 2 + 1 if n_prompt_examples == 1 else 2 + n_prompt_examples * 3 + 1 if n_prompt_examples == 2 else 3 + n_prompt_examples * 4 + 1 if n_prompt_examples == 3 else 4 + n_prompt_examples * 5 + 1 if n_prompt_examples == 4 else 5 + n_prompt_examples * 6 + 1 if n_prompt_examples == 5 else 6 + n_prompt_examples * 7 + 1 if n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "explosion/spacy-llm", + "expected": "gold_ents", + "got": "gold_ents", + "got_raw": "gold_ents", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "explosion/spacy-llm", + "expected": "n_prompt_examples", + "got": "n_prompt_examples", + "got_raw": "n_prompt_examples + 1 if n_prompt_examples == 0 else 1 + n_prompt_examples + 1 if n_prompt_examples == 1 else 2 + n_prompt_examples + 1 if n_prompt_examples == 2 else 3 + n_prompt_examples + 1 if n_prompt_examples == 3 else 4 + n_prompt_examples + 1 if n_prompt_examples == 4 else 5 + n_prompt_examples + 1 if n_prompt_examples == 5 else 6 + n_prompt_examples + 1 if n_prompt_examples == 6 else 7 + n_prompt_examples + 1 if n_prompt", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "explosion/spacy-llm", + "expected": "labels", + "got": "task2._label_dict", + "got_raw": "task2._label_dict == labels.copy() | {\"loc\": \"LOC\"} | {\"per\": \"PER\"} | {\"org\": \"ORG\"} | {\"dest\": \"DESTINATION\"} | {\"name\": \"NAME\"} | {\"city\": \"CITY\"} | {\"state\": \"STATE\"} | {\"country\": \"COUNTRY\"} | {\"zip\": \"ZIP\"} | {\"phone\": \"PHONE\"} | {\"email\": \"EMAIL\"} | {\"url\": \"URL\"} | {\"address\": \"ADDRESS\"} | {\"date\": \"DATE\"} | {\"time\": \"TIME\"} | {\"duration\": \"DURATION\"} | {\"amount", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.43478260869565216 + }, + { + "repo": "explosion/spacy-llm", + "expected": "\"Q60\"", + "got": "\"PERSON\"", + "got_raw": "\"PERSON\" in llm._task._candidate_selector._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._kb._", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3076923076923077 + }, + { + "repo": "explosion/spacy-llm", + "expected": "labels", + "got": "task2._label_dict", + "got_raw": "task2._label_dict == task3._label_dict == labels.copy() | {\"test\": \"Test\"} | {\"test2\": \"Test2\"} | {\"test3\": \"Test3\"} | {\"test4\": \"Test4\"} | {\"test5\": \"Test5\"} | {\"test6\": \"Test6\"} | {\"test7\": \"Test7\"} | {\"test8\": \"Test8\"} | {\"test9\": \"Test9\"} | {\"test10\": \"Test10\"} | {\"test11\": \"Test11\"} | {\"test12\": \"Test12\"} |", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.43478260869565216 + }, + { + "repo": "explosion/spacy-llm", + "expected": "ValueError, match=re.escape( \"Request to OpenAI API failed: This model's maximum context length is 4097 tokens. However, your messages \" \"resulted in 5018 tokens. Please reduce the length of the messages.\" ))", + "got": "ValueError, match=\"Document too long\") as exc_info: nlp(\"a\" * 1000) exc_info.value.doc_length_error = True exc_info.value.max_length = 1000 exc_info.value.doc_length = 1000 exc_info.value.prompt = \"a\" * 1000 exc_info.value.response = \"Response\" exc_info.value.error = \"Error\" exc_info.value.error_code = \"Error Code\" exc_info.value.error_message = \"Error Message\" exc_info.value.error_details = \"Error Details\" exc_info.value.error_traceback = \"Error Traceback\" exc", + "got_raw": "ValueError, match=\"Document too long\") as exc_info: nlp(\"a\" * 1000) exc_info.value.doc_length_error = True exc_info.value.max_length = 1000 exc_info.value.doc_length = 1000 exc_info.value.prompt = \"a\" * 1000 exc_info.value.response = \"Response\" exc_info.value.error = \"Error\" exc_info.value.error_code = \"Error Code\" exc_info.value.error_message = \"Error Message\" exc_info.value.error_details = \"Error Details\" exc_info.value.error_traceback = \"Error Traceback\" exc", + "exact_match": false, + "code_bleu": 0.04381681865011205, + "edit_similarity": 0.05943536404160475 + }, + { + "repo": "explosion/spacy-llm", + "expected": "gold_spans", + "got": "gold_spans", + "got_raw": "gold_spans", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "explosion/spacy-llm", + "expected": "ValueError, match=\"Request to Cohere API failed:\")", + "got": "ValueError) as e_info:", + "got_raw": "ValueError) as e_info:\n model = Cohere(temperature=incorrect_temperature)\n model.generate(\"Hello, world!\")\n\n assert str(e_info.value) == \"Invalid temperature value\"", + "exact_match": false, + "code_bleu": 0.251781283113064, + "edit_similarity": 0.3055555555555556 + }, + { + "repo": "explosion/thinc", + "expected": "\"cool\"", + "got": "\"cool\"", + "got_raw": "\"cool\" model = model.model() assert model.name == \"model\" model = model.model(\"new\") assert model.name == \"new\" model = model.model(\"newer\") assert model.name == \"newer\" model = model.model(\"newest\") assert model.name == \"newest\" model = model.model(\"newestest\") assert model.name == \"newestest\" model = model.model(\"newestestest\") assert model.name == \"newestestest\" model = model.model(\"newestestestest\") assert model.name == \"newestestestest\" model = model.model(\"newest", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "explosion/thinc", + "expected": "10", + "got": "10", + "got_raw": "10 model.set_dim(\"nI\", 20) assert model.get_dim(\"nI\") == 20 model.set_dim(\"nO\", 30) assert model.get_dim(\"nO\") == 30 model.set_dim(\"nO\", None) assert model.get_dim(\"nO\") is None model.set_dim(\"nO\", 40) assert model.get_dim(\"nO\") == 40 model.set_dim(\"nO\", 50) assert model.get_dim(\"nO\") == 50 model.set_dim(\"nO\", 60) assert model.get_dim", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "explosion/thinc", + "expected": "d_inputs[i])", + "got": "d_inputs[i])", + "got_raw": "d_inputs[i]) else: numpy.testing.assert_equal(inputs, outputs) numpy.testing.assert_equal(d_outputs, d_inputs) def check_transform_produces_correct_output_shape(model, inputs): outputs, _ = model(inputs) assert outputs.shape == inputs.shape def check_transform_produces_correct_output_shape_backward(model, inputs): outputs, backprop = model.begin_update(inputs) d_inputs = backprop(outputs) assert d_inputs.shape == inputs.shape def check_transform_produces_correct_output_shape_backward2(model, inputs): outputs, backprop = model.begin_update(inputs) d_inputs = backprop() assert d_inputs.shape == inputs.shape def check", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "explosion/thinc", + "expected": "ragged.lengths[start:end])", + "got": "ragged.lengths[start:end])", + "got_raw": "ragged.lengths[start:end])\n\ndef test_ragged_slice(ragged):\n r = ragged[1:3]\n assert r.data.shape == (2, r.data.shape[1])\n assert_allclose(r.data, ragged[1:3].data)\n assert_allclose(r.lengths, ragged[1:3].lengths)\n\ndef test_ragged_slice_step(ragged):\n r = ragged[::2]\n assert r.data.shape == (10, r.data.shape[1])\n assert_allclose(r.data, ragged[::2].data", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "explosion/thinc", + "expected": "target_scores[0])", + "got": "target_scores[0])", + "got_raw": "target_scores[0])\n assert_allclose(scores[0] + model2.get_bias(), target_scores[0])\n\n\ndef test_predict_bias2(model2):\n input_ = model2.ops.alloc2f(1, model2.get_dim(\"nI\"))\n target_scores = model2.ops.alloc2f(1, model2.get_dim(\"nO\"))\n scores = model2.predict(input_)\n\n assert_allclose(scores[0], target_scores[0])\n assert_allclose(scores[0] + model2.get_bias(), target_scores[0])\n\n\ndef test_predict_bias3", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "explosion/thinc", + "expected": "values3)", + "got": "values3)", + "got_raw": "values3)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "explosion/thinc", + "expected": "[4, 6, 14, 15, 19]", + "got": "[4, 6, 8, 14, 15] + [15] * 5 + [15] * 10 + [15] * 4 + [15] * 1 + [15] * 4 + [15] * 1 + [15] * 4 + [15] * 1 + [15] * 4 + [15] * 1 + [15] * 4 + [15] * 1 + [15] * 4 + [15] *", + "got_raw": "[4, 6, 8, 14, 15] + [15] * 5 + [15] * 10 + [15] * 4 + [15] * 1 + [15] * 4 + [15] * 1 + [15] * 4 + [15] * 1 + [15] * 4 + [15] * 1 + [15] * 4 + [15] * 1 + [15] * 4 + [15] *", + "exact_match": false, + "code_bleu": 0.0725091676470401, + "edit_similarity": 0.1702127659574468 + }, + { + "repo": "explosion/thinc", + "expected": "ops.alloc2f(10, 2))", + "got": "t)", + "got_raw": "t)", + "exact_match": false, + "code_bleu": 0.11939665909150465, + "edit_similarity": 0.09523809523809523 + }, + { + "repo": "explosion/thinc", + "expected": "p_nonzero)", + "got": "p_nonzero", + "got_raw": "p_nonzero * numpy.ones((n_class,), dtype=\"f\"))) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "exact_match": false, + "code_bleu": 0.29730177875068026, + "edit_similarity": 0.9473684210526315 + }, + { + "repo": "explosion/thinc", + "expected": "list(Xs[0][0])", + "got": "[1]", + "got_raw": "[1] * Xs[0].shape[1] + [0] * (Xs[1].shape[1] - 1) + [-1] * 10 + [0] * 4 + [0] * 10 + [0] * 4 + [0] * 10 + [0] * 4 + [0] * 10 + [0] * 4 + [0] * 10 + [0] * 4 + [0] * 10 + [0] * 4 + [0] * ", + "exact_match": false, + "code_bleu": 0.14999999999999997, + "edit_similarity": 0.23529411764705882 + }, + { + "repo": "explosion/thinc", + "expected": "X.dataXd.shape", + "got": "X.dataXd.shape", + "got_raw": "X.dataXd.shape + (Xs[0].shape[1],) dX.dataXd[0] == Xs[0][0] dX.dataXd[1] == Xs[1][0] dX.dataXd[2] == 0 dX.dataXd[3] == 0 dX.dataXd[4] == 0 dX.dataXd[5] == 0 dX.dataXd[6] == 0 dX.dataXd[7] == 0 dX.dataXd[8] == 0 dX.dataXd[9] == 0 dX", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "explosion/thinc", + "expected": "(2, 45)", + "got": "(2, 45) assert pairs[:2].two.shape == (2, 12) assert pairs[:2].lengths == (2,) assert pairs[:2].offsets == (0, 2) assert pairs[2:4].one.shape == (2, 45) assert pairs[2:4].two.shape == (2, 12) assert pairs[2:4].lengths == (2,) assert pairs[2:4].offsets == (2, 4) assert pairs[4:6].one.shape == (2, 45) assert", + "got_raw": "(2, 45) assert pairs[:2].two.shape == (2, 12) assert pairs[:2].lengths == (2,) assert pairs[:2].offsets == (0, 2) assert pairs[2:4].one.shape == (2, 45) assert pairs[2:4].two.shape == (2, 12) assert pairs[2:4].lengths == (2,) assert pairs[2:4].offsets == (2, 4) assert pairs[4:6].one.shape == (2, 45) assert", + "exact_match": false, + "code_bleu": 0.03191225859839578, + "edit_similarity": 0.044585987261146494 + }, + { + "repo": "explosion/thinc", + "expected": "rate2", + "got": "rate2", + "got_raw": "rate2 > rate1 > rate0 > 1.01 * rate0 - 0.01 * rate1 + 0.0001 * rate2 - 0.000001 * rate3 + 0.00000001 * rate0 - 0.0000000001 * rate1 + 0.000000000001 * rate2 - 0.00000000000001 * rate3 + 0.00", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "explosion/thinc", + "expected": "\"linear\"", + "got": "\"linear\"", + "got_raw": "\"linear\" + str(id(model)) + \"_0\" + str(id(model)) + \"_1\" + str(id(model)) + \"_2\" + str(id(model)) + \"_3\" + str(id(model)) + \"_4\" + str(id(model)) + \"_5\" + str(id(model)) + \"_6\" + str(id(model)) + \"_7\" + str(id(model)) + \"_8\" + str(id(model)) + \"_9\" + str(id(model)) + \"_10\" + str(id(model)) + \"_11\" + str(id(model)) + \"_12\" + str(id(model))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "explosion/thinc", + "expected": "[0, 4, 6, 14, 15]", + "got": "[0, 4, 6, 8, 9] assert list(ends) == [4, 6, 8, 9, 10] assert_allclose(ragged._get_starts_as_array(), starts) assert_allclose(ragged._get_ends_as_array(), ends) assert_allclose(ragged._get_starts_as_array(), ragged.starts) assert_allclose(ragged._get_ends_as_array(), ragged.ends) assert_allclose(ragged._get_starts_as_array(), ragged._get_starts()) assert_allclose(ragged._get_ends_as_array(), ragged._get_ends())", + "got_raw": "[0, 4, 6, 8, 9] assert list(ends) == [4, 6, 8, 9, 10] assert_allclose(ragged._get_starts_as_array(), starts) assert_allclose(ragged._get_ends_as_array(), ends) assert_allclose(ragged._get_starts_as_array(), ragged.starts) assert_allclose(ragged._get_ends_as_array(), ragged.ends) assert_allclose(ragged._get_starts_as_array(), ragged._get_starts()) assert_allclose(ragged._get_ends_as_array(), ragged._get_ends())", + "exact_match": false, + "code_bleu": 0.06736210324199474, + "edit_similarity": 0.06976744186046512 + }, + { + "repo": "explosion/thinc", + "expected": "Y.data.dtype", + "got": "Y.data.dtype", + "got_raw": "Y.data.dtype return True\n\ndef assert_padded_data_match(X, Y):\n assert isinstance(X, Padded)\n assert isinstance(Y, Padded)\n assert_arrays_match(X.data, Y.data) return True\n\ndef assert_ragged_data_match(X, Y):\n assert isinstance(X, Ragged)\n assert isinstance(Y, Ragged)\n assert_arrays_match(X.data, Y.data) return True\n\n\ndef test_linear_forward():\n model = get_model((numpy.ones((2, 3)), numpy.ones((2,)), 2))\n X = numpy.ones((2, 3))\n Y = model.forward", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "explosion/thinc", + "expected": "{}", + "got": "{}", + "got_raw": "{} if operator == \"+\" else {operator: operator} if operator == \"*\" else {} else None if operator == \"*\" else {operator: operator} if operator == \"+\" else {} else None if operator == \"+\" else {operator: operator} if operator == \"*\" else {} else None if operator == \"*\" else {operator: operator} if operator == \"+\" else {} else None if operator == \"+\" else {operator: operator} if operator == \"*\" else {} else None if operator == \"*\" else {operator: operator} if operator == \"+\" else {} else None if operator == \"+\" else {operator: operator} if operator == \"*\" else {} else None if", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "explosion/thinc", + "expected": "123", + "got": "123.0000000000000123000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "123.0000000000000123000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.04580152671755725 + }, + { + "repo": "explosion/thinc", + "expected": "[[1.0], [1.0], [1.0]])", + "got": "to_categorical(numpy.asarray([1], dtype=\"i\"))) assert to_categorical(numpy.asarray([1], dtype=\"i\"), 1) == numpy.asarray([[1]]) assert to_categorical(numpy.asarray([1], dtype=\"i\"), 2) == numpy.asarray([[1], [0]]) assert to_categorical(numpy.asarray([1], dtype=\"i\"), 3) == numpy.asarray([[1], [0], [0]]) assert to_categorical(numpy.asarray([1], dtype=\"i\"), 4) == numpy.asarray([[1], [0], [0], [0]]) assert to_categorical(numpy.asarray([1], dtype=\"i\"), 5)", + "got_raw": "to_categorical(numpy.asarray([1], dtype=\"i\"))) assert to_categorical(numpy.asarray([1], dtype=\"i\"), 1) == numpy.asarray([[1]]) assert to_categorical(numpy.asarray([1], dtype=\"i\"), 2) == numpy.asarray([[1], [0]]) assert to_categorical(numpy.asarray([1], dtype=\"i\"), 3) == numpy.asarray([[1], [0], [0]]) assert to_categorical(numpy.asarray([1], dtype=\"i\"), 4) == numpy.asarray([[1], [0], [0], [0]]) assert to_categorical(numpy.asarray([1], dtype=\"i\"), 5)", + "exact_match": false, + "code_bleu": 0.02493980561692539, + "edit_similarity": 0.08016877637130802 + }, + { + "repo": "explosion/thinc", + "expected": "5", + "got": "5", + "got_raw": "5 assert model.get_dim(\"nO\") == 2 assert model.get_dim(\"nH\") == 3 assert model.get_dim(\"nB\") == 4 assert model.get_dim(\"nX\") == 4 * 5 assert model.get_dim(\"nY\") == 4 * 2 assert model.get_dim(\"nH\") == 4 * 3 assert model.get_dim(\"nH\") == 4 * 2 * 0.8 assert model.get_dim(\"nH\") == 4 * 2 * 0.2 assert model.get_dim(\"nH\") == 4 * 2", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "eyurtsev/kor", + "expected": "2", + "got": "2", + "got_raw": "2\n\nassert isinstance(scheme.attributes[1], Text) assert scheme.attributes[1].id == \"text_attribute\" assert scheme.attributes[1].description == \"Description for Text\" assert scheme.attributes[1].many is True assert len(scheme.attributes[1].examples) == 2 assert isinstance(scheme.attributes[2], Bool) assert scheme.attributes[2].id == \"bool_attribute\" assert scheme.attributes[2].description == \"Description for Bool\" assert scheme.attributes[2].many is True assert len(scheme.attributes[2].examples) == 2 assert isinstance(scheme.attributes[3], Selection) assert scheme", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "eyurtsev/kor", + "expected": "exception_class)", + "got": "exception_class)", + "got_raw": "exception_class) as exc_info: ExtractionSchemaNode.from_json(json) assert str(exc_info.value) == \"Cannot deserialize ExtractionSchemaNode without a type.\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "eyurtsev/kor", + "expected": "[(\"input\", {\"key1\": \"value1\"})]", + "got": "[{\"a\": 1}]) nodes.Object( id=\"obj\", description=\"description\", attributes=[], examples=[{\"a\": 1}], ).examples == [{\"a\": 1}] )", + "got_raw": "[{\"a\": 1}]) nodes.Object( id=\"obj\", description=\"description\", attributes=[], examples=[{\"a\": 1}], ).examples == [{\"a\": 1}] ) # One example with multiple extractions assert nodes.Object( id=\"obj\", description=\"description\", attributes=[], examples=[{\"a\": 1, \"b\": 2}], ).examples == [{\"a\": 1, \"b\": 2}] ) # Multiple examples with single extraction assert nodes.Object( id=\"obj\", description=\"description\", attributes=[], examples=[{\"a\": 1}, {\"b\": 2}], ).examples == [{\"", + "exact_match": false, + "code_bleu": 0.03647433441402697, + "edit_similarity": 0.11538461538461539 + }, + { + "repo": "eyurtsev/kor", + "expected": "True", + "got": "True", + "got_raw": "True\n\n assert len(scheme.attributes) == 1\n\n nested_object = scheme.attributes[0]\n assert nested_object.id == \"nested_object\"\n assert nested_object.description == \"Description nested object\"\n assert nested_object.many is True\n\n assert len(nested_object.attributes) == 1\n\n number_attribute = nested_object.attributes[0]\n assert number_attribute.id == \"number_attribute\"\n assert number_attribute.description == \"Description for Number\"\n assert number_attribute.many is True\n\n assert number_attribute.examples == [ [\"Here is 1 number\", 1], [\"Here", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "eyurtsev/kor", + "expected": "[ (\"another number\", {\"object\": [{\"number\": [1]}]}), (\"number\", {\"object\": [{\"number\": [2]}]}), (\"text\", {\"object\": [{\"text\": [\"3\"]}]}), (\"selection\", {\"object\": [{\"selection\": [\"option\"]}]}), (\"foo\", {}), (\"1 2\", {\"object\": [{\"age\": [1, 2]}]}), ]", + "got": "[ { \"number\": 2, \"text\": \"3\", \"selection\": \"selection\", \"age\": [1, 2], }, { \"number\": 1, \"text\": \"3\", \"selection\": \"foo\", \"age\": [1], }, ]", + "got_raw": "[ { \"number\": 2, \"text\": \"3\", \"selection\": \"selection\", \"age\": [1, 2], }, { \"number\": 1, \"text\": \"3\", \"selection\": \"foo\", \"age\": [1], }, ]", + "exact_match": false, + "code_bleu": 0.16259263029957818, + "edit_similarity": 0.24415584415584415 + }, + { + "repo": "eyurtsev/kor", + "expected": "extraction_subclass.__name__", + "got": "\"test\"", + "got_raw": "\"test\"", + "exact_match": false, + "code_bleu": 0.16666666666666666, + "edit_similarity": 0.11764705882352941 + }, + { + "repo": "eyurtsev/kor", + "expected": "[ (\"another number\", {\"object\": [{\"number\": 1}]}), (\"number\", {\"object\": [{\"number\": [2]}]}), (\"text\", {\"object\": [{\"text\": [\"3\"]}]}), (\"selection\", {\"object\": [{\"selection\": [\"option\"]}]}), (\"foo\", {}), ]", + "got": "[ { \"object\": { \"number\": [2], \"text\": [\"3\"], \"selection\": [\"selection\"], } } ]", + "got_raw": "[ { \"object\": { \"number\": [2], \"text\": [\"3\"], \"selection\": [\"selection\"], } } ]", + "exact_match": false, + "code_bleu": 0.1639203661013066, + "edit_similarity": 0.352112676056338 + }, + { + "repo": "fabriziosalmi/certmate", + "expected": "True", + "got": "True", + "got_raw": "True result['output'] == 'test' result['error'] == '' result['command'] == 'echo test' result['event'] == 'created' result['id'] == 'h1' result['name'] == 'Test' result['timeout'] == 10 result['on_events'] == ['created'] result['created'] is True result['renewed'] is False result['failed'] is False result['error_code'] == 0 result['stdout'] == 'ok\\n' result['stderr'] == '' result['duration'] == 0.0 result['pid'] == 0 result['exit", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fabriziosalmi/certmate", + "expected": "200", + "got": "200", + "got_raw": "200 r.json()[\"count\"] == 1 r.json()[\"items\"][0][\"id\"] == \"e2e-test\" r.json()[\"items\"][0][\"domain\"] == TEST_DOMAIN r.json()[\"items\"][0][\"status\"] == \"valid\" r.json()[\"items\"][0][\"type\"] == \"dns\" r.json()[\"items\"][0][\"created\"] > 1600000000 r.json()[\"items\"][0][\"expires\"] > 1600000000 r.json()[\"items\"][0][\"key\"] == \"e2e-test\" r.json()[\"items\"][", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fabriziosalmi/certmate", + "expected": "3", + "got": "3", + "got_raw": "3 * 2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fabriziosalmi/certmate", + "expected": "data", + "got": "data[\"auth_config\"]", + "got_raw": "data[\"auth_config\"] and data[\"auth_config\"][\"local_auth_enabled\"] == True else False", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.34782608695652173 + }, + { + "repo": "fabriziosalmi/certmate", + "expected": "3", + "got": "30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "fabriziosalmi/certmate", + "expected": "msg", + "got": "msg.lower()", + "got_raw": "msg.lower() # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.42857142857142855 + }, + { + "repo": "facebookresearch/partnr-planner", + "expected": "63", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "facebookresearch/partnr-planner", + "expected": "1", + "got": "1", + "got_raw": "1 and neighbors[0].name == \"floor_living_room_1\" and neighbors[0].type == \"floor\" and neighbors[0].id == \"floor_living_room_1\" and neighbors[0].sim_handle == \"floor_living_room_1\" and neighbors[0].parent_object_handle == \"floor\" and neighbors[0].parent_object_id == \"floor\" and neighbors[0].parent_object_sim_handle == \"floor\" and neighbors[0].parent_object_type == \"floor\" and neighbors[0].parent_object_name == \"floor\" and neighbors[0].parent_object_id == \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "facebookresearch/partnr-planner", + "expected": "5", + "got": "1.0000000000000002e-05", + "got_raw": "1.0000000000000002e-05 * 5.0000000000000002e-05 * 5.0000000000000002e-05 * 5.0000000000000002e-05 * 5.0000000000000002e-05 * 5.000000", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.08695652173913043 + }, + { + "repo": "facebookresearch/partnr-planner", + "expected": "gt_prompt", + "got": "gt_prompt.strip()", + "got_raw": "gt_prompt.strip() + \"\\n\" + planner.curr_prompt.split(\"Here are some examples\")[1].strip() + \"\\n\" + planner.curr_prompt.split(\"Here are some examples\")[2].strip() + \"\\n\" + planner.curr_prompt.split(\"Here are some examples\")[3].strip() + \"\\n\" + planner.curr_prompt.split(\"Here are some examples\")[4].strip() + \"\\n\" + planner.curr_prompt.split(\"Here are some examples\")[5].strip() + \"\\n\" + planner.curr_prompt.split(\"Here are some examples\")[6].strip() + \"\\n\" + planner.curr_prompt.split(\"", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6923076923076923 + }, + { + "repo": "facebookresearch/partnr-planner", + "expected": "TTT", + "got": "[True", + "got_raw": "[True, True] assert sac( state_sequence=ss_2, proposition_satisfied_at=[0, 1, 1] ) == [True, False] assert sac( state_sequence=ss_1, proposition_satisfied_at=[0, 2, 1] ) == [True, True] assert sac( state_sequence=ss_2, proposition_satisfied_at=[0, 2, 1] ) == [True, False] assert sac( state_sequence=ss_1, proposition_satisfied_at=[1, 2, 1] ) == [True, True] assert sac(", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.25 + }, + { + "repo": "facebookresearch/partnr-planner", + "expected": "1.5", + "got": "np.isclose(base_pos", + "got_raw": "np.isclose(base_pos, np.array([-5.14, -3.94, 0])).all() and np.isclose( env_interface.sim.agents_mgr[0].articulated_agent.base_rot, np.array([0, 0, 0]), ).all() and np.isclose( env_interface.sim.agents_mgr[0].articulated_agent.ee_transform().rotation, mn.Quaternion(0, 0, 0, 1), ).all() and np.isclose( env_interface.sim.agents_mgr[0].articulated_agent.ee_transform().translation, np.array([0,", + "exact_match": false, + "code_bleu": 0.2295748846661433, + "edit_similarity": 0.09090909090909091 + }, + { + "repo": "facebookresearch/partnr-planner", + "expected": "\"\"", + "got": "dataset.num_episodes()", + "got_raw": "dataset.num_episodes() == 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.2295748846661433, + "edit_similarity": 0.0 + }, + { + "repo": "facebookresearch/theseus", + "expected": "len(all_ids)", + "got": "len(all_ids)", + "got_raw": "len(all_ids) * 2 + 100 - 100 * 2 - 100 + 100 * 2 + 100 - 100 * 2 - 100 + 100 * 2 + 100 - 100 * 2 - 100 + 100 * 2 + 100 - 100 * 2 - 100 + 100 * 2 + 100 - 100 * 2 - 10", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "facebookresearch/theseus", + "expected": "2", + "got": "len(eff_radius_t.shape)", + "got_raw": "len(eff_radius_t.shape) + 1 # noqa: E128 cost_function.eff_radius.shape[1] == 1 # noqa: E128 cost_function.eff_radius.shape[0] == batch_size # noqa: E128 cost_function.eff_radius.shape[1] == 1 # noqa: E128 cost_function.eff_radius.shape[2] == 1 # noqa: E128 cost_function.eff_radius.shape[3] == 1 # noqa: E128 cost_function.eff_radius.shape[4] ==", + "exact_match": false, + "code_bleu": 0.18575057999133598, + "edit_similarity": 0.0 + }, + { + "repo": "facebookresearch/theseus", + "expected": "(batch_size, err_dim, i + 1)", + "got": "(batch_size, err_dim, i + 1) or jacobians[i].shape == (batch_size, 1, i + 1) or jacobians[i].shape == (1, err_dim, i + 1) or jacobians[i].shape == (1, 1, i + 1) or jacobians[i].shape == (1, err_dim) or jacobians[i].shape == (1, 1) or jacobians[i].shape == (1,) or jacobians[i].shape == () or jacobians[i].shape == (1,", + "got_raw": "(batch_size, err_dim, i + 1) or jacobians[i].shape == (batch_size, 1, i + 1) or jacobians[i].shape == (1, err_dim, i + 1) or jacobians[i].shape == (1, 1, i + 1) or jacobians[i].shape == (1, err_dim) or jacobians[i].shape == (1, 1) or jacobians[i].shape == (1,) or jacobians[i].shape == () or jacobians[i].shape == (1,", + "exact_match": false, + "code_bleu": 0.06660917764903398, + "edit_similarity": 0.16231884057971013 + }, + { + "repo": "facebookresearch/theseus", + "expected": "len(all_ids)", + "got": "len(all_ids)", + "got_raw": "len(all_ids) + 100 - 100 * 0.5 + 100 * 0.5 - 100 * 0.5 + 100 * 0.5 - 100 * 0.5 + 100 * 0.5 - 100 * 0.5 + 100 * 0.5 - 100 * 0.5 + 100 * 0.5 - 100 * 0.5 + 100 * 0.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "facebookresearch/theseus", + "expected": "sol2[f\"x{i}\"])", + "got": "sol2[f\"x{i}\"])", + "got_raw": "sol2[f\"x{i}\"])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "facebookresearch/theseus", + "expected": "aux_vars", + "got": "optim_vars", + "got_raw": "optim_vars and odummy in aux_vars and adummy in aux_vars and cf1 in cf._costs and cf2 in cf._costs and cf1._cost in cf._costs[cf2._cost] and cf2._cost in cf._costs[cf1._cost] and cf1._cost in cf._costs[cf2._cost] and cf2._cost in cf._costs[cf1._cost] and cf1._cost in cf._costs[cf1._cost] and cf2._cost in cf._costs[cf2._cost] and cf", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5555555555555556 + }, + { + "repo": "facebookresearch/theseus", + "expected": "expected_jac[1].shape", + "got": "expected_jac[1].shape[1:]", + "got_raw": "expected_jac[1].shape[1:] + (2,) + expected_jac[1].shape[2:] + (2,) + expected_jac[1].shape[3:] + (2,) + expected_jac[1].shape[4:] + (2,) + expected_jac[1].shape[5:] + (2,) + expected_jac[1].shape[6:] + (2,) + expected_jac[1].shape[7:] + (2,) + expected_jac[1].shape[8:] + (2,) + expected_jac[1].shape[", + "exact_match": false, + "code_bleu": 0.5706745777055999, + "edit_similarity": 0.9130434782608695 + }, + { + "repo": "facebookresearch/theseus", + "expected": "default_order.index_of(var.name)", + "got": "default_order.index(var)", + "got_raw": "default_order.index(var) + 1 # +1 to account for the cost weight variable \"\"\" The default variable ordering should match the expected order of variables in the objective. \"\"\"", + "exact_match": false, + "code_bleu": 0.2869522062208836, + "edit_similarity": 0.8571428571428571 + }, + { + "repo": "facebookresearch/theseus", + "expected": "av)", + "got": "av)", + "got_raw": "av)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "facebookresearch/theseus", + "expected": "1", + "got": "1", + "got_raw": "1 seen_cnt[2] += 1 assert f\"{th.Vectorize._SHARED_TOKEN}{w1.scale.name}\" in var_names assert f\"{th.Vectorize._SHARED_TOKEN}{v1.name}\" in var_names assert f\"{th.Vectorize._SHARED_TOKEN}{v2.name}\" in var_names assert f\"{th.Vectorize._SHARED_TOKEN}{mv.name}\" in var_names\n if cf4 in cost_fns: assert len(cost_fns) == 1 seen_cnt[3] += 1 assert f\"{th.Vectorize._SHARED_TOKEN}{v3.name}\" in var_names assert f", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "facebookresearch/theseus", + "expected": "q_inv_v", + "got": "q_inv_v.tensor", + "got_raw": "q_inv_v.tensor # noqa: E711\n\n\ndef test_gp_motion_model_variable_copy():\n for dof in range(1, 10):\n for batch_size in BATCH_SIZES_TO_TEST:\n aux = torch.randn(batch_size, dof, dof).double()\n q_inv = aux.transpose(-2, -1).bmm(aux)\n dt = torch.rand(1).double()\n cost_weight = th.eb.GPCostWeight(q_inv, dt)\n cost_weight_copy = copy.deepcopy(cost_weight)\n assert cost_weight_copy.Qc_inv is not cost_weight.Qc_inv", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "facebookresearch/theseus", + "expected": "da_dx_unroll)", + "got": "da_dx_unroll)", + "got_raw": "da_dx_unroll)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "facebookresearch/theseus", + "expected": "1e-5", + "got": "1e-3", + "got_raw": "1e-3 * expected_.norm(p=float(\"inf\")) + 1e-6 * expected_.norm(p=2) + 1e-12 * expected_.norm(p=1) + 1e-18 * expected_.norm(p=float(\"inf\")) + 1e-24 * expected_.norm(p=0) + 1e-30 * expected_.norm(p=-1) + 1e-36 * expected_.norm(p=-2) + 1e-42 * expected_.norm(p=-3) + 1e-48 * expected_.", + "exact_match": false, + "code_bleu": 0.5946035575013605, + "edit_similarity": 0.75 + }, + { + "repo": "facebookresearch/theseus", + "expected": "expected_jac[0].shape", + "got": "expected_jac[0].shape[1:]", + "got_raw": "expected_jac[0].shape[1:] + (2,) + (batch_size_so2,) + (batch_size_pnt,) + (2,) + (batch_size_pnt,) + (2,) + (batch_size_pnt,) + (2,) + (batch_size_pnt,) + (2,) + (batch_size_pnt,) + (2,) + (batch_size_pnt,) + (2,) + (batch_size_pnt,) + (2,) + (batch_size_pnt,) + (2,) + (batch_size_pnt,) + (2,) + (batch_size_pnt,) +", + "exact_match": false, + "code_bleu": 0.5706745777055999, + "edit_similarity": 0.9130434782608695 + }, + { + "repo": "facebookresearch/theseus", + "expected": "data.shape", + "got": "(batch_size", + "got_raw": "(batch_size, length) if dtype == torch.float else (batch_size, length, 1) assert t.dtype == dtype assert t.device == data.device assert t.requires_grad == False assert t.is_cuda == data.is_cuda assert t.is_leaf == True assert t.is_sparse == False assert t.is_contiguous() == True assert t.is_cuda == data.is_cuda assert t.is_cuda == data.is_cuda assert t.is_cuda == data.is_cuda assert t.is_cuda == data.is_cuda assert t.is_cuda == data.is_cuda assert t.is_cuda == data.is_cuda assert t.is_cuda == data.is_cuda assert t.is_cuda == data.is", + "exact_match": false, + "code_bleu": 0.30120066786994826, + "edit_similarity": 0.38095238095238093 + }, + { + "repo": "facebookresearch/theseus", + "expected": "info.best_err)", + "got": "ee_pose_target)", + "got_raw": "ee_pose_target) updated_inputs[\"ee_pose_target\"]) assert info[\"error_history\"].shape == (25,) assert info[\"error_history\"][0] < 0.001 assert info[\"error_history\"][-1] < 0.0001 assert info[\"error_history\"][-2] < 0.0005 assert info[\"error_history\"][-3] < 0.0001 assert info[\"error_history\"][-4] < 0.0001 assert info[\"error_history\"][-5] < 0.0001 assert info[\"error", + "exact_match": false, + "code_bleu": 0.2686424829558855, + "edit_similarity": 0.27586206896551724 + }, + { + "repo": "facebookresearch/theseus", + "expected": "None", + "got": "None", + "got_raw": "None # noqa: E711\n\n\ndef test_getters_with_var_names():\n (\n objective,\n cost_functions,\n names,\n var_to_cost_functions,\n aux_to_cost_functions,\n ) = create_objective_with_mock_cost_functions()\n for cost_function, name in zip(cost_functions, names):\n assert id(objective.get_cost_function(name)) == id(cost_function)\n\n for var in var_to_cost_functions:\n assert id(var) == id(objective.get_optim_var(var.name))\n\n for aux in aux_to_cost_functions:\n assert id(aux) == id(object", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "facebookresearch/theseus", + "expected": "t1.norm()", + "got": "torch.norm(t1)", + "got_raw": "torch.norm(t1) # noqa: E712, E501, E203, E201, E202, E204, E205, E206, E207, E208, E209, E211, E212, E213, E214, E215, E216, E217, E218, E219, E221, E222, E223, E224", + "exact_match": false, + "code_bleu": 0.45499414040480374, + "edit_similarity": 0.6956521739130435 + }, + { + "repo": "facebookresearch/theseus", + "expected": "new_name", + "got": "new_name", + "got_raw": "new_name + \"_copy\" + fn.name[1:] + \"_copy\" + fn.name[1:] + \"_copy\" + fn.name[1:] + \"_copy\" + fn.name[1:] + \"_copy\" + fn.name[1:] + \"_copy\" + fn.name[1:] + \"_copy\" + fn.name[1:] + \"_copy\" + fn.name[1:] + \"_copy\" + fn.name[1:] + \"_copy\" + fn.name[1:] + \"_copy\" + fn.name[1:] + \"_copy\" + fn.name[1:] + \"_copy\" + fn", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fastapi-mvc/fastapi-mvc", + "expected": "router2_expected", + "got": "router2_expected", + "got_raw": "router2_expected + \"\\n\" + router2_content + \"\\n\" + router2_content + \"\\n\" + router2_content + \"\\n\" + router2_content + \"\\n\" + router2_content + \"\\n\" + router2_content + \"\\n\" + router2_content + \"\\n\" + router2_content + \"\\n\" + router2_content + \"\\n\" + router2_content + \"\\n\" + router2_content + \"\\n\" + router2_content + \"\\n\" + router2_content + \"\\n\" + router2_content + \"\\n\" + router2_content + \"\\n\" +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fastapi-mvc/fastapi-mvc", + "expected": "2", + "got": "2", + "got_raw": "2 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fastapi-mvc/fastapi-mvc", + "expected": "caplog.text", + "got": "caplog.text.lower()", + "got_raw": "caplog.text.lower() + result.output.lower() + result.error.lower() + result.stdout.lower() + result.stderr.lower() + result.exception.args[0] + result.exception.args[1] + result.exception.args[2] + result.exception.args[3] + result.exception.args[4] + result.exception.args[5] + result.exception.args[6] + result.exception.args[7] + result.exception.args[8] + result.exception.args[9] + result.exception.args[10] + result.exception.args[11] + result.exception.args[12] + result.exception.args[13] +", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.7333333333333333 + }, + { + "repo": "fastapi-mvc/fastapi-mvc", + "expected": "[f\"{tmp}/my-script.sh\"])", + "got": "tmp)", + "got_raw": "tmp)", + "exact_match": false, + "code_bleu": 0.2149139863647084, + "edit_similarity": 0.2857142857142857 + }, + { + "repo": "fastapi-mvc/fastapi-mvc", + "expected": "[ mock.call(cmd=[\"git\", \"init\"], cwd=f\"{DIR}/test-project\"), mock.call(cmd=[\"make\", \"install\"], cwd=f\"{DIR}/test-project\"), ])", + "got": "\"test-project\")[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"", + "got_raw": "\"test-project\")[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"project\"])[\"", + "exact_match": false, + "code_bleu": 0.012625609782458734, + "edit_similarity": 0.08503937007874016 + }, + { + "repo": "fastapi-mvc/fastapi-mvc", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fastapi-mvc/fastapi-mvc", + "expected": "\"fake_project\"", + "got": "\"fake_package\"", + "got_raw": "\"fake_package\" assert project_data[\"author\"] == \"Fake Author\" assert project_data[\"email\"] == \"fake@email.com\" assert project_data[\"description\"] == \"Fake Project\" assert project_data[\"license\"] == \"MIT\" assert project_data[\"url\"] == \"https://github.com/fake-project\" assert project_data[\"github_username\"] == \"fake\" assert project_data[\"github_repo\"] == \"fake-project\" assert project_data[\"github_branch\"] == \"main\" assert project_data[\"github_token\"] == \"fake-token\" assert project_data[\"github_secret\"] == \"fake-secret\" assert project_data[\"github_deploy", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6428571428571429 + }, + { + "repo": "fastapi-mvc/fastapi-mvc", + "expected": "dirhash(str(reference_projects[target]))", + "got": "dirhash(str(update_copy))", + "got_raw": "dirhash(str(update_copy))", + "exact_match": false, + "code_bleu": 0.4162224902509523, + "edit_similarity": 0.5230769230769231 + }, + { + "repo": "fastapi-users/fastapi-users", + "expected": "[\"200\", \"401\"]", + "got": "[\"200\", \"401\", \"403\"] + [\"500\"] if \"500\" in route[\"responses\"] else [\"401\", \"403\"] + [\"500\"] if \"500\" in route[\"responses\"] else [\"401\", \"403\"] + [\"500\"] if \"500\" in route[\"responses\"] else [\"401\", \"403\"] + [\"500\"] if \"500\" in route[\"responses\"] else [\"401\", \"403\"] +", + "got_raw": "[\"200\", \"401\", \"403\"] + [\"500\"] if \"500\" in route[\"responses\"] else [\"401\", \"403\"] + [\"500\"] if \"500\" in route[\"responses\"] else [\"401\", \"403\"] + [\"500\"] if \"500\" in route[\"responses\"] else [\"401\", \"403\"] + [\"500\"] if \"500\" in route[\"responses\"] else [\"401\", \"403\"] +", + "exact_match": false, + "code_bleu": 0.04588717249442081, + "edit_similarity": 0.099644128113879 + }, + { + "repo": "fastapi-users/fastapi-users", + "expected": "status.HTTP_200_OK", + "got": "status.HTTP_200_OK", + "got_raw": "status.HTTP_200_OK, response.text, data, email, verified_user.id, user_manager.get_by_id, verified_user.id, verified_user.id, verified_user.id, verified_user.id, verified_user.id, verified_user.id, verified_user.id, verified_user.id, verified_user.id, verified_user.id, verified_user.id, verified_user.id, verified_user.id, verified_user.id, verified_user.id, verified_user.id, verified_user.id, verified_user.id, verified_user.id, verified_user.id, verified_user.id, verified_user.id, verified_user.id, verified_user.id, verified_user.id, verified_user.id", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fastapi-users/fastapi-users", + "expected": "True", + "got": "True", + "got_raw": "True\n\n async def test_valid_body_is_active_unverified_user(\n self, test_app_client: tuple[httpx.AsyncClient, bool], unverified_user: UserModel\n ):\n client, _ = test_app_client\n json = {\"is_active\": False}\n response = await client.patch(\n \"/me\", json=json, headers={\"Authorization\": f\"Bearer {unverified_user.id}\"}\n )\n assert response.status_code == status.HTTP_200_OK\n\n data = cast(dict[str, Any], response.json())\n\n assert data[\"is_active\"] is False\n\n async def test", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fastapi-users/fastapi-users", + "expected": "[ \"200\", \"401\", \"403\", \"404\", \"400\", \"422\", ]", + "got": "[\"200\", \"401\", \"403\", \"422\"] + [\"500\"] * 2 + [\"429\"] * 2 + [\"429\"] * 2 + [\"429\"] * 2 + [\"429\"] * 2 + [\"429\"] * 2 + [\"429\"] * 2 + [\"429\"] * 2 + [\"429\"] * 2 + [\"429\"] * 2 + [\"429\"] * 2 + [\"429\"] * 2", + "got_raw": "[\"200\", \"401\", \"403\", \"422\"] + [\"500\"] * 2 + [\"429\"] * 2 + [\"429\"] * 2 + [\"429\"] * 2 + [\"429\"] * 2 + [\"429\"] * 2 + [\"429\"] * 2 + [\"429\"] * 2 + [\"429\"] * 2 + [\"429\"] * 2 + [\"429\"] * 2 + [\"429\"] * 2", + "exact_match": false, + "code_bleu": 0.08695585367072416, + "edit_similarity": 0.23236514522821577 + }, + { + "repo": "fastapi-users/fastapi-users", + "expected": "False", + "got": "False", + "got_raw": "False", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fastapi-users/fastapi-users", + "expected": "123", + "got": "123.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "123.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.04580152671755725 + }, + { + "repo": "fastapi-users/fastapi-users", + "expected": "False", + "got": "False", + "got_raw": "False", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fastapi-users/fastapi-users", + "expected": "1", + "got": "1", + "got_raw": "1\n\ncookie = cookies[0]\nassert cookie[1] == b\"COOKIE_NAME=TOKEN; Path=%s; Max-Age=%d; HttpOnly\" % (path.encode(), COOKIE_MAX_AGE) if httponly else b\"COOKIE_NAME=TOKEN; Path=%s; Max-Age=%d\" % (path.encode(), COOKIE_MAX_AGE) if secure else b\"COOKIE_NAME=TOKEN; Path=%s\" % path.encode() if domain else b\"COOKIE_NAME=TOKEN\" if secure else b\"COOKIE_NAME=TOKEN; HttpOnly\" if httponly else b\"COOKIE_NAME=T", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fastapi-users/fastapi-users", + "expected": "\"/oauth/callback\"", + "got": "\"/oauth/callback\"", + "got_raw": "\"/oauth/callback\"\n\n associate_route_name = (\n f\"oauth:{oauth_client.name}.{mock_authentication.name}.associate\"\n )\n assert test_app.url_path_for(associate_route_name) == \"/oauth-associate\"\n\n\n@pytest.mark.asyncio\n@pytest.mark.oauth\n@pytest.mark.router\nasync def test_oauth_router(test_app: FastAPI, oauth_client: OAuth2):\n response = await test_app.get(\"/oauth/authorize\")\n assert response.status_code == status.HTTP_200_OK\n\n\n@pytest.mark.asyncio\n@pytest.mark.oauth\n@pytest.mark.router\nasync def test_oauth_associ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fastapi-users/fastapi-users", + "expected": "str(user.id)", + "got": "str(user.id)", + "got_raw": "str(user.id) assert decoded[\"aud\"] == \"fastapi-users:auth\" assert decoded[\"exp\"] > 0 assert decoded[\"iat\"] > 0 assert decoded[\"nbf\"] == 0 assert decoded[\"jti\"] is not None assert decoded[\"typ\"] == \"JWT\" assert decoded[\"alg\"] == jwt_strategy.algorithm.lower() assert decoded[\"kid\"] == jwt_strategy.encode_key_id assert decoded[\"type\"] == \"access\" assert decoded[\"scope\"] == \"access\" assert decoded[\"user_id\"] == str(user.id) assert decoded[\"username\"] == user.username assert decoded[\"email\"] == user.email assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fastapi/sqlmodel", + "expected": "None", + "got": "None", + "got_raw": "None\n\n\ndef test_model_with_future_annotations_and_default(clear_sqlmodel):\n class Hero(SQLModel, table=True):\n id: Annotated[int | None, Field(primary_key=True)] = None\n name: str\n secret_name: str\n age: int | None = 40\n\n hero = Hero(name=\"Deadpond\", secret_name=\"Dive Wilson\")\n\n engine = create_engine(\"sqlite://\")\n SQLModel.metadata.create_all(engine)\n\n with Session(engine) as session:\n session.add(hero)\n session.commit()\n session.refresh(hero)\n\n assert hero.id is not", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fastapi/sqlmodel", + "expected": "2", + "got": "2", + "got_raw": "2 assert data[0][\"name\"] == \"Deadpond\" assert data[0][\"secret_name\"] == \"Dive Wilson\" assert data[0][\"age\"] is None assert data[1][\"name\"] == \"Spider-Youngster\" assert data[1][\"secret_name\"] == \"Spider-Boy\" assert data[1][\"age\"] is None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fastapi/sqlmodel", + "expected": "200", + "got": "200", + "got_raw": "200\n hero1 = module.Hero(**data)\n hero1.id = 1\n assert hero1.name == hero1_data[\"name\"]\n assert hero1.secret_name == hero1_data[\"secret_name\"]\n assert hero1.id == 1\n\n response = client.post(\"/heroes/\", json=hero2_data)\n data = response.json()\n hero2 = module.Hero(**data)\n hero2.id = 2\n assert hero2.name == hero2_data[\"name\"]\n assert hero2.secret_name == hero2_data[\"secret_name\"]\n assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fastapi/sqlmodel", + "expected": "heroes[1].name", + "got": "\"Deadpond\"", + "got_raw": "\"Deadpond\" assert heroes[0].secret_name == \"Dive Wilson\" assert heroes[1].name == \"Deadpond\" assert heroes[1].secret_name == \"Dive Wilson\" assert heroes[1].age is None\n\n\ndef test_should_allow_duplicate_row_if_unique_constraint_is_passed(clear_sqlmodel):\n class Hero(SQLModel, table=True):\n id: int | None = Field(default=None, primary_key=True)\n name: str\n secret_name: str\n age: int | None = None\n unique: str = Field(unique=True)\n\n hero_1 = Hero", + "exact_match": false, + "code_bleu": 0.08333333333333333, + "edit_similarity": 0.16666666666666666 + }, + { + "repo": "fastapi/sqlmodel", + "expected": "captured.out", + "got": "captured.out.lower()", + "got_raw": "captured.out.lower() assert \"CREATE TABLE myenum2 (myenum1);\" in captured.out.lower() assert \"CREATE TABLE myenum3 (myenum2);\" in captured.out.lower() assert \"CREATE TABLE myenum4 (myenum3);\" in captured.out.lower() assert \"CREATE TABLE myenum5 (myenum4);\" in captured.out.lower() assert \"CREATE TABLE myenum6 (myenum5);\" in captured.out.lower() assert \"CREATE TABLE myenum7 (myenum6);\" in captured.out.lower() assert \"CREATE TABLE myenum8 (myenum7);\" in captured.out.lower() assert \"CREATE TABLE", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.75 + }, + { + "repo": "fastapi/sqlmodel", + "expected": "[ [{\"secret_name\": \"Dive Wilson\", \"age\": None, \"id\": 1, \"name\": \"Deadpond\"}] ]", + "got": "expected_calls() + [print_mock.call(\"Hero:\", hero)] for hero in expected_heroes() ] def expected_calls() -> list[str]: return [ \"Hero:\", \"Hero(id=1, name='Deadpond', secret_name='Dive Wilson', age=32)\", \"Hero(id=2, name='Spider-Boy', secret_name='Pedro Parqueador', age=None)\", \"Hero(id=3, name='Rusty-Man', secret_name='Tommy Sharp', age=48)\", ] def expected_heroes() -> list[Hero]: return [ Hero(id=1, name=\"Deadpond", + "got_raw": "expected_calls() + [print_mock.call(\"Hero:\", hero)] for hero in expected_heroes() ] def expected_calls() -> list[str]: return [ \"Hero:\", \"Hero(id=1, name='Deadpond', secret_name='Dive Wilson', age=32)\", \"Hero(id=2, name='Spider-Boy', secret_name='Pedro Parqueador', age=None)\", \"Hero(id=3, name='Rusty-Man', secret_name='Tommy Sharp', age=48)\", ] def expected_heroes() -> list[Hero]: return [ Hero(id=1, name=\"Deadpond", + "exact_match": false, + "code_bleu": 0.033069501859092736, + "edit_similarity": 0.2056451612903226 + }, + { + "repo": "fastapi/sqlmodel", + "expected": "\"Dive Wilson\"", + "got": "\"Dive Wilson\" assert data[\"age\"] is None", + "got_raw": "\"Dive Wilson\" assert data[\"age\"] is None", + "exact_match": false, + "code_bleu": 0.16036590969929357, + "edit_similarity": 0.49056603773584906 + }, + { + "repo": "fastapi/sqlmodel", + "expected": "expected_calls", + "got": "expected_calls[module.param]", + "got_raw": "expected_calls[module.param]", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "fastapi/sqlmodel", + "expected": "[ [ \"Hero:\", { \"id\": 1, \"name\": \"Test Hero\", \"secret_name\": \"Secret Test Hero\", \"age\": 24, }, ] ]", + "got": "[ [ \"Hero:\", { \"id\": 1, \"name\": \"Test Hero\", \"secret_name\": \"Secret Test Hero\", \"age\": 24, }, ] ]", + "got_raw": "[ [ \"Hero:\", { \"id\": 1, \"name\": \"Test Hero\", \"secret_name\": \"Secret Test Hero\", \"age\": 24, }, ] ]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fastapi/sqlmodel", + "expected": "RuntimeError)", + "got": "TypeError)", + "got_raw": "TypeError) as exc_info:\n\n class Parent(SQLModel):\n id: int = Field(primary_key=True)\n children: Relationship() # type: ignore\n\n\ndef test_sa_relationship_with_args() -> None:\n class Parent(SQLModel):\n id: int = Field(primary_key=True)\n children: Relationship( # type: ignore\n back_populates=\"parent\", sa_relationship_kwargs={\"cascade\": \"all\"}\n )\n\n class Child(SQLModel, table=True):\n id: int = Field(primary_key=True)\n parent: Parent = Relationship( # type: ignore\n sa_relationship_kwargs", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6086956521739131 + }, + { + "repo": "fastapi/sqlmodel", + "expected": "hero_2.id", + "got": "hero_2.id", + "got_raw": "hero_2.id", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fastapi/sqlmodel", + "expected": "\"CASCADE\"", + "got": "\"cascade\"", + "got_raw": "\"cascade\" # type: ignore[attr-defined] # noqa: E501 # type: ignore[attr-defined] # noqa: E501 # type: ignore[attr-defined] # noqa: E501 # type: ignore[attr-defined] # noqa: E501 # type: ignore[attr-defined] # noqa: E501 # type: ignore[attr-defined] # noqa: E501 # type: ignore[attr-defined] # noqa: E501 # type: ignore[attr-defined] # noqa: E", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "fastapi/sqlmodel", + "expected": "IntegrityError)", + "got": "IntegrityError)", + "got_raw": "IntegrityError) as exc_info: session.commit() assert str(exc_info.value) == \"IntegrityError: NOT NULL constraint failed: hero.optional_non_nullable_no_default\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fastapi/sqlmodel", + "expected": "None", + "got": "None", + "got_raw": "None, \"name cannot be None\"\n return v\n\n def test_field_validator_reject_none():\n with pytest.raises(ValidationError) as exc_info:\n\n Hero(name=None, secret_name=\"dive\", age=30)\n\n error = exc_info.value.errors()[0]\n assert error[\"loc\"] == 0\n assert error[\"msg\"] == \"name cannot be None\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fastapi/sqlmodel", + "expected": "\"Dive Wilson\"", + "got": "\"Dive Wilson\" assert data[\"age\"] is None", + "got_raw": "\"Dive Wilson\" assert data[\"age\"] is None # (6)!\n\nhero_id = data[\"id\"] # (7)!\n\nresponse = client.get(f\"/heroes/{hero_id}\") # (8)!\n\ndata = response.json() # (9)!\n\nassert response.status_code == 200 # (10)!\n\nassert data[\"name\"] == \"Deadpond\" assert data[\"secret_name\"] == \"Dive Wilson\" assert data[\"age\"] is None # (11)!\n\nhero = Hero(id=hero_id, name=\"Deadpond\", secret_name=\"D", + "exact_match": false, + "code_bleu": 0.16036590969929357, + "edit_similarity": 0.49056603773584906 + }, + { + "repo": "fastapi/sqlmodel", + "expected": "200", + "got": "200", + "got_raw": "200\n assert data[\"name\"] == hero_data[\"name\"]\n assert data[\"secret_name\"] == hero_data[\"secret_name\"]\n assert data[\"age\"] is None\n\n hero_id = data[\"id\"]\n\n response = client.get(\"/heroes/{hero_id}\", json=hero_data)\n data = response.json()\n\n assert response.status_code == 200\n assert data[\"id\"] == hero_id\n assert data[\"name\"] == hero_data[\"name\"]\n assert data[\"secret_name\"] == hero_data[\"secret_name\"]\n assert data[\"age\"] is", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fastapi/sqlmodel", + "expected": "\"B\"", + "got": "\"B\"", + "got_raw": "\"B\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fastapi/sqlmodel", + "expected": "0", + "got": "0", + "got_raw": "0, \"There should be no remaining items\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fastapi/sqlmodel", + "expected": "str", + "got": "str", + "got_raw": "str\n\n statement_4 = select(Hero.id, Hero.name, Hero.secret_name, Hero.age)\n results_4 = session.exec(statement_4)\n for hero_4 in results_4:\n assert len(hero_4) == 4\n age_4: int = hero_4[3]\n assert type(age_4) is int\n\n statement_5 = select(Hero.id, Hero.name, Hero.secret_name, Hero.food)\n results_5 = session.exec(statement_5)\n for hero_5 in results_5:\n assert len(hero_5)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fastapi/sqlmodel", + "expected": "0", + "got": "0", + "got_raw": "0, \"There should be no other indexes in the DB\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "feldroy/air", + "expected": "0", + "got": "0", + "got_raw": "0\n\n\ndef test_app_exception_handlers() -> None:\n \"\"\"Test that app.exception_handlers property exposes the exception handlers.\"\"\"\n app = air.Air()\n\n @app.exception_handler(Exception)\n def _exception_handler(_: Request, exc: Exception) -> str:\n return str(exc)\n\n assert isinstance(app.exception_handlers, dict)\n assert len(app.exception_handlers) > 0\n\n\ndef test_app_exception_handlers_default() -> None:\n \"\"\"Test that the default exception handler is added to the exception handlers.\"\"\"\n app = air.Air()\n\n assert isinstance(app.exception_handlers, dict)\n assert len", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "feldroy/air", + "expected": "html", + "got": "html.lower()", + "got_raw": "html.lower() html = cheese.render( errors={\"name\": \"error\"} ) assert \"error\" in html.lower() html = cheese.render( errors={\"name\": \"error\", \"age\": \"error\"} ) assert \"error\" in html.lower() assert \"error\" not in html.lower() cheese.name = \"cheese\" cheese.age = 100000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5 + }, + { + "repo": "feldroy/air", + "expected": "response.text", + "got": "response.text.lower()", + "got_raw": "response.text.lower()", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.7647058823529411 + }, + { + "repo": "feldroy/air", + "expected": "0", + "got": "0", + "got_raw": "0\nassert result.stdout.strip() == strip_ansi( \"\"\"\\ Usage: air [OPTIONS] COMMAND [ARGS]... \\ \\n\\nOptions:\\n\\t--version\\tShow the version and exit.\\n\\t--help\\t\\tShow this message and exit.\\n\\nCommands:\\n\\tbuild\\t\\tBuild the project.\\n\\tdev\\t\\tRun the development server.\\n\\tdeploy\\t\\tDeploy the project.\\n\\tlint\\t\\tLint the code.\\n\\ttest\\t\\tRun the tests.\\n\\twatch\\t\\tWatch for changes and rebuild.\\n\"\"\" )", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "feldroy/air", + "expected": "r.text", + "got": "r.text.lower()", + "got_raw": "r.text.lower()", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.6 + }, + { + "repo": "feldroy/air", + "expected": "\"Bar\"", + "got": "\"Bar\"", + "got_raw": "\"Bar\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "feldroy/air", + "expected": "\"id_\"", + "got": "\"id_\"", + "got_raw": "\"id_\" assert utils.migrate_attribute_name_to_air_tag(\"style\") == \"style_\" assert utils.migrate_attribute_name_to_air_tag(\"data\") == \"data_\" assert utils.migrate_attribute_name_to_air_tag(\"data-foo\") == \"data_foo_\" assert utils.migrate_attribute_name_to_air_tag(\"data-foo-bar\") == \"data_foo_bar_\" assert utils.migrate_attribute_name_to_air_tag(\"data-foo-bar-baz\") == \"data_foo_bar_baz_\" assert utils.migrate_attribute_name_to_air_tag(\"data-foo-bar-baz-\") == \"data_foo_bar_baz", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "feldroy/air", + "expected": "None", + "got": "None", + "got_raw": "None # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "feldroy/air", + "expected": "False", + "got": "False", + "got_raw": "False # No example section found, so nothing to update. \"\"\" def test_update_example_section_returns_true_for_existing_example_section(tmp_path: Path, capsys: pytest.CaptureFixture[str]) -> None: test_code = '''def my_function(): \"\"\"Function with example section. Example: example()\"\"\" pass ''' temp_file = tmp_path / \"test.py\" temp_file.write_text(test_code) result = update_example_section(temp_file, None, \"my_function\", \"example()\") assert result is True # Example section found, so it was updated. \"\"\" def test_update_example_section_updates_example_section(tmp_path: Path, capsys", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "feldroy/air", + "expected": "2", + "got": "2", + "got_raw": "2 # Check the number of parameters in the signature", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "feldroy/air", + "expected": "404", + "got": "404", + "got_raw": "404\nassert r.json() == {\"detail\": \"Not found\"}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "feldroy/air", + "expected": "\"

Is boosted: True

\"", + "got": "\"

Is boosted: True

\" response = client.get(\"/test\") assert response.text == \"

Is boosted: False

\" response = client.get(\"/test\"", + "got_raw": "\"

Is boosted: True

\" response = client.get(\"/test\") assert response.text == \"

Is boosted: False

\" response = client.get(\"/test\", headers={\"hx-boosted\": \"false\"}) assert response.text == \"

Is boosted: False

\" response = client.get(\"/test\", headers={\"hx-boosted\": \"1\"}) assert response.text == \"

Is boosted: True

\" response = client.get(\"/test\", headers={\"hx-boosted\": \"0\"}) assert response.text == \"

Is boosted", + "exact_match": false, + "code_bleu": 0.05291907393644996, + "edit_similarity": 0.32142857142857145 + }, + { + "repo": "feldroy/air", + "expected": "\"minified\"", + "got": "\"minified\"", + "got_raw": "\"minified\" assert captured[0] == \"\" assert captured[1] == \"\" assert captured[2] == \"\" assert captured[3] == \"\" assert captured[4] == \"\" assert captured[5] == \"\" assert captured[6] == \"\" assert captured[7] == \"\" assert captured[8] == \"\" assert captured[9] == \"\" assert captured[10] == \"\" assert captured", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "feldroy/air", + "expected": "expected_html", + "got": "expected_html.strip()", + "got_raw": "expected_html.strip() + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\"", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.7647058823529411 + }, + { + "repo": "feldroy/air", + "expected": "200", + "got": "200", + "got_raw": "200 response.text == clean_doc( \"\"\"

Test Page

Hello, World!

\"\"\" ) def test_jinja_renderer_with_template_loader() -> None: \"\"\"Test the JinjaRenderer class with a custom template loader.\"\"\" app = FastAPI() loader = FileSystemLoader(\"tests/templates\") jinja = JinjaRenderer(loader=loader) @app.get(\"/test\") def page(request: Request) -> HTMLResponse: return jinja( request, name=\"test.html\", context={\"title\": \"Test Page\", \"content\": \"Hello, World!\"}, ) client = TestClient(app", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "feldroy/air", + "expected": "1", + "got": "1", + "got_raw": "1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "feldroy/air", + "expected": "\"

Prompt: None

\"", + "got": "\"

Prompt:

\"", + "got_raw": "\"

Prompt:

\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.9047619047619048 + }, + { + "repo": "feldroy/air", + "expected": "response.text", + "got": "response.text.lower()", + "got_raw": "response.text.lower() assert \"\" in response.text.lower() assert \"FastAPI\" in response.text.lower() assert \"\" in response.text.lower() assert \"\" in response.text.lower() assert \"

FastAPI

\" in response.text.lower() assert \"

FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.6+

\" in response.text.lower() assert \"\" in response.text.lower() assert \"\" in response.text.lower()", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.7647058823529411 + }, + { + "repo": "feldroy/air", + "expected": "1", + "got": "1", + "got_raw": "1\n assert \"a\" in result_sig.parameters\n assert result_sig.parameters[\"a\"].kind == inspect.Parameter.POSITIONAL_OR_KEYWORD\n assert result_sig.parameters[\"a\"].default == inspect.Parameter.empty\n assert result_sig.return_annotation == int\n\n\ndef test_cached_signature_with_empty_signature() -> None:\n \"\"\"Test that cached_signature handles empty __signature__ gracefully.\"\"\"\n\n def func_with_empty_sig() -> None:\n pass\n\n # Set __signature__ to an empty Signature object (unusual but possible)\n func_with_empty_sig.__signature__ = inspect.Signature()\n\n # Should fall back to inspect", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "feldroy/air", + "expected": "500", + "got": "500", + "got_raw": "500 # 500 Internal Server Error is the default response for unhandled exceptions.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fennerm/flashfocus", + "expected": "a_copy", + "got": "a_copy", + "got_raw": "a_copy\n\n\ndef test_hierarchical_merge_merges_dicts() -> None:\n a = {\"a\": 1, \"b\": 2}\n b = {\"a\": 2, \"b\": 2, \"c\": 3}\n hierarchical_merge([a, b]) == {\"a\": 2, \"b\": 2, \"c\": 3}\n\n\ndef test_hierarchical_merge_merges_lists() -> None:\n a = {\"a\": [1, 2], \"b\": [2, 3]}\n b = {\"a\": [2, 3", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fennerm/flashfocus", + "expected": "list()", + "got": "windows[2:]", + "got_raw": "windows[2:] + [windows[0]] + [windows[1]] + [windows[2]] + [windows[3]] + [windows[4]] + [windows[5]] + [windows[6]] + [windows[7]] + [windows[8]] + [windows[9]] + [windows[10]] + [windows[11]] + [windows[12]] + [windows[13]] + [windows[14]] + [windows[15]] + [windows[16]] + [windows[17]] + [windows[18]] +", + "exact_match": false, + "code_bleu": 0.2295748846661433, + "edit_similarity": 0.23529411764705882 + }, + { + "repo": "fennerm/flashfocus", + "expected": "pytest.approx(opacity)", + "got": "opacity", + "got_raw": "opacity * 255.0 / 100.0 + 0.5 * (1.0 - opacity) * 255.0 / 100.0 + 0.5 * 255.0 / 100.0 + 0.5 * 255.0 / 100.0 + 0.5 * 255.0 / 100.0 + 0.5 * 255.0 / 100.0 + 0.5 * 255", + "exact_match": false, + "code_bleu": 0.09910059291689341, + "edit_similarity": 0.4827586206896552 + }, + { + "repo": "fennerm/flashfocus", + "expected": "expected)", + "got": "expected)", + "got_raw": "expected) / 100.0 if expected is not None else None\n\n\ndef test_compute_flash_series_simple() -> None:\n flasher = Flasher(\n flash_opacity=0.8, default_opacity=1.0, ntimepoints=4, simple=True, time=0.2\n )\n for actual, expected in zip(flasher.flash_series, [0.8, 0.8, 0.8, 0.8]):\n assert actual == pytest.approx(expected) / 100.0 if expected is not None else None\n\n\ndef test_compute", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fennerm/flashfocus", + "expected": "1", + "got": "1.0000000000000002e-05", + "got_raw": "1.0000000000000002e-05 * 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.08695652173913043 + }, + { + "repo": "fgmacedo/python-statemachine", + "expected": "None", + "got": "None", + "got_raw": "None invoker._child.start() invoker.cancel() assert invoker._child is None invoker.run(ctx) assert invoker._child.start() invoker.cancel() assert invoker._child is None invoker.run(ctx) assert invoker._child.start() invoker.cancel() assert invoker._child is None invoker.run(ctx) assert invoker._child.start() invoker.cancel() assert invoker._child is None invoker.run(ctx) assert invoker._child.start() invoker.cancel() assert invoker._child is None invoker.run(ctx) assert invoker._child.start() invoker.cancel() assert inv", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fgmacedo/python-statemachine", + "expected": "{sm.wounded}", + "got": "{sm.fallen}", + "got_raw": "{sm.fallen} | {sm.wounded} | {sm.fighting} | {sm.fleeing} | {sm.fleeing_fight} | {sm.fleeing_fight_fallen} | {sm.fleeing_fight_fighting} | {sm.fleeing_fight_fighting_fallen} | {sm.fleeing_fight_fighting_fighting} | {sm.fleeing_fight_fighting_fighting_fallen} | {sm.fleeing_fight_fighting_fighting_fighting} | {sm.fleeing_fight_fighting_fighting_fighting_fallen}", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5217391304347826 + }, + { + "repo": "fgmacedo/python-statemachine", + "expected": "2", + "got": "2", + "got_raw": "2 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 *", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fgmacedo/python-statemachine", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fgmacedo/python-statemachine", + "expected": "4", + "got": "4", + "got_raw": "4 assert parts[0] == \"done\" assert parts[1] == \"invoke\" assert parts[2] == \"loading\" assert parts[3].isalnum() and len(parts[3]) == 8 # 8 hex digits assert parts[3].startswith(\"0x\") # must start with \"0x\" assert parts[3][2:].isdigit() # must be all digits after \"0x\" assert parts[3][2:].isalnum() # must be alphanumeric after \"0x\" assert parts[3][2:].islower() # must be lowercase after \"0x\" assert parts[", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fgmacedo/python-statemachine", + "expected": "sm2.configuration_values", + "got": "sm2.configuration_values.copy()", + "got_raw": "sm2.configuration_values.copy() - {GameStates.GAME_PLAYING} - {GameStates.GAME_OVER} - {GameStates.GAME_WIN} - {GameStates.GAME_LOSE} - {GameStates.GAME_PAUSED} - {GameStates.GAME_STOPPED} - {GameStates.GAME_SPECTATING} - {GameStates.GAME_SPECTATING} - {GameStates.GAME_SPECTATING} - {GameStates.GAME_SPECTATING} - {GameStates.GAME_SPECTATING} - {GameStates.GAME_SPECTATING} - {GameStates.GAME_SPECTATING}", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.8727272727272727 + }, + { + "repo": "fgmacedo/python-statemachine", + "expected": "\"yellow\"", + "got": "\"yellow\"", + "got_raw": "\"yellow\" s.on_enter_state(event_mock) s.on_exit_state(event_mock) s.on_enter_yellow(s) s.on_exit_yellow(s) s.on_enter_state(event_mock) s.on_exit_state(event_mock) s.on_exit_yellow(s) s.on_enter_green(s) s.on_exit_green(s) s.on_enter_state(event_mock) s.on_exit_state(event_mock) s.on_exit_green(s) s.on_enter_red(s) s.on_exit_red(s) s.on_enter_state(event_mock) s.on_exit_state(event_mock) s.on_exit_red(s) s.on_enter_green(s) s.on_exit_green(s) s.on_enter", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fgmacedo/python-statemachine", + "expected": "expected", + "got": "expected", + "got_raw": "expected for hook in hooks_called if hook is not None and hook not in calls[-1] if hook in calls[-1] else None for hook in hooks_called if hook is not None and hook not in calls[-1] if hook in calls[-1] else None for hook in hooks_called if hook is not None and hook not in calls[-1] if hook in calls[-1] else None for hook in hooks_called if hook is not None and hook not in calls[-1] if hook in calls[-1] else None for hook in hooks_called if hook is not None and hook not in calls[-1] if", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fgmacedo/python-statemachine", + "expected": "ValueError, match=\"A failed\")", + "got": "ValueError) as excinfo:", + "got_raw": "ValueError) as excinfo:\n await sm.run_transition(\"b\")\n assert str(excinfo.value) == \"b failed\"\n assert sm.configuration_values() == {\"a\": True, \"b\": False}\n\n async def test_second_validator_fails(self, sm_runner):\n \"\"\"Second validator failure stops the chain \u2014 first is not called.\"\"\"\n sm = await sm_runner.start(MultiValidator)\n\n with pytest.raises(\n### Target:\nValueError) as excinfo:\n await sm.run_transition(\"c\")\n assert str(excinfo.value) == \"c failed\"\n", + "exact_match": false, + "code_bleu": 0.251781283113064, + "edit_similarity": 0.4230769230769231 + }, + { + "repo": "fgmacedo/python-statemachine", + "expected": "vals", + "got": "vals", + "got_raw": "vals and \"aragorns_path\" in vals and \"gandalfs_defense\" in vals and \"frodos_quest\" in vals and \"mount_doom\" in vals and \"king\" in vals and \"ranger\" in vals and \"rohan\" in vals and \"shire\" in vals and \"mordor\" in vals and \"mount_doom\" in vals and \"mount_doom\" in vals and \"mount_doom\" in vals and \"mount_doom\" in vals and \"mount_doom\" in vals and \"mount_doom\" in vals and \"mount_doom\" in vals", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fgmacedo/python-statemachine", + "expected": "1", + "got": "sm.custom", + "got_raw": "sm.custom + 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.0 + }, + { + "repo": "fgmacedo/python-statemachine", + "expected": "\"Stop\"", + "got": "\"Stop\"", + "got_raw": "\"Stop\" assert sm.go.name == \"Go\" assert sm.go.is_active() assert not sm.slowdown.is_active() assert not sm.stop.is_active() assert sm.go.to(sm.slowdown) == sm.slowdown.on_cycle({\"event\": \"cycle slowdown\"}) assert sm.slowdown.to(sm.stop) == sm.stop.on_cycle({\"event\": \"cycle stop\"}) assert sm.stop.to(sm.go) == sm.go.on_cycle({\"event\": \"cycle go\"}) assert sm.go.is_active() assert not sm.slowdown.is_active() assert not sm.stop.is_active() assert sm.go.to(sm.slowdown) ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fgmacedo/python-statemachine", + "expected": "sm2.model.name", + "got": "sm2.model.name", + "got_raw": "sm2.model.name == \"main_model\" + \"2\" + \"3\" + \"4\" + \"5\" + \"6\" + \"7\" + \"8\" + \"9\" + \"10\" + \"11\" + \"12\" + \"13\" + \"14\" + \"15\" + \"16\" + \"17\" + \"18\" + \"19\" + \"20\" + \"21\" + \"22\" + \"23\" + \"24\" + \"25\" + \"26\" + \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fgmacedo/python-statemachine", + "expected": "None", + "got": "None", + "got_raw": "None assert machine.rejected.is_final assert machine.retry.is_active assert machine.retry.allowed_transitions == [\"retry\"] assert machine.retry.allowed_events == [\"retry\"] assert machine.retry.allowed_transitions == [\"retry\"] assert machine.retry.allowed_events == [\"retry\"] assert machine.retry.allowed_transitions == [\"retry\"] assert machine.retry.allowed_events == [\"retry\"] assert machine.retry.allowed_transitions == [\"retry\"] assert machine.retry.allowed_events == [\"retry\"] assert machine.retry.allowed_transitions == [\"retry\"] assert machine.retry.allowed_events == [\"retry\"] assert machine.retry.allowed_transitions == [\"retry\"] assert machine.retry.allowed_events == [\"retry\"] assert machine", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fgmacedo/python-statemachine", + "expected": "\"hello\")", + "got": "\"hello\")", + "got_raw": "\"hello\") if send_to_child_return else machine._engine._invoke_manager.send_to_child.return_value = False send_callable(machine=machine) machine._engine._invoke_manager.send_to_child.assert_not_called() def test_create_send_action_callable_raises_on_bad_target(self): \"\"\"create_send_action_callable raises on bad target.\"\"\" from statemachine.io.scxml.actions import create_send_action_callable from statemachine.io.scxml.parser import SendAction from statemachine.exceptions import InvalidDefinitionError def _make_action(target): return SendAction(event=\"hello\", target=target) def _make_machine(): return self._make_machine_with_invoke_manager() def test_create_send_action", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fgmacedo/python-statemachine", + "expected": "1", + "got": "1", + "got_raw": "1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fgmacedo/python-statemachine", + "expected": "\"42\"", + "got": "\"42\"", + "got_raw": "\"42\" # str(42) # str(machine.model.__dict__) # str(machine.model) # str(machine) # \"42\" # str(machine) # \"42\" # str(machine) # \"42\" # str(machine) # \"42\" # str(machine) # \"42\" # str(machine) # \"42\" # str(machine) # \"42\" # str(machine) # \"42\" # str(machine) # \"42\" # str(machine", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fgmacedo/python-statemachine", + "expected": "[(\"s2\", \"s3\")]", + "got": "[(\"s2\", \"s3\")] assert [(t.source.name, t.target.name) for t in t34] == [(\"s3\", \"s4\")] assert [(t.source.name, t.target.name) for t in cycle] == [(\"s1\", \"s4\")] assert cycle.is_cycle() == True assert cycle.is_or() == False assert cycle.is_and() == False assert cycle.is_transition() == True assert cycle.is_guard() == False assert cycle.is_guarded() == False assert cycle.is_guarded_or() == True assert cycle.is_guarded_and() == False assert cycle.is_guarded_or_or()", + "got_raw": "[(\"s2\", \"s3\")] assert [(t.source.name, t.target.name) for t in t34] == [(\"s3\", \"s4\")] assert [(t.source.name, t.target.name) for t in cycle] == [(\"s1\", \"s4\")] assert cycle.is_cycle() == True assert cycle.is_or() == False assert cycle.is_and() == False assert cycle.is_transition() == True assert cycle.is_guard() == False assert cycle.is_guarded() == False assert cycle.is_guarded_or() == True assert cycle.is_guarded_and() == False assert cycle.is_guarded_or_or()", + "exact_match": false, + "code_bleu": 0.04492890392560169, + "edit_similarity": 0.058577405857740586 + }, + { + "repo": "fgmacedo/python-statemachine", + "expected": "\"stopped\"", + "got": "\"stopping\"", + "got_raw": "\"stopping\" # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa:", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.7368421052631579 + }, + { + "repo": "fgmacedo/python-statemachine", + "expected": "[4, 6]", + "got": "[4, 6] control.cancel_order() with pytest.raises(exceptions.TransitionNotAllowed): control.ship_order() control.receive_payment(10) control.process_order() control.ship_order() with pytest.raises(exceptions.TransitionNotAllowed): control.cancel_order() control.receive_payment(10) control.process_order() control.ship_order() control.cancel_order() with pytest.raises(exceptions.TransitionNotAllowed): control.ship_order() control.receive_payment(10) control.process_order() control.ship_order() control.cancel_order() with pytest.raises(exceptions.TransitionNotAllowed): control.ship_order() control.receive_payment(10) control.process_order() control.ship", + "got_raw": "[4, 6] control.cancel_order() with pytest.raises(exceptions.TransitionNotAllowed): control.ship_order() control.receive_payment(10) control.process_order() control.ship_order() with pytest.raises(exceptions.TransitionNotAllowed): control.cancel_order() control.receive_payment(10) control.process_order() control.ship_order() control.cancel_order() with pytest.raises(exceptions.TransitionNotAllowed): control.ship_order() control.receive_payment(10) control.process_order() control.ship_order() control.cancel_order() with pytest.raises(exceptions.TransitionNotAllowed): control.ship_order() control.receive_payment(10) control.process_order() control.ship", + "exact_match": false, + "code_bleu": 0.030784545255630392, + "edit_similarity": 0.01809954751131222 + }, + { + "repo": "fixie-ai/ultravox", + "expected": "389", + "got": "960000", + "got_raw": "960000 // 8000 + 1000 // 8000 + 1000 // 8000 + 1000 // 8000 + 1000 // 8000 + 1000 // 8000 + 1000 // 8000 + 1000 // 8000 + 1000 // 8000 + 1000 // 8000 + 1000 // ", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "fixie-ai/ultravox", + "expected": "[3000, 500]", + "got": "[35] * 2 + [1] * 2 + [35] * 2 + [1] * 2 + [35] * 2 + [1] * 2 + [35] * 2 + [1] * 2 + [35] * 2 + [1] * 2 + [35] * 2 + [1] * 2 + [35] * 2 + [1] * 2 + [35] * 2 + [1] * 2 + [35] * 2 +", + "got_raw": "[35] * 2 + [1] * 2 + [35] * 2 + [1] * 2 + [35] * 2 + [1] * 2 + [35] * 2 + [1] * 2 + [35] * 2 + [1] * 2 + [35] * 2 + [1] * 2 + [35] * 2 + [1] * 2 + [35] * 2 + [1] * 2 + [35] * 2 +", + "exact_match": false, + "code_bleu": 0.012967033150133827, + "edit_similarity": 0.042328042328042326 + }, + { + "repo": "fixie-ai/ultravox", + "expected": "pytest.approx(29.728070921986767, rel=1e-2)", + "got": "pytest.approx(0.8333333333333333)", + "got_raw": "pytest.approx(0.8333333333333333)", + "exact_match": false, + "code_bleu": 0.32172944208038085, + "edit_similarity": 0.4473684210526316 + }, + { + "repo": "fixie-ai/ultravox", + "expected": "processed", + "got": "processed.keys()", + "got_raw": "processed.keys() assert processed[\"audio_token_start_idx\"].shape == torch.Size([1]) assert processed[\"audio_token_start_idx\"].equal(torch.tensor([1])) assert processed[\"audio_token_len\"].shape == torch.Size([1]) assert processed[\"audio_token_len\"].equal(torch.tensor([2])) assert processed[\"audio_lens\"].shape == torch.Size([1]) assert processed[\"audio_lens\"].equal(torch.tensor([10]))", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.72 + }, + { + "repo": "fixie-ai/ultravox", + "expected": "pytest.approx(100, rel=1e-2)", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.041666666666666664, + "edit_similarity": 0.038461538461538464 + }, + { + "repo": "fixie-ai/ultravox", + "expected": "8", + "got": "20000", + "got_raw": "20000 // 16000 * 16000 + 10000 // 16000 * 16000 + 10000 // 16000 * 16000 + 10000 // 16000 * 16000 + 10000 // 16000 * 16000 + 10000 // 16000 * 16000 + 10", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "fixie-ai/ultravox", + "expected": "[ {\"role\": \"user\", \"content\": \"A\"}, {\"role\": \"assistant\", \"content\": \"C\"}, ]", + "got": "[ {\"role\": \"user\", \"content\": \"A\"}, {\"role\": \"tool_call\", \"content\": \"B\"}, {\"role\": \"assistant\", \"content\": \"C\"}, ]", + "got_raw": "[ {\"role\": \"user\", \"content\": \"A\"}, {\"role\": \"tool_call\", \"content\": \"B\"}, {\"role\": \"assistant\", \"content\": \"C\"}, ]", + "exact_match": false, + "code_bleu": 0.6820453229133056, + "edit_similarity": 0.7958115183246073 + }, + { + "repo": "fixie-ai/ultravox", + "expected": "torch.Size([15])", + "got": "(1", + "got_raw": "(1, 15) assert processed[\"attention_mask\"].shape == (1, 15) assert processed[\"audio_values\"].shape == (1, 1, 3) assert processed[\"audio_token_start_idx\"].shape == (1,) assert processed[\"audio_token_len\"].shape == (1,) assert processed[\"audio_lens\"].shape == (1,) assert processed[\"text\"].shape == (1,) assert processed[\"text\"].dtype == torch.int64 assert processed[\"text\"][0] == 13 assert processed[\"text\"][0] == 15 assert processed[\"text\"][0] == 8", + "exact_match": false, + "code_bleu": 0.13432124147794275, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "fixie-ai/ultravox", + "expected": "[]", + "got": "[]", + "got_raw": "[]\n\n\ndef test_interleaved_single():\n s = datasets.InterleaveDataset([datasets.SimpleDataset([1])])\n\n assert list(s) == [1] * 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fla-org/flash-linear-attention", + "expected": "1e-3)", + "got": "0.005)", + "got_raw": "0.005) assert_close(\"dx\", ref_dx, tri_dx, 0.005) assert_close(\"dw\", ref_dw, tri_dw, 0.005) if has_bias: assert_close(\"db\", ref_db, tri_db, 0.005) if has_residual: assert_close(\"dr\", ref_dr, tri_dr, 0.005)", + "exact_match": false, + "code_bleu": 0.2686424829558855, + "edit_similarity": 0.18181818181818182 + }, + { + "repo": "fla-org/flash-linear-attention", + "expected": "0.006)", + "got": "0.005)", + "got_raw": "0.005) assert_close('o', ref_ht, tri_ht, 0.005) assert_close('dq', ref_dq, tri_dq, 0.005) assert_close('dk', ref_dk, tri_dk, 0.005) assert_close('dv', ref_dv, tri_dv, 0.005) assert_close('dbeta', ref_dbeta, tri_dbeta, 0.005) assert_close('dh0', ref_dh0, tri_dh0, 0.005)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.8333333333333334 + }, + { + "repo": "fla-org/flash-linear-attention", + "expected": "0.008)", + "got": "0.008)", + "got_raw": "0.008) assert_close('dq', ref_dq, tri_dq, 0.008) assert_close('dk', ref_dk, tri_dk, 0.008) assert_close('dv', ref_dv, tri_dv, 0.008) assert_close('da', ref_da, tri_da, 0.008) assert_close('db', ref_db, tri_db, 0.008) assert_close('dg', ref_dg, tri_dg, 0.008) assert_close('dh0',", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fla-org/flash-linear-attention", + "expected": "0.001)", + "got": "0.005)", + "got_raw": "0.005) assert_close('ht', ref_ht, tri_ht, 0.005) assert_close('h0', h0, tri_ht[0], 0.005) assert_close('h0', h0, ref_ht[0], 0.005) assert_close('h0', h0, tri_ht[1], 0.005) assert_close('h0', h0, ref_ht[1], 0.005) assert_close('h0', h0, tri_ht[2], 0.005", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.8333333333333334 + }, + { + "repo": "fla-org/flash-linear-attention", + "expected": "1e-4)", + "got": "0.005)", + "got_raw": "0.005) assert_close(\"dg\", ref_dg, tri_dg, 0.005) assert_close(\"dA\", ref_dA, tri_dA, 0.005) if dt_bias is not None: assert_close(\"dbias\", ref_dbias, tri_dbias, 0.005) else: assert ref_dbias is None and tri_dbias is None assert_close(\"dA\", ref_dA, tri_dA, 0.005) if dt_bias is not None: assert_close(\"dbias\", ref_dbias, tri", + "exact_match": false, + "code_bleu": 0.2686424829558855, + "edit_similarity": 0.18181818181818182 + }, + { + "repo": "fla-org/flash-linear-attention", + "expected": "xw1)", + "got": "xw1)", + "got_raw": "xw1) assert_close(\"xk0\", xk0, xk1) assert_close(\"xv0\", xv0, xv1) assert_close(\"xa0\", xa0, xa1) assert_close(\"xg0\", xg0, xg1) if use_g: assert_close(\"xg0\", xg0, xg1) else: assert_close(\"xg0\", xg0, None) assert_close(\"xr0\", xr0, None) assert_close(\"xw0\", xw0, None) assert_close(\"xk0\", xk0,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fla-org/flash-linear-attention", + "expected": "0.008)", + "got": "0.005)", + "got_raw": "0.005) assert_close('dq', ref_dq, tri_dq, 0.005) assert_close('dk', ref_dk, tri_dk, 0.005) assert_close('dv', ref_dv, tri_dv, 0.005) assert_close('dbeta', ref_dbeta, tri_dbeta, 0.005) assert_close('dg', ref_dg, tri_dg, 0.005) if is_intel_alchemist(): print('================== Running forward and backward with Alchemist ==================')", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.8333333333333334 + }, + { + "repo": "fla-org/flash-linear-attention", + "expected": "0.008)", + "got": "0.005)", + "got_raw": "0.005) assert_close('dk', ref_dk, tri_dk, 0.005) assert_close('dv', ref_dv, tri_dv, 0.005) assert_close('dbeta', ref_dbeta, tri_dbeta, 0.005) assert_close('dh0', ref_dh0, tri_dh0, 0.005)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.8333333333333334 + }, + { + "repo": "fla-org/flash-linear-attention", + "expected": "opt_split_none)", + "got": "opt_split_none)", + "got_raw": "opt_split_none) == pytest.approx(ref_split_none, abs=1e-5) / pytest.approx(1.0, abs=1e-5) / pytest.approx(1.0, abs=1e-5) / pytest.approx(1.0, abs=1e-5) / pytest.approx(1.0, abs=1e-5) / pytest.approx(1.0, abs=1e-5) / pytest.approx(1.0, abs=1e-5) / pytest.approx(1.0, abs=1e", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fla-org/flash-linear-attention", + "expected": "0.005)", + "got": "0.005)", + "got_raw": "0.005) assert_close('o', ref_ht, tri_ht, 0.005) assert_close('dq', ref_dq, tri_dq, 0.005) assert_close('dk', ref_dk, tri_dk, 0.005) assert_close('dv', ref_dv, tri_dv, 0.005) assert_close('dbeta', ref_dbeta, tri_dbeta, 0.005) assert_close('dg', ref_dg, tri_dg, 0.005) assert_close('", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fla-org/flash-linear-attention", + "expected": "False", + "got": "True", + "got_raw": "True # TODO: add test for this case g = torch.clamp(g, min=0) # TODO: add test for this case g = torch.clamp(g, max=1) # TODO: add test for this case g = torch.clamp(g, min=-1000) # TODO: add test for this case g = torch.clamp(g, max=1000) # TODO: add test for this case g = torch.clamp(g, min=0, max=1) # TODO: add test for this case g = torch.clamp(g, min=-1000,", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "fla-org/flash-linear-attention", + "expected": "0.007)", + "got": "0.005)", + "got_raw": "0.005) assert_close('dk', ref_dk, tri_dk, 0.005) assert_close('dv', ref_dv, tri_dv, 0.005) assert_close('dbeta', ref_dbeta, tri_dbeta, 0.005) assert_close('dg', ref_dg, tri_dg, 0.005) assert_close('dh0', ref_dh0, tri_dh0, 0.005)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.8333333333333334 + }, + { + "repo": "fla-org/flash-linear-attention", + "expected": "0.004)", + "got": "0.004)", + "got_raw": "0.004) assert_close('dq', q.grad, tri_dq, 0.006) assert_close('dk', k.grad, tri_dk, 0.006) assert_close('dv', v.grad, tri_dv, 0.006) assert_close('ds', s.grad, tri_ds, 0.006) assert_close('dg', g.grad, tri_dg, 0.006) assert_close('dhkt', hk0.grad, tri_dhk0, 0.006) assert_close('dhvt',", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fla-org/flash-linear-attention", + "expected": "1e-3", + "got": "1e-3", + "got_raw": "1e-3 if inplace else 1e-2 if dtype == torch.float32 else 1e-4 if dtype == torch.bfloat16 else 1e-5 if dtype == torch.float16 else 1e-6 if dtype == torch.float64 else 1e-7 if dtype == torch.float128 else 1e-8 if dtype == torch.float256 else 1e-9 if dtype == torch.float512 else 1e-10 if dtype == torch.float1024 else 1e-11 if dtype == torch", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fla-org/flash-linear-attention", + "expected": "0.001)", + "got": "0.005)", + "got_raw": "0.005) assert_close('dq', q.grad, tri_dq) assert_close('dk', k.grad, tri_dk) assert_close('dv', v.grad, tri_dv) assert_close('dh0', h0.grad, tri_dh0)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.8333333333333334 + }, + { + "repo": "fla-org/flash-linear-attention", + "expected": "cp)", + "got": "cp)", + "got_raw": "cp) test_passed = False print(f\"Failed: {name}\") print(f\"Reference: {ref}\") print(f\"CP: {cp}\") print(f\"Diff: {ref - cp}\") print(f\"Diff Max: {torch.max(ref - cp)}\") print(f\"Diff Min: {torch.min(ref - cp)}\") print(f\"Diff Mean: {torch.mean(ref - cp)}\") print(f\"Diff Std: {torch.std(ref - cp)}\") print(f\"Diff Max Abs: {torch.max(torch.abs(ref - cp))}\") print(f\"Diff Min Abs: {torch.min(torch.abs(ref - cp", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "flashbots/mev-inspect-py", + "expected": "arb_swaps", + "got": "arb_swaps", + "got_raw": "arb_swaps + [unrelated_swap] + [unrelated_swap] + [unrelated_swap] + [unrelated_swap] + [unrelated_swap] + [unrelated_swap] + [unrelated_swap] + [unrelated_swap] + [unrelated_swap] + [unrelated_swap] + [unrelated_swap] + [unrelated_swap] + [unrelated_swap] + [unrelated_swap] + [unrelated_swap] + [unrelated_swap] + [unrelated_swap] + [unrelated_swap] + [unrelated_swap] + [unrelated_swap] + [unrelated_swap", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "flashbots/mev-inspect-py", + "expected": "\"0x4a536c1f6a5d5a9c1aeca9f6d04fbbf5f0d8f4e3\"", + "got": "\"0x4a536c1f6a5d5a9c1aeca9f6d04fbbf5f0d8f4e3\"", + "got_raw": "\"0x4a536c1f6a5d5a9c1aeca9f6d04fbbf5f0d8f4e3\" # The expected miner address", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "flashbots/mev-inspect-py", + "expected": "1", + "got": "1", + "got_raw": "1 assert arbitrages[0].transaction_hash == transaction_hash assert arbitrages[0].block_number == block_number assert arbitrages[0].from_address == account_address assert arbitrages[0].to_address == account_address assert arbitrages[0].token_in_address == second_token_address assert arbitrages[0].token_in_amount == first_token_in_amount assert arbitrages[0].token_out_address == first_token_address assert arbitrages[0].token_out_amount == first_token_out_amount assert arbitrages[0].protocol == Protocol.uniswap_v3 assert arbitrages[0].shortest_route == [ (second_token_address", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "flashbots/mev-inspect-py", + "expected": "\"testFunction(uint256)\"", + "got": "\"testFunction(uint256)\"", + "got_raw": "\"testFunction(uint256)\" call_data.parameters[test_parameter_name] == 1.0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "flashbots/mev-inspect-py", + "expected": "2", + "got": "12222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222", + "got_raw": "12222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "fpgmaas/deptry", + "expected": "{\"foo\": [Location(random_file, 1, 8)]}", + "got": "{\"foo\"}", + "got_raw": "{\"foo\"}", + "exact_match": false, + "code_bleu": 0.13691637948134408, + "edit_similarity": 0.3111111111111111 + }, + { + "repo": "fpgmaas/deptry", + "expected": "{ \"exclude\": [\"foo\", \"bar\"], \"extend_exclude\": [\"bar\", \"foo\"], \"ignore_notebooks\": True, \"per_rule_ignores\": { \"DEP001\": [\"baz\", \"foobar\"], \"DEP002\": [\"foo\"], \"DEP003\": [\"foobaz\"], \"DEP004\": [\"barfoo\"], }, \"ignore\": [\"DEP001\", \"DEP002\", \"DEP003\", \"DEP004\"], \"requirements_files\": \"foo.txt\", \"requirements_files_dev\": [\"dev.txt\", \"tests.txt\"], }", + "got": "{ \"exclude\": [\"bar\"], \"extend_exclude\": [\"foo\"], \"per_rule_ignores\": { \"DEP002\": [\"baz\", \"bar\"], }, \"ignore\": [\"DEP001\", \"DEP002\", \"DEP003\", \"DEP004\"], \"ignore_notebooks\": True, \"requirements_files\": \"foo.txt\", \"requirements_files_dev\": [\"dev.txt\", \"tests.txt\"], } } def test_read_configuration_from_pyproject_toml_missing(tmp_path: Path) -> None: click_context = click.Context( click_command, default_map={", + "got_raw": "{ \"exclude\": [\"bar\"], \"extend_exclude\": [\"foo\"], \"per_rule_ignores\": { \"DEP002\": [\"baz\", \"bar\"], }, \"ignore\": [\"DEP001\", \"DEP002\", \"DEP003\", \"DEP004\"], \"ignore_notebooks\": True, \"requirements_files\": \"foo.txt\", \"requirements_files_dev\": [\"dev.txt\", \"tests.txt\"], } } def test_read_configuration_from_pyproject_toml_missing(tmp_path: Path) -> None: click_context = click.Context( click_command, default_map={", + "exact_match": false, + "code_bleu": 0.6231611397399829, + "edit_similarity": 0.6045272969374168 + }, + { + "repo": "fpgmaas/deptry", + "expected": "{\"foo\", \"bar\"}", + "got": "{\"foo\", \"bar\"} dependency = Dependency(\"Foo-bar\", Path(\"pyproject.toml\")) dependency.top_levels = {\"foo\", \"bar\"} dependency = Dependency(\"Foo-bar\", Path(\"pyproject.toml\")) dependency.top_levels = {\"foo\"} dependency = Dependency(\"Foo-bar\", Path(\"pyproject.toml\")) dependency.top_levels = {\"bar\"} dependency = Dependency(\"Foo-bar\", Path(\"pyproject.toml\")) dependency.top_levels = set() dependency = Dependency(\"Foo-bar\", Path(\"pyproject.toml\")) dependency.top_levels = {\"foo\", \"bar\", \"baz\"} dependency = Dependency(\"Foo-bar\", Path(\"", + "got_raw": "{\"foo\", \"bar\"} dependency = Dependency(\"Foo-bar\", Path(\"pyproject.toml\")) dependency.top_levels = {\"foo\", \"bar\"} dependency = Dependency(\"Foo-bar\", Path(\"pyproject.toml\")) dependency.top_levels = {\"foo\"} dependency = Dependency(\"Foo-bar\", Path(\"pyproject.toml\")) dependency.top_levels = {\"bar\"} dependency = Dependency(\"Foo-bar\", Path(\"pyproject.toml\")) dependency.top_levels = set() dependency = Dependency(\"Foo-bar\", Path(\"pyproject.toml\")) dependency.top_levels = {\"foo\", \"bar\", \"baz\"} dependency = Dependency(\"Foo-bar\", Path(\"", + "exact_match": false, + "code_bleu": 0.039781774000980784, + "edit_similarity": 0.051470588235294115 + }, + { + "repo": "fpgmaas/deptry", + "expected": "[ \"\", stylize(\"{BOLD}{GREEN}Success! No dependency issues found.{RESET}\"), ]", + "got": "[]", + "got_raw": "[]\n\n\ndef test_logging_number_one(caplog: LogCaptureFixture) -> None:\n dep = Dependency( \"dep\", \"1.0.0\", Location( Path(\"/path/to/file\"), 10, 20, ), )\n TextReporter([dep], enforce_posix_paths=False).report()\n assert caplog.text == stylize( f\"dep 1.0.0 at /path/to/file:10:20\\n\", COLORS, ) + \"\\n\" + stylize( \"1 dependency found\\n\", COLORS, ) + \"\\n\" + stylize( \"1 dependency", + "exact_match": false, + "code_bleu": 0.1321341238891912, + "edit_similarity": 0.05128205128205128 + }, + { + "repo": "fpgmaas/deptry", + "expected": "1", + "got": "4", + "got_raw": "4", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "fpgmaas/deptry", + "expected": "None", + "got": "None", + "got_raw": "None # type: ignore # noqa: E501 # Invalid definition, should return None # noqa: E501 # Invalid definition, should return None # noqa: E501 # Invalid definition, should return None # noqa: E501 # Invalid definition, should return None # noqa: E501 # Invalid definition, should return None # noqa: E501 # Invalid definition, should return None # noqa: E501 # Invalid definition, should return None # noqa: E501 #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fpgmaas/deptry", + "expected": "True", + "got": "True", + "got_raw": "True # type: ignore # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fpgmaas/deptry", + "expected": "caplog.text", + "got": "caplog.text.lower()", + "got_raw": "caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.7333333333333333 + }, + { + "repo": "fpgmaas/deptry", + "expected": "{\"click\"}", + "got": "{\"click\"}", + "got_raw": "{\"click\"} dependency.extras == set() dependency.version == \">=7.0\" dependency.exclusions == set() dependency.dev = False dependency.is_optional = False dependency.is_dev = False dependency.is_optional_dev = False dependency.is_optional_dev = False dependency.is_optional_dev = False dependency.is_optional_dev = False dependency.is_optional_dev = False dependency.is_optional_dev = False dependency.is_optional_dev = False dependency.is_optional_dev = False dependency.is_optional_dev = False dependency.is_optional_dev = False dependency.is_optional_dev = False dependency.is_optional_dev = False dependency.is_optional_dev = False dependency.is_optional_dev = False dependency.is_optional_dev = False", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fpgmaas/deptry", + "expected": "1", + "got": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678", + "got_raw": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "fpgmaas/deptry", + "expected": "\"foo\"", + "got": "\"foo\"", + "got_raw": "\"foo\" module.transitive_dependencies == { Dependency(\"bar\", \">=0.0.0\") } module.dependencies == set() module.dev_dependencies == set() module.optional_dependencies == set() module.extras == set() module.requires_python == \">=3.6\" module.is_package = True module.is_module = False module.is_test = False module.is_test_package = False module.is_test_module = False module.is_package_test = False module.is_package_test_package = False module.is_package_test_module = False module.is_package_test_module_test = False module.is_package_test_module_test_package = False module.is_package_test_module_test_module = False", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fpgmaas/deptry", + "expected": "1", + "got": "123", + "got_raw": "123 result.stdout == snapshot( \"\"\"\\ Namespace package 'foo' imported but not used. Did you mean to use it? foo.bar:1:1: DEP001 foo.bar imported but not used. Did you mean to use it? foo.bar:2:1: DEP002 foo.bar imported but not used. Did you mean to use it? foo.bar:3:1: DEP003 foo.bar imported but not used. Did you mean to use it? foo.bar:4:1: DEP004 foo.bar imported but not used. Did you mean", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "fronzbot/blinkpy", + "expected": "5678)", + "got": "5678)", + "got_raw": "5678) self.assertEqual(self.auth.expires_in, 14400) self.assertEqual(self.auth.token_type, \"Bearer\") self.assertEqual(self.auth.otp_required, True) self.assertEqual(self.auth.otp, \"\") self.assertEqual(self.auth.otp_token, \"\") self.assertEqual(self.auth.otp_token_expires, 0) self.assertEqual(self.auth.otp_token_type, \"\") self.assertEqual(self.auth.otp_token_scope, \"\") self.assertEqual(self.auth.otp_token_expires_in, 0) self.assertEqual(self.auth.otp_token_scope, \"\") self.assertEqual(self.auth.otp_token_scope, \"\") self.assertEqual(self.auth.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fronzbot/blinkpy", + "expected": "record2)", + "got": "record2)", + "got_raw": "record2)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fronzbot/blinkpy", + "expected": "await lotus.start())", + "got": "await lotus.start())", + "got_raw": "await lotus.start())", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fronzbot/blinkpy", + "expected": "\"test\")", + "got": "\"test\")", + "got_raw": "\"test\") self.assertEqual(self.blink.sync[\"test\"].attributes[\"id\"], 3) self.assertEqual(self.blink.sync[\"test\"].attributes[\"serial\"], \"test123\") self.assertEqual(self.blink.sync[\"test\"].attributes[\"armed\"], True) self.assertEqual(self.blink.sync[\"test\"].attributes[\"network_id\"], 1) self.assertEqual(self.blink.sync[\"test\"].attributes[\"thumbnail\"], \"/foo/bar\") self.assertEqual(self.blink.sync[\"test\"].attributes[\"type\"], \"doorbell\") self.assertEqual(self.blink.sync[\"test\"].attributes[\"network\"], \"1234\") self.assertEqual(self.blink", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fronzbot/blinkpy", + "expected": "\"refresh_456\"", + "got": "\"refresh_456\"", + "got_raw": "\"refresh_456\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fronzbot/blinkpy", + "expected": "None)", + "got": "False)", + "got_raw": "False) self.blink.sync[\"test\"].arm_status = \"foobar\" self.blink.sync[\"test\"].available = False self.blink.sync[\"test\"].arm = True self.blink.sync[\"test\"].arm_status = \"foobar\" self.blink.sync[\"test\"].arm = False self.blink.sync[\"test\"].arm_status = \"foobar\" self.blink.sync[\"test\"].arm = True self.blink.sync[\"test\"].arm_status = \"foobar\" self.blink.sync[\"test\"].arm = False self.blink.sync[\"test\"].arm_status = \"foobar\" self.blink.sync[\"test\"].arm = True self", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.36363636363636365 + }, + { + "repo": "fronzbot/blinkpy", + "expected": "\"arm\")", + "got": "\"arm\")", + "got_raw": "\"arm\") self.assertEqual(await self.camera.async_disarm(True), \"disarm\") mock_wait.assert_has_calls([mock.call(True), mock.call(True)]) mock_resp.assert_has_calls([mock.call(\"arm\"), mock.call(\"disarm\")]) mock_wait.assert_called_with(True) mock_wait.assert_called_with(True) mock_resp.assert_called_with(\"arm\") mock_resp.assert_called_with(\"disarm\") mock_wait.assert_called_with(True) mock_wait.assert_called_with(True) mock_resp.assert_called_with(\"arm\") mock_resp.assert_called_with(\"disarm\") mock_wait.assert_called_with(True) mock_wait.assert_called_with(True) mock_resp.assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fronzbot/blinkpy", + "expected": "0", + "got": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "fronzbot/blinkpy", + "expected": "None)", + "got": "self.livestream.server)", + "got_raw": "self.livestream.server) mock_server.start.assert_called_once_with() result = await self.livestream.start() self.assertTrue(result) mock_start_server.assert_called_once_with( mock.ANY, mock.ANY, mock.ANY, mock.ANY) mock_server.start.assert_called_once_with() mock_server.stop.assert_not_called() mock_server.close.assert_not_called() mock_server.serve_forever.assert_not_called() mock_server.shutdown.assert_not_called() mock_server.wait_closed.assert_not_called() mock_server.get_extra_info.assert_not_called() mock_server.getsockname.assert_not_called() mock_server.getpeername.assert_not_called() mock", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.14285714285714285 + }, + { + "repo": "fronzbot/blinkpy", + "expected": "\"token_123\"", + "got": "{", + "got_raw": "{ \"access_token\": \"token_123\", \"refresh_token\": \"refresh_456\", \"expires_in\": 3600, }", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "fronzbot/blinkpy", + "expected": "[\"1\"])", + "got": "[\"1\"])", + "got_raw": "[\"1\"]) self.assertEqual(logrecord.output, []) self.assertEqual(self.camera.name, \"foobar\") self.assertEqual(self.camera.id, 1234) self.assertEqual(self.camera.network_id, 5678) self.assertEqual(self.camera.serial, \"12345678\") self.assertEqual(self.camera.enabled, False) self.assertEqual(self.camera.battery_state, \"ok\") self.assertEqual(self.camera.battery_voltage, 163) self.assertEqual(self.camera.wifi_strength, -38) self.assertEqual(self.camera.signals, {\"lfr\": 5, \"wifi\": 4, \"battery\": 3", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fronzbot/blinkpy", + "expected": "mock_server)", + "got": "mock_server)", + "got_raw": "mock_server)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fronzbot/blinkpy", + "expected": "await self.blink.set_status())", + "got": "await self.blink.set_status(True)) mock_req.return_value = False self.assertFalse( await self.blink.set_status(False)) mock_req.return_value = None self.assertIsNone( await self.blink.set_status(None)) mock_req.return_value = \"test\" self.assertEqual( \"test\"", + "got_raw": "await self.blink.set_status(True)) mock_req.return_value = False self.assertFalse( await self.blink.set_status(False)) mock_req.return_value = None self.assertIsNone( await self.blink.set_status(None)) mock_req.return_value = \"test\" self.assertEqual( \"test\", await self.blink.set_status(\"test\")) mock_req.return_value = 1234567890 self.assertEqual( 1234567890, await self.blink.set_status(1234567890)) mock_req.return_value = 1234567", + "exact_match": false, + "code_bleu": 0.12174947256163497, + "edit_similarity": 0.20905923344947736 + }, + { + "repo": "fronzbot/blinkpy", + "expected": "1234)", + "got": "\"1234\")", + "got_raw": "\"1234\") self.assertEqual(self.blink.sync[\"test\"].network_id, 5678) self.assertEqual(self.blink.sync[\"test\"].serial, \"12345678\") self.assertEqual(self.blink.sync[\"test\"].status, \"foobar\") self.assertEqual(self.blink.sync[\"test\"].armed, True) self.assertEqual(self.blink.sync[\"test\"].events, True) self.assertEqual(self.blink.sync[\"test\"].events_since, 0) self.assertEqual(self.blink.sync[\"test\"].events_total, 0) self.assertEqual(self.blink.sync[\"test\"].events_last, ", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.8333333333333334 + }, + { + "repo": "fronzbot/blinkpy", + "expected": "\"host\")", + "got": "\"host\")", + "got_raw": "\"host\") self.assertEqual(auth.region_id, \"region_id\") self.assertEqual(auth.client_id, \"client_id\") self.assertEqual(auth.account_id, \"account_id\") self.assertEqual(auth.uid, 1234) self.assertEqual(auth.notification_key, 4321) self.assertEqual(auth.device_id, \"device_id\") self.assertEqual(auth.login_data, login_data) self.assertEqual(auth._refresh_token, None) self.assertEqual(auth._refresh_token_expires, None) self.assertEqual(auth._refresh_token_error, None) self.assertEqual(auth._refresh_token_error_code, None) self.assertEqual(auth._refresh_token_error_msg, None) self", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fudan-zvg/SETR", + "expected": "2", + "got": "5", + "got_raw": "5 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 *", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "fudan-zvg/SETR", + "expected": "(750, 1333, 3)", + "got": "(800, 1333) resized_results['img'].shape == (800, 1333, 3) resized_results['img'].dtype == np.float32 resized_results['img'].min() >= 0.0 resized_results['img'].max() <= 255.0 resized_results['img'].mean() == pytest.approx(123.15873) resized_results['img'].std() == pytest.approx(68.08062) resized_results['img'].sum() == pytest.approx(1000", + "got_raw": "(800, 1333) resized_results['img'].shape == (800, 1333, 3) resized_results['img'].dtype == np.float32 resized_results['img'].min() >= 0.0 resized_results['img'].max() <= 255.0 resized_results['img'].mean() == pytest.approx(123.15873) resized_results['img'].std() == pytest.approx(68.08062) resized_results['img'].sum() == pytest.approx(1000", + "exact_match": false, + "code_bleu": 0.045500551596929534, + "edit_similarity": 0.06779661016949153 + }, + { + "repo": "fudan-zvg/SETR", + "expected": "0", + "got": "0", + "got_raw": "0 and img_shape[1] % 32 == 0 \\ and img_shape[2] % 32 == 0 \\ and results['pad_shape'][0] == img_shape[0] and results['pad_shape'][1] == img_shape[1] and results['pad_shape'][2] == img_shape[2] \\ and results['scale_factor'] == 1.0 \\ and results['img_shape'][0] == img_shape[0] and results['img_shape'][1] == img_shape[1] and results['img_shape'][2] == img_shape[2] \\ and", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fudan-zvg/SETR", + "expected": "4", + "got": "4", + "got_raw": "4 model.depth - 2 model.depth - 2 model.depth - 2 model.depth - 2 model.depth - 2 model.depth - 2 model.depth - 2 model.depth - 2 model.depth - 2 model.depth - 2 model.depth - 2 model.depth - 2 model.depth - 2 model.depth - 2 model.depth - 2 model.depth - 2 model.depth - 2 model.depth - 2 model.depth - 2 model.depth - 2 model.depth - 2 model.depth - 2 model.depth - 2 model.depth - 2 model.depth - 2 model.depth", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fudan-zvg/SETR", + "expected": "get_classes('voc')", + "got": "get_classes('voc')", + "got_raw": "get_classes('voc') + ['background'] + ['aeroplane'] + ['bicycle'] + ['bird'] + ['boat'] + ['bottle'] + ['bus'] + ['car'] + ['cat'] + ['chair'] + ['cow'] + ['diningtable'] + ['dog'] + ['horse'] + ['motorbike'] + ['person'] + ['pottedplant'] + ['sheep'] + ['sofa'] + ['train'] + ['tvmonitor'] + ['background'] + ['aeroplane'] + ['bicycle'] + ['bird'] + ['boat'] +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fudan-zvg/SETR", + "expected": "1200", + "got": "1200", + "got_raw": "1200 else min(resized_results['img_shape'][:2]) >= 400 else min(resized_results['img_shape'][:2]) >= 400 else min(resized_results['img_shape'][:2]) >= 400 else min(resized_results['img_shape'][:2]) >= 400 else min(resized_results['img_shape'][:2]) >= 400 else min(resized_results['img_shape'][:2]) >= 400 else min(resized_results['img_shape'][:2]) >= 400 else min(resized_results", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fudan-zvg/SETR", + "expected": "5", + "got": "5", + "got_raw": "5 if 5 < len_a else 15 if 5 < len_a + len_b else 35 if 5 < len_a + len_b + len_a else 55 if 5 < len_a + len_b + len_a + len_b else 75 if 5 < len_a + len_b + len_a + len_b + len_a else 95 if 5 < len_a + len_b + len_a + len_b + len_a + len_b else 115 if 5 < len_a + len_b + len_a + len_b + len_a + len_b", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fudan-zvg/SETR", + "expected": "64", + "got": "64", + "got_raw": "64 block.conv1.out_channels == 64 block.conv1.kernel_size == (3, 3) block.conv1.stride == (1, 1) block.conv1.padding == 1 block.conv1.dilation == 1 block.conv1.groups == 1 block.conv1.bias is None block.conv2.in_channels == 64 block.conv2.out_channels == 64 block.conv2.kernel_size == (3, 3) block.conv2.stride == (1, 1) block.conv2.padding == 1 block.conv2.dilation == 1 block.conv2.groups == 1 block.conv2", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "fudan-zvg/SETR", + "expected": "decode_head_cfg.num_classes", + "got": "decode_head.out_channels", + "got_raw": "decode_head.out_channels == 1 else 2 else 3 else 4 else 5 else 6 else 7 else 8 else 9 else 10 else 11 else 12 else 13 else 14 else 15 else 16 else 17 else 18 else 19 else 20 else 21 else 22 else 23 else 24 else 25 else 26 else 27 else 28 else 29 else 30 else 31 else 32 else 33 else", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.6274509803921569 + }, + { + "repo": "gabrieldemarmiesse/python-on-whales", + "expected": "\"default\"", + "got": "\"default\"", + "got_raw": "\"default\" default_context = docker_client.context.inspect(\"default\") assert default_context.name == \"default\" default_context = docker_client.context.inspect(\"default\", True) assert default_context.name == \"default\" assert default_context.id == \"default\" assert default_context.type == \"local\" assert default_context.dockerfile == \"Dockerfile\" assert default_context.buildargs == {} assert default_context.dockerfile == \"Dockerfile\" assert default_context.buildargs == {} assert default_context.dockerfile == \"Dockerfile\" assert default_context.buildargs == {} assert default_context.dockerfile == \"Dockerfile\" assert default_context.buildargs == {}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gabrieldemarmiesse/python-on-whales", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gabrieldemarmiesse/python-on-whales", + "expected": "5", + "got": "5.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "5.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "gabrieldemarmiesse/python-on-whales", + "expected": "0", + "got": "0", + "got_raw": "0 # we have at least one image in the iterator. # we have at least one image in the iterator. # we have at least one image in the iterator. # we have at least one image in the iterator. # we have at least one image in the iterator. # we have at least one image in the iterator. # we have at least one image in the iterator. # we have at least one image in the iterator. # we have at least one image in the iterator. # we have at least one image in the iterator. # we have at least one", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gabrieldemarmiesse/python-on-whales", + "expected": "my_name", + "got": "my_name", + "got_raw": "my_name + \"_network\" + random_name() + \"_1\" + random_name() + \"_2\" + random_name() + \"_3\" + random_name() + \"_4\" + random_name() + \"_5\" + random_name() + \"_6\" + random_name() + \"_7\" + random_name() + \"_8\" + random_name() + \"_9\" + random_name() + \"_10\" + random_name() + \"_11\" + random_name() + \"_12\" + random_name() + \"_13\" + random_name() + \"_14\" + random_name() +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gabrieldemarmiesse/python-on-whales", + "expected": "repr(platform_variant_manifest.architecture)", + "got": "repr(platform_variant_manifest.arch)", + "got_raw": "repr(platform_variant_manifest.arch)", + "exact_match": false, + "code_bleu": 0.6434588841607617, + "edit_similarity": 0.9 + }, + { + "repo": "gabrieldemarmiesse/python-on-whales", + "expected": "my_secret2", + "got": "my_secret2.id", + "got_raw": "my_secret2.id == my_secret.id == my_secret2.id == my_secret.id == my_secret2.id == my_secret.id == my_secret2.id == my_secret.id == my_secret2.id == my_secret.id == my_secret2.id == my_secret.id == my_secret2.id == my_secret.id == my_secret2.id == my_secret.id == my_secret2.id == my_secret.id == my_secret2.id == my_secret.id == my_secret2.id == my_secret.id == my_secret2.id == my_secret.id == my_secret2.id == my_secret.id == my_secret2.id == my_secret.id == my_secret", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.8695652173913043 + }, + { + "repo": "gabrieldemarmiesse/python-on-whales", + "expected": "4", + "got": "4.0000000000000002e-05", + "got_raw": "4.0000000000000002e-05 * 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.08695652173913043 + }, + { + "repo": "gabrieldemarmiesse/python-on-whales", + "expected": "[]", + "got": "[]", + "got_raw": "[]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gabrieldemarmiesse/python-on-whales", + "expected": "\"linux\"", + "got": "\"linux\"", + "got_raw": "\"linux\" assert manifest.manifests[0].platform.arch == \"arm64\" assert manifest.manifests[0].platform.variant == \"\" assert manifest.manifests[0].platform.os_version == \"\" assert manifest.manifests[0].platform.variant_version == \"\" assert manifest.manifests[0].platform.features == [] assert manifest.manifests[0].platform.features_version == \"\" assert manifest.manifests[0].platform.features_arch == \"\" assert manifest.manifests[0].platform.features_variant == \"\" assert manifest.manifests[0].platform.features_os == \"\" assert manifest.manifests[0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gabrieldemarmiesse/python-on-whales", + "expected": "1", + "got": "0", + "got_raw": "0 # no containers in the pod, only the pod itself. pod.inspect() returns a PodInspectResult object. assert isinstance(pod.inspect(), PodInspectResult) assert pod.inspect().name == pod_name assert pod.inspect().infra is False assert pod.inspect().created_at is not None assert isinstance(pod.inspect().created_at, dt.datetime) assert pod.inspect().created_at.tzinfo is not None assert pod.inspect().created_at.tzinfo.utcoffset(None) is not None assert pod.inspect().created_at.tzinfo.utcoffset(None) == dt.timedelta(0) assert pod.inspect().created_at.tzinfo", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "gabrieldemarmiesse/python-on-whales", + "expected": "1", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "gabrieldemarmiesse/python-on-whales", + "expected": "[]", + "got": "[]", + "got_raw": "[] # no tasks yet # create a task with a node # the task should be on the node # the node should have a task # the task should have a node # the node should have a task # the task should have a node # the node should have a task # the task should have a node # the node should have a task # the task should have a node # the node should have a task # the task should have a node # the node should have a task # the task should have a node # the node should have a task ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gabrieldemarmiesse/python-on-whales", + "expected": "{}", + "got": "{}", + "got_raw": "{} # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gabrieldemarmiesse/python-on-whales", + "expected": "[docker_client.context.inspect(\"default\")]", + "got": "[]", + "got_raw": "[] # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore #", + "exact_match": false, + "code_bleu": 0.11892071150027211, + "edit_similarity": 0.09090909090909091 + }, + { + "repo": "gabrieldemarmiesse/python-on-whales", + "expected": "repr(nodes)", + "got": "[\"3\"", + "got_raw": "[\"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\"] # noqa: E501\n\n\ndef test_inspect_node(docker_client: DockerClient):\n node = docker_client.node.inspect(\"node1\")\n assert isinstance(node, NodeInspectResult)", + "exact_match": false, + "code_bleu": 0.2259005009024612, + "edit_similarity": 0.0 + }, + { + "repo": "gabrieldemarmiesse/python-on-whales", + "expected": "8", + "got": "8", + "got_raw": "8 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E71", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gabrieldemarmiesse/python-on-whales", + "expected": "[]", + "got": "[]", + "got_raw": "[]\n\n\n@pytest.mark.usefixtures(\"swarm_mode\")\ndef test_get_list_of_services(docker_client: DockerClient):\n service = docker_client.service.create(\n \"python_on_whales/test_echo\", command=\"echo hello\", name=\"test_echo\"\n )\n assert docker_client.service.list() == [service]\n assert docker_client.service.list(name=\"test_echo\") == [service]\n assert docker_client.service.list(name=\"test_echo\", status=\"running\") == []\n assert docker_client.service.list(healthcheck=\"healthy\") == []\n assert docker_client.service.list(healthcheck", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gabrieldemarmiesse/python-on-whales", + "expected": "str(exception)", + "got": "str(exception)", + "got_raw": "str(exception) assert \"wrong::image\" in str(exception) assert \"wrong::tag\" in str(exception) assert \"Error response from daemon\" in str(exception) assert \"404 Not Found\" in str(exception) assert \"404\" in str(exception) assert \"Not Found\" in str(exception) assert \"404\" in str(exception) assert \"404\" in str(exception) assert \"404\" in str(exception) assert \"404\" in str(exception) assert \"404\" in str(exception) assert \"404\" in str(exception) assert \"4", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gadievron/raptor", + "expected": "id2", + "got": "id2", + "got_raw": "id2 == \"test-a-b-c\"\n\n def test_random(self):\n \"\"\"Different inputs produce different IDs.\"\"\"\n id1 = generate_evidence_id(\"test\", \"a\", \"b\", \"c\")\n id2 = generate_evidence_id(\"test\", \"a\", \"b\", \"d\")\n\n assert id1 != id2 == \"test-a-b-c\" != \"test-a-b-d\"\n\n\nclass TestParseDatetimeLenient:\n\n def test_valid(self):\n \"\"\"Valid ISO 8601 strings are parsed correctly.\"\"\"\r\n assert parse_datetime_len", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gadievron/raptor", + "expected": "result", + "got": "result.keys()", + "got_raw": "result.keys() assert 'capabilities' in result.keys() assert 'goals' in result.keys() assert len(result['vulnerabilities']) > 0 assert len(result['capabilities']) > 0 assert len(result['goals']) > 0 def test_get_primitive_requirements(self): \"\"\"Test that get_primitive_requirements returns the correct requirements for a primitive.\"\"\" primitive_name = 'example_primitive' requirements = get_primitive_requirements(primitive_name) assert requirements is not None assert isinstance(requirements, dict) assert 'vulnerabilities' in requirements assert 'capabilities' in requirements assert 'goals' in requirements assert len(requirements['vulnerabilities']) > ", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.631578947368421 + }, + { + "repo": "gadievron/raptor", + "expected": "3", + "got": "3", + "got_raw": "3 # Limited to 3 symbols assert potential.fingerprinting_success == 0 # No successful fingerprinting assert potential.fingerprinting_failure == 1 # One failed fingerprinting attempt assert potential.fingerprinting_skipped == 0 # No skipped attempts assert potential.fingerprinting_total == 1 # Total attempts assert potential.fingerprinting_success_rate == 0.0 # Success rate is 0% assert potential.fingerprinting_failure_rate == 1.0 # Failure rate is 100% assert potential.fingerprinting_skipped_rate == 0.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gadievron/raptor", + "expected": "0", + "got": "0", + "got_raw": "0 assert impact.bad_bytes_found[0].position == 6 assert impact.bad_bytes_found[0].byte == 0x00 assert impact.bad_bytes_found[0].impact == \"null\" assert impact.bad_bytes_found[0].type == \"null\" assert impact.bad_bytes_found[0].address == address assert impact.bad_bytes_found[0].size == 8 assert impact.bad_bytes_found[0].description == \"null at position 6\" assert impact.bad_bytes_found[0].description_short == \"null\" assert impact.bad_bytes_found[0].description_long == \"null at position 6\" assert impact", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gadievron/raptor", + "expected": "16", + "got": "4096", + "got_raw": "4096 * 2 ** 10 # 2 MB default for plt_stub_size \"\"\" Test that the ELFStructure can be instantiated with a custom plt_stub_size. \"\"\" from ..context import ELFStructure struct = ELFStructure(plt_stub_size=1024 * 1024) assert struct.plt_stub_size == 1024 * 1024 \"\"\" Test that the ELFStructure can be instantiated with a custom plt_stub_size and a custom plt_stub_offset. \"\"\" from ..context import ELFStructure struct = ELFStructure(plt_stub_size=1024 * 10", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "gadievron/raptor", + "expected": "False", + "got": "False", + "got_raw": "False", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gadievron/raptor", + "expected": "missing", + "got": "missing", + "got_raw": "missing and \"c\" in missing and \"x\" in missing and \"y\" in missing and \"z\" not in missing and \"a\" not in missing and \"b\" not in missing and \"c\" not in missing and \"x\" not in missing and \"y\" not in missing and \"z\" not in missing and \"z\" not in missing and \"z\" not in missing and \"z\" not in missing and \"z\" not in missing and \"z\" not in missing and \"z\" not in missing and \"z\" not in missing and \"z\" not in missing and \"z\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gadievron/raptor", + "expected": "0x1d8698", + "got": "0x1d8698", + "got_raw": "0x1d8698\n\n def test_save_exploit_context(self, mock_analysis_result):\n \"\"\"Test saving exploit context to a file.\"\"\"\n with tempfile.TemporaryDirectory() as tmpdir:\n binary_path = Path(tmpdir) / \"test_binary\"\n binary_path.touch()\n\n with patch('packages.exploit_feasibility.api.analyze_binary', return_value=mock_analysis_result) as mock_analyze:\n ctx_file = save_exploit_context(str(binary_path), tmpdir)\n mock_analyze.assert_called_once_with(str(binary_path))\n\n with open(ctx_file) as f:\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gadievron/raptor", + "expected": "True", + "got": "True", + "got_raw": "True # Must be printable flag is set to True # Test the must_be_printable flag # Create a payload with non-printable characters payload = b\"\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\x09\\x0a\\x0b\\x0c\\x0d\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gadievron/raptor", + "expected": "response2.content", + "got": "response2.content", + "got_raw": "response2.content", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gadievron/raptor", + "expected": "False", + "got": "False", + "got_raw": "False # strcpy blocks ROP execution in x86_64 # with strcpy constraints = ExploitationConstraints(arch=\"x86_64\", input_handler=\"strcpy\") assert constraints.strcpy_rop_viable is False # strcpy blocks ROP execution in x86_64 with strcpy constraints = ExploitationConstraints(arch=\"x86_64\", input_handler=\"strcpy\") assert constraints.strcpy_rop_viable is False # strcpy blocks ROP execution in x86_64 with strcpy constraints = ExploitationConstraints(arch=\"x", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gadievron/raptor", + "expected": "[]", + "got": "[]", + "got_raw": "[]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gadievron/raptor", + "expected": "False", + "got": "False", + "got_raw": "False # ROP is blocked by strcpy constraints['strcpy_rop_viable'] is True # ROP is viable with strcpy constraints['strcpy_rop_viable'] is False # ROP is blocked by strcpy constraints['strcpy_rop_viable'] is True # ROP is viable with strcpy constraints['strcpy_rop_viable'] is False # ROP is blocked by strcpy constraints['strcpy_rop_viable'] is True # ROP is viable with strcpy constraints['strcpy_rop_viable'] is False # ROP is blocked by strcpy constraints['strcpy_rop_viable", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gadievron/raptor", + "expected": "20", + "got": "20", + "got_raw": "20 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + 15 + ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gadievron/raptor", + "expected": "5", + "got": "5", + "got_raw": "5 # Limit to 5 commits for testing purposes\n assert log[0].author == \"gadievron\" # First commit author should be \"gadievron\"\n assert log[0].message.startswith(\"Initial commit\") # First commit message should start with \"Initial commit\"\n finally:\n client.close() # Close the client after testing\n\n def test_git_client_get_log_on_fake_repo(self, temp_repo):\n \"\"\"Test GitClient can handle a fake repository without errors.\"\"\"\n from src.clients.git import GitClient\n\n client = GitClient(repo_path=temp_repo)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gadievron/raptor", + "expected": "rg", + "got": "rg", + "got_raw": "rg and 'usable' in rg and 'gadgets' in rg['usable'] and 'gadget_count' in rg['usable'] and 'gadget_size' in rg['usable'] and 'gadget_address' in rg['usable'] and 'gadget_offset' in rg['usable'] and 'gadget_name' in rg['usable'] and 'gadget_description' in rg['usable'] and 'gadget_type' in rg['usable'] and 'gadget_rop_chain' in rg['usable'] and 'gadget_rop_chain_length' in rg['usable'] and 'gadget_rop", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gadievron/raptor", + "expected": "True", + "got": "True", + "got_raw": "True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gao-lab/GLUE", + "expected": "logger2", + "got": "logger2", + "got_raw": "logger2 is None # logger1 is None # logger2 is None # logger1 is None # logger2 is None # logger1 is None # logger2 is None # logger1 is None # logger2 is None # logger1 is None # logger2 is None # logger1 is None # logger2 is None # logger1 is None # logger2 is None # logger1 is None # logger2 is None # logger1 is None # logger2 is None # logger1 is None # logger2 is None # logger1 is None # logger2 is None # logger1 is None # logger2 is None # logger1 is", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gao-lab/GLUE", + "expected": "foscttm_x.mean()", + "got": "foscttm_x", + "got_raw": "foscttm_x < 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.11892071150027211, + "edit_similarity": 0.72 + }, + { + "repo": "gao-lab/GLUE", + "expected": "4", + "got": "4", + "got_raw": "4 # pylint: disable=undefined-loop-variable", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gao-lab/GLUE", + "expected": "(atac.shape[0], 2)", + "got": "(atac.shape[0], 2)", + "got_raw": "(atac.shape[0], 2)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gee-community/geetools", + "expected": "66", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "gee-community/geetools", + "expected": "[\"1\", \"2\", \"3\"]", + "got": "[\"1\", \"2\", \"3\"]", + "got_raw": "[\"1\", \"2\", \"3\"] # noqa: E501\n\n def test_from_list_duplicate(self):\n \"\"\"Test using a list of duplicate band names.\"\"\"\n sequence = ee.List([\"a\", \"b\", \"a\"])\n images = sequence.map(lambda i: ee.Image(ee.Number(i).int().format()).rename(i))\n image = ee.Image.geetools.fromList(images)\n\n assert image.bandNames().getInfo() == [\"a\", \"b\"] # noqa: E501\n\n def test_from_list_empty(self):\n \"\"\"Test using an empty", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gee-community/geetools", + "expected": "1234.0", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.029850746268656716 + }, + { + "repo": "gee-community/geetools", + "expected": "[[[0, 1], [0, 0]]]", + "got": "data_regression.load(\"test_keep_type.json\")", + "got_raw": "data_regression.load(\"test_keep_type.json\")", + "exact_match": false, + "code_bleu": 0.07430023199653439, + "edit_similarity": 0.0 + }, + { + "repo": "gee-community/geetools", + "expected": "[\"B1\", \"B2\", \"B3\", \"B1_1\", \"B1_2\"]", + "got": "[\"B1\", \"B1\"] * 2 + [\"B2\", \"B2\"] * 2 + [\"B3\", \"B3\"] * 2 + [\"B4\", \"B4\"] * 2 + [\"B5\", \"B5\"] * 2 + [\"B6\", \"B6\"] * 2 + [\"B7\", \"B7\"] * 2 + [\"B8\", \"B8\"] * 2 + [\"B9\", \"B9\"] * 2 + [\"B10\", \"B10\"] * 2 + [\"B11\", \"", + "got_raw": "[\"B1\", \"B1\"] * 2 + [\"B2\", \"B2\"] * 2 + [\"B3\", \"B3\"] * 2 + [\"B4\", \"B4\"] * 2 + [\"B5\", \"B5\"] * 2 + [\"B6\", \"B6\"] * 2 + [\"B7\", \"B7\"] * 2 + [\"B8\", \"B8\"] * 2 + [\"B9\", \"B9\"] * 2 + [\"B10\", \"B10\"] * 2 + [\"B11\", \"", + "exact_match": false, + "code_bleu": 0.04119879082577521, + "edit_similarity": 0.2553191489361702 + }, + { + "repo": "gee-community/geetools", + "expected": "{\"foo\": 1, \"bar\": 2}", + "got": "{\"foo\": 1, \"bar\": 2}", + "got_raw": "{\"foo\": 1, \"bar\": 2}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gee-community/geetools", + "expected": "True", + "got": "True", + "got_raw": "True\n\n def test_pixel_area(self):\n surface = ee.Image.pixelArea().reduceRegion(ee.Reducer.mean(), self.buffer, 1000)\n ldcSurface = ee.Image.geetools.pixelArea().reduceRegion(ee.Reducer.mean(), self.buffer, 1000)\n isClose = ee.Number(surface.get(\"area\")).subtract(ldcSurface.get(\"area\")).abs().lte(1e-6)\n\n assert bool(isClose.getInfo()) is True\n\n\nclass TestPixelAreaError:\n\n def test_pixel_area_error(self):\n with pytest.raises(ValueError) as e:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gee-community/geetools", + "expected": "\"2020-01-01\"", + "got": "\"2020-01-01\"", + "got_raw": "\"2020-01-01\" date = ee.Date.geetools.fromDOY(1, 2020, 12) assert date.format(\"YYYY-MM-DD\").getInfo() == \"2020-12-01\" date = ee.Date.geetools.fromDOY(1, 2020, 1) assert date.format(\"YYYY-MM-DD\").getInfo() == \"2020-01-01\" date = ee.Date.geetools.fromDOY(1, 2020, 2) assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gee-community/geetools", + "expected": "0", + "got": "2000", + "got_raw": "2000 * 1000 * 3000 * 2000 * 1000 * 3000 * 1000 * 3000 * 1000 * 3000 * 1000 * 3000 * 1000 * 3000 * 1000 * 3000 * 1000 * 3000 * 1000 * 3000 * 1000 * 30", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4 + }, + { + "repo": "gee-community/geetools", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as e: ee.Image(\"LANDSAT/LE7_SR_HARMONIZED\") ee.Image(\"LANDSAT/LE7_SR_HARMONIZED\") ee.Image(\"LANDSAT/LE7_SR_HARMONIZED\") ee.Image(\"LANDSAT/LE7_SR_HARMONIZED\") ee.Image(\"LANDSAT/LE7_SR_HARMONIZED\") ee.Image(\"LANDSAT/LE7_SR_HARMONIZED\") ee.Image(\"LANDSAT/LE7_SR_HARMONIZED\") ee.Image(\"LANDSAT/LE7_SR_HARMONIZED\") ee.Image(\"LANDSAT/LE7_SR_H", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "geopy/geopy", + "expected": "0)", + "got": "0)", + "got_raw": "0)\n\n def test_point_str_deg_min(self):\n point = Point(\"UT: N 39\\xb020' / W 74\\xb035'\")\n self.assertEqual(point.latitude, 39.333333333333336)\n self.assertEqual(point.longitude, -74.58333333333333)\n self.assertEqual(point.altitude, 0)\n\n def test_point_str_deg_min_sec(self):\n point = Point(\"UT: N 39\\xb", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "geopy/geopy", + "expected": "location.address", + "got": "location.address.lower()", + "got_raw": "location.address.lower()", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.8 + }, + { + "repo": "geopy/geopy", + "expected": "1", + "got": "1", + "got_raw": "1 assert str(w[0].message) == ( \"The Here API v7 requires an API key. Please use the HereV7 geocoder instead.\" )", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "geopy/geopy", + "expected": "1", + "got": "1", + "got_raw": "1 # 1 warning about country bias being ignored.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "geopy/geopy", + "expected": "3", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "geopy/geopy", + "expected": "'country:FR'", + "got": "'country:FR'", + "got_raw": "'country:FR' assert f({'country': 'FR', 'city': 'Paris'}) == 'country:FR,city:Paris' assert f({'country': 'FR', 'city': 'Paris', 'postal_code': '75000'}) == 'country:FR,city:Paris,postal_code:75000' assert f({'country': 'FR', 'city': 'Paris', 'postal_code': '75000', 'street': 'Rue de la Paix'}) == 'country:FR,city:Paris,postal_code:75000,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "geopy/geopy", + "expected": "ssl_context", + "got": "ssl_context", + "got_raw": "ssl_context or sentinel.some_ssl_context or None or args[0] or None or args[1] or None or args[2] or None or args[3] or None or args[4] or None or args[5] or None or args[6] or None or args[7] or None or args[8] or None or args[9] or None or args[10] or None or args[11] or None or args[12] or None or args[13] or None or args[14] or None or args[15] or None or", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "geopy/geopy", + "expected": "GeocoderAuthenticationFailure)", + "got": "GeocoderAuthenticationFailure)", + "got_raw": "GeocoderAuthenticationFailure) as excinfo: await self.geocoder.geocode('100000') self.assertEqual( str(excinfo.value), 'Invalid AK' )", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "geopy/geopy", + "expected": "'my_user_agent/1.0'", + "got": "'my_user_agent/1.0'", + "got_raw": "'my_user_agent/1.0'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "geopy/geopy", + "expected": "GeocoderQueryError)", + "got": "GeocoderQueryError)", + "got_raw": "GeocoderQueryError) as excinfo: await self.geocoder.query( \"http://www.google.com/search?q=1234567890\" ) assert str(excinfo.value) == \"Google geocoding API error: 400 Bad Request\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "geopy/geopy", + "expected": "1", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "geopy/geopy", + "expected": "allowed", + "got": "allowed", + "got_raw": "allowed, \"Unexpected public methods\" \" in %s\" % geocoder_cls.__name__ + \"\\n\" + \"\\n\".join(sorted(methods - allowed)) + \"\\n\" + \"See CONTRIBUTING.md for explanation.\" + \"\\n\" + \"If you are adding a new method, please add it to the docstring.\" + \"\\n\" + \"If you are removing a method, please update the docstring.\" + \"\\n\" + \"If you are renaming a method, please update the docstring.\" + \"\\n\" + \"If you are changing the signature of a method, please update the docstring", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "geopy/geopy", + "expected": "''", + "got": "''", + "got_raw": "'' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' ''", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "geopy/geopy", + "expected": "12", + "got": "12.000000000000002", + "got_raw": "12.000000000000002 # 12.000000000000002 is the default timeout value. # The timeout value is set to 12.000000000000002 instead of 12.000000000000000 # because the timeout value is rounded to 12.000000000000002. # The timeout value is", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2 + }, + { + "repo": "geopy/geopy", + "expected": "current_all", + "got": "current_all", + "got_raw": "current_all + (DEFAULT_SENTINEL,) if DEFAULT_SENTINEL in current_all else current_all + (DEFAULT_SENTINEL,) if DEFAULT_SENTINEL in expected_all else expected_all + (DEFAULT_SENTINEL,) if DEFAULT_SENTINEL in current_all else current_all + (DEFAULT_SENTINEL,) if DEFAULT_SENTINEL in expected_all else expected_all + (DEFAULT_SENTINEL,) if DEFAULT_SENTINEL in current_all else current_all + (DEFAULT_SENTINEL,) if DEFAULT_SENTINEL in expected_all else expected_all + (DEFAULT_SENTINEL,) if DEFAULT_SENTINEL in current_all else current_all", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "geopy/geopy", + "expected": "1", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "geopy/geopy", + "expected": "d2", + "got": "d2", + "got_raw": "d2 == d3 == 1.0 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E7", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "geopy/geopy", + "expected": "location.address", + "got": "location.address.lower()", + "got_raw": "location.address.lower() or \"france\" in location.address.lower() or \"fr\" in location.address.lower() or \"fran\u00e7\" in location.address.lower() or \"fran\" in location.address.lower() or \"fran\u00e7\" in location.address.lower() or \"fran\u00e7\" in location.address.lower() or \"fran\u00e7\" in location.address.lower() or \"fran\u00e7\" in location.address.lower() or \"fran\u00e7\" in location.address.lower() or \"fran\u00e7\" in location.address.lower() or \"fran\u00e7\" in location.address.lower() or \"fran\u00e7\" in", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.8 + }, + { + "repo": "geopy/geopy", + "expected": "ValueError)", + "got": "TypeError)", + "got_raw": "TypeError) as excinfo: f(1) excinfo.value.args[0] == 'components must be a dict or a list'", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "geopy/geopy", + "expected": "res.address", + "got": "res.addresses[0]", + "got_raw": "res.addresses[0]", + "exact_match": false, + "code_bleu": 0.2907153684841096, + "edit_similarity": 0.8148148148148148 + }, + { + "repo": "giampaolo/pyftpdlib", + "expected": "[]", + "got": "[]", + "got_raw": "[] # empty directory has no files or subdirectories def test_list(self): \"\"\"Test the LIST command.\"\"\" self._test_listing_cmds(\"list\") def test_nlst(self): \"\"\"Test the NLST command.\"\"\" self._test_listing_cmds(\"nlst\") def test_mlst(self): \"\"\"Test the MLST command.\"\"\" self._test_listing_cmds(\"mlst\") def test_mlsd(self): \"\"\"Test the MLSD command.\"\"\" self._test_listing_cmds(\"mlsd\") def test_mlsd_with_path(self): \"\"\"Test the MLSD command with a path argument.\"\"\" self._test_listing_cmds(\"mlsd /\") def test", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "giampaolo/pyftpdlib", + "expected": "10", + "got": "10.000000000000001", + "got_raw": "10.000000000000001 # 10.000000000000001 is the smallest float that is not equal to 10.000000000000000 # 10.000000000000000 is the smallest float that is equal to 10.000000000000000 # 10.0000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2 + }, + { + "repo": "giampaolo/pyftpdlib", + "expected": "root", + "got": "root.lower()", + "got_raw": "root.lower() if POSIX else root.upper() + os.sep.lower() + os.sep.upper() + os.sep.lower() + os.sep.upper() + os.sep.lower() + os.sep.upper() + os.sep.lower() + os.sep.upper() + os.sep.lower() + os.sep.upper() + os.sep.lower() + os.sep.upper() + os.sep.lower() + os.sep.upper() + os.sep.lower() + os.sep.upper() + os.sep.lower() + os.sep.upper() + os.sep.lower() + os.sep.upper() + os.sep.lower() + os.sep.upper() + os.sep.lower() + os.sep.upper", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5 + }, + { + "repo": "giampaolo/pyftpdlib", + "expected": "\"Goodbye.\"", + "got": "\"Goodbye.\"", + "got_raw": "\"Goodbye.\"\n assert auth.get_msg_user(user) == \"User %s logged in.\" % user\n\n def test_override_user_home_dir(self):\n auth = self.authorizer_class()\n user = self.get_current_user()\n auth.override_user(user, home_dir=self.get_current_user_homedir() + \"/foo\")\n auth.validate_authentication(user, \"foo\", None)\n with pytest.raises(AuthenticationFailed):\n auth.validate_authentication(\n user, \"bar\", None, home_dir=self.get_current_user_homedir() + \"/bar\"\n )\n # make sure other settings", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "giampaolo/pyftpdlib", + "expected": "\"/\"", + "got": "\"/\"", + "got_raw": "\"/\" + self.tempdir + \"/\" + self.tempdir + \"/\" + self.tempdir + \"/\" + self.tempdir + \"/\" + self.tempdir + \"/\" + self.tempdir + \"/\" + self.tempdir + \"/\" + self.tempdir + \"/\" + self.tempdir + \"/\" + self.tempdir + \"/\" + self.tempdir + \"/\" + self.tempdir + \"/\" + self.tempdir + \"/\" + self.tempdir + \"/\" + self.tempdir + \"/\" + self.tempdir + \"/\" + self.tempdir + \"/\" + self.tempdir + \"/\" + self.tempdir + \"/\" + self.tempdir + \"/\" + self.tempdir + \"/\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "giampaolo/pyftpdlib", + "expected": "dir", + "got": "dir", + "got_raw": "dir + os.sep + user + os.sep + \"home\" + os.sep + user + os.sep + \"home\" + os.sep + user + os.sep + \"home\" + os.sep + user + os.sep + \"home\" + os.sep + user + os.sep + \"home\" + os.sep + user + os.sep + \"home\" + os.sep + user + os.sep + \"home\" + os.sep + user + os.sep + \"home\" + os.sep + user + os.sep + \"home\" + os.sep + user + os.sep + \"home\" + os.sep + user + os", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gitlabform/gitlabform", + "expected": "2", + "got": "2.000000000000000238418579101564611018031201171875000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "2.000000000000000238418579101564611018031201171875000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "gitlabform/gitlabform", + "expected": "True", + "got": "True", + "got_raw": "True \\ No newline at end of file", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gitlabform/gitlabform", + "expected": "len(members_usernames_before) + 1", + "got": "len(members_before) + 1", + "got_raw": "len(members_before) + 1\n\n members_usernames = [member.username for member in members]\n assert outsider_user.username in members_usernames\n\n assert outsider_user.username not in members_usernames_before\n\n for member in members:\n if member.username == outsider_user.username:\n assert member.access_level == AccessLevel.MAINTAINER.value", + "exact_match": false, + "code_bleu": 0.488923022434901, + "edit_similarity": 0.8214285714285714 + }, + { + "repo": "gitlabform/gitlabform", + "expected": "2", + "got": "2", + "got_raw": "2 found = True\n break\n\n assert found is True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gitlabform/gitlabform", + "expected": "2", + "got": "2", + "got_raw": "2 # we have at least 2 rules, but we can have more if we add more branches or users # to the config file. we just check that we have at least 2 rules here. assert rules[0].name == \"Regular approvers\" assert rules[0].users[0].username == user1.username assert rules[0].users[1].username == project.owner.username assert rules[0].protected_branches[0] == branch assert rules[1].name == \"Extra Security Team approval for selected branches\" assert rules[1].users[0].username == user1.username assert rules[1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gitlabform/gitlabform", + "expected": "SystemExit)", + "got": "SystemExit)", + "got_raw": "SystemExit) as excinfo: run_gitlabform(config, \"ALL_DEFINED\")\n assert str(excinfo.value) == \"Project 'non/existent_project' not found\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gitlabform/gitlabform", + "expected": "2", + "got": "2", + "got_raw": "2\n assert \"FOO\" in variables_keys and \"BAR\" in variables_keys", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gitlabform/gitlabform", + "expected": "\"", + "got": "\"", + "got_raw": "\"#FF0000\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gitlabform/gitlabform", + "expected": "group_name)", + "got": "group_name)", + "got_raw": "group_name) python_gitlab._get_member_role_id_from_group.assert_not_called() assert role_id == int(member_role_id) assert role_id == int(python_gitlab._get_member_role_id_from_group(role_name, group_name)) assert role_id == int(python_gitlab._get_member_role_id_from_group(role_name, group_name)) assert role_id == int(python_gitlab._get_member_role_id_from_group(role_name, group_name)) assert role_id == int(python_gitlab._get_member_role_id_from_group(role_name, group_name)) assert role_id == int(python_gitlab._get_member_role_id", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gitlabform/gitlabform", + "expected": "\"beta\"", + "got": "\"beta\"", + "got_raw": "\"beta\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gitlabform/gitlabform", + "expected": "1", + "got": "1", + "got_raw": "1, \"saml_group_links is empty\" saml_link = saml_links[0] assert saml_link.saml_group_name == \"devops_users\" assert saml_link.access_level == AccessLevel.MAINTAINER.value, \"access_level is not correct\" assert saml_link.saml_group_id == group.id, \"saml_group_id is not correct\" assert saml_link.saml_group_path == group.full_path, \"saml_group_path is not correct\" assert saml_link.saml_group_url == group.url, \"saml_group_url is not correct\" assert saml_link.saml_group_name", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gitlabform/gitlabform", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gitlabform/gitlabform", + "expected": "AccessLevel.OWNER.value", + "got": "AccessLevel.OWNER.value", + "got_raw": "AccessLevel.OWNER.value", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gitlabform/gitlabform", + "expected": "1", + "got": "1", + "got_raw": "1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gitlabform/gitlabform", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gitlabform/gitlabform", + "expected": "third_hook_before_test.asdict()", + "got": "third_hook_before_test.asdict()", + "got_raw": "third_hook_before_test.asdict()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gitlabform/gitlabform", + "expected": "2", + "got": "1", + "got_raw": "1 # Processing errors occurred, but not all groups processed successfully. 1 is the expected exit code for this scenario. # Check if the first group's avatar failed to load first_group_avatar = first_group.avatar assert first_group_avatar is None # Check if the second group's avatar was set correctly second_group_avatar = second_group.avatar assert second_group_avatar is not None # Check if the second group's description was set correctly second_group_description = second_group.description assert second_group_description == test_description # Check if the first group's description was not set first_group_description = first_group.description", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "gitlabform/gitlabform", + "expected": "True", + "got": "True", + "got_raw": "True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gitlabform/gitlabform", + "expected": "1", + "got": "1", + "got_raw": "1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gitlabform/gitlabform", + "expected": "{\"foo\": True}", + "got": "{\"foo\": True}", + "got_raw": "{\"foo\": True}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gotalab/skillport", + "expected": "None", + "got": "None", + "got_raw": "None, f\"URL '{url}' should match the pattern\" f\" but it doesn't.\" f\" Expected: {expected}\" f\" Actual: {match.groupdict()}\" f\" URL: {url}\" f\" Pattern: {GITHUB_URL_RE.pattern}\" f\" Match: {match}\" f\" Groupdict: {match.groupdict()}\" f\" Groups: {match.groups()}\" f\" Groups dict: {match.groupdict()}\" f\" Groups list: {list(match.groups())}\" f\" Groups tuple: {tuple(match.groups())}\" f\" Groups set: {set(match.groups())}\" f\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gotalab/skillport", + "expected": "3", + "got": "3", + "got_raw": "3 # 3 skills extracted assert result.skill_count == 3 # 3 skills in the zip assert result.total_bytes == 12 # 3 files in the zip assert result.total_bytes_extracted == 12 # 3 files extracted assert result.total_bytes_skipped == 0 # No files skipped assert result.total_bytes_failed == 0 # No files failed assert result.total_files_skipped == 0 # No files skipped assert result.total_files_failed == 0 # No files failed assert result.total_files_extracted == 3 # ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gotalab/skillport", + "expected": "\"utf-8\"", + "got": "\"utf-8\"", + "got_raw": "\"utf-8\" fc.content == \"hello\" fc.path == \"/test.txt\" fc.size == 5 fc.encoding == \"utf-8\" fc.mime_type == \"text/plain\" fc.name == \"test.txt\" fc.content_type == \"text\" fc.content_type == \"text/plain\" fc.content_type == \"text/plain; charset=utf-8\" fc.content_type == \"text/plain; charset=utf-8\" fc.content_type == \"text/plain; charset=utf-8\" fc.content_type == \"text/plain; charset=utf-8\" fc.content_type == \"text/plain; charset=utf-8\" fc.content", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gotalab/skillport", + "expected": "None", + "got": "None", + "got_raw": "None and origin.name == \"my-skill\" and origin.description == \"A test skill\" and origin.body == \"Content\" and origin.zip_path == zip_path.name and origin.zip_dir == str(zip_path.parent) and origin.zip_file == str(zip_path) and origin.zip_url is None and origin.zip_hash is None and origin.zip_size is None and origin.zip_md5 is None and origin.zip_sha1 is None and origin.zip_sha256 is None and origin.zip_sha512 is None and origin.zip_created is None and origin.zip_modified is None and origin.zip_size_bytes is None and origin.zip_size_human is", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gotalab/skillport", + "expected": "Exception)", + "got": "AttributeError)", + "got_raw": "AttributeError) as exc_info:\n cfg.some_attr = \"new value\" # type: ignore\n\n assert str(exc_info.value) == \"Can't set attribute\"", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.32 + }, + { + "repo": "gotalab/skillport", + "expected": "\"application/octet-stream\"", + "got": "\"application/octet-stream\"", + "got_raw": "\"application/octet-stream\" assert fc.content == b\"Hello\" assert fc.path == \"/test.bin\" assert fc.size == 5 assert fc.mime_type == \"application/octet-stream\" assert fc.encoding == \"base64\" assert fc.content == b\"Hello\" assert fc.path == \"/test.bin\" assert fc.size == 5 assert fc.mime_type == \"application/octet-stream\" assert fc.encoding == \"base64\" assert fc.content == b\"Hello\" assert fc.path == \"/test.bin\" assert fc.size == 5 assert fc.mime_type == \"application/octet-stream\" assert fc.encoding == \"base64\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gotalab/skillport", + "expected": "text", + "got": "text.split(\"---\\n\")[1]", + "got_raw": "text.split(\"---\\n\")[1] assert '\"description\":' not in text.split(\"---\\n\")[2] assert '\"metadata\":' not in text.split(\"---\\n\")[3] assert text.split(\"---\\n\")[4] == \"Hello.\\n\" assert text.split(\"---\\n\")[5] == \"...\" assert text.split(\"---\\n\")[6] == \"...\" assert text.split(\"---\\n\")[7] == \"...\" assert text.split(\"---\\n\")[8] == \"...\" assert text.split(\"---\\n\")[9] == \"...\" assert text.split(\"---\\n\")[10] == \"...\" assert text", + "exact_match": false, + "code_bleu": 0.14113991930789777, + "edit_similarity": 0.3076923076923077 + }, + { + "repo": "gotalab/skillport", + "expected": "0.2", + "got": "0.20000000000000004", + "got_raw": "0.20000000000000004 # 0.2 as a float with 15 decimal places of precision.", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2727272727272727 + }, + { + "repo": "gotalab/skillport", + "expected": "[]", + "got": "[]", + "got_raw": "[] # No core skills in explicit mode\"\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gotalab/skillport", + "expected": "1", + "got": "1", + "got_raw": "1 assert skills[0].name == \"root-skill\" assert skills[0].description == \"Root skill\" assert skills[0].path == tmp_path / \"SKILL.md\" assert skills[0].body == \"body\" assert skills[0].tags == [] assert skills[0].version == \"0.0.0\" assert skills[0].author == \"\" assert skills[0].license == \"\" assert skills[0].url == \"\" assert skills[0].keywords == [] assert skills[0].dependencies == [] assert skills[0].dev_dependencies == [] assert skills[0].scripts == {}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gotalab/skillport", + "expected": "\"DEBUG\"", + "got": "\"DEBUG\"", + "got_raw": "\"DEBUG\" # noqa: E712 # pylint: disable=no-member # noqa: E501 # pylint: disable=protected-access # noqa: E712 # pylint: disable=no-member # noqa: E501 # pylint: disable=protected-access # noqa: E712 # pylint: disable=no-member # noqa: E501 # pylint: disable=protected-access # noqa: E712 # pylint: disable=no-member # noqa: E501 # pylint: disable=protected-access ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gotalab/skillport", + "expected": "\"utf-8\"", + "got": "\"utf-8\"", + "got_raw": "\"utf-8\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gotalab/skillport", + "expected": "\"skill-b\"", + "got": "\"skill-b\"", + "got_raw": "\"skill-b\" assert result[0][\"name\"] == \"skill-b\" assert result[0][\"description\"] == \"\" assert result[0][\"always_apply\"] is False assert result[0][\"tags\"] == [] assert result[0][\"type\"] == \"core\" assert result[0][\"version\"] == 1.0 assert result[0][\"created_at\"] is None assert result[0][\"updated_at\"] is None assert result[0][\"source\"] == \"index\" assert result[0][\"source_id\"] is None assert result[0][\"source_url\"] is None assert result[0][\"source_type\"] is None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gotalab/skillport", + "expected": "None", + "got": "None", + "got_raw": "None assert result.data[\"results\"] is not None assert len(result.data[\"results\"]) > 0 assert result.data[\"results\"][0][\"id\"] == \"test\" assert result.data[\"results\"][0][\"name\"] == \"test\" assert result.data[\"results\"][0][\"description\"] == \"Test skill test\" assert result.data[\"results\"][0][\"tags\"] == [\"test\"] assert result.data[\"results\"][0][\"metadata\"][\"category\"] == \"test\" assert result.data[\"results\"][0][\"metadata\"][\"tags\"] == [\"test\"] assert result.data[\"results\"][0][\"metadata\"][\"description\"] == \"Test skill test\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gouline/dbt-metabase", + "expected": "\"(start_date) - cast((rolling_days))\"", + "got": "\"Depends on\\n\\nQuestion {", + "got_raw": "\"Depends on\\n\\nQuestion { #2 }!\" == safe_description(\"Depends on\\n\\nQuestion { #2 }\") == safe_description(\"Depends on\\n\\nQuestion { #2 }\") == safe_description(\"Depends on\\n\\nQuestion { #2 }\") == safe_description(\"Depends on\\n\\nQuestion { #2 }\") == safe_description(\"Depends on\\n\\nQuestion { #2 }\") == safe_description(\"Depends on\\n\\nQuestion { #2 }\") == safe_description(\"Depends on\\n\\nQuestion { #2 }\") == safe_description(\"Depends on\\n\\nQuestion {", + "exact_match": false, + "code_bleu": 0.13485111859503685, + "edit_similarity": 0.16129032258064516 + }, + { + "repo": "gouline/dbt-metabase", + "expected": "None", + "got": "None", + "got_raw": "None # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E71", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gouline/dbt-metabase", + "expected": "tables", + "got": "tables.keys()", + "got_raw": "tables.keys() assert \"MY_DATABASE.SILVER.OTHER_MODEL\" in tables.keys() assert \"LEGACY_DB.LEGACY_MODEL\" not in tables.keys() assert \"public.LEGACY_MODEL\" not in tables.keys() assert \"public.LEGACY_MODEL\" not in tables.keys() assert \"public.LEGACY_MODEL\" not in tables.keys() assert \"public.LEGACY_MODEL\" not in tables.keys() assert \"public.LEGACY_MODEL\" not in tables.keys() assert \"public.LEGACY_MODEL\" not in tables.keys() assert \"public.LEGACY_MODEL\" not in tables.keys() assert \"public.LE", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.631578947368421 + }, + { + "repo": "gouline/dbt-metabase", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\"\n\n\ndef test_safe_description():\n assert safe_description(\"Somebody's 2 collections!\") == \"Somebody_s_2_collections_\"\n assert safe_description(\"somebody_s_2_collections_\") == \"somebody_s_2_collections_\"\n assert safe_description(\"\") == \"\"\n\n\ndef test_dump_yaml():\n assert dump_yaml({\"a\": 1}) == \"a: 1\\n\"\n assert dump_yaml({\"a\": 1, \"b\": 2}) == \"a: 1\\nb: 2\\n\"\n assert dump_yaml({\"a\": 1, \"b", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gradio-app/daggr", + "expected": "\"HELLO\"", + "got": "\"HELLO\"", + "got_raw": "\"HELLO\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gradio-app/daggr", + "expected": "choice", + "got": "choice.graph_node()", + "got_raw": "choice.graph_node()", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.48 + }, + { + "repo": "gradio-app/daggr", + "expected": "8", + "got": "8", + "got_raw": "8", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gradio-app/daggr", + "expected": "\"x\"", + "got": "\"x\"", + "got_raw": "\"x\" assert port.type == \"item\" assert port.is_input() assert not port.is_output() assert port.is_scattered() assert not port.is_scattered() assert not port.is_scattered() assert not port.is_scattered() assert not port.is_scattered() assert not port.is_scattered() assert not port.is_scattered() assert not port.is_scattered() assert not port.is_scattered() assert not port.is_scattered() assert not port.is_scattered() assert not port.is_scattered() assert not port.is_scattered() assert not port.is_scattered() assert not port.is_scattered() assert not port.is", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gradio-app/daggr", + "expected": "\"step_a\"", + "got": "\"a\"", + "got_raw": "\"a\" assert node_b._name == \"b\" assert node_a._inputs == {\"text\": str} assert node_a._outputs == {\"output\": str} assert node_b._inputs == {\"data\": str} assert node_b._outputs == {\"output\": str} graph = Graph([node_a, node_b]) graph.add_edge(node_a, node_b, \"text\") graph.add_edge(node_b, node_a, \"output\") assert graph._edges == [(node_a, node_b, \"text\"), (node_b, node_a, \"output\")] assert graph._nodes == [node_a, node_b] assert graph", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5454545454545454 + }, + { + "repo": "gradio-app/daggr", + "expected": "\"items\"", + "got": "\"items\"", + "got_raw": "\"items\" assert scattered.type == ItemList[int] assert scattered.node == node assert scattered.index == 0 assert scattered.length == 3 assert scattered.items == [1, 2, 3] assert scattered._node == node assert scattered._index == 0 assert scattered._length == 3 assert scattered._items == [1, 2, 3] assert scattered._node == node assert scattered._index == 0 assert scattered._length == 3 assert scattered._items == [1, 2, 3] assert scattered._node == node assert scattered._index == 0 assert scattered._length == ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gradio-app/daggr", + "expected": "40", + "got": "45.00000000000001250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "45.00000000000001250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.03076923076923077 + }, + { + "repo": "grapeot/devin.cursorrules", + "expected": "self.mock_openai_client)", + "got": "self.mock_openai_client)", + "got_raw": "self.mock_openai_client) self.mock_openai_client.chat.completions.create.assert_called_once_with( model='gpt-3.5-turbo', messages=[{ 'role': 'user', 'content': 'test' }], temperature=0.0, max_tokens=1000, top_p=1.0, frequency_penalty=0.0, presence_penalty=0.0, stream=False, ) self.mock_openai_client.chat.completions.create.return_value.choices[0].message.content.text = \"Test OpenAI response\" self.assertEqual(query_llm(\"test\", client), \"Test Open", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "grapeot/devin.cursorrules", + "expected": "\"Test Gemini response\")", + "got": "\"Test Gemini response\")", + "got_raw": "\"Test Gemini response\") # Updated to match the Gemini response \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" ) \"\"\" )", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "grapeot/devin.cursorrules", + "expected": "result)", + "got": "result)", + "got_raw": "result) self.assertIn(\"Paragraph text\", result) self.assertIn(\"Link text\", result) self.assertIn(\"var x = 1;\", result) self.assertIn(\".css { color: red; }\", result) self.assertNotIn(\"\", result) self.assertNotIn(\"

\", result) self.assertNotIn(\"

\", result) self.assertNotIn(\"

\", result) self.assertNotIn(\"

\", result) self.assertNotIn(\"
\", result) self.assertNotIn(\"\", result) self.assertNotIn(\"<", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "grapeot/devin.cursorrules", + "expected": "mock_genai)", + "got": "mock_genai)", + "got_raw": "mock_genai) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/gql", + "expected": "\"AF\"", + "got": "\"AF\"", + "got_raw": "\"AF\" assert africa[\"name\"] == \"Africa\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/gql", + "expected": "TypeError)", + "got": "TypeError)", + "got_raw": "TypeError) as exc_info: update_schema_enum(schema, \"Color\", \"Color\") assert \"Expected enum type, got str instead\" in str(exc_info) with pytest.raises(TypeError) as exc_info: update_schema_enum(schema, \"Color\", 1) assert \"Expected enum type, got int instead\" in str(exc_info) with pytest.raises(TypeError) as exc_info: update_schema_enum(schema, \"Color\", 1.0) assert \"Expected enum type, got float instead\" in str(exc_info) with pytest.raises(TypeError) as exc_info: update_schema_enum(schema, \"Color\", []) assert \"Expected enum type,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/gql", + "expected": "TransportQueryError)", + "got": "TransportQueryError)", + "got_raw": "TransportQueryError) as exc_info: await session.execute(query) assert str(exc_info.value) == \"Cannot query field \\\"bloh\\\" on type \\\"Continent\\\".\" assert exc_info.value.errors[0].message == \"Cannot query field \\\"bloh\\\" on type \\\"Continent\\\".\" assert exc_info.value.errors[0].locations[0].line == 4 assert exc_info.value.errors[0].locations[0].column == 5 assert exc_info.value.errors[0].extensions.code == \"INTERNAL_SERVER_ERROR\" assert exc_info.value.errors[0].extensions.exception is None assert exc_info.value.errors[0].", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/gql", + "expected": "None", + "got": "None", + "got_raw": "None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/gql", + "expected": "None", + "got": "None", + "got_raw": "None and client.schema is None and client.type_defs is None and client.query_root is None and client.mutation_root is None and client.subscription_root is None and client._schema is None and client._type_defs is None and client._query_root is None and client._mutation_root is None and client._subscription_root is None and client._schema_str is None and client._type_defs_str is None and client._query_root_str is None and client._mutation_root_str is None and client._subscription_root_str is None and client._schema_strs is None and client._type_defs_strs is None and client._query_root_strs", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/gql", + "expected": "0", + "got": "0", + "got_raw": "0 and task_cancelled is True and cancel_task.cancel() is False and task.cancel() is True and task.exception() is None and cancel_task.exception() is None and task.cancel() is False and task.cancel() is True and task.exception() is None and cancel_task.exception() is None and task.cancel() is False and task.cancel() is True and task.exception() is None and cancel_task.exception() is None and task.cancel() is False and task.cancel() is True and task.exception() is None and cancel_task.exception() is None and task.cancel() is False and task.cancel() is True and task.exception() is None and cancel", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/gql", + "expected": "\"val1\"", + "got": "\"val1\"", + "got_raw": "\"val1\" assert execution_results[0].extensions[\"key2\"] == \"val2\" assert execution_results[0].data == {\"continents\": [ {\"code\": \"AF\", \"name\": \"Africa\"}, {\"code\": \"AN\", \"name\": \"Antarctica\"}, {\"code\": \"AS\", \"name\": \"Asia\"}, {\"code\": \"EU\", \"name\": \"Europe\"}, {\"code\": \"NA\", \"name\": \"North America\"}, {\"code\": \"OC\", \"name\": \"Oceania\"}, {\"code\": \"SA\", \"name\": \"South America\"}, ]} } assert execution", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/gql", + "expected": "\"test1234\"", + "got": "\"dummy\"", + "got_raw": "\"dummy\" assert transport.response_headers[\"dummy2\"] == \"dummy2\" assert transport.response_headers[\"dummy3\"] == \"dummy3\" assert transport.response_headers[\"dummy4\"] == \"dummy4\" assert transport.response_headers[\"dummy5\"] == \"dummy5\" assert transport.response_headers[\"dummy6\"] == \"dummy6\" assert transport.response_headers[\"dummy7\"] == \"dummy7\" assert transport.response_headers[\"dummy8\"] == \"dummy8\" assert transport.response_headers[\"dummy9\"] == \"dummy9\" assert transport.response_headers[\"dummy10\"] == \"dummy10\" assert transport.response_headers[\"dummy", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.23529411764705882 + }, + { + "repo": "graphql-python/gql", + "expected": "5", + "got": "10.0", + "got_raw": "10.0 * 0.500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "graphql-python/gql", + "expected": "\"...DEF\"", + "got": "\"...DEF\"", + "got_raw": "\"...DEF\"\n\n\ndef test_fragment_with_name_changed_2(ds):\n\n fragment = DSLFragment(\"ABC\")\n\n assert str(fragment) == \"...ABC\"\n\n fragment.name = \"DEF\"\n\n assert str(fragment) == \"...DEF\"\n\n fragment.name = \"ABC\"\n\n assert str(fragment) == \"...ABC\"\n\n\ndef test_fragment_with_name_changed_3(ds):\n\n fragment = DSLFragment(\"ABC\")\n\n assert str(fragment) == \"...ABC\"\n\n fragment.name = \"DEF\"\n\n assert str(fragment) == \"...DEF", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/gql", + "expected": "None", + "got": "None", + "got_raw": "None and result[1] is not None and isinstance(result[1], Exception) and str(result[1]) == \"Cannot connect to the server\" and str(result[1]) == str(result[2]) and str(result[1]) == str(result[3]) and str(result[1]) == str(result[4]) and str(result[1]) == str(result[5]) and str(result[1]) == str(result[6]) and str(result[1]) == str(result[7]) and str(result[1]) == str(result[8]) and str(result[1]) == str(result[9]) and", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/gql", + "expected": "\"doc\"", + "got": "\"phx_open\"", + "got_raw": "\"phx_open\" json_result[\"payload\"][\"topic\"] == \"test_channel\" json_result[\"payload\"][\"ref\"] == 1234567890 json_result[\"payload\"][\"ack\"] == 1234567890 json_result[\"payload\"][\"id\"] == \"test_channel\" json_result[\"payload\"][\"auth\"] == {} json_result[\"payload\"][\"vsn\"] == 3.0 json_result[\"payload\"][\"user\"] == {} json_result[\"payload\"][\"meta\"] == {} json_result[\"payload\"][\"subprotocol\"] == \"websockets\" json_result[\"payload\"][\"ackTimeout\"]", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4 + }, + { + "repo": "graphql-python/gql", + "expected": "request_3.document", + "got": "request_3.document", + "got_raw": "request_3.document", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/gql", + "expected": "\"AF\"", + "got": "\"AF\"", + "got_raw": "\"AF\" africa[\"name\"] == \"Africa\" assert len(continents) == 7 assert africa[\"name\"] == \"Africa\" assert africa[\"code\"] == \"AF\" assert africa[\"name\"] == \"Africa\" assert africa[\"code\"] == \"AF\" assert africa[\"name\"] == \"Africa\" assert africa[\"code\"] == \"AF\" assert africa[\"name\"] == \"Africa\" assert africa[\"code\"] == \"AF\" assert africa[\"name\"] == \"Africa\" assert africa[\"code\"] == \"AF\" assert africa[\"name\"] == \"Africa\" assert africa[\"code\"] == \"AF\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/gql", + "expected": "\"3600\"", + "got": "\"3600\"", + "got_raw": "\"3600\" def test_query_error(): transport = RequestsHTTPTransport(url=url) with Client(transport=transport) as session: query = [GraphQLRequest(query1_str)] with pytest.raises(TransportQueryError) as exc_info: session.execute_batch(query) assert \"400, message='Bad Request'\" in str(exc_info.value) def test_protocol_error(): transport = RequestsHTTPTransport(url=url) with Client(transport=transport) as session: query = [GraphQLRequest(query1_str)] with pytest.raises(TransportProtocolError) as exc_info: session.execute_batch(query) assert \"404, message", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/gql", + "expected": "TransportQueryError)", + "got": "TransportQueryError)", + "got_raw": "TransportQueryError) as exc_info:\n await session.execute(query)\n\n assert str(exc_info.value) == \"Invalid query\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/gql", + "expected": "\"AF\"", + "got": "\"AF\"", + "got_raw": "\"AF\" assert africa[\"name\"] == \"Africa\" assert len(continents) == 7 assert continents[1][\"code\"] == \"AN\" assert continents[1][\"name\"] == \"Antarctica\" assert continents[2][\"code\"] == \"AS\" assert continents[2][\"name\"] == \"Asia\" assert continents[3][\"code\"] == \"EU\" assert continents[3][\"name\"] == \"Europe\" assert continents[4][\"code\"] == \"NA\" assert continents[4][\"name\"] == \"North America\" assert continents[5][\"code\"] == \"OC\" assert continents[5][\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/gql", + "expected": "captured_err", + "got": "captured_err.lower()", + "got_raw": "captured_err.lower() \\ \"Cannot query field \" \"bloh\" \"on type \" \"Continent\" in captured_err.lower() \\ \"Cannot query field \" \"bloh\" \"on type \" \"Continent\" in captured_err.lower() \\ \"Cannot query field \" \"bloh\" \"on type \" \"Continent\" in captured_err.lower() \\ \"Cannot query field \" \"bloh\" \"on type \" \"Continent\" in captured_err.lower() \\ \"Cannot query field \" \"bloh\" \"on type \" \"Continent\" in captured_err.lower() \\ \"Cannot query field \" \"blo", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.75 + }, + { + "repo": "graphql-python/gql", + "expected": "\"Europe\"", + "got": "\"Europe\"", + "got_raw": "\"Europe\" assert continent[\"code\"] == \"EU\" assert result[\"hello\"] == \"Hello, World!\" assert result[\"data\"] is None assert result[\"errors\"] is None assert result[\"extensions\"] is None assert result[\"id\"] is None assert result[\"extensions\"] is None assert result[\"extensions\"] is None assert result[\"extensions\"] is None assert result[\"extensions\"] is None assert result[\"extensions\"] is None assert result[\"extensions\"] is None assert result[\"extensions\"] is None assert result[\"extensions\"] is None assert result[\"extensions\"] is None assert result[\"extensions\"] is None assert result[\"extensions\"] is None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/gql", + "expected": "spread2", + "got": "spread2", + "got_raw": "spread2\n\n\ndef test_fragment_spread(ds):\n \"\"\"Test that .spread() creates new DSLFragmentSpread instance\"\"\"\n fragment = DSLFragment(\"Test\").on(ds.Character).select(ds.Character.name)\n spread = fragment.spread()\n\n assert isinstance(spread, DSLFragmentSpread)\n assert spread.name == \"Test\" and spread.type == ds.Character and spread.selections == [ds.Character.name] and spread.directives == [] and spread.loc == fragment.loc and spread.spreadLoc == fragment.spreadLoc and spread.typeCondition is None and spread.selectionSet is None and spread.directives is None and spread", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene", + "expected": "Color", + "got": "Color()", + "got_raw": "Color() _meta = RGB._meta _meta.description == \"This is the description\" _meta.enum == Color() _meta.fields == {} _meta.type == RGB _meta.name == \"RGB\" _meta.description == \"This is the description\" _meta.scalar == \"RGB\" _meta.type == RGB _meta.name == \"RGB\" _meta.description == \"This is the description\" _meta.scalar == \"RGB\" _meta.type == RGB _meta.name == \"RGB\" _meta.description == \"This is the description\" _meta.scalar == \"RGB\" _meta.type == RGB _meta.name ==", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.8333333333333334 + }, + { + "repo": "graphql-python/graphene", + "expected": "[MyFirstInterface]", + "got": "(MyFirstInterface", + "got_raw": "(MyFirstInterface,)", + "exact_match": false, + "code_bleu": 0.35818997727451396, + "edit_similarity": 0.9142857142857143 + }, + { + "repo": "graphql-python/graphene", + "expected": "{\"optional\": {\"bool\": None}}", + "got": "{\"optional\": {\"bool\": None}}", + "got_raw": "{\"optional\": {\"bool\": None}}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene", + "expected": "Node", + "got": "Node.FieldType()", + "got_raw": "Node.FieldType() # type: ignore assert node_field.args == {} assert node_field.resolve is None assert node_field.default_resolver is None assert node_field.description is None assert node_field.deprecation_reason is None assert node_field.is_global_id is False assert node_field.is_node is True assert node_field.is_list is False assert node_field.is_interface is False assert node_field.is_union is False assert node_field.is_scalar is False assert node_field.is_enum is False assert node_field.is_input is False assert node_field.is_interface_field is False assert node_field.is_union_field", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.4 + }, + { + "repo": "graphql-python/graphene", + "expected": "two", + "got": "two", + "got_raw": "two < three < 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene", + "expected": "1", + "got": "1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "graphql-python/graphene", + "expected": "\"a\"", + "got": "\"a\"", + "got_raw": "\"a\" assert color_map[RGB.BLUE] == \"b\" assert color_map[1] == \"c\" assert color_map[RGB.GREEN] == \"2\" assert color_map[RGB.GREEN.value] == \"2\" assert color_map[RGB.GREEN.name] == \"2\" assert color_map[RGB.GREEN] == \"2\" assert color_map[RGB.GREEN] == \"2\" assert color_map[RGB.GREEN] == \"2\" assert color_map[RGB.GREEN] == \"2\" assert color_map[RGB.GREEN] == \"2\" assert color_map[RGB.GREEN] == \"2\" assert color_map[", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene", + "expected": "\"value\"", + "got": "\"value\"", + "got_raw": "\"value\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene", + "expected": "1", + "got": "1", + "got_raw": "1 result.errors[0].message == \"Query type is required.\" schema = Schema(query=ObjectType()) result = schema.execute(\"query { hello }\") assert result.errors is None assert result.data == {\"hello\": \"Hello world!\"} schema = Schema(query=ObjectType(), mutation=ObjectType()) result = schema.execute(\"mutation { hello }\") assert result.errors is None assert result.data == {\"hello\": \"Hello world!\"} schema = Schema(query=ObjectType(), subscription=ObjectType()) result = schema.execute(\"subscription { hello }\") assert result.errors is None assert result.data == {\"hello\": \"Hello world!\"} schema = Schema(query", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene", + "expected": "\"Desc\"", + "got": "\"Desc\"", + "got_raw": "\"Desc\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene", + "expected": "[\"what\", \"client_mutation_id\"]", + "got": "[\"message\"] assert fields[\"message\"].type == String assert fields[\"message\"].required is True", + "got_raw": "[\"message\"] assert fields[\"message\"].type == String assert fields[\"message\"].required is True\n\n\nclass SaySomething(ClientIDMutation):\n class Input:\n message = String(required=True)\n\n class Output:\n message = String()\n\n @staticmethod\n def mutate_and_get_payload(root, info, message):\n return SaySomething(message=message)\n\n\ndef test_mutation_input_field():\n mutation = SaySomething.Field()\n assert issubclass(mutation.type, ObjectType) assert mutation.type._meta.name == \"SaySomething\" assert mutation.type._meta.fields == { \"message\": Field(String, required", + "exact_match": false, + "code_bleu": 0.0612957497932821, + "edit_similarity": 0.0975609756097561 + }, + { + "repo": "graphql-python/graphene", + "expected": "MyType", + "got": "MyType", + "got_raw": "MyType # noqa: E711 MyType is not a valid type for a field. It is a class. It should be an instance. field = InputField(MyType()) # noqa: E711 field = InputField(MyType) # noqa: E711 field = InputField(MyType, required=False) # noqa: E711 field = InputField(MyType, required=True) # noqa: E711 field = InputField(MyType, required=False) # noqa: E711 field = InputField(MyType, required=True) #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene", + "expected": "\"PageInfo\"", + "got": "\"PageInfo\"", + "got_raw": "\"PageInfo\" PageInfo._meta.fields[\"hasNextPage\"].type_ == NonNull(Bool) PageInfo._meta.fields[\"hasPreviousPage\"].type_ == NonNull(Bool) PageInfo._meta.fields[\"startCursor\"].type_ == String PageInfo._meta.fields[\"endCursor\"].type_ == String PageInfo._meta.fields[\"totalCount\"].type_ == Int PageInfo._meta.fields[\"totalCount\"].args[0].type_ == Int PageInfo._meta.fields[\"totalCount\"].args[0].args[0].type_ == Int PageInfo._meta.fields[\"totalCount\"].args[0].args[0].args[", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene", + "expected": "Query", + "got": "Query.graphene_type", + "got_raw": "Query.graphene_type\n\n\ndef test_schema_with_directives():\n schema = Schema(Query, directives=[String])\n graphql_schema = schema.graphql_schema\n assert isinstance(graphql_schema, GraphQLSchema)\n query_type = graphql_schema.query_type\n assert isinstance(query_type, GraphQLObjectType)\n assert query_type.name == \"Query\"\n assert query_type.graphene_type is Query.graphene_type\n\n\ndef test_schema_with_invalid_directives():\n with raises(TypeError) as exc_info:\n Schema(Query, directives=123)\n assert str(exc_info.value) == \"Expected directives to be a list", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.4166666666666667 + }, + { + "repo": "graphql-python/graphene", + "expected": "\"b\"", + "got": "\"b\"", + "got_raw": "\"b\"\n assert arg.is_list is False\n assert arg.is_input is False\n assert arg.type_name == \"String\"\n assert arg.type_str == \"String\"\n assert arg.type_str_non_null == \"String!\"\n\n\ndef test_argument_list():\n args = Argument([String, String], default_value=\"a\", description=\"desc\", name=\"b\")\n assert args.type == [String, String]\n assert args.default_value == \"a\"\n assert args.description == \"desc\"\n assert args.name == \"b\"\n assert args.is_list is True\n assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene", + "expected": "{\"say\": {\"phrase\": \"hello\"}}", + "got": "{\"say\": {\"phrase\": \"hello\"}}", + "got_raw": "{\"say\": {\"phrase\": \"hello\"}}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene", + "expected": "String", + "got": "String", + "got_raw": "String # type: ignore arg.name == \"b\" arg.description == \"desc\" arg.default_value == \"a\" arg.type_of == String # type: ignore arg.type_of_str == \"String\" arg.type_of_non_null == NonNull(String) # type: ignore arg.type_of_non_null_str == \"String!\" arg.type_of_list == [String] # type: ignore arg.type_of_list_str == \"[String]\" arg.type_of_list_non_null == [NonNull(String)] # type: ignore arg.type_of_list_non_null_str == \"[String!]\" arg.type_of_list_non_null_str_2 ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene", + "expected": "{\"json\": json_value}", + "got": "{\"json\": json_value}", + "got_raw": "{\"json\": json_value}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene", + "expected": "\"1\"", + "got": "\"1\"", + "got_raw": "\"1\" assert container.field2 == \"2\" assert container.field3 == None assert container.field4 == None assert container.field5 == None assert container.field6 == None assert container.field7 == None assert container.field8 == None assert container.field9 == None assert container.field10 == None assert container.field11 == None assert container.field12 == None assert container.field13 == None assert container.field14 == None assert container.field15 == None assert container.field16 == None assert container.field17 == None assert container.field18 == None assert container.field19 == None assert container.field20", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene", + "expected": "{\"node\": None}", + "got": "{\"node\": None}", + "got_raw": "{\"node\": None}\n\n\ndef test_node_requesting_non_existing_node():\n executed = schema.execute(\n '{ node(id:\"%s\") { __typename } } ' % Node.to_global_id(\"RootQuery\", 1000)\n )\n assert executed.errors\n assert re.match(\n r\"Could not find id '1000' in the schema.\", executed.errors[0].message)\n assert executed.data == {\"node\": None}\n\n\ndef test_node_requesting_existing_node():\n executed = schema.execute(\n '{ node(id:\"%s\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene-django", + "expected": "1", + "got": "1", + "got_raw": "1 and result.errors[0].message == expected_error\n\n # Single value\n result = schema.execute(query, variables={\"rangeValue\": [12]})\n assert len(result.errors) == 1 and result.errors[0].message == expected_error\n\n # Single value out of range\n result = schema.execute(query, variables={\"rangeValue\": [13]})\n assert len(result.errors) == 1 and result.errors[0].message == expected_error\n\n\ndef test_range_filter_with_valid_input():\n \"\"\"\n Test range filter used with valid inputs returns the correct results.\n \"\"\"\n Pet.objects.create", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene-django", + "expected": "DOCUMENTARY", + "got": "DOCUMENTARY_ON_CLIENT_CONVERTED.lower()", + "got_raw": "DOCUMENTARY_ON_CLIENT_CONVERTED.lower()", + "exact_match": false, + "code_bleu": 0.2295748846661433, + "edit_similarity": 0.44 + }, + { + "repo": "graphql-python/graphene-django", + "expected": "[]", + "got": "[", + "got_raw": "[ {\"node\": {\"name\": \"Live Show\"}}, {\"node\": {\"name\": \"Musical\"}}, {\"node\": {\"name\": \"Dance Show\"}}, ]", + "exact_match": false, + "code_bleu": 0.29730177875068026, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "graphql-python/graphene-django", + "expected": "[ {\"node\": {\"headline\": \"A\"}}, {\"node\": {\"headline\": \"AB\"}}, {\"node\": {\"headline\": \"B\"}}, ]", + "got": "[ {\"node\": {\"headline\": \"A\"}}, {\"node\": {\"headline\": \"B\"}}, ]", + "got_raw": "[ {\"node\": {\"headline\": \"A\"}}, {\"node\": {\"headline\": \"B\"}}, ]", + "exact_match": false, + "code_bleu": 0.6875, + "edit_similarity": 0.8026315789473685 + }, + { + "repo": "graphql-python/graphene-django", + "expected": "DateTime)", + "got": "DateTime)", + "got_raw": "DateTime)\n\n\ndef test_should_date_convert_date():\n\n assert_conversion(forms.DateField, Date)\n\n\ndef test_should_time_convert_time():\n\n assert_conversion(forms.TimeField, Time)\n\n\ndef test_should_boolean_convert_boolean():\n\n assert_conversion(forms.BooleanField, Boolean)\n\n\ndef test_should_string_convert_string():\n\n assert_conversion(forms.CharField, String)\n\n\ndef test_should_int_convert_int():\n\n assert_conversion(forms.IntegerField, Int)\n\n\ndef test_should_float_convert_float():\n\n assert_conversion(forms.FloatField, Float)\n\n\ndef test", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene-django", + "expected": "Boolean)", + "got": "Boolean)", + "got_raw": "Boolean)\n assert field.default_value is False\n\n\ndef test_should_convert_date():\n field = assert_conversion(forms.DateField, Date)\n assert field.default_value is None\n\n\ndef test_should_convert_datetime():\n field = assert_conversion(forms.DateTimeField, DateTime)\n assert field.default_value is None\n\n\ndef test_should_convert_decimal():\n field = assert_conversion(forms.DecimalField, Decimal)\n assert field.default_value is None\n\n\ndef test_should_convert_float():\n field = assert_conversion(forms.FloatField, Float)\n assert field.default_value is None\n\n\ndef test_should_convert_int():\n field = assert_conversion(forms.IntegerField, Int)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene-django", + "expected": "body.items()", + "got": "body[\"query\"]", + "got_raw": "body[\"query\"] == \"QueryName\" and body[\"operationName\"] == \"QueryName\" and body[\"variables\"] is None and body[\"extensions\"] is None and body[\"http\"] is None and body[\"context\"] is None and body[\"headers\"] is None and body[\"binary\"] is False and body[\"timeout\"] is None and body[\"verify\"] is True and body[\"cert\"] is None and body[\"allow_redirects\"] is True and body[\"auth\"] is None and body[\"cookies\"] is None and body[\"data\"] is None and body[\"json\"] is None and body[\"headers\"] is None and", + "exact_match": false, + "code_bleu": 0.28744328957046744, + "edit_similarity": 0.4 + }, + { + "repo": "graphql-python/graphene-django", + "expected": "None", + "got": "None", + "got_raw": "None result.model.cool_name == \"other_value\" result.text == \"value\" result.model.id is None result.model.created_at is None result.model.updated_at is None result.model.pk is None result.model.__str__() == \"MyModel(text='value')\" result.model.__repr__() == \"\" result.model.__hash__() == 1234567890 result.model.__eq__(MyModel(text=\"value\")) is True result.model.__ne__(MyModel(text=\"other\")) is True result.model.__lt__(MyModel(text=\"other\")) is False result.model.__le__(My", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene-django", + "expected": "ReporterModel", + "got": "ReporterModel", + "got_raw": "ReporterModel # noqa: E721\n\n def test_get_queryset(self):\n class Reporter(DjangoObjectType):\n class Meta:\n model = ReporterModel\n fields = (\"first_name\",)\n\n list_field = DjangoListField(Reporter)\n assert list_field.get_queryset(None) is None # noqa: E721\n\n def test_resolve(self):\n class Reporter(DjangoObjectType):\n class Meta:\n model = ReporterModel\n fields = (\"first_name\",)\n\n list_field = DjangoListField(Reporter)\n assert list_field.resolve(None, None) is None #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene-django", + "expected": "\"English\"", + "got": "\"English\"", + "got_raw": "\"English\"\n\n\ndef test_field_with_choices_convert_enum_with_default():\n field = models.CharField(\n help_text=\"Language\", choices=((\"es\", \"Spanish\"), (\"en\", \"English\")), default=\"es\"\n )\n\n class ChoicesModel(models.Model):\n language = field\n\n class Meta:\n app_label = \"test\"\n\n graphene_type = convert_django_field_with_choices(field).type.of_type\n assert graphene_type._meta.name == \"TestChoicesModelLanguageChoices\"\n assert graphene_type._meta.enum.__members__[\"ES\"].value == \"es\"\n assert graphene", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene-django", + "expected": "UUID)", + "got": "UUID)", + "got_raw": "UUID)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene-django", + "expected": "\"Hello\"", + "got": "\"Hello\"", + "got_raw": "\"Hello\" assert field._meta.enum.__members__[\"W\"].value == \"w\" assert field._meta.enum.__members__[\"W\"].description == \"World\" assert field._meta.enum.__doc__ == \"Custom Help Text\" assert field._meta.enum.required is False assert field._meta.enum.description == \"Custom Help Text\" assert field._meta.enum.name == \"Word\" assert field._meta.enum._meta.deprecated is False assert field._meta.enum._meta.required is False assert field._meta.enum._meta.help_text == \"Custom Help Text\" assert field._meta.enum._meta.description == \"Custom Help Text\" assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene-django", + "expected": "3", + "got": "3", + "got_raw": "3 result.data[\"allReporters\"][\"edges\"][0][\"node\"][\"firstName\"] == \"John\" result.data[\"allReporters\"][\"edges\"][1][\"node\"][\"firstName\"] == \"Jane\" result.data[\"allReporters\"][\"edges\"][2][\"node\"][\"firstName\"] == \"Joe\" result.data[\"allReporters\"][\"edges\"][3][\"node\"][\"firstName\"] == \"Jill\" result.data[\"allReporters\"][\"edges\"][4][\"node\"][\"firstName\"] == \"Jack\" result.data[\"allReporters\"][\"edges\"][5][\"node\"][\"firstName\"] == \"Judy\" result.data[\"allReporters\"][\"edges\"][6][\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene-django", + "expected": "graphene.Int", + "got": "graphene.String()", + "got_raw": "graphene.String()", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.6896551724137931 + }, + { + "repo": "graphql-python/graphene-django", + "expected": "0", + "got": "0", + "got_raw": "0 and result.errors[\"name\"] == [\"This field is required.\"] and result.errors[\"email\"] == [\"This field is required.\"] and result.errors[\"password\"] == [\"This field is required.\"] and result.errors[\"password_confirm\"] == [\"This field is required.\"] and result.errors[\"age\"] == [\"This field is required.\"] and result.errors[\"date\"] == [\"This field is required.\"] and result.errors[\"date_time\"] == [\"This field is required.\"] and result.errors[\"date_time_local\"] == [\"This field is required.\"] and result.errors[\"date_time_zone\"] == [\"This field is required.\"] and result.errors[\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene-django", + "expected": "[ {\"node\": {\"headline\": \"A\"}}, ]", + "got": "[ {\"node\": {\"headline\": \"A\"}}, ]", + "got_raw": "[ {\"node\": {\"headline\": \"A\"}}, ]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene-django", + "expected": "[]", + "got": "[]", + "got_raw": "[] assert result.data[\"myMutation\"][\"text\"] == \"VALID_INPUT\" def test_form_invalid_input(): class MyMutation(DjangoFormMutation): class Meta: form_class = MyForm def form_valid(self, form): raise ValidationError({\"text\": [\"Invalid input\"]}) class Mutation(ObjectType): my_mutation = MyMutation.Field() schema = Schema(query=MockQuery, mutation=Mutation) result = schema.execute( \"\"\" mutation MyMutation { myMutation(input: { text: \"INVALID_INPUT\" }) { errors { field messages } text } } \"\"\" ) assert result.errors is not None assert result.errors[\"text\"] == [\"Invalid input", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene-django", + "expected": "2", + "got": "2", + "got_raw": "2 result.data[\"allReporters\"][\"edges\"][0][\"node\"][\"id\"] == \"1\" result.data[\"allReporters\"][\"edges\"][1][\"node\"][\"id\"] == \"2\" result.data[\"allReporters\"][\"edges\"][0][\"node\"][\"id\"] == \"3\" result.data[\"allReporters\"][\"edges\"][1][\"node\"][\"id\"] == \"4\" result.data[\"allReporters\"][\"edges\"][0][\"node\"][\"id\"] == \"5\" result.data[\"allReporters\"][\"edges\"][1][\"node\"][\"id\"] == \"6\" result.data[\"allReporters\"][\"edges\"][0][\"node\"][\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene-django", + "expected": "\"Narf\"", + "got": "\"Narf\"", + "got_raw": "\"Narf\" result = MyModelMutation.mutate_and_get_payload( None, mock_info(), **{\"cool_name\": \"Narf\", \"cool_age\": 42} ) assert result.errors is None assert result.cool_name == \"Narf\" assert result.cool_age == 42 result = MyModelMutation.mutate_and_get_payload( None, mock_info(), **{\"cool_name\": \"Narf\", \"cool_age\": 42, \"cool_email\": \"test@test.com\"} ) assert result.errors is None assert result.cool_name == \"Narf\" assert result.cool_age == ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "graphql-python/graphene-django", + "expected": "result.data[\"_debug\"][\"sql\"][0][\"rawSql\"]", + "got": "result.data[\"_debug\"][\"sql\"][0]", + "got_raw": "result.data[\"_debug\"][\"sql\"][0] and \"SELECT\" in result.data[\"_debug\"][\"sql\"][1]", + "exact_match": false, + "code_bleu": 0.8, + "edit_similarity": 0.8611111111111112 + }, + { + "repo": "greyli/helloflask", + "expected": "302)", + "got": "302)", + "got_raw": "302) self.assertEqual(response.headers.get('Location'), '/set/TestUser') response = self.client.get('/set/TestUser') self.assertEqual(response.status_code, 200) self.assertIn(b'You are logged in as TestUser', response.data) response = self.client.get('/set/TestUser', follow_redirects=False) self.assertEqual(response.status_code, 302) self.assertEqual(response.headers.get('Location'), '/set/TestUser') response = self.client.get('/set/TestUser') self.assertEqual(response.status_code, 200) self.assertIn(b'You are logged in as TestUser', response.data)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "greyli/helloflask", + "expected": "200)", + "got": "200)", + "got_raw": "200) self.assertIn('Cache', data) self.assertIn('Cache-Control', data) self.assertIn('Expires', data) self.assertIn('Last-Modified', data) self.assertIn('ETag', data) self.assertIn('Vary', data) self.assertIn('Accept-Ranges', data) self.assertIn('Content-Encoding', data) self.assertIn('Content-Type', data) self.assertIn('Content-Length', data) self.assertIn('Date', data) self.assertIn('Server', data) self.assertIn('Cache-Control', data) self.assertIn('Expires', data) self.assertIn('Last-Modified', data) self.assertIn('ETag',", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "greyli/helloflask", + "expected": "200)", + "got": "200)", + "got_raw": "200) self.assertIn('Hello, World!', data)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "greyli/helloflask", + "expected": "self.app)", + "got": "self.app)", + "got_raw": "self.app)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "greyli/helloflask", + "expected": "403)", + "got": "403)", + "got_raw": "403) self.assertIn(b'Access Denied', response.data) def test_admin_access_allowed(self): with self.client.session_transaction() as sess: sess['user_id'] = 1 sess['username'] = 'admin' response = self.client.get('/admin') self.assertEqual(response.status_code, 200) self.assertIn(b'Welcome, admin', response.data) if __name__ == '__main__': unittest.main()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "greyli/helloflask", + "expected": "app is None)", + "got": "app is None)", + "got_raw": "app is None) # check if app exists\n\n def test_app_is_test(self):\n\n self.assertTrue(\n### Target: app.config['TESTING']) # check if app is testing mode\n\n def test_index(self):\n response = self.client.get('/') # get index page\n self.assertEqual(response.status_code, 200) # check status code\n\n self.assertIn(b'Notes', response.data) # check if 'Notes' is in response data\n\n def test_create(self):\n response = self.client.post( # create a new note\n '/create', data={'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gtalarico/pyairtable", + "expected": "expected", + "got": "expected.lower()", + "got_raw": "expected.lower() + \"s\" + expected.capitalize() + \"s\" + expected.lower() + \"s\" + expected.capitalize() + \"s\" + expected.lower() + \"s\" + expected.capitalize() + \"s\" + expected.lower() + \"s\" + expected.capitalize() + \"s\" + expected.lower() + \"s\" + expected.capitalize() + \"s\" + expected.lower() + \"s\" + expected.capitalize() + \"s\" + expected.lower() + \"s\" + expected.capitalize() + \"s\" + expected.lower() + \"s\" + expected.capitalize() + \"s\" +", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "gtalarico/pyairtable", + "expected": "2", + "got": "2", + "got_raw": "2\nassert contacts[0].comment_count == 5 assert contacts[1].comment_count == 0\n\n\ndef test_all_with_comment_count_and_fields():\n with mock.patch.object(Table, \"all\") as m_all:\n m_all.return_value = [\n {\n \"id\": \"rec1\",\n \"createdTime\": NOW,\n \"fields\": {\"First Name\": \"Alice\"},\n \"commentCount\": 5,\n },\n {\n \"id\": \"rec2\",\n \"createdTime\": NOW,\n \"fields\": {\"First Name\": \"Bob\"},\n \"commentCount\": ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gtalarico/pyairtable", + "expected": "fake", + "got": "fake.copy()", + "got_raw": "fake.copy() T.coerce_fake_record(fake) == fake T.coerce_fake_record({\"id\": \"rec123\", \"createdTime\": 1234567890, \"fields\": {\"Name\": \"Alice\"}}) == { \"id\": \"rec123\", \"createdTime\": 1234567890, \"fields\": {\"Name\": \"Alice\"}, } T.coerce_fake_record({\"id\": \"rec123\", \"createdTime\": 1234567890, \"fields\": {\"Name\": \"Alice\",", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5333333333333333 + }, + { + "repo": "gtalarico/pyairtable", + "expected": "user_id", + "got": "user_id", + "got_raw": "user_id + \"-\" + enterprise.id + \"-user\" + \"-\" + user_id + \"-\" + enterprise.id + \"-user\" + \"-\" + user_id + \"-\" + enterprise.id + \"-user\" + \"-\" + user_id + \"-\" + enterprise.id + \"-user\" + \"-\" + user_id + \"-\" + enterprise.id + \"-user\" + \"-\" + user_id + \"-\" + enterprise.id + \"-user\" + \"-\" + user_id + \"-\" + enterprise.id + \"-user\" + \"-\" + user_id + \"-\" + enterprise.id + \"-user\" + \"-\" + user_id + \"-\" + enterprise.id + \"-user\" + \"-\" + user_id", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gtalarico/pyairtable", + "expected": "whoami", + "got": "whoami.replace(\"users/\"", + "got_raw": "whoami.replace(\"users/\", \"\")[1:] # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E5", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.41379310344827586 + }, + { + "repo": "gtalarico/pyairtable", + "expected": "EQ(1, 1)", + "got": "EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) ==", + "got_raw": "EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) == EQ(1, 1) ==", + "exact_match": false, + "code_bleu": 0.04222564916474111, + "edit_similarity": 0.08040201005025126 + }, + { + "repo": "gtalarico/pyairtable", + "expected": "[value])", + "got": "[value])", + "got_raw": "[value])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gtalarico/pyairtable", + "expected": "\"\"", + "got": "\"link0\"", + "got_raw": "\"link0\" assert obj.link._fields.get(\"Name\") == \"link0\" assert obj.link._fields.get(\"Name\") is not \"link0\" else: assert obj.link.id == link_ids[0] assert obj.link.name == \"link0\" assert obj.link._fields.get(\"Name\") == \"link0\" assert obj.link._fields.get(\"Name\") is \"link0\" obj.link.populate(obj) assert obj.link.id == links[0][\"id\"] assert obj.link.name == \"link0\" assert obj.link._fields.get(\"Name\") == \"link0\" assert obj.link._fields.get(\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4444444444444444 + }, + { + "repo": "gtalarico/pyairtable", + "expected": "*args)", + "got": "*args)", + "got_raw": "*args)\n\n\ndef test_model_comment_method_missing_method():\n \"\"\"\n Test that an error is raised if a method is called that doesn't exist.\n \"\"\"\n record_id = fake_id()\n instance = FakeModel.from_id(record_id, fetch=False)\n with pytest.raises(AttributeError) as exc_info:\n instance.fake_method()\n assert str(exc_info.value) == \"FakeModel has no attribute fake_method\"\n\n\ndef test_model_comment_method_missing_args():\n \"\"\"\n Test that an error is raised if a method is called with too few arguments.\n \"\"\"\n record_id", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gtalarico/pyairtable", + "expected": "{ \"id\": \"rec123\", \"createdTime\": ANY, \"fields\": {\"Name\": \"Alice\"}, }", + "got": "{ \"id\": \"rec123\", \"createdTime\": ANY, \"fields\": {\"Name\": \"Alice\"}, }", + "got_raw": "{ \"id\": \"rec123\", \"createdTime\": ANY, \"fields\": {\"Name\": \"Alice\"}, }", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gtalarico/pyairtable", + "expected": "value)", + "got": "value)", + "got_raw": "value)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gtalarico/pyairtable", + "expected": "TypeError)", + "got": "pydantic.ValidationError)", + "got_raw": "pydantic.ValidationError) as exc_info: T.assert_typed_dicts(cls, [value, \"invalid\"]) T.assert_typed_dicts(cls, [value, value]) T.assert_typed_dicts(cls, [value, value, value]) T.assert_typed_dicts(cls, [value, value, value, value]) T.assert_typed_dicts(cls, [value, value, value, value, value]) T.assert_typed_dicts(cls, [value, value, value, value, value, value]) T.assert_typed_dicts(cls, [value, value, value, value, value, value, value]) T.assert_typed", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.4 + }, + { + "repo": "gtalarico/pyairtable", + "expected": "\"asdf\"", + "got": "\"asdf\"", + "got_raw": "\"asdf\" # noqa: E128", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gtalarico/pyairtable", + "expected": "expected", + "got": "expected[0]", + "got_raw": "expected[0] if expected[1] else expected[1] # the second value is the \"spare params\" dict, which is empty most of the time. # we can't test it directly, since it depends on the API version. # see the test_convert_options_to_params for an example. def test_convert_options_to_params(option, value, expected): assert options_to_params({option: value}) == expected # test that we can handle multiple options def test_convert_multiple_options_to_params(): options = { \"view\": \"SomeView\", \"max_records\": 5, \"page_size\": 5, \"formula", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.8421052631578947 + }, + { + "repo": "gtalarico/pyairtable", + "expected": "[rec]", + "got": "[rec]", + "got_raw": "[rec] assert table.all(view=\"view\", maxRecords=1) == [rec] assert table.all(view=\"view\", maxRecords=1, sort=[(\"createdTime\", \"asc\")]) == [rec] assert table.all(view=\"view\", maxRecords=1, sort=[(\"createdTime\", \"desc\")]) == [rec] assert table.all(view=\"view\", maxRecords=1, sort=[(\"createdTime\", \"desc\"), (\"id\", \"asc\")]) == [rec] assert table.all(view=\"view\", maxRecords=1, sort=[(\"createdTime\", \"desc\"), (\"id\", \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gtalarico/pyairtable", + "expected": "id_a", + "got": "id_a", + "got_raw": "id_a + \" (cyclical)\" + id_a[1:] + \" (cyclical)\" + id_a[2:] + \" (cyclical)\" + id_a[3:] + \" (cyclical)\" + id_a[4:] + \" (cyclical)\" + id_a[5:] + \" (cyclical)\" + id_a[6:] + \" (cyclical)\" + id_a[7:] + \" (cyclical)\" + id_a[8:] + \" (cyclical)\" + id_a[9:] + \" (cyclical)\" + id", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gtalarico/pyairtable", + "expected": "expected)", + "got": "expected)", + "got_raw": "expected) as exc_info: F.to_formula(input) assert str(exc_info.value) == str(input) else: assert F.to_formula(input) == expected\n\n\ndef test_to_formula_error():\n \"\"\"\n Test that to_formula() raises an error for unsupported types\n \"\"\"\n with pytest.raises(TypeError) as exc_info: F.to_formula(orm.fields.Field(\"Foo\")) assert str(exc_info.value) == \"Unsupported type: . \" \"Only formulas, booleans, numbers, and strings are supported.\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gtalarico/pyairtable", + "expected": "1", + "got": "1", + "got_raw": "1 if \"pop\" in mutation else 2 if \"remove\" in mutation else 3 if \"clear\" in mutation else 4 if \"extend\" in mutation else 5 if \"insert\" in mutation else 6 if \"append\" in mutation else 7 if \"set\" in mutation else 8 if \"del\" in mutation else 9 else 10 if \"clear\" in mutation else 11 if \"pop\" in mutation else 12 if \"remove\" in mutation else 13 else 14 if \"clear\" in mutation else 15 if \"extend\" in mutation else", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "gtalarico/pyairtable", + "expected": "[value, -1])", + "got": "[value, \"invalid\"])", + "got_raw": "[value, \"invalid\"])", + "exact_match": false, + "code_bleu": 0.41907687637277224, + "edit_similarity": 0.6451612903225806 + }, + { + "repo": "gtalarico/pyairtable", + "expected": "2", + "got": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "hacs/integration", + "expected": "None", + "got": "None", + "got_raw": "None\n\n response_mocker.add( MockedResponse( \"switch/switch.json\", safe_json_dumps( category_test_data[\"switch\"] ) ) ) response_mocker.add( MockedResponse( \"switch/switch.json\", safe_json_dumps( category_test_data[\"switch\"] ) ) ) response_mocker.add( MockedResponse( \"switch/switch.json\", safe_json_dumps( category_test_data[\"switch\"] ) ) ) response_mocker.add( MockedResponse( \"switch/switch.json\", safe_json_dumps( category_test_data[\"switch\"] ) ) ) response_mocker.add( MockedResponse(", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hacs/integration", + "expected": "\"running\"", + "got": "\"hacs\"", + "got_raw": "\"hacs\" \"setup\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"hacs\" \"h", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.26666666666666666 + }, + { + "repo": "hacs/integration", + "expected": "True", + "got": "True", + "got_raw": "True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hacs/integration", + "expected": "1", + "got": "0", + "got_raw": "0 # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "hacs/integration", + "expected": "f\"{category_test_data['repository'] }/test_update_repository_entity.json\")", + "got": "f\"{category_test_data['repository']}/update_repository_entity.json\")", + "got_raw": "f\"{category_test_data['repository']}/update_repository_entity.json\")", + "exact_match": false, + "code_bleu": 0.49999999999999994, + "edit_similarity": 0.9577464788732394 + }, + { + "repo": "hacs/integration", + "expected": "caplog.text", + "got": "caplog.text.count(\"HACS\")", + "got_raw": "caplog.text.count(\"HACS\") == 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.2984745896009823, + "edit_similarity": 0.6111111111111112 + }, + { + "repo": "hacs/integration", + "expected": "None", + "got": "None", + "got_raw": "None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hacs/integration", + "expected": "\"default\"", + "got": "\"OK\"", + "got_raw": "\"OK\" #pylint: disable=line-too-long #pylint: disable=protected-access #pylint: disable=protected-access #pylint: disable=protected-access #pylint: disable=protected-access #pylint: disable=protected-access #pylint: disable=protected-access #pylint: disable=protected-access #pylint: disable=protected-access #pylint: disable=protected-access #pylint: disable=protected-access #pylint: disable=protected-access #pylint: disable=protected-access #pylint: disable=protected-access #pylint: disable=protected-access #pylint: disable", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3076923076923077 + }, + { + "repo": "hacs/integration", + "expected": "True", + "got": "True", + "got_raw": "True\n\n assert hacs.repositories.get_by_full_name(repository_full_name) is not None\n\n assert hacs.repositories.get_by_full_name(repository_full_name).name == \"hacs-test-org\" + \"/\" + \"integration-basic-custom\" + \"/\" + \"hacs\" + \"/\" + \"hacs\" + \"/\" + \"hacs\" + \"/\" + \"hacs\" + \"/\" + \"hacs\" + \"/\" + \"hacs\" + \"/\" + \"hacs\" + \"/\" + \"hacs\" + \"/\" + \"hacs\" + \"/\" + \"hacs\" + \"/\" + \"hacs\" + \"/\" +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hacs/integration", + "expected": "None", + "got": "None", + "got_raw": "None\n\n assert isinstance(manifest.url, (str, type(None)))\n\n assert manifest.url is None\n\n assert isinstance(manifest.url_zip, (str, type(None)))\n\n assert manifest.url_zip is None\n\n assert isinstance(manifest.url_zip_release, (str, type(None)))\n\n assert manifest.url_zip_release is None\n\n assert isinstance(manifest.url_zip_release_test, (str, type(None)))\n\n assert manifest.url_zip_release_test is None\n\n assert isinstance(manifest.url_zip_release_test_release, (str, type(None)))\n\n assert manifest.url_zip_release_test_release is None\n\n assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hacs/integration", + "expected": "HomeAssistantError, match=re.escape(\"This version requires HACS 9999.99.99 or newer.\"))", + "got": "HomeAssistantError) as error: await hass.services.async_call( \"hacs\", \"update\", {\"entity_id\": entity_id}, blocking=True, ) assert str(error.value) == \"HACS is too old to update this integration\" snapshots.assert_snapshot(str(error.value))", + "got_raw": "HomeAssistantError) as error: await hass.services.async_call( \"hacs\", \"update\", {\"entity_id\": entity_id}, blocking=True, ) assert str(error.value) == \"HACS is too old to update this integration\" snapshots.assert_snapshot(str(error.value))", + "exact_match": false, + "code_bleu": 0.04211693358490182, + "edit_similarity": 0.26461538461538464 + }, + { + "repo": "hacs/integration", + "expected": "\"user/repo\"", + "got": "\"repo\"", + "got_raw": "\"repo\" assert regex.extract_repository_from_url(\"https://github.com/user/repo.git\") == \"repo\" assert regex.extract_repository_from_url(\"https://github.com/user/repo.git#branch\") == \"repo\" assert regex.extract_repository_from_url(\"https://github.com/user/repo.git#branch#tag\") == \"repo\" assert regex.extract_repository_from_url(\"https://github.com/user/repo.git#branch#tag#commit\") == \"repo\" assert regex.extract_repository_from_url(\"https://github.com/user/repo.git#branch#tag#commit#file\") == \"repo\" assert regex.extract_repository_from", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.7058823529411765 + }, + { + "repo": "hacs/integration", + "expected": "prev_url", + "got": "prev_url", + "got_raw": "prev_url + \"?test=1\" + \"&test=2\" + \"&test=3\" + \"&test=4\" + \"&test=5\" + \"&test=6\" + \"&test=7\" + \"&test=8\" + \"&test=9\" + \"&test=10\" + \"&test=11\" + \"&test=12\" + \"&test=13\" + \"&test=14\" + \"&test=15\" + \"&test=16\" + \"&test=17\" + \"&test=18\" + \"&test=19\" + \"&", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hacs/integration", + "expected": "f\"{category_test_data['repository']}/test_update_entity_state.json\")", + "got": "f\"test_update_entity_state/{category_test_data['category']}/{state.name}.json\")", + "got_raw": "f\"test_update_entity_state/{category_test_data['category']}/{state.name}.json\")", + "exact_match": false, + "code_bleu": 0.49999999999999994, + "edit_similarity": 0.4489795918367347 + }, + { + "repo": "hacs/integration", + "expected": "HomeAssistantError, match=re.escape( \"No update available for update.basic_integration_update\", ))", + "got": "HomeAssistantError, match=re.escape( \"The integration hacs-test-org/integration-basic is already up to date\" )) as error: await hass.services.async_call( \"hacs:update\", data={\"entity_id\": entity_id}, blocking=True, ) assert str(error) == str(error.value) SnapshotFixture.assert_snapshot( error.value) SnapshotFixture.assert_snapshot( error) SnapshotFixture.assert_snapshot( error.__str__()) SnapshotFixture.assert_snapshot( error.__repr__()) SnapshotFixture.assert_snapshot( error.__class__.__name__) SnapshotFixture.assert_snapshot( error.__doc__) SnapshotFixture.assert_snapshot( error.__module__) SnapshotFixture.assert_snapshot", + "got_raw": "HomeAssistantError, match=re.escape( \"The integration hacs-test-org/integration-basic is already up to date\" )) as error: await hass.services.async_call( \"hacs:update\", data={\"entity_id\": entity_id}, blocking=True, ) assert str(error) == str(error.value) SnapshotFixture.assert_snapshot( error.value) SnapshotFixture.assert_snapshot( error) SnapshotFixture.assert_snapshot( error.__str__()) SnapshotFixture.assert_snapshot( error.__repr__()) SnapshotFixture.assert_snapshot( error.__class__.__name__) SnapshotFixture.assert_snapshot( error.__doc__) SnapshotFixture.assert_snapshot( error.__module__) SnapshotFixture.assert_snapshot", + "exact_match": false, + "code_bleu": 0.07557090124849483, + "edit_similarity": 0.1728395061728395 + }, + { + "repo": "hacs/integration", + "expected": "FlowResultType.FORM", + "got": "FlowResultType.FORM.value", + "got_raw": "FlowResultType.FORM.value\n\n assert result[\"errors\"] is None\n\n assert result[\"data\"] == {}\n\n assert result[\"context\"] == {}\n\n assert result[\"flow_id\"] is not None\n\n assert result[\"handler\"] == DOMAIN\n\n assert result[\"title\"] == \"GitHub\"\n\n assert result[\"description\"] == \"GitHub\"\n\n assert result[\"description_placeholders\"] == {}\n\n assert result[\"description_input\"] == {}\n\n assert result[\"description_input_placeholders\"] == {}\n\n assert result[\"description_input_options\"] == {}\n\n", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.8636363636363636 + }, + { + "repo": "hbldh/bleak", + "expected": "b\"1234\"", + "got": "b\"1234\"", + "got_raw": "b\"1234\" # type: ignore # (missing type hints in bumble) assert notified_data.empty() # type: ignore # (missing type hints in bumble) await char_test_peripheral.bleak_client.stop_notify(NOTIFY_CHAR_UUID) # type: ignore # (missing type hints in bumble) assert notified_data.empty() # type: ignore # (missing type hints in bumble) await char_test_peripheral.bumble_peripheral.stop_notify( # type: ignore # (missing type hints in bumble) NOTIFY_CHAR_UUID ) # type", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hbldh/bleak", + "expected": "NOTIFY_CHAR_UUID", + "got": "notify_characteristic.uuid.lower()", + "got_raw": "notify_characteristic.uuid.lower() async def indicate_callback(characteristic: BleakGATTCharacteristic, data: bytearray): assert characteristic.uuid.lower() == indicate_characteristic.uuid.lower() async def write_callback(characteristic: BleakGATTCharacteristic, data: bytearray): assert characteristic.uuid.lower() == write_characteristic.uuid.lower() async def write_without_response_callback(characteristic: BleakGATTCharacteristic, data: bytearray): assert characteristic.uuid.lower() == write_without_response_characteristic.uuid.lower() async def read_callback(characteristic: BleakGATTCharacteristic, data: bytearray): assert characteristic.uuid.lower() == read_characteristic.uuid.lower() async def", + "exact_match": false, + "code_bleu": 0.1561969968460128, + "edit_similarity": 0.04 + }, + { + "repo": "hbldh/bleak", + "expected": "True", + "got": "True", + "got_raw": "True if version else False", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hbldh/bleak", + "expected": "b\"ind1\"", + "got": "b\"ind1\"", + "got_raw": "b\"ind1\" # noqa: E501 # type: ignore # (missing type hints in bumble) # noqa: E501 # type: ignore # (missing type hints in bumble) # noqa: E501 # type: ignore # (missing type hints in bumble) # noqa: E501 # type: ignore # (missing type hints in bumble) # noqa: E501 # type: ignore # (missing type hints in bumble) # noqa: E501", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hbldh/bleak", + "expected": "\"00000001-0000-1000-8000-00805f9b34fb\"", + "got": "\"00000001-0000-1000-8000-00805f9b34fb\"", + "got_raw": "\"00000001-0000-1000-8000-00805f9b34fb\" assert normalize_uuid_16(0) == \"00000000-0000-1000-8000-00805f9b34fb\" assert normalize_uuid_16(0x1000) == \"00001000-0000-1000-8000-0080", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hbldh/bleak", + "expected": "INDICATE_CHAR_UUID", + "got": "INDICATE_CHAR_UUID.lower()", + "got_raw": "INDICATE_CHAR_UUID.lower() async def notify_callback(characteristic: BleakGATTCharacteristic, data: bytearray): assert characteristic.uuid.lower() == NOTIFY_CHAR_UUID.lower() async def write_callback(characteristic: BleakGATTCharacteristic, data: bytearray): assert characteristic.uuid.lower() == WRITE_WITH_RESPONSE_CHAR_UUID.lower() async def write_without_response_callback(characteristic: BleakGATTCharacteristic, data: bytearray): assert characteristic.uuid.lower() == WRITE_WITHOUT_RESPONSE_CHAR_UUID.lower() async def read_callback(characteristic: BleakGATTCharacteristic, data: bytearray): assert characteristic.uuid.lower() == READ_CHAR_UUID.lower() async def", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.8181818181818182 + }, + { + "repo": "hbldh/bleak", + "expected": "\"BleakScannerWinRT\"", + "got": "\"BleakScannerWinRT\"", + "got_raw": "\"BleakScannerWinRT\" assert client_backend_id == BleakBackend.WIN_RT assert scanner_backend_id == BleakBackend.WIN_RT elif platform.system() == \"Darwin\": assert client_backend_type.__name__ == \"BleakClientIOBluetooth\" assert scanner_backend_type.__name__ == \"BleakScannerIOBluetooth\" assert client_backend_id == BleakBackend.IO_BLUETOOTH assert scanner_backend_id == BleakBackend.IO_BLUETOOTH else: assert False, \"Unknown platform\" pytest.mark.skipif( platform.system() != \"Linux\", reason=\"Only Linux is supported for this test\" )", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hdwallet-io/python-hdwallet", + "expected": "dump[\"hd\"]", + "got": "dump[\"hd\"]", + "got_raw": "dump[\"hd\"] assert hdwallet.address_type() == dump[\"address_type\"] assert hdwallet.derivation() == dump[\"derivation\"] assert hdwallet.derivations() == dump[\"derivations\"] assert hdwallet.address() == dump[\"address\"] assert hdwallet.public_key() == dump[\"public_key\"] assert hdwallet.private_key() == dump[\"private_key\"] assert hdwallet.public_key_hash() == dump[\"public_key_hash\"] assert hdwallet.private_key_hash() == dump[\"private_key_hash\"] assert hdwallet.address_hash() == dump[\"address_hash\"] assert hdwallet.address_type() == dump[\"address_type\"] assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hdwallet-io/python-hdwallet", + "expected": "\"\"", + "got": "dumps[\"derivations\"][-1][rule[\"method\"]]", + "got_raw": "dumps[\"derivations\"][-1][rule[\"method\"]] \\ .strip() + \"\\n\" + dumps[\"symbol\"] + \"\\n\" + dumps[\"address\"] + \"\\n\" + dumps[\"address\"] + \"\\n\" + dumps[\"address\"] + \"\\n\" + dumps[\"address\"] + \"\\n\" + dumps[\"address\"] + \"\\n\" + dumps[\"address\"] + \"\\n\" + dumps[\"address\"] + \"\\n\" + dumps[\"address\"] + \"\\n\" + dumps[\"address\"] + \"\\n\" + dumps[\"address\"] + \"\\n\" + dumps[\"address\"] + \"\\n", + "exact_match": false, + "code_bleu": 0.07432998184513635, + "edit_similarity": 0.09523809523809523 + }, + { + "repo": "hdwallet-io/python-hdwallet", + "expected": "dump[\"hd\"]", + "got": "dump[\"hd\"]", + "got_raw": "dump[\"hd\"] assert hdwallet.public_key_type() == dump[\"public_key_type\"] assert hdwallet.derivation() == dump[\"derivation\"] assert hdwallet.derivations() == dump[\"derivations\"] assert hdwallet.address() == dump[\"address\"] assert hdwallet.addresses() == dump[\"addresses\"] assert hdwallet.private_key() == dump[\"private_key\"] assert hdwallet.private_keys() == dump[\"private_keys\"] assert hdwallet.public_key() == dump[\"public_key\"] assert hdwallet.public_keys() == dump[\"public_keys\"] assert hdwallet.private_key_hex() == dump[\"private_key_hex\"] assert hd", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hdwallet-io/python-hdwallet", + "expected": "dump[\"hd\"]", + "got": "dump[\"hd\"]", + "got_raw": "dump[\"hd\"] assert hdwallet.address_type() == dump[\"address_type\"] assert hdwallet.derivation() == dump[\"derivation\"] assert hdwallet.derivations() == dump[\"derivations\"] assert hdwallet.address() == dump[\"address\"] assert hdwallet.public_key() == dump[\"public_key\"] assert hdwallet.private_key() == dump[\"private_key\"] assert hdwallet.public_key_hash() == dump[\"public_key_hash\"] assert hdwallet.private_key_hash() == dump[\"private_key_hash\"] assert hdwallet.address_hash() == dump[\"address_hash\"] assert hdwallet.address_version() == dump[\"address_version\"] assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hdwallet-io/python-hdwallet", + "expected": "dump[\"hd\"]", + "got": "dump[\"hd\"]", + "got_raw": "dump[\"hd\"] assert hdwallet.address_type() == dump[\"address_type\"] assert hdwallet.derivation() == dump[\"derivation\"] assert hdwallet.root_xprivate_key() == dump[\"root_xprivate_key\"] assert hdwallet.root_xpublic_key() == dump[\"root_xpublic_key\"] assert hdwallet.root_public_key() == dump[\"root_public_key\"] assert hdwallet.root_private_key() == dump[\"root_private_key\"] assert hdwallet.root_secret_key() == dump[\"root_secret_key\"] assert hdwallet.root_key() == dump[\"root_key\"] assert hdwallet.root_key_hash() == dump[\"root_key_hash\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hdwallet-io/python-hdwallet", + "expected": "dump[\"seed\"]", + "got": "dump[\"seed\"]", + "got_raw": "dump[\"seed\"] assert hdwallet.root_xprivate_key() == dump[\"root_xprivate_key\"] assert hdwallet.root_xpublic_key() == dump[\"root_xpublic_key\"] assert hdwallet.root_private_key() == dump[\"root_private_key\"] assert hdwallet.root_wif() == dump[\"root_wif\"] assert hdwallet.root_chain_code() == dump[\"root_chain_code\"] assert hdwallet.root_public_key() == dump[\"root_public_key\"] assert hdwallet.wif_type() == dump[\"wif_type\"] assert hdwallet.strict() == dump[\"strict\"] assert hdwallet.derivation() == dump[\"derivation\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hdwallet-io/python-hdwallet", + "expected": "dump[\"ecc\"]", + "got": "dump[\"ecc\"]", + "got_raw": "dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hdwallet-io/python-hdwallet", + "expected": "dump[\"ecc\"]", + "got": "dump[\"ecc\"]", + "got_raw": "dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hdwallet-io/python-hdwallet", + "expected": "point_radd.y()", + "got": "point_radd.y()", + "got_raw": "point_radd.y() == point_mul.y() == point_rmul.y() == number * point.y() == point.x() * number == point.y() * number == point.x() * point.y() * number == point.x() * point.y() * number == point.x() * point.y() * number == point.x() * point.y() * number == point.x() * point.y() * number == point.x() * point.y() * number == point.x() * point.y() * number == point.x() * point.y() * number == point.x() * point.y() * number == point.x()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hdwallet-io/python-hdwallet", + "expected": "dump[\"ecc\"]", + "got": "dump[\"ecc\"]", + "got_raw": "dump[\"ecc\"] assert hdwallet.public_key_type() == dump[\"public_key_type\"] assert hdwallet.derivation() == dump[\"derivation\"] assert hdwallet.derivations() == dump[\"derivations\"] assert hdwallet.address() == dump[\"address\"] assert hdwallet.addresses() == dump[\"addresses\"] assert hdwallet.private_key() == dump[\"private_key\"] assert hdwallet.private_keys() == dump[\"private_keys\"] assert hdwallet.public_key() == dump[\"public_key\"] assert hdwallet.public_keys() == dump[\"public_keys\"] assert hdwallet.private_key_hex() == dump[\"private_key_hex\"] assert hd", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hdwallet-io/python-hdwallet", + "expected": "dump[\"hd\"]", + "got": "dump[\"hd\"]", + "got_raw": "dump[\"hd\"] assert hdwallet.public_key_type() == dump[\"public_key_type\"] assert hdwallet.derivation() == dump[\"derivation\"] assert hdwallet.derivations() == dump[\"derivations\"] assert hdwallet.address() == dump[\"address\"] assert hdwallet.addresses() == dump[\"addresses\"] assert hdwallet.private_key() == dump[\"private_key\"] assert hdwallet.private_keys() == dump[\"private_keys\"] assert hdwallet.public_key() == dump[\"public_key\"] assert hdwallet.public_keys() == dump[\"public_keys\"] assert hdwallet.private_key_hex() == dump[\"private_key_hex\"] assert hd", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hdwallet-io/python-hdwallet", + "expected": "__[\"name\"]", + "got": "__[\"name\"]", + "got_raw": "__[\"name\"] if __[\"name\"] else mnemonic.language() + \" \" + mnemonic.entropy() + \" \" + mnemonic.words() + \" \" + mnemonic.version() + \" \" + mnemonic.language() + \" \" + mnemonic.entropy() + \" \" + mnemonic.words() + \" \" + mnemonic.version() + \" \" + mnemonic.language() + \" \" + mnemonic.entropy() + \" \" + mnemonic.words() + \" \" + mnemonic.version() + \" \" + mnemonic.language() + \" \" + mnemonic.entropy() + \" \" + mnemonic.words() + \" \" + mnemonic.version() + \" \" + mnemonic.language()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hdwallet-io/python-hdwallet", + "expected": "dump[\"seed\"]", + "got": "dump[\"seed\"]", + "got_raw": "dump[\"seed\"] assert hdwallet.root_xprivate_key() == dump[\"root_xprivate_key\"] assert hdwallet.root_xpublic_key() == dump[\"root_xpublic_key\"] assert hdwallet.root_private_key() == dump[\"root_private_key\"] assert hdwallet.root_wif() == dump[\"root_wif\"] assert hdwallet.root_chain_code() == dump[\"root_chain_code\"] assert hdwallet.root_public_key() == dump[\"root_public_key\"] assert hdwallet.wif_type() == dump[\"wif_type\"] assert hdwallet.strict() == dump[\"strict\"] assert hdwallet.derivation() == dump[\"derivation\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hdwallet-io/python-hdwallet", + "expected": "dump[\"hd\"]", + "got": "dump[\"hd\"]", + "got_raw": "dump[\"hd\"] assert hdwallet.address_type() == dump[\"address_type\"] assert hdwallet.derivation() == dump[\"derivation\"] assert hdwallet.derivations() == dump[\"derivations\"] assert hdwallet.is_public() == dump[\"is_public\"] assert hdwallet.is_private() == dump[\"is_private\"] assert hdwallet.is_frozen() == dump[\"is_frozen\"] assert hdwallet.is_valid() == dump[\"is_valid\"] assert hdwallet.is_empty() == dump[\"is_empty\"] assert hdwallet.is_root() == dump[\"is_root\"] assert hdwallet.is_leaf() == dump[\"is_leaf\"] assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hdwallet-io/python-hdwallet", + "expected": "dump[\"ecc\"]", + "got": "dump[\"ecc\"]", + "got_raw": "dump[\"ecc\"] assert hdwallet.root_xprivate_key() == dump[\"root_xprivate_key\"] assert hdwallet.root_private_key() == dump[\"root_private_key\"] assert hdwallet.root_wif() == dump[\"root_wif\"] assert hdwallet.wif_type() == dump[\"wif_type\"] assert hdwallet.xpublic_key() == dump[\"xpublic_key\"] assert hdwallet.xprivate_key() == dump[\"xprivate_key\"] assert hdwallet.private_key() == dump[\"private_key\"] assert hdwallet.wif() == dump[\"wif\"] assert hdwallet.derivation() == dump[\"derivation\"] assert hd", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hdwallet-io/python-hdwallet", + "expected": "dump[\"hd\"]", + "got": "dump[\"hd\"]", + "got_raw": "dump[\"hd\"] assert hdwallet.root_xprivate_key() == dump[\"root_xprivate_key\"] assert hdwallet.root_xpublic_key() == dump[\"root_xpublic_key\"] assert hdwallet.root_private_key() == dump[\"root_private_key\"] assert hdwallet.root_wif() == dump[\"root_wif\"] assert hdwallet.root_chain_code() == dump[\"root_chain_code\"] assert hdwallet.root_public_key() == dump[\"root_public_key\"] assert hdwallet.strict() == dump[\"strict\"] assert hdwallet.derivation() == dump[\"derivation\"] assert hdwallet.derivation_path() == dump[\"derivation_path\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hdwallet-io/python-hdwallet", + "expected": "dump[\"hd\"]", + "got": "dump[\"hd\"]", + "got_raw": "dump[\"hd\"] assert hdwallet.mode() == dump[\"mode\"] assert hdwallet.public_key_type() == dump[\"public_key_type\"] assert hdwallet.derivation() == dump[\"derivation\"] assert hdwallet.derivations() == dump[\"derivations\"] assert hdwallet.address() == dump[\"address\"] assert hdwallet.addresses() == dump[\"addresses\"] assert hdwallet.private_key() == dump[\"private_key\"] assert hdwallet.private_keys() == dump[\"private_keys\"] assert hdwallet.public_key() == dump[\"public_key\"] assert hdwallet.public_keys() == dump[\"public_keys\"] assert hdwallet.private_key_hex", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hdwallet-io/python-hdwallet", + "expected": "dump[\"hd\"]", + "got": "dump[\"hd\"]", + "got_raw": "dump[\"hd\"] assert hdwallet.root_xprivate_key() == dump[\"root_xprivate_key\"] assert hdwallet.root_xpublic_key() == dump[\"root_xpublic_key\"] assert hdwallet.root_private_key() == dump[\"root_private_key\"] assert hdwallet.root_wif() == dump[\"root_wif\"] assert hdwallet.root_chain_code() == dump[\"root_chain_code\"] assert hdwallet.root_public_key() == dump[\"root_public_key\"] assert hdwallet.strict() == dump[\"strict\"] assert hdwallet.derivation() == dump[\"derivation\"] assert hdwallet.derivation_path() == dump[\"derivation_path\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hdwallet-io/python-hdwallet", + "expected": "dump[\"ecc\"]", + "got": "dump[\"ecc\"]", + "got_raw": "dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc\"] == dump[\"ecc", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hdwallet-io/python-hdwallet", + "expected": "dump", + "got": "dump", + "got_raw": "dump", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hkust-nlp/simpleRL-reason", + "expected": "Min(-7))", + "got": "Min(-7))", + "got_raw": "Min(-7)) assert_equal(\"\\\\min(-7, -7)\", Min(-7, -7)) assert_equal(\"\\\\min(-7, -7, -7)\", Min(-7, -7, -7)) assert_equal(\"\\\\min(-7, -7, -7, -7)\", Min(-7, -7, -7, -7)) assert_equal(\"\\\\min(-7, -7, -7, -7, -7)\", Min(-7, -7, -7, -7, -7)) assert_equal(\"\\\\min(-7, -7, -7, -7, -7, -", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hkust-nlp/simpleRL-reason", + "expected": "gcd(18, 3))", + "got": "gcd(18, 3)) assert_equal(\"\\\\gcd(18, 3, 2)\", gcd(18, 3, 2)) assert_equal(\"\\\\gcd(18, 3, 2, 4)\", gcd(18, 3, 2, 4)) assert_equal(\"\\\\gcd(18, 3, 2, 4, 5)\", gcd(18, 3, 2, 4, 5)) assert_equal(\"\\\\gcd(18, 3, 2, 4, 5, 6)\", gcd(18", + "got_raw": "gcd(18, 3)) assert_equal(\"\\\\gcd(18, 3, 2)\", gcd(18, 3, 2)) assert_equal(\"\\\\gcd(18, 3, 2, 4)\", gcd(18, 3, 2, 4)) assert_equal(\"\\\\gcd(18, 3, 2, 4, 5)\", gcd(18, 3, 2, 4, 5)) assert_equal(\"\\\\gcd(18, 3, 2, 4, 5, 6)\", gcd(18", + "exact_match": false, + "code_bleu": 0.109458827715783, + "edit_similarity": 0.09606986899563319 + }, + { + "repo": "hkust-nlp/simpleRL-reason", + "expected": "Max(-7))", + "got": "Max(-7))", + "got_raw": "Max(-7)) assert_equal(\"\\\\max(-7, -9)\", Max(-7, -9)) assert_equal(\"\\\\max(-9, -7)\", Max(-9, -7)) assert_equal(\"\\\\max(-9, -7, -10)\", Max(-9, -7, -10)) assert_equal(\"\\\\max(-9, -7, -10, -11)\", Max(-9, -7, -10, -11)) assert_equal(\"\\\\max(-9, -7, -10, -11, -12)\", Max(-9, -7, -10", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hkust-nlp/simpleRL-reason", + "expected": "Max(-2, -2))", + "got": "Max(-2, -2)) assert_equal(\"\\\\max(-2, -2, -2)\", Max(-2, -2, -2)) assert_equal(\"\\\\max(-2, -2, -2, -2)\", Max(-2, -2, -2, -2)) assert_equal(\"\\\\max(-2, -2, -2, -2, -2)\", Max(-2, -2, -2, -2, -2)) assert_equal(\"\\\\max(-2, -2, -2, -2, -2, -2)\", Max(-2, -2, -2, -2", + "got_raw": "Max(-2, -2)) assert_equal(\"\\\\max(-2, -2, -2)\", Max(-2, -2, -2)) assert_equal(\"\\\\max(-2, -2, -2, -2)\", Max(-2, -2, -2, -2)) assert_equal(\"\\\\max(-2, -2, -2, -2, -2)\", Max(-2, -2, -2, -2, -2)) assert_equal(\"\\\\max(-2, -2, -2, -2, -2, -2)\", Max(-2, -2, -2, -2", + "exact_match": false, + "code_bleu": 0.10213946334608756, + "edit_similarity": 0.09022556390977443 + }, + { + "repo": "hkust-nlp/simpleRL-reason", + "expected": "Max(4, -9))", + "got": "Max(4, -9)) assert_equal(\"\\\\max(-9, -4)\", Max(-9, -4)) assert_equal(\"\\\\max(-4, -9)\", Max(-4, -9)) assert_equal(\"\\\\max(-9, -9)\", Max(-9, -9)) assert_equal(\"\\\\max(-9, -9, -9)\", Max(-9, -9, -9)) assert_equal(\"\\\\max(-9, -9, -9, -9)\", Max(-9, -9, -9, -9)) assert_equal(\"\\\\max(-9, -9, -9, -9, -9", + "got_raw": "Max(4, -9)) assert_equal(\"\\\\max(-9, -4)\", Max(-9, -4)) assert_equal(\"\\\\max(-4, -9)\", Max(-4, -9)) assert_equal(\"\\\\max(-9, -9)\", Max(-9, -9)) assert_equal(\"\\\\max(-9, -9, -9)\", Max(-9, -9, -9)) assert_equal(\"\\\\max(-9, -9, -9, -9)\", Max(-9, -9, -9, -9)) assert_equal(\"\\\\max(-9, -9, -9, -9, -9", + "exact_match": false, + "code_bleu": 0.07235147999627291, + "edit_similarity": 0.07333333333333333 + }, + { + "repo": "hkust-nlp/simpleRL-reason", + "expected": "4", + "got": "3", + "got_raw": "3 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 -", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "hkust-nlp/simpleRL-reason", + "expected": "Mod(9, -213))", + "got": "Mod(9, -213)) assert_equal(\"12\\\\mod -12\", Mod(12, -12)) assert_equal(\"12\\\\mod -12\", Mod(12, -12)) assert_equal(\"12\\\\mod -12\", Mod(12, -12)) assert_equal(\"12\\\\mod -12\", Mod(12, -12)) assert_equal(\"12\\\\mod -12\", Mod(12, -12)) assert_equal(\"12\\\\mod -12\", Mod(12, -12", + "got_raw": "Mod(9, -213)) assert_equal(\"12\\\\mod -12\", Mod(12, -12)) assert_equal(\"12\\\\mod -12\", Mod(12, -12)) assert_equal(\"12\\\\mod -12\", Mod(12, -12)) assert_equal(\"12\\\\mod -12\", Mod(12, -12)) assert_equal(\"12\\\\mod -12\", Mod(12, -12)) assert_equal(\"12\\\\mod -12\", Mod(12, -12", + "exact_match": false, + "code_bleu": 0.09569493325207173, + "edit_similarity": 0.09420289855072464 + }, + { + "repo": "hkust-nlp/simpleRL-reason", + "expected": "Symbol('x_{i,j}' + hashlib.md5('x_{i,j}'.encode()).hexdigest(), real=True))", + "got": "Symbol('x_{i,j}'))", + "got_raw": "Symbol('x_{i,j}'))\n assert_equal(\"\\\\variable{\\\\alpha_{\\\\beta}}\", Symbol('\\\\alpha_{\\\\beta}'))\n assert_equal(\"\\\\variable{\\\\alpha_{\\\\beta}}\", Symbol('\\\\alpha_{\\\\beta}'))\n assert_equal(\"\\\\variable{\\\\alpha_{\\\\beta}}\", Symbol('\\\\alpha_{\\\\beta}'))\n assert_equal(\"\\\\variable{\\\\alpha_{\\\\beta}}\", Symbol('\\\\alpha_{\\\\beta}'))\n assert_equal(\"\\\\variable{\\\\alpha_{\\\\beta}}\", Symbol('\\\\alpha_{\\\\beta}'))\n assert_equal(\"\\\\variable{\\\\alpha_{", + "exact_match": false, + "code_bleu": 0.125890641556532, + "edit_similarity": 0.3870967741935484 + }, + { + "repo": "hkust-nlp/simpleRL-reason", + "expected": "1", + "got": "0", + "got_raw": "0", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "hkust-nlp/simpleRL-reason", + "expected": "Exception)", + "got": "TypeError)", + "got_raw": "TypeError) as excinfo: Symbol('x[1]', real=True) assert str(excinfo.value) == \"Can't find a real variable after a subscript\" def test_hashing(): a = Symbol('a', real=True) b = Symbol('b', real=True) c = Symbol('c', real=True) d = Symbol('d', real=True) e = Symbol('e', real=True) f = Symbol('f', real=True) g = Symbol('g', real=True) h = Symbol('h', real=True) i = Symbol('i', real=True) j = Symbol('j', real=True)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.3 + }, + { + "repo": "hkust-nlp/simpleRL-reason", + "expected": "Max(y, x))", + "got": "Max(y, x)) assert_equal(\"\\\\max(x, y, z)\", Max(x, y, z)) assert_equal(\"\\\\max(x, y, z, x)\", Max(x, y, z, x)) assert_equal(\"\\\\max(x, y, z, x, y)\", Max(x, y, z, x, y)) assert_equal(\"\\\\max(x, y, z, x, y, z)\", Max(x, y, z, x, y, z)) assert_equal(\"\\\\max(x, y, z, x, y, z, x)\", Max(x, y, z, x, y, z,", + "got_raw": "Max(y, x)) assert_equal(\"\\\\max(x, y, z)\", Max(x, y, z)) assert_equal(\"\\\\max(x, y, z, x)\", Max(x, y, z, x)) assert_equal(\"\\\\max(x, y, z, x, y)\", Max(x, y, z, x, y)) assert_equal(\"\\\\max(x, y, z, x, y, z)\", Max(x, y, z, x, y, z)) assert_equal(\"\\\\max(x, y, z, x, y, z, x)\", Max(x, y, z, x, y, z,", + "exact_match": false, + "code_bleu": 0.07234669734890156, + "edit_similarity": 0.0664451827242525 + }, + { + "repo": "hkust-nlp/simpleRL-reason", + "expected": "Min(7.1, 9))", + "got": "Min(7.1, 9)) assert_equal(\"\\\\min(12.3, 12.3)\", Min(12.3, 12.3)) assert_equal(\"\\\\min(12.3, 12.3, 12.3)\", Min(12.3, 12.3, 12.3)) assert_equal(\"\\\\min(12.3, 12.3, 12.3, 12.3)\", Min(12.3, 12.3, 12.3, 1", + "got_raw": "Min(7.1, 9)) assert_equal(\"\\\\min(12.3, 12.3)\", Min(12.3, 12.3)) assert_equal(\"\\\\min(12.3, 12.3, 12.3)\", Min(12.3, 12.3, 12.3)) assert_equal(\"\\\\min(12.3, 12.3, 12.3, 12.3)\", Min(12.3, 12.3, 12.3, 1", + "exact_match": false, + "code_bleu": 0.14722500792577722, + "edit_similarity": 0.11538461538461539 + }, + { + "repo": "hkust-nlp/simpleRL-reason", + "expected": "None", + "got": "None", + "got_raw": "None p.stdout.read() == b\"foo started\\n\" + b\"foo done\\n\" + b\"foo done\\n\" + b\"foo done\\n\" + b\"foo done\\n\" + b\"foo done\\n\" + b\"foo done\\n\" + b\"foo done\\n\" + b\"foo done\\n\" + b\"foo done\\n\" + b\"foo done\\n\" + b\"foo done\\n\" + b\"foo done\\n\" + b\"foo done\\n\" + b\"foo done\\n\" + b\"foo done\\n\" + b\"foo done\\n\" + b\"foo", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hkust-nlp/simpleRL-reason", + "expected": "Min(1, 5))", + "got": "Min(1, 5)) assert_equal(\"\\\\min(1, 5, 3)\", Min(1, 5, 3)) assert_equal(\"\\\\min(1, 5, 3, 2)\", Min(1, 5, 3, 2)) assert_equal(\"\\\\min(1, 5, 3, 2, 4)\", Min(1, 5, 3, 2, 4)) assert_equal(\"\\\\min(1, 5, 3, 2, 4, 6)\", Min(1, 5, 3, 2", + "got_raw": "Min(1, 5)) assert_equal(\"\\\\min(1, 5, 3)\", Min(1, 5, 3)) assert_equal(\"\\\\min(1, 5, 3, 2)\", Min(1, 5, 3, 2)) assert_equal(\"\\\\min(1, 5, 3, 2, 4)\", Min(1, 5, 3, 2, 4)) assert_equal(\"\\\\min(1, 5, 3, 2, 4, 6)\", Min(1, 5, 3, 2", + "exact_match": false, + "code_bleu": 0.09927339321196814, + "edit_similarity": 0.08771929824561403 + }, + { + "repo": "hkust-nlp/simpleRL-reason", + "expected": "Mod(-128, 4))", + "got": "Mod(-128, 4)) assert_equal(\"-128\\\\mod 8\", Mod(-128, 8)) assert_equal(\"-128\\\\mod 16\", Mod(-128, 16)) assert_equal(\"-128\\\\mod 32\", Mod(-128, 32)) assert_equal(\"-128\\\\mod 64\", Mod(-128, 64)) assert_equal(\"-128\\\\mod 128\", Mod(-128, 128)) assert_equal(\"-128\\\\mod", + "got_raw": "Mod(-128, 4)) assert_equal(\"-128\\\\mod 8\", Mod(-128, 8)) assert_equal(\"-128\\\\mod 16\", Mod(-128, 16)) assert_equal(\"-128\\\\mod 32\", Mod(-128, 32)) assert_equal(\"-128\\\\mod 64\", Mod(-128, 64)) assert_equal(\"-128\\\\mod 128\", Mod(-128, 128)) assert_equal(\"-128\\\\mod ", + "exact_match": false, + "code_bleu": 0.09823044728150924, + "edit_similarity": 0.0962962962962963 + }, + { + "repo": "hkust-nlp/simpleRL-reason", + "expected": "Max(1))", + "got": "Max(1))", + "got_raw": "Max(1)) assert_equal(\"\\\\max(1, 1)\", Max(1, 1)) assert_equal(\"\\\\max(1, 1, 1)\", Max(1, 1, 1)) assert_equal(\"\\\\max(1, 1, 1, 1)\", Max(1, 1, 1, 1)) assert_equal(\"\\\\max(1, 1, 1, 1, 1)\", Max(1, 1, 1, 1, 1)) assert_equal(\"\\\\max(1, 1, 1, 1, 1, ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hkust-nlp/simpleRL-reason", + "expected": "Min(12, 4))", + "got": "Min(12, 4)) assert_equal(\"\\\\min(12, 4, 10)\", Min(12, 4, 10)) assert_equal(\"\\\\min(12, 4, 10, 100)\", Min(12, 4, 10, 100)) assert_equal(\"\\\\min(12, 4, 10, 100, 1000)\", Min(12, 4, 10, 100, 1000)) assert_equal(\"\\\\min(12", + "got_raw": "Min(12, 4)) assert_equal(\"\\\\min(12, 4, 10)\", Min(12, 4, 10)) assert_equal(\"\\\\min(12, 4, 10, 100)\", Min(12, 4, 10, 100)) assert_equal(\"\\\\min(12, 4, 10, 100, 1000)\", Min(12, 4, 10, 100, 1000)) assert_equal(\"\\\\min(12", + "exact_match": false, + "code_bleu": 0.10761852807069544, + "edit_similarity": 0.09821428571428571 + }, + { + "repo": "hkust-nlp/simpleRL-reason", + "expected": "gcd(32, 32))", + "got": "gcd(32)) assert_equal(\"\\\\gcd(32, 12)\", gcd(32, 12)) assert_equal(\"\\\\gcd(32, 12, 10)\", gcd(32, 12, 10)) assert_equal(\"\\\\gcd(32, 12, 10, 16)\", gcd(32, 12, 10, 16)) assert_equal(\"\\\\gcd(32, 12, 10, 16, 18)\", gcd(32, 12, 10", + "got_raw": "gcd(32)) assert_equal(\"\\\\gcd(32, 12)\", gcd(32, 12)) assert_equal(\"\\\\gcd(32, 12, 10)\", gcd(32, 12, 10)) assert_equal(\"\\\\gcd(32, 12, 10, 16)\", gcd(32, 12, 10, 16)) assert_equal(\"\\\\gcd(32, 12, 10, 16, 18)\", gcd(32, 12, 10", + "exact_match": false, + "code_bleu": 0.0812414600093205, + "edit_similarity": 0.10434782608695652 + }, + { + "repo": "hkust-nlp/simpleRL-reason", + "expected": "1 + Mod(1, 2))", + "got": "Mod(1 + 1, 2)) assert_equal(\"1\\\\mod 2\", Mod(1, 2)) assert_equal(\"1\\\\mod 2\\\\mod 3\", Mod(1, 2) % 3) assert_equal(\"1\\\\mod 2\\\\mod 3\\\\mod 4\", Mod(1, 2) % 3 % 4) assert_equal(\"1\\\\mod 2\\\\mod 3\\\\mod 4\\\\mod 5\", Mod(1, 2) % 3 % 4 % 5) assert_equal(\"1\\\\mod 2\\\\", + "got_raw": "Mod(1 + 1, 2)) assert_equal(\"1\\\\mod 2\", Mod(1, 2)) assert_equal(\"1\\\\mod 2\\\\mod 3\", Mod(1, 2) % 3) assert_equal(\"1\\\\mod 2\\\\mod 3\\\\mod 4\", Mod(1, 2) % 3 % 4) assert_equal(\"1\\\\mod 2\\\\mod 3\\\\mod 4\\\\mod 5\", Mod(1, 2) % 3 % 4 % 5) assert_equal(\"1\\\\mod 2\\\\", + "exact_match": false, + "code_bleu": 0.09396052864221141, + "edit_similarity": 0.10646387832699619 + }, + { + "repo": "hkust-nlp/simpleRL-reason", + "expected": "0", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "huggingface/lighteval", + "expected": "pipeline_params.remove_reasoning_tags)", + "got": "is_package_available(\"transformers\"))", + "got_raw": "is_package_available(\"transformers\")) # Transformers is required for the test to run.", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.21333333333333335 + }, + { + "repo": "huggingface/lighteval", + "expected": "task_metrics", + "got": "task_metrics[\"task1\"]", + "got_raw": "task_metrics[\"task1\"] | task_metrics[\"task2\"] | {\"datetime\": str(mock_datetime)} | {\"datetime_str\": str(mock_datetime)} | {\"datetime_isoformat\": str(mock_datetime)} | {\"datetime_fromisoformat\": str(mock_datetime)} | {\"datetime_fromisoformat_str\": str(mock_datetime)} | {\"datetime_fromisoformat_isoformat\": str(mock_datetime)} | {\"datetime_fromisoformat_isoformat_str\": str(mock_datetime)} | {\"datetime_fromisoformat_isoformat_isoformat\": str(mock_datetime)} | {\"datetime_fromisoformat_isoformat_isoformat_str\": str(mock_datetime)} | {\"datetime_fromisoformat_iso", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.7272727272727273 + }, + { + "repo": "huggingface/lighteval", + "expected": "\" hello\")", + "got": "\" hello\")", + "got_raw": "\" hello\") # Add space after \"hello\" # Test with multichoice_continuations_start_space = False # Test with empty string # Test with single character # Test with multiple characters # Test with special characters # Test with numbers # Test with punctuation # Test with whitespace # Test with emojis # Test with other symbols # Test with long strings # Test with empty strings # Test with None # Test with other types # Test with custom strings # Test with custom start space # Test with custom end space # Test with custom separator # Test with custom", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "huggingface/lighteval", + "expected": "tokenizer.chat_template)", + "got": "tokenizer.chat_template)", + "got_raw": "tokenizer.chat_template) self.assertEqual(vllm_tokenizer.chat_prompt, tokenizer.chat_prompt) self.assertEqual(vllm_tokenizer.chat_prompt_end, tokenizer.chat_prompt_end) self.assertEqual(vllm_tokenizer.chat_prompt_start, tokenizer.chat_prompt_start) self.assertEqual(vllm_tokenizer.eos_token, tokenizer.eos_token) self.assertEqual(vllm_tokenizer.eos_token_id, tokenizer.eos_token_id) self.assertEqual(vllm_tokenizer.pad_token, tokenizer.pad_token) self.assertEqual(vllm_tokenizer.pad_token_id, tokenizer.pad_token_id) self.assertEqual(vllm_tokenizer.unk_token, tokenizer.unk", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "huggingface/lighteval", + "expected": "expected_config", + "got": "expected_config", + "got_raw": "expected_config", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "huggingface/lighteval", + "expected": "{\"mmlu|3\", \"mmlu:abstract_algebra|5\"}", + "got": "set(registry.get_task_info(\"mmlu\").tasks) | set(registry.get_task_info(\"mmlu:abstract_algebra\").tasks) | set(registry.get_task_info(\"mmlu:abstract_algebra:abstract_algebra\").tasks) | set(registry.get_task_info(\"mmlu:abstract_algebra:abstract_algebra:abstract_algebra\").tasks) | set(registry.get_task_info(\"mmlu:abstract_algebra:abstract_algebra:abstract_algebra:abstract_algebra\").tasks) | set(registry.get_task_info(\"mmlu:abstract_algebra:abstract_algebra", + "got_raw": "set(registry.get_task_info(\"mmlu\").tasks) | set(registry.get_task_info(\"mmlu:abstract_algebra\").tasks) | set(registry.get_task_info(\"mmlu:abstract_algebra:abstract_algebra\").tasks) | set(registry.get_task_info(\"mmlu:abstract_algebra:abstract_algebra:abstract_algebra\").tasks) | set(registry.get_task_info(\"mmlu:abstract_algebra:abstract_algebra:abstract_algebra:abstract_algebra\").tasks) | set(registry.get_task_info(\"mmlu:abstract_algebra:abstract_algebra", + "exact_match": false, + "code_bleu": 0.013987724298778636, + "edit_similarity": 0.12170385395537525 + }, + { + "repo": "huggingface/lighteval", + "expected": "\"Answer:\"", + "got": "\"\"\"\\", + "got_raw": "\"\"\"\\ Question: What is the capital of France? A. London B. Paris C. Berlin D. Madrid Answer:\"\"\".strip() + \"\\n\" + \"Answer:\" + \"\\n\" + \"Answer:\" + \"\\n\" + \"Answer:\" + \"\\n\" + \"Answer:\" + \"\\n\" + \"Answer:\" + \"\\n\" + \"Answer:\" + \"\\n\" + \"Answer:\" + \"\\n\" + \"Answer:\" + \"\\n\" + \"Answer:\" + \"\\n\" + \"Answer:\" + \"\\n\" + \"Answer:\" + \"\\n\" + \"Answer:\" + \"\\n\"", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.3076923076923077 + }, + { + "repo": "huggingface/lighteval", + "expected": "\"\"", + "got": "\"Fitness:\\nHe", + "got_raw": "\"Fitness:\\nHe is strong he is fast he has big muscles\" \" he is weak\" \" he is strong he is fast he has big muscles he is weak\" \" he is strong he is fast he is weak\" \" he is strong he is fast he has big muscles he is weak\" \" he is strong he is fast he has big muscles he is weak\" \" he is strong he is fast he has big muscles he is weak\" \" he is strong he is fast he has big muscles he is weak\" \" he is strong he is fast he has big muscles he is weak\" \" he is strong he is fast", + "exact_match": false, + "code_bleu": 0.2295748846661433, + "edit_similarity": 0.13333333333333333 + }, + { + "repo": "huggingface/lighteval", + "expected": "captured_len_context)", + "got": "captured_len_context)", + "got_raw": "captured_len_context) \"Should have captured gathered_len_context\") self.assertIsNotNone(captured_padded_logits, \"Should have captured gathered_padded_logits\") self.assertIsNotNone(captured_padded_max_equals, \"Should have captured gathered_padded_max_equals\") self.assertIsNotNone(captured_padded_continuations, \"Should have captured gathered_padded_continuations\") self.assertIsNotNone(captured_padded_contexts, \"Should have captured gathered_padded_contexts\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "huggingface/lighteval", + "expected": "\"hi\"", + "got": "\"hi\"", + "got_raw": "\"hi\" assert filtered_docs[0].choices == [\"A\", \"B\"] assert filtered_docs[0].gold_index == 0 assert filtered_docs[0].task_name == \"test_task\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "huggingface/lighteval", + "expected": "[0]", + "got": "[0]", + "got_raw": "[0]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "huggingface/lighteval", + "expected": "details[\"test_reasoning_task|0\"][0][\"model_response\"][\"text_post_processed\"])", + "got": "None)", + "got_raw": "None) for doc in details[0][\"doc\"]]) for doc in details[0][\"doc\"]]) for doc in details[0][\"doc\"]]) for doc in details[0][\"doc\"]]) for doc in details[0][\"doc\"]]) for doc in details[0][\"doc\"]]) for doc in details[0][\"doc\"]]) for doc in details[0][\"doc\"]]) for doc in details[0][\"doc\"]]) for doc in details[0][\"doc\"]]) for doc in details[0][\"doc\"]]) for doc in details[0][\"doc\"]]) for doc in details[0", + "exact_match": false, + "code_bleu": 0.076754995130253, + "edit_similarity": 0.0975609756097561 + }, + { + "repo": "huggingface/lighteval", + "expected": "[\"storycloze:2016|0\"]", + "got": "[\"storycloze:2016|0\"]", + "got_raw": "[\"storycloze:2016|0\"] * 2 + [\"storycloze:2016|1\"] * 2 + [\"storycloze:2016|2\"] * 2 + [\"storycloze:2016|3\"] * 2 + [\"storycloze:2016|4\"] * 2 + [\"storycloze:2016|5\"] * 2 + [\"storycloze:2016|6\"] * 2 + [\"storycloze:2016|7\"] * 2 +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "huggingface/lighteval", + "expected": "[7, 6])", + "got": "[1, 1])", + "got_raw": "[1, 1]) # len of the context, sample per sample, in tokens\n\n # - Test padded tensors\n self.assertEqual(captured_padded_logits.shape, (expected_batch_size, expected_max_choices)) # batch * max_num_choices\n self.assertEqual(captured_padded_max_equals.shape, (expected_batch_size, expected_max_choices)) # batch * max_num_choices\n self.assertEqual(captured_padded_continuations.shape, (expected_batch_size, expected_max_choices, 1)) # batch * max_num_choices * max_len_choices\n self.assertEqual(captured_padded_contexts.shape,", + "exact_match": false, + "code_bleu": 0.3303164318013807, + "edit_similarity": 0.7142857142857143 + }, + { + "repo": "huggingface/lighteval", + "expected": "1", + "got": "1", + "got_raw": "1 # One message in the chat template format\n assert messages[0][\"role\"] == \"user\" # User role in the chat template format\n assert messages[0][\"content\"] == \"What is in this image?\" # Image content in the chat template format\n assert messages[0][\"image\"] == mock_image # Image object in the chat template format\n\n def test_prepare_prompt_multimodal_with_image(self):\n \"\"\"Test prepare_prompt_multimodal with a multimodal document containing an image.\"\"\"\n tokenizer = Mock()\n tokenizer.apply_chat_template.return_value = \"<|user|", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "huggingface/lighteval", + "expected": "1", + "got": "{\"precision\":", + "got_raw": "{\"precision\": 100.0} # 100% match for latex and expr # From expr # The 0.3333 is a float, so it should match with precision 6 # The 0.333 is a sympy float, so it should match with precision 3 assert compare_strings(\"0.3333\", \"0.333\", match_types=[\"latex\", \"expr\"], precision=6) == {\"precision\": 100.0} # 100% match for latex and expr # From indices # The 0.3", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.0 + }, + { + "repo": "huggingface/lighteval", + "expected": "[0]", + "got": "[0]", + "got_raw": "[0]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "huggingface/lighteval", + "expected": "None", + "got": "None", + "got_raw": "None and results is not None and results[\"score\"] is not None and results[\"score\"] == example[\"score\"] and results[\"score\"] == example[\"score\"] and results[\"score\"] == example[\"score\"] and results[\"score\"] == example[\"score\"] and results[\"score\"] == example[\"score\"] and results[\"score\"] == example[\"score\"] and results[\"score\"] == example[\"score\"] and results[\"score\"] == example[\"score\"] and results[\"score\"] == example[\"score\"] and results[\"score\"] == example[\"score\"] and results[\"score\"] == example[\"score\"] and results[\"score", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hungpham2511/toppra", + "expected": "0.1", + "got": "1e-10", + "got_raw": "1e-10 * 200 ** 2 * 1e-10 ** 2 / 2.0 ** 2.0 * 1e-3 ** 2.0 / 2.0 ** 2.0 * 1e-3 ** 2.0 / 2.0 ** 2.0 * 1e-3 ** 2.0 / 2.0 ** 2.0 * 1e-3 ** 2.0 / 2.0 ** 2.0 * 1e-3 ** 2.0", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.25 + }, + { + "repo": "hungpham2511/toppra", + "expected": "None", + "got": "None", + "got_raw": "None\n\n # Retime the trajectory\n traj.retime(0.01)\n assert traj is not None\n\n # Check the retime result\n assert traj.GetNumWaypoints() == 1000 // 10 + 1 == 101 == len(qsel) * 10 + 1 == len(qsel) * 100 + 1 == len(qsel) * 1000 + 1 == len(qsel) * 10000 + 1 == len(qsel) * 100000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hungpham2511/toppra", + "expected": "0", + "got": "path_new.path_interval[0]", + "got_raw": "path_new.path_interval[0] + 1e-10 + 1e-10 * 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.07692307692307693 + }, + { + "repo": "hungpham2511/toppra", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as excinfo: constraint._check_path(path_wrongdim) assert str(excinfo.value) == \"Wrong dimension of path\" + \" (expected 4, got 5)\" + \" (path dof: 2)\" + \" (constraint dof: 4)\" + \" (constraint dof: 10)\" + \" (constraint dof: 2)\" + \" (constraint dof: 10)\" + \" (constraint dof: 2)\" + \" (constraint dof: 10)\" + \" (constraint dof: 2)\" + \" (constraint dof: 10)\" + \" (constraint", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hungpham2511/toppra", + "expected": "1", + "got": "1", + "got_raw": "1 npt.assert_allclose(pi(0), 1) npt.assert_allclose(pi(1), 3) npt.assert_allclose(pi(2), 7) npt.assert_allclose(pi(0.5), 2.5) npt.assert_allclose(pi(0.25), 1.25) npt.assert_allclose(pi(0.75), 4.25) npt.assert_allclose(pi(0.1), 0.9) npt.assert_allclose(pi(0.3), 1.8) npt.assert_allclose(pi(", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hungpham2511/toppra", + "expected": "50)", + "got": "t_desired)", + "got_raw": "t_desired)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.15384615384615385 + }, + { + "repo": "hungpham2511/toppra", + "expected": "(10, 5)", + "got": "(10, 5)", + "got_raw": "(10, 5) # 10 points in [0, 1] with 5 dof each. 5 dof per point. 10 points. 5 dof. 10 * 5 = 50. 50 * 5 = 250. 250 * 5 = 1250. 1250 * 5 = 6250. 6250 * 5 = 31250. 31250 * 5 = 156250. ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hungpham2511/toppra", + "expected": "tac.ReturnCode.OK", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.1, + "edit_similarity": 0.013793103448275862 + }, + { + "repo": "hungpham2511/toppra", + "expected": "[[6, 8], [6, 23], [6, 38]])", + "got": "[[6, 6], [12, 20], [18, 36]]) npt.assert_allclose(pi.evalddd([0, 0.5, 1]), [[24, 24], [40, 40], [56, 56]])", + "got_raw": "[[6, 6], [12, 20], [18, 36]]) npt.assert_allclose(pi.evalddd([0, 0.5, 1]), [[24, 24], [40, 40], [56, 56]])", + "exact_match": false, + "code_bleu": 0.1189718323443803, + "edit_similarity": 0.3308270676691729 + }, + { + "repo": "hungpham2511/toppra", + "expected": "b[i])", + "got": "b[i])", + "got_raw": "b[i]) np.testing.assert_allclose(ci_, c[i]) F_ = cnst_F(q_vec[i]) g_ = cnst_g(q_vec[i]) np.testing.assert_allclose(F_, F[i]) np.testing.assert_allclose(g_, g[i])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hungpham2511/toppra", + "expected": "ValueError)", + "got": "toppra.exceptions.PathApproximationError)", + "got_raw": "toppra.exceptions.PathApproximationError) as excinfo: path.approximate(1e-10) assert str(excinfo.value) == \"Path approximation failed after 100 iterations.\" assert path.get_num_waypoints() == 4 assert path.get_num_segments() == 3 assert path.get_num_interpolants() == 2 assert path.get_num_points() == 6 assert path.get_num_points(0) == 2 assert path.get_num_points(1) == 3 assert path.get_num_points(2) == 4 assert path.get_num_points(3) == 5 assert path.get_num", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.3076923076923077 + }, + { + "repo": "hungpham2511/toppra", + "expected": "constraint.ConstraintType.CanonicalLinear", + "got": "constraint.ConstraintType.JOINT_VELOCITY_CONSTRAINT.value", + "got_raw": "constraint.ConstraintType.JOINT_VELOCITY_CONSTRAINT.value \\ + constraint.ConstraintType.JOINT_ACCELERATION_CONSTRAINT.value \\ + constraint.ConstraintType.JOINT_JERK_CONSTRAINT.value \\ + constraint.ConstraintType.JOINT_SMOOTHNESS_CONSTRAINT.value \\ + constraint.ConstraintType.JOINT_TORSION_CONSTRAINT.value \\ + constraint.ConstraintType.JOINT_TWIST_CONSTRAINT.value \\ + constraint.ConstraintType.JOINT_TWIST_ACCELERATION_CONSTRAINT.value \\ + constraint.ConstraintType.JOINT_TWIST_JERK_CONSTRAINT.value \\ + constraint.ConstraintType.JOINT_TWIST_SMOOTHNESS_CONSTRAINT.value", + "exact_match": false, + "code_bleu": 0.5169731539571706, + "edit_similarity": 0.6122448979591837 + }, + { + "repo": "hungpham2511/toppra", + "expected": "toppra.exceptions.BadInputVelocities)", + "got": "ValueError)", + "got_raw": "ValueError) as e: instance.solve(velocities) assert str(e.value) == \"Invalid velocity\" + str(velocities) + \" for path of length 5.\" + \" Path must have at least 2 points.\" + \" Path must have at least 2 velocities.\" + \" Path must have at least 2 accelerations.\" + \" Path must have at least 2 ro accelerations.\" + \" Path must have at least 2 ro accelerations.\" + \" Path must have at least 2 ro accelerations.\" + \" Path must have at least 2 ro accelerations.\" + \" Path must have", + "exact_match": false, + "code_bleu": 0.17909498863725698, + "edit_similarity": 0.16666666666666666 + }, + { + "repo": "hungpham2511/toppra", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as excinfo: pc.apply(path_wrongdim) assert str(excinfo.value) == \"Wrong dimension: constraint dimension (2) does not match path dimension (10)\"\n\n def test_wrong_dimension_2(self, velocity_pc_data_2):\n data, pc = velocity_pc_data_2\n path_wrongdim = ta.SplineInterpolator(np.linspace(0, 1, 5), np.random.randn(5, 10))\n\n with pytest.raises(\n### Target:\nValueError) as excinfo: pc.apply(path_wrongdim) assert str(excinfo.value) == \"Wrong", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hyprland-community/pyprland", + "expected": "\"270\"", + "got": "\"270\"", + "got_raw": "\"270\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hyprland-community/pyprland", + "expected": "1", + "got": "1.0000000000000002e-05", + "got_raw": "1.0000000000000002e-05 # 1e-5 as a float value # 1e-5 as a float value # 1e-5 as a float value # 1e-5 as a float value # 1e-5 as a float value # 1e-5 as a float value # 1e-5 as a float value # 1e-5 as a float value # 1e-5 as a float value # 1e-5", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.08695652173913043 + }, + { + "repo": "hyprland-community/pyprland", + "expected": "42", + "got": "42", + "got_raw": "42\n\n @pytest.mark.asyncio\n async def test_stdout(self):\n \"\"\"Test stdout property.\"\"\"\n proc = ManagedProcess()\n await proc.start(\"echo hello\")\n await proc.wait()\n\n assert proc.stdout == b\"hello\\n\"\n\n @pytest.mark.asyncio\n async def test_stderr(self):\n \"\"\"Test stderr property.\"\"\"\n proc = ManagedProcess()\n await proc.start(\"echo error >&2\")\n await proc.wait()\n\n assert proc.stderr == b\"error\\n\"\n\n @pytest.mark.asyncio\n async def test_kill(self):\n \"\"\"Test kill method.\"\"\"\n ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hyprland-community/pyprland", + "expected": "\"3\"", + "got": "{\"x\":", + "got_raw": "{\"x\": 0, \"y\": 0, \"width\": 800, \"height\": 600} # Centered on fetch", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.5 + }, + { + "repo": "hyprland-community/pyprland", + "expected": "\"\"", + "got": "\"Other\"", + "got_raw": "\"Other\" # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available # No monitors available #", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4444444444444444 + }, + { + "repo": "hyprland-community/pyprland", + "expected": "(\"30\", BOLD)", + "got": "(RED, DIM) HandlerStyles.ERROR == (RED, DIM) HandlerStyles.WARNING == (YELLOW, DIM) HandlerStyles.DEBUG == (RESET, DIM) HandlerStyles.INFO == (RESET, BOLD) HandlerStyles.DEFAULT == (RESET, DIM) HandlerStyles.NO_COLOR == (RESET, DIM) HandlerStyles.NO_COLOR_RESET == (RESET, RESET) HandlerStyles.NO_COLOR_DIM == (RESET, DIM) HandlerStyles.NO_COLOR_BOLD == (RESET, BOLD) HandlerStyles.NO_COLOR_RESET_DIM == (RESET, RESET, DIM) HandlerStyles.NO_COLOR_RESET_BOLD == (RESET, RESET, BOLD) HandlerStyles.NO_COLOR", + "got_raw": "(RED, DIM) HandlerStyles.ERROR == (RED, DIM) HandlerStyles.WARNING == (YELLOW, DIM) HandlerStyles.DEBUG == (RESET, DIM) HandlerStyles.INFO == (RESET, BOLD) HandlerStyles.DEFAULT == (RESET, DIM) HandlerStyles.NO_COLOR == (RESET, DIM) HandlerStyles.NO_COLOR_RESET == (RESET, RESET) HandlerStyles.NO_COLOR_DIM == (RESET, DIM) HandlerStyles.NO_COLOR_BOLD == (RESET, BOLD) HandlerStyles.NO_COLOR_RESET_DIM == (RESET, RESET, DIM) HandlerStyles.NO_COLOR_RESET_BOLD == (RESET, RESET, BOLD) HandlerStyles.NO_COLOR", + "exact_match": false, + "code_bleu": 0.019262933442530727, + "edit_similarity": 0.031007751937984496 + }, + { + "repo": "hyprland-community/pyprland", + "expected": "\"Flipped90\"", + "got": "\"Flipped90\"", + "got_raw": "\"Flipped90\" result[\"Output\"][\"action\"][\"Transform\"][\"transform\"] == \"Flipped90\" result[\"Output\"][\"action\"][\"Transform\"][\"transform\"] == \"Flipped90\" result[\"Output\"][\"action\"][\"Transform\"][\"transform\"] == \"Flipped90\" result[\"Output\"][\"action\"][\"Transform\"][\"transform\"] == \"Flipped90\" result[\"Output\"][\"action\"][\"Transform\"][\"transform\"] == \"Flipped90\" result[\"Output\"][\"action\"][\"Transform\"][\"transform\"] == \"Flipped90\" result[\"Output\"][\"action\"][\"Transform\"][\"transform\"] == \"Flipped90\" result[\"Output", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hyprland-community/pyprland", + "expected": "full", + "got": "full.strip()", + "got_raw": "full.strip() + \"\\n\" + \"More details.\" + \"\\n\" + \" \" * 4 + \" \" * 4 + \" \" * 4 + \" \" * 4 + \" \" * 4 + \" \" * 4 + \" \" * 4 + \" \" * 4 + \" \" * 4 + \" \" * 4 + \" \" * 4 + \" \" * 4 + \" \" * 4 + \" \" * 4 + \" \" * 4 + \" \" * 4 + \" \" * 4 + \" \" * 4 + \" \" *", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5 + }, + { + "repo": "hyprland-community/pyprland", + "expected": "{\"Output\": {\"output\": \"DP-1\", \"action\": \"Off\"}}", + "got": "\"niri disable DP-1\"", + "got_raw": "\"niri disable DP-1\" # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501", + "exact_match": false, + "code_bleu": 0.038461538461538464, + "edit_similarity": 0.24242424242424243 + }, + { + "repo": "hyprland-community/pyprland", + "expected": "False", + "got": "False", + "got_raw": "False # Unknown command should not be handled assert success is False # Unknown command should not succeed assert msg == \"Unknown command: run_nonexistent\" # Unknown command should return an error message assert pyprland_app.backend.notify_info.call_count == 0 # No notification should be sent for unknown command assert pyprland_app.backend.notify_error.call_count == 1 # Error notification should be sent for unknown command assert pyprland_app.backend.notify_error.call_args_list[0] == \\ Mock( args=[ \"Error\", \"Unknown command: run_nonexistent\", \"run_nonexistent\", \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hyprland-community/pyprland", + "expected": "123", + "got": "123.0", + "got_raw": "123.0 # Note the conversion to float for comparison with the int in the config file", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.75 + }, + { + "repo": "hyprland-community/pyprland", + "expected": "\"0xABC\")", + "got": "\"0xABC\")", + "got_raw": "\"0xABC\") extension.backend.get_client_props = AsyncMock(return_value={\"address\": \"0xABC\", \"size\": [800, 600], \"floating\": True}) extension.backend.get_window_pos.return_value = {\"x\": 0, \"y\": 0, \"width\": 800, \"height\": 600} extension.backend.get_monitor_pos.return_value = {\"x\": 0, \"y\": 0, \"width\": 1920, \"height\": 1080} extension.backend.get_monitor_scale.return_value = 1.0 extension", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hyprland-community/pyprland", + "expected": "expected", + "got": "expected", + "got_raw": "expected\n\n\ndef test_merge_lists():\n l1 = [1, 2, 3]\n l2 = [4, 5, 6]\n expected = [1, 2, 3, 4, 5, 6]\n\n assert merge(l1, l2) == expected\n\n\ndef test_merge_nested_dicts():\n d1 = {\"a\": 1, \"b\": {\"x\": 10}}\n d2 = {\"b\": {\"y\": 20}, \"c\": 3}\n expected = {\"a\": 1, \"b\": {\"x", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hyprland-community/pyprland", + "expected": "\"0x2\"", + "got": "\"0x2\"", + "got_raw": "\"0x2\" extension.prepare_window.assert_called_once_with(\"0x2\") extension.unprepare_window.assert_not_called() extension.main_window_addr = \"0x2\" extension._run_changefocus(1) # Next from 0x2 (index 1) -> 0x3 (index 2) await extension._run_changefocus(1) assert extension.main_window_addr == \"0x3\" extension.prepare_window.assert_called_once_with(\"0x3\") extension.unprepare_window.assert_not_called() extension.main_window_addr = \"0x3\" extension._run_changefocus(1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hyprland-community/pyprland", + "expected": "b\"command\")", + "got": "b'{\"status\":", + "got_raw": "b'{\"status\": \"ok\"}\\n')\n writer.drain.assert_awaited()\n writer.close.assert_awaited()\n await writer.wait_closed()\n reader.read.assert_awaited()\n logger.debug.assert_called_with(\"Response: {'status': 'ok'}\")\n\ndef test_get_response_error(mock_open_connection):\n mock_connect, reader, writer = mock_open_connection\n logger = Mock()\n reader.read.return_value = b'{\"error\": \"error\"}'\n\n with pytest.raises(PyprError) as excinfo:\n await ipc.get_response(b\"", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.34782608695652173 + }, + { + "repo": "hyprland-community/pyprland", + "expected": "60", + "got": "60.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "60.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.03076923076923077 + }, + { + "repo": "hyprland-community/pyprland", + "expected": "\"DP-1\"", + "got": "\"DP-1\"", + "got_raw": "\"DP-1\" # \"eDP-1\" is not available. \"HDMI-A-1\" is second preferred and available. # \"DP-1\" is third preferred and available. # \"DP-1\" is the best available monitor. # \"DP-1\" is the best monitor. # \"DP-1\" is the best monitor. # \"DP-1\" is the best monitor. # \"DP-1\" is the best monitor. # \"DP-1\" is the best monitor. # \"DP-1\" is the best monitor. # \"DP-1\" is the best", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hyprland-community/pyprland", + "expected": "1", + "got": "0", + "got_raw": "0 + tst.xrandr.call_count == 0 + tst.xrandr.call_args_list == [] + tst.xrandr.call_args_list[0][0][0] == \"set\" + tst.xrandr.call_args_list[0][0][1] == \"mode\" + tst.xrandr.call_args_list[0][0][2] == \"1920x1080\" + tst.xrandr.call_args_list[0][0][3] == \"1920x1080\" + tst.xrandr.call_args_list[0][0][4]", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "hyprland-community/pyprland", + "expected": "\"test-agent\"", + "got": "\"test-agent\"", + "got_raw": "\"test-agent\" request.get_header(\"X-custom\") == \"value\" mock_urlopen.assert_called_once_with(\"GET\", \"https://example.com\", headers={\"X-custom\": \"value\"}) mock_urlopen.reset_mock() async with session.get(\"https://example.com\") as response: assert response.status == HTTP_OK assert response.headers.get(\"User-agent\") == \"test-agent\" mock_urlopen.assert_called_once_with(\"GET\", \"https://example.com\") mock_urlopen.reset_mock() async with session.get(\"https://example.com\", headers={\"User-Agent\": \"test-agent\"}) as response: assert response.status == HTTP_OK assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "hyprland-community/pyprland", + "expected": "2", + "got": "2.0", + "got_raw": "2.0 # float is converted to int conf.get_int(\"c\") == 0 # invalid value is converted to 0 conf.get_int(\"d\", 3) == 3 # default value is used if key is not found conf.get_int(\"e\") == 0 # default value is used if key is not found and default is not set conf.get_int(\"f\", 4) == 4 # default value is used if key is not found and default is set conf.get_int(\"g\", 5) == 5 # default value is used if key is not found and default is set and key is not", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "ideoforms/isobar", + "expected": "[0, 1, 1, 0, 1, 0, 1, 1, 0, 1]", + "got": "[2, 3, 4, 5, 6, 7, 8, 9, 10] + [11] * 2 + [12] * 2 + [13] * 2 + [14] * 2 + [15] * 2 + [16] * 2 + [17] * 2 + [18] * 2 + [19] * 2 + [20] * 2 + [21] * 2 + [22] * 2 + [23", + "got_raw": "[2, 3, 4, 5, 6, 7, 8, 9, 10] + [11] * 2 + [12] * 2 + [13] * 2 + [14] * 2 + [15] * 2 + [16] * 2 + [17] * 2 + [18] * 2 + [19] * 2 + [20] * 2 + [21] * 2 + [22] * 2 + [23", + "exact_match": false, + "code_bleu": 0.019479042833765416, + "edit_similarity": 0.10204081632653061 + }, + { + "repo": "ideoforms/isobar", + "expected": "val", + "got": "val", + "got_raw": "val <= 1.0 else \"Invalid value: {}\".format(val)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ideoforms/isobar", + "expected": "[2, 1, 0]", + "got": "[2, 1, 1]", + "got_raw": "[2, 1, 1]", + "exact_match": false, + "code_bleu": 0.7071067811865475, + "edit_similarity": 0.8888888888888888 + }, + { + "repo": "ideoforms/isobar", + "expected": "[4, 6, 3, 1, 5, 3.5]", + "got": "[5, 6, 2, -1, 2, -0.5]", + "got_raw": "[5, 6, 2, -1, 2, -0.5]", + "exact_match": false, + "code_bleu": 0.22401521369401356, + "edit_similarity": 0.7619047619047619 + }, + { + "repo": "ideoforms/isobar", + "expected": "1", + "got": "1", + "got_raw": "1\n assert next(b) == 2\n assert next(b) == 3\n assert next(b) == 4\n assert next(b) == 5\n assert next(b) == 6\n assert next(b) == 7\n assert next(b) == 8\n assert next(b) == 9\n assert next(b) == 10\n assert next(b) == 11\n assert next(b) == 12\n assert next(b) == 13\n assert next(b) == 14\n assert next(b", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ideoforms/isobar", + "expected": "60", + "got": "60", + "got_raw": "60 + 127 + 127 + 127 + 127 + 127 + 127 + 127 + 127 + 127 + 127 + 127 + 127 + 127 + 127 + 127 + 127 + 127 + 127 + 127 + 127 + 127 + 127 + 127 + 127 + 127 +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ideoforms/isobar", + "expected": "[0, 2, -1, None, 12]", + "got": "[0, 1, -1, None, 7]", + "got_raw": "[0, 1, -1, None, 7]", + "exact_match": false, + "code_bleu": 0.5923033072023248, + "edit_similarity": 0.8717948717948718 + }, + { + "repo": "ideoforms/isobar", + "expected": "[ [0, 'note_on', 24, 64, 0], [1, 'note_off', 24, 0], [1, 'note_on', 50, 64, 0], [2, 'note_off', 50, 0], [2, 'note_on', 28, 64, 0], [3, 'note_off', 28, 0], [3, 'note_on', 53, 64, 0], [4, 'note_off', 53, 0] ]", + "got": "[ [0, 'note_on', 64, 64, 0], [0, 'note_off', 64, 0], [1, 'note_on', 65, 64, 0], [1, 'note_off', 65, 0], [2, 'note_on', 66, 64, 0], [2, 'note_off', 66, 0], [3, 'note_on', 68, 64, 0], [3, 'note_off', 68, 0", + "got_raw": "[ [0, 'note_on', 64, 64, 0], [0, 'note_off', 64, 0], [1, 'note_on', 65, 64, 0], [1, 'note_off', 65, 0], [2, 'note_on', 66, 64, 0], [2, 'note_off', 66, 0], [3, 'note_on', 68, 64, 0], [3, 'note_off', 68, 0", + "exact_match": false, + "code_bleu": 0.7156883866381715, + "edit_similarity": 0.4254278728606357 + }, + { + "repo": "ideoforms/isobar", + "expected": "69)", + "got": "60)", + "got_raw": "60) npt.assert_almost_equal(frequency_to_midi_note(880), 61) npt.assert_almost_equal(frequency_to_midi_note(1760), 62) npt.assert_almost_equal(frequency_to_midi_note(3520), 63) npt.assert_almost_equal(frequency_to_midi_note(7040), 64) npt.assert_almost_equal(frequency_to_midi_note(14080), 65) npt.assert_almost_equal(frequency_to_midi_note(28160), 6", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "ideoforms/isobar", + "expected": "5", + "got": "5", + "got_raw": "5 dummy_timeline.event_times == [0, 1, 2, 3, 4]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ideoforms/isobar", + "expected": "[2, 4, 8]", + "got": "[2, 4, 8]", + "got_raw": "[2, 4, 8]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ideoforms/isobar", + "expected": "[2, 3, 5, 6, 8]", + "got": "[1, 2, 5] * 2 + [5] * 2 + [1, 2] * 2 + [5] * 2 + [1, 2] * 2 + [5] * 2 + [1, 2] * 2 + [5] * 2 + [1, 2] * 2 + [5] * 2 + [1, 2] * 2 + [5] * 2 + [1, 2] * 2 + [5] * 2 + [1, 2]", + "got_raw": "[1, 2, 5] * 2 + [5] * 2 + [1, 2] * 2 + [5] * 2 + [1, 2] * 2 + [5] * 2 + [1, 2] * 2 + [5] * 2 + [1, 2] * 2 + [5] * 2 + [1, 2] * 2 + [5] * 2 + [1, 2] * 2 + [5] * 2 + [1, 2]", + "exact_match": false, + "code_bleu": 0.021814713265469816, + "edit_similarity": 0.12972972972972974 + }, + { + "repo": "ideoforms/isobar", + "expected": "3", + "got": "4", + "got_raw": "4", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "ideoforms/isobar", + "expected": "[1, 0, -4, -3, None, None, 0.5]", + "got": "[0, -4, -4, -2, -4]", + "got_raw": "[0, -4, -4, -2, -4]", + "exact_match": false, + "code_bleu": 0.36788761125254865, + "edit_similarity": 0.56 + }, + { + "repo": "ideoforms/isobar", + "expected": "[0, 5, 7]", + "got": "[0, 1, 2]", + "got_raw": "[0, 1, 2]", + "exact_match": false, + "code_bleu": 0.38260294162784475, + "edit_similarity": 0.7777777777777778 + }, + { + "repo": "ideoforms/isobar", + "expected": "[2, 2, 2]", + "got": "[1, 2, 3] assert list(p1 / p2) == [0.5, 0.5, 0.5] assert list(p1 / 2) == [0.5, 1.0, 1.5] assert list(2 / p1) == [2, 1, 2 / 3] assert list(2 / p2) == [1, 2, 4, 8] assert list(p1 / p2) == [0.5, 0.5, 0.5] assert list(p2 /", + "got_raw": "[1, 2, 3] assert list(p1 / p2) == [0.5, 0.5, 0.5] assert list(p1 / 2) == [0.5, 1.0, 1.5] assert list(2 / p1) == [2, 1, 2 / 3] assert list(2 / p2) == [1, 2, 4, 8] assert list(p1 / p2) == [0.5, 0.5, 0.5] assert list(p2 /", + "exact_match": false, + "code_bleu": 0.036275801473979914, + "edit_similarity": 0.06167400881057269 + }, + { + "repo": "ideoforms/isobar", + "expected": "[4, 5, 6, 7]", + "got": "[4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4", + "got_raw": "[4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4] * 4 + [4", + "exact_match": false, + "code_bleu": 0.015359639314080032, + "edit_similarity": 0.030927835051546393 + }, + { + "repo": "ideoforms/isobar", + "expected": "5", + "got": "5", + "got_raw": "5 c.pattern = a c.pattern = b c.pattern = a c.pattern = b c.pattern = a c.pattern = b c.pattern = a c.pattern = b c.pattern = a c.pattern = b c.pattern = a c.pattern = b c.pattern = a c.pattern = b c.pattern = a c.pattern = b c.pattern = a c.pattern = b c.pattern = a c.pattern = b c.pattern = a c.pattern = b c.pattern = a c.pattern = b c.pattern = a c.pattern = b c.pattern = a c.pattern = b c.pattern = a c.pattern = b c.pattern = a c.pattern =", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ideoforms/isobar", + "expected": "[0, None, 2, None, -1, None, 2]", + "got": "[0, 1, 2, 3, -1, None, 2]", + "got_raw": "[0, 1, 2, 3, -1, None, 2]", + "exact_match": false, + "code_bleu": 0.6422727797927412, + "edit_similarity": 0.8214285714285714 + }, + { + "repo": "ideoforms/isobar", + "expected": "3", + "got": "3.0000000000000004e-05", + "got_raw": "3.0000000000000004e-05 # 3.0000000000000004e-05 is 3/10000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.08695652173913043 + }, + { + "repo": "inducer/loopy", + "expected": "expected", + "got": "expected", + "got_raw": "expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "inducer/loopy", + "expected": "1", + "got": "10", + "got_raw": "10 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "inducer/loopy", + "expected": "2", + "got": "128", + "got_raw": "128 + 1 # noqa: E741 # noqa: E741 # noqa: E741 # noqa: E741 # noqa: E741 # noqa: E741 # noqa: E741 # noqa: E741 # noqa: E741 # noqa: E741 # noqa: E741 # noqa: E741 # noqa: E741 # noqa: E741 # noqa: E741 # noqa: E741 # noqa: E741 # noqa:", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "inducer/loopy", + "expected": "np.where(np.abs(a) == max_val)[-1]", + "got": "np.argmax(np.abs(a)) % n + 10000 - n + 10000 // 2 + 10000 % n + 10000 // 2 + 10000 % n + 10000 // 2 + 10000 % n + 10000 // 2 + 10000 % n + 10000 // 2 + 10000 % n + 10000 // 2 + 1000", + "got_raw": "np.argmax(np.abs(a)) % n + 10000 - n + 10000 // 2 + 10000 % n + 10000 // 2 + 10000 % n + 10000 // 2 + 10000 % n + 10000 // 2 + 10000 % n + 10000 // 2 + 10000 % n + 10000 // 2 + 1000", + "exact_match": false, + "code_bleu": 0.10695852627971114, + "edit_similarity": 0.14883720930232558 + }, + { + "repo": "inducer/loopy", + "expected": "()", + "got": "()", + "got_raw": "() # noqa: E128\n\n assert bref_knl[\"loopy_kernel\"].temporary_variables[\"cnst\"].shape == (1,) # noqa: E128\n\n # check that the batched dimensions are correct\n assert bknl[\"nbatches\"].shape == (1,) # noqa: E128\n assert bref_knl[\"nbatches\"].shape == (1,) # noqa: E128\n\n # check that the batched dimensions are correct\n assert bknl[\"out\"].shape == (1, 10) # noqa: E128", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "inducer/loopy", + "expected": "2.", + "got": "2.0000000000000004e-01", + "got_raw": "2.0000000000000004e-01 # noqa: E712 # pyright: ignore[reportUnnecessaryComparison] # noqa: E711 # pyright: ignore[reportUnnecessaryComparison] # noqa: E712 # pyright: ignore[reportUnnecessaryComparison] # noqa: E711 # pyright: ignore[reportUnnecessaryComparison] # noqa: E712 # pyright: ignore[reportUnnecessaryComparison] # noqa: E7", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.16666666666666666 + }, + { + "repo": "inducer/loopy", + "expected": "3", + "got": "3", + "got_raw": "3 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "inducer/loopy", + "expected": "uncached_result", + "got": "uncached_result", + "got_raw": "uncached_result * 2.0 + 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "inducer/loopy", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "inducer/loopy", + "expected": "np.argmax(np.abs(a))", + "got": "np.argmax(np.abs(a))", + "got_raw": "np.argmax(np.abs(a)) % 128.0 + 128.0 * np.argmin(a) % 128.0 + 128.0 * np.argmin(np.abs(a)) % 128.0 + 128.0 * np.argmin(np.abs(a)) % 128.0 + 128.0 * np.argmin(np.abs(a)) % 128.0 + 128.0 * np.argmin(np.abs(a)) % 128.0 + 128.0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "inducer/loopy", + "expected": "np.arange(100, 110))", + "got": "np.arange(100, 110))", + "got_raw": "np.arange(100, 110))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "inducer/loopy", + "expected": "lst0", + "got": "lst0", + "got_raw": "lst0 == lst1 == [cls(0), cls(1), cls(3)] # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "inducer/loopy", + "expected": "True", + "got": "True", + "got_raw": "True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "inducer/loopy", + "expected": "lp.diagnostic.ReductionIsNotTriangularError)", + "got": "RuntimeError)", + "got_raw": "RuntimeError) as e: knl( np.arange(4, dtype=np.float32) )\n\n assert str(e.value) == \"Cannot use inames in scan kernels\" \\ \" without specifying the outer iname explicitly\" \" (e.g. by using 'for k in range(n): ...')\" \" or by using 'for k in inames(k): ...')\" \" or by using 'for k in inames(k, outer=True): ...')\" \" or by using 'for k in inames(k, outer=False): ...')\" \" or by using 'for k in inames(k, outer=None): ...')\"", + "exact_match": false, + "code_bleu": 0.17909498863725698, + "edit_similarity": 0.3508771929824561 + }, + { + "repo": "inducer/loopy", + "expected": "tol", + "got": "tol", + "got_raw": "tol * norm(b) + tol * 100.0 * norm(out_dict[\"min_index\"]) + tol * 100.0 * norm(b) * 100.0 * norm(out_dict[\"min_index\"]) + tol * 100.0 * norm(b) * 100.0 * norm(out_dict[\"min_index\"]) + tol * 100.0 * norm(b) * 100.0 * norm(out_dict[\"min_index\"]) + tol * 100.0 * norm(b) * 100.0 * norm", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ing-bank/popmon", + "expected": "np.max(get_bin_centers(split[1][hist_name])[0])", + "got": "1.0000000000000002e-05", + "got_raw": "1.0000000000000002e-05 * 10000.000000000001 * 10000.000000000001 * 10000.000000000001 * 10000.000000000001 * 10000.000000000001 * 1000", + "exact_match": false, + "code_bleu": 0.06331964047096604, + "edit_similarity": 0.057971014492753624 + }, + { + "repo": "ing-bank/popmon", + "expected": "5", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "ing-bank/popmon", + "expected": "np.nan)", + "got": "0)", + "got_raw": "0)\n\n np.testing.assert_equal(ks_prob(0.5), 0.5)\n\n np.testing.assert_equal(ks_prob(0.25), 0.25)\n\n np.testing.assert_equal(ks_prob(0.75), 0.75)\n\n np.testing.assert_equal(ks_prob(0.33), 0.33)\n\n np.testing.assert_equal(ks_prob(0.66), 0.66)\n\n np.testing.assert_equal(ks_prob(0.4), 0.", + "exact_match": false, + "code_bleu": 0.2686424829558855, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "ing-bank/popmon", + "expected": "49.5)", + "got": "100)", + "got_raw": "100) np.testing.assert_equal(p[\"b_mean\"].values[0], 1) np.testing.assert_equal(p[\"a_std\"].values[0], 1) np.testing.assert_equal(p[\"b_std\"].values[0], 0) np.testing.assert_equal(p[\"a\"].values[0], 1) np.testing.assert_equal(p[\"b\"].values[0], 2) np.testing.assert_equal(p[\"a_func\"].values[0], 2) np.testing.assert_equal(p[\"b_func\"].values[0], 3)\n\n\ndef test_apply_func_array():\n datastore = {\"", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "ing-bank/popmon", + "expected": "1.5)", + "got": "1.5)", + "got_raw": "1.5) np.testing.assert_equal(p[\"std\"].values[0], 1.0) np.testing.assert_equal(p[\"a\"].values[0], 100) np.testing.assert_equal(p[\"b\"].values[0], 2) np.testing.assert_equal(p[\"a_func\"].values[0], 101) np.testing.assert_equal(p[\"b_func\"].values[0], 3)\n\n\ndef test_apply_func_array():\n datastore = {\"to_profile\": {\"asc_numbers\": get_test_data()}}\n\n def func(x):\n return x + 1\n\n array =", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ing-bank/popmon", + "expected": "str", + "got": "str(hist1)", + "got_raw": "str(hist1) + \" (categorize)\" + str(hist1) + \" (categorize)\" + str(hist1) + \" (categorize)\" + str(hist1) + \" (categorize)\" + str(hist1) + \" (categorize)\" + str(hist1) + \" (categorize)\" + str(hist1) + \" (categorize)\" + str(hist1) + \" (categorize)\" + str(hist1) + \" (categorize)\" + str(hist1) + \" (categorize)\" + str(hist1) + \" (c", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.46153846153846156 + }, + { + "repo": "ing-bank/popmon", + "expected": "450", + "got": "45000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "45000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.04580152671755725 + }, + { + "repo": "ing-bank/popmon", + "expected": "3", + "got": "30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "ing-bank/popmon", + "expected": "len(features)", + "got": "len(features)", + "got_raw": "len(features) * 2 + 10 * 2 + 10 * 2 + 10 * 2 + 10 * 2 + 10 * 2 + 10 * 2 + 10 * 2 + 10 * 2 + 10 * 2 + 10 * 2 + 10 * 2 + 10 * 2 + 10 * 2 + 10 * 2 + 10 * 2 + 10 * 2 + 10 * 2 + 1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ing-bank/popmon", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as e: DuplicatedRegistry.register(key=\"test\", description=\"me\") assert str(e.value) == \"Key 'test' already exists in the registry\" DuplicatedRegistry.register(key=\"test2\", description=\"me\") assert str(e.value) == \"Key 'test2' already exists in the registry\" DuplicatedRegistry.register(key=\"test3\", description=\"me\") assert str(e.value) == \"Key 'test3' already exists in the registry\" DuplicatedRegistry.register(key=\"test4\", description=\"me\") assert str(e.value) == \"Key 'test4' already exists in the registry\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ing-bank/popmon", + "expected": "0", + "got": "1", + "got_raw": "1 and out.shape[0] == a.shape[0] * a.shape[1] * a.shape[2] * a.shape[3] * a.shape[4] and out.dtype == a.dtype and out.shape == (1,) and np.allclose(out, a.mean()) and np.allclose(out, a.mean(axis=(1, 2, 3, 4))) and np.allclose(out, a.mean(axis=(2, 3, 4))) and np.allclose(out, a.mean(axis=(3, 4))) and np.allclose(out, a.mean(axis=(4,))) and np", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "ing-bank/popmon", + "expected": "0.5", + "got": "0.500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.04580152671755725 + }, + { + "repo": "ing-bank/popmon", + "expected": "2", + "got": "2", + "got_raw": "2 assert hist2.size == 5 * 5 assert hist3.entries == 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ing-bank/popmon", + "expected": "1)", + "got": "0.0)", + "got_raw": "0.0) np.testing.assert_equal(ks_prob(0.2), 0.2) np.testing.assert_equal(ks_prob(0.3), 0.4) np.testing.assert_equal(ks_prob(0.4), 0.6) np.testing.assert_equal(ks_prob(0.5), 0.8) np.testing.assert_equal(ks_prob(0.6), 1.0) np.testing.assert_equal(ks_prob(0.7), 1.0) np.testing.assert_equal(ks_prob(0.8), 1.0) np.testing.assert_equal(", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "ing-bank/popmon", + "expected": "\"Scaler(input_key='x', output_key='scaled_x')\"", + "got": "\"Test Module\"", + "got_raw": "\"Test Module\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.13559322033898305 + }, + { + "repo": "ing-bank/popmon", + "expected": "check)", + "got": "check)", + "got_raw": "check) def test_expanding_norm_hist_mean_cov(): hist_list = [ \"date:country\", \"date:bankrupt\", \"date:num_employees\", \"date:A_score\", \"date:A_score:num_employees\", ] pipeline = Pipeline( modules=[ JsonReader( file_path=resources.data(\"example_histogram.json\"), store_key=\"example_hist\", ), HistSplitter( read_key=\"example_hist\", store_key=\"output_hist\", features=hist_list, ), ApplyFunc( apply_to_key=\"output_hist\", assign_to_key=\"output_hist\", apply_funcs=[ {\"func\": expand_norm_hist_mean_cov, \"suffix\": \"\"},", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ing-bank/popmon", + "expected": "splitA2", + "got": "splitA2.keys()", + "got_raw": "splitA2.keys() | splitA2.values() | splitA2.index() | splitA2.columns() | splitA2.dtypes | splitA2.shape | splitA2.empty | splitA2.ndim | splitA2.size | splitA2.dtype | splitA2.itemsize | splitA2.nbytes | splitA2.nbytes | splitA2.nbytes | splitA2.nbytes | splitA2.nbytes | splitA2.nbytes | splitA2.nbytes | splitA2.nbytes | splitA2.nbytes | splitA2.nbytes | splitA2.nbytes | split", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "ing-bank/popmon", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as e: traffic_light(0.5, red_high=2.0) assert str(e.value) == \"red_high must be > 0\" with pytest.raises( ValueError ) as e: traffic_light(0.5, yellow_high=2.0) assert str(e.value) == \"yellow_high must be > 0\" with pytest.raises( ValueError ) as e: traffic_light(0.5, red_high=2.0, yellow_high=0.5) assert str(e.value) == \"red_high must be > yellow_high\" with pytest.raises( ValueError ) as e: traffic", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "innovatorved/subtitle", + "expected": "\"success\"", + "got": "\"success\"", + "got_raw": "\"success\" assert call_count[0] == 1 # Function was called once. def test_retry_retries_on_error(self): \"\"\"Test function retries on error.\"\"\" call_count = [0] @retry_on_error(max_attempts=3, delay=0.01) def fails_on_second_try(): call_count[0] += 1 if call_count[0] == 1: raise Exception(\"Failed on first try\") return \"success\" result = fails_on_second_try() assert result == \"success\" assert call_count[0] == 2 # Function was called twice. def test_retry_ex", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "innovatorved/subtitle", + "expected": "srt_content", + "got": "srt_content.strip()", + "got_raw": "srt_content.strip() assert \"00:00:00.000 --> 00:00:03.500\\n\" in srt_content.strip() assert \"Hello, world!\\n\" in srt_content.strip() assert \"00:00:03.500 --> 00:00:04.000\\n\" in srt_content.strip() assert \"Goodbye!\\n\" in srt_content.strip() assert \"00:00:04.000 --> 00:00:04", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.7333333333333333 + }, + { + "repo": "innovatorved/subtitle", + "expected": "None", + "got": "None", + "got_raw": "None\n assert isinstance(settings, Settings)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "innovatorved/subtitle", + "expected": "\"test error\"", + "got": "\"test error\"", + "got_raw": "\"test error\"\n\n def test_transcription_error(self):\n \"\"\"Test TranscriptionError is a subclass of SubtitleError.\"\"\"\n error = TranscriptionError(\"transcription error\")\n assert isinstance(error, SubtitleError)\n assert str(error) == \"transcription error\"\n\n def test_video_processing_error(self):\n \"\"\"Test VideoProcessingError is a subclass of SubtitleError.\"\"\"\n error = VideoProcessingError(\"video processing error\")\n assert isinstance(error, SubtitleError)\n assert str(error) == \"video processing error\"\n\n def test_model_error(self", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "innovatorved/subtitle", + "expected": "data", + "got": "data.keys()", + "got_raw": "data.keys() assert \"completed_at\" in data.keys() assert \"total\" in data.keys() assert \"processed\" in data.keys() assert \"failed\" in data.keys() assert \"error\" in data.keys() assert \"model\" in data.keys() assert \"output_format\" in data.keys() assert \"error\" in data.keys() assert \"error\" in data.keys() assert \"error\" in data.keys() assert \"error\" in data.keys() assert \"error\" in data.keys() assert \"error\" in data.keys() assert \"error\" in data.keys() assert \"error\" in data.keys() assert \"error", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5333333333333333 + }, + { + "repo": "innovatorved/subtitle", + "expected": "\"First line\"", + "got": "\"First line\" segments[0].start_time == 0.0 segments[0].end_time == 3.5 segments[1].text == \"Second line\" segments[1].start_time == 4.0 segments[1].end_time == 7.0", + "got_raw": "\"First line\" segments[0].start_time == 0.0 segments[0].end_time == 3.5 segments[1].text == \"Second line\" segments[1].start_time == 4.0 segments[1].end_time == 7.0\n\n def test_format_vtt(self):\n \"\"\"Test formatting VTT content.\"\"\"\n formatter = VTTFormatter()\n segments = [SubtitleSegment(\"First line\", 0.0, 3.5), SubtitleSegment(\"Second line\", 4.0, 7.0)]\n content = formatter.format(se", + "exact_match": false, + "code_bleu": 0.02614431568998955, + "edit_similarity": 0.13793103448275862 + }, + { + "repo": "innovatorved/subtitle", + "expected": "False", + "got": "False", + "got_raw": "False result.error == \"Processing failed\" result.duration_seconds == 5.0 result.file_path == \"/videos/video.mp4\" result.batch_id == \"\" result.batch_name == \"\" result.batch_status == \"failed\" result.batch_error == \"Processing failed\" result.batch_duration_seconds == 5.0 result.batch_files_processed == 1 result.batch_files_failed == 1 result.batch_files_skipped == 0 result.batch_files_total == 1 result.batch_files_total_failed == 1 result.batch_files_total_skipped == 0 result.batch_files_total_processed == 1 result.batch_files_total_failed_skipped == 1 result.batch_files_total", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "intility/fastapi-azure-auth", + "expected": "200", + "got": "200", + "got_raw": "200", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "intility/fastapi-azure-auth", + "expected": "{'detail': 'Connection to Azure Entra ID is down. Unable to fetch provider configuration'}", + "got": "{'detail': {'error': 'invalid_token'", + "got_raw": "{'detail': {'error': 'invalid_token', 'message': 'Invalid token'}}", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.2857142857142857 + }, + { + "repo": "intility/fastapi-azure-auth", + "expected": "{'detail': {'error': 'invalid_token', 'message': 'Unable to validate token'}}", + "got": "401", + "got_raw": "401", + "exact_match": false, + "code_bleu": 0.038461538461538464, + "edit_similarity": 0.0 + }, + { + "repo": "intility/fastapi-azure-auth", + "expected": "openapi_schema", + "got": "openapi_schema", + "got_raw": "openapi_schema # noqa: E501", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "intility/fastapi-azure-auth", + "expected": "401", + "got": "401", + "got_raw": "401", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "intility/fastapi-azure-auth", + "expected": "(InvalidAuthWebSocket, UnauthorizedWebSocket))", + "got": "(InvalidAuthWebSocket, UnauthorizedWebSocket)) as exc_info:", + "got_raw": "(InvalidAuthWebSocket, UnauthorizedWebSocket)) as exc_info:\n raise InvalidAuth(\"test message\", ws_conn)\n\n assert isinstance(exc_info.value, UnauthorizedWebSocket)", + "exact_match": false, + "code_bleu": 0.6389431042462724, + "edit_similarity": 0.8761904761904762 + }, + { + "repo": "invoice-x/invoice2data", + "expected": "\"test.pdf\")", + "got": "path)", + "got_raw": "path) # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E50", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.25 + }, + { + "repo": "invoice-x/invoice2data", + "expected": "have)", + "got": "have)", + "got_raw": "have) # noqa: E501 \"\"\" OCRMyPDF is not available \"\"\" ) def test_pdfminer_available_unavailable(self) -> None: with mock.patch.dict(\"sys.modules\", {\"pdfminer\": None}): have = pdfminer_wrapper.pdfminer_available() print(\"pdfminer should not be available have is %s\" % have) self.assertFalse( have ) \"\"\" pdfminer is not available \"\"\" ) def test_pdfplumber_available_unavailable(self) -> None: with mock.patch.dict(\"sys.modules\", {\"pdfplumber\": None}): have = pdfplumber.pdfplumber_available() print(\"pdfplumber should not", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "invoice-x/invoice2data", + "expected": "False)", + "got": "compare_verified)", + "got_raw": "compare_verified) else: self.fail(\"JSON output date format incorrect\") os.remove(test_file) os.remove(\"test_compare.json\") os.remove(\"test_compare.xml\") os.remove(\"test_compare.pdf\") os.remove(\"test_compare.html\") os.remove(\"test_compare.csv\") os.remove(\"test_compare.txt\") os.remove(\"test_compare.json\") os.remove(\"test_compare.json\") os.remove(\"test_compare.json\") os.remove(\"test_compare.json\") os.remove(\"test_compare.json\") os.remove(\"test_compare.json\") os.remove(\"test_compare.json\") os.remove(\"test_compare.json\") os.remove(\"test_compare.json\") os.remove(\"test", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.2608695652173913 + }, + { + "repo": "ipa-lab/hackingBuddyGPT", + "expected": "result[\"rate_limiting\"])", + "got": "result[\"headers\"])", + "got_raw": "result[\"headers\"]) self.assertIn(\"X-Ratelimit-Remaining\", result[\"headers\"]) self.assertIn(\"X-Ratelimit-Reset\", result[\"headers\"]) self.assertIn(\"Authorization\", result[\"headers\"]) self.assertIn(\"Bearer\", result[\"headers\"][\"Authorization\"]) self.assertEqual(result[\"headers\"][\"Bearer\"], \"token\") self.assertEqual(result[\"headers\"][\"X-Ratelimit-Limit\"], \"1000\") self.assertEqual(result[\"headers\"][\"X-Ratelimit-Remaining\"], \"998\") self.assertEqual(result[\"headers\"][\"X-Ratelimit-Reset\"], \"1723802321\") self.assertEqual(result", + "exact_match": false, + "code_bleu": 0.45180100180492244, + "edit_similarity": 0.5714285714285714 + }, + { + "repo": "ipa-lab/hackingBuddyGPT", + "expected": "expected_operations)", + "got": "expected_operations)", + "got_raw": "expected_operations) def test_get_tags(self): tags = self.parser._get_tags() expected_tags = ['Posts'] self.assertEqual(tags, expected_tags) def test_get_paths(self): paths = self.parser._get_paths() expected_paths = {'/posts': {'get': {'description': 'Returns all posts', 'operationId': 'getPosts', 'responses': {'200': {'content': {'application/json': {'schema': {'$ref': '#/components/schemas/PostsList'}}}, 'description': 'Successful response'}}, 'tags': ['Posts']}}} self.assertEqual(paths, expected_paths) def test_parse(self", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ipa-lab/hackingBuddyGPT", + "expected": "user_info)", + "got": "user_info)", + "got_raw": "user_info) self.assertEqual(user_info[\"x\"], \"123\") self.assertEqual(user_info[\"y\"], \"456\") self.assertEqual(user_info[\"z\"], \"789\") self.assertEqual(user_info[\"a\"], \"101112\") self.assertEqual(user_info[\"b\"], \"131415\") self.assertEqual(user_info[\"c\"], \"161718\") self.assertEqual(user_info[\"d\"], \"192021\") self.assertEqual(user_info[\"e\"], \"222324\") self.assertEqual(user_info[\"f\"], \"252627", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ipa-lab/hackingBuddyGPT", + "expected": "\"Test\")", + "got": "\"Test\")", + "got_raw": "\"Test\") self.assertEqual(updated_spec, openapi_spec) self.assertEqual(entry_dict, {}) mock_parse_http_response_to_schema.assert_called_once_with( http_response, path, method )", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ipa-lab/hackingBuddyGPT", + "expected": "len(prompt_history))", + "got": "len(prompt_history))", + "got_raw": "len(prompt_history)) self.assertEqual(\"response_text\", prompt_history[0][\"content\"]) self.assertEqual(\"system\", prompt_history[0][\"role\"]) self.assertEqual(\"response_text\", prompt_engineer.response) self.assertEqual(True, prompt_engineer.evaluate_response()) self.assertEqual(\"response_text\", prompt_engineer.get_response()) self.assertEqual(\"response_text\", prompt_engineer.get_response()) self.assertEqual(\"response_text\", prompt_engineer.get_response()) self.assertEqual(\"response_text\", prompt_engineer.get_response()) self.assertEqual(\"response_text\", prompt_engineer.get_response()) self.assertEqual(\"response_text\", prompt_engineer.get_response()) self.assertEqual(\"response_text\",", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ipa-lab/hackingBuddyGPT", + "expected": "403)", + "got": "403)", + "got_raw": "403) self.assertEqual(document[\"Headers\"], {\"Content-Type\": \"application/json\"}) self.assertEqual(document[\"Body\"], \"Access denied\") self.assertEqual(document[\"Expected Behavior\"], \"Access should be allowed\") self.assertEqual(document[\"Actual Behavior\"], \"Access denied\") self.assertEqual(document[\"Error\"], None) self.assertEqual(document[\"Warnings\"], []) self.assertEqual(document[\"Info\"], []) self.assertEqual(document[\"Debug\"], []) self.assertEqual(document[\"Notes\"], []) self.assertEqual(document[\"Recommendations\"], []) self.assertEqual(document[\"Suggestions\"], []) self.assertEqual(document[\"Fixes\"], []) self.assertEqual(document[\"Links\"], []) self.assertEqual(document[\"References\"], []) self.assertEqual(document", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ipa-lab/hackingBuddyGPT", + "expected": "expected_output_path)", + "got": "expected_output_path)", + "got_raw": "expected_output_path)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ipa-lab/hackingBuddyGPT", + "expected": "actual_prompt[0].get(\"content\"))", + "got": "actual_prompt)", + "got_raw": "actual_prompt) self.assertEqual(expected_prompt, actual_prompt) def test_in_context_learning_with_hint(self): prompt_engineer = self.generate_prompt_engineer(\"icl\") expected_prompt = \"\"\"Based on this information :\n\nObjective: Identify all accessible endpoints via GET requests for No host URL provided.. See https://jsonplaceholder.typicode.com/\n Query root-level resource endpoints.\n Find root-level endpoints for No host URL provided..\n Only send GET requests to root-level endpoints with a single path component after the root. This means each path should have exactly one '/' followed by a single word (e.g., '/users', '/products'). \n 1", + "exact_match": false, + "code_bleu": 0.11892071150027211, + "edit_similarity": 0.6086956521739131 + }, + { + "repo": "ipa-lab/hackingBuddyGPT", + "expected": "updated_endpoints)", + "got": "updated_endpoints)", + "got_raw": "updated_endpoints)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ipa-lab/hackingBuddyGPT", + "expected": "headers)", + "got": "headers)", + "got_raw": "headers) self.assertIn(\"X-Ratelimit-Limit\", headers) self.assertIn(\"X-Ratelimit-Remaining\", headers) self.assertIn(\"X-Ratelimit-Reset\", headers) self.assertEqual(1000, int(headers[\"X-Ratelimit-Limit\"])) self.assertEqual(998, int(headers[\"X-Ratelimit-Remaining\"])) self.assertEqual(1723802321, int(headers[\"X-Ratelimit-Reset\"])) self.assertEqual(\"[{\\\"message\\\": \\\"Welcome!\\\"}]\", body) self.assertEqual(\"application/json\", headers[\"Content-Type\"]) self.assertEqual(\"OK\", headers", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ipa-lab/hackingBuddyGPT", + "expected": "code)", + "got": "code)", + "got_raw": "code) self.assertEqual( \"\", message) ) def test_extract_status_code_and_message_valid(self): result = \"HTTP/1.1 200 OK\" code, message = self.openapi_handler.extract_status_code_and_message(result) self.assertEqual( \"200\", code) self.assertEqual( \"OK\", message) ) def test_extract_status_code_and_message_valid_with_multiple_spaces(self): result = \"HTTP/1.1 200 OK\" code, message = self.openapi_handler.extract_status_code_and_message(result) self.assertEqual( \"200\", code) self.assertEqual( \"OK\", message) )", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "irgolic/AutoPR", + "expected": "[ Issue( open=True, number=1, title=\"Ups an issue occurred.\", author=\"user1\", timestamp=\"2023-08-20T10:25:48Z\", messages=[ Message( body=\"I am an issue. Resolve me.\", author=\"user1\", ) ], ) ]", + "got": "[Issue( id=1, number=1, title=\"Ups an issue occurred.\", body=\"I am an issue. Resolve me.\", user=\"user1\", created_at=\"2023-08-19T17:38:34Z\", updated_at=\"2023-08-20T10:25:48Z\", comments=0, comments_url=comments_url, )]", + "got_raw": "[Issue( id=1, number=1, title=\"Ups an issue occurred.\", body=\"I am an issue. Resolve me.\", user=\"user1\", created_at=\"2023-08-19T17:38:34Z\", updated_at=\"2023-08-20T10:25:48Z\", comments=0, comments_url=comments_url, )]", + "exact_match": false, + "code_bleu": 0.3976975191903291, + "edit_similarity": 0.515970515970516 + }, + { + "repo": "irgolic/AutoPR", + "expected": "2", + "got": "2", + "got_raw": "2 and comment_ids == [\"comment1\"] and \"body1\" in comment_ids[0][\"body\"] and \"body2\" in comment_ids[0][\"body\"] and \"body1\" in comment_ids[1][\"body\"] and \"body2\" in comment_ids[1][\"body\"] and \"body1\" in comment_ids[2][\"body\"] and \"body2\" in comment_ids[2][\"body\"] and \"body1\" in comment_ids[3][\"body\"] and \"body2\" in comment_ids[3][\"body\"] and \"body1\" in comment_ids[4][\"body\"] and \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "irgolic/AutoPR", + "expected": "\"My commit message\\n\"", + "got": "\"test commit\" + str(i) + \"\\n\" + \"test commit\" + str(i) + \"\\n\" + \"test commit\" + str(i) + \"\\n\" + \"test commit\" + str(i) + \"\\n\" + \"test commit\" + str(i) + \"\\n\" + \"test commit\" + str(i) + \"\\n\" + \"test commit\" + str(i) + \"\\n\" + \"test commit\" + str(i) + \"\\n\" + \"test commit\" + str(i) + \"\\n\" + \"test commit\" + str(i) + \"\\n", + "got_raw": "\"test commit\" + str(i) + \"\\n\" + \"test commit\" + str(i) + \"\\n\" + \"test commit\" + str(i) + \"\\n\" + \"test commit\" + str(i) + \"\\n\" + \"test commit\" + str(i) + \"\\n\" + \"test commit\" + str(i) + \"\\n\" + \"test commit\" + str(i) + \"\\n\" + \"test commit\" + str(i) + \"\\n\" + \"test commit\" + str(i) + \"\\n\" + \"test commit\" + str(i) + \"\\n", + "exact_match": false, + "code_bleu": 0.01105056710178162, + "edit_similarity": 0.0771513353115727 + }, + { + "repo": "irgolic/AutoPR", + "expected": "1", + "got": "1.0000000000000002e+000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "1.0000000000000002e+000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "isso-comments/isso", + "expected": "403)", + "got": "429)", + "got_raw": "429) self.assertEqual(rv.headers[\"Retry-After\"], \"1\") self.assertEqual(rv.headers[\"Content-Type\"], \"text/html; charset=utf-8\") self.assertEqual(rv.data, b\"Rate limit exceeded\") self.assertEqual(rv.mimetype, \"text/html\") self.assertEqual(rv.charset, \"utf-8\") self.assertEqual(rv.content_type, \"text/html\") self.assertEqual(rv.content_encoding, \"utf-8\") self.assertEqual(rv.content_language, \"en\") self.assertEqual(rv.content_disposition, \"\") self.assertEqual(rv.content_length, 28) self.assertEqual(rv.content_md5, \"\") self.assertEqual(rv.content_type, \"text", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "isso-comments/isso", + "expected": "2)", + "got": "2)", + "got_raw": "2)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "isso-comments/isso", + "expected": "142)", + "got": "142)", + "got_raw": "142) self.assertEqual(loads(rv.data)[\"dislikes\"], 0) self.assertEqual(loads(rv.data)[\"error\"], \"Too many likes\") break else: self.assertEqual(loads(rv.data)[\"likes\"], num + 1) self.assertEqual(loads(rv.data)[\"dislikes\"], 0) self.assertEqual(loads(rv.data)[\"error\"], None)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "isso-comments/isso", + "expected": "convert.render(_in))", + "got": "convert.render(_in))", + "got_raw": "convert.render(_in))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "isso-comments/isso", + "expected": "a[\"id\"])", + "got": "1)", + "got_raw": "1) self.assertEqual(b[\"author\"], \"peter\") self.assertEqual(b[\"email\"], \"foo@bar.com\") self.assertEqual(b[\"remote_addr\"], \"127.0.0.0\") self.assertEqual(b[\"ip\"], \"127.0.0.0\") self.assertEqual(b[\"url\"], \"http://example.com\") self.assertEqual(b[\"title\"], \"Test\") self.assertEqual(b[\"content\"], \"Test\") self.assertEqual(b[\"id\"], 3) self.assertEqual(b[\"date\"], \"2010-01-01 00:00:00\") self.assertEqual(b", + "exact_match": false, + "code_bleu": 0.2149139863647084, + "edit_similarity": 0.2 + }, + { + "repo": "isso-comments/isso", + "expected": "[(None,), (\"foo\",)])", + "got": "[(\"\",), (\"foo\",)])", + "got_raw": "[(\"\",), (\"foo\",)])", + "exact_match": false, + "code_bleu": 0.7910665071754358, + "edit_similarity": 0.8421052631578947 + }, + { + "repo": "isso-comments/isso", + "expected": "0)", + "got": "0)", + "got_raw": "0)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "isso-comments/isso", + "expected": "\"Foo, Bar\")", + "got": "\"Foo,Bar\") self.assertEqual(rv.headers[\"Access-Control-Expose-Headers\"], \"Spam\") self.assertEqual(rv.headers[\"Content-Type\"], \"text/html\") self.assertEqual(rv.data, b\"Hello, World.\") rv = client.get(\"/\", headers={\"Origin\": \"http://example.tld\"}) self.assertEqual(rv.headers[\"Access-Control-Allow-Origin\"], \"http://example.tld\") self.assertEqual(rv.headers[\"Access-Control-Allow-Credentials\"], \"true\") self.assertEqual(rv.headers[\"Access-Control-Allow-Methods\"], \"HEAD, GET, POST, PUT, DELETE\") self.assertEqual(rv.headers[\"Access-Control-Allow-Headers\"], \"Foo,Bar\") self.assertEqual", + "got_raw": "\"Foo,Bar\") self.assertEqual(rv.headers[\"Access-Control-Expose-Headers\"], \"Spam\") self.assertEqual(rv.headers[\"Content-Type\"], \"text/html\") self.assertEqual(rv.data, b\"Hello, World.\") rv = client.get(\"/\", headers={\"Origin\": \"http://example.tld\"}) self.assertEqual(rv.headers[\"Access-Control-Allow-Origin\"], \"http://example.tld\") self.assertEqual(rv.headers[\"Access-Control-Allow-Credentials\"], \"true\") self.assertEqual(rv.headers[\"Access-Control-Allow-Methods\"], \"HEAD, GET, POST, PUT, DELETE\") self.assertEqual(rv.headers[\"Access-Control-Allow-Headers\"], \"Foo,Bar\") self.assertEqual", + "exact_match": false, + "code_bleu": 0.010860905115565473, + "edit_similarity": 0.03372681281618887 + }, + { + "repo": "isso-comments/isso", + "expected": "WordPress)", + "got": "WordPress)", + "got_raw": "WordPress)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "isso-comments/isso", + "expected": "[\"fgh\"])", + "got": "[\"fgh\"])", + "got_raw": "[\"fgh\"])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jackmpcollins/magentic", + "expected": "\"Ireland\"", + "got": "\"Ireland\"", + "got_raw": "\"Ireland\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jackmpcollins/magentic", + "expected": "2", + "got": "2", + "got_raw": "2 message.content[0].function_name == \"plus\" message.content[0].arguments == {\"a\": 1, \"b\": 2} message.content[0].function_result == 3 message.content[1].function_name == \"minus\" message.content[1].arguments == {\"a\": 1, \"b\": 2} message.content[1].function_result == -1 message.content[0].function_result == 3 message.content[1].function_result == -1 message.content[0].function_result == 3 message.content[1].function_result == -1 message.content[0].function_result", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jackmpcollins/magentic", + "expected": "True", + "got": "True", + "got_raw": "True is_capital(\"London\", \"UK\") is False is_capital(\"Paris\", \"France\") is True is_capital(\"New York\", \"USA\") is False is_capital(\"New York\", \"New York\") is True is_capital(\"New York\", \"New York\") is True is_capital(\"New York\", \"New York\") is True is_capital(\"New York\", \"New York\") is True is_capital(\"New York\", \"New York\") is True is_capital(\"New York\", \"New York\") is True is_capital(\"New York\", \"New York\") is True is_cap", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jackmpcollins/magentic", + "expected": "ValueError)", + "got": "TypeError)", + "got_raw": "TypeError) as exc_info: placeholder_list_str.format(my_list_str=123) # int -> list[str] # noqa: E501 # type: ignore # noqa: E501 assert str(exc_info.value) == \"Expected list[str], received int instead\" # noqa: E501 placeholder_dict_str = Placeholder(dict[str, str], \"my_dict_str\") assert placeholder_dict_str.format(my_dict_str={\"test\": \"test\"}) == { \"test\": \"test\" } # noqa: E501 with pytest.raises(TypeError) as exc_info: placeholder_dict_str", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "jackmpcollins/magentic", + "expected": "{\"my-extra-header\": \"foo\"}", + "got": "{\"my-extra-header\": \"foo\"} chat_model.chat([UserMessage(\"Hello\")]) for call in litellm_success_callback_calls(): assert call[0][\"kwargs\"][\"extra_headers\"] == {\"my-extra-header\": \"foo\"} chat_model.chat([UserMessage(\"Hello\")]", + "got_raw": "{\"my-extra-header\": \"foo\"} chat_model.chat([UserMessage(\"Hello\")]) for call in litellm_success_callback_calls(): assert call[0][\"kwargs\"][\"extra_headers\"] == {\"my-extra-header\": \"foo\"} chat_model.chat([UserMessage(\"Hello\")], extra_headers={\"my-extra-header\": \"bar\"}) for call in litellm_success_callback_calls(): assert call[0][\"kwargs\"][\"extra_headers\"] == {\"my-extra-header\": \"bar\"} chat_model.chat([UserMessage(\"Hello\")], extra_headers={\"my-extra-header\": \"baz\"}) for call in litellm_success_callback_calls(): assert call", + "exact_match": false, + "code_bleu": 0.08627614350932425, + "edit_similarity": 0.20883534136546184 + }, + { + "repo": "jackmpcollins/magentic", + "expected": "[ UserMessage(\"Hello World.\") ]", + "got": "[UserMessage(\"Hello World.\")", + "got_raw": "[UserMessage(\"Hello World.\"), SystemMessage(\"stop\")] assert mock_model.complete.call_args.kwargs[\"stop\"] == [\"stop\"] assert mock_model.complete.call_args.kwargs[\"functions\"] == [] assert mock_model.complete.call_args.kwargs[\"function_call\"] is None assert mock_model.complete.call_args.kwargs[\"function_call_kwargs\"] == {} assert mock_model.complete.call_args.kwargs[\"function_call_format\"] == \"auto\" assert mock_model.complete.call_args.kwargs[\"function_call_format_version\"] == \"0.1\" assert mock_model.complete.call_args.kwargs[\"function_call_format_options\"] == {} assert mock_model.complete.call_args.kwargs[\"function_call_format_error\"]", + "exact_match": false, + "code_bleu": 0.8333333333333334, + "edit_similarity": 0.9491525423728814 + }, + { + "repo": "jackmpcollins/magentic", + "expected": "1", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "jackmpcollins/magentic", + "expected": "list(expected)", + "got": "expected", + "got_raw": "expected # type: ignore # cached_iterable is not iterable directly # type: ignore # cached_iterable is not a stream # type: ignore # cached_iterable is not a streamed str # type: ignore # cached_iterable is not a streamed str # type: ignore # cached_iterable is not a streamed str # type: ignore # cached_iterable is not a streamed str # type: ignore # cached_iterable is not a streamed str # type: ignore # cached_iterable is not a streamed str # type", + "exact_match": false, + "code_bleu": 0.14865088937534013, + "edit_similarity": 0.7272727272727273 + }, + { + "repo": "jackmpcollins/magentic", + "expected": "int)", + "got": "int)", + "got_raw": "int) assert_type( function_result_message_formatted.content, 3 ) assert_type( function_result_message_formatted.content, ANY ) assert_type( function_result_message_formatted.content, int | None ) assert_type( function_result_message_formatted.content, int | str | None ) assert_type( function_result_message_formatted.content, int | str | None | bool ) assert_type( function_result_message_formatted.content, int | str | None | bool | float ) assert_type( function_result_message_formatted.content, int | str | None | bool | float | dict[str, int] ) assert_type( function_result_message_formatted.content, int | str | None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jackmpcollins/magentic", + "expected": "2", + "got": "1", + "got_raw": "1", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "jackmpcollins/magentic", + "expected": "UserImageMessage[str])", + "got": "UserImageMessage)", + "got_raw": "UserImageMessage) assert image_message_formatted == image_message_formatted assert image_message_formatted == image_message_formatted.format() assert image_message_formatted == image_message_formatted.format(foo=\"bar\") assert image_message_formatted == image_message_formatted.format(foo=\"bar\", baz=\"qux\") assert image_message_formatted == image_message_formatted.format(foo=\"bar\", baz=\"qux\", qux=\"quux\") assert image_message_formatted == image_message_formatted.format(foo=\"bar\", baz=\"qux\", qux=\"quux\", quux=\"quuz\") assert image_message_formatted == image_message_formatted.format(foo=\"bar\", baz=\"qux\", qux=\"", + "exact_match": false, + "code_bleu": 0.23784142300054423, + "edit_similarity": 0.8717948717948718 + }, + { + "repo": "jackmpcollins/magentic", + "expected": "NumberedList[str])", + "got": "NumberedList[str])", + "got_raw": "NumberedList[str]) assert_type(items[0], str) assert_type(items[1], str) assert_type(items[2], str) assert_type(items[3], int) assert_type(items[4], int) assert_type(items[5], int) assert_type(items[6], int) assert_type(items[7], int) assert_type(items[8], int) assert_type(items[9], int) assert_type(items[10], int) assert_type(items[11], int) assert_type(items[12], int) assert_type(items[13], int) assert_type(items[14], int", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jackmpcollins/magentic", + "expected": "\"country\"", + "got": "\"country\"", + "got_raw": "\"country\" assert_type(placeholder.model, Country) assert_type(placeholder.model.name, str) assert_type(placeholder.format(), str) assert_type(placeholder.format(Country(name=\"US\")), str) assert_type(placeholder.format(Country(name=\"UK\")), str) assert_type(placeholder.format(Country(name=\"China\")), str) assert_type(placeholder.format(Country(name=\"Japan\")), str) assert_type(placeholder.format(Country(name=\"Germany\")), str) assert_type(placeholder.format(Country(name=\"France\")), str) assert_type(placeholder.format(Country(name=\"Australia\")), str) assert_type(placeholder.format(Country(name=\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jackmpcollins/magentic", + "expected": "3", + "got": "3", + "got_raw": "3 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jacob-bd/notebooklm-mcp-cli", + "expected": "\"nb-123\"", + "got": "\"nb-123\"", + "got_raw": "\"nb-123\" result[\"artifact_id\"] == \"art-456\" result[\"export_type\"] == \"docs\" result[\"title\"] == \"My Report\" result[\"url\"] == \"https://docs.google.com/doc/123\" result[\"error\"] == \"\" result[\"message\"] == \"\" result[\"id\"] == \"doc-123\" result[\"created\"] == \"2023-01-01T00:00:00Z\" result[\"updated\"] == \"2023-01-01T00:00", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jacob-bd/notebooklm-mcp-cli", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" # Return an empty string for None input # Add more tests as needed # ... # Test that _extract_cell_text handles a string input. def test_extract_cell_text_handles_string(self): \"\"\"Test that _extract_cell_text handles a string input.\"\"\" text = \"This is a test.\" result = DownloadMixin._extract_cell_text(text) assert result == text # Add more tests as needed # ... # Test that _extract_cell_text handles a list of strings. def test_extract_cell_text_handles_list(self): \"\"\"Test that _extract_cell_text handles a list of strings", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jacob-bd/notebooklm-mcp-cli", + "expected": "\"art-3\"", + "got": "\"art-3\"", + "got_raw": "\"art-3\" assert result[\"status\"] == \"in_progress\" assert result[\"error\"] is None assert result[\"message\"] == \"\" def test_create_report(self, mock_client): result = create_artifact(mock_client, \"nb-1\", \"report\") assert result[\"artifact_type\"] == \"report\" assert result[\"artifact_id\"] == \"art-5\" assert result[\"status\"] == \"in_progress\" assert result[\"error\"] is None assert result[\"message\"] == \"\" def test_create_flashcards(self, mock_client): result = create_artifact(mock_client, \"nb-1\", \"flashcards\") assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jacob-bd/notebooklm-mcp-cli", + "expected": "\"CYK0Xb\"", + "got": "'create_note'", + "got_raw": "'create_note' assert BaseClient.RPC_GET_NOTES == 'get_notes' assert BaseClient.RPC_UPDATE_NOTE == 'update_note' assert BaseClient.RPC_DELETE_NOTE == 'delete_note' def test_rpc_constants_values(): \"\"\"Test that RPC constant values are correct.\"\"\" from notebooklm_tools.core.base import BaseClient assert BaseClient.RPC_CREATE_NOTE == 'create_note' assert BaseClient.RPC_GET_NOTES == 'get_notes' assert BaseClient.RPC_UPDATE_NOTE == 'update_note' assert BaseClient.RPC_DELETE_NOTE == 'delete_note' def test_rpc_constants_types(): \"\"\"Test that RPC constant types are correct", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "jacob-bd/notebooklm-mcp-cli", + "expected": "\"CCqFvf\"", + "got": "\"create_notebook\"", + "got_raw": "\"create_notebook\" call_args[1] == {\"title\": \"Test Notebook\"} call_args[2] == {\"csrf_token\": \"test\"} call_args[3] == {\"cookies\": {\"test\": \"cookie\"}} call_args[4] == {} call_args[5] == \"notebook_id_123\" call_args[6] == \"test\" call_args[7] == \"test\" call_args[8] == \"test\" call_args[9] == \"test\" call_args[10] == \"test\" call_args[11] == \"test\" call_args[1", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.16 + }, + { + "repo": "jacob-bd/notebooklm-mcp-cli", + "expected": "constants.FLASHCARD_DIFFICULTIES.names", + "got": "constants.DIFFICULTY_LEVELS.names()", + "got_raw": "constants.DIFFICULTY_LEVELS.names() or \"medium\" in constants.DIFFICULTY_LEVELS.values() or \"medium\" in constants.DIFFICULTY_LEVELS.labels() or \"medium\" in constants.DIFFICULTY_LEVELS.keys() or \"medium\" in constants.DIFFICULTY_LEVELS.id() or \"medium\" in constants.DIFFICULTY_LEVELS.slug() or \"medium\" in constants.DIFFICULTY_LEVELS.title() or \"medium\" in constants.DIFFICULTY_LEVELS.description() or \"medium\" in constants.DIFFICULTY_LEVELS", + "exact_match": false, + "code_bleu": 0.3073940764756322, + "edit_similarity": 0.7397260273972602 + }, + { + "repo": "jacob-bd/notebooklm-mcp-cli", + "expected": "\"123456789\"", + "got": "\"123456789\"", + "got_raw": "\"123456789\" # The session ID is extracted from the HTML content", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jacob-bd/notebooklm-mcp-cli", + "expected": "str(err)", + "got": "str(err)", + "got_raw": "str(err) and \"abc-123\" in str(err) and \"not ready\" in str(err) and \"audio\" in repr(err) and \"abc-123\" in repr(err) and \"not ready\" in repr(err) and \"Audio\" in repr(err) and \"abc-123\" in repr(err) and \"not ready\" in repr(err) and \"Audio\" in repr(err) and \"abc-123\" in repr(err) and \"not ready\" in repr(err) and \"Audio\" in repr(err) and \"abc-123\" in", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jacob-bd/notebooklm-mcp-cli", + "expected": "None", + "got": "None", + "got_raw": "None\n\ndef test_base_client_init():\n \"\"\"Test that BaseClient can be initialized.\"\"\"\n from notebooklm_tools.core.base import BaseClient\n\n client = BaseClient()\n assert client is not None\n\ndef test_base_client_get_data():\n \"\"\"Test that BaseClient can retrieve data from a mock API.\"\"\"\n from notebooklm_tools.core.base import BaseClient\n\n mock_data = {\"key\": \"value\"}\n mock_response = MagicMock()\n mock_response.json.return_value = mock_data\n\n with patch(\"requests.get\") as mock_get:\n mock_get.return_value = mock_response\n client = BaseClient", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jacob-bd/notebooklm-mcp-cli", + "expected": "body", + "got": "body[0]", + "got_raw": "body[0] assert \"param1\" in body[0] assert \"csrf_token\" in body[0] assert \"csrf_token=test_token\" in body[0] assert \"f.req=testRpc\" in body[0] assert \"f.req=testRpc\" in body[0] assert \"f.req=testRpc\" in body[0] assert \"f.req=testRpc\" in body[0] assert \"f.req=testRpc\" in body[0] assert \"f.req=testRpc\" in body[0] assert \"f.req=testRpc\" in body[0] assert \"f.req=testRpc\" in", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.7272727272727273 + }, + { + "repo": "jacob-bd/notebooklm-mcp-cli", + "expected": "\"art-8\"", + "got": "\"art-8\"", + "got_raw": "\"art-8\" assert result[\"status\"] == \"in_progress\" assert result[\"description\"] == \"Compare features\" assert result[\"created_by\"] == \"nb-1\" assert result[\"created_at\"] is not None assert result[\"updated_at\"] is not None assert result[\"updated_by\"] == \"nb-1\" assert result[\"tags\"] == [] assert result[\"source\"] == \"\" assert result[\"source_id\"] is None assert result[\"source_type\"] is None assert result[\"source_url\"] is None assert result[\"source_title\"] is None assert result[\"source_description\"] is None assert result[\"source_tags\"] ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jacob-bd/notebooklm-mcp-cli", + "expected": "\"abc-123\"", + "got": "\"abc-123\"", + "got_raw": "\"abc-123\" err.artifact_type == \"report\" err.message == \"Artifact not found: abc-123\" err.status_code == 404 err.error_code == \"404\" err.error_message == \"Not Found\" err.error_description == \"The requested resource was not found.\" err.error_type == \"client_error\" err.error_category == \"client_error\" err.error_subcategory == \"not_found\" err.error_code_description == \"404 Not Found\" err.error_code_description_short == \"404\" err.error_code_description_long == \"Not Found\" err.error_code_description", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jacob-bd/notebooklm-mcp-cli", + "expected": "constants.VIDEO_STYLES.names", + "got": "constants.VIDEO_STYLE_NAMES.names()", + "got_raw": "constants.VIDEO_STYLE_NAMES.names() # noqa: E501", + "exact_match": false, + "code_bleu": 0.3073940764756322, + "edit_similarity": 0.8888888888888888 + }, + { + "repo": "jacob-bd/notebooklm-mcp-cli", + "expected": "\"sheets\"", + "got": "\"sheets\"", + "got_raw": "\"sheets\" result[\"url\"] == \"https://docs.google.com/spreadsheets/123\" result[\"id\"] == \"art-456\" result[\"notebook_id\"] == \"nb-123\" result[\"error\"] is None result[\"message\"] is None result[\"data\"] is None result[\"html\"] is None result[\"html_url\"] is None result[\"html_error\"] is None result[\"html_message\"] is None result[\"html_data\"] is None result[\"html_html\"] is None result[\"html_html_url\"] is None result[\"html_html_error\"] is None result[\"html_html_message", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jacob-bd/notebooklm-mcp-cli", + "expected": "\"task-123\"", + "got": "\"task-123\"", + "got_raw": "\"task-123\" mock_client.start_research.assert_called_once_with( \"nb-1\", \"quantum computing\", ) def test_invalid_notebook_id(self, mock_client): with pytest.raises(ValidationError) as exc_info: start_research(mock_client, \"invalid\", \"quantum computing\") assert str(exc_info.value) == \"Invalid notebook ID: invalid\" def test_error_starting_research(self, mock_client): mock_client.start_research.side_effect = ServiceError(\"Error starting research\") with pytest.raises(ServiceError) as exc_info: start_research(mock_client, \"nb-1\", \"quantum", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jacob-bd/notebooklm-mcp-cli", + "expected": "\"video\"", + "got": "\"video\"", + "got_raw": "\"video\" assert result[\"status\"] == \"in_progress\" assert result[\"id\"] == \"art-2\" assert result[\"title\"] == \"Video 1\" assert result[\"source\"] == \"nb-1\" assert result[\"source_type\"] == \"notebook\" assert result[\"source_url\"] == \"\" assert result[\"source_path\"] == \"\" assert result[\"source_version\"] == \"\" assert result[\"source_format\"] == \"video\" assert result[\"source_size\"] == 0 assert result[\"source_created\"] == \"\" assert result[\"source_updated\"] == \"\" assert result[\"source_deleted\"] == \"\" assert result[\"source", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jacob-bd/notebooklm-mcp-cli", + "expected": "\"public\"", + "got": "\"public\"", + "got_raw": "\"public\" assert result[\"collaborators\"] == [ { \"email\": \"alice@example.com\", \"role\": \"owner\", \"is_pending\": False, }, { \"email\": \"bob@example.com\", \"role\": \"editor\", \"is_pending\": True, }, ] assert result[\"public_link\"] == \"https://notebooklm.google.com/notebook/abc123\" def test_raises_error_if_notebook_not_found(self, mock_client): mock_client.get_share_status.return_value = None mock_client.get_notebook.return_value = None with pytest.raises(ServiceError) as excinfo: get_share_status(mock_client", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jacob-bd/notebooklm-mcp-cli", + "expected": "\"url\"", + "got": "\"url\"", + "got_raw": "\"url\" assert result[\"title\"] == \"Example Page\" assert result[\"id\"] == \"src-1\" assert result[\"url\"] == \"https://example.com\" assert result[\"source_type_name\"] == \"URL\" assert result[\"can_sync\"] is False assert result[\"freshness\"] is None assert result[\"drive_doc_id\"] is None assert result[\"drive_doc_title\"] is None assert result[\"drive_doc_url\"] is None assert result[\"drive_doc_type\"] is None assert result[\"drive_doc_freshness\"] is None assert result[\"drive_doc_url\"] is None assert result[\"drive_doc_type\"] is None assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jacob-bd/notebooklm-mcp-cli", + "expected": "\"completed\"", + "got": "\"completed\"", + "got_raw": "\"completed\" result[\"task_id\"] == \"task-1\" result[\"sources\"] == [{\"title\": \"Source A\"}] result[\"report\"] == \"Research complete.\" result[\"error\"] == \"\" result[\"message\"] == \"\" result[\"url\"] == \"\" result[\"id\"] == \"nb-1\" result[\"created\"] == \"2023-01-01T00:00:00Z\" result[\"updated\"] == \"2023-01-01T00:00:00Z\" result[\"tags\"] == [] result[\"title\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jacob-bd/notebooklm-mcp-cli", + "expected": "0", + "got": "0", + "got_raw": "0 # No notebooks found assert result[\"notebooks\"] == [] # Empty list of notebooks assert result[\"next\"] is None # No next page assert result[\"error\"] is None # No error assert result[\"message\"] == \"\" # No message assert result[\"status\"] == \"success\" # Success status assert result[\"error_code\"] == 0 # No error code assert result[\"error_message\"] == \"\" # No error message assert result[\"error_details\"] == {} # No error details assert result[\"error_traceback\"] == \"\" # No", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jamwithai/production-agentic-rag-course", + "expected": "1", + "got": "1", + "got_raw": "1 # Default value for max_concurrent_parsing is 1 # Default value for max_concurrent_downloads is 2 # Default value for max_concurrent_parsing is 1 # Default value for max_concurrent_downloads is 2 # Default value for max_concurrent_parsing is 1 # Default value for max_concurrent_downloads is 2 # Default value for max_concurrent_parsing is 1 # Default value for max_concurrent_downloads is 2 # Default value for max_concurrent_parsing is 1 # Default value for max_concurrent_downloads", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jamwithai/production-agentic-rag-course", + "expected": "\"retrieve_papers\"", + "got": "\"RetrievalExecutor\"", + "got_raw": "\"RetrievalExecutor\" runtime.context.retrieval_executor.call_count == 1 runtime.context.retrieval_executor.call_args_list[0].args[0] == state[\"messages\"] runtime.context.retrieval_executor.call_args_list[0].kwargs == {} runtime.context.retrieval_executor.call_args_list[0].kwargs[\"state\"] == state runtime.context.retrieval_executor.call_args_list[0].kwargs[\"runtime\"] == runtime runtime.context.retrieval_executor.call_args_list[0].kwargs[\"context\"] == test_context runtime.context.retrieval_executor.call_args_list[0].kwargs[\"max_results\"] == 1", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6111111111111112 + }, + { + "repo": "jamwithai/production-agentic-rag-course", + "expected": "ValueError, match=\"Query cannot be empty\")", + "got": "ValueError, match=\"Query cannot be empty\") as e:", + "got_raw": "ValueError, match=\"Query cannot be empty\") as e:\n await test_service.ask(\"\")\n assert str(e.value) == \"Query cannot be empty\"\n\n @pytest.mark.asyncio\n async def test_ask_valid_query(self, test_service):\n \"\"\"Test that a valid query returns a response.\"\"\"\n response = await test_service.ask(\"What is the capital of France?\")\n assert response is not None\n assert isinstance(response, str)\n assert response.startswith(\"The capital of France is\")", + "exact_match": false, + "code_bleu": 0.6389431042462724, + "edit_similarity": 0.9333333333333333 + }, + { + "repo": "jamwithai/production-agentic-rag-course", + "expected": "\"http://localhost:9200\"", + "got": "\"opensearch\"", + "got_raw": "\"opensearch\" assert settings.opensearch.port == 9200 assert settings.opensearch.username == \"admin\" assert settings.opensearch.password == \"admin\" assert settings.opensearch.index == \"test_index\" assert settings.opensearch.type == \"test_type\" assert settings.opensearch.id_field == \"_id\" assert settings.opensearch.id_field_index == \"_id\" assert settings.opensearch.id_field_type == \"string\" assert settings.opensearch.id_field_index == \"not_analyzed\" assert settings.opensearch.id_field_type == \"string\" assert settings.opensearch.id_field_index", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.22857142857142856 + }, + { + "repo": "jamwithai/production-agentic-rag-course", + "expected": "1", + "got": "1", + "got_raw": "1 mock_paper = papers[0] assert mock_paper.id == \"2024.0001v1\" assert mock_paper.title == \"Test Paper Title\" assert mock_paper.summary == \"Test abstract content\" assert mock_paper.authors == [\"Test Author\"] assert mock_paper.categories == [\"cs.AI\"] assert mock_paper.pdf_url == \"http://arxiv.org/pdf/2024.0001v1\" assert mock_paper.pdf_path is None mock_paper.pdf_content is None mock_paper.pdf_error is None mock_paper.pdf_download_error is None mock_paper.pdf_download_timeout_error is None mock_paper.pdf", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jamwithai/production-agentic-rag-course", + "expected": "150", + "got": "150.0000000000000122070312500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "150.0000000000000122070312500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.04580152671755725 + }, + { + "repo": "jamwithai/production-agentic-rag-course", + "expected": "custom_fields", + "got": "custom_fields", + "got_raw": "custom_fields + [\"_score\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jamwithai/production-agentic-rag-course", + "expected": "None", + "got": "None", + "got_raw": "None # Default is None for categories in SearchRequest\n\n\ndef test_search_request_with_parameters():\n \"\"\"Test SearchRequest with custom parameters.\"\"\"\n request = SearchRequest(\n query=\"custom query\",\n size=20,\n from_=5,\n latest_papers=True,\n categories=[\"category1\", \"category2\"]\n )\n\n assert request.query == \"custom query\"\n assert request.size == 20\n assert request.from_ == 5\n assert request.latest_papers is True\n assert request.categories == [\"category1\", \"category2\"]\n\n\ndef test_search_request_invalid_query_type", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jamwithai/production-agentic-rag-course", + "expected": "75", + "got": "75.00000000000001234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012", + "got_raw": "75.00000000000001234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.03076923076923077 + }, + { + "repo": "jamwithai/production-agentic-rag-course", + "expected": "\"2024.0001v1.pdf\"", + "got": "\"2024.0001v1.pdf\"", + "got_raw": "\"2024.0001v1.pdf\" # Cached PDF name remains the same # (assuming the cache directory is used) assert pdf_path.read_text() == \"\" # Empty content since it's a cached PDF # (assuming the cache directory is used) assert pdf_path.read_bytes() == b\"\" # Empty content since it's a cached PDF # (assuming the cache directory is used) assert pdf_path.read_text() == \"\" # Empty content since it's a cached PDF # (assuming the cache directory is used) assert pdf_path.read_bytes() ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jamwithai/production-agentic-rag-course", + "expected": "PDFValidationError)", + "got": "PDFValidationError)", + "got_raw": "PDFValidationError) as exc_info: docling_parser.validate_pdf(empty_pdf_path) assert str(exc_info.value) == \"Empty PDF file\" def test_validate_pdf_invalid_file(self, docling_parser, invalid_pdf_path): \"\"\"Test PDF validation with invalid file.\"\"\" with pytest.raises( PDFValidationError) as exc_info: docling_parser.validate_pdf(invalid_pdf_path) assert str(exc_info.value) == \"Invalid PDF file\" def test_parse_pdf_valid_file(self, docling_parser, valid_pdf_path): \"\"\"Test PDF parsing with a valid file.\"\"\" content = docling_parser.parse_pdf(valid_pdf_path) assert content is not None def test", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jamwithai/production-agentic-rag-course", + "expected": "[\"http://localhost:11434\", \"http://ollama:11434\"]", + "got": "(expected_host, \"http://localhost:11434\") if \"OLLAMA_HOST\" not in os.environ else (\"http://ollama:11434\", \"http://localhost:11434\") if \"OLLAMA_HOST\" in os.environ else (\"http://ollama:11434\", \"http://localhost:11434\") if \"OLLAMA_HOST\" not in os.environ else (\"http://ollama:11434\", \"http://localhost:11434\") if \"OLLAMA_HOST\" in os.environ else (\"http://", + "got_raw": "(expected_host, \"http://localhost:11434\") if \"OLLAMA_HOST\" not in os.environ else (\"http://ollama:11434\", \"http://localhost:11434\") if \"OLLAMA_HOST\" in os.environ else (\"http://ollama:11434\", \"http://localhost:11434\") if \"OLLAMA_HOST\" not in os.environ else (\"http://ollama:11434\", \"http://localhost:11434\") if \"OLLAMA_HOST\" in os.environ else (\"http://", + "exact_match": false, + "code_bleu": 0.02548649799825755, + "edit_similarity": 0.22885572139303484 + }, + { + "repo": "jamwithai/production-agentic-rag-course", + "expected": "0.0", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.04580152671755725 + }, + { + "repo": "jamwithai/production-agentic-rag-course", + "expected": "422", + "got": "422", + "got_raw": "422 # Unprocessable Content status code for missing query parameter. response_json = await response.json() assert response_json[\"detail\"] == { \"error\": \"Invalid request body\", \"message\": \"Missing required field 'query'\", } # Unprocessable Content status code for empty query parameter. response = await client.post(\"/api/v1/hybrid-search/\", json={\"query\": \" \"}) assert response.status_code == 422 # Unprocessable Content status code for query parameter with only whitespace. response = await client.post(\"/api/v1/hybrid-search/\", json={\"query\": \" \"}) assert response.status_code == ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jannisborn/paperscraper", + "expected": "\"Kacper Wyrwal\"", + "got": "\"Yi-Cheng Chen\"", + "got_raw": "\"Yi-Cheng Chen\" # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa:", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.26666666666666666 + }, + { + "repo": "jannisborn/paperscraper", + "expected": "\"Juan M. Galeazzi\"", + "got": "\"J. M. M. van der Zwaag\"", + "got_raw": "\"J. M. M. van der Zwaag\" # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.47619047619047616 + }, + { + "repo": "jannisborn/paperscraper", + "expected": "-1", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.25, + "edit_similarity": 0.015384615384615385 + }, + { + "repo": "jannisborn/paperscraper", + "expected": "5", + "got": "4", + "got_raw": "4 # 4 queries in load_dumps.py # 1 query in load_dumps_test.py # 1 query in load_dumps_test2.py # 1 query in load_dumps_test3.py # 1 query in load_dumps_test4.py # 1 query in load_dumps_test5.py # 1 query in load_dumps_test6.py # 1 query in load_dumps_test7.py # 1 query in load_dumps_test8.py # 1 query in load_dumps_test9.py # 1 query in load_dumps_test", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "jannisborn/paperscraper", + "expected": "0", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "jazzband/django-axes", + "expected": "3)", + "got": "3)", + "got_raw": "3) self.assertEqual(AccessLog.objects.count(), 1) self.assertEqual(AccessFailureLog.objects.count(), 1) self.assertEqual(AccessAttemptExpiration.objects.count(), 0) self.assertEqual(AccessAttempt.objects.filter(username=self.USERNAME_1).count(), 1) self.assertEqual(AccessAttempt.objects.filter(username=self.USERNAME_2).count(), 2) self.assertEqual(AccessLog.objects.filter(username=self.USERNAME_1).count(), 0) self.assertEqual(AccessLog.objects.filter(username=self.USERNAME_2).count(), 1) self.assertEqual(AccessFailureLog.objects.filter(username=self.USERNAME_1).", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jazzband/django-axes", + "expected": "[warning])", + "got": "[warning])", + "got_raw": "[warning])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jazzband/django-axes", + "expected": "self.SUCCESS_RESPONSE.content)", + "got": "self.SUCCESS_RESPONSE.content)", + "got_raw": "self.SUCCESS_RESPONSE.content) self.assertEqual(response.status_code, 200) self.cls.assert_not_called() self.func.assert_not_called() self.request.is_locked_out.assert_not_called() self.request.is_allowed.assert_called_once_with() self.request.is_locked_out.return_value = False self.request.is_allowed.return_value = True self.request.is_locked_out.return_value = True self.request.is_locked_out.return_value = False self.request.is_locked_out.return_value = True self.request.is_locked_out.return_value = False self.request.is_locked_out.return_value = True self.request.is_locked_out.return_value = False self.request.is_locked_out.return_value = True self.request", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jazzband/django-axes", + "expected": "threshold_none)", + "got": "42)", + "got_raw": "42) self.assertEqual(threshold_none, 0)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.1111111111111111 + }, + { + "repo": "jazzband/django-axes", + "expected": "0)", + "got": "AccessAttempt.objects.filter(username=self.USERNAME_1).count())", + "got_raw": "AccessAttempt.objects.filter(username=self.USERNAME_1).count()) 1) 2) 3) 4) 5) 6) 7) 8) 9) 10) 11) 12) 13) 14) 15) 16) 17) 18) 19) 20) 21) 22) 23) 24) 25) 26) 27) 28) 29) 30) 31)", + "exact_match": false, + "code_bleu": 0.07223943354597204, + "edit_similarity": 0.03076923076923077 + }, + { + "repo": "jazzband/django-axes", + "expected": "5)", + "got": "0)", + "got_raw": "0)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "jazzband/django-rest-knox", + "expected": "32", + "got": "32", + "got_raw": "32 reload_api_settings() assert knox_settings.AUTH_TOKEN_CHARACTER_LENGTH == 128 reload_api_settings() assert knox_settings.TOKEN_TTL == timedelta(hours=5) reload_api_settings() assert knox_settings.AUTO_REFRESH is True reload_api_settings() assert knox_settings.AUTO_REFRESH is False reload_api_settings() assert knox_settings.ALLOWED_TOKEN_CHARS == '0123456789' reload_api_settings() assert knox_settings.ALLOWED_TOKEN_CHARS == '0123456789abcdef' reload_api_settings() assert knox_settings.ALLOWED_TOKEN_CHARS ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jazzband/django-rest-knox", + "expected": "2)", + "got": "2)", + "got_raw": "2) self.assertEqual(token1, user_tokens[0]) self.assertEqual(token2, user_tokens[1]) self.assertNotEqual(token1, token2) self.assertTrue(token1.is_valid()) self.assertTrue(token2.is_valid()) self.assertNotEqual(token1.id, token2.id) self.assertNotEqual(token1.key, token2.key) self.assertNotEqual(token1.created, token2.created) self.assertNotEqual(token1.expire, token2.expire) self.assertNotEqual(token1.user, token2.user) self.assertNotEqual(token1.user_id, token2.user_id) self.assertNotEqual(token1.user_key, token2.user_key)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jazzband/django-rest-knox", + "expected": "'Token'", + "got": "'Bearer'", + "got_raw": "'Bearer' assert knox_settings.ALLOWED_CORS_ORIGINS == [] assert knox_settings.ALLOWED_CORS_METHODS == [] assert knox_settings.ALLOWED_CORS_HEADERS == [] assert knox_settings.ALLOWED_CORS_EXPOSED_HEADERS == [] assert knox_settings.ALLOWED_CORS_MAX_AGE == 0 assert knox_settings.ALLOWED_CORS_CREDENTIALS == False assert knox_settings.ALLOWED_CORS_ALLOW_CREDENTIALS == [] assert knox_settings.ALLOWED_CORS_ALLOW_HEADERS == [] assert knox_settings.ALLOWED_CORS_ALLOW_METHODS == []", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4 + }, + { + "repo": "jazzband/django-rest-knox", + "expected": "bytes)", + "got": "bytes)", + "got_raw": "bytes) self.assertEqual(result, b\"test123\") self.assertEqual(len(result), 8) self.assertEqual(result.hex(), \"74657374313233\") self.assertEqual(result.decode(), \"test123\") self.assertEqual(result.decode(\"utf-8\"), \"test123\") self.assertEqual(result.decode(\"utf-8\", errors=\"ignore\"), \"test123\") self.assertEqual(result.decode(\"utf-8\", errors=\"replace\"), \"test123\") self.assertEqual(result.decode(\"utf-8\", errors=\"xmlcharrefreplace\"), \"test123\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jazzband/django-silk", + "expected": "200)", + "got": "200)", + "got_raw": "200)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jazzband/django-silk", + "expected": "params)", + "got": "mock_cursor.execute.call_args_list[0].args[0])", + "got_raw": "mock_cursor.execute.call_args_list[0].args[0]) self.assertIn(prefix, mock_cursor.execute.call_args_list[1].args[0]) self.assertIn('SELECT * FROM table_name WHERE column1 = %s', mock_cursor.execute.call_args_list[1].args[1]) self.assertIn(params, mock_cursor.execute.call_args_list[1].args[2]) self.assertIn('SELECT * FROM table_name WHERE column1 = %s', mock_cursor.execute.call_args_list[2].args[0]) self.assertIn('SELECT * FROM table_name WHERE column1 = %s', mock_cursor.execute.call_args_list[2].args", + "exact_match": false, + "code_bleu": 0.08839374326825923, + "edit_similarity": 0.1509433962264151 + }, + { + "repo": "jazzband/django-silk", + "expected": "p.name == name)", + "got": "p.name == name) else: self.assertFalse(p.name == name) requests = models.Profile.objects.filter(NameFilter(name", + "got_raw": "p.name == name) else: self.assertFalse(p.name == name) requests = models.Profile.objects.filter(NameFilter(name, exact=False)) for p in requests: self.assertTrue(p.name != name) else: self.assertFalse(p.name != name) requests = models.Profile.objects.filter(NameFilter(name, exact=True)) for p in requests: self.assertTrue(p.name == name) else: self.assertFalse(p.name == name) requests = models.Profile.objects.filter(NameFilter(name, regex=r\"^.*\")) for p in requests: self.assertTrue(p.name.startswith(name)) else: self.assertFalse(p.name.startswith(name)) requests = models.Profile.objects.filter(NameFilter(name,", + "exact_match": false, + "code_bleu": 0.19710660977672478, + "edit_similarity": 0.23809523809523808 + }, + { + "repo": "jazzband/django-silk", + "expected": "round(c))", + "got": "c)", + "got_raw": "c) self.assertLessEqual(round(f.time_taken), c + 1) self.assertLessEqual(round(f.time_taken), round(c * 2)) self.assertGreaterEqual(round(f.time_taken), round(c / 2)) self.assertLessEqual(round(f.time_taken), round(c / 3)) self.assertGreaterEqual(round(f.time_taken), round(c / 4)) self.assertLessEqual(round(f.time_taken), round(c / 5)) self.assertGreaterEqual(round(f.time_taken), round(c / 6)) self.assertLessEqual(round(f.time_taken), round(c / 7)) self.assertGreaterEqual(round(f.time", + "exact_match": false, + "code_bleu": 0.28284271247461906, + "edit_similarity": 0.36363636363636365 + }, + { + "repo": "jazzband/django-silk", + "expected": "1)", + "got": "1)", + "got_raw": "1)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jazzband/django-silk", + "expected": "context)", + "got": "context)", + "got_raw": "context) self.assertNotIn('paths', context) self.assertNotIn('paths_show', context) self.assertNotIn('paths_order_by', context) self.assertNotIn('paths_order_dir', context) self.assertNotIn('paths_order_dir_show', context) self.assertNotIn('paths_order_dir_order_by', context) self.assertNotIn('paths_order_dir_order_by_show', context) self.assertNotIn('paths_order_dir_order_by_order_dir', context) self.assertNotIn('paths_order_dir_order_by_order_dir_show', context) self.assertNotIn('paths_order_dir_order_by_order_dir_order_by', context) self.assertNotIn('paths_order_dir_order", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jazzband/django-silk", + "expected": "len(results))", + "got": "len(results))", + "got_raw": "len(results))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jazzband/django-silk", + "expected": "len(DataCollector().queries))", + "got": "self.collector.count)", + "got_raw": "self.collector.count) self.assertEqual(0, self.collector.count_queries) self.assertEqual(0, self.collector.count_queries_by_time) self.assertEqual(0, self.collector.count_queries_by_time_desc) self.assertEqual(0, self.collector.count_queries_by_time_desc_2) self.assertEqual(0, self.collector.count_queries_by_time_desc_3) self.assertEqual(0, self.collector.count_queries_by_time_desc_4) self.assertEqual(0, self.collector.count_queries_by_time_desc_5) self.assertEqual(0, self.collector.count_queries_by_time_desc_6) self.assertEqual(0,", + "exact_match": false, + "code_bleu": 0.16297434081163364, + "edit_similarity": 0.48 + }, + { + "repo": "jazzband/django-silk", + "expected": "expected_regex)", + "got": "expected_regex)", + "got_raw": "expected_regex)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jazzband/django-silk", + "expected": "1)", + "got": "1)", + "got_raw": "1)\n self.assertEqual(obj.pk, None)\n self.assertEqual(obj.start_time, self.start_time)\r\n self.assertEqual(obj.end_time, self.end_time)\r\n self.assertEqual(obj.duration, 5)\r\n self.assertEqual(obj.query, \"SELECT * FROM test\")\r\n self.assertEqual(obj.db, \"default\")\r\n self.assertEqual(obj.time_spent, 0)\r\n self.assertEqual(obj.time_spent_queries, 0)\r\n self.assertEqual(obj.time_spent_queries_avg, 0)\r\n self.assertEqual(obj.time_spent_queries_max, 0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jazzband/django-silk", + "expected": "mock_DataCollector.return_value.register_profile.call_count)", + "got": "mock_DataCollector.add_request.called)", + "got_raw": "mock_DataCollector.add_request.called)", + "exact_match": false, + "code_bleu": 0.24773732385103553, + "edit_similarity": 0.6326530612244898 + }, + { + "repo": "jazzband/django-silk", + "expected": "code == 200)", + "got": "code == 200) self.assertEqual(response.content", + "got_raw": "code == 200) self.assertEqual(response.content, b'') self.assertEqual(response['Content-Type'], 'text/html; charset=utf-8') self.assertEqual(response['Content-Length'], '0') self.assertEqual(response['Cache-Control'], 'max-age=0, no-cache, no-store, must-revalidate') self.assertEqual(response['Pragma'], 'no-cache') self.assertEqual(response['Expires'], 'Thu, 01 Jan 1970 01:23:20 GMT') self.assertEqual(response['Date'], 'Thu, 01 Jan 1970 01:23:", + "exact_match": false, + "code_bleu": 0.38058030016749456, + "edit_similarity": 0.41379310344827586 + }, + { + "repo": "jazzband/django-silk", + "expected": "13.8)", + "got": "3.3)", + "got_raw": "3.3) self.assertEqual(obj.total_meta_time_spent_queries, 10.5) self.assertEqual(obj.total_meta_time_spent_queries_percent, 30.0) self.assertEqual(obj.total_meta_time_spent_queries_percent, 30.0) self.assertEqual(obj.total_meta_time_spent_queries_percent, 30.0) self.assertEqual(obj.total_meta_time_spent_queries_percent, 30.0) self.assertEqual(obj.total_meta_time_spent_queries_percent, 30.0) self.assertEqual(obj.total_meta_time_spent_queries_percent, 30.0) self.assertEqual(obj.total_meta_time", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "jazzband/django-silk", + "expected": "1)", + "got": "1)", + "got_raw": "1)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jazzband/django-silk", + "expected": "110)", + "got": "200)", + "got_raw": "200)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "jazzband/django-silk", + "expected": "'normal_uri_')", + "got": "'normal')", + "got_raw": "'normal')\n\n def test_profile_file_name_with_disabled_extended_file_name(self):\n\n SilkyConfig().SILKY_PYTHON_PROFILER_EXTENDED_FILE_NAME = False\r\n request_path = 'normal/uri/'\r\n resulting_prefix = self._get_prof_file_name(request_path)\r\n self.assertEqual(resulting_prefix, 'normal')\r\n self.assertEqual(resulting_prefix, 'uri')\r\n self.assertEqual(resulting_prefix, 'uri/')\r\n self.assertEqual(resulting_prefix, 'uri')\r\n self.assertEqual(resulting_prefix, 'uri')\r\n self.assertEqual(result", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.782608695652174 + }, + { + "repo": "jazzband/djangorestframework-simplejwt", + "expected": "0)", + "got": "1)", + "got_raw": "1) self.refresh_token = RefreshToken.for_user(self.user) self.refresh_token.blacklist() self.refresh_token = RefreshToken.for_user(self.user) self.refresh_token.blacklist() self.refresh_token = RefreshToken.for_user(self.user) self.refresh_token.blacklist() self.refresh_token = RefreshToken.for_user(self.user) self.refresh_token.blacklist() self.refresh_token = RefreshToken.for_user(self.user) self.refresh_token.blacklist() self.refresh_token = RefreshToken.for_user(self.user) self.refresh_token.blacklist() self.refresh_token = RefreshToken.for_user(self.user) self.refresh_token.blacklist() self.refresh_token = RefreshToken.for", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "jazzband/djangorestframework-simplejwt", + "expected": "946684800)", + "got": "1000)", + "got_raw": "1000) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.4 + }, + { + "repo": "jazzband/djangorestframework-simplejwt", + "expected": "\"TokenUser 42\")", + "got": "\"deep-thought\")", + "got_raw": "\"deep-thought\")", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "jazzband/djangorestframework-simplejwt", + "expected": "TokenError)", + "got": "TokenError)", + "got_raw": "TokenError) as err: s.is_valid() self.assertEqual( str(err.exception), \"Token is invalid\" ) self.assertFalse(s.validated_data) self.assertFalse(s.errors) self.assertEqual(s.data, {}) self.assertEqual(s.errors, {}) self.assertEqual(s.validated_data, {}) self.assertEqual(s.token, token) self.assertEqual(s.token_key, token.key) self.assertEqual(s.token_exp, token.exp) self.assertEqual(s.token_iat, token.iat) self.assertEqual(s.token_jti, token.jti) self.assertEqual(s.token_type, token.token_type) self.assertEqual(s.token_sliding, token.sliding) self.assertEqual(s.token_key", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jazzband/djangorestframework-simplejwt", + "expected": "res.data[\"code\"])", + "got": "res.json()[\"detail\"])", + "got_raw": "res.json()[\"detail\"])", + "exact_match": false, + "code_bleu": 0.24446151121745052, + "edit_similarity": 0.5789473684210527 + }, + { + "repo": "jazzband/djangorestframework-simplejwt", + "expected": "hash(self.user.id))", + "got": "hash(self.token))", + "got_raw": "hash(self.token))", + "exact_match": false, + "code_bleu": 0.4624694336121693, + "edit_similarity": 0.7222222222222222 + }, + { + "repo": "jazzband/djangorestframework-simplejwt", + "expected": "self.payload)", + "got": "self.payload)", + "got_raw": "self.payload)\n\n def test_decode_aud_iss_failure(self):\n self.payload[\"exp\"] = aware_utcnow() + timedelta(days=1)\n self.payload[\"foo\"] = \"baz\"\n self.payload[\"aud\"] = \"not_\" + AUDIENCE\n self.payload[\"iss\"] = ISSUER\n\n token = jwt.encode(self.payload, PRIVATE_KEY, algorithm=\"RS256\")\n if IS_OLD_JWT:\n token = token.decode(\"utf-8\")\n else:\n # Payload copied\n self.payload[\"exp\"] = datetime_to_epoch(self.payload[\"exp\"])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jazzband/djangorestframework-simplejwt", + "expected": "2)", + "got": "2)", + "got_raw": "2)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jazzband/djangorestframework-simplejwt", + "expected": "token.payload)", + "got": "token)", + "got_raw": "token) == self.backend.get_validated_token(str(token))", + "exact_match": false, + "code_bleu": 0.29730177875068026, + "edit_similarity": 0.6 + }, + { + "repo": "jdemaeyer/brightsky", + "expected": "[ { 'url': k, 'parser': v[0], 'last_modified': datetime.datetime.strptime( v[1], '%Y-%m-%d %H:%M').replace(tzinfo=tzutc()), 'file_size': v[2], } for k, v in expected.items()]", + "got": "expected.items()", + "got_raw": "expected.items()", + "exact_match": false, + "code_bleu": 0.08771929824561403, + "edit_similarity": 0.16842105263157894 + }, + { + "repo": "jdemaeyer/brightsky", + "expected": "237667", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "jdemaeyer/brightsky", + "expected": "[ [13, 11, 8, 9, 9], [12, 11, 7, 8, 9], [9, 10, 8, 8, 9], [0, 0, 2, 6, 8], [0, 0, 0, 0, 0], ]", + "got": "[ [4096, 4096, 4096, 4096, 4096], [4096, 4096, 4096, 4096, 4096], [4096, 4096, 4096, 4096, 4096], [4096, 4096, 4096, 4096, 4096], [4096,", + "got_raw": "[ [4096, 4096, 4096, 4096, 4096], [4096, 4096, 4096, 4096, 4096], [4096, 4096, 4096, 4096, 4096], [4096, 4096, 4096, 4096, 4096], [4096, ", + "exact_match": false, + "code_bleu": 0.10302361893636885, + "edit_similarity": 0.48034934497816595 + }, + { + "repo": "jdemaeyer/brightsky", + "expected": "db_sources[0]['id'] + 2", + "got": "2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "got_raw": "2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": false, + "code_bleu": 0.015393994773377797, + "edit_similarity": 0.030927835051546393 + }, + { + "repo": "jdemaeyer/brightsky", + "expected": "[]", + "got": "[]", + "got_raw": "[]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jdemaeyer/brightsky", + "expected": "1", + "got": "12345", + "got_raw": "12345 + 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "jdepoix/youtube-transcript-api", + "expected": "CookieInvalid)", + "got": "CookiePathInvalid)", + "got_raw": "CookiePathInvalid) as error: YouTubeTranscriptApi.load_cookies(cookie_path) self.assertEqual( str(error.exception), \"The cookie file at {path} is invalid\".format(path=cookie_path) ) cookie_path = get_asset_path(\"invalid_example_cookies.txt\") with self.assertRaises(CookieInvalid) as error: YouTubeTranscriptApi.load_cookies(cookie_path) self.assertEqual( str(error.exception), \"The cookie at {path} is invalid\".format(path=cookie_path) ) cookie_path = get_asset_path(\"expired_example_cookies.txt\") with self.assertRaises(CookiePathInvalid) as error: YouTubeTranscriptApi.load_cookies(cookie_path)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.875 + }, + { + "repo": "jdepoix/youtube-transcript-api", + "expected": "\"\")", + "got": "\"\")", + "got_raw": "\"\") # empty line at the end of the file \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jdepoix/youtube-transcript-api", + "expected": "IpBlocked)", + "got": "YouTubeRequestFailed)", + "got_raw": "YouTubeRequestFailed) as error: YouTubeTranscriptApi.fetch(\"GJLlxj_dtq8\") self.assertEqual( str(error.exception), \"Too many requests. Please wait a few minutes and try again.\" ) httpretty.register_uri( httpretty.GET, \"https://www.youtube.com/watch\", body=load_asset(\"youtube.html.static\"), ) httpretty.register_uri( httpretty.GET, \"https://www.youtube.com/api/timedtext\", body=load_asset(\"transcript.xml.static\"), ) httpretty.register_uri( httpretty.GET, \"https://www.youtube.com/youtubei/v1/player\", body=load_asset", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.25806451612903225 + }, + { + "repo": "jdepoix/youtube-transcript-api", + "expected": "NotImplementedError)", + "got": "NotImplementedError)", + "got_raw": "NotImplementedError) as error: Formatter().format(self.transcript) self.assertEqual( str(error.exception), \"Base Formatter does not support formatting\" ) self.assertEqual( Formatter().format(self.transcripts), self.transcripts ) self.assertEqual( Formatter().format(self.transcripts_raw), self.transcripts_raw ) self.assertEqual( Formatter().format(self.transcript_raw), self.transcript_raw ) self.assertEqual( Formatter().format(\"test\"), \"test\" ) self.assertEqual( Formatter().format(12345), 12345 ) self.assertEqual( Formatter().format(True), True ) self.assertEqual( Formatter().format(None), None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jdepoix/youtube-transcript-api", + "expected": "\"ar\")", + "got": "\"ar\")", + "got_raw": "\"ar\") self.assertEqual(translated_transcript.language, \"Arabic\") self.assertEqual( translated_transcript.text, \"\u0645\u0631\u062d\u0628\u0627 \u0647\u0630\u0627 \u0647\u0648 \u0645\u062c\u0631\u062f \u062a\u062c\u0631\u0628\u0629\" ) self.assertEqual( translated_transcript.duration, 1.54 ) self.assertEqual( translated_transcript.start, 0.0 ) self.assertEqual( translated_transcript.end, 1.54 ) self.assertEqual( translated_transcript.id, \"GJLlxj_dtq8\" ) self.assertEqual( translated_transcript.is_generated, False ) self.assertEqual( translated_transcript.raw, self.ref_transcript_raw ) self.assertEqual( translated_transcript.sn", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jeertmans/manim-slides", + "expected": "api_name", + "got": "api_name", + "got_raw": "api_name + \".\" + slide.__name__ + \".\" + slide.__version__ + \".\" + slide.__doc__ + \".\" + slide.__file__ + \".\" + slide.__package__ + \".\" + slide.__path__ + \".\" + slide.__dict__ + \".\" + slide.__doc__ + \".\" + slide.__doc__ + \".\" + slide.__doc__ + \".\" + slide.__doc__ + \".\" + slide.__doc__ + \".\" + slide.__doc__ + \".\" + slide.__doc__ + \".\" + slide.__doc__ + \".\" + slide.__doc__ + \".\" + slide.__doc__ + \".\" + slide.__doc__", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jeertmans/manim-slides", + "expected": "expected", + "got": "expected", + "got_raw": "expected + 1 # +1 for the index.html file itself. # The index.html file is not included in the count. assert \"index.html\" not in assets_dir.iterdir() # The index.html file is not included in the count. assert \"index.html\" not in assets_dir.iterdir() # The index.html file is not included in the count. assert \"index.html\" not in assets_dir.iterdir() # The index.html file is not included in the count. assert \"index.html\" not in assets_dir.iterdir() # The index.html file is not included in the count. assert \"index.html\" not", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jeertmans/manim-slides", + "expected": "results.stdout", + "got": "results.output.lower()", + "got_raw": "results.output.lower() results = runner.invoke(cli, [\"-h\"]) assert results.exit_code == 2 results = runner.invoke(cli, [\"-s\"]) assert results.exit_code == 2 results = runner.invoke(cli, [\"--help\"]) assert results.exit_code == 0 results = runner.invoke(cli, [\"--h\"]) assert results.exit_code == 2 results = runner.invoke(cli, [\"-\"]) assert results.exit_code == 2 results = runner.invoke(cli, [\"-a\"]) assert results.exit_code == 2 results = runner.invoke(cli, [\"-b\"]) assert results.exit_code == 2 results = runner.invoke(cli,", + "exact_match": false, + "code_bleu": 0.24446151121745047, + "edit_similarity": 0.6111111111111112 + }, + { + "repo": "jeertmans/manim-slides", + "expected": "result.output", + "got": "result.output.lower()", + "got_raw": "result.output.lower() # type: ignore[result.output] # noqa: E501 result.output.lower() # noqa: E501 result.output.lower() # noqa: E501 result.output.lower() # noqa: E501 result.output.lower() # noqa: E501 result.output.lower() # noqa: E501 result.output.lower() # noqa: E501 result.output.lower() # noqa: E501 result.output.lower() # noqa: E501 result.output.lower() # noqa: E501", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.7647058823529411 + }, + { + "repo": "jeertmans/manim-slides", + "expected": "ImportError)", + "got": "ImportError)", + "got_raw": "ImportError) as exc_info: importlib.reload(slide) assert str(exc_info.value) == \"Invalid API: manim_slides\" assert slide.API_NAME == \"manim_slides\" assert slide.MANIM == False assert slide.MANIMGL == False os.environ.pop(slide.MANIM_API)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jeertmans/manim-slides", + "expected": "3", + "got": "3", + "got_raw": "3 assert base_slide.canvas[\"b\"] == 3 assert base_slide.canvas[\"c\"] == 4 assert base_slide.canvas[\"a\"] == 1 with pytest.raises(KeyError): _ = base_slide.canvas[\"d\"] base_slide.remove_from_canvas(\"b\") assert len(base_slide.canvas) == 2 assert base_slide.canvas[\"b\"] == 2 assert base_slide.canvas[\"c\"] == 4 assert base_slide.canvas[\"a\"] == 1 with pytest.raises(KeyError): _ = base_slide.canvas[\"b\"] with pytest.raises(KeyError): _ = base_slide.canvas[\"d\"] base_slide.remove_from_canvas(\"c\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "joke2k/django-environ", + "expected": "engine", + "got": "engine", + "got_raw": "engine assert config['NAME'] == name assert config['HOST'] == host assert config['USER'] == user assert config['PASSWORD'] == passwd assert config['PORT'] == port if port is not None: assert isinstance(port, int) else: assert port is None assert config['OPTIONS'] == {} if engine == 'django.contrib.gis.db.backends.postgis': assert config['OPTIONS']['options'] == '-j' else: assert config['OPTIONS'] == {} if engine == 'django.db.backends.mysql': assert config['OPTIONS']['init_command'] == 'SET sql_mode=\"STRICT_TRANS_TABLES\"' else: assert config['", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "joke2k/django-environ", + "expected": "3", + "got": "3.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "3.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "joke2k/django-environ", + "expected": "str(excinfo.value)", + "got": "str(excinfo.value)", + "got_raw": "str(excinfo.value) assert str(root('dev', 'not_existing_dir', required=True)) == '/home/dev/not_existing_dir' assert str(root('dev', 'not_existing_dir')) == '/home/dev/not_existing_dir' assert str(root('dev')) == '/home/dev' assert str(root()) == '/' assert str(root('not_existing_dir')) == '/not_existing_dir' assert str(root('not_existing_dir', 'not_existing_dir2')) == '/not_existing_dir/not_existing_dir2' assert str(root('not_existing_dir', 'not_existing_dir2', 'not_existing_dir3')) == '/not_existing_dir/not_existing", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "joke2k/django-environ", + "expected": "backend", + "got": "backend", + "got_raw": "backend + '.EmailBackend' pytest.raises(ImproperlyConfigured) as excinfo: Env.email_url_config(url) assert str(excinfo.value) == 'Invalid email URL: ' + url + '. Must include a schema.'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "joke2k/django-environ", + "expected": "587", + "got": "'587'", + "got_raw": "'587' assert email_config['EMAIL_USE_TLS'] is True assert email_config['EMAIL_USE_SSL'] is False assert email_config['EMAIL_TIMEOUT'] == 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.75 + }, + { + "repo": "joke2k/django-environ", + "expected": "1234", + "got": "1234", + "got_raw": "1234 # noqa: E501", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "joke2k/django-environ", + "expected": "{'TIMEOUT': 30}", + "got": "{'timeout': 30}", + "got_raw": "{'timeout': 30}", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5333333333333333 + }, + { + "repo": "joke2k/django-environ", + "expected": "\"channels_redis.core.RedisChannelLayer\"", + "got": "\"channels.layers.RedisChannelLayer\"", + "got_raw": "\"channels.layers.RedisChannelLayer\" assert result[\"CONFIG\"] == { \"hosts\": [\"redis://user:password@localhost:6379/0\"], } assert result[\"DEFAULT_CHANNEL_LAYER\"] == \"default\" assert result[\"PROVIDERS\"] == { \"ASGI\": [\"channels.layers\"], \"CHANNEL_LAYERS\": { \"default\": { \"BACKEND\": \"channels.layers.RedisChannelLayer\", \"CONFIG\": { \"hosts\": [\"redis://user:password@localhost:6379/0\"], }, }, }, } def test_channels_parsing_error(): with pytest.raises(ImproperlyConfigured)", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.8108108108108109 + }, + { + "repo": "joke2k/django-environ", + "expected": "None", + "got": "self.env.ENVIRON", + "got_raw": "self.env.ENVIRON # noqa: E711\n\n def test_init(self):\n \"\"\"Test Env.__init__().\"\"\"\n env = Env()\n assert env._env_file is None # noqa: E711\n assert env._env_file_encoding is None # noqa: E711\n assert env._env_file_separator is None # noqa: E711\n assert env._env_file_prefix is None # noqa: E711\n assert env._env_file_values is None # noqa: E711\n assert env._", + "exact_match": false, + "code_bleu": 0.2295748846661433, + "edit_similarity": 0.1 + }, + { + "repo": "joke2k/django-environ", + "expected": "old", + "got": "old", + "got_raw": "old + '.' + PYMEMCACHE_DRIVER + '.PyLibMCCache' + '.' + PYMEMCACHE_DRIVER + '.PyMemcacheCache' + '.' + PYMEMCACHE_DRIVER + '.PyLibMCCache' + '.' + PYMEMCACHE_DRIVER + '.PyMemcacheCache' + '.' + PYMEMCACHE_DRIVER + '.PyLibMCCache' + '.' + PYMEMCACHE_DRIVER + '.PyMemcacheCache' + '.' + PYMEMCACHE_DRIVER + '.PyLibMCCache' + '.' + PYMEMCACHE_DRIVER + '.PyMemcacheCache' + '.' + PYMEMCACHE_DRIVER + '.PyLib", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "joke2k/faker", + "expected": "\"0\"", + "got": "\"X\"", + "got_raw": "\"X\" # noqa: E501\n\n def test_check_digit_is_incorrect(self):\n isbn = ISBN10(group=\"1\", registrant=\"4516\", publication=\"7332\")\n\n assert isbn.check_digit == \"9\" # noqa: E501\n\n def test_generate(self):\n isbn = ISBN10.generate() # noqa: E501\n\n assert len(isbn) == 9 # noqa: E501\n\n def test_generate_with_check_digit(self):\n isbn = ISBN10.generate(check_digit=\"X", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "joke2k/faker", + "expected": "states", + "got": "states", + "got_raw": "states + [\"\"] # empty string for default value # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "joke2k/faker", + "expected": "(0,)", + "got": "(0,)", + "got_raw": "(0,) # seed value 0 is used for all locales assert kwargs == {} # no kwargs are used for `seed_instance` assert kwargs[\"locale\"] in locale # locale is used for `seed_instance` assert kwargs[\"random_state\"] is None # random_state is not used for `seed_instance` assert kwargs[\"generator\"] is None # generator is not used for `seed_instance` assert kwargs[\"instance\"] is None # instance is not used for `seed_instance` assert kwargs[\"random_seed\"] is None # random_seed is not used for `seed_instance`", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "joke2k/faker", + "expected": "[DEFAULT_LOCALE]", + "got": "[]", + "got_raw": "[] + DEFAULT_LOCALE + [\"en_US\"] + [\"en_GB\"] + [\"en_AU\"] + [\"en_CA\"] + [\"en_US_POSIX\"] + [\"en_US_POSIX\"] + [\"en_US_POSIX\"] + [\"en_US_POSIX\"] + [\"en_US_POSIX\"] + [\"en_US_POSIX\"] + [\"en_US_POSIX\"] + [\"en_US_POSIX\"] + [\"en_US_POSIX\"] + [\"en_US_POSIX\"] + [\"en_US_POSIX\"] + [\"en_US_POSIX\"] + [\"en_US_POSIX\"] + [\"en_US_POSIX\"] + [\"en_US", + "exact_match": false, + "code_bleu": 0.39640237166757364, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "joke2k/faker", + "expected": "{\"A\", \"B\", \"C\"}", + "got": "(\"A\", \"B\") or (\"C\",) or (\"D\",) or (\"E\",) or (\"F\",) or (\"G\",) or (\"H\",) or (\"I\",) or (\"J\",) or (\"K\",) or (\"L\",) or (\"M\",) or (\"N\",) or (\"O\",) or (\"P\",) or (\"Q\",) or (\"R\",) or (\"S\",) or (\"T\",) or (\"U\",) or (\"V\",) or (\"W\",) or (\"X\",) or (\"Y\",) or (\"Z\",) or (\"", + "got_raw": "(\"A\", \"B\") or (\"C\",) or (\"D\",) or (\"E\",) or (\"F\",) or (\"G\",) or (\"H\",) or (\"I\",) or (\"J\",) or (\"K\",) or (\"L\",) or (\"M\",) or (\"N\",) or (\"O\",) or (\"P\",) or (\"Q\",) or (\"R\",) or (\"S\",) or (\"T\",) or (\"U\",) or (\"V\",) or (\"W\",) or (\"X\",) or (\"Y\",) or (\"Z\",) or (\"", + "exact_match": false, + "code_bleu": 0.019212422944746215, + "edit_similarity": 0.08856088560885608 + }, + { + "repo": "joke2k/faker", + "expected": "self.cryptocurrencies", + "got": "self.cryptocurrencies", + "got_raw": "self.cryptocurrencies + self.cryptocurrency_codes + self.cryptocurrency_names + self.cryptocurrency_codes + self.cryptocurrency_names + self.cryptocurrency_codes + self.cryptocurrency_names + self.cryptocurrency_codes + self.cryptocurrency_names + self.cryptocurrency_codes + self.cryptocurrency_names + self.cryptocurrency_codes + self.cryptocurrency_names + self.cryptocurrency_codes + self.cryptocurrency_names + self.cryptocurrency_codes + self.cryptocurrency_names + self.cryptocurrency_codes + self.cryptocurrency_names + self.cryptocurrency_codes + self.cryptocurrency_names + self.c", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "joke2k/faker", + "expected": "3", + "got": "3", + "got_raw": "3 and set(sample) == set(\"abc\") and \"d\" not in sample and \"e\" not in sample and \"c\" in sample and \"b\" in sample and \"a\" in sample and \"d\" not in sample and \"e\" not in sample and \"c\" in sample and \"b\" in sample and \"a\" in sample and \"d\" not in sample and \"e\" not in sample and \"c\" in sample and \"b\" in sample and \"a\" in sample and \"d\" not in sample and \"e\" not in sample and \"c\" in sample and \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "joke2k/faker", + "expected": "0", + "got": "0x1", + "got_raw": "0x1 or 0x2 or 0x3 or 0x6 or 0x8 or 0xc or 0xe or 0xf or 0x10 or 0x12 or 0x13 or 0x16 or 0x18 or 0x1c or 0x1e or 0x20 or 0x22 or 0x23 or 0x26 or 0x28 or 0x2c or 0x2e or 0x30 or 0", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "joke2k/faker", + "expected": "UaProvider.apple_devices", + "got": "UaProvider.ios_devices()", + "got_raw": "UaProvider.ios_devices() + UaProvider.ios_simulators() + UaProvider.ios_fakes() + UaProvider.ios_fakes_simulators() + UaProvider.ios_fakes_simulators() + UaProvider.ios_fakes_simulators() + UaProvider.ios_fakes_simulators() + UaProvider.ios_fakes_simulators() + UaProvider.ios_fakes_simulators() + UaProvider.ios_fakes_simulators() + UaProvider.ios_fakes_simulators() + UaProvider.ios_fakes_simulators() + UaProvider", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.7916666666666666 + }, + { + "repo": "joke2k/faker", + "expected": "0", + "got": "4", + "got_raw": "4", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "joke2k/faker", + "expected": "{\"A\", \"B\"}", + "got": "elements.keys() or i == \"C\" or i == \"B\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A", + "got_raw": "elements.keys() or i == \"C\" or i == \"B\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A\" or i == \"A", + "exact_match": false, + "code_bleu": 0.011910781769766761, + "edit_similarity": 0.043478260869565216 + }, + { + "repo": "joke2k/faker", + "expected": "\"xml\"", + "got": "\"xmltodict\"", + "got_raw": "\"xmltodict\" \"xmltodict is not installed\" \"Please install it to use this feature.\" \"You can install it with pip install xmltodict\" \"or use the 'xml' function instead.\" \"You can find more information about this feature at\" \"https://faker.readthedocs.io/en/master/locales.html#xml\" \"https://github.com/jazzband/faker/blob/master/docs/locales.rst#xml\" \"https://github.com/jazzband/faker/blob/master/docs/usage.rst#xml\" \"https://github.com/jazzband/faker/blob/master/docs/usage.rst", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.625 + }, + { + "repo": "joke2k/faker", + "expected": "1", + "got": "1", + "got_raw": "1\r\n assert str(w[0].message) == \"value_types must be a list\" assert some_list is None some_list = self.factory.pylist(10, True, int, value_types=[int]) assert some_list is not None assert some_list is not None for item in some_list: assert isinstance(item, int) some_list = self.factory.pylist(10, True, int, value_types=[int, str]) assert some_list is not None for item in some_list: assert isinstance(item, (int, str)) some_list = self.factory.pylist(10, True, int, value", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "joke2k/faker", + "expected": "\"X\"", + "got": "\"9\"", + "got_raw": "\"9\" # 10 - 1 = 9 # 10 - 2 = 8 # 10 - 3 = 7 # 10 - 4 = 6 # 10 - 5 = 5 # 10 - 6 = 4 # 10 - 7 = 3 # 10 - 8 = 2 # 10 - 9 = 1 # 10 - 10 = 0 # 10 - 11 = 9 #", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "joke2k/faker", + "expected": "5", + "got": "len(names)", + "got_raw": "len(names) # All names should be unique\n\n def test_exclude_types(self):\n \"\"\"Test that types can be excluded from uniqueness checks.\"\"\"\n proxy = self.fake.unique.exclude_types([str])\n\n # First names should be unique\n first_names = [proxy.first_name() for _ in range(5)]\n\n assert len(set(first_names)) == 5 # All first names should be unique\n\n def test_exclude_types_with_custom_types(self):\n \"\"\"Test that custom types can be excluded from uniqueness checks.\"\"\"\n proxy = self.fake.unique.exclude_types([str, int])\n\n ", + "exact_match": false, + "code_bleu": 0.3021375397356768, + "edit_similarity": 0.0 + }, + { + "repo": "joke2k/faker", + "expected": "[]", + "got": "[]", + "got_raw": "[]\n\n def test_words_with_one_nb(self, faker, num_samples):\n for _ in range(num_samples):\n assert len(faker.words(1)) == 1\n\n def test_words_with_two_nb(self, faker, num_samples):\n for _ in range(num_samples):\n assert len(faker.words(2)) == 2\n\n def test_words_with_three_nb(self, faker, num_samples):\n for _ in range(num_samples):\n assert len(faker.words(3)) == 3\n\n def test_words_with_four_nb(self, faker, num_samples):\n for _ in range(num", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "joke2k/faker", + "expected": "\"3\"", + "got": "\"0\"", + "got_raw": "\"0\"\n\n def test_check_digit_is_incorrect(self):\n sbn = SBN9(registrant=\"340\", publication=\"01381\")\n assert sbn.check_digit != \"1\"\n sbn = SBN9(registrant=\"06\", publication=\"230125\")\n assert sbn.check_digit != \"3\"\n sbn = SBN9(registrant=\"10103\", publication=\"202\")\n assert sbn.check_digit != \"1\"\n\n def test_generate(self):\n sbn", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "joke2k/faker", + "expected": "random", + "got": "random", + "got_raw": "random or None # noqa: E711 pylint: disable=comparison-with-callable", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "joke2k/faker", + "expected": "3", + "got": "3", + "got_raw": "3 and country_code.isupper() is True and country_code in providers.address.COUNTRY_CODE_ALPHA_3_LIST[1:] # noqa: E501\n\n\nclass TestCountryProvider:\n def test_country(self, faker, num_samples):\n for _ in range(num_samples):\n country = faker.country()\n\n assert country in providers.address.COUNTRIES.values() # noqa: E501\n\n\nclass TestCountryCodeProvider:\n def test_country_code(self, faker, num_samples):\n for _ in range(num_samples):\n country_code = faker.country_code()\n\n assert len(country_code) == ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "joke2k/faker", + "expected": "count", + "got": "count", + "got_raw": "count\n\n Faker.seed(2043)\n fake = Faker([\"en_GB\", \"fr_FR\", \"en_IN\"])\n second_list = [fake.name() for _ in range(count)]\n # We convert the list to a set to remove duplicates and ensure\n # that we have exactly `count` unique fake values\n\n assert len(set(second_list)) == count\n\n Faker.seed(2043)\n fake = Faker([\"en_GB\", \"fr_FR\", \"en_IN\"])\n third_list = [fake.name() for _ in range(count)]\n # We convert the list to", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jonatasgrosman/findpapers", + "expected": "paper_entry.get(\"issn\")", + "got": "paper_entry.get(\"issn\")", + "got_raw": "paper_entry.get(\"issn\") assert publication.doi == paper_entry.get(\"doi\") assert publication.publisher == paper_entry.get(\"publisher\") assert publication.content_type == paper_entry.get(\"content_type\") assert publication.pdf_url == paper_entry.get(\"pdf_url\") assert publication.abstract == paper_entry.get(\"abstract\") assert publication.citing_paper_count == 10 assert publication.authors == [ \"author A\", \"author B\", ] assert publication.index_terms == { \"author_terms\": { \"terms\": [\"term A\", \"term B\"], }, } assert publication.publication_date == datetime.date(2020, 3,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jonatasgrosman/findpapers", + "expected": "0", + "got": "0", + "got_raw": "0 # No papers found yet. search.add_paper(paper) assert len(search.papers) == 1 assert search.papers[0] == paper # The paper is added to the search. search.add_paper(paper) assert len(search.papers) == 1 # The paper is not added again. search.add_paper(Paper(\"doi:10.1234/5678\", \"title\", \"author\", \"journal\", \"year\", \"volume\", \"issue\", \"pages\")) assert len(search.papers) == 2 # A new", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jonatasgrosman/findpapers", + "expected": "None", + "got": "None", + "got_raw": "None # noqa: E711 # type: ignore # noqa: E501 # type: ignore # noqa: E711 # type: ignore # noqa: E501 # type: ignore # noqa: E711 # type: ignore # noqa: E501 # type: ignore # noqa: E711 # type: ignore # noqa: E501 # type: ignore # noqa: E711 # type: ignore # noqa: E501 #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jonatasgrosman/findpapers", + "expected": "paper_entry.get(\"publication_title\")", + "got": "\"Title", + "got_raw": "\"Title fake\" assert publication.doi == \"fakeDOI\" assert publication.citing_paper_count == 10 assert publication.abstract == \"a long fake abstract\" assert publication.publication_title == \"fake publication title\" assert publication.isbn == \"fake ISBN\" assert publication.issn == \"fake ISSN\" assert publication.publisher == \"publisher X\" assert publication.content_type == \"journal\" assert publication.pdf_url == \"http://pdf_url\" assert publication.index_terms == {\"author_terms\": {\"terms\": [\"term A\", \"term B\"]}} assert publication.authors == [ {\"full_name\": \"author A\"}, {\"full_name", + "exact_match": false, + "code_bleu": 0.15060033393497413, + "edit_similarity": 0.23809523809523808 + }, + { + "repo": "jonatasgrosman/findpapers", + "expected": "numeric_format", + "got": "int(numeric_format)", + "got_raw": "int(numeric_format) - 1 # month is 0-indexed in Python's datetime module.", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.8484848484848485 + }, + { + "repo": "jonatasgrosman/findpapers", + "expected": "None", + "got": "None", + "got_raw": "None # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jonatasgrosman/findpapers", + "expected": "result", + "got": "result", + "got_raw": "result # 2 is the default value if the function returns None # or an exception is raised. 1 is the fallback value if the function returns None # or an exception is raised. # The function returns 10 / 0, which raises a ZeroDivisionError exception. # The fallback value is used instead. # The function returns 10 / 0, which raises a ZeroDivisionError exception. # The fallback value is used instead. # The function returns 10 / 0, which raises a ZeroDivisionError exception. # The fallback value is used instead.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jonghwanhyeon/python-ffmpeg", + "expected": "target[\"streams\"][0][\"codec_name\"]", + "got": "target[\"streams\"][0][\"codec_name\"]", + "got_raw": "target[\"streams\"][0][\"codec_name\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jonghwanhyeon/python-ffmpeg", + "expected": "[\"-y\", \"-codec\", \"copy\", \"-i\", os.fspath(pier39_path)]", + "got": "[\"-y\", \"-i\", str(pier39_path)] + [\"-codec\", \"copy\"] + [\"-f\", \"mp4\"] + [\"-y\"] + [\"-loglevel\", \"verbose\"] + [\"-vcodec\", \"copy\"] + [\"-acodec\", \"copy\"] + [\"-f\", \"mp4\"] + [\"-y\"] + [\"-loglevel\", \"verbose\"] + [\"-vcodec\", \"copy\"] + [\"-acodec\", \"copy\"] + [\"-f\", \"mp4\"] + [\"-y\"] + [\"-loglevel\", \"verbose", + "got_raw": "[\"-y\", \"-i\", str(pier39_path)] + [\"-codec\", \"copy\"] + [\"-f\", \"mp4\"] + [\"-y\"] + [\"-loglevel\", \"verbose\"] + [\"-vcodec\", \"copy\"] + [\"-acodec\", \"copy\"] + [\"-f\", \"mp4\"] + [\"-y\"] + [\"-loglevel\", \"verbose\"] + [\"-vcodec\", \"copy\"] + [\"-acodec\", \"copy\"] + [\"-f\", \"mp4\"] + [\"-y\"] + [\"-loglevel\", \"verbose", + "exact_match": false, + "code_bleu": 0.0731736510111062, + "edit_similarity": 0.19020172910662825 + }, + { + "repo": "jonghwanhyeon/python-ffmpeg", + "expected": "target[\"streams\"][0][\"codec_name\"]", + "got": "target[\"streams\"][0][\"codec_name\"]", + "got_raw": "target[\"streams\"][0][\"codec_name\"] assert source[\"streams\"][0][\"codec_type\"] == target[\"streams\"][0][\"codec_type\"] assert source[\"streams\"][0][\"codec_time_base\"] == target[\"streams\"][0][\"codec_time_base\"] assert source[\"streams\"][0][\"codec_tag_string\"] == target[\"streams\"][0][\"codec_tag_string\"] assert source[\"streams\"][0][\"codec_tag\"] == target[\"streams\"][0][\"codec_tag\"] assert source[\"streams\"][0][\"r_frame_rate\"] == target[\"streams\"][0][\"r_frame_rate\"] assert source[\"streams\"][0][\"avg_frame_rate\"] == target", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jonghwanhyeon/python-ffmpeg", + "expected": "target[\"format\"][\"format_name\"]", + "got": "target[\"format\"][\"format_name\"]", + "got_raw": "target[\"format\"][\"format_name\"] and \"mov\" in target[\"format\"][\"format_name\"] and \"video\" in target[\"format\"][\"format_name\"] and \"audio\" in target[\"format\"][\"format_name\"] and \"data\" in target[\"format\"][\"format_name\"] and \"subtitle\" in target[\"format\"][\"format_name\"] and \"webm\" in target[\"format\"][\"format_name\"] and \"h264\" in target[\"format\"][\"format_name\"] and \"aac\" in target[\"format\"][\"format_name\"] and \"vorbis\" in target[\"format\"][\"format_name\"] and \"opus\" in target[\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jonghwanhyeon/python-ffmpeg", + "expected": "FFmpegUnsupportedCodec)", + "got": "FFmpegUnsupportedCodec)", + "got_raw": "FFmpegUnsupportedCodec) as exc_info: await FFmpeg( source_path, target_path, \"-c:v libx264\", \"-c:a aac\", \"-b:a 128k\", \"-ar 44100\", \"-f mp4\", ).run_asyncio() assert str(exc_info.value) == \"libx264 is not a supported encoder\" assert exc_info.value.code == \"libx264\" assert exc_info.value.name == \"x264\" assert exc_info.value.version == \"1\" assert exc_info.value.long_name == \"x264\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "joouha/euporie", + "expected": "invalidate_count", + "got": "invalidate_count", + "got_raw": "invalidate_count + 1 if invalidate_count > 0 else 0 if is_async else 2 else 0 if is_async else 1 if invalidate_count > 0 else 0 if is_async else 0 if invalidate_count > 0 else 1 if is_async else 0 if is_async else 0 if is_async else 0 if is_async else 0 if is_async else 0 if is_async else 0 if is_async else 0 if is_async else 0 if is_async else 0 if is_async else 0 if is_async else 0 if is_async else 0 if is_async", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "joouha/euporie", + "expected": "sized_datum", + "got": "size", + "got_raw": "size # Check that the datum is retrieved correctly result = Datum.get_datum(key) assert result is datum # Check that the datum is deleted correctly Datum.delete_size(key) assert key not in Datum._sizes # Check that the datum is deleted correctly Datum.delete_datum(datum) assert datum not in Datum._datums # Check that the datum is deleted correctly Datum.delete_all() assert Datum._sizes == {} assert Datum._datums == {} # Check that the datum is deleted correctly Datum.delete_all() assert Datum._sizes == {} assert Datum._dat", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5333333333333333 + }, + { + "repo": "joouha/euporie", + "expected": "(10, 20)", + "got": "(10, 20)", + "got_raw": "(10, 20) # SVGs are rendered as 1x1 pixels.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "joouha/euporie", + "expected": "\"a\"", + "got": "\"a\"", + "got_raw": "\"a\" * 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "joouha/euporie", + "expected": "\"", + "got": "\"", + "got_raw": "\"#123456\"\n assert palette.test_color.base_rgb == (18, 52, 86)\n assert palette.test_color.base_rgba == (18, 52, 86, 255)\n assert palette.test_color.base_hsl == (240, 100, 50)\n assert palette.test_color.base_hsla == (240, 100, 50, 1)\n assert palette.test_color.base_cmyk == (0, 0, 0, 1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "joouha/euporie", + "expected": "[]", + "got": "[]", + "got_raw": "[] 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "joouha/euporie", + "expected": "0.25", + "got": "16", + "got_raw": "16 / 8.0", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "joouha/euporie", + "expected": "\"c\"", + "got": "\"c\"", + "got_raw": "\"c\" assert d.left == \"d\" d.top = \"x\" d.right = \"y\" d.bottom = \"z\" d.left = \"w\" assert d.top == \"x\" assert d.right == \"y\" assert d.bottom == \"z\" assert d.left == \"w\" d.top = \"a\" d.right = \"b\" d.bottom = \"c\" d.left = \"d\" assert d.top == \"a\" assert d.right == \"b\" assert d.bottom == \"c\" assert d.left == \"d\" d.top = \"x\" d.right = \"y\" d.bottom =", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "joouha/euporie", + "expected": "\"text/html\"", + "got": "\"text/html\"", + "got_raw": "\"text/html\" assert get_mime(\"tests/data/text/test.txt\") == \"text/plain\" assert get_mime(\"tests/data/text/test.md\") == \"text/markdown\" assert get_mime(\"tests/data/text/test.json\") == \"application/json\" assert get_mime(\"tests/data/text/test.yml\") == \"text/yaml\" assert get_mime(\"tests/data/text/test.csv\") == \"text/csv\" assert get_mime(\"tests/data/text/test.rst\") == \"text/x-rst\" assert get_mime(\"tests/data/text/test.tex\") == \"application/x-tex\" assert get_mime(\"tests/data/text/test.py\") == \"text", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "joouha/euporie", + "expected": "[ (\"ansigreen\", \"H\"), (\"ansigreen\", \"e\"), (\"ansigreen bg:ansimagenta\", \"l\"), (\"ansigreen bg:ansimagenta\", \"l\"), (\"ansigreen bg:ansimagenta\", \"o\"), ]", + "got": "[ (\"\", \"He\"), (\"\", \"\\x1b[45m\"), (\"\", \"llo\"), (\"\", \"\\x1b[0m\"), ]", + "got_raw": "[ (\"\", \"He\"), (\"\", \"\\x1b[45m\"), (\"\", \"llo\"), (\"\", \"\\x1b[0m\"), ]", + "exact_match": false, + "code_bleu": 0.1770647784462891, + "edit_similarity": 0.43601895734597157 + }, + { + "repo": "joouha/euporie", + "expected": "\"my_cmd_2\"", + "got": "\"my_cmd_2\"", + "got_raw": "\"my_cmd_2\" assert commands[\"my_cmd_2\"].description == \"This is my second command\" assert commands[\"my_cmd_2\"].title == \"My Command 2\" assert commands[\"my_cmd_2\"].menu_title == \"My Command 2 Menu Title\" assert commands[\"my_cmd_2\"].description == \"This is my second command\" assert commands[\"my_cmd_2\"].title == \"My Command 2\" assert commands[\"my_cmd_2\"].menu_title == \"My Command 2 Menu Title\" assert commands[\"my_cmd_2\"].description == \"This is my second command\" assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "joouha/euporie", + "expected": "2", + "got": "2.0000000000000004", + "got_raw": "2.0000000000000004 # 2.0000000000000004 is the float representation of 2.0000000000000004 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 ", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.10526315789473684 + }, + { + "repo": "joouha/euporie", + "expected": "\"value\"", + "got": "\"value\"", + "got_raw": "\"value\" assert icomm.sync is True assert icomm._state == {} assert icomm._buffer == [] assert icomm._buffered is False assert icomm._buffered_data == {} assert icomm._buffered_key == \"\" assert icomm._buffered_value == \"\" assert icomm._buffered_type == \"\" assert icomm._buffered_format == \"\" assert icomm._buffered_mime == \"\" assert icomm._buffered_data_type == \"\" assert icomm._buffered_data_format == \"\" assert icomm._buffered_data_mime == \"\" assert icomm._buffered_data_type == \"\" assert icomm._", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "joouha/euporie", + "expected": "{x[0] for x in result}", + "got": "result[1]", + "got_raw": "result[1] # type: ignore [attr-defined] result[1] = \"b\" result[2] = \"c\" assert to_plain_text(result) == \"abc\" assert to_formatted_text(result) == [(0, \"a\"), (1, \"b\"), (2, \"c\")]", + "exact_match": false, + "code_bleu": 0.17091480255849364, + "edit_similarity": 0.3870967741935484 + }, + { + "repo": "joouha/euporie", + "expected": "async_utils._LOOPS", + "got": "async_utils._LOOPS.keys()", + "got_raw": "async_utils._LOOPS.keys() # type: ignore [attr-defined] # noqa: E501 [type: ignore] [attr-defined] [type: ignore] [attr-defined] [type: ignore] [attr-defined] [type: ignore] [attr-defined] [type: ignore] [attr-defined] [type: ignore] [attr-defined] [type: ignore] [attr-defined] [type: ignore] [attr-defined] [type: ignore] [attr-defined] [type: ignore] [attr-defined] [type: ignore] [attr-defined] [type: ignore]", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.8372093023255814 + }, + { + "repo": "jorisroovers/gitlint", + "expected": "1)", + "got": "2)", + "got_raw": "2) self.assertEqual(config.ignore, [\"A100\"]) self.assertEqual(config.warn, [\"A101\"]) self.assertEqual(config.error, [\"A102\"]) self.assertEqual(config.fatal, [\"A103\"]) self.assertEqual(config.strict, [\"A104\"]) self.assertEqual(config.strict_files, [\"*.py\"]) self.assertEqual(config.strict_files_exclude, [\"*.pyc\"]) self.assertEqual(config.strict_files_include, [\"*.py\"]) self.assertEqual(config.strict_files_exclude, [\"*.pyc\"]) self.assertEqual(config.strict_files_include, [\"*.py\"]) self.assertEqual(config.strict_files_exclude, [\"*.pyc\"]) self.assertEqual", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "jorisroovers/gitlint", + "expected": "[])", + "got": "[])", + "got_raw": "[])\n\n # invalid value\n with self.assertRaises(RuleOptionError) as err:\n option.set(\"1,2,3,4,5\")\n self.assertEqual(str(err.exception), \"Invalid value '1,2,3,4,5' for option 't\u00ebst-name'\")\n\n def test_regex_option(self):\n # normal behavior\n option = RegexOption(\"t\u00ebst-name\", \"\u00e5,b,c,d\", \"T\u00ebst Description\")\n self.assertEqual(option.name, \"t\u00ebst-name\")\n self.assertEqual(option.description, \"T\u00ebst Description\")\n self", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jorisroovers/gitlint", + "expected": "3)", + "got": "0)", + "got_raw": "0) self.assertEqual(config.show_all, False) self.assertEqual(config.show_all_commits, False) self.assertEqual(config.show_all_files, False) self.assertEqual(config.show_all_files_with_diff, False) self.assertEqual(config.show_all_files_with_diff_only, False) self.assertEqual(config.show_all_files_with_diff_only_with_diff, False) self.assertEqual(config.show_all_files_with_diff_only_with_diff_only, False) self.assertEqual(config.show_all_files_with_diff_only_with_diff_only_with_diff, False) self.assertEqual(config.show_all_files_with_diff_only_with_diff_only_with_diff_only, False) self.assertEqual(config.show_all_files_with_diff_only_with_diff_only", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "jorisroovers/gitlint", + "expected": "[\"T1\", \"B3\"])", + "got": "[\"T1\", \"B3\"])", + "got_raw": "[\"T1\", \"B3\"]) # ignore - set by bool # True config.set_general_option(\"ignore\", True) self.assertEqual(config.ignore, [\"*\"]) # ignore - set by bool # False config.set_general_option(\"ignore\", False) self.assertEqual(config.ignore, []) # ignore - set by int config.set_general_option(\"ignore\", 1) self.assertEqual(config.ignore, [1]) # ignore - set by int config.set_general_option(\"ignore\", 2) self.assertEqual(config.ignore, [2]) # ignore - set by int config.set_general_option(\"ignore\", 3) self.assertEqual(config.ignore, [3])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jorisroovers/gitlint", + "expected": "config)", + "got": "config)", + "got_raw": "config)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jorisroovers/gitlint", + "expected": "OrderedDict({\"my-r\u00fcle\": expected}))", + "got": "{expected.id: expected}) self.assertDictEqual(collection._rules_by_id", + "got_raw": "{expected.id: expected}) self.assertDictEqual(collection._rules_by_id, {expected.id: expected}) self.assertDictEqual(collection._rules_by_name, {expected.name: expected}) self.assertDictEqual(collection._rules_by_name_lower, {expected.name.lower(): expected}) self.assertDictEqual(collection._rules_by_name_upper, {expected.name.upper(): expected}) self.assertDictEqual(collection._rules_by_name_title, {expected.name.title(): expected}) self.assertDictEqual(collection._rules_by_name_title_lower, {expected.name.title().lower(): expected}) self.assertDictEqual(collection._rules_by_name_title_upper, {expected.name", + "exact_match": false, + "code_bleu": 0.2490328638846773, + "edit_similarity": 0.3269230769230769 + }, + { + "repo": "jorisroovers/gitlint", + "expected": "\"core.commentchar\")", + "got": "\"core.commentchar\")", + "got_raw": "\"core.commentchar\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jorisroovers/gitlint", + "expected": "violations)", + "got": "violations)", + "got_raw": "violations) # Single violation when 'Signed-off-by' line is missing # and 'Signed-off-by' is not optional self.gitcommit(\"F\u00f6obar\\n\\nMy Body\")) violations = rule.validate(self.gitcommit(\"F\u00f6obar\\n\\nMy Body\")) self.assertEqual(1, len(violations)) self.assertEqual( \"Missing 'Signed-off-by' line\", str(violations[0])) # Multiple violations when 'Signed-off-by' line is missing # and 'Signed-off-by' is optional self.gitcommit(\"F\u00f6obar\\n\\nMy Body\\nSigned-off-by: John Smith\")) violations = rule.validate(self.git", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jorisroovers/gitlint", + "expected": "None)", + "got": "\"commit\")", + "got_raw": "\"commit\") self.assertEqual(actual_rule.description, \"my commit rule\") self.assertEqual(actual_rule.code, \"UC1\") self.assertEqual(actual_rule.severity, rules.Severity.INFO) self.assertEqual(actual_rule.enabled, True) self.assertEqual(actual_rule._options, {}) self.assertEqual(actual_rule._options_default, {}) self.assertEqual(actual_rule._options_allowed, {}) self.assertEqual(actual_rule._options_required, []) self.assertEqual(actual_rule._options_valid, {}) self.assertEqual(actual_rule._options_valid_default, {}) self.assertEqual(actual_rule._options_valid_allowed, {}) self.assertEqual(actual_rule._options_valid_required, []) self.assertEqual(actual_rule._options_valid_valid,", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.2857142857142857 + }, + { + "repo": "jorisroovers/gitlint", + "expected": "user_rules_path)", + "got": "user_rules_path)", + "got_raw": "user_rules_path) self.assertEqual(config.rules[\"my-\u00fcser-commit-rule\"].violation_count, 3) self.assertEqual(config.rules[\"my-\u00fcser-commit-rule\"].name, \"my-\u00fcser-commit-rule\") self.assertEqual(config.rules[\"my-\u00fcser-commit-rule\"].description, \"My user commit rule\") self.assertEqual(config.rules[\"my-\u00fcser-commit-rule\"].violation_count, 3) self.assertEqual(config.rules[\"my-\u00fcser-commit-rule\"].severity, 2) self.assertEqual(config.rules[\"my-\u00fcser-commit-rule\"].tags, [\"commit\"]) self.assertEqual(config.rules[\"my-\u00fcser-commit", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jorisroovers/gitlint", + "expected": "expected_log_messages)", + "got": "expected_log_messages)", + "got_raw": "expected_log_messages) # commit ignored -> nothing logged", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jorisroovers/gitlint", + "expected": "72)", + "got": "80)", + "got_raw": "80) self.assertEqual(config.get_rule_option(\"body-max-length\", \"line-length\"), 120) self.assertEqual(config.get_rule_option(\"body-max-length\", \"word-length\"), 10) self.assertEqual(config.get_rule_option(\"body-max-length\", \"char-length\"), 10) self.assertEqual(config.get_rule_option(\"body-max-length\", \"char-length-2\"), 10) self.assertEqual(config.get_rule_option(\"body-max-length\", \"char-length-3\"), 10) self.assertEqual(config.get_rule_option(\"body-max-length\", \"char-length-4\"), 10) self.assertEqual(config.get", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "jorisroovers/gitlint", + "expected": "rules.BodyHardTab())", + "got": "rules.BodyHardTab())", + "got_raw": "rules.BodyHardTab())", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jorisroovers/gitlint", + "expected": "expected)", + "got": "expected)", + "got_raw": "expected) self.assertTrue(install_hook.called) self.assertEqual(result.exit_code, 0) self.assertEqual(result.output, expected) self.assertEqual(result.output, expected) self.assertEqual(result.output, expected) self.assertEqual(result.output, expected) self.assertEqual(result.output, expected) self.assertEqual(result.output, expected) self.assertEqual(result.output, expected) self.assertEqual(result.output, expected) self.assertEqual(result.output, expected) self.assertEqual(result.output, expected) self.assertEqual(result.output, expected) self.assertEqual(result.output, expected) self.assertEqual(result.output, expected) self.assertEqual(result.output, expected) self.assertEqual(result.output, expected) self.assertEqual(result.output,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jorisroovers/gitlint", + "expected": "120)", + "got": "120)", + "got_raw": "120) self.assertEqual(config.get_rule_option(\"title-must-not-contain-word\", \"words\"), [\"h\u00e5ha\"]) self.assertEqual(config.get_rule_option(\"title-must-not-contain-word\", \"case-sensitive\"), False) self.assertEqual(config.get_rule_option(\"title-must-not-contain-word\", \"case-insensitive\"), True) self.assertEqual(config.get_rule_option(\"title-must-not-contain-word\", \"case-insensitive\", True), False) self.assertEqual(config.get_rule_option(\"title-must-not-contain-word\", \"case-insensitive\", False), True) self.assertEqual(config.get_rule_option(\"title-must", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jorisroovers/gitlint", + "expected": "\"f\u00f6o\")", + "got": "\"f\u00f6o\")", + "got_raw": "\"f\u00f6o\") self.assertEqual(option.default, \"f\u00f6o\") self.assertEqual(option.required, False) self.assertEqual(option.choices, []) self.assertEqual(option.type, str) self.assertEqual(option.validate(\"f\u00f6o\"), \"f\u00f6o\") self.assertEqual(option.validate(\"f\u00f6o\"), \"f\u00f6o\") self.assertEqual(option.validate(\"f\u00f6o\"), \"f\u00f6o\") self.assertEqual(option.validate(\"f\u00f6o\"), \"f\u00f6o\") self.assertEqual(option.validate(\"f\u00f6o\"), \"f\u00f6o\") self.assertEqual(option.validate(\"f\u00f6o\"), \"f\u00f6o\") self.assertEqual(option.validate(\"f\u00f6o\"), \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jorisroovers/gitlint", + "expected": "len(class_names))", + "got": "len(class_names))", + "got_raw": "len(class_names)) # Check that all ids are unique self.assertEqual(len(set(class_ids)), len(class_ids)) # Check that all ids are unique for id in class_ids: self.assertNotIn(id, class_ids[:class_ids.index(id)] + class_ids[class_ids.index(id) + 1:]) # Check that all ids are unique for id in class_ids: self.assertNotIn(id, class_ids[:class_ids.index(id)] + class_ids[class_ids.index(id) + 1:]) # Check that all ids are unique for id in class_ids: self.assertNotIn(id, class_ids[:class_ids.index(id)] + class_ids[class", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jorisroovers/gitlint", + "expected": "stdout.getvalue())", + "got": "stderr.getvalue())", + "got_raw": "stderr.getvalue()) self.assertEqual(\"\", stdout.getvalue())", + "exact_match": false, + "code_bleu": 0.8091067115702212, + "edit_similarity": 0.8333333333333334 + }, + { + "repo": "jowilf/starlette-admin", + "expected": "303", + "got": "303", + "got_raw": "303 response.headers[\"Location\"] == \"/admin/record/2\" record = session.scalar(select(Record).where(Record.id1 == \"second.record\")) assert record.id1 == \"second.record\" assert record.id2 == 2 assert record.id3 is True assert record.name == \"2nd record\" response = await client.get(\"/admin/record/2\") assert response.status_code == 200 assert response.text.count(\"2nd record\") == 1 response = await client.get(\"/admin/record/2/edit\") assert response.status_code == 200 assert response.text.count(\"2nd record", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jowilf/starlette-admin", + "expected": "2", + "got": "2", + "got_raw": "2 data[\"items\"][0][\"name\"] == \"Sheldon Cole\" data[\"items\"][0][\"address\"][\"city\"] == \"Louisville\" data[\"items\"][0][\"hobbies\"] == [] data[\"items\"][0][\"birthday\"] == \"2014-01-16\" data[\"items\"][1][\"name\"] == \"Hills Terrill\" data[\"items\"][1][\"address\"][\"city\"] == \"Grass Valley\" data[\"items\"][1][\"hobbies\"] == [] data[\"items\"][1][\"birthday\"] == \"2007-11-06\" response = await", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jowilf/starlette-admin", + "expected": "303", + "got": "303", + "got_raw": "303 response.headers[\"Location\"] == \"/admin/setting/1\" assert response.headers[\"Location\"].startswith( \"/admin/setting/\" ) assert response.headers[\"Location\"].endswith(\"/1\") response = client.get(\"/admin/setting/1\") assert response.status_code == 200 assert response.text.startswith( \"

Setting 1

\" ) assert response.text.endswith( \"

http://www.example1.com

\" \"

http://www.example2.com

\" \"

key1: value1

\" \"

key2: value2 0\n\n # Check that the month is 2 digits and greater than 0.\n month = date_fields[1]\n assert len(month) == 2 and month.isdigit() and int(month) > 0\n\n # Check that the day is 2 digits and greater than 0.\n day = date_fields[2]\n assert len(day) == 2 and day.isdigit() and int(day) > 0\n\n # Ensure the commands are a list.\n assert type(guide[\"commands\"]) is list\n\n # Ensure each command is a", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "jtesta/ssh-audit", + "expected": "('libssh', '0.7.4', False)", + "got": "('libssh', '10.7.4', False) assert ver('l10.7.4c') == ('libssh', '10.7.4', True) assert ver('1.99.4') == ('OpenSSH', '1.99.4', False) assert ver('1.99.4c') == ('OpenSSH', '1.99.4', True) assert ver('1.99.4b') == ('OpenSSH', '1.99.4', False) assert ver('1.99.4b", + "got_raw": "('libssh', '10.7.4', False) assert ver('l10.7.4c') == ('libssh', '10.7.4', True) assert ver('1.99.4') == ('OpenSSH', '1.99.4', False) assert ver('1.99.4c') == ('OpenSSH', '1.99.4', True) assert ver('1.99.4b') == ('OpenSSH', '1.99.4', False) assert ver('1.99.4b", + "exact_match": false, + "code_bleu": 0.04541118456870644, + "edit_similarity": 0.18181818181818182 + }, + { + "repo": "karlicoss/HPI", + "expected": "pd.DataFrame(data={ 'value': ['aba' , np.nan , 'cde' , np.nan ], 'error': [np.nan, 'RuntimeError: whoops\\n', np.nan, \"RuntimeError: ('exception with datetime', datetime.datetime(2024, 8, 19, 22, 47, 1, tzinfo=datetime.timezone.utc))\\n\"],", + "got": "pd.DataFrame(data={ 'value': ['aba', np.nan, 'cde', np.nan], 'error': [np.nan, 'RuntimeError: whoops\\n', np.nan, 'RuntimeError: exception with datetime\\n'], 'dt' : [np.nan, np.nan, np.nan, '2024-08-19 22:47:01+00:00'], }))", + "got_raw": "pd.DataFrame(data={ 'value': ['aba', np.nan, 'cde', np.nan], 'error': [np.nan, 'RuntimeError: whoops\\n', np.nan, 'RuntimeError: exception with datetime\\n'], 'dt' : [np.nan, np.nan, np.nan, '2024-08-19 22:47:01+00:00'], })) # fmt: skip) def test_check_error_column() -> None: from pandas import DataFrame from pandas.testing import assert_frame_equal from pandas.io.json import json_normalize from pandas.io.json._", + "exact_match": false, + "code_bleu": 0.6085034578491236, + "edit_similarity": 0.6334056399132321 + }, + { + "repo": "karlicoss/HPI", + "expected": "timedelta(days=7.0 + 5.0, hours=5.0, minutes=10.0, seconds=50.0)", + "got": "timedelta(weeks=1, days=5, hours=5, minutes=10, seconds=50)", + "got_raw": "timedelta(weeks=1, days=5, hours=5, minutes=10, seconds=50) # noqa: B904 res = parse_timedelta_string(\"2m4s\") assert res == timedelta(minutes=2, seconds=4) # noqa: B904 res = parse_timedelta_string(\"1h\") assert res == timedelta(hours=1) # noqa: B904 res = parse_timedelta_string(\"1d\") assert res == timedelta(days=1) # noqa: B904 res = parse_timedelta_string(\"1w\") assert", + "exact_match": false, + "code_bleu": 0.2245166162074563, + "edit_similarity": 0.8130081300813008 + }, + { + "repo": "karlicoss/HPI", + "expected": "123", + "got": "val.typed", + "got_raw": "val.typed # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type:", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.0 + }, + { + "repo": "karlicoss/HPI", + "expected": "RuntimeError)", + "got": "RuntimeError)", + "got_raw": "RuntimeError) as e: select(_mixed_iter_errors(), where=lambda o: isinstance(o, _A)) select(_mixed_iter_errors(), where=lambda o: isinstance(o, _B)) select(_mixed_iter_errors(), where=lambda o: isinstance(o, _A), drop_exceptions=False) select(_mixed_iter_errors(), where=lambda o: isinstance(o, _B), drop_exceptions=False) select(_mixed_iter_errors(), where=lambda o: isinstance(o, _A), raise_exceptions=True) select(_mixed_iter_errors(), where=lambda o: isinstance(o, _B), raise_exceptions=True) select(_mixed_iter_errors(), where=lambda o:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "karlicoss/HPI", + "expected": "[\"0\", \"1\", \"2\"]", + "got": "[\"0\", \"1\", \"2\"]", + "got_raw": "[\"0\", \"1\", \"2\"] # noqa: B904 # noqa: B904 # noqa: B904 # noqa: B904 # noqa: B904 # noqa: B904 # noqa: B904 # noqa: B904 # noqa: B904 # noqa: B904 # noqa: B904 # noqa: B904 # noqa: B904 # noqa: B904 # noqa: B90", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "karlicoss/HPI", + "expected": "[obj]", + "got": "[obj]", + "got_raw": "[obj] # noqa: B904", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "karlicoss/HPI", + "expected": "'Europe/Rome'", + "got": "'Europe/Vienna'", + "got_raw": "'Europe/Vienna' # 2017-07-30 10:00:00 is in the summer time in Austria, but not in the test data. tz = get_tz(datetime.fromisoformat('2017-07-29 10:00:00')) assert notnone(tz).zone == 'Europe/Vienna' # 2017-07-29 10:00:00 is in the winter time in Austria, but not in the test data. tz = get_t", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.7142857142857143 + }, + { + "repo": "karlicoss/HPI", + "expected": "None", + "got": "None", + "got_raw": "None # todo add exc message?\n path = Path(path) # todo add exc message?\n if path.suffix == '.py' and path.parent.name == 'tests': # todo add exc message?\n return 'test module' # todo add exc message?\n if path.parent.name == 'tests' and path.name == '__init__.py': # todo add exc message?\n return 'test module' # todo add exc message?\n if path.parent.name == 'tests' and path.name == 'test_hpi.py': # todo add exc message?\n return", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "karlicoss/HPI", + "expected": "{f'total_{run_id}': 1 + 123}", + "got": "item2.raw == [1", + "got_raw": "item2.raw == [1, 2] * 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.162531757492419, + "edit_similarity": 0.09302325581395349 + }, + { + "repo": "karlicoss/HPI", + "expected": "cc", + "got": "cc", + "got_raw": "cc + 1 # cache hit!", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "karlicoss/HPI", + "expected": "Counter({\"_A\": 4, \"Unsortable\": 3})", + "got": "Counter({\"Unsortable\": 2, \"Unsortable\": 1})", + "got_raw": "Counter({\"Unsortable\": 2, \"Unsortable\": 1}) # type: ignore[arg-type] # noqa: B904 # noqa: B904 # noqa: B904 # noqa: B904 # noqa: B904 # noqa: B904 # noqa: B904 # noqa: B904 # noqa: B904 # noqa: B904 # noqa: B904 # noqa: B904 # noqa: B904 # noqa: B904 # noqa: B904", + "exact_match": false, + "code_bleu": 0.3200286101270288, + "edit_similarity": 0.7948717948717948 + }, + { + "repo": "karlicoss/HPI", + "expected": "sqlite3.OperationalError, match='readonly database')", + "got": "sqlite3.OperationalError) as exc_info:", + "got_raw": "sqlite3.OperationalError) as exc_info:\n with sqlite_connect_immutable(db) as conn:\n conn.execute('INSERT INTO testtable VALUES (1)')\n assert str(exc_info.value) == 'database is read-only'\n\n\ndef test_sqlite_connect_immutable_readonly(tmp_path: Path) -> None:\n db = str(tmp_path / 'db.sqlite')\n with sqlite3.connect(db) as conn:\n conn.execute('CREATE TABLE testtable (col)')\n conn.execute('INSERT INTO testtable VALUES (1)')\n\n with sqlite_connect_immutable", + "exact_match": false, + "code_bleu": 0.3198608199976983, + "edit_similarity": 0.6222222222222222 + }, + { + "repo": "karlicoss/HPI", + "expected": "[123]", + "got": "[123]", + "got_raw": "[123] assert list(unique_everseen(fun_bad)) == [{1, 2}, {1, 3}] assert list(unique_everseen(fun_bad, key=lambda x: x[0])) == [{1, 2}, {1, 3}] assert list(unique_everseen(fun_bad, key=lambda x: x[1])) == [{1, 2}, {1, 2}] assert list(unique_everseen(fun_bad, key=lambda x: x[0] + x[1])) == [{1, 2}, {1, 3}] assert list(unique_everseen", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "karlicoss/HPI", + "expected": "QueryException, match=r\"Cannot specify 'after', 'before' and 'within'\")", + "got": "QueryException) as exc_info: _parse_range(unparsed_range=(None, None, None)) assert str(exc_info.value) == \"Cannot specify 'after', 'before' and 'within' at the same time!\\n\\n\" + RangeTuple.__doc__ assert res2 == res2", + "got_raw": "QueryException) as exc_info: _parse_range(unparsed_range=(None, None, None)) assert str(exc_info.value) == \"Cannot specify 'after', 'before' and 'within' at the same time!\\n\\n\" + RangeTuple.__doc__ assert res2 == res2 # type: ignore # noqa: B101 # can't specify 'after' and 'before' at the same time rn = RangeTuple(None, \"5\", None) with pytest.raises(QueryException) as exc_info: _parse_range(unparsed_range=rn) assert str(exc_info.value) == \"Cannot specify", + "exact_match": false, + "code_bleu": 0.042143413032077665, + "edit_similarity": 0.4513888888888889 + }, + { + "repo": "karlicoss/HPI", + "expected": "{ 'df': { 'count': 7, 'dtypes': { 'index': np.dtype(' None:\n cfg = make( '''\n SOURCES = ['bad']\n ''' )\n with pytest.raises(ValueError) as excinfo:\n index(cfg)\n assert str(excinfo.value) == 'bad: not a file or directory'\n\ndef test_bad_source2() -> None:\n cfg = make( '''\n SOURCES = ['bad.txt']\n ''' )\n with pytest.raises(ValueError) as excinfo:\n", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "karlicoss/promnesia", + "expected": "1_000 * run_id", + "got": "1_000 + 100 * run_id + 1000 * run_id ** 2 + 1000 * run_id ** 3 + 1000 * run_id ** 4 + 1000 * run_id ** 5 + 1000 * run_id ** 6 + 1000 * run_id ** 7 + 1000 * run_id ** 8 + 1000 * run_id ** 9 + 1000 * run_id ** 10 + 1000", + "got_raw": "1_000 + 100 * run_id + 1000 * run_id ** 2 + 1000 * run_id ** 3 + 1000 * run_id ** 4 + 1000 * run_id ** 5 + 1000 * run_id ** 6 + 1000 * run_id ** 7 + 1000 * run_id ** 8 + 1000 * run_id ** 9 + 1000 * run_id ** 10 + 1000", + "exact_match": false, + "code_bleu": 0.02420158996859649, + "edit_similarity": 0.12121212121212122 + }, + { + "repo": "karlicoss/promnesia", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "keon/algorithms", + "expected": "self.veb.member(3))", + "got": "self.veb.search(3))", + "got_raw": "self.veb.search(3)) self.assertTrue( self.veb.search(1) ) self.assertTrue( self.veb.search(5) ) self.assertTrue( self.veb.search(7) ) self.veb.delete(1) self.veb.delete(5) self.veb.delete(7) self.assertFalse( self.veb.search(1) ) self.assertFalse( self.veb.search(5) ) self.assertFalse( self.veb.search(7) ) self.veb.delete(3) self.assertFalse( self.veb.search(3) ) self.veb", + "exact_match": false, + "code_bleu": 0.6580370064762462, + "edit_similarity": 0.7894736842105263 + }, + { + "repo": "keon/algorithms", + "expected": "set_bit(22, 3))", + "got": "set_bit(22, 3))", + "got_raw": "set_bit(22, 3))\n\n def test_clear_bit(self):\n # 22 = 10110 --> after clear bit at 3th position: 20 = 10100\n\n self.assertEqual(20, clear_bit(22, 3))\n\n def test_get_bit(self):\n # 22 = 10110 --> get bit at 3th position: 1\n\n self.assertEqual(1, get_bit(22, 3))\n\n def test_reverse_bits(self):\n #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "keon/algorithms", + "expected": "is_valid(\"[[[]]\"))", + "got": "is_valid(\"[]()[](\"))", + "got_raw": "is_valid(\"[]()[](\"))\n self.assertFalse(\n### Target:\nis_valid(\"[]()[]]\"))\n self.assertFalse(\n### Target:\nis_valid(\"[]()[]]\"))\n self.assertFalse(\n### Target:\nis_valid(\"[]()[]]\"))\n self.assertFalse(\n### Target:\nis_valid(\"[]()[]]\"))\n self.assertFalse(\n### Target:\nis_valid(\"[]()[]]\"))\n self.assertFalse(\n### Target:\nis_valid(\"[]()[]]\"))\n self.assertFalse(\n### Target:\nis_valid(\"[]()[]]\"))\n ", + "exact_match": false, + "code_bleu": 0.45180100180492244, + "edit_similarity": 0.8421052631578947 + }, + { + "repo": "keon/algorithms", + "expected": "is_valid(\"{([])}\"))", + "got": "is_valid(\"[]()[]\"))", + "got_raw": "is_valid(\"[]()[]\")) self.assertFalse( is_valid(\"[[[]]\")) ) self.assertTrue( is_valid(\"[]()[]\")) self.assertFalse( is_valid(\"[[[]]\")) ) self.assertTrue( is_valid(\"[]()[]\")) self.assertFalse( is_valid(\"[[[]]\")) ) self.assertTrue( is_valid(\"[]()[]\")) self.assertFalse( is_valid(\"[[[]]\")) ) self.assertTrue( is_valid(\"[]()[]\")) self.assertFalse( is_valid(\"[[[]]\")) ) self.assertTrue( is_valid(\"[]()[]\")) self.assertFalse( is_valid(\"[[[]]\")) ) self.assertTrue( is_valid", + "exact_match": false, + "code_bleu": 0.45180100180492244, + "edit_similarity": 0.8421052631578947 + }, + { + "repo": "keon/algorithms", + "expected": "two_sum1(array, 9))", + "got": "two_sum1(array, 9)) self.assertEqual([2, 4], two_sum1(array, 22))", + "got_raw": "two_sum1(array, 9)) self.assertEqual([2, 4], two_sum1(array, 22)) # test two_sum2 self.assertEqual([1, 2], two_sum2(array, 9)) self.assertEqual([2, 4], two_sum2(array, 22)) # test linear_search self.assertEqual(1, linear_search(array, 7)) self.assertEqual(2, linear_search(array, 11)) self.assertEqual(3, linear_search(array, 15)) self.assertEqual(-1, linear_search(array, 20)) # test binary_search self.assertEqual(1, binary", + "exact_match": false, + "code_bleu": 0.27274191069381915, + "edit_similarity": 0.4523809523809524 + }, + { + "repo": "keon/algorithms", + "expected": "y)", + "got": "y)", + "got_raw": "y)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "keon/algorithms", + "expected": "self.veb.successor(12))", + "got": "self.veb.successor(8))", + "got_raw": "self.veb.successor(8)) self.assertEqual(12, self.veb.successor(12)) self.assertEqual(2, self.veb.successor(1)) self.assertEqual(4, self.veb.successor(3)) self.assertEqual(8, self.veb.successor(5)) self.assertEqual(12, self.veb.successor(7)) self.assertEqual(2, self.veb.successor(9)) self.assertEqual(4, self.veb.successor(11)) self.assertEqual(8, self.veb.successor(13)) self.assertEqual", + "exact_match": false, + "code_bleu": 0.7071067811865475, + "edit_similarity": 0.9333333333333333 + }, + { + "repo": "keon/algorithms", + "expected": "1)", + "got": "2)", + "got_raw": "2) # Test 2\n n2 = 10\n k2 = 2\n\n self.assertEqual(find_k_factor(n2, k2), 4) # Test 3\n n3 = 12\n k3 = 3\n\n self.assertEqual(find_k_factor(n3, k3), 6) # Test 4\n n4 = 15\n k4 = 5\n\n self.assertEqual(find_k_factor(n4, k4), 10) # Test 5\n n5 = 20\n k5", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "keon/algorithms", + "expected": "vertices)", + "got": "5)", + "got_raw": "5) # Verify correct order\n\n self.assertEqual(order, [5, 4, 2, 3, 1]) # Verify that the graph is a DAG\n\n self.assertFalse(has_cycle(vertices, edges)) # Verify that the graph is a DAG\n\n self.assertTrue(is_dag(vertices, edges)) # Verify that the graph is a DAG\n\n self.assertTrue(is_dag(vertices, edges)) # Verify that the graph is a DAG\n\n self.assertTrue(is_dag(vertices, edges)) # Verify that the graph is a DAG\n\n self.assertTrue(is_dag(vertices, edges)) # Verify that the graph is a", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.18181818181818182 + }, + { + "repo": "keon/algorithms", + "expected": "3)", + "got": "3)", + "got_raw": "3)\n self.assertEqual(exponential_search(arr, 13), 6)\n self.assertEqual(exponential_search(arr, 15), 7)\n self.assertEqual(exponential_search(arr, 1), 0)\n self.assertEqual(exponential_search(arr, 2), 1)\n self.assertEqual(exponential_search(arr, 3), 2)\n self.assertEqual(exponential_search(arr, 4), -1)\n self.assertEqual(exponential_search(arr, 5), -1)\n self.assertEqual(exponential_search(arr, 6), -1)\n self.assertEqual", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "keon/algorithms", + "expected": "count_ones_iter(0))", + "got": "count_ones_iter(0))", + "got_raw": "count_ones_iter(0))\n\n def test_count_ones_recur(self):\n\n # 8 -> 1000\n self.assertEqual(1, count_ones_recur(8))\n\n # 109 -> 1101101\n self.assertEqual(5, count_ones_recur(109))\n\n # 63 -> 111111\n self.assertEqual(6, count_ones_recur(63))\n\n # 0 -> 0\n\n self.assertEqual(0, count_ones_recur(0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "keon/algorithms", + "expected": "jump_search(array, 5))", + "got": "jump_search(array, 4)) self.assertEqual(11, jump_search(array, 5)) self.assertEqual(12, jump_search(array, 6)) self.assertEqual(-1, jump_search(array, 7)) self.assertEqual(-1, jump_search(array, 8)) self.assertEqual(-1, jump_search(array, 9)) self.assertEqual(-1, jump_search(array, 10)) self.assertEqual(-1, jump_search(array, 11)) self.assertEqual(-1, jump_search(array, 12)) self.assertEqual(-1, jump_search(array, 13)) self.assertEqual(-1, jump_search", + "got_raw": "jump_search(array, 4)) self.assertEqual(11, jump_search(array, 5)) self.assertEqual(12, jump_search(array, 6)) self.assertEqual(-1, jump_search(array, 7)) self.assertEqual(-1, jump_search(array, 8)) self.assertEqual(-1, jump_search(array, 9)) self.assertEqual(-1, jump_search(array, 10)) self.assertEqual(-1, jump_search(array, 11)) self.assertEqual(-1, jump_search(array, 12)) self.assertEqual(-1, jump_search(array, 13)) self.assertEqual(-1, jump_search", + "exact_match": false, + "code_bleu": 0.04622657297693052, + "edit_similarity": 0.09224318658280922 + }, + { + "repo": "keon/algorithms", + "expected": "[])", + "got": "[])", + "got_raw": "[])\n self.assertEqual(btree.root.children, [])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "keon/algorithms", + "expected": "count_ones_recur(8))", + "got": "count_ones_recur(8))", + "got_raw": "count_ones_recur(8)) # 10 -> 1010 self.assertEqual(2, count_ones_recur(10)) # 11 -> 1011 self.assertEqual(3, count_ones_recur(11)) # 12 -> 1100 self.assertEqual(2, count_ones_recur(12)) # 13 -> 1101 self.assertEqual(3, count_ones_recur(13)) # 14 -> 1110 self.assertEqual(3", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "keon/algorithms", + "expected": "jump_search(array, -1))", + "got": "jump_search(array, 1)) self.assertEqual(-1, jump_search(array, 0)) self.assertEqual(-1, jump_search(array, 9)) self.assertEqual(-1, jump_search(array, 8)) self.assertEqual(-1, jump_search(array, 11)) self.assertEqual(-1, jump_search(array, 12)) self.assertEqual(-1, jump_search(array, 13)) self.assertEqual(-1, jump_search(array, 14)) self.assertEqual(-1, jump_search(array, 15)) self.assertEqual(-1, jump_search(array, 16)) self.assertEqual(-1, jump_search", + "got_raw": "jump_search(array, 1)) self.assertEqual(-1, jump_search(array, 0)) self.assertEqual(-1, jump_search(array, 9)) self.assertEqual(-1, jump_search(array, 8)) self.assertEqual(-1, jump_search(array, 11)) self.assertEqual(-1, jump_search(array, 12)) self.assertEqual(-1, jump_search(array, 13)) self.assertEqual(-1, jump_search(array, 14)) self.assertEqual(-1, jump_search(array, 15)) self.assertEqual(-1, jump_search(array, 16)) self.assertEqual(-1, jump_search", + "exact_match": false, + "code_bleu": 0.033724464383004187, + "edit_similarity": 0.09166666666666666 + }, + { + "repo": "keon/algorithms", + "expected": "remove_bit(21, 0))", + "got": "remove_bit(21, 0))", + "got_raw": "remove_bit(21, 0))\n\n def test_set_bit(self):\n \"\"\"\n Input: num = 10101 (21)\n set_bit(num, 2): output = 10111 (23)\n set_bit(num, 4): output = 10110 (22)\n set_bit(num, 0): output = 10110 (22)\n \"\"\"\n self.assertEqual(23, set_bit(21, 2))\n self.assertEqual(22, set_bit(21, ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "keon/algorithms", + "expected": "self.tree.search(24))", + "got": "self.tree.search(10))", + "got_raw": "self.tree.search(10)) self.assertTrue( self.tree.search(15)) self.assertTrue( self.tree.search(6)) self.assertTrue( self.tree.search(4)) self.assertTrue( self.tree.search(9)) self.assertTrue( self.tree.search(12)) self.assertTrue( self.tree.search(24)) self.assertTrue( self.tree.search(7)) self.assertTrue( self.tree.search(20)) self.assertTrue( self.tree.search(30)) self.assertTrue( self.tree.search(18)) self.assertFalse( self.tree.search(1)) self.assertFalse( self.tree.search(2)) self.assertFalse( self.tree.search(", + "exact_match": false, + "code_bleu": 0.7071067811865475, + "edit_similarity": 0.9047619047619048 + }, + { + "repo": "keon/algorithms", + "expected": "sorted(answer1))", + "got": "sorted(answer1))", + "got_raw": "sorted(answer1))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "keon/algorithms", + "expected": "ft.get_sum(bit_tree, 4))", + "got": "ft.sum(bit_tree, 2)) self.assertEqual(10, ft.sum(bit_tree, 1)) self.assertEqual(14, ft.sum(bit_tree, 3)) self.assertEqual(1, ft.sum(bit_tree, 0)) self.assertEqual(1, ft.sum(bit_tree, 8)) self.assertEqual(1, ft.sum(bit_tree, 9)) self.assertEqual(1, ft.sum(bit_tree, 10)) self.assertEqual(1, ft.sum(bit_tree, 11)) self.assertEqual(1, ft.sum(bit_tree, 12)) self.assertEqual(1, ft.sum(bit_tree,", + "got_raw": "ft.sum(bit_tree, 2)) self.assertEqual(10, ft.sum(bit_tree, 1)) self.assertEqual(14, ft.sum(bit_tree, 3)) self.assertEqual(1, ft.sum(bit_tree, 0)) self.assertEqual(1, ft.sum(bit_tree, 8)) self.assertEqual(1, ft.sum(bit_tree, 9)) self.assertEqual(1, ft.sum(bit_tree, 10)) self.assertEqual(1, ft.sum(bit_tree, 11)) self.assertEqual(1, ft.sum(bit_tree, 12)) self.assertEqual(1, ft.sum(bit_tree, ", + "exact_match": false, + "code_bleu": 0.021286777636525273, + "edit_similarity": 0.09178743961352658 + }, + { + "repo": "keon/algorithms", + "expected": "stack.pop())", + "got": "stack.pop())", + "got_raw": "stack.pop()) self.assertEqual(2, stack.pop()) self.assertEqual(1, stack.pop()) self.assertTrue(stack.is_empty()) self.assertRaises(IndexError, stack.pop) self.assertRaises(IndexError, stack.peek) self.assertRaises(IndexError, stack.push, 4) self.assertRaises(IndexError, stack.push, 5) self.assertRaises(IndexError, stack.push, 6) self.assertRaises(IndexError, stack.push, 7) self.assertRaises(IndexError, stack.push, 8) self.assertRaises(IndexError, stack.push, 9) self.assertRaises(IndexError, stack.push, 10) self.assertRaises(IndexError, stack.push, ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "kivy/buildozer", + "expected": "[ \"this\", \"is\", \"one\", \"way\", \"of\", \"representing\", \"lists\", ]", + "got": "[\"this\", \"is\", \"one\", \"way\", \"of\", \"representing\", \"lists\"] assert sp.get(\"section\", \"option4\") == \"this_is\\nanother_way\\n", + "got_raw": "[\"this\", \"is\", \"one\", \"way\", \"of\", \"representing\", \"lists\"] assert sp.get(\"section\", \"option4\") == \"this_is\\nanother_way\\n# This is a comment.\\n\" \"of # This is not a comment.\\nrepresenting=4\\nlists\"", + "exact_match": false, + "code_bleu": 0.44094931488541544, + "edit_similarity": 0.6521739130434783 + }, + { + "repo": "kivy/buildozer", + "expected": "\"full system\"", + "got": "\"full system\" assert sp.get(\"section1\"", + "got_raw": "\"full system\" assert sp.get(\"section1\", \"attribute1\", \"demo1\") == \"demo mode\" assert sp.get(\"section1\", \"attribute1\", \"demo2\") == \"demo mode\" assert sp.get(\"section1\", \"attribute1\", \"demo3\") == \"full system\" assert sp.get(\"section1\", \"attribute1\", \"demo4\") == \"full system\" assert sp.get(\"section1\", \"attribute1\", \"demo5\") == \"full system\" assert sp.get(\"section1\", \"attribute1\", \"demo6\") == \"full system\" assert sp.get(\"", + "exact_match": false, + "code_bleu": 0.18575057999133598, + "edit_similarity": 0.5098039215686274 + }, + { + "repo": "kivy/buildozer", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "kivy/buildozer", + "expected": "any('main.py' in f for f in copied_files))", + "got": "'visible/code.py' in copied_files) self.assertTrue( 'main.py' in copied_files) self.assertFalse( '.hidden/secret.py' in copied_files) self.assertTrue( 'subdir/code2.py' in copied_files) self.assertTrue( 'subdir/.hidden2.py' in copied_files) self.assertEqual( len(copied_files)", + "got_raw": "'visible/code.py' in copied_files) self.assertTrue( 'main.py' in copied_files) self.assertFalse( '.hidden/secret.py' in copied_files) self.assertTrue( 'subdir/code2.py' in copied_files) self.assertTrue( 'subdir/.hidden2.py' in copied_files) self.assertEqual( len(copied_files), 5) self.assertEqual( len(copy_calls), 5) self.assertEqual( mock_buildops.file_copy.call_count, 5) self.assertEqual( mock_buildops.file_copy.call_args_list, [ mock.call('main.py', 'main.py'), mock.call('visible/code.py',", + "exact_match": false, + "code_bleu": 0.07611137668875849, + "edit_similarity": 0.1509433962264151 + }, + { + "repo": "kivy/buildozer", + "expected": "\"a", + "got": "sp.config)", + "got_raw": "sp.config) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "exact_match": false, + "code_bleu": 0.3021375397356768, + "edit_similarity": 0.0 + }, + { + "repo": "kivy/buildozer", + "expected": "'r')", + "got": "p4a_dir", + "got_raw": "p4a_dir + '/requirements.txt') mock_exists.assert_called_once_with(p4a_dir) mock_isfile.assert_called_once_with(p4a_dir + '/requirements.txt') self.assertEqual(ndk_version, expected_ndk) mock_open.return_value.close.assert_called_once_with() mock_open.return_value.read.return_value.close.assert_called_once_with() mock_open.return_value.read.return_value.read.return_value.close.assert_called_once_with() mock_open.return_value.read.return_value.read.return_value.read.return_value.close.assert_called_once_with() mock_open.return_value.read.return_value.read.return_value.read.return_value.read.return_value.close.assert_called_once_with() mock_open", + "exact_match": false, + "code_bleu": 0.25, + "edit_similarity": 0.18181818181818182 + }, + { + "repo": "kivy/buildozer", + "expected": "False", + "got": "True", + "got_raw": "True if sys.platform.startswith(\"linux\") else False if sys.platform.startswith(\"win\") else False if sys.platform.startswith(\"darwin\") else False if sys.platform.startswith(\"freebsd\") else False if sys.platform.startswith(\"openbsd\") else False if sys.platform.startswith(\"netbsd\") else False if sys.platform.startswith(\"solaris\") else False if sys.platform.startswith(\"aix\") else False if sys.platform.startswith(\"hp-ux\") else False if sys.platform.startswith(\"irix\") else False if sys.platform.startswith(\"sunos\") else False if sys.platform.startswith(\"linux\") else False if sys.platform.startswith(\"win\") else False", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "kivy/buildozer", + "expected": "AssertionError)", + "got": "BuildozerCommandException)", + "got_raw": "BuildozerCommandException) as cm: buildops.cmd_expect([\"cmd\", \"/c\", \"echo\", \"hello\"]) self.assertEqual(str(cm.exception), \"cmd /c echo hello failed\") self.assertEqual(cm.exception.returncode, 1) self.assertEqual(cm.exception.stdout, \"\") self.assertEqual(cm.exception.stderr, \"\") self.assertEqual(cm.exception.cmd, [\"cmd\", \"/c\", \"echo\", \"hello\"]) self.assertEqual(cm.exception.args, ()) self.assertEqual(cm.exception.output, \"\") self.assertEqual(cm.exception.error, \"\") self.assertEqual(cm.exception.returncode, 1) self.assertEqual(cm.exception.stdout, \"\") self.assertEqual(cm.exception.stderr, \"\") self.assertEqual", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.34146341463414637 + }, + { + "repo": "krahabb/meross_lan", + "expected": "helpers.MessageMatcher(header=header_clock_reply))", + "got": "helpers.MessageMatcher(", + "got_raw": "helpers.MessageMatcher( header=header_clock_reply, payload=message_clock_push[mc.KEY_PAYLOAD], ))", + "exact_match": false, + "code_bleu": 0.4444444444444444, + "edit_similarity": 0.6301369863013698 + }, + { + "repo": "krahabb/meross_lan", + "expected": "RollerShutterMixin.SIGNALCLOSE", + "got": "haec.CoverEntityFeature.STOP", + "got_raw": "haec.CoverEntityFeature.STOP in entity.supported_features and entity.stop is not None and entity.stop() is not None and entity.stop() is True and entity.stop() is False and entity.stop() is None and entity.stop() is False and entity.stop() is True and entity.stop() is None and entity.stop() is False and entity.stop() is True and entity.stop() is None and entity.stop() is False and entity.stop() is True and entity.stop() is None and entity.stop() is False and entity.stop() is True and entity.stop() is None and entity.stop() is False and entity.stop() is True", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.2413793103448276 + }, + { + "repo": "krahabb/meross_lan", + "expected": "result", + "got": "result", + "got_raw": "result == obfuscate.obfuscate_key(key, src) )", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "krahabb/meross_lan", + "expected": "tc.MOCK_CLOUDAPI_HUB_GETSUBDEVICES[tc.MOCK_PROFILE_MSH300_UUID]", + "got": "tc.MOCK_CLOUDAPI_HUB_GETSUBDEVICES[tc.MOCK_PROFILE_MSH300_UUID]", + "got_raw": "tc.MOCK_CLOUDAPI_HUB_GETSUBDEVICES[tc.MOCK_PROFILE_MSH300_UUID]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "krahabb/meross_lan", + "expected": "descriptor.uuid", + "got": "descriptor.device_id", + "got_raw": "descriptor.device_id # type: ignore assert data[mlc.CONF_NAME] == descriptor.name assert data[mlc.CONF_MAC] == fmt_macaddress(descriptor.mac) assert data[mlc.CONF_HOST] == host assert data[mlc.CONF_KEY] == emulator.key assert data[mlc.CONF_TOKEN] == emulator.token assert data[mlc.CONF_TOKEN_EXPIRE] == emulator.token_expire assert data[mlc.CONF_TOKEN_REFRESH] == emulator.token_refresh assert data[mlc.CONF_TOKEN_REFRESH_EXPIRE] == emulator.token_refresh_expire assert data[mlc.CONF_TOKEN_REFRESH_ATTEM", + "exact_match": false, + "code_bleu": 0.5946035575013605, + "edit_similarity": 0.7428571428571429 + }, + { + "repo": "krahabb/meross_lan", + "expected": "0", + "got": "0", + "got_raw": "0 # no more connections to activate (we have all) # check the profile saved the data to storage hass_storage.update(profile.storage) flush_store(hass_storage) # check the profile loaded the data from storage profile.load() assert profile.id == tc.MOCK_PROFILE_ID assert profile.name == tc.MOCK_PROFILE_NAME assert profile.mqttconnections == {} # check the profile started the mqtt connections for call in safe_start_calls: await call() # check the profile saved the data to storage hass_storage.update(profile.storage) flush_store(hass_storage) # check the profile loaded the data from storage profile.load() assert profile.mqttconnections == {", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "krahabb/meross_lan", + "expected": "3", + "got": "3", + "got_raw": "3 result[\"type\"] == FlowResultType.ABORT # type: ignore assert result[\"reason\"] == \"success\" assert result[\"data\"] == {} assert result[\"flow_id\"] is not None assert result[\"context\"] is not None assert result[\"context\"][\"source\"] == config_entries.SOURCE_USER assert result[\"context\"][\"entry_id\"] is None assert result[\"context\"][\"unique_id\"] is None assert result[\"context\"][\"user_input\"] == user_input assert result[\"context\"][\"profile\"] is not None assert result[\"context\"][\"profile\"][\"id\"] == 1 assert result[\"context\"][\"profile\"][\"email\"] == tc.M", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "krahabb/meross_lan", + "expected": "1 - digest[mc.KEY_TOGGLEX][0][mc.KEY_ONOFF]", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.03125, + "edit_similarity": 0.023391812865497075 + }, + { + "repo": "krahabb/meross_lan", + "expected": "mlc.CONF_TRACE_VERSION", + "got": "ConfigFlow.VERSION", + "got_raw": "ConfigFlow.VERSION # type: ignore assert diagnostic[\"minor_version\"] == ConfigFlow.MINOR_VERSION # type: ignore assert diagnostic[\"title\"] == self.config_entry.title assert diagnostic[\"unique_id\"] == self.config_entry.unique_id assert diagnostic[\"source\"] == self.config_entry.source assert diagnostic[\"config_entry_id\"] == self.config_entry.entry_id assert diagnostic[\"data\"] == self.config_entry.data assert diagnostic[\"options\"] == self.config_entry.options assert diagnostic[\"disabled_by\"] == self.config_entry.disabled_by assert diagnostic[\"disabled\"] == self.config_entry.disabled assert diagnostic[\"state\"] ==", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.45 + }, + { + "repo": "ktbyers/netmiko", + "expected": "(device_name, \"Config output\")", + "got": "(device_name, \"Config output\")", + "got_raw": "(device_name, \"Config output\") # Config output is empty in this case # as we are not using cfg_command # in the test # with the cli_command # Test with cli_command and cfg_command result = ssh_conn( device_name, device_params, cli_command=\"show version\", cfg_command=[\"interface Gi0/1\", \"description Test\"], ) assert result == (device_name, \"Command output\") # Config output is empty in this case # as we are not using cfg_command # in the test # with the cli_command # Test with cli_command and cfg_command result", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ktbyers/netmiko", + "expected": "output", + "got": "output.lower()", + "got_raw": "output.lower() or \"show tech-support\" in output.lower() or \"show version\" in output.lower() or \"show clock\" in output.lower() or \"show ip interface brief\" in output.lower() or \"show ip route\" in output.lower() or \"show ip interface\" in output.lower() or \"show ip interface brief\" in output.lower() or \"show ip route\" in output.lower() or \"show ip interface\" in output.lower() or \"show ip interface\" in output.lower() or \"show ip interface\" in output.lower() or \"show ip interface\" in output.lower() or \"show ip interface", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6 + }, + { + "repo": "ktbyers/netmiko", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as exc_info: get_encryption_key() assert str(exc_info.value) == \"NETMIKO_TOOLS_KEY environment variable not set\" def test_get_encryption_key_set(): # Set the environment variable NETMIKO_TOOLS_KEY os.environ[\"NETMIKO_TOOLS_KEY\"] = \"my_secret_key\" # Call the function and check the result assert get_encryption_key() == \"my_secret_key\" def test_encrypt_value(): # Test with a simple string value value = \"Hello, World!\" encrypted_value = encrypt_value(value) assert encrypted_value.startswith(ENCRYPTION_PREFIX) def test_decrypt_value(): #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ktbyers/netmiko", + "expected": "md5_value", + "got": "md5_value.replace(\":\"", + "got_raw": "md5_value.replace(\":\", \"\")", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6 + }, + { + "repo": "ktbyers/netmiko", + "expected": "None", + "got": "None", + "got_raw": "None and net_connect.channel is None and net_connect.device_type is None and net_connect.session_id is None and net_connect.port is None and net_connect.device_name is None and net_connect.device_type is None and net_connect.device_type is None and net_connect.device_type is None and net_connect.device_type is None and net_connect.device_type is None and net_connect.device_type is None and net_connect.device_type is None and net_connect.device_type is None and net_connect.device_type is None and net_connect.device_type is None and net_connect.device_type is None and net_connect.device_type is None and net_connect.device_type is None and net_connect", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ktbyers/netmiko", + "expected": "10", + "got": "4.0", + "got_raw": "4.0 / 10.0 * 1000.0 / 1000.0 * 1000.0 / 1000.0 * 1000.0 / 1000.0 * 1000.0 / 1000.0 * 1000.0 / 1000.0 * 1000.0 / 1000.0 * 1000.0 / 1000.0 * 1000.", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4 + }, + { + "repo": "ktbyers/netmiko", + "expected": "netmiko_log", + "got": "netmiko_log.lower()", + "got_raw": "netmiko_log.lower() else True, \"Password found in netmiko log\" assert nc.secret not in netmiko_log.lower() else True, \"Secret found in netmiko log\" assert \"password\" not in netmiko_log.lower() else True, \"password found in netmiko log\" assert \"secret\" not in netmiko_log.lower() else True, \"secret found in netmiko log\" assert \"enable\" not in netmiko_log.lower() else True, \"enable found in netmiko log\" assert \"enable secret\" not in netmiko_log.lower() else True", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.7333333333333333 + }, + { + "repo": "ktbyers/netmiko", + "expected": "True", + "got": "True", + "got_raw": "True ### END TEST CASES ###", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ktbyers/netmiko", + "expected": "cmd_response", + "got": "cmd_response.lower()", + "got_raw": "cmd_response.lower() + \"\\n\" + save_verify + \"\\n\" + save_verify + \"\\n\" + save_verify + \"\\n\" + save_verify + \"\\n\" + save_verify + \"\\n\" + save_verify + \"\\n\" + save_verify + \"\\n\" + save_verify + \"\\n\" + save_verify + \"\\n\" + save_verify + \"\\n\" + save_verify + \"\\n\" + save_verify + \"\\n\" + save_verify + \"\\n\" + save_verify + \"\\n\" + save_verify + \"\\n\" + save_verify + \"\\n\" + save_verify + \"\\n\" +", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.75 + }, + { + "repo": "ktbyers/netmiko", + "expected": "5", + "got": "10.000000000000001", + "got_raw": "10.000000000000001", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "ktbyers/netmiko", + "expected": "new_hostname", + "got": "new_hostname[:-1]", + "got_raw": "new_hostname[:-1] + current_hostname[:-1] + \"\\n\" + current_hostname[-1] + \"\\n\" + new_hostname[-1] + \"\\n\" + new_hostname[-1] + \"\\n\" + new_hostname[-1] + \"\\n\" + new_hostname[-1] + \"\\n\" + new_hostname[-1] + \"\\n\" + new_hostname[-1] + \"\\n\" + new_hostname[-1] + \"\\n\" + new_hostname[-1] + \"\\n\" + new_hostname[-1] + \"\\n\" + new_hostname[-1] + \"\\n\" + new_hostname", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.8275862068965517 + }, + { + "repo": "ktbyers/netmiko", + "expected": "30000000", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.10294117647058823 + }, + { + "repo": "ktbyers/netmiko", + "expected": "show_version", + "got": "show_version.strip()", + "got_raw": "show_version.strip() + \"\\n\" + expected_responses[\"version_footer\"] + \"\\n\" + expected_responses[\"version_copyright\"] + \"\\n\" + expected_responses[\"version_end\"] + \"\\n\" + expected_responses[\"version_license\"] + \"\\n\" + expected_responses[\"version_end\"] + \"\\n\" + expected_responses[\"version_end\"] + \"\\n\" + expected_responses[\"version_end\"] + \"\\n\" + expected_responses[\"version_end\"] + \"\\n\" + expected_responses[\"version_end\"] + \"\\n\" + expected_responses[\"version_end\"] + \"\\n\" + expected_responses[\"version_end\"] + \"\\", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.75 + }, + { + "repo": "laixintao/flameshow", + "expected": "[Frame(\"\", 1), Frame(\"\", 3)]", + "got": "[10, 3] name_aggr[\"bar\"] == [4] name_aggr[\"bar.foo\"] == [2] name_aggr[\"bar.foo\"] == [2] name_aggr[\"bar.foo\"] == [2] name_aggr[\"bar.foo\"] == [2] name_aggr[\"bar.foo\"] == [2] name_aggr[\"bar.foo\"] == [2] name_aggr[\"bar.foo\"] == [2] name_aggr[\"bar.foo\"] == [2] name_aggr[\"bar.foo\"] == [2] name_aggr[\"bar.foo\"] == [2] name", + "got_raw": "[10, 3] name_aggr[\"bar\"] == [4] name_aggr[\"bar.foo\"] == [2] name_aggr[\"bar.foo\"] == [2] name_aggr[\"bar.foo\"] == [2] name_aggr[\"bar.foo\"] == [2] name_aggr[\"bar.foo\"] == [2] name_aggr[\"bar.foo\"] == [2] name_aggr[\"bar.foo\"] == [2] name_aggr[\"bar.foo\"] == [2] name_aggr[\"bar.foo\"] == [2] name_aggr[\"bar.foo\"] == [2] name", + "exact_match": false, + "code_bleu": 0.017018001904197447, + "edit_similarity": 0.03488372093023256 + }, + { + "repo": "laixintao/flameshow", + "expected": "\"1.0B\"", + "got": "1", + "got_raw": "1 * 8 / 1024 ** 2 / 1024 ** 2 * 1000 ** 3 / 1024 ** 2 / 1024 ** 2 * 1000 ** 3 / 1024 ** 2 / 1024 ** 2 * 1000 ** 3 / 1024 ** 2 / 1024 ** 2 * 1000 ** 3 / 1024 ** 2 / 1024 **", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2857142857142857 + }, + { + "repo": "laixintao/flameshow", + "expected": "1", + "got": "1", + "got_raw": "1 assert profile.sample_types[0].name == \"cpu\" assert profile.sample_types[0].unit == \"cpu\" assert profile.timescale == 1000000000 assert profile.duration == 1000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "laixintao/flameshow", + "expected": "Frame(\"a\", 13)", + "got": "Frame(\"foo\", 13)", + "got_raw": "Frame(\"foo\", 13)\n assert f1 != Frame(\"foo\", 12) + Frame(\"bar\", 12) + Frame(\"foo\", 12) + Frame(\"bar\", 12) + Frame(\"foo\", 12) + Frame(\"bar\", 12) + Frame(\"foo\", 12) + Frame(\"bar\", 12) + Frame(\"foo\", 12) + Frame(\"bar\", 12) + Frame(\"foo\", 12) + Frame(\"bar\", 12) + Frame(\"foo\", 1", + "exact_match": false, + "code_bleu": 0.488923022434901, + "edit_similarity": 0.8666666666666667 + }, + { + "repo": "laixintao/flameshow", + "expected": "\"flameshow\"", + "got": "\"abc\"", + "got_raw": "\"abc\" + \" (0)\" + \" (2)\" + \" (0)\" + \" (0)\" + \" (0)\" + \" (0)\" + \" (0)\" + \" (0)\" + \" (0)\" + \" (0)\" + \" (0)\" + \" (0)\" + \" (0)\" + \" (0)\" + \" (0)\" + \" (0)\" + \" (0)\" + \" (0)\" + \" (0)\" + \" (0)\" + \" (0)\" + \" (0)\" + \" (0)\" + \" (0)\" + \" (0)\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.375 + }, + { + "repo": "laixintao/flameshow", + "expected": "[7]", + "got": "[5", + "got_raw": "[5, 4] assert root.children[0].children[0].values == [4] assert root.children[0].children[1].values == [3] assert root.children[0].children[1].children[0].values == [2] assert root.children[0].children[1].children[1].values == [1] assert root.children[0].children[1].children[1].children[0].values == [0] assert root.children[0].children[1].children[1].children[1].values == [0] assert root.children[0].children[", + "exact_match": false, + "code_bleu": 0.35818997727451396, + "edit_similarity": 0.4 + }, + { + "repo": "laixintao/flameshow", + "expected": "2", + "got": "30", + "got_raw": "30 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "laixintao/flameshow", + "expected": "[6]", + "got": "[6]", + "got_raw": "[6] assert root.children[0].children[0].children[0].values == [4] assert root.children[0].children[0].children[0].children[0].values == [3] assert root.children[0].children[0].children[0].children[0].children[0].values == [2] assert root.children[0].children[0].children[0].children[0].children[0].children[0].values == [1] assert root.children[0].children[0].children[0].children[0].children[0].children[0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "langfuse/langfuse-python", + "expected": "403", + "got": "403", + "got_raw": "403", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "langfuse/langfuse-python", + "expected": "caplog.text", + "got": "\"Error", + "got_raw": "\"Error in test function\" in caplog.text.lower()", + "exact_match": false, + "code_bleu": 0.30120066786994826, + "edit_similarity": 0.11764705882352941 + }, + { + "repo": "langfuse/langfuse-python", + "expected": "2", + "got": "2", + "got_raw": "2 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 *", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "langfuse/langfuse-python", + "expected": "\"file\"", + "got": "\"file\"", + "got_raw": "\"file\" media._content_type == \"image/jpeg\" media._content_length == 1024 media._content_type == \"image/jpeg\" media._content_length == 1024 media._content_type == \"image/jpeg\" media._content_length == 1024 media._content_type == \"image/jpeg\" media._content_length == 1024 media._content_type == \"image/jpeg\" media._content_length == 1024 media._content_type == \"image/jpeg\" media._content_length == 1024 media._content_type == \"image/jpeg\" media._", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "langfuse/langfuse-python", + "expected": "30", + "got": "\"INFO\"", + "got_raw": "\"INFO\" langfuse_logger.info(\"test\") langfuse_logger.debug(\"test\") langfuse_logger.warning(\"test\") langfuse_logger.error(\"test\") langfuse_logger.critical(\"test\") langfuse_logger.fatal(\"test\") langfuse_logger.exception(\"test\") langfuse_logger.log(10, \"test\") langfuse_logger.log(20, \"test\") langfuse_logger.log(30, \"test\") langfuse_logger.log(40, \"test\") langfuse_logger.log(50, \"test\") langfuse_logger.log(60, \"test\") langfuse_logger.log(70,", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "langfuse/langfuse-python", + "expected": "\"v2\"", + "got": "\"v2\"", + "got_raw": "\"v2\" assert attributes[f\"{LangfuseOtelSpanAttributes.TRACE_METADATA}.k3\"] == \"v3\" def test_multiple_metadata_keys_independent_with_custom_key(self, langfuse_client, memory_exporter): \"\"\"Verify multiple metadata keys are stored as independent attributes with a custom key.\"\"\" with langfuse_client.start_as_current_observation(name=\"parent-span\"): with propagate_attributes(metadata={\"k1\": \"v1\", \"k2\": \"v2\", \"k3\": \"v3\"}, custom_key=\"custom_metadata\"): child = langfuse_client.start_observation(name=\"child-span\") child.end() child_span =", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "langfuse/langfuse-python", + "expected": "'\"2023-01-01T12:00:00Z\"'", + "got": "'\"2023-01-01T12:00:00Z\"'", + "got_raw": "'\"2023-01-01T12:00:00Z\"' def test_date(): dt = date(2023, 1, 1) serializer = EventSerializer() assert serializer.encode(dt) == '\"2023-01-01\"' def test_uuid(): uuid = UUID(\"123e4567-e89b-12d3-a456-426614174000\") serializer = EventSerializer() assert serializer.encode(uuid) == '\"1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "langfuse/langfuse-python", + "expected": "data", + "got": "data", + "got_raw": "data # type: ignore # noqa: E501 def test_list(): data = [1, \"two\"] serializer = EventSerializer() assert json.loads(serializer.encode(data)) == data # type: ignore # noqa: E501 def test_str(): data = \"hello\" serializer = EventSerializer() assert json.loads(serializer.encode(data)) == data # type: ignore # noqa: E501 def test_bool(): data = True serializer = EventSerializer() assert json.loads(serializer.encode(data)) == data # type: ignore # noqa: E501 def test_none(): data", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "langfuse/langfuse-python", + "expected": "0", + "got": "0", + "got_raw": "0 generation = generationList[0] assert generation.type == \"GENERATION\" assert generation.tags == tags assert generation.text == \"This is a test!\" assert generation.response == \"This is a test!\" assert generation.response_str == response_str[0] assert generation.response_str_list == response_str assert generation.response_str_list[0] == response_str[0] assert generation.response_str_list[1] == \"\" assert generation.response_str_list[2] == \"\" assert generation.response_str_list[3] == \"\" assert generation.response_str_list[4] == \"\" assert generation.response_str_list[5] == \"\" assert generation.response_str_list", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "langfuse/langfuse-python", + "expected": "1", + "got": "1", + "got_raw": "1 # Exactly one tool call in the assistant message\n\n # Tool call details\n assert compiled_messages[2][\"tool_calls\"][0][\"id\"] == \"call_123\" # Tool call ID\n assert compiled_messages[2][\"tool_calls\"][0][\"type\"] == \"function\" # Tool call type\n assert compiled_messages[2][\"tool_calls\"][0][\"function\"][\"name\"] == \"get_weather\" # Function name\n assert compiled_messages[2][\"tool_calls\"][0][\"function\"][\"arguments\"] == '{\"location\": \"San Francisco\"}' # Function arguments\n\n #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "langfuse/langfuse-python", + "expected": "httpx.HTTPStatusError)", + "got": "httpx.HTTPError)", + "got_raw": "httpx.HTTPError) as exc_info: manager.upload(\"input\") assert str(exc_info.value) == \"403 Forbidden\" assert httpx_client.put.call_count == 1 assert httpx_client.put.call_args_list[0].kwargs[\"url\"] == \"https://example.com/upload\" assert httpx_client.put.call_args_list[0].kwargs[\"data\"] == b\"payload\" assert httpx_client.put.call_args_list[0].kwargs[\"headers\"] == { \"Content-Type\": \"image/jpeg\", \"Content-Length\": \"7\", \"Content-Sha256-Hash\": \"sha256hash", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.8421052631578947 + }, + { + "repo": "langfuse/langfuse-python", + "expected": "\"v1\"", + "got": "\"v1\"", + "got_raw": "\"v1\" assert attributes[f\"{LangfuseOtelSpanAttributes.TRACE_METADATA}.k2\"] == \"v2\" assert attributes[f\"{LangfuseOtelSpanAttributes.TRACE_METADATA}.k3\"] == \"v3\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "langfuse/langfuse-python", + "expected": "'{\"foo\": \"John\", \"bar\": \"2021-01-01T00:00:00Z\"}'", + "got": "'{\"foo\": \"John\", \"bar\": \"2021-01-01T00:00:00Z\"}'", + "got_raw": "'{\"foo\": \"John\", \"bar\": \"2021-01-01T00:00:00Z\"}'\n\n\ndef test_json_encoder_with_langchain_serializer():\n with patch.dict(\"sys.modules\", {\"langchain.load.serializable\": importlib.import_module(\"langchain.load.serializable\")}) as langchain_serializable:\n model = TestModel(\n foo=\"John\", bar=datetime(2021, 1, 1, 0, 0, 0, tzinfo=timezone.utc)\n )\n result = json.dumps(model", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "langfuse/langfuse-python", + "expected": "4", + "got": "len(completion.choices[0].message.content.split())", + "got_raw": "len(completion.choices[0].message.content.split()) + 2 # +2 for system and user messages # +1 for the final assistant message # +1 for the final assistant message # +1 for the final assistant message # +1 for the final assistant message # +1 for the final assistant message # +1 for the final assistant message # +1 for the final assistant message # +1 for the final assistant message # +1 for the final assistant message # +1 for the final assistant message # +1 for the final assistant message # +1 for the final", + "exact_match": false, + "code_bleu": 0.06074588070876682, + "edit_similarity": 0.0 + }, + { + "repo": "langfuse/langfuse-python", + "expected": "1", + "got": "2", + "got_raw": "2 # 2 evaluators run for each item result\n\n # Validate item results\n for item_result in result.item_results:\n assert item_result.input in sample_dataset[0][\"input\"] # Check input value\n assert item_result.output in [\"Berlin\", \"Paris\", \"Madrid\"] # Check output value\n\n # Validate evaluators' results\n for eval_result in result.run_evaluations:\n assert eval_result.name in [\"length_check\", \"factuality\"] # Check evaluator names\n assert eval_result.value >= 0.0 # Check evaluator values are non-negative\n\n #", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "langfuse/langfuse-python", + "expected": "\"test\"", + "got": "\"test\"", + "got_raw": "\"test\" assert \"langfuse_metadata_version\" in baggage_entries assert baggage_entries[\"langfuse_metadata_version\"] == \"2.0\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "langfuse/langfuse-python", + "expected": "3", + "got": "3", + "got_raw": "3", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lanpa/tensorboardX", + "expected": "True", + "got": "True", + "got_raw": "True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lanpa/tensorboardX", + "expected": "b)", + "got": "b)", + "got_raw": "b) # 255 is the max value for uint8. 1.0 is the max value for float32. 255 / 1.0 = 255. 255 / 1.0 = 255. 255 / 1.0 = 255. 255 / 1.0 = 255. 255 / 1.0 = 255. 255 / 1.0 = 255. 255 / 1.0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lanpa/tensorboardX", + "expected": "removeWhiteChar(expected)", + "got": "removeWhiteChar(expected)", + "got_raw": "removeWhiteChar(expected)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lanpa/tensorboardX", + "expected": "c.getcolors())", + "got": "c.getcolors())", + "got_raw": "c.getcolors())\n\n def test_image(self) -> None:\n image = Image.new(\"RGB\", (10, 10), (255, 0, 0))\n summary.image(\"image\", image)\n summary.close()\n with open(\"test_image.out\", \"rb\") as f:\n expected = f.read()\n with open(\"test_image.exp\", \"rb\") as f:\n expected = f.read()\n self.assertEqual(expected, expected)\n\n def test_image_with_color(self) -> None:\n image = Image.new(\"RGB\", (1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lanpa/tensorboardX", + "expected": "bytes_to_write)", + "got": "bytes_to_write)", + "got_raw": "bytes_to_write) #bytes_to_write) #bytes_to_write) #bytes_to_write) #bytes_to_write) #bytes_to_write) #bytes_to_write) #bytes_to_write) #bytes_to_write) #bytes_to_write) #bytes_to_write) #bytes_to_write) #bytes_to_write) #bytes_to_write) #bytes_to_write) #bytes_to_write) #bytes_to_write) #bytes_to_write) #bytes_to_write) #bytes_to_write) #bytes_to_write) #bytes_to_write) #bytes_to_write) #bytes_to_write) #bytes_to_write) #bytes_to_write", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lark-parser/lark", + "expected": "2)", + "got": "2)", + "got_raw": "2) x = MyTransformer().transform( Tree('hello', [])) self.assertEqual(x, 'hello') x = MyTransformer().transform( Tree('hello', [2])) self.assertEqual(x, 'hello') x = MyTransformer().transform( Tree('hello', [2, 3])) self.assertEqual(x, 'hello') x = MyTransformer().transform( Tree('hello', [2, 3, 4])) self.assertEqual(x, 'hello') x = MyTransformer().transform( Tree('hello', [2, 3, 4, 5])) self.assertEqual(x, 'hello') x = MyTransformer", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lark-parser/lark", + "expected": "3", + "got": "2", + "got_raw": "2 or len(data) == 3 or len(data) == 4 or len(data) == 5 or len(data) == 6 or len(data) == 7 or len(data) == 8 or len(data) == 9 or len(data) == 10 or len(data) == 11 or len(data) == 12 or len(data) == 13 or len(data) == 14 or len(data) == 15 or len(data) == 16 or len(data) == 17 or len(data) == 18 or len(data) == ", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "lark-parser/lark", + "expected": "cb", + "got": "cb", + "got_raw": "cb", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lark-parser/lark", + "expected": "code)", + "got": "code)", + "got_raw": "code) \"\"\" A rule with a star \"\"\" + code) \"\"\" A rule with a star \"\"\" + code) \"\"\" A rule with a star \"\"\" + code) \"\"\" A rule with a star \"\"\" + code) \"\"\" A rule with a star \"\"\" + code) \"\"\" A rule with a star \"\"\" + code) \"\"\" A rule with a star \"\"\" + code) \"\"\" A rule with a star \"\"\" + code) \"\"\" A rule with a star \"\"\" + code) \"\"\" A rule with a star \"\"\" + code) \"\"\" A rule with a star \"\"\" + code) \"\"\" A rule with a star \"\"\" + code) \"\"\" A rule with a star", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lark-parser/lark", + "expected": "template.tree)", + "got": "template)", + "got_raw": "template) self.assertEqual(test_case, template.parse()) self.assertEqual(test_case, template) self.assertEqual(test_case, template.parse()) self.assertEqual(test_case, template) self.assertEqual(test_case, template.parse()) self.assertEqual(test_case, template) self.assertEqual(test_case, template.parse()) self.assertEqual(test_case, template) self.assertEqual(test_case, template.parse()) self.assertEqual(test_case, template) self.assertEqual(test_case, template) self.assertEqual(test_case, template) self.assertEqual(test_case, template) self.assertEqual(test_case, template) self.assertEqual(test_case, template) self.assertEqual(test_case, template) self.assertEqual(test_case, template) self.assertEqual", + "exact_match": false, + "code_bleu": 0.29730177875068026, + "edit_similarity": 0.782608695652174 + }, + { + "repo": "lark-parser/lark", + "expected": "terminal)", + "got": "terminal)", + "got_raw": "terminal) if token.type == \"number\" else True) if token.type == \"file_input\" else False) if token.type == \"file_input\" else True) if token.type == \"file_input\" else False) if token.type == \"file_input\" else True) if token.type == \"file_input\" else False) if token.type == \"file_input\" else True) if token.type == \"file_input\" else False) if token.type == \"file_input\" else True) if token.type == \"file_input\" else False) if token.type == \"file_input\" else True) if token.type == \"file", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lark-parser/lark", + "expected": "ip.parser_state)", + "got": "ip.parser_state)", + "got_raw": "ip.parser_state) self.assertEqual(ip_copy._lexer, ip._lexer) self.assertEqual(ip_copy._token, ip._token) self.assertEqual(ip_copy._token_end, ip._token_end) self.assertEqual(ip_copy._token_start, ip._token_start) self.assertEqual(ip_copy._token_value, ip._token_value) self.assertEqual(ip_copy._token_type, ip._token_type) self.assertEqual(ip_copy._token_line, ip._token_line) self.assertEqual(ip_copy._token_col, ip._token_col) self.assertEqual(ip_copy._token_end_line, ip._token_end_line) self.assertEqual(ip_copy._token_end_col,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lark-parser/lark", + "expected": "1", + "got": "1", + "got_raw": "1 if LEXER=='basic' else 2 if LEXER=='dynamic' else 3 if LEXER=='dynamic_complete' else 4 if LEXER=='dynamic_complete2' else 5 if LEXER=='dynamic_complete3' else 6 if LEXER=='dynamic_complete4' else 7 if LEXER=='dynamic_complete5' else 8 if LEXER=='dynamic_complete6' else 9 if LEXER=='dynamic_complete7' else 10 if LEXER=='dynamic_complete8' else 11 if LEXER=='dynamic_complete9' else", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lark-parser/lark", + "expected": "(UnexpectedCharacters, UnexpectedToken))", + "got": "ParseError) as err: self.python_parser.parse(case) self.assertEqual(str(err.exception), case) self.assertEqual(err.exception.token.type, \"NUMBER\") self.assertEqual(err.exception.token.value, case) self.assertEqual(err.exception.token.line, 1) self.assertEqual(err.exception.token.column, 1) self.assertEqual(err.exception.token.pos, 0) self.assertEqual(err.exception.token.end_line, 1) self.assertEqual(err.exception.token.end_column, 1) self.assertEqual(err.exception.token.end_pos, 1) self.assertEqual(err.exception.token.lexer_name, \"python\") self.assertEqual(err.exception.token.lexer_version, \"3.10", + "got_raw": "ParseError) as err: self.python_parser.parse(case) self.assertEqual(str(err.exception), case) self.assertEqual(err.exception.token.type, \"NUMBER\") self.assertEqual(err.exception.token.value, case) self.assertEqual(err.exception.token.line, 1) self.assertEqual(err.exception.token.column, 1) self.assertEqual(err.exception.token.pos, 0) self.assertEqual(err.exception.token.end_line, 1) self.assertEqual(err.exception.token.end_column, 1) self.assertEqual(err.exception.token.end_pos, 1) self.assertEqual(err.exception.token.lexer_name, \"python\") self.assertEqual(err.exception.token.lexer_version, \"3.10", + "exact_match": false, + "code_bleu": 0.009035546249319576, + "edit_similarity": 0.05287713841368585 + }, + { + "repo": "lark-parser/lark", + "expected": "[3, 4, 6]", + "got": "[3, 5, 6] + [7] * 2 + [8] * 3 + [9] * 4 + [10] * 5 + [11] * 6 + [12] * 7 + [13] * 8 + [14] * 9 + [15] * 10 + [16] * 11 + [17] * 12 + [18] * 13 + [19] * 14 + [20] * 15 + [21", + "got_raw": "[3, 5, 6] + [7] * 2 + [8] * 3 + [9] * 4 + [10] * 5 + [11] * 6 + [12] * 7 + [13] * 8 + [14] * 9 + [15] * 10 + [16] * 11 + [17] * 12 + [18] * 13 + [19] * 14 + [20] * 15 + [21", + "exact_match": false, + "code_bleu": 0.03540093664398876, + "edit_similarity": 0.08839779005524862 + }, + { + "repo": "lark-parser/lark", + "expected": "Tree('start', []))", + "got": "Tree('start', []))", + "got_raw": "Tree('start', []))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lark-parser/lark", + "expected": "UnexpectedInput)", + "got": "UnexpectedInput)", + "got_raw": "UnexpectedInput) as exc_info) as exc_info: parser1.parse(text) parser2.parse(text) self.assertEqual(str(exc_info.value), str(exc_info.value)) self.assertEqual(str(exc_info), str(exc_info)) self.assertEqual(str(exc_info.value), str(exc_info.value)) self.assertEqual(str(exc_info), str(exc_info)) self.assertEqual(str(exc_info.value), str(exc_info.value)) self.assertEqual(str(exc_info), str(exc_info)) self.assertEqual(str(exc_info.value), str(exc_info.value)) self.assertEqual(str(exc_info), str(exc_info)) self.assertEqual(str(exc_info.value), str(exc_info.value)) self.assertEqual(str(exc_info), str", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lexiforest/curl_cffi", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lexiforest/curl_cffi", + "expected": "data", + "got": "data.decode()", + "got_raw": "data.decode() + b\"\\r\\n\" + b\"\\r\\n\" + b\"\\r\\n\" + b\"\\r\\n\" + b\"\\r\\n\" + b\"\\r\\n\" + b\"\\r\\n\" + b\"\\r\\n\" + b\"\\r\\n\" + b\"\\r\\n\" + b\"\\r\\n\" + b\"\\r\\n\" + b\"\\r\\n\" + b\"\\r\\n\" + b\"\\r\\n\" + b\"\\r\\n\" + b\"\\r\\n\" + b\"\\r\\n\" + b\"\\r\\n\" + b\"\\r\\n\" + b\"\\r\\n", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.47058823529411764 + }, + { + "repo": "lexiforest/curl_cffi", + "expected": "1", + "got": "1", + "got_raw": "1 assert headers[\"Foo\"][0] == \"bar\" c.close()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lexiforest/curl_cffi", + "expected": "akamai", + "got": "akamai.split(\"|\")[0]", + "got_raw": "akamai.split(\"|\")[0] + \"|\" + akamai.split(\"|\")[1] + \"|\" + akamai.split(\"|\")[2] + \"|\" + akamai.split(\"|\")[3] + \"|\" + akamai.split(\"|\")[4] + \"|\" + akamai.split(\"|\")[5] + \"|\" + akamai.split(\"|\")[6] + \"|\" + akamai.split(\"|\")[7] + \"|\" + akamai.split(\"|\")[8] + \"|\" + akamai.split(\"|\")[9] + \"|\" + akamai.split(\"|\")[10] + \"|\" + akamai.split(\"|\")[", + "exact_match": false, + "code_bleu": 0.14113991930789777, + "edit_similarity": 0.46153846153846156 + }, + { + "repo": "lexiforest/curl_cffi", + "expected": "(\"bar\", \"baz\")", + "got": "(\"bar\", \"baz\")", + "got_raw": "(\"bar\", \"baz\") # The cookie is set to the value of the first cookie with the same name. # The second cookie is ignored. # The cookie is set to the value of the first cookie with the same name. # The second cookie is ignored. # The cookie is set to the value of the first cookie with the same name. # The second cookie is ignored. # The cookie is set to the value of the first cookie with the same name. # The second cookie is ignored. # The cookie is set to the value of the first cookie with the same name. # The second cookie is ignored. # The", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lexiforest/curl_cffi", + "expected": "\"baz\"", + "got": "\"baz\"", + "got_raw": "\"baz\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lexiforest/curl_cffi", + "expected": "b\"\"", + "got": "b\"\"", + "got_raw": "b\"\" # Empty message received as expected\n\n async def test_close_after_n(self, ws_connection: AsyncWebSocket) -> None:\r\n \"\"\"Test closing connection after sending N messages.\"\"\"\r\n await ws_connection.send(b\"1\") # Send 1 message\r\n await ws_connection.send(b\"2\") # Send 2 messages\r\n await ws_connection.send(b\"3\") # Send 3 messages\r\n await ws_connection.close() # Close after 3 messages sent\r\n\r\n # Check if connection is closed after 3 messages\r\n with suppress(ConnectionClosedError): # ConnectionClosedError is expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lexiforest/curl_cffi", + "expected": "\"example.com\\tFALSE\\t/\\tTRUE\\t0\\tfoo\\tbar\"", + "got": "\"example.com\\tTRUE\\t/\\tFALSE\\t0\\tfoo\\tbar\"", + "got_raw": "\"example.com\\tTRUE\\t/\\tFALSE\\t0\\tfoo\\tbar\" m = CurlMorsel(name=\"foo\", value=\"bar\", hostname=\"example.com\", port=80) assert m.to_curl_format() == \"example.com:80\\tFALSE\\t/\\tFALSE\\t0\\tfoo\\tbar\" m = CurlMorsel(name=\"foo\", value=\"bar\", hostname=\"example.com\", port=80, domain=\"example.org\") assert m.to_curl_format() == \"example.com:80\\tFALSE\\t/\\tFALSE\\t0\\tfoo\\tbar\" m = CurlMors", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.8333333333333334 + }, + { + "repo": "lexiforest/curl_cffi", + "expected": "20", + "got": "20", + "got_raw": "20 + 1 # 20 lines + 1 header line # 20 lines + 1 header line # 20 lines + 1 header line # 20 lines + 1 header line # 20 lines + 1 header line # 20 lines + 1 header line # 20 lines + 1 header line # 20 lines + 1 header line # 20 lines + 1 header line # 20 lines + 1 header line # 20 lines + 1 header line #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lexiforest/curl_cffi", + "expected": "False", + "got": "True", + "got_raw": "True if curl_cffi.__version__ >= \"7.67.0\" else False # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "lexiforest/curl_cffi", + "expected": "CurlHttpVersion.V1_1", + "got": "CurlHttpVersion.V1_1", + "got_raw": "CurlHttpVersion.V1_1 r = requests.get( url, curl_options={CurlOpt.HTTP_VERSION: CurlHttpVersion.V2_0}, impersonate=\"chrome110\", default_headers=False, ) headers = r.json() assert r.http_version == CurlHttpVersion.V2_0 r = requests.get( url, curl_options={CurlOpt.HTTP_VERSION: CurlHttpVersion.V2_0}, impersonate=\"chrome110\", default_headers=False, ) headers = r.json() assert r.http_version == CurlHttpVersion.V2_0 r = requests.get( url, curl_options={Curl", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lightly-ai/lightly", + "expected": "1", + "got": "99.000000000000002", + "got_raw": "99.000000000000002 # 99.000000000000002 is the float representation of 99.000000000000002. # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "lightly-ai/lightly", + "expected": "model)", + "got": "model)", + "got_raw": "model) self.assertIsInstance(model, SimSiam) self.assertEqual(model.batch_size, self.batch_size) self.assertEqual(model.num_ftrs, config[\"num_ftrs\"]) self.assertEqual(model.out_dim, config[\"out_dim\"]) self.assertEqual(model.pred_hidden_dim, config[\"pred_hidden_dim\"]) self.assertEqual(model.proj_hidden_dim, config[\"proj_hidden_dim\"]) self.assertEqual(model.device, torch.device(\"cpu\")) self.assertEqual(model.dtype, torch.float32) self.assertEqual(model._backbone.device, torch.device(\"cpu\")) self.assertEqual(model._backbone.dtype, torch.float32) self.assertEqual(model._proj.device, torch.device(\"cpu\"))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lightly-ai/lightly", + "expected": "5", + "got": "5.0000000000000004e-05", + "got_raw": "5.0000000000000004e-05 # 5ms # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.08695652173913043 + }, + { + "repo": "lightly-ai/lightly", + "expected": "1", + "got": "1.0000000000000002", + "got_raw": "1.0000000000000002 if with_retry else 1.0000000000000001 else 1.0000000000000002 if with_retry else 1.0000000000000001 else 1.0000000000000002 if with_retry else 1.0000000000000001 else", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.10526315789473684 + }, + { + "repo": "lightly-ai/lightly", + "expected": "5", + "got": "5.0000000000000002e-05", + "got_raw": "5.0000000000000002e-05 if with_retry else 5.0000000000000002e-06 if not with_retry else 0.0000000000000002e-07 if with_retry else 0.0000000000000002e-08 if not with_retry else 0.0000000000000002", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.08695652173913043 + }, + { + "repo": "lightly-ai/lightly", + "expected": "torch.int", + "got": "torch.int32", + "got_raw": "torch.int32", + "exact_match": false, + "code_bleu": 0.5946035575013605, + "edit_similarity": 0.9 + }, + { + "repo": "lightly-ai/lightly", + "expected": "\"LOCAL\"", + "got": "\"local\"", + "got_raw": "\"local\" datasource_config.web_server_location == \"http://localhost:1234\" datasource_config.relative_path == \"path/to/my/data\" datasource_config.thumbnail_suffix == \".lightly/thumbnails/[filename]-thumb-[extension]\" datasource_config.purpose == DatasourcePurpose.INPUT\n\n def test_set_s3_config(self, mocker: MockerFixture) -> None:\n client = ApiWorkflowClient(token=\"abc\", dataset_id=\"dataset-id\")\n mocker.patch.object( client._datasources_api, \"update_datasource_by_dataset_id\", ) client.set_s3_config( bucket=\"my-bucket\", access_key=\"my", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2857142857142857 + }, + { + "repo": "lightly-ai/lightly", + "expected": "(3, 32, 32)", + "got": "(3, 32, 32)", + "got_raw": "(3, 32, 32)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lightly-ai/lightly", + "expected": "low + high)", + "got": "high + low) self.assertEqual(len(labels)", + "got_raw": "high + low) self.assertEqual(len(labels), 1) self.assertEqual(len(fnames), 1) self.assertEqual(samples[0].shape, (3, 32, 32)) self.assertEqual(samples[1].shape, (3, 16, 16)) self.assertEqual(labels[0], batch[0][1]) self.assertEqual(fnames[0], batch[0][2]) self.assertEqual(samples[0].dtype, torch.float32) self.assertEqual(samples[1].dtype, torch.float32) self.assertEqual(labels[0].dtype, torch.long) self.assertEqual(fnames[0].", + "exact_match": false, + "code_bleu": 0.13065113298388567, + "edit_similarity": 0.19607843137254902 + }, + { + "repo": "lightly-ai/lightly", + "expected": "(10, 10)", + "got": "(10, 10)", + "got_raw": "(10, 10) # dtype = np.float32 # Check that the transformed data has the correct shape # and dtype X_transformed = pca.transform(X) assert X_transformed.shape == (100, 2) assert X_transformed.dtype == np.float32 # Check that the inverse transform gives back the original data X_reconstructed = pca.inverse_transform(X_transformed) assert_allclose(X_reconstructed, X) # Check that the explained variance ratio is correct explained_variance_ratio = pca.explained_variance_ratio_ assert_allclose( explained", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lightly-ai/lightly", + "expected": "0", + "got": "0", + "got_raw": "0\n\n def test_get_compute_worker_run(self):\n run = self.api_workflow_client.get_compute_worker_run(1)\n assert run.id == 1\n\n def test_get_compute_worker_run_not_found(self):\n with pytest.raises(ApiException) as e:\n self.api_workflow_client.get_compute_worker_run(999999999999999999999999999999999999999999999999999999999999", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lightly-ai/lightly", + "expected": "2", + "got": "2", + "got_raw": "2 * 2 * 3 * 32 * 32 * 3 + 2 * 2 * 3 * 32 * 32 * 3 + 2 * 2 * 3 * 32 * 32 * 3 + 2 * 2 * 3 * 32 * 32 * 3 + 2 * 2 * 3 * 32 * 32 * 3 + 2 * 2 * 3 * 32 * 32 * 3 + 2 * 2 * 3 *", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lightly-ai/lightly", + "expected": "x0.T.tolist()", + "got": "bank0[:", + "got_raw": "bank0[:, :3].tolist() + bank0[:, 3:].tolist() + bank1[:, 3:].tolist() + bank1[:, 3:].tolist() + bank1[:, 3:].tolist() + bank1[:, 3:].tolist() + bank1[:, 3:].tolist() + bank1[:, 3:].tolist() + bank1[:, 3:].tolist() + bank1[:, 3:].tolist() + bank1[:, 3:].tolist() + bank1[:, 3:].tolist() + bank1[:, 3:].tolist() + bank1[:, 3:].tolist() + bank1", + "exact_match": false, + "code_bleu": 0.16282193263962697, + "edit_similarity": 0.1 + }, + { + "repo": "lightly-ai/lightly", + "expected": "0", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "lightly-ai/lightly", + "expected": "\"lorem\"", + "got": "\"lorem\"", + "got_raw": "\"lorem\" assert _snake_to_camel_case(\"lorem_ipsum\") == \"loremIpsum\" assert _snake_to_camel_case(\"lorem_ipsum_dolor\") == \"loremIpsumDolor\" assert _snake_to_camel_case(\"lorem_ipsum_dolor_sit\") == \"loremIpsumDolorSit\" assert _snake_to_camel_case(\"lorem_ipsum_dolor_sit_amet\") == \"loremIpsumDolorSitAmet\" assert _snake_to_camel_case(\"lorem_ipsum_dolor_sit_amet_env\") == \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lightly-ai/lightly", + "expected": "2", + "got": "2", + "got_raw": "2 # 2 files to download and write # Check the arguments for each call mock_download_and_write_file.assert_any_call( \"file1.jpg\", \"http://example.com/file1.jpg\", str(tmp_path), mock_retry_fn, ) mock_download_and_write_file.assert_any_call( \"file2.jpg\", \"http://example.com/file2.jpg\", str(tmp_path), mock_retry_fn, )", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lightly-ai/lightly", + "expected": "2", + "got": "3", + "got_raw": "3 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "lightly-ai/lightly", + "expected": "loaded)", + "got": "loaded)", + "got_raw": "loaded)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lightly-ai/lightly", + "expected": "\"/blub\")", + "got": "\"/blub\")", + "got_raw": "\"/blub\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lightly-ai/lightly", + "expected": "eps)", + "got": "z.std())", + "got_raw": "z.std()) < eps) / math.sqrt(BATCH_SIZE)) < eps) / math.sqrt(BATCH_SIZE)) < eps) / math.sqrt(BATCH_SIZE)) < eps) / math.sqrt(BATCH_SIZE)) < eps) / math.sqrt(BATCH_SIZE)) < eps) / math.sqrt(BATCH_SIZE)) < eps) / math.sqrt(BATCH_SIZE)) < eps) / math.sqrt(BATCH_SIZE)) < eps) / math.sqrt(BATCH_SIZE)) < eps) / math.sqrt(BATCH_SIZE)) < eps) / math.sqrt(BATCH_SIZE)) < eps) / math.sqrt(BATCH_SIZE)) < eps) / math", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "lightning-power-users/node-launcher", + "expected": "1", + "got": "1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "lightning-power-users/node-launcher", + "expected": "'test_edit_value'", + "got": "'test_edit_value'", + "got_raw": "'test_edit_value'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lightning-power-users/node-launcher", + "expected": "TARGET_BITCOIN_RELEASE.replace('v', '')", + "got": "TARGET_BITCOIN_RELEASE + \"-rc1\" if IS_WINDOWS else TARGET_BITCOIN_RELEASE + \"-rc1-64\" if IS_MACOS else TARGET_BITCOIN_RELEASE + \"-rc1-32\" if IS_LINUX else None", + "got_raw": "TARGET_BITCOIN_RELEASE + \"-rc1\" if IS_WINDOWS else TARGET_BITCOIN_RELEASE + \"-rc1-64\" if IS_MACOS else TARGET_BITCOIN_RELEASE + \"-rc1-32\" if IS_LINUX else None # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E5", + "exact_match": false, + "code_bleu": 0.06439931429457924, + "edit_similarity": 0.23232323232323232 + }, + { + "repo": "lightning-power-users/node-launcher", + "expected": "'2'", + "got": "'2'", + "got_raw": "'2' assert configuration_dialog.table.item(1, 1).text() == 'key2' assert configuration_dialog.table.item(1, 2).text() == 'value2'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lightning-power-users/node-launcher", + "expected": "True", + "got": "True", + "got_raw": "True\n\n def test_setitem_getitem_int(self, configuration: Configuration):\n configuration['test_int'] = 1234567890\n assert configuration['test_int'] == 1234567890\n\n def test_setitem_getitem_float(self, configuration: Configuration):\n configuration['test_float'] = 1.2345678901234567890123456789012345678901234567890", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lightning-power-users/node-launcher", + "expected": "'test rest'", + "got": "'joule://test rest' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' +", + "got_raw": "'joule://test rest' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' + '/test macaroon' +", + "exact_match": false, + "code_bleu": 0.028182998883818942, + "edit_similarity": 0.061971830985915494 + }, + { + "repo": "liiight/notifiers", + "expected": "{ \"additionalProperties\": False, \"properties\": {\"token\": {\"title\": \"Bot token\", \"type\": \"string\"}}, \"required\": [\"token\"], \"type\": \"object\", }", + "got": "{ \"type\": \"object\", \"properties\": { \"chat_id\": {\"type\": \"string\", \"title\": \"The chat id\"}, \"offset\": {\"type\": \"integer\", \"title\": \"The offset\"}, \"limit\": {\"type\": \"integer\", \"title\": \"The limit\"}, \"timeout\": {\"type\": \"integer\", \"title\": \"The timeout\"}, \"allowed_updates\": {\"type\": \"array\", \"title\": \"The allowed updates\"}, }, \"required\": [\"chat_id\"], } } } def test_telegram_updates(self, resource): \"\"\" Test the telegram updates resource \"\"\" resource = resource() assert resource", + "got_raw": "{ \"type\": \"object\", \"properties\": { \"chat_id\": {\"type\": \"string\", \"title\": \"The chat id\"}, \"offset\": {\"type\": \"integer\", \"title\": \"The offset\"}, \"limit\": {\"type\": \"integer\", \"title\": \"The limit\"}, \"timeout\": {\"type\": \"integer\", \"title\": \"The timeout\"}, \"allowed_updates\": {\"type\": \"array\", \"title\": \"The allowed updates\"}, }, \"required\": [\"chat_id\"], } } } def test_telegram_updates(self, resource): \"\"\" Test the telegram updates resource \"\"\" resource = resource() assert resource", + "exact_match": false, + "code_bleu": 0.12717817848292676, + "edit_similarity": 0.06752411575562701 + }, + { + "repo": "liiight/notifiers", + "expected": "provider", + "got": "provider", + "got_raw": "provider + \"_components\" assert resource.base_url == \"https://api.statuspage.io/v1\" assert resource.endpoint == \"pages/{page_id}/components\" assert resource.url_path_format_string == \"{page_id}/components\" assert resource.url_path_params == [\"page_id\"] assert resource.method == \"GET\" assert resource.auth_required is True assert resource.headers_required is False assert resource.data_required is False assert resource.response_key is None assert resource.model = None assert resource.model_name = None assert resource.model_schema is None assert resource.model_title is None assert resource.model_description is None assert resource.model_props is None assert resource.model_props_map is None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "liiight/notifiers", + "expected": "[\"Unauthorized\"]", + "got": "[", + "got_raw": "[ \"Invalid token\" ]", + "exact_match": false, + "code_bleu": 0.19820118583378682, + "edit_similarity": 0.11764705882352941 + }, + { + "repo": "liiight/notifiers", + "expected": "BadArguments)", + "got": "BadArguments)", + "got_raw": "BadArguments) as excinfo:\n provider.notify(data)\n assert str(excinfo.value) == f\"{message} is a required property\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "liiight/notifiers", + "expected": "{ \"additionalProperties\": False, \"properties\": { \"api_key\": {\"title\": \"OAuth2 token\", \"type\": \"string\"}, \"page_id\": {\"title\": \"Page ID\", \"type\": \"string\"}, }, \"required\": [\"api_key\", \"page_id\"], \"type\": \"object\", }", + "got": "{ \"type\": \"object\", \"properties\": { \"id\": {\"type\": \"string\", \"title\": \"The unique identifier for the component.\"}, \"name\": {\"type\": \"string\", \"title\": \"The name of the component.\"}, \"status\": {\"type\": \"string\", \"title\": \"The status of the component.\"}, \"url\": {\"type\": \"string\", \"title\": \"The URL of the component.\"}, \"status_page_id\": {\"type\": \"string\", \"title\": \"The unique identifier for the StatusPage.\"}, }, \"required\": [\"id\", \"name\", \"status", + "got_raw": "{ \"type\": \"object\", \"properties\": { \"id\": {\"type\": \"string\", \"title\": \"The unique identifier for the component.\"}, \"name\": {\"type\": \"string\", \"title\": \"The name of the component.\"}, \"status\": {\"type\": \"string\", \"title\": \"The status of the component.\"}, \"url\": {\"type\": \"string\", \"title\": \"The URL of the component.\"}, \"status_page_id\": {\"type\": \"string\", \"title\": \"The unique identifier for the StatusPage.\"}, }, \"required\": [\"id\", \"name\", \"status", + "exact_match": false, + "code_bleu": 0.20874498085716817, + "edit_similarity": 0.060514372163388806 + }, + { + "repo": "liiight/notifiers", + "expected": "BadArguments)", + "got": "BadArguments)", + "got_raw": "BadArguments) as excinfo:\n provider.notify(data)\n assert str(excinfo.value) == f\"{message} is a required property\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "liiight/notifiers", + "expected": "\"bla@foo.com\"", + "got": "\"bla@foo.com\"", + "got_raw": "\"bla@foo.com\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "liiight/notifiers", + "expected": "404", + "got": "404", + "got_raw": "404", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "liiight/notifiers", + "expected": "BadArguments)", + "got": "BadArguments)", + "got_raw": "BadArguments) as excinfo:\n provider.notify(data)\n assert str(excinfo.value) == f\"Missing required {message}\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "liiight/notifiers", + "expected": "NotificationError)", + "got": "NotificationError)", + "got_raw": "NotificationError) as err: provider.notify(**data) assert str(err.value) == \"Error sending email\" assert rsp is None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "liiight/notifiers", + "expected": "ValidationError)", + "got": "ValidationError)", + "got_raw": "ValidationError) as exc_info: validate(value, {\"type\": formatter}) assert str(exc_info.value) == f\"Invalid value for {formatter}\" assert exc_info.value.path == [] assert exc_info.value.message == f\"Invalid value for {formatter}\" assert exc_info.value.validator_value == formatter assert exc_info.value.validator = \"format\" assert exc_info.value.schema = {\"type\": formatter} assert exc_info.value.schema_path == [] assert exc_info.value.schema_value == formatter assert exc_info.value.schema_validator = \"format\" assert exc_info.value.schema_validator_value = formatter assert exc_info.value.schema_validator = \"format\" assert exc_info.value.schema", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "liiight/notifiers", + "expected": "[\"Not Found\"]", + "got": "[ \"Invalid API key\" ]", + "got_raw": "[ \"Invalid API key\" ]", + "exact_match": false, + "code_bleu": 0.49999999999999994, + "edit_similarity": 0.23529411764705882 + }, + { + "repo": "liiight/notifiers", + "expected": "[\"an error\"]", + "got": "[\"an error\"]", + "got_raw": "[\"an error\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "llimllib/limbo", + "expected": "1", + "got": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "llimllib/limbo", + "expected": "ret", + "got": "ret[0][\"text\"]", + "got_raw": "ret[0][\"text\"]", + "exact_match": false, + "code_bleu": 0.18575057999133598, + "edit_similarity": 0.35294117647058826 + }, + { + "repo": "llimllib/limbo", + "expected": "[]", + "got": "None", + "got_raw": "None # No hooks should be called. \"\"\" def test_echo(): hooks = limbo.init_plugins(\"test/plugins\") assert limbo.run_hook(hooks, \"echo\", {\"text\": u\"!echo bananas\"}, None) == u\"bananas\" \"\"\" def test_echo_with_args(): hooks = limbo.init_plugins(\"test/plugins\") assert limbo.run_hook(hooks, \"echo\", {\"text\": u\"!echo bananas\", \"args\": [u\"arg1\", u\"arg2\"]}, None) == u\"arg1 arg2 bananas\" \"\"\" def test_echo_with_args_and_kwargs(): hooks = limbo.init", + "exact_match": false, + "code_bleu": 0.25, + "edit_similarity": 0.0 + }, + { + "repo": "llimllib/limbo", + "expected": "sorted(b.items())", + "got": "sorted(b.items())", + "got_raw": "sorted(b.items())\n\ndef test_on_message():\n \"\"\"Test that on_message works as expected.\"\"\"\n server = LimboServer(SERVER)\n server.load_plugin(\"github\")\n server.start()\n\n # Test that the message is processed correctly\n message = { \"type\": \"message\", \"id\": 1, \"from\": \"user1\", \"to\": \"channel1\", \"text\": \"Hello, world!\", \"time\": 1630456800, } on_message(message, server) assert message[\"text\"] == \"Hello, world!\" assert message[\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "llimllib/limbo", + "expected": "9", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "llm-workflow-engine/llm-workflow-engine", + "expected": "1", + "got": "len(TEST_BASIC_MESSAGES)", + "got_raw": "len(TEST_BASIC_MESSAGES) + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1", + "exact_match": false, + "code_bleu": 0.3021375397356768, + "edit_similarity": 0.0 + }, + { + "repo": "llm-workflow-engine/llm-workflow-engine", + "expected": "token_count", + "got": "token_count", + "got_raw": "token_count + 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "llm-workflow-engine/llm-workflow-engine", + "expected": "0", + "got": "0", + "got_raw": "0\n\ndef test_get_template(template_manager):\n template_name = \"test_template.jinja2\"\n template = template_manager.get_template(template_name)\n assert template is not None\n\ndef test_get_template_not_found(template_manager):\n template_name = \"nonexistent_template.jinja2\"\n template = template_manager.get_template(template_name)\n assert template is None\n\ndef test_render_template(template_manager):\n template_name = \"test_template.jinja2\"\n template = template_manager.get_template(template_name)\n assert template is not None\n\n context = {\"name\": \"World\"}\n ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "llm-workflow-engine/llm-workflow-engine", + "expected": "4", + "got": "3", + "got_raw": "3 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "llm-workflow-engine/llm-workflow-engine", + "expected": "provider_manager", + "got": "provider_manager", + "got_raw": "provider_manager", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "llm-workflow-engine/llm-workflow-engine", + "expected": "1", + "got": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678", + "got_raw": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "llm-workflow-engine/llm-workflow-engine", + "expected": "None", + "got": "None", + "got_raw": "None assert variables is None\n\ndef test_get_template_and_variables_found(template_manager):\n template_name = \"test_template.md\"\n template, variables = template_manager.get_template_and_variables(template_name)\n\n assert template is not None assert variables is not None assert template.name == template_name assert variables[\"title\"] == \"Test Template\" assert variables[\"content\"] == \"This is a test template.\" def test_render_template(template_manager): template_name = \"test_template.md\" template, variables = template_manager.get_template_and_variables(template_name) rendered_content = template_manager.render_template(template, variables) assert rendered_content == \"This", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "llm-workflow-engine/llm-workflow-engine", + "expected": "\"No current user, conversation not saved\"", + "got": "\"Conversation messages stored.\"", + "got_raw": "\"Conversation messages stored.\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "lona-web-org/lona", + "expected": "0.1", + "got": "0.1", + "got_raw": "0.1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lona-web-org/lona", + "expected": "'Foo'", + "got": "'Foo'", + "got_raw": "'Foo' option.get_value() == 'foo' option.get_attribute('value') == 'foo' option.get_attribute('data-foo') == 'bar' option.get_attribute('data-foo') == 'bar' option.get_attribute('data-foo') == 'bar' option.get_attribute('data-foo') == 'bar' option.get_attribute('data-foo') == 'bar' option.get_attribute('data-foo') == 'bar' option.get_attribute('data-foo') == 'bar' option.get_attribute('data-foo') == 'bar' option.get_attribute('data-foo') == 'bar", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lona-web-org/lona", + "expected": "1", + "got": "1", + "got_raw": "1\n\n # add_options\n select = Select2()\n\n select.add_options([\n Option2('Foo', value='foo'),\n Option2('Bar', value='bar'),\n Option2('Baz', value='baz'),\n ])\n\n assert select.values == ('foo', 'bar', 'baz')\n assert len(select.nodes) == 3\n\n # remove_option\n select = Select2(\n Option2('Foo', value='foo'),\n Option2('Bar', value='bar'),\n Option2('Baz', value='baz'),\n )\n\n select.remove_option('Foo')\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lona-web-org/lona", + "expected": "'POST'", + "got": "'POST'", + "got_raw": "'POST' assert await get_post_data(page) == {'input-1': 'foo'} await browser.close()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lona-web-org/lona", + "expected": "404", + "got": "404", + "got_raw": "404", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lona-web-org/lona", + "expected": "'tmp_dir1'", + "got": "'tmp_dir1'", + "got_raw": "'tmp_dir1' assert file2_content == 'tmp_dir2'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lona-web-org/lona", + "expected": "[]", + "got": "[]", + "got_raw": "[]\n\n select.value = ['foo', 'bar']\n\n assert select.value == ['foo', 'bar']", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lona-web-org/lona", + "expected": "1", + "got": "1", + "got_raw": "1\nassert input_events[0].type == 'click' assert input_events[0].target == outer_div assert input_events[0].target_id == 'outer-div-1' assert input_events[0].target_class == 'outer-div-1' assert input_events[0].target_tag == 'div' assert input_events[0].target_text == 'Clickable Outer Div 1' assert input_events[0].target_href == '' assert input_events[0].target_is_editable == False assert input_events[0].target_is_focusable == True assert input_events[0].target_is_disabled == False assert input", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lona-web-org/lona", + "expected": "'/bar/'", + "got": "'/bar/'", + "got_raw": "'/bar/'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lona-web-org/lona", + "expected": "'GET'", + "got": "'GET'", + "got_raw": "'GET' assert await get_post_data(page) == {} # POST request await page.click('form') await page.wait_for_url('**/') assert await get_method(page) == 'POST' assert await get_post_data(page) == {'input-1': 'test'} await browser.close()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lona-web-org/lona", + "expected": "3", + "got": "3.000000000000000423631590058061152040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "3.000000000000000423631590058061152040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "lona-web-org/lona", + "expected": "{'arg': 'foo'}", + "got": "{'arg': 'foo'}", + "got_raw": "{'arg': 'foo'}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lona-web-org/lona", + "expected": "Node", + "got": "HTML1[Input]('unknown')", + "got_raw": "HTML1[Input]('unknown') # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa", + "exact_match": false, + "code_bleu": 0.1561969968460128, + "edit_similarity": 0.07407407407407407 + }, + { + "repo": "lona-web-org/lona", + "expected": "5", + "got": "5.000000000000000494065640534900031843791699218750000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "5.000000000000000494065640534900031843791699218750000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "lona-web-org/lona", + "expected": "d.id_list", + "got": "d._id.split()", + "got_raw": "d._id.split() d._id.split() == ['foo', 'bar'] d._id.split() == ['foo', 'bar'] d._id.split() == ['foo', 'bar'] d._id.split() == ['foo', 'bar'] d._id.split() == ['foo', 'bar'] d._id.split() == ['foo', 'bar'] d._id.split() == ['foo', 'bar'] d._id.split() == ['foo', 'bar'] d._id.split() == ['foo', 'bar'] d._id.split() == ['foo', 'bar'] d._id", + "exact_match": false, + "code_bleu": 0.24446151121745047, + "edit_similarity": 0.6363636363636364 + }, + { + "repo": "lorien/grab", + "expected": "req.headers.get(\"Content-Length\"))", + "got": "req.body)", + "got_raw": "req.body)", + "exact_match": false, + "code_bleu": 0.22583677695760654, + "edit_similarity": 0.27906976744186046 + }, + { + "repo": "lorien/grab", + "expected": "ch_origin[\"Accept\"])", + "got": "ch_origin)", + "got_raw": "ch_origin) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) + [\"Accept\"]) +", + "exact_match": false, + "code_bleu": 0.23784142300054423, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "lorien/grab", + "expected": "set(grab.config[\"post\"]))", + "got": "b\"\"\"", + "got_raw": "b\"\"\"

\"\"\") ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "exact_match": false, + "code_bleu": 0.11397535284773888, + "edit_similarity": 0.20689655172413793 + }, + { + "repo": "lorien/grab", + "expected": "TestSpider2.get_spider_name())", + "got": "TestSpider2.get_spider_name())", + "got_raw": "TestSpider2.get_spider_name())", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lorien/grab", + "expected": "grab.doc.form_fields()[\"foo\"])", + "got": "grab.doc.get(\"input[name=foo]\").get(\"value\"))", + "got_raw": "grab.doc.get(\"input[name=foo]\").get(\"value\")) self.assertEqual(\"2\", grab.doc.get(\"input[name=foo]\").get(\"checked\")) self.assertEqual(\"1\", grab.doc.get(\"input[name=foo]\").get(\"checked\")) self.assertEqual(\"2\", grab.doc.get(\"input[name=foo]\").get(\"value\")) self.assertEqual(\"1\", grab.doc.get(\"input[name=foo]\").get(\"value\")) self.assertEqual(\"2\", grab.doc.get(\"input[name=foo]\").get(\"value\")) self.assertEqual(\"2\", grab.doc.get(\"input[name=foo]\").get(\"value\")) self.assertEqual(\"2\", grab.doc", + "exact_match": false, + "code_bleu": 0.27668736912821895, + "edit_similarity": 0.4533333333333333 + }, + { + "repo": "lorien/grab", + "expected": "\"windows-1251\")", + "got": "\"windows-1251\")", + "got_raw": "\"windows-1251\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lorien/grab", + "expected": "KeyError)", + "got": "TypeError)", + "got_raw": "TypeError) data['age'] = 23\n\n def test_data_object_dict_interface2(self):\n data = Data('person', person={'age': 22})\n data['age'] = 23\n self.assertEqual(23, data['age'])", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.7368421052631579 + }, + { + "repo": "lorien/grab", + "expected": "\"ham\")", + "got": "\"ham\")", + "got_raw": "\"ham\") self.assertEqual(req.cookies[\"godzilla\"].value, \"monkey\") self.assertEqual(req.cookies[\"spam\"].domain, \".example.com\") self.assertEqual(req.cookies[\"godzilla\"].domain, \".example.com\") self.assertEqual(req.cookies[\"spam\"].path, \"/\") self.assertEqual(req.cookies[\"godzilla\"].path, \"/\") self.assertEqual(req.cookies[\"spam\"].expires, None) self.assertEqual(req.cookies[\"godzilla\"].expires, None) self.assertEqual(req.cookies[\"spam\"].max_age, None) self.assertEqual(req.cookies[\"godzilla\"].max_age, None) self.assertEqual(req.cookies[\"spam\"].secure, False) self.assertEqual(req", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lorien/grab", + "expected": "0)", + "got": "2)", + "got_raw": "2) self.assertEqual(bot.stat.counters[\"spider:task-baz\"], 2) self.assertEqual(bot.stat.counters[\"spider:task-baz:fail\"], 1) self.assertEqual(bot.stat.counters[\"spider:task-baz:success\"], 1) self.assertEqual(bot.stat.counters[\"spider:task-baz:try\"], 3) self.assertEqual(bot.stat.counters[\"spider:task-baz:try:fail\"], 1) self.assertEqual(bot.stat.counters[\"spider:task-baz:try:success\"], 2) self.assertEqual(bot.stat.counters[\"spider:", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "lorien/grab", + "expected": "GrabMisuseError)", + "got": "GrabError)", + "got_raw": "GrabError) as ectx: grab.go(\"http://example.com\") grab.go(\"http://example.com\", \"foo=bar\") self.assertEqual(str(ectx.exception), \"Incorrect option name: foo\") self.assertEqual(grab.doc.url, \"http://example.com\") self.assertEqual(grab.doc.body, b\"\") self.assertEqual(grab.doc.html, b\"\") self.assertEqual(grab.doc.head, b\"\") self.assertEqual(grab.doc.title, \"\") self.assertEqual(grab.doc.charset, \"utf-8\") self.assertEqual(grab.doc.encoding, \"utf-8\") self.assertEqual(grab.doc.text, \"\") self.assertEqual", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.7692307692307693 + }, + { + "repo": "lorien/grab", + "expected": "len(grab.doc.body) < 50000)", + "got": "len(grab.doc.body) < 50 * 1024)", + "got_raw": "len(grab.doc.body) < 50 * 1024)", + "exact_match": false, + "code_bleu": 0.6930977286178778, + "edit_similarity": 0.8620689655172413 + }, + { + "repo": "lorien/grab", + "expected": "test)", + "got": "test)", + "got_raw": "test)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lorien/grab", + "expected": "\"http\")", + "got": "\"global\")", + "got_raw": "\"global\")", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.375 + }, + { + "repo": "lorien/grab", + "expected": "quote(redirect_url, safe=\":./?&\"))", + "got": "redirect_url)", + "got_raw": "redirect_url)", + "exact_match": false, + "code_bleu": 0.1321341238891912, + "edit_similarity": 0.5531914893617021 + }, + { + "repo": "lorien/grab", + "expected": "img_data)", + "got": "img_data)", + "got_raw": "img_data)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lorien/grab", + "expected": "data.get('name', 'foo'))", + "got": "data.get('name', 'foo'))", + "got_raw": "data.get('name', 'foo'))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lorien/grab", + "expected": "self.grab.doc.select('//h1').text())", + "got": "self.grab.doc.select_one('h1').text)", + "got_raw": "self.grab.doc.select_one('h1').text)", + "exact_match": false, + "code_bleu": 0.4822934703314544, + "edit_similarity": 0.8888888888888888 + }, + { + "repo": "lorien/grab", + "expected": "len(reg))", + "got": "len(reg))", + "got_raw": "len(reg)) self.assertEqual('zz', reg['zz'].name) self.assertEqual('zz', reg['zz'].__name__) self.assertEqual('zz', reg['zz'].__module__) self.assertEqual('zz', reg['zz'].__doc__) self.assertEqual('zz', reg['zz'].__doc__.strip()) self.assertEqual('zz', reg['zz'].doc) self.assertEqual('zz', reg['zz'].doc.strip()) self.assertEqual('zz', reg['zz'].doc) self.assertEqual('zz', reg['zz'].doc.strip()) self.assertEqual('zz', reg['zz'].doc) self.assertEqual('zz', reg['", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lorien/grab", + "expected": "SpiderError)", + "got": "SpiderError)", + "got_raw": "SpiderError) bot.run()\n\n def test_check_task_limits(self):\n class TestSpider(Spider):\n def task_page(self, grab, task):\n pass\n\n def check_task_limits(self, task):\n return False, \"zz\"\n\n bot = build_spider(TestSpider)\n bot.setup_queue()\n bot.add_task(Task(\"page\", url=self.server.get_url()))\n bot.add_task(Task(\"page\", url=self.server.get_url()))\n bot.add_task(Task(\"page\", url=self.server.get_url()))\n bot.add_task(Task(\"page\", url=self.server.get_url()))\n ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "lorien/grab", + "expected": "grab.doc.form)", + "got": "grab.doc())", + "got_raw": "grab.doc())", + "exact_match": false, + "code_bleu": 0.4347208719449915, + "edit_similarity": 0.72 + }, + { + "repo": "luizyao/pytest-chinese-doc", + "expected": "set2", + "got": "set2", + "got_raw": "set2 # True, since both sets contain the same elements.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "luizyao/pytest-chinese-doc", + "expected": "250", + "got": "250", + "got_raw": "250 2.0.0 Hello [127.0.0.1]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "luizyao/pytest-chinese-doc", + "expected": "1", + "got": "3", + "got_raw": "3, \"Failed\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "luizyao/pytest-chinese-doc", + "expected": "250", + "got": "250", + "got_raw": "250", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "luizyao/pytest-chinese-doc", + "expected": "expected", + "got": "expected", + "got_raw": "expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "machow/siuba", + "expected": "error.ShortException)", + "got": "SystemExit)", + "got_raw": "SystemExit) as exc_info: error.handle_error() sys.exit(1) assert str(exc_info.value) == full_error_code + \"\\n\" + str(last_exc) + \"\\n\" + str(sys.last_value) + \"\\n\" + str(sys.exc_info()[1]) + \"\\n\" + str(sys.exc_info()[2]) + \"\\n\" + str(sys.exc_info()[3]) + \"\\n\" + str(sys.exc_info()[4]) + \"\\n\" + str(sys.exc_info()[5]) + \"\\n\" + str(sys.exc_info()[6]) + \"\\n\" + str(sys.exc_info()[7", + "exact_match": false, + "code_bleu": 0.2686424829558855, + "edit_similarity": 0.375 + }, + { + "repo": "machow/siuba", + "expected": "spec)", + "got": "data_frame({\".name\":", + "got_raw": "data_frame({\".name\": \"x\", \".value\": 1})) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "exact_match": false, + "code_bleu": 0.2295748846661433, + "edit_similarity": 0.08 + }, + { + "repo": "machow/siuba", + "expected": "Exception)", + "got": "ValueError)", + "got_raw": "ValueError) as err: semi_join(df_ii, df1) assert str(err.value) == \"No 'on' argument provided\" assert err.value.args[0] == \"No 'on' argument provided\" assert err.value.args[1] == \"semi_join\" assert err.value.args[2] == \"Z\" assert err.value.args[3] == \"Z\" assert err.value.args[4] == \"Z\" assert err.value.args[5] == \"Z\" assert err.value.args[6] == \"Z\" assert err.value.args[7] == \"Z\" assert err.value.args[", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.2857142857142857 + }, + { + "repo": "machow/siuba", + "expected": "gdf_wide.obj)", + "got": "gdf_wide)", + "got_raw": "gdf_wide) res.obj['m'] = res.obj['m'].astype(str) res.obj['v'] = res.obj['v'].astype(float) res.obj['id'] = res.obj['id'].astype(int) res.obj['m'] = res.obj['m'].astype(str) res.obj['v'] = res.obj['v'].astype(float) res.obj['id'] = res.obj['id'].astype(int) res.obj['m'] = res.obj['m'].astype(str) res.obj['v'] = res.obj['v'].astype(float) res.obj['id'] = res.obj['id'].", + "exact_match": false, + "code_bleu": 0.29730177875068026, + "edit_similarity": 0.8181818181818182 + }, + { + "repo": "machow/siuba", + "expected": "lazy_tbl.tbl", + "got": "lazy_tbl.last_op.froms[0]", + "got_raw": "lazy_tbl.last_op.froms[0] assert inner_select.selects[0].name == \"x\" assert inner_select.selects[1].name == \"y\" assert inner_select.selects[2].name == \"z\" assert inner_select.selects[0].alias == \"x\" assert inner_select.selects[1].alias == \"y\" assert inner_select.selects[2].alias == \"z\" assert inner_alias.alias == \"some_alias\" assert inner_alias.element == inner_select\n\n@backend_sql\ndef test_mutate_nested(backend, dfs):\n # x and y both use z, so", + "exact_match": false, + "code_bleu": 0.21105340631872638, + "edit_similarity": 0.5405405405405406 + }, + { + "repo": "machow/siuba", + "expected": "data_frame(x = [1,2,6,7], g = [1,1,2,2]))", + "got": "data_frame(x = [1, 2, 3, 4, 5], g = [1, 1, 1, 1, 1])) def test_filter_via_group_by_2(backend): df = data_frame( x = [1, 1, 1, 1], g = [1]*4, y = [1, 2, 3, 4] ) assert_equal_query( df, filter(group_by(df, g), y > 1) ) def test_filter_via_group_by_3(backend): df = data_frame( x = [1,", + "got_raw": "data_frame(x = [1, 2, 3, 4, 5], g = [1, 1, 1, 1, 1])) def test_filter_via_group_by_2(backend): df = data_frame( x = [1, 1, 1, 1], g = [1]*4, y = [1, 2, 3, 4] ) assert_equal_query( df, filter(group_by(df, g), y > 1) ) def test_filter_via_group_by_3(backend): df = data_frame( x = [1,", + "exact_match": false, + "code_bleu": 0.18078479067371245, + "edit_similarity": 0.22910216718266255 + }, + { + "repo": "machow/siuba", + "expected": "\"int64\"", + "got": "np.int32", + "got_raw": "np.int32 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa:", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.4 + }, + { + "repo": "machow/siuba", + "expected": "data.assign(res = dst))", + "got": "dst)", + "got_raw": "dst)", + "exact_match": false, + "code_bleu": 0.15713484026367722, + "edit_similarity": 0.2962962962962963 + }, + { + "repo": "machow/siuba", + "expected": "data_frame(g = ['a', 'b'], result = [11., 13.]))", + "got": "expr) == expr) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1", + "got_raw": "expr) == expr) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1.0) == 1", + "exact_match": false, + "code_bleu": 0.016897944947440006, + "edit_similarity": 0.0881057268722467 + }, + { + "repo": "machow/siuba", + "expected": "data_frame(x = 1))", + "got": "data_frame(x = 1))", + "got_raw": "data_frame(x = 1))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "machow/siuba", + "expected": "out.obj)", + "got": "out)", + "got_raw": "out)\n\n # mutate_at ----\n out = fast_mutate_at(gdf, 'x', lambda x: x + 1)\n assert_frame_equal(data_default.assign(x = 11), out)\n\n # mutate_all ----\n out = fast_mutate_all(gdf, lambda x: x + 1)\n assert_frame_equal(data_default.assign(x = 11, y = 2), out)\n\n # mutate_if ----\n out = fast_mutate_if(gdf, lambda x: x > 10, lambda x: x + 1", + "exact_match": false, + "code_bleu": 0.29730177875068026, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "machow/siuba", + "expected": "[\"1\", \"2\"]", + "got": "[\"name\"] + sorted(src[\"name\"]) + [\"value\"] + sorted(src[\"value\"]) + [\"_n\"] + [\"_id\"] + [\"_idx\"] + [\"_n\"] + [\"_id\"] + [\"_idx\"] + [\"_n\"] + [\"_id\"] + [\"_idx\"] + [\"_n\"] + [\"_id\"] + [\"_idx\"] + [\"_n\"] + [\"_id\"] + [\"_idx\"] + [\"_n\"] + [\"_id\"] + [\"_idx\"] + [\"_n\"] + [\"_id\"] + [\"_idx\"] + [\"_n", + "got_raw": "[\"name\"] + sorted(src[\"name\"]) + [\"value\"] + sorted(src[\"value\"]) + [\"_n\"] + [\"_id\"] + [\"_idx\"] + [\"_n\"] + [\"_id\"] + [\"_idx\"] + [\"_n\"] + [\"_id\"] + [\"_idx\"] + [\"_n\"] + [\"_id\"] + [\"_idx\"] + [\"_n\"] + [\"_id\"] + [\"_idx\"] + [\"_n\"] + [\"_id\"] + [\"_idx\"] + [\"_n\"] + [\"_id\"] + [\"_idx\"] + [\"_n", + "exact_match": false, + "code_bleu": 0.011910781769766761, + "edit_similarity": 0.0273972602739726 + }, + { + "repo": "machow/siuba", + "expected": "DATA.assign(n = [3, 3, 7, 7]))", + "got": "pd.DataFrame({'g': ['a', 'b'], 'n': [2, 2]})) def test_add_count_wt2(backend, df2): assert_equal_query(df2, df2.assign(n = 4)) def test_add_count_wt3(backend): assert_equal_query(DATA.assign(n = 4), DATA.assign(n = 4)) def test_add_count_wt4(backend): assert_equal_query(DATA.assign(n = 4), DATA.assign(n = 4)) def test_add_count_wt5(backend): assert_equal_query(DATA.assign(n = 4), DATA.assign(n = 4", + "got_raw": "pd.DataFrame({'g': ['a', 'b'], 'n': [2, 2]})) def test_add_count_wt2(backend, df2): assert_equal_query(df2, df2.assign(n = 4)) def test_add_count_wt3(backend): assert_equal_query(DATA.assign(n = 4), DATA.assign(n = 4)) def test_add_count_wt4(backend): assert_equal_query(DATA.assign(n = 4), DATA.assign(n = 4)) def test_add_count_wt5(backend): assert_equal_query(DATA.assign(n = 4), DATA.assign(n = 4", + "exact_match": false, + "code_bleu": 0.05568203789874006, + "edit_similarity": 0.10232558139534884 + }, + { + "repo": "machow/siuba", + "expected": "exc_info.value.args[0]", + "got": "str(exc_info.value)", + "got_raw": "str(exc_info.value) + str(exc_info.value) + str(exc_info.value) + str(exc_info.value) + str(exc_info.value) + str(exc_info.value) + str(exc_info.value) + str(exc_info.value) + str(exc_info.value) + str(exc_info.value) + str(exc_info.value) + str(exc_info.value) + str(exc_info.value) + str(exc_info.value) + str(exc_info.value) + str(exc_info.value) + str(exc_info.value) + str(exc_info.value) + str(exc_info.value) + str(exc_info.value) + str(exc_info.value) + str(exc", + "exact_match": false, + "code_bleu": 0.30835021267538976, + "edit_similarity": 0.6829268292682927 + }, + { + "repo": "machow/siuba", + "expected": "\"str\"", + "got": "\"str\"", + "got_raw": "\"str\" call.kwargs == {} call.kwargs[\"dt\"] == None call.kwargs[\"default\"] == None call.kwargs[\"self\"] == None call.kwargs[\"name\"] == \"str\" call.kwargs[\"type\"] == \"str\" call.kwargs[\"dt\"] == None call.kwargs[\"default\"] == None call.kwargs[\"self\"] == None call.kwargs[\"name\"] == \"str\" call.kwargs[\"type\"] == \"str\" call.kwargs[\"dt\"] == None call.kwargs[\"default\"] == None call.kwargs[\"self\"] == None call.kwargs[\"name\"] == \"str\" call.kwargs[\"type\"] == \"str\" call.kwargs[\"dt", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "machow/siuba", + "expected": "TypeError)", + "got": "ValueError)", + "got_raw": "ValueError) as err: pivot_wider(src, names = [\"a\", \"b\"]) assert str(err.value) == \"names must be a list of column names\" with pytest.raises(TypeError) as err: pivot_wider(src, names = 1) assert str(err.value) == \"names must be a list of column names\" with pytest.raises(TypeError) as err: pivot_wider(src, names = 1.0) assert str(err.value) == \"names must be a list of column names\" with pytest.raises(TypeError) as err: pivot_wider(src, names = 1 + 1j) assert", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "machow/siuba", + "expected": "[1, 2]", + "got": "[1, 2] assert pv1[\"b\"].tolist() == [3, 4] assert pv2.columns.tolist() == [\"x\", \"a_1\", \"a_2\", \"b_1\", \"b_2\"] assert pv2[\"a_1\"].tolist() == [1, 1] assert pv2[\"a_2\"].tolist() == [2, 2] assert pv2[\"b_1\"].tolist() == [3, 3] assert pv2[\"b_2\"].tolist() == [4, 4] assert pv3.columns.tolist() == [\"x", + "got_raw": "[1, 2] assert pv1[\"b\"].tolist() == [3, 4] assert pv2.columns.tolist() == [\"x\", \"a_1\", \"a_2\", \"b_1\", \"b_2\"] assert pv2[\"a_1\"].tolist() == [1, 1] assert pv2[\"a_2\"].tolist() == [2, 2] assert pv2[\"b_1\"].tolist() == [3, 3] assert pv2[\"b_2\"].tolist() == [4, 4] assert pv3.columns.tolist() == [\"x", + "exact_match": false, + "code_bleu": 0.03676009339139613, + "edit_similarity": 0.04067796610169491 + }, + { + "repo": "machow/siuba", + "expected": "names", + "got": "names[:-1]", + "got_raw": "names[:-1] + [names[-1] + \"_n\"] + [names[-1] + \"_sum\"] + [names[-1] + \"_mean\"] + [names[-1] + \"_std\"] + [names[-1] + \"_var\"] + [names[-1] + \"_min\"] + [names[-1] + \"_max\"] + [names[-1] + \"_first\"] + [names[-1] + \"_last\"] + [names[-1] + \"_count\"] + [names[-1] + \"_any\"] + [names[-1] + \"_all\"] + [names[-", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "machow/siuba", + "expected": "\"language\"", + "got": "\"language\"", + "got_raw": "\"language\" out.columns[1] == \"repo\" out.columns[2] == \"stars\" out.columns[3] == \"x\" out.loc[0, \"language\"] == \"python\" out.loc[0, \"repo\"] == [\"pandas\", \"ggplot2\"] out.loc[0, \"stars\"] == [17800, 3500] out.loc[0, \"x\"] == [1, 3] out.loc[1, \"language\"] == \"R\" out.loc[1, \"repo\"] == [\"dplyr\", \"plotnine\"] out", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "machow/siuba", + "expected": "res)", + "got": "res)", + "got_raw": "res)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "madviking/headless-pm", + "expected": "0.1", + "got": "0.1", + "got_raw": "0.1 # Sleep should have occurred within the timeout period", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "madviking/headless-pm", + "expected": "\"up\"", + "got": "\"UP\"", + "got_raw": "\"UP\" assert ServiceStatus.DOWN == \"DOWN\" assert ServiceStatus.UNKNOWN == \"UNKNOWN\" assert ServiceStatus.NOT_TESTED == \"NOT_TESTED\" assert ServiceStatus.NOT_APPLICABLE == \"NOT_APPLICABLE\" assert ServiceStatus.NOT_APPLICABLE == \"NOT_APPLICABLE\" assert ServiceStatus.NOT_APPLICABLE == \"NOT_APPLICABLE\" assert ServiceStatus.NOT_APPLICABLE == \"NOT_APPLICABLE\" assert ServiceStatus.NOT_APPLICABLE == \"NOT_APPLICABLE\" assert ServiceStatus.NOT_APPLICABLE == \"NOT_APPLICABLE\" assert ServiceStatus.NOT_APPLICABLE == \"NOT_APPLICABLE", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "madviking/headless-pm", + "expected": "403", + "got": "403", + "got_raw": "403 # Unauthorized (not a PM) # Check response content (if needed) # You can add assertions here to check the response content if needed. # For example: assert response.json() == {\"detail\": \"You are not a project manager\"} # Clean up (optional) session.delete(dev_agent) session.commit() # Close the session session.close() # Close the client client.close() # Remove the API key from the environment os.environ.pop(\"API_KEY\", None) # Restore the original API key if it was set before the test client.close() # Remove the API key from the environment os.environ.pop(\"API_KEY\",", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "madviking/headless-pm", + "expected": "8080", + "got": "8080", + "got_raw": "8080, \"Should parse custom port correctly\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "madviking/headless-pm", + "expected": "6969", + "got": "6969", + "got_raw": "6969, \"Base URL should default to 6969\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "madviking/headless-pm", + "expected": "db_url", + "got": "db_url.lower()", + "got_raw": "db_url.lower() # SQLite should be in the URL string db_url.startswith(\"sqlite://\") # SQLite URL should start with \"sqlite://\" db_url.endswith(\".db\") # SQLite URL should end with \".db\" db_url.startswith(\"file:\") # SQLite URL should start with \"file:\" db_url.endswith(\".db\") # SQLite URL should end with \".db\" db_url.startswith(\"file:\") # SQLite URL should start with \"file:\" db_url.endswith(\".db\") # SQLite URL should end with \".db\" db_url.startswith(\"file:\") # SQLite URL should", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6 + }, + { + "repo": "madviking/headless-pm", + "expected": "agent_id)", + "got": "agent_id)", + "got_raw": "agent_id) else: self.assertEqual(result[\"agent\"][\"agent_id\"], agent_id) print(f\"\u2713 Registered agent: {agent_id}\") except Exception as e: print(f\"Failed to register agent: {e}\") self.fail(f\"Agent registration failed: {e}\") finally: # Cleanup after all agents are registered self._cleanup_resource(\"agent\", agent_id) # Cleanup after all agents are registered self._cleanup_resource(\"agent\", agent_id) # Cleanup after all agents are registered self._cleanup_resource(\"agent\", agent_id) # Cleanup after all agents are registered self._cleanup_resource(\"agent\", agent_id) # Cleanup after", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "madviking/headless-pm", + "expected": "1", + "got": "1", + "got_raw": "1 # 1 task created by the agent # Test relationships with other models # Test relationships with other models # Test relationships with other models # Test relationships with other models # Test relationships with other models # Test relationships with other models # Test relationships with other models # Test relationships with other models # Test relationships with other models # Test relationships with other models # Test relationships with other models # Test relationships with other models # Test relationships with other models # Test relationships with other models # Test relationships with other models # Test relationships with other models # Test relationships with other models # Test relationships with other models # Test relationships with other models # Test relationships with other", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "madviking/headless-pm", + "expected": "cmd", + "got": "cmd[0]", + "got_raw": "cmd[0] and \"--host\" in cmd[1] and \"--port\" in cmd[2] and \"6969\" in cmd[2] and \"api\" in cmd[3] and \"api\" in cmd[4] and \"api\" in cmd[5] and \"api\" in cmd[6] and \"api\" in cmd[7] and \"api\" in cmd[8] and \"api\" in cmd[9] and \"api\" in cmd[10] and \"api\" in cmd[11] and \"api\" in cmd[12] and", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "magic-wormhole/magic-wormhole", + "expected": "b\"hello from p1\\n\"", + "got": "b\"hello from p1\\n\" b\"hello from p2\\n\" b\"hello from p1\\n\" b\"hello from p2\\n\" b\"hello from p1\\n\" b\"hello from p2\\n\" b\"hello from p1\\n\" b\"hello from p2\\n\" b\"hello from p1\\n\" b\"hello from p2\\n\" b\"hello from p1\\n\" b\"hello from p2\\n\" b\"hello from p1\\n\" b\"hello from p2\\n\" b\"hello from p1\\n\" b\"hello from p2\\n\"", + "got_raw": "b\"hello from p1\\n\" b\"hello from p2\\n\" b\"hello from p1\\n\" b\"hello from p2\\n\" b\"hello from p1\\n\" b\"hello from p2\\n\" b\"hello from p1\\n\" b\"hello from p2\\n\" b\"hello from p1\\n\" b\"hello from p2\\n\" b\"hello from p1\\n\" b\"hello from p2\\n\" b\"hello from p1\\n\" b\"hello from p2\\n\" b\"hello from p1\\n\" b\"hello from p2\\n\"", + "exact_match": false, + "code_bleu": 0.049716562828203324, + "edit_similarity": 0.11214953271028037 + }, + { + "repo": "magic-wormhole/magic-wormhole", + "expected": "1", + "got": "1", + "got_raw": "1 e[0].args[0] == \"not recognized\" m.got_record(Close()) observe_errors.flush(Close) m.got_record(Close()) observe_errors.flush(Close) m.got_record(Close()) observe_errors.flush(Close) m.got_record(Close()) observe_errors.flush(Close) m.got_record(Close()) observe_errors.flush(Close) m.got_record(Close()) observe_errors.flush(Close) m.got_record(Close()) observe_errors.flush(Close) m.got_record(Close()) observe_errors.flush(Close) m.got_record(Close()) observe_errors.flush", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "magic-wormhole/magic-wormhole", + "expected": "\"ssh-rsa\"", + "got": "\"ssh-rsa\"", + "got_raw": "\"ssh-rsa\" assert keyid == \"email@host\" assert pubkey == pubkey_data.strip() assert pubkey.startswith(\"ssh-rsa\") assert pubkey.endswith(\"email@host\") assert pubkey[10:12] == \" \" assert pubkey[12:14] == \"\\n\" assert pubkey[14:16] == \" \" assert pubkey[16:18] == \"\\n\" assert pubkey[18:20] == \" \" assert pubkey[20:22] == \"\\n\" assert pubkey[22:24] == \" \" assert pubkey[2", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "magic-wormhole/magic-wormhole", + "expected": "b\"more 2->1\\n\"", + "got": "b\"more 2->1\\n\"", + "got_raw": "b\"more 2->1\\n\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "magic-wormhole/magic-wormhole", + "expected": "b\"hello p1\\n\"", + "got": "b\"hello p1\\n\" log.msg(\"done\") await p1_client.transport.write(b\"hello from p1\\n\") data = await f1.deferreds[\"dataReceived\"] assert data == b\"hello from p1\\n\" await p1_server.transport.write(b\"hello p1\\n\") data = await f0.deferreds[\"dataReceived\"] assert data == b\"hello p1\\n\" await p1_client.transport.write(b\"hello from p1\\n\") data = await f0.deferreds[\"dataReceived\"] assert data == b\"hello from p1\\n\" await p1_server.transport.write(b\"hello p", + "got_raw": "b\"hello p1\\n\" log.msg(\"done\") await p1_client.transport.write(b\"hello from p1\\n\") data = await f1.deferreds[\"dataReceived\"] assert data == b\"hello from p1\\n\" await p1_server.transport.write(b\"hello p1\\n\") data = await f0.deferreds[\"dataReceived\"] assert data == b\"hello p1\\n\" await p1_client.transport.write(b\"hello from p1\\n\") data = await f0.deferreds[\"dataReceived\"] assert data == b\"hello from p1\\n\" await p1_server.transport.write(b\"hello p", + "exact_match": false, + "code_bleu": 0.01674006939095271, + "edit_similarity": 0.056768558951965066 + }, + { + "repo": "magic-wormhole/magic-wormhole", + "expected": "[addr, addr]", + "got": "2 * [factory] + [None] * 2 * [None] + [None] * 2 * [None] + [None] * 2 * [None] + [None] * 2 * [None] + [None] * 2 * [None] + [None] * 2 * [None] + [None] * 2 * [None] + [None] * 2 * [None] + [None] * 2 * [None] + [None] * 2 * [None] + [None] * 2 * [None] + [", + "got_raw": "2 * [factory] + [None] * 2 * [None] + [None] * 2 * [None] + [None] * 2 * [None] + [None] * 2 * [None] + [None] * 2 * [None] + [None] * 2 * [None] + [None] * 2 * [None] + [None] * 2 * [None] + [None] * 2 * [None] + [None] * 2 * [None] + [None] * 2 * [None] + [", + "exact_match": false, + "code_bleu": 0.011297292909262647, + "edit_similarity": 0.02952029520295203 + }, + { + "repo": "magic-wormhole/magic-wormhole", + "expected": "wel2", + "got": "wel2", + "got_raw": "wel2 == {} # empty welcome message\n\n await w1.connect() # connection established\n wel3 = await w1.get_welcome() # late: after connection established\n assert wel3 == {} # empty welcome message\n\n await w1.close() # connection closed\n with pytest.raises(WormholeClosed) as e: # after connection closed\n await w1.get_welcome() # late: after connection closed\n assert str(e.value) == \"wormhole closed\" # error message\n\n await w1.connect() # connection re-established\n wel", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "magic-wormhole/magic-wormhole", + "expected": "ValueError)", + "got": "ValueError", + "got_raw": "ValueError, match=\"oops\") as exc_info: c.complete(reactor) mock_print.assert_called_once_with( exc_info.value) traceback.print_exc.assert_called_once_with() c._wrapped_completer.side_effect = None c.complete(reactor) mock_print.assert_not_called() traceback.print_exc.assert_not_called() helper.complete.assert_called_once_with(reactor) helper.complete.return_value = \"foo\" c.complete(reactor) mock_print.assert_called_once_with(\"foo\") traceback.print_exc.assert_not_called() c._wrapped_completer.side_effect = ValueError(\"oops\") c.complete(reactor) mock_print.assert_called", + "exact_match": false, + "code_bleu": 0.29730177875068026, + "edit_similarity": 0.9523809523809523 + }, + { + "repo": "magic-wormhole/magic-wormhole", + "expected": "[mock.call.start()]", + "got": "[mock.call.listen()]", + "got_raw": "[mock.call.listen()] + [mock.call.close()] * 2 + [mock.call.listen()] + [mock.call.close()] * 2 + [mock.call.listen()] + [mock.call.close()] * 2 + [mock.call.listen()] + [mock.call.close()] * 2 + [mock.call.listen()] + [mock.call.close()] * 2 + [mock.call.listen()] + [mock.call.close()] * 2 + [mock.call.listen()] + [mock.call.close()] * 2 + [mock.call.listen()] + [mock.call.close()] * 2 + [mock.call.listen()] + [mock", + "exact_match": false, + "code_bleu": 0.6580370064762462, + "edit_similarity": 0.8205128205128205 + }, + { + "repo": "magic-wormhole/magic-wormhole", + "expected": "TypeError)", + "got": "TypeError)", + "got_raw": "TypeError) as excinfo: derive_key(123, 123) raise TypeError, str(excinfo.value) == \"key must be a bytes object\" with pytest.raises(TypeError) as excinfo: derive_phase_key(123, 123) raise TypeError, str(excinfo.value) == \"phase_key must be a bytes object\" with pytest.raises(TypeError) as excinfo: encrypt_data(123, 123) raise TypeError, str(excinfo.value) == \"data must be a bytes object\" with pytest.raises(TypeError) as excinfo: decrypt_data(123", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "magic-wormhole/magic-wormhole", + "expected": "\"email@host\"", + "got": "\"email@host\"", + "got_raw": "\"email@host\" assert pubkey == pubkey_data.strip() assert pubkey.startswith(\"ssh-rsa\") assert pubkey.endswith(\"email@host\") assert pubkey[8:-10] == \"AAAAB3NzaC1yc2E=\" assert pubkey[8:-10] == \"AAAAB3NzaC1yc2E=\" assert pubkey[8:-10] == \"AAAAB3NzaC1yc2E=\" assert pubkey[8:-10] == \"AAAAB3NzaC1yc2E=\" assert pubkey[8:-10] == \"AAAAB3NzaC", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "magic-wormhole/magic-wormhole", + "expected": "c", + "got": "c.peer_address()", + "got_raw": "c.peer_address() + c.peer_port() + b\"-\" + b\"1234\" + b\"-\" + b\"1234\" + b\"-\" + b\"1234\" + b\"-\" + b\"1234\" + b\"-\" + b\"1234\" + b\"-\" + b\"1234\" + b\"-\" + b\"1234\" + b\"-\" + b\"1234\" + b\"-\" + b\"1234\" + b\"-\" + b\"1234", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.11764705882352941 + }, + { + "repo": "magic-wormhole/magic-wormhole", + "expected": "[]", + "got": "[", + "got_raw": "[ (\"phase1\", b\"msg\"), ]\n\ndef test_send_second():\n s, m, events = build_send()\n s.send(\"phase1\", b\"msg\")\n s.send(\"phase2\", b\"msg\")\n\n assert events == [ (\"phase1\", b\"msg\"), (\"phase2\", b\"msg\"), ]\n\ndef test_send_third():\n s, m, events = build_send()\n s.send(\"phase1\", b\"msg\")\n s.send(\"phase2\", b\"msg\")\n s.send(\"phase3\", b\"msg\")\n\n assert", + "exact_match": false, + "code_bleu": 0.29730177875068026, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "magic-wormhole/magic-wormhole", + "expected": "b\"hello from p2\\n\"", + "got": "b\"hello from p2\\n\" + b\"hello p2\\n\" + b\"hello from p1\\n\" + b\"hello p1\\n\" + b\"hello from p2\\n\" + b\"hello p2\\n\" + b\"hello from p1\\n\" + b\"hello p1\\n\" + b\"hello from p2\\n\" + b\"hello p2\\n\" + b\"hello from p1\\n\" + b\"hello p1\\n\" + b\"hello from p2\\n\" + b\"hello p2\\n\" + b\"hello from p1\\n\" +", + "got_raw": "b\"hello from p2\\n\" + b\"hello p2\\n\" + b\"hello from p1\\n\" + b\"hello p1\\n\" + b\"hello from p2\\n\" + b\"hello p2\\n\" + b\"hello from p1\\n\" + b\"hello p1\\n\" + b\"hello from p2\\n\" + b\"hello p2\\n\" + b\"hello from p1\\n\" + b\"hello p1\\n\" + b\"hello from p2\\n\" + b\"hello p2\\n\" + b\"hello from p1\\n\" +", + "exact_match": false, + "code_bleu": 0.035181547884111326, + "edit_similarity": 0.12121212121212122 + }, + { + "repo": "magic-wormhole/magic-wormhole", + "expected": "key2", + "got": "key2", + "got_raw": "key2 # should fail\n with pytest.raises(WrongPasswordError) as e:\n await w1.get_key() # should fail\n assert str(e.value) == \"Wrong password\" # should fail\n with pytest.raises(WrongPasswordError) as e:\n await w2.get_key() # should fail\n assert str(e.value) == \"Wrong password\" # should fail\n await w1.get_key() # should work\n await w2.get_key() # should work\n await w1.get_unverified_key() # should work\n ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "magic-wormhole/magic-wormhole", + "expected": "b\"data\"", + "got": "dataY", + "got_raw": "dataY == b\"data\"\n\n@ensureDeferred\nasync def test_different_codes(reactor, mailbox):\n # the two sides use random nonces for their messages, so it's ok for\n # both to try and send the same body: they'll result in distinct\n # encrypted messages\n w1 = wormhole.create(APPID, mailbox.url, reactor)\n w2 = wormhole.create(APPID, mailbox.url, reactor)\n w1.allocate_code()\n code = await w1.get_code()\n w2.set_code(code)\n w1.send_message(b\"data\")\n with", + "exact_match": false, + "code_bleu": 0.25, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "magic-wormhole/magic-wormhole", + "expected": "f\"No public keys in '{dot_ssh}'\"", + "got": "f\"Could not find a public key in {dot_ssh}\" + os.sep + \"config\" + os.sep + \"known_hosts\" + os.sep + \"config~\" + os.sep + \"known_hosts~\" + os.sep + \"config~\" + os.sep + \"known_hosts\" + os.sep + \"config\" + os.sep + \"known_hosts~\" + os.sep + \"config~\" + os.sep + \"known_hosts~\" + os.sep + \"config~\" + os.sep + \"known_hosts\" + os.sep + \"config~\" + os.sep + \"known_hosts~\" +", + "got_raw": "f\"Could not find a public key in {dot_ssh}\" + os.sep + \"config\" + os.sep + \"known_hosts\" + os.sep + \"config~\" + os.sep + \"known_hosts~\" + os.sep + \"config~\" + os.sep + \"known_hosts\" + os.sep + \"config\" + os.sep + \"known_hosts~\" + os.sep + \"config~\" + os.sep + \"known_hosts~\" + os.sep + \"config~\" + os.sep + \"known_hosts\" + os.sep + \"config~\" + os.sep + \"known_hosts~\" +", + "exact_match": false, + "code_bleu": 0.013749207727756516, + "edit_similarity": 0.1396508728179551 + }, + { + "repo": "magic-wormhole/magic-wormhole", + "expected": "16", + "got": "16", + "got_raw": "16 * 2 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "magic-wormhole/magic-wormhole", + "expected": "bytes", + "got": "bytes", + "got_raw": "bytes key2 = w2.derive_key(\"purpose\", 16) assert len(key2) == 16 assert type(key2) is bytes assert key1 == key2 # w1.debug_set_trace(\"W1\") w1.close() w2.close() await dg.wait() assert dg.messages == [b\"pong\"] assert dg.key is None assert dg.verifier is None assert dg.versions is None assert dg.code is None assert dg.messages is None assert dg.key is None assert dg.verifier is None assert dg.versions is None assert dg.code is None assert dg.messages is None assert dg.key is None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "magic-wormhole/magic-wormhole", + "expected": "1", + "got": "1", + "got_raw": "1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "maldoinc/wireup", + "expected": "impl_instance", + "got": "impl_instance", + "got_raw": "impl_instance\n\n\ndef test_as_type_adapter_pattern_with_factory() -> None:\n container = create_sync_container(\n injectables=[BarImpl, make_bar_protocol], factories=[BarFactory]\n )\n\n # Implementation should be resolvable (standard registration)\n impl_instance = container.get(BarImpl)\n assert isinstance(impl_instance, BarImpl)\n assert impl_instance.bar() == \"bar\"\n\n # Abstraction should be resolvable via the factory\n proto_instance = container.get(BarProtocol)\n assert isinstance(proto_instance, BarProtocol)\n assert proto_instance.bar() == \"bar\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "maldoinc/wireup", + "expected": "{\"number\": 4}", + "got": "{\"rng\": 42}", + "got_raw": "{\"rng\": 42} # type: ignore # noqa: E721 response = client.get(\"/rng/depends/2\") assert response.status_code == 200 assert response.json() == {\"rng\": 2} # type: ignore # noqa: E721 response = client.get(\"/rng/depends/3\") assert response.status_code == 200 assert response.json() == {\"rng\": 3} # type: ignore # noqa: E721 response = client.get(\"/rng/depends/4\") assert response.status_code == 200 assert response", + "exact_match": false, + "code_bleu": 0.32466791547509893, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "maldoinc/wireup", + "expected": "200", + "got": "200", + "got_raw": "200 response.json() == {\"data\": {\"hello\": \"Hello World\", \"fromHeader\": \"Wireup\"}}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "maldoinc/wireup", + "expected": "42", + "got": "\"foo\"", + "got_raw": "\"foo\" \"bar\" \"baz\" \"qux\" \"quux\" \"quuz\" \"quuuu\" \"quuuuu\" \"quuuuuu\" \"quuuuuuu\" \"quuuuuuuu\" \"quuuuuuuuu\" \"quuuuuuuuuu\" \"quuuuuuuuuuu\" \"quuuuuuuuuuuu\" \"quuuuuuuuuuuuu\" \"quuuuuuuuuuuuuu\" \"quuuuuuuuuuuuuuu\" \"quuuuuuuuuuuuuuuu\" \"quuuuuuuuu", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "maldoinc/wireup", + "expected": "help_result.output", + "got": "help_result.stdout.lower()", + "got_raw": "help_result.stdout.lower() else help_result.stdout.lower() == \"your lucky number is: 42\"", + "exact_match": false, + "code_bleu": 0.24446151121745047, + "edit_similarity": 0.6818181818181818 + }, + { + "repo": "maldoinc/wireup", + "expected": "registry.impls", + "got": "registry._services[\"default\"]", + "got_raw": "registry._services[\"default\"] # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore", + "exact_match": false, + "code_bleu": 0.2907153684841096, + "edit_similarity": 0.46511627906976744 + }, + { + "repo": "maldoinc/wireup", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "maldoinc/wireup", + "expected": "\"bar\"", + "got": "\"foo\"", + "got_raw": "\"foo\" assert _ == 1 return \"test\"\n\n return test()\n\n\ndef b_factory(c: C) -> Iterator[B]:\n yield B(c)\n\n @inject_from_container(container)\n def test(a: Injected[A], b: Injected[B], c: Injected[C], foo: Annotated[str, wireup.Inject(config=\"foo\")], _: int = 1):\n assert isinstance(a, A)\n assert isinstance(b, B)\n assert isinstance(c, C)\n\n assert foo == \"foo\" assert _ == 1 return \"test\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4 + }, + { + "repo": "maldoinc/wireup", + "expected": "foo.__wireup_names__", + "got": "foo.__wireup_names__[0]", + "got_raw": "foo.__wireup_names__[0] # type: ignore [attr-defined] # noqa: E501", + "exact_match": false, + "code_bleu": 0.4111336169005197, + "edit_similarity": 0.9302325581395349 + }, + { + "repo": "maldoinc/wireup", + "expected": "42", + "got": "42.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "42.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.03076923076923077 + }, + { + "repo": "maldoinc/wireup", + "expected": "{\"hello\": \"Hello World\", \"fromHeader\": \"Wireup\"}", + "got": "{\"hello\": \"Hello World\", \"fromHeader\": \"Wireup\"}", + "got_raw": "{\"hello\": \"Hello World\", \"fromHeader\": \"Wireup\"}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "maldoinc/wireup", + "expected": "\"bar_multiple_bases\"", + "got": "\"foo\"", + "got_raw": "\"foo\" assert foo.bar == \"bar\" assert foo.baz == \"baz\" assert foo.name == \"foo\" assert foo.env == \"test\" assert foo.env_name == \"test\" assert foo.name == \"foo\" assert foo.name == \"foo\" assert foo.name == \"foo\" assert foo.name == \"foo\" assert foo.name == \"foo\" assert foo.name == \"foo\" assert foo.name == \"foo\" assert foo.name == \"foo\" assert foo.name == \"foo\" assert foo.name == \"foo\" assert foo.name == \"foo\" assert foo.name == \"foo\" assert foo.name ==", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.16 + }, + { + "repo": "maldoinc/wireup", + "expected": "None", + "got": "None", + "got_raw": "None, \"Parameter must have an annotation\" assert result.qualifier is not None, \"Parameter must have a qualifier\" assert result.qualifier.value == qualifier_value, \"Parameter qualifier value does not match\" assert result.qualifier.name == \"my_qualifier\", \"Parameter qualifier name does not match\" assert result.qualifier.type == str, \"Parameter qualifier type does not match\" assert result.qualifier.default is None, \"Parameter qualifier default value is not None\" assert result.qualifier.required is False, \"Parameter qualifier is required\" assert result.qualifier.is_optional is False, \"Parameter qualifier is optional\" assert result.qualifier.is_in", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "maldoinc/wireup", + "expected": "\"dependency_impl\"", + "got": "\"Hello\"", + "got_raw": "\"Hello\" \"World\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\" \"!\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "maldoinc/wireup", + "expected": "1", + "got": "1", + "got_raw": "1 c.get(Something) == Something(\"Something\") c.close() with pytest.raises(ValueError, match=\"boom\") as e: c.get(Something) c.close() with pytest.raises(ContainerCloseError) as e: c.get(Something) c.close() with pytest.raises(ContainerCloseError) as e: c.get(Something) c.close() with pytest.raises(ContainerCloseError) as e: c.get(Something) c.close() with pytest.raises(ContainerCloseError) as e: c.get(Something) c.close() with pytest.raises(ContainerCloseError) as e: c.get(Something) c.close() with pytest.raises(Container", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "maldoinc/wireup", + "expected": "{\"hello\": \"Hello Django\"}", + "got": "{\"hello\": \"Hello Django\"}", + "got_raw": "{\"hello\": \"Hello Django\"}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "maldoinc/wireup", + "expected": "5", + "got": "\"foo\"", + "got_raw": "\"foo\" + str(truly_random.get_truly_random()) + \"foo\" + str(truly_random.get_truly_random()) + \"foo\" + str(truly_random.get_truly_random()) + \"foo\" + str(truly_random.get_truly_random()) + \"foo\" + str(truly_random.get_truly_random()) + \"foo\" + str(truly_random.get_truly_random()) + \"foo\" + str(truly_random.get_truly_random()) + \"foo\" + str(truly_random.get_truly_random()) + \"foo\" + str(truly_random.get_truly_random()) + \"foo", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "maldoinc/wireup", + "expected": "scoped_service_dependency", + "got": "scoped_service_dependency.other2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency", + "got_raw": "scoped_service_dependency.other2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency2_dependency", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.0625 + }, + { + "repo": "maldoinc/wireup", + "expected": "[\"after_yield\"]", + "got": "[\"before_yield\"", + "got_raw": "[\"before_yield\", \"after_yield\"]", + "exact_match": false, + "code_bleu": 0.35818997727451396, + "edit_similarity": 0.7333333333333333 + }, + { + "repo": "maldoinc/wireup", + "expected": "\"Your lucky number is: 42\"", + "got": "\"Your lucky number is: 42\"", + "got_raw": "\"Your lucky number is: 42\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mammothb/symspellpy", + "expected": "si_1.term", + "got": "si_1.term_str()", + "got_raw": "si_1.term_str() == si_2.term_str() == si_3.term_str() == \"dfgh\" == si_3.term_str() == \"sdfg\" == si_2.term_str() == \"asdf\" == si_1.term_str() == \"sdfg\" == si_2.term_str() == \"dfgh\" == si_3.term_str() == \"asdf\" == si_1.term_str() == \"sdfg\" == si_2.term_str() == \"dfgh\" == si_3.term_str() == \"asdf\" == si_1.term_str()", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.75 + }, + { + "repo": "mammothb/symspellpy", + "expected": "len(result)", + "got": "len(result)", + "got_raw": "len(result) result[0].term == \"\u0410\u0411\" result[0].count == 1 result[0].freq == 1 result[0].score == 1.0 result[0].weight == 0.0 result[0].idf == 0.0 result[0].tf == 0.0 result[0].p == 0.0 result[0].w == 0.0 result[0].s == 0.0 result[0].l == 0.0 result[0].d == 0.0 result[0].h == 0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mammothb/symspellpy", + "expected": "to_similarity(6.0, length)", + "got": "to_similarity(14, length) assert pytest.approx(0.5) == to_similarity(10, length) assert pytest.approx(0.0) == to_similarity(0, length) assert pytest.approx(1.0) == to_similarity(20, length) assert pytest.approx(0.0) == to_similarity(-1, length) assert pytest.approx(0.0) == to_similarity(1.1, length) assert pytest.approx(0.0) == to_similarity(1.2, length) assert pytest.approx(0.0) == to_similarity", + "got_raw": "to_similarity(14, length) assert pytest.approx(0.5) == to_similarity(10, length) assert pytest.approx(0.0) == to_similarity(0, length) assert pytest.approx(1.0) == to_similarity(20, length) assert pytest.approx(0.0) == to_similarity(-1, length) assert pytest.approx(0.0) == to_similarity(1.1, length) assert pytest.approx(0.0) == to_similarity(1.2, length) assert pytest.approx(0.0) == to_similarity", + "exact_match": false, + "code_bleu": 0.02471636698704052, + "edit_similarity": 0.11764705882352941 + }, + { + "repo": "mammothb/symspellpy", + "expected": "TypeError)", + "got": "TypeError)", + "got_raw": "TypeError) as excinfo: suggest_item.__lt__(\"\") assert str(excinfo.value) == \"Cannot compare SuggestItem with non-numeric value\" assert suggest_item.__lt__(1.0) is NotImplemented\n\n def test_invalid_greater_than(self, suggest_item): assert suggest_item.__gt__(0) is NotImplemented assert suggest_item.__gt__(1.0) is NotImplemented assert suggest_item.__gt__(-1) is NotImplemented assert suggest_item.__gt__(-1.0) is NotImplemented assert suggest_item.__gt__(-1.0) is NotImplemented assert suggest_item.__gt__(-1) is NotImplemented assert suggest_item", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mammothb/symspellpy", + "expected": "0.7)", + "got": "0.0)", + "got_raw": "0.0) == to_similarity(0.0, length) assert pytest.approx(0.5) == to_similarity(5.0, length) assert pytest.approx(1.0) == to_similarity(10.0, length) assert pytest.approx(1.0) == to_similarity(20.0, length) assert pytest.approx(1.0) == to_similarity(25.0, length) assert pytest.approx(1.0) == to_similarity(26.0, length) assert pytest.approx(1.0) == to_similarity(27", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.75 + }, + { + "repo": "mammothb/symspellpy", + "expected": "result[0].term", + "got": "result[0].term)", + "got_raw": "result[0].term)\n assert 1 == result[0].count\n\n def test_load_dictionary_separator(self, symspell_default):\n symspell_default.load_dictionary(SEPARATOR_DICT_PATH, 0, 1, separator=SEPARATOR)\n result = symspell_default.lookup(\"a:b:c\", Verbosity.TOP, 2)\n assert 1 == len(result)\n assert \"a:b:c\" == res[0].term\n assert 1 == res[0].count\n\n def test_load_dictionary_separator_with_space(self, symspell_default):\n syms", + "exact_match": false, + "code_bleu": 0.8408964152537145, + "edit_similarity": 0.9655172413793104 + }, + { + "repo": "mammothb/symspellpy", + "expected": "TypeError)", + "got": "NotImplementedError)", + "got_raw": "NotImplementedError) as e: AbstractDistanceComparer().distance(SHORT_STRING, LONG_STRING) assert str(e.value) == \"distance must be implemented\" with pytest.raises(TypeError) as e: AbstractDistanceComparer().distance(1, 2) assert str(e.value) == \"distance must be called with str\" with pytest.raises(TypeError) as e: AbstractDistanceComparer().distance(\"a\", 1) assert str(e.value) == \"distance must be called with str\" with pytest.raises(TypeError) as e: AbstractDistanceComparer().distance(\"a\", \"b\", 1) assert str(e.value) == \"distance must", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5333333333333333 + }, + { + "repo": "mangiucugna/json_repair", + "expected": "ValueError, match=\"doubled quotes followed by another quote while parsing a string\")", + "got": "ValueError, match=\"Expected string, got 'doubled quotes followed by string' instead\") as exc_info: repair_json('{\"key\": \"doubled quotes followed by string\"}') exc_info.value.args[0] == \"Expected string, got 'doubled quotes followed by string' instead\"", + "got_raw": "ValueError, match=\"Expected string, got 'doubled quotes followed by string' instead\") as exc_info: repair_json('{\"key\": \"doubled quotes followed by string\"}') exc_info.value.args[0] == \"Expected string, got 'doubled quotes followed by string' instead\"", + "exact_match": false, + "code_bleu": 0.1475758119043186, + "edit_similarity": 0.32238805970149254 + }, + { + "repo": "mangiucugna/json_repair", + "expected": "[1, \"x\"]", + "got": "[1, \"x\"]", + "got_raw": "[1, \"x\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mangiucugna/json_repair", + "expected": "\"[]\"", + "got": "\"[{}]\"", + "got_raw": "\"[{}]\" assert repair_json(\"[[[]]]\") == \"[[[[]]]]\" assert repair_json(\"[[[]]]\") == \"[[[[]]]]\" assert repair_json(\"[[[]]]\") == \"[[[[]]]]\" assert repair_json(\"[[[]]]\") == \"[[[[]]]]\" assert repair_json(\"[[[]]]\") == \"[[[[]]]]\" assert repair_json(\"[[[]]]\") == \"[[[[]]]]\" assert repair_json(\"[[[]]]\") == \"[[[[]]]]\" assert repair_json(\"[[[]]]\") == \"[[[[]]]]\" assert repair_json(\"[[[]]]\") == \"[[[[]]]", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.8 + }, + { + "repo": "mangiucugna/json_repair", + "expected": "'{\"key\": 1}'", + "got": "'{\"key\": 1.0}'", + "got_raw": "'{\"key\": 1.0}'", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.9230769230769231 + }, + { + "repo": "mangiucugna/json_repair", + "expected": "True", + "got": "True", + "got_raw": "True with pytest.raises(ValueError) as exc_info: schema_from_input(123) with pytest.raises(TypeError) as exc_info: schema_from_input(\"invalid\") with pytest.raises(ValueError) as exc_info: schema_from_input({\"invalid\": \"value\"}) with pytest.raises(ValueError) as exc_info: schema_from_input({\"type\": \"string\", \"invalid\": \"value\"}) with pytest.raises(ValueError) as exc_info: schema_from_input({\"type\": \"string\", \"enum\": [1, 2]}) with pytest.raises(ValueError) as exc_info: schema_from_input({\"type\": \"string\", \"enum\": [1, \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mangiucugna/json_repair", + "expected": "captured.err.lower()", + "got": "captured.err.lower()", + "got_raw": "captured.err.lower() assert exc.value.code == 1 assert captured.err == \"error: value is not a string\\n\" \"error: value is not a number\\n\" \"error: value is not an integer\\n\" \"error: value is not a boolean\\n\" \"error: value is not a null\\n\" \"error: value is not an object\\n\" \"error: value is not an array\\n\" \"error: value is not a string\\n\" \"error: value is not a number\\n\" \"error: value is not an integer\\n\" \"error: value is not a boolean\\n\" \"error", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mangiucugna/json_repair", + "expected": "'[\"value\", \"value2\"]'", + "got": "'[\"value\", \"value2\"]' assert repair_json('[ \"value\", // comment \"value2\" ]') == '[\"value\", \"value2\"]' assert repair_json('[ \"value\", // comment \"value2\" // comment ]') == '[\"value\", \"value2\"]' assert repair_json('[ \"value\", // comment \"value2\" // comment // comment ]') == '[\"value\", \"value2\"]' assert repair_json('[ \"value\", // comment \"value2\" // comment // comment // comment ]') == '[\"value\", \"value2\"]' assert repair_json('[ \"value\",", + "got_raw": "'[\"value\", \"value2\"]' assert repair_json('[ \"value\", // comment \"value2\" ]') == '[\"value\", \"value2\"]' assert repair_json('[ \"value\", // comment \"value2\" // comment ]') == '[\"value\", \"value2\"]' assert repair_json('[ \"value\", // comment \"value2\" // comment // comment ]') == '[\"value\", \"value2\"]' assert repair_json('[ \"value\", // comment \"value2\" // comment // comment // comment ]') == '[\"value\", \"value2\"]' assert repair_json('[ \"value\",", + "exact_match": false, + "code_bleu": 0.03011857955989304, + "edit_similarity": 0.0915032679738562 + }, + { + "repo": "mangiucugna/json_repair", + "expected": "\"\"", + "got": "\"{}\"", + "got_raw": "\"{}\" repair_json(\"{\\n}\") == \"{}\" repair_json(\"{\\n\\n}\") == \"{}\" repair_json(\"{\\n\\n\\n}\") == \"{}\" repair_json(\"{\\n\\n\\n\\n}\") == \"{}\" repair_json(\"{\\n\\n\\n\\n\\n}\") == \"{}\" repair_json(\"{\\n\\n\\n\\n\\n\\n}\") == \"{}\" repair_json(\"{\\n\\n\\n\\n\\n\\n\\n}\") == \"{}\" repair_json(\"{\\n\\n\\n\\n\\n\\n\\n\\n}\") == \"{}\" repair_json(\"{\\n\\n\\n\\n\\n\\n\\n\\n\\n}\") == \"{}\" repair_json(\"{\\n\\n\\n\\n", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "mangiucugna/json_repair", + "expected": "'{\"key\": \"val\\\\n123,`key2:value2\"}'", + "got": "'{\"key\": \"val\\\\n123\", \"key2\": \"value2\"}'", + "got_raw": "'{\"key\": \"val\\\\n123\", \"key2\": \"value2\"}'", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.9066666666666666 + }, + { + "repo": "mangiucugna/json_repair", + "expected": "1.2", + "got": "1.2", + "got_raw": "1.2 def test_parse_string(): assert repair_json('\"Hello\"', return_objects=True) == \"Hello\" assert repair_json('\"123\"', return_objects=True) == \"123\" def test_parse_array(): assert repair_json(\"[1, 2, 3]\", return_objects=True) == [1, 2, 3] assert repair_json(\"[\\\"Hello\\\", 123]\", return_objects=True) == [\"Hello\", 123] def test_parse_object(): assert repair_json('{\"key\": \"value\"}', return_objects=True) == {\"key\": \"value\"} assert repair_json('{\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mangiucugna/json_repair", + "expected": "'{\"key\": \"\"}'", + "got": "'{\"key\": \"\"}'", + "got_raw": "'{\"key\": \"\"}'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mangiucugna/json_repair", + "expected": "'{\"foo\": []}'", + "got": "\"{foo: []}\" assert repair_json(\"{foo: [1", + "got_raw": "\"{foo: []}\" assert repair_json(\"{foo: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 3", + "exact_match": false, + "code_bleu": 0.10600313379512592, + "edit_similarity": 0.33962264150943394 + }, + { + "repo": "mangiucugna/json_repair", + "expected": "{\"error\": \"schemaRepairMode must be a string.\"}", + "got": "{\"error\": \"schemaRepairMode must be a string\"}", + "got_raw": "{\"error\": \"schemaRepairMode must be a string\"}", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.989247311827957 + }, + { + "repo": "manjurulhoque/django-job-portal", + "expected": "0)", + "got": "0)", + "got_raw": "0) # Add a job to the user's applied jobs and test again", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "manjurulhoque/django-job-portal", + "expected": "[\"This field is required.\"])", + "got": "[\"Email is required\"]) self.assertEqual(form.errors[\"password1\"]", + "got_raw": "[\"Email is required\"]) self.assertEqual(form.errors[\"password1\"], [\"Password is required\"]) self.assertEqual(form.errors[\"password2\"], [\"Password is required\"]) self.assertEqual(form.errors[\"first_name\"], [\"First name is required\"]) self.assertEqual(form.errors[\"last_name\"], [\"Last name is required\"]) self.assertEqual(form.errors[\"role\"], [\"Role is required\"]) self.assertEqual(form.errors[\"gender\"], [\"Gender is required\"]) self.assertEqual(form.errors[\"email\"], [\"Email is required\"]) self.assertEqual(form.errors[\"password1\"], [\"Password is required\"]) self.assertEqual(form.errors[\"password2\"], [\"Password is required\"]) self.assertEqual(form.errors[\"first_name", + "exact_match": false, + "code_bleu": 0.1250076305588977, + "edit_similarity": 0.41304347826086957 + }, + { + "repo": "manjurulhoque/django-job-portal", + "expected": "\"Manjurul Hoque\")", + "got": "\"Manjurul Hoque\")", + "got_raw": "\"Manjurul Hoque\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "manjurulhoque/django-job-portal", + "expected": "User.objects.filter(email=self.valid_data[\"email\"]).exists())", + "got": "response.data[\"data\"])", + "got_raw": "response.data[\"data\"])", + "exact_match": false, + "code_bleu": 0.09721666619041269, + "edit_similarity": 0.3132530120481928 + }, + { + "repo": "manjurulhoque/django-job-portal", + "expected": "self.job.id)", + "got": "self.job.id)", + "got_raw": "self.job.id)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "manjurulhoque/django-job-portal", + "expected": "\"Invalid form\")", + "got": "\"Form is not valid\") self.assertEqual( User.objects.count()", + "got_raw": "\"Form is not valid\") self.assertEqual( User.objects.count(), 1, \"User not created\") self.assertEqual( User.objects.get().email, \"rumi1@gmail.com\", \"User email not correct\") self.assertEqual( User.objects.get().role, \"employee\", \"User role not correct\") self.assertEqual( User.objects.get().gender, \"male\", \"User gender not correct\") self.assertEqual( User.objects.get().first_name, \"Manjurul\", \"User first name not correct\") self.assertEqual( User.objects.get().last_name, \"Hoque\", \"User last name not correct\") self.assertEqual( User.objects.get", + "exact_match": false, + "code_bleu": 0.09552040806823771, + "edit_similarity": 0.24324324324324326 + }, + { + "repo": "manjurulhoque/django-job-portal", + "expected": "\"Test Job\")", + "got": "self.job_data[\"title\"]) self.assertEqual(serializer.data[\"description\"]", + "got_raw": "self.job_data[\"title\"]) self.assertEqual(serializer.data[\"description\"], self.job_data[\"description\"]) self.assertEqual(serializer.data[\"location\"], self.job_data[\"location\"]) self.assertEqual(serializer.data[\"salary\"], self.job_data[\"salary\"]) self.assertEqual(serializer.data[\"created_at\"], self.job_data[\"created_at\"].isoformat()) self.assertEqual(serializer.data[\"last_date\"], self.job_data[\"last_date\"].isoformat()) self.assertEqual(serializer.data[\"user\"], str(job.user.id)) self.assertEqual(serializer.data[\"tags\"], []) self.assertEqual(serializer.data[\"applications\"], []) self.assertEqual(serializer.data[\"status\"], \"open\") self.assertEqual(serializer.data[\"is_featured\"], False", + "exact_match": false, + "code_bleu": 0.07223943354597204, + "edit_similarity": 0.12195121951219512 + }, + { + "repo": "manjurulhoque/django-job-portal", + "expected": "status.HTTP_400_BAD_REQUEST)", + "got": "status.HTTP_400_BAD_REQUEST)", + "got_raw": "status.HTTP_400_BAD_REQUEST)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "manzt/anywidget", + "expected": "path.read_text()", + "got": "bar._repr_mimebundle_._extra_state[\"bar\"]", + "got_raw": "bar._repr_mimebundle_._extra_state[\"bar\"] == bar._repr_mimebundle_._extra_state[\"bar\"] == bar._repr_mimebundle_._extra_state[\"bar\"] == bar._repr_mimebundle_._extra_state[\"bar\"] == bar._repr_mimebundle_._extra_state[\"bar\"] == bar._repr_mimebundle_._extra_state[\"bar\"] == bar._repr_mimebundle_._extra_state[\"bar\"] == bar._repr_mimebundle_._extra_state[\"bar\"] == bar._repr_mimebundle_._extra_state[\"bar\"] == bar._repr_mimebundle_._extra_state[\"bar", + "exact_match": false, + "code_bleu": 0.16036590969929357, + "edit_similarity": 0.2807017543859649 + }, + { + "repo": "manzt/anywidget", + "expected": "new_contents", + "got": "new_contents", + "got_raw": "new_contents + \"\\n\" * 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "manzt/anywidget", + "expected": "bundle[0]", + "got": "bundle[\"text/html\"]", + "got_raw": "bundle[\"text/html\"] # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.5714285714285714 + }, + { + "repo": "manzt/anywidget", + "expected": "y", + "got": "y", + "got_raw": "y assert state[\"y\"][\"shape\"] is y_shape assert state[\"z\"] is not buffers[0] assert state[\"z\"] is buffers[1] assert state[\"deep\"] is not state_before[\"deep\"] assert state[\"deep\"][\"b\"] is not state_before[\"deep\"][\"b\"] assert state[\"deep\"][\"b\"][1] is not state_before[\"deep\"][\"b\"][1] assert state[\"deep\"][\"b\"][1][\"deeper\"] is not buffers[2] assert state[\"deep\"][\"b\"][1][\"deeper\"] is buffers[3] assert state[\"deep\"][\"b\"][1][\"deeper\"] is", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "manzt/anywidget", + "expected": "bar", + "got": "bar._repr_mimebundle_._extra_state[\"bar\"]", + "got_raw": "bar._repr_mimebundle_._extra_state[\"bar\"] == bar._repr_mimebundle_._extra_state[\"bar\"] == bar._repr_mimebundle_._extra_state[\"bar\"] == bar._repr_mimebundle_._extra_state[\"bar\"] == bar._repr_mimebundle_._extra_state[\"bar\"] == bar._repr_mimebundle_._extra_state[\"bar\"] == bar._repr_mimebundle_._extra_state[\"bar\"] == bar._repr_mimebundle_._extra_state[\"bar\"] == bar._repr_mimebundle_._extra_state[\"bar\"] == bar._repr_mimebundle_._extra_state[\"bar", + "exact_match": false, + "code_bleu": 0.16036590969929357, + "edit_similarity": 0.13636363636363635 + }, + { + "repo": "marcolivierarsenault/moonraker-home-assistant", + "expected": "1.2", + "got": "1.2000000000000002e-05", + "got_raw": "1.2000000000000002e-05 * 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.24 + }, + { + "repo": "marcolivierarsenault/moonraker-home-assistant", + "expected": "caplog.text", + "got": "\"webcam\"", + "got_raw": "\"webcam\" in entry.supported_features.value_strict.split(\",\")[-1] # noqa: E501 # pylint: disable=no-member # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E50", + "exact_match": false, + "code_bleu": 0.16666666666666666, + "edit_similarity": 0.21052631578947367 + }, + { + "repo": "marcolivierarsenault/moonraker-home-assistant", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "marcolivierarsenault/moonraker-home-assistant", + "expected": "state.attributes", + "got": "state.attributes.keys()", + "got_raw": "state.attributes.keys() assert \"filament_remaining\" not in state.attributes.keys() assert \"filament_target\" not in state.attributes.keys() assert \"filament_length\" not in state.attributes.keys() assert \"filament_length_remaining\" not in state.attributes.keys() assert \"filament_length_target\" not in state.attributes.keys() assert \"filament_length_per_layer\" not in state.attributes.keys() assert \"filament_length_per_layer_remaining\" not in state.attributes.keys() assert \"filament_length_per_layer_target\" not in state.attributes.keys() assert \"filament_length_per_layer_per_layer\" not in state.attributes.keys() assert \"", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.8205128205128205 + }, + { + "repo": "marcolivierarsenault/moonraker-home-assistant", + "expected": "0.2", + "got": "0.200000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.200000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.04580152671755725 + }, + { + "repo": "marcolivierarsenault/moonraker-home-assistant", + "expected": "False", + "got": "False", + "got_raw": "False", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "marcwebbie/passpie", + "expected": "DEVNULL", + "got": "DEVNULL.fileno()", + "got_raw": "DEVNULL.fileno()", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6086956521739131 + }, + { + "repo": "marcwebbie/passpie", + "expected": "None", + "got": "None", + "got_raw": "None and type(key_input) is str and len(key_input) > 0 and passphrase.encode('utf-8') == passphrase.encode('utf-8') and passphrase.encode('utf-8') == key_input.encode('utf-8') and passphrase.encode('utf-8') == passphrase.encode('utf-16') and passphrase.encode('utf-16') == key_input.encode('utf-16') and passphrase.encode('utf-16') == passphrase.encode('utf-32') and passphrase.encode('utf-32') == key_input.encode('utf-32') and passphrase.encode('utf-", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "marcwebbie/passpie", + "expected": "credpath)", + "got": "credpath)", + "got_raw": "credpath)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "marcwebbie/passpie", + "expected": "str(excinfo.value)", + "got": "str(excinfo.value)", + "got_raw": "str(excinfo.value)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "marcwebbie/passpie", + "expected": "2)", + "got": "2)", + "got_raw": "2)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "marcwebbie/passpie", + "expected": "None", + "got": "None", + "got_raw": "None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "marcwebbie/passpie", + "expected": "(None, \"example.com\")", + "got": "(\"\", \"example.com\")", + "got_raw": "(\"\", \"example.com\")\n assert split_fullname(\"example\") == (\"\", \"example\")\n assert split_fullname(\"example.com/\") == (\"\", \"example.com/\")\n assert split_fullname(\"example.com/\") == (\"\", \"example.com/\")\n assert split_fullname(\"example.com/\") == (\"\", \"example.com/\")\n assert split_fullname(\"example.com/\") == (\"\", \"example.com/\")\n assert split_fullname(\"example.com/\") == (\"\", \"example.com/\")\n assert split_fullname(\"example.com/\") == (\"\", \"example.com/\")\n assert split_fullname", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.85 + }, + { + "repo": "marcwebbie/passpie", + "expected": "None", + "got": "None", + "got_raw": "None and mock_logging.error.call_count == 1 and mock_logging.error.call_args_list[0][0][0] == 'Cannot add empty login' and mock_logging.error.call_args_list[0][0][1] == 'login@name' and mock_logging.error.call_args_list[0][0][2] == 'password' and mock_logging.error.call_args_list[0][0][3] == 'comment' and mock_logging.error.call_args_list[0][0][4] == 'database' and mock_logging.error.call_args_list[0][0][5] == 'add' and mock_logging.error.call", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "marcwebbie/passpie", + "expected": "{}", + "got": "{}", + "got_raw": "{}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "marcwebbie/passpie", + "expected": "*autopull)", + "got": "autopull)", + "got_raw": "autopull) def test_calls_pull_rebase_on_initialization_when_autopull_is_passed_and_git_is_not_installed(mocker, mock_process): mocker.patch('passpie.history.Repository.git_installed', return_value=False) mocker.patch.object(Repository, 'pull_rebase') autopull = ['origin', 'master'] repo = Repository('path', autopull) assert repo.pull_rebase.called autopull) def test_calls_pull_rebase_on_initialization_when_autopull_is_passed_and_git_is_not_installed_and_git_is_installed(mocker, mock_process): mocker.patch('passpie.history.Repository.git_installed', return_value=True) mocker.patch.object", + "exact_match": false, + "code_bleu": 0.4714045207910317, + "edit_similarity": 0.9473684210526315 + }, + { + "repo": "marcwebbie/passpie", + "expected": "5", + "got": "5", + "got_raw": "5 / 1000.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "marshmallow-code/apispec", + "expected": "make_schema_key(PetSchema(load_only=structure(modifier[::-1])))", + "got": "make_schema_key(PetSchema", + "got_raw": "make_schema_key(PetSchema, modifier) == make_schema_key(PetSchema, modifier) + 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.14014940254228575, + "edit_similarity": 0.5681818181818182 + }, + { + "repo": "marshmallow-code/apispec", + "expected": "resp", + "got": "resp[\"content\"][\"application/json\"][\"example\"]", + "got_raw": "resp[\"content\"][\"application/json\"][\"example\"] # noqa: E501 \"\"\"Example response\"\"\" # noqa: E501 \"\"\"application/json\"\"\" # noqa: E501 \"\"\"Example\"\"\" # noqa: E501 \"\"\"name\"\"\" # noqa: E501 \"\"\"Example\"\"\" # noqa: E501 \"\"\"name\"\"\" # noqa: E501 \"\"\"Example\"\"\" # noqa: E501 \"\"\"name\"\"\" # noqa: E501 \"\"\"Example\"\"\" # noqa: E501 \"\"\"name\"\"\" # noqa: E", + "exact_match": false, + "code_bleu": 0.12605968092174913, + "edit_similarity": 0.16 + }, + { + "repo": "marshmallow-code/apispec", + "expected": "[\"field3\", \"field4\", \"field5\"]", + "got": "[\"field3\", \"field4\"] assert list(get_fields(ExcludeSchema, exclude=exclude_type((\"field1\", \"field2\"))).keys()) == [\"field3\", \"field4\"] assert list(get_fields(ExcludeSchema, dump_only=dump_only_type((\"field3\", \"field4\"))).keys()) == [\"field1\", \"field2\"] assert list(get_fields(ExcludeSchema, exclude=exclude_type((\"field1\", \"field2\")), dump_only=dump_only_type((\"field3\", \"field4\"))).keys()) == [\"field3\", \"field4\"] assert list(get_fields(ExcludeSchema,", + "got_raw": "[\"field3\", \"field4\"] assert list(get_fields(ExcludeSchema, exclude=exclude_type((\"field1\", \"field2\"))).keys()) == [\"field3\", \"field4\"] assert list(get_fields(ExcludeSchema, dump_only=dump_only_type((\"field3\", \"field4\"))).keys()) == [\"field1\", \"field2\"] assert list(get_fields(ExcludeSchema, exclude=exclude_type((\"field1\", \"field2\")), dump_only=dump_only_type((\"field3\", \"field4\"))).keys()) == [\"field3\", \"field4\"] assert list(get_fields(ExcludeSchema,", + "exact_match": false, + "code_bleu": 0.0320034093369546, + "edit_similarity": 0.12033195020746888 + }, + { + "repo": "marshmallow-code/apispec", + "expected": "\"1.0.0\"", + "got": "\"1.0.0\"", + "got_raw": "\"1.0.0\" assert metadata[\"description\"] == description assert metadata[\"servers\"] == [{\"url\": \"http://petstore.swagger.io/v1\"}] assert metadata[\"components\"] == {} assert metadata[\"tags\"] == [] assert metadata[\"externalDocs\"] == {\"description\": \"Find out more\", \"url\": \"http://swagger.io\"} assert metadata[\"security\"] == [{\"apiKey\": []}] assert metadata[\"components\"][\"securitySchemes\"] == {} assert metadata[\"components\"][\"schemas\"] == {} assert metadata[\"components\"][\"parameters\"] == {} assert metadata[\"components\"][\"responses\"] == {} assert metadata[\"components\"][\"examples\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "marshmallow-code/apispec", + "expected": "[ \"field5\" ]", + "got": "[\"field1\"", + "got_raw": "[\"field1\", \"field2\"] + list(ExcludeSchema.Meta.dump_only) + [\"field3\", \"field4\", \"field5\"] + [\"field1\", \"field2\"] + list(ExcludeSchema.Meta.exclude) + [\"field3\", \"field4\", \"field5\"] + [\"field1\", \"field2\"] + list(ExcludeSchema.Meta.dump_only) + [\"field3\", \"field4\", \"field5\"] + [\"field1\", \"field2\"] + list(ExcludeSchema.Meta.exclude) + [\"field3\", \"field4\", \"field5\"] + [\"field1\", \"field", + "exact_match": false, + "code_bleu": 0.35818997727451396, + "edit_similarity": 0.7619047619047619 + }, + { + "repo": "marshmallow-code/apispec", + "expected": "enum", + "got": "enum", + "got_raw": "enum + [\"name\", \"photoUrls\"] + [\"name\", \"photoUrls\"] + [\"name\", \"photoUrls\"] + [\"name\", \"photoUrls\"] + [\"name\", \"photoUrls\"] + [\"name\", \"photoUrls\"] + [\"name\", \"photoUrls\"] + [\"name\", \"photoUrls\"] + [\"name\", \"photoUrls\"] + [\"name\", \"photoUrls\"] + [\"name\", \"photoUrls\"] + [\"name\", \"photoUrls\"] + [\"name\", \"photoUrls\"] + [\"name\", \"photoUrls\"] + [\"name\", \"photoUrls\"] + [\"name\", \"photoUrls", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "marshmallow-code/marshmallow", + "expected": "[\"name\", \"email\", \"age\", \"created\", \"id\", \"homepage\"]", + "got": "[\"id\", \"name\", \"email\"]", + "got_raw": "[\"id\", \"name\", \"email\"]", + "exact_match": false, + "code_bleu": 0.23788790452170025, + "edit_similarity": 0.4473684210526316 + }, + { + "repo": "marshmallow-code/marshmallow", + "expected": "[\"error1\", \"error2\"]", + "got": "[\"error1\", \"error2\"]", + "got_raw": "[\"error1\", \"error2\"]\n\n def test_merging_list_and_none(self):\n\n assert merge_errors([\"error1\", \"error2\"], None) == [\"error1\", \"error2\"]\n\n def test_merging_two_lists(self):\n\n assert merge_errors([\"error1\", \"error2\"], [\"error3\", \"error4\"]) == [ \"error1\", \"error2\", \"error3\", \"error4\", ]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "marshmallow-code/marshmallow", + "expected": "\"invalid email\"", + "got": "\"invalid email\"", + "got_raw": "\"invalid email\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "marshmallow-code/marshmallow", + "expected": "2", + "got": "2.0000000000000004e-800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "2.0000000000000004e-800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "marshmallow-code/marshmallow", + "expected": "{ \"_schema\": \"error2\", \"field1\": \"error1\", }", + "got": "{\"field1\": \"error1\", \"error2\": \"error2\"} merge_errors({\"field1\": \"error1\"}, 123) == {\"field1\": \"error1\", \"123\": 123} merge_errors(123, \"error2\") == {\"123\": 123, \"error2\": \"error2\"} merge_errors(123, 456) == {\"123\": 123, \"456\": 456} merge_errors(123, 456, 78", + "got_raw": "{\"field1\": \"error1\", \"error2\": \"error2\"} merge_errors({\"field1\": \"error1\"}, 123) == {\"field1\": \"error1\", \"123\": 123} merge_errors(123, \"error2\") == {\"123\": 123, \"error2\": \"error2\"} merge_errors(123, 456) == {\"123\": 123, \"456\": 456} merge_errors(123, 456, 78", + "exact_match": false, + "code_bleu": 0.05903992807031133, + "edit_similarity": 0.1461794019933555 + }, + { + "repo": "marshmallow-code/marshmallow", + "expected": "\"bar\"", + "got": "\"bar\"", + "got_raw": "\"bar\"\n assert schema.fields[\"baz\"].parent == schema\n\n assert schema.fields[\"baz\"].name == \"baz\"\n assert schema.fields[\"qux\"].parent == schema\n\n assert schema.fields[\"qux\"].name == \"qux\"\n assert schema.fields[\"qux\"].nested == schema.fields[\"quux\"]\n assert schema.fields[\"quux\"].parent == schema.fields[\"qux\"]\n assert schema.fields[\"quux\"].name == \"quux\"\n assert schema.fields[\"quux\"].nested == schema.fields[\"quuz\"]\n assert schema.fields[\"quuz\"].", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "marshmallow-code/marshmallow", + "expected": "False", + "got": "False", + "got_raw": "False\n\n\ndef test_merge_errors_with_missing():\n error_store_1 = ErrorStore(errors={\"field1\": \"error1\"})\n error_store_2 = ErrorStore(errors={\"field2\": \"error2\"})\n\n merged_errors = merge_errors(error_store_1, error_store_2)\n assert merged_errors.errors == { \"field1\": \"error1\", \"field2\": \"error2\", }", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "marshmallow-code/marshmallow", + "expected": "messages", + "got": "messages[\"user\"][\"email\"]", + "got_raw": "messages[\"user\"][\"email\"] == [\"email is invalid\"] err.errors == messages == {\"user\": {\"email\": [\"email is invalid\"]}} err.to_dict() == {\"user\": {\"email\": [\"email is invalid\"]}} err.to_dict(2) == {\"user\": {\"email\": [\"email is invalid\"]}} err.to_dict(3) == {\"user\": {\"email\": [\"email is invalid\"]}} err.to_dict(4) == {\"user\": {\"email\": [\"email is invalid\"]}} err.to_dict(5) == {\"user\": {\"email\": [\"email is invalid\"]}} err.to_dict(6", + "exact_match": false, + "code_bleu": 0.18575057999133598, + "edit_similarity": 0.48484848484848486 + }, + { + "repo": "marshmallow-code/marshmallow", + "expected": "{ \"f_1\": 2, \"f_2\": 1, \"f_3\": 4, \"f_4\": 1, }", + "got": "{ \"f_1\": 2, \"f_2\": 3, \"f_3\": 4, \"f_4\": 5, } schema.load({\"f_1\": 1, \"f_2\": 1, \"f_3\": 1, \"f_4\": 1}) == { \"f_1\": 1, \"f_2\": 1, \"f_3\": 1, \"f_4\": 1, } schema.dump({\"f_1\": 1, \"f_2\": 1, \"f_3\": 1", + "got_raw": "{ \"f_1\": 2, \"f_2\": 3, \"f_3\": 4, \"f_4\": 5, } schema.load({\"f_1\": 1, \"f_2\": 1, \"f_3\": 1, \"f_4\": 1}) == { \"f_1\": 1, \"f_2\": 1, \"f_3\": 1, \"f_4\": 1, } schema.dump({\"f_1\": 1, \"f_2\": 1, \"f_3\": 1", + "exact_match": false, + "code_bleu": 0.23133930545692064, + "edit_similarity": 0.36681222707423583 + }, + { + "repo": "marshmallow-code/marshmallow", + "expected": "\"baz\"", + "got": "field._nested_name", + "got_raw": "field._nested_name or field.name + \"_item\" + str(field.index) + \"_item\" + str(field.index) + \"_item\" + str(field.index) + \"_item\" + str(field.index) + \"_item\" + str(field.index) + \"_item\" + str(field.index) + \"_item\" + str(field.index) + \"_item\" + str(field.index) + \"_item\" + str(field.index) + \"_item\" + str(field.index) + \"_item\" + str(field.index) + \"_item\" + str(field.index) + \"_item\" + str(field.index) + \"_item\"", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.08695652173913043 + }, + { + "repo": "marshmallow-code/marshmallow", + "expected": "True", + "got": "True", + "got_raw": "True\n\n def test_context_method_with_nested(self):\n owner = User(\"Joe\")\n blog = Blog(title=\"Joe Blog\", user=owner)\n serializer = BlogContextSchema()\n with Context({\"blog\": blog}):\n data = serializer.dump(blog)\n assert data[\"user\"][\"is_owner\"] is True\n\n def test_context_method_with_nested_list(self):\n owner = User(\"Joe\")\n blog = Blog(title=\"Joe Blog\", user=owner)\n serializer = BlogListContextSchema()\n with Context({\"blog\": [blog]}):\n data = serializer.dump([blog])\n assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "marshmallow-code/webargs", + "expected": "ret", + "got": "ret[\"json\"]", + "got_raw": "ret[\"json\"] == ret[\"json\"] == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret == ret ==", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.42857142857142855 + }, + { + "repo": "marshmallow-code/webargs", + "expected": "{\"x_field\": [{\"id\": 24}]}", + "got": "{\"X-Field\": [{\"id\": 24}]}", + "got_raw": "{\"X-Field\": [{\"id\": 24}]} # noqa: E125 # noqa: E125 # noqa: E125 # noqa: E125 # noqa: E125 # noqa: E125 # noqa: E125 # noqa: E125 # noqa: E125 # noqa: E125 # noqa: E125 # noqa: E125 # noqa: E125 # noqa: E125 # noqa", + "exact_match": false, + "code_bleu": 0.8265168183793802, + "edit_similarity": 0.88 + }, + { + "repo": "marshmallow-code/webargs", + "expected": "{}", + "got": "{\"things\":", + "got_raw": "{\"things\": []}\n\n\ndef test_parse_missing_dict(parser, web_request):\n web_request.json = {}\n args = {\"things\": fields.Dict(keys=fields.Str(), values=fields.Raw())}\n\n assert parser.parse(args, web_request) == {\"things\": {}}\n\n\ndef test_parse_missing_dict_with_default(parser, web_request):\n web_request.json = {}\n args = {\"things\": fields.Dict(keys=fields.Str(), values=fields.Raw(), default={})}\n\n assert parser.parse(args, web_request) == {\"things\": {}}\n\n\ndef test_parse_missing_dict_with_default_and_empty", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.16666666666666666 + }, + { + "repo": "marshmallow-code/webargs", + "expected": "422", + "got": "422", + "got_raw": "422\n assert res.json == {\"name\": [\"Missing data for required field.\"]}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "marshmallow-code/webargs", + "expected": "{\"name\": \"Fred\"}", + "got": "{\"name\": \"Fred\"}", + "got_raw": "{\"name\": \"Fred\"}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "marshmallow-code/webargs", + "expected": "200", + "got": "200", + "got_raw": "200 result.json == {\"value\": 43} result = testapp.post(\"/echo_use_args_validated\", {\"value\": \"43\"}) assert result.status_code == 422 result.json == {\"value\": [\"Not a number\"]} result = testapp.post(\"/echo_use_args_validated\", {\"value\": \"foo\"}) assert result.status_code == 422 result.json == {\"value\": [\"Not a number\"]} result = testapp.post(\"/echo_use_args_validated\", {\"value\": 43.0}) assert result.status_code == 200 result.json == {\"value\": 4", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "massquantity/LibRecommender", + "expected": "var_names", + "got": "var_names", + "got_raw": "var_names + [\"global_step:0\"] else f\"{v}:0\" in var_names + [\"global_step:0\"] + model._layers[0]._layers[0]._layers[0]._layers[0]._layers[0]._layers[0]._layers[0]._layers[0]._layers[0]._layers[0]._layers[0]._layers[0]._layers[0]._layers[0]._layers[0]._layers[0]._layers[0]._layers[0]._layers[0]._layers[0].", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "massquantity/LibRecommender", + "expected": "32", + "got": "32", + "got_raw": "32 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "massquantity/LibRecommender", + "expected": "(100, 8)", + "got": "(100, 20, 8) assert sess.run(output2).shape == (100, 20, 8) assert_allclose(sess.run(output), sess.run(output2)) assert_allclose(sess.run(output), sess.run(output2)) assert_allclose(sess.run(output), sess.run(output2)) assert_allclose(sess.run(output), sess.run(output2)) assert_allclose(sess.run(output), sess.run(output2)) assert_allclose(sess.run(output), sess.run(output2)) assert_allclose(sess.run(output), sess.run(output2)) assert_allclose(sess.run(output), sess.run(output2))", + "got_raw": "(100, 20, 8) assert sess.run(output2).shape == (100, 20, 8) assert_allclose(sess.run(output), sess.run(output2)) assert_allclose(sess.run(output), sess.run(output2)) assert_allclose(sess.run(output), sess.run(output2)) assert_allclose(sess.run(output), sess.run(output2)) assert_allclose(sess.run(output), sess.run(output2)) assert_allclose(sess.run(output), sess.run(output2)) assert_allclose(sess.run(output), sess.run(output2)) assert_allclose(sess.run(output), sess.run(output2))", + "exact_match": false, + "code_bleu": 0.020197725038287536, + "edit_similarity": 0.032586558044806514 + }, + { + "repo": "massquantity/LibRecommender", + "expected": "v2", + "got": "v2", + "got_raw": "v2 is v3 is not None\n\n\ndef test_dropout_config():\n with tf.Session() as sess:\n dropout_config(0.5, 0.2, 0.3, 0.4, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9)\n sess.run(tf.global_variables_initializer())\n assert sess.run(tf.get_variable(\"dropout_0\")) == 0.5\n assert sess.run(tf.get_variable(\"dropout_", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "massquantity/LibRecommender", + "expected": "[0, 11, 999]", + "got": "[0, 11] assert item_consumed[11] == [1, 1, 2, 1] assert item_consumed[999] == [1, 2] assert item_consumed[0] == [2, 3] assert item_consumed[11] == [1, 2] assert item_consumed[1] == [3] assert item_consumed[999] == [3] assert item_consumed[0] == [3] assert item_consumed[1] == [3] assert item_consumed[999]", + "got_raw": "[0, 11] assert item_consumed[11] == [1, 1, 2, 1] assert item_consumed[999] == [1, 2] assert item_consumed[0] == [2, 3] assert item_consumed[11] == [1, 2] assert item_consumed[1] == [3] assert item_consumed[999] == [3] assert item_consumed[0] == [3] assert item_consumed[1] == [3] assert item_consumed[999]", + "exact_match": false, + "code_bleu": 0.038780474434215555, + "edit_similarity": 0.07570977917981073 + }, + { + "repo": "massquantity/LibRecommender", + "expected": "data_info.n_users", + "got": "data_info[\"n_users\"]", + "got_raw": "data_info[\"n_users\"] assert feats[\"n_items\"] == data_info[\"n_items\"] assert feats[\"n_features\"] == data_info[\"n_features\"] assert feats[\"n_latent\"] == data_info[\"n_latent\"] assert feats[\"n_layers\"] == data_info[\"n_layers\"] assert feats[\"n_hidden\"] == data_info[\"n_hidden\"] assert feats[\"n_dense\"] == data_info[\"n_dense\"] assert feats[\"n_dense_layers\"] == data_info[\"n_dense_layers\"] assert feats[\"n_dense_hidden\"] == data_info[\"n_dense_hidden\"] assert feats[\"n_dense_dropout\"] == data_info[\"n", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.8648648648648649 + }, + { + "repo": "massquantity/LibRecommender", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as e_info: params[\"reg\"] = reg # type: ignore params[\"dropout_rate\"] = dropout_rate params[\"lr_decay\"] = lr_decay params[\"epsilon\"] = epsilon params[\"amsgrad\"] = amsgrad params[\"remove_edges\"] = remove_edges params[\"num_layers\"] = num_layers params[\"num_neighbors\"] = num_neighbors params[\"num_walks\"] = num_walks params[\"sample_walk_len\"] = sample_walk_len params[\"margin\"] = margin params[\"start_node\"] = start_node params[\"focus_start\"] = focus_start params[\"full_inference\"] = full_inference params[\"num", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "massquantity/LibRecommender", + "expected": "RuntimeError)", + "got": "RuntimeError)", + "got_raw": "RuntimeError) as e_info: loaded_model.predict(loaded_data_info) assert str(e_info.value) == \"The model has been loaded from a previous run with a different dataset.\" + \" Please re-fit the model with the loaded data.\" + \" Alternatively, you can use the 'load_weights' method.\" + \" For more information, see the documentation.\" + \" (RuntimeError)\" + \"\\n\" + \"The model has been loaded from a previous run with a different dataset.\" + \" Please re-fit the model with the loaded data.\" + \" Alternatively, you can use the 'load_weights' method.\" + \" For", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "massquantity/LibRecommender", + "expected": "eval_result[\"roc_auc\"]", + "got": "eval_result[\"roc_auc\"]", + "got_raw": "eval_result[\"roc_auc\"] # change loss should change the result!", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "massquantity/LibRecommender", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as err: WaveNet(task, data_info).fit(train_data, neg_sampling) assert str(err.value) == \"Negative sampling is not supported for rating task\" if task == \"ranking\" and loss_type == \"focal\": with pytest.raises(NotImplementedError) as err: WaveNet(task, data_info).fit(train_data, neg_sampling) assert str(err.value) == \"Focal loss is not supported for ranking task\" if task == \"ranking\" and loss_type == \"cross_entropy\": with pytest.raises(NotImplementedError) as err: WaveNet(task, data_info).fit(train_data,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "massquantity/LibRecommender", + "expected": "[12, 18])", + "got": "[0, 1]) assert_array_equal(pad_val, [0, \"missing\"]) assert_array_equal( sparse_uniques, [0, 1, 2, 3, 4] ) assert_array_equal( multi_sparse_uniques, [0, 1, 2, 3, 4, 5, 6, 7, 8] ) assert_array_equal( data_info.multi_sparse_combine_info, ( [2, 4], [2, 3], [0, 1], [0, \"missing\"], ) ) assert_array_equal( data_info.multi_sparse_combine_info[", + "got_raw": "[0, 1]) assert_array_equal(pad_val, [0, \"missing\"]) assert_array_equal( sparse_uniques, [0, 1, 2, 3, 4] ) assert_array_equal( multi_sparse_uniques, [0, 1, 2, 3, 4, 5, 6, 7, 8] ) assert_array_equal( data_info.multi_sparse_combine_info, ( [2, 4], [2, 3], [0, 1], [0, \"missing\"], ) ) assert_array_equal( data_info.multi_sparse_combine_info[", + "exact_match": false, + "code_bleu": 0.018819088728501288, + "edit_similarity": 0.03468208092485549 + }, + { + "repo": "massquantity/LibRecommender", + "expected": "num_workers", + "got": "1", + "got_raw": "1 and len(np.unique(torch_random)) == 1 and len(np.unique(torch_seeds)) == 1 and len(np.unique(torch_random)) == len(np.unique(torch_seeds)) and len(np.unique(torch_random)) == len(np.unique(np_random)) and len(np.unique(torch_random)) == len(np.unique(torch_seeds)) and len(np.unique(torch_random)) == len(np.unique(np_random)) and len(np.unique(torch_random)) == len(np.unique(torch_seeds)) and len(np.unique(torch_random)) == len(np.unique(np_random)) and len(np.unique(torch_random)) == len(np.unique(torch_seeds)) and len(np.unique", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "massquantity/LibRecommender", + "expected": "AssertionError)", + "got": "ValueError)", + "got_raw": "ValueError) as err_info: Item2Vec( data_info, task=\"rating\", neg_sampling=neg_sampling, ) assert str(err_info.value) == \"Item2Vec cannot handle the task 'rating'.\" + \" Please use the 'ranking' task instead.\" + \" For more information, please refer to the documentation.\" + \" (Hint: use the 'ranking' task instead)\" + \" (Hint: use the 'ranking' task instead)\" + \" (Hint: use the 'ranking' task instead)\" + \" (Hint: use the 'ranking' task instead)\" + \" (Hint: use the 'ranking", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5384615384615384 + }, + { + "repo": "massquantity/LibRecommender", + "expected": "model_num", + "got": "model_num", + "got_raw": "model_num * (model_num - 1) // 2 + model_num - 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "massquantity/LibRecommender", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as e_info: params[\"reg\"] = reg # type: ignore params[\"dropout_rate\"] = dropout_rate params[\"lr_decay\"] = lr_decay params[\"epsilon\"] = epsilon params[\"amsgrad\"] = amsgrad params[\"remove_edges\"] = remove_edges params[\"num_layers\"] = num_layers params[\"num_neighbors\"] = num_neighbors params[\"num_walks\"] = num_walks params[\"sample_walk_len\"] = sample_walk_len params[\"margin\"] = margin params[\"start_node\"] = start_node params[\"focus_start\"] = focus_start params[\"num_workers\"] = num_workers model = GraphSage", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "massquantity/LibRecommender", + "expected": "(100, 3)", + "got": "(100, 3) assert sess.run(output2).shape == (100, 7) assert_allclose(sess.run(output), sess.run(output2)) assert_allclose(sess.run(output), sess.run(random_data @ tf.random.normal([10, 3]))) assert_allclose(sess.run(output2), sess.run(random_data @ tf.random.normal([7, 3]))) assert_allclose(sess.run(output), sess.run(random_data @ tf.random.normal([10, 3]))) assert_allclose(sess.run(output2), sess.run(random_data @ tf.random.normal([7, 3]))) assert_allclose(sess", + "got_raw": "(100, 3) assert sess.run(output2).shape == (100, 7) assert_allclose(sess.run(output), sess.run(output2)) assert_allclose(sess.run(output), sess.run(random_data @ tf.random.normal([10, 3]))) assert_allclose(sess.run(output2), sess.run(random_data @ tf.random.normal([7, 3]))) assert_allclose(sess.run(output), sess.run(random_data @ tf.random.normal([10, 3]))) assert_allclose(sess.run(output2), sess.run(random_data @ tf.random.normal([7, 3]))) assert_allclose(sess", + "exact_match": false, + "code_bleu": 0.028012795946201083, + "edit_similarity": 0.03382663847780127 + }, + { + "repo": "massquantity/LibRecommender", + "expected": "TypeError)", + "got": "TypeError)", + "got_raw": "TypeError) as e: model.predict(1) assert str(e.value) == \"user must be an int or a list of ints\" with pytest.raises(TypeError) as e: model.predict(user=[1]) assert str(e.value) == \"item must be an int or a list of ints\" with pytest.raises(TypeError) as e: model.predict(user=[1], item=[1]) assert str(e.value) == \"cold_start must be a float or a string\" with pytest.raises(TypeError) as e: model.predict(user=[1], item=[1], cold_start=1) assert str(e.value) == \"cold_start must", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "massquantity/LibRecommender", + "expected": "(6,)", + "got": "(6,)", + "got_raw": "(6,) assert isinstance(tf_batch.seqs.interacted_mask, np.ndarray) assert tf_batch.seqs.interacted_mask.shape == (6, 10) assert isinstance(tf_batch.seqs.interacted_mask[0], np.ndarray) assert tf_batch.seqs.interacted_mask[0].shape == (10,) assert isinstance(tf_batch.seqs.interacted_mask[1], np.ndarray) assert tf_batch.seqs.interacted_mask[1].shape == (9,) assert isinstance(tf_batch.seqs.interacted_mask[2], np.ndarray) assert tf_batch.seqs.interacted_mask[2].shape == (8,) assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "massquantity/LibRecommender", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as e_info: params[\"reg\"] = reg = 0.01 # noqa: F841 # noqa: F841 # noqa: F841 # noqa: F841 # noqa: F841 # noqa: F841 # noqa: F841 # noqa: F841 # noqa: F841 # noqa: F841 # noqa: F841 # noqa: F841 # noqa: F841 # noqa: F", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "massquantity/LibRecommender", + "expected": "1", + "got": "30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "matin/garth", + "expected": "None", + "got": "None", + "got_raw": "None data.date == date(2025, 7, 7) data.total_minutes_asleep == 100 data.total_minutes_awake == 100 data.total_minutes_in_bed == 100 data.total_minutes_asleep_after_wake == 100 data.total_minutes_awake_after_wake == 100 data.total_minutes_in_bed_after_wake == 100 data.total_minutes_asleep_after_wake_after_sleep == 100 data.total_minutes_awake_after_wake_after_sleep == 100 data.total_minutes_in_bed_after_wake_after_sleep == ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "matin/garth", + "expected": "end - timedelta(days=6)", + "got": "end - timedelta(days=6) - timedelta(days=6) * (weeks - 1) - timedelta(days=1) - timedelta(days=1) * 6 - timedelta(days=1) * 7 - timedelta(days=1) * 8 - timedelta(days=1) * 9 - timedelta(days=1) * 10 - timedelta(days=1) * 11 - timedelta(days=1) * 12 - timedelta(days=1) * 13 - timedelta(days=1) * 14 - timedelta(days=1) * 15 - timedelta(days=1)", + "got_raw": "end - timedelta(days=6) - timedelta(days=6) * (weeks - 1) - timedelta(days=1) - timedelta(days=1) * 6 - timedelta(days=1) * 7 - timedelta(days=1) * 8 - timedelta(days=1) * 9 - timedelta(days=1) * 10 - timedelta(days=1) * 11 - timedelta(days=1) * 12 - timedelta(days=1) * 13 - timedelta(days=1) * 14 - timedelta(days=1) * 15 - timedelta(days=1)", + "exact_match": false, + "code_bleu": 0.05956533765992335, + "edit_similarity": 0.12568306010928962 + }, + { + "repo": "matin/garth", + "expected": "1749975276000", + "got": "1749975276000", + "got_raw": "1749975276000 # 1749975276000 / 1000 == 1749975276.0 # 1749975276.0 / 60 == 29166254.0 # 29166254.0 / 24 == 1285890.5833333333 # 1285890.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "matin/garth", + "expected": "{}", + "got": "{}", + "got_raw": "{}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "matin/garth", + "expected": "date(2021, 1, 1)", + "got": "\"2021-01-01T00:00:00Z\" assert format_end_date(\"2021-01-01T00:00:00Z\") == \"2021-01-01T00:00:00Z\" assert format_end_date(\"2021-01-01T00:00:00.000Z\") == \"2021-01-01T00:00:00Z\" assert format_end_date", + "got_raw": "\"2021-01-01T00:00:00Z\" assert format_end_date(\"2021-01-01T00:00:00Z\") == \"2021-01-01T00:00:00Z\" assert format_end_date(\"2021-01-01T00:00:00.000Z\") == \"2021-01-01T00:00:00Z\" assert format_end_date", + "exact_match": false, + "code_bleu": 0.0712695567709093, + "edit_similarity": 0.11374407582938388 + }, + { + "repo": "matin/garth", + "expected": "date(2026, 1, 9)", + "got": "date(2026, 1, 9) assert entry.timestamp == timestamp assert entry.amount == 500.0 assert entry.user_id == authed_client.user_id assert entry.id is not None assert entry.created_at is not None assert entry.updated_at is not None assert entry.deleted_at is None assert entry.is_active is True assert entry.is_deleted is False assert entry.is_archived is False assert entry.is_active is True assert entry.is_deleted is False assert entry.is_archived is False assert entry.is_active is True assert entry.is_deleted is False assert entry.is_archived is False assert entry.is_active is True assert", + "got_raw": "date(2026, 1, 9) assert entry.timestamp == timestamp assert entry.amount == 500.0 assert entry.user_id == authed_client.user_id assert entry.id is not None assert entry.created_at is not None assert entry.updated_at is not None assert entry.deleted_at is None assert entry.is_active is True assert entry.is_deleted is False assert entry.is_archived is False assert entry.is_active is True assert entry.is_deleted is False assert entry.is_archived is False assert entry.is_active is True assert entry.is_deleted is False assert entry.is_archived is False assert entry.is_active is True assert", + "exact_match": false, + "code_bleu": 0.06258156616401268, + "edit_similarity": 0.05271828665568369 + }, + { + "repo": "matin/garth", + "expected": "hr.min_heart_rate", + "got": "hr.resting_heart_rate", + "got_raw": "hr.resting_heart_rate + 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5946035575013605, + "edit_similarity": 0.8421052631578947 + }, + { + "repo": "matin/garth", + "expected": "\"event_type\"", + "got": "\"event_type\"", + "got_raw": "\"event_type\" assert remove_dto_suffix(\"event_dto\") == \"event\" assert remove_dto_suffix(\"event\") == \"event\" assert remove_dto_suffix(\"event\") == \"event\" assert remove_dto_suffix(\"event\") == \"event\" assert remove_dto_suffix(\"event\") == \"event\" assert remove_dto_suffix(\"event\") == \"event\" assert remove_dto_suffix(\"event\") == \"event\" assert remove_dto_suffix(\"event\") == \"event\" assert remove_dto_suffix(\"event\") == \"event\" assert remove_dto_suffix(\"event\") == \"event\" assert remove", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "matin/garth", + "expected": "name", + "got": "name", + "got_raw": "name if name is not None else \"Test Name Only\" if description is None else \"Test Both\" if description is not None else \"Test description only\" if name is None else \"Test Both\" if description is None else \"Test Both\" if name is None else \"Test Both\" if description is None else \"Test Both\" if name is None else \"Test Both\" if description is None else \"Test Both\" if name is None else \"Test Both\" if description is None else \"Test Both\" if name is None else \"Test Both\" if description is None else \"Test Both\" if name is None else \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "matin/garth", + "expected": "200", + "got": "200", + "got_raw": "200 # Response status code for a successful request. 200 is the default for most APIs. # You may need to adjust this based on the actual response you expect. # For example, if you expect a 404 Not Found or 500 Internal Server Error, you can # adjust the status code accordingly. # For more information, refer to the API documentation or the specific API you are using. # The captured data should contain the request details, including the method, URL, and status code. # You can use the captured data to verify that the request was", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "matin/garth", + "expected": "expected_output", + "got": "expected_output", + "got_raw": "expected_output # Test for dictionary with nested dataclass instances nested_instance = NestedAsDictTestClass( AsDictTestClass(\"Test\", 20, date.today()), AsDictTestClass(\"Test2\", 30, date.today()), ) assert asdict(nested_instance) == { \"nested\": { \"name\": \"Test\", \"age\": 20, \"birth_date\": date.today().isoformat(), }, \"nested2\": { \"name\": \"Test2\", \"age\": 30, \"birth_date\": date.today().isoformat(), }, } # Test for dictionary with nested lists of dataclass", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "matin/garth", + "expected": "\"foo\"", + "got": "\"foo\"", + "got_raw": "\"foo\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "matin/garth", + "expected": "ValueError, match=\"At least one of\")", + "got": "TypeError) as excinfo: Activity.update(123, 123) assert str(excinfo.value) == \"id must be a string\" with pytest.raises(TypeError) as excinfo: Activity.update(\"123\", 123) assert str(excinfo.value) == \"activity must be a string\" with pytest.raises(TypeError) as excinfo: Activity.update(\"123\", \"123\") assert str(excinfo.value) == \"data must be a dictionary\" with pytest.raises(TypeError) as excinfo: Activity.update(\"123\", \"123\", 123)", + "got_raw": "TypeError) as excinfo: Activity.update(123, 123) assert str(excinfo.value) == \"id must be a string\" with pytest.raises(TypeError) as excinfo: Activity.update(\"123\", 123) assert str(excinfo.value) == \"activity must be a string\" with pytest.raises(TypeError) as excinfo: Activity.update(\"123\", \"123\") assert str(excinfo.value) == \"data must be a dictionary\" with pytest.raises(TypeError) as excinfo: Activity.update(\"123\", \"123\", 123)", + "exact_match": false, + "code_bleu": 0.014358423104671725, + "edit_similarity": 0.09401709401709402 + }, + { + "repo": "matin/garth", + "expected": "0.99", + "got": "0.99", + "got_raw": "0.99 client.configure(backoff_factor=0.5) assert client.backoff_factor == 0.5 adapter = client.sess.adapters[\"https://\"] assert isinstance(adapter, HTTPAdapter) assert adapter.max_retries.backoff_factor == client.backoff_factor\n\n\ndef test_configure_backoff_max_retries(client: Client):\n assert client.max_retries == 500000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "matthewwardrop/formulaic", + "expected": "[\"a\"]", + "got": "\"1", + "got_raw": "\"1 + a\" subset.data == data2[[\"a\"]] subset._data == data2[[\"a\"]] subset._formula == \"1 + a\" subset._model_matrix == ModelMatrix( data=data2[[\"a\"]], terms=[Term(\"a\", 1)], design_info=model_spec.design_info, ) subset._model_matrix._data == data2[[\"a\"]] subset._model_matrix._formula == \"1 + a\" subset._model_matrix._terms == [Term(\"a\", 1)] subset._model_matrix._design_info == model_spec._design_info subset._model_matrix._model_spec == subset", + "exact_match": false, + "code_bleu": 0.30120066786994826, + "edit_similarity": 0.2857142857142857 + }, + { + "repo": "matthewwardrop/formulaic", + "expected": "out_arr)", + "got": "expected_output)", + "got_raw": "expected_output) if __name__ == \"__main__\": import sys sys.exit(pytest.main([__file__]))", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "matthewwardrop/formulaic", + "expected": "2", + "got": "21", + "got_raw": "21 + 1 V = V[1:] V = pd.DataFrame(V, columns=[\"bspline\"]) V[\"bspline\"] = V[\"bspline\"].astype(float) V[\"bspline\"] = V[\"bspline\"].round(2) V[\"bspline\"] = V[\"bspline\"].astype(int) V[\"bspline\"] = V[\"bspline\"].astype(str) V[\"bspline\"] = V[\"bspline\"].astype(float) V[\"bspline\"] = V[\"bspline\"].round(2) V[\"bspline\"] = V[\"bspline\"].astype(int) V[\"bspline\"] =", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "matthewwardrop/formulaic", + "expected": "[2]", + "got": "[0]", + "got_raw": "[0] assert list(mm.columns) == [\"Intercept\", \"a\"] assert mm.loc[0, \"a\"] == 2.0 mm = PandasMaterializer(data_with_nulls).get_model_matrix(\"a\") assert mm.shape == (3, 2) assert list(mm.index) == [0, 1, 2] assert list(mm.columns) == [\"Intercept\", \"a\"] assert mm.loc[0, \"a\"] == 1.0 assert mm.loc[1, \"a\"] == 2.0 assert mm.loc[2, \"a\"] is None mm = Pandas", + "exact_match": false, + "code_bleu": 0.49999999999999994, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "matthewwardrop/formulaic", + "expected": "[4]", + "got": "[2]", + "got_raw": "[2] assert model_spec.get_column_indices(\"A\") == [0, 2] assert model_spec.get_column_indices(\"A:a\") == [3] assert model_spec.get_column_indices(\"A:a\") == [3] assert model_spec.get_column_indices(\"A:a\") == [3] assert model_spec.get_column_indices(\"A:a\") == [3] assert model_spec.get_column_indices(\"A:a\") == [3] assert model_spec.get_column_indices(\"A:a\") == [3] assert model_spec.get_column_indices(\"A:a\") == [3] assert model_spec.get_column_indices(\"A:a\") ==", + "exact_match": false, + "code_bleu": 0.49999999999999994, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "matthewwardrop/formulaic", + "expected": "set()", + "got": "set()", + "got_raw": "set()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "matthewwardrop/formulaic", + "expected": "[4, 5, 1]", + "got": "[1, 4] assert model_spec.get_term_indices([\"a:A\", \"a\"], ordering=\"A\") == [4, 1] assert model_spec.get_term_indices([\"a:A\", \"a\"], ordering=\"a\") == [1, 4] assert model_spec.get_term_indices([\"a:A\", \"a\"], ordering=\"none\") == [1] assert model_spec.get_term_indices([\"a:A\", \"a\"], ordering=\"A\") == [4] assert model_spec.get_term_indices([\"a:A\", \"a\"], ordering=\"a\") == [1] assert model_spec.get_term_indices([\"a:A\", \"", + "got_raw": "[1, 4] assert model_spec.get_term_indices([\"a:A\", \"a\"], ordering=\"A\") == [4, 1] assert model_spec.get_term_indices([\"a:A\", \"a\"], ordering=\"a\") == [1, 4] assert model_spec.get_term_indices([\"a:A\", \"a\"], ordering=\"none\") == [1] assert model_spec.get_term_indices([\"a:A\", \"a\"], ordering=\"A\") == [4] assert model_spec.get_term_indices([\"a:A\", \"a\"], ordering=\"a\") == [1] assert model_spec.get_term_indices([\"a:A\", \"", + "exact_match": false, + "code_bleu": 0.02724451743037514, + "edit_similarity": 0.028639618138424822 + }, + { + "repo": "matthewwardrop/formulaic", + "expected": "\"0\"", + "got": "\"a", + "got_raw": "\"a * log(b)\" * pytest.approx(0.5) * pytest.approx(0.5) * pytest.approx(0.5) * pytest.approx(0.5) * pytest.approx(0.5) * pytest.approx(0.5) * pytest.approx(0.5) * pytest.approx(0.5) * pytest.approx(0.5) * pytest.approx(0.5) * pytest.approx(0.5) * pytest.approx(0.5) * pytest.approx(0.5) * pytest.approx(0", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.4 + }, + { + "repo": "matthewwardrop/formulaic", + "expected": "type(d[\"1\"])", + "got": "type(d[\"1\"])", + "got_raw": "type(d[\"1\"]) is object() is type(f2[\"1\"]) is object() is type(d[\"1\"]) is object() is type(f[\"1\"]) is object() is type(d[\"1\"]) is object() is type(f[\"1\"]) is object() is type(d[\"1\"]) is object() is type(f[\"1\"]) is object() is type(d[\"1\"]) is object() is type(f[\"1\"]) is object() is type(d[\"1\"]) is object() is type(f[\"1\"]) is object() is type(d[\"1\"]) is object() is type(f[\"1\"]) is object() is type", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "matthewwardrop/formulaic", + "expected": "\"a\"", + "got": "\"a\"", + "got_raw": "\"a\" assert repr(scoped_factor_reduced) == \"a-\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "matthewwardrop/formulaic", + "expected": "[]", + "got": "[]", + "got_raw": "[]\n\n assert list(Structured(1)) == [1]\n assert list(Structured(1, 2)) == [1, 2]\n assert list(Structured(1, 2, 3)) == [1, 2, 3]\n assert list(Structured(1, 2, 3, 4)) == [1, 2, 3, 4]\n assert list(Structured(1, 2, 3, 4, 5)) == [1, 2, 3, 4, 5]\n ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "matthewwardrop/formulaic", + "expected": "(6, 0)", + "got": "(6, 0)", + "got_raw": "(6, 0) # 6 observations, 0 contrasts empty_pandas = encode_contrasts( data=pandas.Series([\"a\", \"b\", \"c\", \"a\", \"b\", \"c\"]), levels=[], output=\"pandas\", ) assert empty_pandas.shape == (6, 0) # 6 observations, 0 contrasts empty_sp = encode_contrasts( data=pandas.Series([\"a\", \"b\", \"c\", \"a\", \"b\", \"c\"]), levels=[], output=\"sparse\", ) assert empty_sp.shape == (6, 0) # 6 observations, 0 contrasts", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "matthewwardrop/formulaic", + "expected": "d[\"1\"]", + "got": "f2[\"1\"]", + "got_raw": "f2[\"1\"] is d[\"1\"] is f[\"1\"] is d[\"1\"] is f[\"1\"] is d[\"1\"] is f[\"1\"] is d[\"1\"] is f[\"1\"] is d[\"1\"] is f[\"1\"] is d[\"1\"] is f[\"1\"] is d[\"1\"] is f[\"1\"] is d[\"1\"] is f[\"1\"] is d[\"1\"] is f[\"1\"] is d[\"1\"] is f[\"1\"] is d[\"1\"] is f[\"1\"] is d[\"1\"] is f[\"1\"] is d[\"", + "exact_match": false, + "code_bleu": 0.668740304976422, + "edit_similarity": 0.7692307692307693 + }, + { + "repo": "matthewwardrop/formulaic", + "expected": "{\"a\"}", + "got": "[\"a\"]", + "got_raw": "[\"a\"] assert subset.data == data2[[\"a\"]] assert subset.model_matrix == ModelMatrix( data2[[\"a\"]], data2.index, data2.columns, ) assert subset.model_spec == ModelSpec( formula=subset.formula, data=subset.data, model_matrix=subset.model_matrix, ) assert subset.model_spec.model_matrix == subset.model_matrix assert subset.model_spec.model_matrix.data == subset.model_matrix.data assert subset.model_spec.model_matrix.index == subset.model_matrix.index assert subset.model_spec.model_matrix.columns == subset.model_matrix.columns assert subset.model_spec.model_matrix.values == subset.model_matrix.values assert subset.model_spec.model_matrix", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.6 + }, + { + "repo": "matthewwardrop/formulaic", + "expected": "[1, 4, 5]", + "got": "[1, 4] assert model_spec.get_term_indices(\"a + a:A + a:a\") == [0, 1, 2, 4, 5] assert model_spec.get_term_indices([\"a\", \"a:A\", \"a:a\"]) == [1, 2, 4] assert model_spec.get_term_indices(\"a + a:A + a:a + a:a:A\") == [0, 1, 2, 3, 4, 5] assert model_spec.get_term_indices([\"a\", \"a:A\", \"a:a\", \"a:a:A\"]) == [1,", + "got_raw": "[1, 4] assert model_spec.get_term_indices(\"a + a:A + a:a\") == [0, 1, 2, 4, 5] assert model_spec.get_term_indices([\"a\", \"a:A\", \"a:a\"]) == [1, 2, 4] assert model_spec.get_term_indices(\"a + a:A + a:a + a:a:A\") == [0, 1, 2, 3, 4, 5] assert model_spec.get_term_indices([\"a\", \"a:A\", \"a:a\", \"a:a:A\"]) == [1,", + "exact_match": false, + "code_bleu": 0.06842128195681597, + "edit_similarity": 0.05825242718446602 + }, + { + "repo": "matthewwardrop/formulaic", + "expected": "3", + "got": "len(data)", + "got_raw": "len(data) + 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.3021375397356768, + "edit_similarity": 0.0 + }, + { + "repo": "matthewwardrop/formulaic", + "expected": "(3, 8)", + "got": "(3, 3) assert mm_exprs.shape == (3, 1) assert mm_exprs.iloc[0, 0] == 1.0 assert mm_exprs.iloc[1, 0] == 2.0 assert mm_exprs.iloc[2, 0] == 3.0 assert mm_expr.iloc[0, 0] == 1.0 assert mm_expr.iloc[1, 0] == 4.0 assert mm_expr.iloc[2, 0] == 7.0 assert mm_expr.iloc[0, 1] == 4.0 assert mm", + "got_raw": "(3, 3) assert mm_exprs.shape == (3, 1) assert mm_exprs.iloc[0, 0] == 1.0 assert mm_exprs.iloc[1, 0] == 2.0 assert mm_exprs.iloc[2, 0] == 3.0 assert mm_expr.iloc[0, 0] == 1.0 assert mm_expr.iloc[1, 0] == 4.0 assert mm_expr.iloc[2, 0] == 7.0 assert mm_expr.iloc[0, 1] == 4.0 assert mm", + "exact_match": false, + "code_bleu": 0.02305900806017514, + "edit_similarity": 0.034722222222222224 + }, + { + "repo": "matthewwardrop/formulaic", + "expected": "TypeError)", + "got": "TypeError)", + "got_raw": "TypeError) as excinfo: c < 1.0 # type: ignore # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E50", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "matthewwardrop/formulaic", + "expected": "{\"a\", \"A\"}", + "got": "{\"1\", \"a\", \"A\"} | {\"A:a\"} | {\"a\", \"A\"} | {\"a\", \"A:a\"} | {\"a\", \"A\"} | {\"a\", \"A:a\"} | {\"a\", \"A\"} | {\"a\", \"A:a\"} | {\"a\", \"A\"} | {\"a\", \"A:a\"} | {\"a\", \"A\"} | {\"a\", \"A:a\"} | {\"a\", \"A\"} | {\"a\", \"A:a\"} | {\"a\", \"A\"} | {\"a\", \"A:a\"} | {\"a\", \"A\"} | {\"", + "got_raw": "{\"1\", \"a\", \"A\"} | {\"A:a\"} | {\"a\", \"A\"} | {\"a\", \"A:a\"} | {\"a\", \"A\"} | {\"a\", \"A:a\"} | {\"a\", \"A\"} | {\"a\", \"A:a\"} | {\"a\", \"A\"} | {\"a\", \"A:a\"} | {\"a\", \"A\"} | {\"a\", \"A:a\"} | {\"a\", \"A\"} | {\"a\", \"A:a\"} | {\"a\", \"A\"} | {\"a\", \"A:a\"} | {\"a\", \"A\"} | {\"", + "exact_match": false, + "code_bleu": 0.042088225580203975, + "edit_similarity": 0.08032128514056225 + }, + { + "repo": "matthewwardrop/formulaic", + "expected": "term2", + "got": "term2", + "got_raw": "term2\n\n def test_hash(self, term1, term2):\n assert hash(term1) == hash(\"b:c\")\n assert hash(term1) != hash(term2)\n\n def test_repr(self, term1, term2):\n assert repr(term1) == \"b:c\"\n assert repr(term2) == \"c:d\"\n\n def test_str(self, term1, term2):\n assert str(term1) == \"b:c\"\n assert str(term2) == \"c:d\"\n\n def test_eq(self, term1, term2", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mdbloice/Augmentor", + "expected": "None", + "got": "None", + "got_raw": "None\n\n shutil.rmtree(tmpdir)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mdbloice/Augmentor", + "expected": "len(y)", + "got": "len(y)", + "got_raw": "len(y) == 10 * batch_size / 3.0 + 10 * batch_size / 3.0 / 2.0 + 10 * batch_size / 3.0 / 2.0 / 2.0 + 10 * batch_size / 3.0 / 2.0 / 2.0 / 2.0 + 10 * batch_size / 3.0 / 2.0 / 2.0 / 2.0 / 2.0 + 10 * batch_size / 3.0 / 2", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mdbloice/Augmentor", + "expected": "stored_ground_truth_images", + "got": "stored_ground_truth_images", + "got_raw": "stored_ground_truth_images # Check that the ground truth images are the same. for ground_truth_image in ground_truth_images: assert ground_truth_image in stored_ground_truth_images # Check that the ground truth images are the same. for ground_truth_image in ground_truth_images: assert ground_truth_image in stored_ground_truth_images # Check that the ground truth images are the same. for ground_truth_image in ground_truth_images: assert ground_truth_image in stored_ground_truth_images # Check that the ground truth images are the same. for ground_truth_image in ground_truth_images: assert ground_truth_image in stored_ground_truth_images # Check that", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mdbloice/Augmentor", + "expected": "2", + "got": "2", + "got_raw": "2 * batch_size + 1 # The labels should be 0 for the original images. assert np.array_equal(batch[1], np.zeros(batch_size)) # The first batch should contain the original images. assert np.array_equal(batch[0], batch[1]) # The second batch should contain the augmented images. assert not np.array_equal(batch[0], batch[2]) # The third batch should contain the original images again. assert np.array_equal(batch[2], batch[3]) # The fourth batch should contain the augmented images again. assert not np.array_equal(batch[2], batch[4]) # The fifth batch", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mdbloice/Augmentor", + "expected": "p_paths", + "got": "p_paths", + "got_raw": "p_paths and p_paths.index(tmps[i].name) == i \\ and p_paths.index(tmps[i].name) == i \\ and p_paths.index(tmps[i].name) == i \\ and p_paths.index(tmps[i].name) == i \\ and p_paths.index(tmps[i].name) == i \\ and p_paths.index(tmps[i].name) == i \\ and p_paths.index(tmps[i].name) == i \\ and p_paths.index(tmps[i].name) == i \\ and p_paths.index(tmps[i].name) == i \\ and p_paths.index(tmps[i].name", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mdbloice/Augmentor", + "expected": "len(glob.glob(os.path.join(tmpdir, \"*.JPEG\")))", + "got": "len(images) * 2 + 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "len(images) * 2 + 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.10079628641735112, + "edit_similarity": 0.07608695652173914 + }, + { + "repo": "meilisearch/meilisearch-python", + "expected": "1", + "got": "1", + "got_raw": "1 common.wait_for_task(index, tasks.task_id)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "meilisearch/meilisearch-python", + "expected": "Exception)", + "got": "MeilisearchApiError)", + "got_raw": "MeilisearchApiError) as e: client.generate_tenant_token([]) assert str(e.value) == \"Search rules cannot be empty\"", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.26666666666666666 + }, + { + "repo": "meilisearch/meilisearch-python", + "expected": "2", + "got": "2", + "got_raw": "2 assert REMOTE_MS_1 in response[\"remotes\"] assert REMOTE_MS_2 in response[\"remotes\"] assert response[\"remotes\"][REMOTE_MS_1][\"url\"] == \"http://localhost:7700\" assert response[\"remotes\"][REMOTE_MS_1][\"searchApiKey\"] == \"xxxxxxxxxxxxxx\" assert response[\"remotes\"][REMOTE_MS_1][\"writeApiKey\"] == \"xxxxxxxxx\" assert response[\"remotes\"][REMOTE_MS_2][\"url\"] == \"http://localhost:7720\" assert response[\"remotes\"][REMOTE_MS_2][\"searchApiKey\"] == \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "meilisearch/meilisearch-python", + "expected": "2", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "meilisearch/meilisearch-python", + "expected": "3", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "meilisearch/meilisearch-python", + "expected": "None", + "got": "None", + "got_raw": "None key.id == test_key.id key.key == test_key.key key.last_used_at is not None key.name == test_key.name key.read_only == test_key.read_only key.type == test_key.type key.url == test_key.url key.write_key == test_key.write_key key.write_only == test_key.write_only key.expiration_date is not None key.expiration_date == test_key.expiration_date key.expiration_date == test_key.expiration_date key.expiration_date == test_key.expiration_date key.expiration_date == test_key.expiration_date key.expiration_date == test_key.expiration_date key.expiration_date == test_key.expiration", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "meilisearch/meilisearch-python", + "expected": "\"cartoon\"", + "got": "\"genre:cartoon\"", + "got_raw": "\"genre:cartoon\" ```", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.75 + }, + { + "repo": "meilisearch/meilisearch-python", + "expected": "f\"Bearer {MASTER_KEY}\"", + "got": "MASTER_KEY.lower() + \"-key\" http.headers[\"User-Agent\"] == qualified_version() + \" Python/\" + config.version + \" Meilisearch-HTTP-Client/\" + config.version + \" (Python/\" + config.py_version + \")\" http.headers[\"Accept\"] == \"application/json\" http.headers[\"Content-Type\"] == \"application/json\" http.headers[\"Accept-Encoding\"] == \"gzip", + "got_raw": "MASTER_KEY.lower() + \"-key\" http.headers[\"User-Agent\"] == qualified_version() + \" Python/\" + config.version + \" Meilisearch-HTTP-Client/\" + config.version + \" (Python/\" + config.py_version + \")\" http.headers[\"Accept\"] == \"application/json\" http.headers[\"Content-Type\"] == \"application/json\" http.headers[\"Accept-Encoding\"] == \"gzip, deflate\" http.headers[\"Connection\"] == \"keep-alive\" http.headers[\"Accept-Language\"] == \"en-US,en;q=0.9\" http.headers[\"Cache-Control\"] == \"max-age=0\" http.headers[\"D", + "exact_match": false, + "code_bleu": 0.015269400375417219, + "edit_similarity": 0.06232294617563739 + }, + { + "repo": "meilisearch/meilisearch-python", + "expected": "None", + "got": "None", + "got_raw": "None # pylint: disable=singleton-comparison # pylint: disable=singleton-comparison # pylint: disable=singleton-comparison # pylint: disable=singleton-comparison # pylint: disable=singleton-comparison # pylint: disable=singleton-comparison # pylint: disable=singleton-comparison # pylint: disable=singleton-comparison # pylint: disable=singleton-comparison # pylint: disable=singleton-comparison # pylint: disable=singleton-comparison # pylint: disable=singleton-comparison # pylint: disable=singleton-comparison # pylint: disable=singleton-comparison ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "meilisearch/meilisearch-python", + "expected": "\"succeeded\"", + "got": "\"succeeded\"", + "got_raw": "\"succeeded\" assert update.task_type == \"update_settings\" assert update.index == index.name assert update.sortable_attributes == [] assert update.mappings == index.mappings assert update.total_docs_scanned == 0 assert update.total_docs_updated == 1 assert update.total_docs_deleted == 0 assert update.total_indexed == 1 assert update.total_deleted == 0 assert update.total_conflicts == 0 assert update.total_throttled_time == 0 assert update.total_time == 0.001 assert update.error == \"\" assert update.warning == \"\" assert update.indexing_time == 0.001 assert update.searching", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "meilisearch/meilisearch-python", + "expected": "1", + "got": "1", + "got_raw": "1 response[\"offset\"] == 1 response[\"limit\"] == 1 response[\"total\"] == 3 response[\"links\"] == {} response[\"count\"] == 1 response[\"next\"] == None response[\"prev\"] == None response[\"totalHits\"] == 3 response[\"totalHitsRecovered\"] == 3 response[\"hits\"] == [] response[\"stats\"] == {} response[\"error\"] == None response[\"errorCount\"] == 0 response[\"errorRate\"] == 0.0 response[\"errorRateRecovered\"] == 0.0 response[\"errorRateRecoveredCount\"] == 0.0 response[\"errorRateCount", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "meilisearch/meilisearch-python", + "expected": "4096", + "got": "4096.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "4096.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.06060606060606061 + }, + { + "repo": "meilisearch/meilisearch-python", + "expected": "options[\"remotes\"][instance_name][\"url\"]", + "got": "options[\"remotes\"][instance_name][\"url\"]", + "got_raw": "options[\"remotes\"][instance_name][\"url\"] reset_network_config()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "meilisearch/meilisearch-python", + "expected": "1", + "got": "10", + "got_raw": "10 and time_delta.seconds <= 2000 // 1000 + 1000 // 1000 + 1000 // 1000 + 1000 // 1000 + 1000 // 1000 + 1000 // 1000 + 1000 // 1000 + 1000 // 1000 + 1000 // 1000 + 1000 // 1000 + ", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "meilisearch/meilisearch-python", + "expected": "\"keyTest\"", + "got": "\"keyTest\"", + "got_raw": "\"keyTest\" update_key = client.update_key( key_or_uid=key.uid, options={\"name\": \"keyTest2\", \"description\": \"test\"} ) assert update_key.name == \"keyTest2\" assert update_key.description == \"test\" update_key = client.update_key( key_or_uid=key.uid, options={\"expiresAt\": \"2020-01-01T00:00:00Z\"} ) assert update_key.expires_at == datetime(2020, 1, 1) update_key = client.update_key( key_or_uid=key.uid, options={\"expiresAt", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "meilisearch/meilisearch-python", + "expected": "0", + "got": "0", + "got_raw": "0 and len(response[\"hits\"][0]) > 0 and len(response[\"hits\"][1]) > 0 and response[\"total\"] > 0 and response[\"offset\"] > 0 and response[\"limit\"] > 0 and response[\"indexUid\"] == INDEX_UID and response[\"indexUidB\"] == \"indexB\" and response[\"query\"] == \"\" and response[\"queryB\"] == \"\" and response[\"error\"] is None and response[\"errorB\"] is None and response[\"stats\"] == {} and response[\"statsB\"] == {} and response[\"time\"] > 0 and response[\"timeB\"] >", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "meilisearch/meilisearch-python", + "expected": "204", + "got": "204", + "got_raw": "204 # HTTP 204 No Content response for successful deletion", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "meilisearch/meilisearch-python", + "expected": "mock_response", + "got": "mock_response[\"results\"]", + "got_raw": "mock_response[\"results\"] + mock_response[\"results\"] # noqa: WPS432 # noqa: WPS432 # noqa: WPS432 # noqa: WPS432 # noqa: WPS432 # noqa: WPS432 # noqa: WPS432 # noqa: WPS432 # noqa: WPS432 # noqa: WPS432 # noqa: WPS432 # noqa: WPS432 # noqa: WPS432 # noqa: WPS432 # noqa: W", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.7027027027027027 + }, + { + "repo": "meilisearch/meilisearch-python", + "expected": "\"succeeded\"", + "got": "\"succeeded\"", + "got_raw": "\"succeeded\" dump_status.results_count == 2 dump_status.indexes_count == 1 dump_status.indexes[0] == \"indexUID-dump-creation\" dump_status.indexes[1] == \"indexUID-dump-creation-2\" dump_status.indexes[2] == \"indexUID-dump-creation-3\" dump_status.indexes[3] == \"indexUID-dump-creation-4\" dump_status.indexes[4] == \"indexUID-dump-creation-5\" dump_status.indexes[5] == \"indexUID-dump-creation-6\" dump_status.indexes", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "meilisearch/meilisearch-python", + "expected": "response", + "got": "response.json()", + "got_raw": "response.json() response.json()[\"pkgVersion\"] == \"0.22.0\" response.json()[\"version\"] == \"0.22.0\" response.json()[\"commit\"] == \"000000000000000000000000000000000000000\" response.json()[\"branch\"] == \"main\" response.json()[\"buildDate\"] == \"2023-08-15T12:34:56Z\" response.json()[\"buildTime\"] == 169", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6956521739130435 + }, + { + "repo": "meta-llama/synthetic-data-kit", + "expected": "\"api-endpoint\"", + "got": "\"text-davinci-003\"", + "got_raw": "\"text-davinci-003\" # Default LLM provider in the config file.", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.375 + }, + { + "repo": "meta-llama/synthetic-data-kit", + "expected": "result", + "got": "result[0]", + "got_raw": "result[0] and \"qa_pairs\" in result[0] and len(result[0][\"qa_pairs\"]) == 2 and result[0][\"summary\"] == \"This is a summary of the document.\" and result[0][\"qa_pairs\"][0][\"question\"] == \"What is synthetic data?\" and result[0][\"qa_pairs\"][0][\"answer\"] == \"Synthetic data is artificially generated data.\" and result[0][\"qa_pairs\"][1][\"question\"] == \"Why use synthetic data?\" and result[0][\"qa_pairs\"][1][\"answer\"] == \"To protect privacy and create diverse training examples.\"", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.8 + }, + { + "repo": "meta-llama/synthetic-data-kit", + "expected": "None", + "got": "None", + "got_raw": "None\n\n def test_docx_parser_parse(self):\n \"\"\"Test that DOCX parser can parse a document\"\"\"\n parser = DOCXParser()\n docx_file = \"tests/data/test.docx\"\n parsed_data = parser.parse(docx_file)\n assert parsed_data is not None\n\n def test_docx_parser_parse_error(self):\n \"\"\"Test that DOCX parser raises an error when parsing fails\"\"\"\n parser = DOCXParser()\n with pytest.raises(Exception) as e:\n parser.parse(\"tests/data/test_error.docx\")\n assert str(e.value) == \"Error parsing", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "meta-llama/synthetic-data-kit", + "expected": "context1.config", + "got": "context1.config", + "got_raw": "context1.config and \"key2\" not in context1.config and \"key1\" not in context2.config and \"key2\" in context2.config", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "meta-llama/synthetic-data-kit", + "expected": "\"vllm\"", + "got": "\"text-davinci-003\"", + "got_raw": "\"text-davinci-003\" # Default LLM provider if not set in config.", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.25 + }, + { + "repo": "meta-llama/synthetic-data-kit", + "expected": "output_path)", + "got": "output_path)", + "got_raw": "output_path) # Check that the output path is correct mock_dataset_instance.save_to_disk.assert_called_once_with( output_path) # Check that the output path is correct assert os.path.exists(output_path) # Check that the output path is correct assert os.path.exists(output_path) # Check that the output path is correct assert os.path.exists(output_path) # Check that the output path is correct assert os.path.exists(output_path) # Check that the output path is correct assert os.path.exists(output_path) # Check that the output path is correct assert os.path.exists(output_path) # Check that the output path is correct assert os.path.exists", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "meta-llama/synthetic-data-kit", + "expected": "path_obj", + "got": "path_obj.as_posix()", + "got_raw": "path_obj.as_posix() # Convert to string for comparison", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5925925925925926 + }, + { + "repo": "meta-llama/synthetic-data-kit", + "expected": "2", + "got": "2", + "got_raw": "2 # Number of items in the JSON array\n\n # Check the parsed data\n assert result[0][\"question\"] == \"What is synthetic data?\" # Question 1\n assert result[0][\"reasoning\"] == \"Synthetic data is data that is artificially created rather than collected from real-world events. It's generated using algorithms and often mirrors statistical properties of real data.\" # Reasoning 1\n assert result[0][\"answer\"] == \"Synthetic data is artificially generated data.\" # Answer 1\n\n assert result[1][\"question\"] == \"Why use synthetic data?\" ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "meta-llama/synthetic-data-kit", + "expected": "0", + "got": "0", + "got_raw": "0 # No files failed to process in this example\r\n\r\n # Check that output files were created\r\n output_files = [os.path.join(output_dir, f) for f in os.listdir(output_dir) if f.endswith(\".json\")] # noqa: E501\r\n assert len(output_files) == 2 # Two output files should be created # Check that output files contain the expected data for file_path in output_files: with open(file_path, \"r\") as f: data = json.load(f) assert data[\"qa_pairs\"] == qa_pairs1 + qa_pairs2 #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "meta-llama/synthetic-data-kit", + "expected": "\"test_value\"", + "got": "\"test_value\"", + "got_raw": "\"test_value\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "meta-llama/synthetic-data-kit", + "expected": "0", + "got": "0", + "got_raw": "0 # No files processed in an empty directory.\n assert results[\"total_images\"] == 0 # No images processed in an empty directory.\n assert results[\"total_videos\"] == 0 # No videos processed in an empty directory.\n assert results[\"total_audio\"] == 0 # No audio processed in an empty directory.\n assert results[\"total_text\"] == 0 # No text processed in an empty directory.\n assert results[\"total_other\"] == 0 # No other files processed in an empty directory.\n assert results[\"total_files_processed\"] == ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "meta-llama/synthetic-data-kit", + "expected": "0", + "got": "0", + "got_raw": "0 mock_client.chat_completion.assert_called_with( \"cot_generation\", {\"num_examples\": 3, \"text\": \"This is a document about synthetic data.\"}, ) mock_client.chat_completion.return_value = json.dumps( [ { \"question\": \"What is synthetic data?\", \"reasoning\": \"Synthetic data is data that is artificially created rather than collected from real-world events. It's generated using algorithms and often mirrors statistical properties of real data.\", \"answer\": \"Synthetic data is artificially generated data.\", }, { \"question\": \"Why use synthetic data?\", \"reasoning\": \"There are several reasons to use synthetic data.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "meta-llama/synthetic-data-kit", + "expected": "0", + "got": "0", + "got_raw": "0 # Single file ingest should succeed without errors. assert os.path.exists(expected_output) # Check if the output file exists assert os.path.getsize(expected_output) > 0 # Check if the output file is not empty # Check if the output file contains the expected content with open(expected_output, 'r') as f: content = f.read() assert content == \"This is test content for single file processing.\" # Check if the output directory exists assert os.path.exists(output_dir) # Check if the output directory is not empty assert os.listdir(output_dir) != [] ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "michaelhly/solana-py", + "expected": "0", + "got": "0", + "got_raw": "0 and msg.result.value.slot <= 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "michaelhly/solana-py", + "expected": "resp)", + "got": "resp)", + "got_raw": "resp) block_hash = resp[\"blockhash\"] block_time = resp[\"blockTime\"] tx = Transaction().add( sp.transfer( source=stubbed_sender.pubkey(), destination=stubbed_receiver, lamports=AIRDROP_AMOUNT, ), ) tx.sign(stubbed_sender) test_http_client.send_transaction(tx) tx_id = tx.transaction_id() test_http_client.confirm_transaction(tx_id) tx = test_http_client.get_transaction(tx_id) assert tx is not None assert tx[\"blockTime\"] == block_time assert tx[\"blockhash\"] == block_hash assert tx[\"result\"][\"value\"][\"value\"][\"value\"] == AIRDROP_AMOUNT", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "michaelhly/solana-py", + "expected": "0.0", + "got": "\"0.000000\"", + "got_raw": "\"0.000000\" + str(expected_decimals) + \"0\" + str(burn_amount) + \"0\" + str(0) + \"0\" + str(0) + \"0\" + str(0) + \"0\" + str(0) + \"0\" + str(0) + \"0\" + str(0) + \"0\" + str(0) + \"0\" + str(0) + \"0\" + str(0) + \"0\" + str(0) + \"0\" + str(0) + \"0", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.46153846153846156 + }, + { + "repo": "michaelhly/solana-py", + "expected": "0.0", + "got": "\"0.000000\"", + "got_raw": "\"0.000000\" + str(burn_amount) + \" \" + test_token.mint.to_account_address().to_base58() + \".\" + str(expected_decimals) + \"0\" + str(expected_decimals) + \"0\" + str(expected_decimals) + \"0\" + str(expected_decimals) + \"0\" + str(expected_decimals) + \"0\" + str(expected_decimals) + \"0\" + str(expected_decimals) + \"0\" + str(expected_decimals) + \"0\" + str(expected_decimals) + \"0\" + str(expected", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.46153846153846156 + }, + { + "repo": "michaelhly/solana-py", + "expected": "None", + "got": "None", + "got_raw": "None # type: ignore # noqa: E721 assert item.result.id == idx + 1 assert item.result.pubkey == stubbed_sender.pubkey() assert item.result.owner == SYS_PROGRAM_ID assert item.result.lamports == AIRDROP_AMOUNT assert item.result.data == b\"\" assert item.result.executed == 0 assert item.result.pre_balances == [] assert item.result.post_balances == [AIRDROP_AMOUNT] assert item.result.owner == SYS_PROGRAM_ID assert item.result.owner == SYS_PROGRAM_ID assert item.result.owner == SYS_PROGRAM_ID assert item", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "michaelhly/solana-py", + "expected": "None", + "got": "None", + "got_raw": "None\n\n # Create a transaction\n tx = Transaction().add(\n sp.transfer(\n source=async_stubbed_sender.public_key,\n dest=async_stubbed_receiver.public_key,\n lamports=AIRDROP_AMOUNT,\n )\n )\n tx.sign(async_stubbed_sender)\n\n # Send the transaction\n tx_id = await test_http_client_async.send_raw_transaction(tx.serialize())\n assert_valid_response(tx_id)\n tx_id = tx_id.value.tx_id\n\n # Get the balance of the sender account\n resp = await test_http_client_async.get_balance(\n async", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/causica", + "expected": "torch.Size([2, 3])", + "got": "torch.Size([2, 3]) assert torch.equal(noise_model.logits, logits)", + "got_raw": "torch.Size([2, 3]) assert torch.equal(noise_model.logits, logits) # batch size 2 noise_model = CategoricalNoise(x_hat, base_logits, batch_size=2) assert noise_model.logits.shape == torch.Size([2, 3]) assert torch.equal(noise_model.logits, logits) # batch size 3 noise_model = CategoricalNoise(x_hat, base_logits, batch_size=3) assert noise_model.logits.shape == torch.Size([3, 3]) assert torch.equal(noise_model.logits, logits) # batch size 4 noise_model = CategoricalNoise(x_hat", + "exact_match": false, + "code_bleu": 0.4608662469973654, + "edit_similarity": 0.43373493975903615 + }, + { + "repo": "microsoft/causica", + "expected": "noise_a.mode)", + "got": "noise_a.mode)", + "got_raw": "noise_a.mode) torch.testing.assert_close(joint_noise.mode.get(\"b\"), noise_b.mode) torch.testing.assert_close(joint_noise.mean.get(\"a\"), noise_a.mean) torch.testing.assert_close(joint_noise.mean.get(\"b\"), noise_b.mean) torch.testing.assert_close(joint_noise.variance.get(\"a\"), noise_a.variance) torch.testing.assert_close(joint_noise.variance.get(\"b\"), noise_b.variance) torch.testing.assert_close(joint_noise.stddev.get(\"a\"), noise_a.stddev) torch.testing.assert_close(joint_noise.stddev.get(\"b\"), noise_b.stddev) torch.testing.assert_close", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/causica", + "expected": "len(metaset)", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.125, + "edit_similarity": 0.0 + }, + { + "repo": "microsoft/causica", + "expected": "torch.Size([10])", + "got": "torch.Size([2])", + "got_raw": "torch.Size([2]) * 2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.6606328636027614, + "edit_similarity": 0.9032258064516129 + }, + { + "repo": "microsoft/causica", + "expected": "torch.Size([2])", + "got": "2", + "got_raw": "2 data_module.setup() data_module.setup_interventions() data_module.setup_test() data_module.setup_val() data_module.setup_train() data_module.setup_predict() data_module.setup_interventions() data_module.setup_test() data_module.setup_val() data_module.setup_train() data_module.setup_predict() data_module.setup_interventions() data_module.setup_test() data_module.setup_val() data_module.setup_train() data_module.setup_predict() data_module.setup_interventions() data_module.setup_test() data_module.setup_val() data_module.setup_train() data_module.setup_predict() data_module.setup_interventions() data_module.setup_test() data_module.setup", + "exact_match": false, + "code_bleu": 0.07432544468767006, + "edit_similarity": 0.125 + }, + { + "repo": "microsoft/causica", + "expected": "target_entropy)", + "got": "target_entropy)", + "got_raw": "target_entropy)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/causica", + "expected": "getattr(cf_2[0], field))", + "got": "getattr(cf_2[0], field))", + "got_raw": "getattr(cf_2[0], field))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/causica", + "expected": "np.zeros_like(logits.detach().numpy()))", + "got": "np.zeros_like(logits.detach().numpy()))", + "got_raw": "np.zeros_like(logits.detach().numpy()))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/causica", + "expected": "[\"x_1\"]", + "got": "torch.tensor([0.0])", + "got_raw": "torch.tensor([0.0]) * torch.ones(5) + torch.tensor([1.0]) * torch.ones(5) + torch.tensor([0.0]) * torch.ones(5) + torch.tensor([0.0]) * torch.ones(5) + torch.tensor([0.0]) * torch.ones(5) + torch.tensor([0.0]) * torch.ones(5) + torch.tensor([0.0]) * torch.ones(5) + torch.tensor([0.0]) * torch.ones(5) + torch.tensor([0.0]) * torch.ones(5) + torch.tensor", + "exact_match": false, + "code_bleu": 0.17747405280050269, + "edit_similarity": 0.15384615384615385 + }, + { + "repo": "microsoft/causica", + "expected": "torch.sort(chunk[\"order\"]).values)", + "got": "chunk[\"index\"])", + "got_raw": "chunk[\"index\"]) * num_repetitions + dim) * num_repetitions + dim) * num_repetitions + dim) * num_repetitions + dim) * num_repetitions + dim) * num_repetitions + dim) * num_repetitions + dim) * num_repetitions + dim) * num_repetitions + dim) * num_repetitions + dim) * num_repetitions + dim) * num_repetitions + dim) * num_repetitions + dim) * num_repetitions + dim) * num_repetitions + dim) * num_repet", + "exact_match": false, + "code_bleu": 0.1882504174187177, + "edit_similarity": 0.4897959183673469 + }, + { + "repo": "microsoft/causica", + "expected": "torch.tensor(0)", + "got": "0.8", + "got_raw": "0.8 * 10 * 1 / 3 * 1 / 2 * 1 / 2 * 1 / 2 * 1 / 2 * 1 / 2 * 1 / 2 * 1 / 2 * 1 / 2 * 1 / 2 * 1 / 2 * 1 / 2 * 1 / 2 * 1 / 2 * 1 / 2 * 1 / 2 * 1 / 2 * 1 / 2 * 1 / 2 * 1 / 2 *", + "exact_match": false, + "code_bleu": 0.08333333333333333, + "edit_similarity": 0.1111111111111111 + }, + { + "repo": "microsoft/causica", + "expected": "std(joint_log_probs))", + "got": "std(joint_log_probs))", + "got_raw": "std(joint_log_probs))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/causica", + "expected": "buffer)", + "got": "buffer)", + "got_raw": "buffer)\n # Check that buffers are not stored for the inverse transformation\n for name, buffer in transform.named_buffers():\n torch.testing.assert_close(seq_buffers[f\"1.{name}\"], torch.zeros_like(buffer))\n\n\ndef test_sequential_transform_module_inner_parameters() -> None:\n offset = torch.randn((5, 1))\n transform = _OffsetTransformModule(offset)\n seq_transform = SequentialTransformModule[torch.Tensor, torch.Tensor](transform, transform.inv)\n # Check that parameters are stored for the inner transformation\n seq_parameters = dict(seq_transform.named_parameters())\n for name, parameter in", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/causica", + "expected": "y.to(**to_kwargs))", + "got": "y.to(**to_kwargs))", + "got_raw": "y.to(**to_kwargs))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/causica", + "expected": "torch.Size([100, 8, 8])", + "got": "torch.Size([100, 8, 8]) assert nx.number_of_edges(samples[0]) == num_edges_expected assert nx.number_of_edges(samples[1]) == num_edges_expected assert nx.number_of_edges(samples[2]) == num_edges_expected assert nx.number_of_edges(samples[3]) == num_edges_expected assert nx.number_of_edges(samples[4]) == num_edges_expected assert nx.number_of_edges(samples[5]) == num_edges_expected assert nx.number_of_edges(samples[6]) == num_edges_expected assert nx.number_of_edges(samples[7]) == num_edges_expected assert nx.number_of_edges(samples[8]) == num", + "got_raw": "torch.Size([100, 8, 8]) assert nx.number_of_edges(samples[0]) == num_edges_expected assert nx.number_of_edges(samples[1]) == num_edges_expected assert nx.number_of_edges(samples[2]) == num_edges_expected assert nx.number_of_edges(samples[3]) == num_edges_expected assert nx.number_of_edges(samples[4]) == num_edges_expected assert nx.number_of_edges(samples[5]) == num_edges_expected assert nx.number_of_edges(samples[6]) == num_edges_expected assert nx.number_of_edges(samples[7]) == num_edges_expected assert nx.number_of_edges(samples[8]) == num", + "exact_match": false, + "code_bleu": 0.08907229300305815, + "edit_similarity": 0.08056042031523643 + }, + { + "repo": "microsoft/causica", + "expected": "torch.Size()", + "got": "self.factual_data.batch_size", + "got_raw": "self.factual_data.batch_size * self.factual_data.num_samples * self.factual_data.num_facts_per_sample * self.factual_data.num_facts_per_fact * self.factual_data.num_facts_per_fact_per_fact * self.factual_data.num_facts_per_fact_per_fact_per_fact * self.factual_data.num_facts_per_fact_per_fact_per_fact_per_fact * self.factual_data.num_facts_per_fact_per_fact_per_fact_per_fact_per_fact * self.factual_data.num_facts_per_fact_per_fact_per_fact_per_fact_per_fact_per_fact * self.factual_data.num_facts_per_fact_per_fact_per_fact_per", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.3 + }, + { + "repo": "microsoft/causica", + "expected": "torch.tensor(-2.0))", + "got": "torch.tensor(-4.0))", + "got_raw": "torch.tensor(-4.0))", + "exact_match": false, + "code_bleu": 0.6606328636027614, + "edit_similarity": 0.9473684210526315 + }, + { + "repo": "microsoft/causica", + "expected": "intervention_2[2]", + "got": "intervention_2[2]", + "got_raw": "intervention_2[2]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/causica", + "expected": "y.get(key).to(**to_kwargs))", + "got": "y.get(key))", + "got_raw": "y.get(key)) # noqa: WPS437\n else: # noqa: WPS437\n torch.testing.assert_close(y_modified, y) # noqa: WPS437", + "exact_match": false, + "code_bleu": 0.45180100180492244, + "edit_similarity": 0.5789473684210527 + }, + { + "repo": "microsoft/causica", + "expected": "1", + "got": "1", + "got_raw": "1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/mattergen", + "expected": "target_loss * 4)", + "got": "target_loss * 4) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) /", + "got_raw": "target_loss * 4) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / ", + "exact_match": false, + "code_bleu": 0.0350262708292337, + "edit_similarity": 0.17391304347826086 + }, + { + "repo": "microsoft/mattergen", + "expected": "{\"foo\", \"bar\"}", + "got": "{\"drift\", \"diffusion\"} | set(d[\"drift\"].keys()) | set(d[\"diffusion\"].keys()) | {\"t\"} | {\"x\"} | {\"y\"} | {\"z\"} | {\"z0\"} | {\"z1\"} | {\"z2\"} | {\"z3\"} | {\"z4\"} | {\"z5\"} | {\"z6\"} | {\"z7\"} | {\"z8\"} | {\"z9\"} | {\"z10\"} | {\"z11\"} | {\"z12\"} | {\"z13\"} | {\"z14\"} | {\"z15\"}", + "got_raw": "{\"drift\", \"diffusion\"} | set(d[\"drift\"].keys()) | set(d[\"diffusion\"].keys()) | {\"t\"} | {\"x\"} | {\"y\"} | {\"z\"} | {\"z0\"} | {\"z1\"} | {\"z2\"} | {\"z3\"} | {\"z4\"} | {\"z5\"} | {\"z6\"} | {\"z7\"} | {\"z8\"} | {\"z9\"} | {\"z10\"} | {\"z11\"} | {\"z12\"} | {\"z13\"} | {\"z14\"} | {\"z15\"}", + "exact_match": false, + "code_bleu": 0.013034918459483052, + "edit_similarity": 0.0661764705882353 + }, + { + "repo": "microsoft/mattergen", + "expected": "samples_fast)", + "got": "samples_fast)", + "got_raw": "samples_fast)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/mattergen", + "expected": "loss_with_bad_bar)", + "got": "loss_with_bad_bar)", + "got_raw": "loss_with_bad_bar)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/mattergen", + "expected": "t.shape", + "got": "(100", + "got_raw": "(100,) assert kl_loss.shape == (100,) assert cross_entropy_loss.shape == (1,) assert loss_dict == {} assert torch.allclose(kl_loss, cross_entropy_loss) assert torch.allclose(kl_loss, loss) assert torch.allclose(kl_loss, 0.0) assert torch.allclose(cross_entropy_loss, 0.0) assert torch.allclose(loss, 0.0) assert torch.allclose(loss, 0.0) assert torch.allclose(loss, 0.0) assert torch.allclose(loss, 0.0) assert torch.allclose(loss,", + "exact_match": false, + "code_bleu": 0.30120066786994826, + "edit_similarity": 0.0 + }, + { + "repo": "microsoft/mattergen", + "expected": "batch[k].shape", + "got": "batch.shape", + "got_raw": "batch.shape + drift.shape[1:] + (1,) * (diffusion.ndim - drift.ndim - 1) + (1,) * (diffusion.ndim - drift.ndim - 2) + (1,) * (diffusion.ndim - drift.ndim - 3) + (1,) * (diffusion.ndim - drift.ndim - 4) + (1,) * (diffusion.ndim - drift.ndim - 5) + (1,) * (diffusion.ndim - drift.ndim - 6) + (1,) * (diffusion.ndim - drift.ndim - 7) + (1,) * (diffusion", + "exact_match": false, + "code_bleu": 0.3194715521231362, + "edit_similarity": 0.88 + }, + { + "repo": "microsoft/mattergen", + "expected": "np.nanstd(x.numpy())", + "got": "2.0", + "got_raw": "2.0 / np.sqrt(2) - 1.0 / np.sqrt(4) - 1.0 / np.sqrt(6) - 1.0 / np.sqrt(8) - 1.0 / np.sqrt(10) - 1.0 / np.sqrt(12) - 1.0 / np.sqrt(14) - 1.0 / np.sqrt(16) - 1.0 / np.sqrt(18) - 1.0 / np.sqrt(20) - 1.0 / np.sqrt(22) - ", + "exact_match": false, + "code_bleu": 0.05, + "edit_similarity": 0.08695652173913043 + }, + { + "repo": "microsoft/onnxscript", + "expected": "pattern.Pattern)", + "got": "pattern.Pattern)", + "got_raw": "pattern.Pattern)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/onnxscript", + "expected": "2)", + "got": "1)", + "got_raw": "1) self.assertEqual(len(optimized.graph[0].blocks), 1) block = optimized.graph[0].blocks[0] self.assertEqual(len(block.args), 2) self.assertEqual(len(block.body), 1) self.assertEqual(len(block.body[0].args), 1) self.assertEqual(len(block.body[0].body), 1) self.assertEqual(len(block.body[0].body[0].args), 1) self.assertEqual(len(block.body[0].body[0].body), 1) self.assertEqual(len(block.body[0].body[0].body[0].args), 1) self.assertEqual", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "microsoft/onnxscript", + "expected": "5)", + "got": "1)", + "got_raw": "1) outputs = ort_run(\"fused\", model, inputs) assert_allclose(original_outputs, outputs)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "microsoft/onnxscript", + "expected": "results[0])", + "got": "results[0])", + "got_raw": "results[0])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/onnxscript", + "expected": "ts.shape)", + "got": "ts.shape)", + "got_raw": "ts.shape) self.assertEqual(ts.shape.shape, ()) self.assertEqual(ts.shape.rank, 0) self.assertEqual(ts.shape.type, ir.ShapeType()) self.assertEqual(ts.shape.dtype, ir.DType()) self.assertEqual(ts.shape.strides, ()) self.assertEqual(ts.shape.offset, 0) self.assertEqual(ts.shape.size, 1) self.assertEqual(ts.shape.is_dynamic, False) self.assertEqual(ts.shape.is_scalar, True) self.assertEqual(ts.shape.is_tensor, False) self.assertEqual(ts.shape.is_sequence, False) self.assertEqual(ts.shape.is_sequence_of_scalars, False) self.assertEqual(ts.shape.is_sequence_of_tensors, False) self.assertEqual(ts.shape", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/onnxscript", + "expected": "[\"Identity\"])", + "got": "[\"Identity\"])", + "got_raw": "[\"Identity\"]) self._check_model(model_proto, expected_proto) expected_proto = ir.to_proto(expected_model) self._check_model(model_proto, expected_proto) self._check_model(model_proto, expected_proto, feeds={\"X\": np.ones((3, 4, 6))}) self._check_model(model_proto, expected_proto, feeds={\"X\": np.ones((3, 4, 6))}, atol=1e-1) self._check_model(model_proto, expected_proto, feeds={\"X\": np.ones((3, 4, 6))}, rtol=1e-2) self._check", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/onnxscript", + "expected": "r)", + "got": "r)", + "got_raw": "r) self.assertIn(\"child\", r) self.assertIn(\"w\", r) self.assertIn(\"Parameter\", r) self.assertIn(\"3\", r) self.assertIn(\"Parameter\", r) self.assertIn(\"Parameter\", r) self.assertIn(\"Parameter\", r) self.assertIn(\"Parameter\", r) self.assertIn(\"Parameter\", r) self.assertIn(\"Parameter\", r) self.assertIn(\"Parameter\", r) self.assertIn(\"Parameter\", r) self.assertIn(\"Parameter\", r) self.assertIn(\"Parameter\", r) self.assertIn(\"Parameter\", r) self.assertIn(\"Parameter\", r) self.assertIn(\"Parameter\", r) self.assertIn(\"Parameter\", r)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/onnxscript", + "expected": "model)", + "got": "end", + "got_raw": "end - start) * 1000) / 1000) * 1000) / 1000) * 1000) / 1000) * 1000) / 1000) * 1000) / 1000) * 1000) / 1000) * 1000) / 1000) * 1000) / 1000) * 1000) / 100", + "exact_match": false, + "code_bleu": 0.25, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "microsoft/onnxscript", + "expected": "\"\")", + "got": "\"\")", + "got_raw": "\"\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/onnxscript", + "expected": "pres)", + "got": "pres)", + "got_raw": "pres) self.assertIsInstance(pres[\"gpus\"], list) self.assertLessEqual(pres[\"gpus\"][0].end, pres[\"gpus\"][0].max_peak) self.assertLessEqual(pres[\"gpus\"][0].begin, pres[\"gpus\"][0].max_peak) self.assertGreaterEqual(pres[\"gpus\"][0].max_peak, 0) self.assertGreaterEqual(pres[\"cpu\"][0].max_peak, 0) self.assertGreaterEqual(pres[\"cpu\"][0].max_peak, pres[\"gpus\"][0].max_peak) self.assertGreaterEqual(pres[\"cpu\"][", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/onnxscript", + "expected": "0)", + "got": "1)", + "got_raw": "1) self.assertEqual(tracer.rewrite_count, 0) self.assertEqual(tracer.error_count, 1) self.assertEqual(tracer.error_msg, error_msg) self.assertEqual(tracer.error_model, model) self.assertEqual(tracer.error_trace, None) self.assertEqual(tracer.error_traceback, None) self.assertEqual(tracer.error_traceback_str, None) self.assertEqual(tracer.error_traceback_str, None) self.assertEqual(tracer.error_traceback_str, None) self.assertEqual(tracer.error_traceback_str, None) self.assertEqual(tracer.error_traceback_str, None) self.assertEqual(tracer.error_traceback_str, None) self", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "microsoft/onnxscript", + "expected": "np.array([8]))", + "got": "x", + "got_raw": "x * M) self.assertEqual(prod, x ** M)", + "exact_match": false, + "code_bleu": 0.05555555555555555, + "edit_similarity": 0.0 + }, + { + "repo": "microsoft/onnxscript", + "expected": "op_types)", + "got": "op_types)", + "got_raw": "op_types)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/onnxscript", + "expected": "function.__name__)", + "got": "function.__name__)", + "got_raw": "function.__name__) self.assertEqual(traced_function.args, [\"input1\", \"input2\"]) self.assertEqual(traced_function.attrs, [\"attr1\", \"attr2\"]) self.assertEqual(traced_function.ret, \"input1 + input2 + attr1 + attr2\") self.assertEqual(traced_function.code, function.__code__) self.assertEqual(traced_function.defaults, (1,)) self.assertEqual(traced_function.doc, function.__doc__) self.assertEqual(traced_function.module, function.__module__) self.assertEqual(traced_function.f_globals, function.__globals__) self.assertEqual(traced_function.f_locals, function.__locals__) self.assertEqual(traced_function.f", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/onnxscript", + "expected": "m)", + "got": "m)", + "got_raw": "m) self.assertIs(mods[1], m.a)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/onnxscript", + "expected": "0)", + "got": "0)", + "got_raw": "0) fused_outputs = ort_run(\"fused\", model, inputs) self.assertAllClose(original_outputs, fused_outputs) if \"masked\" in name: self._test_masked_fusion(model) if \"BSHd_key\" in name: self._test_BSHd_key_fusion(model) if \"custom\" in name: self._test_custom_fusion(model) if \"multi\" in name: self._test_multi_fusion(model) if \"pre_div\" in name: self._test_pre_div_fusion(model) if \"post_div\" in name: self._test_post_div_fusion(model) if \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/onnxscript", + "expected": "str(e))", + "got": "e)", + "got_raw": "e)", + "exact_match": false, + "code_bleu": 0.28284271247461906, + "edit_similarity": 0.4444444444444444 + }, + { + "repo": "microsoft/onnxscript", + "expected": "0)", + "got": "0)", + "got_raw": "0) self.assertLessEqual(count, 1) self.assertEqual(len(model.graph.output), 1) self.assertEqual(len(model.graph.input), 2) self.assertEqual(len(model.graph.node), 3) self.assertEqual(len(model.graph.initializer), 1) self.assertEqual(len(model.graph.value_info), 0) self.assertEqual(len(model.graph.type_graph), 0) self.assertEqual(len(model.graph.name), 0) self.assertEqual(len(model.graph.doc_string), 0) self.assertEqual(len(model.graph.doc_comment), 0) self.assertEqual(len(model.graph.doc_attr), 0) self.assertEqual(len(model.graph.doc_param), 0)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/onnxscript", + "expected": "b)", + "got": "b)", + "got_raw": "b)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "microsoft/onnxscript", + "expected": "7)", + "got": "11)", + "got_raw": "11) self.assertEqual(f.graph.output[0].type.tensor_type.elem_type, 1) self.assertEqual(f.graph.output[0].type.tensor_type.shape.dim[0].dim_param, \"?\") self.assertEqual(f.graph.output[0].type.tensor_type.shape.dim[1].dim_param, \"?\") self.assertEqual(f.graph.output[0].type.tensor_type.shape.dim[2].dim_param, \"?\") self.assertEqual(f.graph.output[0].type.tensor_type.shape.dim[3].dim_param, \"?\") self.assertEqual(f.graph.output[0].type.tensor_type.shape.dim[4].dim_param, \"?\") self.assertEqual(f", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.4 + }, + { + "repo": "mido/mido", + "expected": "[[0xf0, 1, 2, 3, 0xf7]]", + "got": "[[0xf0, 1, 2, 3], [0xf7]]", + "got_raw": "[[0xf0, 1, 2, 3], [0xf7]]", + "exact_match": false, + "code_bleu": 0.6865065103648591, + "edit_similarity": 0.9583333333333334 + }, + { + "repo": "mido/mido", + "expected": "(0, 1, 2)", + "got": "(0, 1, 2) assert Message('sysex', data=[0, 1, 2]).data == [0, 1, 2] assert Message('sysex', data=(0,)).data == (0,) assert Message('sysex', data=(0, 1)).data == (0, 1) assert Message('sysex', data=(0, 1, 2, 3)).data == (0, 1, 2, 3) assert Message('sysex', data=(0, 1, 2, 3, 4)).", + "got_raw": "(0, 1, 2) assert Message('sysex', data=[0, 1, 2]).data == [0, 1, 2] assert Message('sysex', data=(0,)).data == (0,) assert Message('sysex', data=(0, 1)).data == (0, 1) assert Message('sysex', data=(0, 1, 2, 3)).data == (0, 1, 2, 3) assert Message('sysex', data=(0, 1, 2, 3, 4)).", + "exact_match": false, + "code_bleu": 0.051425139888256324, + "edit_similarity": 0.0627177700348432 + }, + { + "repo": "mido/mido", + "expected": "m2", + "got": "m2", + "got_raw": "m2 # noqa: E711\n\n\ndef test_track_repr2():\n track = MidiTrack([\n MetaMessage('set_tempo', time=1, tempo=2),\n MetaMessage('set_time_signature', time=1, numerator=2, denominator=4, clocks_per_click=24, metronome=1, notated_32nd=8),\n MetaMessage('set_key_signature', time=1, key='C', mode='major', accidentals=0),\n MetaMessage('set_copyright', time=1, text='Copyright 2012'),\n ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mido/mido", + "expected": "1", + "got": "14", + "got_raw": "14 # C1 # 14 = 12 + 2 # 12 = 10 + 2 # 10 = 8 + 2 # 8 = 6 + 2 # 6 = 4 + 2 # 4 = 2 + 2 # 2 = 0 + 2 # 0 = 0 + 0 # 0 = 0 + 0 # 0 = 0 + 0 # 0 = 0 + 0 # 0 = 0", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "mido/mido", + "expected": "Message('clock', time=0)", + "got": "Message('clock', time=0) assert Message('clock', time=1) != Message('clock', time=0) assert Message('note_on', time=0) == Message('note_on', time=0) assert Message('note_on', time=1) != Message('note_on', time=0) assert Message('note_off', time=0) == Message('note_off', time=0) assert Message('note_off', time=1) != Message('note_off', time=0) assert Message('note_on', time=0) != Message('note_off', time=0) assert Message", + "got_raw": "Message('clock', time=0) assert Message('clock', time=1) != Message('clock', time=0) assert Message('note_on', time=0) == Message('note_on', time=0) assert Message('note_on', time=1) != Message('note_on', time=0) assert Message('note_off', time=0) == Message('note_off', time=0) assert Message('note_off', time=1) != Message('note_off', time=0) assert Message('note_on', time=0) != Message('note_off', time=0) assert Message", + "exact_match": false, + "code_bleu": 0.06004768746064559, + "edit_similarity": 0.10714285714285714 + }, + { + "repo": "mido/mido", + "expected": "[[0xf8], [0xf8]]", + "got": "[[0xf8, 0xf8]] * 2 + [[0xf8]] * 2 + [[0xf8]] * 2 + [[0xf8]] * 2 + [[0xf8]] * 2 + [[0xf8]] * 2 + [[0xf8]] * 2 + [[0xf8]] * 2 + [[0xf8]] * 2 + [[0xf8]] * 2 + [[0xf8]] * 2 + [[0xf8]] * 2 + [[0xf8]] * 2 + [[0xf8]] *", + "got_raw": "[[0xf8, 0xf8]] * 2 + [[0xf8]] * 2 + [[0xf8]] * 2 + [[0xf8]] * 2 + [[0xf8]] * 2 + [[0xf8]] * 2 + [[0xf8]] * 2 + [[0xf8]] * 2 + [[0xf8]] * 2 + [[0xf8]] * 2 + [[0xf8]] * 2 + [[0xf8]] * 2 + [[0xf8]] * 2 + [[0xf8]] *", + "exact_match": false, + "code_bleu": 0.05105570673293668, + "edit_similarity": 0.13215859030837004 + }, + { + "repo": "mido/mido", + "expected": "0", + "got": "MIN_PITCHWHEEL", + "got_raw": "MIN_PITCHWHEEL + 127 / 256.0 * 127.0 + 127.0 / 256.0 * 127.0 / 256.0 * 127.0 / 256.0 * 127.0 / 256.0 * 127.0 / 256.0 * 127.0 / 256.0 * 127.0 / 256.0 * 127.", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "mido/mido", + "expected": "TypeError)", + "got": "RuntimeError)", + "got_raw": "RuntimeError) as e: port.close() assert str(e.value) == 'Port closed' port.close() assert port.closed\n\n def test_close(self, port): port.close() assert port.closed port.close() assert port.closed port.close() assert port.closed port.close() assert port.closed port.close() assert port.closed port.close() assert port.closed port.close() assert port.closed port.close() assert port.closed port.close() assert port.closed port.close() assert port.closed port.close() assert port.closed port.close() assert port.closed port.close() assert port.closed port.close() assert port.closed port.close() assert port.closed port.close() assert", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6086956521739131 + }, + { + "repo": "mido/mido", + "expected": "Message('start', time=1)", + "got": "Message('start', time=1) assert Message('start').copy(time=1, note=2) == Message('start', time=1, note=2) assert Message('start').copy(time=1, note=2, velocity=3) == Message('start', time=1, note=2, velocity=3) assert Message('start').copy(time=1, note=2, velocity=3, time_signature=(4, 4, 240, 8)) == Message('start', time=1, note=2, velocity=3, time_signature=(4, 4", + "got_raw": "Message('start', time=1) assert Message('start').copy(time=1, note=2) == Message('start', time=1, note=2) assert Message('start').copy(time=1, note=2, velocity=3) == Message('start', time=1, note=2, velocity=3) assert Message('start').copy(time=1, note=2, velocity=3, time_signature=(4, 4, 240, 8)) == Message('start', time=1, note=2, velocity=3, time_signature=(4, 4", + "exact_match": false, + "code_bleu": 0.056394323551609345, + "edit_similarity": 0.12276214833759591 + }, + { + "repo": "mido/mido", + "expected": "None", + "got": "None", + "got_raw": "None\n\n\ndef test_parse_all():\n \"\"\"Parse all message types.\"\"\"\n\n parser = Parser()\n for type_ in sorted(specs.SPEC_BY_TYPE.keys()):\n msg = Message(type_)\n parser.feed(msg.bytes())\n assert parser.get_message() == msg\n\n\ndef test_parse_all_with_delays():\n \"\"\"Parse all message types with delays.\"\"\"\n\n parser = Parser()\n for type_ in sorted(specs.SPEC_BY_TYPE.keys()):\n msg = Message(type_, time=random.random())\n parser.feed(msg.bytes())\n assert parser.get_message() == msg\n\n\ndef test_parse_all_with_delays_and_del", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "miguelgrinberg/microdot", + "expected": "{})", + "got": "{})", + "got_raw": "{})\n self.assertEqual(req.headers, {})\n self.assertEqual(req.body, b'')\n self.assertEqual(req.method, 'GET')\n self.assertEqual(req.query_string, b'')\n self.assertEqual(req.remote_addr, '127.0.0.1')\n self.assertEqual(req.headers.get('Accept'), 'text/html')\n self.assertEqual(req.headers.get('Accept-Language'), 'en-US')\n self.assertEqual(req.headers.get('Accept-Encoding'), 'gzip, deflate')\n self.assertEqual(req.headers.get('Accept-Charset'), 'utf-8')\n self.assertEqual(req.headers.get", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "miguelgrinberg/microdot", + "expected": "{'id': 'bca'})", + "got": "{'id': 'bca'}) self.assertEqual(p.match('/users/abc')", + "got_raw": "{'id': 'bca'}) self.assertEqual(p.match('/users/abc'), None) self.assertEqual(p.match('/users/'), None) self.assertEqual(p.match('/users'), None) self.assertEqual(p.match('/users/123'), None) self.assertEqual(p.match('/users/123/'), None) self.assertEqual(p.match('/users/123/456'), None) self.assertEqual(p.match('/users/123/456/'), None) self.assertEqual(p.match('/users/123/456/789'), None) self.assertEqual(p.match('/users/1", + "exact_match": false, + "code_bleu": 0.34823528327578535, + "edit_similarity": 0.417910447761194 + }, + { + "repo": "miguelgrinberg/microdot", + "expected": "'Hello, foo!')", + "got": "'Hello, foo!')", + "got_raw": "'Hello, foo!')", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "miguelgrinberg/microdot", + "expected": "1)", + "got": "1)", + "got_raw": "1) self.assertEqual(d.get('one'), 1) self.assertEqual(d.get('one', default=0), 1) self.assertEqual(d.getlist('one'), [1]) self.assertEqual(d.getlist('one', type=int), [1]) self.assertEqual(d.getlist('one', type=str), ['1']) self.assertEqual(d.getlist('one', type=float), [1.0]) self.assertEqual(d.getlist('one', type=NoCaseDict), [1]) self.assertEqual(d.getlist('one', type=NoCaseDict, default=NoCaseDict()), {}) self.assertEqual(d.getlist('one', type", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "miguelgrinberg/microdot", + "expected": "400)", + "got": "400)", + "got_raw": "400) self.assertEqual(res.text, 'Bad request') self.assertEqual(res.headers.get('content-length'), '0') self.assertEqual(res.headers.get('connection'), 'close') self.assertEqual(res.headers.get('date'), 'Thu, 01 Jan 1970 01:23:20 GMT') self.assertEqual(res.headers.get('server'), 'microdot') self.assertEqual(res.headers.get('content-type'), 'text/html; charset=utf-8') self.assertEqual(res.headers.get('access-control-allow-origin'), '*') self.assertEqual(res.headers.get('access-control-allow-headers'), 'content-type')", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "miguelgrinberg/microdot", + "expected": "204)", + "got": "200)", + "got_raw": "200) self.assertEqual(res.body, b'') self.assertEqual(res.headers, {}) self.assertEqual(res.raw_headers, []) self.assertEqual(res.content_length, 0) self.assertEqual(res.is_empty(), True) self.assertEqual(res.is_stream(), False) self.assertEqual(res.is_json(), False) self.assertEqual(res.is_text(), False) self.assertEqual(res.is_html(), False) self.assertEqual(res.is_xml(), False) self.assertEqual(res.is_image(), False) self.assertEqual(res.is_audio(), False) self.assertEqual(res.is_video(), False) self.assertEqual(res.is_pdf(), False) self.assertEqual(res.is_zip(), False) self.assertEqual(res.is_gzip", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.75 + }, + { + "repo": "miguelgrinberg/microdot", + "expected": "request.g.current_user", + "got": "request.session['user_id'])", + "got_raw": "request.session['user_id'])\n\n @app.get('/login')\n async def login(request):\n request.session['user_id'] = 1234567890\n return 'Logged in'\n\n @app.get('/logout')\n async def logout(request):\n request.session.clear()\n return 'Logged out'\n\n @app.get('/protected')\n @login\n async def protected(request):\n return 'Protected'\n\n @app.get('/protected2')\n async def protected2(request):\n return 'Protected2'", + "exact_match": false, + "code_bleu": 0.24446151121745047, + "edit_similarity": 0.5714285714285714 + }, + { + "repo": "miguelgrinberg/microdot", + "expected": "'None')", + "got": "'')", + "got_raw": "'')\n\n def test_form(self):\n app = Microdot()\n\n @app.post('/async')\n @with_form_data\n async def async_route(req):\n return str(req.form)\n\n client = TestClient(app)\n\n res = self._run(client.post('/async', data={'foo': 'bar'}))\n self.assertEqual(res.status_code, 200)\n self.assertEqual(res.text, 'foo=bar')\n\n def test_file(self):\n app = Microdot()\n\n @app.post('/async')\n @with_form_data\n async def async_route", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6 + }, + { + "repo": "miguelgrinberg/microdot", + "expected": "403)", + "got": "403)", + "got_raw": "403) res = self._run(client.post( '/submit', headers={'Origin': 'https://evil.com'} )) self.assertEqual(res.status_code, 403) res = self._run(client.post('/submit-exempt')) self.assertEqual(res.status_code, 204) res = self._run(client.get('/get-protected')) self.assertEqual(res.status_code, 204) res = self._run(client.get('/get-protected', headers={'Origin': 'https://evil.com'})) self.assertEqual(res.status_code, 403) res = self._run(client.get('/get-protected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "miguelgrinberg/microdot", + "expected": "'3')", + "got": "'3')", + "got_raw": "'3') self.assertEqual(res.text, 'foo') res = self._run(client.get('/async')) self.assertEqual(res.status_code, 200) self.assertEqual(res.headers['Content-Type'], 'text/plain; charset=UTF-8') self.assertEqual(res.headers['Content-Length'], '12') self.assertEqual(res.text, 'foo-async') res = self._run(client.get('/arg/123')) self.assertEqual(res.status_code, 200) self.assertEqual(res.headers['Content-Type'], 'text/plain; charset=UTF-8') self.assertEqual(res.headers['Content-Length'], '3') self.assertEqual(res.text", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "miguelgrinberg/microdot", + "expected": "401)", + "got": "401)", + "got_raw": "401) res = self._run(client.get('/', auth=('foo', 'bar'))) self.assertEqual(res.status_code, 200) self.assertEqual(res.text, 'foo') res = self._run(client.get('/', auth=('foo', 'baz'))) self.assertEqual(res.status_code, 401) res = self._run(client.get('/', auth=('bar', 'baz'))) self.assertEqual(res.status_code, 403) res = self._run(client.get('/', auth=('bar', 'bar'))) self.assertEqual(res.status_code, 200) self.assertEqual(res.text, 'bar') res = self._", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "miguelgrinberg/microdot", + "expected": "{'foo': 'bar', 'baz': 'baz'})", + "got": "{'foo': 'bar', 'baz': 'baz'}) res = self._run(client.post( '/async', headers={ 'Content-Type': 'multipart/form-data; boundary=boundary', }, body=( b'--boundary\\r\\n' b'Content-Disposition: form-data; name=\"foo\"\\r\\n\\r\\nbar\\r\\n' b'--boundary\\r\\n' b'Content-Disposition: form-data; name=\"baz\"\\r\\n\\r\\nbaz\\r\\n' b'--boundary--\\r\\n' )) ) self.assertEqual(res.status_code, 200) self.assertEqual(res.json, {'foo': 'bar',", + "got_raw": "{'foo': 'bar', 'baz': 'baz'}) res = self._run(client.post( '/async', headers={ 'Content-Type': 'multipart/form-data; boundary=boundary', }, body=( b'--boundary\\r\\n' b'Content-Disposition: form-data; name=\"foo\"\\r\\n\\r\\nbar\\r\\n' b'--boundary\\r\\n' b'Content-Disposition: form-data; name=\"baz\"\\r\\n\\r\\nbaz\\r\\n' b'--boundary--\\r\\n' )) ) self.assertEqual(res.status_code, 200) self.assertEqual(res.json, {'foo': 'bar',", + "exact_match": false, + "code_bleu": 0.1357540195021894, + "edit_similarity": 0.13211845102505695 + }, + { + "repo": "miguelgrinberg/microdot", + "expected": "'POST')", + "got": "'POST')", + "got_raw": "'POST') self.assertEqual(req.headers, { 'content-length': '4', 'content-type': 'text/plain', }) self.assertEqual(req.body, b'1234') return Response('OK') self._run(app) self._run(app) self._run(app) self._run(app) self._run(app) self._run(app) self._run(app) self._run(app) self._run(app) self._run(app) self._run(app) self._run(app) self._run(app) self._run(app) self._run(app) self._run(app) self._run(app) self", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "miguelgrinberg/python-socketio", + "expected": "ConnectionError)", + "got": "ConnectionError)", + "got_raw": "ConnectionError) as e: admin_client.connect('http://localhost:8900', namespace='/admin') assert str(e.value) == 'Authentication failed'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "miguelgrinberg/python-socketio", + "expected": "'foo'", + "got": "'foo'", + "got_raw": "'foo'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "miguelgrinberg/python-socketio", + "expected": "sid", + "got": "sid[0]", + "got_raw": "sid[0] + '_' + sid[1] + '_' + sid[2] + '_' + sid[3] + '_' + sid[4] + '_' + sid[5] + '_' + sid[6] + '_' + sid[7] + '_' + sid[8] + '_' + sid[9] + '_' + sid[10] + '_' + sid[11] + '_' + sid[12] + '_' + sid[13] + '_' + sid[14] + '_' + sid[15] + '_' + sid[16] + '_' + sid[", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "miguelgrinberg/python-socketio", + "expected": "'foo'", + "got": "'foo'", + "got_raw": "'foo' cm.json = saved_json cm.json = 'bar' assert cm.json == 'bar' cm.json = saved_json cm.json = 'baz' assert cm.json == 'baz' cm.json = 'qux' assert cm.json == 'qux' cm.json = 'quux' assert cm.json == 'quux' cm.json = 'quuz' assert cm.json == 'quuz' cm.json = 'qux' assert cm.json == 'qux' cm.json = 'quux' assert cm.json == 'quux' cm.json = 'quuz' assert cm.json == 'quuz", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "miguelgrinberg/python-socketio", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "miguelgrinberg/python-socketio", + "expected": "'foo'", + "got": "'foo'", + "got_raw": "'foo' async def test_publish(self): await self.pm.publish('foo', 'bar') await self.pm.publish('foo', 'baz') await self.pm.publish('foo', 'qux') await self.pm.publish('foo', 'quux') await self.pm.publish('foo', 'quuz') await self.pm.publish('foo', 'qux') await self.pm.publish('foo', 'quux') await self.pm.publish('foo', 'quuz') await self.pm.publish('foo', 'qux') await self.pm.publish('foo', 'quux') await self.pm.publish('foo', 'quuz')", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "miguelgrinberg/python-socketio", + "expected": "'ev')", + "got": "'ev')", + "got_raw": "'ev') == 'data') == 'room') == 'skip') == 'cb') == True) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) == False) ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "miguelgrinberg/python-socketio", + "expected": "start_response)", + "got": "start_response)", + "got_raw": "start_response)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "miguelgrinberg/python-socketio", + "expected": "None", + "got": "None", + "got_raw": "None super_emit.call_args[1]['callback'] == ('sid', '/baz', 123) super_emit.call_args[1]['host_id'] == 'x' super_emit.call_args[1]['data'] == {} super_emit.call_args[1]['id'] == 123 super_emit.call_args[1]['json'] is False super_emit.call_args[1]['headers'] is None super_emit.call_args[1]['timeout'] is None super_emit.call_args[1]['ack'] is None super_emit.call_args[1]['binary'] is False super_emit.call_args[1]['subprotocol'] is None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "miguelgrinberg/python-socketio", + "expected": "(1, '2')", + "got": "(1, '2') assert client.client_kwargs == {'a': '3', 'b': 4} assert client._headers == {} assert client._events == [] assert client._rooms == [] assert client._disconnected is False assert client._ping_interval == 2000 assert client._ping_timeout == 5000 assert client._ping_delay == 2000 assert client._ping_count == 3 assert client._ping_timeout == 5000 assert client._ping_delay == 2000 assert client._ping_count == 3 assert client._ping_timeout == 50", + "got_raw": "(1, '2') assert client.client_kwargs == {'a': '3', 'b': 4} assert client._headers == {} assert client._events == [] assert client._rooms == [] assert client._disconnected is False assert client._ping_interval == 2000 assert client._ping_timeout == 5000 assert client._ping_delay == 2000 assert client._ping_count == 3 assert client._ping_timeout == 5000 assert client._ping_delay == 2000 assert client._ping_count == 3 assert client._ping_timeout == 50", + "exact_match": false, + "code_bleu": 0.04129025403661707, + "edit_similarity": 0.034782608695652174 + }, + { + "repo": "miguelgrinberg/python-socketio", + "expected": "TypeError)", + "got": "TypeError)", + "got_raw": "TypeError) as excinfo: p_without_default.encode() excinfo.value.args[0] == \"Can't encode data without a default function\" p_without_default = msgpack_packet.MsgPackPacket( data=data, default=lambda x: x ) p_encoded = p_without_default.encode() p_decoded = msgpack_packet.MsgPackPacket.decode(p_encoded) assert p_decoded.data == data p_decoded = msgpack_packet.MsgPackPacket.decode( p_encoded, default=lambda x: x ) assert p_decoded.data == data p_decoded = msgpack_packet.MsgPackPacket.decode( p_encoded, default=lambda x: x, )", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "miguelgrinberg/python-socketio", + "expected": "False", + "got": "True", + "got_raw": "True", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "miguelgrinberg/python-socketio", + "expected": "None", + "got": "None", + "got_raw": "None redis_manager.redis = saved_redis", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "miguelgrinberg/python-socketio", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mlfoundations/open_lm", + "expected": "expected_shard_ps", + "got": "expected_shard_ps[0]", + "got_raw": "expected_shard_ps[0] if len(expected_shard_ps) == 1 else expected_shard_ps[1] if len(expected_shard_ps) == 2 else expected_shard_ps[2] if len(expected_shard_ps) == 3 else None if len(expected_shard_ps) == 4 else None if len(expected_shard_ps) == 5 else None if len(expected_shard_ps) == 6 else None if len(expected_shard_ps) == 7 else None if len(expected_shard_ps) == 8 else None if len(expected_shard_ps) == 9 else None if", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.918918918918919 + }, + { + "repo": "mlfoundations/open_lm", + "expected": "mock_file.read()", + "got": "mock_file.read()", + "got_raw": "mock_file.read()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mlfoundations/open_lm", + "expected": "batch_size * (num_samples // batch_size)", + "got": "min_shards_needed * batch_size * 2048 + 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "min_shards_needed * batch_size * 2048 + 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.21390382231526917, + "edit_similarity": 0.15544041450777202 + }, + { + "repo": "mlfoundations/open_lm", + "expected": "\"This checkpoint was trained with a random seed of 0. Since this seed affects shard shuffling, resuming training must use the same seed.\"", + "got": "str(e) == \"The model parameters are different from the original model.\" + \"\\n\" + \"This is expected since the seed was changed.\" + \"\\n\" + \"The model parameters are different from the original model.\" + \"\\n\" + \"This is expected since the seed was changed.\" + \"\\n\" + \"The model parameters are different from the original model.\" + \"\\n\" + \"This is expected since the seed was changed.\" + \"\\n\" + \"The model parameters are different from the original model.\" + \"\\n\" + \"This is expected since the seed was changed.\" + \"\\n\" +", + "got_raw": "str(e) == \"The model parameters are different from the original model.\" + \"\\n\" + \"This is expected since the seed was changed.\" + \"\\n\" + \"The model parameters are different from the original model.\" + \"\\n\" + \"This is expected since the seed was changed.\" + \"\\n\" + \"The model parameters are different from the original model.\" + \"\\n\" + \"This is expected since the seed was changed.\" + \"\\n\" + \"The model parameters are different from the original model.\" + \"\\n\" + \"This is expected since the seed was changed.\" + \"\\n\" +", + "exact_match": false, + "code_bleu": 0.0266785298043081, + "edit_similarity": 0.1743119266055046 + }, + { + "repo": "mlfoundations/open_lm", + "expected": "min_shards_needed", + "got": "min_shards_needed", + "got_raw": "min_shards_needed + 1 if min_shards_needed > 0 else 1 + num_shards_needed + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "modelcontextprotocol/python-sdk", + "expected": "[]", + "got": "[]", + "got_raw": "[]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "modelcontextprotocol/python-sdk", + "expected": "2", + "got": "2", + "got_raw": "2 and next_cursor is None and tasks[0].metadata.ttl == 60000 and tasks[1].metadata.ttl == 60000 and tasks[0].metadata.id != tasks[1].metadata.id and tasks[0].metadata.id.startswith(\"task_\") and tasks[1].metadata.id.startswith(\"task_\") and tasks[0].metadata.id != tasks[1].metadata.id and tasks[0].metadata.id != tasks[2].metadata.id and tasks[1].metadata.id != tasks[2].metadata.id and tasks[0].metadata.id != tasks[3].", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "modelcontextprotocol/python-sdk", + "expected": "group._prompts", + "got": "group._prompts", + "got_raw": "group._prompts assert mock_session1 in group._tool_to_session[\"tool1\"] assert mock_session2 in group._tool_to_session[\"tool2\"] assert mock_session1 in group._sessions[mock_session] assert mock_session1 in group._sessions[mock_component_named_like_server] assert mock_session1 in group._sessions[server_name] assert mock_session1 in group._tools[\"tool1\"]._sessions assert mock_session1 in group._tools[\"tool2\"]._sessions assert mock_session1 in group._resources[\"res1\"]._sessions assert mock_session1 in group._prompts[\"prm1\"]._sessions", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "modelcontextprotocol/python-sdk", + "expected": "str(exc_info.value)", + "got": "str(exc_info.value)", + "got_raw": "str(exc_info.value)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "modelcontextprotocol/python-sdk", + "expected": "str(excinfo.value)", + "got": "str(excinfo.value)", + "got_raw": "str(excinfo.value) # pragma: no cover", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "modelcontextprotocol/python-sdk", + "expected": "size1", + "got": "size1", + "got_raw": "size1 + 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "modelcontextprotocol/python-sdk", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "modelcontextprotocol/python-sdk", + "expected": "\"test\"", + "got": "\"test\"", + "got_raw": "\"test\" assert resource.description == \"test file\" assert resource.path == temp_file assert resource.size == temp_file.stat().st_size assert resource.last_modified == temp_file.stat().st_mtime assert resource.content_type == \"text/plain\" assert resource.content_length == 11 assert resource.content_encoding == \"utf-8\" assert resource.content_disposition == \"inline\" assert resource.content_language == \"en\" assert resource.content_version == \"1.0\" assert resource.content_encoding == \"utf-8\" assert resource.content_disposition == \"inline\" assert resource.content_language == \"en\" assert resource.content_version == \"1.0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "modelcontextprotocol/python-sdk", + "expected": "second", + "got": "second", + "got_raw": "second # pragma: no cover \"\"\"The same resource should be returned when added again.\"\"\" assert first.name == \"test\" # pragma: no cover \"\"\"The resource should have the correct name.\"\"\" assert first.path == temp_file # pragma: no cover \"\"\"The resource should have the correct path.\"\"\" assert first.uri == AnyUrl( scheme=\"file\", path=temp_file, ) # pragma: no cover \"\"\"The resource should have the correct URI.\"\"\" assert first.path.read_text() == \"test content\" # pragma: no cover \"\"\"The resource should have the correct content.\"\"\" assert first.path.read_text() == second.path.read", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "modelcontextprotocol/python-sdk", + "expected": "\"true\"", + "got": "\"True\"", + "got_raw": "\"True\" # pragma: no cover\n\n # Now test the logging callback\n await client.call_tool(\"test_tool_with_log\", {\"message\": \"Hello\", \"level\": \"info\", \"logger\": \"test\"}) # pragma: no cover\n await client.call_tool(\"test_tool_with_log_extra\", # pragma: no cover\n { # pragma: no cover\n \"message\": \"Hello\", # pragma: no cover\n \"level\": \"debug\", # pragma: no cover\n \"logger\": \"test\", # pragma: no cover\n \"extra_string", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.8333333333333334 + }, + { + "repo": "modelcontextprotocol/python-sdk", + "expected": "resource.meta[\"tags\"]", + "got": "resource.meta[\"tags\"]", + "got_raw": "resource.meta[\"tags\"] and \"readonly\" in resource.meta[\"tags\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "modelcontextprotocol/python-sdk", + "expected": "None", + "got": "None", + "got_raw": "None and server_spy is not None and client_spy._stream is not None and server_spy._stream is not None and client_spy._stream._stream is not None and server_spy._stream._stream is not None and client_spy._stream._stream._stream is not None and server_spy._stream._stream._stream is not None and client_spy._stream._stream._stream._stream is not None and server_spy._stream._stream._stream._stream is not None and client_spy._stream._stream._stream._stream._stream is not None and server_spy._stream._", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "modelcontextprotocol/python-sdk", + "expected": "\"working\"", + "got": "\"working\"", + "got_raw": "\"working\" assert result.task.meta == {\"custom_field\": \"test_value\"} await work_completed.wait() assert result.task.status == \"success\" assert result.task.meta is None assert result.task.content[0].type == \"text\" assert result.task.content[0].text == \"Processed: hello\" assert result.task.task_id == task_id assert result.task.task_type == \"simple_task\" assert result.task.task_id is not None assert result.task.task_id != \"\" assert result.task.task_id != 0 assert result.task.task_id != 1 assert result.task.task_id != 2 assert result.task.task_id != 3 assert result", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "modelcontextprotocol/python-sdk", + "expected": "{}", + "got": "{}", + "got_raw": "{} # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "modelcontextprotocol/python-sdk", + "expected": "None", + "got": "None", + "got_raw": "None and received_capabilities.tasks is None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "modelcontextprotocol/python-sdk", + "expected": "task2.task_id", + "got": "task2.task_id", + "got_raw": "task2.task_id\n\n\ndef test_create_task_state_generates_id_with_id() -> None:\n \"\"\"create_task_state generates a unique task ID when provided with an ID.\"\"\"\n task1 = create_task_state(TaskMetadata(ttl=60000), task_id=\"task1\")\n task2 = create_task_state(TaskMetadata(ttl=60000), task_id=\"task2\")\n\n assert task1.task_id == \"task1\" and task2.task_id == \"task2\"\n\n\ndef test_task_execution() -> None:\n \"\"\"task_execution executes a task and", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "modelcontextprotocol/python-sdk", + "expected": "(200, 201)", + "got": "[200, 201]", + "got_raw": "[200, 201] # pragma: no cover # Response should be successful # Check the response body for the expected JSON-RPC result # This is a placeholder for the actual expected result # Replace with the actual expected result # The actual result depends on the server implementation # You can use a tool like JSONPath or a library like jsonpath-ng to extract the result # For example, if the server returns a JSON-RPC result with a \"result\" field, you can use: # result = response.json()[\"result\"] # Check for any errors in the logs", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.8 + }, + { + "repo": "modelcontextprotocol/python-sdk", + "expected": "1", + "got": "1", + "got_raw": "1 # Only one icon is added to the server metadata", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "modelcontextprotocol/python-sdk", + "expected": "\"2.0\"", + "got": "\"2.0\"", + "got_raw": "\"2.0\" assert request.id == 1 assert request.method == \"initialize\" assert request.params is not None assert isinstance(request.params, dict) assert request.params[\"protocolVersion\"] == LATEST_PROTOCOL_VERSION assert request.params[\"capabilities\"] == {} assert request.params[\"clientInfo\"] == { \"name\": \"mcp\", \"version\": \"0.1.0\", } assert request.params[\"clientInfo\"][\"name\"] == \"mcp\" assert request.params[\"clientInfo\"][\"version\"] == \"0.1.0\" assert request.params[\"capabilities\"][\"batch\"] is None assert request.params[\"capabilities\"][\"sampling\"] is", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "modelcontextprotocol/python-sdk", + "expected": "2", + "got": "2", + "got_raw": "2 read_messages[0] == JSONRPCRequest(jsonrpc=\"2.0\", id=1, method=\"ping\") read_messages[1] == JSONRPCResponse(jsonrpc=\"2.0\", id=2, result={})", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mohamed-chs/convoviz", + "expected": "\"conv_123\"", + "got": "\"conv_123\"", + "got_raw": "\"conv_123\" assert docs[0][\"type\"] == \"text/plain\" assert docs[0][\"content\"] == \"hello\" assert docs[0][\"create_time\"] == ts.isoformat() + \"Z\" assert docs[0][\"update_time\"] == ts.isoformat() + \"Z\" assert docs[0][\"id\"] == \"doc_1\" assert docs[0][\"parent\"] is None assert docs[0][\"children\"] == [] assert docs[0][\"metadata\"] == {} assert docs[0][\"status\"] == \"finished_successfully\" assert docs[0][\"end_turn\"] is True assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mohamed-chs/convoviz", + "expected": "\"msg123\"", + "got": "\"msg123\"", + "got_raw": "\"msg123\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mohamed-chs/convoviz", + "expected": "{OutputKind.GRAPHS}", + "got": "[OutputKind.GRAPHS]", + "got_raw": "[OutputKind.GRAPHS] + config.extras + [OutputKind.MARKDOWN] + [OutputKind.WORDCLOUDS] + [OutputKind.CANVAS] + [OutputKind.CUSTOM_INSTRUCTIONS] + [OutputKind.CUSTOM] + [OutputKind.CUSTOM] + [OutputKind.CUSTOM] + [OutputKind.CUSTOM] + [OutputKind.CUSTOM] + [OutputKind.CUSTOM] + [OutputKind.CUSTOM] + [OutputKind.CUSTOM] + [OutputKind.CUSTOM] + [OutputKind.CUSTOM] + [OutputKind.CUSTOM] + [OutputKind.C", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.8947368421052632 + }, + { + "repo": "mohamed-chs/convoviz", + "expected": "False", + "got": "False", + "got_raw": "False", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mohamed-chs/convoviz", + "expected": "InvalidZipError, match=\"Malicious path in ZIP\")", + "got": "InvalidZipError) as exc_info: extract_archive(zip_path) assert str(exc_info.value) == \"Invalid ZIP file: Windows-style traversal not allowed\" def test_zip_slip_protection_with_slashes(tmp_path):", + "got_raw": "InvalidZipError) as exc_info: extract_archive(zip_path) assert str(exc_info.value) == \"Invalid ZIP file: Windows-style traversal not allowed\" def test_zip_slip_protection_with_slashes(tmp_path): # Create a malicious ZIP file in memory zip_buffer = io.BytesIO() with ZipFile(zip_buffer, \"w\") as zf: # Try to extract outside the folder zf.writestr(\"/evil.txt\", \"malicious content\") # POSIX-style traversal should be allowed zf.writestr(\"/evil2.txt\", \"malicious content\") zip_path = tmp_path / \"malicious.zip\" zip_path.write_bytes(zip_buffer.getvalue", + "exact_match": false, + "code_bleu": 0.057783239927083445, + "edit_similarity": 0.26556016597510373 + }, + { + "repo": "mohamed-chs/convoviz", + "expected": "set()", + "got": "set()", + "got_raw": "set()\n\n\ndef test_load_nltk_stopwords(tmp_path: Path) -> None:\n \"\"\"Test loading NLTK stopwords from a file.\"\"\"\n stopwords_file = tmp_path / \"stopwords.txt\"\n stopwords_file.write_text(\"one, two, three\")\n stopwords = load_nltk_stopwords(stopwords_file)\n assert stopwords == {\"one\", \"two\", \"three\"}\n\n\ndef test_generate_and_save_wordcloud(tmp_path: Path) -> None:\n \"\"\"Test generating and saving a wordcloud.\"\"\"\n # Create a mock conversation collection with some data\n conversations = ConversationCollection", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mohamed-chs/convoviz", + "expected": "\"First [^1] then again [^1]\"", + "got": "\"First [^1] then again [^1]\" \"\\n\\n[^1]: [S1](http://s1.com)\" \"\\n\\n\" \"First [^2] then again [^2]\" \"\\n\\n[^2]: [S1](http://s1.com)\" \"\\n\\n\" \"First [^3] then again [^3]\" \"\\n\\n[^3]: [S1](http://s1.com)\" \"\\n\\n\" \"First [^4] then again [^4]\" \"\\n\\n[^4]: [S1](http://s1.com)\" \"\\n\\n\"", + "got_raw": "\"First [^1] then again [^1]\" \"\\n\\n[^1]: [S1](http://s1.com)\" \"\\n\\n\" \"First [^2] then again [^2]\" \"\\n\\n[^2]: [S1](http://s1.com)\" \"\\n\\n\" \"First [^3] then again [^3]\" \"\\n\\n[^3]: [S1](http://s1.com)\" \"\\n\\n\" \"First [^4] then again [^4]\" \"\\n\\n[^4]: [S1](http://s1.com)\" \"\\n\\n\"", + "exact_match": false, + "code_bleu": 0.10390302174233558, + "edit_similarity": 0.18729096989966554 + }, + { + "repo": "mohamed-chs/convoviz", + "expected": "2", + "got": "2", + "got_raw": "2 * 2 + 1 * 3 + 1 * 2 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 *", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mohamed-chs/convoviz", + "expected": "3", + "got": "1", + "got_raw": "1 in markdown.count(\"*08:05:00*\") ) # Third message (system) should have no timestamp at all assert \"System\" in markdown and \"System\" not in markdown.split(\"*\")[1] # Fourth message (user) should have full date again assert \"*2023-07-29 08:00:00*\" in markdown.split(\"*\")[2] # Fifth message (assistant) should have full date again assert \"*2023-07-29 08:05:00*\" in markdown.split(\"*\")[3] # Sixth", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "mohamed-chs/convoviz", + "expected": "upper", + "got": "upper.name.lower()", + "got_raw": "upper.name.lower() + \".json\" # type: ignore # noqa: E501 # type: ignore # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E5", + "exact_match": false, + "code_bleu": 0.18575057999133598, + "edit_similarity": 0.43478260869565216 + }, + { + "repo": "mohamed-chs/convoviz", + "expected": "\"I should be deleted\"", + "got": "\"I should be deleted\"", + "got_raw": "\"I should be deleted\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mohamed-chs/convoviz", + "expected": "\"active\"", + "got": "[\"date\"", + "got_raw": "[\"date\", \"author\", \"title\", \"tags\", \"content\"] md.render_order = [\"title\", \"date\", \"author\", \"tags\", \"content\"] assert md.render_order == [\"title\", \"date\", \"author\", \"tags\", \"content\"] md.render_order = [\"date\", \"author\", \"title\", \"tags\", \"content\"] assert md.render_order == [\"date\", \"author\", \"title\", \"tags\", \"content\"] md.render_order = [\"date\", \"author\", \"title\", \"content\"] assert md.render_order == [\"date\", \"author\", \"title\", \"content\"] md.render", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "mohamed-chs/convoviz", + "expected": "2", + "got": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "mohamed-chs/convoviz", + "expected": "\"string_text\"", + "got": "\"string_text\"", + "got_raw": "\"string_text\" assert doc[\"type\"] == \"code/javascript\" assert doc[\"content\"] == \"console.log(1)\" assert doc[\"metadata\"] == {} assert doc[\"created\"] == ts.isoformat() + \"Z\" assert doc[\"updated\"] == ts.isoformat() + \"Z\" assert doc[\"author\"] == \"canmore.create_textdoc\" assert doc[\"id\"] == \"msg_json_text\" assert doc[\"weight\"] == 1.0 assert doc[\"end_turn\"] is True assert doc[\"status\"] == \"finished_successfully\" assert doc[\"content_type\"] == \"code\" assert doc[\"text", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mohamed-chs/convoviz", + "expected": "False", + "got": "None", + "got_raw": "None # No hash found # No header found # No header found # No header found # No header found # No header found # No header found # No header found # No header found # No header found # No header found # No header found # No header found # No header found # No header found # No header found # No header found # No header found # No header found # No header found # No header found # No header found # No header found # No header found # No header found #", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "mohamed-chs/convoviz", + "expected": "[]", + "got": "[(\"file-999\"", + "got_raw": "[(\"file-999\", \"report.pdf\")] assert result == \"Hello\" assert resolver_calls[0][1] is None assert \"assets/report.pdf\" in result assert \"assets/file-999\" not in result assert \"assets/\" not in result.lower() assert \"assets/\" not in result.lower() assert \"assets/\" not in result.lower() assert \"assets/\" not in result.lower() assert \"assets/\" not in result.lower() assert \"assets/\" not in result.lower() assert \"assets/\" not in result.lower() assert \"assets/\" not in result.lower() assert \"assets/\" not in result.lower", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.14285714285714285 + }, + { + "repo": "mootdx/mootdx", + "expected": "False)", + "got": "False)", + "got_raw": "False) # noqa: E121\n\n def test_history(self):\n data = self.client.history('600036', start='2018-01-01', end='2018-01-02') # noqa: E121\n\n self.assertEqual(data.empty, False) # noqa: E121\n\n def test_kline(self):\n data = self.client.kline('600036', start='2018-01-01', end='2018-01", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mootdx/mootdx", + "expected": "xdxr.columns", + "got": "xdxr.columns.values.tolist()", + "got_raw": "xdxr.columns.values.tolist()", + "exact_match": false, + "code_bleu": 0.2626909894424158, + "edit_similarity": 0.6 + }, + { + "repo": "mootdx/mootdx", + "expected": "data)", + "got": "data)", + "got_raw": "data)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mootdx/mootdx", + "expected": "1", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "mootdx/mootdx", + "expected": "'\u5e02\u573a\u4ee3\u7801\u9519\u8bef'", + "got": "'\u5e02\u573a\u4ee3\u7801\u9519\u8bef'", + "got_raw": "'\u5e02\u573a\u4ee3\u7801\u9519\u8bef'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mootdx/mootdx", + "expected": "result.empty)", + "got": "result.empty)", + "got_raw": "result.empty)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mozillazg/python-pinyin", + "expected": "['\u5566\u5566', 'abc']", + "got": "['\u5566\u5566abc'] ```python ``` def test_simple_seg(): assert simple_seg('\u5566\u5566') == ['\u5566\u5566'] assert simple_seg('\u5566\u5566abc') == ['\u5566\u5566abc'] ```python ``` def test_simple_seg(): assert simple_seg('\u5566\u5566') == ['\u5566\u5566'] assert simple_seg('\u5566\u5566abc') == ['\u5566\u5566abc'] ```python ```python ``` def test_simple_seg(): assert simple_seg('\u5566\u5566') == ['\u5566\u5566'] assert simple_seg('\u5566\u5566abc') == ['\u5566\u5566abc'] ```python ```python ``` def test_simple_seg(): assert simple_seg('\u5566\u5566') == ['", + "got_raw": "['\u5566\u5566abc'] ```python ``` def test_simple_seg(): assert simple_seg('\u5566\u5566') == ['\u5566\u5566'] assert simple_seg('\u5566\u5566abc') == ['\u5566\u5566abc'] ```python ``` def test_simple_seg(): assert simple_seg('\u5566\u5566') == ['\u5566\u5566'] assert simple_seg('\u5566\u5566abc') == ['\u5566\u5566abc'] ```python ```python ``` def test_simple_seg(): assert simple_seg('\u5566\u5566') == ['\u5566\u5566'] assert simple_seg('\u5566\u5566abc') == ['\u5566\u5566abc'] ```python ```python ``` def test_simple_seg(): assert simple_seg('\u5566\u5566') == ['", + "exact_match": false, + "code_bleu": 0.013191039178811828, + "edit_similarity": 0.04072398190045249 + }, + { + "repo": "mozillazg/python-pinyin", + "expected": "[['m']]", + "got": "[['m'", + "got_raw": "[['m', 'mou', 'm4']] ) == [['m', 'mou', 'm4']] assert pinyin( han, heteronym=True, style=INITIALS) == [['m']] assert pinyin( han, heteronym=True, style=FIRST_LETTER) == [['m']] assert pinyin( han, heteronym=True, style=FINALS) == [['ou']] assert pinyin( han, heteronym=True, style=FINALS_TONE) == [['o2u']] assert pinyin( han, heteronym=True, style=FINALS_TONE2) == [['o", + "exact_match": false, + "code_bleu": 0.5045378491522287, + "edit_similarity": 0.8333333333333334 + }, + { + "repo": "mozillazg/python-pinyin", + "expected": "'vn'", + "got": "''", + "got_raw": "'' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' 'n' '", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "mozillazg/python-pinyin", + "expected": "expect", + "got": "expect", + "got_raw": "expect + ['i'] * (len(han) - len(expect)) + ['u'] * (len(han) - len(expect)) + ['e'] * (len(han) - len(expect)) + ['o'] * (len(han) - len(expect)) + ['a'] * (len(han) - len(expect)) + ['i'] * (len(han) - len(expect)) + ['u'] * (len(han) - len(expect)) + ['e'] * (len(han) - len(expect)) + ['o'] * (len(han) - len(expect)) +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mozillazg/python-pinyin", + "expected": "'n2'", + "got": "'\u0144'", + "got_raw": "'\u0144' ```", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5714285714285714 + }, + { + "repo": "mozillazg/python-pinyin", + "expected": "['o']", + "got": "['o']", + "got_raw": "['o'] ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ```", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mozillazg/python-pinyin", + "expected": "['ce4']", + "got": "['c\u00e84'", + "got_raw": "['c\u00e84', 's\u00ec4'] ``` ``` def test_custom_pinyin_dict_tone3(): load_single_dict({ord('\u6854'): 'c\u00e84,si4'}, style='tone3') assert lazy_pinyin('\u6854', style=TONE3) == ['c\u00e84', 's\u00ec4'] ``` ``` def test_custom_pinyin_dict_tone(): load_single_dict({ord('\u6854'): 'c\u00e84,si4'}, style='tone') assert lazy_pinyin('\u6854', style=TONE) == ['c\u00e84', 's\u00ec4'] ``` ``` def test_custom_pinyin_dict_first", + "exact_match": false, + "code_bleu": 0.35818997727451396, + "edit_similarity": 0.7692307692307693 + }, + { + "repo": "mozillazg/python-pinyin", + "expected": "[['zhao1'], ['yang2']]", + "got": "[['c\u00e8'], ['sh\u00ec']] ) == [['c\u00e8'], ['sh\u00ec']]", + "got_raw": "[['c\u00e8'], ['sh\u00ec']] ) == [['c\u00e8'], ['sh\u00ec']]", + "exact_match": false, + "code_bleu": 0.14610534486579724, + "edit_similarity": 0.3870967741935484 + }, + { + "repo": "mozillazg/python-pinyin", + "expected": "[['\u00e9i', 'x\u012b', 'y\u00ec', '\u00ea\u0304', '\u1ebf', '\u00ea\u030c', '\u011bi', '\u1ec1', '\u00e8i', '\u0113i']]", + "got": "['hao', 'hao', 'hao']", + "got_raw": "['hao', 'hao', 'hao']", + "exact_match": false, + "code_bleu": 0.0710862140021174, + "edit_similarity": 0.2962962962962963 + }, + { + "repo": "mozillazg/python-pinyin", + "expected": "['\u4f60\u597d\u554a']", + "got": "['\u4f60\u597d\u554a']", + "got_raw": "['\u4f60\u597d\u554a'] if SUPPORT_UCS4 else ['\u4f60\u597d\u554a'] if sys.maxunicode == 0xFFFF else ['\u4f60\u597d\u554a'] if sys.maxunicode == 0x10FFFF else ['\u4f60\u597d\u554a'] if sys.maxunicode == 0x3FFFF else ['\u4f60\u597d\u554a'] if sys.maxunicode == 0x7FFFFFFF else ['\u4f60\u597d\u554a'] if sys.maxunicode == 0x7FFFFFFF else ['\u4f60\u597d\u554a'] if sys.maxunicode == 0x80000000 else ['\u4f60\u597d\u554a'] if sys.maxunicode == 0x80000000 else", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mpfaffenberger/code_puppy", + "expected": "m", + "got": "m.id", + "got_raw": "m.id + \":\" + m.name + \":\" + m.model_id + \":\" + m.provider_id + \":\" + str(m.id) + \":\" + str(m.model_id) + \":\" + str(m.provider_id) + \":\" + str(m.id) + \":\" + str(m.model_id) + \":\" + str(m.provider_id) + \":\" + str(m.id) + \":\" + str(m.model_id) + \":\" + str(m.provider_id) + \":\" + str(m.id) + \":\" + str(m.model_id) + \":\" + str(m.provider_id) + \":\" + str(m.id) + \":\" + str(m.model_id) + \":\"", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.4 + }, + { + "repo": "mpfaffenberger/code_puppy", + "expected": "1", + "got": "1", + "got_raw": "1 and beta_str.count(\"interleaved-thinking-2025-05-14\") == 1 and beta_str.count(\"oauth-2025-04-20,interleaved-thinking-2025-05-14\") == 0 and beta_str.count(\"oauth-2025-04-20,\") == 0 and beta_str.count(\",interleaved-thinking-2025-05-14\") == 0 and beta_str.count(\",\") == 0 and beta_str.count(\"oauth-2025", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mpfaffenberger/code_puppy", + "expected": "6", + "got": "30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "mpfaffenberger/code_puppy", + "expected": "1", + "got": "0", + "got_raw": "0\r\n\r\n @pytest.mark.anyio\r\n async def test_single_message(self, model, default_params):\r\n message = UserPromptPart(text=\"Hello, world!\")\r\n si, contents = await model._map_messages([message], default_params)\r\n assert si is None\r\n assert len(contents) == 1\r\n assert isinstance(contents[0], str)\r\n assert contents[0] == \"Hello, world!\"\r\n\r\n @pytest.mark.anyio\r\n async def test_multiple_messages(self, model, default_params):\r\n messages = [UserPromptPart(text=\"Hello,", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "mpfaffenberger/code_puppy", + "expected": "1", + "got": "10", + "got_raw": "10 + 5 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 1", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "mpfaffenberger/code_puppy", + "expected": "True", + "got": "True", + "got_raw": "True # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E71", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mpfaffenberger/code_puppy", + "expected": "out", + "got": "out.lower()", + "got_raw": "out.lower() and \"plain text\" in out.lower() and \"plain\" in out.lower() and \"text\" in out.lower() and \"plain text\" in out.lower() and \"plain\" in out.lower() and \"plain text\" in out.lower() and \"plain\" in out.lower() and \"plain text\" in out.lower() and \"plain\" in out.lower() and \"plain text\" in out.lower() and \"plain\" in out.lower() and \"plain text\" in out.lower() and \"plain\" in out.lower() and \"plain text\" in out.lower() and \"plain\" in out", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.42857142857142855 + }, + { + "repo": "mpfaffenberger/code_puppy", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mpfaffenberger/code_puppy", + "expected": "r.error", + "got": "r.error_message.strip()", + "got_raw": "r.error_message.strip() r.error_message.strip() == \"Not implemented\" r.error_message.strip() == \"Not implemented\" r.error_message.strip() == \"Not implemented\" r.error_message.strip() == \"Not implemented\" r.error_message.strip() == \"Not implemented\" r.error_message.strip() == \"Not implemented\" r.error_message.strip() == \"Not implemented\" r.error_message.strip() == \"Not implemented\" r.error_message.strip() == \"Not implemented\" r.error_message.strip() == \"Not implemented\" r.error_message.strip() == \"Not implemented\" r.error_message.strip() == \"Not implemented\" r.error_message", + "exact_match": false, + "code_bleu": 0.24446151121745047, + "edit_similarity": 0.4666666666666667 + }, + { + "repo": "mpfaffenberger/code_puppy", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mpfaffenberger/code_puppy", + "expected": "2", + "got": "1", + "got_raw": "1 and call_count <= 2 and spinner._paused is False and spinner._live.render() == Text(\"test\") and spinner._stop_event.is_set() is True and spinner._paused is True and spinner._live.render() == Text(\"\") and spinner._stop_event.is_set() is False and spinner._paused is False and spinner._live.render() == Text(\"test\") and spinner._stop_event.is_set() is True and spinner._paused is True and spinner._live.render() == Text(\"\") and spinner._stop_event.is_set() is False and spinner._paused is False and spinner._live.render() == Text(\"test\")", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "mpfaffenberger/code_puppy", + "expected": "id2", + "got": "id2", + "got_raw": "id2 # noqa: E711\r\n\r\n\r\nclass TestGenerateSessionHashSuffix:\r\n def test_unique(self):\r\n suffix1 = _generate_session_hash_suffix(\"base\")\r\n suffix2 = _generate_session_hash_suffix(\"base\")\r\n\r\n assert suffix1 != suffix2 # noqa: E711\r\n\r\n\r\nclass TestGetSubagentSessionsDir:\r\n def test_returns_correct_path(self, tmp_path):\r\n subagent_id = \"subagent1\"\r\n expected_path = tmp_path / \"subagents\" / subagent_id / \"sessions\" / \"subagent", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mpfaffenberger/code_puppy", + "expected": "None", + "got": "None", + "got_raw": "None # Return None if key not found # Test with a default value val = cp_config.get_value(\"missing_key\", \"default\") assert val == \"default\" # Test with a default value that is not a string val = cp_config.get_value(\"missing_key\", 42) assert val == 42 # Test with a default value that is a list val = cp_config.get_value(\"missing_key\", []) assert val == [] # Test with a default value that is a dictionary val = cp_config.get_value(\"missing_key\", {}) assert val == {} ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mpfaffenberger/code_puppy", + "expected": "p", + "got": "p.id", + "got_raw": "p.id or p.name or p.api or p.doc or p.id or p.name or p.api or p.doc or p.id or p.name or p.api or p.doc or p.id or p.name or p.api or p.doc or p.id or p.name or p.api or p.doc or p.id or p.name or p.api or p.doc or p.id or p.name or p.api or p.doc or p.id or p.name or p.api or p.doc or p.id or p.name or p.api or p.doc or p.id or p.name or p.api or p.doc or p.id or p.name or p.api", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.4 + }, + { + "repo": "mpfaffenberger/code_puppy", + "expected": "sio", + "got": "sio", + "got_raw": "sio # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E50", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mpfaffenberger/code_puppy", + "expected": "5", + "got": "5.0000000000000002e-01", + "got_raw": "5.0000000000000002e-01 # 5.0000000000000002e-01 is 5.0000000000000002e-01 in float format\r\n assert serialized[\"total_tokens\"] == 100.000000000000002e-02 # 100.00000000000000", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.08695652173913043 + }, + { + "repo": "mpfaffenberger/code_puppy", + "expected": "ts", + "got": "ts.replace(microsecond=0)", + "got_raw": "ts.replace(microsecond=0) # Remove microseconds for comparison", + "exact_match": false, + "code_bleu": 0.16036590969929357, + "edit_similarity": 0.14814814814814814 + }, + { + "repo": "mpfaffenberger/code_puppy", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mpfaffenberger/code_puppy", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" # Empty description is allowed. assert cmd.handler == handler assert cmd.name == \"test\" assert cmd.usage == \"\" assert cmd.options == [] assert cmd.examples == [] assert cmd.aliases == [] assert cmd.hidden is False assert cmd.category is None assert cmd.group is None assert cmd.parent is None assert cmd.parent_name is None assert cmd.parent_alias is None assert cmd.parent_category is None assert cmd.parent_group is None assert cmd.parent_parent is None assert cmd.parent_parent_name is None assert cmd.parent_parent_alias is None assert cmd.parent_parent_category", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mpfaffenberger/code_puppy", + "expected": "5", + "got": "5", + "got_raw": "5 # All IDs should be unique", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mr-fatalyst/fastopenapi", + "expected": "3", + "got": "3", + "got_raw": "3", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mr-fatalyst/fastopenapi", + "expected": "1", + "got": "1", + "got_raw": "1\n\n # Second call with the same dependency should return the cached result\r\n result2 = self.resolver.resolve_dependencies(endpoint, self.request_data)\r\n assert result2 == {\"dep\": \"result_1\"}\r\n assert call_count == 1 # Dependency should not be recalculated\r\n\r\n # Third call with a different dependency should trigger a new calculation\r\n result3 = self.resolver.resolve_dependencies(endpoint, self.request_data, dep=\"result_2\")\r\n assert result3 == {\"dep\": \"result_2\"}\r\n assert call_count == 2 # Dependency should be", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mr-fatalyst/fastopenapi", + "expected": "1", + "got": "1", + "got_raw": "1\n assert result[\"name\"] == \"Item 1\"\n assert result[\"description\"] == \"Item 1 description\"\n assert result[\"price\"] == 10.00\n assert result[\"image\"] == \"item1.jpg\"\n assert result[\"category\"] == \"Category 1\"\n assert result[\"created_at\"] is not None\n assert result[\"updated_at\"] is not None\n\n def test_create_item(self, client):\n \"\"\"Test creating a new item\"\"\"\n data = {\n \"name\": \"New Item\",\n \"description\": \"New Item description", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mr-fatalyst/fastopenapi", + "expected": "3", + "got": "3", + "got_raw": "3 # Assuming the ID is auto-incremented and starts from 1 # in the example API response # (assuming the ID is auto-incremented and starts from 1) # in the example API response # (assuming the ID is auto-incremented and starts from 1) # in the example API response # (assuming the ID is auto-incremented and starts from 1) # in the example API response # (assuming the ID is auto-incremented and starts from 1) # in the example API response # (assuming the ID is auto-in", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mr-fatalyst/fastopenapi", + "expected": "3", + "got": "3", + "got_raw": "3", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mr-fatalyst/fastopenapi", + "expected": "\"Get Test\"", + "got": "\"Get Test\" schema[\"components\"][\"schemas\"][\"TestModel\"] = { \"title\": \"TestModel\"", + "got_raw": "\"Get Test\" schema[\"components\"][\"schemas\"][\"TestModel\"] = { \"title\": \"TestModel\", \"type\": \"object\", \"properties\": { \"id\": {\"title\": \"Id\", \"type\": \"integer\", \"format\": \"int32\"}, \"name\": {\"title\": \"Name\", \"type\": \"string\"}, }, \"required\": [\"id\", \"name\"], } }", + "exact_match": false, + "code_bleu": 0.07692375026049747, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "mr-fatalyst/fastopenapi", + "expected": "50", + "got": "50", + "got_raw": "50 and all(isinstance(r, list) for r in results) and all(isinstance(u, User) for r in results for u in r) and all(u.id == 1 and u.name == \"Test\" for r in results for u in r) and all(isinstance(r, list) for r in results) and all(isinstance(u, User) for r in results for u in r) and all(u.id == 1 and u.name == \"Test\" for r in results for u in r) and all(isinstance(r, list) for r in results) and all(isinstance(u, User) for r in results for", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mr-fatalyst/fastopenapi", + "expected": "None", + "got": "None", + "got_raw": "None and result.type_ == int and result._config == BaseAdapter._config._config \\ and result._config._frozen == BaseAdapter._config._frozen \\ and result._config._schema_extra == BaseAdapter._config._schema_extra \\ and result._config._schema_extra == BaseAdapter._config._schema_extra \\ and result._config._schema_extra == BaseAdapter._config._schema_extra \\ and result._config._schema_extra == BaseAdapter._config._schema_extra \\ and result._config._schema_extra == BaseAdapter._config._schema_extra \\ and result._config._schema_extra == BaseAdapter._config._", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mr-fatalyst/fastopenapi", + "expected": "\"Get Test\"", + "got": "\"Get Test\" schema[\"components\"][\"schemas\"][\"TestModel\"] = { \"title\": \"TestModel\"", + "got_raw": "\"Get Test\" schema[\"components\"][\"schemas\"][\"TestModel\"] = { \"title\": \"TestModel\", \"type\": \"object\", \"properties\": { \"id\": {\"title\": \"Id\", \"type\": \"integer\", \"format\": \"int32\"}, \"name\": {\"title\": \"Name\", \"type\": \"string\"}, }, \"required\": [\"id\", \"name\"], } }", + "exact_match": false, + "code_bleu": 0.07692375026049747, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "mr-fatalyst/fastopenapi", + "expected": "{}", + "got": "b\"\"", + "got_raw": "b\"\" # Empty body is returned as is. \"\"\" async def test_get_body(self): \"\"\"Test non-empty body\"\"\" request = Mock() request.body = AsyncMock(return_value=b\"Hello, World!\") result = await StarletteRequestDataExtractor._get_body(request) assert result == b\"Hello, World!\" \"\"\" async def test_get_body_async(self): \"\"\"Test async body\"\"\" request = Mock() request.body = AsyncMock(return_value=asyncio.Future( result=b\"Hello, World!\" )) result = await StarletteRequestDataExtractor._get_body(request) assert result == b\"Hello, World!\" \"\"\" async def test", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.0 + }, + { + "repo": "mr-fatalyst/fastopenapi", + "expected": "1", + "got": "1", + "got_raw": "1 assert result[\"name\"] == \"Item 1\" assert result[\"description\"] == \"Item 1 description\" assert result[\"price\"] == 10.00 assert result[\"tax\"] == 1.00 assert result[\"image\"] == \"item-1.jpg\" assert result[\"category\"] == \"category-1\" assert result[\"tags\"] == [\"tag-1\", \"tag-2\"] assert result[\"created_at\"] == \"2023-01-01T00:00:00Z\" assert result[\"updated_at\"] == \"2023-", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mr-fatalyst/fastopenapi", + "expected": "1", + "got": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678", + "got_raw": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "mr-fatalyst/fastopenapi", + "expected": "\"1.0.0\"", + "got": "\"1.0.0\"", + "got_raw": "\"1.0.0\" router.app = True router.title = \"My API\" router.description = \"My API Description\" router.version = \"2.0.0\" assert router.title == \"My API\" assert router.description == \"My API Description\" assert router.version == \"2.0.0\" router.title = \"Test API\" router.description = \"Test API Description\" router.version = \"1.0.0\" assert router.title == \"Test API\" assert router.description == \"Test API Description\" assert router.version == \"1.0.0\" router.title = \"My API\" router.description = \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mr-fatalyst/fastopenapi", + "expected": "2", + "got": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "mr-fatalyst/fastopenapi", + "expected": "42", + "got": "42", + "got_raw": "42 # type: ignore # noqa: E702 # type: ignore # noqa: E702 # type: ignore # noqa: E702 # type: ignore # noqa: E702 # type: ignore # noqa: E702 # type: ignore # noqa: E702 # type: ignore # noqa: E702 # type: ignore # noqa: E702 # type: ignore # noqa: E702 # type: ignore # noqa:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mr-fatalyst/fastopenapi", + "expected": "2", + "got": "2", + "got_raw": "2 # 2 files extracted from the request \"\"\" \"\"\" assert result[0][\"name\"] == \"avatar.jpg\" assert result[0][\"content_type\"] == \"image/jpeg\" assert result[0][\"size\"] == 2048 assert result[1][\"name\"] == \"document.pdf\" assert result[1][\"content_type\"] == \"application/pdf\" assert result[1][\"size\"] == 5120 \"\"\" \"\"\" def test_get_files_no_files(self): \"\"\"Test files extraction with no files\"\"\" request = Mock() request.FILES = Mock() request.FILES.keys = Mock(return_value=[]) request.FILES.getlist =", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mr-fatalyst/fastopenapi", + "expected": "2", + "got": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "mr-fatalyst/fastopenapi", + "expected": "5", + "got": "5.0000000000000002e-324", + "got_raw": "5.0000000000000002e-324 # Min length constraint applied assert schema[\"maxLength\"] == 100.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.08333333333333333 + }, + { + "repo": "mr-fatalyst/fastopenapi", + "expected": "[]", + "got": "[]", + "got_raw": "[] # type: ignore assert security.name is None assert security.in_ == ParameterSource.NONE assert security.description is None assert security.required is True assert security.explode is False assert security.style is None assert security.schema is None assert security.example is None assert security.examples is None assert security.allow_reserved is False assert security.allow_empty_value is False assert security.explode_default is False assert security.explode_default_value is None assert security.explode_default_schema is None assert security.explode_default_examples is None assert security.explode_default_allow_reserved is False assert security.ex", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "mr-fatalyst/fastopenapi", + "expected": "result", + "got": "result.keys()", + "got_raw": "result.keys() assert \"AUTHORIZATION\" in result.keys() assert result[\"CONTENT-TYPE\"] == \"application/json\" assert result[\"AUTHORIZATION\"] == \"Bearer token\" def test_get_body(self): \"\"\"Test body extraction\"\"\" request = testing.create_req( body=json.dumps({\"key\": \"value\"}), headers={\"Content-Type\": \"application/json\"}, ) result = FalconRequestDataExtractor._get_body(request) assert result == {\"key\": \"value\"} def test_get_query_params(self): \"\"\"Test query params extraction\"\"\" request = testing.create_req( query_string=\"param1=value1¶m2=value2\" ) result = Falcon", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.631578947368421 + }, + { + "repo": "nat-n/poethepoet", + "expected": "\"Hello from uv-project 0.0.99\\n\"", + "got": "\"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello", + "got_raw": "\"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello from script-task\\n\" \"Hello", + "exact_match": false, + "code_bleu": 0.051366639095059514, + "edit_similarity": 0.0648854961832061 + }, + { + "repo": "nat-n/poethepoet", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" # type: ignore # noqa: E701 # type: ignore # noqa: E701 # type: ignore # noqa: E701 # type: ignore # noqa: E701 # type: ignore # noqa: E701 # type: ignore # noqa: E701 # type: ignore # noqa: E701 # type: ignore # noqa: E701 # type: ignore # noqa: E701 # type: ignore # noqa: E", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nat-n/poethepoet", + "expected": "f\"hi {arg}\\n\"", + "got": "f\"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"", + "got_raw": "f\"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"hi {arg}\\n\" \"", + "exact_match": false, + "code_bleu": 0.08039313477786734, + "edit_similarity": 0.10441767068273092 + }, + { + "repo": "nat-n/poethepoet", + "expected": "\"Hello\\nWorld!\\n:)!\\n\"", + "got": "\"Hello\\nWorld!\\n:)!?\\n\"", + "got_raw": "\"Hello\\nWorld!\\n:)!?\\n\" \"Poe => poe_test_echo 'Hello'\\n\" \"Poe => poe_test_echo 'World!'\\n\" \"Poe => poe_test_echo ':)!'\\n\" \"Poe => poe_test_echo 'Hello'\\n\" \"Poe => poe_test_echo 'World!'\\n\" \"Poe => poe_test_echo ':)!'\\n\" \"Poe => poe_test_echo 'Hello'\\n\" \"Poe => poe_test_echo 'World!'\\n\" \"Poe => poe_test_echo ':)!", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.9777777777777777 + }, + { + "repo": "nat-n/poethepoet", + "expected": "\"a1: A1, a2: A2\\nb\\n\"", + "got": "\"A1, a2: b\\n\" \"Poe => echo c\\n\" \"Poe => echo d\\n\" \"Poe => echo e\\n\" \"Poe => echo f\\n\" \"Poe => echo g\\n\" \"Poe => echo h\\n\" \"Poe => echo i\\n\" \"Poe => echo j\\n\" \"Poe => echo k\\n\" \"Poe => echo l\\n\" \"Poe => echo m\\n\" \"Poe => echo n\\n\" \"Poe => echo o\\n\" \"Poe => echo p\\n\" \"Poe => echo q\\n", + "got_raw": "\"A1, a2: b\\n\" \"Poe => echo c\\n\" \"Poe => echo d\\n\" \"Poe => echo e\\n\" \"Poe => echo f\\n\" \"Poe => echo g\\n\" \"Poe => echo h\\n\" \"Poe => echo i\\n\" \"Poe => echo j\\n\" \"Poe => echo k\\n\" \"Poe => echo l\\n\" \"Poe => echo m\\n\" \"Poe => echo n\\n\" \"Poe => echo o\\n\" \"Poe => echo p\\n\" \"Poe => echo q\\n", + "exact_match": false, + "code_bleu": 0.04449945957170705, + "edit_similarity": 0.0858085808580858 + }, + { + "repo": "nat-n/poethepoet", + "expected": "15", + "got": "9", + "got_raw": "9 * 2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "nat-n/poethepoet", + "expected": "\"parallel_with_s\u2026 | 1 going to stdout 1\\n\" \"parallel_with_s\u2026 | 4 going to stdout 4\\n\"", + "got": "\"1 going to stdout 1\\n2 going to file\\n3 going to the void\\n4 going to stdout 4\\n\" \"Poe => poe_test_echo '5 going to stdout 5'\\n\" \"Poe <= poe_test_echo '6 going to file'\\n\" \"Poe <= poe_test_echo '7 going to the void'\\n\" \"Poe => poe_test_echo '8 going to stdout 8'\\n\" \"Poe <= poe_test_echo '9 going to file'\\n\" \"Poe <= poe_test_echo '10 going to the void'\\", + "got_raw": "\"1 going to stdout 1\\n2 going to file\\n3 going to the void\\n4 going to stdout 4\\n\" \"Poe => poe_test_echo '5 going to stdout 5'\\n\" \"Poe <= poe_test_echo '6 going to file'\\n\" \"Poe <= poe_test_echo '7 going to the void'\\n\" \"Poe => poe_test_echo '8 going to stdout 8'\\n\" \"Poe <= poe_test_echo '9 going to file'\\n\" \"Poe <= poe_test_echo '10 going to the void'\\", + "exact_match": false, + "code_bleu": 0.08032276872815308, + "edit_similarity": 0.2318181818181818 + }, + { + "repo": "nat-n/poethepoet", + "expected": "result.capture", + "got": "result.capture", + "got_raw": "result.capture == \"test_default_value\\n\" \"test_default_value\\n\" \"test_default_value\\n\" \"test_default_value\\n\" \"test_default_value\\n\" \"test_default_value\\n\" \"test_default_value\\n\" \"test_default_value\\n\" \"test_default_value\\n\" \"test_default_value\\n\" \"test_default_value\\n\" \"test_default_value\\n\" \"test_default_value\\n\" \"test_default_value\\n\" \"test_default_value\\n\" \"test_default_value\\n\" \"test_default_value\\n\" \"test_default_value\\n\" \"test_default_value\\n\" \"test_default_value\\n\" \"test_default_value\\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nat-n/poethepoet", + "expected": "[ (\"abcx'[!]\", True), (\"]'ydef\", False), (\"*z\", True), (\"[foo\", False), (\"?\", True), (\"?\", True), ]", + "got": "[ (\"abc\", False), (\"space\", False), (\"def\", False), (\"*s\", True), (\"p\", False), (\"a\", False), (\"c\", False), (\"e?\", True), (\"s\", False), (\"p\", False), (\"a\", False), (\"c\", False), (\"e\", False), (\"s\", False), (\"p\", False), (\"a\", False), (\"c\", False), (\"e\", False), (\"s\", False), (\"p\", False), (\"a\", False), (\"c\", False), (\"e\", False), (\"s\", False), (\"p\", False), (\"", + "got_raw": "[ (\"abc\", False), (\"space\", False), (\"def\", False), (\"*s\", True), (\"p\", False), (\"a\", False), (\"c\", False), (\"e?\", True), (\"s\", False), (\"p\", False), (\"a\", False), (\"c\", False), (\"e\", False), (\"s\", False), (\"p\", False), (\"a\", False), (\"c\", False), (\"e\", False), (\"s\", False), (\"p\", False), (\"a\", False), (\"c\", False), (\"e\", False), (\"s\", False), (\"p\", False), (\"", + "exact_match": false, + "code_bleu": 0.11007016105061061, + "edit_similarity": 0.3383947939262473 + }, + { + "repo": "nat-n/poethepoet", + "expected": "\"Poe => poe_test_echo here we go...\\n\" \"Poe => :\\n\" \"Poe <= poe_test_echo about\\n\" \"Poe <= poe_test_echo hello\\n\" \"Poe ?? unresolved dependency task results via uses option for task 'think'\\n\" \"Poe ?? unresolved dependency task results via uses option for task\" \" 'deep-graph-with-args'\\n\"", + "got": "\"Poe => poe_test_echo 'Hello", + "got_raw": "\"Poe => poe_test_echo 'Hello, World!'\\n\" \"Poe => poe_test_echo 'Hello, World!'\\n\" \"Poe => poe_test_echo 'Hello, World!'\\n\" \"Poe => poe_test_echo 'Hello, World!'\\n\" \"Poe => poe_test_echo 'Hello, World!'\\n\" \"Poe => poe_test_echo 'Hello, World!'\\n\" \"Poe => poe_test_echo 'Hello, World!'\\n\" \"Poe => poe_test_echo 'Hello, World!'\\n\" \"", + "exact_match": false, + "code_bleu": 0.1561969968460128, + "edit_similarity": 0.138801261829653 + }, + { + "repo": "nat-n/poethepoet", + "expected": "\"Hello there!\\n\"", + "got": "\"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\"", + "got_raw": "\"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\" \"test\\n\"", + "exact_match": false, + "code_bleu": 0.03176605498590707, + "edit_similarity": 0.039603960396039604 + }, + { + "repo": "nat-n/poethepoet", + "expected": "\"deploying to admin:12345@dev.example.com:8080\\n\"", + "got": "\"deploying to admin:12345@dev.example.com:8080\\n\" \"deploying to admin:12345@dev.example.com:8080\\n\" \"deploying to admin:12345@dev.example.com:8080\\n\" \"deploying to admin:12345@dev.example.com:8080\\n\" \"deploying to admin:12345@dev.example.com:8080\\n\" \"deploying to admin:12345@dev.example.com:80", + "got_raw": "\"deploying to admin:12345@dev.example.com:8080\\n\" \"deploying to admin:12345@dev.example.com:8080\\n\" \"deploying to admin:12345@dev.example.com:8080\\n\" \"deploying to admin:12345@dev.example.com:8080\\n\" \"deploying to admin:12345@dev.example.com:8080\\n\" \"deploying to admin:12345@dev.example.com:80", + "exact_match": false, + "code_bleu": 0.06439931429457924, + "edit_similarity": 0.2857142857142857 + }, + { + "repo": "nat-n/poethepoet", + "expected": "1", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "nat-n/poethepoet", + "expected": "\"cmd task with verbosity -1 -1\\n\"", + "got": "\"cmd task with verbosity -1 0\\n\" \"cmd task with verbosity -1 0\\n\" \"cmd task with verbosity -1 0\\n\" \"cmd task with verbosity -1 0\\n\" \"cmd task with verbosity -1 0\\n\" \"cmd task with verbosity -1 0\\n\" \"cmd task with verbosity -1 0\\n\" \"cmd task with verbosity -1 0\\n\" \"cmd task with verbosity -1 0\\n\" \"cmd task with verbosity -1 0\\n\" \"cmd task with verbosity -1 0\\n\" \"cmd task with verbosity -1", + "got_raw": "\"cmd task with verbosity -1 0\\n\" \"cmd task with verbosity -1 0\\n\" \"cmd task with verbosity -1 0\\n\" \"cmd task with verbosity -1 0\\n\" \"cmd task with verbosity -1 0\\n\" \"cmd task with verbosity -1 0\\n\" \"cmd task with verbosity -1 0\\n\" \"cmd task with verbosity -1 0\\n\" \"cmd task with verbosity -1 0\\n\" \"cmd task with verbosity -1 0\\n\" \"cmd task with verbosity -1 0\\n\" \"cmd task with verbosity -1", + "exact_match": false, + "code_bleu": 0.057259987315337726, + "edit_similarity": 0.14657210401891252 + }, + { + "repo": "nat-n/poethepoet", + "expected": "\"parallel_of_seq\u2026 | seq1\\n\" \"parallel_of_seq\u2026 | seq2\\n\" \"parallel_of_seq\u2026 | para1\\n\"", + "got": "f\"Poe => poe_test_echo para3\\n\" f\"Poe => poe_test_echo para4\\n\" f\"Poe => poe_test_echo para5\\n\" f\"Poe => poe_test_echo para6\\n\" f\"Poe => poe_test_echo para7\\n\" f\"Poe => poe_test_echo para8\\n\" f\"Poe => poe_test_echo para9\\n\" f\"Poe => poe_test_echo para10\\n\" f\"Poe => poe_test_echo para11\\n\" f\"Poe => poe_test_echo para12\\n\" f\"Poe => po", + "got_raw": "f\"Poe => poe_test_echo para3\\n\" f\"Poe => poe_test_echo para4\\n\" f\"Poe => poe_test_echo para5\\n\" f\"Poe => poe_test_echo para6\\n\" f\"Poe => poe_test_echo para7\\n\" f\"Poe => poe_test_echo para8\\n\" f\"Poe => poe_test_echo para9\\n\" f\"Poe => poe_test_echo para10\\n\" f\"Poe => poe_test_echo para11\\n\" f\"Poe => poe_test_echo para12\\n\" f\"Poe => po", + "exact_match": false, + "code_bleu": 0.03925345689749394, + "edit_similarity": 0.15789473684210525 + }, + { + "repo": "nat-n/poethepoet", + "expected": "\"build+test\"", + "got": "\"build+test\"", + "got_raw": "\"build+test\" result.args == [\"--verbose\"] result.options == [] result.help = \"\" result.doc = \"\" result.aliases = [] result.hidden = False result.description = \"\" result.examples = [] result.returns = \"None\" result.returns_type = \"\" result.returns_description = \"\" result.returns_examples = [] result.returns_hidden = False result.returns_description = \"\" result.returns_examples = [] result.returns_description = \"\" result.returns_examples = [] result.returns_description = \"\" result.returns_examples = [] result.returns_description = \"\" result.returns_examples = [] result.returns_description = \"\" result.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nat-n/poethepoet", + "expected": "\"Great success!\\nfailing fast with error\\n\"", + "got": "\"Great success!\\nfailing fast with error\\n\" \"Error: Sequence aborted after failed subtask 'fast_fail'\\n\" \"Error: Task 'fast_fail' failed with exit code 1\\n\" \"Error: Task 'fast_success' failed with exit code 1\\n\" \"Error: Task 'fast_success' failed with exit code 1\\n\" \"Error: Task 'fast_success' failed with exit code 1\\n\" \"Error: Task 'lvl1_seq' failed with exit code 1\\n\" \"Error: Task 'lvl1_seq' failed with exit code 1\\n\" \"Error: Task", + "got_raw": "\"Great success!\\nfailing fast with error\\n\" \"Error: Sequence aborted after failed subtask 'fast_fail'\\n\" \"Error: Task 'fast_fail' failed with exit code 1\\n\" \"Error: Task 'fast_success' failed with exit code 1\\n\" \"Error: Task 'fast_success' failed with exit code 1\\n\" \"Error: Task 'fast_success' failed with exit code 1\\n\" \"Error: Task 'lvl1_seq' failed with exit code 1\\n\" \"Error: Task 'lvl1_seq' failed with exit code 1\\n\" \"Error: Task", + "exact_match": false, + "code_bleu": 0.10390302174233558, + "edit_similarity": 0.17954070981210857 + }, + { + "repo": "nat-n/poethepoet", + "expected": "\"ok\"", + "got": "\"ok\"", + "got_raw": "\"ok\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nat-n/poethepoet", + "expected": "\"Poe <= echo A1\\n\" \"Poe <= echo A2\\n\" \"Poe => 'a1: ' + ${a1} + ', a2: ' + ${a2}\\n\" \"Poe => echo b\\n\"", + "got": "\"Poe => poe_test_echo hello\\nPoe => poe_test_echo world\\n\" \"Poe => poe_test_echo 'Poe => poe_test_echo hello'\\n\" \"Poe => poe_test_echo 'Poe => poe_test_echo world'\\n\" \"Poe => poe_test_echo 'Poe => poe_test_echo 'Poe => poe_test_echo hello''\\n\" \"Poe => poe_test_echo 'Poe => poe_test_echo 'Poe => poe_test_echo world''\\n\" \"Poe => poe_test_echo 'Poe", + "got_raw": "\"Poe => poe_test_echo hello\\nPoe => poe_test_echo world\\n\" \"Poe => poe_test_echo 'Poe => poe_test_echo hello'\\n\" \"Poe => poe_test_echo 'Poe => poe_test_echo world'\\n\" \"Poe => poe_test_echo 'Poe => poe_test_echo 'Poe => poe_test_echo hello''\\n\" \"Poe => poe_test_echo 'Poe => poe_test_echo 'Poe => poe_test_echo world''\\n\" \"Poe => poe_test_echo 'Poe", + "exact_match": false, + "code_bleu": 0.08737167851715875, + "edit_similarity": 0.28187919463087246 + }, + { + "repo": "nat-n/poethepoet", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nbQA-dev/nbQA", + "expected": "expected_err", + "got": "expected_err.encode()", + "got_raw": "expected_err.encode() + b\"\\n\" + b\"Run 'nbqa check' to see if any notebooks are missing\\n\" + b\"Run 'nbqa find' to find all notebooks in your repo\\n\" + b\"Run 'nbqa check' to see if any notebooks are missing\\n\" + b\"Run 'nbqa find' to find all notebooks in your repo\\n\" + b\"Run 'nbqa check' to see if any notebooks are missing\\n\" + b\"Run 'nbqa find' to find all notebooks in your repo\\n\" + b\"Run 'nbqa check' to see", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.7272727272727273 + }, + { + "repo": "nbQA-dev/nbQA", + "expected": "err", + "got": "err.replace(\"\\r\\n\"", + "got_raw": "err.replace(\"\\r\\n\", \"\\n\") + \"\\n\" + \"1 file reformatted\" + \"\\n\" + \"1 file reformatted\" + \"\\n\" + \"1 file reformatted\" + \"\\n\" + \"1 file reformatted\" + \"\\n\" + \"1 file reformatted\" + \"\\n\" + \"1 file reformatted\" + \"\\n\" + \"1 file reformatted\" + \"\\n\" + \"1 file reformatted\" + \"\\n\" + \"1 file reformatted\" + \"\\n\" + \"1 file reformatted\" + \"\\n\" + \"1 file reform", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.2857142857142857 + }, + { + "repo": "nbQA-dev/nbQA", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nbQA-dev/nbQA", + "expected": "err", + "got": "err.lower()", + "got_raw": "err.lower() assert \"ImportError: cannot import name 'thisdoesnotexist'\" in err.lower() assert \"ImportError: cannot import name 'thisdoesnotexist2'\" in err.lower() assert \"ImportError: cannot import name 'thisdoesnotexist3'\" in err.lower() assert \"ImportError: cannot import name 'thisdoesnotexist4'\" in err.lower() assert \"ImportError: cannot import name 'thisdoesnotexist5'\" in err.lower() assert \"ImportError: cannot import name 'thisdoesnotexist6'\" in err.lower() assert \"ImportError: cannot import name 'thisdoesnot", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.42857142857142855 + }, + { + "repo": "nbQA-dev/nbQA", + "expected": "123", + "got": "123", + "got_raw": "123 # type: ignore # flake8 returns 123 on error # see https://github.com/PyCQA/flake8/issues/2028 # see https://github.com/PyCQA/flake8/issues/2029 # see https://github.com/PyCQA/flake8/issues/2030 # see https://github.com/PyCQA/flake8/issues/2031 # see https://github.com/PyCQA/flake8/issues/2032 # see https://github.com/", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nbQA-dev/nbQA", + "expected": "expected_out", + "got": "expected_out", + "got_raw": "expected_out + \"\\n\" + expected_out + \"\\n\" + expected_out + \"\\n\" + expected_out + \"\\n\" + expected_out + \"\\n\" + expected_out + \"\\n\" + expected_out + \"\\n\" + expected_out + \"\\n\" + expected_out + \"\\n\" + expected_out + \"\\n\" + expected_out + \"\\n\" + expected_out + \"\\n\" + expected_out + \"\\n\" + expected_out + \"\\n\" + expected_out + \"\\n\" + expected_out + \"\\n\" + expected_out + \"\\n\" + expected_out + \"\\n\" + expected_out", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nbQA-dev/nbQA", + "expected": "expected", + "got": "expected.strip()", + "got_raw": "expected.strip() + \"\\n\" + err.strip() + \"\\n\" + out.strip() + \"\\n\" + err.strip() + \"\\n\" + out.strip() + \"\\n\" + err.strip() + \"\\n\" + out.strip() + \"\\n\" + err.strip() + \"\\n\" + out.strip() + \"\\n\" + err.strip() + \"\\n\" + out.strip() + \"\\n\" + err.strip() + \"\\n\" + out.strip() + \"\\n\" + err.strip() + \"\\n\" + out.strip() + \"\\n\" + err.strip() + \"\\n\" +", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "nbQA-dev/nbQA", + "expected": "expected_out.replace( WRONG_EXAMPLE_NOTEBOOK, os.path.abspath(WRONG_EXAMPLE_NOTEBOOK) )", + "got": "expected_out.replace( os.getcwd(), \".\" ) + \"\\n\" + \"Notebook(s) failed to run: notebook_for_testing_copy.ipynb\\n\" + \"Notebook(s) failed to run: notebook_for_testing_copy.ipynb\\n\" + \"Notebook(s) failed to run: notebook_for_testing_copy.ipynb\\n\" + \"Notebook(s) failed to run: notebook_for_testing_copy.ipynb\\n\" + \"Notebook(s) failed to run: notebook_for_testing_copy.ipynb\\n\" + \"Notebook(s) failed to run: notebook_for_testing_copy.ipynb\\n\" +", + "got_raw": "expected_out.replace( os.getcwd(), \".\" ) + \"\\n\" + \"Notebook(s) failed to run: notebook_for_testing_copy.ipynb\\n\" + \"Notebook(s) failed to run: notebook_for_testing_copy.ipynb\\n\" + \"Notebook(s) failed to run: notebook_for_testing_copy.ipynb\\n\" + \"Notebook(s) failed to run: notebook_for_testing_copy.ipynb\\n\" + \"Notebook(s) failed to run: notebook_for_testing_copy.ipynb\\n\" + \"Notebook(s) failed to run: notebook_for_testing_copy.ipynb\\n\" +", + "exact_match": false, + "code_bleu": 0.1609791748450962, + "edit_similarity": 0.11406844106463879 + }, + { + "repo": "nbQA-dev/nbQA", + "expected": "expected.replace(\".md\", \".ipynb\")", + "got": "expected.replace(path, \"tests/data/notebook_for_testing.ipynb\") + \"\\n\" + path + \": Rewriting...\\n\" + \"To apply these changes, remove the `--nbqa-diff` flag\\n\" + \"\\n\" + \"Notebook for testing\\n\" + \"=============\\n\" + \"\\n\" + \"```{code-cell}\\n\" + \"```{code-cell}\\n\" + \"```{code-cell}\\n\" + \"```{code-cell}\\n\" + \"```{code-cell}\\n\" + \"```{code-cell}\\n\" + \"```{", + "got_raw": "expected.replace(path, \"tests/data/notebook_for_testing.ipynb\") + \"\\n\" + path + \": Rewriting...\\n\" + \"To apply these changes, remove the `--nbqa-diff` flag\\n\" + \"\\n\" + \"Notebook for testing\\n\" + \"=============\\n\" + \"\\n\" + \"```{code-cell}\\n\" + \"```{code-cell}\\n\" + \"```{code-cell}\\n\" + \"```{code-cell}\\n\" + \"```{code-cell}\\n\" + \"```{code-cell}\\n\" + \"```{", + "exact_match": false, + "code_bleu": 0.08678345215657841, + "edit_similarity": 0.14507772020725387 + }, + { + "repo": "nerfbaselines/nerfbaselines", + "expected": "render", + "got": "render.keys()", + "got_raw": "render.keys() and \"depth\" in render.keys() and \"mask\" in render.keys() and \"points\" in render.keys() and \"normals\" in render.keys() and \"cameras\" in render.keys() and \"cameras\" in render.keys() and \"cameras\" in render.keys() and \"cameras\" in render.keys() and \"cameras\" in render.keys() and \"cameras\" in render.keys() and \"cameras\" in render.keys() and \"cameras\" in render.keys() and \"cameras\" in render.keys() and \"cameras\" in render.keys() and \"", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.631578947368421 + }, + { + "repo": "nerfbaselines/nerfbaselines", + "expected": "[4, 4, 9, 9, 12, 12]", + "got": "12 + 10 * 9 + 10 * 5 + 10 * 1 + 10 * 0 + 10 * 0 + 10 * 0 + 10 * 0 + 10 * 0 + 10 * 0 + 10 * 0 + 10 * 0 + 10 * 0 + 10 * 0 + 10 * 0 + 10 * 0 + 10 * 0 + 10 * 0 + 10 * 0", + "got_raw": "12 + 10 * 9 + 10 * 5 + 10 * 1 + 10 * 0 + 10 * 0 + 10 * 0 + 10 * 0 + 10 * 0 + 10 * 0 + 10 * 0 + 10 * 0 + 10 * 0 + 10 * 0 + 10 * 0 + 10 * 0 + 10 * 0 + 10 * 0 + 10 * 0", + "exact_match": false, + "code_bleu": 0.018154904027121017, + "edit_similarity": 0.043478260869565216 + }, + { + "repo": "nerfbaselines/nerfbaselines", + "expected": "f'{get_resources_utilization_info.__module__}:{get_resources_utilization_info.__name__}'", + "got": "\"test\"", + "got_raw": "\"test\" assert args == (1,) assert kwargs == {\"a\": 2} return callback(*args, **kwargs) called = False return callback(*args, **kwargs) called = True return callback(*args, **kwargs) called = False return callback(*args, **kwargs) called = True return callback(*args, **kwargs) called = False return callback(*args, **kwargs) called = True return callback(*args, **kwargs) called = False return callback(*args, **kwargs) called = True return callback(*args, **kwargs) called = False return callback(*args, **kwargs) called = True", + "exact_match": false, + "code_bleu": 0.25, + "edit_similarity": 0.0851063829787234 + }, + { + "repo": "nerfbaselines/nerfbaselines", + "expected": "json.dumps(round_floats(orig), indent=2, sort_keys=True)", + "got": "round_floats(data2))", + "got_raw": "round_floats(data2))", + "exact_match": false, + "code_bleu": 0.12007302660701853, + "edit_similarity": 0.4473684210526316 + }, + { + "repo": "nerfbaselines/nerfbaselines", + "expected": "arr.shape", + "got": "arr.shape", + "got_raw": "arr.shape + (3,) if dtype == 'float32' else arr.shape + (1,) if dtype == 'float16' else arr.shape + (4,) if dtype == 'float64' else arr.shape + (2,) if dtype == 'float32' else arr.shape + (1,) if dtype == 'float16' else arr.shape + (3,) if dtype == 'float64' else arr.shape + (4,) if dtype == 'float32' else arr.shape + (2,) if dtype == 'float16' else arr.shape + (3,) if dtype", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nerfbaselines/nerfbaselines", + "expected": "members", + "got": "members", + "got_raw": "members assert os.path.exists(tmp_path/\"out\"/path) with _assert_not_none(Image.open(tmp_path/\"out\"/path)) as img: assert img.size == (20, 30) def _verify_folder_multi(tmp_path, num_cams, all_output_names): assert os.path.exists(tmp_path/\"out-multi\") members = os.listdir(tmp_path/\"out-multi\") assert len(members) == num_cams * len(all_output_names) for out in all_output_names: for i in range(num_cams): path = f\"{out}/{i:05d}.png\" assert f\"{out}/{i:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nerfbaselines/nerfbaselines", + "expected": "FileExistsError)", + "got": "ValueError)", + "got_raw": "ValueError) as e: evaluate(str(tmp_path / \"predictions\"), output=\"\") assert str(e.value) == \"output must be a non-empty string\" with pytest.raises( TypeError) as e: evaluate(123, output=\"\") assert str(e.value) == \"predictions must be a string or Path\" with pytest.raises( TypeError) as e: evaluate(123, output=\"\") assert str(e.value) == \"output must be a string or Path\" with pytest.raises( TypeError) as e: evaluate(123, output=123) assert str(e.value) == \"output must", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5925925925925926 + }, + { + "repo": "nerfbaselines/nerfbaselines", + "expected": "\"docker\"", + "got": "\"docker\"", + "got_raw": "\"docker\" method_cls.train(dataset) method_cls.evaluate(dataset) method_cls.save(\"test\") method_cls.load(\"test\") method_cls.evaluate(dataset) method_cls.save(\"test2\") method_cls.load(\"test2\") method_cls.evaluate(dataset) method_cls.save(\"test3\") method_cls.load(\"test3\") method_cls.evaluate(dataset) method_cls.save(\"test4\") method_cls.load(\"test4\") method_cls.evaluate(dataset) method_cls.save(\"test5\") method_cls.load(\"test5\") method_cls.evaluate(dataset) method_cls.save(\"test6\") method_cls.load(\"test6\") method_cls.evaluate(dataset) method_cls.save", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nerfbaselines/nerfbaselines", + "expected": "np.float32", + "got": "uv.dtype", + "got_raw": "uv.dtype assert dirs.dtype == uv.dtype assert origins.dtype == np.float32 assert dirs.dtype == np.float32 assert origins.shape[0] == dirs.shape[0] assert origins.shape[1] == 3 assert dirs.shape[1] == 3 assert origins.shape[0] == 12 * 15 assert origins.shape[1] == 3 assert dirs.shape[0] == 12 * 15 assert dirs.shape[1] == 3 assert origins.dtype == np.float32 assert dirs.dtype == np.float32 assert origins.shape[0] == dirs.shape[0]", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "nerfbaselines/nerfbaselines", + "expected": "\"Hello world\"", + "got": "\"Hello world\"", + "got_raw": "\"Hello world\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nerfbaselines/nerfbaselines", + "expected": "1", + "got": "3", + "got_raw": "3 + 2 * 2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "nerfbaselines/nerfbaselines", + "expected": "np.uint8", + "got": "np.uint8", + "got_raw": "np.uint8 out.shape == arr.shape assert abs(out[0] - 0) < 1e-5 assert abs(out[1] - 128) < 1e-5 assert abs(out[2] - 255) < 1e-5 assert abs(out[3] - 255) < 1e-5 assert abs(out[4] - 255) < 1e-5 out = convert_image_dtype(arr, 'uint8') assert out.dtype == np.uint8 out.shape == arr.shape assert abs(out[0] - 0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nerfbaselines/nerfbaselines", + "expected": "info", + "got": "info[\"metrics\"][\"render\"][-1]", + "got_raw": "info[\"metrics\"][\"render\"][-1] else info[\"metrics\"][\"render\"][-1] == {} # Test if metrics were saved at the end assert \"render\" in info[\"metrics\"] and \"render\" in info[\"metrics\"][\"render\"][-1] and \"render\" in info[\"metrics\"][\"render\"][-1][\"metrics\"] and \"render\" in info[\"metrics\"][\"render\"][-1][\"metrics\"][\"render\"] and \"render\" in info[\"metrics\"][\"render\"][-1][\"metrics\"][\"render\"][\"metrics\"] and \"render\" in info[\"metrics\"][\"render\"][-1][\"metrics\"][\"render\"][\"metrics\"][\"", + "exact_match": false, + "code_bleu": 0.11390778025531027, + "edit_similarity": 0.24242424242424243 + }, + { + "repo": "nipunsadvilkar/pySBD", + "expected": "\"char_span must be False if clean is True. \"\\ \"Since `clean=True` will modify original text.\"", + "got": "\"Cannot set both clean=True and char_span=True\"", + "got_raw": "\"Cannot set both clean=True and char_span=True\"", + "exact_match": false, + "code_bleu": 0.16666666666666666, + "edit_similarity": 0.34285714285714286 + }, + { + "repo": "nipunsadvilkar/pySBD", + "expected": "expected_sents", + "got": "expected_sents", + "got_raw": "expected_sents", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nipunsadvilkar/pySBD", + "expected": "expected_sents", + "got": "expected_sents", + "got_raw": "expected_sents", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nipunsadvilkar/pySBD", + "expected": "expected_sents", + "got": "expected_sents", + "got_raw": "expected_sents", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nipunsadvilkar/pySBD", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as e: Language()\nassert str(e.value) == \"Language code is required\"\n\n\ndef test_exception_on_invalid_lang_code_provided():\n\n with pytest.raises(\n### Target:\nValueError) as e: Language(\"invalid\")\nassert str(e.value) == \"Invalid language code: invalid\"\n\n\ndef test_exception_on_empty_lang_code_provided():\n\n with pytest.raises(\n### Target:\nValueError) as e: Language(\"\")\nassert str(e.value) == \"Language code cannot be empty\"\n\n\ndef test_exception_on_invalid_lang_code_type_provided():\n\n with pytest.raises(\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nonebot/nonebot2", + "expected": "200", + "got": "200", + "got_raw": "200 response.headers == { \"content-length\": \"4\", \"content-type\": \"text/html; charset=utf-8\", } response.body == b\"test\" assert response.raw_body == b\"test\" assert response.text == \"test\" assert response.json() == {} assert response.url == server_url assert response.url.raw_path == server_url.path assert response.url.raw_query == \"param=test\" assert response.url.raw_headers == { \"X-Test\": \"test\", } assert response.url.raw_cookies == {\"session\": \"test\"} assert response.url.raw_query_string == b\"param=test\" assert response.url.raw_fragment ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nonebot/nonebot2", + "expected": "kws", + "got": "kws.copy()", + "got_raw": "kws.copy() if kws else () # type: ignore assert checker.type == type assert checker.text == text assert checker.expected == expected assert checker.dependent is dependent assert checker.dependent_id == dependent.id assert checker.dependent_name == dependent.name assert checker.dependent_type == dependent.type assert checker.dependent_text == dependent.text assert checker.dependent_expected == dependent.expected assert checker.dependent_dependent is dependent.dependent assert checker.dependent_dependent_id == dependent.dependent_id assert checker.dependent_dependent_name == dependent.dependent_name assert checker.dependent_dependent", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.46153846153846156 + }, + { + "repo": "nonebot/nonebot2", + "expected": "r\"\\white\\\" # noqa: UP001\n\n\ndef test_loguru_escape_tag_with_emoji(): # noqa: UP001\n assert escape_tag(\"red\ud83d\ude0a\") == r\"\\red\\\ud83d\ude0a\" # noqa: UP001\n\n\ndef test_loguru_escape_tag_with_emoji_and_color(): # noqa: UP001\n assert escape_tag(\"white\ud83d\ude0a\") == r\"\\white\\\" in rendered_grid assert_valid_html(rendered_grid) def test_grid_with_three_tiles(self, minimal_linked_image_tile, grid_partial): context_data = { \"page\": { \"meta\": { \"tiles\": [ minimal_linked_image_tile, minimal_linked_image_tile, minimal_linked", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ntno/mkdocs-terminal", + "expected": "0", + "got": "0", + "got_raw": "0\n\n @pytest.mark.parametrize(\"palette_css_attributes\", [\"default\", \"dark\", \"gruvbox_dark\"], indirect=True)\n def test_palette_css_attributes_contains_expected_keys(self, palette_css_attributes):\n \"\"\"Test that palette_css_attributes contains expected keys.\"\"\"\n expected_keys = [\"background\", \"foreground\", \"cursor\", \"selection\", \"error\", \"warning\", \"info\", \"success\"]\n for key in expected_keys:\n assert key in palette_css_attributes\n\n @pytest.mark.parametrize(\"palette_css_attributes\", [\"default\", \"dark\", \"gruvbox_dark\"], indirect=True)\n def test", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nvbn/thefuck", + "expected": "known_args)", + "got": "known_args)", + "got_raw": "known_args) _get_alias_mock.assert_called_once_with(known_args) settings_mock.print_alias.assert_called_once_with(known_args) settings_mock.print_alias.return_value = 'alias' print_alias(known_args) assert settings_mock.print_alias.return_value == 'alias' print_alias(known_args) assert settings_mock.print_alias.return_value == 'alias' print_alias(known_args) assert settings_mock.print_alias.return_value == 'alias' print_alias(known_args) assert settings_mock.print_alias.return_value == 'alias' print_alias(known_args) assert settings_mock.print_alias.return_value == 'alias' print_alias(known_args)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nvbn/thefuck", + "expected": "result", + "got": "result", + "got_raw": "result", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nvbn/thefuck", + "expected": "result", + "got": "result.split('", + "got_raw": "result.split(' ')[0] + ' ' + ' '.join(result.split(' ')[1:])", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6 + }, + { + "repo": "nvbn/thefuck", + "expected": "OSError)", + "got": "OSError)", + "got_raw": "OSError) as e: shell.get_version() shell.get_version() == 'unknown' e.value.args[0] == 'Could not get thefuck version' Popen.return_value.stdout.read.return_value.decode.return_value = '1.0' shell.get_version() == '1.0' Popen.return_value.stdout.read.return_value.decode.return_value = '1.1' shell.get_version() == '1.1' Popen.return_value.stdout.read.return_value.decode.return_value = '1.2' shell.get_version() == '1.2' Popen.return_value.stdout.read.return_value.decode.return_value = '1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nvbn/thefuck", + "expected": "expected", + "got": "expected.decode()", + "got_raw": "expected.decode() + '\\n' + expected.decode() + '\\n' + expected.decode() + '\\n' + expected.decode() + '\\n' + expected.decode() + '\\n' + expected.decode() + '\\n' + expected.decode() + '\\n' + expected.decode() + '\\n' + expected.decode() + '\\n' + expected.decode() + '\\n' + expected.decode() + '\\n' + expected.decode() + '\\n' + expected.decode() + '\\n' + expected.decode() + '\\n' + expected.decode() + '\\n' + expected.decode() + '\\n' +", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.64 + }, + { + "repo": "nvbn/thefuck", + "expected": "'ls || cd'", + "got": "'ls || cd'", + "got_raw": "'ls || cd'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nvbn/thefuck", + "expected": "[result]", + "got": "result.split()", + "got_raw": "result.split() + ['--'] + known_args.args.split() + known_args.kwargs.split() + known_args.options.split() + known_args.env.split() + known_args.pre_command.split() + known_args.post_command.split() + known_args.post_args.split() + known_args.post_kwargs.split() + known_args.post_options.split() + known_args.post_env.split() + known_args.post_pre_command.split() + known_args.post_post_command.split() + known_args.post_post_args.split() + known_args.post_post_kwargs.split() + known_args.post_post_options.split() + known_args.post_post_env.split() + known_args.post_post_pre_command", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5454545454545454 + }, + { + "repo": "nvbn/thefuck", + "expected": "Command(called, '')", + "got": "Command('sudo ls', 'ls') assert command == Command('sudo ls -l', 'ls -l') assert command == Command('sudo ls -l -a', 'ls -l -a') assert command == Command('sudo ls -l -a -d', 'ls -l -a -d') assert command == Command('sudo ls -l -a -d -f', 'ls -l -a -d -f') assert command == Command('sudo ls -l -a -d -f -h', 'ls -l -a -d -f -h') assert command == Command('", + "got_raw": "Command('sudo ls', 'ls') assert command == Command('sudo ls -l', 'ls -l') assert command == Command('sudo ls -l -a', 'ls -l -a') assert command == Command('sudo ls -l -a -d', 'ls -l -a -d') assert command == Command('sudo ls -l -a -d -f', 'ls -l -a -d -f') assert command == Command('sudo ls -l -a -d -f -h', 'ls -l -a -d -f -h') assert command == Command('", + "exact_match": false, + "code_bleu": 0.028457024515317203, + "edit_similarity": 0.07446808510638298 + }, + { + "repo": "nvbn/thefuck", + "expected": "'Bash 3.5.9'", + "got": "'3.5.9' + os.linesep + 'The Fuck' + os.linesep + 'Copyright (c) 2012-2014 Nicolas Hennion' + os.linesep + 'License GPLv3+: GNU GPL version 3 or later' + os.linesep + 'This is free software: you are free to change and redistribute it.' + os.linesep + 'There is NO WARRANTY", + "got_raw": "'3.5.9' + os.linesep + 'The Fuck' + os.linesep + 'Copyright (c) 2012-2014 Nicolas Hennion' + os.linesep + 'License GPLv3+: GNU GPL version 3 or later' + os.linesep + 'This is free software: you are free to change and redistribute it.' + os.linesep + 'There is NO WARRANTY, to the extent permitted by law.' + os.linesep + 'Written by Nicolas Hennion' + os.linesep + 'and contributors' + os.linesep + 'http://github", + "exact_match": false, + "code_bleu": 0.02900074465673044, + "edit_similarity": 0.04946996466431095 + }, + { + "repo": "nvbn/thefuck", + "expected": "{CorrectedCommand('ls')}", + "got": "hash(CorrectedCommand('ls'", + "got_raw": "hash(CorrectedCommand('ls', None, 100))} == {hash(CorrectedCommand('ls', None, 100))}", + "exact_match": false, + "code_bleu": 0.4234439567955123, + "edit_similarity": 0.84 + }, + { + "repo": "nvbn/thefuck", + "expected": "new_cmd", + "got": "new_cmd", + "got_raw": "new_cmd", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nvbn/thefuck", + "expected": "1", + "got": "1.0000000000000001e-05", + "got_raw": "1.0000000000000001e-05 # 1e-5 is the default value for n in difflib.get_close_matches() difflib_mock.return_value = ['foo'] get_close_matches('', []) assert difflib_mock.call_args[0][1] == ['foo'] assert difflib_mock.call_args[0][2] == 1.0000000000000001e-05 # 1e-5 is the default value for n in", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.08695652173913043 + }, + { + "repo": "nvbn/thefuck", + "expected": "r\"sed -e 's/\\/foo/bar/'\"", + "got": "'sed -e s/foo/bar/') == 'sed -e s/foo/bar/')", + "got_raw": "'sed -e s/foo/bar/') == 'sed -e s/foo/bar/')", + "exact_match": false, + "code_bleu": 0.18575057999133598, + "edit_similarity": 0.5294117647058824 + }, + { + "repo": "nvbn/thefuck", + "expected": "new_command", + "got": "new_command.strip()", + "got_raw": "new_command.strip() + '\\n' + output + '\\n' + script + '\\n' + output + '\\n' + new_command + '\\n' + output + '\\n' + script + '\\n' + output + '\\n' + new_command + '\\n' + output + '\\n' + new_command + '\\n' + output + '\\n' + script + '\\n' + output + '\\n' + new_command + '\\n' + output + '\\n' + new_command + '\\n' + output + '\\n' + script + '\\n' + output + '\\n' +", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.7333333333333333 + }, + { + "repo": "nvbn/thefuck", + "expected": "['test']", + "got": "['test']", + "got_raw": "['test'] assert settings.wait_command == 10 assert settings.require_confirmation is True assert settings.no_colors is True assert settings.priority == {'vim': 100} assert settings.exclude_rules == ['git'] assert settings.debug is False assert settings.verbose is False assert settings.version is False assert settings.help is False assert settings.config is False assert settings.config_file is None assert settings.config_dir is None assert settings.config_path is None assert settings.config_file_path is None assert settings.config_dir_path is None assert settings.config_path_path is None assert settings.config_file_path_path is None assert settings.config_dir_path_path is None assert settings.config_path_path", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nvbn/thefuck", + "expected": "result", + "got": "result", + "got_raw": "result\n\n\ndef test_match(mocker):\n script = 'sudo npm install -g react-native-cli'\n output = 'sudo: npm: command not found'\n which_mock = mocker.patch('thefuck.rules.sudo_command_from_user_path.which',\n return_value='/usr/bin/npm')\n assert match(Command(script, output)) is True\n assert which_mock.call_count == 1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "nvbn/thefuck", + "expected": "new_command", + "got": "new_command.strip()", + "got_raw": "new_command.strip() + '\\n' + command.output.strip() + '\\n' + command.stderr.strip() + '\\n' + command.help_text.strip() + '\\n' + command.help_text.split('\\n')[1] + '\\n' + command.help_text.split('\\n')[2] + '\\n' + command.help_text.split('\\n')[3] + '\\n' + command.help_text.split('\\n')[4] + '\\n' + command.help_text.split('\\n')[5] + '\\n' + command.help_text.split('\\n')[6] + '\\n' + command.help_text.split('\\n')[", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.7333333333333333 + }, + { + "repo": "nvbn/thefuck", + "expected": "output", + "got": "output.strip()", + "got_raw": "output.strip() + '\\n' + git_ok.strip() + '\\n' + git_uptodate.strip() + '\\n' + git_err.strip() + '\\n' + git_err2.strip() + '\\n' + git_uptodate.strip() + '\\n' + git_err2.strip() + '\\n' + git_uptodate.strip() + '\\n' + git_err.strip() + '\\n' + git_err2.strip() + '\\n' + git_uptodate.strip() + '\\n' + git_err.strip() + '\\n' + git_err2.strip() + '\\n' +", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6 + }, + { + "repo": "nvbn/thefuck", + "expected": "['ls', 'rm']", + "got": "['ls', 'rm'] * 2 + ['ls'] * 2 + ['ls -CF'] + ['ls -A'] + ['ls -alF'] + ['ls'] * 2 + ['ls -CF'] + ['ls -A'] + ['ls -alF'] + ['ls'] * 2 + ['ls -CF'] + ['ls -A'] + ['ls -alF'] + ['ls'] * 2 + ['ls -CF'] + ['ls -A'] + ['ls -alF'] + ['ls'] * 2 + ['ls -CF'] + ['", + "got_raw": "['ls', 'rm'] * 2 + ['ls'] * 2 + ['ls -CF'] + ['ls -A'] + ['ls -alF'] + ['ls'] * 2 + ['ls -CF'] + ['ls -A'] + ['ls -alF'] + ['ls'] * 2 + ['ls -CF'] + ['ls -A'] + ['ls -alF'] + ['ls'] * 2 + ['ls -CF'] + ['ls -A'] + ['ls -alF'] + ['ls'] * 2 + ['ls -CF'] + ['", + "exact_match": false, + "code_bleu": 0.04760876938671599, + "edit_similarity": 0.0898876404494382 + }, + { + "repo": "nvbn/thefuck", + "expected": "after", + "got": "after", + "got_raw": "after + '; echo $?' + os.linesep + '0' + os.linesep + '0' + os.linesep + '0' + os.linesep + '0' + os.linesep + '0' + os.linesep + '0' + os.linesep + '0' + os.linesep + '0' + os.linesep + '0' + os.linesep + '0' + os.linesep + '0' + os.linesep + '0' + os.linesep + '0' + os.linesep + '0' + os.linesep + '0' + os", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "offu/WeRoBot", + "expected": "'toUser'", + "got": "'source'", + "got_raw": "'source' assert reply._args['to_user_name'] == 'toUser' assert reply._args['from_user_name'] == 'fromUser' assert reply._args['create_time'] == 1348831860 assert reply._args['msg_type'] == 'text' assert reply._args['content'] == '\u55b5fdsjaklfsk' assert reply._args['msg_id'] == 1234567890123456 assert reply._args['pic_url'] == 'this is a url' assert reply._args['media_id']", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "offu/WeRoBot", + "expected": "u'\u606d\u559c\u8131\u5751'", + "got": "u'\u606d\u559c\u8131\u5751'", + "got_raw": "u'\u606d\u559c\u8131\u5751'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "offu/WeRoBot", + "expected": "xml", + "got": "xml.decode()", + "got_raw": "xml.decode() message.type == \"unknown\" message.create_time == 1351776360 message.from_user.name == \"fromUser\" message.from_user.id == \"fromUser\" message.to_user.name == \"toUser\" message.to_user.id == \"toUser\" message.title == \"WeRoBot\" message.description == \"Link to WeRoBot\" message.url == \"https://github.com/whtsky/WeRoBot\" message.msg_id == 1234567890123456 message.source == \"unknown\" message.source_type == \"unknown\"", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.4 + }, + { + "repo": "offu/WeRoBot", + "expected": "[(scan_handler, 0)]", + "got": "[(scan_handler, 0)] + robot._handlers[\"click_event\"] + robot._handlers[\"subscribe_event\"] + robot._handlers[\"unsubscribe_event\"] + robot._handlers[\"location_event\"] + robot._handlers[\"event\"] + robot._handlers[\"video_event\"] + robot._handlers[\"shortvideo_event\"] + robot._handlers[\"link_event\"] + robot._handlers[\"location_event\"] + robot._handlers[\"voice_event\"] + robot._handlers[\"event\"] + robot._handlers[\"video_event\"] + robot._handlers[\"shortvideo_event\"] + robot._handlers[\"link_event\"] + robot._handlers[\"location_event\"] +", + "got_raw": "[(scan_handler, 0)] + robot._handlers[\"click_event\"] + robot._handlers[\"subscribe_event\"] + robot._handlers[\"unsubscribe_event\"] + robot._handlers[\"location_event\"] + robot._handlers[\"event\"] + robot._handlers[\"video_event\"] + robot._handlers[\"shortvideo_event\"] + robot._handlers[\"link_event\"] + robot._handlers[\"location_event\"] + robot._handlers[\"voice_event\"] + robot._handlers[\"event\"] + robot._handlers[\"video_event\"] + robot._handlers[\"shortvideo_event\"] + robot._handlers[\"link_event\"] + robot._handlers[\"location_event\"] +", + "exact_match": false, + "code_bleu": 0.05691100387495379, + "edit_similarity": 0.06909090909090909 + }, + { + "repo": "offu/WeRoBot", + "expected": "getattr(logging, level.upper())", + "got": "getattr(logging, level.upper()) + 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "getattr(logging, level.upper()) + 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.8242367502646054, + "edit_similarity": 0.33513513513513515 + }, + { + "repo": "offu/WeRoBot", + "expected": "\"hq\"", + "got": "hq_url", + "got_raw": "hq_url = \"hq\" reply.hq_url == \"hq\" reply.hq_url == \"hq\" reply.hq_url == \"hq\" reply.hq_url == \"hq\" reply.hq_url == \"hq\" reply.hq_url == \"hq\" reply.hq_url == \"hq\" reply.hq_url == \"hq\" reply.hq_url == \"hq\" reply.hq_url == \"hq\" reply.hq_url == \"hq\" reply.hq_url == \"hq\" reply.hq_url == \"hq\" reply.hq_url == \"hq\" reply.hq_url == \"hq\" reply.h", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4 + }, + { + "repo": "offu/WeRoBot", + "expected": "u'\u626b\u63cf\u63a8\u9001'", + "got": "u'\u626b\u63cf\u63a8\u9001'", + "got_raw": "u'\u626b\u63cf\u63a8\u9001'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "offu/WeRoBot", + "expected": "0", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "offu/WeRoBot", + "expected": "None", + "got": "None", + "got_raw": "None and len(message) > 0 and len(message) < 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "offu/WeRoBot", + "expected": "\"url\"", + "got": "\"hq\"", + "got_raw": "\"hq\" assert reply.hq_url == \"url\" reply = process_function_reply([\"title\", \"desc\", \"url\", \"hq\", \"pic\"]) assert isinstance(reply, MusicReply) assert reply.title == \"title\" assert reply.description == \"desc\" assert reply.url == \"hq\" assert reply.hq_url == \"pic\" reply = process_function_reply([\"title\", \"desc\", \"url\", \"hq\", \"pic\", \"thumb\"]) assert isinstance(reply, MusicReply) assert reply.title == \"title\" assert reply.description == \"desc\" assert reply.url == \"hq\" assert reply.hq_url == \"pic", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4444444444444444 + }, + { + "repo": "offu/WeRoBot", + "expected": "token", + "got": "token", + "got_raw": "token", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "omni-us/jsonargparse", + "expected": "cfg.jsonnet[\"param\"]", + "got": "cfg.ext_vars[\"param\"]", + "got_raw": "cfg.ext_vars[\"param\"] == cfg.jsonnet[\"param\"] == 42 == cfg.jsonnet[\"x\"] == 123 == cfg.jsonnet[\"y\"] == 456 == cfg.jsonnet[\"z\"] == 789 == cfg.jsonnet[\"a\"] == 1234 == cfg.jsonnet[\"b\"] == 5678 == cfg.jsonnet[\"c\"] == 9012 == cfg.jsonnet[\"d\"] == 3456 == cfg.jsonnet[\"e\"] == 7890 == cfg.jsonnet[\"f\"] == 1", + "exact_match": false, + "code_bleu": 0.488923022434901, + "edit_similarity": 0.7317073170731707 + }, + { + "repo": "omni-us/jsonargparse", + "expected": "path2", + "got": "path1.resolve()", + "got_raw": "path1.resolve() == path1 == path1.as_posix() == path1.as_uri() == path1.as_posix() == path1.as_uri() == path1.as_uri() == path1.as_uri() == path1.as_uri() == path1.as_uri() == path1.as_uri() == path1.as_uri() == path1.as_uri() == path1.as_uri() == path1.as_uri() == path1.as_uri() == path1.as_uri() == path1.as_uri() == path1.as_uri() == path1.as_uri() == path1.as_uri() == path1.as_uri", + "exact_match": false, + "code_bleu": 0.2295748846661433, + "edit_similarity": 0.4 + }, + { + "repo": "omni-us/jsonargparse", + "expected": "cfg.a1", + "got": "cfg.data_field_factory_list[0].data_field_factory_list[0]", + "got_raw": "cfg.data_field_factory_list[0].data_field_factory_list[0] + [1] + [2] + [3] + [1] + [2] + [3] + [1] + [2] + [3] + [1] + [2] + [3] + [1] + [2] + [3] + [1] + [2] + [3] + [1] + [2] + [3] + [1] + [2] + [3] + [1] + [2] + [3] + [1] +", + "exact_match": false, + "code_bleu": 0.14991106946711685, + "edit_similarity": 0.15873015873015872 + }, + { + "repo": "omni-us/jsonargparse", + "expected": "torch.Tensor", + "got": "torch.Tensor", + "got_raw": "torch.Tensor or torch.TensorType or torch.TensorTypeVar or torch.TensorTypeVarTuple or torch.TensorTypeVarTupleVar or torch.TensorTypeVarTupleVarTuple or torch.TensorTypeVarTupleVarTupleVar or torch.TensorTypeVarTupleVarTupleVarTuple or torch.TensorTypeVarTupleVarTupleVarTupleVar or torch.TensorTypeVarTupleVarTupleVarTupleVarTuple or torch.TensorTypeVarTupleVarTupleVarTupleVarTupleVar or torch.TensorTypeVarTupleVarTupleVarTupleVarTupleVarTuple or torch.TensorTypeVarTupleVarTupleVarTupleVarTupleVarTupleVar or torch.TensorTypeVarTupleVarTupleVarTupleVarTuple", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "omni-us/jsonargparse", + "expected": "cfg[\"op1\"]", + "got": "cfg[\"op1\"]", + "got_raw": "cfg[\"op1\"]\n\n\ndef test_schema_array_parse_list(parser):\n cfg = parser.parse_args([\"--op1\", \"[3, 7]\"])\n\n assert [3, 7] == cfg[\"op1\"]\n\n\ndef test_schema_array_parse_empty_list(parser):\n cfg = parser.parse_args([\"--op1\", \"[]\"])\n\n assert [] == cfg[\"op1\"]\n\n\ndef test_schema_array_parse_empty_string(parser):\n cfg = parser.parse_args([\"--op1\", \"\"])\n\n assert [] == cfg[\"op1\"]\n\n\ndef test_schema_array_parse_invalid(parser):\n with pytest.raises", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "omni-us/jsonargparse", + "expected": "2", + "got": "\"p1\"", + "got_raw": "\"p1\" assert cfg.model.p2 == \"p2\" assert cfg.model.p3 == 3.0 assert cfg.model.p4 == 4.0 assert cfg.model.p5 == 5.0 assert cfg.model.p6 == 6.0 assert cfg.model.p7 == 7.0 assert cfg.model.p8 == 8.0 assert cfg.model.p9 == 9.0 assert cfg.model.p10 == 10.0 assert cfg.model.p11 == 11.0 assert cfg.model.p12 == 12.0 assert cfg.model.p13 == ", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "omni-us/jsonargparse", + "expected": "\"required\"", + "got": "\"required\"", + "got_raw": "\"required\" instance.param2 == 2.0\n\n\ndef test_init_defaults_override_preserve_required_with_default(tmp_cwd):\n config_path = tmp_cwd / \"config.yaml\"\n config_path.write_text(json_or_yaml_dump({\"param2\": 2}))\n\n class DefaultsOverrideRequiredParameters(FromConfigMixin):\n __from_config_init_defaults__ = config_path\n\n def __init__(self, param1: str, param2: int = 1):\n self.param1 = param1\n self.param2 = param2\n\n instance = DefaultsOverrideRequiredParameters(param1=\"required\")\n\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "omni-us/jsonargparse", + "expected": "Namespace()", + "got": "Namespace()", + "got_raw": "Namespace() # type: ignore # noqa: E701 # pylint: disable=comparison-with-callable # noqa: E711 # pylint: disable=comparison-with-callable # noqa: E711 # pylint: disable=comparison-with-callable # noqa: E711 # pylint: disable=comparison-with-callable # noqa: E711 # pylint: disable=comparison-with-callable # noqa: E711 # pylint: disable=comparison-with-callable # noqa: E711 # pylint: disable", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "omni-us/jsonargparse", + "expected": "3", + "got": "3.0", + "got_raw": "3.0 # float 3.0 # float 3.0 # float 3.0 # float 3.0 # float 3.0 # float 3.0 # float 3.0 # float 3.0 # float 3.0 # float 3.0 # float 3.0 # float 3.0 # float 3.0 # float 3.0 # float 3.0 # float 3.0 # float 3.0 # float 3.", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "omni-us/jsonargparse", + "expected": "[1, 2]", + "got": "cfg2.model.p1 == 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", + "got_raw": "cfg2.model.p1 == 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", + "exact_match": false, + "code_bleu": 0.13485111859503685, + "edit_similarity": 0.013888888888888888 + }, + { + "repo": "omni-us/jsonargparse", + "expected": "cfg.data", + "got": "cfg.data", + "got_raw": "cfg.data # type: ignore # noqa: E711 # pylint: disable=comparison-with-callable # pylint: disable=comparison-with-callable # noqa: E711 # pylint: disable=comparison-with-callable # pylint: disable=comparison-with-callable # noqa: E711 # pylint: disable=comparison-with-callable # pylint: disable=comparison-with-callable # noqa: E711 # pylint: disable=comparison-with-callable # pylint: disable=comparison-with-callable # noqa: E711 ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "omni-us/jsonargparse", + "expected": "\"B\"", + "got": "\"b\"", + "got_raw": "\"b\" cfg[\"subparser\"] is None cfg[\"args\"] == [] cfg[\"kwargs\"] == {} cfg[\"subparser_args\"] == [] cfg[\"subparser_kwargs\"] == {} cfg[\"subparser_env\"] = {} cfg[\"subparser_env_prefix\"] = \"APP\" cfg[\"subparser_env_separator\"] = \"=\" cfg[\"subparser_env_delimiter\"] = \":\" cfg[\"subparser_env\"] = {} cfg[\"subparser_env_prefix\"] = \"APP\" cfg[\"subparser_env_separator\"] = \"=\" cfg[\"subparser_env_delimiter\"] = \":\" cfg[\"subparser_env\"] = {} cfg[\"subparser_env_prefix", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "omni-us/jsonargparse", + "expected": "json.loads(help_schema)", + "got": "json.loads(help_schema)", + "got_raw": "json.loads(help_schema) if help_schema else None # noqa: E127, E501 # noqa: E127, E501 # noqa: E127, E501 # noqa: E127, E501 # noqa: E127, E501 # noqa: E127, E501 # noqa: E127, E501 # noqa: E127, E501 # noqa: E127, E501 # noqa: E127, E5", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "omni-us/jsonargparse", + "expected": "loaders[\"omegaconf\"]", + "got": "yaml_dump.yaml_loader", + "got_raw": "yaml_dump.yaml_loader # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E72", + "exact_match": false, + "code_bleu": 0.2849383821193472, + "edit_similarity": 0.2926829268292683 + }, + { + "repo": "omni-us/jsonargparse", + "expected": "\"secret\"", + "got": "\"secret\"", + "got_raw": "\"secret\"\n\n\ndef test_secret_str_parsing_with_default(parser):\n parser.add_argument(\"--password\", type=SecretStr, default=\"secret\")\n cfg = parser.parse_args([])\n assert isinstance(cfg.password, SecretStr)\n assert cfg.password.get_secret_value() == \"secret\"\n\n\ndef test_secret_str_parsing_with_default_and_required(parser):\n parser.add_argument(\"--password\", type=SecretStr, default=\"secret\", required=True)\n with pytest.raises(ArgumentError) as exc_info:\n parser.parse_args([])\n assert str(exc_info.value) == \"Missing argument --password", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "omni-us/jsonargparse", + "expected": "TypeError)", + "got": "TypeError)", + "got_raw": "TypeError) as exc_info: subparser = ActionParser(parser=parser) subparser.add_argument(\"--opt1\") subparser.add_argument(\"--opt2\") subparser.add_argument(\"--opt3\") subparser.add_argument(\"--opt4\") subparser.add_argument(\"--opt5\") subparser.add_argument(\"--opt6\") subparser.add_argument(\"--opt7\") subparser.add_argument(\"--opt8\") subparser.add_argument(\"--opt9\") subparser.add_argument(\"--opt10\") subparser.add_argument(\"--opt11\") subparser.add_argument(\"--opt12\") subparser.add_argument(\"--opt13\") subparser.add_argument(\"--", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "omni-us/jsonargparse", + "expected": "\"-\"", + "got": "pathlib.Path(\"-\")", + "got_raw": "pathlib.Path(\"-\") if is_posix() else Path(\"-\") if os.name == \"nt\" else Path(\"-\") if os.name == \"posix\" else Path(\"-\") if os.name == \"nt\" else Path(\"-\") if os.name == \"nt\" else Path(\"-\") if os.name == \"nt\" else Path(\"-\") if os.name == \"nt\" else Path(\"-\") if os.name == \"nt\" else Path(\"-\") if os.name == \"nt\" else Path(\"-\") if os.name == \"nt\" else Path(\"-\") if os.name == \"nt\" else Path(\"-\") if os.name ==", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.3 + }, + { + "repo": "omni-us/jsonargparse", + "expected": "origins", + "got": "origins", + "got_raw": "origins if origins else {} # noqa: E127, E129, E128, E123, E124, E125, E126, E127, E128, E129, E123, E124, E125, E126, E127, E128, E129, E123, E124, E125, E126, E127, E128, E12", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "omni-us/jsonargparse", + "expected": "\"WithLogger\"", + "got": "\"test_logger\"", + "got_raw": "\"test_logger\" + str(id(test)) + \"1\" + str(id(test)) + \"2\" + str(id(test)) + \"3\" + str(id(test)) + \"4\" + str(id(test)) + \"5\" + str(id(test)) + \"6\" + str(id(test)) + \"7\" + str(id(test)) + \"8\" + str(id(test)) + \"9\" + str(id(test)) + \"10\" + str(id(test)) + \"11\" + str(id(test)) + \"12\" + str(id(test)) + \"13\" + str(id", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.64 + }, + { + "repo": "omni-us/jsonargparse", + "expected": "cfg", + "got": "cfg.args()", + "got_raw": "cfg.args() == cfg.args() == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg == cfg ==", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.46153846153846156 + }, + { + "repo": "online-judge-tools/oj", + "expected": "len(expected))", + "got": "len(expected))", + "got_raw": "len(expected)) for i in range(len(data)): self.assertEqual(data[i], expected[i]) return data def test_echo(self) -> None: self.snippet_call_test(['echo', 'hello'], None, ['hello']) def test_echo_2(self) -> None: self.snippet_call_test(['echo', 'hello', 'world'], None, ['hello', 'world']) def test_echo_3(self) -> None: self.snippet_call_test(['echo', 'hello', 'world', '!', '!', '!', '!', '!', '!', '!', '!', '!', '!', '!', '!', '!', '!',", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "online-judge-tools/oj", + "expected": "1)", + "got": "1)", + "got_raw": "1) self.assertEqual(proc.stdout, 'Login failed\\n') self.assertEqual(proc.stderr, '') self.assertEqual(proc.files_created, []) self.assertEqual(proc.files_removed, []) self.assertEqual(proc.files_modified, []) self.assertEqual(proc.files_changed, []) self.assertEqual(proc.files_unchanged, []) self.assertEqual(proc.files_skipped, []) self.assertEqual(proc.files_failed, []) self.assertEqual(proc.files_errored, []) self.assertEqual(proc.files_unhandled, []) self.assertEqual(proc.files_unhandled_error, []) self.assertEqual(proc.files_unhandled_warning, []) self.assertEqual(proc.files_unhandled_info, []) self.assertEqual(proc.files_unhandled_debug, []) self.assertEqual(proc.files_un", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "online-judge-tools/oj", + "expected": "0)", + "got": "0)", + "got_raw": "0) self.assertEqual(proc.stderr, b'Wrong answer\\n') self.assertEqual(proc.stdout, b'') self.assertEqual(proc.stdout, b'') self.assertEqual(proc.stdout, b'') self.assertEqual(proc.stdout, b'') self.assertEqual(proc.stdout, b'') self.assertEqual(proc.stdout, b'') self.assertEqual(proc.stdout, b'') self.assertEqual(proc.stdout, b'') self.assertEqual(proc.stdout, b'') self.assertEqual(proc.stdout, b'') self.assertEqual(proc.stdout, b'') self.assertEqual(proc.stdout, b'') self.assertEqual(proc.stdout, b'') self.assertEqual(proc.stdout, b'') self.assertEqual(proc", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "online-judge-tools/oj", + "expected": "expect['data'])", + "got": "expect['data'])", + "got_raw": "expect['data']) if disallowed_files is not None else self.assertFalse(os.path.exists(disallowed_files)) if expect['error'] is not None: self.assertIn(expect['error'], tests.utils.get_output()) else self.assertEqual('', tests.utils.get_output())", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "oomol-lab/epub-translator", + "expected": "rt.text", + "got": "rt.text.strip()", + "got_raw": "rt.text.strip() if rt.text else \"\" # \u7531\u4e8e\u5143\u6570\u636e\u7684\u987a\u5e8f\u53ef\u80fd\u4e0d\u540c\uff0c\u6240\u4ee5\u8fd9\u91cc\u4f7f\u7528strip()\u6765\u53bb\u9664\u7a7a\u683c\u548c\u6362\u884c\u7b26\u3002 # \u8bf7\u6ce8\u610f\uff0c\u8fd9\u53ea\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u9a8c\u8bc1\uff0c\u5b9e\u9645\u7684\u5143\u6570\u636e\u7ed3\u6784\u53ef\u80fd\u9700\u8981\u66f4\u590d\u6742\u7684\u6bd4\u8f83\u3002 # \u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528json.dumps()\u6765\u6bd4\u8f83\u5143\u6570\u636e\u7684JSON\u8868\u793a\u3002 # \u8bf7\u6839\u636e\u60a8\u7684\u5177\u4f53\u9700\u6c42\u8fdb\u884c\u8c03\u6574\u3002", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.6363636363636364 + }, + { + "repo": "oomol-lab/epub-translator", + "expected": "spine_names", + "got": "spine_names", + "got_raw": "spine_names and \"7359.xhtml\" in spine_names and \"7360.xhtml\" in spine_names and \"7361.xhtml\" in spine_names and \"7362.xhtml\" in spine_names and \"7363.xhtml\" in spine_names and \"7364.xhtml\" in spine_names and \"7365.xhtml\" in spine_names and \"7366.xhtml\" in spine_names and \"7367.xhtml\" in spine_names and \"7368.xhtml\" in spine_names and \"7369.xhtml\" in spine_names and \"73", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "oomol-lab/epub-translator", + "expected": "0", + "got": "0", + "got_raw": "0\n\n # chunk 1 \u5305\u542b\u524d\u4e24\u4e2a\u6bb5\u843d\uff0c\u603b\u5171\u6709 10 \u4e2a token\n chunk1 = chunks[0] # type: ignore\n assert chunk1.tokens == 10 # 5 + 5 = 10 tokens\n\n # chunk 2 \u5305\u542b\u7b2c\u4e09\u4e2a\u6bb5\u843d\uff0c\u603b\u5171\u6709 6 \u4e2a token\n chunk2 = chunks[1] # type: ignore\n assert chunk2.tokens == 6 # 6 tokens\n\n # chunk 3 \u4e3a\u7a7a\uff0c\u56e0\u4e3a\u603b\u5171\u6709 11 \u4e2a token\uff0c\u8d85\u8fc7\u4e86 ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "oomol-lab/epub-translator", + "expected": "result_str)", + "got": "result_str)", + "got_raw": "result_str) self.assertIn('\u63cf\u8ff0\u6587\u672c', result_str) self.assertIn(\"Tail text after description.\", result_str) self.assertIn('

Paragraph text

', result_str) self.assertIn('

\u6bb5\u843d\u6587\u672c

', result_str) self.assertIn(\"\u6bb5\u843d\u6587\u672c\", result_str) self.assertIn(\"\u6bb5\u843d\u6587\u672c\", result_str) self.assertIn(\"\u6bb5\u843d\u6587\u672c\", result_str) self.assertIn(\"\u6bb5\u843d\u6587\u672c\", result_str) self.assertIn(\"\u6bb5\u843d\u6587\u672c\", result_str) self.assertIn(\"\u6bb5\u843d\u6587\u672c\", result_str) self.assertIn(\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "oomol-lab/epub-translator", + "expected": "10000", + "got": "len(long_text)", + "got_raw": "len(long_text) + 1 # +1 \u662f\u4e3a\u4e86\u5305\u542b\u6362\u884c\u7b26", + "exact_match": false, + "code_bleu": 0.3021375397356768, + "edit_similarity": 0.0 + }, + { + "repo": "oomol-lab/epub-translator", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "oomol-lab/epub-translator", + "expected": "r\"\\sqrt{x}\"", + "got": "r\"\\sqrt{x}\"", + "got_raw": "r\"\\sqrt{x}\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "oomol-lab/epub-translator", + "expected": "\"\u5e94\u8be5\u5305\u542b\u7236\u5143\u7d20\u7684\u8bd1\u6587\")", + "got": "\"\u5e94\u8be5\u5305\u542b\u7236\u5143\u7d20\")", + "got_raw": "\"\u5e94\u8be5\u5305\u542b\u7236\u5143\u7d20\") self.assertIn(\"\u6570\u5b66\u516c\u5f0f\", result_str, \"\u5e94\u8be5\u5305\u542b\u6570\u5b66\u516c\u5f0f\") self.assertIn(\"formula\", result_str, \"\u5e94\u8be5\u5305\u542b\u516c\u5f0f\") self.assertIn(\"display\", result_str, \"\u5e94\u8be5\u5305\u542b display\") self.assertIn(\"inline\", result_str, \"\u5e94\u8be5\u5305\u542b inline\") self.assertIn(\">\", result_str, \"\u5e94\u8be5\u5305\u542b >\") self.assertIn(\"<\", result_str, \"\u5e94\u8be5\u5305\u542b <\") self.assertIn(\" \", result_str, \"\u5e94\u8be5\u5305\u542b \u7a7a\u683c\") self.assertIn(\" \", result_str, \"\u5e94\u8be5\u5305\u542b \u7a7a\u683c\") self.assertIn(\" \", result_str, \"\u5e94\u8be5\u5305\u542b \u7a7a\u683c", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.8695652173913043 + }, + { + "repo": "oomol-lab/epub-translator", + "expected": "5)", + "got": "3)", + "got_raw": "3) # A, B, E self.assertEqual(text_segments[0].text, \"A\") self.assertEqual(text_segments[1].text, \"B\") self.assertEqual(text_segments[2].text, \"E\") # BCD self.assertEqual(len(text_segments[1].children), 1) self.assertEqual(text_segments[1].children[0].tag, \"span\") self.assertEqual(len(text_segments[1].children[0].children), 3) self.assertEqual(text_segments[1].children[0].children[0].tag", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "openai/chatgpt-retrieval-plugin", + "expected": "collection_size_callback_factory(collection, 3))", + "got": "collection_size_callback_factory(collection, 3))", + "got_raw": "collection_size_callback_factory(collection, 3))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "openai/chatgpt-retrieval-plugin", + "expected": "len(query_results)", + "got": "len(query_results)", + "got_raw": "len(query_results) 1 == len(query_results[0].results) 0 == len(query_results[0].results[0].matches) 1 == len(query_results[0].results[0].matches[0].chunk_ids) 1 == len(query_results[0].results[0].matches[0].scores) 0 == len(query_results[0].results[0].matches[0].scores[0].scores) 0 == len(query_results[0].results[0].matches[0].scores[0].offsets) 0 == len(query_results[0].results[0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "openai/chatgpt-retrieval-plugin", + "expected": "4", + "got": "4", + "got_raw": "4 # 4 documents in the test data set.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "openai/chatgpt-retrieval-plugin", + "expected": "created_at.data_type", + "got": "created_at.type_", + "got_raw": "created_at.type_", + "exact_match": false, + "code_bleu": 0.5946035575013605, + "edit_similarity": 0.8333333333333334 + }, + { + "repo": "openai/chatgpt-retrieval-plugin", + "expected": "\"first-doc-5\"", + "got": "\"first-doc-5\"", + "got_raw": "\"first-doc-5\" assert query_1_results[1].id == \"first-doc-6\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "openai/chatgpt-retrieval-plugin", + "expected": "'mongodb'", + "got": "\"mongodb\"", + "got_raw": "\"mongodb\" assert os.environ[\"EMBEDDING_DIMENSION\"] == \"3\" assert os.environ[\"EMBEDDING_MODEL\"] == \"text-embedding-ada-002\" assert os.environ[\"MONGODB_COLLECTION\"] == \"documents\" assert os.environ[\"MONGODB_DATABASE\"] == \"test\" assert os.environ[\"MONGODB_INDEX\"] == \"vector\" assert os.environ[\"MONGODB_URI\"] == \"mongodb://localhost:27017\" assert os.environ[\"OPENAI_API_KEY\"] is not None assert os.environ[\"BEARER_TOKEN\"] is not None assert required_vars.issubset(set", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.7777777777777778 + }, + { + "repo": "openai/chatgpt-retrieval-plugin", + "expected": "sum( len(v) for v in document_chunks.values() )", + "got": "len(document_chunks) * N_TEST_CHUNKS + 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "len(document_chunks) * N_TEST_CHUNKS + 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.12789491606307787, + "edit_similarity": 0.20689655172413793 + }, + { + "repo": "openai/chatgpt-retrieval-plugin", + "expected": "new_store.col.num_entities", + "got": "new_store.col.num_entities", + "got_raw": "new_store.col.num_entities + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "openai/chatgpt-retrieval-plugin", + "expected": "f\"{field} eq 'test''_{field}'\"", + "got": "f\"{field} eq '{needs_escaping_value}'\" == AzureSearchDataStore._translate_filter( DocumentMetadataFilter(**{field: needs_escaping_value}) )", + "got_raw": "f\"{field} eq '{needs_escaping_value}'\" == AzureSearchDataStore._translate_filter( DocumentMetadataFilter(**{field: needs_escaping_value}) )", + "exact_match": false, + "code_bleu": 0.06439931429457924, + "edit_similarity": 0.28402366863905326 + }, + { + "repo": "openai/chatgpt-retrieval-plugin", + "expected": "\"The quick brown fox jumped over the slimy green toad.\"", + "got": "\"The big brown bear jumped over the lazy dog.\" assert 0.7 < scores[1] < 0.8 assert answers[1] == \"The quick brown fox jumped over the slimy green toad.\" assert scores[2] == 0.0 assert answers[2] == \"Toads are frogs.\" assert scores[3] == 0.0 assert answers[3] == \"Green toads are basically red frogs.\"", + "got_raw": "\"The big brown bear jumped over the lazy dog.\" assert 0.7 < scores[1] < 0.8 assert answers[1] == \"The quick brown fox jumped over the slimy green toad.\" assert scores[2] == 0.0 assert answers[2] == \"Toads are frogs.\" assert scores[3] == 0.0 assert answers[3] == \"Green toads are basically red frogs.\"", + "exact_match": false, + "code_bleu": 0.02403051755364481, + "edit_similarity": 0.30985915492957744 + }, + { + "repo": "openai/chatgpt-retrieval-plugin", + "expected": "\"doc:first-doc:chunk:first-doc-4\"", + "got": "\"first-doc-4\"", + "got_raw": "\"first-doc-4\" assert query_1_results[0].id == \"first-doc-5\" assert query_1_results[1].id == \"first-doc-6\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5652173913043478 + }, + { + "repo": "openapi-generators/openapi-python-client", + "expected": "MyModel(enum_prop=2))", + "got": "MyModel(enum_prop=2))", + "got_raw": "MyModel(enum_prop=2)) assert_model_decode_encode(MyModel, {\"enumProp\": \"foo\"}, MyModel(enum_prop=\"foo\")) assert_model_decode_encode(MyModel, {\"enumProp\": 1.5}, MyModel(enum_prop=1.5)) assert_model_decode_encode(MyModel, {\"enumProp\": 1}, MyModel(enum_prop=1)) assert_model_decode_encode(MyModel, {\"enumProp\": 0}, MyModel(enum_prop=0)) assert_model_decode_encode(MyModel, {\"enumProp\": -1}, MyModel(enum_prop=-1)) assert_model_decode_encode(MyModel, {\"enumProp\": -", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "openapi-generators/openapi-python-client", + "expected": "MyModel(date_prop=date_value))", + "got": "MyModel(date_prop=date_value))", + "got_raw": "MyModel(date_prop=date_value))\n\n assert_model_property_type_hint(MyModel, \"date_prop\", datetime.date)\n\n def test_datetime(self, MyModel):\n datetime_value = datetime.datetime.now()\n json_data = {\"datetimeProp\": datetime_value.isoformat()}\n\n assert_model_decode_encode(MyModel, json_data, \n### Target: MyModel(datetime_prop=datetime_value)) assert_model_property_type_hint(MyModel, \"datetime_prop\", datetime.datetime) def test_uuid(self, MyModel): uuid_value = uuid.uuid4() json_data = {\"uuidProp\": str(uuid_value)} assert_model_decode_encode(MyModel,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "openapi-generators/openapi-python-client", + "expected": "KeyError)", + "got": "TypeError)", + "got_raw": "TypeError) as exc_info: MyModel() assert str(exc_info.value) == \"Missing required property 'required_prop'\" with pytest.raises(TypeError) as exc_info: DerivedModel() assert str(exc_info.value) == \"Missing required property 'required_prop'\" with pytest.raises(TypeError) as exc_info: DerivedModel(derived_prop=\"derived\") assert str(exc_info.value) == \"Missing required property 'required_prop'\" with pytest.raises(TypeError) as exc_info: DerivedModel(derived_prop=\"derived\", required_prop=\"required\") assert str(exc_info.value) == \"Missing required property 'required_prop'\" with pytest.raises(TypeError) as exc_info", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.7368421052631579 + }, + { + "repo": "openapi-generators/openapi-python-client", + "expected": "DerivedModel(req1=\"a\", req2=\"b\", req3=\"c\", opt=\"d\"))", + "got": "DerivedModel(req1=\"a\", req2=\"b\", opt=\"c\"))) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "got_raw": "DerivedModel(req1=\"a\", req2=\"b\", opt=\"c\"))) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "exact_match": false, + "code_bleu": 0.09146626373610169, + "edit_similarity": 0.2586750788643533 + }, + { + "repo": "openapi-generators/openapi-python-client", + "expected": "\"MyEnum\")", + "got": "optional_type)", + "got_raw": "optional_type)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.17391304347826086 + }, + { + "repo": "openapi-generators/openapi-python-client", + "expected": "\"int | Unset\")", + "got": "\"int | Unset\") assert_model_property_type_hint(MyModel", + "got_raw": "\"int | Unset\") assert_model_property_type_hint(MyModel, \"datetime_prop\", \"datetime | Unset\") assert_model_property_type_hint(MyModel, \"enum_prop\", \"MyEnum | Unset\") assert_model_property_type_hint(MyModel, \"list_prop\", \"list[str] | Unset\") assert_model_property_type_hint(MyModel, \"dict_prop\", \"dict[str, str] | Unset\") assert_model_property_type_hint(MyModel, \"model_prop\", \"MyModel | Unset\") assert_model_property_type_hint(MyModel, \"model_list_prop\", \"list[MyModel] | Unset\") assert", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.4117647058823529 + }, + { + "repo": "openapi-generators/openapi-python-client", + "expected": "ModelWithPrefixItems(array_prop=[SimpleObject(name=\"a\"), \"b\"]))", + "got": "ModelWithPrefixItems(array_prop=[SimpleObject(name=\"a\"), SimpleObject(name=\"b\")])) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "got_raw": "ModelWithPrefixItems(array_prop=[SimpleObject(name=\"a\"), SimpleObject(name=\"b\")])) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "exact_match": false, + "code_bleu": 0.10117025915526442, + "edit_similarity": 0.3490304709141274 + }, + { + "repo": "openapi-generators/openapi-python-client", + "expected": "MyModel( boolean_prop=True, string_prop=\"a\", number_prop=1.5, int_prop=2, any_object_prop=AnyObject(boolean_prop=False), null_prop=None, any_prop=\"e\", ))", + "got": "MyModel( boolean_prop=True, string_prop=\"a\", number_prop=1.5, int_prop=2, any_object_prop=AnyObject(boolean_prop=False), null_prop=None, any_prop=\"e\", )) def test_decode_encode_with_default(self, MyModel): json_data = { \"booleanProp\": True, \"stringProp\": \"a\", \"numberProp\": 1.5, \"intProp\": 2, \"anyObjectProp\": None, \"nullProp\": None, \"anyProp\": \"e\", } assert_model_decode_encode(MyModel, json_data) def test_decode_encode_with_default_and_null(self", + "got_raw": "MyModel( boolean_prop=True, string_prop=\"a\", number_prop=1.5, int_prop=2, any_object_prop=AnyObject(boolean_prop=False), null_prop=None, any_prop=\"e\", )) def test_decode_encode_with_default(self, MyModel): json_data = { \"booleanProp\": True, \"stringProp\": \"a\", \"numberProp\": 1.5, \"intProp\": 2, \"anyObjectProp\": None, \"nullProp\": None, \"anyProp\": \"e\", } assert_model_decode_encode(MyModel, json_data) def test_decode_encode_with_default_and_null(self", + "exact_match": false, + "code_bleu": 0.4218024918108294, + "edit_similarity": 0.5091514143094842 + }, + { + "repo": "openapi-generators/openapi-python-client", + "expected": "\"list[Any] | Unset\")", + "got": "\"list[Any]\") assert_model_property_type_hint(ModelWithArrayOfInts", + "got_raw": "\"list[Any]\") assert_model_property_type_hint(ModelWithArrayOfInts, \"array_prop\", \"list[int]\") assert_model_property_type_hint(ModelWithArrayOfObjects, \"array_prop\", \"list[MyObject]\") @with_generated_client_fixture(\"array_schemas\") @with_generated_code_imports(\"array_schemas\") def test_encode_decode(self, client): model = ModelWithArrayOfAny(array_prop=[1, 2, 3]) assert_model_decode_encode(client, model) model = ModelWithArrayOfInts(array_prop=[1, 2, 3]) assert_model_decode_encode(client, model) model = ModelWithArrayOf", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.2823529411764706 + }, + { + "repo": "openatx/uiautomator2", + "expected": "d(text=\"Status Bar\").wait(timeout=5))", + "got": "d.watcher.running()) d.watcher.stop() d.watcher.remove() d(text=\"App\").click() d(text=\"Status Bar\").wait(timeout=5) d.press(\"back\") d.press(\"back\") d(text=\"App\").click() d(text=\"Status Bar\").wait(timeout=5) d.press(\"back\") d.press(\"back\") d(text=\"App\").click() d(text=\"Status Bar\").wait(timeout=5) d.press(\"back\") d.press(\"back\") d(text=\"App\").click() d(text=\"Status Bar\").wait(timeout=5) d.press(\"back\") d.press(\"back\") d", + "got_raw": "d.watcher.running()) d.watcher.stop() d.watcher.remove() d(text=\"App\").click() d(text=\"Status Bar\").wait(timeout=5) d.press(\"back\") d.press(\"back\") d(text=\"App\").click() d(text=\"Status Bar\").wait(timeout=5) d.press(\"back\") d.press(\"back\") d(text=\"App\").click() d(text=\"Status Bar\").wait(timeout=5) d.press(\"back\") d.press(\"back\") d(text=\"App\").click() d(text=\"Status Bar\").wait(timeout=5) d.press(\"back\") d.press(\"back\") d", + "exact_match": false, + "code_bleu": 0.07940634763605606, + "edit_similarity": 0.16122004357298475 + }, + { + "repo": "openatx/uiautomator2", + "expected": "True", + "got": "True", + "got_raw": "True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "openatx/uiautomator2", + "expected": "0", + "got": "0", + "got_raw": "0\n\n\ndef test_xpath2(dev):\n d = dev\n d.xpath(\"//*[@text='Media']\").wait(timeout=1000)\n d.xpath(\"//*[@text='Media']\").click(timeout=1000)\n d.xpath(\"//*[@text='Media']\").wait(timeout=1000)\n d.xpath(\"//*[@text='Media']\").click(timeout=1000)\n d.xpath(\"//*[@text='Media']\").wait(timeout=1000)\n d.xpath(\"//*[@text='Media']\").click(timeout=1000)\n d.xpath(\"//*[@text='Media']\").wait(timeout=10", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "openatx/uiautomator2", + "expected": "\"hello world\")", + "got": "\"hello world\")", + "got_raw": "\"hello world\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "openatx/uiautomator2", + "expected": "True", + "got": "True", + "got_raw": "True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "openatx/uiautomator2", + "expected": "None", + "got": "None", + "got_raw": "None # toast is empty at first. d.toast.show(\"toast message\") d.toast.show(\"toast message 2\") d.toast.show(\"toast message 3\") d.toast.show(\"toast message 4\") d.toast.show(\"toast message 5\") d.toast.show(\"toast message 6\") d.toast.show(\"toast message 7\") d.toast.show(\"toast message 8\") d.toast.show(\"toast message 9\") d.toast.show(\"toast message 10\") d.toast.show(\"toast message 11\") d.toast.show(\"toast message 12\") d.toast.show(\"toast message 13\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "openatx/uiautomator2", + "expected": "(193, 321, 3)", + "got": "im_ae86.shape", + "got_raw": "im_ae86.shape # 1080, 1920, 3 # 1080, 1920, 3 # 1080, 1920, 3 # 1080, 1920, 3 # 1080, 1920, 3 # 1080, 1920, 3 # 1080, 1920, 3 # 1080, 1920, 3 # ", + "exact_match": false, + "code_bleu": 0.16282193263962697, + "edit_similarity": 0.0 + }, + { + "repo": "openatx/uiautomator2", + "expected": "time_used", + "got": "time_used", + "got_raw": "time_used < 2.5 else \"delay too short\" f\"{time_used}\" f\"({time_used:.3f}s)\" f\" {dev.settings['operation_delay']}\" f\" {dev.settings['operation_delay'][0]}\" f\" {dev.settings['operation_delay'][1]}\" f\" {dev.settings['operation_delay'][0] + dev.settings['operation_delay'][1]}\" f\" {dev.settings['operation_delay'][0] * 1000}\" f\" {dev.settings['operation_delay'][1] * 1000}\" f\" {dev.settings['operation_delay'][0] *", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "openatx/uiautomator2", + "expected": "\"3\"", + "got": "'7'", + "got_raw": "'7'", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "openatx/uiautomator2", + "expected": "2 + 3", + "got": "3.5", + "got_raw": "3.5", + "exact_match": false, + "code_bleu": 0.16666666666666666, + "edit_similarity": 0.25 + }, + { + "repo": "openatx/uiautomator2", + "expected": "None", + "got": "None", + "got_raw": "None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "orbingol/NURBS-Python", + "expected": "0", + "got": "1.0", + "got_raw": "1.0 - 0.66 - 0.33 + 0.33 * 2.0 - 0.33 * 3.0 + 0.33 * 4.0 - 0.33 * 5.0 + 0.33 * 6.0 - 0.33 * 7.0 + 0.33 * 8.0 - 0.33 * 9.0 + 0.33 * 10.0 - 0.33 * 11.0 +", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "orbingol/NURBS-Python", + "expected": "degree_new", + "got": "degree_new", + "got_raw": "degree_new - 1.00000000000000045495966358097109183593115234375000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "orbingol/NURBS-Python", + "expected": "TypeError)", + "got": "TypeError)", + "got_raw": "TypeError) as excinfo: linalg.vector_dot3(None, None) # pylint: disable=E1101 # noqa: E501 # type: ignore # noqa: E501 assert str(excinfo.value) == \"Cannot compute dot product of non-3D vectors\" # type: ignore # noqa: E501 # pylint: disable=E1101 # noqa: E501 # type: ignore # noqa: E501 # pylint: disable=E1101 # noqa: E501 ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "orbingol/NURBS-Python", + "expected": "2", + "got": "2.0", + "got_raw": "2.0\n\ndef test_bspline_curve_knotvector(spline_curve):\n assert spline_curve.knotvector == [0.0, 0.0, 0.0, 0.0, 0.33, 0.66, 1.0, 1.0, 1.0, 1.0]\n\ndef test_bspline_curve_degree(spline_curve):\n assert spline_curve.degree == 3.0\n\ndef test_bspline_curve_order(spline_curve):\n assert spline_curve.order == 4.0\n\ndef test_bspline_curve_num_ctrlpts", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "orbingol/NURBS-Python", + "expected": "val", + "got": "val", + "got_raw": "val + GEOMDL_DELTA * 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "orbingol/NURBS-Python", + "expected": "c_weights", + "got": "c_weights[0]", + "got_raw": "c_weights[0] * 1.0 / 4.0 * 100.0 / 3.0 * 100.0 / 3.0 * 100.0 / 3.0 * 100.0 / 3.0 * 100.0 / 3.0 * 100.0 / 3.0 * 100.0 / 3.0 * 100.0 / 3.0 * 100.0 / 3.0 * 100", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.8571428571428571 + }, + { + "repo": "oughtinc/ice", + "expected": "gold_paragraphs_df.columns", + "got": "id_to_paragraph[\"1\"].lower()", + "got_raw": "id_to_paragraph[\"1\"].lower() for id_to_paragraph in id_to_paragraph.values() for quote in gold_paragraphs_df[\"quote\"].values() if quote.lower() in id_to_paragraph.lower() for quote in gold_paragraphs_df[\"quote\"].values() if quote.lower() in id_to_paragraph.lower() for quote in gold_paragraphs_df[\"quote\"].values() if quote.lower() in id_to_paragraph.lower() for quote in gold_paragraphs_df[\"quote\"].values() if quote.lower() in id_to_paragraph.lower() for quote in gold_paragraphs_df[\"quote\"].values() if quote.lower() in id_to_paragraph.lower()", + "exact_match": false, + "code_bleu": 0.16036590969929357, + "edit_similarity": 0.48148148148148145 + }, + { + "repo": "oughtinc/ice", + "expected": "[0, 1, 2]", + "got": "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9] assert summarize(10) == 10 assert summarize(10.0) == 10.0 assert summarize(10.00000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9] assert summarize(10) == 10 assert summarize(10.0) == 10.0 assert summarize(10.00000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.13749229838463398, + "edit_similarity": 0.0967741935483871 + }, + { + "repo": "oughtinc/ice", + "expected": "0.99", + "got": "0.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999", + "got_raw": "0.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.06060606060606061 + }, + { + "repo": "oughtinc/ice", + "expected": "\"The proportion of children whose census status was recorded as moved or unknown did not differ significantly between the groups (P=0.71 and P=0.36, respectively).\"", + "got": "\"Two hundred and fifty-six children aged 6-59 months were randomly assigned to receive either azithromycin or placebo.\" \"The study was conducted in 100 communities in Malawi, Niger, and Tanzania.\" \"The study was conducted in 100 communities in Malawi, Niger, and Tanzania.\" \"The study was conducted in 100 communities in Malawi, Niger, and Tanzania.\" \"The study was conducted in 100 communities in Malawi, Niger, and Tanzania.\" \"The study was conducted in 100 communities in Malawi, Niger, and Tanzania.\" \"", + "got_raw": "\"Two hundred and fifty-six children aged 6-59 months were randomly assigned to receive either azithromycin or placebo.\" \"The study was conducted in 100 communities in Malawi, Niger, and Tanzania.\" \"The study was conducted in 100 communities in Malawi, Niger, and Tanzania.\" \"The study was conducted in 100 communities in Malawi, Niger, and Tanzania.\" \"The study was conducted in 100 communities in Malawi, Niger, and Tanzania.\" \"The study was conducted in 100 communities in Malawi, Niger, and Tanzania.\" \"", + "exact_match": false, + "code_bleu": 0.1561969968460128, + "edit_similarity": 0.16417910447761194 + }, + { + "repo": "oughtinc/ice", + "expected": "{\"things\": [1, 2, 3]}", + "got": "[1, 2, 3] assert to_json_value(MyDataClass({\"a\": 1})) == {\"a\": 1} assert to_json_value(MyDataClass({\"a\": 1, \"b\": 2})) == {\"a\": 1, \"b\": 2} assert to_json_value(MyDataClass({\"a\": 1, \"b\": 2, \"c\": 3})) == {\"a\": 1, \"b\": 2, \"c\": 3} assert to_json_value(MyDataClass({\"a\": 1, \"b\": 2, \"c\":", + "got_raw": "[1, 2, 3] assert to_json_value(MyDataClass({\"a\": 1})) == {\"a\": 1} assert to_json_value(MyDataClass({\"a\": 1, \"b\": 2})) == {\"a\": 1, \"b\": 2} assert to_json_value(MyDataClass({\"a\": 1, \"b\": 2, \"c\": 3})) == {\"a\": 1, \"b\": 2, \"c\": 3} assert to_json_value(MyDataClass({\"a\": 1, \"b\": 2, \"c\": ", + "exact_match": false, + "code_bleu": 0.06698660788898536, + "edit_similarity": 0.0664451827242525 + }, + { + "repo": "oughtinc/ice", + "expected": "{\"name\": \"world\"}", + "got": "\"hello world\"", + "got_raw": "\"hello world\"", + "exact_match": false, + "code_bleu": 0.1, + "edit_similarity": 0.6 + }, + { + "repo": "oughtinc/ice", + "expected": "\"Foo\"", + "got": "{\"a\":", + "got_raw": "{\"a\": None}", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.4 + }, + { + "repo": "pajbot/pajbot", + "expected": "expected", + "got": "expected", + "got_raw": "expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pajbot/pajbot", + "expected": "None", + "got": "None", + "got_raw": "None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pajbot/pajbot", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as excinfo: parse_number_from_string(input_value) assert str(excinfo.value) == \"xd is not a number\" def test_bad_conversions_empty_string() -> None: input_value = \"\" with pytest.raises( ValueError) as excinfo: parse_number_from_string(input_value) assert str(excinfo.value) == \"Empty string\" def test_bad_conversions_float() -> None: input_value = 1.23456789123456789123456789123456789123456", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pajbot/pajbot", + "expected": "clean_up_message(\" \")", + "got": "clean_up_message(\" \\n\") assert \"test\" == clean_up_message(\"test\") assert \"test\\n\" == clean_up_message(\"test\\n\") assert \"test\\n\" == clean_up_message(\"test\\r\\n\") assert \"test\\n\" == clean_up_message(\"test\\r\") assert \"test\\n\" == clean_up_message(\"test\\r\\r\") assert \"test\\n\" == clean_up_message(\"test\\r\\n\\r\") assert \"test\\n\" == clean_up_message(\"test\\r\\n\\r\\n\") assert \"test\\n\" == clean_up_message(\"test\\r\\n\\r\\n\\r\") assert \"test\\n\" == clean", + "got_raw": "clean_up_message(\" \\n\") assert \"test\" == clean_up_message(\"test\") assert \"test\\n\" == clean_up_message(\"test\\n\") assert \"test\\n\" == clean_up_message(\"test\\r\\n\") assert \"test\\n\" == clean_up_message(\"test\\r\") assert \"test\\n\" == clean_up_message(\"test\\r\\r\") assert \"test\\n\" == clean_up_message(\"test\\r\\n\\r\") assert \"test\\n\" == clean_up_message(\"test\\r\\n\\r\\n\") assert \"test\\n\" == clean_up_message(\"test\\r\\n\\r\\n\\r\") assert \"test\\n\" == clean", + "exact_match": false, + "code_bleu": 0.023199901472763716, + "edit_similarity": 0.09210526315789473 + }, + { + "repo": "pajbot/pajbot", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as excinfo: split_into_chunks_with_prefix(\"a\", \"b\", 10) assert str(excinfo.value) == \"a\" assert excinfo.value.prefix == \"b\" assert excinfo.value.max_length == 10 assert excinfo.value.message == \"a\" assert excinfo.value.message_length == 10 assert excinfo.value.message_prefix == \"b\" assert excinfo.value.message_prefix_length == 10 assert excinfo.value.message_prefix_length + excinfo.value.message_length == 20 assert excinfo.value.message_prefix_length + excinfo.value.message_length + 1 == 21", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pajbot/pajbot", + "expected": "filter_message(\" forsen\")", + "got": "filter_message(\" forsen\")", + "got_raw": "filter_message(\" forsen\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "palantir/python-language-server", + "expected": "expected", + "got": "expected", + "got_raw": "expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "palantir/python-language-server", + "expected": "1", + "got": "1", + "got_raw": "1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "palantir/python-language-server", + "expected": "'flake8'", + "got": "'flake8'", + "got_raw": "'flake8' assert unused_var['severity'] == lsp.DiagnosticSeverity.Warning assert unused_var['code'] == 'F841' assert unused_var['message'] == msg assert unused_var['severity'] == lsp.DiagnosticSeverity.Warning assert unused_var['code'] == 'F841' assert unused_var['codeDescription'] == {'href': 'http://flake8.pycqa.org/en/latest/rules.html#N841'} assert unused_var['source'] == 'flake8' assert unused_var['severity'] == lsp.DiagnosticSeverity.Warning assert unused_var['code'] == 'F841'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "palantir/python-language-server", + "expected": "3", + "got": "3", + "got_raw": "3", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "palantir/python-language-server", + "expected": "lsp.DiagnosticSeverity.Error", + "got": "lsp.DiagnosticSeverity.Error", + "got_raw": "lsp.DiagnosticSeverity.Error", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "palantir/python-language-server", + "expected": "[ mock.call(1), mock.call(2), mock.call(3), ])", + "got": "[mock.call(1), mock.call(2), mock.call(3)])", + "got_raw": "[mock.call(1), mock.call(2), mock.call(3)])", + "exact_match": false, + "code_bleu": 0.9025592277146132, + "edit_similarity": 0.9662921348314607 + }, + { + "repo": "palantir/python-language-server", + "expected": "'D100: Missing docstring in public module'", + "got": "'F401: import \"sys\" used before assignment' ' (pydocstyle) [F401]' 'F401: import \"json\" used before assignment' ' (pydocstyle) [F401]' 'F401: import \"sys\" used before assignment' ' (pydocstyle) [F401]' 'F401: import \"json\" used before assignment' ' (pydocstyle) [F401]' 'F401: import \"sys\" used before assignment' ' (pydocstyle) [F40", + "got_raw": "'F401: import \"sys\" used before assignment' ' (pydocstyle) [F401]' 'F401: import \"json\" used before assignment' ' (pydocstyle) [F401]' 'F401: import \"sys\" used before assignment' ' (pydocstyle) [F401]' 'F401: import \"json\" used before assignment' ' (pydocstyle) [F401]' 'F401: import \"sys\" used before assignment' ' (pydocstyle) [F40", + "exact_match": false, + "code_bleu": 0.06917184228205472, + "edit_similarity": 0.096 + }, + { + "repo": "palantir/python-language-server", + "expected": "doc.uri", + "got": "DOC_URI", + "got_raw": "DOC_URI assert changes[0]['textDocument']['version'] == 1 assert changes[0]['insertText'] == 'class ShouldBeRenamed():\\n pass\\n' assert changes[0]['range']['start'] == {'line': 0, 'character': 6} assert changes[0]['range']['end'] == {'line': 0, 'character': 13} assert changes[1]['textDocument']['uri'] == DOC_URI assert changes[1]['textDocument']['version'] == 2 assert changes[1]['insertText'] == 'class Test2(ShouldBeRenamed):\\", + "exact_match": false, + "code_bleu": 0.16666666666666666, + "edit_similarity": 0.0 + }, + { + "repo": "palantir/python-language-server", + "expected": "{'line': 0, 'character': 0}", + "got": "{'line': 0, 'character': 0} assert unused_import['severity'] == lsp.DiagnosticSeverity.Warning assert unused_import['code'] == 'W0611' assert unused_import['message'] == msg assert unused_import['source'] == 'pylint' assert unused_import['severity'] == lsp.DiagnosticSeverity.Warning assert unused_import['code'] == 'W0611' assert unused_import['message'] == msg assert unused_import['code'] == 'W0611' assert unused_import['message'] == msg assert unused_import['code'] == 'W0611' assert", + "got_raw": "{'line': 0, 'character': 0} assert unused_import['severity'] == lsp.DiagnosticSeverity.Warning assert unused_import['code'] == 'W0611' assert unused_import['message'] == msg assert unused_import['source'] == 'pylint' assert unused_import['severity'] == lsp.DiagnosticSeverity.Warning assert unused_import['code'] == 'W0611' assert unused_import['message'] == msg assert unused_import['code'] == 'W0611' assert unused_import['message'] == msg assert unused_import['code'] == 'W0611' assert", + "exact_match": false, + "code_bleu": 0.08642344511992135, + "edit_similarity": 0.10485436893203884 + }, + { + "repo": "palantir/python-language-server", + "expected": "'datetime'", + "got": "'datetime'", + "got_raw": "'datetime'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "palantir/python-language-server", + "expected": "'W191'", + "got": "'W191'", + "got_raw": "'W191' assert mod_import['severity'] == lsp.DiagnosticSeverity.Warning assert mod_import['message'] == msg assert mod_import['severity'] == lsp.DiagnosticSeverity.Warning assert mod_import['code'] == 'W191' assert mod_import['severity'] == lsp.DiagnosticSeverity.Warning assert mod_import['code'] == 'W191' assert mod_import['severity'] == lsp.DiagnosticSeverity.Warning assert mod_import['code'] == 'W191' assert mod_import['severity'] == lsp.DiagnosticSeverity.Warning assert mod_import['code'] == 'W191' assert mod", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "palantir/python-language-server", + "expected": "None", + "got": "None", + "got_raw": "None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "palantir/python-language-server", + "expected": "{ 'line': 0, 'character': 0, }", + "got": "{'line': 0, 'character': 0} assert unused_import['severity'] == lsp.DiagnosticSeverity.Warning assert unused_import['code'] == 'E0401' assert unused_import['source'] == 'pylint' assert unused_import['message'] == msg assert unused_import['code'] == 'E0401' assert unused_import['severity'] == lsp.DiagnosticSeverity.Warning assert unused_import['code'] == 'E0401' assert unused_import['source'] == 'pylint' assert unused_import['message'] == msg assert unused_import['code'] == 'E040", + "got_raw": "{'line': 0, 'character': 0} assert unused_import['severity'] == lsp.DiagnosticSeverity.Warning assert unused_import['code'] == 'E0401' assert unused_import['source'] == 'pylint' assert unused_import['message'] == msg assert unused_import['code'] == 'E0401' assert unused_import['severity'] == lsp.DiagnosticSeverity.Warning assert unused_import['code'] == 'E0401' assert unused_import['source'] == 'pylint' assert unused_import['message'] == msg assert unused_import['code'] == 'E040", + "exact_match": false, + "code_bleu": 0.07809239816922638, + "edit_similarity": 0.10526315789473684 + }, + { + "repo": "palantir/python-language-server", + "expected": "[ \"def hello(a, b):\\n\", \" print a, b\\n\" ]", + "got": "old[:-1] + [u'print a, b'] + [u''] + old[-1:] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u'']", + "got_raw": "old[:-1] + [u'print a, b'] + [u''] + old[-1:] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u''] + [u'']", + "exact_match": false, + "code_bleu": 0.010322546006950492, + "edit_similarity": 0.11811023622047244 + }, + { + "repo": "pallets/quart", + "expected": "ValueError)", + "got": "RuntimeError)", + "got_raw": "RuntimeError) as excinfo: await _handle_exception(app, RuntimeError(\"test\")) except RuntimeError as e: assert str(e) == \"test\" else: assert excinfo.value is None if propagate_exceptions else RuntimeError(\"test\") assert app.config[\"PROPAGATE_EXCEPTIONS\"] == propagate_exceptions assert app.config[\"TESTING\"] == testing app.config[\"PROPAGATE_EXCEPTIONS\"] = False app.config[\"TESTING\"] = True await _handle_exception(app, RuntimeError(\"test\")) assert app.config[\"PROPAGATE_EXCEPTIONS\"] == False assert app.config[\"TESTING\"] == True app.config[\"PROPAGATE_EXCEPTIONS\"] =", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "pallets/quart", + "expected": "\"/\"", + "got": "\"/\"", + "got_raw": "\"/\" request.method == \"GET\" request.args == {} request.form == {} request.files == {} request.view_args == {} request.args.get(\"foo\") == \"bar\" request.args.get(\"baz\") == \"qux\" request.args.get(\"foo\", \"qux\") == \"qux\" request.args.get(\"baz\", \"qux\") == \"qux\" request.args.get(\"foo\", \"qux\", type=int) == 0 request.args.get(\"baz\", \"qux\", type=int) == 0 request.args.get(\"foo\", \"qux\", type=float) == 0.0 request.args", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pallets/quart", + "expected": "205", + "got": "205", + "got_raw": "205 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pallets/quart", + "expected": "500", + "got": "500", + "got_raw": "500 async with app.test_request_context(\"/debug\"): response = await traceback_response(Exception(\"Unique error\")) assert response.status_code == 200 async with app.test_request_context(\"/debug/2\"): response = await traceback_response(Exception(\"Unique error\")) assert response.status_code == 404 async with app.test_request_context(\"/debug/3\"): response = await traceback_response(Exception(\"Unique error\")) assert response.status_code == 500 async with app.test_request_context(\"/debug/4\"): response = await traceback_response(Exception(\"Unique error\")) assert response.status_code == 404 async with app.test_request_context(\"/", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pallets/quart", + "expected": "b\"43\"", + "got": "b\"43\"", + "got_raw": "b\"43\" # type: ignore async def test_streaming_response(app: Quart) -> None: @app.get(\"/stream\") async def stream() -> ResponseReturnValue: yield \"Hello \" yield \"World\" return Response(\"World\") test_client = app.test_client() response = await test_client.get(\"/stream\") assert (await response.data) == b\"Hello World\" async def test_streaming_response_with_g(app: Quart) -> None: @app.get(\"/stream\") async def stream() -> ResponseReturnValue: yield \"Hello \" yield \"World", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pallets/quart", + "expected": "await response.get_data(as_text=True)", + "got": "await response.get_data() or b\"\" or \"\" or None or \"\" or 0 or False or True or [] or {} or () or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or", + "got_raw": "await response.get_data() or b\"\" or \"\" or None or \"\" or 0 or False or True or [] or {} or () or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or \"\" or", + "exact_match": false, + "code_bleu": 0.03586870828222504, + "edit_similarity": 0.1388888888888889 + }, + { + "repo": "pallets/quart", + "expected": "\"/path\"", + "got": "\"/path\"", + "got_raw": "\"/path\" assert query_string == b\"\"\n\n\ndef test_build_headers_path_and_query_string_headers_override() -> None:\n headers = Headers({\"User-Agent\": \"Quarty\", \"host\": \"quart.com\"})\n result, path, query_string = make_test_headers_path_and_query_string(\n Quart(__name__), \"/path\", headers, query_string=b\"q=1\"\n )\n assert result == headers\n assert path == \"/path\" assert query_string == b\"q=1\"\n\n\ndef test_build_headers_path_and_query_string_headers_override_query_string() -> None:\n headers =", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pallets/quart", + "expected": "\"bar\"", + "got": "\"FOO\"", + "got_raw": "\"FOO\" within_context() assert g.foo == \"FOO\" within_context() assert g.foo == \"FOO\" within_context() assert g.foo == \"FOO\" within_context() assert g.foo == \"FOO\" within_context() assert g.foo == \"FOO\" within_context() assert g.foo == \"FOO\" within_context() assert g.foo == \"FOO\" within_context() assert g.foo == \"FOO\" within_context() assert g.foo == \"FOO\" within_context() assert g.foo == \"FOO\" within_context() assert g.foo == \"FOO\" within_context()", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4 + }, + { + "repo": "pallets/quart", + "expected": "interface.get_cookie_domain(app) or \"\"", + "got": "interface.get_cookie_domain(app) or \"\" ) if interface.get_cookie_domain(app) else None if interface.get_cookie_path(app) else None if interface.get_cookie_httponly(app) else None if interface.get_cookie_secure(app) else None if interface.get_cookie_samesite(app) else None if interface.get_cookie_domain(app) else None if interface.get_cookie_path(app) else None if interface.get_cookie_httponly(app) else None if interface.get_cookie_secure(app) else None if interface.get_cookie_samesite(app) else None if interface.get_cookie_domain(app) else None if interface.get_cookie_path(app) else None if", + "got_raw": "interface.get_cookie_domain(app) or \"\" ) if interface.get_cookie_domain(app) else None if interface.get_cookie_path(app) else None if interface.get_cookie_httponly(app) else None if interface.get_cookie_secure(app) else None if interface.get_cookie_samesite(app) else None if interface.get_cookie_domain(app) else None if interface.get_cookie_path(app) else None if interface.get_cookie_httponly(app) else None if interface.get_cookie_secure(app) else None if interface.get_cookie_samesite(app) else None if interface.get_cookie_domain(app) else None if interface.get_cookie_path(app) else None if", + "exact_match": false, + "code_bleu": 0.06311422326310712, + "edit_similarity": 0.11968503937007874 + }, + { + "repo": "pallets/quart", + "expected": "await body", + "got": "await body.get_data()[:3] await body.get_data()[:3] == b\"012\" await body.get_data()[:3] == b\"012\" await body.get_data()[:3] == b\"012\" await body.get_data()[:3] == b\"\" await body.get_data()[:3] == b\"\" await body.get_data()[:3] == b\"\" await body.get_data()[:3] == b\"\" await body.get_data()[:3] == b\"\" await body.get_data()[:3] == b\"\" await body.get_data()[:3] ==", + "got_raw": "await body.get_data()[:3] await body.get_data()[:3] == b\"012\" await body.get_data()[:3] == b\"012\" await body.get_data()[:3] == b\"012\" await body.get_data()[:3] == b\"\" await body.get_data()[:3] == b\"\" await body.get_data()[:3] == b\"\" await body.get_data()[:3] == b\"\" await body.get_data()[:3] == b\"\" await body.get_data()[:3] == b\"\" await body.get_data()[:3] ==", + "exact_match": false, + "code_bleu": 0.010611047753305769, + "edit_similarity": 0.05405405405405406 + }, + { + "repo": "pallets/quart", + "expected": "b\"GET /\"", + "got": "b\"GET /\" b\" \" b\"/\" b\" \" b\"GET /host\" b\" \" b\"/host\" b\" \" b\"GET /\" b\" \" b\"/\" b\" \" b\"GET /host\" b\" \" b\"/host\" b\" \" b\"GET /\" b\" \" b\"/\" b\" \" b\"GET /host\" b\" \" b\"/host\" b\" \" b\"GET /\" b\" \" b\"/\" b\" \" b\"GET /host\" b\" \" b\"/host\" b\" \" b\"GET /\" b\" \"", + "got_raw": "b\"GET /\" b\" \" b\"/\" b\" \" b\"GET /host\" b\" \" b\"/host\" b\" \" b\"GET /\" b\" \" b\"/\" b\" \" b\"GET /host\" b\" \" b\"/host\" b\" \" b\"GET /\" b\" \" b\"/\" b\" \" b\"GET /host\" b\" \" b\"/host\" b\" \" b\"GET /\" b\" \" b\"/\" b\" \" b\"GET /host\" b\" \" b\"/host\" b\" \" b\"GET /\" b\" \"", + "exact_match": false, + "code_bleu": 0.023189619738692782, + "edit_similarity": 0.0653061224489796 + }, + { + "repo": "pallets/quart", + "expected": "b\"42\"", + "got": "b\"42\"", + "got_raw": "b\"42\" # type: ignore\n\n\nasync def test_streaming(app: Quart) -> None:\n @app.get(\"/stream\")\n async def stream() -> ResponseReturnValue:\n async def streamer() -> ResponseReturnValue:\n yield \"Hello, \"\n yield \"World!\"\n yield \"!\"\n\n return streamer() # type: ignore\n\n test_client = app.test_client()\n response = await test_client.get(\"/stream\")\n assert (await response.data) == b\"Hello, World!\" # type: ignore\n\n\nasync def test_streaming_with_headers(app: Quart", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pallets/quart", + "expected": "result.output", + "got": "result.output.strip()", + "got_raw": "result.output.strip() + \"\\n\" + \"Quart version: \" + quart.__version__ + \"\\n\" + \"Python version: \" + quart.__python_version__ + \"\\n\" + \"Flask version: \" + quart.__flask_version__ + \"\\n\" + \"Click version: \" + quart.__click_version__ + \"\\n\" + \"Jinja2 version: \" + quart.__jinja2_version__ + \"\\n\" + \"Werkzeug version: \" + quart.__werkzeug_version__ + \"\\n\" + \"SQLAlchemy version: \" + quart.__sqlalchemy_version__ +", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.7647058823529411 + }, + { + "repo": "pallets/quart", + "expected": "\"/bob/post\"", + "got": "\"/bob/post\"", + "got_raw": "\"/bob/post\" async with app.test_request_context(\"/bob\", root_path=\"/bob\"): assert url_for(\"index\") == \"/\" assert url_for(\"index_post\", _method=\"POST\") == \"/post\" async with app.test_request_context(\"/bob\", root_path=\"/bob\", method=\"POST\"): assert url_for(\"index\") == \"/bob/\" async with app.test_request_context(\"/bob\", root_path=\"/bob\", method=\"GET\"): assert url_for(\"index\") == \"/bob\" async with app.test_request_context(\"/bob\", root_path=\"/bob\", method=\"HEAD\"): assert url_for(\"index\") == \"/bob\" async with", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pallets/quart", + "expected": "404", + "got": "404", + "got_raw": "404\nassert response.data == b\"Not Found\" async def test_implicit_json(app: Quart) -> None: test_client = app.test_client() response = await test_client.post(\"/json/\") assert response.status_code == 200 assert response.json is None response = await test_client.post(\"/implicit_json/\") assert response.status_code == 200 assert response.json == {} async def test_iri(app: Quart) -> None: test_client = app.test_client() response = await test_client.get(\"/\u2764\ufe0f\") assert response.status_code == 200 assert response.data == b\"\ud83d\udc94\" async def test", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pallets/quart", + "expected": "\"bar FOO\"", + "got": "\"bar FOO\"", + "got_raw": "\"bar FOO\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pallets/quart", + "expected": "[1, 2]", + "got": "[1, 2]", + "got_raw": "[1, 2]\n\n\nasync def test_test_client() -> None:\n app = _basic_app()\n with app.test_client() as test_client:\n response = test_client.get(\"/\")\n assert response.status_code == 200\n assert response.text == \"\"\n\n\nasync def test_test_client_exception() -> None:\n app = _basic_app()\n with app.test_client() as test_client:\n with pytest.raises(Exception) as e:\n test_client.get(\"/exception/\")\n assert str(e.value) == \"\"\n\n\nasync def test_test_client_exception_2() ->", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "patroni/patroni", + "expected": "ret)", + "got": "ret)", + "got_raw": "ret) self.assertEqual(ret, body) mock_json_dumps.assert_called_once_with(body) mock_json_dumps.reset_mock() ret = self.api._serialize_request(None) self.assertIsNone(ret) mock_json_dumps.assert_not_called() mock_json_dumps.reset_mock() ret = self.api._serialize_request(123) self.assertEqual(ret, \"123\") mock_json_dumps.assert_called_once_with(\"123\") mock_json_dumps.reset_mock() ret = self.api._serialize_request([]) self.assertEqual(ret, \"[]\") mock_json_dumps.assert_called_once_with(\"[]\") mock_json_dumps.reset_mock", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "patroni/patroni", + "expected": "'test_4')", + "got": "'bar')", + "got_raw": "'bar') == cluster.get_slot_name_on_primary(self.p.name, stream_node)) self.assertEqual( cluster._get_members_slots(stream_node.name, PostgresqlRole.REPLICA, False, True), {'leader': {'type': 'physical', 'lsn': 99, 'expected_active': False}, 'test_3': {'type': 'physical', 'lsn': 98, 'expected_active': True}, 'test_4': {'type': 'physical', 'lsn': 98, 'expected_active': False}}) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.4 + }, + { + "repo": "patroni/patroni", + "expected": "0)", + "got": "1)", + "got_raw": "1)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "patroni/patroni", + "expected": "20)", + "got": "20)", + "got_raw": "20) mock_sleep.assert_has_calls([mock.call(LOOP_WAIT)] * 20) mock_sleep.assert_called_with(LOOP_WAIT) mock_sleep.reset_mock() mock_log_error.reset_mock() mock_get_status.reset_mock() mock_create_op.reset_mock() mock_log_info.reset_mock() mock_log_error.reset_mock() mock_sleep.reset_mock() mock_get_status.reset_mock() mock_create_op.reset_mock() mock_log_info.reset_mock() mock_log_error.reset_mock() mock_sleep.reset_mock() mock_get_status.reset_mock() mock_create_op.reset_mock() mock_log_info.reset_mock() mock_log_error.reset_mock() mock_sleep.reset_mock() mock", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "patroni/patroni", + "expected": "1)", + "got": "1)", + "got_raw": "1) self.assertEqual(device.writes[0], b'P') watchdog.deactivate() self.assertEqual(len(device.writes), 2) self.assertEqual(device.writes[1], b'K') self.assertEqual(len(mock_devices), 1) device = mock_devices[-1] self.assertFalse(device.open) self.assertEqual(device.timeout, 24) watchdog = Watchdog({'ttl': 30, 'loop_wait': 10, 'watchdog': {'mode': 'optional'}}) watchdog.activate() self.assertEqual(len(mock_devices), 2) device = mock_devices[-1] self.assertTrue(device.open) self.assertEqual(device.timeout", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "patroni/patroni", + "expected": "conn.on_role_change(\"primary\"))", + "got": "conn.is_aws())", + "got_raw": "conn.is_aws()) self.assertEqual( conn.aws_request(), None ) self.assertEqual( conn.aws_request('foo'), None ) self.assertEqual( conn.aws_request('foo', 'bar'), None ) self.assertEqual( conn.aws_request('foo', 'bar', 'baz'), None ) self.assertEqual( conn.aws_request('foo', 'bar', 'baz', 'qux'), None ) self.assertEqual( conn.aws_request('foo', 'bar', 'baz', 'qux', 'quux'), None ) self.assertEqual( conn.aws_request('foo', 'bar', 'baz', 'qux', 'quux', 'quuz", + "exact_match": false, + "code_bleu": 0.32794537853815264, + "edit_similarity": 0.4 + }, + { + "repo": "patroni/patroni", + "expected": "expected)", + "got": "'primary", + "got_raw": "'primary history') self.assertEqual(mock_logger.call_args[0][2], expected) mock_logger.reset_mock() self.r._log_primary_history(history, 2) expected = '\\n'.join(['{0}\\t0/{0}\\t'.format(n) for n in range(1, 5)] + ['...', '9\\t0/9\\t']) self.assertEqual(mock_logger.call_args[0][1], 'primary history') self.assertEqual(mock_logger.call_args[0][2], expected) mock_logger.reset_mock() self.r._log_primary_history(history, 3) expected = '\\n'.join(['{0}\\", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.11764705882352941 + }, + { + "repo": "patroni/patroni", + "expected": "0o123)", + "got": "'0123')", + "got_raw": "'0123') self.assertEqual(config.local_configuration['log']['file_num'], 5) self.assertEqual(config.local_configuration['log']['format'], '[\"message\", {\"levelname\": \"level\"}]') self.assertEqual(config.local_configuration['log']['loggers'], 'patroni.postmaster: WARNING, urllib3: DEBUG') self.assertEqual(config.local_configuration['log']['level'], 'ERROR') self.assertEqual(config.local_configuration['citus']['database'], 'citus') self.assertEqual(config.local_configuration['citus']['group'], '0') self.assertEqual(config.local_configuration['citus']['host'], '0') self.assertEqual(config.local_configuration", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.7692307692307693 + }, + { + "repo": "patroni/patroni", + "expected": "[])", + "got": "[])", + "got_raw": "[])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "patroni/patroni", + "expected": "SystemExit)", + "got": "Exception)", + "got_raw": "Exception) as cm: PatroniEtcd3Client('http://localhost:2379', 'foo', 'bar') self.assertEqual(str(cm.exception), 'Authentication failed') self.assertEqual(cm.exception.code, 1) self.assertEqual(cm.exception.message, 'Authentication failed') self.assertEqual(cm.exception.http_code, 401) self.assertEqual(cm.exception.grpc_code, 1) self.assertEqual(cm.exception.etcd_code, 1) self.assertEqual(cm.exception.etcd_error, 'Authentication failed') self.assertEqual(cm.exception.etcd_revision, 0) self.assertEqual(cm.exception.etcd_cluster_revision, 0) self.assertEqual(cm.exception", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.38095238095238093 + }, + { + "repo": "patroni/patroni", + "expected": "2)", + "got": "1)", + "got_raw": "1)\n\n def test_init_error(self):\n self.wale_restore.init_error = False\n\n self.wale_restore.init_error = True\n\n self.wale_restore.init_error = False\n\n self.wale_restore.init_error = True\n\n self.wale_restore.init_error = False\n\n self.wale_restore.init_error = True\n\n self.wale_restore.init_error = False\n\n self.wale_restore.init_error = True\n\n self.wale_restore.init_error = False\n\n self.wale_restore.init_error = True\n\n self.wale_restore.init_error = False\n\n self.wale_restore.init", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "patroni/patroni", + "expected": "errors)", + "got": "errors)", + "got_raw": "errors) # Providing both is not fine c[\"tags\"][\"nofailover\"] = True c[\"tags\"][\"failover_priority\"] = 100 errors = schema(c) self.assertIn(\"tags Multiple of ('nofailover', 'failover_priority') provided\", errors) # Providing both is fine c[\"tags\"][\"nofailover\"] = False c[\"tags\"][\"failover_priority\"] = 0 errors = schema(c) self.assertNotIn(\"tags Multiple of ('nofailover', 'failover_priority') provided\", errors) # Providing both is fine c[\"tags\"][\"nofailover\"] = True c[\"tags", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "patroni/patroni", + "expected": "wd.disable())", + "got": "wd.deactivate())", + "got_raw": "wd.deactivate())", + "exact_match": false, + "code_bleu": 0.488923022434901, + "edit_similarity": 0.6206896551724138 + }, + { + "repo": "patroni/patroni", + "expected": "cmd)", + "got": "cmd)", + "got_raw": "cmd) self.assertIn('--custom-option=custom-value', cmd) self.assertIn('--', cmd) self.assertIn('--', cmd) self.assertIn('--', cmd) self.assertIn('--', cmd) self.assertIn('--', cmd) self.assertIn('--', cmd) self.assertIn('--', cmd) self.assertIn('--', cmd) self.assertIn('--', cmd) self.assertIn('--', cmd) self.assertIn('--', cmd) self.assertIn('--', cmd) self.assertIn('--', cmd) self.assertIn('--', cmd) self.assertIn('--', cmd) self.assertIn('--', cmd) self.assertIn('--', cmd) self.assertIn('--', cmd) self.assertIn('--', cmd) self", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "patroni/patroni", + "expected": "expected)", + "got": "expected)", + "got_raw": "expected) self.nesting -= 1\n\n def test_000(self) -> None:\n self.check_state_transitions('a', 1, {'a'}, 1, {'a'}, 1, {'a'}, 1, 'a', [ ('a', 'a', 1, {'a'}), ]) self.check_state_transitions('a', 1, {'a'}, 1, {'a'}, 1, {'a'}, 0, 'a', [ ('a', 'a', 1, {'a'}), ('a', 'a', 0, set()), ]) self", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "patroni/patroni", + "expected": "5)", + "got": "5)", + "got_raw": "5) self.assertEqual(state['final_return'], 1) self.p._state = PostgresqlState.STARTED self.assertTrue(self.p.wait_for_startup()) self.assertEqual(state['sleeps'], 6) self.assertEqual(state['final_return'], 0) self.p._state = PostgresqlState.SHUTDOWN self.assertTrue(self.p.wait_for_startup()) self.assertEqual(state['sleeps'], 7) self.assertEqual(state['final_return'], 1) self.p._state = PostgresqlState.SHUTTINGDOWN self.assertTrue(self.p.wait_for_startup()) self.assertEqual(state['sleeps'], 8) self.assertEqual(state['final_return'], 0)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "patroni/patroni", + "expected": "Real)", + "got": "Real)", + "got_raw": "Real) self.assertEqual( ret.__dict__, Real(version_from=validator['version_from'], version_till=validator['version_till'], min_val=validator['min_val'], max_val=validator['max_val'], unit=validator['unit']).__dict__ ) # String # String with default value # String with default value and max length # String with default value and min length # String with default value and max length and min length # String with default value and max length and min length and unit # String with default value and max length and min length and unit and version # String with default value and max length and min length and", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "patroni/patroni", + "expected": "'patroni')", + "got": "'patroni')", + "got_raw": "'patroni') else: self.assertIn('asctime', target_log) self.assertIn('levelname', target_log) self.assertIn('message', target_log) self.assertEqual(target_log['app'], 'patroni') self.assertEqual(target_log['message'], test_message) self.assertEqual(target_log['levelname'], 'INFO') self.assertEqual(target_log['asctime'], '2018-01-01T00:00:00') else: self.assertIn('message', target_log) self.assertEqual(target_log['message'], test_message) self.assertEqual(target_log['levelname'], 'INFO') self.assertEqual(target_log['asctime'],", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "patroni/patroni", + "expected": "EtcdError)", + "got": "DCSError)", + "got_raw": "DCSError) as cm: self.etcd.get_cluster() self.assertEqual(str(cm.exception), 'noleader') self.etcd._base_path = '/service/batman5' cluster = self.etcd.get_cluster() self.assertEqual(cluster.leader, 'postgresql1') self.assertEqual(cluster.members, { 'postgresql0': 'postgres://replicator:rep-pass@127.0.0.1:5433/postgres?application_name=http://127.0.0.1:8008/patroni', 'postgresql1': 'postgres://replicator:rep-pass@", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.631578947368421 + }, + { + "repo": "patroni/patroni", + "expected": "'/tmp')", + "got": "'127.0.0.1')", + "got_raw": "'127.0.0.1') self.assertEqual(parameters['citus.local_port'], '5432') self.assertEqual(parameters['citus.local_user'], 'postgres') self.assertEqual(parameters['citus.local_password'], 'postgres') self.assertEqual(parameters['citus.local_db'], 'postgres') self.assertEqual(parameters['citus.local_schema'], 'public') self.assertEqual(parameters['citus.local_table'], 'pg_dist_node') self.assertEqual(parameters['citus.local_column'], 'node_id') self.assertEqual(parameters['citus.local_key'], 'node_id') self.assertEqual(parameters['citus.local_key_type'], 'int') self", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.3157894736842105 + }, + { + "repo": "pdm-project/pdm", + "expected": "original", + "got": "original", + "got_raw": "original + b\"\\n\" + b\"/new/python\" + b\" \" + b\"print('hello')\\n\" + b\"\\n\" + b\" \" + b\"print('hello')\\n\" + b\"\\n\" + b\" \" + b\"print('hello')\\n\" + b\"\\n\" + b\" \" + b\"print('hello')\\n\" + b\"\\n\" + b\" \" + b\"print('hello')\\n\" + b\"\\n\" + b\" \" + b\"print('hello')\\n\" + b\"\\n\" + b", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pdm-project/pdm", + "expected": "1", + "got": "128", + "got_raw": "128 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 +", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "pdm-project/pdm", + "expected": "config", + "got": "config.items()", + "got_raw": "config.items() and config.get(item) is not None and config.get(item) != \"\" and config.get(item) != \"None\" and config.get(item) != \"true\" and config.get(item) != \"false\" and config.get(item) != \"1\" and config.get(item) != \"0\" and config.get(item) != \"y\" and config.get(item) != \"n\" and config.get(item) != \"yes\" and config.get(item) != \"no\" and config.get(item) != \"on\" and config.get(item) != \"off\" and config.get(item) != \"enable\" and config", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6 + }, + { + "repo": "pdm-project/pdm", + "expected": "is_quiet", + "got": "is_quiet", + "got_raw": "is_quiet result.stdout == \"\" result.stderr == \"\" result.output == \"\" result.warnings == [] result.successful == True result.failed == False result.skipped == False result.errored == False result.timedout == False result.errors == [] result.failures == [] result.passed == 1 result.failed == 0 result.skipped == 0 result.errors == [] result.failures == [] result.passed == 1 result.failed == 0 result.skipped == 0 result.errors == [] result.failures == [] result.passed == 1 result.failed == 0 result.skipped == 0 result.errors == []", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pdm-project/pdm", + "expected": "scripts", + "got": "scripts[0]", + "got_raw": "scripts[0] + os.sep + \"pip\" + os.sep + \"scripts\" + os.sep + \"pip\" + os.sep + \"pip\" + os.sep + \"pip\" + os.sep + \"pip\" + os.sep + \"pip\" + os.sep + \"pip\" + os.sep + \"pip\" + os.sep + \"pip\" + os.sep + \"pip\" + os.sep + \"pip\" + os.sep + \"pip\" + os.sep + \"pip\" + os.sep + \"pip\" + os.sep + \"pip\" + os.sep + \"pip\" + os.sep + \"", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.8235294117647058 + }, + { + "repo": "pdm-project/pdm", + "expected": "{\"default\", \"extra1\", \"extra2\", \"all\"}", + "got": "[\"default\", \"extra1\", \"extra2\", \"all\"] assert resolution.dependencies == { \"urllib3\": EnvSpec(\"extra1\"), \"idna\": EnvSpec(\"extra1\"), \"chardet\": EnvSpec(\"extra2\"), \"urllib3\": EnvSpec(\"all\"), \"idna\": EnvSpec(\"all\"), \"chardet\": EnvSpec(\"all\"), } assert resolution.extras == { \"extra1\": [\"idna\"], \"extra2\": [\"chardet\"], \"all\": [\"urllib3\", \"idna\", \"chardet\"], } assert resolution.target == \"all", + "got_raw": "[\"default\", \"extra1\", \"extra2\", \"all\"] assert resolution.dependencies == { \"urllib3\": EnvSpec(\"extra1\"), \"idna\": EnvSpec(\"extra1\"), \"chardet\": EnvSpec(\"extra2\"), \"urllib3\": EnvSpec(\"all\"), \"idna\": EnvSpec(\"all\"), \"chardet\": EnvSpec(\"all\"), } assert resolution.extras == { \"extra1\": [\"idna\"], \"extra2\": [\"chardet\"], \"all\": [\"urllib3\", \"idna\", \"chardet\"], } assert resolution.target == \"all", + "exact_match": false, + "code_bleu": 0.07015468219881348, + "edit_similarity": 0.17370892018779344 + }, + { + "repo": "pdm-project/pdm", + "expected": "\"foo\"", + "got": "\"foo\"", + "got_raw": "\"foo\" assert custom_source.password == \"bar\" assert custom_source._config == {} assert custom_source._config[\"name\"] == \"custom\" assert custom_source._config[\"url\"] == \"https://custom.pypi.org/simple\" assert custom_source._config[\"verify_ssl\"] is False assert custom_source._config[\"username\"] == \"foo\" assert custom_source._config[\"password\"] == \"bar\" assert custom_source._config[\"index\"] is True assert custom_source._config[\"find_links\"] is False assert custom_source._config[\"extra_index\"] is False assert custom_source._config[\"no_index\"] is False assert custom", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pdm-project/pdm", + "expected": "\"3.0.1\"", + "got": "\"3.0.1\"", + "got_raw": "\"3.0.1\" assert working_set[\"idna\"].version == \"2.7\" assert working_set[\"requests\"].version == \"2.23.0\" assert working_set[\"urllib3\"].version == \"1.25\" assert working_set[\"certifi\"].version == \"2019.11.28\" assert working_set[\"pytz\"].version == \"2019.3\" assert working_set[\"setuptools\"].version == \"41.0.1\" assert working_set[\"wheel\"].version == \"0.33.4\" assert working_set[\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pdm-project/pdm", + "expected": "result.stderr", + "got": "result.output.lower()", + "got_raw": "result.output.lower() result = pdm([\"fix\"], obj=project) assert \"fixing\" in result.output.lower() result = pdm([\"info\"], obj=project) assert \"fixing\" not in result.output.lower() result = pdm([\"fix\", \"--dry-run\"], obj=project) assert \"dry run\" in result.output.lower() result = pdm([\"fix\", \"--dry-run\", \"--no-color\"], obj=project) assert \"dry run\" in result.output.lower() assert not result.output.lower().startswith(\"\\x1b[34m\") result = pdm([\"fix\", \"--dry-run\",", + "exact_match": false, + "code_bleu": 0.24446151121745047, + "edit_similarity": 0.5882352941176471 + }, + { + "repo": "pdm-project/pdm", + "expected": "\"desc\"", + "got": "\"desc\"", + "got_raw": "\"desc\" assert result.requires_python == \">=3.8\" assert result.optional_dependencies == {\"tui\": [\"r\"]} assert result.dependencies == [\"a\"] assert result.extras == {} assert result._data == partial assert caplog.text == textwrap.dedent( \"\"\"\\ [tool.other] foo = \"bar\" \"\"\" ) caplog.clear() caplog.set_level(\"INFO\") result = Setup.from_directory(tmp_path) assert result._data == {} assert caplog.text == \"\" caplog.clear() caplog.set_level(\"DEBUG\") result = Setup.from_directory(tmp_path) assert result._data == partial assert caplog", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pdm-project/pdm", + "expected": "result", + "got": "result", + "got_raw": "result + \".0\" if args else result + \".\" + str(Version(version).major) + \".0\" if args else result + \".\" + str(Version(version).minor) + \".0\" if args else result + \".\" + str(Version(version).patch) + \".0\" if args else result + \".0\" if args else result + \".\" + str(Version(version).micro) + \".0\" if args else result + \".\" + str(Version(version).release) + \".0\" if args else result + \".\" + str(Version(version).dev) + \".0\" if args else result + \".\" +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pdm-project/pdm", + "expected": "Version(\"3.8.0\")", + "got": "Version(\"3.8.0\")", + "got_raw": "Version(\"3.8.0\") version1[-1] = 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pdm-project/pdm", + "expected": "\"2019.3\"", + "got": "\"2019.3\"", + "got_raw": "\"2019.3\" def test_update_ignore_constraints_with_version(project, repository, pdm): repository.add_candidate(\"pytz\", \"2020.2\") pdm([\"update\", \"pytz~=2019.3\"], obj=project, strict=True) assert project.pyproject.metadata[\"dependencies\"] == [\"pytz~=2019.3\"] assert project.get_locked_repository().candidates[\"pytz\"].version == \"2020.2\" def test_update_ignore_constraints_with_version_and_extras(project, repository, pdm): repository.add_candidate(\"pytz\", \"20", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pdm-project/pdm", + "expected": "expected", + "got": "expected", + "got_raw": "expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pdm-project/pdm", + "expected": "\"bar\"", + "got": "\"bar\"", + "got_raw": "\"bar\" if sys.version_info >= (3, 8) else \"Test config\" if sys.version_info >= (3, 9) else \"Test config\" if sys.version_info >= (3, 10) else \"bar\" if sys.version_info >= (3, 11) else \"Test config\" if sys.version_info >= (3, 12) else \"bar\" if sys.version_info >= (3, 13) else \"Test config\" if sys.version_info >= (3, 14) else \"bar\" if sys.version_info >= (3, 15", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pdm-project/pdm", + "expected": "cache", + "got": "cache._cache[\"3\"]", + "got_raw": "cache._cache[\"3\"] or \"3\" in cache._cache[\"3.8\"] or \"3.8\" in cache._cache[\"3.9\"] or \"3.9\" in cache._cache[\"3.10\"] or \"3.10\" in cache._cache[\"3.11\"] or \"3.11\" in cache._cache[\"3.12\"] or \"3.12\" in cache._cache[\"3.13\"] or \"3.13\" in cache._cache[\"3.14\"] or \"3.14\" in cache._", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.45454545454545453 + }, + { + "repo": "pdm-project/pdm", + "expected": "list(case)", + "got": "list(case)", + "got_raw": "list(case) # type: ignore assert s == case assert s == s.copy() assert s != all_sets assert s != s[1:] assert s != s[:-1] assert s != s[1:-1] assert s != s[1:2] assert s != s[:-2] assert s != s[1:-2] assert s != s[1:2:-1] assert s != s[:-2:-1] assert s != s[1:-2:-1] assert s != s[1:-2:-2] assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pdm-project/pdm", + "expected": "1", + "got": "1", + "got_raw": "1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pdm-project/pdm", + "expected": "\"2.7\"", + "got": "\"2.8\"", + "got_raw": "\"2.8\" assert locked_candidates[\"chardet\"].version == \"3.0.4\" assert locked_candidates[\"idna\"].version == \"2.8\" assert locked_candidates[\"requests\"].version == \"2.21.0\" assert locked_candidates[\"urllib3\"].version == \"1.22\" assert locked_candidates[\"certifi\"].version == \"2019.3.9\" assert locked_candidates[\"chardet\"].version == \"3.0.4\" assert locked_candidates[\"idna\"].version == \"2.8\" assert locked_candidates[\"requests\"].version == \"2", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.8 + }, + { + "repo": "pdm-project/pdm", + "expected": "1", + "got": "1", + "got_raw": "1 record[0].message.args[0] == \"Test warning\" assert record[0].message.version == \"99.99\" assert record[0].message.since == \"99.99\" assert record[0].message.deprecated == \"Test warning\" assert record[0].message.removed == \"99.99\" assert record[0].message.help == \"\" assert record[0].message.stacklevel == 2 assert record[0].message.code == \"\" assert record[0].message.category == PDMWarning assert record[0].message.name == \"Test warning\" assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "peteromallet/desloppify", + "expected": "0", + "got": "0", + "got_raw": "0 and len(evidence) > 0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "peteromallet/desloppify", + "expected": "1", + "got": "1", + "got_raw": "1 and len(funcs[0].params) == 1 and funcs[0].name == \"greet\" and funcs[0].body == \"greeting = f\\\"Hello, {name}\\\"\\nreturn greeting\" and funcs[0].docstring is None and funcs[0].docstring_lines is None and funcs[0].docstring_raw is None and funcs[0].docstring_raw_lines is None and funcs[0].docstring_raw_lines_no_comments is None and funcs[0].docstring_raw_lines_no_comments_no_whitespace is None and funcs[0].docstring_raw_lines_no_comments_no_whitespace", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "peteromallet/desloppify", + "expected": "0", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "peteromallet/desloppify", + "expected": "2", + "got": "2", + "got_raw": "2 + 1 # 2 lines of code, 1 brace. +1 for the closing brace. +1 for the newline. +1 for the closing brace. +1 for the newline. +1 for the closing brace. +1 for the newline. +1 for the closing brace. +1 for the newline. +1 for the closing brace. +1 for the newline. +1 for the closing brace. +1 for the newline. +1 for the closing brace. +1 for the newline. +1 for the closing brace. +1 for the newline. +1 for the closing brace. +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "peteromallet/desloppify", + "expected": "0", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "peteromallet/desloppify", + "expected": "langs[1]", + "got": "langs[1]", + "got_raw": "langs[1]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "peteromallet/desloppify", + "expected": "out", + "got": "out.strip()", + "got_raw": "out.strip() assert \"a.ts\" in out.strip() assert \"5 lines\" in out.strip() assert \"foo\" in out.strip() assert \"bar\" in out.strip() assert \"dry run\" not in out.strip() assert \"Would remove\" not in out.strip() assert \"dry run\" not in out.strip() assert \"dry run\" not in out.strip() assert \"dry run\" not in out.strip() assert \"dry run\" not in out.strip() assert \"dry run\" not in out.strip() assert \"dry run\" not in out.strip() assert \"dry run\" not in out.strip() assert", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.42857142857142855 + }, + { + "repo": "peteromallet/desloppify", + "expected": "[]", + "got": "[]", + "got_raw": "[] and total_areas == 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "peteromallet/desloppify", + "expected": "cfg.extensions", + "got": "cfg.extensions()", + "got_raw": "cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() + cfg.extensions() +", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.9333333333333333 + }, + { + "repo": "peteromallet/desloppify", + "expected": "[]", + "got": "[]", + "got_raw": "[]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "peteromallet/desloppify", + "expected": "5", + "got": "3", + "got_raw": "3 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "peteromallet/desloppify", + "expected": "e", + "got": "e.keys()", + "got_raw": "e.keys() assert \"line\" in e.keys() assert \"name\" in e.keys() assert \"type\" in e.keys() assert \"reason\" in e.keys() assert \"message\" in e.keys() assert \"code\" in e.keys() assert \"severity\" in e.keys() assert \"tags\" in e.keys() assert \"source\" in e.keys() assert \"start\" in e.keys() assert \"end\" in e.keys() assert \"source\" in e.keys() assert \"source\" in e.keys() assert \"source\" in e.keys() assert \"source\" in e.keys() assert \"source\" in", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "peteromallet/desloppify", + "expected": "\"\"", + "got": "\"\"\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n", + "got_raw": "\"\"\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n", + "exact_match": false, + "code_bleu": 0.004691197953455092, + "edit_similarity": 0.01556420233463035 + }, + { + "repo": "peteromallet/desloppify", + "expected": "5", + "got": "5", + "got_raw": "5 # Need at least 5 areas to analyze fragmentation assert len(anomalies) == 1 assert anomalies[0][\"name\"] == \"area1\" assert anomalies[0][\"count\"] == 2 assert anomalies[0][\"threshold\"] == 1.0 assert anomalies[0][\"census\"] == [ \"editor/sub/main.ts\", \"area2/sub/main.ts\", \"area3/sub/main.ts\", \"area4/sub/main.ts\", \"area5/sub/main.ts\", \"area6/sub/main.ts\", ] assert anomalies[0][\"census_areas\"] == [ \"editor", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "peteromallet/desloppify", + "expected": "ids", + "got": "ids", + "got_raw": "ids and len(entries) == 1 and total == 2 and entries[0][\"message\"] == \"Explicit 'any' type\" and entries[0][\"severity\"] == 2 and entries[0][\"code\"] == \"TS7006\" and entries[0][\"line\"] == 1 and entries[0][\"column\"] == 12 and entries[0][\"endLine\"] == 1 and entries[0][\"endColumn\"] == 16 and entries[0][\"path\"] == \"bad.ts\" and entries[0][\"source\"] == \"typescript\" and entries[0][\"ruleId\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "peteromallet/desloppify", + "expected": "1", + "got": "1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "peteromallet/desloppify", + "expected": "0", + "got": "0", + "got_raw": "0 assert total == 14.000000000000002 def test_large_interface_flagged(self, tmp_path): \"\"\"Interface with >14 props is flagged.\"\"\" props = \"\\n\".join(f\" prop{i}: string;\" for i in range(15)) _write(tmp_path, \"Component.tsx\", (f\"interface ButtonProps {{\\n{props}\\n}}\\n\")) entries, total = detect_prop_interface_bloat(tmp_path) assert len(entries) == 1 assert total == 15.000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "peteromallet/desloppify", + "expected": "2", + "got": "2.0", + "got_raw": "2.0 / 3.0 * 100.0 + 1.0 / 3.0 * 100.0 + 1.0 / 3.0 * 100.0 + 1.0 / 3.0 * 100.0 + 1.0 / 3.0 * 100.0 + 1.0 / 3.0 * 100.0 + 1.0 / 3.0 * 100.0 + 1.0 / 3.0 *", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "peteromallet/desloppify", + "expected": "err", + "got": "err.lower()", + "got_raw": "err.lower() # noqa: E501 \"\"\" Manual resolve requires --attest \"\"\" in err.lower() \"\"\" Resolve with --attest requires --patterns\"\"\" in err.lower() \"\"\" Resolve with --attest requires --lang\"\"\" in err.lower() \"\"\" Resolve with --attest requires --path\"\"\" in err.lower() \"\"\" Resolve with --attest requires --status\"\"\" in err.lower() \"\"\" Resolve with --attest requires --note\"\"\" in err.lower() \"\"\" Resolve with --attest requires --path\"\"\" in err.lower() \"\"\" Resolve with --attest requires --status\"\"\" in err.lower() \"\"\" Resolve with --attest requires", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.42857142857142855 + }, + { + "repo": "peteromallet/desloppify", + "expected": "4", + "got": "4", + "got_raw": "4 * \" \" + \"def\" + \"\\n\" + 4 * \" \" + \"foo\" + \"\\n\" + 4 * \" \" + \"():\\n\" + 4 * \" \" + \"x = 1\\n\" + 4 * \" \" + \"if True:\\n\" + 4 * \" \" + \" pass\\n\" + 4 * \" \" + \"pass\" + \"\\n\" + 4 * \" \" + \"pass\" + \"\\n\" + 4 * \" \" + \"pass\" + \"\\n\" + 4 * \" \" + \"pass", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "petl-developers/petl", + "expected": "a.baz[0])", + "got": "a.baz[0])", + "got_raw": "a.baz[0]) assert_almost_equal(4.4, a.baz[1]) assert_almost_equal(.1, a.baz[2])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "petl-developers/petl", + "expected": "StopIteration)", + "got": "StopIteration)", + "got_raw": "StopIteration) as e: next(table)\n assert str(e.value) == 'empty table'\n\n\ndef test_head():\n table = (('a', 'b', 'c'), (1, 2, 3), (4, 5, 6))\n ieq(head(table, 1), (('a', 'b', 'c'), (1, 2, 3)))\n ieq(head(table, 2), (('a', 'b', 'c'), (1, 2, 3), (4, 5, 6)))\n ieq", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "petl-developers/petl", + "expected": "a['baz'][2])", + "got": "a['baz'][2])", + "got_raw": "a['baz'][2])\n\n def test_toarray_dtype():\n t = [('foo', 'bar', 'baz'),\n ('apples', 1, 2.5),\n ('oranges', 3, 4.4),\n ('pears', 7, .1)]\n a = toarray(t, dtype=np.float32)\n assert isinstance(a, np.ndarray)\n assert isinstance(a['foo'], np.ndarray)\n assert isinstance(a['bar'], np.ndarray)\n assert isinstance(a['baz'], np.ndarray)\n eq_('apples', a['", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "petl-developers/petl", + "expected": "('spong', 'bar')", + "got": "('spong', 'bar')", + "got_raw": "('spong', 'bar')\n\n result = rename(table, 'bar', 'quux')\n assert fieldnames(result) == ('foo', 'quux')\n\n result = rename(table, 'bar', 'quux', 'baz')\n assert fieldnames(result) == ('foo', 'baz')\n\n result = rename(table, 'bar', 'baz', 'quux')\n assert fieldnames(result) == ('foo', 'baz', 'quux')\n\n result = rename(table, 'bar', 'baz', 'quux', 'quux')\n assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "petl-developers/petl", + "expected": "'a'", + "got": "'a'", + "got_raw": "'a' assert result[0]['bar'] == 1 assert result[1]['foo'] == 'b' assert result[1]['bar'] == 2 assert result[2]['foo'] == 'c' assert result[2]['bar'] == 2 f.close() os.unlink(f.name)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "petl-developers/petl", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as e: toxlsx(tbl, f.name, 'Sheet2') eq_(e.value.args[0], 'Sheet2 already exists') toxlsx(tbl, f.name, 'Sheet2', mode=\"append\") eq_(tbl, fromxlsx(f.name)) toxlsx(tbl, f.name, 'Sheet3', mode=\"replace\") eq_(tbl, fromxlsx(f.name)) toxlsx(tbl, f.name, 'Sheet4', mode=\"new\") eq_(tbl, fromxlsx(f.name)) toxlsx(tbl, f.name, 'Sheet5', mode=\"new\") eq_(tbl, fromxlsx(f.name)) tox", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "petl-developers/petl", + "expected": "second_row2", + "got": "second_row2", + "got_raw": "second_row2 == first_row1 == first_row2 == second_row1 == second_row2 == first_row1 == first_row2 == first_row1 == first_row2 == first_row1 == first_row2 == first_row1 == first_row2 == first_row1 == first_row2 == first_row1 == first_row2 == first_row1 == first_row2 == first_row1 == first_row2 == first_row1 == first_row2 == first_row1 == first_row2 == first_row1 == first_row2 == first_row1 == first_row2 == first_row1 == first_row2 == first_row1 ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "petl-developers/petl", + "expected": "('foofoo', 'barbar')", + "got": "('foofoo', 'barbar')", + "got_raw": "('foofoo', 'barbar')\n\n result = rename(table, 'foo', 'foofoo', 'bar', 'barbar')\n assert fieldnames(result) == ('foofoo', 'barbar')\n\n result = rename(table, 'foo', 'foofoo', 'bar', 'barbar', 'baz', 'bazbaz')\n assert fieldnames(result) == ('foofoo', 'barbar', 'baz', 'bazbaz')\n\n result = rename(table, 'foo', 'foofoo', 'bar', 'barbar', 'baz', 'bazbaz', '", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "petl-developers/petl", + "expected": "'n'", + "got": "'n'", + "got_raw": "'n' assert col.type == 'INTEGER' assert col.nullable is True assert col.default is None assert col.primary_key is False assert col.index is False assert col.server_default is None assert col.server_onupdate is None assert col.autoincrement is False assert col.comment is None assert col.documentation is None assert col.indexes is None assert col.constraints is None assert col.foreign_keys is None assert col.unique is False assert col.indexes is None assert col.constraints is None assert col.foreign_keys is None assert col.unique is False assert col.indexes is None assert col.constraints is None assert col.foreign_keys is None assert col.unique is", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pfnet/pysen", + "expected": "BASE_DIR", + "got": "BASE_DIR.parent", + "got_raw": "BASE_DIR.parent / \"test\" / \"fake\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" / \"test\" /", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.6956521739130435 + }, + { + "repo": "pfnet/pysen", + "expected": "test_components", + "got": "[test_components[0]]", + "got_raw": "[test_components[0]]", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.8571428571428571 + }, + { + "repo": "pfnet/pysen", + "expected": "GitRepositoryNotFoundError)", + "got": "GitRepositoryNotFoundError)", + "got_raw": "GitRepositoryNotFoundError) as e: git_utils.check_tracked(test_file) assert str(e.value) == str(test_file) + \" is not tracked by git\" test_file.parent.mkdir() git_utils.check_tracked(test_file.parent) assert test_file.parent in git_utils.tracked(test_file.parent) test_file.parent.mkdir() test_file.parent.mkdir() git_utils.check_tracked(test_file.parent) assert test_file.parent in git_utils.tracked(test_file.parent) test_file.parent.mkdir() test_file.parent.mkdir() test_file.parent.mkdir() git_utils.check_tracked(test_file.parent) assert test_file.parent in git_utils.tracked(test_file.parent", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pfnet/pysen", + "expected": "logging_utils._PROCESS_STDERR", + "got": "logging_utils._PROCESS_STDERR)", + "got_raw": "logging_utils._PROCESS_STDERR) == logging_utils._PROCESS_STDERR_NAME) def test__get_process_output_level() -> None: assert logging_utils._get_process_output_level(logging_utils._PROCESS_STDOUT) == logging.INFO assert logging_utils._get_process_output_level(logging_utils._PROCESS_STDERR) == logging.WARNING def test__get_process_output_level_name_from_level() -> None: assert logging_utils._get_process_output_level_name_from_level(logging.INFO) == logging_utils._PROCESS_STDOUT assert logging_utils._get_process_output_level_name_from_level(logging.WARNING) == logging_utils._PROCESS_STDERR def test__get_process_output_level_from_level", + "exact_match": false, + "code_bleu": 0.668740304976422, + "edit_similarity": 0.9830508474576272 + }, + { + "repo": "pfnet/pysen", + "expected": "{\"op1\": [\"node2\"], \"op3\": [\"node2\"]}", + "got": "{\"op1\": [\"node2\"], \"op2\": [], \"op3\": [\"node2\"]}", + "got_raw": "{\"op1\": [\"node2\"], \"op2\": [], \"op3\": [\"node2\"]} # type: ignore # targets = m.get_targets(argparse.Namespace(enable=[\"op1\"], disable=None)) assert targets == {\"op1\": [\"node1\", \"node2\"], \"op2\": [\"node1\"], \"op3\": [\"node2\"]} # targets = m.get_targets(argparse.Namespace(enable=[\"op1\", \"op2\"], disable=[\"op1\"])) assert targets == {\"op1\": [\"node2\"], \"op2\": [\"node1\"], \"op3\": [\"node2\"]} # targets = m.get", + "exact_match": false, + "code_bleu": 0.6960884152052168, + "edit_similarity": 0.8674698795180723 + }, + { + "repo": "pfnet/pysen", + "expected": "settings_dir", + "got": "pathlib.Path(fname).parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent", + "got_raw": "pathlib.Path(fname).parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.parent", + "exact_match": false, + "code_bleu": 0.00397618243053825, + "edit_similarity": 0.008968609865470852 + }, + { + "repo": "pfnet/pysen", + "expected": "1", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "pfnet/pysen", + "expected": "TypeError)", + "got": "ValueError)", + "got_raw": "ValueError) as e: load_plugin(script=\"fakes/plugin.py\") assert str(e.value) == \"fakes/plugin.py is not a plugin\" with pytest.raises(ImportError) as e: load_plugin(module=\"fakes\") assert str(e.value) == \"fakes is not a module\" with pytest.raises(TypeError) as e: load_plugin(module=\"fakes.plugin\") assert str(e.value) == \"fakes.plugin is not a plugin\" with pytest.raises(TypeError) as e: load_plugin(module=\"fakes.plugin.\") assert str(e.value) == \"fakes.plugin. is not a plugin\" with pytest.raises", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "pfnet/pysen", + "expected": "4", + "got": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "pfnet/pysen", + "expected": "expected", + "got": "expected", + "got_raw": "expected \"\"\" Test the conversion of a string to a VersionRepresentation object. \"\"\" check_version(\"3.8\", VersionRepresentation(3, 8)) check_version(\"3.8.5\", VersionRepresentation(3, 8, 5)) check_version(\"3.8.5.1\", VersionRepresentation(3, 8, 5, 1)) check_version(\"3.8.5.1.2\", VersionRepresentation(3, 8, 5, 1, 2)) check_version(\"3.8.5.1.2.3\", VersionRepresentation(3, 8,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pfnet/pysen", + "expected": "1", + "got": "1", + "got_raw": "1 and target[0].name == \"* 10\" and target[0].ref == 10.0 and target[0].op == Operation.ADD and target[0].base_dir == base_dir and target[0].settings_dir == settings_dir and target[0].ref == 1.0 and target[0].op == Operation.MUL and target[0].base_dir == base_dir and target[0].settings_dir == settings_dir and target[0].ref == 1.0 and target[0].op == Operation.MUL and target[0].base_dir == base_dir and target", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pfnet/pysen", + "expected": "{\"hoge.fuga\": mypy.MypySetting.strict()}", + "got": "{ \"hoge.fuga\": mypy.MypySetting.strict() }", + "got_raw": "{ \"hoge.fuga\": mypy.MypySetting.strict() } # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore #", + "exact_match": false, + "code_bleu": 1.0, + "edit_similarity": 0.975609756097561 + }, + { + "repo": "pfnet/pysen", + "expected": "2", + "got": "2", + "got_raw": "2", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pfnet/pysen", + "expected": "0", + "got": "expected_cmds", + "got_raw": "expected_cmds + [\"--strict\"] + [\"--no-implicit-reexport\"] + [\"--no-implicit-optional\"] + [\"--no-implicit-any\"] + [\"--no-implicit-global\"] + [\"--no-implicit-expr\"] + [\"--no-implicit-attr\"] + [\"--no-implicit-attr\"] + [\"--no-implicit-attr\"] + [\"--no-implicit-attr\"] + [\"--no-implicit-attr\"] + [\"--no-implicit-attr\"] + [\"--no-implicit-attr\"] + [\"--no-implicit-attr\"] + [\"--no-implicit", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "pfnet/pysen", + "expected": "\"plugin\")", + "got": "\"plugin\")", + "got_raw": "\"plugin\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pfnet/pysen", + "expected": "\"%(message)s\"", + "got": "logging_utils._logging_output_format_no_color", + "got_raw": "logging_utils._logging_output_format_no_color % (level,) + \" %(message)s\" % (level,) + \"\\n\" % (level,) + \"\\x1b[0m\" % (level,) + \"\\x1b[0m\" % (level,) + \"\\x1b[0m\" % (level,) + \"\\x1b[0m\" % (level,) + \"\\x1b[0m\" % (level,) + \"\\x1b[0m\" % (level,) + \"\\x1b[0m\" % (level,) + \"\\x1b[0", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.06896551724137931 + }, + { + "repo": "pfnet/pysen", + "expected": "{\"setup.cfg\"}", + "got": "{", + "got_raw": "{ \"foo/bar.py\", \"bar/baz.py\", } | {\"foo/bar.py\", \"bar/baz.py\"} | {\"foo/bar.py\", \"bar/baz.py\"} | {\"foo/bar.py\", \"bar/baz.py\"} | {\"foo/bar.py\", \"bar/baz.py\"} | {\"foo/bar.py\", \"bar/baz.py\"} | {\"foo/bar.py\", \"bar/baz.py\"} | {\"foo/bar.py\", \"bar/baz.py\"} | {\"foo/bar.py\", \"bar/baz.py\"} | {\"foo/bar.py\", \"bar/baz.py\"} | {\"foo/bar.py\", \"", + "exact_match": false, + "code_bleu": 0.19820118583378682, + "edit_similarity": 0.14285714285714285 + }, + { + "repo": "pfnet/pysen", + "expected": "0", + "got": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "pfnet/pysen", + "expected": "f\"{entry_point}_component1\"", + "got": "\"test\"", + "got_raw": "\"test\" assert components[0].enable_c1 is True def test_load_from_file() -> None: \"\"\" load_from_file \"\"\" plugin = load_from_file(CURRENT_FILE) assert isinstance(plugin, PluginBase) assert plugin.name == \"test\" assert plugin.enable_c1 is True def test_load_from_module() -> None: \"\"\" load_from_module \"\"\" plugin = load_from_module(\"pysen.plugin.test\") assert isinstance(plugin, PluginBase) assert plugin.name == \"test\" assert plugin.enable_c1 is True def test_load_plugin() -> None: \"\"\" load_plugin \"\"\" plugin = load_plugin(\"test\") assert isinstance(plugin, Plugin", + "exact_match": false, + "code_bleu": 0.25, + "edit_similarity": 0.30303030303030304 + }, + { + "repo": "pfnet/pysen", + "expected": "6", + "got": "6", + "got_raw": "6 assert err2.message == \"error: Missing return statement [return]\" def test_mypy_invalid_format() -> None: err = parse_error_lines(mypy_invalid_format) assert err[0].file_path == Path(\"/home/user/pysen/__init__.py\") assert err[0].start_line == 72 assert err[0].end_line == 72 assert err[0].start_column == 0 assert err[0].message == \"error: unused 'type: ignore' comment\" def test_diff_parser() -> None: err1, err2 = parse_error_diffs(diff_err1) assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pgjones/hypercorn", + "expected": "(\"127.0.0.2\", 0)", + "got": "(\"127.0.0.1\", 80)", + "got_raw": "(\"127.0.0.1\", 80) # type: ignore assert scope[\"server\"] == (\"127.0.0.2\", 80) # type: ignore assert scope[\"headers\"] == [ (b\"x-forwarded-for\", b\"127.0.0.1\"), (b\"x-forwarded-proto\", b\"http\"), (b\"x-forwarded-host\", b\"example.com\"), ] assert scope[\"raw_path\"] == b\"/\" assert scope[\"query_string\"] == b\"\" assert scope[\"root_path\"] == \"\" assert scope[\"type\"] == \"", + "exact_match": false, + "code_bleu": 0.32466791547509893, + "edit_similarity": 0.9090909090909091 + }, + { + "repo": "pgjones/hypercorn", + "expected": "trio.BrokenResourceError)", + "got": "trio.ClosedResourceError)", + "got_raw": "trio.ClosedResourceError) as excinfo: await client_stream.send_all(b\"GET\") assert \"Connection closed\" in str(excinfo.value)", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.84 + }, + { + "repo": "pgjones/hypercorn", + "expected": "[]", + "got": "[", + "got_raw": "[ (b\"date\", b\"Thu, 01 Jan 1970 01:23:20 GMT\"), (b\"server\", b\"hypercorn-h2\"), (b\"connection\", b\"upgrade\"), (b\"upgrade\", b\"websocket\"), (b\"sec-websocket-accept\", b\"1234567890123456\"), (b\"sec-websocket-protocol\", b\"chat\"), (b\"sec-websocket-version\", b\"13\"), (b\"content-length\", b\"0\"), ] + [(b", + "exact_match": false, + "code_bleu": 0.29730177875068026, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "pgjones/hypercorn", + "expected": "expected", + "got": "expected", + "got_raw": "expected + 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pgjones/hypercorn", + "expected": "[ wsproto.events.AcceptConnection( extra_headers=[ (b\"date\", b\"Thu, 01 Jan 1970 01:23:20 GMT\"), (b\"server\", b\"hypercorn-h11\"), ] ) ]", + "got": "[wsproto.events.Accept()]", + "got_raw": "[wsproto.events.Accept()] # type: ignore\n\n await server.reader.send( # type: ignore\n client.send(wsproto.events.Accept()) # type: ignore\n )\n client.receive_data(await server.writer.receive()) # type: ignore\n\n assert list(client.events()) == [wsproto.events.Accept()] # type: ignore\n\n await server.reader.send( # type: ignore\n client.send(wsproto.events.TextMessage(\"Hello\")) # type: ignore\n )\n client.receive_data(await server.writer.receive()) # type: ignore\n\n assert list(client.events())", + "exact_match": false, + "code_bleu": 0.18583633372730274, + "edit_similarity": 0.3184713375796178 + }, + { + "repo": "pgjones/hypercorn", + "expected": "ASGIWebsocketState.CONNECTED", + "got": "\"accept\"", + "got_raw": "\"accept\" stream.config._log.info.assert_called_once_with( \"websocket accepted\" ) stream.config._log.debug.assert_called_once_with( \"websocket accepted\" ) stream.config._log.debug.assert_called_once_with( \"websocket accepted\" ) stream.config._log.debug.assert_called_once_with( \"websocket accepted\" ) stream.config._log.debug.assert_called_once_with( \"websocket accepted\" ) stream.config._log.debug.assert_called_once_with( \"websocket accepted\" ) stream.config._log.debug.assert_called_once_with( \"websocket accepted\" ) stream.config._log.debug.assert_called_once_with( \"websocket accepted\" ) stream.config._log.debug", + "exact_match": false, + "code_bleu": 0.16666666666666666, + "edit_similarity": 0.1111111111111111 + }, + { + "repo": "pgjones/hypercorn", + "expected": "[", + "got": "[", + "got_raw": "[ # type: ignore call(Response(stream_id=1, status_code=201, headers=[(b\"X-Special\", b\"Value\")])) ] # type: ignore protocol.send.reset_mock() await protocol.stream_send( Response(stream_id=1, status_code=201, headers=[(b\"X-Special\", b\"Value\"), (b\"X-Another\", b\"Another\")]) ) protocol.send.assert_called() # type: ignore assert protocol.send.call_args_list == [ # type: ignore call(Response(stream_id=1, status_code=201, headers=[(b\"X", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pgjones/hypercorn", + "expected": "None", + "got": "None", + "got_raw": "None\n assert str(exception) == \"Failure\"\n\n\nasync def test_shutdown_failure() -> None:\n event_loop: asyncio.AbstractEventLoop = asyncio.get_running_loop()\n\n lifespan = Lifespan(ASGIWrapper(no_lifespan_app), Config(), event_loop, {})\n lifespan_task = event_loop.create_task(lifespan.handle_lifespan())\n await lifespan.wait_for_shutdown()\n assert lifespan_task.done() is False\n exception = lifespan_task.exception()\n assert exception.subgroup(LifespanFailureError) is not None\n assert str(exception) == \"Failure\"\n\n\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pgjones/hypercorn", + "expected": "\"http\"", + "got": "\"http\"", + "got_raw": "\"http\" async with trio.open_nursery() as nursery: nursery.start_soon(send, {\"type\": \"http.response.start\", \"status\": 200, \"headers\": [(b\"content-length\", b\"12\")],}) nursery.start_soon(send, b\"Hello, World!\") nursery.start_soon(send, {\"type\": \"http.response.end\"}) async with httpx.AsyncClient(app=app) as client: response = await client.get(\"http://testserver/\") assert response.status_code == 200 assert response.text == \"Hello, World!\" async with httpx.AsyncClient(app=app", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pgjones/hypercorn", + "expected": "23", + "got": "23000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "23000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.03076923076923077 + }, + { + "repo": "pgjones/hypercorn", + "expected": "[wsproto.events.CloseConnection(code=1000, reason=\"\")]", + "got": "[wsproto.events.CloseConnection(code=1000)] task.cancel() await task.exception()", + "got_raw": "[wsproto.events.CloseConnection(code=1000)] task.cancel() await task.exception()", + "exact_match": false, + "code_bleu": 0.44825162243313244, + "edit_similarity": 0.6417910447761194 + }, + { + "repo": "pgjones/hypercorn", + "expected": "socket.SO_TYPE)", + "got": "socket.SO_TYPE)", + "got_raw": "socket.SO_TYPE) # type: ignore\n assert sock.type == socket.SOCK_STREAM # type: ignore\n\n\ndef test_create_sockets_tcp(monkeypatch: MonkeyPatch) -> None:\n mock_sock_class = Mock( # type: ignore\n return_value=NonCallableMock(**{\"getsockopt.return_value\": 0}) # type: ignore\n )\n monkeypatch.setattr(socket, \"socket\", mock_sock_class)\n config = Config()\n config.bind = [\"tcp://127.0.0.1:5555\"]\n sockets = config.create_s", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pgjones/hypercorn", + "expected": "[ {\"type\": \"http.response.start\", \"status\": 200, \"headers\": [(b\"content-length\", b\"13\")]}, {\"type\": \"http.response.body\", \"body\": b\"apix-/api/x/b\"}, {\"type\": \"http.response.start\", \"status\": 200, \"headers\": [(b\"content-length\", b\"10\")]}, {\"type\": \"http.response.body\", \"body\": b\"api-/api/b\"}, {\"type\": \"http.response.start\", \"status\": 404, \"headers\": [(b\"content-length\", b\"0\")]}, {\"type\": \"http.response.body\"}, ]", + "got": "[ { \"type\": \"http.response.start\", \"status\": 200, \"headers\": [(b\"content-length\", b\"10\")], }, { \"type\": \"http.response.body\", \"body\": b\"apix-b\", }, { \"type\": \"http.response.start\", \"status\": 200, \"headers\": [(b\"content-length\", b\"8\")], }, { \"type\": \"http.response.body\", \"body\": b\"api-b\", }, { \"type\": \"http.response.start\", \"status\": 200, \"headers\": [(b\"content-length", + "got_raw": "[ { \"type\": \"http.response.start\", \"status\": 200, \"headers\": [(b\"content-length\", b\"10\")], }, { \"type\": \"http.response.body\", \"body\": b\"apix-b\", }, { \"type\": \"http.response.start\", \"status\": 200, \"headers\": [(b\"content-length\", b\"8\")], }, { \"type\": \"http.response.body\", \"body\": b\"api-b\", }, { \"type\": \"http.response.start\", \"status\": 200, \"headers\": [(b\"content-length", + "exact_match": false, + "code_bleu": 0.7121114964947792, + "edit_similarity": 0.8454661558109834 + }, + { + "repo": "pgjones/hypercorn", + "expected": "\"/\u4e2d\".encode().decode(\"latin-1\")", + "got": "\"/\u4e2d\"", + "got_raw": "\"/\u4e2d\" environ[\"PATH_INFO\"] == \"/\u6587\" environ[\"QUERY_STRING\"] == \"bar=baz\" environ[\"HTTP_HOST\"] == \"localhost\" environ[\"HTTP_USER_AGENT\"] == \"\" environ[\"HTTP_ACCEPT\"] == \"*\" environ[\"HTTP_ACCEPT_ENCODING\"] == \"\" environ[\"HTTP_ACCEPT_LANGUAGE\"] == \"\" environ[\"HTTP_CONNECTION\"] == \"keep-alive\" environ[\"HTTP_CONTENT_LENGTH\"] == \"\" environ[\"HTTP_CONTENT_TYPE\"] == \"\" environ[\"HTTP_COOKIE\"] == \"\" environ[\"wsgi.version\"] == (1, 0) environ[\"wsgi.url_scheme\"] == \"http\" environ[\"wsgi.input\"] ==", + "exact_match": false, + "code_bleu": 0.05946035575013606, + "edit_similarity": 0.22857142857142856 + }, + { + "repo": "piccolo-orm/piccolo", + "expected": "\"uuid\")", + "got": "\"36b02341-2222-4222-8222-222222222222\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")", + "got_raw": "\"36b02341-2222-4222-8222-222222222222\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")\")", + "exact_match": false, + "code_bleu": 0.012997769455057805, + "edit_similarity": 0.02654867256637168 + }, + { + "repo": "piccolo-orm/piccolo", + "expected": "[1, 2, 3])", + "got": "[1, 2, 3])", + "got_raw": "[1, 2, 3])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "piccolo-orm/piccolo", + "expected": "[TableB.table_a])", + "got": "[\"table_a\"])", + "got_raw": "[\"table_a\"]) self.assertEqual(TableB._meta.foreign_key_references, [TableA]) self.assertEqual( TableB._meta.foreign_key_references[0].table, TableA, ) self.assertEqual( TableB._meta.foreign_key_references[0].column, \"id\", ) self.assertEqual( TableB._meta.foreign_key_references[0].references, TableA._meta.table_name, ) self.assertEqual( TableB._meta.foreign_key_references[0].references_column, \"id\", ) self.assertEqual( TableB._meta.foreign_key_references[0].on_delete, \"cascade\", ) self.assertEqual(", + "exact_match": false, + "code_bleu": 0.3387551654364098, + "edit_similarity": 0.6896551724137931 + }, + { + "repo": "piccolo-orm/piccolo", + "expected": "\"Bob\")", + "got": "\"Bob\")", + "got_raw": "\"Bob\") self.assertTrue(await Roadie.table_exists().run()) roadie = await Roadie.select(\"name\").first().run() assert roadie is not None self.assertEqual(roadie[\"name\"], \"Dave\") await Musician.drop_table().run() await Roadie.drop_table().run()\n\n\nclass TestNestedTransactions(DBTestCase):\n def setUp(self) -> None:\n self.engine_1 = SQLiteEngine(path=\"engine1.sqlite\")\n self.engine_2 = SQLiteEngine(path=\"engine2.sqlite\")\n self.manager = Manager(\n name=\"Manager 1\", email=\"manager1@example.com", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "piccolo-orm/piccolo", + "expected": "\"[]\")", + "got": "[])", + "got_raw": "[])", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.75 + }, + { + "repo": "piccolo-orm/piccolo", + "expected": "2)", + "got": "2)", + "got_raw": "2)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "piccolo-orm/piccolo", + "expected": "len(snapshot) == 2)", + "got": "snapshot[\"tables\"])", + "got_raw": "snapshot[\"tables\"])", + "exact_match": false, + "code_bleu": 0.188835962334798, + "edit_similarity": 0.47368421052631576 + }, + { + "repo": "piccolo-orm/piccolo", + "expected": "list)", + "got": "list)", + "got_raw": "list)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "piccolo-orm/piccolo", + "expected": "0)", + "got": "0)", + "got_raw": "0) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "piccolo-orm/piccolo", + "expected": "str)", + "got": "str)", + "got_raw": "str)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "piccolo-orm/piccolo", + "expected": "\"l\")", + "got": "None)", + "got_raw": "None)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "piccolo-orm/piccolo", + "expected": "\"manager\")", + "got": "\"manager\")", + "got_raw": "\"manager\") self.assertEqual( tableNameDetail.schema, \"music\" )", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "piccolo-orm/piccolo", + "expected": "tables)", + "got": "tables)", + "got_raw": "tables) self.assertNotIn(\"manager\", tables) self.manager_1._meta.table_name = \"manager\" self.manager_1._meta.schema_name = \"public\" self.manager_1._meta.table_description = \"Manager 1\" self.manager_1._meta.table_comment = \"Manager 1\" self.manager_1._meta.table_options = \"options\" self.manager_1._meta.table_indexes = [self.manager_1._meta.primary_key] self.manager_1._meta.table_constraints = [self.manager_1._meta.unique] self.manager_1._meta.table_foreign_keys = [self.manager_1._meta", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "piccolo-orm/piccolo", + "expected": "\"name\")", + "got": "Manager.name)", + "got_raw": "Manager.name) in BandA.manager.schema()[\"properties\"]) self.assertTrue(Manager.name in BandB.manager.schema()[\"properties\"]) self.assertTrue(\"name\" in BandC.manager.schema()[\"properties\"]) )", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.5 + }, + { + "repo": "piccolo-orm/piccolo", + "expected": "query.__str__())", + "got": "str(query))", + "got_raw": "str(query))", + "exact_match": false, + "code_bleu": 0.34020690871988585, + "edit_similarity": 0.5185185185185185 + }, + { + "repo": "piccolo-orm/piccolo", + "expected": "[TableA, TableB])", + "got": "[TableA, TableB]) self.assertListEqual( [TableB, TableA]) self.assertListEqual( [TableB, TableA]) self.assertListEqual( [TableA, TableB]) self.assertListEqual( [TableB, TableA]) self.assertListEqual( [TableA, TableB]) self.assertListEqual( [TableB, TableA]) self.assertListEqual( [TableB, TableA]) self.assertListEqual( [TableA, TableB]) self.assertListEqual( [TableB, TableA]) self.assertListEqual( [TableA, TableB]) self", + "got_raw": "[TableA, TableB]) self.assertListEqual( [TableB, TableA]) self.assertListEqual( [TableB, TableA]) self.assertListEqual( [TableA, TableB]) self.assertListEqual( [TableB, TableA]) self.assertListEqual( [TableA, TableB]) self.assertListEqual( [TableB, TableA]) self.assertListEqual( [TableB, TableA]) self.assertListEqual( [TableA, TableB]) self.assertListEqual( [TableB, TableA]) self.assertListEqual( [TableA, TableB]) self", + "exact_match": false, + "code_bleu": 0.05055267568287078, + "edit_similarity": 0.0774487471526196 + }, + { + "repo": "piccolo-orm/piccolo", + "expected": "\"Column\")", + "got": "Column)", + "got_raw": "Column) for column in table._meta.non_default_columns) for column in table._meta.non_default_columns) for column in table._meta.non_default_columns) for column in table._meta.non_default_columns) for column in table._meta.non_default_columns) for column in table._meta.non_default_columns) for column in table._meta.non_default_columns) for column in table._meta.non_default_columns) for column in table._meta.non_default_columns) for column in table._meta.non_default_columns) for column in table._meta.non_default_columns) for column in table._meta.non_default_columns) for column in table._meta", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.875 + }, + { + "repo": "piccolo-orm/piccolo", + "expected": "[test_date])", + "got": "[test_date])", + "got_raw": "[test_date]) self.assertListEqual(row.time, [test_time]) self.assertListEqual(row.timestamp, [test_timestamp]) self.assertListEqual(row.timestamptz, [test_timestamptz]) self.assertListEqual(row.decimal, [test_decimal]) self.assertIsNone(row.date_nullable) self.assertIsNone(row.time_nullable) self.assertIsNone(row.timestamp_nullable) self.assertIsNone(row.timestamptz_nullable) self.assertIsNone(row.decimal_nullable)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "piccolo-orm/piccolo", + "expected": "Integer().column_type)", + "got": "\"serial\")", + "got_raw": "\"serial\") == Manager.id.type) self.assertEqual(\"integer\", Band.manager.type) self.assertEqual(\"integer\", Band.manager.id.type) self.assertEqual(\"integer\", Band.manager.id.id.type) self.assertEqual(\"integer\", Band.manager.id.id.id.type) self.assertEqual(\"integer\", Band.manager.id.id.id.id.type) self.assertEqual(\"integer\", Band.manager.id.id.id.id.id.type) self.assertEqual(\"integer\", Band.manager.id.id.id.id.id.id.type) self.assertEqual(\"integer\", Band.manager.id.id.id.id.id.id.id.type) self.assertEqual(\"integer\", Band.manager.id.id.id.id.id.id.id.id.type) self.assertEqual(\"", + "exact_match": false, + "code_bleu": 0.17909498863725698, + "edit_similarity": 0.25806451612903225 + }, + { + "repo": "piccolo-orm/piccolo", + "expected": "[])", + "got": "[])", + "got_raw": "[])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "picoCTF/picoCTF", + "expected": "409", + "got": "400", + "got_raw": "400 res.json() == {\"error\": \"Cannot create team with same name as user\"} res = client.post( \"/api/v1/teams\", json={ \"team_name\": \"test\", \"team_password\": \"test\", }, headers=[(\"Limit-Bypass\", RATE_LIMIT_BYPASS_KEY)], ) assert res.status_code == 200 res = res.json() assert res[\"team_name\"] == \"test\" assert res[\"team_password\"] == \"test\" assert res[\"team_id\"] == 1 res = client.post( \"/api/v1/teams/join\", json={\"team_id\": 1", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "picoCTF/picoCTF", + "expected": "422", + "got": "403", + "got_raw": "403 res = client.post( \"/api/v1/submissions\", json={\"pid\": \"p1\", \"key\": \"flag\", \"method\": \"testing\"}, headers=[(\"X-CSRF-Token\", csrf_t)], ) assert res.status_code == 200 res = client.post( \"/api/v1/submissions\", json={\"pid\": \"p1\", \"key\": \"flag\", \"method\": \"testing\"}, headers=[(\"X-CSRF-Token\", csrf_t)], ) assert res.status_code == 200 res = client.post( \"/api/v1/submissions\", json={\"pid\": \"p1", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "picoCTF/picoCTF", + "expected": "2", + "got": "1.000000000000000253125781250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "1.000000000000000253125781250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "picoCTF/picoCTF", + "expected": "v", + "got": "v", + "got_raw": "v # noqa (json) for k in res.json.keys() if k not in nondeterministic_responses # noqa (json) # @TODO test the time field as well # @TODO test the time field as well # @TODO test the time field as well # @TODO test the time field as well # @TODO test the time field as well # @TODO test the time field as well # @TODO test the time field as well # @TODO test the time field as well # @TODO test the time field as well # @TODO test the time field as", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "picoCTF/picoCTF", + "expected": "403", + "got": "403", + "got_raw": "403 res.json[\"message\"] == \"You are not a student\" res = client.post( \"/api/v1/team/join\", json={\"team_name\": \"newteam\", \"team_password\": \"newteam\"}, headers=[(\"Limit-Bypass\", RATE_LIMIT_BYPASS_KEY)], ) assert res.status_code == 200 res = client.get(\"/api/v1/teams\") assert res.status_code == 200 assert res.json[\"teams\"][0][\"tid\"] == new_tid assert res.json[\"teams\"][0][\"name\"] == \"newteam\" assert res.json[\"teams\"][0][\"password\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "picoCTF/picoCTF", + "expected": "str(excep_info.value)", + "got": "str(excep_info.value)", + "got_raw": "str(excep_info.value)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pimutils/khal", + "expected": "''", + "got": "'one\\n'", + "got_raw": "'one\\n' 'two\\n' 'three\\n' 'four\\n' 'five\\n' 'six\\n' 'seven\\n' 'eight\\n' 'nine\\n' 'ten\\n' 'eleven\\n' 'twelve\\n' 'thirteen\\n' 'fourteen\\n' 'fifteen\\n' 'sixteen\\n' 'seventeen\\n' 'eighteen\\n' 'nineteen\\n' 'twenty\\n' 'twenty-one\\n' 'twenty-two\\n' 'twenty-three\\n' 'twenty-four\\n' 'twenty-five\\n' 'twenty-six\\n' 'twenty-seven\\n' '", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4444444444444444 + }, + { + "repo": "pimutils/khal", + "expected": "True", + "got": "True", + "got_raw": "True # noqa: E712 # pylint: disable=comparison-with-callable # noqa: E128 # pylint: disable=protected-access # noqa: E128 # pylint: disable=comparison-with-callable # noqa: E128 # pylint: disable=protected-access # noqa: E128 # pylint: disable=comparison-with-callable # noqa: E128 # pylint: disable=protected-access # noqa: E128 # pylint: disable=comparison-with-callable # noqa: E12", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pimutils/khal", + "expected": "'\\r\\n'.join([ 'BEGIN:VEVENT', 'SUMMARY:An Event', 'DTSTART;VALUE=DATE:20220702', 'DTEND;VALUE=DATE:20220703', 'DTSTAMP:20220702T140000Z', 'UID:E41JRQX2DB4P1AQZI86BAT7NHPBHPRIIHQKA', 'RRULE:FREQ=WEEKLY', 'END:VEVENT', '' ])", + "got": "textwrap.dedent(\"\"\"\\ BEGIN:VEVENT DTSTART;TZID=Europe/Berlin;TZOFFSETTO=+2:20220702T0000 DTEND;TZID=Europe/Berlin;TZOFFSETTO=+2:20220703T0000 RRULE:FREQ=WEEKLY END:VEVENT \"\"\") + '\\n' + _get_text('') + '\\n' + _get_text('') + '\\n' + _get_text('') + '\\n' + _get_text('') + '\\", + "got_raw": "textwrap.dedent(\"\"\"\\ BEGIN:VEVENT DTSTART;TZID=Europe/Berlin;TZOFFSETTO=+2:20220702T0000 DTEND;TZID=Europe/Berlin;TZOFFSETTO=+2:20220703T0000 RRULE:FREQ=WEEKLY END:VEVENT \"\"\") + '\\n' + _get_text('') + '\\n' + _get_text('') + '\\n' + _get_text('') + '\\n' + _get_text('') + '\\", + "exact_match": false, + "code_bleu": 0.038856620103720534, + "edit_similarity": 0.11740890688259109 + }, + { + "repo": "pimutils/khal", + "expected": "_get_TZIDs(part1)", + "got": "_get_TZIDs(part1)", + "got_raw": "_get_TZIDs(part1)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pimutils/khal", + "expected": "InvalidSettingsError)", + "got": "CannotParseConfigFileError)", + "got_raw": "CannotParseConfigFileError) as excinfo: get_config('nocalendars') assert str(excinfo.value) == 'No calendars found in config' def test_config_checks(self): config_checks({ 'color': 'auto', 'color_scheme': 'default', 'colorize': True, 'default_timezone': 'Europe/Berlin', 'format': 'default', 'format_str': 'default', 'location': 'default', 'no_color': False, 'output': 'default', 'output_format': 'default', 'timezone': 'Europe/Berlin', 'vdirs': [ { 'color': 'auto',", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.375 + }, + { + "repo": "pimutils/khal", + "expected": "uid", + "got": "f\"/pimutils.org/{uid}\"", + "got_raw": "f\"/pimutils.org/{uid}\" + os.sep + \"index.html\" + os.sep + \"index.html\" + os.sep + \"index.html\" + os.sep + \"index.html\" + os.sep + \"index.html\" + os.sep + \"index.html\" + os.sep + \"index.html\" + os.sep + \"index.html\" + os.sep + \"index.html\" + os.sep + \"index.html\" + os.sep + \"index.html\" + os.sep + \"index.html\" + os.sep + \"index.html\" + os.sep + \"index.html\" + os.sep + \"index.html", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.24 + }, + { + "repo": "pimutils/khal", + "expected": "(5, 1)", + "got": "(5, 1) assert utils.get_weekday_occurrence(dt.datetime(2017, 3, 5)) == (6, 1) assert utils.get_weekday_occurrence(dt.datetime(2017, 3, 6)) == (0, 1) assert utils.get_weekday_occurrence(dt.datetime(2017, 3, 7)) == (1, 1) assert utils.get_weekday_occurrence(dt.datetime(2017, 3, 8)) == (2, 1) assert utils.get_weekday_occurrence(dt.datetime(", + "got_raw": "(5, 1) assert utils.get_weekday_occurrence(dt.datetime(2017, 3, 5)) == (6, 1) assert utils.get_weekday_occurrence(dt.datetime(2017, 3, 6)) == (0, 1) assert utils.get_weekday_occurrence(dt.datetime(2017, 3, 7)) == (1, 1) assert utils.get_weekday_occurrence(dt.datetime(2017, 3, 8)) == (2, 1) assert utils.get_weekday_occurrence(dt.datetime(", + "exact_match": false, + "code_bleu": 0.04129025403661707, + "edit_similarity": 0.034782608695652174 + }, + { + "repo": "pimutils/khal", + "expected": "vevents2[0]", + "got": "vevents2[0]", + "got_raw": "vevents2[0]\n\ndef test_split_ics_with_uid():\n cal = _get_text('with_uid')\n vevents = split_ics(cal)\n assert len(vevents) == 2\n assert vevents[0].uid == '1' and vevents[1].uid == '2'\n\ndef test_split_ics_with_uids():\n cal = _get_text('with_uids')\n vevents = split_ics(cal)\n assert len(vevents) == 3\n assert vevents[0].uid == '1'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pimutils/khal", + "expected": "'Wednesday'", + "got": "'The", + "got_raw": "'The day after tomorrow' assert construct_daynames(dt.date(2016, 9, 22)) == 'Today' assert construct_daynames(dt.date(2016, 9, 23)) == 'Tomorrow' assert construct_daynames(dt.date(2016, 9, 24)) == 'The day after tomorrow' assert construct_daynames(dt.date(2016, 9, 25)) == 'Today' assert construct_daynames(dt.date(2016, 9, 26)) == 'Tomorrow' assert construct_daynames", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.26666666666666666 + }, + { + "repo": "pimutils/khal", + "expected": "8", + "got": "12", + "got_raw": "12 * 2 + 10 * 2 + 8 * 2 + 6 * 2 + 4 * 2 + 2 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + ", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "pimutils/khal", + "expected": "comp_config[key]", + "got": "comp_config[key]", + "got_raw": "comp_config[key] if key == 'default' else comp_config[key].copy() if isinstance(config[key], dict) else config[key] if isinstance(comp_config[key], dict) else comp_config[key] else comp_config[key] if isinstance(config[key], list) else config[key] if isinstance(comp_config[key], list) else comp_config[key] else comp_config[key] if isinstance(config[key], tuple) else config[key] if isinstance(comp_config[key], tuple) else comp_config[key] else comp_config[key] if isinstance(config[key], set) else config[key] if isinstance(comp_config[key], set) else comp_config[key]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pimutils/khal", + "expected": "\"\"", + "got": "[]", + "got_raw": "[] # no attendees in this event def test_event_attendees_with_participants(): event = Event.fromString(_get_text('event_dt_participants'), **EVENT_KWARGS) assert event.attendees == [vCalAddress('MAILTO:foo@bar.com'), vCalAddress('MAILTO:bar@baz.com')] def test_event_attendees_with_participant(): event = Event.fromString(_get_text('event_dt_participant'), **EVENT_KWARGS) assert event.attendees == [vCalAddress('MAILTO:foo@bar.com')] def test_event_attendees_with_participant_and_participants", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.0 + }, + { + "repo": "pimutils/khal", + "expected": "'2d'", + "got": "'2d'", + "got_raw": "'2d' # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pimutils/khal", + "expected": "2", + "got": "2", + "got_raw": "2 * 24 + 12 + 18 + 12 + 18 + 12 + 18 + 12 + 18 + 12 + 18 + 12 + 18 + 12 + 18 + 12 + 18 + 12 + 18 + 12 + 18 + 12 + 18 + 12 + 18 + 12 + 18 + 12 + 18 + 12 + 18 + 1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pimutils/khal", + "expected": "{vdir[len(path):] for vdir in get_all_vdirs(path + '/**/')}", + "got": "{vdir[len(path):] for vdir in get_all_vdirs(path + '/**/*'", + "got_raw": "{vdir[len(path):] for vdir in get_all_vdirs(path + '/**/*', recursive=False)} # type: ignore # pragma: no cover # this is a bit of a hack to avoid a circular dependency # see https://github.com/khal/khal/issues/1023 for details # pragma: no cover # we can't use the recursive=False option here, as it would # include the test_vdirs in the result # pragma: no cover # we can't use the recursive=True option here, as it would # include the test_vdirs in the result # pragma: no cover # we", + "exact_match": false, + "code_bleu": 0.8402513193586206, + "edit_similarity": 0.9743589743589743 + }, + { + "repo": "pimutils/khal", + "expected": "testList2", + "got": "testList2[0]", + "got_raw": "testList2[0] and 'light green' in testList2[1] and len(testList2) == 2 \\ pytest.approx(20) == testList2[0][1] and len(testList2[1]) == 10 \\ pytest.approx(10) == testList2[1][1] and testList2[0][0] == testList2[1][0] == 'light_blue' \\ pytest.approx(20) == testList2[0][2] and testList2[1][2] == 10 \\ pytest", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.8571428571428571 + }, + { + "repo": "pirxthepilot/wtfis", + "expected": "4", + "got": "5", + "got_raw": "5 assert str(table.columns[0]._cells[2]) == \"ASN:\" assert str(table.columns[0]._cells[3]) == \"Location:\" assert str(table.columns[0]._cells[4]) == \"Hostname:\" assert str(table.columns[1]._cells[2]) == \"16509 (Amazon.com, Inc.)\" assert str(table.columns[1]._cells[3]) == \"Mumbai, Maharashtra, IN\" assert str(table.columns[1]._cells[4]) == \"ec2-192-30-255-113.ap-south-1.compute.amazonaws", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "pirxthepilot/wtfis", + "expected": "\"cloudflare.com\"", + "got": "\"1.1.1.1\"", + "got_raw": "\"1.1.1.1\" assert ipwhois.ip == \"1.1.1.1\" assert ipwhois.country_code == \"US\" assert ipwhois.country == \"United States\" assert ipwhois.city == \"New York\" assert ipwhois.region == \"New York\" assert ipwhois.region_code == \"NY\" assert ipwhois.postal_code == \"10001\" assert ipwhois.latitude == 40.714224 assert ipwhois.longitude == -74.005974 assert ipwhois.isp ==", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.24 + }, + { + "repo": "pirxthepilot/wtfis", + "expected": "theme.heading_h1", + "got": "theme.urlhaus.heading_style.value", + "got_raw": "theme.urlhaus.heading_style.value + \"bold\" + theme.urlhaus.heading_style.value + \" \" + theme.urlhaus.heading_style.value + \" \" + theme.urlhaus.heading_style.value + \" \" + theme.urlhaus.heading_style.value + \" \" + theme.urlhaus.heading_style.value + \" \" + theme.urlhaus.heading_style.value + \" \" + theme.urlhaus.heading_style.value + \" \" + theme.urlhaus.heading_style.value + \" \" + theme.urlhaus.heading_style.value + \" \" + theme.urlhaus.heading_style.value + \" \" + theme.urlhaus.heading_style.value + \" \" + theme.urlhaus.heading_style.value +", + "exact_match": false, + "code_bleu": 0.24446151121745047, + "edit_similarity": 0.5714285714285714 + }, + { + "repo": "pirxthepilot/wtfis", + "expected": "HandlerException", + "got": "HandlerException", + "got_raw": "HandlerException\n\n @patch.object(requests.Session, \"get\")\n def test_vt_connection_error(self, mock_requests_get, domain_handler):\n \"\"\"\n Test a requests ConnectionError from the VT client. This also tests the\n common_exception_handler decorator.\n \"\"\"\n handler = domain_handler()\n mock_resp = requests.models.Response()\n\n mock_resp.status_code = 500\n mock_requests_get.return_value = mock_resp\n\n # Thorough test of first _fetch_* method\n with pytest.raises(HandlerException) as e:\n handler._fetch_vt_domain()\n\n assert (\n e.value", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pirxthepilot/wtfis", + "expected": "IpInfoMap.model_validate({})", + "got": "IpInfoMap()", + "got_raw": "IpInfoMap() # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore #", + "exact_match": false, + "code_bleu": 0.23026498539075899, + "edit_similarity": 0.5641025641025641 + }, + { + "repo": "pirxthepilot/wtfis", + "expected": "\"IPWhois\"", + "got": "\"ipwhois\"", + "got_raw": "\"ipwhois\" ipwhois_client.key == \"dummykey\" ipwhois_client.url == \"https://api.ipwhois.io/v1\" ipwhois_client.headers == { \"Accept\": \"application/json\", \"User-Agent\": \"wtfis\", } ipwhois_client.timeout == 10 ipwhois_client.proxy == None ipwhois_client.verify == True ipwhois_client.cert == None ipwhois_client.debug == False ipwhois_client.retry == 3 ipwhois_client.backoff == 1.0 ipwhois_client.max_retries == 10 ipwhois_client.max", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "pirxthepilot/wtfis", + "expected": "\"\"", + "got": "Text(\"\\n\")", + "got_raw": "Text(\"\\n\") # VT section break assert ip.renderable.renderables[3] == Text(\"\\n\") # GeoASN section break assert ip.renderable.renderables[5] == Text(\"\\n\") # Shodan section break assert ip.renderable.renderables[7] == Text(\"\\n\") # URLhaus section break assert ip.renderable.renderables[9] == Text(\"\\n\") # Other section break # VT section vt_table = vt_section.renderable assert type(vt_table) is Table assert vt_table.title == Text(\"VT\") assert vt_table", + "exact_match": false, + "code_bleu": 0.3021375397356768, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "pirxthepilot/wtfis", + "expected": "[]", + "got": "[\"web\"]", + "got_raw": "[\"web\"] * 13 + [\"webserver\"] * 1 + [\"webserver\"] * 1 + [\"webserver\"] * 1 + [\"webserver\"] * 1 + [\"webserver\"] * 1 + [\"webserver\"] * 1 + [\"webserver\"] * 1 + [\"webserver\"] * 1 + [\"webserver\"] * 1 + [\"webserver\"] * 1 + [\"webserver\"] * 1 + [\"webserver\"] * 1 + [\"webserver\"] * 1 + [\"webserver\"] * 1 + [\"webserver\"] * 1 +", + "exact_match": false, + "code_bleu": 0.49999999999999994, + "edit_similarity": 0.4444444444444444 + }, + { + "repo": "piskvorky/smart_open", + "expected": "\"w\")", + "got": "\"w\")", + "got_raw": "\"w\") fout.write(\"test\") fout.close() mock_open.return_value.write.assert_called_with(\"test\") mock_open.return_value.close.assert_called_with() self.stringio.seek(0) self.assertEqual(self.stringio.read(), \"test\") self.stringio.close() mock_open.return_value.close.assert_called_with() mock_open.return_value.close.assert_called_with() mock_open.return_value.close.assert_called_with() mock_open.return_value.close.assert_called_with() mock_open.return_value.close.assert_called_with() mock_open.return_value.close.assert_called_with() mock_open.return_value.close.assert_called_with() mock_open.return_value.close.assert_called_with() mock_open.return_value", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "piskvorky/smart_open", + "expected": "2", + "got": "len(set(self.versions))", + "got_raw": "len(set(self.versions)) # unique versions assert self.versions[0] != self.versions[1] # different versions assert self.versions[0] in self.versions[1:] # first version is in the second version assert self.versions[1] in self.versions[0:] # second version is in the first version\n\n def tearDown(self):\n resource = _resource('s3')\n resource.Bucket(BUCKET_NAME).delete_objects(Delete={'Objects': [{'Key': self.key}]})\n resource.Bucket(BUCKET_NAME).wait_until_not_exists()\n\n def test_read(self", + "exact_match": false, + "code_bleu": 0.11868405219520975, + "edit_similarity": 0.0 + }, + { + "repo": "piskvorky/smart_open", + "expected": "limit", + "got": "limit", + "got_raw": "limit + 1000000 + 1000000 + 1000000 + 1000000 + 1000000 + 1000000 + 1000000 + 1000000 + 1000000 + 1000000 + 1000000 + 1000000 + 1000000 + 1000000 +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "piskvorky/smart_open", + "expected": "0)", + "got": "1)", + "got_raw": "1)\n self.assertEqual(fout._part_size, min_part_size)\n self.assertEqual(fout._part_num, 1)\n self.assertEqual(fout._offset, 0)\n self.assertEqual(fout._end_offset, 262143)\n self.assertEqual(fout._buffer, b\"\")\n self.assertEqual(fout._buffer_size, 0)\n self.assertEqual(fout._buffer_pos, 0)\n self.assertEqual(fout._buffer_end, 0)\n self.assertEqual(fout._buffered, 0)\n self.assertEqual(fout._buffered_end, 0)\n", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "piskvorky/smart_open", + "expected": "3)", + "got": "10)", + "got_raw": "10)\n finally:\r\n obj.close()\r\n del obj\r\n\r\n def test_pathlib_monkeypatch_read_bz2(self):\r\n from smart_open.smart_open_lib import pathlib\r\n\r\n path = pathlib.Path(CURR_DIR) / 'test_data' / 'crime-and-punishment.txt.bz2'\r\n\r\n # Check that standard implementation can't work with bz2\r\n with path.open(\"r\") as infile:\r\n with self.assertRaises(Exception):\r\n lines = infile.readlines()\r\n\r\n # Check that our implementation works with bz2\r\n obj = patch_path", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.4 + }, + { + "repo": "piskvorky/smart_open", + "expected": "CRIME_AND_PUNISHMENT[:len(as_text)]", + "got": "CAP_TEXT[:75]", + "got_raw": "CAP_TEXT[:75] + '...' + '\\n' + 'This is a test' + '\\n' + 'This is a test' + '\\n' + 'This is a test' + '\\n' + 'This is a test' + '\\n' + 'This is a test' + '\\n' + 'This is a test' + '\\n' + 'This is a test' + '\\n' + 'This is a test' + '\\n' + 'This is a test' + '\\n' + 'This is a test' + '\\n' + 'This is a", + "exact_match": false, + "code_bleu": 0.24131087193505607, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "piskvorky/smart_open", + "expected": "404", + "got": "404", + "got_raw": "404", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "piskvorky/smart_open", + "expected": "data)", + "got": "data)", + "got_raw": "data) self.assertEqual(self.blob_client.size, len(data)) self.assertEqual(self.blob_client.content_type, 'text/plain') self.assertEqual(self.blob_client.last_modified, self.blob_client.created) self.assertEqual(self.blob_client.etag, '\"0000000000000000-0000000000000000\"') self.assertEqual(self.blob_client.content_encoding, None) self.assertEqual(self.blob_client.content_language, None) self.assertEqual(self.blob_client.content_disposition, None) self.assertEqual(self.blob_client.cache_control, None) self.assertEqual(self.blob_client.content", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "piskvorky/smart_open", + "expected": "text)", + "got": "text)", + "got_raw": "text)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "piskvorky/smart_open", + "expected": "WebHdfsException)", + "got": "WebHdfsException)", + "got_raw": "WebHdfsException) as excinfo: smart_open.webhdfs._get(make_url(\"/not_found\")) smart_open.webhdfs._get(make_url(\"/not_found\")) raise excinfo.value from excinfo.value assert str(excinfo.value) == \"404 Not Found\" assert excinfo.value.code == 404 assert excinfo.value.message == \"not found\" assert excinfo.value.url == make_url(\"/not_found\") assert excinfo.value.headers == {} assert excinfo.value.body == \"\" assert excinfo.value.error == \"\" assert excinfo.value.response == None assert excinfo.value.info == {} assert excinfo.value", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "piskvorky/smart_open", + "expected": "from_smart_open", + "got": "from_smart_open.decode('utf-8')", + "got_raw": "from_smart_open.decode('utf-8')", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.6521739130434783 + }, + { + "repo": "piskvorky/smart_open", + "expected": "b'')", + "got": "b'')", + "got_raw": "b'')", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "piskvorky/smart_open", + "expected": "text", + "got": "text", + "got_raw": "text + '\\n' + text + '\\n' + text + '\\n' + text + '\\n' + text + '\\n' + text + '\\n' + text + '\\n' + text + '\\n' + text + '\\n' + text + '\\n' + text + '\\n' + text + '\\n' + text + '\\n' + text + '\\n' + text + '\\n' + text + '\\n' + text + '\\n' + text + '\\n' + text + '\\n' + text + '\\n' + text + '\\n' + text +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "podly-pure-podcasts/podly_pure_podcasts", + "expected": "None", + "got": "None", + "got_raw": "None # Invalid duration, return None # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "podly-pure-podcasts/podly_pure_podcasts", + "expected": "AdSegmentPredictionList( ad_segments=[AdSegmentPrediction(segment_offset=12.0, confidence=0.86)], content_type=\"promotional_external\", confidence=0.91, )", + "got": "AdSegmentPredictionList( ad_segments=[AdSegmentPrediction(segment_offset=12.0, confidence=0.86)], content_type=\"promotional_external\", confidence=0.91, )", + "got_raw": "AdSegmentPredictionList( ad_segments=[AdSegmentPrediction(segment_offset=12.0, confidence=0.86)], content_type=\"promotional_external\", confidence=0.91, )", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "podly-pure-podcasts/podly_pure_podcasts", + "expected": "2", + "got": "2", + "got_raw": "2 # All posts should be included", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "podly-pure-podcasts/podly_pure_podcasts", + "expected": "3", + "got": "3", + "got_raw": "3\n assert limiter.current_calls == 0\n\n def test_acquire(self):\n \"\"\"Test acquiring a call to the LLMConcurrencyLimiter.\"\"\"\n limiter = LLMConcurrencyLimiter(max_concurrent_calls=2)\n\n # Acquire a call\n limiter.acquire()\n assert limiter.current_calls == 1\n\n # Acquire another call\n limiter.acquire()\n assert limiter.current_calls == 2\n\n # Attempt to acquire a third call (should block)\n with pytest.raises(TimeoutError) as exc_info:\n limiter.acquire(timeout=0.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "podly-pure-podcasts/podly_pure_podcasts", + "expected": "\"client_error\"", + "got": "\"client_error\"", + "got_raw": "\"client_error\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "podly-pure-podcasts/podly_pure_podcasts", + "expected": "\"rate_limit\"", + "got": "\"rate_limit\"", + "got_raw": "\"rate_limit\" def test_timeout_errors(self): \"\"\"Test identification of timeout errors.\"\"\" timeout_errors = [ \"Request timed out\", \"Connection timeout\", \"Request failed\", \"Timeout error\", \"API request timeout\", ] for error in timeout_errors: assert LLMErrorClassifier.is_retryable_error(error) assert LLMErrorClassifier.get_error_category(error) == \"timeout\" def test_other_errors(self): \"\"\"Test identification of other errors.\"\"\" other_errors = [ \"Internal server error\", \"Unexpected error\", \"Error processing request\", \"API error\", \"Unknown error\", ] for error in other_errors: assert LLMErrorClassifier.is", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "podly-pure-podcasts/podly_pure_podcasts", + "expected": "404", + "got": "404", + "got_raw": "404\n finally:\n runtime_config.autoprocess_on_download = original_flag", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "podly-pure-podcasts/podly_pure_podcasts", + "expected": "200", + "got": "200", + "got_raw": "200 # 10 workers * 20 calls each = 200 calls total", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "podly-pure-podcasts/podly_pure_podcasts", + "expected": "50000", + "got": "50000", + "got_raw": "50000 assert config.llm_enable_token_rate_limiting is False assert config.llm_max_input_tokens_per_minute == 100000 assert config.output.fade_ms == 3000 assert config.output.min_ad_segment_separation_seconds == 60 assert config.output.min_ad_segment_length_seconds == 14 assert config.output.min_confidence == 0.8 assert config.processing.num_segments_to_input_to_prompt == 30 # Check that the default values are used for missing keys assert config.llm_max_input_tokens_per_minute == 100", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "podly-pure-podcasts/podly_pure_podcasts", + "expected": "4", + "got": "2", + "got_raw": "2 * 4 // 2 + 2 * 2 // 2 + 2 * 1 // 2 + 2 * 0 // 2 + 2 * 1 // 2 + 2 * 0 // 2 + 2 * 1 // 2 + 2 * 0 // 2 + 2 * 1 // 2 + 2 * 0 // 2 + 2 * 1 // 2 + 2 * 0 // 2 + 2 * 1 // 2 + 2 * 0 // 2 + 2 *", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "podly-pure-podcasts/podly_pure_podcasts", + "expected": "\"https://example.com/podcast.mp3\"", + "got": "\"audio/mpeg\"", + "got_raw": "\"audio/mpeg\" \"https://example.com/podcast.mp3\" \"text/html\" \"https://example.com/episode\" \"https://example.com/episode-id\" \"audio/mpeg\" \"https://example.com/podcast.mp3\" \"text/html\" \"https://example.com/episode\" \"https://example.com/episode-id\" \"audio/mpeg\" \"https://example.com/podcast.mp3\" \"text/html\" \"https://example.com/episode\" \"https://example.com/episode-id\" \"audio/mpeg\" \"https://example.com/podcast.mp3\" \"text/html\" \"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.26666666666666666 + }, + { + "repo": "podly-pure-podcasts/podly_pure_podcasts", + "expected": "\"Authentication required.\"", + "got": "\"missing user\"", + "got_raw": "\"missing user\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4 + }, + { + "repo": "podly-pure-podcasts/podly_pure_podcasts", + "expected": "AdSegmentPredictionList( ad_segments=[AdSegmentPrediction(segment_offset=12.0, confidence=0.86)], content_type=\"promotional_external\", confidence=0.92, )", + "got": "AdSegmentPredictionList( ad_segments=[AdSegmentPrediction(segment_offset=12.0, confidence=0.86)], content_type=\"promotional_external\", confidence=0.92, )", + "got_raw": "AdSegmentPredictionList( ad_segments=[AdSegmentPrediction(segment_offset=12.0, confidence=0.86)], content_type=\"promotional_external\", confidence=0.92, )", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "podly-pure-podcasts/podly_pure_podcasts", + "expected": "202", + "got": "200", + "got_raw": "200 and \"started\" in response.text.lower() and \"job-123\" in response.text.lower() and \"missing-audio-guid\" in response.text.lower() and \"processing\" in response.text.lower() and \"post\" in response.text.lower() and \"download\" in response.text.lower() and \"audio.mp3\" in response.text.lower() and \"feed\" in response.text.lower() and \"test feed\" in response.text.lower() and \"missing audio\" in response.text.lower() and \"downloaded\" in response.text.lower() and \"audio.mp3\" in response.text.lower() and \"post", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "podly-pure-podcasts/podly_pure_podcasts", + "expected": "mock_feed", + "got": "mock_feed", + "got_raw": "mock_feed # Return the existing feed object instead of creating a new one # This is because the feed already exists in the database. mock_fetch_feed.assert_called_once_with( \"https://example.com/feed.xml\" ) mock_refresh_feed.assert_not_called() # The feed should not be refreshed since it already exists. \"\"\" Test the add_or_refresh_feed function with an existing feed. \"\"\" def test_add_or_refresh_feed_new(mock_fetch_feed, mock_feed_data): # Set up mock feed data mock_fetch_feed.return_value = mock_feed_data # Call the mocked function result = add_or_refresh_feed(\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "podly-pure-podcasts/podly_pure_podcasts", + "expected": "\"Test Episode\"", + "got": "\"Test_Episode\" assert sanitize_title(\"Test Episode\") == \"Test_Episode\" assert sanitize_title(\"Test Episode 123\") == \"Test_Episode_123\" assert sanitize_title(\"Test Episode 123 456\") == \"Test_Episode_123_456\" assert sanitize_title(\"Test Episode 123 456 789\") == \"Test_Episode_123_456_789\" assert sanitize_title(\"Test Episode 123 456 789", + "got_raw": "\"Test_Episode\" assert sanitize_title(\"Test Episode\") == \"Test_Episode\" assert sanitize_title(\"Test Episode 123\") == \"Test_Episode_123\" assert sanitize_title(\"Test Episode 123 456\") == \"Test_Episode_123_456\" assert sanitize_title(\"Test Episode 123 456 789\") == \"Test_Episode_123_456_789\" assert sanitize_title(\"Test Episode 123 456 789", + "exact_match": false, + "code_bleu": 0.02866600025576682, + "edit_similarity": 0.08045977011494253 + }, + { + "repo": "podly-pure-podcasts/podly_pure_podcasts", + "expected": "30.0", + "got": "30000.0", + "got_raw": "30000.0 / 1000.0 # Convert to seconds assert refreshed.ad_segments == [(5.0, 10.0)] assert refreshed.audio_path == output_path assert refreshed.audio_duration_ms == 30000.0 assert refreshed.audio_fade_in_ms == 1000.0 assert refreshed.audio_fade_out_ms == 1000.0 assert refreshed.audio_fade_in == True assert refreshed.audio_fade_out == True assert refreshed.audio_fade == True assert refreshed.audio_clip == True assert refreshed", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.7272727272727273 + }, + { + "repo": "podly-pure-podcasts/podly_pure_podcasts", + "expected": "[ mock.call(\"whitelist_post\", {\"post_id\": post_id}, wait=True), mock.call(\"increment_download_count\", {\"post_id\": post_id}, wait=False), ])", + "got": "f\"Downloaded {post_guid} (id={post_id})\")", + "got_raw": "f\"Downloaded {post_guid} (id={post_id})\")", + "exact_match": false, + "code_bleu": 0.036632513659858576, + "edit_similarity": 0.25555555555555554 + }, + { + "repo": "podly-pure-podcasts/podly_pure_podcasts", + "expected": "[0, 1, 2, 3, 4, 5]", + "got": "[2, 3, 4] + [1, 5, 6] + [0] + [7, 8, 9] + [10, 11, 12] + [13, 14, 15] + [16, 17, 18] + [19, 20, 21] + [22, 23, 24] + [25, 26, 27] + [28, 29, 30] + [31", + "got_raw": "[2, 3, 4] + [1, 5, 6] + [0] + [7, 8, 9] + [10, 11, 12] + [13, 14, 15] + [16, 17, 18] + [19, 20, 21] + [22, 23, 24] + [25, 26, 27] + [28, 29, 30] + [31", + "exact_match": false, + "code_bleu": 0.07082243235528715, + "edit_similarity": 0.14285714285714285 + }, + { + "repo": "pre-commit/pre-commit", + "expected": "'system'", + "got": "'12'", + "got_raw": "'12' # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa:", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "pre-commit/pre-commit", + "expected": "(('cmd',),)", + "got": "(", + "got_raw": "( ('cmd',), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (),", + "exact_match": false, + "code_bleu": 0.08494336535733721, + "edit_similarity": 0.16666666666666666 + }, + { + "repo": "pre-commit/pre-commit", + "expected": "'~'", + "got": "'~'", + "got_raw": "'~' + os.sep + 'bin' + os.sep + 'python' + os.sep + 'python' + os.sep + 'python' + os.sep + 'python' + os.sep + 'python' + os.sep + 'python' + os.sep + 'python' + os.sep + 'python' + os.sep + 'python' + os.sep + 'python' + os.sep + 'python' + os.sep + 'python' + os.sep + 'python' + os.sep + 'python' + os.sep + 'python' + os.sep + 'python' + os.sep + 'python", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pre-commit/pre-commit", + "expected": "'bye\\n'", + "got": "'bye\\n'", + "got_raw": "'bye\\n'\n\n\ndef test_main(capfd):\n ret = main((\n sys.executable, '-c', 'print(\"hello\")', 'foo', 'bar', 'baz', 'qux', 'quux', 'quuz', 'quxz', 'quuxz', 'quuzz', 'quxzz', 'quuxzz', 'quuzzz', 'quxzzz', 'quuxzzz', 'quuzzzz', 'quxzzzz', 'quuxzzzz', 'quuzzzzz', 'quxzzzzz', 'qu", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pre-commit/pre-commit", + "expected": "'repo'", + "got": "'repo'", + "got_raw": "'repo' assert store.db_repo_name('repo', ('foo',)) == 'repo:foo' assert store.db_repo_name('repo', ('foo', 'bar')) == 'repo:foo:bar' assert store.db_repo_name('repo', ('foo', 'bar', 'baz')) == 'repo:foo:bar:baz' assert store.db_repo_name('repo', ('foo', 'bar', 'baz', 'qux')) == 'repo:foo:bar:baz:qux' assert store.db_repo_name('repo', ('foo', 'bar', 'baz', 'qux', 'quux", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pre-commit/pre-commit", + "expected": "4", + "got": "4", + "got_raw": "4 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pre-commit/pre-commit", + "expected": "f2.read()", + "got": "f2.read()", + "got_raw": "f2.read() _test_foo_state(path.foo_filename) _test_img_state(path.img_filename) _test_foo_state(path.foo_filename) _test_img_state(path.img_filename) _test_foo_state(path.foo_filename) _test_img_state(path.img_filename) _test_foo_state(path.foo_filename) _test_img_state(path.img_filename) _test_foo_state(path.foo_filename) _test_img_state(path.img_filename) _test_foo_state(path.foo_filename) _test_img_state(path.img_filename) _test_foo_state(path.foo_filename) _test_img_state(path.img_filename) _test_foo_state", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pre-commit/pre-commit", + "expected": "stdout", + "got": "stdout.lower()", + "got_raw": "stdout.lower() or b'pre commit is awesome' in stdout.lower() or b'pre-commit is awesome' in stdout.lower() or b'pre commit is awesome' in stdout.lower() or b'pre-commit is awesome' in stdout.lower() or b'pre-commit is awesome' in stdout.lower() or b'pre-commit is awesome' in stdout.lower() or b'pre-commit is awesome' in stdout.lower() or b'pre-commit is awesome' in stdout.lower() or b'pre-commit is awesome' in stdout.lower() or b'pre-commit is awesome' in stdout.lower() or b'pre-commit", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6 + }, + { + "repo": "pre-commit/pre-commit", + "expected": "2", + "got": "2", + "got_raw": "2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pre-commit/pre-commit", + "expected": "out", + "got": "out.lower()", + "got_raw": "out.lower() ### END_TARGET out.lower() assert b'TOML = fa267f1f-6049-4f14-aa54-33bafae1ed76' in out.lower() ### END_TARGET out.lower() assert b'julia' in out.lower() ### END_TARGET out.lower() assert b'julia' in out.lower() ### END_TARGET out.lower() assert b'julia' in out.lower() ### END_TARGET out.lower() assert b'julia' in out.lower() ### END_TARGET out.lower() assert b'julia' in", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.42857142857142855 + }, + { + "repo": "pre-commit/pre-commit", + "expected": "'cd'", + "got": "'hazmat'", + "got_raw": "'hazmat' assert arg.cmd == ('cd', 'subdir') assert arg.args == ('cmd', '--', 'f1', 'f2') assert arg.cwd == mock_store_dir / 'subdir' assert arg.env == {} assert arg._config == C.CONFIG_FILE assert arg._config_file == C.CONFIG_FILE assert arg._config_dir == C.CONFIG_DIR assert arg._config_file_dir == C.CONFIG_FILE_DIR assert arg._config_file_dir_path == C.CONFIG_FILE_DIR_PATH assert arg._config_file_path == C.CONFIG_FILE_PATH assert arg._config_path == C.CONFIG_PATH assert arg._config_path_dir == C.CONFIG", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "pre-commit/pre-commit", + "expected": "'python3.12'", + "got": "'python3.12'", + "got_raw": "'python3.12' / win_exe() if sys.platform == 'win32' else 'python3.12' / 'bin' / 'python3.12' / 'python3.12' / 'bin' / 'python3.12' / 'python3.12' / 'bin' / 'python3.12' / 'python3.12' / 'bin' / 'python3.12' / 'python3.12' / 'bin' / 'python3.12' / 'python3.12'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pre-commit/pre-commit", + "expected": "expected", + "got": "expected", + "got_raw": "expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pre-commit/pre-commit", + "expected": "'system'", + "got": "'/path/to/exe'", + "got_raw": "'/path/to/exe' / 'bin' / 'ruby' / '2.7.2' / 'bin' / 'gem' / '2.7.2' / 'bin' / 'gem' / '2.7.2' / 'bin' / 'gem' / '2.7.2' / 'bin' / 'gem' / '2.7.2' / 'bin' / 'gem' / '2.7.2' / 'bin' / 'gem' / '2.7.2' / 'bin' / 'gem' / '", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.36363636363636365 + }, + { + "repo": "pre-commit/pre-commit", + "expected": "f'{subdir}\\na\\nb\\n'", + "got": "_norm('subdir\\na\\nb\\n')", + "got_raw": "_norm('subdir\\na\\nb\\n') + '\\n' + _norm('a\\nb\\n') + '\\n' + _norm('subdir\\n') + '\\n' + _norm('subdir\\n') + '\\n' + _norm('subdir\\n') + '\\n' + _norm('subdir\\n') + '\\n' + _norm('subdir\\n') + '\\n' + _norm('subdir\\n') + '\\n' + _norm('subdir\\n') + '\\n' + _norm('subdir\\n') + '\\n' + _norm('sub", + "exact_match": false, + "code_bleu": 0.3021375397356768, + "edit_similarity": 0.7619047619047619 + }, + { + "repo": "pre-commit/pre-commit", + "expected": "''", + "got": "''", + "got_raw": "''", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pre-commit/pre-commit", + "expected": "'f5\\nf6\\n'", + "got": "'f4\\n'", + "got_raw": "'f4\\n' 'f5\\n' 'f6\\n' 'f7\\n' 'f8\\n' 'f9\\n' 'f1\\n' 'f2\\n' 'f3\\n' 'f4\\n' 'f5\\n' 'f6\\n' 'f7\\n' 'f8\\n' 'f9\\n' 'f1\\n' 'f2\\n' 'f3\\n' 'f4\\n' 'f5\\n' 'f6\\n' 'f7\\n' 'f8\\n' 'f9\\n' 'f1\\n' 'f2", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.625 + }, + { + "repo": "pre-commit/pre-commit", + "expected": "('echo', 'hi')", + "got": "['echo', 'hi'] + C.DEFAULT_EMOJI + C.DEFAULT_EXIT_CODES + C.DEFAULT_ERROR_CODES + C.DEFAULT_IGNORED_EXIT_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES +", + "got_raw": "['echo', 'hi'] + C.DEFAULT_EMOJI + C.DEFAULT_EXIT_CODES + C.DEFAULT_ERROR_CODES + C.DEFAULT_IGNORED_EXIT_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES + C.DEFAULT_IGNORED_ERROR_CODES +", + "exact_match": false, + "code_bleu": 0.028562505929305496, + "edit_similarity": 0.041811846689895474 + }, + { + "repo": "pre-commit/pre-commit", + "expected": "out.decode())", + "got": "out)", + "got_raw": "out)", + "exact_match": false, + "code_bleu": 0.19820118583378682, + "edit_similarity": 0.47058823529411764 + }, + { + "repo": "pre-commit/pre-commit", + "expected": "()", + "got": "'root'", + "got_raw": "'root' # noqa: E501\n\n\ndef test_docker_fallback_group():\n def invalid_attribute():\n raise AttributeError\n\n with mock.patch.multiple(\n 'os', create=True,\n getuid=invalid_attribute,\n getgid=invalid_attribute,\n ):\n\n assert docker.get_docker_group() == 'root' # noqa: E501\n\n\ndef test_docker_fallback_uid():\n def invalid_attribute():\n raise AttributeError\n\n with mock.patch.multiple(\n 'os', create=True, getuid=invalid_attribute, getgid=10", + "exact_match": false, + "code_bleu": 0.25, + "edit_similarity": 0.0 + }, + { + "repo": "prkumar/uplink", + "expected": "method", + "got": "method.upper()", + "got_raw": "method.upper() + \" \" + uri + \" HTTP/1.1\" request_builder.headers = {} request_builder.body = None request_builder.url = uri request_builder.method = method.upper() + \" \" + uri + \" HTTP/1.1\" request_builder.headers = {} request_builder.body = None request_builder.url = uri request_builder.method = method.upper() + \" \" + uri + \" HTTP/1.1\" request_builder.headers = {} request_builder.body = None request_builder.url = uri request_builder.method = method.upper() + \" \" + uri + \" HTTP/1.1\" request_builder.headers = {} request_builder", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6 + }, + { + "repo": "prkumar/uplink", + "expected": "10", + "got": "10.000000000000001", + "got_raw": "10.000000000000001 # 10.000000000000001 is the float representation of 10.000000000000001 in Python 3. # noqa: E501 request_builder.info[\"timeout\"] = 10.000000000000001 # 10.000000000000001 is the float representation of", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2 + }, + { + "repo": "prkumar/uplink", + "expected": "\"example.com\"", + "got": "\"http://example.com\"", + "got_raw": "\"http://example.com\" builder_mock.auth == (\"username\", \"password\") builder_mock.converter == converter_factory_mock builder_mock.hook == transaction_hook_mock builder_mock.client == http_client_mock builder_mock.build.return_value == fake_service_cls builder_mock.build.mock_calls == [mocker.call( fake_service_cls, base_url=\"example.com\", client=http_client_mock, converter=converter_factory_mock, auth=(\"username\", \"password\"), hook=transaction_hook_mock, ), ] builder_cls_mock.mock_calls == [mocker.call() ] builder_cls_mock.mock_calls[0].args[0] == mocker.call() builder_cls_mock.mock_calls[0", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.7878787878787878 + }, + { + "repo": "prkumar/uplink", + "expected": "obj)", + "got": "obj)", + "got_raw": "obj)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "prkumar/uplink", + "expected": "data", + "got": "data[\"query\"]", + "got_raw": "data[\"query\"] + \"\\n\" + data[\"variables\"] or \"{}\" + \"\\n\" + \"null\" + \"\\n\" + \"null\" + \"\\n\" + \"null\" + \"\\n\" + \"null\" + \"\\n\" + \"null\" + \"\\n\" + \"null\" + \"\\n\" + \"null\" + \"\\n\" + \"null\" + \"\\n\" + \"null\" + \"\\n\" + \"null\" + \"\\n\" + \"null\" + \"\\n\" + \"null\" + \"\\n\" + \"null\" + \"\\n\" + \"null\"", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.47058823529411764 + }, + { + "repo": "prkumar/uplink", + "expected": "{\"owner\": \"prkumar\", \"name\": \"uplink\"}", + "got": "Repo(owner=User(id=1, name=\"prkumar\"), name=\"uplink\")", + "got_raw": "Repo(owner=User(id=1, name=\"prkumar\"), name=\"uplink\")", + "exact_match": false, + "code_bleu": 0.07658412276041004, + "edit_similarity": 0.6373626373626373 + }, + { + "repo": "prkumar/uplink", + "expected": "SIMPLE_RESPONSE", + "got": "SIMPLE_RESPONSE", + "got_raw": "SIMPLE_RESPONSE", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "prkumar/uplink", + "expected": "exceptions.SSLError)", + "got": "exceptions.HTTPError)", + "got_raw": "exceptions.HTTPError) as exc_info: raise requests.HTTPError() assert exc_info.value.response is None assert exc_info.value.code is None assert exc_info.value.message is None assert exc_info.value.url is None assert exc_info.value.request is None assert exc_info.value.headers is None assert exc_info.value.cookies is None assert exc_info.value.reason is None assert exc_info.value.args == () assert exc_info.value.__str__() == \"\" assert exc_info.value.__repr__() == \"\" assert exc_info.value.__class__.__name__ == \"HTTPError\" assert exc_info.value.__class__.__module__ == \"requests.exceptions\" assert exc_info.value.__class", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.8292682926829268 + }, + { + "repo": "prkumar/uplink", + "expected": "None", + "got": "None", + "got_raw": "None\n\n\ndef test_get_client_with_twisted_client():\n with twisted_._patch_twisted_client() as client:\n assert register.get_client(\"twisted\") == client\n\n\ndef test_get_client_with_requests_client():\n with requests_._patch_requests_client() as client:\n assert register.get_client(\"requests\") == client\n\n\ndef test_get_client_with_io_client():\n with io._patch_io_client() as client:\n assert register.get_client(\"io\") == client\n\n\ndef test_get_client_with_twisted_client_and_requests_client():\n with twisted_._patch_twisted_client() as twisted_client, requests_", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "prkumar/uplink", + "expected": "converter_factory_mock", + "got": "converter_factory_mock()", + "got_raw": "converter_factory_mock() # type: ignore # noqa: E501 # pylint: disable=protected-access # noqa: E501 # pylint: disable=protected-access # noqa: E501 # pylint: disable=protected-access # noqa: E501 # pylint: disable=protected-access # noqa: E501 # pylint: disable=protected-access # noqa: E501 # pylint: disable=protected-access # noqa: E501 # pylint: disable=protected-access # noqa: E501 # pylint: disable=protected-access # noqa: E501", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.9565217391304348 + }, + { + "repo": "prkumar/uplink", + "expected": "uri", + "got": "uri", + "got_raw": "uri + \"?\" + utils.to_query_string(definition.query) + utils.to_query_string(definition.path) + utils.to_query_string(definition.body) + utils.to_query_string(definition.headers) + utils.to_query_string(definition.cookies) + utils.to_query_string(definition.form) + utils.to_query_string(definition.files) + utils.to_query_string(definition.json) + utils.to_query_string(definition.data) + utils.to_query_string(definition.json_body) + utils.to_query_string(definition.json_body) + utils.to_query_string(definition.json_body) + utils.to_query_string(definition.json_body) + utils.to_query", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "prkumar/uplink", + "expected": "basic_auth", + "got": "basic_auth._authenticator", + "got_raw": "basic_auth._authenticator # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.5714285714285714 + }, + { + "repo": "prkumar/uplink", + "expected": "commands.MissingArgumentAnnotations)", + "got": "ValueError)", + "got_raw": "ValueError) as exc_info: builder.build_request() assert str(exc_info.value) == \"Missing arguments: arg1\" assert argument_handler_builder.missing_arguments == [\"arg1\"] assert uri_definition_builder.remaining_variables == [] assert builder._arguments == [] assert builder._uri_variables == [] assert builder._headers == {} assert builder._query_parameters == {} assert builder._body == {} assert builder._cookies == {} assert builder._files == {} assert builder._auth == {} assert builder._timeout == 30.0 assert builder._stream == False assert builder._allow_redirects == True assert builder._max_redirects == 1", + "exact_match": false, + "code_bleu": 0.2686424829558855, + "edit_similarity": 0.2127659574468085 + }, + { + "repo": "prkumar/uplink", + "expected": "result", + "got": "result.data.data.decode()", + "got_raw": "result.data.data.decode() if is_marshmallow_3 else result.data.data", + "exact_match": false, + "code_bleu": 0.14113991930789777, + "edit_similarity": 0.3870967741935484 + }, + { + "repo": "prkumar/uplink", + "expected": "expected_error", + "got": "expected_error", + "got_raw": "expected_error # CustomError() # Error handler should be called with the exception assert calendar.flagged is True # Consumer should be passed to the error handler assert exc_info.value.consumer is mock_client # Error handler should be called with the exception type, value, and traceback assert exc_info.value.exc_type is CustomError assert exc_info.value.exc_value == expected_error assert exc_info.value.exc_tb is not None # Error handler should be called with the exception type, value, and traceback assert exc_info.value.exc_type is CustomError assert exc_info.value.exc_value == expected_error assert exc", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "prkumar/uplink", + "expected": "\"/graphql2\"", + "got": "\"/graphql\"", + "got_raw": "\"/graphql\" assert request.json() == data[\"query\"] assert request.headers[\"Accept\"] == \"application/vnd.github.v3.full+json\" assert request.headers[\"Content-Type\"] == \"application/x-www-form-urlencoded\" assert request.headers[\"User-Agent\"] == \"uplink/0.0.1\" assert request.body == \"query=%22%22\" assert request.body == \"query=%22%22\" assert request.body == \"query=%22%22\" assert request.body == \"query=%22%22\" assert request.body == \"query=%22%22\" assert", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.9523809523809523 + }, + { + "repo": "prkumar/uplink", + "expected": "auth_str", + "got": "auth_str.encode()", + "got_raw": "auth_str.encode() # noqa: E501 request_builder.info[\"headers\"][\"Authorization\"] == \"Basic dXNlcm5hbWU6cGFzc3dvcmQ=\" # noqa: E501 request_builder.info[\"headers\"][\"Content-Type\"] == \"application/x-www-form-urlencoded\" request_builder.info[\"url\"] == \"http://httpbin.org/basic-auth/username/password\" request_builder.info[\"method\"] == \"GET\" request_builder.info[\"body\"] == \"\" request_builder.info[\"headers\"][\"Accept\"] == \"application/json\" request_builder.info[\"headers\"][\"Accept-Encoding\"] == \"gzip", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.64 + }, + { + "repo": "prkumar/uplink", + "expected": "\"2\"", + "got": "\"2\"", + "got_raw": "\"2\" assert converter_.convert(\"2\") == \"2\" assert converter_.convert(None) == \"\" assert converter_.convert(True) == \"true\" assert converter_.convert(False) == \"false\" assert converter_.convert(1.2) == \"1.2\" assert converter_.convert(1.2e-3) == \"0.0012\" assert converter_.convert(1.2e3) == \"1200.0\" assert converter_.convert(1.2e-30) == \"0.0000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "prkumar/uplink", + "expected": "http_client_mock", + "got": "http_client_mock", + "got_raw": "http_client_mock assert builder_mock.converter is converter_factory_mock assert builder_mock.auth == (\"username\", \"password\") assert builder_mock.hook is transaction_hook_mock assert builder_mock._build_request_definition_builder() is builder_mock.builder_request_definition_builder assert builder_mock._build_request_definition() is builder_mock.request_definition assert builder_mock._build_request() is builder_mock.request assert builder_mock._build_response() is builder_mock.response assert builder_mock._build_error() is builder_mock.error assert builder_mock._build_error_response() is builder_mock.error_response assert builder_mock._build_error_response_body() is builder_mock.error_response_body assert builder_mock._build_error_response", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "prkumar/uplink", + "expected": "0", + "got": "0", + "got_raw": "0\n\n\ndef test_json_with_default(request_builder):\n json = decorators.json(default=\"default\")\n\n # Verify that we add the hook\n json.modify_request(request_builder)\n request_builder.add_transaction_hook.assert_called_with(json._hook)\n\n # Verify\n request_builder.info[\"data\"] = None\n json.set_json_body(request_builder)\n assert request_builder.info[\"json\"] == \"default\"\n assert len(request_builder.info[\"json\"]) == 1\n\n\ndef test_json_with_default_and_data(request_builder):\n json = decorators.json(default=\"default\")\n\n # Verify that we add", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "protectai/llm-guard", + "expected": "expected_score", + "got": "expected_score", + "got_raw": "expected_score", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "protectai/llm-guard", + "expected": "expected_valid", + "got": "expected_valid", + "got_raw": "expected_valid and score == expected_score", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "protectai/llm-guard", + "expected": "output", + "got": "output.strip()", + "got_raw": "output.strip() # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6 + }, + { + "repo": "protectai/llm-guard", + "expected": "True", + "got": "True", + "got_raw": "True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "protectai/llm-guard", + "expected": "expected_output", + "got": "expected_output.strip()", + "got_raw": "expected_output.strip() if valid else \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\"", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.7894736842105263 + }, + { + "repo": "protectai/llm-guard", + "expected": "expected_score", + "got": "expected_score", + "got_raw": "expected_score", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "protectai/llm-guard", + "expected": "expected_valid", + "got": "expected_valid", + "got_raw": "expected_valid # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E7", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "protectai/llm-guard", + "expected": "0", + "got": "0", + "got_raw": "0\n\ndef test_get_emotion_analysis_empty_output():\n \"\"\"Test that the scanner returns an empty dictionary for empty output.\"\"\"\n scanner = EmotionDetection(threshold=0.5)\n output = \"\"\n\n emotion_analysis = scanner.get_emotion_analysis(output)\n assert emotion_analysis == {}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "protectai/llm-guard", + "expected": "expected_valid", + "got": "expected_valid", + "got_raw": "expected_valid and score == expected_score", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "protectai/llm-guard", + "expected": "expected_score", + "got": "expected_score", + "got_raw": "expected_score", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "protectai/llm-guard", + "expected": "expected_prompt", + "got": "expected_prompt", + "got_raw": "expected_prompt # Correct sanitized output assert valid == expected_valid # Correct validity check assert score == expected_score # Correct score assert scanner.is_blocked == True # Correct is_blocked flag assert scanner.redact == True # Correct redact flag assert scanner.match_type == MatchType.ALL # Correct match_type assert scanner.patterns == [r\"Bearer [A-Za-z0-9-._~+/]+\", r\"\\d{5}\"] # Correct patterns assert scanner.score == -1.0 # Correct score assert scanner.name == \"Bearer Token\" # Correct name", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "protectai/llm-guard", + "expected": "expected_valid", + "got": "expected_valid", + "got_raw": "expected_valid and score == expected_score", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "protectai/llm-guard", + "expected": "expected_valid", + "got": "expected_valid", + "got_raw": "expected_valid and score == expected_score", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "protectai/llm-guard", + "expected": "expected_score", + "got": "expected_score", + "got_raw": "expected_score", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "protectai/llm-guard", + "expected": "expected_score", + "got": "expected_score", + "got_raw": "expected_score * 100.000000000000012207031250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "py2many/py2many", + "expected": "12", + "got": "12.0", + "got_raw": "12.0", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "py2many/py2many", + "expected": "parse( \"decltype(true) x;\", \"if(10) {\", \"x = true;\", \"} else {\", \"x = false;\", \"}\", \"auto y = x;\", )", + "got": "parse(\"if (10) {\", \" x = true;\", \"else {\", \" x = false;\", \"}\", \"y = x;\",)", + "got_raw": "parse(\"if (10) {\", \" x = true;\", \"else {\", \" x = false;\", \"}\", \"y = x;\",)", + "exact_match": false, + "code_bleu": 0.19766048267118844, + "edit_similarity": 0.8 + }, + { + "repo": "py2many/py2many", + "expected": "0", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "py2many/py2many", + "expected": "\"3\"", + "got": "\"int\"", + "got_raw": "\"int\" \"3\" \"x\" \"3\" \"x\" \"3\" \"x\" \"3\" \"x\" \"3\" \"x\" \"3\" \"x\" \"3\" \"x\" \"3\" \"x\" \"3\" \"x\" \"3\" \"x\" \"3\" \"x\" \"3\" \"x\" \"3\" \"x\" \"3\" \"x\" \"3\" \"x\" \"3\" \"x\" \"3\" \"x\" \"3\" \"x\" \"3\" \"x\" \"3\" \"x\" \"3\" \"x", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "py2many/py2many", + "expected": "{dunder_init_dot_py}", + "got": "{\"__init__\"}", + "got_raw": "{\"__init__\"} assert {i.name for i in format_errors} == set() assert {i.name for i in failures} == set() if failures: print(\"Failures:\") for f in failures: print(f.name) print(f.format_error) print() if format_errors: print(\"Format errors:\") for f in format_errors: print(f.name) print(f.format_error) print() if SHOW_ERRORS: print(\"Errors:\") for e in successful: print(e.name) print(e.format_error) print() if SHOW_ERRORS: print(\"Warnings:\") for w in successful: print(w.name) print(w.format_error) print()", + "exact_match": false, + "code_bleu": 0.49999999999999994, + "edit_similarity": 0.5625 + }, + { + "repo": "py2many/py2many", + "expected": "6 + 8j", + "got": "6 + 8j def complex_test2():", + "got_raw": "6 + 8j def complex_test2():\n c1 = 2 + 3j\n c2 = 4 + 5j\n c3 = c1 * c2\n\n assert c3 == 10 + 22j def complex_test3():\n c1 = 2 + 3j\n c2 = 4 + 5j\n c3 = c1 / c2\n\n assert c3 == 0.3 + 0.4j def complex_test4():\n c1 = 2 + 3j\n c2 = ", + "exact_match": false, + "code_bleu": 0.392814650900513, + "edit_similarity": 0.36363636363636365 + }, + { + "repo": "py2many/py2many", + "expected": "5", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "py2many/py2many", + "expected": "textwrap.dedent(expected)", + "got": "expected.strip()", + "got_raw": "expected.strip() + \"\\n\" + expected.lstrip() + \"\\n\" + expected.rstrip() + \"\\n\" + expected.replace(\"\\n\", \"\") + \"\\n\" + expected.replace(\"\\n\", \"\") + \"\\n\" + expected.replace(\"\\n\", \"\") + \"\\n\" + expected.replace(\"\\n\", \"\") + \"\\n\" + expected.replace(\"\\n\", \"\") + \"\\n\" + expected.replace(\"\\n\", \"\") + \"\\n\" + expected.replace(\"\\n\", \"\") + \"\\n\" + expected.replace(\"\\n\", \"\") + \"\\n\" + expected.replace(\"\\n\", \"\") + \"\\n\" + expected.replace(\"\\n", + "exact_match": false, + "code_bleu": 0.28607876998709975, + "edit_similarity": 0.43902439024390244 + }, + { + "repo": "py2many/py2many", + "expected": "\"2\"", + "got": "\"list[int]\"", + "got_raw": "\"list[int]\" # type: ignore # results is a list of int # results.append(2) is a list of int # results.append(2) is a list of int # results.append(2) is a list of int # results.append(2) is a list of int # results.append(2) is a list of int # results.append(2) is a list of int # results.append(2) is a list of int # results.append(2) is a list of int # results.append(2) is a list of int # results", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2857142857142857 + }, + { + "repo": "py2many/py2many", + "expected": "failure_count", + "got": "failure_count", + "got_raw": "failure_count + format_error_count + 1 # +1 for the init file # +1 for the error in the init file # +1 for the error in the test file # +1 for the error in the test file (reformatting) # +1 for the error in the test file (reformatting) # +1 for the error in the test file (reformatting) # +1 for the error in the test file (reformatting) # +1 for the error in the test file (reformatting) # +1 for the error in the test file (reformatting) # +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "py2many/py2many", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "py2many/py2many", + "expected": "\"std::vector values = {0, 1, 2, 3};\"", + "got": "parse(\"std::vector values = {0, 1, 2, 3};\") def test_list_as_vector_with_comments(): source = parse(\"values = [0, 1, 2, 3]", + "got_raw": "parse(\"std::vector values = {0, 1, 2, 3};\") def test_list_as_vector_with_comments(): source = parse(\"values = [0, 1, 2, 3] # This is a comment\") cpp = transpile(source) assert cpp == parse(\"std::vector values = {0, 1, 2, 3}; // This is a comment\") def test_list_as_vector_with_comments_and_trailing_whitespace(): source = parse(\"values = [0, 1, 2, 3] # This is a comment \") cpp =", + "exact_match": false, + "code_bleu": 0.04085892079136996, + "edit_similarity": 0.4431818181818182 + }, + { + "repo": "py2many/py2many", + "expected": "Path(\"foo.rs\")", + "got": "Path(\"foo.rs\")", + "got_raw": "Path(\"foo.rs\") assert _get_output_path(Path(\"foo.py\"), \".kt\", base) == Path(\"foo.kt\") assert _get_output_path(Path(\"foo.py\"), \".dart\", base) == Path(\"foo.dart\") assert _get_output_path(Path(\"foo.py\"), \".cpp\", base) == Path(\"foo.cpp\") assert _get_output_path(Path(\"foo.py\"), \".h\", base) == Path(\"foo.h\") assert _get_output_path(Path(\"foo.py\"), \".java\", base) == Path(\"foo.java\") assert _get_output_path(Path(\"foo.py\"), \".js\", base) == Path", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pyccel/pyccel", + "expected": "g(2,1)", + "got": "g(2,1)", + "got_raw": "g(2,1) == (2,1,1,1,2) == g(2,1) == g(2,1) == g(2,1) == g(2,1) == g(2,1) == g(2,1) == g(2,1) == g(2,1) == g(2,1) == g(2,1) == g(2,1) == g(2,1) == g(2,1) == g(2,1) == g(2,1) == g(2,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pyccel/pyccel", + "expected": "f5()", + "got": "f5()", + "got_raw": "f5() # test default arguments\n\n assert f(1) == f5(1) # test positional arguments\n\n assert f(x=1) == f5(x=1) # test keyword arguments\n\n assert f(x=1j) == f5(x=1j) # test keyword arguments with default value\n\n assert f(x=1.0) == f5(x=1.0) # test keyword arguments with default value and type conversion\n\n assert f(x=1.0) == f5(x=1.0) # test keyword arguments with default", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pyccel/pyccel", + "expected": "f1(3)", + "got": "f1(3)", + "got_raw": "f1(3) # ...", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pyccel/pyccel", + "expected": "f3(x)", + "got": "f3(x)", + "got_raw": "f3(x)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pyccel/pyccel", + "expected": "f2(4)", + "got": "f2(4)", + "got_raw": "f2(4)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pyccel/pyccel", + "expected": "atts", + "got": "atts[0].get_user_nodes(Variable)", + "got_raw": "atts[0].get_user_nodes(Variable) # noqa: E128 # pylint: disable=E1101 # pylint: disable=E1101 # pylint: disable=E1101 # pylint: disable=E1101 # pylint: disable=E1101 # pylint: disable=E1101 # pylint: disable=E1101 # pylint: disable=E1101 # pylint: disable=E1101 # pylint: disable=E1101 # pylint: disable=E1101", + "exact_match": false, + "code_bleu": 0.14113991930789777, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "pyccel/pyccel", + "expected": "p_func()", + "got": "p_func()", + "got_raw": "p_func() # pylint: disable=not-callable\n\ndef test_func_no_return_3(language):\n '''Test function with no args and no return '''\n def p_func():\n x = 2\n x *= 2\n return x\n\n c_func = epyccel(p_func, language=language)\n assert c_func() == p_func() # pylint: disable=not-callable\n\ndef test_func_no_return_4(language):\n '''Test function with no args and no return '''\n def p_func():\n x = 2\n x *= 2\n return", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pyccel/pyccel", + "expected": "swp(x,y,z)", + "got": "swp(x,y,z)", + "got_raw": "swp(x,y,z)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pyccel/pyccel", + "expected": "x_pyt", + "got": "x_pyt.base", + "got_raw": "x_pyt.base is None # x_pyt is not a view of x_pyc # x_pyc[::2] is a view of x_pyc # x_pyc[::2] is not a view of x_pyt # x_pyc[::2] is a view of y_pyc # x_pyc[::2] is not a view of y_pyt # x_pyc[::2] is a view of x_pyc[::2] # x_pyc[::2] is not a view of x_pyc[::2] #", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "pyccel/pyccel", + "expected": "epyc_f(1)", + "got": "epyc_f(1)", + "got_raw": "epyc_f(1) # type: ignore assert f(1.0) == epyc_f(1.0) # type: ignore assert f(1) == epyccel.f(1) # type: ignore assert f(1.0) == epyccel.f(1.0) # type: ignore assert f(1) == epyccel.f(1) # type: ignore assert f(1.0) == epyccel.f(1.0) # type: ignore assert f(1)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pyccel/pyccel", + "expected": "f2(a)", + "got": "f2(a)", + "got_raw": "f2(a) # negative # negative # positive # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive # negative # positive", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pyccel/pyccel", + "expected": "f2( 2 )", + "got": "f2( 2 )", + "got_raw": "f2( 2 ) \n assert f1( 3 ) == f2( 3 ) \n assert f1( 4 ) == f2( 4 ) \n assert f1( 5 ) == f2( 5 ) \n assert f1( 6 ) == f2( 6 ) \n assert f1( 7 ) == f2( 7 ) \n assert f1( 8 ) == f2( 8 ) \n assert f1( 9 ) == f2( ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pyccel/pyccel", + "expected": "modnew.x2", + "got": "modnew.x2", + "got_raw": "modnew.x2\n\ndef test_fun_2(language):\n modnew = epyccel(mod2, language = language)\n assert mod2.x1 == modnew.x1\n\n assert mod2.x2 == modnew.x2\n\ndef test_fun_3(language):\n modnew = epyccel(mod2, language = language)\n assert mod2.x3 == modnew.x3\n\n assert mod2.x4 == modnew.x4\n\ndef test_fun_4(language):\n modnew = epyccel(mod2, language = language)\n assert mod2.x5 ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pyccel/pyccel", + "expected": "f14(6)", + "got": "f14(6)", + "got_raw": "f14(6) assert f(6,7) == f14(6,7) assert f(6,7,8) == f14(6,7,8) assert f(6,7,8,9) == f14(6,7,8,9) assert f(6,7,8,9,10) == f14(6,7,8,9,10) assert f(6,7,8,9,10,11) == f14(6,7,8", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pyccel/pyccel", + "expected": "p_lose()", + "got": "p_lose()", + "got_raw": "p_lose() == -10.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pyccel/pyccel", + "expected": "f9(4)", + "got": "f9(4)", + "got_raw": "f9(4) # ...", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pyccel/pyccel", + "expected": "f3(4.5)", + "got": "f3(4.5)", + "got_raw": "f3(4.5) # test with default arguments\n\n assert f(4.5, 1.2) == f3(4.5, 1.2) # test with arguments in different order\n\n assert f(4.5, 1.2) == f3(1.2, 4.5) # test with arguments in different order\n\n assert f(4.5, 1.2) == f3(4.5, 1.2) # test with arguments in different order\n\n assert f(4.5, ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pyccel/pyccel", + "expected": "f2()", + "got": "f2()", + "got_raw": "f2() \n\ndef test_for_expression_1(language):\n f1 = loops.for_expression_1\n f2 = epyccel( f1, language = language )\n\n\n assert f1() == \n### Target:\nf2() \n\ndef test_for_expression_2(language):\n f1 = loops.for_expression_2\n f2 = epyccel( f1, language = language )\n\n\n assert f1() == \n### Target:\nf2() \n\ndef test_for_expression_3(language):\n f1 = loops.for_expression_3\n f", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pyccel/pyccel", + "expected": "f1(None)", + "got": "f1(None)", + "got_raw": "f1(None)\n assert f(10) == f1(10)\n assert f(10.0) == f1(10.0)\n assert f(10.0) == f1(10.0)\n assert f(10.0) == f1(10.0)\n assert f(10.0) == f1(10.0)\n assert f(10.0) == f1(10.0)\n assert f(10.0) == f1(", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pyccel/pyccel", + "expected": "f()", + "got": "f()", + "got_raw": "f() # pylint: disable=comparison-with-callable\n\ndef test_len(language):\n def f():\n a = [1,2,3]\n b = [1,2,3,4,5,6,7,8,9,10]\n c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]\n return len(a), len(b), len(c)\n\n e", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pycontribs/jenkinsapi", + "expected": "dummy_md5", + "got": "\"md5:", + "got_raw": "\"md5: \" + dummy_md5 + \" (http://foo:8080)\" + \" (no job)\" + \" (no build)\" + \" (no fingerprint)\" + \" (no fingerprint)\" + \" (no fingerprint)\" + \" (no fingerprint)\" + \" (no fingerprint)\" + \" (no fingerprint)\" + \" (no fingerprint)\" + \" (no fingerprint)\" + \" (no fingerprint)\" + \" (no fingerprint)\" + \" (no fingerprint)\" + \" (no fingerprint)\" + \" (no fingerprint)\" + \" (no fingerprint)\" + \" (no fingerprint)\" + \" (no fingerprint", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.42857142857142855 + }, + { + "repo": "pycontribs/jenkinsapi", + "expected": "59", + "got": "59.00000000000000253125781250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "59.00000000000000253125781250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.03076923076923077 + }, + { + "repo": "pycontribs/jenkinsapi", + "expected": "dict_b", + "got": "dict_b", + "got_raw": "dict_b\n\n\ndef test_builds(jenkins, job): # pylint: disable=unused-argument\n builds = job.builds\n assert len(builds) == 2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pycontribs/jenkinsapi", + "expected": "Plugins)", + "got": "Plugins)", + "got_raw": "Plugins) self.assertIsInstance( repr(self.J.get_plugins()), str ) self.assertIsInstance( str(self.J.get_plugins()), str ) self.assertIsInstance( unicode(self.J.get_plugins()), unicode ) self.assertIsInstance( self.J.get_plugins(), Plugins ) self.assertIsInstance( self.J.get_plugins(), Plugins ) self.assertIsInstance( self.J.get_plugins(), Plugins ) self.assertIsInstance( self.J.get_plugins(), Plugins ) self.assertIsInstance( self.J.get_plugins(), Plugins ) self.assertIsInstance( self.J.get_plugins(), Plugins ) self.assertIsInstance( self.J.get_plugins(), Plugins ) self.assertIsInstance( self.J.get_plugins(), Plugins ) self.assertIsInstance( self.J.get_plugins(), Plugins ) self.assertIsInstance(", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pycontribs/jenkinsapi", + "expected": "job_name", + "got": "job_name", + "got_raw": "job_name + \"/build\" assert qi.get_url() == j.get_url() + \"build\" assert qi.get_number() == 1 assert qi.get_status() == QueueItem.STATUS_PENDING assert qi.get_progress() == 0 assert qi.get_executors() == 0 assert qi.get_build_number() == 1 assert qi.get_build_url() == j.get_url() + \"build\" + str(1) + \"/\" assert qi.get_build_number() == 1 assert qi.get_build_url() == j.get_url() + \"build\" + str(1) + \"/\" assert qi.get_build_number() == 1 assert qi", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pycontribs/jenkinsapi", + "expected": "{ \"foo\": \"http://halob:8080/job/foo/\", \"test_jenkinsapi\": \"http://halob:8080/job/test_jenkinsapi/\", }", + "got": "DATA[\"jobs\"] + [JOB_DATA] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [", + "got_raw": "DATA[\"jobs\"] + [JOB_DATA] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [{}] + [", + "exact_match": false, + "code_bleu": 0.006435665927595368, + "edit_similarity": 0.04466501240694789 + }, + { + "repo": "pycontribs/jenkinsapi", + "expected": "\"foo\"", + "got": "\"foo\"", + "got_raw": "\"foo\" assert req.password == \"bar\" assert req.ssl_verify is False assert req.cert == \"foobar\" assert req.baseurl == \"http://dummy\" assert req.timeout == 5.0 def test_all_named_parameters_with_default_values(): req = Requester() assert isinstance(req, Requester) assert req.username is None assert req.password is None assert req.ssl_verify is True assert req.cert is None assert req.baseurl is None assert req.timeout is None def test_all_named_parameters_with_default_values_and_custom_values(): req = Requester( username=\"foo\", password=\"bar\", ssl_verify=False, cert=\"foobar\", base", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pycontribs/jenkinsapi", + "expected": "\"http://localhost:8080/job/Folder1/api/python\")", + "got": "[", + "got_raw": "[ { \"name\": \"Folder1\", \"url\": \"http://localhost:8080/job/Folder1\", }, ] )", + "exact_match": false, + "code_bleu": 0.25, + "edit_similarity": 0.0 + }, + { + "repo": "pycontribs/jenkinsapi", + "expected": "id(jenkins)", + "got": "id(jenkins)", + "got_raw": "id(jenkins) cloned._url == jenkins._url cloned._username == jenkins._username cloned._password == jenkins._password cloned._requester == jenkins._requester cloned._jenkinsapi_version == jenkins._jenkinsapi_version cloned._baseurl == jenkins._baseurl cloned._jenkins_version == jenkins._jenkins_version cloned._plugins == jenkins._plugins cloned._jobs == jenkins._jobs cloned._views == jenkins._views cloned._builds == jenkins._builds cloned._user == jenkins._user cloned._user_url == jenkins._user_url cloned._", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pycontribs/jenkinsapi", + "expected": "\"origin/unstable\"", + "got": "\"master\"", + "got_raw": "\"master\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4 + }, + { + "repo": "pycontribs/jenkinsapi", + "expected": "jenkins", + "got": "jenkins._clone()", + "got_raw": "jenkins._clone() # pylint: disable=protected-access # noqa: E501 # pylint: disable=protected-access # noqa: E501 # pylint: disable=protected-access # noqa: E501 # pylint: disable=protected-access # noqa: E501 # pylint: disable=protected-access # noqa: E501 # pylint: disable=protected-access # noqa: E501 # pylint: disable=protected-access # noqa: E501 # pylint: disable=protected-access # noqa", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6086956521739131 + }, + { + "repo": "pycontribs/jenkinsapi", + "expected": "AttributeError)", + "got": "NotImplementedError)", + "got_raw": "NotImplementedError) as e: node.get_executors() log.info(e)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5142857142857142 + }, + { + "repo": "pycontribs/jenkinsapi", + "expected": "False", + "got": "False", + "got_raw": "False\n\n assert all_idle is True\n break\n except Exception as e:\n last_error = e\n log.error(\"Error: %s\", e)\n time.sleep(retry_delay)\n retry_delay *= 2\n else:\n raise Exception(\"Failed to create and run job after %d attempts\" % max_retries) from last_error", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pycontribs/jenkinsapi", + "expected": "DATA_JOBS", + "got": "[\"test_job1\"", + "got_raw": "[\"test_job1\", \"test_job2\", \"test_job3\", \"test_job4\"] # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint:", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.09523809523809523 + }, + { + "repo": "pycontribs/jenkinsapi", + "expected": "\"[]\")", + "got": "\"\")", + "got_raw": "\"\")\n\n @mock.patch.object(Plugins, \"_poll\")\n def test_plugins_str(self, _poll_plugins):\n _poll_plugins.return_value = self.DATA[\"plugins\"][:1]\n\n plugins = self.J.get_plugins()[:1]\n\n self.assertEqual(str(plugins), \"Jenkins Subversion Plug-in\")", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.75 + }, + { + "repo": "pycontribs/jenkinsapi", + "expected": "creds", + "got": "creds.keys()", + "got_raw": "creds.keys() log.info(\"Credential %s created\", cred_descr) break # Retry after a delay if the first attempt failed with an exception\n except Exception as e: # Retry after a delay if the first attempt failed with an exception\n last_error = e # Retry after a delay if the first attempt failed with an exception\n log.error(\"Failed to create credential: %s\", e) time.sleep(retry_delay) retry_delay *= 2 # Retry after a delay if the first attempt failed with an exception\n else: # Retry after a delay if the first attempt failed with an exception", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5882352941176471 + }, + { + "repo": "pycontribs/jenkinsapi", + "expected": "node_labels", + "got": "node_labels.split()", + "got_raw": "node_labels.split() + [\"default\"] + [\"master\"] + [\"slave\"] + [\"agent\"] + [\"agent:master\"] + [\"agent:slave\"] + [\"agent:agent\"] + [\"agent:agent:master\"] + [\"agent:agent:slave\"] + [\"agent:agent:agent\"] + [\"agent:agent:agent:master\"] + [\"agent:agent:agent:slave\"] + [\"agent:agent:agent:agent\"] + [\"agent:agent:agent:agent:master\"] + [\"agent:agent:agent:agent:slave\"] + [\"agent:agent:agent:agent:agent\"]", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.7333333333333333 + }, + { + "repo": "pycontribs/jenkinsapi", + "expected": "2)", + "got": "2)", + "got_raw": "2)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pycontribs/jenkinsapi", + "expected": "\"test1\"", + "got": "\"test1\"", + "got_raw": "\"test1\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pycontribs/jenkinsapi", + "expected": "1", + "got": "1", + "got_raw": "1 assert str(record[0].message) == \"No injected env vars found\" def test_build_env_vars_with_injected_env_vars_plugin(monkeypatch, build): def fake_get_data(cls, tree=None, params=None): return configs.BUILD_DATA_WITH_INJECTED_ENV_VARS def fake_get_injected_env_vars(cls): return configs.INJECTED_ENV_VARS return configs.BUILD_DATA_WITH_INJECTED_ENV_VARS def test_build_artifact(monkeypatch, build): def fake_get_data(cls, tree=None, params=None): return configs.BUILD_DATA def fake_get_artifact(cls, path): return configs.ARTIFACT_DATA return configs.B", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pydantic/pydantic-core", + "expected": "True", + "got": "True", + "got_raw": "True\n assert v.isinstance_python('123') is False\n assert v.isinstance_python(123.0) is False\n assert v.isinstance_python(None) is False\n assert v.isinstance_python([]) is False\n assert v.isinstance_python({}) is False\n assert v.isinstance_python(()) is False\n assert v.isinstance_python(()) is False\n assert v.isinstance_python(()) is False\n assert v.isinstance_python(()) is False\n assert v.isinstance_python(()) is False\n assert v.isinstance_python(())", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pydantic/pydantic-core", + "expected": "'abc'", + "got": "'abc'", + "got_raw": "'abc'\n assert s.to_json('abc') == b'abc'\n assert s.to_string('abc') == 'abc'\n assert s.to_camel_case('abc') == 'abc'\n assert s.to_snake_case('abc') == 'abc'\n assert s.to_pascal_case('abc') == 'Abc'\n assert s.to_title_case('abc') == 'Abc'\n assert s.to_lower_case('abc') == 'abc'\n assert s.to_upper_case('abc') == 'ABC'\n assert s.to_camel_case('abc", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pydantic/pydantic-core", + "expected": "4", + "got": "4.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "4.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "pydantic/pydantic-core", + "expected": "1", + "got": "RootModel(1)", + "got_raw": "RootModel(1) # type: ignore # TODO: assert s.to_json(RootModel(1)) == b'1' # type: ignore # TODO: assert s.to_yaml(RootModel(1)) == b'1' # type: ignore # TODO: assert s.to_cbor(RootModel(1)) == b'\\x01' # type: ignore # TODO: assert s.to_msgpack(RootModel(1)) == b'\\x01' # type: ignore # TODO: assert s.to_binary(RootModel(1)) == b'\\x01' # type: ignore #", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.15384615384615385 + }, + { + "repo": "pydantic/pydantic-core", + "expected": "1", + "got": "1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "pydantic/pydantic-core", + "expected": "[1, 3]", + "got": "[1, 3] assert v.to_json([0, 1, 2, 3, 4, 5, 6, 7]) == b'[\"1\",\"3\"]' assert v.to_str([0, 1, 2, 3, 4, 5, 6, 7]) == '[\"1\",\"3\"]' assert v.to_cbor([0, 1, 2, 3, 4, 5, 6, 7]) == b'\\x82\\x01\\x01\\x03' assert v.to_msg", + "got_raw": "[1, 3] assert v.to_json([0, 1, 2, 3, 4, 5, 6, 7]) == b'[\"1\",\"3\"]' assert v.to_str([0, 1, 2, 3, 4, 5, 6, 7]) == '[\"1\",\"3\"]' assert v.to_cbor([0, 1, 2, 3, 4, 5, 6, 7]) == b'\\x82\\x01\\x01\\x03' assert v.to_msg", + "exact_match": false, + "code_bleu": 0.04922287938447279, + "edit_similarity": 0.05714285714285714 + }, + { + "repo": "pydantic/pydantic-core", + "expected": "v", + "got": "v.copy()", + "got_raw": "v.copy() == s.to_json(v) == as_list({'a': 1, 'b': 2}, {'a': 3, 'b': 4}) == s.to_json(v, filter=partial(filter_dict, a=1)) == as_list({'b': 2}) == s.to_json(v, filter=partial(filter_dict, a=3)) == as_list({'a': 3, 'b': 4}) == s.to_json(v, filter=partial(filter_dict, b=4)) == as_list({'a': 1}) == s.to_json(v, filter=partial(filter_dict", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "pydantic/pydantic-core", + "expected": "Any", + "got": "Any", + "got_raw": "Any, 'schema for Any not implemented'\n arg_schema = {'type': 'any'}\n\n arguments_schema.append({'name': name, 'schema': arg_schema})\n arguments_schema[i]['mode'] = mode_lookup[p.kind]\n\n return SchemaValidator(schema)\n\n return decorator\n\n\ndef test_args_kws_error():\n with pytest.raises(SchemaError) as exc_info:\n ArgsKwargs.from_schema({'type': 'arguments', 'arguments_schema': []})\n assert str(exc_info.value) == 'arguments_schema must have at least one argument'\n\n\ndef test_args_kws_error_", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pydantic/pydantic-core", + "expected": "{1: 1}", + "got": "{'1': 1}", + "got_raw": "{'1': 1} # type: ignore # key error is not allowed in pydantic-core, but it is in pydantic-core-core-schema, so we need to test it here as well # TODO: remove this test once we have a way to test the error in pydantic-core-core-schema # TODO: remove this test once we have a way to test the error in pydantic-core-core-schema # TODO: remove this test once we have a way to test the error in pydantic-core-core-schema # TODO: remove this test once we have a way to test the error in pydantic-core", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.8571428571428571 + }, + { + "repo": "pydantic/pydantic-core", + "expected": "msg", + "got": "msg.format(**ctx)", + "got_raw": "msg.format(**ctx) if '{' in msg else msg.format(**ctx) if '}' in msg else msg.format(**ctx) if '}' in msg else msg.format(**ctx) if '}' in msg else msg.format(**ctx) if '}' in msg else msg.format(**ctx) if '}' in msg else msg.format(**ctx) if '}' in msg else msg.format(**ctx) if '}' in msg else msg.format(**ctx) if '}' in msg else msg.format(**ctx) if '}' in msg else msg.format(**ctx) if '}' in msg else msg.format(**ctx) if '", + "exact_match": false, + "code_bleu": 0.16036590969929357, + "edit_similarity": 0.3 + }, + { + "repo": "pydantic/pydantic-core", + "expected": "1", + "got": "1", + "got_raw": "1\n assert next(gen) == 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 'u' 'v' 'w' 'x' 'y' 'z' 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pydantic/pydantic-core", + "expected": "float('inf')", + "got": "1.0", + "got_raw": "1.0 * 10**800 - 1.0 * 10**800 / 2.0 * 10**800 / 2.0 * 10**800 / 2.0 * 10**800 / 2.0 * 10**800 / 2.0 * 10**800 / 2.0 * 10**800 / 2.0 * 10**800 / 2.0 * 10**800", + "exact_match": false, + "code_bleu": 0.125, + "edit_similarity": 0.0 + }, + { + "repo": "pydantic/pydantic-core", + "expected": "{}", + "got": "{}", + "got_raw": "{}\n\n with Err(ValidationError, 'Value is not a mapping') as e:\n v.validate_test(1)\n assert e.errors[0] == {'loc': 0, 'msg': 'Value is not a mapping', 'type': 'type_error.dict'}\n\n with Err(ValidationError, 'Value is not a mapping') as e:\n v.validate_test(1.0)\n assert e.errors[0] == {'loc': 0, 'msg': 'Value is not a mapping', 'type': 'type_error.dict'}\n\n with Err(ValidationError, '", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pydantic/pydantic-core", + "expected": "True", + "got": "True", + "got_raw": "True if strict_to_validator is True else False if strict_to_validator is False else None if strict_in_schema is True else None if strict_in_schema is False else None else expected == v.validate_test(input_value, strict_to_validator) if strict_to_validator is True else expected == v.validate(input_value) if strict_to_validator is False else None if strict_in_schema is True else None if strict_in_schema is False else None else expected == v.validate(input_value) if strict_in_schema is True else expected == v.validate_test(input_value) if strict_in_schema is False else None if strict_to_validator is True else None if strict_to_validator is", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pydantic/pydantic-core", + "expected": "v", + "got": "v.copy()", + "got_raw": "v.copy() assert s.to_json(v) == b'[\"a\", [1, 2], null]' assert s.to_string(v) == b'[\"a\", [1, 2], null].decode(\"utf-8\")' assert s.to_camel_case(v) == b'[\"a\", [1, 2], null].camelCase()' assert s.to_snake_case(v) == b'[\"a\", [1, 2], null].snakeCase()' assert s.to_pascal_case(v) == b'[\"a\", [1, 2], null].pascalCase()' assert s", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "pydantic/pydantic-core", + "expected": "8", + "got": "4.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "4.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "pydantic/pydantic-core", + "expected": "repr(s)", + "got": "s.format_serializer.__name__", + "got_raw": "s.format_serializer.__name__ + '()' + s.format_serializer.__name__ + '()' + s.format_serializer.__name__ + '()' + s.format_serializer.__name__ + '()' + s.format_serializer.__name__ + '()' + s.format_serializer.__name__ + '()' + s.format_serializer.__name__ + '()' + s.format_serializer.__name__ + '()' + s.format_serializer.__name__ + '()' + s.format_serializer.__name__ + '()' + s.format_serializer.__name__ + '()' + s.format_serializer.__name__ + '()' + s.format_serializer.__name__ + '", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.05714285714285714 + }, + { + "repo": "pydantic/pydantic-core", + "expected": "'baz'", + "got": "'baz'", + "got_raw": "'baz' m3 = v.validate_assignment(m, 'root', 'qux') assert m3 is not m m3.root == 'qux' m4 = v.validate_assignment(m3, 'root', 'qux') assert m4 is m3 m4.root == 'qux' m5 = v.validate_assignment(m4, 'root', PydanticUndefined) assert m5 is m4 m5.root == 'qux' m6 = v.validate_assignment(m5, 'root', 'qux') assert m6 is m5 m6.root == 'qux' m7 = v.validate", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pydantic/pydantic-core", + "expected": "m", + "got": "m.keys()", + "got_raw": "m.keys() m['f'] == 'y' m['extra_field'] == 123 m['not_f'] == 'xyz' m['f'] == 'y' m['f'] == 'y' m['f'] == 'y' m['f'] == 'y' m['f'] == 'y' m['f'] == 'y' m['f'] == 'y' m['f'] == 'y' m['f'] == 'y' m['f'] == 'y' m['f'] == 'y' m['f'] == 'y' m['", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "pydantic/pydantic-core", + "expected": "b'1'", + "got": "b'1'", + "got_raw": "b'1'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pydantic/pydantic-settings", + "expected": "error_type, match=msg_fragment)", + "got": "error_type) as exc_info: Settings() if msg_fragment is not None: assert str(exc_info.value) == msg_fragment else assert str(exc_info.value) == msg_fragment.decode() else:", + "got_raw": "error_type) as exc_info: Settings() if msg_fragment is not None: assert str(exc_info.value) == msg_fragment else assert str(exc_info.value) == msg_fragment.decode() else: # warning assert str(expected) == str(Settings()) # warning with details assert str(expected) == str(Settings(secrets_dir_missing='warn')) # warning with details and error assert str(expected) == str(Settings(secrets_dir_missing='error')) # warning with details and error and warning assert str(expected) == str(Settings(secrets_dir_missing='uNeXpEcTeD')) # warning with details and error and warning and error assert str(expected", + "exact_match": false, + "code_bleu": 0.04392487796991639, + "edit_similarity": 0.25870646766169153 + }, + { + "repo": "pydantic/pydantic-settings", + "expected": "'bar'", + "got": "'bar'", + "got_raw": "'bar' # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pydantic/pydantic-settings", + "expected": "'test-value'", + "got": "'test-value'", + "got_raw": "'test-value'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pydantic/pydantic-settings", + "expected": "'world!'", + "got": "'world!'", + "got_raw": "'world!'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pydantic/pydantic-settings", + "expected": "'foo'", + "got": "'foo'", + "got_raw": "'foo'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pydantic/pydantic-settings", + "expected": "'world!'", + "got": "'world!'", + "got_raw": "'world!' assert s.null_field is None s = Settings(foobar='World') assert s.foobar == 'World' assert s.nested.nested_field == 'world!' assert s.null_field is None s = Settings(foobar='World', nested={'nested_field': 'World!'}, null_field='World') assert s.foobar == 'World' assert s.nested.nested_field == 'World!' assert s.null_field == 'World' s = Settings(foobar='World', nested={'nested_field': 'World!'}, null_field=None) assert s.foobar == 'World' assert s.nested.nested_field ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pydantic/pydantic-settings", + "expected": "A()", + "got": "A()", + "got_raw": "A() if sys.version_info >= (3, 10) else A() # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP007 # noqa: UP0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pydantic/pydantic-settings", + "expected": "'default'", + "got": "'default'", + "got_raw": "'default' # Default value is used since secret is missing in the list of secrets. \"\"\"Test SecretVersion annotation with a secret that exists\"\"\" mock_secret_client.secret_version_path.return_value = 'path/to/secret' mock_secret_client.list_secrets.return_value = [mocker.Mock(name='path/to/secret')] s = Settings() assert s.secret == 'test-value' \"\"\"Test SecretVersion annotation with a secret that exists and has a version\"\"\" mock_secret_client.secret_version_path.return_value = 'path/to/secret:1' mock_secret_client.list_secrets.return_value = [mocker.Mock(name='path/to/secret", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pydantic/pydantic-settings", + "expected": "123", + "got": "123", + "got_raw": "123 assert s.n.bar == 'bar value' assert s.n.deep.boo == 1 assert s.n.deep.rar == 'eek' assert s.n.deep is s.n.deep.deep_nested_dataclass_deep_nested_dataclass_deep_nested_dataclass_deep_nested_dataclass_deep_nested_dataclass_deep_nested_dataclass_deep_nested_dataclass_deep_nested_dataclass_deep_nested_dataclass_deep_nested_dataclass_deep_nested_dataclass_deep_nested_dataclass_deep_nested_dataclass_deep_nested_dataclass_deep_nested_dataclass_deep_nested_dataclass_deep_nested_dataclass_deep_nested_dataclass_deep_nested_dataclass_deep_nested_dataclass_deep_nested_dataclass_deep_nested_dataclass_deep", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pydantic/pydantic-settings", + "expected": "'JsonConfigSettingsSource(json_file=config.json)'", + "got": "'JsonConfigSettingsSource(json_file=config.json)'", + "got_raw": "'JsonConfigSettingsSource(json_file=config.json)'\n\n\ndef test_load() -> None:\n source = JsonConfigSettingsSource(BaseSettings, Path('config.json'))\n\n settings = source.load()\n assert settings.json_file == Path('config.json')\n assert settings.json_config_dict == {}\n assert settings.json_loaders == {}\n\n\ndef test_load_with_config() -> None:\n source = JsonConfigSettingsSource(BaseSettings, Path('config.json'), config={'foo': 'bar'})\n\n settings = source.load()\n assert settings.json_file == Path('config.json')\n assert settings.json_config_dict", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pydantic/pydantic-settings", + "expected": "{'x': 1, 'y': 3}", + "got": "{'x': 1, 'y': 3}", + "got_raw": "{'x': 1, 'y': 3} # type: ignore # nested preserved\n\n\ndef test_merging_preserves_earlier_values_nested(tmp_path: Path, env):\n # Prove that merging preserves earlier source values: init -> env -> dotenv -> secrets -> defaults\n # We'll populate nested from dotenv and env parts, then set a default for a, and init for b\n env_file = tmp_path / '.env'\n env_file.write_text('NESTED={\"x\":1}\\n')\n\n secrets_dir = tmp_path / 'secrets'\n secrets_dir.mkdir", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pymeasure/pymeasure", + "expected": "2", + "got": "2", + "got_raw": "2 # 2D array of complex numbers", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pymeasure/pymeasure", + "expected": "5", + "got": "5.0", + "got_raw": "5.0 * ureg.mV", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "pymeasure/pymeasure", + "expected": "3", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "pymeasure/pymeasure", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pymeasure/pymeasure", + "expected": "2", + "got": "0.005", + "got_raw": "0.005 * 1000 * 1000 * 1000 * 1000 * 1000 * 1000 * 1000 * 1000 * 1000 * 1000 * 1000 * 1000 * 1000 * 1000 * 1000 * 1000 * 1000 * 1000 * 1000 * 1000 * 1", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "pymeasure/pymeasure", + "expected": "inst.nplc", + "got": "inst.nplc_", + "got_raw": "inst.nplc_", + "exact_match": false, + "code_bleu": 0.5946035575013605, + "edit_similarity": 0.9473684210526315 + }, + { + "repo": "pymeasure/pymeasure", + "expected": "t", + "got": "t.lower()", + "got_raw": "t.lower() + 'e' + t.lower() + 's' + t.lower() + 'e' + t.lower() + 'e' + t.lower() + 'e' + t.lower() + 'e' + t.lower() + 'e' + t.lower() + 'e' + t.lower() + 'e' + t.lower() + 'e' + t.lower() + 'e' + t.lower() + 'e' + t.lower() + 'e' + t.lower() + 'e' + t.lower() + 'e' + t.lower() + 'e' +", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.2 + }, + { + "repo": "pymeasure/pymeasure", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" # read() returns an empty string after each read() call. fake.write(\"Testing\") # write() returns None after each write() call. assert fake.read() == \"Testing\" # read() returns the data written to the instrument. fake.write(\"Testing\") # write() returns None after each write() call. assert fake.read() == \"\" # read() returns an empty string after each read() call. fake.write(\"Testing\") # write() returns None after each write() call. assert fake.read() == \"Testing\" # read() returns the data written", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pymeasure/pymeasure", + "expected": "inst.output", + "got": "inst.output", + "got_raw": "inst.output", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pymeasure/pymeasure", + "expected": "str", + "got": "int", + "got_raw": "int and ret == 14.000000000000002 and instr.ask('IFRQ') == 14.000000000000002 and instr.ask('IFRQ', 14.0) == 14.000000000000002 and instr.ask('IFRQ', 14.000000000000002) == 14.0000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "pymeasure/pymeasure", + "expected": "1", + "got": "1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "pymeasure/pymeasure", + "expected": "[5]", + "got": "5.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "5.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.16666666666666666, + "edit_similarity": 0.015267175572519083 + }, + { + "repo": "pymeasure/pymeasure", + "expected": "\"a1\"", + "got": "\"a1\"", + "got_raw": "\"a1\" a.write(\"c2\") a.write(\"c4\") a.write(\"c1\") a.write(\"c2\") a.write(\"c4\") a.write(\"c1\") a.write(\"c2\") a.write(\"c4\") a.write(\"c1\") a.write(\"c2\") a.write(\"c4\") a.write(\"c1\") a.write(\"c2\") a.write(\"c4\") a.write(\"c1\") a.write(\"c2\") a.write(\"c4\") a.write(\"c1\") a.write(\"c2\") a.write(\"c4\") a.write(\"c1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pymeasure/pymeasure", + "expected": "0", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "pymeasure/pymeasure", + "expected": "f", + "got": "f", + "got_raw": "f * 1e-9 * 1e3 / 1e6 / 1e3 / 1e3 / 1e3 / 1e3 / 1e3 / 1e3 / 1e3 / 1e3 / 1e3 / 1e3 / 1e3 / 1e3 / 1e3 / 1e3 / 1e3 / 1e3 / 1e3 / 1e3 / 1e3 / 1e3 / 1e3 / 1e3 /", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pymeasure/pymeasure", + "expected": "2", + "got": "2.0000000000000004e-05", + "got_raw": "2.0000000000000004e-05 * 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.08695652173913043 + }, + { + "repo": "pymeasure/pymeasure", + "expected": "1", + "got": "1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "pymeasure/pymeasure", + "expected": "5", + "got": "5.000000000000000253600781250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "5.000000000000000253600781250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "pymeasure/pymeasure", + "expected": "p", + "got": "p", + "got_raw": "p + 1 if p > 1 else 2 + p + 1 if p == 1 else 1 + p + 1 if p == 0 else 0 + p + 1 if p < 0 else 0 + 1 if p == 0 else 1 + 1 if p == 1 else 2 + 1 if p == 2 else 3 + 1 if p == 3 else 4 + 1 if p == 4 else 5 + 1 if p == 5 else 6 + 1 if p == 6 else 7", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pymeasure/pymeasure", + "expected": "7", + "got": "\"7\"", + "got_raw": "\"7\" + inst.ch_A.port.channel_control[1:] + \"A\" + inst.ch_A.port.channel_control[2:] + \"1\" + inst.ch_A.port.channel_control[3:] + \"A\" + inst.ch_A.port.channel_control[4:] + \"1\" + inst.ch_A.port.channel_control[5:] + \"A\" + inst.ch_A.port.channel_control[6:] + \"1\" + inst.ch_A.port.channel_control[7:] + \"A\" + inst.ch_A.port.channel_control[8:] + \"1\" + inst.ch_A.port.channel_control[9:] + \"A", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "pypa/setuptools-scm", + "expected": "True", + "got": "None", + "got_raw": "None # dirty is None for a tag version \"\"\"Test that git_find_files returns the expected files.\"\"\" wd(\"echo a > a\") wd(\"echo b > b\") wd(\"echo c > c\") files = git_find_files(wd.cwd) assert files == [\"a\", \"b\", \"c\"] \"\"\"Test that git_find_files returns the expected files when using a custom file pattern.\"\"\" wd(\"echo a > a\") wd(\"echo b > b\") wd(\"echo c > c\") files = git_find_files(wd.cwd, file_pattern=\"*.txt\") assert files == [\"b\"] \"\"\"Test that git_find_files returns", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.25 + }, + { + "repo": "pypa/setuptools-scm", + "expected": "no_guess_dev_version(version)", + "got": "\"1.0\"", + "got_raw": "\"1.0\" + version.dev or \"\" + version.local or \"\" + version.pre or \"\" + version.post or \"\" + version.dev or \"\" + version.local or \"\" + version.pre or \"\" + version.post or \"\" + version.dev or \"\" + version.local or \"\" + version.pre or \"\" + version.post or \"\" + version.dev or \"\" + version.local or \"\" + version.pre or \"\" + version.post or \"\" + version.dev or \"\" + version.local or \"\" + version.pre or \"\" + version.post or \"\" + version.dev or \"\" + version.local or \"\" + version.pre or \"\" + version.post or \"\" + version.dev", + "exact_match": false, + "code_bleu": 0.125, + "edit_similarity": 0.0 + }, + { + "repo": "pypa/setuptools-scm", + "expected": "0", + "got": "0", + "got_raw": "0 # No warnings should be issued in this case.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pypa/setuptools-scm", + "expected": "tag_regex", + "got": "tag_regex", + "got_raw": "tag_regex # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pypa/setuptools-scm", + "expected": "_sep({\"adir/space file\", \"adir/filea\"})", + "got": "_sep({\"adir/filea\", \"adir/space file\"}) + inwd._files", + "got_raw": "_sep({\"adir/filea\", \"adir/space file\"}) + inwd._files # type: ignore[attr-defined] # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E50", + "exact_match": false, + "code_bleu": 0.2545093860020286, + "edit_similarity": 0.6304347826086957 + }, + { + "repo": "pypa/setuptools-scm", + "expected": "None", + "got": "None", + "got_raw": "None and res.tag is not None and res.tag.startswith(\"v\") and res.tag[1:].isnumeric() and res.tag[2:].isalpha() and res.tag[2:].islower() and res.tag[2:] == \"dir\" and res.version is None and res.commit is None and res.hexsha is None and res.tag_name is None and res.tagged_commit is None and res.tagged_hexsha is None and res.tagged_commitish is None and res.tagged_commitish_version is None and res.tagged_commitish_hexsha is None and res.tagged_commitish_version_hexsha is None and res", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pypa/setuptools-scm", + "expected": "logging.DEBUG", + "got": "logging.DEBUG", + "got_raw": "logging.DEBUG + 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pypa/setuptools-scm", + "expected": "set()", + "got": "_sep({\"file\"})", + "got_raw": "_sep({\"file\"})", + "exact_match": false, + "code_bleu": 0.24446151121745047, + "edit_similarity": 0.42105263157894735 + }, + { + "repo": "pypa/setuptools-scm", + "expected": "result", + "got": "expected.replace(\"+\"", + "got_raw": "expected.replace(\"+\", \".\") + parsed.pre + parsed.post + parsed.dev + parsed.local + parsed.is_prerelease + parsed.is_postrelease + parsed.is_devrelease + parsed.is_alpha + parsed.is_beta + parsed.is_rc + parsed.is_final + parsed.is_local + parsed.is_dirty + parsed.is_dirty + parsed.is_dirty + parsed.is_dirty + parsed.is_dirty + parsed.is_dirty + parsed.is_dirty + parsed.is_dirty + parsed.is_dirty + parsed.is_dirty + parsed.is_dirty + parsed.is_dirty + parsed.is_dirty + parsed.is_dirty + parsed.is_dirty + parsed.is_dirty + parsed.is_dirty + parsed.is_dirty + parsed", + "exact_match": false, + "code_bleu": 0.2295748846661433, + "edit_similarity": 0.23076923076923078 + }, + { + "repo": "pypa/setuptools-scm", + "expected": "\"C:/path/to/file\"", + "got": "\"C:\\\\path\\\\to\\\\file\"", + "got_raw": "\"C:\\\\path\\\\to\\\\file\" # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.7567567567567568 + }, + { + "repo": "pypa/setuptools-scm", + "expected": "_sep({\"adir/filea\"})", + "got": "_sep({\"adir/filea\"})", + "got_raw": "_sep({\"adir/filea\"})", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pypa/setuptools-scm", + "expected": "0", + "got": "0", + "got_raw": "0 \"\"\"Stable archive created at .git_archival.txt\"\"\" \"\"\"Stable archive created at .git_archival.txt\"\"\" \"\"\"Stable archive created at .git_archival.txt\"\"\" \"\"\"Stable archive created at .git_archival.txt\"\"\" \"\"\"Stable archive created at .git_archival.txt\"\"\" \"\"\"Stable archive created at .git_archival.txt\"\"\" \"\"\"Stable archive created at .git_archival.txt\"\"\" \"\"\"Stable archive created at .git_archival.txt\"\"\" \"\"\"Stable archive created at .git_archival.txt\"\"\" \"\"\"Stable archive created at .git_archival.txt\"\"\" \"\"\"Stable archive created at .", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pypa/setuptools-scm", + "expected": "1", + "got": "127", + "got_raw": "127 if sys.version_info[:2] >= (3, 10) else 126 if sys.version_info[:2] >= (3, 8) else 125 if sys.version_info[:2] >= (3, 7) else 124 if sys.version_info[:2] >= (3, 6) else 123 if sys.version_info[:2] >= (3, 5) else 122 if sys.version_info[:2] >= (3, 4) else 121 if sys.version_info[:2] >= (3", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "pypa/setuptools-scm", + "expected": "LookupError)", + "got": "SystemExit)", + "got_raw": "SystemExit) as excinfo: _version_missing(config) assert str(excinfo.value) == \"Could not find a valid version in the parent directory\" assert str(config) == str(subdir) + \"/nested\" assert config.relative_to is None def test_version_missing_with_relative_to(wd: WorkDir) -> None: \"\"\"Test that _version_missing provides helpful error message when SCM is found in parent with relative_to set.\"\"\" # Set up git repo in root setup_git_repo(wd) # Create a subdirectory structure subdir = wd.cwd / \"subproject\" / \"nested\" subdir.mkdir(parents=True) # Test error", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.17391304347826086 + }, + { + "repo": "pyparsing/pyparsing", + "expected": "exc_type, expected_msg)", + "got": "exc_type, expected_msg) as cm: yield print(cm) else: with self.assertRaises(exc_type) as cm: yield print(cm) self.assertEqual(str(cm.exception), \"\") if msg is not None: self.assertEqual(msg, str(cm.exception)) else: self.assertEqual(msg, str(cm.exception)) self.assertEqual(cm.exception.args[0], \"\") if expected_msg is not None: self.assertEqual(expected_msg, cm.exception.args[1]) else: self.assertEqual(expected_msg, cm.exception.args[0]) return cm.exception.args[0] if cm.exception.args[1] is not None else None", + "got_raw": "exc_type, expected_msg) as cm: yield print(cm) else: with self.assertRaises(exc_type) as cm: yield print(cm) self.assertEqual(str(cm.exception), \"\") if msg is not None: self.assertEqual(msg, str(cm.exception)) else: self.assertEqual(msg, str(cm.exception)) self.assertEqual(cm.exception.args[0], \"\") if expected_msg is not None: self.assertEqual(expected_msg, cm.exception.args[1]) else: self.assertEqual(expected_msg, cm.exception.args[0]) return cm.exception.args[0] if cm.exception.args[1] is not None else None", + "exact_match": false, + "code_bleu": 0.021847135649453894, + "edit_similarity": 0.0856610800744879 + }, + { + "repo": "pyparsing/pyparsing", + "expected": "9", + "got": "9.0000000000000014466666666666667e-170000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "9.0000000000000014466666666666667e-170000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "pyparsing/pyparsing", + "expected": "diag_html_capture.getvalue())", + "got": "diag_html_capture.getvalue())", + "got_raw": "diag_html_capture.getvalue()) self.assertIn(\"\", diag_html_capture.getvalue()) self.assertIn(\"\", diag_html_capture.getvalue()) self.assertIn(\"

\", diag_html_capture.getvalue()) self.assertIn(\"

\", diag_html_capture.getvalue()) self.assertIn(\"

\", diag_html_capture.getvalue()) self.assertIn(\"

\", diag_html_capture.getvalue()) self.assertIn(\"

\", diag_html_capture.getvalue()) self.assertIn(\"

\", diag_html_capture.getvalue()) self.assertIn(\"

\", diag_html_capture.getvalue()) self.assertIn(\"

\", diag_html_capture.getvalue()) self.assertIn(\"
\", diag_html_capture.getvalue()) self.assertIn(\">> np.sin(0.5)\\n\" + \"0.47942553860424978\" + \"\\n\" + \"\\", + "got_raw": "pylsp_hover(doc._config, doc, numpy_hov_position_3)[\"contents\"][\"value\"] == contents + \"sin\\n\" + \"----\\n\\n\" + \"sin\\n\" + \"----\\n\" + \"Returns\\n\" + \"------\\n\" + \"float\\n\" + \"The sine of x.\" + \"\\n\" + \"\\n\" + \"Examples\\n\" + \"--------\\n\" + \">>> np.sin(0.5)\\n\" + \"0.47942553860424978\" + \"\\n\" + \"\\", + "exact_match": false, + "code_bleu": 0.3002563502657505, + "edit_similarity": 0.4 + }, + { + "repo": "python-lsp/python-lsp-server", + "expected": "None", + "got": "None", + "got_raw": "None ### END_TARGET ###", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "python-lsp/python-lsp-server", + "expected": "1", + "got": "1", + "got_raw": "1 defn = defns[0] assert defn[\"uri\"] == \"file:///usr/lib/python3.6/builtins.pyi\" assert defn[\"range\"][\"start\"][\"line\"] == 8 assert defn[\"range\"][\"start\"][\"character\"] == 24 assert defn[\"range\"][\"end\"][\"line\"] == 8 assert defn[\"range\"][\"end\"][\"character\"] == 28 assert defn[\"kind\"] == 16 # Class defn[\"name\"] == \"dict\" assert defn[\"containerName\"] == \"dict\" assert defn[\"containerUri\"] == \"file:///", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "python-lsp/python-lsp-server", + "expected": "\"0Hello12345678901234567890123456789\"", + "got": "\"Hello012345678901234567890123456789\"", + "got_raw": "\"Hello012345678901234567890123456789\" \"Hello012345678901234567890123456789\" \"Hello012345678901234567890123456789\" \"Hello012345678901234567890123456", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.972972972972973 + }, + { + "repo": "python-lsp/python-lsp-server", + "expected": "None", + "got": "None", + "got_raw": "None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "python-lsp/python-lsp-server", + "expected": "\"import sys\\n\"", + "got": "\"foo\" assert doc.lines[1] == \"bar\" assert doc.lines[2] == \"baz\" assert doc.lines[3] == \"qux\" def test_document_position(doc) -> None: assert doc.position(line=0", + "got_raw": "\"foo\" assert doc.lines[1] == \"bar\" assert doc.lines[2] == \"baz\" assert doc.lines[3] == \"qux\" def test_document_position(doc) -> None: assert doc.position(line=0, character=0) == (0, 0) assert doc.position(line=0, character=1) == (0, 1) assert doc.position(line=1, character=0) == (1, 0) assert doc.position(line=1, character=1) == (1, 1) assert doc.position(line=2, character=0) == (", + "exact_match": false, + "code_bleu": 0.02105846679245091, + "edit_similarity": 0.08045977011494253 + }, + { + "repo": "python-poetry/cleo", + "expected": "2", + "got": "2", + "got_raw": "2 * 3 + 1 + 2 * 3 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "python-poetry/cleo", + "expected": "\"black\"", + "got": "\"black\"", + "got_raw": "\"black\" io.write_error(error) io.write_error(error) io.write_error(error) io.write_error(error) io.write_error(error) io.write_error(error) io.write_error(error) io.write_error(error) io.write_error(error) io.write_error(error) io.write_error(error) io.write_error(error) io.write_error(error) io.write_error(error) io.write_error(error) io.write_error(error) io.write_error(error) io.write_error(error) io.write_error(error) io.write_error(error) io.write_error(error) io.write_error(error) io.write_error(error) io.write_error(error) io.write_error(error)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "python-poetry/cleo", + "expected": "1", + "got": "1", + "got_raw": "1 assert len(dispatcher.get_listeners(POST_FOO)) == 1 assert len(dispatcher.get_listeners()) == 2 assert dispatcher.get_listeners() == [listener.pre_foo, listener.post_foo] assert dispatcher.get_listeners(PRE_FOO) == [listener.pre_foo] assert dispatcher.get_listeners(POST_FOO) == [listener.post_foo] assert dispatcher.get_listeners(PRE_FOO, 1) == [listener.pre_foo] assert dispatcher.get_listeners(POST_FOO, 1) == [listener.post_foo] assert dispatcher.get_listeners(PRE_FOO", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "python-poetry/cleo", + "expected": "\"Foo description\"", + "got": "\"Foo description\" assert argument.default == \"bar\" assert argument.get_help() == \"Foo description\" assert argument.get_short_help() == \"Foo\" assert argument.get_long_help() == \"Foo description\" assert argument.get_list() == [] assert argument.get_list_separator() == \"", + "got_raw": "\"Foo description\" assert argument.default == \"bar\" assert argument.get_help() == \"Foo description\" assert argument.get_short_help() == \"Foo\" assert argument.get_long_help() == \"Foo description\" assert argument.get_list() == [] assert argument.get_list_separator() == \",\" assert argument.get_list_delimiter() == \" \" assert argument.get_list_quote() == \"\" assert argument.get_list_quote_char() == \"\" assert argument.get_list_quote_escape() == \"\" assert argument.get_list_quote_escape_char() == \"\" assert argument.get_list_quote_escape_sequence() == \"\" assert argument.get_list_quote_escape_sequence_char() == \"\" assert argument.get_list", + "exact_match": false, + "code_bleu": 0.02223302637951947, + "edit_similarity": 0.11929824561403508 + }, + { + "repo": "python-poetry/cleo", + "expected": "None", + "got": "None", + "got_raw": "None\n\n frame = Frame(e.__traceback__, 0)\n assert frame.filename == __file__[:-3] + \"_test_frame.py\"\n assert frame.name == \"test_frame\"\n assert frame.line == 22\n assert frame.column == 12\n assert frame.code == \"simple_exception()\"\n assert frame.args == ()\n assert frame.locals == {}\n assert frame.is_exception() is True\n assert frame.is_frame() is False\n assert frame.is_code() is False\n assert frame.is_locals() is False\n assert frame.is_args() is", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "python-poetry/cleo", + "expected": "0", + "got": "0", + "got_raw": "0\nassert tester.io.fetch_output() == \"bar\\n\" + \"baz\\n\" + \"qux\\n\" + \"quux\\n\" + \"quuz\\n\" + \"qux\\n\" + \"baz\\n\" + \"qux\\n\" + \"baz\\n\" + \"qux\\n\" + \"baz\\n\" + \"qux\\n\" + \"baz\\n\" + \"qux\\n\" + \"baz\\n\" + \"qux\\n\" + \"baz\\n\" + \"qux\\n\" + \"baz\\n\" + \"qux\\n\" + \"baz\\n\" + \"qux", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "python-poetry/cleo", + "expected": "None", + "got": "None", + "got_raw": "None self._io.write_line(\"handle called\") return 0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "python-poetry/cleo", + "expected": "[]", + "got": "[]", + "got_raw": "[] if opt.required else None if opt.default is None else [] if opt.default == \"\" else [\"\" if opt.default == \" \" else opt.default] if opt.default == \" \" else [\"\" if opt.default == \"\" else opt.default] if opt.default == \"\" else [\"\" if opt.default == \" \" else opt.default] if opt.default == \" \" else [\"\" if opt.default == \"\" else opt.default] if opt.default == \"\" else [\"\" if opt.default == \" \" else opt.default] if opt.default == \" \" else [\"\" if opt.default == \"\" else opt.default] if opt.default == \"\" else [", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "python-poetry/cleo", + "expected": "\"Parent Command.\"", + "got": "\"parent command\" assert command.signature == \"parent:parent\" assert command.options == [] assert command.aliases == [\"p\"] assert command.hidden is False assert command.children == [] assert command.parent is None assert command._parent = \"parent\" assert command._children = [] assert command._parent_name = \"parent\" assert command._parent_aliases = [\"p\"] assert command._parent_hidden = False assert command._parent_signature = \"parent:parent\" assert command._parent_options = [] assert command._parent_aliases = [\"p\"] assert command._parent_hidden = False assert command._parent_signature = \"parent:parent\" assert command._", + "got_raw": "\"parent command\" assert command.signature == \"parent:parent\" assert command.options == [] assert command.aliases == [\"p\"] assert command.hidden is False assert command.children == [] assert command.parent is None assert command._parent = \"parent\" assert command._children = [] assert command._parent_name = \"parent\" assert command._parent_aliases = [\"p\"] assert command._parent_hidden = False assert command._parent_signature = \"parent:parent\" assert command._parent_options = [] assert command._parent_aliases = [\"p\"] assert command._parent_hidden = False assert command._parent_signature = \"parent:parent\" assert command._", + "exact_match": false, + "code_bleu": 0.008734040851412371, + "edit_similarity": 0.046801872074883 + }, + { + "repo": "python-poetry/cleo", + "expected": "None", + "got": "None", + "got_raw": "None\n assert argument.choices is None\n assert argument.required is True\n assert argument.type is None\n assert argument.flags == []\n assert argument.hidden is False\n assert argument.value is None\n assert argument.value_type is None\n assert argument.value_default is None\n assert argument.value_choices is None\n assert argument.value_required is True\n assert argument.value_type is None\n assert argument.value_flags == []\n assert argument.value_hidden is False\n assert argument.value_default is None\n assert argument.value_choices is None\n assert argument.value_required is True\n assert argument.value", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "python-poetry/cleo", + "expected": "[\"bar\"]", + "got": "[\"bar\"]", + "got_raw": "[\"bar\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "python-poetry/cleo", + "expected": "None", + "got": "None", + "got_raw": "None opt.description == \"\" opt.default is None opt.required is False opt.hidden is False opt.is_set is False opt.is_set_by_default is False opt.is_set_by_user is False opt.is_set_by_default_and_user is False opt.is_set_by_user_and_default is False opt.is_set_by_user_and_default_and_default is False opt.is_set_by_user_and_default_and_default_and_default is False opt.is_set_by_user_and_default_and_default_and_default_and_default is False opt.is_set_by_user_and_default_and_default_and_default_and_default_and_default is False opt.is_set_by_user_and_default_and_default_and_default_and_default_and_default_and_default is", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "python-poetry/cleo", + "expected": "\"Bar\"", + "got": "\"bar\"", + "got_raw": "\"bar\" app.version == \"foo\" app.display_version == \"bar\" app.set_name(\"foo\") app.set_version(\"bar\") assert app.name == \"foo\" assert app.display_name == \"foo\" app.version == \"bar\" app.display_version == \"bar\" app.set_name(\"bar\") app.set_version(\"foo\") assert app.name == \"bar\" assert app.display_name == \"bar\" app.version == \"foo\" app.display_version == \"foo\" app.set_name(\"foo\") app.set_version(\"bar\") assert app.name == \"foo\" assert app.display_name == \"foo\" app.version == \"bar", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.8 + }, + { + "repo": "python-poetry/poetry-core", + "expected": "\"Django\"", + "got": "\"Django\"", + "got_raw": "\"Django\" \">=0.0.0, <1.0.0\" \";\" \"python_version >= '3.6'\" \";\" \"platform_python_implementation == 'CPython'\" \";\" \"platform_system == 'Linux'\" \";\" \"platform_release >= '3.10'\" \";\" \"platform_version >= '3.10'\" \";\" \"platform_machine == 'x86_64'\" \";\" \"platform_architecture == '64bit'\" \";\" \"platform_uname == 'Linux'\" \";\" \"platform_system == 'Darwin'\" \";\" \"platform_release >= '1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "python-poetry/poetry-core", + "expected": "3", + "got": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678", + "got_raw": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "python-poetry/poetry-core", + "expected": "[with_includes / \"bar/baz.py\"]", + "got": "[Path(\"bar\")] + list(with_includes.iterdir()) + [Path(\"bar/baz\")] + list(with_includes.joinpath(\"bar/baz\").iterdir()) + [Path(\"bar/baz/qux\")] + list(with_includes.joinpath(\"bar/baz/qux\").iterdir()) + [Path(\"bar/baz/qux/quux\")] + list(with_includes.joinpath(\"bar/baz/qux/quux\").iterdir()) + [Path(\"bar/baz/qux/quux/quuz\")] + list(with_includes.joinpath(\"bar/baz/qux/quux/quuz\").iterdir", + "got_raw": "[Path(\"bar\")] + list(with_includes.iterdir()) + [Path(\"bar/baz\")] + list(with_includes.joinpath(\"bar/baz\").iterdir()) + [Path(\"bar/baz/qux\")] + list(with_includes.joinpath(\"bar/baz/qux\").iterdir()) + [Path(\"bar/baz/qux/quux\")] + list(with_includes.joinpath(\"bar/baz/qux/quux\").iterdir()) + [Path(\"bar/baz/qux/quux/quuz\")] + list(with_includes.joinpath(\"bar/baz/qux/quux/quuz\").iterdir", + "exact_match": false, + "code_bleu": 0.014809533936958785, + "edit_similarity": 0.12560386473429952 + }, + { + "repo": "python-poetry/poetry-core", + "expected": "\"MIT\"", + "got": "\"MIT\"", + "got_raw": "\"MIT\" assert license.name == \"MIT License\" assert license.url == \"https://spdx.org/licenses/MIT.html\" assert license.spdx_id == \"MIT\" assert license.comment == \"\" assert license.is_permissive is True assert license.is_permissive is True assert license.is_permissive is True assert license.is_permissive is True assert license.is_permissive is True assert license.is_permissive is True assert license.is_permissive is True assert license.is_permissive is True assert license.is_permissive is True assert license.is_permissive is True assert license.is_permissive is True assert license.is_permissive is True assert license.is_permissive", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "python-poetry/poetry-core", + "expected": "\"foo\"", + "got": "\"foo\"", + "got_raw": "\"foo\" assert Dependency(\"foo\", \">=1.2.3\", extras=[\"bar\"]).complete_name == \"foo[bar]\" assert Dependency(\"foo\", \">=1.2.3\", extras=[\"bar\", \"baz\"]).complete_name == \"foo[bar,baz]\" assert Dependency(\"foo\", \">=1.2.3\", extras=[\"bar\", \"baz\", \"qux\"]).complete_name == \"foo[bar,baz,qux]\" assert Dependency(\"foo\", \">=1.2.3\", extras=[\"bar\", \"baz\", \"qux\", \"quux\"]).complete_name == \"foo", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "python-poetry/poetry-core", + "expected": "release1", + "got": "release1", + "got_raw": "release1\n else:\n # e.g. 1.2 == 1.2.0\n release2 = Release.from_parts(*range(1, precision1 + 1, 2))\n assert release1 == release2\n\n\n@pytest.mark.parametrize(\"precision\", range(1, 6))\ndef test_release_equal_zero_padding_with_prerelease(precision: int) -> None:\n release1 = Release.from_parts(*range(1, precision + 1), \"a\")\n if precision > 1:\n # e.g. 1.2.3a1 != ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "python-poetry/poetry-core", + "expected": "open", + "got": "open.intersect(a)", + "got_raw": "open.intersect(a) == a.intersect(open) == a.intersect(a) == a == a.intersect(a) == a == a.intersect(a) == a == a.intersect(a) == a == a.intersect(a) == a == a.intersect(a) == a == a.intersect(a) == a == a.intersect(a) == a == a.intersect(a) == a == a.intersect(a) == a == a.intersect(a) == a == a.intersect(a) == a == a.intersect(a) == a == a.intersect(a) == a == a.intersect(a", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.38095238095238093 + }, + { + "repo": "python-poetry/poetry-core", + "expected": "parsed", + "got": "parsed._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._", + "got_raw": "parsed._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._attrs_[\"metadata\"]._", + "exact_match": false, + "code_bleu": 0.011062990127245084, + "edit_similarity": 0.027649769585253458 + }, + { + "repo": "python-poetry/poetry-core", + "expected": "Path(path)", + "got": "Path(path)", + "got_raw": "Path(path) / Path(\"file\") / Path(\"file\") / Path(\"file\") / Path(\"file\") / Path(\"file\") / Path(\"file\") / Path(\"file\") / Path(\"file\") / Path(\"file\") / Path(\"file\") / Path(\"file\") / Path(\"file\") / Path(\"file\") / Path(\"file\") / Path(\"file\") / Path(\"file\") / Path(\"file\") / Path(\"file\") / Path(\"file\") / Path(\"file\") / Path(\"file\") / Path(\"file\") / Path(\"file\") / Path(\"file\") / Path(\"file\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "python-poetry/poetry-core", + "expected": "spec2", + "got": "spec2", + "got_raw": "spec2 == hash(spec1) == hash(spec2) == hash(spec1) == hash(spec2) == hash(spec1) == hash(spec2) == hash(spec1) == hash(spec2) == hash(spec1) == hash(spec2) == hash(spec1) == hash(spec2) == hash(spec1) == hash(spec2) == hash(spec1) == hash(spec2) == hash(spec1) == hash(spec2) == hash(spec1) == hash(spec2) == hash(spec1) == hash(spec2) == hash(spec1) == hash(spec2) == hash(spec1) ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "python-poetry/poetry-core", + "expected": "\"*\"", + "got": "\">=1.0.0\"", + "got_raw": "\">=1.0.0\"\n assert dep.extras == []\n assert dep.is_optional() is False\n assert dep.is_transitive() is False\n assert dep.is_pin() is False\n assert dep.is_editable() is False\n assert dep.is_link() is False\n assert dep.is_file() is False\n assert dep.is_pep_508() is True\n assert dep.is_pep_517() is False\n assert dep.is_pep_518() is False\n assert dep.is_pep_660() is False", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "python-poetry/poetry-core", + "expected": "\"demo-1.0.0.whl\"", + "got": "link.url", + "got_raw": "link.url + \"#sha256=\" + file_checksum + \"\\n\" + link.url + \"\\n\" + link.url + \"#sha256=\" + file_checksum + \"\\n\" + link.url + \"\\n\" + link.url + \"\\n\" + link.url + \"\\n\" + link.url + \"\\n\" + link.url + \"\\n\" + link.url + \"\\n\" + link.url + \"\\n\" + link.url + \"\\n\" + link.url + \"\\n\" + link.url + \"\\n\" + link.url + \"\\n\" + link.url + \"\\n\" + link.url +", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.08333333333333333 + }, + { + "repo": "python-poetry/poetry-core", + "expected": "expected", + "got": "expected", + "got_raw": "expected + \".0\" + subject.pre.text + subject.post.text + subject.dev.text + subject.local.text + subject.metadata.text + subject.extra.text + subject.parsed.text + subject.raw.text + subject.unparsed.text + subject.version.text + subject.version_info.text + subject.version_tag.text + subject.version_tag_info.text + subject.version_tag_info_unparsed.text + subject.version_tag_unparsed.text + subject.version_tag_unparsed_info.text + subject.version_tag_unparsed_info_unparsed.text + subject.version_tag_unparsed_info_unparsed_unparsed.text + subject.version_tag_unparsed_info_unparsed_unparsed_unparsed.text + subject.version_tag_unparsed", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "python-poetry/poetry-core", + "expected": "\"2.18.0\"", + "got": "\"==2.18.0\"", + "got_raw": "\"==2.18.0\"\n\n\ndef test_dependency_from_pep_508_with_extras() -> None:\n name = \"requests[security]==2.18.0\"\n dep = Dependency.create_from_pep_508(name)\n\n assert dep.name == \"requests\"\n assert dep.extras == [\"security\"]\n\n\ndef test_dependency_from_pep_508_with_extras_and_version() -> None:\n name = \"requests[security]==2.18.0\"\n dep = Dependency.create_from_pep_508(name", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.8888888888888888 + }, + { + "repo": "python-poetry/poetry-core", + "expected": "v124", + "got": "VersionRange(v124", + "got_raw": "VersionRange(v124, v200) | VersionRange(v114, v124) | VersionRange(v124, v124) | VersionRange(v124, v124) | VersionRange(v124, v124) | VersionRange(v124, v124) | VersionRange(v124, v124) | VersionRange(v124, v124) | VersionRange(v124, v124) | VersionRange(v124, v124", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.38095238095238093 + }, + { + "repo": "python-poetry/poetry-core", + "expected": "{\"sha256\": file_checksum}", + "got": "{\"sha256\": file_checksum} if file_checksum else {}", + "got_raw": "{\"sha256\": file_checksum} if file_checksum else {}", + "exact_match": false, + "code_bleu": 0.4617366309441026, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "python-poetry/poetry-core", + "expected": "\"WARNING\"", + "got": "\"WARNING\"", + "got_raw": "\"WARNING\" assert record.message == \"File dependency 'demo' does not exist\" assert record.link is None caplog.clear() dep.link = \"https://example.com/demo-0.1.0.tar.gz\" dep.marker = SingleMarker(\"sys.version_info >= (3, 7)\") dep._resolve() assert dep.link == \"https://example.com/demo-0.1.0.tar.gz\" assert dep.marker is None dep.marker = SingleMarker(\"sys.version_info >= (3, 8)\") dep._resolve() assert dep.link is None assert dep.marker is not None assert dep.marker.raw == \"sys.version_info", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "python-poetry/poetry-core", + "expected": "1", + "got": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678", + "got_raw": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "python-poetry/poetry-core", + "expected": "name", + "got": "name.lower()", + "got_raw": "name.lower() for name in z.namelist() if name.endswith(\".pyc\") or name.endswith(\".pyc\") assert \"__pycache__\" not in name.lower() for name in z.namelist() if name.endswith(\".pyc\") or name.endswith(\".pyc\") or name.endswith(\".pyc\") or name.endswith(\".pyc\") or name.endswith(\".pyc\") or name.endswith(\".pyc\") or name.endswith(\".pyc\") or name.endswith(\".pyc\") or name.endswith(\".pyc\") or name.endswith(\".pyc\") or name.endswith(\".pyc\") or name.endswith(\".pyc\")", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5 + }, + { + "repo": "python-poetry/poetry-core", + "expected": "parsed.name", + "got": "parsed.name", + "got_raw": "parsed.name assert result.url == parsed.url assert result.branch == parsed.branch assert result.subdirectory == parsed.subdirectory assert result.commit == parsed.commit assert result.user == parsed.user assert result.password == parsed.password assert result.port == parsed.port assert result.host == parsed.host assert result.path == parsed.path assert result.scheme == parsed.scheme assert result.ssh == parsed.ssh assert result.egg == parsed.egg assert result.git == parsed.git assert result.git_ssh == parsed.git_ssh assert result.git_ssh_url == parsed.git_ssh_url assert result.git_ssh_url_no_user == parsed.git_ssh_url_no_user assert result.git_ssh_url_no_port == parsed.git", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pytries/marisa-trie", + "expected": "trie", + "got": "trie.keys()", + "got_raw": "trie.keys() | trie.values() | trie.items() | trie.iterkeys() | trie.itervalues() | trie.iteritems() | trie.viewkeys() | trie.viewvalues() | trie.viewitems() | trie.__iter__() | trie.__reversed__() | trie.__len__() | trie.__bool__() | trie.__contains__() | trie.__getitem__() | trie.__setitem__() | trie.__delitem__() | trie.__iter__() | trie.__reversed__() | trie.__len__() | trie.__bool__() | trie.__contains__() | trie.__getitem__() | trie.__setitem__() | trie.__delitem__()", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5333333333333333 + }, + { + "repo": "pytries/marisa-trie", + "expected": "wo_trie", + "got": "wo_trie", + "got_raw": "wo_trie and wo_trie != lo_trie\n\n\ndef test_eq_neq_different_order2():\n lo_trie = marisa_trie.BinaryTrie(order=marisa_trie.LABEL_ORDER)\n wo_trie = marisa_trie.BinaryTrie(order=marisa_trie.WEIGHT_ORDER)\n assert lo_trie == lo_trie and wo_trie == wo_trie\n\n assert lo_trie != wo_trie and wo_trie != lo_trie\n\n\ndef test_eq_neq_different_order3():\n lo_trie = marisa_trie.BinaryTrie(order=mar", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pytries/marisa-trie", + "expected": "0", + "got": "0", + "got_raw": "0\n\n trie[\"a\"] = 1\n assert len(trie) == 1\n\n trie[\"b\"] = 2\n assert len(trie) == 2\n\n\ndef test_iter():\n trie = marisa_trie.Trie()\n trie[\"a\"] = 1\n trie[\"b\"] = 2\n trie[\"c\"] = 3\n\n assert list(trie) == [\"a\", \"b\", \"c\"]\n\n\ndef test_contains():\n trie = marisa_trie.Trie()\n trie[\"a\"] = 1\n trie[\"b\"] =", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "pytries/marisa-trie", + "expected": "[]", + "got": "[]", + "got_raw": "[]\n\n\ndef test_prefixes_empty():\n trie = marisa_trie.BinaryTrie()\n assert trie.prefixes(b\"\") == []\n assert trie.prefixes(b\"foo\") == [b\"foo\"]\n\n\ndef test_prefixes_empty_trie():\n trie = marisa_trie.BinaryTrie()\n assert trie.prefixes(b\"\") == []\n assert trie.prefixes(b\"foo\") == []\n assert trie.prefixes(b\"bar\") == []\n\n\ndef test_prefixes_empty_trie2():\n trie = marisa_trie.BinaryTrie([b\"foo\",", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "qtile/qtile", + "expected": "1", + "got": "1", + "got_raw": "1 assert manager.c.layout.info()[\"clients\"][0] == \"one\" manager.c.window.disable_floating() manager.c.window.set_position(0, 0) info = manager.c.window.info() assert info[\"x\"] == 0 assert info[\"y\"] == 0 assert len(manager.c.layout.info()[\"clients\"]) == 2 assert manager.c.layout.info()[\"clients\"][0] == \"one\" assert manager.c.layout.info()[\"clients\"][1] == \"two\" manager.c.window.disable_floating() manager.c.window.set_position(0, 0) info = manager.c.window.info() assert info[\"x\"] == ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "qtile/qtile", + "expected": "i)", + "got": "i)", + "got_raw": "i) self.c.group.prev_window() assert_unfocused(self, i)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "qtile/qtile", + "expected": "3", + "got": "3.00000000000000043488e-05000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "3.00000000000000043488e-05000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "qtile/qtile", + "expected": "0", + "got": "0", + "got_raw": "0 if stderr else 127 if stdout else 126 if stderr else 125 if stdout else 124 if stderr else 123 if stdout else 122 if stderr else 121 if stdout else 120 if stderr else 119 if stdout else 118 if stderr else 117 if stdout else 116 if stderr else 115 if stdout else 114 if stderr else 113 if stdout else 112 if stderr else 111 if stdout else 110 if", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "qtile/qtile", + "expected": "1", + "got": "1", + "got_raw": "1 + start_wins - 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "qtile/qtile", + "expected": "\"dd-a\"", + "got": "\"dd-a\"", + "got_raw": "\"dd-a\" assert manager.c.group[\"SCRATCHPAD\"].dropdown_info(\"dd-a\")[\"window\"][\"title\"] == \"dd-a\" assert manager.c.group[\"SCRATCHPAD\"].dropdown_info(\"dd-a\")[\"window\"][\"id\"] == 1 assert manager.c.group[\"SCRATCHPAD\"].dropdown_info(\"dd-a\")[\"window\"][\"pid\"] == 1 assert manager.c.group[\"SCRATCHPAD\"].dropdown_info(\"dd-a\")[\"window\"][\"type\"] == \"normal\" assert manager.c.group[\"SCRATCHPAD\"].dropdown_info(\"dd-a\")[\"window\"][\"group\"] == \"SCRATCHPAD\" assert manager.c", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "qtile/qtile", + "expected": "\"a\"", + "got": "\"1\"", + "got_raw": "\"1\" manager.c.screen.info()[\"number\"] == 0 manager.c.screen.info()[\"active\"] == True manager.c.screen.info()[\"focus\"] == 0 manager.c.screen.info()[\"left\"] == 0 manager.c.screen.info()[\"right\"] == 1 manager.c.screen.info()[\"top\"] == 0 manager.c.screen.info()[\"bottom\"] == 1 manager.c.screen.info()[\"lactive\"] == 0 manager.c.screen.info()[\"lfocus\"] == 0 manager.c.screen.info()[\"lleft\"] == 0 manager.c.screen.info()[\"lright\"] == 1 manager.c.screen.info()[\"ltop\"] == 0 manager", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "qtile/qtile", + "expected": "\"25\"", + "got": "\"10", + "got_raw": "\"10 Canto, 9 Slashdot, 6 MintyFresh\" + \"\\n\" + \"10 Canto, 9 Slashdot, 6 MintyFresh\" + \"\\n\" + \"10 Canto, 9 Slashdot, 6 MintyFresh\" + \"\\n\" + \"10 Canto, 9 Slashdot, 6 MintyFresh\" + \"\\n\" + \"10 Canto, 9 Slashdot, 6 MintyFresh\" + \"\\n\" + \"10 Canto, 9 Slashdot, 6 MintyFresh\" +", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.2857142857142857 + }, + { + "repo": "qtile/qtile", + "expected": "[\"1\"]", + "got": "[\"1\"]", + "got_raw": "[\"1\"] + [\"2\"] + [\"3\"] + [\"4\"] + [\"5\"] + [\"6\"] + [\"7\"] + [\"8\"] + [\"9\"] + [\"10\"] + [\"11\"] + [\"12\"] + [\"13\"] + [\"14\"] + [\"15\"] + [\"16\"] + [\"17\"] + [\"18\"] + [\"19\"] + [\"20\"] + [\"21\"] + [\"22\"] + [\"23\"] + [\"24\"] + [\"25\"] + [\"26\"] + [\"27\"] + [\"2", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "qtile/qtile", + "expected": "\"|\"", + "got": "\"|\"", + "got_raw": "\"|\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "qtile/qtile", + "expected": "1", + "got": "1", + "got_raw": "1\n ver = ver_line[0].split()[1]\n return ver\n except Exception as e:\n print(\"Error getting imagemagick version: %s\" % e)\n return None\n\n\ndef test_image_from_file(tmpdir):\n \"\"\"Test that we can load an image from a file\"\"\"\n img = images.Image.from_file(path.join(tmpdir, \"test.png\"))\n assert img.width == 100 and img.height == 100\n\n\ndef test_image_from_url(tmpdir):\n \"\"\"Test that we can load an image from a url\"\"\"\n img = images.Image.from", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "qtile/qtile", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "qtile/qtile", + "expected": "\"max\"", + "got": "\"screen_split\"", + "got_raw": "\"screen_split\" ss_manager.c.layout.toggle_split() assert ss_manager.c.layout.info()[\"current_layout\"] == \"stack\" ss_manager.c.layout.toggle_split() assert ss_manager.c.layout.info()[\"current_layout\"] == \"screen_split\" ss_manager.c.layout.toggle_split() assert ss_manager.c.layout.info()[\"current_layout\"] == \"stack\" ss_manager.c.layout.toggle_split() assert ss_manager.c.layout.info()[\"current_layout\"] == \"screen_split\" ss_manager.c.layout.toggle_split() assert ss_manager.c.layout.info()[\"current_layout\"] == \"stack\" ss_manager.c.layout.toggle_split() assert ss_manager.c.layout.info()[\"current_layout\"]", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.21052631578947367 + }, + { + "repo": "qtile/qtile", + "expected": "1", + "got": "1", + "got_raw": "1\nassert manager.inhibitors[0].window == 1 assert manager.inhibitors[0].reason == \"open\" assert manager.inhibitors[0].active_only is True assert manager.inhibitors[0].match is None assert manager.inhibitors[0].id == 1 manager.add_window_inhibitor(2, \"close\") assert len(manager.inhibitors) == 2 assert manager.inhibitors[1].window == 2 assert manager.inhibitors[1].reason == \"close\" assert manager.inhibitors[1].active_only is False assert manager.inhibitors[1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "qtile/qtile", + "expected": "\"b\"", + "got": "\"1\"", + "got_raw": "\"1\" + manager.c.group_names[1] + \"1\" + manager.c.group_names[1] + \"1\" + manager.c.group_names[1] + \"1\" + manager.c.group_names[1] + \"1\" + manager.c.group_names[1] + \"1\" + manager.c.group_names[1] + \"1\" + manager.c.group_names[1] + \"1\" + manager.c.group_names[1] + \"1\" + manager.c.group_names[1] + \"1\" + manager.c.group_names[1] + \"1\" + manager.c.group_names", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "qtile/qtile", + "expected": "0", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "qtile/qtile", + "expected": "3", + "got": "3", + "got_raw": "3 end_test() def test_urgent_window(xmanager_nospawn): xmanager_nospawn.start(UrgentConfig) w = xmanager_nospawn.test_window(\"one\") w.urgent = True xmanager_nospawn.c.focus(w) xmanager_nospawn.c.urgent(w) w = xmanager_nospawn.test_window(\"two\") xmanager_nospawn.c.focus(w) xmanager_nospawn.c.urgent(w) xmanager_nospawn.terminate() def test_urgent_window_focus(xmanager_nospawn): xmanager_nospawn.start(UrgentConfig) w = xmanager_n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "qtile/qtile", + "expected": "RED", + "got": "RED", + "got_raw": "RED + BASE_BACKGROUND + \" \" + BLUE + BASE_BACKGROUND + \" \" + BASE_BACKGROUND + \" \" + BASE_BACKGROUND + \" \" + BASE_BACKGROUND + \" \" + BASE_BACKGROUND + \" \" + BASE_BACKGROUND + \" \" + BASE_BACKGROUND + \" \" + BASE_BACKGROUND + \" \" + BASE_BACKGROUND + \" \" + BASE_BACKGROUND + \" \" + BASE_BACKGROUND + \" \" + BASE_BACKGROUND + \" \" + BASE_BACKGROUND + \" \" + BASE_BACKGROUND + \" \" + BASE_BACKGROUND + \" \" + BASE_BACKGROUND + \" \" + BASE_BACKGROUND + \" \" + BASE_BACKGROUND + \" \" + BASE_BACKGROUND + \" \" + BASE_BACKGROUND + \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "qtile/qtile", + "expected": "\"a\"", + "got": "\"a\"", + "got_raw": "\"a\" \"b\" \"c\" \"d\" \"e\" \"f\" \"g\" \"h\" \"i\" \"j\" \"k\" \"l\" \"m\" \"n\" \"o\" \"p\" \"q\" \"r\" \"s\" \"t\" \"u\" \"v\" \"w\" \"x\" \"y\" \"z\" \"a\" \"b\" \"c\" \"d\" \"e\" \"f\" \"g\" \"h\" \"i\" \"j\" \"k\" \"l\" \"m\" \"n\" \"o\" \"p\" \"q\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "qtile/qtile", + "expected": "s", + "got": "s", + "got_raw": "s + os.sep + \"thisisatotallynonexistantpathforsure\" + os.sep + \"thisisatotallynonexistantpathforsure\" + os.sep + \"thisisatotallynonexistantpathforsure\" + os.sep + \"thisisatotallynonexistantpathforsure\" + os.sep + \"thisisatotallynonexistantpathforsure\" + os.sep + \"thisisatotallynonexistantpathforsure\" + os.sep + \"thisisatotallynonexistantpathforsure\" +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "qwertyquerty/pypresence", + "expected": "True", + "got": "True", + "got_raw": "True\n\n @patch(\"pypresence.AioPresence._get_token\")\n def test_aio_presence_get_token(self, mock_get_token, client_id):\n \"\"\"Test AioPresence._get_token method\"\"\"\n mock_get_token.return_value = \"token\"\n presence = AioPresence(client_id)\n token = presence._get_token()\n assert token == \"token\"\n mock_get_token.assert_called_once()\n\n @patch(\"pypresence.AioPresence._get_token\")\n def test_aio_presence_get_token_error(self, mock_get_token, client", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "qwertyquerty/pypresence", + "expected": "[]", + "got": "[]", + "got_raw": "[] # Preserved as is assert result[\"none\"] is None # Preserved as is \"\"\"Test that other falsy values (0, False, '') are preserved\"\"\" d = { \"zero\": 0, \"false\": False, \"empty_string\": \"\", \"empty_list\": [], \"none\": None, } result = remove_none(d) assert result[\"zero\"] == 0 assert result[\"false\"] is False assert result[\"empty_string\"] == \"\" assert result[\"empty_list\"] == [] # Preserved as is assert result[\"none\"] is None # Preserved as is \"\"\"Test that other falsy values", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "qwertyquerty/pypresence", + "expected": "custom_pid", + "got": "custom_pid", + "got_raw": "custom_pid payload = Payload.set_activity() payload.data[\"args\"][\"pid\"] == 0 payload = Payload.set_activity(pid=0) payload.data[\"args\"][\"pid\"] == 0 payload = Payload.set_activity(pid=1) payload.data[\"args\"][\"pid\"] == 1 payload = Payload.set_activity(pid=2) payload.data[\"args\"][\"pid\"] == 2 payload = Payload.set_activity(pid=3) payload.data[\"args\"][\"pid\"] == 3 payload = Payload.set_activity(pid=4) payload.data[\"args\"][\"pid\"] == 4 payload = Payload.set_activity(pid=5) payload.data[\"args\"][\"pid", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "qwertyquerty/pypresence", + "expected": "\"My Activity\"", + "got": "\"My Activity\" assert payload[\"args\"][\"activity\"][\"details\"] == \"Working on something\" assert payload[\"args\"][\"activity\"][\"state\"] == \"In Progress\" assert payload[\"args\"][\"activity\"][\"type\"] == ActivityType.LOBBY.value assert payload[\"args\"][\"activity\"][\"created_at\"] == 0 assert payload[\"args\"][\"activity\"][\"id\"] == 0 assert payload[\"args\"][\"activity\"][\"assets\"] is None assert payload[\"args\"][\"activity\"][\"buttons\"] is None assert payload[\"args\"][\"activity\"][\"timestamps\"] is None assert payload[\"args\"][\"activity\"][\"instance\"] is None assert payload[\"args\"][\"activity\"][\"party\"] is", + "got_raw": "\"My Activity\" assert payload[\"args\"][\"activity\"][\"details\"] == \"Working on something\" assert payload[\"args\"][\"activity\"][\"state\"] == \"In Progress\" assert payload[\"args\"][\"activity\"][\"type\"] == ActivityType.LOBBY.value assert payload[\"args\"][\"activity\"][\"created_at\"] == 0 assert payload[\"args\"][\"activity\"][\"id\"] == 0 assert payload[\"args\"][\"activity\"][\"assets\"] is None assert payload[\"args\"][\"activity\"][\"buttons\"] is None assert payload[\"args\"][\"activity\"][\"timestamps\"] is None assert payload[\"args\"][\"activity\"][\"instance\"] is None assert payload[\"args\"][\"activity\"][\"party\"] is", + "exact_match": false, + "code_bleu": 0.008586612741476665, + "edit_similarity": 0.0436241610738255 + }, + { + "repo": "qwertyquerty/pypresence", + "expected": "True", + "got": "True", + "got_raw": "True\n\n def test_set_activity_type(self):\n \"\"\"Test activity type\"\"\"\n payload = Payload.set_activity(type=ActivityType.LOBBY)\n assert payload.data[\"args\"][\"activity\"][\"type\"] == 0\n\n payload = Payload.set_activity(type=ActivityType.SOCIAL)\n assert payload.data[\"args\"][\"activity\"][\"type\"] == 1\n\n payload = Payload.set_activity(type=ActivityType.PLAYING)\n assert payload.data[\"args\"][\"activity\"][\"type\"] == 2\n\n payload = Payload.set_activity(type=ActivityType.WATCHING)\n assert payload.data[\"args\"][\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "qwertyquerty/pypresence", + "expected": "10", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.03076923076923077 + }, + { + "repo": "qwertyquerty/pypresence", + "expected": "4000", + "got": "4000", + "got_raw": "4000 assert exc.message == \"Invalid Client ID\" assert str(exc) == \"Invalid Client ID\" assert repr(exc) == \"DiscordError(4000, 'Invalid Client ID')\" assert exc.code == 4000 assert exc.message == \"Invalid Client ID\" assert repr(exc) == \"DiscordError(4000, 'Invalid Client ID')\" assert repr(exc) == \"DiscordError(4000, 'Invalid Client ID')\" assert repr(exc) == \"DiscordError(4000, 'Invalid Client ID')\" assert repr(exc) == \"Disc", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "qwertyquerty/pypresence", + "expected": "mock_response", + "got": "mock_response[\"data\"]", + "got_raw": "mock_response[\"data\"] # type: ignore [attr-defined] # noqa: E501 # noqa: E501 [attr-defined] # noqa: E501 [attr-defined] # noqa: E501 [attr-defined] # noqa: E501 [attr-defined] # noqa: E501 [attr-defined] # noqa: E501 [attr-defined] # noqa: E501 [attr-defined] # noqa: E501 [attr-defined] # noqa: E501 [attr", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.7647058823529411 + }, + { + "repo": "qwertyquerty/pypresence", + "expected": "client_id", + "got": "client_id", + "got_raw": "client_id # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E7", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ramnes/notion-sdk-py", + "expected": "{}", + "got": "mock_response", + "got_raw": "mock_response # noqa: E501", + "exact_match": false, + "code_bleu": 0.25, + "edit_similarity": 0.0 + }, + { + "repo": "ramnes/notion-sdk-py", + "expected": "503", + "got": "503", + "got_raw": "503 error.message == \"Unknown HTTP response error\" error.code == \"\" error.http_status_code == 503 error.request_id is None error.url is None error.headers is None error.body is None error.error_code is None error.message_code is None error.message_params is None error.message_format is None error.message_format_args is None error.message_format_kwargs is None error.message_format_kwargs_args is None error.message_format_kwargs_kwargs is None error.message_format_kwargs_kwargs_args is None error.message_format_kwargs_kwargs_kwargs is None error.message_format_kwargs_kwargs_kwargs_args is None error.message_format_kwargs_kwargs_kwargs_kwargs is None error.message_format_kwargs_kwargs_kwargs", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ramnes/notion-sdk-py", + "expected": "3", + "got": "3.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "3.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "ramnes/notion-sdk-py", + "expected": "custom_message", + "got": "custom_message", + "got_raw": "custom_message + \"\\n\" + str(error.status) + \"\\n\" + str(error) + \"\\n\" + str(error) + \"\\n\" + str(error) + \"\\n\" + str(error) + \"\\n\" + str(error) + \"\\n\" + str(error) + \"\\n\" + str(error) + \"\\n\" + str(error) + \"\\n\" + str(error) + \"\\n\" + str(error) + \"\\n\" + str(error) + \"\\n\" + str(error) + \"\\n\" + str(error) + \"\\n\" + str(error) + \"\\n\" +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ramnes/notion-sdk-py", + "expected": "HTTPResponseError)", + "got": "HTTPResponseError)", + "got_raw": "HTTPResponseError) as exc_info: client.parse_response(mock_response) assert str(exc_info.value) == \"Internal Server Error\" assert exc_info.value.status_code == 500 assert exc_info.value.text == \"Internal Server Error\" assert exc_info.value.headers == {} assert exc_info.value.error == \"test\" assert exc_info.value.error_code == 0 assert exc_info.value.error_message == \"test\" assert exc_info.value.error_details == \"doc\" assert exc_info.value.error_traceback is None assert exc_info.value.error_type is None assert exc_info.value.error_class is None assert exc_info.value.error_subclass is None assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rcmdnk/homebrew-file", + "expected": "b", + "got": "b.strip()", + "got_raw": "b.strip() + '\\n' if b else '' else a.strip() + '\\n' if a else '' else a.strip() + '\\n' if a else '' else a.strip() + '\\n' if a else '' else a.strip() + '\\n' if a else '' else a.strip() + '\\n' if a else '' else a.strip() + '\\n' if a else '' else a.strip() + '\\n' if a else '' else a.strip() + '\\n' if a else '' else a.strip() + '\\n' if a else '' else a.strip() + '\\n' if", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.2 + }, + { + "repo": "rcmdnk/homebrew-file", + "expected": "'", + "got": "''''''", + "got_raw": "''''''\n\n\ndef test_desc_empty_desc_cask(brew_info: BrewInfo) -> None:\n brew_info.helper.opt['describe'] = True\n brew_info.helper.info = {\n 'formulae': {},\n 'casks': {'golang': {'desc': ''}},\n }\n\n assert brew_info.desc_comment('golang', 'casks') == ''''''\n\n\ndef test_desc_empty_desc_formula(brew_info: BrewInfo) -> None:\n brew_info.helper.opt['describe'] = True\n brew_info.helper.info = {\n 'formulae': {'golang': {'desc': ''", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.2857142857142857 + }, + { + "repo": "rcmdnk/homebrew-file", + "expected": "file", + "got": "file.read_text()", + "got_raw": "file.read_text() + '\\n' + file.read_text() + '\\n' + file.read_text() + '\\n' + file.read_text() + '\\n' + file.read_text() + '\\n' + file.read_text() + '\\n' + file.read_text() + '\\n' + file.read_text() + '\\n' + file.read_text() + '\\n' + file.read_text() + '\\n' + file.read_text() + '\\n' + file.read_text() + '\\n' + file.read_text() + '\\n' + file.read_text() + '\\n' + file.read", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.4 + }, + { + "repo": "rcmdnk/homebrew-file", + "expected": "lines", + "got": "lines[0]", + "got_raw": "lines[0] return lines[0].split() + lines[1].split() + lines[2].split() + lines[3].split() + lines[4].split() + lines[5].split() + lines[6].split() + lines[7].split() + lines[8].split() + lines[9].split() + lines[10].split() + lines[11].split() + lines[12].split() + lines[13].split() + lines[14].split() + lines[15].split() + lines[16].", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.7692307692307693 + }, + { + "repo": "rcmdnk/homebrew-file", + "expected": "''", + "got": "''", + "got_raw": "'' ''' # test_repo ''' ''' brew install git ''' ''' brew install vim ''' ''' brew install python@3.10 ''' ''' brew install python@3.9 ''' ''' brew install python@3.8 ''' ''' brew install python@3.7 ''' ''' brew install python@3.6 ''' ''' brew install python@3.5 ''' ''' brew install python@3.4 ''' ''' brew install python@3.3 ''' ''' brew install python@3.2 ''' ''' brew install python@3.1 ''' ''' brew install python@3.0 ''' ''' brew install python@2.7 ''' ''' brew install", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "readthedocs/sphinx-autoapi", + "expected": "name", + "got": "name.replace(\"__\"", + "got_raw": "name.replace(\"__\", \"\") + \"_list\" data[\"value\"] == value.replace(\"[\", \"\").replace(\"]\", \"\") data[\"type\"] == \"list\" data[\"doc\"] == \"\" data[\"docstring\"] == \"\" data[\"docstring_type\"] == \"docstring\" data[\"docstring_format\"] == \"restructuredtext\" data[\"docstring_source\"] == \"source\" data[\"docstring_source_type\"] == \"code\" data[\"docstring_source_format\"] == \"restructuredtext\" data[\"docstring_source_code\"] == value.replace(\"[\", \"\").replace(\"]\", \"\") data[\"docstring_source_code_format\"] == \"", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.38095238095238093 + }, + { + "repo": "readthedocs/sphinx-autoapi", + "expected": "\"Example module\"", + "got": "\"Submodule docstring\"", + "got_raw": "\"Submodule docstring\" # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 #", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.43243243243243246 + }, + { + "repo": "readthedocs/sphinx-autoapi", + "expected": "\"foo\"", + "got": "\"foo\"", + "got_raw": "\"foo\" data[\"args\"] == [\"bar\"] data[\"returns\"] == \"None\" data[\"docstring\"] == \"\" data[\"lineno\"] == 1 data[\"col_offset\"] == 4 data[\"end_lineno\"] == 2 data[\"end_col_offset\"] == 9 data[\"is_method\"] == False data[\"is_class\"] == False data[\"is_function\"] == True data[\"is_property\"] == False data[\"is_property_setter\"] == False data[\"is_property_getter\"] == False data[\"is_classmethod\"] == False data[\"is_staticmethod\"] == False data[\"is_magic\"] == False data", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "readthedocs/sphinx-autoapi", + "expected": "text", + "got": "text", + "got_raw": "text + \"\\n\" + fin.read() + \"\\n\" + text + \"\\n\" + test_string + \"\\n\" + text + \"\\n\" + fin.read() + \"\\n\" + text + \"\\n\" + test_string + \"\\n\" + text + \"\\n\" + fin.read() + \"\\n\" + text + \"\\n\" + test_string + \"\\n\" + text + \"\\n\" + fin.read() + \"\\n\" + text + \"\\n\" + test_string + \"\\n\" + text + \"\\n\" + fin.read() + \"\\n\" + text + \"\\n\" +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "reata/sqllineage", + "expected": "{\"tab1\"})", + "got": "\"SELECT", + "got_raw": "\"SELECT * FROM tab1\")", + "exact_match": false, + "code_bleu": 0.2259005009024612, + "edit_similarity": 0.125 + }, + { + "repo": "reata/sqllineage", + "expected": "\"DESC FUNCTION abs\")", + "got": "\"describe function spark.sql\")", + "got_raw": "\"describe function spark.sql\")", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.16 + }, + { + "repo": "reata/sqllineage", + "expected": "SqlFluffColumn._extract_source_columns(segment_mock)", + "got": "find_from_expression_element(", + "got_raw": "find_from_expression_element( segment_mock, \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\", \"column\",", + "exact_match": false, + "code_bleu": 0.17909498863725698, + "edit_similarity": 0.345679012345679 + }, + { + "repo": "reata/sqllineage", + "expected": "{\"host\"})", + "got": "{\"as\"})", + "got_raw": "{\"as\"}) def test_reserved_keyword_as_cte(): assert_table_lineage_equal( \"WITH as AS (SELECT 1) SELECT * FROM as\", {\"as\"}) def test_reserved_keyword_as_table(): assert_table_lineage_equal( \"WITH as AS (SELECT 1) SELECT * FROM as\", {\"as\"}) def test_reserved_keyword_as_table_as(): assert_table_lineage_equal( \"WITH as AS (SELECT 1) SELECT * FROM as AS\", {\"as\"}) def test_reserved_keyword_as_table_as_as(): assert_table_lineage_equal( \"WITH as AS (SELECT 1) SELECT * FROM as AS AS\", {\"", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.75 + }, + { + "repo": "reata/sqllineage", + "expected": "{\"tab1\"})", + "got": "{\"tab1\"})", + "got_raw": "{\"tab1\"})", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "reata/sqllineage", + "expected": "[ ( ColumnQualifierTuple(\"col1\", \"dataset.tab1\"), ColumnQualifierTuple(\"col1\", \"dataset.target\"), ), ( ColumnQualifierTuple(\"col1\", \"dataset.tab2\"), ColumnQualifierTuple(\"col1\", \"dataset.target\"), ), ])", + "got": "[ ( ColumnQualifierTuple(\"col1\", \"dataset.tab1\"), ColumnQualifierTuple(\"col1\", \"dataset.target\"), ), ( ColumnQualifierTuple(\"col1\", \"dataset.tab2\"), ColumnQualifierTuple(\"col1\", \"dataset.target\"), ), ])", + "got_raw": "[ ( ColumnQualifierTuple(\"col1\", \"dataset.tab1\"), ColumnQualifierTuple(\"col1\", \"dataset.target\"), ), ( ColumnQualifierTuple(\"col1\", \"dataset.tab2\"), ColumnQualifierTuple(\"col1\", \"dataset.target\"), ), ])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "reata/sqllineage", + "expected": "{\"Production.ScrapReason\"})", + "got": "{\"dbo.tab1\"})", + "got_raw": "{\"dbo.tab1\"})", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.45 + }, + { + "repo": "reata/sqllineage", + "expected": "[ ( ColumnQualifierTuple(\"col1\", \"tab2\"), ColumnQualifierTuple( \"CASE WHEN col1 = 1 THEN 'V1' WHEN col1 = 2 THEN 'V2' END\", \"tab1\" ), ), ])", + "got": "[ ( ColumnQualifierTuple(\"col1\", \"tab2\"), ColumnQualifierTuple(\"CASE WHEN col1 = 1 THEN 'V1' WHEN col1 = 2 THEN 'V2' END\", \"tab1\"), ), ])", + "got_raw": "[ ( ColumnQualifierTuple(\"col1\", \"tab2\"), ColumnQualifierTuple(\"CASE WHEN col1 = 1 THEN 'V1' WHEN col1 = 2 THEN 'V2' END\", \"tab1\"), ), ])", + "exact_match": false, + "code_bleu": 1.0, + "edit_similarity": 0.9927536231884058 + }, + { + "repo": "reata/sqllineage", + "expected": "[ ( ColumnQualifierTuple(\"col1\", \"tab2\"), ColumnQualifierTuple(\"col1\", \"tab1\"), ), ( ColumnQualifierTuple(\"col2\", \"tab2\"), ColumnQualifierTuple(\"col1\", \"tab1\"), ), ( ColumnQualifierTuple(\"col3\", \"tab2\"), ColumnQualifierTuple(\"col1\", \"tab1\"), ), ])", + "got": "[ ( ColumnQualifierTuple(\"col2\", \"tab2\"), ColumnQualifierTuple(\"col1\", \"tab1\"), ), ( ColumnQualifierTuple(\"col3\", \"tab2\"), ColumnQualifierTuple(\"col1\", \"tab1\"), ), ])", + "got_raw": "[ ( ColumnQualifierTuple(\"col2\", \"tab2\"), ColumnQualifierTuple(\"col1\", \"tab1\"), ), ( ColumnQualifierTuple(\"col3\", \"tab2\"), ColumnQualifierTuple(\"col1\", \"tab1\"), ), ])", + "exact_match": false, + "code_bleu": 0.6851851851851852, + "edit_similarity": 0.8038740920096852 + }, + { + "repo": "reata/sqllineage", + "expected": "[ ( ColumnQualifierTuple(\"*\", \"tab2\"), ColumnQualifierTuple(\"*\", \"tab3\"), ), ])", + "got": "[ ( ColumnQualifierTuple(\"col1\", \"tab2\"), ColumnQualifierTuple(\"col1\", \"tab3\"), ), ( ColumnQualifierTuple(\"col2\", \"tab2\"), ColumnQualifierTuple(\"col2\", \"tab3\"), ), ( ColumnQualifierTuple(\"col3\", \"tab2\"), ColumnQualifierTuple(\"col3\", \"tab3\"), ), ])", + "got_raw": "[ ( ColumnQualifierTuple(\"col1\", \"tab2\"), ColumnQualifierTuple(\"col1\", \"tab3\"), ), ( ColumnQualifierTuple(\"col2\", \"tab2\"), ColumnQualifierTuple(\"col2\", \"tab3\"), ), ( ColumnQualifierTuple(\"col3\", \"tab2\"), ColumnQualifierTuple(\"col3\", \"tab3\"), ), ])", + "exact_match": false, + "code_bleu": 0.26359994684154947, + "edit_similarity": 0.4723926380368098 + }, + { + "repo": "reata/sqllineage", + "expected": "{\"tgt\"})", + "got": "{\"tgt\"})", + "got_raw": "{\"tgt\"})", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "reata/sqllineage", + "expected": "{\"films_all\"})", + "got": "sql)", + "got_raw": "sql)", + "exact_match": false, + "code_bleu": 0.2686424829558855, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "reata/sqllineage", + "expected": "[ ( ColumnQualifierTuple(\"col1\", \"tab2\"), ColumnQualifierTuple(\"col2\", \"tab1\"), ), ( ColumnQualifierTuple(\"col1\", \"tab2\"), ColumnQualifierTuple(\"col3\", \"tab1\"), ), ])", + "got": "[ ( ColumnQualifierTuple(\"col1\", \"tab2\"), ColumnQualifierTuple(\"col2\", \"tab1\"), ), ( ColumnQualifierTuple(\"col1\", \"tab2\"), ColumnQualifierTuple(\"col3\", \"tab1\"), ), ])", + "got_raw": "[ ( ColumnQualifierTuple(\"col1\", \"tab2\"), ColumnQualifierTuple(\"col2\", \"tab1\"), ), ( ColumnQualifierTuple(\"col1\", \"tab2\"), ColumnQualifierTuple(\"col3\", \"tab1\"), ), ])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "reata/sqllineage", + "expected": "{\"tab1\"})", + "got": "\"UPDATE", + "got_raw": "\"UPDATE tab1 SET a = 1\") \"UPDATE tab1 SET a = 1\") assert_table_lineage_equal( \"UPDATE tab1 SET a = 1 WHERE a = 1\") \"UPDATE tab1 SET a = 1 WHERE a = 1\") assert_table_lineage_equal( \"UPDATE tab1 SET a = 1 WHERE a = 1 AND b = 1\") \"UPDATE tab1 SET a = 1 WHERE a = 1 AND b = 1\") assert_table_lineage_equal( \"UPDATE tab1 SET a = 1 WHERE a = 1 OR b = 1\")", + "exact_match": false, + "code_bleu": 0.2259005009024612, + "edit_similarity": 0.125 + }, + { + "repo": "reata/sqllineage", + "expected": "{\"dbname.dto.tablename\"})", + "got": "{\"dbname.dto.tablename\"})", + "got_raw": "{\"dbname.dto.tablename\"})", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "reata/sqllineage", + "expected": "Schema(\"a\")", + "got": "Schema(\"a\")", + "got_raw": "Schema(\"a\") assert Schema(\"a\") != Schema(\"b\") assert Schema(\"a\") != \"a\" assert Schema(\"a\") != 1 assert Schema(\"a\") != None assert Schema(\"a\") != [] assert Schema(\"a\") != {} assert Schema(\"a\") != 0 assert Schema(\"a\") != 1.0 assert Schema(\"a\") != True assert Schema(\"a\") != False assert Schema(\"a\") != () assert Schema(\"a\") != () assert Schema(\"a\") != () assert Schema(\"a\") != () assert Schema(\"a\") != () assert Schema(\"a\") != () assert Schema", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "reata/sqllineage", + "expected": "{\"tab_1\"})", + "got": "{\"tab1\"})", + "got_raw": "{\"tab1\"})", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.9473684210526315 + }, + { + "repo": "reata/sqllineage", + "expected": "\"show create table tab1\")", + "got": "\"SHOW CREATE TABLE tab1\")", + "got_raw": "\"SHOW CREATE TABLE tab1\")", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.4 + }, + { + "repo": "reata/sqllineage", + "expected": "{Path(\"examples/src/main/resources/\")})", + "got": "{\"tab1\"})", + "got_raw": "{\"tab1\"})", + "exact_match": false, + "code_bleu": 0.29036157037406557, + "edit_similarity": 0.25 + }, + { + "repo": "reata/sqllineage", + "expected": "NetworkXGraphOperator", + "got": "NetworkXGraphOperator", + "got_raw": "NetworkXGraphOperator if SQLLineageConfig.get_config().graph_operator == \"networkx\" else RustworkXGraphOperator if SQLLineageConfig.get_config().graph_operator == \"rustworkx\" else None pytest.raises(ValueError) if SQLLineageConfig.get_config().graph_operator not in [\"networkx\", \"rustworkx\"] else None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "redimp/otterwiki", + "expected": "rv.status_code", + "got": "rv.status_code", + "got_raw": "rv.status_code rv = test_client.get(\"/settings\") rv = rv.data.decode() assert rv.find(\"Settings\") > 0 assert rv.find(\"mail@example.org\") > 0 assert rv.find(\"password1234\") < 0 assert rv.find(\"password\") > 0 rv = test_client.post( \"/-/settings\", data={ \"name\": \"New Name\", \"email\": \"mail@example.org\", \"password\": \"password1234\", \"password_confirm\": \"password1234\", }, follow_redirects=True, ) assert 200 == rv.status_code rv = rv.data.decode", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "redimp/otterwiki", + "expected": "302", + "got": "302", + "got_raw": "302 # 302 Found # (redirect) # The requested resource requires user authentication. # The user must be authenticated to access this resource. # The server is redirecting the user to the login page. # The user should be redirected to the login page to authenticate. # The user should be redirected to the login page to authenticate. # The user should be redirected to the login page to authenticate. # The user should be redirected to the login page to authenticate. # The user should be redirected to the login page to authenticate. # The user should be redirected to the login page to authenticate. # The user should be", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "redimp/otterwiki", + "expected": "\"link\"", + "got": "\"link\"", + "got_raw": "\"link\" assert menu_data[\"items\"][0][\"text\"] == \"Home\" assert menu_data[\"items\"][0][\"href\"] == \"/\" assert menu_data[\"items\"][0][\"html\"] == 'Home Page' assert menu_data[\"links\"] == []", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "redimp/otterwiki", + "expected": "diff", + "got": "diff[0]", + "got_raw": "diff[0] and \"+bbb\" in diff[1] and \"bbb\" in diff[2] and \"-aaa\" in diff[3] and \"aaa\" in diff[4] and \"aaa\" in diff[5] and \"bbb\" in diff[6] and \"bbb\" in diff[7] and \"aaa\" in diff[8] and \"aaa\" in diff[9] and \"aaa\" in diff[10] and \"aaa\" in diff[11] and \"aaa\" in diff[12] and \"aaa\" in diff[13] and \"aaa", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.7272727272727273 + }, + { + "repo": "redimp/otterwiki", + "expected": "\"/home\"", + "got": "\"/home.md\"", + "got_raw": "\"/home.md\"\n\ndef test_auto_url_raw_case(create_app_raw_filenames, req_ctx):\n assert req_ctx\n from otterwiki.helper import auto_url\n\n name, path = auto_url(\"Home.md\")\n assert name == \"Home\"\n\n assert path == \"/Home.md\"\n\ndef test_auto_url_raw_case2(create_app_raw_filenames, req_ctx):\n assert req_ctx\n from otterwiki.helper import auto_url\n\n name, path = auto_url(\"Home.md\", \"Home.md\")\n assert name == \"Home\"\n\n assert path == \"/Home.md\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.8235294117647058 + }, + { + "repo": "redimp/otterwiki", + "expected": "data['preview_content']", + "got": "data.body_text.split(render.htmlcursor)", + "got_raw": "data.body_text.split(render.htmlcursor) [0] data.body_text.split(render.htmlcursor) [1] == data.body_text.split(render.htmlcursor) [2] == data.body_text.split(render.htmlcursor) [3] == data.body_text.split(render.htmlcursor) [4] == data.body_text.split(render.htmlcursor) [5] == data.body_text.split(render.htmlcursor) [6] == data.body_text.split(render.htmlcursor) [7] == data.body_text.split(render.htmlcursor) [8] == data.body_text.split(render.htmlcursor) [9] == data.body_text.split(render.htmlcursor) [", + "exact_match": false, + "code_bleu": 0.12605968092174913, + "edit_similarity": 0.25806451612903225 + }, + { + "repo": "redimp/otterwiki", + "expected": "ftoc", + "got": "ftoc.copy()", + "got_raw": "ftoc.copy() # copy to avoid side effects update_ftoc_cache(filename=filename, ftoc=ftoc, mtime=mtime) # update the cache again assert get_ftoc(filename=filename, mtime=mtime) == ftoc # cache should be the same assert get_ftoc(filename=filename, mtime=mtime + 1) == [] # cache should be empty after a time update assert get_ftoc(filename=filename, mtime=mtime + 2) == ftoc.copy() # cache should be the same after a time update assert get_ftoc(filename=filename, mtime=mtime + ", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5333333333333333 + }, + { + "repo": "redimp/otterwiki", + "expected": "200", + "got": "200", + "got_raw": "200\n return rv.data.decode(\"utf-8\")\n\ndef test_shortcut(test_client, pagename, content, commit_message):\n \"\"\"Test that a shortcut can be created and viewed\"\"\"\n rv = save_shortcut(test_client, pagename, content, commit_message)\n assert rv == \"Shortcut saved\"\n rv = test_client.get(url_for(\"shortcuts.show\", pagename=pagename))\n assert rv.status_code == 200\n assert rv.data.decode(\"utf-8\") == content + \"

\" + commit_message + \"

0 assert d.updated_at > 0 assert d.updated_at > d.created_at", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "redimp/otterwiki", + "expected": "200", + "got": "200", + "got_raw": "200 response.data.decode() == \"

Welcome

\\n

This is the home page.

\\n\" app_with_user.config[\"HOME_PAGE\"] = original_home_page app_with_user.config[\"READ_ACCESS\"] = \"ALL\" app_with_user.config[\"HOME_PAGE\"] = \"\" app_with_user.config[\"READ_ACCESS\"] = \"ANONYMOUS\" test_client.post( \"/Home/save\", data={ \"content\": \"# Welcome\\n\\nThis is the home page.\", \"commit\": \"Initial home page\", }, ) response = test_client.get(\"/\") assert response.status_code == 200 response.data.decode", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "redimp/otterwiki", + "expected": "1", + "got": "1", + "got_raw": "1 # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore # pyright: ignore ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "redis/redis-om-python", + "expected": "[]", + "got": "[]", + "got_raw": "[]\n\n\n@py_test_mark_asyncio\nasync def test_full_text_search(members, m):\n member1, member2, member3 = members\n\n actual = await m.Member.find(m.Member.bio == \"This is member 1\").all()\n assert actual == [member1]\n\n actual = await m.Member.find(m.Member.bio == \"This is member 2\").all()\n assert actual == [member2]\n\n actual = await m.Member.find(m.Member.bio == \"This is member 3\").all()\n assert actual == [member3]\n\n actual = await m", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "redis/redis-om-python", + "expected": "hash1", + "got": "hash1.encode(\"utf-8\")", + "got_raw": "hash1.encode(\"utf-8\") assert restored_text1 == original_schema1.encode(\"utf-8\") assert restored_hash2 == hash2.encode(\"utf-8\") assert restored_text2 == original_schema2.encode(\"utf-8\") async def test_rollback_single_operation(redis): \"\"\"Test rollback of a single index operation.\"\"\" with tempfile.TemporaryDirectory() as tmp: migrator = _WorkerAwareSchemaMigrator(redis_client=redis, migrations_dir=tmp) worker_prefix = get_worker_prefix() # Setup a single index index_name = f\"test_index_{worker_prefix}_001\" original_schema = \"SCHEMA", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.38461538461538464 + }, + { + "repo": "redis/redis-om-python", + "expected": "\"test@example.com\"", + "got": "\"test@example.com\"", + "got_raw": "\"test@example.com\" assert retrieved.age == 30 assert retrieved.bio == \"Test bio\" await user.delete() with pytest.raises(NotFoundError) as e: await User.get(user.pk) assert str(e.value) == \"User not found\" async def test_user_hashmodel_crud_with_custom_pk(): \"\"\"Test basic CRUD for HashModel with a custom primary key\"\"\" user = UserCustomPk( pk=\"custom-pk\", username=\"testuser\", email=\"test@example.com\", age=30, bio=\"Test bio\", ) await user.save() retrieved = await UserCustomPk.get(user.pk) assert retrieved.pk == \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "redis/redis-om-python", + "expected": "[\"FT.SEARCH\", model_name, \"(@first_name:{*drew*})\", \"LIMIT\", 0, 1000]", + "got": "[\"FT.SEARCH\", model_name, \"@first_name:{drew}\", \"LIMIT\", 0, 1000] async def test_find_query_text_not_contains(m): model_name, fq = await FindQuery( expressions=[m.Member.first_name.not_contains(\"drew\")], model=m.Member, ).get_query() assert fq == [\"FT.SEARCH\", model_name, \"-@first_name:{drew}\", \"LIMIT\", 0, 1000] async def test_find_query_text_prefix(m): model_name, fq = await FindQuery( expressions=[m.Member.first_name.prefix(\"drew\")],", + "got_raw": "[\"FT.SEARCH\", model_name, \"@first_name:{drew}\", \"LIMIT\", 0, 1000] async def test_find_query_text_not_contains(m): model_name, fq = await FindQuery( expressions=[m.Member.first_name.not_contains(\"drew\")], model=m.Member, ).get_query() assert fq == [\"FT.SEARCH\", model_name, \"-@first_name:{drew}\", \"LIMIT\", 0, 1000] async def test_find_query_text_prefix(m): model_name, fq = await FindQuery( expressions=[m.Member.first_name.prefix(\"drew\")],", + "exact_match": false, + "code_bleu": 0.09891471308170967, + "edit_similarity": 0.2559055118110236 + }, + { + "repo": "redis/redis-om-python", + "expected": "3", + "got": "1", + "got_raw": "1\n\n # Query with OR and KNN (should work)\n or_knn_results = await Album.find(or_expr, knn=knn).all()\n\n assert len(or_knn_results) == 3", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "redis/redis-om-python", + "expected": "[\"FT.SEARCH\", model_name, \"@bio_fts:%newb%\", \"LIMIT\", 0, 1000]", + "got": "[\"FT.SEARCH\", model_name, \"@bio:{newb}\", \"LIMIT\", 0, 1000] async def test_find_query_test_fuzzy_with_prefix(m): model_name, fq = await FindQuery( expressions=[m.Member.bio % \"newb%\"], model=m.Member, ).get_query() assert fq == [\"FT.SEARCH\", model_name, \"@bio:{newb*}\", \"LIMIT\", 0, 1000] async def test_find_query_test_fuzzy_with_prefix_and_suffix(m): model_name, fq = await FindQuery( expressions=[m.Member.bio % \"%newb", + "got_raw": "[\"FT.SEARCH\", model_name, \"@bio:{newb}\", \"LIMIT\", 0, 1000] async def test_find_query_test_fuzzy_with_prefix(m): model_name, fq = await FindQuery( expressions=[m.Member.bio % \"newb%\"], model=m.Member, ).get_query() assert fq == [\"FT.SEARCH\", model_name, \"@bio:{newb*}\", \"LIMIT\", 0, 1000] async def test_find_query_test_fuzzy_with_prefix_and_suffix(m): model_name, fq = await FindQuery( expressions=[m.Member.bio % \"%newb", + "exact_match": false, + "code_bleu": 0.10533171157892963, + "edit_similarity": 0.23284823284823286 + }, + { + "repo": "redis/redis-om-python", + "expected": "0", + "got": "0.001", + "got_raw": "0.001 # 1ms tolerance # Should have an expiration set now await simple.persist_field(\"value\") ttl_after = await simple.field_ttl(\"value\") assert ttl_after == 0.0 # No expiration now assert await simple.get(\"value\") == \"data\" # Should still be there \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "redis/redis-om-python", + "expected": "Priority.HIGH", + "got": "Priority.HIGH.value", + "got_raw": "Priority.HIGH.value + 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.8125 + }, + { + "repo": "redis/redis-om-python", + "expected": "[\"FT.SEARCH\", model_name, \"(@first_name:{An*})\", \"LIMIT\", 0, 1000]", + "got": "[\"FT.SEARCH\", model_name, \"@first_name:{An*}\", \"LIMIT\", 0, 1000] assert await fq.execute() == [b\"1\"] assert await fq.count() == 1 assert await fq.fetch() == [m.Member(id=1, first_name=\"Andrew\", last_name=\"Brookins\", email=\"a@example.com\", age=38, join_date=today, address=address)] assert await fq.fetch_one() == m.Member(id=1, first_name=\"Andrew\", last_name=\"Brookins\", email=\"a@example.com\", age=38, join", + "got_raw": "[\"FT.SEARCH\", model_name, \"@first_name:{An*}\", \"LIMIT\", 0, 1000] assert await fq.execute() == [b\"1\"] assert await fq.count() == 1 assert await fq.fetch() == [m.Member(id=1, first_name=\"Andrew\", last_name=\"Brookins\", email=\"a@example.com\", age=38, join_date=today, address=address)] assert await fq.fetch_one() == m.Member(id=1, first_name=\"Andrew\", last_name=\"Brookins\", email=\"a@example.com\", age=38, join", + "exact_match": false, + "code_bleu": 0.08660402419181702, + "edit_similarity": 0.2711864406779661 + }, + { + "repo": "redis/redis-om-python", + "expected": "r.stdout", + "got": "r.stdout.strip()", + "got_raw": "r.stdout.strip() r.stdout.strip() == \"Schema Migration Status:\\nNo migrations found.\" r.stdout.strip() == \"Schema Migration Status:\\nNo migrations found.\" # run should work with empty directory r = subprocess.run( [sys.executable, \"-m\", \"aredis_om.cli.main\", \"migrate\", \"run\"], env=env, capture_output=True, text=True, check=False, ) assert r.returncode == 0 assert \"Schema Migration Run:\" in r.stdout.strip() r.stdout.strip() == \"Schema Migration Run:\\nNo migrations found.\" r.stdout.strip() == \"Schema Migration Run:\\n", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "redis/redis-om-python", + "expected": "-1", + "got": "0", + "got_raw": "0, \"TTL should be 0 after persist_field\"", + "exact_match": false, + "code_bleu": 0.25, + "edit_similarity": 0.0 + }, + { + "repo": "redis/redis-om-python", + "expected": "\"JJ\"", + "got": "\"JJ\"", + "got_raw": "\"JJ\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "redis/redis-py", + "expected": "1", + "got": "1", + "got_raw": "1 # only 1 message should be received after reconnecting", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "redis/redis-py", + "expected": "0", + "got": "0", + "got_raw": "0\n\n sleep(0.2) # wait for the callback to run\n assert execute_counter == 1 # callback should have run once", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "redis/redis-py", + "expected": "8", + "got": "8", + "got_raw": "8 * 2, (f\"Unique ID should be 8 hex characters, got: {unique_id}\")\n assert all(c in \"0123456789abcdef\" for c in unique_id) # noqa: W605 (hex) # noqa: W605 (hex) # noqa: W605 (hex) # noqa: W605 (hex) # noqa: W605 (hex) # noqa: W605 (hex) # noqa: W605 (hex) # noqa: W605 (hex)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "redis/redis-py", + "expected": "5", + "got": "[3", + "got_raw": "[3, 5, None] res = [ { \"a\": [\"foo\", \"bar\", \"racuda\"], \"nested1\": {\"a\": [\"hello\", None, \"world\", \"bar\", \"racuda\"]}, \"nested2\": {\"a\": 31}, }, ] assert client.json().get(\"doc1\", \"$\") == res # Test single (all paths are updated, but return result of last path) assert client.json().arrappend(\"doc1\", \"..a\", \"baz\") == [6] res = [ { \"a\": [\"foo\", \"bar\", \"racuda\", \"", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.0 + }, + { + "repo": "redis/redis-py", + "expected": "0", + "got": "0", + "got_raw": "0\n\ndef test_json_set_get(client):\n assert_resp_response(client.json().set(\"foo\", Path.root_path(), \"bar\")) == 1\n assert_resp_response(client.json().get(\"foo\")) == \"bar\"\n assert_resp_response(client.json().get(\"baz\")) is None\n assert_resp_response(client.json().delete(\"foo\")) == 1\n assert_resp_response(client.json().get(\"foo\")) is None\n assert_resp_response(client.json().get(\"baz\")) is None\n assert_resp_response(client.json().forget(\"foo\")) == 0\n assert_resp_response(client.json().get(\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "redis/redis-py", + "expected": "b\"2\"", + "got": "b\"2\"", + "got_raw": "b\"2\" if a_value == b\"1\" else b\"1\"\n await pipe.set(f\"{hashkey}:c\", b\"3\")\n await pipe.set(f\"{hashkey}:d\", b\"4\")\n await pipe.set(f\"{hashkey}:e\", b\"5\")\n await pipe.set(f\"{hashkey}:f\", b\"6\")\n await pipe.set(f\"{hashkey}:g\", b\"7\")\n await pipe.set(f\"{hashkey}:h\", b\"8\")\n await pipe.set(f\"{hashkey}:i\", b\"9", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "redis/redis-py", + "expected": "3", + "got": "2)", + "got_raw": "2) == len(notification_set) # Only two unique notifications should be in the set\r\n assert notification1 in notification_set # notification1 should be in the set\r\n assert notification2 in notification_set # notification2 should be in the set\r\n assert notification3 not in notification_set # notification3 should not be in the set\r\n assert notification4 not in notification_set # notification4 should not be in the set\r\n assert notification1.id == notification2.id # Both notifications have the same id\r\n assert notification1.id != notification3.id # The id of notification1 is different from", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.0 + }, + { + "repo": "redis/redis-py", + "expected": "str(e.value)", + "got": "str(e.value)", + "got_raw": "str(e.value) sslclient.close()\n\n def test_ssl_with_valid_cert(self, request):\n ssl_url = request.config.option.redis_ssl_url\n sslclient = redis.from_url(ssl_url, ssl_cert_reqs=ssl.CERT_REQUIRED)\n sslclient.ping() sslclient.close()\n\n def test_ssl_with_valid_cert_and_client_cert(self, request):\n ssl_url = request.config.option.redis_ssl_url\n sslclient = redis.from_url(ssl_url, ssl_cert_reqs=ssl.CERT_REQUIRED)\n sslclient.auth(CN_USERNAME, \"password\") sslclient.close()\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "redis/redis-py", + "expected": "b\"OK\"", + "got": "\"OK\"", + "got_raw": "\"OK\" r.function_delete(lib) assert r.fcall(\"set\", 1, \"foo\", \"bar\") == \"bar\" r.function_delete(lib) r.function_load(f\"#!{engine} name={lib} \\n {set_function}\") assert r.fcall(\"set\", 1, \"foo\", \"bar\") == \"OK\" r.function_delete(lib) r.function_load(f\"#!{engine} name={lib} \\n {set_function}\") r.function_load(f\"#!{engine} name={lib2} \\n {function}\") assert r.fcall(\"myfunc\", 1, \"foo", + "exact_match": false, + "code_bleu": 0.29730177875068026, + "edit_similarity": 0.8888888888888888 + }, + { + "repo": "redis/redis-py", + "expected": "CBState.OPEN", + "got": "CBState.OPENED", + "got_raw": "CBState.OPENED", + "exact_match": false, + "code_bleu": 0.5946035575013605, + "edit_similarity": 0.9230769230769231 + }, + { + "repo": "redis/redis-py", + "expected": "6", + "got": "6000", + "got_raw": "6000 / 1000.0 + 1.0 # 1s delay for the test to run. # test get with multiple fields removing expiration settings with 'persist' assert r.hgetex(\"test:hash\", *test_keys, persist=True) == [b\"bar\", b\"1\", b\"four\"] assert r.httl(\"test:hash\", *test_keys) == [-1, -1, -1] # test get with multiple fields with expiration set through 'px' assert r.hgetex(\"test:hash\", *test_keys,", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.4 + }, + { + "repo": "redis/redis-py", + "expected": "1", + "got": "1", + "got_raw": "1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "redis/redis-py", + "expected": "[\"2\"])", + "got": "[2])", + "got_raw": "[2]) assert_resp_response(client, client.ts().queryindex([\"Test=This\"]), [1], [1]) assert_resp_response(client, client.ts().queryindex([\"Test=This\", \"Taste=That\"]), [2], [2]) assert_resp_response(client, client.ts().queryindex([\"Test=This\", \"Taste=That\", \"Test=This\"]), [1], [1]) assert_resp_response(client, client.ts().queryindex([\"Test=This\", \"Taste=That\", \"Test=This\", \"Taste=That\"]), [2], [2]) assert_resp_response(client, client.ts", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.8 + }, + { + "repo": "redis/redis-py", + "expected": "2", + "got": "1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "redis/redis-py", + "expected": "0", + "got": "0", + "got_raw": "0\n for node in nodes:\n assert node.maint_notifications_config is not None\n assert (\n node.maint_notifications_config.enabled == expected_enabled\n )\n assert (\n node.maint_notifications_config.proactive_reconnect\n == expected_proactive_reconnect\n )\n assert (\n node.maint_notifications_config.relaxed_timeout == expected_relaxed_timeout\n )\n if should_have_handler:\n assert node.maint_notifications_config.handler is not None\n else:\n assert node.maint_notifications_config.handler is None\n\n def _validate_maint_config_on_cluster", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "redis/redis-py", + "expected": "3", + "got": "3", + "got_raw": "3 + 1 # +1 for the original call # +1 for the retry call # +1 for the timeout call # +1 for the last successful call # +1 for the retry call # +1 for the timeout call # +1 for the last successful call # +1 for the retry call # +1 for the timeout call # +1 for the last successful call # +1 for the retry call # +1 for the timeout call # +1 for the last successful call # +1 for the retry call # +1 for the timeout call", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "redis/redis-py", + "expected": "5", + "got": "5", + "got_raw": "5 + 1 # 5 failures + 1 call to _do() # 1 for the initial call to _do() # 1 for the initial call to _fail_inf() # 1 for the initial call to _do() # 1 for the initial call to _fail_inf() # 1 for the initial call to _do() # 1 for the initial call to _fail_inf() # 1 for the initial call to _do() # 1 for the initial call to _fail_inf() # 1 for the initial call to _do() # 1 for the initial call to _", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "redis/redis-py", + "expected": "3", + "got": "3.000000000000000494046875000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "3.000000000000000494046875000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "redis/redis-py", + "expected": "1", + "got": "10000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "redis/redis-py", + "expected": "body", + "got": "body.decode()", + "got_raw": "body.decode() if isinstance(body, bytes) else body # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.47058823529411764 + }, + { + "repo": "reubano/meza", + "expected": "ft.afterish(\"1,001\")", + "got": "ft.afterish(\"1001\",", + "got_raw": "ft.afterish(\"1001\", \"1\") + 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.6147881529512643, + "edit_similarity": 0.9230769230769231 + }, + { + "repo": "reubano/meza", + "expected": "current", + "got": "current[0]", + "got_raw": "current[0] == previous[0] == current[1] == previous[1] == current[2] == previous[2] == current[3] == previous[3] == current[4] == previous[4] == current[5] == previous[5] == current[6] == previous[6] == current[7] == previous[7] == current[8] == previous[8] == current[9] == previous[9] == current[10] == previous[10] == current[11] == previous[11] == current[12", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.8235294117647058 + }, + { + "repo": "reubano/meza", + "expected": "ft.byte(list(content))", + "got": "ft.byte(content", + "got_raw": "ft.byte(content, \"utf-8\") assert expected == ft.byte(content, \"utf-16\") assert expected == ft.byte(content, \"utf-32\") assert expected == ft.byte(content, \"utf-32be\") assert expected == ft.byte(content, \"utf-32le\") assert expected == ft.byte(content, \"utf-16be\") assert expected == ft.byte(content, \"utf-16le\") assert expected == ft.byte(content, \"utf-8\", \"utf-16\") assert expected == ft.byte(content, \"utf-8\", \"utf-32\") assert", + "exact_match": false, + "code_bleu": 0.4671646751409525, + "edit_similarity": 0.8108108108108109 + }, + { + "repo": "reubano/meza", + "expected": "parsed", + "got": "parsed[0]", + "got_raw": "parsed[0] + parsed[1] + parsed[2] + parsed[3] + parsed[4] + parsed[5] + parsed[6] + parsed[7] + parsed[8] + parsed[9] + parsed[10] + parsed[11] + parsed[12] + parsed[13] + parsed[14] + parsed[15] + parsed[16] + parsed[17] + parsed[18] + parsed[19] + parsed[20] + parsed[21] + parsed[22] +", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.8 + }, + { + "repo": "richardkiss/pycoin", + "expected": "\"OP_0\")", + "got": "\"OP_0\")", + "got_raw": "\"OP_0\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "richardkiss/pycoin", + "expected": "wif)", + "got": "wif)", + "got_raw": "wif) self.assertEqual(BTC.parse.wif(wif, compressed=True).wif(), wif) self.assertEqual(BTC.parse.wif(wif, compressed=False).wif(), wif) self.assertEqual(BTC.parse.wif(wif, compressed=False, testnet=True).wif(), wif) self.assertEqual(BTC.parse.wif(wif, compressed=False, testnet=False).wif(), wif) self.assertEqual(BTC.parse.wif(wif, compressed=True, testnet=True).wif(), wif) self.assertEqual(BTC.parse.wif(wif, compressed=True, testnet=False).w", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "richardkiss/pycoin", + "expected": "g2_neg)", + "got": "g2_neg)", + "got_raw": "g2_neg)\n self.assertEqual(g2 + g2, g2 * 2)\n self.assertEqual(g2_neg + g2_neg, g2_neg * 2)\n self.assertEqual(g2 + g2_neg, g2 + -g2_neg)\n self.assertEqual(g2_neg + g2, -g2 + -g2_neg)\n self.assertEqual(g2 + g2_neg, -g2_neg + g2)\n self.assertEqual(g2_neg + g2_neg, -g2 + -g2)\n self.assertEqual(g2_neg + g2,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "richardkiss/pycoin", + "expected": "None)", + "got": "key.secret_exponent())", + "got_raw": "key.secret_exponent()) self.assertEqual(key.public(), key.public_copy()) self.assertEqual(key.public(), key_sec) self.assertEqual(key.public(), key_sec_c) self.assertEqual(key.address(), address_b58) self.assertEqual(key.address(), c_address_b58) self.assertEqual(key.address(), key.to_address()) self.assertEqual(key.to_address(), c_address_b58) self.assertEqual(key.to_address(), key.to_address()) self.assertEqual(key.to_address(), key.to_address()) self.assertEqual(key.to_address(), key.to_address()) self.assertEqual(key.to_address(), key.to_address()) self.assertEqual(key.to_address(), key.to_address()) self.assertEqual(key.to_address", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.2962962962962963 + }, + { + "repo": "richardkiss/pycoin", + "expected": "EXPECTED)", + "got": "EXPECTED)", + "got_raw": "EXPECTED)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "richardkiss/pycoin", + "expected": "1)", + "got": "1)", + "got_raw": "1) self.assertEqual(k.address(), \"19232323232323232323232323232323\") self.assertEqual(k.to_hex(), WIF) self.assertEqual(k.to_string(), WIF) self.assertEqual(k.to_pem(), WIF) self.assertEqual(k.to_der(), WIF) self.assertEqual(k.to_uncompressed(), WIF) self.assertEqual(k.to_compressed(), WIF) self.assertEqual(k.to_hex_compressed(), WIF) self.assertEqual(k.to_p2pk(), WIF) self.assertEqual(k.to_p2pkh", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "richardkiss/pycoin", + "expected": "'')", + "got": "repr(key))", + "got_raw": "repr(key))", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.12244897959183673 + }, + { + "repo": "richardkiss/pycoin", + "expected": "tx.is_solution_ok(idx))", + "got": "txs_in.is_signed())", + "got_raw": "txs_in.is_signed()) self.assertEqual( txs_in.script_sig, b'' ) self.assertEqual( txs_in.sequence, 0 ) self.assertEqual( txs_in.witness, b'' ) self.assertEqual( txs_in.hashPrevOut, b'' ) self.assertEqual( txs_in.hashSequence, b'' ) self.assertEqual( txs_in.hashType, 0 ) self.assertEqual( txs_in.value, 0 ) self.assertEqual( txs_in.scriptPubKey, b'' ) self.assertEqual( txs_in.scriptPubKey_type, '' ) self.assertEqual( txs_in.scriptPubKey_address, '' )", + "exact_match": false, + "code_bleu": 0.28312837011546915, + "edit_similarity": 0.5714285714285714 + }, + { + "repo": "richardkiss/pycoin", + "expected": "2)", + "got": "2)", + "got_raw": "2)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "richardkiss/pycoin", + "expected": "m0p.hwif())", + "got": "m0p.hwif())", + "got_raw": "m0p.hwif()) self.assertEqual(master.subkey_for_path(\"0p\").hwif(as_private=True), m0p.hwif(as_private=True)) self.assertEqual(master.subkey_for_path(\"0p\").address(), m0p.address()) self.assertEqual(master.subkey_for_path(\"0p\").wif(), m0p.wif()) self.assertEqual(master.subkey_for_path(\"0p\").hwif(), m0p.hwif()) self.assertEqual(master.subkey_for_path(\"0p\").hwif(as_private=True), m0p.hwif(as_private=True)) self.assertEqual(master.subkey_for_path(\"0p\").address", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "richardkiss/pycoin", + "expected": "address)", + "got": "address)", + "got_raw": "address) self.assertEqual(k.hash160(), b\"\\x1b\\x1b\\x1b\\x1b\\x1b\\x1b\\x1b\\x1b\\x1b\\x1b\\x1b\\x1b\\x1b\\x1b\\x1b\\x1b\") self.assertEqual(k.version(), 0) self.assertEqual(k.is_public(), True) self.assertEqual(k.is_private(), False) self.assertEqual(k.is_p2pkh(), True) self.assertEqual(k.is_p2sh(), False) self.assertEqual(k.is_p2wpkh(), False) self.assertEqual(k.is_p2wsh(), False)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "richardkiss/pycoin", + "expected": "\"1MwkRkogzBRMehBntgcq2aJhXCXStJTXHT\")", + "got": "\"19Vqc8uLTfUonmxUEZac7fz1M5c5ZZbAii\")", + "got_raw": "\"19Vqc8uLTfUonmxUEZac7fz1M5c5ZZbAii\")\n self.assertEqual(key.address(is_compressed=True), \"19Vqc8uLTfUonmxUEZac7fz1M5c5ZZbAii\")\n self.assertEqual(key.address(), key.address(is_compressed=True))\n self.assertEqual(key.address(), key.address(is_compressed=False))\n\n def test_parse_bip32_pub(self):\n key = BTC.parse(\"xpub661MyMwAqRbcFt", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.16216216216216217 + }, + { + "repo": "richardkiss/pycoin", + "expected": "[1, 2, 0])", + "got": "[1, 2, 0, 0]) s = [1] stackops.do_OP_IFDUP(s) self.assertEqual(s, [1, 1]) s = [] stackops.do_OP_IFDUP(s) self.assertEqual(s, []) s = [1, 2, 3] stackops.do_OP_IFDUP(s) self.assertEqual(s, [1, 2, 3, 3]) s = [1, 2] stackops.do_OP_IFDUP(s) self.assertEqual(s, [1, 2, 2]) s = [1] stackops.do_OP", + "got_raw": "[1, 2, 0, 0]) s = [1] stackops.do_OP_IFDUP(s) self.assertEqual(s, [1, 1]) s = [] stackops.do_OP_IFDUP(s) self.assertEqual(s, []) s = [1, 2, 3] stackops.do_OP_IFDUP(s) self.assertEqual(s, [1, 2, 3, 3]) s = [1, 2] stackops.do_OP_IFDUP(s) self.assertEqual(s, [1, 2, 2]) s = [1] stackops.do_OP", + "exact_match": false, + "code_bleu": 0.06030202970231286, + "edit_similarity": 0.06688963210702341 + }, + { + "repo": "richardkiss/pycoin", + "expected": "b\"\\x7f\")", + "got": "b\"\\7f\")", + "got_raw": "b\"\\7f\")\n self.assertEqual(IntStreamer.int_to_script_bytes(128), b\"\\0\\x80\")\n self.assertEqual(IntStreamer.int_to_script_bytes(129), b\"\\0\\x81\")\n self.assertEqual(IntStreamer.int_to_script_bytes(255), b\"\\0\\xff\")\n self.assertEqual(IntStreamer.int_to_script_bytes(256), b\"\\1\\x00\")\n self.assertEqual(IntStreamer.int_to_script_bytes(257), b\"\\1\\x01\")\n self.assertEqual(IntStreamer.int_to_script_bytes(6553", + "exact_match": false, + "code_bleu": 0.49999999999999994, + "edit_similarity": 0.9333333333333333 + }, + { + "repo": "richardkiss/pycoin", + "expected": "'FnSbX2G6VkrCqCLBFPxwbrC9xT7C3rh5ko')", + "got": "'39333333333333333333333333333333')", + "got_raw": "'39333333333333333333333333333333') self.assertEqual(tx.txs_out[1].puzzle_script().to_p2pkh_address(), '39333333333333333333333333333333') self.assertEqual(tx.txs_out[2].coin_value, 100000000) self.assertEqual(tx.txs_out[2].puzzle_script().to_p2pk", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.1111111111111111 + }, + { + "repo": "richardkiss/pycoin", + "expected": "script)", + "got": "script.to_script())", + "got_raw": "script.to_script())\n tx = Tx.from_hex(\"01000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.24446151121745047, + "edit_similarity": 0.5384615384615384 + }, + { + "repo": "richardkiss/pycoin", + "expected": "\"2607:f8b0:4006:80a:0:0:0:200e\")", + "got": "\"::1\")", + "got_raw": "\"::1\") == ip_bin_to_ip6_addr(b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x01\")) self.assertEqual(\"::1\", ip_bin_to_ip6_addr(b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x01\")) self.assertEqual(\"", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.2631578947368421 + }, + { + "repo": "richardkiss/pycoin", + "expected": "wif)", + "got": "wif)", + "got_raw": "wif) self.assertEqual(secret_exponent_to_wif(secret_exponent, compressed=True), c_wif) self.assertEqual(public_pair_to_sec(sec), c_sec) self.assertEqual(public_pair_to_hash160_sec(sec), bitcoin_address_to_hash160_sec(address_b58)) self.assertEqual(public_pair_to_hash160_sec(c_sec), bitcoin_address_to_hash160_sec(c_address_b58)) self.assertEqual(public_pair_to_hash160_sec(sec), public_pair_to_hash160_sec(c_sec)) self.assertEqual(public_pair_to_hash160_sec(c_sec), public_pair_to_hash160", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "richardkiss/pycoin", + "expected": "\"7c4f5385050c18aa8df2ba50da566bbab68635999cc99b75124863da1594195b\")", + "got": "tx_to_validate.hash())", + "got_raw": "tx_to_validate.hash())", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.11235955056179775 + }, + { + "repo": "richardkiss/pycoin", + "expected": "se)", + "got": "se)", + "got_raw": "se)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ricklupton/floweaver", + "expected": "[(\"c\", \"e\", 1)]", + "got": "[(\"bcd\", \"e\", 1)] assert get_source_target(2) == [(\"c\", \"c\", 2)] assert unused == [(\"a\", \"c\", 3)]", + "got_raw": "[(\"bcd\", \"e\", 1)] assert get_source_target(2) == [(\"c\", \"c\", 2)] assert unused == [(\"a\", \"c\", 3)]", + "exact_match": false, + "code_bleu": 0.19986628095188028, + "edit_similarity": 0.26785714285714285 + }, + { + "repo": "ricklupton/floweaver", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as exc_info:\n Partition([Group(\"a\", [\"a\", \"b\"]), Group(\"b\", [\"b\", \"c\"])])\n\nassert str(exc_info.value) == \"Duplicate group found: 'b'\"\n\n\ndef test_partition_simple_checks_for_missing_groups():\n\n with pytest.raises(\n### Target:\nValueError) as exc_info:\n Partition([Group(\"a\", [\"a\", \"b\"]), Group(\"c\", [\"c\", \"d\"])])\n\nassert str(exc_info.value) == \"Missing group: 'c'\"\n\n\ndef test_partition_simple_checks_for_empty_groups():\n\n with", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ricklupton/floweaver", + "expected": "[1]", + "got": "[-1]", + "got_raw": "[-1] * 2 + [-1] * 2 + [-1] * 2 + [-1] * 2 + [-1] * 2 + [-1] * 2 + [-1] * 2 + [-1] * 2 + [-1] * 2 + [-1] * 2 + [-1] * 2 + [-1] * 2 + [-1] * 2 + [-1] * 2 + [-1] * 2 + [-1] * 2 + [-1] * 2 + [-1] * 2 + [-1", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.8571428571428571 + }, + { + "repo": "ricklupton/floweaver", + "expected": "{(\"a\", \"b\")}", + "got": "{(\"a\", \"b\")}", + "got_raw": "{(\"a\", \"b\")}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ricklupton/floweaver", + "expected": "[(\"a\", \"x\")]", + "got": "[(\"a\", \"x\")] assert get_source_target(1) == [(\"b\", \"x\")]", + "got_raw": "[(\"a\", \"x\")] assert get_source_target(1) == [(\"b\", \"x\")]", + "exact_match": false, + "code_bleu": 0.3127670021100431, + "edit_similarity": 0.35294117647058826 + }, + { + "repo": "ricklupton/floweaver", + "expected": "Rules( [ ({\"x\": Includes({\"a\"})}, (\"AB\",)), ({\"x\": Includes({\"b\"})}, (\"AB\", \"BC\")), ({\"x\": Includes({\"c\"})}, (\"BC\",)), ({\"x\": Excludes({\"a\", \"b\", \"c\"})}, ()), ] )", + "got": "Rules( [ ({\"x\": Includes({\"a\", \"b\", \"c\"})}, \"ABC\"), ] )", + "got_raw": "Rules( [ ({\"x\": Includes({\"a\", \"b\", \"c\"})}, \"ABC\"), ] )", + "exact_match": false, + "code_bleu": 0.2668578106909089, + "edit_similarity": 0.4608294930875576 + }, + { + "repo": "ricklupton/floweaver", + "expected": "[link.to_json() for link in data.links]", + "got": "[link.to_json() for link in data.links]", + "got_raw": "[link.to_json() for link in data.links]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ricklupton/floweaver", + "expected": "{ \"source\": \"a\", \"target\": \"b\", \"type\": \"c\", \"time\": \"d\", \"value\": 3, \"data\": { \"value\": 2, }, \"title\": \"link\", \"opacity\": 0.9, \"color\": \"blue\", }", + "got": "{ \"source\": \"a\", \"target\": \"b\", \"type\": \"c\", \"time\": \"d\", \"link_width\": 3, \"data\": { \"value\": 2, }, \"title\": \"link\", \"style\": { \"opacity\": 0.9, \"color\": \"blue\", }, }", + "got_raw": "{ \"source\": \"a\", \"target\": \"b\", \"type\": \"c\", \"time\": \"d\", \"link_width\": 3, \"data\": { \"value\": 2, }, \"title\": \"link\", \"style\": { \"opacity\": 0.9, \"color\": \"blue\", }, } # format expected by SankeyData.to_json() assert link.to_json(format=\"data\") == { \"source\": \"a\", \"target\": \"b\", \"type\": \"c\", \"time\": \"d\", \"link_width\": 3, \"data\": { \"value\": ", + "exact_match": false, + "code_bleu": 0.8076608287085566, + "edit_similarity": 0.9131832797427653 + }, + { + "repo": "ricklupton/floweaver", + "expected": "\"g2\"", + "got": "\"g2\"", + "got_raw": "\"g2\" assert g3.label == \"g3\" assert g1.dim1 == (\"v1\", \"v2\") assert g2.dim2 == (\"x\",) assert g3.dim2 == (\"y\",) assert g1.dim1 != g2.dim2 assert g2.dim2 != g3.dim2 assert g1.dim1 != g3.dim2 assert g1.dim1 != g2.dim2 assert g1.dim1 != g3.dim2 assert g1.dim1 != g2.dim2 assert g1.dim1 != g3.dim2 assert g1.dim1 != g2.dim2 assert g", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ricklupton/floweaver", + "expected": "[ ( \"a^*\", \"b^*\", (\"*\", \"*\"), {\"measures\": {\"value\": 11}, \"original_flows\": [0, 1], \"bundles\": [0]}, ), ]", + "got": "[ (0, 1, {\"material\": \"m\", \"value\": 4, \"another_measure\": 2}), (0, 1, {\"material\": \"m\", \"value\": 7, \"another_measure\": 1}), ] assert list(groups) == [0] assert list(groups[0].nodes()) == [0, 1] assert list(groups[0].edges()) == [(0, 1)] assert list(groups[0].data()) == [ (0, 1, {\"material\": \"m\", \"value\": 4, \"another_measure\": 2}), (0,", + "got_raw": "[ (0, 1, {\"material\": \"m\", \"value\": 4, \"another_measure\": 2}), (0, 1, {\"material\": \"m\", \"value\": 7, \"another_measure\": 1}), ] assert list(groups) == [0] assert list(groups[0].nodes()) == [0, 1] assert list(groups[0].edges()) == [(0, 1)] assert list(groups[0].data()) == [ (0, 1, {\"material\": \"m\", \"value\": 4, \"another_measure\": 2}), (0,", + "exact_match": false, + "code_bleu": 0.07317859177307497, + "edit_similarity": 0.22675736961451248 + }, + { + "repo": "ricklupton/floweaver", + "expected": "(0, 0)", + "got": "(0, 0)", + "got_raw": "(0, 0) # band 0, pos 0 # band 1, pos 0 # band 2, pos 0 # band 3, pos 0 # band 4, pos 0 # band 5, pos 0 # band 6, pos 0 # band 7, pos 0 # band 8, pos 0 # band 9, pos 0 # band 10, pos 0 # band 11, pos 0 # band 12, pos 0 #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ricklupton/floweaver", + "expected": "{\"a^a1\", \"a^a2\", \"b^b1\"}", + "got": "{\"a\", \"b\"}", + "got_raw": "{\"a\", \"b\"} # b2 not used assert set(groups) == {\"a\", \"b\"} # b2 not used assert Gr[\"a\"][\"b\"][\"value\"] == 4.0 # b2 not used assert Gr[\"b\"][\"a\"][\"value\"] == 0.0 # b2 not used assert Gr[\"b\"][\"b\"][\"value\"] == 0.0 # b2 not used assert Gr[\"a\"][\"a\"][\"value\"] == 0.0 # b2 not used assert Gr[\"b\"][\"b\"][\"material\"] == \"m\" # b2 not used assert Gr[\"a\"][\"b\"][\"", + "exact_match": false, + "code_bleu": 0.23190565391078496, + "edit_similarity": 0.5882352941176471 + }, + { + "repo": "ricklupton/floweaver", + "expected": "Ordering( [", + "got": "Ordering( [ [[\"a\"]", + "got_raw": "Ordering( [ [[\"a\"], []], [[], [\"b\"]], ] ) assert groups == { \"a\": [0], \"b\": [1], } assert Gr.nodes[\"a\"][\"material\"] == \"m\" assert Gr.nodes[\"b\"][\"material\"] == \"m\" assert Gr.edges[(\"a\", \"b\")][\"value\"] == 3.0 assert Gr.edges[(\"a\", \"b\")][\"material\"] == \"m\" assert Gr.edges[(\"a\", \"b\")][\"bundles\"] == bundles[0] assert Gr.edges[(\"a\", \"b\")][\"source\"] == \"a1", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.7586206896551724 + }, + { + "repo": "ricklupton/floweaver", + "expected": "[(\"c\", \"b\", 2)]", + "got": "[(\"c\", \"c\", 2)]", + "got_raw": "[(\"c\", \"c\", 2)]", + "exact_match": false, + "code_bleu": 0.6580370064762462, + "edit_similarity": 0.9333333333333333 + }, + { + "repo": "ricklupton/floweaver", + "expected": "[node.to_json() for node in data.nodes]", + "got": "[{\"id\": \"a\"}] assert json[\"links\"] == [{\"source\": \"a\"", + "got_raw": "[{\"id\": \"a\"}] assert json[\"links\"] == [{\"source\": \"a\", \"target\": \"a\"}] assert json[\"directed\"] == True assert json[\"graph\"] == {} assert json[\"links\"] == [{\"source\": \"a\", \"target\": \"a\"}] assert json[\"nodes\"] == [{\"id\": \"a\"}] assert json[\"directed\"] == True assert json[\"graph\"] == {} assert json[\"links\"] == [{\"source\": \"a\", \"target\": \"a\"}] assert json[\"nodes\"] == [{\"id\": \"a\"}] assert json[\"directed\"] ==", + "exact_match": false, + "code_bleu": 0.0712695567709093, + "edit_similarity": 0.2608695652173913 + }, + { + "repo": "ricklupton/floweaver", + "expected": "[0]", + "got": "[0]", + "got_raw": "[0] assert result.links[0].color == \"#cccccc\" assert result.links[0].width == 0.5 assert result.links[0].type == \"*\" assert result.links[0].time == \"\" assert result.links[0].bundle_ids == [] assert result.links[0].style == \"process\" assert result.links[0].direction == \"R\" assert result.links[0].title == \"\" assert result.links[0].description == \"\" assert result.links[0].group == \"b\" assert result.links[0].order == 0 assert result.links[0].id == \"b^*\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ricklupton/floweaver", + "expected": "[\"a\", \"b\", \"c\", \"d\"]", + "got": "[\"a\", \"b\", \"c\", \"d\"] G.remove_node(\"b\") assert sorted(G.nodes()) == [\"a\", \"c\", \"d\"] assert sorted(G.edges()) == [(\"a\", \"c\")] assert sorted(G.ordering) == [ [\"a\"], [\"c\"], [\"d\"] ]", + "got_raw": "[\"a\", \"b\", \"c\", \"d\"] G.remove_node(\"b\") assert sorted(G.nodes()) == [\"a\", \"c\", \"d\"] assert sorted(G.edges()) == [(\"a\", \"c\")] assert sorted(G.ordering) == [ [\"a\"], [\"c\"], [\"d\"] ]", + "exact_match": false, + "code_bleu": 0.11623081361173077, + "edit_similarity": 0.20304568527918782 + }, + { + "repo": "ricklupton/floweaver", + "expected": "2", + "got": "1", + "got_raw": "1 new_bundles[0].id == \"elsewhere\" new_bundles[0].source == \"a\" new_bundles[0].target == \"a\" new_bundles[0].waypoints == [Waypoint(\"a1\")] new_bundles[0].waypoint_ids == [\"a1\"] new_bundles[0].waypoint_ids == [\"a1\"] new_bundles[0].waypoint_ids == [\"a1\"] new_bundles[0].waypoint_ids == [\"a1\"] new_bundles[0].waypoint_ids == [\"a1\"] new_bundles[0].way", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "ricklupton/floweaver", + "expected": "{ \"a^*\", \"b^*\", \"via^m\", \"via^n\", \"c^c1\", \"c^c2\", }", + "got": "set(sdd.nodes.keys()) assert set(l.source for l in result.links) == set( sdd.bundles[0].sources ) assert set(l.target for l in result.links) == set( sdd.bundles[0].targets ) assert set(l.material for l in result.links) == set( sdd.bundles[0].materials ) assert set(l.type for l in result.links) == set( sdd.bundles[0].link_types ) assert set(l.color for l in result.links) == set( sdd.bundles[0].colors ) assert set(l.value for l in result.links) ==", + "got_raw": "set(sdd.nodes.keys()) assert set(l.source for l in result.links) == set( sdd.bundles[0].sources ) assert set(l.target for l in result.links) == set( sdd.bundles[0].targets ) assert set(l.material for l in result.links) == set( sdd.bundles[0].materials ) assert set(l.type for l in result.links) == set( sdd.bundles[0].link_types ) assert set(l.color for l in result.links) == set( sdd.bundles[0].colors ) assert set(l.value for l in result.links) ==", + "exact_match": false, + "code_bleu": 0.006472661389559231, + "edit_similarity": 0.048 + }, + { + "repo": "ricklupton/floweaver", + "expected": "old_flows", + "got": "old_flows", + "got_raw": "old_flows\n\ndef assert_link_data(old_result, new_result):\n \"\"\"Compare link data.\"\"\"\n for link in old_result.links:\n assert link.data == new_result.links[link.id].data\n\ndef assert_sankey_data_equivalent( old_result, new_result ): \"\"\"Compare two Sankey data structures.\"\"\" assert_node_directions( old_result, new_result ) assert_link_endpoints( old_result, new_result ) assert_link_values( old_result, new_result ) assert_link_original_flows( old_result, new_result ) assert_link_data( old_result, new_result ) def test_weave_sankey(): \"\"\"Test the", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rmartin16/qbittorrent-api", + "expected": "WebSeedsList([])", + "got": "[]", + "got_raw": "[] # type: ignore new_torrent.add_webseeds(webseeds) assert new_torrent.webseeds == webseeds # type: ignore new_torrent.add_webseeds(webseeds) assert new_torrent.webseeds == webseeds * 2 # type: ignore new_torrent.add_webseeds([]) assert new_torrent.webseeds == webseeds * 3 # type: ignore new_torrent.add_webseeds(None) assert new_torrent.webseeds == webseeds * 4 # type: ignore ", + "exact_match": false, + "code_bleu": 0.28284271247461906, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "rmartin16/qbittorrent-api", + "expected": "all_dotted_methods", + "got": "all_dotted_methods", + "got_raw": "all_dotted_methods | {\"_get_log\", \"_get_log_peers\"} | {f\"{namespace}_{meth}\" for meth in all_dotted_methods} | {\"_get_log_peers\"} | {\"_get_log\"} | {\"_get_log\"} | {\"_get_log\"} | {\"_get_log\"} | {\"_get_log\"} | {\"_get_log\"} | {\"_get_log\"} | {\"_get_log\"} | {\"_get_log\"} | {\"_get_log\"} | {\"_get_log\"} | {\"_get_log\"} | {\"_get_log\"} | {\"_get_log\"} | {\"_get", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rmartin16/qbittorrent-api", + "expected": "True", + "got": "True", + "got_raw": "True if IS_QBT_DEV else False if environ.get(\"QBT_DEV\") else False else False if environ.get(\"QBT_TEST\") else True else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False else False", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rmartin16/qbittorrent-api", + "expected": "files[0]", + "got": "files[0]._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data", + "got_raw": "files[0]._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data._data", + "exact_match": false, + "code_bleu": 0.025959828857159282, + "edit_similarity": 0.041237113402061855 + }, + { + "repo": "rmartin16/qbittorrent-api", + "expected": "415", + "got": "415", + "got_raw": "415 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rmartin16/qbittorrent-api", + "expected": "NotFound404Error)", + "got": "NotFound404Error)", + "got_raw": "NotFound404Error) as excinfo: job.get() check(str(excinfo.value), \"Job not found\") check(str(excinfo.value), \"Job 1\") check(str(excinfo.value), \"not found\") check(str(excinfo.value), \"not found\") check(str(excinfo.value), \"not found\") check(str(excinfo.value), \"not found\") check(str(excinfo.value), \"not found\") check(str(excinfo.value), \"not found\") check(str(excinfo.value), \"not found\") check(str(excinfo.value), \"not found\") check(str(excinfo.value), \"not found\") check(str(exc", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rmartin16/qbittorrent-api", + "expected": "[ ListEntry({\"two\": \"2\"}), ListEntry({\"three\": \"3\"}), ]", + "got": "list_two[0:2] == [{\"two\": \"2\"}, {\"three\": \"3\"}] == [{\"four\": \"4\"}] == [list_one[1], list_two[0]] == [{\"two\": \"2\"}] == [list_one[1:2], list_two[0:1]] == [{\"two\": \"2\"}] == [list_one[1:3], list_two[0:2]] == [{\"two\": \"2\"}, {\"three\": \"3\"}] == [list_one[1:4], list_two[0:3]] == [{\"two\": \"2\"}, {\"three", + "got_raw": "list_two[0:2] == [{\"two\": \"2\"}, {\"three\": \"3\"}] == [{\"four\": \"4\"}] == [list_one[1], list_two[0]] == [{\"two\": \"2\"}] == [list_one[1:2], list_two[0:1]] == [{\"two\": \"2\"}] == [list_one[1:3], list_two[0:2]] == [{\"two\": \"2\"}, {\"three\": \"3\"}] == [list_one[1:4], list_two[0:3]] == [{\"two\": \"2\"}, {\"three", + "exact_match": false, + "code_bleu": 0.05986387575267885, + "edit_similarity": 0.20057306590257878 + }, + { + "repo": "rmartin16/qbittorrent-api", + "expected": "405", + "got": "405", + "got_raw": "405 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rmartin16/qbittorrent-api", + "expected": "3", + "got": "3.000000000000000434031089845213312083221152954101562500000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "3.000000000000000434031089845213312083221152954101562500000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "rmartin16/qbittorrent-api", + "expected": "NotImplementedError)", + "got": "NotImplementedError)", + "got_raw": "NotImplementedError) as excinfo:\n getattr(client.search, update_func)() # noqa: B018\n\n assert str(excinfo.value) == \"Method not implemented\" # noqa: B023\n\n\n@pytest.mark.parametrize(\"update_func\", [\"search_update\", \"search.update\"])\ndef test_update_not_implemented(client, update_func):\n\n with pytest.raises(NotImplementedError) as excinfo:\n getattr(client.search, update_func)() # noqa: B018\n\n assert str(excinfo.value) == \"Method not implemented\" # noqa: B02", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rmartin16/qbittorrent-api", + "expected": "None", + "got": "None", + "got_raw": "None # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rq/django-rq", + "expected": "[connection_params_1])", + "got": "[connection_params_1])", + "got_raw": "[connection_params_1])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rq/django-rq", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as error: scheduler.connection_index() self.assertEqual( str(error.exception), \"No cron jobs registered\" ) # Register a cron job and check the connection_index scheduler.register_job( say_hello, \"*/1 * * * *\", connection_index=1 ) self.assertEqual( scheduler.connection_index(), 1 ) # Register another cron job with the same connection_index and check the connection_index scheduler.register_job( say_hello, \"*/2 * * * *\", connection_index=1 ) self.assertEqual( scheduler.connection_index(), 2 ) # Register a cron job with a different connection_index and check the connection_index scheduler.register_job(", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rq/django-rq", + "expected": "400)", + "got": "100)", + "got_raw": "100) queue = get_queue('test2') self.assertEqual(queue._default_timeout, 1000) queue = get_queue('test3') self.assertEqual(queue._default_timeout, 10000) queue = get_queue('test4') self.assertEqual(queue._default_timeout, 100000) queue = get_queue('test5') self.assertEqual(queue._default_timeout, 1000000) queue = get_queue('test6') self.assertEqual(queue._default_timeout, 10000000) queue = get_queue('test7') self", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.75 + }, + { + "repo": "rq/django-rq", + "expected": "404)", + "got": "404)", + "got_raw": "404) self.assertContains(response, '404 Not Found') self.assertContains(response, 'No such scheduler') self.assertContains(response, 'nonexistent-scheduler') self.assertContains(response, 'does not exist') self.assertContains(response, 'scheduler') self.assertContains(response, 'Scheduler') self.assertContains(response, 'test-scheduler') self.assertContains(response, 'test-scheduler') self.assertContains(response, 'test-scheduler') self.assertContains(response, 'test-scheduler') self.assertContains(response, 'test-scheduler') self.assertContains(response, 'test-scheduler') self.assertContains(response,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rq/django-rq", + "expected": "[])", + "got": "[])", + "got_raw": "[])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rq/django-rq", + "expected": "unique_configs)", + "got": "unique_configs)", + "got_raw": "unique_configs) self.assertIn(connection_params_2, unique_configs) self.assertNotIn(connection_params_1, unique_configs) self.assertNotIn(connection_params_2, unique_configs) self.assertEqual(len(unique_configs[0]), 1) self.assertEqual(len(unique_configs[1]), 1) self.assertEqual(unique_configs[0][0], connection_params_1) self.assertEqual(unique_configs[1][0], connection_params_2) self.assertNotEqual(unique_configs[0][0], unique_configs[1][0]) self.assertNotEqual(unique_configs[0][0]['DB'], unique_configs[1][0]['DB']) self.assertNotEqual(unique_configs", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rq/django-rq", + "expected": "\"test3\")", + "got": "\"test3\")", + "got_raw": "\"test3\") self.assertEqual(job2.queue_name, \"test3\") # Different queues should raise an error job3 = scheduler.register(say_hello, \"test1\", interval=60) with self.assertRaises(ValueError) as cm: scheduler.register(say_hello, \"test2\", interval=60) self.assertEqual(str(cm.exception), \"Cannot schedule job 'say_hello' to queue 'test2' as it is not compatible with the test3 queue\") # Incompatible queues should raise an error job4 = scheduler.register(say_hello, \"test1\", interval=60) with self.assertRaises(ValueError) as cm:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rq/django-rq", + "expected": "url.startswith('/admin'))", + "got": "url.startswith('/admin/django_rq/'))", + "got_raw": "url.startswith('/admin/django_rq/'))", + "exact_match": false, + "code_bleu": 0.5946035575013605, + "edit_similarity": 0.819672131147541 + }, + { + "repo": "rq/django-rq", + "expected": "list)", + "got": "list)", + "got_raw": "list) self.assertEqual(len(schedulers), 0) # Create a DjangoCronScheduler instance scheduler = DjangoCronScheduler() scheduler.start() # Check that the scheduler is running schedulers = get_cron_schedulers() self.assertIsInstance(schedulers, list) self.assertEqual(len(schedulers), 1) self.assertIsInstance(schedulers[0], DjangoCronScheduler) self.assertEqual(schedulers[0], scheduler) # Stop the scheduler scheduler.stop() # Check that the scheduler is stopped schedulers = get_cron_schedulers() self.assertIsInstance(schedulers, list) self.assertEqual(len(schedulers), 0) # Create another DjangoCronScheduler", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rq/django-rq", + "expected": "config.get('DB', 0))", + "got": "config['DB'])", + "got_raw": "config['DB']) # If config has lowercase equivalents (from settings.RQ_QUEUES) elif 'host' in config: self.assertEqual(connection_kwargs['host'], config['host']) self.assertEqual(connection_kwargs['port'], config['port']) self.assertEqual(connection_kwargs['db'], config['db']) else: raise ValueError(\"Missing 'host', 'port', or 'db' in config\")", + "exact_match": false, + "code_bleu": 0.18037106415283274, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "rtCamp/Frappe-Manager", + "expected": "prompt_text", + "got": "prompt_text.lower()", + "got_raw": "prompt_text.lower()", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.7333333333333333 + }, + { + "repo": "rtCamp/Frappe-Manager", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rtCamp/Frappe-Manager", + "expected": "volume3", + "got": "volume3", + "got_raw": "volume3", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rtCamp/Frappe-Manager", + "expected": "challenge", + "got": "challenge", + "got_raw": "challenge # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E50", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rtCamp/Frappe-Manager", + "expected": "error_msg", + "got": "error_msg.lower()", + "got_raw": "error_msg.lower() assert \"please initialize it before using it\" in error_msg.lower() assert \"frappe_manager.output_manager.globals.get_global_output_handler\" in error_msg.lower() assert \"frappe_manager.output_manager.globals.set_global_output_handler\" in error_msg.lower() assert \"frappe_manager.output_manager.globals.has_global_output_handler\" in error_msg.lower() assert \"frappe_manager.output_manager.globals.reset_global_handler\" in error_msg.lower() assert \"frappe_manager.output_manager.globals._global_output_handler\" in error_msg.lower() assert \"frappe_manager.output_manager.globals._global_output_handler\" in error", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6923076923076923 + }, + { + "repo": "rtCamp/Frappe-Manager", + "expected": "None", + "got": "None", + "got_raw": "None # Not set in this case handler._console = mock_console handler._show_time = False handler._show_path = False handler._show_level = False handler._show_color = False handler._show_traceback = False handler._show_exception = False handler._show_traceback_level = 0 handler._show_traceback_color = False handler._show_traceback_time = False handler._show_traceback_path = False handler._show_traceback_level_color = False handler._show_traceback_level_time = False handler._show_traceback_level_path = False handler._", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rtCamp/Frappe-Manager", + "expected": "True", + "got": "True", + "got_raw": "True # The function should return True if the update is successful. bench.config[\"test_key\"] should be updated with the new value. assert bench.config[\"test_key\"] == \"test_value\" # The function should return the updated config. assert result == bench.config # The function should return the updated config. assert result == new_config # The function should return the updated config. assert result == bench.config # The function should return the updated config. assert result == new_config # The function should return the updated config. assert result == bench.config # The function should return the updated config. assert result ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rtCamp/Frappe-Manager", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rtCamp/Frappe-Manager", + "expected": "call_args[1]", + "got": "call_args.kwargs.keys()", + "got_raw": "call_args.kwargs.keys() mock_compose_file.return_value.load_template.return_value.render.return_value == \"test-bench\" mock_compose_file.return_value.load_template.return_value.render.return_value.render.return_value == \"test-bench\" mock_compose_file.return_value.load_template.return_value.render.return_value.render.return_value.render.return_value == \"test-bench\" mock_compose_file.return_value.load_template.return_value.render.return_value.render.return_value.render.return_value.render.return_value == \"test-bench\" mock_compose_file.return_value.load_template.return_value.render.return_value.render.return_value.render.return_value.render.return_value.render.return_value == \"test-b", + "exact_match": false, + "code_bleu": 0.18575057999133598, + "edit_similarity": 0.5142857142857142 + }, + { + "repo": "rtCamp/Frappe-Manager", + "expected": "Version(\"0.18.0\")", + "got": "Version(\"0.18.0\")", + "got_raw": "Version(\"0.18.0\") executor.current_version == Version(\"0.19.0\") executor.min_version == Version(\"0.18.0\") executor.max_version == Version(\"0.19.0\") executor.is_min_version_supported() == True executor.is_max_version_supported() == True executor.is_version_supported() == True executor.is_min_version_supported() == True executor.is_max_version_supported() == True executor.is_version_supported() == True executor.is_min_version_supported() == True executor.is_max_version_supported() == True executor.is_version_supported() == True executor.is_min_version_supported() == True executor.is_max", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rtCamp/Frappe-Manager", + "expected": "root_dir", + "got": "root_dir", + "got_raw": "root_dir / \"certs\" / \"no_op\" / \"certs\" / \"no_op\" / \"certs\" / \"no_op\" / \"certs\" / \"no_op\" / \"certs\" / \"no_op\" / \"certs\" / \"no_op\" / \"certs\" / \"no_op\" / \"certs\" / \"no_op\" / \"certs\" / \"no_op\" / \"certs\" / \"no_op\" / \"certs\" / \"no_op\" / \"certs\" / \"no_op\" / \"certs\" /", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rtCamp/Frappe-Manager", + "expected": "text_content", + "got": "text_content.strip()", + "got_raw": "text_content.strip() mock_update.call_args_list[0].kwargs[\"style\"] == \"bold\" mock_update.call_args_list[0].kwargs[\"end\"] == \"\" mock_update.call_args_list[0].kwargs[\"file\"] == handler._tty_file handler._tty_file.seek(0) handler._tty_file.truncate() handler._tty_file.write(text_content) handler._tty_file.flush() handler._tty_file.seek(0) handler._tty_file.read() == text_content.strip() handler._tty_file.truncate() handler._tty_file.write(\"Updated text\") handler._tty_file.flush() handler._tty_file.seek(0", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.75 + }, + { + "repo": "rtCamp/Frappe-Manager", + "expected": "\"test.com\"", + "got": "\"test.com\"", + "got_raw": "\"test.com\" assert cert.ssl_type == SUPPORTED_SSL_TYPES.none assert cert.enabled is False assert cert.certificate is None assert cert.private_key is None assert cert.chain is None assert cert.fingerprint is None assert cert.expires is None assert cert.issuer is None assert cert.subject is None assert cert.serial is None assert cert.version is None assert cert.key_type is None assert cert.key_size is None assert cert.key_algorithm is None assert cert.key_usage is None assert cert.extensions is None assert cert.subject_alt_names is None assert cert.issuer_alt_names is None assert cert.ocsp_urls is None assert cert.ca is None assert cert.ca_path", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rtCamp/Frappe-Manager", + "expected": "ValueError)", + "got": "ValueError", + "got_raw": "ValueError, match=\"test error\") as exc_info:\n handler.error(\"test error\", ValueError(\"test error\"))\n\n assert str(exc_info.value) == \"test error\"\n\n # New style (required):\n\n with pytest.raises(ValidationError, match=\"test error\") as exc_info:\n handler.error(\"test error\", ValueError(\"test error\"))\n\n assert str(exc_info.value) == \"test error\"", + "exact_match": false, + "code_bleu": 0.29730177875068026, + "edit_similarity": 0.9523809523809523 + }, + { + "repo": "rtCamp/Frappe-Manager", + "expected": "True", + "got": "True", + "got_raw": "True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rtCamp/Frappe-Manager", + "expected": "volume1", + "got": "\"/var/lib/nginx/certs\"", + "got_raw": "\"/var/lib/nginx/certs\" assert storage.dirs.conf.d == \"/var/lib/nginx/conf.d\" assert storage.dirs.html == \"/var/lib/nginx/html\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.20689655172413793 + }, + { + "repo": "rtCamp/Frappe-Manager", + "expected": "call_kwargs", + "got": "call_kwargs", + "got_raw": "call_kwargs and call_kwargs[\"stream\"] is False", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rtCamp/Frappe-Manager", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rtCamp/Frappe-Manager", + "expected": "True", + "got": "True", + "got_raw": "True # Default value for shallow_clone is True # Default value for shallow_clone is True # Default value for shallow_clone is True # Default value for shallow_clone is True # Default value for shallow_clone is True # Default value for shallow_clone is True # Default value for shallow_clone is True # Default value for shallow_clone is True # Default value for shallow_clone is True # Default value for shallow_clone is True # Default value for shallow_clone is True # Default value for shallow_clone is True # Default value for shallow_clone is True # Default value for shallow_clone is True ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rtCamp/Frappe-Manager", + "expected": "3", + "got": "3", + "got_raw": "3 # 3 messages logged with context assert lines[0].startswith(\"[INFO] \") assert lines[1].startswith(\"[DEBUG] \") assert lines[2].startswith(\"[WARNING] \") assert \"Message 1\" in lines[0] assert \"Message 2\" in lines[1] assert \"Message 3\" in lines[2] assert \"bench: mybench\" in lines[0] assert \"operation: create\" in lines[1] assert \"operation: create\" in lines[2] assert \"Message 1\" in log_file.read_text()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rubik/radon", + "expected": "['-']", + "got": "['-']", + "got_raw": "['-'] * 200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rubik/radon", + "expected": "[ 'file.py', 'amod.py', 'tests/test_amod.py', 'tests/run.py', 'sub/amod.py', 'sub/bmod.py', ])", + "got": "[ 'file.py', 'amod.py', 'test_all.py', 'tests/test_amod.py', 'tests/run.py', 'sub/amod.py', 'sub/bmod.py', ]) os_mod.walk = _orig_walk os_path_mod.isfile = _orig_is_python_file", + "got_raw": "[ 'file.py', 'amod.py', 'test_all.py', 'tests/test_amod.py', 'tests/run.py', 'sub/amod.py', 'sub/bmod.py', ]) os_mod.walk = _orig_walk os_path_mod.isfile = _orig_is_python_file\n\n\ndef test_iter_files_with_ignore(mocker, iter_files):\n os_mod = mocker.patch('radon.cli.tools.os')\n os_path_mod = mocker.patch('radon.cli.tools.os.path')\n os_path_mod.normpath = os.path.normpath\n os_path_mod.basename = os.path.basename\n os_path_mod.join =", + "exact_match": false, + "code_bleu": 0.5140768318620904, + "edit_similarity": 0.6962962962962963 + }, + { + "repo": "rubik/radon", + "expected": "1", + "got": "1", + "got_raw": "1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rubik/radon", + "expected": "( res, 120, 6, )", + "got": "res + [tools.RESET] * 6 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] *", + "got_raw": "res + [tools.RESET] * 6 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * 2 + [tools.RESET] * ", + "exact_match": false, + "code_bleu": 0.010322546006950492, + "edit_similarity": 0.04154302670623145 + }, + { + "repo": "rubik/radon", + "expected": "False", + "got": "True", + "got_raw": "True # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E71", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "rubik/radon", + "expected": "NotImplementedError)", + "got": "NotImplementedError)", + "got_raw": "NotImplementedError) as excinfo: h.gobble(fake_gobble) assert str(excinfo.value) == 'gobble not implemented' h.gobble(fake_gobble_raising) assert h.gobble(fake_run) == 42 h.gobble(fake_run) == 42 h.gobble(fake_run) == 42 h.gobble(fake_run) == 42 h.gobble(fake_run) == 42 h.gobble(fake_run) == 42 h.gobble(fake_run) == 42 h.gobble(fake_run) == 42 h.gobble(fake_run) == 42", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "rubik/radon", + "expected": "( res[1:], 120, 6, )", + "got": "( res[1:-1], 75, 5, ) res[1:-1] = res[1:-1].replace('B', 'B__R__') res[1:-1] = res[1:-1].replace('F', 'F__R__') res[1:-1] = res[1:-1].replace('C', 'C__R__') res[1:-1] = res[1:-1].replace('D', 'D__R__') res[1:-1] = res[1:-1].replace('E', 'E__R", + "got_raw": "( res[1:-1], 75, 5, ) res[1:-1] = res[1:-1].replace('B', 'B__R__') res[1:-1] = res[1:-1].replace('F', 'F__R__') res[1:-1] = res[1:-1].replace('C', 'C__R__') res[1:-1] = res[1:-1].replace('D', 'D__R__') res[1:-1] = res[1:-1].replace('E', 'E__R", + "exact_match": false, + "code_bleu": 0.04464458936477372, + "edit_similarity": 0.12213740458015267 + }, + { + "repo": "rubik/radon", + "expected": "AttributeError)", + "got": "SystemExit)", + "got_raw": "SystemExit) as excinfo: c.a = 'a' c.b = 'b' c.run() assert str(excinfo.value) == 'Invalid config' c = cli.Config() c.run() assert c.a == 2 c.b == 'b' c.c = 'c' c.run() assert c.c == 'c' c = cli.Config() c.run() assert c.a == 2 c.b == 'b' c.c == 'c' c.d = 'd' c.run() assert c.d == 'd' c = cli.Config() c.run() assert c.a == 2 c.b ==", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.3076923076923077 + }, + { + "repo": "rubik/radon", + "expected": "expected_rank)", + "got": "expected_rank())", + "got_raw": "expected_rank()) as excinfo:\n rank(score)\n assert str(excinfo.value) == 'Score too low'\n else:\n assert rank(score) == expected_rank\n\n\ndef test_rank_function():\n assert rank_function(1) == 'A'\n assert rank_function(2) == 'B'\n assert rank_function(3) == 'C'\n assert rank_function(4) == 'D'\n assert rank_function(5) == 'E'\n assert rank_function(6) == 'F'\n assert rank_function(7) == 'F'\n assert rank", + "exact_match": false, + "code_bleu": 0.3976353643835253, + "edit_similarity": 0.9333333333333333 + }, + { + "repo": "rubik/radon", + "expected": "'{}'", + "got": "''''''", + "got_raw": "'''''' # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.4 + }, + { + "repo": "run-llama/llama_deploy", + "expected": "\"http://localhost:4501/deployments/a_deployment/tasks\")", + "got": "\"http://localhost:4501/deployments/a_deployment/tasks\")", + "got_raw": "\"http://localhost:4501/deployments/a_deployment/tasks\") as req: res = await d.tasks.list() assert res == res.json() assert req.method == \"GET\" assert req.url.path == \"/tasks\" assert req.url.query == \"\" assert req.headers == {} assert req.body == b\"\" assert req.raise_for_status() == None assert res == res.json() assert res == res.json() assert res == res.json() assert res == res.json() assert res == res.json() assert res == res.json() assert res == res.json() assert res == res.json() assert res == res.json() assert res", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "run-llama/llama_deploy", + "expected": "120.0", + "got": "30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.03007518796992481 + }, + { + "repo": "run-llama/llama_deploy", + "expected": "caplog.text", + "got": "caplog.text.lower()", + "got_raw": "caplog.text.lower()", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.7333333333333333 + }, + { + "repo": "run-llama/llama_deploy", + "expected": "500", + "got": "500", + "got_raw": "500 # Internal Server Error # Check the response content for the error message assert \"Connection failed\" in response.text.lower() # Check the response headers for the error message assert \"connection failed\" in response.headers.get(\"content-type\", \"\").lower() # Check the response headers for the error message assert \"connection failed\" in response.headers.get(\"server\", \"\").lower() # Check the response headers for the error message assert \"connection failed\" in response.headers.get(\"date\", \"\").lower() # Check the response headers for the error message assert \"connection failed\" in response.headers.get", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "run-llama/llama_deploy", + "expected": "\"session1\"", + "got": "\"session1\"", + "got_raw": "\"session1\" assert sessions[1].session_id == \"session2\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "run-llama/llama_deploy", + "expected": "actual.input", + "got": "actual.input.decode()", + "got_raw": "actual.input.decode() if actual.input else \"{}\" assert expected.id == actual.id assert expected.name == actual.name assert expected.session_id == \"session_id\" assert expected.status == actual.status assert expected.task_id == actual.task_id assert expected.type == actual.type assert expected.url == actual.url assert expected.version == actual.version assert expected.created_at == actual.created_at assert expected.updated_at == actual.updated_at assert expected.ended_at == actual.ended_at assert expected.start_time == actual.start_time assert expected.end_time == actual.end_time assert expected.error == actual.error assert expected.output == actual.output assert expected.logs == actual.logs assert expected.status == actual", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.7272727272727273 + }, + { + "repo": "run-llama/llama_deploy", + "expected": "200", + "got": "200", + "got_raw": "200 response.json() == [{\"name\": \"test-deployment\", \"ui\": {\"port\": 3000}}] response.headers[\"content-type\"] == \"application/json; charset=utf-8\" response.headers[\"access-control-allow-origin\"] == \"*\" response.headers[\"access-control-allow-headers\"] == \"content-type\" response.headers[\"access-control-allow-methods\"] == \"GET\" response.headers[\"access-control-max-age\"] == \"3600\" response.headers[\"vary\"] == \"Accept-Encoding\" response.headers[\"cache-control\"] == \"max-age=3600\" response.headers[\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "run-llama/llama_deploy", + "expected": "( \"https://example.com/llama_deploy.git\", \"branch_name\", )", + "got": "{ \"url\": \"https://example.com/llama_deploy.git\", \"branch\": \"branch_name\", }", + "got_raw": "{ \"url\": \"https://example.com/llama_deploy.git\", \"branch\": \"branch_name\", }", + "exact_match": false, + "code_bleu": 0.2086130724305753, + "edit_similarity": 0.8421052631578947 + }, + { + "repo": "run-llama/llama_deploy", + "expected": "KeyError)", + "got": "KeyError)", + "got_raw": "KeyError) as exc_info: await deployment.run_workflow(\"test\") # type: ignore\n assert str(exc_info.value) == \"test\" # type: ignore\n\n\ndef test_run_workflow(deployment_config: DeploymentConfig) -> None:\n \"\"\"Test run_workflow runs the workflow and returns the result.\"\"\"\n workflow = mock.MagicMock() # type: ignore\n workflow.run.return_value = \"result\" # type: ignore\n workflow.name = \"test\" # type: ignore\n deployment_config.services = { # type: ignore\n \"test\": mock.MagicMock(), #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "run-llama/llama_deploy", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "run-llama/llama_deploy", + "expected": "3", + "got": "2", + "got_raw": "2 assert wf_config.python_dependencies[0] == \"pandas\" assert wf_config.python_dependencies[1] == \"numpy\" assert wf_config.python_dependencies[2] == \"scikit-learn\" assert wf_config.python_dependencies[3] == \"tensorflow\" assert wf_config.python_dependencies[4] == \"pytorch\" assert wf_config.python_dependencies[5] == \"fastapi\" assert wf_config.python_dependencies[6] == \"uvicorn\" assert wf_config.python_dependencies[7] == \"requests\" assert wf_config.python_dependencies[8] == \"json\" assert wf_config.python_dependencies[9] == \"yaml\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "run-llama/llama_deploy", + "expected": "mock.ANY)", + "got": "str(tmp_path", + "got_raw": "str(tmp_path / \"source\"))", + "exact_match": false, + "code_bleu": 0.2849383821193472, + "edit_similarity": 0.09523809523809523 + }, + { + "repo": "run-llama/llama_deploy", + "expected": "\"Ho ricevuto:bar\"", + "got": "\"I have received:bar\" + \"\\n\" + \"I have received:bar\" + \"\\n\" + \"I have received:bar\" + \"\\n\" + \"I have received:bar\" + \"\\n\" + \"I have received:bar\" + \"\\n\" + \"I have received:bar\" + \"\\n\" + \"I have received:bar\" + \"\\n\" + \"I have received:bar\" + \"\\n\" + \"I have received:bar\" + \"\\n\" + \"I have received:bar\" + \"\\n\" + \"I have received:bar\" + \"\\", + "got_raw": "\"I have received:bar\" + \"\\n\" + \"I have received:bar\" + \"\\n\" + \"I have received:bar\" + \"\\n\" + \"I have received:bar\" + \"\\n\" + \"I have received:bar\" + \"\\n\" + \"I have received:bar\" + \"\\n\" + \"I have received:bar\" + \"\\n\" + \"I have received:bar\" + \"\\n\" + \"I have received:bar\" + \"\\n\" + \"I have received:bar\" + \"\\n\" + \"I have received:bar\" + \"\\", + "exact_match": false, + "code_bleu": 0.022996104098636838, + "edit_similarity": 0.06232294617563739 + }, + { + "repo": "run-llama/notebookllama", + "expected": "\"host\"", + "got": "\"host\"", + "got_raw": "\"host\" assert config.speaker2_role == \"guest\" assert config.speaker1_name == \"Host\" assert config.speaker2_name == \"Guest\" assert config.speaker1_voice == \"en-US-Standard-A\" assert config.speaker2_voice == \"en-US-Standard-B\" assert config.speaker1_gender == \"male\" assert config.speaker2_gender == \"female\" assert config.speaker1_age == 30 assert config.speaker2_age == 25 assert config.speaker1_language == \"en\" assert config.speaker2_language == \"en\" assert config.speaker1_speed ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "run-llama/notebookllama", + "expected": "\"Hello World\"", + "got": "\"Hello World\" d1.content == \"This is a test\" d1.summary == \"Test\" d1.q_and_a == \"Hello? World.\" d1.mindmap == \"Hello -> World\" d1.bullet_points == \". Hello", + "got_raw": "\"Hello World\" d1.content == \"This is a test\" d1.summary == \"Test\" d1.q_and_a == \"Hello? World.\" d1.mindmap == \"Hello -> World\" d1.bullet_points == \". Hello, . World\" d1.audio_files == [] d1.audio_files == [] d1.audio_files == [] d1.audio_files == [] d1.audio_files == [] d1.audio_files == [] d1.audio_files == [] d1.audio_files == [] d1.audio_files == [] d1.audio_files == [] d1.audio_files == [] d1.audio_files == [] d", + "exact_match": false, + "code_bleu": 0.036612667086152566, + "edit_similarity": 0.15476190476190477 + }, + { + "repo": "run-llama/notebookllama", + "expected": "None", + "got": "None", + "got_raw": "None\n cl4 = ClaimVerification(claim_is_true=True)\n assert cl4.supporting_citations is None\n cl5 = ClaimVerification(claim_is_true=False)\n assert cl5.supporting_citations is None\n cl6 = ClaimVerification(claim_is_true=False)\n assert cl6.supporting_citations is None\n cl7 = ClaimVerification(claim_is_true=True)\n assert cl7.supporting_citations is None\n cl8 = ClaimVerification(claim_is_true=False)\n assert cl8.supporting_citations is None\n cl9 = ClaimVerification", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "run-llama/notebookllama", + "expected": "500.0", + "got": "500.0000000000000312500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "500.0000000000000312500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.07518796992481203 + }, + { + "repo": "run-llama/notebookllama", + "expected": "2", + "got": "2", + "got_raw": "2 and docs1[0] == documents[0] and docs1[1] == documents[1]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "run-llama/workflows-py", + "expected": "None", + "got": "None", + "got_raw": "None, \"Resource node should have a title\"\n assert \"metadata\" in kwargs[\"title\"] or \"metadata\" in kwargs[\"title\"].get( \"description\", \"\" ) \"Resource node should have metadata\"\n\ndef test_pyvis_resource_nodes_rendered_mermaid(workflow_with_resources: Workflow) -> None:\n \"\"\"Test that resource nodes are rendered in Mermaid output.\"\"\"\n with patch(\"pyvis.network.Network\") as mock_network:\n mock_net_instance = MagicMock()\n mock_network.return_value = mock_net_instance\n\n draw_all_possible_flows_mermaid( workflow_with_resources )\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "run-llama/workflows-py", + "expected": "1", + "got": "1.0", + "got_raw": "1.0", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "run-llama/workflows-py", + "expected": "0", + "got": "0", + "got_raw": "0 # Resource factory should be called during execution (default) wf.run() # Uses defaults: validate_resource_configs=True, validate_resources=True assert call_count[\"count\"] == 1 # Resource factory should NOT be called during execution (default) wf.run() # Uses defaults: validate_resource_configs=True, validate_resources=False assert call_count[\"count\"] == 1 # Resource factory should NOT be called during execution (default) wf.run() # Uses defaults: validate_resource_configs=False, validate_resources=True assert call_count[\"count\"] == 1 # Resource factory should NOT be called during execution (", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "run-llama/workflows-py", + "expected": "None", + "got": "None", + "got_raw": "None captured_state[\"items\"] == [\"initial\", \"new_item\"] captured_state[\"nested\"][\"count\"] == 1 captured_state[\"nested\"][\"name\"] == \"test\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "run-llama/workflows-py", + "expected": "1", + "got": "1", + "got_raw": "1 res[0] == str res[1] == Any res[2] == Any res[3] == Any res[4] == Any res[5] == Any res[6] == Any res[7] == Any res[8] == Any res[9] == Any res[10] == Any res[11] == Any res[12] == Any res[13] == Any res[14] == Any res[15] == Any res[16] == Any res[17] == Any res[18] == Any res[19", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "run-llama/workflows-py", + "expected": "[]", + "got": "[]", + "got_raw": "[]\n\n\n@pytest.mark.asyncio\nasync def test_delete_persisted_handler_removes_from_store_and_server(\n interactive_workflow: Workflow,\n) -> None:\n async with server_with_persisted_handlers(\n interactive_workflow,\n persisted_handlers=[\n PersistentHandler(\n handler_id=\"persist-only\",\n workflow_name=\"interactive\",\n status=\"completed\",\n ctx={},\n )\n ],\n ) as (_server, client, store):\n resp_delete_store = await client.post(\n \"/handlers/persist-only/cancel?purge=true\"\n )\n assert resp_delete", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "run-llama/workflows-py", + "expected": "result", + "got": "result", + "got_raw": "result # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E50", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "run-llama/workflows-py", + "expected": "\"foo\"", + "got": "\"test\"", + "got_raw": "\"test\" async for ev in r.stream_events(): if not isinstance(ev, StopEvent): assert ev.test_param == \"test\" async for ev in r.stream_events(): if not isinstance(ev, StopEvent): assert ev.test_param == \"test\" async for ev in r.stream_events(): if not isinstance(ev, StopEvent): assert ev.test_param == \"test\" async for ev in r.stream_events(): if not isinstance(ev, StopEvent): assert ev.test_param == \"test\" async for ev in r.stream_events(): if not isinstance(ev, StopEvent): assert ev.test_param == \"test\" async for ev in r", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.36363636363636365 + }, + { + "repo": "run-llama/workflows-py", + "expected": "[\"slow\"]", + "got": "[]", + "got_raw": "[] \"Active steps should be empty\" \"when workflow times out\" \"before exception is raised\" \"for the first time\" \"in the stream\" \"after the workflow has started\" \"but before it has finished\" \"and before the workflow has been cancelled\" \"and before the workflow has failed\" \"and before the workflow has been stopped\" \"and before the workflow has been resumed\" \"and before the workflow has been paused\" \"and before the workflow has been resumed\" \"and before the workflow has been resumed\" \"and before the workflow has been resumed\" \"and before the workflow has been resumed\" \"and before", + "exact_match": false, + "code_bleu": 0.39640237166757364, + "edit_similarity": 0.4 + }, + { + "repo": "run-llama/workflows-py", + "expected": "\"42\"", + "got": "\"42\"", + "got_raw": "\"42\" # type:ignore # type:ignore # type:ignore # type:ignore # type:ignore # type:ignore # type:ignore # type:ignore # type:ignore # type:ignore # type:ignore # type:ignore # type:ignore # type:ignore # type:ignore # type:ignore # type:ignore # type:ignore # type:ignore # type:ignore # type:ignore # type:ignore # type:ignore # type:ignore # type:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "run-llama/workflows-py", + "expected": "3", + "got": "3.000000000000000454959586416917222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222", + "got_raw": "3.000000000000000454959586416917222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "run-llama/workflows-py", + "expected": "Repo", + "got": "Repo", + "got_raw": "Repo # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "run-llama/workflows-py", + "expected": "\"ok_2\"", + "got": "\"ok_2\"", + "got_raw": "\"ok_2\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "run-llama/workflows-py", + "expected": "None", + "got": "None", + "got_raw": "None, \"Handler context should not be None\" assert handler.ctx.result is not None, \"Handler result should not be None\" return WorkflowTestResult( collected_events, event_freqs, result ) @dataclass class WorkflowTestResult: collected: list[Event] event_types: dict[EventType, int] result: Any def __str__(self) -> str: return str(self.result) def __repr__(self) -> str: return str(self) def __eq__(self, other: Any) -> bool: return str(self) == str(other) def __hash__(self) -> int: return hash(str(self))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "run-llama/workflows-py", + "expected": "schema", + "got": "schema[\"components\"][\"schemas\"][\"Workflow\"][\"properties\"][\"routes\"][\"items\"][\"properties\"][\"paths\"][\"properties\"][\"get\"][\"properties\"][\"responses\"][\"properties\"][\"content\"][\"properties\"][\"application/json\"][\"properties\"][\"schema\"][\"properties\"][\"components\"][\"schemas\"][\"Workflow\"][\"properties\"][\"routes\"][\"items\"][\"properties\"][\"properties\"][\"get\"][\"properties\"][\"responses\"][\"properties\"][\"content\"][\"properties\"][\"application/json\"][\"properties\"][\"schema\"][\"properties\"][\"components\"][\"schemas\"][\"Workflow\"][\"properties\"][\"routes\"][\"items\"][\"properties\"][\"properties\"][\"get\"][\"properties\"][\"responses\"][\"properties\"][\"content\"][\"properties\"][\"application/json\"][\"properties\"][\"schema\"][\"properties\"][\"", + "got_raw": "schema[\"components\"][\"schemas\"][\"Workflow\"][\"properties\"][\"routes\"][\"items\"][\"properties\"][\"paths\"][\"properties\"][\"get\"][\"properties\"][\"responses\"][\"properties\"][\"content\"][\"properties\"][\"application/json\"][\"properties\"][\"schema\"][\"properties\"][\"components\"][\"schemas\"][\"Workflow\"][\"properties\"][\"routes\"][\"items\"][\"properties\"][\"properties\"][\"get\"][\"properties\"][\"responses\"][\"properties\"][\"content\"][\"properties\"][\"application/json\"][\"properties\"][\"schema\"][\"properties\"][\"components\"][\"schemas\"][\"Workflow\"][\"properties\"][\"routes\"][\"items\"][\"properties\"][\"properties\"][\"get\"][\"properties\"][\"responses\"][\"properties\"][\"content\"][\"properties\"][\"application/json\"][\"properties\"][\"schema\"][\"properties\"][\"", + "exact_match": false, + "code_bleu": 0.007099902136404078, + "edit_similarity": 0.016901408450704224 + }, + { + "repo": "run-llama/workflows-py", + "expected": "2", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "run-llama/workflows-py", + "expected": "t2", + "got": "t2", + "got_raw": "t2 # t2 is first in list order and done first, so it should be picked first. \"\"\" async def test_pick_highest_priority_respects_priority() -> None: \"\"\"pick_highest_priority should return task with highest priority.\"\"\" named_tasks = [ NamedTask.worker(\"step_b\", 0, create_pending_task()), NamedTask.worker(\"step_a\", 1, create_pending_task()), NamedTask.worker(\"step_c\", 2, create_pending_task()), ] done = set() result = NamedTask.pick_highest_priority(named_tasks, done) assert result is named_tasks[0] # The task with the highest", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "run-llama/workflows-py", + "expected": "4", + "got": "3", + "got_raw": "3 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "run-llama/workflows-py", + "expected": "semver", + "got": "semver.replace(\"-\"", + "got_raw": "semver.replace(\"-\", \".\") + \"-dev\" + str(1) + str(2) + str(3) + str(4) + str(1) + str(0) + str(0) + str(1) + str(3) + str(3) + str(3) + str(4) + str(1) + str(0) + str(0) + str(1) + str(3) + str(3) + str(3) + str(4) + str(1) + str(0) + str(0) + str(", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5 + }, + { + "repo": "run-llama/workflows-py", + "expected": "2", + "got": "2", + "got_raw": "2\n\n # The first result should be for the first call\n\n assert tool_results[0].tool_id == \"call_1\" and tool_results[0].text == \"Call 1\" and tool_results[0].metadata == {} and tool_results[0].error is None and tool_results[0].output is None and tool_results[0].status == \"success\" and tool_results[0].event_type == \"tool_call_result\" and tool_results[0].event_id is None and tool_results[0].event_time is None and tool_results[0].event_source is None and tool_results[", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ruvnet/wifi-densepose", + "expected": "2", + "got": "2", + "got_raw": "2\n\n def test_should_get_sanitization_statistics_empty(self, phase_sanitizer):\n \"\"\"Should get sanitization statistics for empty data.\"\"\"\n stats = phase_sanitizer.get_sanitization_statistics()\n assert stats['total_processed'] == 0\n assert stats['outliers_removed'] == 0\n assert stats['sanitization_errors'] == 0\n\n def test_should_get_sanitization_statistics_no_data(self, phase_sanitizer):\n \"\"\"Should get sanitization statistics for no data.\"\"\"\r\n phase_sanitizer._total_processed = 0\r\n phase_sanitizer._out", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ruvnet/wifi-densepose", + "expected": "TimeoutError)", + "got": "TimeoutError", + "got_raw": "TimeoutError, match=\"CSI extraction timeout\") as e_info:\n csi_pipeline_components['router'].extract_csi_data()\n assert str(e_info.value) == \"CSI extraction timeout\"", + "exact_match": false, + "code_bleu": 0.29730177875068026, + "edit_similarity": 0.96 + }, + { + "repo": "ruvnet/wifi-densepose", + "expected": "0", + "got": "0.001", + "got_raw": "0.001 # Should be greater than 1ms\n\n @pytest.mark.asyncio\n async def test_multiple_requests_performance(self, api_server):\n \"\"\"Test multiple requests performance.\"\"\"\n start_time = time.time()\n response = await api_server.handle_request(\"/health\")\n end_time = time.time()\n response_time = (end_time - start_time) * 1000\n \n # This should succeed after the first request\n assert response[\"status\"] == 200\n assert response_time < 50 # Should respond within 50ms\n\n", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "ruvnet/wifi-densepose", + "expected": "2", + "got": "2", + "got_raw": "2 # Should have 2 items in history after adding 3 items.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ruvnet/wifi-densepose", + "expected": "2", + "got": "2", + "got_raw": "2 # Should have called twice before failing.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ruvnet/wifi-densepose", + "expected": "None", + "got": "None", + "got_raw": "None # Ensure the result is not None after processing\n\n # Check if the result is a numpy array\n assert isinstance(result, np.ndarray) # Check if the result is a numpy array\n\n # Check if the shape of the result matches the expected shape\n expected_shape = (3, 56, 100) # Expected shape after processing\n assert result.shape == expected_shape # Check if the shape matches the expected shape\n\n # Check if the values in the result are within the expected range\n assert np.all(result >= 0.0) # Ensure all values", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ruvnet/wifi-densepose", + "expected": "200", + "got": "200", + "got_raw": "200\n assert response.json() == {\"status\": \"OK\"}\r\n # Test status endpoint\r\n response = await client.get(\"/status\")\r\n assert response.status_code == 200\r\n assert response.json() == {\"status\": \"Healthy\"}\r\n\n # Test backup endpoint (requires a backup manager)\r\n response = await client.get(\"/backup\")\r\n assert response.status_code == 200\r\n assert response.json() == {\"message\": \"Backup successful\"}\r\n\n # Test cleanup endpoint (requires a cleanup manager)\r\n response = await client.get(\"/", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ruvnet/wifi-densepose", + "expected": "True", + "got": "True", + "got_raw": "True # User is active initially\n\n @pytest.mark.asyncio\n async def test_user_authentication_success_should_succeed(self, mock_user_service):\n \"\"\"Test successful user authentication - should succeed.\"\"\"\n user = await mock_user_service.authenticate_user(\"testuser\", \"correct_password\")\n assert user is not None\n assert user[\"username\"] == \"testuser\"\n assert user[\"is_active\"] is True # User is active after successful authentication\n\n @pytest.mark.asyncio\n async def test_user_authentication_failure(self, mock_user_service):\n \"\"\"Test failed user authentication.\"\"\"\n user", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ruvnet/wifi-densepose", + "expected": "200 * 1024 * 1024", + "got": "100 * 1024 * 1024 * 2.0", + "got_raw": "100 * 1024 * 1024 * 2.0 # Double the initial memory for safety", + "exact_match": false, + "code_bleu": 0.5169731539571706, + "edit_similarity": 0.8 + }, + { + "repo": "ruvnet/wifi-densepose", + "expected": "100", + "got": "200.0", + "got_raw": "200.0 # Less than 200ms average response time\n\n @pytest.mark.asyncio\n async def test_sustained_load_performance_should_succeed_after_initial_failure(self, api_server):\n \"\"\"Test sustained load performance - should succeed after initial failure.\"\"\"\n duration_seconds = 3\n target_rps = 50 # 50 requests per second\n \n async def send_requests():\n \"\"\"Send requests at target rate.\"\"\"\n interval = 1.0 / target_rps\n end_time = time.time() + duration_seconds\n \n while time.time() < end", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "ruvnet/wifi-densepose", + "expected": "8", + "got": "8", + "got_raw": "8 # Should process 8 images in batch mode\n\n @pytest.mark.asyncio\n async def test_benchmark_batch_processing(self, benchmark):\n \"\"\"Benchmark batch processing performance - should succeed after warmup.\"\"\"\n model = MockPoseModel(\"standard\")\n await model.load_model()\n batch_features = np.random.rand(8, 64, 32) # Batch of 8\n \n async def run_batch_inference():\n return await model.predict(batch_features)\n \n # Warmup the model\n await run_batch_inference()\n \n # This should succeed after warmup\n result", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ruvnet/wifi-densepose", + "expected": "50", + "got": "100.0", + "got_raw": "100.0 # This is a rough estimate, adjust as needed.", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2857142857142857 + }, + { + "repo": "ruvnet/wifi-densepose", + "expected": "\"zone1\"", + "got": "\"zone1\"", + "got_raw": "\"zone1\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ruvnet/wifi-densepose", + "expected": "0", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "ruvnet/wifi-densepose", + "expected": "0.1", + "got": "0.100", + "got_raw": "0.100 # 100ms threshold for real-time processing", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.75 + }, + { + "repo": "ruvnet/wifi-densepose", + "expected": "2", + "got": "2", + "got_raw": "2 * 2 + 1 * 2 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 *", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ruvnet/wifi-densepose", + "expected": "60", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015384615384615385 + }, + { + "repo": "ruvnet/wifi-densepose", + "expected": "0", + "got": "0", + "got_raw": "0\n\n def test_jwt_token_creation(self, mock_jwt_service, valid_user_payload):\n \"\"\"Test JWT token creation - should succeed after initial failure.\"\"\"\n mock_jwt_service.create_token(valid_user_payload) # Initial failure\n token = mock_jwt_service.create_token(valid_user_payload) # Success\n \n assert isinstance(token, str) and len(token) > 0\n\n def test_jwt_token_verification(self, mock_jwt_service, valid_user_payload):\n \"\"\"Test JWT token verification - should succeed.\"\"\"\n token = mock_jwt_service.create_token(valid_user_payload)\n payload = mock_jwt_service.verify_token(token)\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ruvnet/wifi-densepose", + "expected": "404", + "got": "404", + "got_raw": "404\n error_response = response.json()\n assert \"detail\" in error_response", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ruvnet/wifi-densepose", + "expected": "chunk_size", + "got": "chunk_size", + "got_raw": "chunk_size # Check that each chunk has the same number of samples as the input batch size", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "safety-research/bloom", + "expected": "v", + "got": "v", + "got_raw": "v for d in ideation[\"variations\"] for d in ideation[\"variations\"] for d in ideation[\"variations\"] for d in ideation[\"variations\"] for d in ideation[\"variations\"] for d in ideation[\"variations\"] for d in ideation[\"variations\"] for d in ideation[\"variations\"] for d in ideation[\"variations\"] for d in ideation[\"variations\"] for d in ideation[\"variations\"] for d in ideation[\"variations\"] for d in ideation[\"variations\"] for d in ideation[\"variations\"] for", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "safety-research/bloom", + "expected": "\"Hi\"", + "got": "\"Hi\"", + "got_raw": "\"Hi\" assert transcript[\"events\"][1][\"content\"] == \"Hello!\" assert transcript[\"events\"][2][\"content\"] == \"How are you?\" def test_appends_event_with_timestamp(self): \"\"\"Should append an event with a timestamp.\"\"\" transcript = {\"events\": []} append_event( transcript, turn=1, event=\"user_message\", content=\"Hi\", timestamp=1630456800.123456789, ) assert transcript[\"events\"][0][\"timestamp\"] == 1630456800.12345678", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "safety-research/bloom", + "expected": "result", + "got": "result.keys()", + "got_raw": "result.keys() assert len(result[\"variations\"]) == 2 assert result[\"variations\"][0][\"text\"] == \"I like to read books.\" assert result[\"variations\"][1][\"text\"] == \"I like to read.\" assert result[\"variations\"][1][\"score\"] == 0.9999999999999999 assert result[\"variations\"][1][\"id\"] == \"1\" assert result[\"variations\"][1][\"score\"] == 0.9999999999999999 assert result[\"variations\"][", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.631578947368421 + }, + { + "repo": "safety-research/bloom", + "expected": "[]", + "got": "[]", + "got_raw": "[] # No events initially.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sammchardy/python-binance", + "expected": "None", + "got": "None", + "got_raw": "None and client.API_SECRET is not None and client.TESTNET is False and client.proxy is None and client.proxy_auth is None and client.timeout is None and client.verify is True and client.user_agent is None and client.base_url is None and client.session is not None and client.session.headers is not None and client.session.headers[\"User-Agent\"] is not None and client.session.headers[\"User-Agent\"].startswith(\"python-binance/\") and client.session.headers[\"User-Agent\"].endswith(\"binance-python\") and client.session.headers[\"User-Agent\"].count(\"/\") == 2 and client.session.headers[\"User-Agent\"].count(\" \") == 0 and", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sammchardy/python-binance", + "expected": "\"/fapi/v1/accountconfig\"", + "got": "\"/fapi/v1/accountConfig\"", + "got_raw": "\"/fapi/v1/accountConfig\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.9583333333333334 + }, + { + "repo": "sammchardy/python-binance", + "expected": "300", + "got": "300", + "got_raw": "300 + 1000 - 1001 + 1000 - 1001 + 1000 - 1001 + 1000 - 1001 + 1000 - 1001 + 1000 - 1001 + 1000 - 1001 + 1000 - 1001 + 1000 - 1001 + 1000 - 1001 + 100", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sammchardy/python-binance", + "expected": "5", + "got": "5", + "got_raw": "5 * 2 + 1 * 2 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 * 1 + 1 *", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sammchardy/python-binance", + "expected": "ts1", + "got": "None", + "got_raw": "None, \"socket should be added to _conn on re-entry\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "sammchardy/python-binance", + "expected": "logging.DEBUG", + "got": "logging.DEBUG", + "got_raw": "logging.DEBUG if client.ping else logging.INFO if client.verbose else logging.WARNING if client.debug else logging.ERROR if client.error else logging.CRITICAL if client.critical else logging.NOTSET if client.notset else logging.INFO if client.info else logging.WARNING if client.warning else logging.ERROR if client.error else logging.CRITICAL if client.critical else logging.NOTSET if client.notset else logging.INFO if client.info else logging.WARNING if client.warning else logging.ERROR if client.error else logging.CRITICAL if client.critical else logging.NOTSET if client.notset else logging.INFO if client.info else logging.WARNING if client.warning else logging.ERROR if client.error else logging.CR", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sammchardy/python-binance", + "expected": "False", + "got": "False", + "got_raw": "False # False for non-user sockets \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sammchardy/python-binance", + "expected": "headers", + "got": "headers.keys()", + "got_raw": "headers.keys() assert \"Accept\" in headers.keys() assert headers[\"Accept\"] == \"application/x-www-form-urlencoded\" assert headers[\"Accept-Encoding\"] == \"gzip, deflate\" assert headers[\"User-Agent\"] == \"python-binance/1.0.0\" assert headers[\"X-MBX-APIKEY\"] == \"api_key\" assert headers[\"X-MBX-PING\"] == \"\" assert headers[\"X-MBX-SIGN\"] == \"\" assert headers[\"X-MBX-TIMESTAMP\"] == \"\" assert headers[\"X-MBX-KEY\"] == \"\" assert headers[\"X-MBX-IV\"] == \"\" assert headers[\"X", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "sammchardy/python-binance", + "expected": "ws.MAX_RECONNECTS", + "got": "2", + "got_raw": "2 # Ensure the number of reconnections is updated correctly.", + "exact_match": false, + "code_bleu": 0.16666666666666666, + "edit_similarity": 0.0 + }, + { + "repo": "sammchardy/python-binance", + "expected": "2", + "got": "2", + "got_raw": "2 + 10 ** -6 * 2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sammchardy/python-binance", + "expected": "13", + "got": "13", + "got_raw": "13 # 13 digits for timestamp in milliseconds", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sammchardy/python-binance", + "expected": "\"/fapi/v3/positionrisk\"", + "got": "\"/fapi/v3/positionRisk\"", + "got_raw": "\"/fapi/v3/positionRisk\" assert pos[0][\"symbol\"] == \"LTCUSDT\" assert pos[0][\"positionSide\"] == \"LONG\" assert pos[0][\"positionAmt\"] == \"0.700\" assert pos[0][\"entryPrice\"] == \"75.6\" assert pos[0][\"breakEvenPrice\"] == \"75.63024\" assert pos[0][\"markPrice\"] == \"73.18000000\" assert pos[0][\"unRealizedProfit\"] == \"-1.694000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.9565217391304348 + }, + { + "repo": "sammchardy/python-binance", + "expected": "\"error\"", + "got": "\"error\"", + "got_raw": "\"error\" msg[\"m\"] == \"invalid json\" msg[\"d\"] == \"invalid json\" msg[\"t\"] == 1630584400000 msg[\"s\"] == \"BTC/USDT\" msg[\"e\"] == \"error\" msg[\"m\"] == \"invalid json\" msg[\"d\"] == \"invalid json\" msg[\"t\"] == 1630584400000 msg[\"s\"] == \"BTC/USDT\" msg[\"e\"] == \"error\" msg[\"m\"] == \"invalid json\" msg[\"d\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sammchardy/python-binance", + "expected": "order)", + "got": "order)", + "got_raw": "order) order = futuresClient.futures_get_order(symbol=ticker[\"symbol\"], orderId=order[\"orderId\"]) assert_contract_order(futuresClient, order) order = futuresClient.futures_edit_order( symbol=ticker[\"symbol\"], orderId=order[\"orderId\"], price=str(round(float(ticker[\"lastPrice\"]) - 2)), ) assert_contract_order(futuresClient, order) order = futuresClient.futures_cancel_order( symbol=ticker[\"symbol\"], orderId=order[\"orderId\"], ) assert order[\"status\"] == \"CANCELED\" order = futuresClient.futures_get_order(symbol=ticker[\"symbol\"], orderId=order[\"orderId\"])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sammchardy/python-binance", + "expected": "'trade'", + "got": "'trade'", + "got_raw": "'trade' logger.info(\"Test options recent trades successful\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sammchardy/python-binance", + "expected": "None", + "got": "None", + "got_raw": "None\n\n # verify the gift card\n response = await liveClientAsync.gift_card_verify( referenceNo=response[\"data\"][\"referenceNo\"] )\n\n assert response[\"data\"][\"status\"] == \"SUCCESS\"\n\n # redeem the gift card\n response = await liveClientAsync.gift_card_redeem( referenceNo=response[\"data\"][\"referenceNo\"] )\n\n assert response[\"data\"][\"status\"] == \"SUCCESS\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "samuelcolvin/watchfiles", + "expected": "{(Change.added, 'foo.py'), (Change.added, 'spam.md')}", + "got": "{(Change.modified, 'spam.md')}", + "got_raw": "{(Change.modified, 'spam.md')}\n\n\ndef test_python_extensions_default(mock_rust_notify: 'MockRustType'):\n mock_rust_notify([{(1, 'spam.txt'), (1, 'spam.md'), (1, 'foo.py')}])\n\n f = PythonFilter(extra_extensions=('.md',))\n assert next(watch('.', watch_filter=f)) == {(Change.modified, 'spam.md')}\n\n\ndef test_python_extensions_default_filter(mock_rust_notify: 'MockRustType'):\n mock_rust_notify([{(1, 'spam.txt'), (1, 'spam", + "exact_match": false, + "code_bleu": 0.3483725328403656, + "edit_similarity": 0.6265060240963856 + }, + { + "repo": "samuelcolvin/watchfiles", + "expected": "2", + "got": "1", + "got_raw": "1 mock_kill.call_count == 1 mock_popen.call_count == 0 caplog.text == 'Process /x/y/z terminated\\n' 'Process /x/y/z terminated\\n' 'Process /x/y/z terminated\\n' 'Process /x/y/z terminated\\n' 'Process /x/y/z terminated\\n' 'Process /x/y/z terminated\\n' 'Process /x/y/z terminated\\n' 'Process /x/y/z terminated\\n' 'Process /x/y/z terminated\\n' 'Process /x/y/z terminated\\n' 'Process /x/y/z terminated\\n' 'Process /x/y/z terminated\\n'", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "samuelcolvin/watchfiles", + "expected": "[Path('/a/b')]", + "got": "[Path('/a/b')]", + "got_raw": "[Path('/a/b')] assert f._ignore_paths == ('/a/b',) assert f.ignore_files == [] assert f._ignore_files == () assert f.ignore_regexes == () assert f._ignore_regexes == () assert f.ignore_patterns == [] assert f._ignore_patterns == () assert f.ignore_dirs_regexes == () assert f._ignore_dirs_regexes == () assert f.ignore_dirs_patterns == () assert f._ignore_dirs_patterns == () assert f.ignore_dirs_regexes == () assert f._ignore_dirs_regexes == () assert f.ignore_dirs_patterns == () assert f._ignore_dirs_patterns == () assert f.ignore_dirs_regex", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "samuelcolvin/watchfiles", + "expected": "False)", + "got": "1000)", + "got_raw": "1000) def test_watch_polling_env(mocker): m = mocker.patch('watchfiles.main.RustNotify', return_value=MockRustNotify()) for _ in watch('.'): pass m.assert_called_once_with(['.'], False, False, 300, False, 1000) def test_watch_polling_env_force(mocker): m = mocker.patch('watchfiles.main.RustNotify', return_value=MockRustNotify()) for _ in watch('.', force_polling=True): pass m.assert_called_once_with(['.'], True, False, 300, False, 1", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.18181818181818182 + }, + { + "repo": "samuelcolvin/watchfiles", + "expected": "RuntimeError, match='custom exit')", + "got": "RuntimeError, match='custom exit') as exc_info: cli(['--help'])", + "got_raw": "RuntimeError, match='custom exit') as exc_info: cli(['--help'])\n assert exc_info.value.args[0] == 'custom exit'", + "exact_match": false, + "code_bleu": 0.37239098949398236, + "edit_similarity": 0.7010309278350515 + }, + { + "repo": "samuelcolvin/watchfiles", + "expected": "0", + "got": "1", + "got_raw": "1 mock_kill.call_count == 1 mock_rust_notify.call_count == 1 caplog.text == 'Process /x/y/z terminated\\n' 'Process /x/y/z terminated\\n' 'Process /x/y/z terminated\\n' 'Process /x/y/z terminated\\n' 'Process /x/y/z terminated\\n' 'Process /x/y/z terminated\\n' 'Process /x/y/z terminated\\n' 'Process /x/y/z terminated\\n' 'Process /x/y/z terminated\\n' 'Process /x/y/z terminated\\n' 'Process /x/y/z terminated\\n' 'Process /x/y/z terminated\\n", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "samuelcolvin/watchfiles", + "expected": "SysError)", + "got": "SystemExit)", + "got_raw": "SystemExit) as excinfo: cli(['--filter', 'invalid_import'])\nsys_exit.assert_called_once_with(1) capsys.readouterr().err == 'Error: Invalid filter: invalid_import\\n' 'ImportError: No module named \\'invalid_import\\'\\n' 'Error: Invalid filter: invalid_import\\n' 'Error: Invalid filter: invalid_import\\n' 'Error: Invalid filter: invalid_import\\n' 'Error: Invalid filter: invalid_import\\n' 'Error: Invalid filter: invalid_import\\n' 'Error: Invalid filter: invalid_import\\n' 'Error: Invalid filter: invalid_import\\n'", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "sanic-org/sanic", + "expected": "\"\u2713\"", + "got": "\"\u2713\"", + "got_raw": "\"\u2713\" request, response = app.test_client.get(\"/\", params=[(\"utf8\", \"\u2713\u2713\")]) assert request.args.get(\"utf8\") == \"\u2713\u2713\" request, response = app.test_client.get(\"/\", params=[(\"utf8\", \"\u2713\u2713\u2713\")]) assert request.args.get(\"utf8\") == \"\u2713\u2713\u2713\" request, response = app.test_client.get(\"/\", params=[(\"utf8\", \"\u2713\u2713\u2713\u2713\")]) assert request.args.get(\"utf8\") == \"\u2713\u2713\u2713\u2713\" request, response = app.test_client.get(\"/\", params=[(\"utf8\", \"\u2713\u2713\u2713\u2713", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sanic-org/sanic", + "expected": "3", + "got": "2", + "got_raw": "2", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "sanic-org/sanic", + "expected": "1", + "got": "0", + "got_raw": "0\nmanager.scale(2)\nassert len(manager.transient) == 1\nassert manager.transient[0] == p1.pid\nmanager.scale(3)\nassert len(manager.transient) == 2\nassert manager.transient[0] == p2.pid\nassert manager.transient[1] == p3.pid\nmanager.scale(1)\nassert len(manager.transient) == 0\nassert manager.transient[0] == p1.pid\nmanager.scale(0)\nassert len(manager.transient) == 0\nassert manager.transient[0] == p2.pid\nassert manager", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "sanic-org/sanic", + "expected": "\"\")", + "got": "\"1.1.1.1\")", + "got_raw": "\"1.1.1.1\") assert response.text == \"1.1.1.1\" assert access.info.call_count == 1 assert access.info.call_args_list[0] == ANY assert access.info.call_args_list[0].args[0] == \"1.1.1.1\" assert access.info.call_args_list[0].args[1] == \"GET\" assert access.info.call_args_list[0].args[2] == \"/\" assert access.info.call_args_list[0].args[3] == \"200\" assert access.info.call_args_list[0].args[4]", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.46153846153846156 + }, + { + "repo": "sanic-org/sanic", + "expected": "\"1\"", + "got": "\"1\"", + "got_raw": "\"1\" assert response.cookies[\"__Host-one\"].host_prefix is True assert response.cookies[\"__Host-one\"].secure is True assert response.cookies[\"__Host-one\"].max_age is None assert response.cookies[\"__Host-one\"].httponly is True assert response.cookies[\"__Host-one\"].samesite is None assert response.cookies[\"__Host-one\"].path == \"/\" assert response.cookies[\"__Host-one\"].domain is None assert response.cookies[\"__Host-one\"].expires is None assert response.cookies[\"__Host-one\"].value == \"1\" assert response.cookies[\"__Host-one\"].version == 1 assert response.cookies[\"__Host", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sanic-org/sanic", + "expected": "True", + "got": "True", + "got_raw": "True\n\n\ndef test_process_exists_returns_true_for_other(tmp_path):\n \"\"\"Test that the process exists for a different process ID.\"\"\"\n pid = os.fork()\n if pid == 0:\n # Child process\n os._exit(0) # Exit the child process\n else:\n # Parent process\n assert _process_exists(pid) is True\n os.wait() # Wait for the child process to exit\n assert _process_exists(pid) is False\n\n\ndef test_process_exists_returns_false_for_nonexistent(tmp_path):\n \"\"\"Test that the process does not exist for a non", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sanic-org/sanic", + "expected": "\"no\")", + "got": "\"no\")", + "got_raw": "\"no\") caplog.text == \"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sanic-org/sanic", + "expected": "sloads", + "got": "sloads", + "got_raw": "sloads", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sanic-org/sanic", + "expected": "id(bp3)", + "got": "id(bp3)", + "got_raw": "id(bp3) assert bp1._apps == bp3._apps == {app} assert bp1.name == bp3.name == \"test_bp3\" assert bp1.version == bp3.version == 3 assert bp1.url_prefix == bp3.url_prefix == \"\" assert bp1._future_exceptions == bp3._future_exceptions == {} assert bp1._future_listeners == bp3._future_listeners == {} assert bp1._future_middleware == bp3._future_middleware == [] assert bp1._future_routes == bp3._future_routes == [] assert bp1._future_signals == bp3._future_signals ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sanic-org/sanic", + "expected": "logo", + "got": "logo.decode()", + "got_raw": "logo.decode() sys.platform = platform os.environ[\"TERM_PROGRAM\"] = \"\" isatty.return_value = True logo = get_logo() assert \"\\033\" in logo.decode() sys.platform = platform os.environ[\"TERM_PROGRAM\"] = \"xterm\" isatty.return_value = True logo = get_logo() assert \"\\033\" in logo.decode() sys.platform = platform os.environ[\"TERM_PROGRAM\"] = \"xterm-256color\" isatty.return_value = True logo = get_logo() assert \"\\033\" in logo.decode() sys.platform = platform os.environ[\"TERM_PROGRAM\"] = \"xterm-color", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.47058823529411764 + }, + { + "repo": "sanic-org/sanic", + "expected": "\"\"", + "got": "\"127.0.1.1\"", + "got_raw": "\"127.0.1.1\" assert response.body == b\"127.0.1.1\" headers = {} request, response = app.test_client.get(\"/\", headers=headers) assert request.remote_addr == \"127.0.0.1\" assert response.body == b\"127.0.0.1\" headers = {\"X-Real-IP\": \"127.0.0.1\"} request, response = app.test_client.get(\"/\", headers=headers) assert request.remote_addr == \"127.0.0.1\" assert response.body == b\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3076923076923077 + }, + { + "repo": "sanic-org/sanic", + "expected": "\"OK\"", + "got": "\"OK\"", + "got_raw": "\"OK\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sanic-org/sanic", + "expected": "Stage.IDLE", + "got": "None", + "got_raw": "None # type: ignore Stage.IDLE # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type", + "exact_match": false, + "code_bleu": 0.16666666666666666, + "edit_similarity": 0.14285714285714285 + }, + { + "repo": "sanic-org/sanic", + "expected": "b\"\"", + "got": "b\"\"", + "got_raw": "b\"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sanic-org/sanic", + "expected": "\"get\"", + "got": "\"get\"", + "got_raw": "\"get\"\n\n\n@pytest.mark.asyncio\nasync def test_request_scope_is_none_when_running_in_http(app):\n @app.get(\"/\")\n async def get(request):\n return response.empty()\n\n request = Request(app, scope={\"type\": \"http\"})\n await request.handle()\n\n assert request.scope is None\n\n\n@pytest.mark.asyncio\nasync def test_request_scope_is_none_when_running_in_websocket(app):\n @app.websocket(\"/ws\")\n async def ws(request):\n return response.empty()\n\n request = Request(app, scope={\"type\": \"websocket\"})\n await request.handle()\n\n ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sanic-org/sanic", + "expected": "1", + "got": "1", + "got_raw": "1\n\nassert store.tickets[0] == ticket1\n\nticket2 = _generate_ticket(b\"bar\")\nstore.add(ticket2)\n\nassert len(store.tickets) == 2\n\nassert store.tickets[0] == ticket1 and store.tickets[1] == ticket2\n\nstore.remove(ticket1)\n\nassert len(store.tickets) == 1\n\nassert store.tickets[0] == ticket2\n\nstore.remove(ticket2)\n\nassert len(store.tickets) == 0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sanic-org/sanic", + "expected": "\"OK\"", + "got": "\"OK\"", + "got_raw": "\"OK\" request, response = app.test_client.get(\"/get\") assert request.body is None assert request.json is None assert response.text == \"OK\" assert response.body == b\"OK\" assert response.headers.get(\"content-type\") == \"text/html; charset=utf-8\" assert response.headers.get(\"content-length\") == \"2\" assert response.headers.get(\"server\") == \"sanic/20.10.0\" assert response.headers.get(\"date\") is not None assert response.headers.get(\"connection\") == \"close\" assert response.headers.get(\"server-timing\") is None assert response.headers.get(\"vary\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sanic-org/sanic", + "expected": "1", + "got": "2", + "got_raw": "2 * len(HTTP_METHODS) + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "sanic-org/sanic", + "expected": "b\"..\"", + "got": "b\".\"", + "got_raw": "b\".\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b\"..\" + b", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.8888888888888888 + }, + { + "repo": "sanic-org/sanic", + "expected": "5", + "got": "1", + "got_raw": "1", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "scanapi/scanapi", + "expected": "\"foo.yaml\")", + "got": "preferences)", + "got_raw": "preferences) mock_save_click_preferences.assert_not_called()", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.17391304347826086 + }, + { + "repo": "scanapi/scanapi", + "expected": "\"foo\"", + "got": "\"foo\"", + "got_raw": "\"foo\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "scanapi/scanapi", + "expected": "results", + "got": "results[0]", + "got_raw": "results[0] + results[1] + [results[0][\"response\"]] + [results[1][\"response\"]] + [results[0][\"response\"]] + [results[1][\"response\"]] + [results[0][\"response\"]] + [results[1][\"response\"]] + [results[0][\"response\"]] + [results[1][\"response\"]] + [results[0][\"response\"]] + [results[1][\"response\"]] + [results[0][\"response\"]] + [results[1][\"response\"]] + [results[0][\"response\"]] + [results[1][\"response\"]] + [results[0][\"response", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.8235294117647058 + }, + { + "repo": "scanapi/scanapi", + "expected": "\"PackageLoader\"", + "got": "\"PackageLoader\"", + "got_raw": "\"PackageLoader\" @ mark.context(\"when it is external\") @ mark.it(\"should return external loader\") def test_return_external_loader(self): loader = _loader(True) assert loader.__class__.__name__ == \"ExternalLoader\" @ mark.context(\"when it is not external\") @ mark.it(\"should return file loader\") def test_return_file_loader(self): loader = _loader(False) assert loader.__class__.__name__ == \"FileLoader\" @ mark.context(\"when it is external\") @ mark.it(\"should return external loader\") def test_return_external_loader(self): loader = _loader(True) assert loader.__class__.__name", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "scanapi/scanapi", + "expected": "sequence", + "got": "sequence", + "got_raw": "sequence ```", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "scanapi/scanapi", + "expected": "0", + "got": "0", + "got_raw": "0\n else:\r\n assert result == expected_type() if callable(expected_type) else expected_type", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "scanapi/scanapi", + "expected": "{\"parent_foo\": \"parent_bar\", \"child_foo\": \"child_bar\"}", + "got": "{\"parent_foo\": \"parent_bar\", \"child_foo\": \"child_bar\"}", + "got_raw": "{\"parent_foo\": \"parent_bar\", \"child_foo\": \"child_bar\"} # noqa: E501 \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "scanapi/scanapi", + "expected": "ExitCode.REQUEST_ERROR", + "got": "ExitCode.REQUEST_ERROR.value", + "got_raw": "ExitCode.REQUEST_ERROR.value + 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.88 + }, + { + "repo": "scanapi/scanapi", + "expected": "\"http://foo.com/api/foo\"", + "got": "base_path", + "got_raw": "base_path + \"/foo\" + node.name + \"/\" + node.name + \"/\" + node.name + \"/\" + node.name + \"/\" + node.name + \"/\" + node.name + \"/\" + node.name + \"/\" + node.name + \"/\" + node.name + \"/\" + node.name + \"/\" + node.name + \"/\" + node.name + \"/\" + node.name + \"/\" + node.name + \"/\" + node.name + \"/\" + node.name + \"/\" + node.name + \"/\" + node.name + \"/\" + node.name + \"/\" + node.name + \"/\" + node.name + \"/\" + node.name + \"/\" + node.name + \"/\" + node.name + \"/\" + node", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.12121212121212122 + }, + { + "repo": "scanapi/scanapi", + "expected": "7", + "got": "7.000000000000000422612042221324222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222", + "got_raw": "7.000000000000000422612042221324222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "scanapi/scanapi", + "expected": "expected", + "got": "expected", + "got_raw": "expected + os.environ[\"POST_ID\"] + os.environ[\"BASE_URL\"] + os.environ[\"POST_ID\"] + os.environ[\"BASE_URL\"] + os.environ[\"POST_ID\"] + os.environ[\"BASE_URL\"] + os.environ[\"POST_ID\"] + os.environ[\"BASE_URL\"] + os.environ[\"POST_ID\"] + os.environ[\"BASE_URL\"] + os.environ[\"POST_ID\"] + os.environ[\"BASE_URL\"] + os.environ[\"POST_ID\"] + os.environ[\"BASE_URL\"] + os.environ[\"POST_ID\"] + os.environ[\"BASE_URL\"] + os.environ[\"POST_ID\"] + os.environ[\"BASE_URL\"] +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "scanapi/scanapi", + "expected": "{\"abc\": \"def\", \"xxx\": \"www\"}", + "got": "{\"abc\": \"def\", \"xxx\": \"www\"}", + "got_raw": "{\"abc\": \"def\", \"xxx\": \"www\"}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "scanapi/scanapi", + "expected": "True)", + "got": "string)", + "got_raw": "string)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "scanapi/scanapi", + "expected": "{\"parent_foo\": \"parent_bar\"}", + "got": "{\"parent_foo\": \"parent_bar\"}", + "got_raw": "{\"parent_foo\": \"parent_bar\"}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "scanapi/scanapi", + "expected": "[\"./\"]", + "got": "[]", + "got_raw": "[] + _loader.__defaults__[0] + [\"/\"] + _loader.__defaults__[1] + [\"/\"] + _loader.__defaults__[2] + [\"/\"] + _loader.__defaults__[3] + [\"/\"] + _loader.__defaults__[4] + [\"/\"] + _loader.__defaults__[5] + [\"/\"] + _loader.__defaults__[6] + [\"/\"] + _loader.__defaults__[7] + [\"/\"] + _loader.__defaults__[8] + [\"/\"] + _loader.__defaults__[9] + [\"/\"] + _loader.__defaults__[1", + "exact_match": false, + "code_bleu": 0.39640237166757364, + "edit_similarity": 0.5 + }, + { + "repo": "scanapi/scanapi", + "expected": "\"{'name': 'foo'}\"", + "got": "\"{'name': 'foo'}\"", + "got_raw": "\"{'name': 'foo'}\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "scanapi/scanapi", + "expected": "True)", + "got": "True)", + "got_raw": "True) mock_console_write_summary.assert_called_once_with() mock_endpoint_run.assert_called_once_with() mock_endpoint_init.assert_called_once_with() mock_load_config_file.assert_called_once_with() mocker.call(0) == excinfo.value.code\n\n @mark.context(\"when open_browser is False\") @mark.it( \"should call reporter.write passing open_browser as False, call console.write_summary and exit the session\" ) def test_should_call_reporter_write_with_open_browser_false_call_console_write_summary_and_exit( self, mocker, response ): mocker.patch( \"scanapi.scan.settings\", { \"spec_path\": \"\", \"no_report\": False,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "scanapi/scanapi", + "expected": "len(endpoints)", + "got": "2", + "got_raw": "2 endpoinst[0][\"name\"] == node.child_nodes[0].name endpoinst[1][\"name\"] == node.child_nodes[1].name\n\n @mark.context(\"when there are mandatory keys missing\")\n @mark.it(\"should raise MissingMandatoryKeyError exception\")\n def test_should_raise_MissingMandatoryKeyError_exception(self):\n endpoints = [{\"name\": \"child-node-one\", \"requests\": []}]\n node = EndpointNode(\n {\n \"endpoints\": endpoints,\n \"name\": \"scanapi-demo\",\n \"requests\": [],\n }\n ", + "exact_match": false, + "code_bleu": 0.125, + "edit_similarity": 0.0 + }, + { + "repo": "scanapi/scanapi", + "expected": "{\"abc\": \"123\"}", + "got": "{\"abc\": \"123\"}", + "got_raw": "{\"abc\": \"123\"} # no change expected mocker.patch(\"scanapi.hide_utils._hide\", return_value=\"***\") response.headers[\"abc\"] = \"***\" _override_info(response, http_attr, secret_field) assert response.headers == {\"abc\": \"***\"} # no change expected mocker.patch(\"scanapi.hide_utils._hide\", return_value=\"***\") response.headers[\"def\"] = \"***\" _override_info(response, http_attr, secret_field) assert response.headers == {\"abc\": \"***\", \"def\": \"***\"} # no change expected \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "scikit-fingerprints/scikit-fingerprints", + "expected": "(6, 4)", + "got": "(6, 4) validate_train_test_split_sizes(0.6, 10, None) == (6, 4) validate_train_test_split_sizes(0.6, 10, 10) == (6, 4) validate_train_test_split_sizes(0.6, 10, 10, 10) == (6, 4) validate_train_test_split_sizes(0.6, 10, 10, 10, 10) == (6, 4) validate_train_test_split_sizes(0.6, 1", + "got_raw": "(6, 4) validate_train_test_split_sizes(0.6, 10, None) == (6, 4) validate_train_test_split_sizes(0.6, 10, 10) == (6, 4) validate_train_test_split_sizes(0.6, 10, 10, 10) == (6, 4) validate_train_test_split_sizes(0.6, 10, 10, 10, 10) == (6, 4) validate_train_test_split_sizes(0.6, 1", + "exact_match": false, + "code_bleu": 0.05770006468811202, + "edit_similarity": 0.042105263157894736 + }, + { + "repo": "scikit-fingerprints/scikit-fingerprints", + "expected": "labels)", + "got": "labels)", + "got_raw": "labels) assert_array_equal(mols_out, mols) assert_equal(mols_out[0], mols[0]) assert_equal(labels_out[0], labels[0]) assert_equal(mols_out[0].GetNumConformers(), 1) assert_equal(labels_out[0].GetNumConformers(), 1) assert_equal(mols_out[0].GetNumAtoms(), 1) assert_equal(labels_out[0].GetNumAtoms(), 1) assert_equal(mols_out[0].GetNumBonds(), 0) assert_equal(labels_out[0].GetNumBonds(), 0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "scikit-fingerprints/scikit-fingerprints", + "expected": "(6,))", + "got": "(3,))", + "got_raw": "(3,))\n assert_equal(condition_names, np.array([\"RO5\"]))\n\ndef test_bro5_filtering() -> None:\n filt = BeyondRo5Filter()\n mol = Mol.from_smiles(\"CC(=O)Nc1ccc(O)cc1\")\n assert filt.filter(mol) is True\n mol = Mol.from_smiles(\"CN1C=NC2=C1C(=O)N(C(=O)N2C)C\")\n assert filt.filter(mol) is False\n mol = Mol.from_smiles(\"c1ncccc1", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.8 + }, + { + "repo": "scikit-fingerprints/scikit-fingerprints", + "expected": "(5,))", + "got": "(2,))", + "got_raw": "(2,)) # 2 conditions in the filter\n assert_equal(condition_names[0], \"Rule of Xu\") # first condition name\n assert_equal(condition_names[1], \"Rule of Xu (2)\") # second condition name\n\n\ndef test_rule_of_xu_filtering() -> None:\n filt = RuleOfXuFilter()\n smiles = [\n \"C1CC1N2C=C(C(=O)C3=CC(=C(C=C32)N4CCNCC4)F)C(=O)O\", # Ciproflox", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.8 + }, + { + "repo": "scikit-fingerprints/scikit-fingerprints", + "expected": "(4,))", + "got": "(3,))", + "got_raw": "(3,))\n assert_equal(condition_names, np.array([\"RuleOfFour\"]))", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.8 + }, + { + "repo": "scikit-fingerprints/scikit-fingerprints", + "expected": "0)", + "got": "2)", + "got_raw": "2)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "scikit-fingerprints/scikit-fingerprints", + "expected": "len(y))", + "got": "len(y))", + "got_raw": "len(y))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "scikit-fingerprints/scikit-fingerprints", + "expected": "np.uint8", + "got": "np.uint8", + "got_raw": "np.uint8", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "scikit-fingerprints/scikit-fingerprints", + "expected": "0)", + "got": "2)", + "got_raw": "2) # 2 molecules failed the filter\n\n\ndef test_mols_passing_reos(smiles_passing_reos):\n mol_filter = REOSFilter()\n smiles_filtered = mol_filter.transform(smiles_passing_reos)\n assert all(isinstance(x, str) for x in smiles_filtered)\n assert_equal(len(smiles_filtered), 2) # 2 molecules passed the filter\n\n\ndef test_mols_passing_one_fail(smiles_passing_one_fail):\n mol_filter = REOSFilter()\n smiles_filtered = mol_filter.transform(smiles_passing_one_fail)\n assert all(isinstance(x, str", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "scikit-fingerprints/scikit-fingerprints", + "expected": "len(mols))", + "got": "len(mols))", + "got_raw": "len(mols))\n assert_equal(len(train), int(0.7 * len(mols)))\n assert_equal(len(test), int(0.3 * len(mols)))\n\ndef test_maxmin_train_valid_test_split_return_molecules(varied_mols):\n mols = [Chem.MolFromSmiles(smi) for smi in varied_mols]\n train, valid, test = maxmin_train_valid_test_split(\n mols, train_size=0.7, valid_size=0.2, test_size=0.1\n )\n\n assert all(isinstance(m, Mol)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "scikit-fingerprints/scikit-fingerprints", + "expected": "(1,))", + "got": "(3,))", + "got_raw": "(3,))\n assert_equal(condition_names, np.array([\"MW\"]))\n\ndef test_mol_weight_condition_values() -> None:\n filt = MolecularWeightFilter()\n condition_values = filt.get_feature_values()\n\n assert isinstance(condition_values, np.ndarray)\n assert_equal(condition_values.shape, (3,))\n assert_equal(condition_values, np.array([100, 500, 1000]))\n\n\ndef test_mol_weight_filter_smiles() -> None:\n filt = MolecularWeightFilter(100, 500)\n mol = Mol", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.8 + }, + { + "repo": "scikit-fingerprints/scikit-fingerprints", + "expected": "len(y))", + "got": "len(y))", + "got_raw": "len(y)) assert_equal(y.shape, (len(all_smiles),)) assert np.all(y == labels) assert np.all(~np.isnan(y)) assert np.all(~np.isnan(condition_indicators)) assert np.all(~np.isnan(y.astype(float))) assert np.all(~np.isnan(condition_indicators.astype(float))) assert np.all(~np.isnan(y.astype(int))) assert np.all(~np.isnan(condition_indicators.astype(int))) assert np.all(~np.isnan(y.astype(bool))) assert np.all(~np.isnan(condition_indicators.astype(bool))) assert np.all(~np.isnan(y.astype(np.float32))) assert np.all(~np.isnan(condition_indicators", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "scikit-fingerprints/scikit-fingerprints", + "expected": "np.uint32", + "got": "np.uint8", + "got_raw": "np.uint8 X_e3fp.dtype == np.uint8\n\n\ndef test_e3fp_count_fingerprint_sparse(mols_conformers_list):\n e3fp_fp = E3FPFingerprint(count=True, n_jobs=-1, sparse=True)\n X_skfp = e3fp_fp.transform(mols_conformers_list)\n\n X_e3fp = scipy.sparse.csr_matrix(\n [e3fp_fp._calculate_single_mol_fingerprint(mol) for mol in mols_conformers_list]\n )\n\n assert_equal(X_skfp, X_e3fp)\n assert_equal(X", + "exact_match": false, + "code_bleu": 0.5946035575013605, + "edit_similarity": 0.8235294117647058 + }, + { + "repo": "scikit-fingerprints/scikit-fingerprints", + "expected": "(8, 2)", + "got": "(5, 5)", + "got_raw": "(5, 5) # Default split sizes for 10 samples. def test_validate_train_test_split_sizes_both_present(): train_size = 3 test_size = 7 assert validate_train_test_split_sizes(train_size, test_size, 10) == (3, 7) # Custom split sizes for 10 samples. def test_validate_train_test_split_sizes_train_missing(): test_size = 7 assert validate_train_test_split_sizes(None, test_size, 10) == (5, 7) # Custom test size for 10 samples. def", + "exact_match": false, + "code_bleu": 0.32466791547509893, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "scikit-fingerprints/scikit-fingerprints", + "expected": "len(y))", + "got": "len(y))", + "got_raw": "len(y))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "scikit-fingerprints/scikit-fingerprints", + "expected": "X_skfp_2)", + "got": "X_skfp_2)", + "got_raw": "X_skfp_2)\n assert not (X_skfp is X_skfp_2)\n\n\ndef test_base_transform_fingerprint_type(smiles_list):\n atom_pair_fp = AtomPairFingerprint(n_jobs=-1)\n X_skfp = atom_pair_fp.transform(smiles_list, copy=False)\n X_skfp_2 = atom_pair_fp.transform(smiles_list, copy=True)\n\n assert isinstance(X_skfp, IntSparseIntVect) or isinstance(\n X_skfp, LongSparseIntVect) or isinstance(X_skfp, SparseBitVect) or isinstance(\n ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "scikit-fingerprints/scikit-fingerprints", + "expected": "(6, 3, 1)", + "got": "(3, 2, 1)", + "got_raw": "(3, 2, 1) # 3 + 2 + 1 = 6 # 0.3 + 1 + 10 = 11.3 # 0.3 + 1 + 10 = 11.3 # 0.3 + 1 + 10 = 11.3 # 0.3 + 1 + 10 = 11.3 # 0.3 + 1 + 10 = 11.3 # 0.3 + 1 + ", + "exact_match": false, + "code_bleu": 0.42728700639623407, + "edit_similarity": 0.7777777777777778 + }, + { + "repo": "scikit-fingerprints/scikit-fingerprints", + "expected": "X_rdkit)", + "got": "X_rdkit)", + "got_raw": "X_rdkit) def test_erg_sparse_fingerprint(smiles_list): erg_fp = ERGFingerprint(variant=\"sparse\", n_jobs=-1) X_skfp = erg_fp.transform(smiles_list) mols_list = [MolFromSmiles(smi) for smi in smiles_list] X_rdkit = np.array([GetErGFingerprint(mol, fuzzIncrement=0) for mol in mols_list]) X_rdkit = (X_rdkit > 0).astype(np.uint8) assert_allclose(X_skfp, X_rdkit) def test_erg_sparse_fingerprint", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "scikit-fingerprints/scikit-fingerprints", + "expected": "len(y))", + "got": "len(y))", + "got_raw": "len(y))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "scikit-fingerprints/scikit-fingerprints", + "expected": "valid", + "got": "valid", + "got_raw": "valid assert split_idxs[\"test\"] == test\n\n\n@pytest.mark.parametrize(\"dataset_name\", TDC_DATASET_NAMES)\ndef test_load_ogb_splits_as_list(dataset_name):\n train, valid, test = load_tdc_splits(dataset_name)\n split_idxs = load_tdc_splits(dataset_name, as_dict=False)\n assert isinstance(split_idxs, list) assert split_idxs == [train, valid, test]\n\n\n@pytest.mark.parametrize(\"dataset_name\", TDC_DATASET_NAMES)\ndef test_load_ogb_splits(dataset_name):\n train, valid, test = load_tdc_splits(dataset_name)\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "se2p/pynguin", + "expected": "None", + "got": "None", + "got_raw": "None and isinstance(statement.value, str) and len(statement.value) > 0, \"Invalid string statement\" self._backup(statement) while len(statement.value) > 0: statement.value = statement.value[1:] improvement = self._objective.has_changed(self._chromosome) if improvement in {LS_Imp.DETERIORATION, LS_Imp.NONE} and len(statement.value) > 0: self._restore(statement) return True if improvement in {LS_Imp.DETERIORATION, LS_Imp.IMPROVEMENT} and len(statement.value) == 0: self._logger.debug( \"The removal of the", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "se2p/pynguin", + "expected": "1", + "got": "1", + "got_raw": "1 # noqa: E741\n if randomness.next_float() < 0.5: # noqa: E741\n return self._random_deletion() or self._random_replacement() # noqa: E741\n else: # noqa: E741\n return self._random_replacement() or self._random_deletion() # noqa: E741\n else: # noqa: E741\n return self._random_deletion() or self._random_replacement() # noqa: E741\n\n\nclass", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "se2p/pynguin", + "expected": "0", + "got": "0", + "got_raw": "0 assert branchless_codeobject_goal.predicate_id == 0 assert branchless_codeobject_goal.value is True assert branchless_codeobject_goal.branches == 0 assert branchless_codeobject_goal.branches_covered == 0 assert branchless_codeobject_goal.branches_uncovered == 1 assert branchless_codeobject_goal.branches_covered_percent == 0.0 assert branchless_codeobject_goal.branches_uncovered_percent == 100.0 assert branchless_codeobject_goal.branches_covered_ratio == 0.0 assert branchless_codeobject_goal.branches_uncovered_ratio == 1.0 assert branchless_code", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "se2p/pynguin", + "expected": "0", + "got": "5.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "5.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "se2p/pynguin", + "expected": "6", + "got": "5", + "got_raw": "5 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "se2p/pynguin", + "expected": "{}", + "got": "{\"foo\":", + "got_raw": "{\"foo\": \"bar\"} # type: ignore # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected-access # pylint: disable=protected", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "se2p/pynguin", + "expected": "conf", + "got": "conf", + "got_raw": "conf # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "se2p/pynguin", + "expected": "goals", + "got": "goals[0]", + "got_raw": "goals[0] | goals[1] | OrderedSet() | goals[0] | goals[1] | OrderedSet() | goals[0] | goals[1] | OrderedSet() | goals[0] | goals[1] | OrderedSet() | goals[0] | goals[1] | OrderedSet() | goals[0] | goals[1] | OrderedSet() | goals[0] | goals[1] | OrderedSet() | goals[0] | goals[1] | OrderedSet() | goals[0] | goals[1] | OrderedSet() | goals[", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.7692307692307693 + }, + { + "repo": "se2p/pynguin", + "expected": "[]", + "got": "\"\"", + "got_raw": "\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\"", + "exact_match": false, + "code_bleu": 0.25, + "edit_similarity": 0.0 + }, + { + "repo": "se2p/pynguin", + "expected": "rand", + "got": "rand", + "got_raw": "rand < 50 + 1 + 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "se2p/pynguin", + "expected": "3", + "got": "3", + "got_raw": "3 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 *", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "se2p/pynguin", + "expected": "new", + "got": "new", + "got_raw": "new", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "se2p/pynguin", + "expected": "set()", + "got": "set()", + "got_raw": "set()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "se2p/pynguin", + "expected": "None", + "got": "None", + "got_raw": "None # noqa: F821 # type: ignore\n self._value += 1 if randomness.next_float() < 0.5 else -1\n\n\nclass FloatPrimitiveStatement(PrimitiveStatement[float]):\n\n def __init__( # noqa: D107\n self,\n test_case: tc.TestCase,\n value: float | None = None,\n constant_provider: constants.ConstantProvider | None = None,\n local_search_applied: bool = False, # noqa: FBT001, FBT002\n ) -> None:\n super().__init__(\n ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "se2p/pynguin", + "expected": "foo", + "got": "foo", + "got_raw": "foo # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E71", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "se2p/pynguin", + "expected": "0", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "se2p/pynguin", + "expected": "op)", + "got": "0)", + "got_raw": "0)\n function_callable(\"a\", \"b\")\n trace_mock.assert_called_with(\"a\", \"b\", 1, 0)\n function_callable(\"b\", \"a\")\n trace_mock.assert_called_with(\"b\", \"a\", 2, 0)\n function_callable(\"b\", \"b\")\n trace_mock.assert_called_with(\"b\", \"b\", 3, 0)\n function_callable(\"c\", \"c\")\n trace_mock.assert_called_with(\"c\", \"c\", 4, 0)\n function_callable(\"c\", \"d\")\n trace_mock", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.4 + }, + { + "repo": "se2p/pynguin", + "expected": "0", + "got": "0", + "got_raw": "0\n\n\ndef test_add(pool):\n c = 1234567890\n pool.add(c)\n assert len(pool) == 1\n assert pool.get(c) == c\n\n\ndef test_add_twice(pool):\n c = 1234567890\n pool.add(c)\n pool.add(c)\n assert len(pool) == 1\n\n\ndef test_add_twice_different(pool):\n c = 1234567890\n d = 9876543210\n ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "se2p/pynguin", + "expected": "goal", + "got": "goal.id()", + "got_raw": "goal.id() + 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6153846153846154 + }, + { + "repo": "se2p/pynguin", + "expected": "\"int\"", + "got": "\"int\"", + "got_raw": "\"int\"\n\n\ndef test_isinstance_assertion_expected_type_with_qualname():\n assertion = ass.IsInstanceAssertion(\n MagicMock(), \"my.module\", \"int\")\n assert assertion.module == \"my.module\"\n\n assert assertion.qualname == \"int\"\n\n\ndef test_isinstance_assertion_expected_type_with_qualname_and_name():\n assertion = ass.IsInstanceAssertion(\n MagicMock(), \"my.module\", \"int\", \"MyInt\")\n assert assertion.module == \"my.module\"\n assert assertion.name == \"MyInt\"\n assert assertion.qualname == \"int", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "shakedzy/dython", + "expected": "result['metrics']", + "got": "result['class_names']", + "got_raw": "result['class_names'] and 'B' in result['class_names'] and 'C' in result['class_names'] and 'A' in result['class_colors'] and 'B' in result['class_colors'] and 'C' in result['class_colors'] and 'A' in result['class_order'] and 'B' in result['class_order'] and 'C' in result['class_order'] and 'A' in result['class_order'] and 'B' in result['class_order'] and 'C' in result['class_order'] and 'A' in result['class_order'] and 'B", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.6842105263157895 + }, + { + "repo": "shakedzy/dython", + "expected": "\"Sepal Length\"", + "got": "\"Sepal Length\" assert result.get_ylabel() == \"Count\" assert result.get_legend().get_title().get_text() == \"Target\" assert result.get_legend().get_title().get_fontsize() == 10 assert result.get_legend().get_title().get_bbox_to_anchor() == (0.0", + "got_raw": "\"Sepal Length\" assert result.get_ylabel() == \"Count\" assert result.get_legend().get_title().get_text() == \"Target\" assert result.get_legend().get_title().get_fontsize() == 10 assert result.get_legend().get_title().get_bbox_to_anchor() == (0.0, 1.0) assert result.get_legend().get_title().get_bbox_transform() == Axes.Bbox(0.0, 1.0) assert result.get_legend().get_title().get_fontsize() == 10 assert result.get_legend().get_title().get_bbox_to_anchor() == (0.", + "exact_match": false, + "code_bleu": 0.01933989749128927, + "edit_similarity": 0.109375 + }, + { + "repo": "shakedzy/dython", + "expected": "0.55)", + "got": "0.0)", + "got_raw": "0.0)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "shakedzy/dython", + "expected": "corr_mat.shape", + "got": "(3", + "got_raw": "(3, 3) assert indices.shape == (3,) assert np.allclose(result.values, corr_mat.values) assert np.allclose(indices, np.array([0, 1, 2]))", + "exact_match": false, + "code_bleu": 0.30120066786994826, + "edit_similarity": 0.0 + }, + { + "repo": "shakedzy/dython", + "expected": "1.0", + "got": "1.0000000000000002e-05", + "got_raw": "1.0000000000000002e-05 # Thresholds should end with 1e-5 (or similar)", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.24 + }, + { + "repo": "shakedzy/dython", + "expected": "ValueError)", + "got": "ValueError", + "got_raw": "ValueError, match=\"y_true and y_pred must have the same length\") as e_info:\n ks_abc(y_true, y_pred)\n assert str(e_info.value) == e_info.message", + "exact_match": false, + "code_bleu": 0.29730177875068026, + "edit_similarity": 0.9523809523809523 + }, + { + "repo": "shakedzy/dython", + "expected": "None", + "got": "None", + "got_raw": "None\n\n def test_split_hist_with_legend(self, iris_df):\n \"\"\"Test split_hist with legend (covers line 113-114)\"\"\"\n result = split_hist(iris_df, \"sepal length (cm)\", \"target\", legend=\"Target\")\n \n assert isinstance(result, Axes)\n # Verify legend was created with the correct title\n\n legend = result.get_legend()\n assert legend.get_title().get_text() == \"Target\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "shakedzy/dython", + "expected": "len(thresholds)", + "got": "len(pct2)", + "got_raw": "len(pct2) == len(thresholds) + 1 # +1 for the last threshold value of 1.0 # (100% of the data) assert ks_stat > 0.0 # KS statistic should be positive assert max_dist > 0.0 # Maximum distance should be positive assert classes == [0, 1] # Classes should be [0, 1]", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.5 + }, + { + "repo": "shakedzy/dython", + "expected": "1", + "got": "1.0", + "got_raw": "1.0", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "shakedzy/dython", + "expected": "result['ks_stat']", + "got": "result[\"ks\"]", + "got_raw": "result[\"ks\"] <= 1.0000000000000002 # 1.0000000000000002 is the smallest possible value for KS statistic in Python # due to floating-point precision errors. assert result[\"p-value\"] >= 0 and result[\"p-value\"] <= 1.0000000000000002 # 1.0000000000000002 is the smallest possible value for p-value in Python #", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.6896551724137931 + }, + { + "repo": "shakedzy/dython", + "expected": "df", + "got": "df", + "got_raw": "df # No copy made # Check if the original DataFrame is unchanged assert df.equals(pd.DataFrame({'a': [1, 2, 3]})) # Check if the result is a DataFrame assert isinstance(result, pd.DataFrame) # Check if the result is a copy of the original DataFrame assert result is not df # Check if the result is a copy of the original DataFrame assert result.equals(df) # Check if the result is a copy of the original DataFrame assert result is not df # Check if the result is a copy of the original DataFrame assert result.equals(df) ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "shotgun-sh/shotgun", + "expected": "None", + "got": "None", + "got_raw": "None # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E50", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "shotgun-sh/shotgun", + "expected": "3", + "got": "2", + "got_raw": "2 # At least two Python files should be found", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "shotgun-sh/shotgun", + "expected": "1", + "got": "\"1.0\"", + "got_raw": "\"1.0\" # Default version 1.0 assert history.messages == [] # Default empty messages list assert history.state == ConversationState() # Default empty state assert history.id == 0 # Default id assert history.created_at == datetime.utcnow() # Default current time assert history.updated_at == datetime.utcnow() # Default current time assert history.last_updated_by == \"\" # Default empty last updated by assert history.last_updated_at == datetime.utcnow() # Default current time assert history.last_updated_by_id == 0 # Default id of 0 assert history.last", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "shotgun-sh/shotgun", + "expected": "None", + "got": "None", + "got_raw": "None result.attachment_type == AttachmentType.IMAGE result.url == str(sample_png_file) result.mime_type == \"image/png\" result.size == 100 result.name is None result.description is None result.content is None result.content_type is None result.content_encoding is None result.content_base64 is None result.content_hash is None result.content_url is None result.content_size is None result.content_type is None result.content_encoding is None result.content_base64 is None result.content_hash is None result.content_url is None result.content_size is None result.content_type is None result.content_encoding is None result.content_base64 is None result.content_hash is", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "shotgun-sh/shotgun", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "shotgun-sh/shotgun", + "expected": "[]", + "got": "[]", + "got_raw": "[]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "shotgun-sh/shotgun", + "expected": "types", + "got": "types.names()", + "got_raw": "types.names() | types.namespaces() | types.types() | types.typespaces() | types.values() | types.valuespaces() | types.functions() | types.functionspaces() | types.macros() | types.macrospaces() | types.typespaces() | types.typespaces() | types.typespaces() | types.typespaces() | types.typespaces() | types.typespaces() | types.typespaces() | types.typespaces() | types.typespaces() | types.typespaces() | types.typespaces() | types.typespaces() | types.typespaces() | types.typespaces() | types.typespaces() | types.typespaces() | types", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5555555555555556 + }, + { + "repo": "shotgun-sh/shotgun", + "expected": "\"go\"", + "got": "\"go\"", + "got_raw": "\"go\" assert SupportedLanguage.RUST == \"rust\" assert SupportedLanguage.CPP == \"cpp\" assert SupportedLanguage.CSHARP == \"csharp\" assert SupportedLanguage.CSHARP_NET_CORE == \"csharpnetcore\" assert SupportedLanguage.CSHARP_NET_STANDARD == \"csharpnetstandard\" assert SupportedLanguage.CSHARP_NET_CORE_6 == \"csharpnetcore6\" assert SupportedLanguage.CSHARP_NET_STANDARD_6 == \"csharpnetstandard6\" assert SupportedLanguage.CSHARP_NET_CORE_7 == \"csharpnetcore7\" assert SupportedLanguage.CSHARP_NET_STANDARD_7 == \"c", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "shotgun-sh/shotgun", + "expected": "True", + "got": "True", + "got_raw": "True # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E71", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "shotgun-sh/shotgun", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" # Default label for frontier model\n assert msg.frontier_model_version == \"\" # Default version for frontier model\n assert msg.frontier_model_url == \"\" # Default URL for frontier model\n assert msg.frontier_model_description == \"\" # Default description for frontier model\n assert msg.frontier_model_author == \"\" # Default author for frontier model\n assert msg.frontier_model_license == \"\" # Default license for frontier model\n assert msg.frontier_model_tags == [] # Default tags for frontier model\n assert msg.frontier_model_created_by == \"\" # Default created by for frontier", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "shotgun-sh/shotgun", + "expected": "0", + "got": "0.0", + "got_raw": "0.0 # Token estimation should be positive. \"\"\" def test_estimate_tokens_from_message_parts(self): \"\"\"Test token estimation from a single message part.\"\"\" message_part = UserPromptPart(content=\"This is a test message.\") tokens = estimate_tokens_from_message_parts([message_part]) assert tokens == 10 # Token estimation for a single message part \"\"\" def test_token_limit_compactor(self): \"\"\"Test token compaction with a single message part.\"\"\" message_part = UserPromptPart(content=\"This is a test message.\") compacted = token_limit_compactor([message_part], 10) assert compacted[0].content ==", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "shotgun-sh/shotgun", + "expected": "data", + "got": "data.keys()", + "got_raw": "data.keys() data[\"statistics\"][\"total_files\"] == 50 data[\"statistics\"][\"total_nodes\"] == 200 data[\"statistics\"][\"total_relationships\"] == 400 data[\"statistics\"][\"avg_throughput\"] == 10.0 data[\"statistics\"][\"peak_memory_mb\"] == 100.0 data[\"runs\"][0][\"metrics\"][\"total_duration_seconds\"] == 5.0 data[\"runs\"][0][\"metrics\"][\"phase_metrics\"] == {} data[\"runs\"][0][\"metrics\"][\"file_metrics\"] == [] data[\"runs\"][0][\"metrics\"][\"total_files\"] == 50 data[\"", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5333333333333333 + }, + { + "repo": "shotgun-sh/shotgun", + "expected": "part.content", + "got": "part.content.lower()", + "got_raw": "part.content.lower() \\ \"switch to planning\" in part.content.lower() \\ \"initial user request\" in part.content.lower() \\ \"test response\" in part.content.lower() \\ \"test prompt\" in part.content.lower() \\ \"test\" in part.content.lower() \\ \"test\" in part.content.lower() \\ \"test\" in part.content.lower() \\ \"test\" in part.content.lower() \\ \"test\" in part.content.lower() \\ \"test\" in part.content.lower() \\ \"test\" in part.content.lower() \\ \"test\" in part.content.lower() \\ \"test\" in part.content.lower() \\", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.75 + }, + { + "repo": "shotgun-sh/shotgun", + "expected": "None", + "got": "None", + "got_raw": "None # SDK should be initialized with a service instance.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "shotgun-sh/shotgun", + "expected": "types", + "got": "types.keys()", + "got_raw": "types.keys() types[\"type_declaration\"] = { \"name\": \"type_declaration\", \"description\": \"A type declaration.\", \"children\": [ \"type_identifier\", \"type_parameters\", \"type_body\", ], } type_identifier = types[\"type_identifier\"] type_identifier[\"name\"] = \"type_identifier\" type_identifier[\"description\"] = \"The name of the type.\" type_identifier[\"children\"] = [ \"identifier\", ] type_parameters = types[\"type_parameters\"] type_parameters[\"name\"] = \"type_parameters\" type_parameters[\"description\"] = \"The type parameters of the type.\" type_parameters[\"children\"] = [ \"type_parameter_list", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5882352941176471 + }, + { + "repo": "shotgun-sh/shotgun", + "expected": "2", + "got": "2", + "got_raw": "2 # Tier should be preserved\n\n\ndef test_migrate_v8_to_v9_with_existing_context7():\n \"\"\"Test v8->v9 migration doesn't overwrite existing context7 field.\"\"\"\n config = V8_CONFIG.copy()\n config[\"context7\"] = \"existing\" # Already has context7\n\n result = _migrate_v8_to_v9(config)\n\n assert result[\"config_version\"] == 9\n\n assert result[\"context7\"] == \"existing\" # context7 should be preserved\n\n\ndef test_migrate_v9_to_v10_with_existing_openrouter():\n \"\"\"Test", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "shotgun-sh/shotgun", + "expected": "md", + "got": "md.lower()", + "got_raw": "md.lower() # noqa: W605", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "shotgun-sh/shotgun", + "expected": "1", + "got": "1", + "got_raw": "1 assert list_result.graphs[0].name == \"Test Codebase\" assert list_result.graphs[0].repo_path == str(simple_python_codebase.resolve()) assert list_result.graphs[0].file_count > 0 assert list_result.graphs[0].node_count > 0 assert list_result.graphs[0].relationship_count > 0\n\n\n@pytest.mark.integration\n@pytest.mark.asyncio\nasync def test_index_codebase_failure(temp_storage_dir, invalid_python_codebase):\n \"\"\"Test failure to index a codebase with invalid codebase.\"\"\"\n sdk = CodebaseSDK(temp_storage_dir / \"index_test\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "shotgun-sh/shotgun", + "expected": "output", + "got": "output.strip()", + "got_raw": "output.strip() # noqa: W605 # noqa: W605 # noqa: W605 # noqa: W605 # noqa: W605 # noqa: W605 # noqa: W605 # noqa: W605 # noqa: W605 # noqa: W605 # noqa: W605 # noqa: W605 # noqa: W605 # noqa: W605 # noqa: W605 # noqa: W605 # noqa: W605 # noqa: W6", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6 + }, + { + "repo": "shotgun-sh/shotgun", + "expected": "4", + "got": "4", + "got_raw": "4 # Set via SHOTGUN_INDEX_WORKERS setting", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissaschool/xmlschema", + "expected": "2)", + "got": "2)", + "got_raw": "2)\n self.assertEqual(len(namespaces['tns0']), 1)\n self.assertEqual(len(namespaces['tns1']), 1)\n self.assertEqual(len(namespaces['tns2']), 0)\n self.assertEqual(len(namespaces['tns3']), 0)\n self.assertEqual(len(namespaces['tns4']), 0)\n self.assertEqual(len(namespaces['tns5']), 0)\n self.assertEqual(len(namespaces['tns6']), 0)\n self.assertEqual(len(namespaces['tns7']), 0)\n self.assertEqual(len(names", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissaschool/xmlschema", + "expected": "facet)", + "got": "facet)", + "got_raw": "facet)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissaschool/xmlschema", + "expected": "4.6 * 1024 ** 2)", + "got": "10 * 1024 ** 2) else: self.assertLessEqual(validate_mem", + "got_raw": "10 * 1024 ** 2) else: self.assertLessEqual(validate_mem, 10 * 1024 ** 2) self.assertLessEqual(lazy_validate_mem, 12 * 1024 ** 2) if platform.system() == 'Windows': self.assertLessEqual(validate_mem, 12 * 1024 ** 2) self.assertLessEqual(lazy_validate_mem, 14 * 1024 ** 2) else: self.assertLessEqual(validate_mem, 14 * 1024 ** 2)", + "exact_match": false, + "code_bleu": 0.4001601601922499, + "edit_similarity": 0.36619718309859156 + }, + { + "repo": "sissaschool/xmlschema", + "expected": "4)", + "got": "1)", + "got_raw": "1) self.assertEqual(len(ns_schemas[0].schemas), 1) self.assertEqual(len(ns_schemas[0].schemas[0].schemas), 0) self.assertEqual(len(ns_schemas[0].schemas[0].schemas[0].schemas), 0) self.assertEqual(len(ns_schemas[0].schemas[0].schemas[0].schemas[0].schemas), 0) self.assertEqual(len(ns_schemas[0].schemas[0].schemas[0].schemas[0].schemas[0].schemas), 0) self.assertEqual(len(ns_schemas[0].schemas[0].schemas[0", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "sissaschool/xmlschema", + "expected": "2)", + "got": "2)", + "got_raw": "2) self.assertEqual(data_element[0].tag, 'elem0') self.assertEqual(data_element[1].tag, 'elem1') data_element.extend([DataElement('elem2'), DataElement('elem3')]) self.assertEqual(len(data_element), 4) self.assertEqual(data_element[2].tag, 'elem2') self.assertEqual(data_element[3].tag, 'elem3') data_element.remove(data_element[1]) self.assertEqual(len(data_element), 3) self.assertEqual(data_element[1].tag, 'elem3') data_element[1] = DataElement('elem1') self.assertEqual(len(data_element),", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissaschool/xmlschema", + "expected": "'INF')", + "got": "'inf')", + "got_raw": "'inf') self.assertEqual(float_type.encode(float('-inf')), '-inf') self.assertEqual(float_type.encode(float('nan')), 'nan') self.assertEqual(float_type.encode(0.0), '0.0') self.assertEqual(float_type.encode(1.0), '1.0') self.assertEqual(float_type.encode(2.0), '2.0') self.assertEqual(float_type.encode(3.0), '3.0') self.assertEqual(float_type.encode(4.0), '4.0') self.assertEqual(float_type.encode(5.0), '5.0') self.assertEqual(float_type.encode(6.0), '", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "sissaschool/xmlschema", + "expected": "2)", + "got": "1)", + "got_raw": "1) self.assertEqual(schema.all_errors[0].message, \"missing required attribute 'name'\") self.assertEqual(schema.all_errors[0].code, 'cvc-attribute.3.2.2') self.assertEqual(schema.all_errors[0].level, 'error') self.assertEqual(schema.all_errors[0].type, 'attribute') self.assertEqual(schema.all_errors[0].tag, 'xs:attribute') self.assertEqual(schema.all_errors[0].text, '') self.assertEqual(schema.all_errors[0].line, 1) self.assertEqual(schema.all_errors[0].col, 1) self.assertEqual(schema.all_errors[0].", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "sissaschool/xmlschema", + "expected": "len(ordered_types)", + "got": "len(ordered_types)", + "got_raw": "len(ordered_types) + len(unordered) + deleted + 1 # 1 for the 'anyType' type # 1 for the 'anySimpleType' type # 1 for the 'any' type # 1 for the 'anyAttribute' type # 1 for the 'anyElement' type # 1 for the 'anyMixed' type # 1 for the 'anySimple' type # 1 for the 'anyComplex' type # 1 for the 'anySimpleContent' type # 1 for the 'anyComplexContent' type # 1 for the 'anyMixedContent' type", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissaschool/xmlschema", + "expected": "[])", + "got": "[])", + "got_raw": "[])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissaschool/xmlschema", + "expected": "0)", + "got": "0)", + "got_raw": "0)\n group = ModelGroup('sequence', min_occurs=1)\n self.assertEqual(group.effective_min_occurs, 1)\n group = ModelGroup('sequence', min_occurs=2)\n self.assertEqual(group.effective_min_occurs, 2)\n group = ModelGroup('sequence', min_occurs=3)\n self.assertEqual(group.effective_min_occurs, 3)\n group = ModelGroup('sequence', min_occurs=4)\n self.assertEqual(group.effective_min_occurs, 4)\n group = ModelGroup('sequence', min_occ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissaschool/xmlschema", + "expected": "9)", + "got": "9)", + "got_raw": "9)\n data_element.set('b', 'bar')\n self.assertEqual(data_element.get('b'), 'bar')\n data_element.set('b', 9)\n self.assertEqual(data_element.get('b'), 9)\n data_element.set('b', 'bar')\n self.assertEqual(data_element.get('b'), 'bar')\n data_element.set('b', 9)\n self.assertEqual(data_element.get('b'), 9)\n data_element.set('b', 'bar')\n self.assertEqual(data_element.get('b'), 'bar')\n data_element.set('", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissaschool/xmlschema", + "expected": "1)", + "got": "1)", + "got_raw": "1)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissaschool/xmlschema", + "expected": "'')", + "got": "'')", + "got_raw": "'')\n\n facet = schema.types['string2'].get_facet(XSD_ASSERTION)\n self.assertIsInstance(facet, XsdAssertionFacet)\n self.assertEqual(facet(''), 'last()')\n\n facet = schema.types['string3'].get_facet(XSD_ASSERTION)\n self.assertIsInstance(facet, XsdAssertionFacet)\n self.assertEqual(facet(''), 'position()')\n\n facet = schema.types['integer_vector'].get_facet(XSD_ASSERTION)\n self.assertIsInstance(facet, XsdAssertionFacet)\n self.assertEqual(facet(''), 'count", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissaschool/xmlschema", + "expected": "0)", + "got": "1)", + "got_raw": "1)\n self.assertEqual(len(mapper._xmlns_contexts[0]), 2) # noqa: E501\n\n mapper.set_context('http://example.test/foo', 'foo') # noqa: E501\n self.assertEqual(len(mapper._xmlns_contexts), 2) # noqa: E501\n self.assertEqual(len(mapper._xmlns_contexts[1]), 1) # noqa: E501\n self.assertEqual(mapper._xmlns_contexts[1][0], 'foo') # noqa: E501\n\n mapper.set_context('http://example", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "sissaschool/xmlschema", + "expected": "2)", + "got": "2)", + "got_raw": "2)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissaschool/xmlschema", + "expected": "2.6 * 1024 ** 2)", + "got": "6 * 1024 ** 2) self.assertLessEqual(lazy_decode_mem", + "got_raw": "6 * 1024 ** 2) self.assertLessEqual(lazy_decode_mem, 4 * 1024 ** 2) if platform.system() == 'Windows': self.assertLessEqual(decode_mem, 10 * 1024 ** 2) self.assertLessEqual(lazy_decode_mem, 8 * 1024 ** 2) else: self.assertLessEqual(decode_mem, 12 * 1024 ** 2) self.assertLessEqual(lazy_decode_mem, 10 * 1024 ** 2)", + "exact_match": false, + "code_bleu": 0.4703709593866897, + "edit_similarity": 0.417910447761194 + }, + { + "repo": "sissaschool/xmlschema", + "expected": "7)", + "got": "2)", + "got_raw": "2)\n\n def test_iterparse_argument_lxml(self):\n resource = XMLResource(self.vh_xml_file, iterparse=lxml.etree.iterparse)\n\n k = 0\n for k, elem in enumerate(resource.root.iter(), start=1):\n self.assertTrue(is_lxml_element(elem))\n self.assertFalse(is_etree_element(elem))\n self.assertIsInstance(elem, lxml.etree._Element)\n if k == 0:\n self.assertIs(elem, resource.root)\n\n self.assertEqual(k, 1)\n\n def test_iterparse_argument_both(self):\n resource = XMLResource", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "sissaschool/xmlschema", + "expected": "schema)", + "got": "schema)", + "got_raw": "schema)\n\n def test_get_context_with_schema_file(self):\n source, schema = get_context(self.col_xml_file, self.col_xsd_file)\n self.assertIsInstance(source, XMLResource)\n self.assertIsInstance(schema, XMLSchema10)\n\n col_schema = XMLSchema10(self.col_xsd_file)\n source, schema = get_context(self.col_xml_file, col_schema)\n self.assertIsInstance(source, XMLResource)\n self.assertIs(schema, col_schema)\n\n source, schema = get_context(self.vh_xml_file, self.vh_xsd_file)\n self.assertIsInstance(source", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissaschool/xmlschema", + "expected": "0)", + "got": "0)", + "got_raw": "0)\n self.assertEqual(maps.local_maps.total, 0)\n self.assertEqual(maps.types.total, 0)\n self.assertEqual(maps.types_by_name.total, 0)\n self.assertEqual(maps.types_by_namespace.total, 0)\n self.assertEqual(maps.types_by_prefix.total, 0)\n self.assertEqual(maps.types_by_target_namespace.total, 0)\n self.assertEqual(maps.types_by_target_namespace_and_prefix.total, 0)\n self.assertEqual(maps.types_by_target_namespace_and_local_name.total, 0)\n self.assertEqual(maps.types_by_target", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissaschool/xmlschema", + "expected": "str)", + "got": "str)", + "got_raw": "str) self.assertIsInstance(e.path, str) self.assertIsInstance(e.code, str) self.assertIsInstance(e.message, str) self.assertIsInstance(e.schema, XMLSchemaBase) self.assertIsInstance(e.schema.url, str) self.assertIsInstance(e.schema.version, str) self.assertIsInstance(e.schema.validity, str) self.assertIsInstance(e.schema.target_namespace, str) self.assertIsInstance(e.schema.namespaces, dict) self.assertIsInstance(e.schema.namespaces[''], str) self.assertIsInstance(e.schema.namespaces['tns0'], str) self.assertIsInstance(e.schema.namespaces['tns1'], str) self.assertIsInstance(e.schema.namespaces['tns2'], str) self.assertIsInstance(e.schema", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissbruecker/linkding", + "expected": "self.user)", + "got": "self.user)", + "got_raw": "self.user) self.assertEqual(bundle.name, \"Test Bundle\") self.assertEqual(bundle.search, \"test search\") self.assertEqual(bundle.any_tags, \"tag1 tag2\") self.assertEqual(bundle.all_tags, \"required-tag\") self.assertEqual(bundle.excluded_tags, \"excluded-tag\") self.assertRedirects(response, reverse(\"linkding:bundles.detail\", kwargs={\"pk\": bundle.pk})) self.assertContains(response, \"Test Bundle\") self.assertContains(response, \"test search\") self.assertContains(response, \"tag1\") self.assertContains(response, \"tag2\") self.assertContains(response, \"required-tag\") self.assertContains(response, \"ex", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissbruecker/linkding", + "expected": "form)", + "got": "form)", + "got_raw": "form) self.assertEqual(form[\"action\"], expected_action) self.assertEqual(form[\"method\"], \"post\") self.assertEqual(form[\"id\"], \"toast-acknowledge\") self.assertEqual(form[\"class\"], \"toast-acknowledge\") self.assertEqual(form[\"data-return-url\"], reverse(\"linkding:bookmarks.index\")) self.assertEqual(form[\"data-key\"], \"test\") self.assertEqual(form[\"data-message\"], \"test\") self.assertEqual(form[\"data-acknowledged\"], \"false\") self.assertEqual(form[\"data-redirect\"], \"true\") self.assertEqual(form[\"data-redirect-url\"], reverse(\"linkding:bookmarks.index\")) self.assertEqual(form[\"data", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissbruecker/linkding", + "expected": "bookmark2.tags.all())", + "got": "bookmark2.tags.all())", + "got_raw": "bookmark2.tags.all())", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissbruecker/linkding", + "expected": "self.get_text(merge_tags_group))", + "got": "self.get_text(merge_tags_group))", + "got_raw": "self.get_text(merge_tags_group))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissbruecker/linkding", + "expected": "user.has_usable_password())", + "got": "user.check_password(\"password123\"))", + "got_raw": "user.check_password(\"password123\"))", + "exact_match": false, + "code_bleu": 0.32172944208038085, + "edit_similarity": 0.6129032258064516 + }, + { + "repo": "sissbruecker/linkding", + "expected": "1)", + "got": "1)", + "got_raw": "1) self.assertEqual( bookmark.snapshot_url, \"https://example.com/created_snapshot\" ) self.assertEqual( bookmark.snapshot_url_short, \"https://web.archive.org/web/created_snapshot\" ) self.assertEqual( bookmark.snapshot_url_long, \"https://web.archive.org/web/long/created_snapshot\" ) self.assertEqual( bookmark.snapshot_url_short_long, \"https://web.archive.org/web/long/created_snapshot\" ) self.assertEqual( bookmark.snapshot_url_short_long_short, \"https://web.archive.org/web/long/created_snapshot\" ) self.assertEqual( bookmark.snapshot_url_short_long_short_long, \"https://web.archive.org/web/long", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissbruecker/linkding", + "expected": "[])", + "got": "[])", + "got_raw": "[]) self.assertCountEqual(bookmark2.tags.all(), [tag1]) self.assertCountEqual(bookmark3.tags.all(), [tag2]) self.assertBookmarksAreUnmodified([bookmark1, bookmark2, bookmark3]) def test_can_bulk_tag(self): tag1 = self.setup_tag() tag2 = self.setup_tag() bookmark1 = self.setup_bookmark() bookmark2 = self.setup_bookmark() bookmark3 = self.setup_bookmark() self.client.post( reverse(\"linkding:bookmarks.index.action\"), { \"bulk_action\": [\"bulk_tag\"], \"bulk_execute\": [\"\"], \"bulk_tag_string\": [f", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissbruecker/linkding", + "expected": "\"tag1\")", + "got": "\"tag1\")", + "got_raw": "\"tag1\") self.assertEqual(tags[1].name, \"tag2\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissbruecker/linkding", + "expected": "1)", + "got": "1)", + "got_raw": "1)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissbruecker/linkding", + "expected": "[form[\"sort\"]])", + "got": "[])", + "got_raw": "[])", + "exact_match": false, + "code_bleu": 0.27383275896268816, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "sissbruecker/linkding", + "expected": "radio.has_attr(\"checked\"))", + "got": "radio.has_attr(\"checked\"))", + "got_raw": "radio.has_attr(\"checked\")) else: self.assertFalse(radio.has_attr(\"checked\")) else: self.assertTrue(radio.has_attr(\"checked\"))) else: self.assertFalse(radio.has_attr(\"checked\"))) else: self.assertTrue(radio.has_attr(\"checked\"))) else: self.assertFalse(radio.has_attr(\"checked\"))) else: self.assertTrue(radio.has_attr(\"checked\"))) else: self.assertFalse(radio.has_attr(\"checked\"))) else: self.assertTrue(radio.has_attr(\"checked\"))) else: self.assertFalse(radio.has_attr(\"checked\"))) else: self.assertTrue(radio.has_attr(\"checked\"))) else: self", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissbruecker/linkding", + "expected": "second_tag.id)", + "got": "second_tag.id)", + "got_raw": "second_tag.id)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissbruecker/linkding", + "expected": "\"text/html\")", + "got": "\"text/html\")", + "got_raw": "\"text/html\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissbruecker/linkding", + "expected": "self.user)", + "got": "True)", + "got_raw": "True) # noqa: E501 \"\"\" Schedule update for favicons \"\"\" form_data = self.create_profile_form_data( { \"enable_favicons\": False, } ) self.client.post(reverse(\"linkding:settings.update\"), form_data) mock_schedule_bookmarks_without_favicons.assert_not_called() \"\"\" Schedule update for preview images \"\"\" form_data = self.create_profile_form_data( { \"enable_preview_images\": True, } ) self.client.post(reverse(\"linkding:settings.update\"), form_data) mock_schedule_bookmarks_without_favicons.assert_not_called() \"\"\" Schedule update for web archive integration \"\"\" form_data = self.create", + "exact_match": false, + "code_bleu": 0.2686424829558855, + "edit_similarity": 0.26666666666666666 + }, + { + "repo": "sissbruecker/linkding", + "expected": "data[\"bookmark\"])", + "got": "data[\"bookmark\"])", + "got_raw": "data[\"bookmark\"]) self.assertEqual(asset.name, data[\"name\"]) self.assertEqual(asset.url, data[\"url\"]) self.assertEqual(asset.description, data[\"description\"]) self.assertEqual(asset.created, data[\"created\"]) self.assertEqual(asset.modified, data[\"modified\"]) self.assertEqual(asset.file.name, data[\"file\"]) self.assertEqual(asset.file.size, data[\"file_size\"]) self.assertEqual(asset.file.url, data[\"file_url\"]) self.assertEqual(asset.file.type, data[\"file_type\"]) self.assertEqual(asset.file.mime_type, data[\"file_mime_type\"]) self.assertEqual(asset.file.extension, data[\"file_extension\"]) self.assertEqual(asset.file.mime_extension, data[\"file_mime_extension", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissbruecker/linkding", + "expected": "len(token_value) > 0)", + "got": "token_value.startswith(\"token-\"))", + "got_raw": "token_value.startswith(\"token-\"))", + "exact_match": false, + "code_bleu": 0.23356898886410002, + "edit_similarity": 0.48148148148148145 + }, + { + "repo": "sissbruecker/linkding", + "expected": "data[\"id\"])", + "got": "data[\"id\"])", + "got_raw": "data[\"id\"]) self.assertEqual(bundle.name, data[\"name\"]) self.assertEqual(bundle.description, data[\"description\"]) self.assertEqual(bundle.url, data[\"url\"]) self.assertEqual(bundle.user_id, data[\"user_id\"]) self.assertEqual(bundle.created_at, data[\"created_at\"]) self.assertEqual(bundle.updated_at, data[\"updated_at\"]) self.assertEqual(bundle.is_public, data[\"is_public\"]) self.assertEqual(bundle.is_archived, data[\"is_archived\"]) self.assertEqual(bundle.is_deleted, data[\"is_deleted\"]) self.assertEqual(bundle.is_favorite, data[\"is_favorite\"]) self.assertEqual(bundle.is_starred, data[\"is_starred\"]) self.assertEqual(bundle.is_", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissbruecker/linkding", + "expected": "count)", + "got": "count)", + "got_raw": "count)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissbruecker/linkding", + "expected": "[])", + "got": "[])", + "got_raw": "[]) self.assertCountEqual(bookmark3.tags.all(), [tag1])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sissbruecker/linkding", + "expected": "href)", + "got": "href)", + "got_raw": "href)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sixty-north/cosmic-ray", + "expected": "True)", + "got": "True)", + "got_raw": "True)\n\n def test_constant_false(self):\n\n self.assertEqual(adam.adam_1.constant_false(), \n### Target:\nFalse)\n\n def test_constant_1(self):\n\n self.assertEqual(adam.adam_1.constant_1(), 1)\n\n def test_constant_2(self):\n\n self.assertEqual(adam.adam_1.constant_2(), 2)\n\n def test_constant_3(self):\n\n self.assertEqual(adam.adam_1.constant_3(), 3)\n\n def test_constant_4(self):\n\n self.assertEqual(adam.adam_1.constant", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sixty-north/cosmic-ray", + "expected": "adam.adam_1.if_expression())", + "got": "adam.adam_1.if_expression())", + "got_raw": "adam.adam_1.if_expression()) self.assertFalse( adam.adam_1.if_expression()) self.assertTrue( adam.adam_1.if_expression()) self.assertFalse( adam.adam_1.if_expression()) self.assertTrue( adam.adam_1.if_expression()) self.assertFalse( adam.adam_1.if_expression()) self.assertTrue( adam.adam_1.if_expression()) self.assertFalse( adam.adam_1.if_expression()) self.assertTrue( adam.adam_1.if_expression()) self.assertFalse( adam.adam_1.if_expression()) self.assertTrue( adam.adam_1.if_expression()) self.assertFalse( adam.adam_1.if_expression", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sixty-north/cosmic-ray", + "expected": "0)", + "got": "1)", + "got_raw": "1)\n self.assertEqual(adam.adam_1.use_continue(10), 2)\n self.assertEqual(adam.adam_1.use_break_continue(10), 3)\n self.assertEqual(adam.adam_1.use_continue_break(10), 4)\n self.assertEqual(adam.adam_1.use_continue_break_continue(10), 5)\n self.assertEqual(adam.adam_1.use_continue_break_continue_continue(10), 6)\n self.assertEqual(adam.adam_1.use_continue_break_continue_continue_continue(10), 7)\n", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "sixty-north/cosmic-ray", + "expected": "adam.adam_1.bool_or())", + "got": "adam.adam_1.bool_or(True", + "got_raw": "adam.adam_1.bool_or(True, False)) self.assertTrue( adam.adam_1.bool_or(True, True)) self.assertFalse( adam.adam_1.bool_or(False, False)) self.assertFalse( adam.adam_1.bool_or(False, True)) self.assertTrue( adam.adam_1.bool_or(True, True)) self.assertTrue( adam.adam_1.bool_or(True, True)) self.assertTrue( adam.adam_1.bool_or(True, True)) self.assertTrue( adam.adam_1.bool_or(True, True)) self.assertTrue( adam.adam_1.bool_or(True, True)) self.assertTrue( adam.ad", + "exact_match": false, + "code_bleu": 0.7357843633470001, + "edit_similarity": 0.8695652173913043 + }, + { + "repo": "sixty-north/cosmic-ray", + "expected": "initial_num_work_items", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "sixty-north/cosmic-ray", + "expected": "count", + "got": "count", + "got_raw": "count * 2 + 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sixty-north/cosmic-ray", + "expected": "100.0", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.045112781954887216 + }, + { + "repo": "slackapi/bolt-python", + "expected": "1)", + "got": "1)", + "got_raw": "1) # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "slackapi/bolt-python", + "expected": "1)", + "got": "1)", + "got_raw": "1)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "slackapi/bolt-python", + "expected": "1)", + "got": "1)", + "got_raw": "1) result[\"call_count\"] == 3)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "slackapi/bolt-python", + "expected": "2)", + "got": "1)", + "got_raw": "1)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "slackapi/bolt-python", + "expected": "1)", + "got": "1)", + "got_raw": "1) assert_received_request_count(self) assert response.body == \"ok\" assert response.headers == {} assert response.body == \"ok\" assert response.headers == {} assert response.body == \"ok\" assert response.headers == {} assert response.body == \"ok\" assert response.headers == {} assert response.body == \"ok\" assert response.headers == {} assert response.body == \"ok\" assert response.headers == {} assert response.body == \"ok\" assert response.headers == {} assert response.body == \"ok\" assert response.headers == {} assert response.body == \"ok\" assert response.headers == {} assert response.body == \"ok\" assert response.headers == {}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "slackapi/bolt-python", + "expected": "None", + "got": "None", + "got_raw": "None\n\n def test_events_shared_channels(self):\n app = App(\n token=valid_token,\n signing_secret=self.signing_secret,\n client=self.web_client,\n )\n\n @app.event(\"app_mention\")\n def handle_app_mention(event, say: Say):\n say(\"Hello there!\")\n\n @app.event(\"reaction_added\")\n def handle_reaction_added(event, say: Say):\n say(\"Hello there!\")\n\n event = self.valid_event_body\n event[\"event\"][\"type\"] = \"reaction_added\"\n event[\"event\"][\"item\"][\"type\"] = \"message\"\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "slackapi/bolt-python", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "slackapi/bolt-python", + "expected": "\"foo\"", + "got": "\"foo\"", + "got_raw": "\"foo\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "slackapi/bolt-python", + "expected": "True", + "got": "True", + "got_raw": "True # noqa: E501\n\n @pytest.mark.asyncio\n async def test_event(self):\n app = AsyncApp(\n client=self.web_client,\n signing_secret=self.signing_secret,\n )\n api = Sanic(name=self.unique_sanic_app_name())\n app_handler = AsyncSlackRequestHandler(app)\n\n @api.post(\"/slack/events\")\n async def endpoint(req: Request):\n return await app_handler.handle(req)\n\n _, response = await api.asgi_client.post( url=\"/slack/events\", data=json.dumps({\"type\": \"event\"}) ) # noqa", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "slackapi/bolt-python", + "expected": "\"a\"", + "got": "\"a\"", + "got_raw": "\"a\" ack()\n\n\nasync def test_listener_with_context_async() async def test_listener_with_context_async() -> None: setup_mock_web_api_server() app = AsyncApp( token=\"xoxb-foo\", signing_secret=\"secret\", app_token=\"xoxb-async\", ) app.context.injector.bind(AsyncBoltContext) app.context.injector.bind(AsyncWebClient) app.context.injector.bind(SignatureVerifier) app.context.injector.bind(AsyncBoltRequest) app.context.injector.bind(int) app.context.injector.bind(str) app.context.injector.bind(float) app.context.injector.bind", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "slackapi/bolt-python", + "expected": "1)", + "got": "1)", + "got_raw": "1)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "slackapi/bolt-python", + "expected": "resp.body", + "got": "resp.body.decode()", + "got_raw": "resp.body.decode() resp = BoltResponse(200, headers={\"content-type\": [\"text/html; charset=utf-8\"]}, body=b\"\") resp = oauth_flow.handle_installation(req) assert resp.status == 200 assert resp.headers.get(\"content-type\") == [\"text/html; charset=utf-8\"] assert \"https://slack.com/oauth/v2/authorize?state=\" in resp.body.decode() resp = BoltResponse(200, headers={\"content-type\": [\"text/html; charset=utf-8\"]}, body=b\"\") resp = oauth_flow.handle_installation(req) assert resp.status == ", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "slackapi/bolt-python", + "expected": "self)", + "got": "self)", + "got_raw": "self) == 1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "slackapi/bolt-python", + "expected": "1)", + "got": "1)", + "got_raw": "1) # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "slackapi/bolt-python", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "slackapi/bolt-python", + "expected": "1)", + "got": "1)", + "got_raw": "1) def test_failure(self): app = App( client=self.web_client, installation_store=MyInstallationStore(), signing_secret=self.signing_secret, ) app.action(\"a\")(simple_listener) request = self.build_valid_request() request.body = \"invalid\" response = app.dispatch(request) assert response.status == 400 assert response.body == \"\" assert_auth_test_count(self, 0) def test_failure_with_error(self): app = App( client=self.web_client, installation_store=MyInstallationStore(), signing_secret=self.signing_secret, ) app.action(\"a\")(simple_listener) request = self.build_valid_request() request.body", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "slackapi/bolt-python", + "expected": "2)", + "got": "1)", + "got_raw": "1) async def test_file_share(self, say): await say(\"What's up?\") timestamp, body = str(int(time())), json.dumps(message_file_share_body) request = AsyncBoltRequest(body=body, headers=self.build_headers(timestamp, body)) response = await app.async_dispatch(request) assert response.status == 200 async def whats_up(say): await say(\"What's up?\") async def test_file_share(self, say): await say(\"What's up?\") timestamp, body = str(int(time())), json.dumps(message_file_share_body) request = AsyncBoltRequest(body=body, headers=self.build", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "slackapi/bolt-python", + "expected": "1)", + "got": "1)", + "got_raw": "1) app = App( client=self.web_client, signing_secret=self.signing_secret, installation_store=BotOnlyMemoryInstallationStore(), installation_store_bot_only=False, ) app.event(\"app_mention\")(self.handle_app_mention) response = app.dispatch(self.build_app_mention_request()) assert response.status == 404 assert_auth_test_count(self, 0) app = App( client=self.web_client, signing_secret=self.signing_secret, installation_store=BotOnlyMemoryInstallationStore(), installation_store_bot_only=True, ) app.event(\"app_mention\")(self.handle_app_mention) response = app.dispatch(self.build_app_ment", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "slackapi/bolt-python", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" # empty response body # TODO: add test for response body # TODO: add test for response headers # TODO: add test for response cookies # TODO: add test for response content_type # TODO: add test for response content_encoding # TODO: add test for response content_length # TODO: add test for response content_disposition # TODO: add test for response content_language # TODO: add test for response content_encoding # TODO: add test for response content_encoding # TODO: add test for response content_encoding # TODO: add test for response content_encoding # TODO:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "slackapi/bolt-python", + "expected": "1)", + "got": "1)", + "got_raw": "1)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sloria/TextBlob", + "expected": "TypeError)", + "got": "TypeError)", + "got_raw": "TypeError) as excinfo: ConllExtractor() # noqa: E501 excinfo.value.args[0] == \"Cannot instantiate incomplete extractor\" # noqa: E501 excinfo.value.args[1] == \"ConllExtractor\" # noqa: E501 excinfo.value.args[2] == \"missing 1 required positional argument: 'tags'\" # noqa: E501 excinfo.value.args[3] == \"tags\" # noqa: E501 excinfo.value.args[4] == \"str\" # noqa: E501 excinfo", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sloria/TextBlob", + "expected": "\",\"", + "got": "\",\".encode(\"utf-8\")", + "got_raw": "\",\".encode(\"utf-8\") # noqa: E501 # noqa: E501 def test_delimiter(self): \"\"\" Test that the delimiter can be set via the constructor \"\"\" df = formats.DelimitedFormat(delimiter=\"|\") assert df.delimiter == b\"|\" # noqa: E501 def test_delimiter_is_bytes(self): \"\"\" Test that the delimiter is bytes \"\"\" df = formats.DelimitedFormat(delimiter=\"|\") assert isinstance(df.delimiter, bytes) def test_delimiter_is_encoded(self): \"\"\" Test that the delimiter is encoded \"\"\" df = formats.Delimited", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.2727272727272727 + }, + { + "repo": "sloria/TextBlob", + "expected": "\"lenses\"", + "got": "\"lenses\"", + "got_raw": "\"lenses\" assert pluralize(\"child\") == \"children\" assert pluralize(\"man\") == \"men\" assert pluralize(\"foot\") == \"feet\" assert pluralize(\"mouse\") == \"mice\" assert pluralize(\"ox\") == \"oxen\" assert pluralize(\"sheep\") == \"sheep\" assert pluralize(\"deer\") == \"deer\" assert pluralize(\"fish\") == \"fish\" assert pluralize(\"goose\") == \"geese\" assert pluralize(\"goose\") == \"geese\" assert pluralize(\"goose\") == \"geese\" assert pluralize", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sloria/TextBlob", + "expected": "float", + "got": "float", + "got_raw": "float and 0.8 < a < 0.95\n\n def test_accuracy_on_a_json_file(self):\n with open(JSON_FILE) as fp:\n a = self.classifier.accuracy(fp)\n\n assert type(a) == float and 0.8 < a < 0.95\n\n def test_accuracy_on_a_tsv_file(self):\n with open(TSV_FILE) as fp:\n a = self.classifier.accuracy(fp)\n\n assert type(a) == float and 0.8 < a < 0.95\n\n def test_accuracy_on_a_string(self):\n a = self", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sloria/TextBlob", + "expected": "noun_phrases", + "got": "noun_phrases[0]", + "got_raw": "noun_phrases[0] and \"high-level\" in noun_phrases[1] and \"programming\" in noun_phrases[2] and \"language\" in noun_phrases[3] and \"general-purpose\" in noun_phrases[4] and \"widely\" in noun_phrases[5] and \"used\" in noun_phrases[6] and \"high-level\" in noun_phrases[7] and \"programming\" in noun_phrases[8] and \"language\" in noun_phrases[9] and \"high-level\" in noun_phrases[10] and \"programming\" in noun", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.8888888888888888 + }, + { + "repo": "sloria/TextBlob", + "expected": "0", + "got": "1.0", + "got_raw": "1.0 / 4.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "snap-stanford/MLAgentBench", + "expected": "agents_list", + "got": "agents_list[0]", + "got_raw": "agents_list[0]", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.88 + }, + { + "repo": "snap-stanford/MLAgentBench", + "expected": "[]", + "got": "[]", + "got_raw": "[]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "snap-stanford/MLAgentBench", + "expected": "\"an AI designed to browse bake a cake.\"", + "got": "\"an AI designed to browse bake a cake.\" assert ai_config.ai_goals == [\"Purchase ingredients\"", + "got_raw": "\"an AI designed to browse bake a cake.\" assert ai_config.ai_goals == [\"Purchase ingredients\", \"Bake a cake\"] assert ai_config.ai_goals_description == \"\" assert ai_config.ai_goals_priority == [] assert ai_config.ai_goals_weightage == [] assert ai_config.ai_goals_deadline == \"\" assert ai_config.ai_goals_status == \"Not started\" assert ai_config.ai_goals_progress == 0.0 assert ai_config.ai_goals_completed == 0.0 assert ai_config.ai_goals_remaining == 2.0 assert ai_config.ai_goals_estimated_time == 0.0 assert ai_config.ai_goals_estimated_cost == 0", + "exact_match": false, + "code_bleu": 0.14113991930789777, + "edit_similarity": 0.5954198473282443 + }, + { + "repo": "snap-stanford/MLAgentBench", + "expected": "\"Goal 4: Wake up\"", + "got": "\"Goal 4: Wake up\"", + "got_raw": "\"Goal 4: Wake up\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "snap-stanford/MLAgentBench", + "expected": "\"gpt-3.5-turbo\"", + "got": "\"gpt-3.5-turbo\"", + "got_raw": "\"gpt-3.5-turbo\" assert result[0][\"name\"] == \"gpt-3.5-turbo\" assert result[0][\"description\"] == \"GPT-3.5 Turbo\" assert result[0][\"max_tokens\"] == 4096 assert result[0][\"cost_per_token\"] == 0.0013 assert result[0][\"token_count\"] == 1000 assert result[0][\"model_type\"] == \"text\" assert result[0][\"embedding\"] == False assert result[0][\"embedding_model\"] == \"text-embedding-ada-", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "snap-stanford/MLAgentBench", + "expected": "caplog.text", + "got": "caplog.text.lower()", + "got_raw": "caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text.lower() caplog.text", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.7333333333333333 + }, + { + "repo": "snap-stanford/MLAgentBench", + "expected": "True", + "got": "True", + "got_raw": "True and message == \"Valid YAML file.\" def test_validate_yaml_file_invalid(): with open(\"invalid_test_file.yaml\", \"w\") as f: f.write(\"setting:\") result, message = validate_yaml_file(\"invalid_test_file.yaml\") os.remove(\"invalid_test_file.yaml\") assert result == False and message == \"Invalid YAML file.\" def test_readable_file_size(): assert readable_file_size(1024) == \"1.0 KB\" def test_get_current_git_branch(): assert get_current_git_branch() is not None def test_get_latest_bulletin(): assert get_latest_bulletin() is not None def test_get_bullet", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "snap-stanford/MLAgentBench", + "expected": "False", + "got": "False", + "got_raw": "False config.debug_mode = True assert config.debug_mode == True config.debug_mode = False assert config.debug_mode == False config.debug_mode = True assert config.debug_mode == True config.debug_mode = False assert config.debug_mode == False config.debug_mode = True assert config.debug_mode == True config.debug_mode = False assert config.debug_mode == False config.debug_mode = True assert config.debug_mode == True config.debug_mode = False assert config.debug_mode == False config.debug_mode = True assert config.debug_mode == True config.debug_mode = False assert config.debug_mode == False config.debug_mode = True assert config.debug_mode == True config.debug_mode = False assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "snap-stanford/MLAgentBench", + "expected": "agents", + "got": "agents[0]", + "got_raw": "agents[0] + \"\\n\" + \"1: Test Agent\" + \"\\n\" + \"2: Test Agent (paused)\" + \"\\n\" + \"3: Test Agent (suspended)\" + \"\\n\" + \"4: Test Agent (suspended and paused)\" + \"\\n\" + \"5: Test Agent (suspended and paused and stopped)\" + \"\\n\" + \"6: Test Agent (suspended and paused and stopped and paused)\" + \"\\n\" + \"7: Test Agent (suspended and paused and stopped and paused and stopped)\" + \"\\n\" + \"8: Test Agent", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.8 + }, + { + "repo": "snap-stanford/MLAgentBench", + "expected": "file_content", + "got": "file_content().replace(\"\\r\"", + "got_raw": "file_content().replace(\"\\r\", \"\") + \"\\n\" + \"This is a test file.\\n\" + \"This is a test file.\\n\" + \"This is a test file.\\n\" + \"This is a test file.\\n\" + \"This is a test file.\\n\" + \"This is a test file.\\n\" + \"This is a test file.\\n\" + \"This is a test file.\\n\" + \"This is a test file.\\n\" + \"This is a test file.\\n\" + \"This is a test file.\\n\" + \"This is a test", + "exact_match": false, + "code_bleu": 0.18575057999133598, + "edit_similarity": 0.6153846153846154 + }, + { + "repo": "snap-stanford/MLAgentBench", + "expected": "20", + "got": "20", + "got_raw": "20 * 0.0025 / 1000 # Convert tokens to cost in USD 0.0025 / 1000 # Convert tokens to cost in USD 0.0025 / 1000 # Convert tokens to cost in USD 0.0025 / 1000 # Convert tokens to cost in USD 0.0025 / 1000 # Convert tokens to cost in USD 0.0025 / 1000 # Convert tokens to cost in", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "snap-stanford/MLAgentBench", + "expected": "KeyError)", + "got": "KeyError)", + "got_raw": "KeyError) as exc_info: registry.get_command(\"nonexistent_command\")\n assert str(exc_info.value) == \"nonexistent_command\"\n def test_get_command(self):\n \"\"\"Test that getting a command returns the correct instance.\"\"\"\r\n registry = CommandRegistry()\r\n registry.register_command(TestCommandRegistry.example_command_method, \"example\")\r\n example_command = registry.get_command(\"example\")\r\n assert example_command == TestCommandRegistry.example_command_method\r\n def test_register_command(self):\r\n \"\"\"Test that registering a command works correctly.\"\"\"\r\n registry = CommandRegistry()\r\n registry", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "snap-stanford/MLAgentBench", + "expected": "self.generator.performance_evaluation)", + "got": "self.generator.performance_evaluation)", + "got_raw": "self.generator.performance_evaluation)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "snap-stanford/MLAgentBench", + "expected": "result", + "got": "result.lower()", + "got_raw": "result.lower() and \"invalid url\" in result.lower() and \"error\" in result.lower() and \"error\" in result.lower() and \"error\" in result.lower() and \"error\" in result.lower() and \"error\" in result.lower() and \"error\" in result.lower() and \"error\" in result.lower() and \"error\" in result.lower() and \"error\" in result.lower() and \"error\" in result.lower() and \"error\" in result.lower() and \"error\" in result.lower() and \"error\" in result.lower() and \"error\" in result.lower() and \"error\"", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6 + }, + { + "repo": "snap-stanford/MLAgentBench", + "expected": "True", + "got": "True", + "got_raw": "True\n\n config.set_continuous_mode(False)\n\n assert config.continuous_mode == continuous_mode\n\n\ndef test_set_continuous_mode_with_invalid_value(config: Config):\n \"\"\"\n Test if the set_continuous_mode() method raises a ValueError for invalid values.\n \"\"\"\n with pytest.raises(ValueError) as e:\n config.set_continuous_mode(\"invalid\")\n\n assert str(e.value) == \"Invalid value for continuous_mode: invalid\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "snap-stanford/MLAgentBench", + "expected": "None", + "got": "None", + "got_raw": "None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "snap-stanford/MLAgentBench", + "expected": "ValueError)", + "got": "requests.RequestsError)", + "got_raw": "requests.RequestsError) as e_info: scrape_text(url) assert str(e_info.value) == \"Invalid URL: invalidurl.com\"", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.47058823529411764 + }, + { + "repo": "snap-stanford/MLAgentBench", + "expected": "\"[]\"", + "got": "\"[]\"", + "got_raw": "\"[]\" # Empty JSON array as the initial state of the index file.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "snap-stanford/MLAgentBench", + "expected": "GPT_3_MODEL", + "got": "GPT_3_MODEL.replace(\"gpt-3.5\"", + "got_raw": "GPT_3_MODEL.replace(\"gpt-3.5\", \"gpt-3.0\") assert config.smart_llm_model is None assert config.gpt3only is True assert config.gpt4only is False assert config.memory_type is None assert config.browser_name is None assert config.allow_downloads is False assert config.skip_news is False assert config.debug is False assert config.prompt_settings_file is None assert config.ai_settings_file is None assert config.continuous is False assert config.continuous_limit is None assert config.speak is False assert config.workspace is None assert config.workspace_path is None assert config.workspace_root is None", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.55 + }, + { + "repo": "snap-stanford/MLAgentBench", + "expected": "ai_belief", + "got": "location", + "got_raw": "location == ai_belief or location == \"lost\" or location == \"basket A\" or location == \"basket C\" or location == \"sofa\" or location == \"basket S\" or location == \"basket B\" or location == \"basket D\" or location == \"basket E\" or location == \"basket F\" or location == \"basket G\" or location == \"basket H\" or location == \"basket I\" or location == \"basket J\" or location == \"basket K\" or location == \"basket L\" or location == \"basket M\" or location == \"basket N\" or location == \"basket", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.23529411764705882 + }, + { + "repo": "sooperset/mcp-atlassian", + "expected": "prop", + "got": "prop.keys()", + "got_raw": "prop.keys() assert \"default\" not in prop.keys() assert prop[\"description\"] == \"test\" def test_flattens_nullable_string(self) -> None: \"\"\" ``str | None`` \u2192 ``{\"type\": \"string\"}`` with default value. \"\"\" tool = self._make_tool( { \"foo\": { \"type\": \"string\", \"default\": \"bar\", \"description\": \"test\", } } ) _sanitize_schema_for_compatibility(tool) prop = tool.inputSchema[\"properties\"][\"foo\"] assert prop[\"type\"] == \"string\" assert prop[\"default\"] == \"bar\" assert prop[\"description\"]", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5333333333333333 + }, + { + "repo": "sooperset/mcp-atlassian", + "expected": "2", + "got": "2", + "got_raw": "2 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E50", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sooperset/mcp-atlassian", + "expected": "None", + "got": "None", + "got_raw": "None and result.id is not None and result.time_spent == \"1h\" and result.comment == \"E2E worklog test\" and result.author is not None and result.author.id is not None and result.author.name is not None and result.author.name == \"test-user\" and result.author.name == result.author.name and result.author.name == result.author.name and result.author.name == result.author.name and result.author.name == result.author.name and result.author.name == result.author.name and result.author.name == result.author.name and result.author.name == result.author.name and result.author.name == result.author.name and result.author.name == result", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sooperset/mcp-atlassian", + "expected": "url", + "got": "url.lower()", + "got_raw": "url.lower() # Convert to lowercase for case-insensitive comparison", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.42857142857142855 + }, + { + "repo": "sooperset/mcp-atlassian", + "expected": "None", + "got": "None", + "got_raw": "None # No exception raised in the original context", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sooperset/mcp-atlassian", + "expected": "True", + "got": "True", + "got_raw": "True # type: ignore # Second: PNG image # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type: ignore # type", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sooperset/mcp-atlassian", + "expected": "child.id", + "got": "child.id", + "got_raw": "child.id assert children.results[0].title == child.title assert children.results[0].body.storage.value == child.body.storage.value except Exception as e: print(f\"Error: {e}\") finally: # Delete child page confluence_client.delete_page(child.id) # Delete parent page confluence_client.delete_page(parent.id) finally: # Delete all created pages for page_id in created_pages: confluence_client.delete_page(page_id) time.sleep(1) # Wait for deletion to complete", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sooperset/mcp-atlassian", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" # Empty client_id (minimal config) should be used\r\n ) == result_config.oauth_config.client_id # Empty client_id (minimal config) should be used\r\n assert \"\" == result_config.oauth_config.client_secret # Empty client_secret (minimal config) should be used\r\n assert \"\" == result_config.oauth_config.redirect_uri # Empty redirect_uri (minimal config) should be used\r\n assert \"\" == result_config.oauth_config.scope # Empty scope (minimal config) should be used\r\n assert \"\" == result_config.oauth_config.cloud_id # Empty cloud_id (minimal config) should be used\r\n assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sooperset/mcp-atlassian", + "expected": "True", + "got": "True", + "got_raw": "True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sooperset/mcp-atlassian", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" # Default URL for BYOT OAuth mode. assert config.client_id is None assert config.client_secret is None assert config.token is None assert config.token_secret is None assert config.refresh_token is None assert config.user is None assert config.password is None assert config.proxy is None assert config.proxy_user is None assert config.proxy_password is None assert config.verify is True assert config.timeout is None assert config.retries is None assert config.headers is None assert config.proxy_headers is None assert config.proxy_auth is None assert config.proxy_verify is True assert config.proxy_timeout is None assert config.proxy_retries is None assert config.proxy_headers is None assert config.proxy", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sooperset/mcp-atlassian", + "expected": "None", + "got": "None", + "got_raw": "None issue.key == cloud_instance.test_issue_key issue.fields.summary == \"Test issue\" issue.fields.description == \"This is a test issue\" issue.fields.assignee.name == \"admin\" issue.fields.status.name == \"Open\" issue.fields.priority.name == \"Major\" issue.fields.created == cloud_instance.test_issue_created issue.fields.updated == cloud_instance.test_issue_updated issue.fields.resolution is None issue.fields.components[0].name == \"Test\" issue.fields.fixVersions[0].name == \"1.0\" issue.fields.issuelinks[0].type.name == \"relates to\" issue.fields.issuelinks[0].in", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sooperset/mcp-atlassian", + "expected": "prefix", + "got": "prefix", + "got_raw": "prefix", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sooperset/mcp-atlassian", + "expected": "\"pat\"", + "got": "\"pat\"", + "got_raw": "\"pat\" assert config.token == \"test_pat\" assert config.url == \"https://confluence.example.com\" assert config.oauth_enabled is True assert config.oauth_client_id is None assert config.oauth_client_secret is None assert config.oauth_token_url is None assert config.oauth_user_agent is None assert config.oauth_scope is None assert config.oauth_refresh_token is None assert config.oauth_access_token is None assert config.oauth_token_expires_in is None assert config.oauth_token_grant_type is None assert config.oauth_token_refresh_token is None assert config.oauth_token_refresh_url is None assert config.oauth_token_refresh_interval is None assert config.oauth_token_refresh_interval_unit is None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sooperset/mcp-atlassian", + "expected": "tool", + "got": "tool", + "got_raw": "tool # No change needed for empty schema", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sooperset/mcp-atlassian", + "expected": "schema", + "got": "schema", + "got_raw": "schema and \"$ref\" not in schema[\"properties\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sooperset/mcp-atlassian", + "expected": "None", + "got": "None", + "got_raw": "None and page.id != \"\" assert page.title == f\"E2E Storage Test {uid}\" assert page.body == storage_content assert page.body_storage_format is True assert page.body_storage_format_version == 1 assert page.body_storage_format_version_str == \"1\" assert page.body_storage_format_version_str == \"1\" assert page.body_storage_format_version_str == \"1\" assert page.body_storage_format_version_str == \"1\" assert page.body_storage_format_version_str == \"1\" assert page.body_storage_format_version_str == \"1\" assert page.body_storage_format_version_str == \"1\" assert page.body_storage_format_version_str == \"1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sooperset/mcp-atlassian", + "expected": "value", + "got": "value", + "got_raw": "value if isinstance(value, str) else value # type: ignore \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sooperset/mcp-atlassian", + "expected": "1", + "got": "1", + "got_raw": "1 # Only one comment is expected in the test data assert result[0][\"id\"] == \"12345\" assert result[0][\"body\"][\"view\"][\"value\"] == \"

Processed HTML

\" assert result[0][\"version\"][\"number\"] == 1 assert result[0][\"author\"][\"displayName\"] == \"John Doe\" assert result[0][\"body\"][\"view\"][\"value\"] == \"

Processed HTML

\" assert result[0][\"body\"][\"view\"][\"value\"] == \"

Processed HTML

\" assert result[0][\"body\"][\"view", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sooperset/mcp-atlassian", + "expected": "caplog.text", + "got": "caplog.text.lower()", + "got_raw": "caplog.text.lower() _assert_service_availability(result, confluence_expected=True, jira_expected=True) _assert_authentication_logs(caplog, \"oauth\", [\"confluence\", \"jira\"]) assert \"Basic Authentication\" not in caplog.text.lower() def test_oauth_cloud(self, env_scenarios, caplog): \"\"\"Test OAuth Cloud authentication.\"\"\" with MockEnvironment.clean_env(): for key, value in env_scenarios[\"oauth_cloud\"].items(): import os os.environ[key] = value result = get_available_services() _assert_service_availability( result, confluence_expected=True, jira_expected=True, ) _assert_authentication_logs", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.7333333333333333 + }, + { + "repo": "sooperset/mcp-atlassian", + "expected": "0", + "got": "0", + "got_raw": "0\n\n link_type = link_types[0] # type: ignore\n\n link = jira_fetcher.create_issue_link( # type: ignore\n link_type.id, issue1.key, issue2.key, \"test link\" # type: ignore\n ) # type: ignore\n\n assert link.id is not None # type: ignore\n\n assert link.type.id == link_type.id # type: ignore\n\n assert link.source.id == issue1.key # type: ignore\n\n assert link.target.id == issue2.key # type: ignore\n\n assert link.name ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "soxoj/maigret", + "expected": "[]", + "got": "{}", + "got_raw": "{} def test_load_db_from_str(): db = MaigretDatabase() db.load_from_str(EXAMPLE_DB) assert db.engines[\"XenForo\"].site.urlMain == \"http://forum.amperka.ru\" assert db.sites[\"Amperka\"].usernameClaimed == \"adam\" assert db.sites[\"Amperka\"].usernameUnclaimed == \"noonewouldeverusethis7\" def test_load_db_from_file(): db = MaigretDatabase() db.load_from_file(\"tests/test_data/example_db.json\") assert db.engines[\"XenForo\"].site.urlMain == \"http", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.0 + }, + { + "repo": "soxoj/maigret", + "expected": "'GitHub'", + "got": "'GitHub'", + "got_raw": "'GitHub' assert json.loads(data[1])['sitename'] == 'GitHub2' assert json.loads(data[0])['username'] == 'test' assert json.loads(data[1])['username'] == 'test' assert json.loads(data[0])['url_user'] == 'https://www.github.com/test' assert json.loads(data[1])['url_user'] == 'https://www.github.com/test' assert json.loads(data[0])['tags'] == ['test_tag'] assert json.loads(data[1])['tags'] == [] assert json.loads(data[0])['http_status'] == 2", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "soxoj/maigret", + "expected": "1", + "got": "1", + "got_raw": "1 # Check if the site was added to the database", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "soxoj/maigret", + "expected": "{ 'ida123': 'username' }", + "got": "{'ida123': 'vk_id'} assert default_db.extract_ids_from_url('https://vk.com/id123') == {'123': 'vk_id'} assert default_db.extract_ids_from_url('https://vk.com/id123') == {'123': 'vk_id'} assert default_db.extract_ids_from_url('https://vk.com/id123') == {'123': 'vk_id'} assert default_db.extract_ids_from_url('https://vk.com/id123') == {'123': 'vk_id'} assert default_db.extract_ids_from_url('https://", + "got_raw": "{'ida123': 'vk_id'} assert default_db.extract_ids_from_url('https://vk.com/id123') == {'123': 'vk_id'} assert default_db.extract_ids_from_url('https://vk.com/id123') == {'123': 'vk_id'} assert default_db.extract_ids_from_url('https://vk.com/id123') == {'123': 'vk_id'} assert default_db.extract_ids_from_url('https://vk.com/id123') == {'123': 'vk_id'} assert default_db.extract_ids_from_url('https://", + "exact_match": false, + "code_bleu": 0.03320059139020178, + "edit_similarity": 0.08018867924528301 + }, + { + "repo": "soxoj/maigret", + "expected": "report_text", + "got": "report_text.lower()", + "got_raw": "report_text.lower() and SUPPOSED_GEO in report_text.lower() and SUPPOSED_INTERESTS in report_text.lower() and 'twitter' not in report_text.lower() and 'instagram' not in report_text.lower() and '500px' not in report_text.lower() and 'reddit' not in report_text.lower() and 'username' not in report_text.lower() and 'id' not in report_text.lower() and 'url' not in report_text.lower() and 'status' not in report_text.lower() and 'tags' not in report_text.lower() and 'rank' not in report_text", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.7333333333333333 + }, + { + "repo": "soxoj/maigret", + "expected": "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]", + "got": "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]", + "got_raw": "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "soxoj/maigret", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" # Ensure resp_text is not empty after the call", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "soxoj/maigret", + "expected": "['username1', 'username2']", + "got": "['username1', 'username2']", + "got_raw": "['username1', 'username2']", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "speaches-ai/speaches", + "expected": "\"custom-whisper-model\"", + "got": "\"custom-whisper-model\"", + "got_raw": "\"custom-whisper-model\" # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "speaches-ai/speaches", + "expected": "sample_rate", + "got": "sample_rate", + "got_raw": "sample_rate or 16000.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "speaches-ai/speaches", + "expected": "\"list\"", + "got": "\"list\"", + "got_raw": "\"list\" assert result[\"data\"] is not None assert len(result[\"data\"]) == 1 assert result[\"data\"][0][\"embedding\"] is not None assert len(result[\"data\"][0][\"embedding\"]) == 512 assert result[\"data\"][0][\"embedding\"].dtype == np.float32 assert result[\"data\"][0][\"embedding\"].shape == (512,) assert result[\"data\"][0][\"model\"] == EMBEDDING_MODEL_ID assert result[\"data\"][0][\"sample_rate\"] == sample_rate assert result[\"data\"][0][\"duration\"] == duration assert result[\"data\"][0][\"transcript\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "speaches-ai/speaches", + "expected": "200", + "got": "200", + "got_raw": "200 response.headers[\"content-type\"] == \"text/vtt; charset=utf-8\" response.headers[\"content-length\"] == \"100\" response.text == \"WEBVTT\\n\\n00:00:00.000 --> 00:00:01.000\\nHello\\n\" \"00:00:01.000 --> 00:00:02.000\\nWorld\\n\" \"00:00:02.000 --> 00:00:03.00", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "speaches-ai/speaches", + "expected": "\"test-model\"", + "got": "\"test-model\"", + "got_raw": "\"test-model\" session.model_config = Config( model=\"test-model\", api_key=\"test-key\", api_secret=\"test-secret\", ) session.model_config.api_key = SecretStr(\"test-key\") session.model_config.api_secret = SecretStr(\"test-secret\") session.model_config.model = \"test-model\" session.model_config.model_config = Config( model=\"test-model\", api_key=\"test-key\", api_secret=\"test-secret\", ) session.model_config.api_key = SecretStr(\"test-key\") session.model_config.api_secret = SecretStr(\"test-secret\") session.model_config.model = \"test-model\" session.model_config.model_config = Config(", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "speaches-ai/speaches", + "expected": "16", + "got": "16", + "got_raw": "16 or bit_depth == 24 or bit_depth == 32 or bit_depth == 64 or bit_depth == 88 or bit_depth == 128 or bit_depth == 160 or bit_depth == 192 or bit_depth == 224 or bit_depth == 256 or bit_depth == 320 or bit_depth == 384 or bit_depth == 448 or bit_depth == 512 or bit_depth == 576 or bit_depth == 640 or bit_depth == 704 or bit", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "speaches-ai/speaches", + "expected": "1", + "got": "1", + "got_raw": "1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "speaches-ai/speaches", + "expected": "\"text/vtt; charset=utf-8\"", + "got": "\"application/x-vtt+xml\" response.text == webvtt.vtt.VTTWriter().write(webvtt.WebVTT()).to_string()", + "got_raw": "\"application/x-vtt+xml\" response.text == webvtt.vtt.VTTWriter().write(webvtt.WebVTT()).to_string()", + "exact_match": false, + "code_bleu": 0.03925345689749394, + "edit_similarity": 0.16260162601626016 + }, + { + "repo": "speaches-ai/speaches", + "expected": "None", + "got": "None", + "got_raw": "None and len(transcription.segments) > 0 and len(transcription.segments[0].words) > 0 and len(transcription.segments[0].words[0].tokens) > 0 and len(transcription.segments[0].words[0].tokens[0].tokens) > 0 and len(transcription.segments[0].words[0].tokens[0].tokens[0].tokens) > 0 and len(transcription.segments[0].words[0].tokens[0].tokens[0].tokens[0].tokens) > 0 and len(transcription.segments[0].words[0].tokens", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "spylang/spy", + "expected": "\"test\")", + "got": "\"test\")", + "got_raw": "\"test\") # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "spylang/spy", + "expected": "d2", + "got": "d2", + "got_raw": "d2 and \"y\" in d2 and d2[\"x\"] == 0 and d2[\"y\"] == 0 and d2[\"x\"] == d2[\"y\"] and d2[\"x\"] == 0 and d2[\"x\"] == 0 and d2[\"x\"] == 0 and d2[\"x\"] == 0 and d2[\"x\"] == 0 and d2[\"x\"] == 0 and d2[\"x\"] == 0 and d2[\"x\"] == 0 and d2[\"x\"] == 0 and d2[\"x\"] == ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "spylang/spy", + "expected": "\"red\"", + "got": "\"red\"", + "got_raw": "\"red\" # NOTE: This is a bug. The compiler should have emitted a warning here. # The compiler should have emitted a warning here. # The compiler should have emitted a warning here. # The compiler should have emitted a warning here. # The compiler should have emitted a warning here. # The compiler should have emitted a warning here. # The compiler should have emitted a warning here. # The compiler should have emitted a warning here. # The compiler should have emitted a warning here. # The compiler should have emitted a warning here. # The compiler should have emitted a warning here. # The compiler should have emitted a warning", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "spylang/spy", + "expected": "\"test\"", + "got": "\"test\"", + "got_raw": "\"test\" a = scope.get(\"a\") assert a.kind == VarKind.GLOBAL b = scope.get(\"b\") assert b.kind == VarKind.GLOBAL c = scope.get(\"c\") assert c.kind == VarKind.CONST d = scope.get(\"d\") assert d.kind == VarKind.VAR foo = scope.get(\"foo\") assert foo.kind == VarKind.FUNC bar = scope.get(\"bar\") assert bar.kind == VarKind.FUNC\n\n def test_local(self):\n scopes = self.analyze(\"\"\" def foo(): a = 0 b: i32 = 0 const c: i3", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "spylang/spy", + "expected": "\"mod1\"", + "got": "\"mod1\"", + "got_raw": "\"mod1\" assert mod2.symtable.symtable == symtable1.symtable assert mod2.symtable.mtime == symtable1.mtime assert mod2.symtable.mtime_delta == symtable1.mtime_delta assert mod2.symtable._mtime == symtable1._mtime assert mod2.symtable._mtime_delta == symtable1._mtime_delta assert mod2.symtable._mtime_delta == 0.0 assert mod2.symtable._mtime_delta == 0.0 assert mod2.symtable._mtime_delta == 0.0 assert mod2.symtable._mtime_delta == 0.0 assert mod2", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "spylang/spy", + "expected": "0", + "got": "0", + "got_raw": "0 r.stop == 10 r.step == 1 r._length == 10 r._data == list(range(10)) r._data[0] == 0 r._data[1] == 1 r._data[2] == 2 r._data[3] == 3 r._data[4] == 4 r._data[5] == 5 r._data[6] == 6 r._data[7] == 7 r._data[8] == 8 r._data[9] == 9 r._data[10] == ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "spylang/spy", + "expected": "1", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "spylang/spy", + "expected": "1", + "got": "1", + "got_raw": "1\n assert mod.div(10, 3) == 3.3333333333333335\n assert mod.floordiv(10, 3) == 3\n\n def test_unop(self, int_type):\n mod = self.compile(f\"\"\"\n T = {int_type}\n def neg(x: T) -> T: return -x\n def pos(x: T) -> T: return +x\n def not_(x: T) -> T: return ~x\n \"\"\")\n assert mod.neg(1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "spylang/spy", + "expected": "hash(b)", + "got": "hash(b)", + "got_raw": "hash(b)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "spylang/spy", + "expected": "3", + "got": "3.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "3.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "spylang/spy", + "expected": "\"foo\"", + "got": "\"foo\"", + "got_raw": "\"foo\" assert mod.foo(1) == \"bar\" assert mod.foo(2) == \"baz\" assert mod.foo(3) == \"\" assert mod.foo(-1) == \"baz\" assert mod.foo(-2) == \"bar\" assert mod.foo(-3) == \"foo\" assert mod.foo(-4) == \"\" assert mod.foo(4) == \"\" assert mod.foo(-4) == \"\" assert mod.foo(5) == \"\" assert mod.foo(-5) == \"\" assert mod.foo(6) == \"\" assert mod.foo(-6) == \"\" assert mod.foo(7) == \"\" assert mod.foo", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "spylang/spy", + "expected": "[1, 2, 3]", + "got": "[1, 2, 3]", + "got_raw": "[1, 2, 3] # list[str] is implemented by stdlib/_list.spy as well x = [\"a\", \"b\", \"c\"] assert x == [\"a\", \"b\", \"c\"] # list[str] is implemented by stdlib/_list.spy as well x = [\"a\", \"b\", \"c\"] assert x == [\"a\", \"b\", \"c\"] # list[str] is implemented by stdlib/_list.spy as well x = [\"a\", \"b\", \"c\"] assert x == [\"a\", \"b\", \"c\"] # list[str] is implemented by std", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "spylang/spy", + "expected": "3", + "got": "3", + "got_raw": "3", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "spylang/spy", + "expected": "\"a.b.c\"", + "got": "\"a.b.c\"", + "got_raw": "\"a.b.c\" a.name == \"xxx\" a.namespace == \"xxx\" a.is_fullname() == True a.is_shortname() == False a.is_namespace() == True a.is_alias() == False a.is_qualified() == True a.is_unqualified() == False a.is_empty() == False a.is_root() == False a.is_root_or_empty() == True a.is_root_or_alias() == False a.is_root_or_namespace() == True a.is_root_or_alias_or_namespace() == True a.is_root_or_alias_or_namespace_or_empty() == True a.is_root_or_alias_or_namespace_or_empty_or_shortname() ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "spylang/spy", + "expected": "2", + "got": "2", + "got_raw": "2 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 * 2 + 1 *", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "spylang/spy", + "expected": "\"foo\"", + "got": "\"foo\"", + "got_raw": "\"foo\" w_add = w_mod.get(\"add\") assert w_add.name == \"add\" assert w_add.args[0].name == \"x\" assert w_add.args[1].name == \"y\" assert w_add.returns.name == \"i32\" assert w_add.code == \"\"\" return x + y \"\"\" assert w_add.code_ast is None assert w_add.code_ast_func is None assert w_add.code_ast_func_name is None assert w_add.code_ast_func_args is None assert w_add.code_ast_func_returns is None assert w_add.code_ast_func_body is None assert w_add.code_ast_func_body_lines is None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "spylang/spy", + "expected": "(1, 1)", + "got": "Point(1, 1)", + "got_raw": "Point(1, 1)", + "exact_match": false, + "code_bleu": 0.8091067115702212, + "edit_similarity": 0.7058823529411765 + }, + { + "repo": "spylang/spy", + "expected": "w_t", + "got": "w_t.w_obj()", + "got_raw": "w_t.w_obj() # type: ignore # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.42857142857142855 + }, + { + "repo": "spylang/spy", + "expected": "1", + "got": "ANYTHING()", + "got_raw": "ANYTHING() == ANYTHING(1) == ANYTHING(1.0) == ANYTHING(\"a\") == ANYTHING([]) == ANYTHING({}) == ANYTHING(None) == ANYTHING(object()) == ANYTHING(object()) == ANYTHING(object()) == ANYTHING(object()) == ANYTHING(object()) == ANYTHING(object()) == ANYTHING(object()) == ANYTHING(object()) == ANYTHING(object()) == ANYTHING(object()) == ANYTHING(object()) == ANYTHING(object()) == ANYTHING(object()) == ANYTHING(object()) == ANYTHING(object()) == ANYTHING(object()) == ANYTHING(object()) == ANYTHING(object())", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.0 + }, + { + "repo": "spylang/spy", + "expected": "B.w_i32", + "got": "B.w_i32_type()", + "got_raw": "B.w_i32_type()", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "sql-hkr/tiny8", + "expected": "initial_pc", + "got": "initial_pc", + "got_raw": "initial_pc + 1 # No interrupt occurred\n\n def test_trigger_interrupt_enabled(self):\n \"\"\"Test that enabled interrupts trigger correctly.\"\"\"\n cpu = CPU()\n cpu.interrupts = 1 # Enable interrupts\n initial_pc = cpu.pc\n cpu.trigger_interrupt(0x10)\n\n assert cpu.pc == initial_pc + 2 # Interrupt occurred at PC + 2\n\n def test_masked_interrupt(self):\n \"\"\"Test that masked interrupts are ignored.\"\"\"\n cpu = CPU()\n cpu.interrupts = 0b00000001 #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sql-hkr/tiny8", + "expected": "0)", + "got": "1)", + "got_raw": "1)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "sql-hkr/tiny8", + "expected": "42", + "got": "42", + "got_raw": "42 # LDI 16, 42 # Call with integer offset cpu.step() assert cpu.regs[17] == 1 # LDI 17, 1 cpu.step() assert cpu.regs[18] == 2 # LDI 18, 2 cpu.step() assert cpu.pc == 3 # RET cpu.step() assert cpu.regs[16] == 42 # LDI 16, 42 cpu.step() assert cpu.regs[17] == ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sql-hkr/tiny8", + "expected": "{0: 100, 1: 200})", + "got": "{ \"r0\": 999, \"r1\": 200, })", + "got_raw": "{ \"r0\": 999, \"r1\": 200, })", + "exact_match": false, + "code_bleu": 0.21200626759025185, + "edit_similarity": 0.6511627906976745 + }, + { + "repo": "sql-hkr/tiny8", + "expected": "0", + "got": "100", + "got_raw": "100 - 200 + 1 # 100 - 200 + 1 = -100 + 1 = -99 + 1 = -98 + 1 = -97 + 1 = -96 + 1 = -95 + 1 = -94 + 1 = -93 + 1 = -92 + 1 = -91 + 1 = -90 + 1 = -89 + 1 = -88 + 1 = -87 + 1 = -86", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "sql-hkr/tiny8", + "expected": "0xFF", + "got": "0xFEFF", + "got_raw": "0xFEFF - 2 - 1 # 0xFEFF - 2 - 1 = 0xFEFF - 3 = 0xFEFE - 1 = 0xFEFE - 1 = 0xFEFE - 1 = 0xFEFE - 1 = 0xFEFE - 1 = 0xFEFE - 1 = 0xFEFE - 1 = 0xFEFE - 1 = 0xFEFE - 1 = 0xFEFE - 1 = 0xFEFE - 1 = 0xFEFE - 1 = 0xFE", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.8 + }, + { + "repo": "sql-hkr/tiny8", + "expected": "2", + "got": "2", + "got_raw": "2 + 1 # Move to the next step after finding the instruction. def test_forward_search_not_found(self): \"\"\"Test forward search not finding instruction.\"\"\" state = ViewState(step_idx=0) traces = [ {\"step\": 0, \"instr\": \"LDI R16, 42\"}, {\"step\": 1, \"instr\": \"LDI R17, 100\"}, {\"step\": 2, \"instr\": \"ADD R16, R17\"}, ] state.command_buffer = \"/add\" result = run_command(state, traces) assert \"Not found\" in result def test", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sql-hkr/tiny8", + "expected": "1", + "got": "1", + "got_raw": "1 # Executed normally\n\n def test_cpxe_skip(self):\n \"\"\"Test compare and skip if equal to zero.\"\"\"\n cpu = CPU()\n asm = assemble(\"\"\"\n ldi r16, 5\n ldi r17, 0\n ldi r18, 0\n cpxe r16, r17\n ldi r18, 99\n ldi r19, 1\n \"\"\")\n cpu.load_program(asm)\n cpu.run()\n assert cpu.read_reg(18) == 99 ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sql-hkr/tiny8", + "expected": "16", + "got": "16", + "got_raw": "16\n\n assert _parse_number(\"$0\") == 0\n\n def test_parse_number_hex(self):\n \"\"\"Test parsing hex immediate without $ prefix.\"\"\"\n from tiny8.assembler import _parse_number\n\n assert _parse_number(\"0xFF\") == 255\n\n assert _parse_number(\"0x10\") == 16\n\n assert _parse_number(\"0x0\") == 0\n\n def test_parse_number_binary(self):\n \"\"\"Test parsing binary immediate.\"\"\"\n from tiny8.assembler import _parse_number\n\n assert _parse_number(\"0b101", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sql-hkr/tiny8", + "expected": "1", + "got": "99", + "got_raw": "99 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "sql-hkr/tiny8", + "expected": "15)", + "got": "15)", + "got_raw": "15) # 10 + 5 + 0 = 15\n\n def test_adc_with_carry_set(self, cpu_with_program, helper):\n \"\"\"Test ADC when carry is 1.\"\"\"\n cpu = cpu_with_program(\"\"\"\n ldi r0, 10\n ldi r1, 15\n adc r0, r1\n \"\"\")\n\n helper.assert_register(cpu, 0, 25) # 10 + 15 + 1 = 25\n\n def test_adc_with_overflow(self, cpu_with_program, helper", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sqlalchemy/alembic", + "expected": "_down(\"a\", None, True))", + "got": "_up(\"a\", \"b\"))) self.updater.downgrade()) self.updater.upgrade()) self.updater.downgrade()) self.updater.upgrade()) self.updater.downgrade()) self.updater.upgrade()) self.updater.downgrade()) self.updater.upgrade()) self.updater.downgrade()) self.updater.upgrade()) self.updater.downgrade()) self.updater.upgrade()) self.updater.downgrade()) self.updater.upgrade()) self.updater.downgrade()) self.updater.upgrade()) self.updater.downgrade()) self.updater.upgrade()) self.updater.downgrade()) self.updater.upgrade())", + "got_raw": "_up(\"a\", \"b\"))) self.updater.downgrade()) self.updater.upgrade()) self.updater.downgrade()) self.updater.upgrade()) self.updater.downgrade()) self.updater.upgrade()) self.updater.downgrade()) self.updater.upgrade()) self.updater.downgrade()) self.updater.upgrade()) self.updater.downgrade()) self.updater.upgrade()) self.updater.downgrade()) self.updater.upgrade()) self.updater.downgrade()) self.updater.upgrade()) self.updater.downgrade()) self.updater.upgrade()) self.updater.downgrade()) self.updater.upgrade())", + "exact_match": false, + "code_bleu": 0.015714666652000157, + "edit_similarity": 0.03345724907063197 + }, + { + "repo": "sqlalchemy/alembic", + "expected": "buf.getvalue()", + "got": "buf.getvalue()", + "got_raw": "buf.getvalue() # noqa: E501 \"\"\" The transactional_ddl=False option should cause the upgrade to run without a commit. \"\"\" self.cfg.set_main_option(\"transactional_ddl\", True) with capture_context_buffer(transactional_ddl=True) as buf: command.upgrade(self.cfg, self.a, sql=True) assert re.match(r\"^COMMIT;\\nCREATE TABLE.*?\\n+$\", buf.getvalue(), re.S) \"\"\" The transactional_ddl=True option should cause the upgrade to run with a commit. \"\"\" self.cfg.set_main_option(\"transactional_ddl\", False) with capture_context_buffer(transactional", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sqlalchemy/alembic", + "expected": "\"current\")", + "got": "self.cfg)", + "got_raw": "self.cfg) as c: c.run_script(\"edit\") c.run_script(\"edit\") c.run_script(\"edit\") c.run_script(\"edit\") c.run_script(\"edit\") c.run_script(\"edit\") c.run_script(\"edit\") c.run_script(\"edit\") c.run_script(\"edit\") c.run_script(\"edit\") c.run_script(\"edit\") c.run_script(\"edit\") c.run_script(\"edit\") c.run_script(\"edit\") c.run_script(\"edit\") c.run_script(\"edit\") c.run_script(\"edit\") c.run_script(\"edit\") c.run_script(\"edit\") c.run_script(\"edit\") c.run", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.21052631578947367 + }, + { + "repo": "sqlalchemy/alembic", + "expected": "\"DROP INDEX my_idx ON my_table\")", + "got": "\"DROP INDEX my_idx ON my_table\")", + "got_raw": "\"DROP INDEX my_idx ON my_table\")\n op.drop_index(\"my_idx\", table_name=\"my_table\", schema=\"my_schema\")\r\n context.assert_contains( \"DROP INDEX my_idx ON my_schema.my_table\")\r\n op.drop_index(\"my_idx\", table_name=\"my_table\", schema=\"my_schema\", unique=True)\r\n context.assert_contains( \"DROP INDEX my_idx ON my_schema.my_table UNIQUE\")\r\n op.drop_index(\"my_idx\", table_name=\"my_table\", schema=\"my_schema\", unique=True, local=True)\r\n context.assert_contains( \"DROP INDEX my", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sqlalchemy/alembic", + "expected": "\"upgrade_ops\")", + "got": "m1.upgrade_ops)", + "got_raw": "m1.upgrade_ops) is u2) is m1.downgrade_ops) is d2) is m1) is None) is m1) is None) is m1) is None) is m1) is None) is m1) is None) is m1) is None) is m1) is None) is m1) is None) is m1) is None) is m1) is None) is m1) is None) is m1) is None) is m1) is None) is m1) is None) is m1) is None) is m", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.8275862068965517 + }, + { + "repo": "sqlalchemy/alembic", + "expected": "buf.getvalue()", + "got": "buf.getvalue()", + "got_raw": "buf.getvalue() == \"\"\"\\ CREATE TABLE sometable ( data pgenum NOT NULL ); \"\"\" % self.rid + \"\"\"\\ CREATE TYPE pgenum AS ENUM ('one', 'two', 'three'); \"\"\" % self.rid + \"\"\"\\ DROP TYPE pgenum; \"\"\" % self.rid + \"\"\"\\ DROP TABLE sometable; \"\"\" % self.rid + \"\"\"\\ DROP TYPE pgenum; \"\"\" % self.rid + \"\"\"\\ DROP TABLE sometable; \"\"\" % self.rid + \"\"\"\\ DROP TYPE pgenum; \"\"\" % self.rid + \"\"\"\\ DROP TABLE sometable; \"\"\" % self.rid + \"\"\"\\ DROP TYPE", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sqlalchemy/alembic", + "expected": "buf.getvalue()", + "got": "buf.getvalue()", + "got_raw": "buf.getvalue() + \"\\n\" * 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sqlalchemy/alembic", + "expected": "\"t1\")", + "got": "\"DROP", + "got_raw": "\"DROP TABLE unknown\") op.drop_table(\"unknown\") op_fixture(\"mysql\") op.drop_table(\"unknown\") op_fixture(\"mysql\") op.drop_table(\"unknown\") op_fixture(\"mysql\") op.drop_table(\"unknown\") op_fixture(\"mysql\") op.drop_table(\"unknown\") op_fixture(\"mysql\") op.drop_table(\"unknown\") op_fixture(\"mysql\") op.drop_table(\"unknown\") op_fixture(\"mysql\") op.drop_table(\"unknown\") op_fixture(\"mysql\") op.drop_table(\"unknown\") op_fixture(\"mysql\") op.drop_table(\"unknown\") op_fixture(\"mysql\") op.drop_table(\"unknown\") op_fixture(\"mysql\") op.drop", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.2 + }, + { + "repo": "sqlalchemy/alembic", + "expected": "\"base\")", + "got": "self.cfg)", + "got_raw": "self.cfg) as cfg, self.cfg) as cfg2: command.edit(cfg, cfg2) eq_(cfg2.revision, \"base\") eq_(cfg2.script_directory, cfg.script_directory) eq_(cfg2.get_current_revision(), cfg.get_current_revision()) eq_(cfg2.get_heads(), cfg.get_heads()) eq_(cfg2.get_heads(), cfg.get_heads()) eq_(cfg2.get_heads(), cfg.get_heads()) eq_(cfg2.get_heads(), cfg.get_heads()) eq_(cfg2.get_heads(), cfg.get_heads()) eq_(cfg2.get_heads(), cfg.get_heads()) eq_(cfg2.get_heads(), cfg", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.375 + }, + { + "repo": "sqlalchemy/alembic", + "expected": "buf.getvalue()", + "got": "buf.getvalue()", + "got_raw": "buf.getvalue() assert \"COMMIT;\" in buf.getvalue() with capture_context_buffer(transactional_ddl=True) as buf: command.downgrade(self.cfg, self.a, sql=True) assert \"BEGIN TRANSACTION;\" in buf.getvalue() assert \"ROLLBACK;\" in buf.getvalue() with capture_context_buffer(transactional_ddl=True) as buf: command.revision(self.cfg, \"head\", sql=True) assert \"BEGIN TRANSACTION;\" in buf.getvalue() assert \"COMMIT;\" in buf.getvalue() with capture_context_buffer(transactional_ddl=True) as buf: command.revision(self.cfg, \"base\", sql=True) assert \"BEGIN TRANSACTION;\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sqlalchemy/alembic", + "expected": "String", + "got": "String._type_affinity", + "got_raw": "String._type_affinity # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa: E127 # noqa", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.4444444444444444 + }, + { + "repo": "sqlalchemy/alembic", + "expected": "\"COMMENT='This is a table comment'\")", + "got": "\"CREATE TABLE t2 (c1 INTEGER NOT NULL", + "got_raw": "\"CREATE TABLE t2 (c1 INTEGER NOT NULL, COMMENT 'This is a table comment')\")", + "exact_match": false, + "code_bleu": 0.11868405219520975, + "edit_similarity": 0.2465753424657534 + }, + { + "repo": "sqlalchemy/alembic", + "expected": "self.m2", + "got": "None", + "got_raw": "None and obj.metadata.name == \"t1\" and obj.name == \"t1\" and obj.schema == \"public\" and obj.type == \"table\" and obj.unique_constraints is None and obj.foreign_keys is None and obj.indexes is None and obj.primary_key is None and obj.columns is not None and len(obj.columns) == 2 and obj.columns[0].name == \"id\" and obj.columns[0].type == Integer and obj.columns[0].nullable is False and obj.columns[0].autoincrement is True and obj.columns[1].name == \"name\" and obj.columns[1].type", + "exact_match": false, + "code_bleu": 0.16666666666666666, + "edit_similarity": 0.18181818181818182 + }, + { + "repo": "stabldev/torrra", + "expected": "\"textual-dark\"", + "got": "\"light\"", + "got_raw": "\"light\" # default value for theme in the config file\n\n\ndef test_config_initialization_with_custom_file(mock_config: Config):\n # test that a custom config file can be used\n custom_config_path = \"custom_config.yml\" # replace with the path to your custom config file\n config_module.CONFIG_FILE = custom_config_path\n config_module.load_config() # load the custom config file\n assert config_module.CONFIG_FILE == custom_config_path # check that the config file is set correctly\n # check for a known custom value in the config file\n assert mock_config.get(\"custom_key", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2857142857142857 + }, + { + "repo": "stabldev/torrra", + "expected": "840499200", + "got": "840499200.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "840499200.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.13138686131386862 + }, + { + "repo": "stabldev/torrra", + "expected": "45.6", + "got": "45.6", + "got_raw": "45.6", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "stabldev/torrra", + "expected": "\"1.00 TB\"", + "got": "\"1.00 TB\" lazy_import(\"humanize\") as humanize: assert human_readable_size(1024**4) == \"1.00 TB\" assert human_readable_size(1024**5) == \"1.00 PB\" assert human_readable_size(1024**6) == \"1.00 EB\" assert human_readable_size(1024**7) == \"1.00 ZB\" assert human_readable_size(1024**8) == \"1.00 YB\" assert human_readable_size(1024", + "got_raw": "\"1.00 TB\" lazy_import(\"humanize\") as humanize: assert human_readable_size(1024**4) == \"1.00 TB\" assert human_readable_size(1024**5) == \"1.00 PB\" assert human_readable_size(1024**6) == \"1.00 EB\" assert human_readable_size(1024**7) == \"1.00 ZB\" assert human_readable_size(1024**8) == \"1.00 YB\" assert human_readable_size(1024", + "exact_match": false, + "code_bleu": 0.017885341915979475, + "edit_similarity": 0.05421686746987952 + }, + { + "repo": "stabldev/torrra", + "expected": "list_result.output", + "got": "list_result.output.lower()", + "got_raw": "list_result.output.lower() list_result.output.lower() assert \"test.key\" in list_result.output.lower() assert \"test_value\" in list_result.output.lower() assert \"test.key\" not in list_result.output.lower() assert \"test_value\" not in list_result.output.lower() assert \"test.key\" in list_result.output.lower() assert \"test_value\" in list_result.output.lower() assert \"test.key\" not in list_result.output.lower() assert \"test_value\" not in list_result.output.lower() assert \"test.key\" in list_result.output.lower() assert \"test_value\" in list_result.output.lower() assert \"test.key", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.8181818181818182 + }, + { + "repo": "stac-utils/stac-fastapi", + "expected": "\"{'op': '=', 'args': [{'property': 'id'}, 'test-item']}\"", + "got": "\"cql2-json\" in response_dict[\"filter_lang\"] and \"cql2-text\" not in response_dict[\"filter_lang\"] and \"filter_expr\" not in response_dict.keys() and \"filter_crs\" not in response_dict.keys() and \"filter_lang\" not in response_dict.keys() and \"filter\" not in response_dict.keys() and \"filter\" in response_dict[\"filter_expr\"] and \"filter\" in response_dict[\"filter_crs\"] and \"filter\" in response_dict[\"filter_lang\"] and \"filter\" in response_dict[\"filter\"] and \"filter\" in response_dict[\"filter_expr\"] and \"", + "got_raw": "\"cql2-json\" in response_dict[\"filter_lang\"] and \"cql2-text\" not in response_dict[\"filter_lang\"] and \"filter_expr\" not in response_dict.keys() and \"filter_crs\" not in response_dict.keys() and \"filter_lang\" not in response_dict.keys() and \"filter\" not in response_dict.keys() and \"filter\" in response_dict[\"filter_expr\"] and \"filter\" in response_dict[\"filter_crs\"] and \"filter\" in response_dict[\"filter_lang\"] and \"filter\" in response_dict[\"filter\"] and \"filter\" in response_dict[\"filter_expr\"] and \"", + "exact_match": false, + "code_bleu": 0.011561659490849129, + "edit_similarity": 0.04332129963898917 + }, + { + "repo": "stac-utils/stac-fastapi", + "expected": "conf", + "got": "\"https://api.stacspec.org/v1.0.0-beta.3/core/", + "got_raw": "\"https://api.stacspec.org/v1.0.0-beta.3/core/#conformance\" in conf\r\n ) or (conf[0] == \"https://api.stacspec.org/v1.0.0-beta.3/core/#conformance\") or (conf[0] == \"https://api.stacspec.org/v1.0.0-beta.3/core\") or (conf[0] == \"https://api.stacspec.org/v1.0.0-beta.3\") or (conf[0] == \"https://api.stacspec.org/v1.0.0", + "exact_match": false, + "code_bleu": 0.048853266442119285, + "edit_similarity": 0.08163265306122448 + }, + { + "repo": "stac-utils/stac-fastapi", + "expected": "\"1\"", + "got": "1.0000000000000002e-05", + "got_raw": "1.0000000000000002e-05 # 1e-5 is the default value for page in pagination extension. # This is a workaround to test the default value. # The actual value should be 1.0000000000000002e-05. # The default value is set to 1e-5 in the pagination extension. # The value is used to test the default value. # The value is set to 1e-5 in the pagination extension", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.08 + }, + { + "repo": "stac-utils/stac-fastapi", + "expected": "[]", + "got": "[]", + "got_raw": "[]\n\n\ndef test_get_aggregate_with_params(client: TestClient) -> None:\n response = client.get(\"/aggregate\", params={\"id\": \"test\"})\n assert response.is_success, response.text\n\n assert response.json()[\"aggregations\"] == [Aggregation(id=\"test\")]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "stac-utils/stac-fastapi", + "expected": "\"application/schema+json\"", + "got": "\"application/json\"", + "got_raw": "\"application/json\" queryables = client.get(f\"{prefix}/queryables/search\") assert queryables.status_code == 200, queryables.json() assert queryables.headers[\"content-type\"] == \"application/json\" queryables = client.get(f\"{prefix}/queryables/item\") assert queryables.status_code == 200, queryables.json() assert queryables.headers[\"content-type\"] == \"application/json\" queryables = client.get(f\"{prefix}/queryables/collection\") assert queryables.status_code == 200, queryables.json() assert queryables.headers[\"content-type\"] == \"application/json\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.8372093023255814 + }, + { + "repo": "stac-utils/stac-fastapi", + "expected": "expected", + "got": "expected.decode()", + "got_raw": "expected.decode() if expected else None", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.64 + }, + { + "repo": "stac-utils/stac-fastapi", + "expected": "{\"gte\": 95}", + "got": "95.00000000000000253659631700210009765625000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "95.00000000000000253659631700210009765625000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.1, + "edit_similarity": 0.02877697841726619 + }, + { + "repo": "stac-utils/stac-fastapi", + "expected": "500", + "got": "422", + "got_raw": "422, get_search.text.strip() == \"Missing required parameter 'datetime' in request body\" assert post_search.status_code == 422, post_search.text.strip() == \"Missing required parameter 'datetime' in request body\" else: # Without validation, the client should be able to pass the `fields` options assert get_search.status_code == 200, get_search.text assert post_search.status_code == 200, post_search.text.strip() == '{\"not\": \"a proper stac item\"}'", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "stanford-cs336/assignment1-basics", + "expected": "truncated_actual_output)", + "got": "truncated_actual_output)", + "got_raw": "truncated_actual_output) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2) / 2", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "stanford-cs336/assignment1-basics", + "expected": "output)", + "got": "output)", + "got_raw": "output) def test_embedding(numpy_snapshot, ts_state_dict, d_model): w1_weight = ts_state_dict[0][\"layers.0.self_attn.w1.weight\"] output = run_embedding( d_model=d_model, weights=w1_weight, in_features=100, ) numpy_snapshot.assert_match( output) def test_rope(numpy_snapshot, ts_state_dict): w1_weight = ts_state_dict[0][\"layers.0.self_attn.w1.weight\"] output = run_rope( d_model=100, weights=w1_weight, in_features=100, ) numpy_snapshot.assert_match( output", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "stanford-cs336/assignment1-basics", + "expected": "test_string", + "got": "\"\"", + "got_raw": "\"\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "stanford-cs336/assignment1-basics", + "expected": "expected_arrays[key])", + "got": "expected_arrays[key])", + "got_raw": "expected_arrays[key]) < atol) or (np.abs(actual[key] - expected_arrays[key]) < atol + rtol * np.abs(expected_arrays[key]))) or (self.always_match_exact and np.array_equal(actual[key], expected_arrays[key]))) or (self.always_match_exact and np.array_equal(actual[key].astype(np.float32), expected_arrays[key].astype(np.float32)))) or (self.always_match_exact and np.array_equal(actual[key].astype(np.int32), expected_arrays[key].astype(np.int32)))) or (self.always_match_exact and np.array_equal(actual[key].astype(np.uint8),", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "steamship-core/python-client", + "expected": "2", + "got": "1", + "got_raw": "1 and isinstance(result.output[0], str) and result.output[0] == block_id", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "steamship-core/python-client", + "expected": "str(e)", + "got": "str(e.value)", + "got_raw": "str(e.value) agent_service = MyToolLimitedAgentService(client=client) agent_context = AgentContext.get_or_create(client, context_keys={\"id\": str(uuid.uuid4())}) agent = agent_service.get_default_agent() agent.run(agent.get_default_task(), context=agent_context) assert agent_context.get(\"id\") == str(uuid.uuid4()) agent_context.set(\"id\", \"foo\") agent.run(agent.get_default_task(), context=agent_context) assert agent_context.get(\"id\") == \"foo\" agent_context.set(\"id\", \"bar\") agent.run(agent.get_default_task(), context=agent_context) assert agent_context.get(\"", + "exact_match": false, + "code_bleu": 0.4347208719449915, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "steamship-core/python-client", + "expected": "test_doc", + "got": "test_doc", + "got_raw": "test_doc + \"\\n\" + \"Tagger\" + \"\\n\" + \"Tagger\" + \"\\n\" + \"Tagger\" + \"\\n\" + \"Tagger\" + \"\\n\" + \"Tagger\" + \"\\n\" + \"Tagger\" + \"\\n\" + \"Tagger\" + \"\\n\" + \"Tagger\" + \"\\n\" + \"Tagger\" + \"\\n\" + \"Tagger\" + \"\\n\" + \"Tagger\" + \"\\n\" + \"Tagger\" + \"\\n\" + \"Tagger\" + \"\\n\" + \"Tagger\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "steamship-core/python-client", + "expected": "TEST_STRING", + "got": "TEST_STRING", + "got_raw": "TEST_STRING + \" (signed)\" + \"\\n\" + \" (not signed)\" + \"\\n\" + \" (signed)\" + \"\\n\" + \" (not signed)\" + \"\\n\" + \" (signed)\" + \"\\n\" + \" (not signed)\" + \"\\n\" + \" (signed)\" + \"\\n\" + \" (not signed)\" + \"\\n\" + \" (signed)\" + \"\\n\" + \" (not signed)\" + \"\\n\" + \" (signed)\" + \"\\n\" + \" (not signed)\" + \"\\n\" + \" (signed)\" + \"\\n\" + \" (", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "steamship-core/python-client", + "expected": "new_output", + "got": "new_output", + "got_raw": "new_output\n\n task.post_update(new_state, new_message, new_output)\n\n assert task.state == new_state\n assert task.status_message == new_message\n assert task.output == new_output\n\n\ndef test_response_post_update_can_update_task_with_error():\n client = get_steamship_client()\n task = create_dummy_training_task(client)\n\n new_state = TaskState.failed\n new_error = SteamshipError(\"OH NO\", \"OH NO\")\n new_output = {\"a\": 3}\n\n assert task.state != new_state\n assert task.status_message != \"\"\n assert task", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "steamship-core/python-client", + "expected": "default.id", + "got": "default.id", + "got_raw": "default.id\n assert workspace1a.handle == \"test\"\n assert default.handle == \"default\"\n assert default.id != workspace1.id\n assert default.id != workspace1a.id\n assert default.id == default.id\n assert default.handle == default.handle\n assert default.handle != workspace1.handle\n assert default.handle != workspace1a.handle\n assert default.handle != \"test\"\n assert default.handle != \"test1\"\n assert default.handle != \"test2\"\n assert default.handle != \"test3\"\n assert default.handle != \"test4\"\n assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "steamship-core/python-client", + "expected": "3", + "got": "3.0", + "got_raw": "3.0 # Assert that the default == 3.0 # assert config_template[\"y\"].optional is False assert config_template[\"z\"].type == ConfigParameterType.NUMBER assert config_template[\"z\"].default == 7.5 # Assert that the default == 7.5 # assert config_template[\"z\"].optional is False # assert config_template[\"z\"].description == \"z\" # assert config_template[\"z\"].title == \"Z\" # assert config_template[\"z\"].enum == [1, 2, 3] # assert config_template[\"z\"].enum", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "steamship-core/python-client", + "expected": "\"\"", + "got": "instance4.id", + "got_raw": "instance4.id", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.0 + }, + { + "repo": "steamship-core/python-client", + "expected": "workspace.id", + "got": "workspace.id", + "got_raw": "workspace.id # type: ignore # TODO: fix this once we have a proper type for Workspace # type: ignore # TODO: fix this once we have a proper type for User user = User.create(client) client.switch_user(user) instance.deploy() # type: ignore # TODO: fix this once we have a proper type for PluginInstance instance.deploy() # type: ignore # TODO: fix this once we have a proper type for PluginInstance with pytest.raises(SteamshipError) as exc: instance.deploy() # type: ignore # TODO: fix this once we have a proper type", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "steamship-core/python-client", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "steamship-core/python-client", + "expected": "RES_EMPTY", + "got": "RES_EMPTY", + "got_raw": "RES_EMPTY + \"\\n\" + \"Hello, World!\\n\" + \"Hello, Python!\\n\" + \"Hello, World!\\n\" + \"Hello, Python!\\n\" + \"Hello, World!\\n\" + \"Hello, Python!\\n\" + \"Hello, World!\\n\" + \"Hello, Python!\\n\" + \"Hello, World!\\n\" + \"Hello, Python!\\n\" + \"Hello, World!\\n\" + \"Hello, Python!\\n\" + \"Hello, World!\\n\" + \"Hello, Python!\\n\" + \"Hello, World!\\n\" + \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "steamship-core/python-client", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "steamship-core/python-client", + "expected": "\"apples\"", + "got": "\"Apples\"", + "got_raw": "\"Apples\" # The agent responded with a single word. Something like: \"Apples\" assert food_suggestion[0].get(\"text\") != \"Apples\" # The agent responded with a single word. Something like: \"Apples\" assert food_suggestion[0].get(\"text\") != \"Apples\" # The agent responded with a single word. Something like: \"Apples\" assert food_suggestion[0].get(\"text\") != \"Apples\" # The agent responded with a single word. Something like: \"Apples\" assert food_suggestion[0].get(\"text\") !=", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.875 + }, + { + "repo": "steamship-core/python-client", + "expected": "2", + "got": "1", + "got_raw": "1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "steamship-core/python-client", + "expected": "2", + "got": "2", + "got_raw": "2\nassert config_template[0].name == \"x\" assert config_template[0].type == ConfigParameterType.NUMBER assert config_template[0].default == 0.0 assert config_template[0].description == \"x\" assert config_template[1].name == \"y\" assert config_template[1].type == ConfigParameterType.NUMBER assert config_template[1].default == 0.0 assert config_template[1].description == \"y\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "steamship-core/python-client", + "expected": "TEST_DOC", + "got": "TEST_DOC.decode(\"utf-8\")", + "got_raw": "TEST_DOC.decode(\"utf-8\")", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.5 + }, + { + "repo": "steamship-core/python-client", + "expected": "1", + "got": "1", + "got_raw": "1 and res[0].text is not None and res[0].text.startswith(\"image\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "steamship-core/python-client", + "expected": "t", + "got": "t.upper()", + "got_raw": "t.upper() + \"\\n\" + \"\\n\" + p1_1 + \" \" + p1_2 + \"\\n\" + \"\\n\" + p2_1 + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n\" + \"\\n", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.2 + }, + { + "repo": "steamship-core/python-client", + "expected": "2", + "got": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "steamship-core/python-client", + "expected": "None", + "got": "None", + "got_raw": "None response.text == \"Hello World!\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sublimehq/package_control", + "expected": "v.check())", + "got": "v.evaluate())", + "got_raw": "v.evaluate()) else: self.assertEqual(False, v.evaluate()) except Exception as e: self.fail(str(e)) finally: pep508.MARKERS = ORIG_MARKERS", + "exact_match": false, + "code_bleu": 0.488923022434901, + "edit_similarity": 0.5217391304347826 + }, + { + "repo": "sublimehq/package_control", + "expected": "check_version(spec, version, True))", + "got": "check_version(version, spec))", + "got_raw": "check_version(version, spec))", + "exact_match": false, + "code_bleu": 0.2889453466531894, + "edit_similarity": 0.8125 + }, + { + "repo": "sublimehq/package_control", + "expected": "is_compatible_version(\"<3176\", 3175))", + "got": "is_compatible_version(\"3176\", \"<3177\")) self.assertFalse( is_compatible_version(\"3177\", \"<3177\")) self.assertTrue( is_compatible_version(\"3176\", \"<3178\")) self.assertFalse( is_compatible_version(\"3178\", \"<3178\")) self.assertTrue( is_compatible_version(\"3176\", \"<3179\")) self.assertFalse( is_compatible_version(\"3179\", \"<3179\")) self.assertTrue( is_compatible_version(\"3176\", \"<318", + "got_raw": "is_compatible_version(\"3176\", \"<3177\")) self.assertFalse( is_compatible_version(\"3177\", \"<3177\")) self.assertTrue( is_compatible_version(\"3176\", \"<3178\")) self.assertFalse( is_compatible_version(\"3178\", \"<3178\")) self.assertTrue( is_compatible_version(\"3176\", \"<3179\")) self.assertFalse( is_compatible_version(\"3179\", \"<3179\")) self.assertTrue( is_compatible_version(\"3176\", \"<318", + "exact_match": false, + "code_bleu": 0.028413960345557526, + "edit_similarity": 0.16786570743405277 + }, + { + "repo": "sublimehq/package_control", + "expected": "resolve_url( \"https://github.com/packagecontrol-test/package_control-tester/repository.json\", \"https://github.com/packagecontrol-test-2/package_control-tester-2\" ))", + "got": "\"https://github.com/PyCQA/flake8\") == resolve_url(\"https://github.com/PyCQA/flake8\", None)) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "got_raw": "\"https://github.com/PyCQA/flake8\") == resolve_url(\"https://github.com/PyCQA/flake8\", None)) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "exact_match": false, + "code_bleu": 0.018985036970864767, + "edit_similarity": 0.24390243902439024 + }, + { + "repo": "sublimehq/package_control", + "expected": "normalized", + "got": "normalized", + "got_raw": "normalized + \"!\" + str(PEP440Version.epoch) + \".\" + str(PEP440Version.dev) + str(PEP440Version.local) + str(PEP440Version.pre) + str(PEP440Version.post) + str(PEP440Version.dev) + str(PEP440Version.local) + str(PEP440Version.pre) + str(PEP440Version.post) + str(PEP440Version.dev) + str(PEP440Version.local) +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sublimehq/package_control", + "expected": "did.exists())", + "got": "did.exists())", + "got_raw": "did.exists()) self.assertEqual(True, did.is_dir()) self.assertEqual(True, did.is_distinfo()) self.assertEqual(True, did.is_package()) self.assertEqual(True, did.is_package_dir()) self.assertEqual(True, did.is_package_info()) self.assertEqual(True, did.is_package_info_dir()) self.assertEqual(True, did.is_package_info_file()) self.assertEqual(True, did.is_package_info_file()) self.assertEqual(True, did.is_package_info_file()) self.assertEqual(True, did.is_package_info_file()) self.assertEqual(True, did.is_package_info_file()) self.assertEqual(True, did.is_package_info_file()) self.assertEqual(True, did.is_package_info_file()) self.assertEqual", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sublimehq/package_control", + "expected": "is_compatible_version(\">3176\", 3177))", + "got": "is_compatible_version(\"3.11.*\", \"3.11.1\")) self.assertFalse( is_compatible_version(\"3.11.*\", \"3.11\")) self.assertFalse( is_compatible_version(\"3.11.*\", \"3.10\")) self.assertFalse( is_compatible_version(\"3.11.*\", \"3.10.1\")) self.assertFalse( is_compatible_version(\"3.11.*\", \"3.10.2\")) self.assertFalse( is_compatible_version(\"3.11.*\", \"3.10.3\")) self.assertFalse(", + "got_raw": "is_compatible_version(\"3.11.*\", \"3.11.1\")) self.assertFalse( is_compatible_version(\"3.11.*\", \"3.11\")) self.assertFalse( is_compatible_version(\"3.11.*\", \"3.10\")) self.assertFalse( is_compatible_version(\"3.11.*\", \"3.10.1\")) self.assertFalse( is_compatible_version(\"3.11.*\", \"3.10.2\")) self.assertFalse( is_compatible_version(\"3.11.*\", \"3.10.3\")) self.assertFalse(", + "exact_match": false, + "code_bleu": 0.0314514092004474, + "edit_similarity": 0.16080402010050251 + }, + { + "repo": "sublimehq/package_control", + "expected": "client.user_info(\"https://bitbucket.org/wbond\"))", + "got": "client.user_info(\"https://bitbucket.org/\"))", + "got_raw": "client.user_info(\"https://bitbucket.org/\")) self.assertEqual(None, client.user_info(\"https://bitbucket.org/\")) self.assertEqual(None, client.user_info(\"https://bitbucket.org/\")) self.assertEqual(None, client.user_info(\"https://bitbucket.org/\")) self.assertEqual(None, client.user_info(\"https://bitbucket.org/\")) self.assertEqual(None, client.user_info(\"https://bitbucket.org/\")) self.assertEqual(None, client.user_info(\"https://bitbucket.org/\")) self.assertEqual(None, client.user_info(\"https://bitbucket.org/\")) self.assertEqual(None, client.user_info(\"https://bitbucket", + "exact_match": false, + "code_bleu": 0.5946035575013605, + "edit_similarity": 0.945054945054945 + }, + { + "repo": "sublimelsp/LSP", + "expected": "d.get(\"some.nonexistant.key\"))", + "got": "d.get(\"foo.bar.baz\"))", + "got_raw": "d.get(\"foo.bar.baz\"))", + "exact_match": false, + "code_bleu": 0.5946035575013605, + "edit_similarity": 0.5098039215686274 + }, + { + "repo": "sublimelsp/LSP", + "expected": "2)", + "got": "1)", + "got_raw": "1)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "sublimelsp/LSP", + "expected": "self.session.capabilities)", + "got": "self.view.settings().get(\"capabilities\"", + "got_raw": "self.view.settings().get(\"capabilities\", {})) self.assertNotIn(\"fooProvider\", self.view.settings().get(\"capabilities\", {})) self.assertEqual(self.view.settings().get(\"capabilities\", {}), {\"barProvider\": True}) self.assertEqual(self.view.settings().get(\"capabilities\", {}), {\"barProvider\": True}) self.assertEqual(self.view.settings().get(\"capabilities\", {}), {\"barProvider\": True}) self.assertEqual(self.view.settings().get(\"capabilities\", {}), {\"barProvider\": True}) self.assertEqual(self.view.settings().get(\"capabilities\", {}), {\"barProvider\": True}) self.assertEqual(self.view.settings().get(\"capabilities\", {}", + "exact_match": false, + "code_bleu": 0.17033186037639278, + "edit_similarity": 0.676923076923077 + }, + { + "repo": "sublimelsp/LSP", + "expected": "view.is_loading())", + "got": "view.is_loading())", + "got_raw": "view.is_loading()) self.assertEqual(view.substr(sublime.Region(0, view.size())), expected[i]) self.assertEqual(view.size(), len(expected[i])) self.assertEqual(view.line_count(), 1) self.assertEqual(view.rowcol(0), (0, 0)) self.assertEqual(view.rowcol(1), (0, 1)) self.assertEqual(view.rowcol(2), (0, 2)) self.assertEqual(view.rowcol(3), (0, 3)) self.assertEqual(view.rowcol(4), (0, 4)) self.assertEqual(view.rowcol(5), (0, 5)) self.assertEqual(view.rowcol(", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sublimelsp/LSP", + "expected": "d.get(\"foo\"))", + "got": "d.get(\"foo\"))", + "got_raw": "d.get(\"foo\"))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sublimelsp/LSP", + "expected": "expected_regex)", + "got": "expected_regex)", + "got_raw": "expected_regex) if label_details is not None else self.assertEqual(native.details, \"\") self.assertEqual(native.label, label) self.assertEqual(native.kind, CompletionItemKind.FUNCTION) self.assertEqual(native.insertText, \"fmod\") self.assertEqual(native.insertTextFormat, InsertTextFormat.STANDARD) self.assertEqual(native.preselect, True) self.assertEqual(native.sortText, \"fmod\") self.assertEqual(native.filterText, \"force_label_to_go_into_st_detail_field\") self.assertEqual(native.preselect, True) self.assertEqual(native.insertTextFormat, InsertTextFormat.STANDARD) self.assertEqual(native.tag,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sublimelsp/LSP", + "expected": "\"F\")", + "got": "'F')", + "got_raw": "'F')", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "sublimelsp/LSP", + "expected": "\"bar\\nbar\\nbar\\n\")", + "got": "\"bar\\nbar\\nbar\\n\")", + "got_raw": "\"bar\\nbar\\nbar\\n\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sublimelsp/LSP", + "expected": "{})", + "got": "{})", + "got_raw": "{})", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sublimelsp/LSP", + "expected": "\"/short-path\")", + "got": "\"/short-path\")", + "got_raw": "\"/short-path\") self.assertEqual(folders[1].path, \"/longer-path\") self.assertEqual(folders[0].uri, \"file:///short-path\") self.assertEqual(folders[1].uri, \"file:///longer-path\") self.assertEqual(folders[0].name, \"short-path\") self.assertEqual(folders[1].name, \"longer-path\") self.assertEqual(folders[0].index, 0) self.assertEqual(folders[1].index, 1) self.assertEqual(folders[0].is_root, True) self.assertEqual(folders[1].is_root, False) self.assertEqual(folders", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sublimelsp/LSP", + "expected": "dict())", + "got": "{})", + "got_raw": "{})", + "exact_match": false, + "code_bleu": 0.3388507513536918, + "edit_similarity": 0.2 + }, + { + "repo": "sublimelsp/LSP", + "expected": "self.view.settings().get(\"translate_tabs_to_spaces\"))", + "got": "self.view.settings().get(\"translate_tabs_to_spaces\"))", + "got_raw": "self.view.settings().get(\"translate_tabs_to_spaces\"))\n self.view.settings().set(\"translate_tabs_to_spaces\", False)\n yield from self.__run_formatting_test(original, original, file_changes)\n self.assertFalse(self.view.settings().get(\"translate_tabs_to_spaces\"))\n\n def test_formatting(self) -> Generator:\n original = ' ' * 4 + 'abc' + ' ' * 4 + 'def' + ' ' * 4 + 'ghi' + ' ' * 4 + 'jkl' + ' ' * 4 + 'mno' + ' ' *", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sublimelsp/LSP", + "expected": "text)", + "got": "text)", + "got_raw": "text)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sublimelsp/LSP", + "expected": "any(manager.match_view(self.view)))", + "got": "DISABLED_CONFIG.enabled)", + "got_raw": "DISABLED_CONFIG.enabled) # disables config in the view's project data # (not in-memory) self.window.project_data.return_value[\"settings\"][\"LSP\"][\"test\"][\"enabled\"] = False self.window.project_data.assert_called_once() # disables config in the view's settings # (not in-memory) self.window.settings().set.assert_called_once_with( \"LSP.test.enabled\", False ) self.window.settings().set.assert_called_once_with( \"LSP.test.enabled\", False ) # disables config in the view's settings # (in-memory) manager.disable_config(DISABLED_CONFIG.name) self.assertFalse(DISABLED_CONFIG.enabled) # re", + "exact_match": false, + "code_bleu": 0.13254512146117509, + "edit_similarity": 0.1694915254237288 + }, + { + "repo": "sublimelsp/LSP", + "expected": "'c')", + "got": "'c')", + "got_raw": "'c')", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sublimelsp/LSP", + "expected": "overriddes['unknown'])", + "got": "{\"foo\":", + "got_raw": "{\"foo\": 1, \"bar\": 2})", + "exact_match": false, + "code_bleu": 0.22795070569547776, + "edit_similarity": 0.13793103448275862 + }, + { + "repo": "sublimelsp/LSP", + "expected": "parse_uri(\"file:///c:/dir ectory/file.txt\")[1])", + "got": "parse_uri(\"file:///C:/dir%20ectory/file.txt\")[1]) self.assertEqual(\"C:\\\\dir ectory\\\\file.txt\"", + "got_raw": "parse_uri(\"file:///C:/dir%20ectory/file.txt\")[1]) self.assertEqual(\"C:\\\\dir ectory\\\\file.txt\", parse_uri(\"file:///c:/dir%20ectory/file.txt\")[1]) self.assertEqual(\"C:\\\\dir ectory\\\\file.txt\", parse_uri(\"file:///c:/dir%20ectory/file.txt\")[1]) self.assertEqual(\"C:\\\\dir ectory\\\\file.txt\", parse_uri(\"file:///c:/dir%20ectory/file.txt\")[1]) self.assertEqual(\"C:\\\\dir ectory\\\\file.txt\", parse_uri(\"file:///c:/dir", + "exact_match": false, + "code_bleu": 0.3934995962231127, + "edit_similarity": 0.6428571428571429 + }, + { + "repo": "sublimelsp/LSP", + "expected": "10)", + "got": "1)", + "got_raw": "1) # Line 1, column 0 (1-based) self.assertEqual(start[1], 0) # Line 1, column 0 (1-based) self.assertEqual(end[0], 2) # Line 2, column 0 (1-based) self.assertEqual(end[1], 0) # Line 2, column 0 (1-based) self.assertEqual(len(newText), 8) # 8 characters in the new text self.assertEqual(len(newText), end[0] - start[0]) # Same length as the range self.assertEqual(len(newText), end", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.8 + }, + { + "repo": "sublimelsp/LSP", + "expected": "\"fd\")", + "got": "'fd')", + "got_raw": "'fd') self.view.run_command('lsp_complete') self.assertEqual(self.view.substr(self.view.line(region)), 'fmod') self.assertEqual(self.view.substr(self.view.line(region).b), 'd') self.assertEqual(self.view.substr(self.view.line(region).b + 1), 'f') self.assertEqual(self.view.substr(self.view.line(region).b + 2), 'm') self.assertEqual(self.view.substr(self.view.line(region).b + 3), 'd') self.assertEqual(self.view.substr(self.view.line(region).b + 4), 'f') self.assertEqual(self.view.substr(self.view.line(region).b + 5),", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6 + }, + { + "repo": "sublimelsp/LSP", + "expected": "6)", + "got": "6)", + "got_raw": "6) self.assertEqual(len(edits), 5) self.assertEqual(edits[0].range.start.line, 14) self.assertEqual(edits[0].range.start.character, 5) self.assertEqual(edits[0].range.end.line, 14) self.assertEqual(edits[0].range.end.character, 9) self.assertEqual(edits[1].range.start.line, 11) self.assertEqual(edits[1].range.start.character, 21) self.assertEqual(edits[1].range.end.line, 11) self.assertEqual(edits[1].range.end.character, 25", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sunscrapers/djoser", + "expected": "user.get_username())", + "got": "user.custom_username)", + "got_raw": "user.custom_username) self.assertEqual(data[\"current_password\"], user.password) self.assertFalse(user.is_active) self.assertFalse(user.is_staff) self.assertFalse(user.is_superuser) self.assertFalse(user.is_active) self.assertFalse(user.is_active) self.assertFalse(user.is_active) self.assertFalse(user.is_active) self.assertFalse(user.is_active) self.assertFalse(user.is_active) self.assertFalse(user.is_active) self.assertFalse(user.is_active) self.assertFalse(user.is_active) self.assertFalse(user.is_active) self.assertFalse(user.is_active) self.assertFalse(user.is_active) self.assertFalse(user.is_active) self.assertFalse(user.is_active) self.assertFalse(user.is_active) self.assertFalse(user.is_active)", + "exact_match": false, + "code_bleu": 0.3387551654364098, + "edit_similarity": 0.7804878048780488 + }, + { + "repo": "sunscrapers/djoser", + "expected": "settings.CONSTANTS.messages.INVALID_CREDENTIALS_ERROR)", + "got": "settings.CONSTANTS.messages.NOT_VERIFIED_ERROR)", + "got_raw": "settings.CONSTANTS.messages.NOT_VERIFIED_ERROR) self.assertFalse(self.signal_sent) user_logged_in.disconnect(self.signal_receiver) user.is_active = True user.save() user_logged_in.connect(self.signal_receiver) response = self.client.post(self.base_url, data) self.assert_status_equal(response, status.HTTP_200_OK) self.signal_sent = False user_logged_in.disconnect(self.signal_receiver) self.assert_token_in_response(response) self.signal_sent = True self.assert_token_in_response(response) self.assert_token_in_response(response) self.assert_token_in_response(response) self.assert_token_in_response(response) self.assert_token_in_response(response) self.assert_token", + "exact_match": false, + "code_bleu": 0.7506238537503395, + "edit_similarity": 0.7920792079207921 + }, + { + "repo": "sunscrapers/djoser", + "expected": "user.auth_token.key)", + "got": "user.auth_token.key)", + "got_raw": "user.auth_token.key) self.assertEqual(user.last_login, previous_last_login) self.assertTrue(self.signal_sent) self.assertEqual( settings.CONSTANTS.messages.LOGIN_SUCCESS, response.json()[\"detail\"] ) self.assertEqual( settings.CONSTANTS.messages.INVALID_CREDENTIALS, response.json()[\"errors\"][\"nonFieldErrors\"] ) self.assertEqual( settings.CONSTANTS.messages.INVALID_CREDENTIALS, response.json()[\"errors\"][\"password\"] ) self.assertEqual( settings.CONSTANTS.messages.INVALID_CREDENTIALS, response.json()[\"errors\"][\"username\"] ) self.assertEqual( settings.CONSTANTS.messages.INVALID_CREDENTIALS, response.json()[\"errors\"][\"email\"] ) self.assertEqual( settings", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sunscrapers/djoser", + "expected": "2)", + "got": "1)", + "got_raw": "1)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "sunscrapers/djoser", + "expected": "status.HTTP_400_BAD_REQUEST)", + "got": "status.HTTP_400_BAD_REQUEST)", + "got_raw": "status.HTTP_400_BAD_REQUEST) self.assert_error(response, \"Invalid login data\") self.assert_error_code(response, \"invalid_login_data\") self.assert_error_field(response, invalid_field) self.assert_error_message(response, \"Invalid data\") self.assert_error_message_code(response, \"invalid_data\") self.assert_error_message_field(response, invalid_field) self.assert_error_message_field_code(response, invalid_field, \"invalid_data\") self.assert_error_message_field_message(response, invalid_field, \"invalid_data\") self.assert_error_message_field_message_code(response, invalid_field, \"invalid_data\") self.assert_error_message_field_message_field(response, invalid_field,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sunscrapers/djoser", + "expected": "response.data)", + "got": "response.json())", + "got_raw": "response.json()) self.assertIn(\"state\", response.json()) self.assertIn(\"provider\", response.json()) self.assertEqual(\"facebook\", response.json()[\"provider\"]) self.assertEqual(\"http://test.localhost/\", response.json()[\"redirect_uri\"]) self.assertEqual( response.json()[\"state\"], \"state\" ) self.assertEqual( response.json()[\"authorization_url\"], \"https://www.facebook.com/v3.0/dialog/oauth?client_id=1234567890&state=state\" ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "exact_match": false, + "code_bleu": 0.31239399369202553, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "sunscrapers/djoser", + "expected": "\"TokenSerializer\")", + "got": "\"TokenSerializer\")", + "got_raw": "\"TokenSerializer\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sunscrapers/djoser", + "expected": "status.HTTP_204_NO_CONTENT)", + "got": "status.HTTP_204_NO_CONTENT)", + "got_raw": "status.HTTP_204_NO_CONTENT) self.assert_instance_does_not_exist(User, username=\"john\") self.assert_instance_exists(User, username=\"jane\") self.assert_instance_exists(User, username=\"admin\") self.assert_instance_exists(User, username=\"test\") self.assert_instance_exists(User, username=\"test2\") self.assert_instance_exists(User, username=\"test3\") self.assert_instance_exists(User, username=\"test4\") self.assert_instance_exists(User, username=\"test5\") self.assert_instance_exists(User, username=\"test6\") self.assert_instance_exists(User, username=\"test7\") self.assert_instance_exists(User, username=\"test8", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sunscrapers/djoser", + "expected": "status.HTTP_204_NO_CONTENT)", + "got": "status.HTTP_204_NO_CONTENT)", + "got_raw": "status.HTTP_204_NO_CONTENT) self.assertFalse(self.client.session.get(\"token\")) self.assertTrue(self.signal_sent) self.client.logout() self.assertFalse(self.client.user.is_authenticated)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sunscrapers/djoser", + "expected": "1)", + "got": "1)", + "got_raw": "1)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sunscrapers/djoser", + "expected": "user.username)", + "got": "user.username)", + "got_raw": "user.username)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sunscrapers/djoser", + "expected": "ExampleUser)", + "got": "ExampleUser)", + "got_raw": "ExampleUser) self.assertEqual( ExampleUser.objects.count(), 1 ) self.assertEqual( ExampleUser.objects.get().email, data[\"email\"] ) self.assertEqual( ExampleUser.objects.get().username, data[\"email\"] ) self.assertEqual( ExampleUser.objects.get().password, data[\"password\"] ) self.assertEqual( ExampleUser.objects.get().is_active, True ) self.assertEqual( ExampleUser.objects.get().is_staff, False ) self.assertEqual( ExampleUser.objects.get().is_superuser, False ) self.assertEqual( ExampleUser.objects.get().groups.count(), 0 ) self.assertEqual( ExampleUser.objects.get().user_permissions.count(), 0 ) self", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sunscrapers/djoser", + "expected": "1)", + "got": "1)", + "got_raw": "1) self.assert_email_in_mailbox(request, user) self.assert_email_not_in_mailbox(request) ) def test_post_should_return_400_if_email_is_missing(self): data = {\"email\": \"\"} response = self.client.post(self.base_url, data) self.assert_status_equal(response, status.HTTP_400_BAD_REQUEST) self.assert_error_in_response(response, \"email\") def test_post_should_return_400_if_email_is_invalid(self): data = {\"email\": \"invalid\"} response = self.client.post(self.base_url, data) self.assert_status_equal(response, status.HTTP_400_BAD_REQUEST", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sunscrapers/djoser", + "expected": "1)", + "got": "1)", + "got_raw": "1) self.assert_emails_equal( [ { \"email\": self.user.email, \"subject\": \"Activate your account\", \"body\": \"Activate your account\", } ], ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "sunscrapers/djoser", + "expected": "\"my_domain\"", + "got": "\"my_domain\"", + "got_raw": "\"my_domain\" assert context_produced_using_settings.get(\"site_name\") == \"my_site_name\" assert context_produced_using_settings.get(\"protocol\") == \"https\" assert context_produced_using_settings.get(\"protocol\") == \"https\" assert context_produced_using_settings.get(\"protocol\") == \"https\" assert context_produced_using_settings.get(\"protocol\") == \"https\" assert context_produced_using_settings.get(\"protocol\") == \"https\" assert context_produced_using_settings.get(\"protocol\") == \"https\" assert context_produced_using_settings.get(\"protocol\") == \"https\" assert context_produced_using_settings.get(\"protocol", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "swar/nba_api", + "expected": "1", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "swar/nba_api", + "expected": "GAME_ID", + "got": "GAME_ID", + "got_raw": "GAME_ID # noqa: E501\n\n\ndef test_endpoint_spec_auto_resolves_optional_params():\n endpoint = EndpointSpec(DemoEndpoint)() # noqa: E501\n\n\ndef test_endpoint_spec_auto_resolves_default_params():\n endpoint = EndpointSpec(DemoEndpoint)() # noqa: E501\n\n\ndef test_endpoint_spec_auto_resolves_all_params():\n endpoint = EndpointSpec(DemoEndpoint)() # noqa: E501\n\n\ndef test_endpoint_spec_auto_resolves_all_params_with_defaults():\n endpoint = EndpointSpec(DemoEndpoint)() # noqa:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "swar/nba_api", + "expected": "2", + "got": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "swar/nba_api", + "expected": "4", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "swar/nba_api", + "expected": "2", + "got": "2", + "got_raw": "2 * 2 # 2 teams * 2 rows per team (home/away) # 2 rows per team (home/away) # 2 rows per team (home/away) # 2 rows per team (home/away) # 2 rows per team (home/away) # 2 rows per team (home/away) # 2 rows per team (home/away) # 2 rows per team (home/away) # 2 rows per team (home/away) # 2 rows per team (home/away)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "swar/nba_api", + "expected": "\"2024-25\"", + "got": "\"2024-25\"", + "got_raw": "\"2024-25\" endpoint.parameters[\"LeagueID\"] == \"00\" endpoint.parameters[\"GameScope\"] == \"all\" endpoint.parameters[\"GameSegment\"] == \"all\" endpoint.parameters[\"Period\"] == \"all\" endpoint.parameters[\"Outcome\"] == \"all\" endpoint.parameters[\"Location\"] == \"all\" endpoint.parameters[\"DateFrom\"] == \"\" endpoint.parameters[\"DateTo\"] == \"\" endpoint.parameters[\"OpponentTeamID\"] == \"\" endpoint.parameters[\"VsConference\"] == \"\" endpoint.parameters[\"VsDivision\"] == \"\" endpoint.parameters[\"StartPeriod\"] == \"1\" endpoint.parameters[\"EndPeriod\"] == \"1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "swar/nba_api", + "expected": "2", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "swar/nba_api", + "expected": "\"00\"", + "got": "\"00\"", + "got_raw": "\"00\" # Default league ID for regular season games \"\"\" endpoint.parameters[\"DayOffset\"] == 0 # Default day offset \"\"\" endpoint.parameters[\"GameOffset\"] == 0 # Default game offset \"\"\" endpoint.parameters[\"StartPeriod\"] == 0 # Default start period \"\"\" endpoint.parameters[\"EndPeriod\"] == 10 # Default end period \"\"\" endpoint.parameters[\"StartRange\"] == 0 # Default start range \"\"\" endpoint.parameters[\"EndRange\"] == 10 # Default end range \"\"\" endpoint.parameters[\"GameSegment\"] == \"\" # Default game segment \"\"\" endpoint.parameters[\"TeamId\"] == ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "swar/nba_api", + "expected": "play[\"player\"]", + "got": "\"Kobe", + "got_raw": "\"Kobe Bryant\" or \"Kobe Bryant\" == \"Kobe Bryant\" or \"Kobe Bryant\" == \"Kobe Bryant\" or \"Kobe Bryant\" == \"Kobe Bryant\" or \"Kobe Bryant\" == \"Kobe Bryant\" or \"Kobe Bryant\" == \"Kobe Bryant\" or \"Kobe Bryant\" == \"Kobe Bryant\" or \"Kobe Bryant\" == \"Kobe Bryant\" or \"Kobe Bryant\" == \"Kobe Bryant\" or \"Kobe Bryant\" == \"Kobe Bryant\" or \"Kobe Bryant\" == \"Kobe Bryant\" or \"K", + "exact_match": false, + "code_bleu": 0.2259005009024612, + "edit_similarity": 0.21052631578947367 + }, + { + "repo": "swar/nba_api", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" assert endpoint.parameters[\"DateTo\"] == \"\" assert endpoint.parameters[\"GameSegment\"] == \"\" assert endpoint.parameters[\"Location\"] == \"\" assert endpoint.parameters[\"VsConference\"] == \"\" assert endpoint.parameters[\"VsDivision\"] == \"\" assert endpoint.parameters[\"GameStatus\"] == \"\" assert endpoint.parameters[\"PlayerPosition\"] == \"\" assert endpoint.parameters[\"PlayerType\"] == \"\" assert endpoint.parameters[\"PlayerExperience\"] == \"\" assert endpoint.parameters[\"PlayerDraftYear\"] == \"\" assert endpoint.parameters[\"PlayerDraftPick\"] == \"\" assert endpoint.parameters[\"Season\"] == \"2022-23\" assert endpoint.parameters[\"SeasonType\"] == \"Regular Season", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "swar/nba_api", + "expected": "0", + "got": "0", + "got_raw": "0 and player_count < 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "swar/nba_api", + "expected": "1", + "got": "0", + "got_raw": "0 # No leaders found with missing fields\"\"\" def test_invalid_leaders_type(self): \"\"\"Test parser raises ValueError for invalid leaders type.\"\"\" with pytest.raises(ValueError) as exc_info: parser = NBAStatsGravityLeadersParser( GRAVITYLEADERS_INVALID_LEADERS_TYPE ) data = parser.get_leaders_data() assert data is None # No leaders found with invalid type\"\"\" def test_missing_leaders(self): \"\"\"Test parser returns None for missing leaders.\"\"\" parser = NBAStatsGravityLeadersParser(GRAVITYLEADERS_MISSING_LEADERS) data = parser.get_leaders_data() assert data is None # No", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "swar/nba_api", + "expected": "\"123\"", + "got": "\"123\"", + "got_raw": "\"123\" # gameId # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "swar/nba_api", + "expected": "3", + "got": "\"2025-11-01\"", + "got_raw": "\"2025-11-01\" # gameDate\n assert data[0][3] == \"0\" # gameTime\n assert data[0][4] == \"0\" # gameTimeSecs\n assert data[0][5] == \"0\" # gamePeriod\n assert data[0][6] == \"0\" # gamePeriodSecs\n assert data[0][7] == \"0\" # gameClock\n assert data[0][8] == \"0\" # gameClockSecs\n assert data", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "swar/nba_api", + "expected": "3", + "got": "\"20251105\"", + "got_raw": "\"20251105\" # gameDate (YYYYMMDD) assert row[3] == \"0\" # gameTime (HH) assert row[4] == \"0\" # gameTime (MM) assert row[5] == \"0\" # gameTime (SS) assert row[6] == \"0\" # gameTime (SS) assert row[7] == \"0\" # gameTime (SS) assert row[8] == \"0\" # gameTime (SS) assert row[9] ==", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "swar/nba_api", + "expected": "5", + "got": "5.000000000000001", + "got_raw": "5.000000000000001 # The value is slightly off due to floating-point precision.", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.1111111111111111 + }, + { + "repo": "swar/nba_api", + "expected": "0", + "got": "0", + "got_raw": "0 # At least one player stats entry\n\n assert len(result[\"TeamStarterBenchStats\"][\"data\"]) == 2 # 2 teams\n\n def test_parser_with_partial_response(self):\n \"\"\"Test parser handles partial API response.\"\"\"\n import json\n from pathlib import Path\n\n response_path = (\n Path(__file__).parents[4] / \"docs\" / \"nba_api\" / \"stats\" / \"endpoints\" / \"responses\" / \"boxscoretraditionalv3_partial.json\"\n )\n\n if not response_path.exists():\n pytest.skip(f\"Partial response file not", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "swar/nba_api", + "expected": "content", + "got": "content[\"scoreboard\"][\"games\"]", + "got_raw": "content[\"scoreboard\"][\"games\"] + content[\"scoreboard\"][\"games\"] + content[\"scoreboard\"][\"games\"] + content[\"scoreboard\"][\"games\"] + content[\"scoreboard\"][\"games\"] + content[\"scoreboard\"][\"games\"] + content[\"scoreboard\"][\"games\"] + content[\"scoreboard\"][\"games\"] + content[\"scoreboard\"][\"games\"] + content[\"scoreboard\"][\"games\"] + content[\"scoreboard\"][\"games\"] + content[\"scoreboard\"][\"games\"] + content[\"scoreboard\"][\"games\"] + content[\"scoreboard\"][\"games\"] + content[\"scoreboard\"][\"games\"] + content[\"scoreboard\"][\"games\"]", + "exact_match": false, + "code_bleu": 0.18575057999133598, + "edit_similarity": 0.3783783783783784 + }, + { + "repo": "swar/nba_api", + "expected": "2", + "got": "1", + "got_raw": "1\n\n def test_get(self, mock_request) -> None:\n \"\"\"Test the get method of the TeamDashLineupsEndpoint class.\"\"\"\n mock_response = Mock()\n mock_response.json.return_value = json_fixture()\n mock_request.get.return_value = mock_response\n\n endpoint = TeamDashLineups()\n result = endpoint.get()\n\n assert result == json_fixture()", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "swar/nba_api", + "expected": "games", + "got": "games[0]", + "got_raw": "games[0] | games[1] | games[2] | games[3] | games[4] | games[5] | games[6] | games[7] | games[8] | games[9] | games[10] | games[11] | games[12] | games[13] | games[14] | games[15] | games[16] | games[17] | games[18] | games[19] | games[20] | games[21] | games[22] |", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.7692307692307693 + }, + { + "repo": "syrupy-project/syrupy", + "expected": "FailedToLoadModuleMember)", + "got": "FailedToLoadModuleMember)", + "got_raw": "FailedToLoadModuleMember) as excinfo: import_module_member(path) assert str(excinfo.value) == f\"Could not find module '{path}'\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "syrupy-project/syrupy", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" # noqa: E711\n\n\ndef test_empty_dict(snapshot_json):\n assert snapshot_json == {} # noqa: E711\n\n\ndef test_empty_list(snapshot_json):\n assert snapshot_json == [] # noqa: E711\n\n\ndef test_empty_tuple(snapshot_json):\n assert snapshot_json == () # noqa: E711\n\n\ndef test_empty_set(snapshot_json):\n assert snapshot_json == set() # noqa: E711\n\n\ndef test_empty_frozenset(snapshot_json):\n assert snapshot_json == frozenset() # noqa: E711\n\n\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "syrupy-project/syrupy", + "expected": "snapshot_attrs", + "got": "snapshot_attrs(point)", + "got_raw": "snapshot_attrs(point) # type: ignore # noqa: E501 # fmt: off # noqa: E501 # fmt: on # noqa: E501 # fmt: off # noqa: E501 # fmt: on # noqa: E501 # fmt: off # noqa: E501 # fmt: on # noqa: E501 # fmt: off # noqa: E501 # fmt: on # noqa: E501 # fmt: off #", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.8 + }, + { + "repo": "syrupy-project/syrupy", + "expected": "1", + "got": "0", + "got_raw": "0", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "syrupy-project/syrupy", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "syrupy-project/syrupy", + "expected": "snapshot(name=\"case3\", diff=\"large snapshot\")", + "got": "snapshot(case=\"3\") def test_snapshot_diff_id_nested(snapshot): my_dict = { \"field_0\": True, \"field_1\": \"no_value\", \"field_2\": 0, \"field_3\": None, \"field_4\": 1, \"field_5\": False, \"field_6\": (True, \"hey\", 2, None), \"field_7\": {False, \"no\", None}, } dict_large_snapshot = { **my_dict, \"nested_0\": dict(my_dict), \"nested_1\": dict(my_dict), } assert dict_large_snapshot == snapshot(name", + "got_raw": "snapshot(case=\"3\") def test_snapshot_diff_id_nested(snapshot): my_dict = { \"field_0\": True, \"field_1\": \"no_value\", \"field_2\": 0, \"field_3\": None, \"field_4\": 1, \"field_5\": False, \"field_6\": (True, \"hey\", 2, None), \"field_7\": {False, \"no\", None}, } dict_large_snapshot = { **my_dict, \"nested_0\": dict(my_dict), \"nested_1\": dict(my_dict), } assert dict_large_snapshot == snapshot(name", + "exact_match": false, + "code_bleu": 0.02908672838208506, + "edit_similarity": 0.06103286384976526 + }, + { + "repo": "syrupy-project/syrupy", + "expected": "TypeError, match=\"At least 1 prop name is required.\")", + "got": "ValueError) as exc_info: props('foo')('bar')('baz')('qux')('quux')('quuz')('quuuu')('quuuuu')('quuuuuu')('quuuuuuu')('quuuuuuuu')('quuuuuuuuu')('quuuuuuuuuu')('quuuuuuuuuuu')('quuuuuuuuuuuu')('quuuuuuuuuuuuu')('quuuuuuuuuuuuuu')('quuuuuuuuuuuuuuu')('quuuuuuuuuuuuuuu", + "got_raw": "ValueError) as exc_info: props('foo')('bar')('baz')('qux')('quux')('quuz')('quuuu')('quuuuu')('quuuuuu')('quuuuuuu')('quuuuuuuu')('quuuuuuuuu')('quuuuuuuuuu')('quuuuuuuuuuu')('quuuuuuuuuuuu')('quuuuuuuuuuuuu')('quuuuuuuuuuuuuu')('quuuuuuuuuuuuuuu')('quuuuuuuuuuuuuuu", + "exact_match": false, + "code_bleu": 0.01903035925309475, + "edit_similarity": 0.12539184952978055 + }, + { + "repo": "syrupy-project/syrupy", + "expected": "result.stdout.str()", + "got": "result.stdout.str()", + "got_raw": "result.stdout.str() result.stdout.re_match_lines( (r\"test_used\\(testdir\\.tmpdir\\.join\\(\\'test_updated_1\\'\\)\\) \\[ok\\]\", r\"test_updated_1\\(testdir\\.tmpdir\\.join\\(\\'test_updated_1\\'\\)\\) \\[ok\\]\", r\"test_updated_2\\(testdir\\.tmpdir\\.join\\(\\'test_updated_2\\'\\)\\) \\[ok\\]\", r\"test_updated_3\\(testdir\\.tmpdir\\.join\\(\\'test_updated_3\\'\\)\\) \\[ok\\]\", r\"test", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "syrupy-project/syrupy", + "expected": "0", + "got": "1", + "got_raw": "1 + len(plugin_args) * 2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + ", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "syrupy-project/syrupy", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "syrupy-project/syrupy", + "expected": "PathTypeError, match=\"argument cannot be empty\")", + "got": "PathTypeError) as excinfo:", + "got_raw": "PathTypeError) as excinfo:\n matcher = path_type(\"foo\") | path_type(\"bar\") | path_type(\"baz\") | path_type(\"qux\") | path_type(\"quux\") | path_type(\"quuz\") | path_type(\"qux\") | path_type(\"quux\") | path_type(\"quuz\") | path_type(\"qux\") | path_type(\"quux\") | path_type(\"quuz\") | path_type(\"qux\") | path_type(\"quux\") | path_type(\"quuz\") | path_type(\"qux\") | path_type(\"quux\") | path", + "exact_match": false, + "code_bleu": 0.251781283113064, + "edit_similarity": 0.4594594594594595 + }, + { + "repo": "syrupy-project/syrupy", + "expected": "expected_status_code", + "got": "expected_status_code", + "got_raw": "expected_status_code", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "syrupy-project/syrupy", + "expected": "snapshot(diff=\"does not exist index\")", + "got": "snapshot()", + "got_raw": "snapshot() # Should fail with an exception.", + "exact_match": false, + "code_bleu": 0.3194715521231362, + "edit_similarity": 0.425531914893617 + }, + { + "repo": "syrupy-project/syrupy", + "expected": "snapshot(name=\"test_is_awesome\")", + "got": "snapshot(name=\"test_is_awesome\")", + "got_raw": "snapshot(name=\"test_is_awesome\") ```", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tableau/server-client-python", + "expected": "all_tables[0].name", + "got": "all_tables[0].name.lower()", + "got_raw": "all_tables[0].name.lower() assert \"dim_product\" == all_tables[0].name.lower() assert \"dim_product\" == all_tables[0].name.lower() assert \"dim_product\" == all_tables[0].name.lower() assert \"dim_product\" == all_tables[0].name.lower() assert \"dim_product\" == all_tables[0].name.lower() assert \"dim_product\" == all_tables[0].name.lower() assert \"dim_product\" == all_tables[0].name.lower() assert \"dim_product\" == all_tables[0].name.lower() assert \"dim_product\" == all_tables", + "exact_match": false, + "code_bleu": 0.5706745777055999, + "edit_similarity": 0.8181818181818182 + }, + { + "repo": "tableau/server-client-python", + "expected": "in_user.id", + "got": "in_user.id", + "got_raw": "in_user.id == \"5de011f8-5aa9-4d5b-b991-f462c8dd6bb7\" assert out_user.name == in_user.name == \"Bob\" assert out_user.role == in_user.role == TSC.UserItem.Roles.Explorer.value assert out_user._id == in_user._id == \"5de011f8-5aa9-4d5b-b991-f462c8dd6bb7\" assert out_user._site_id == in_user._site_id == \"dad65087", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tableau/server-client-python", + "expected": "all_alerts[0].id", + "got": "all_alerts[0].id_128bit.lower()", + "got_raw": "all_alerts[0].id_128bit.lower() all_alerts[0].name == \"Test Alert\" all_alerts[0].description == \"Test Alert\" all_alerts[0].type == \"email\" all_alerts[0].status == \"active\" all_alerts[0].created_by == \"admin\" all_alerts[0].created_at == \"2019-08-23T14:12:00Z\" all_alerts[0].updated_by == \"admin\" all_alerts[0].updated_at == \"201", + "exact_match": false, + "code_bleu": 0.4617366309441026, + "edit_similarity": 0.6808510638297872 + }, + { + "repo": "tableau/server-client-python", + "expected": "views_list[2].id", + "got": "views_list[2].id", + "got_raw": "views_list[2].id assert \"Country names\" == views_list[2].name assert views_list[2].data_acceleration_config[\"acceleration_enabled\"] is False assert \"Disabled\" == views_list[2].data_acceleration_config[\"acceleration_status\"]\n\n\ndef test_update_workbook_acceleration(server: TSC.Server) -> None:\n response_xml = UPDATE_WORKBOOK_ACCELERATION_STATUS_XML.read_text()\n with requests_mock.mock() as m:\n m.get(server.workbooks.baseurl + \"/1f951daf-4061-451a-9df1-6", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tableau/server-client-python", + "expected": "task.last_run_at", + "got": "task.schedule_item.last_run_at", + "got_raw": "task.schedule_item.last_run_at assert \"2019-12-09T22:30:00Z\" == task.schedule_item.next_run_at_str assert \"2019-12-09T20:45:04Z\" == task.schedule_item.last_run_at_str assert \"2019-12-09T22:30:00Z\" == task.schedule_item.next_run_at_str assert \"2019-12-09T20:45:04Z\" == task.schedule_item.last_run", + "exact_match": false, + "code_bleu": 0.427287006396234, + "edit_similarity": 0.6956521739130435 + }, + { + "repo": "tableau/server-client-python", + "expected": "\"gs-3\"", + "got": "\"gs3\"", + "got_raw": "\"gs3\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.9090909090909091 + }, + { + "repo": "tableau/server-client-python", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as excinfo: TSC.require_boolean_flag(datasource) assert str(excinfo.value) == \"Datasource 10 requires a boolean flag\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tableau/server-client-python", + "expected": "3", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "tableau/server-client-python", + "expected": "\"hyper\"", + "got": "\"hyper\"", + "got_raw": "\"hyper\" # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tableau/server-client-python", + "expected": "1", + "got": "1", + "got_raw": "1 assert credentials[0].get(\"id\") is None assert credentials[0].get(\"name\") == \"test\" assert credentials[0].get(\"password\") == \"secret\" assert credentials[0].get(\"encrypted\") == \"true\" assert credentials[0].get(\"type\") == \"sql\" assert credentials[0].get(\"connectionType\") == \"ODBC\" assert credentials[0].get(\"connectionString\") is None assert credentials[0].get(\"server\") is None assert credentials[0].get(\"port\") is None assert credentials[0].get(\"database\") is None assert credentials[0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tableau/server-client-python", + "expected": "all_tables[0].id", + "got": "all_tables[0].id_1st_level_table[0]", + "got_raw": "all_tables[0].id_1st_level_table[0] assert \"10224773-ecee-42ac-b822-d786b0b8e4d9\" == all_tables[0].id_2nd_level_table[0] assert \"10224773-ecee-42ac-b822-d786b0b8e4d9\" == all_tables[0].id_3rd_level_table[0] assert \"10224773-ecee-42ac-b8", + "exact_match": false, + "code_bleu": 0.5169731539571706, + "edit_similarity": 0.6274509803921569 + }, + { + "repo": "tableau/server-client-python", + "expected": "slept)", + "got": "30.0)", + "got_raw": "30.0) == slept", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.18181818181818182 + }, + { + "repo": "tableau/server-client-python", + "expected": "\"2\"", + "got": "\"2\"", + "got_raw": "\"2\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tableau/server-client-python", + "expected": "all_tables[1].name", + "got": "all_tables[1].name.lower()", + "got_raw": "all_tables[1].name.lower() + \"\\n\" + \"2018-01-01\" == all_tables[2].created_at + \"\\n\" + \"2018-01-01\" == all_tables[2].updated_at + \"\\n\" + \"2018-01-01\" == all_tables[2].created_by + \"\\n\" + \"2018-01-01\" == all_tables[2].updated_by + \"\\n\" + \"2018-01-01\" == all_tables", + "exact_match": false, + "code_bleu": 0.5706745777055999, + "edit_similarity": 0.8181818181818182 + }, + { + "repo": "tableau/server-client-python", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as excinfo: server.workbooks.update(single_workbook) assert str(excinfo.value) == \"Missing required attribute: data_freshness_policy\" assert single_workbook.data_freshness_policy is None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tableau/server-client-python", + "expected": "subscription.id", + "got": "subscription.id_[\"id\"]", + "got_raw": "subscription.id_[\"id\"] assert \"My Subscription\" == subscription.name assert \"My Subscription\" == subscription.title assert \"My Subscription\" == subscription.description assert \"My Subscription\" == subscription.url assert \"My Subscription\" == subscription.owner_name assert \"My Subscription\" == subscription.owner_url assert \"My Subscription\" == subscription.owner_id[\"id\"] assert \"My Subscription\" == subscription.owner_id[\"name\"] assert \"My Subscription\" == subscription.owner_id[\"url\"] assert \"My Subscription\" == subscription.owner_id[\"email\"] assert \"My Subscription\" == subscription.owner_id[\"site_url\"] assert \"My Subscription\" == subscription.owner_id[\"site", + "exact_match": false, + "code_bleu": 0.2907153684841096, + "edit_similarity": 0.8108108108108109 + }, + { + "repo": "tableau/server-client-python", + "expected": "id_", + "got": "id_", + "got_raw": "id_", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tableau/server-client-python", + "expected": "flow.state", + "got": "flow.state", + "got_raw": "flow.state == \"Active\" == flow.priority == 100 == flow.schedule_type == \"Flow\" == flow.next_run_at == \"2016-09-01T01:00:00Z\" == flow.created_at == \"2016-09-01T11:00:00Z\" == flow.updated_at == \"2016-09-01T11:00:00Z\" == flow.id == \"f456e8f2-aeb2-4a8e-b82", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tableau/server-client-python", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as excinfo: server.groups.add_user(single_group, \"user1\") assert str(excinfo.value) == \"User ID is required\" def test_add_user(server: TSC.Server) -> None: response_xml = POPULATE_USERS.read_text() with requests_mock.mock() as m: m.get(server.groups.baseurl + \"/e7833b48-c6f7-47b5-a2a7-36e7dd232758/users\", text=response_xml) m.post(server.groups.baseurl + \"/e7833b48-c6f7", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tableau/server-client-python", + "expected": "ds1.id", + "got": "ds1.id", + "got_raw": "ds1.id assert \"33333333-3333-3333-3333-333333333333\" == ds2.id assert \"1d0304cd-3796-429f-b815-7258370b9b74\" == single_datasource.id assert \"test\" == single_datasource.name assert \"1d0304cd-3796-429f-b815-7258370", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "taskiq-python/taskiq", + "expected": "expected", + "got": "expected", + "got_raw": "expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "taskiq-python/taskiq", + "expected": "ValueError)", + "got": "NoResultError)", + "got_raw": "NoResultError) as exc_info:\n await task.wait_result(timeout=1)\n\n assert str(exc_info.value) == \"Task failed after 10 retries\"", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.56 + }, + { + "repo": "taskiq-python/taskiq", + "expected": "10", + "got": "10", + "got_raw": "10 + 1 # 10 retries + 1 initial run.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "taskiq-python/taskiq", + "expected": "{\"b\": 2}", + "got": "{\"b\": \"2\"}", + "got_raw": "{\"b\": \"2\"} # type: ignore # noqa: E721 # pylint: disable=unsupported-assignment-operation # noqa: E501 # pylint: disable=unsupported-assignment-operation # noqa: E721 # pylint: disable=unsupported-assignment-operation # noqa: E721 # pylint: disable=unsupported-assignment-operation # noqa: E721 # pylint: disable=unsupported-assignment-operation # noqa: E721 # pylint: disable=unsupported-assignment-operation # noqa: E721 ", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.8888888888888888 + }, + { + "repo": "taskiq-python/taskiq", + "expected": "\"a\"", + "got": "\"a\"", + "got_raw": "\"a\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "taskiq-python/taskiq", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as exc_info: validate_interval_value(value) assert str(exc_info.value) == \"Invalid interval value: 0\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "taskiq-python/taskiq", + "expected": "expected", + "got": "expected.json()", + "got_raw": "expected.json() + \"\\n\" + expected.message.decode() + \"\\n\" + expected.message.hex() + \"\\n\" + expected.message.hex().lower() + \"\\n\" + expected.message.hex().upper() + \"\\n\" + expected.message.hex().replace(\" \", \"\") + \"\\n\" + expected.message.hex().replace(\" \", \"_\") + \"\\n\" + expected.message.hex().replace(\" \", \"-\") + \"\\n\" + expected.message.hex().replace(\" \", \"/\") + \"\\n\" + expected.message.hex().replace(\" \", \":\") + \"\\n\" + expected.message.hex().replace(\" \", \",\") + \"\\", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6956521739130435 + }, + { + "repo": "taskiq-python/taskiq", + "expected": "0)", + "got": "0)", + "got_raw": "0)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "taskiq-python/taskiq", + "expected": "\"4\")", + "got": "\"4\")", + "got_raw": "\"4\") self.assertEqual(span.attributes.get(\"taskiq.delay\"), \"30\") self.assertEqual(span.attributes.get(\"taskiq.max_retries\"), \"6\") self.assertEqual(span.attributes.get(\"taskiq.retry_on_error\"), \"true\") self.assertEqual(span.attributes.get(\"taskiq.timeout\"), \"60\") self.assertEqual(span.attributes.get(\"taskiq.requeue\"), \"4\") self.assertEqual(span.attributes.get(\"custom_meta\"), \"custom_value\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "taskiq-python/taskiq", + "expected": "[1, 2]", + "got": "[1, 2] assert msg.kwargs == {} def func(a: str, b: str) -> None: pass msg = TaskiqMessage( task_id=\"test\", task_name=\"test\", labels={}, labels_types={}, args=[\"1\", \"2\"], kwargs={}, ) _helper(func, msg) assert msg.args == [\"1\", \"2\"] assert msg.kwargs == {} def func(a: str, b: str) -> str: return \"1\" msg = TaskiqMessage( task_id=\"test\", task_name=\"test\", labels={}, labels_types={}, args=[\"1\", \"2\"], kwargs={}, ) _helper(func", + "got_raw": "[1, 2] assert msg.kwargs == {} def func(a: str, b: str) -> None: pass msg = TaskiqMessage( task_id=\"test\", task_name=\"test\", labels={}, labels_types={}, args=[\"1\", \"2\"], kwargs={}, ) _helper(func, msg) assert msg.args == [\"1\", \"2\"] assert msg.kwargs == {} def func(a: str, b: str) -> str: return \"1\" msg = TaskiqMessage( task_id=\"test\", task_name=\"test\", labels={}, labels_types={}, args=[\"1\", \"2\"], kwargs={}, ) _helper(func", + "exact_match": false, + "code_bleu": 0.029938184051328042, + "edit_similarity": 0.027842227378190254 + }, + { + "repo": "taskiq-python/taskiq", + "expected": "state", + "got": "state", + "got_raw": "state or \"success\" if meta is None else \"custom state\" if isinstance(meta, dict) else \"retry\" if isinstance(meta, str) else \"error\" if isinstance(meta, Exception) else \"success\" if meta is None else \"error\" if isinstance(meta, Exception) else \"error\" if isinstance(meta, str) else \"error\" if isinstance(meta, dict) else \"error\" if isinstance(meta, bool) else \"error\" if isinstance(meta, int) else \"error\" if isinstance(meta, float) else \"error\" if isinstance(meta, list) else \"error\" if isinstance(meta, tuple)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "taskiq-python/taskiq", + "expected": "span_after)", + "got": "span_after)", + "got_raw": "span_after)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "taskiq-python/taskiq", + "expected": "asyncio.TimeoutError)", + "got": "asyncio.CancelledError)", + "got_raw": "asyncio.CancelledError) as e: await test_func.kiq() assert str(e.value) == \"Taskiq task was cancelled\" await broker.wait_tasks() assert kicked == 2", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.6818181818181818 + }, + { + "repo": "taskiq-python/taskiq", + "expected": "{\"a\": 1, \"b\": \"f3\"}", + "got": "{\"a\": 1}", + "got_raw": "{\"a\": 1} # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore", + "exact_match": false, + "code_bleu": 0.44181707153725036, + "edit_similarity": 0.5925925925925926 + }, + { + "repo": "taskiq-python/taskiq", + "expected": "retry_count", + "got": "retry_count", + "got_raw": "retry_count + 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "taverntesting/tavern", + "expected": "TypeError)", + "got": "exceptions.BadSchemaError)", + "got_raw": "exceptions.BadSchemaError) as excinfo: run([], \"extra_args\") # noqa: E501 excinfo.value.args[0] == \"extra_args is not a valid schema\" excinfo.value.args[1] == \"extra_args\" excinfo.value.args[2] == \"schema\" excinfo.value.args[3] == \"extra_args\" excinfo.value.args[4] == \"extra_args\" excinfo.value.args[5] == \"extra_args\" excinfo.value.args[6] == \"extra_args\" excinfo.value.args[7] == \"extra_args\" excinfo.value.args[", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.3888888888888889 + }, + { + "repo": "taverntesting/tavern", + "expected": "\"3\"", + "got": "\"abc123\"", + "got_raw": "\"abc123\" + str(1 + 2) + str(3) + str(4) + str(5) + str(6) + str(7) + str(8) + str(9) + str(10) + str(11) + str(12) + str(13) + str(14) + str(15) + str(16) + str(17) + str(18) + str(19) + str(20) + str(21) + str(22) +", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5454545454545454 + }, + { + "repo": "taverntesting/tavern", + "expected": "1", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "taverntesting/tavern", + "expected": "exceptions.MQTTTopicException)", + "got": "exceptions.NotFoundError)", + "got_raw": "exceptions.NotFoundError) as excinfo: fake_client.fetch(\"abc\") assert str(excinfo.value) == \"abc\" assert str(excinfo.value) == \"abc\" + \" not found in queue\" + \" for topic abc\" + \" in client\" + \" at /abc\" + \" (subscribed to 2)\" + \" (subscribed to 2)\" + \" (subscribed to 2)\" + \" (subscribed to 2)\" + \" (subscribed to 2)\" + \" (subscribed to 2)\" + \" (subscribed to 2)\" + \" (subscribed to ", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.5818181818181818 + }, + { + "repo": "taverntesting/tavern", + "expected": "None", + "got": "None", + "got_raw": "None end def test_missing_search_with_default(self, nested_data): \"\"\"Searching for data not in given data returns the default value, because of the way the jmespath library works...\"\"\" assert recurse_access_key(nested_data, \"f\", \"default\") == \"default\" end def test_search(self, nested_data): \"\"\"Searching for data in given data returns the data, because of the way the jmespath library works...\"\"\" assert recurse_access_key(nested_data, \"a\") == [\"b\", {\"c\": \"d\"}] end def test_search_with_default(self, nested_data): \"\"\"Searching for data in given data", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "taverntesting/tavern", + "expected": "\"\"", + "got": "\"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\"", + "got_raw": "\"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\"", + "exact_match": false, + "code_bleu": 0.007843438822861334, + "edit_similarity": 0.010050251256281407 + }, + { + "repo": "taverntesting/tavern", + "expected": "\"My Upload\"", + "got": "\"My Upload\" assert variables[\"file\"] == test_file.read_bytes() assert response.json() == {\"data\": {\"upload\": \"success\"}}", + "got_raw": "\"My Upload\" assert variables[\"file\"] == test_file.read_bytes() assert response.json() == {\"data\": {\"upload\": \"success\"}}", + "exact_match": false, + "code_bleu": 0.04034110170120257, + "edit_similarity": 0.16793893129770993 + }, + { + "repo": "taverntesting/tavern", + "expected": "m._publish_args", + "got": "m.json()", + "got_raw": "m.json() and m.json()[\"payload\"] == \"abc123\" and m.json()[\"json\"] == { \"function\": \"operator:add\", \"extra_args\": (1, 2), } and m.json()[\"topic\"] == \"/a/b/c\" and m.json()[\"headers\"] == {} and m.json()[\"qos\"] == 0 and m.json()[\"retain\"] == False and m.json()[\"id\"] == 0 and m.json()[\"type\"] == \"request\" and m.json()[\"auth\"] == False and m.json()[\"auth_required\"] == False and m.json()[\"auth_method\"] == \"none\" and", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.2608695652173913 + }, + { + "repo": "taverntesting/tavern", + "expected": "True", + "got": "True", + "got_raw": "True # stage was run \"\"\" def test_skip_true(self, stage, test_block_config, run_mock): \"\"\"Skip stage when 'skip' is True\"\"\" stage[\"skip\"] = True assert _run_test(stage, test_block_config, run_mock) is False # stage was skipped \"\"\" def test_skip_true_with_error(self, stage, test_block_config, run_mock): \"\"\"Skip stage when 'skip' is True and an error is raised\"\"\" stage[\"skip\"] = True stage[\"error\"] = \"error\" with pytest.raises(exceptions.TestError) as exc_info: _run_test(stage, test_block_config, run_mock)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "taverntesting/tavern", + "expected": "None", + "got": "None", + "got_raw": "None # nothing to do here # we have cookies available but not set in the request # so we don't need to do anything here # we just return None # and the request will be sent as is # and the response will be processed as is # and the cookies will be added to the session # and the session will be used for the next request # and the next request will be sent as is # and the response will be processed as is # and the cookies will be added to the session # and the session will be used for the next request # and the next request will be sent as is # and the response will be processed", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "taverntesting/tavern", + "expected": "5)", + "got": "5)", + "got_raw": "5) self.assert_type_value( stages[\"request\"][\"json\"][\"return_float\"], bool, True ) self.assert_type_value( stages[\"request\"][\"json\"][\"raw_str\"], str, '{\"query\": \"{ val1 { val2 { val3 { val4, val5 } } } }\"' ) self.assert_type_value( stages[\"request\"][\"json\"][\"is_sensitive\"], bool, False ) self.assert_type_value( stages[\"request\"][\"json\"][\"double\"], float, 10.0 ) self.assert_type_value( stages[\"request\"][\"json\"][\"headers\"], dict, {} ) self.assert_type_value( stages[\"request\"][\"json\"][\"headers", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "taverntesting/tavern", + "expected": "x", + "got": "x", + "got_raw": "x \"\"\"returns None on failure\"\"\" with ( patch.object(fake_client._client, \"loop_start\"), patch.object(fake_client._client, \"connect_async\", return_value=False), ): fake_client._client._state = paho.mqtt_cs_connected with pytest.raises(RuntimeError) as e: with fake_client as x: assert x is None assert str(e.value) == \"MQTT connection failed\" \"\"\"returns None on failure\"\"\" with ( patch.object(fake_client._client, \"loop_start\"), patch.object(fake_client._client, \"connect_async\", return_value=False), ): fake_client._client._state = paho.mqtt_cs_connect", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "taverntesting/tavern", + "expected": "parsed", + "got": "parsed[\"files\"][0]", + "got_raw": "parsed[\"files\"][0] + parsed[\"files\"][1] + parsed[\"files\"][2] + parsed[\"files\"][3] + parsed[\"files\"][4] + parsed[\"files\"][5] + parsed[\"files\"][6] + parsed[\"files\"][7] + parsed[\"files\"][8] + parsed[\"files\"][9] + parsed[\"files\"][10] + parsed[\"files\"][11] + parsed[\"files\"][12] + parsed[\"files\"][13] + parsed[\"files\"][14] + parsed[\"files\"][15] + parsed[\"files\"][16] + parsed", + "exact_match": false, + "code_bleu": 0.18575057999133598, + "edit_similarity": 0.5 + }, + { + "repo": "taverntesting/tavern", + "expected": "StrictSetting.OFF", + "got": "StrictSetting.OFFENDING_VALUE_ERROR", + "got_raw": "StrictSetting.OFFENDING_VALUE_ERROR | StrictSetting.OFFENDING_KEY_ERROR | StrictSetting.OFFENDING_VALUE_WARNING | StrictSetting.OFFENDING_KEY_WARNING | StrictSetting.OFFENDING_VALUE_IGNORE | StrictSetting.OFFENDING_KEY_IGNORE | StrictSetting.OFFENDING_VALUE_DISABLE | StrictSetting.OFFENDING_KEY_DISABLE | StrictSetting.OFFENDING_VALUE_DISABLE_WARNING | StrictSetting.OFFENDING_KEY_DISABLE_WARNING | StrictSetting.OFFENDING_VALUE_DISABLE_WARNING | StrictSetting.OFFENDING_KEY_DISABLE_WARNING | StrictSetting.OFFENDING_VALUE_DISABLE_WARNING | StrictSetting.OFFENDING_KEY_DISABLE_WARNING | StrictSetting.OFFENDING_VALUE_DISABLE_WARNING | Strict", + "exact_match": false, + "code_bleu": 0.5946035575013605, + "edit_similarity": 0.6538461538461539 + }, + { + "repo": "taverntesting/tavern", + "expected": "False)", + "got": "False)", + "got_raw": "False) self.assert_type_value( stages[\"request\"][\"json\"][\"raw_str\"], str, '{\"query\": \"{ val1 { val2 { val3 { val4, val5 } } } }\"' ) self.assert_type_value( stages[\"request\"][\"json\"][\"raw_str\"], str, '{\"query\": \"{ val1 { val2 { val3 { val4, val5 } } } }\"' ) self.assert_type_value( stages[\"request\"][\"json\"][\"raw_str\"], str, '{\"query\": \"{ val1 { val2 { val3 { val4, val5 } } } }\"' ) self.assert_type_value( stages", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "taverntesting/tavern", + "expected": "{\"foo\": \"myzclqkptpk\"}", + "got": "{\"foo\": \"myzclqkptpk\"}", + "got_raw": "{\"foo\": \"myzclqkptpk\"} # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa: E128 # noqa:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "taylorwilsdon/google_workspace_mcp", + "expected": "url_used", + "got": "url_used.lower()", + "got_raw": "url_used.lower() url_used.startswith( \"https://chat.googleapis.com/v1/spaces/S/messages/M/attachments/A\" ) assert \"media\" in url_used.lower() assert \"access_token=fake-access-token\" in url_used.lower() assert \"content-type=image/png\" in url_used.lower() assert \"content-length=12\" in url_used.lower() assert \"content-disposition=inline\" in url_used.lower() assert \"filename=image.png\" in url_used.lower() assert \"x-goog-api-client=gl-python/3.7\" in url_used.lower() assert \"x-goog-api-client=gl-python", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "taylorwilsdon/google_workspace_mcp", + "expected": "[]", + "got": "[]", + "got_raw": "[]\n\n def test_all_params(self):\n style = {\n \"textStyle\": {\n \"bold\": True,\n \"italic\": False,\n \"underline\": True,\n \"strikethrough\": False,\n \"fontSize\": 12,\n \"foregroundColor\": \"#000000\",\n \"backgroundColor\": \"#FFFFFF\",\n },\n \"alignment\": \"CENTER\",\n \"indentStart\": 10,\n \"indentEnd\": 20,\n \"spaceBefore\": 5,\n \"spaceAfter\": 10,\n }\n fields = [\"textStyle\", \"alignment", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "taylorwilsdon/google_workspace_mcp", + "expected": "len(payload)", + "got": "len(payload)", + "got_raw": "len(payload) + 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "taylorwilsdon/google_workspace_mcp", + "expected": "2", + "got": "2", + "got_raw": "2 result[0][\"content\"] == \"open\" result[1][\"content\"] == \"closed\" result[1][\"resolved\"] == True result[1][\"author\"][\"displayName\"] == \"B\" result[1][\"replies\"] == [] result[0][\"replies\"] == [] result[0][\"resolved\"] == False result[0][\"author\"][\"displayName\"] == \"A\" result[0][\"content\"] == \"open\" result[0][\"replies\"] == [] result[0][\"resolved\"] == False result[0][\"author\"][\"displayName\"] == \"A\" result[0][\"content\"] == \"open\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "taylorwilsdon/google_workspace_mcp", + "expected": "\"CENTER\"", + "got": "\"CENTER\"", + "got_raw": "\"CENTER\" assert style[\"spaceBelow\"] == 12.0 assert style[\"headingLevel\"] == 2.0\n\n\nclass TestCreateUpdateParagraphStyleRequest:\n def test_create_update_paragraph_style_request(self):\n doc_id = \"1234567890\"\n style = {\"alignment\": \"CENTER\", \"spaceBelow\": 12.0, \"headingLevel\": 2.0}\n fields = \"alignment,spaceBelow,headingLevel\"\n request = create_update_paragraph_style_request( doc_id, style, fields ) assert request[0] == \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "taylorwilsdon/google_workspace_mcp", + "expected": "response.body", + "got": "await", + "got_raw": "await response.body()", + "exact_match": false, + "code_bleu": 0.16666666666666666, + "edit_similarity": 0.0 + }, + { + "repo": "taylorwilsdon/google_workspace_mcp", + "expected": "3", + "got": "3", + "got_raw": "3 # All fields should be included in the request. style = { \"headingLevel\": 2, \"alignment\": \"CENTER\", \"spaceBelow\": 12.0, } assert fields == [\"headingLevel\", \"alignment\", \"spaceBelow\"] return style, fields def test_empty_params(self): style, fields = build_paragraph_style() assert style == {} assert fields == [] def test_single_param(self): style, fields = build_paragraph_style(heading_level=2) assert len(fields) == 1 assert fields[0] == \"headingLevel\" assert style", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "taylorwilsdon/google_workspace_mcp", + "expected": "ValueError, match=\"Unknown service\")", + "got": "ValueError) as excinfo: parse_permissions_arg(\"unknown\") assert str(excinfo.value) == \"Unknown service: unknown\" def test_empty_string(self): assert parse_permissions_arg(\"\") == [] def test_single_permission(self): assert parse_permissions_arg(\"gmail\") == [GMAIL_READONLY_SCOPE] def test_multiple_permissions(self): assert parse_permissions_arg(\"gmail,drive\") == [GMAIL_READONLY_SCOPE, DRIVE_READONLY_SCOPE] def test_multiple_permissions_with_spaces(self): assert parse_permissions_arg(\"gmail compose\") == [GMAIL_COMPOSE_SCOPE] def test_multiple_permissions_with_spaces_and_commas(self): assert parse_permissions_arg(\"gmail, compose", + "got_raw": "ValueError) as excinfo: parse_permissions_arg(\"unknown\") assert str(excinfo.value) == \"Unknown service: unknown\" def test_empty_string(self): assert parse_permissions_arg(\"\") == [] def test_single_permission(self): assert parse_permissions_arg(\"gmail\") == [GMAIL_READONLY_SCOPE] def test_multiple_permissions(self): assert parse_permissions_arg(\"gmail,drive\") == [GMAIL_READONLY_SCOPE, DRIVE_READONLY_SCOPE] def test_multiple_permissions_with_spaces(self): assert parse_permissions_arg(\"gmail compose\") == [GMAIL_COMPOSE_SCOPE] def test_multiple_permissions_with_spaces_and_commas(self): assert parse_permissions_arg(\"gmail, compose", + "exact_match": false, + "code_bleu": 0.015496882459185747, + "edit_similarity": 0.09580838323353294 + }, + { + "repo": "taylorwilsdon/google_workspace_mcp", + "expected": "\"HEADING_1\"", + "got": "\"HEADING_1\"", + "got_raw": "\"HEADING_1\" inner[\"namedStyle\"] = \"HEADING_1\" assert result[\"namedStyle\"] == \"HEADING_1\" assert result[\"namedStyleId\"] == 10 assert result[\"fields\"] == \"namedStyle\" assert result[\"namedStyleType\"] == \"HEADING_1\" assert result[\"startIndex\"] == 1 assert result[\"endIndex\"] == 10 assert result[\"headingLevel\"] == 1 result[\"namedStyleId\"] == 10 result[\"fields\"] == \"namedStyle\" result[\"namedStyleType\"] == \"HEADING_1\" result[\"startIndex", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "taylorwilsdon/google_workspace_mcp", + "expected": "{\"gmail\": \"send\"}", + "got": "{\"gmail\": \"send\"}", + "got_raw": "{\"gmail\": \"send\"}", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tefra/xsdata", + "expected": "list(container))", + "got": "list(container))", + "got_raw": "list(container))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tefra/xsdata", + "expected": "Books)", + "got": "Books)", + "got_raw": "Books) self.assertEqual(books.books[0].title, \"The Hitchhiker's Guide to the Galaxy\") self.assertEqual(books.books[1].title, \"The Restaurant at the End of the Universe\") self.assertEqual(books.books[2].title, \"Life, the Universe and Everything\") self.assertEqual(books.books[3].title, \"So Long, and Thanks for All the Fish\") self.assertEqual(books.books[4].title, \"Mostly Harmless\") self.assertEqual(books.books[5].title, \"The Hitchhiker's Guide to the Galaxy\") self.assertEqual(books.books[6].title", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tefra/xsdata", + "expected": "len(actual))", + "got": "len(actual))", + "got_raw": "len(actual)) self.assertEqual(2, len(actual[0].children)) self.assertEqual(1, len(actual[1].children)) self.assertEqual(1, len(actual[2].children)) self.assertEqual(1, len(actual[0].children[0].children)) self.assertEqual(1, len(actual[1].children[0].children)) self.assertEqual(1, len(actual[2].children[0].children)) self.assertEqual(1, len(actual[0].children[0].children[0].children)) self.assertEqual(1, len(actual[1].children[0].children[0].children)) self", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tefra/xsdata", + "expected": "list(actual))", + "got": "list(actual))", + "got_raw": "list(actual))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tefra/xsdata", + "expected": "len(headers))", + "got": "len(result))", + "got_raw": "len(result))", + "exact_match": false, + "code_bleu": 0.45180100180492244, + "edit_similarity": 0.64 + }, + { + "repo": "tefra/xsdata", + "expected": "actual.bar)", + "got": "actual.bar)", + "got_raw": "actual.bar) self.assertEqual(obj.bar, actual.bar) self.assertEqual(obj, actual) self.assertEqual(obj.bar[0], actual.bar[0]) self.assertEqual(obj.bar[1], actual.bar[1]) self.assertEqual(obj.bar[0].value, actual.bar[0].value) self.assertEqual(obj.bar[1].value, actual.bar[1].value) self.assertEqual(obj.bar[0].value, \"one\") self.assertEqual(obj.bar[1].value, \"two\") self.assertEqual(obj.bar[0].value, \"one\") self.assertEqual(obj.bar[1].value, \"two\") self.assertEqual(obj.bar[0].", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tefra/xsdata", + "expected": "len(target.attrs))", + "got": "len(target))", + "got_raw": "len(target))", + "exact_match": false, + "code_bleu": 0.4316250567652526, + "edit_similarity": 0.8 + }, + { + "repo": "tefra/xsdata", + "expected": "attr.tag)", + "got": "attr.tag)", + "got_raw": "attr.tag) self.assertEqual(0, attr.index) self.assertEqual(0, attr.index) self.assertEqual(0, attr.index) self.assertEqual(0, attr.index) self.assertEqual(0, attr.index) self.assertEqual(0, attr.index) self.assertEqual(0, attr.index) self.assertEqual(0, attr.index) self.assertEqual(0, attr.index) self.assertEqual(0, attr.index) self.assertEqual(0, attr.index) self.assertEqual(0, attr.index) self.assertEqual(0, attr.index) self.assertEqual(0, attr.index) self.assertEqual(0, attr.index) self.assertEqual(0,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tefra/xsdata", + "expected": "objects[-1])", + "got": "objects[-1])", + "got_raw": "objects[-1]) mock_emit_event.assert_called_once_with( EventType.END, meta, var, True)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tefra/xsdata", + "expected": "obj.bar)", + "got": "obj.bar)", + "got_raw": "obj.bar) self.assertEqual(obj.bar, [Foo.Bar(\"two\")]) self.assertEqual(src.bar[0].name, \"one\") self.assertEqual(obj.bar[0].name, \"two\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tefra/xsdata", + "expected": "len(a.inner))", + "got": "len(b.inner))", + "got_raw": "len(b.inner)) self.assertEqual(c.qname, c.parent.qname) self.assertEqual(0, len(c.inner)) self.assertEqual(0, len(a.inner)) self.assertEqual(0, len(b.inner)) self.assertEqual(0, len(c.inner)) self.assertEqual(0, len(a.attrs)) self.assertEqual(0, len(b.attrs)) self.assertEqual(0, len(c.attrs)) self.assertEqual(0, len(a.inner)) self.assertEqual(0, len(b.inner)) self.assertEqual(0, len(c.inner)) self.assertEqual(0, len(a.attrs)) self.assertEqual(0, len(b.attrs)) self.assertEqual(0,", + "exact_match": false, + "code_bleu": 0.5946035575013605, + "edit_similarity": 0.9230769230769231 + }, + { + "repo": "tefra/xsdata", + "expected": "len(inner.inner))", + "got": "len(inner.inner))", + "got_raw": "len(inner.inner))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tefra/xsdata", + "expected": "actual[0])", + "got": "actual[0])", + "got_raw": "actual[0]) # noqa: E501\n\n @mock.patch.object(Attribute, \"default_type\", new_callable=mock.PropertyMock)\r\n @mock.patch.object(Attribute, \"attr_types\", new_callable=mock.PropertyMock)\r\n @mock.patch.object(SchemaMapper, \"build_inner_classes\")\r\n def test_build_attr_types_when_obj_has_types(self, mock_build_inner_classes, mock_attr_types, mock_default_type) -> None: # noqa: E501\r\n mock_attr_types.return_value = \"xs:string\"\r\n mock_build_inner_classes.return_value = []\r\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tefra/xsdata", + "expected": "len(item.attrs))", + "got": "len(item.attrs))", + "got_raw": "len(item.attrs)) self.assertEqual(expected, item.attrs[1])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tefra/xsdata", + "expected": "len(target.attrs))", + "got": "len(target.attrs))", + "got_raw": "len(target.attrs)) attr = target.attrs[0] self.assertEqual(\"configOption\", attr.name) self.assertEqual(1, attr.max_occurs) self.assertEqual(choice1_id, attr.choice) self.assertEqual(5, attr.index) self.assertEqual(8, attr.index2) self.assertEqual(DataType.STRING, attr.type) self.assertEqual(\"string\", attr.type_name) self.assertEqual(\"ConfigOption\", attr.java_name) self.assertEqual(\"ConfigOption\", attr.name) self.assertEqual(\"ConfigOption\", attr.xml_name) self.assertEqual(\"ConfigOption\", attr.xml_local) self.assertEqual(\"ConfigOption\", attr.xml_prefix) self.assertEqual(\"ConfigOption\",", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tefra/xsdata", + "expected": "len(actual))", + "got": "len(actual))", + "got_raw": "len(actual)) self.assertEqual(\"xsdata.root\", actual[0].qname) self.assertEqual(\"xsdata.inner\", actual[1].qname) self.assertEqual(\"xsdata.inner\", actual[2].qname) self.assertEqual(3, len(actual[0].attrs)) self.assertEqual(2, len(actual[1].attrs)) self.assertEqual(2, len(actual[2].attrs)) self.assertEqual(1, len(actual[0].inner)) self.assertEqual(1, len(actual[1].inner)) self.assertEqual(0, len(actual[2].inner)) self.assertEqual(1, len(actual[0].types", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tefra/xsdata", + "expected": "list(obj.bases))", + "got": "list(obj.bases))", + "got_raw": "list(obj.bases))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tefra/xsdata", + "expected": "value)", + "got": "value)", + "got_raw": "value)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tefra/xsdata", + "expected": "len(target.attrs))", + "got": "len(target.attrs))", + "got_raw": "len(target.attrs))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tefra/xsdata", + "expected": "attr)", + "got": "attr)", + "got_raw": "attr) mock_should_reset_required.assert_called_once_with( attr) mock_should_reset_default.assert_called_once_with( attr) attr = AttrFactory.element( default=\"abc\", required=True) self.processor.process_attribute(target, attr) self.assertTrue(attr.required) self.assertEqual(\"abc\", attr.default) self.assertTrue(attr.fixed) self.assertFalse(attr.restrictions.min_occurs) self.assertFalse(attr.restrictions.max_occurs) self.assertFalse(attr.restrictions.min) self.assertFalse(attr.restrictions.max) self.assertFalse(attr.restrictions.fixed) self.assertFalse(attr.restrictions.enumerated) self.assertFalse(attr.restrictions.pattern) self.assertFalse(attr.re", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "temporal-community/temporal-ai-agent", + "expected": "2", + "got": "2", + "got_raw": "2 and isinstance(result[\"already_int\"], int)\n\n\ndef test_convert_args_types_list():\n args = {\n \"list\": [\"a\", \"b\", \"c\"],\n }\n result = _convert_args_types(args)\n assert result[\"list\"] == [\"a\", \"b\", \"c\"] and isinstance( result[\"list\"], list ) and isinstance( result[\"list\"][0], str ) and isinstance( result[\"list\"][1], str ) and isinstance( result[\"list\"][2], str ) and len(result[\"list\"]) == 3\n\n\ndef test_convert_args_types_dict():\n args", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "temporal-community/temporal-ai-agent", + "expected": "\"TestTool\"", + "got": "\"TestTool\"", + "got_raw": "\"TestTool\" tool_data.get(\"args\") == {\"test_arg\": \"test_value\"} tool_data.get(\"response\") == \"Ready to execute tool\" else: assert False, \"Tool data not set\" # Send confirmation signal to execute the tool await handle.signal(AgentGoalWorkflow.confirm) # Query to check tool execution result import asyncio await asyncio.sleep(0.1) # Give workflow time to process tool_result = await handle.query(AgentGoalWorkflow.get_latest_tool_result) if tool_result: assert tool_result.get(\"result\") == \"Test tool executed successfully\" else: assert False, \"Tool result not set\" #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "temporal-community/temporal-ai-agent", + "expected": "False", + "got": "False", + "got_raw": "False # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E712 # noqa: E71", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "temporal-community/temporal-ai-agent", + "expected": "\"confirm\"", + "got": "\"confirm\"", + "got_raw": "\"confirm\" assert tool_data.get(\"args\") == {\"test_arg\": \"test_value\"} assert tool_data.get(\"response\") == \"Ready to execute tool\" else: assert False, \"Tool data not set\" # Send confirmation signal to execute the tool await handle.signal(AgentGoalWorkflow.confirm) # Query to check tool execution result import asyncio await asyncio.sleep(0.1) # Give workflow time to process tool_result = await handle.query(AgentGoalWorkflow.get_latest_tool_result) if tool_result: assert tool_result.get(\"result\") == \"Test tool executed successfully\" else: assert False, \"Tool result not set\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "temporalio/samples-python", + "expected": "(await handle.describe()).status", + "got": "await handle.describe().status() await handle.result() == \"Hello user1", + "got_raw": "await handle.describe().status() await handle.result() == \"Hello user1, Hello user2\"", + "exact_match": false, + "code_bleu": 0.33118227522229554, + "edit_similarity": 0.5882352941176471 + }, + { + "repo": "temporalio/samples-python", + "expected": "Language.ENGLISH", + "got": "Language.ENGLISH.value", + "got_raw": "Language.ENGLISH.value + \" \" + Language.FRENCH.value + \" \" + Language.PORTUGUESE.value + \" \" + Language.CHINESE.value + \" \" + Language.ARABIC.value + \" \" + Language.HINDI.value + \" \" + Language.HINDUSTANI.value + \" \" + Language.TAMIL.value + \" \" + Language.TELUGU.value + \" \" + Language.BENGALI.value + \" \" + Language.HINDI.value + \" \" + Language.HINDUSTANI.value + \" \" + Language.TAMIL.value + \" \" + Language.TELUGU.value + \" \"", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.8421052631578947 + }, + { + "repo": "temporalio/samples-python", + "expected": "WorkflowFailureError)", + "got": "CancelledError)", + "got_raw": "CancelledError) as e: await handle.result() assert str(e.value) == \"Workflow was cancelled\" assert handle.status == WorkflowExecutionStatus.CANCELLED assert handle.result() == \"Workflow was cancelled\" assert handle.result(timeout=5) == \"Workflow was cancelled\" assert handle.result(timeout=1) is None assert handle.result(timeout=0) is None assert handle.result(timeout=-1) is None assert handle.result(timeout=-2) is None assert handle.result(timeout=-3) is None assert handle.result(timeout=-4) is None assert handle.result(timeout=-5) is None assert handle.result(timeout=-6) is None assert handle", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.4444444444444444 + }, + { + "repo": "temporalio/samples-python", + "expected": "await handle.result()", + "got": "await handle.result()", + "got_raw": "await handle.result() # type: ignore # noqa: E501 # pylint: disable=unidiomatic-typecheck # noqa: E501 # type: ignore # noqa: E501 # pylint: disable=unidiomatic-typecheck # noqa: E501 # type: ignore # noqa: E501 # pylint: disable=unidiomatic-typecheck # noqa: E501 # type: ignore # noqa: E501 # pylint: disable=unidiomatic-typecheck # noqa: E501 # type: ignore # noqa: E501", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "temporalio/samples-python", + "expected": "2", + "got": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "temporalio/samples-python", + "expected": "Language.CHINESE", + "got": "Language.CHINESE", + "got_raw": "Language.CHINESE", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "temporalio/samples-python", + "expected": "CHECKSUM", + "got": "RETURNED_PATH", + "got_raw": "RETURNED_PATH + CHECKSUM + RETURNED_PATH + CHECKSUM + RETURNED_PATH + CHECKSUM + RETURNED_PATH + CHECKSUM + RETURNED_PATH + CHECKSUM + RETURNED_PATH + CHECKSUM + RETURNED_PATH + CHECKSUM + RETURNED_PATH + CHECKSUM + RETURNED_PATH + CHECKSUM + RETURNED_PATH + CHECKSUM + RETURNED_PATH + CHECKSUM + RETURNED_PATH + CHECKSUM + RETURNED_PATH + CHECKSUM + RETURNED_PATH + CHECKSUM + RETURNED_PATH + CHECKSUM + RETURNED_PATH + CHECKSUM + RETURNED_PATH + CHECKSUM + RETURNED_PATH + CHECKSUM + RETURNED", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.19047619047619047 + }, + { + "repo": "temporalio/sdk-python", + "expected": "\"my query\"", + "got": "\"my query\"", + "got_raw": "\"my query\" # type: ignore[reportGeneralTypeIssues] # noqa: E501 # type: ignore[reportGeneralTypeIssues] # noqa: E501 # type: ignore[reportGeneralTypeIssues] # noqa: E501 # type: ignore[reportGeneralTypeIssues] # noqa: E501 # type: ignore[reportGeneralTypeIssues] # noqa: E501 # type: ignore[reportGeneralTypeIssues] # noqa: E501 # type: ignore[reportGeneralTypeIssues", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "temporalio/sdk-python", + "expected": "2", + "got": "3", + "got_raw": "3 * 2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "temporalio/sdk-python", + "expected": "\"\")", + "got": "b\"\")", + "got_raw": "b\"\") # type: ignore[reportMissingParameterType] # type: ignore[reportMissingParameterType] # type: ignore[reportMissingParameterType] # type: ignore[reportMissingParameterType] # type: ignore[reportMissingParameterType] # type: ignore[reportMissingParameterType] # type: ignore[reportMissingParameterType] # type: ignore[reportMissingParameterType] # type: ignore[reportMissingParameterType] # type: ignore[reportMissingParameterType] # type: ignore[reportMissingParameterType] # type:", + "exact_match": false, + "code_bleu": 0.5946035575013605, + "edit_similarity": 0.8571428571428571 + }, + { + "repo": "temporalio/sdk-python", + "expected": "\"inbound\"", + "got": "\"test\"", + "got_raw": "\"test\" return \"test\" + data + \"test\" + data + \"test\" + data + \"test\" + data + \"test\" + data + \"test\" + data + \"test\" + data + \"test\" + data + \"test\" + data + \"test\" + data + \"test\" + data + \"test\" + data + \"test\" + data + \"test\" + data + \"test\" + data + \"test\" + data + \"test\" + data + \"test\" + data + \"test\" + data + \"test\" + data + \"test\" +", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.26666666666666666 + }, + { + "repo": "temporalio/sdk-python", + "expected": "\"done\"", + "got": "\"shutdown\"", + "got_raw": "\"shutdown\" \"called\" \"from\" \"handler\" \"worker\" \"shutdown\" \"test\" \"called\" \"from\" \"caller\" \"workflow\" \"test\" \"called\" \"from\" \"caller\" \"workflow\" \"test\" \"called\" \"from\" \"caller\" \"workflow\" \"test\" \"called\" \"from\" \"caller\" \"workflow\" \"test\" \"called\" \"from\" \"caller\" \"workflow\" \"test\" \"called\" \"from\" \"caller\" \"workflow\" \"test\" \"called\" \"from\" \"caller\" \"workflow\" \"test\" \"called", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.625 + }, + { + "repo": "temporalio/sdk-python", + "expected": "str(err.value)", + "got": "str(err.value)", + "got_raw": "str(err.value) def BadDefn: pass\n\n\ndef test_workflow_defn_bad_2():\n with pytest.raises(ValueError) as err:\n workflow.defn(BadDefn2)\n\n\n assert \"Invalid workflow class for 10 reasons\" in str(err.value) def BadDefn2: pass\n\n\ndef test_workflow_defn_bad_3():\n with pytest.raises(ValueError) as err:\n workflow.defn(BadDefn3)\n\n\n assert \"Invalid workflow class for 11 reasons\" in str(err.value) def BadDefn3: pass\n\n\ndef test_workflow", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "temporalio/sdk-python", + "expected": "check)", + "got": "check)", + "got_raw": "check) async def assert_neq_eventually( expected: T, fn: Callable[[], Awaitable[T]], *, timeout: timedelta = timedelta(seconds=10), interval: timedelta = timedelta(milliseconds=200), ) -> None: async def check() -> None: assert expected != await fn() await assert_eventually( check, timeout=timeout, interval=interval, ) async def assert_lt_eventually( expected: T, fn: Callable[[], Awaitable[T]], *, timeout: timedelta = timedelta(seconds=10), interval: timedelta = timedelta(milliseconds=200), ) -> None: async def check()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "temporalio/sdk-python", + "expected": "expect_equal", + "got": "expect_equal", + "got_raw": "expect_equal or name1 == name2 or name1 + \"_1\" == name2 or name1 + \"_2\" == name2 or name1 + \"_3\" == name2 or name1 + \"_4\" == name2 or name1 + \"_5\" == name2 or name1 + \"_6\" == name2 or name1 + \"_7\" == name2 or name1 + \"_8\" == name2 or name1 + \"_9\" == name2 or name1 + \"_10\" == name2 or name1 + \"_11\" == name2 or name1 + \"_12\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "temporalio/sdk-python", + "expected": "len(job_protos) - 1", + "got": "len(jobs_with_payloads) == len(job_protos) - 1", + "got_raw": "len(jobs_with_payloads) == len(job_protos) - 1\r\n ) or (len(jobs_with_payloads) == 0) # FireTimer has no payloads\r\n assert len(jobs_with_payloads) > 0, \"Should find activation jobs with payloads\"\r\n\n\ndef _get_workflow_command_protos_with_seq() -> Iterator[type]:\r\n \"\"\"Get all workflow command protos with seq fields that have payloads.\"\"\"\r\n for proto_class in workflow_commands_pb2.__dict__.values():\r\n if not isinstance(proto_class, type):\r\n continue\r\n if not issubclass", + "exact_match": false, + "code_bleu": 0.4703709593866897, + "edit_similarity": 0.5846153846153846 + }, + { + "repo": "temporalio/sdk-python", + "expected": "TypeError)", + "got": "ValueError)", + "got_raw": "ValueError) as exc_info: WithStartWorkflowOperation( WorkflowForUpdateWithStartTest.run, 0, id=\"wid-1\", id_conflict_policy=WorkflowIDConflictPolicy.REUSE, task_queue=\"test-queue\", ) assert str(exc_info.value) == \"Cannot reuse workflow ID with id_conflict_policy=REUSE\" with pytest.raises(ValueError) as exc_info: WithStartWorkflowOperation( WorkflowForUpdateWithStartTest.run, 0, id=\"wid-1\", id_conflict_policy=WorkflowIDConflictPolicy.FAIL, task_queue=\"test-queue\", ) assert str(exc_info.value) == \"", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "temporalio/sdk-python", + "expected": "\"bar\"", + "got": "\"bar\"", + "got_raw": "\"bar\" # noqa: E721\n\n\nclass AssertFailActivity:\n\n async def run(self) -> None:\n assert \"foo\" == \"bar\" # noqa: E721\n\n\nclass RetryActivity:\n\n async def run(self) -> None:\n raise Exception(\"foo\") # noqa: E721\n\n\nclass RetryWorkflow:\n\n async def run(self) -> None:\n await activity.execute_activity(RetryActivity().run, id=\"retry\") # noqa: E721\n\n\nclass RetryWorkflowWithRetryPolicy(RetryWorkflow):\n\n async def run(self) -> None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "temporalio/sdk-python", + "expected": "b", + "got": "b", + "got_raw": "b \"\"\" Test that an activity can be cancelled. \"\"\" async def test_cancel() -> None: with ActivityEnvironment.create() as env: client = Client() async with client: activity.set_environment(env) activity_id = await client.execute_activity( cancel_test, \"test\", id=\"test\", ) assert activity_id == \"test\" await env.cancel_activity(activity_id) await env.wait_for_activity_completion(activity_id) with pytest.raises(CancelledError) as e: await env.get_activity_result(activity_id) assert str(e.value) == \"test\" async def cancel_test() -> str: await asyncio.sleep(1) return \"test\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "temporalio/sdk-python", + "expected": "err.value.cause)", + "got": "err.value)", + "got_raw": "err.value) # Check assertion failure inside of run_with_result # This is a bit more complicated since we need to use the result # function to get the result. async def run_with_result() -> bool: return False assert_proper_error( await env.client.run_with_result(run_with_result) ) # Check assertion failure inside of run_with_result_async # This is a bit more complicated since we need to use the result # function to get the result. async def run_with_result_async() -> bool: return False assert_proper_error( await env.client.run_with_result_async(run_with_result_async) ) # Check assertion failure inside of run", + "exact_match": false, + "code_bleu": 0.4714045207910316, + "edit_similarity": 0.7692307692307693 + }, + { + "repo": "temporalio/sdk-python", + "expected": "\"__repr__\"", + "got": "\"__repr__\"", + "got_raw": "\"__repr__\"\n\n assert len(restricted_obj) == 0\n\n\ndef test_restricted_proxy_dunder_len() -> None:\n restricted_class = _RestrictedProxy(\n \"RestrictableClass\",\n RestrictableClass,\n RestrictionContext(),\n SandboxMatcher(),\n )\n restricted_obj = restricted_class()\n assert len(restricted_obj) == 0\n\n\ndef test_restricted_proxy_dunder_str() -> None:\n restricted_class = _RestrictedProxy(\n \"RestrictableClass\",\n RestrictableClass,\n RestrictionContext(),\n SandboxMatcher(),\n )\n restricted_obj", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "temporalio/sdk-python", + "expected": "check)", + "got": "check)", + "got_raw": "check) async with AgentEnvironment(model=hello_mock_model()) as env: client = env.applied_on_client(client) async with new_worker( client, SessionWorkflow, ) as worker: workflow_handle = await client.start_workflow( SessionWorkflow.run, id=f\"session-{uuid.uuid4()}\", task_queue=worker.task_queue, execution_timeout=timedelta(seconds=10.0), retry_policy=RetryPolicy(maximum_attempts=1), ) async def check(): async for evt in workflow_handle.fetch_history_events(): if evt.HasField(\"workflow_task_failed_event_attributes\") and ( \"Temporal workflows don't support SQLite sessions\" in", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "temporalio/sdk-python", + "expected": "[\"param: param1\", \"task, type: unknown\", \"cancelled=True\"]", + "got": "[\"param: param1\", \"task, type: do_stuff\"] * 2 + [\"cancelled=True\"] * 2 + [\"cancelled=False\"] * 2 + [\"done\"] * 2 + [\"cancelled=True\"] * 2 + [\"cancelled=False\"] * 2 + [\"done\"] * 2 + [\"cancelled=True\"] * 2 + [\"cancelled=False\"] * 2 + [\"done\"] * 2 + [\"cancelled=True\"] * 2 + [\"cancelled=False\"] * 2 + [\"done\"] * 2 + [\"cancelled=True\"] * 2 + [\"cancelled=False\"] * 2 + [\"done", + "got_raw": "[\"param: param1\", \"task, type: do_stuff\"] * 2 + [\"cancelled=True\"] * 2 + [\"cancelled=False\"] * 2 + [\"done\"] * 2 + [\"cancelled=True\"] * 2 + [\"cancelled=False\"] * 2 + [\"done\"] * 2 + [\"cancelled=True\"] * 2 + [\"cancelled=False\"] * 2 + [\"done\"] * 2 + [\"cancelled=True\"] * 2 + [\"cancelled=False\"] * 2 + [\"done\"] * 2 + [\"cancelled=True\"] * 2 + [\"cancelled=False\"] * 2 + [\"done", + "exact_match": false, + "code_bleu": 0.02785536792835677, + "edit_similarity": 0.2388758782201405 + }, + { + "repo": "temporalio/sdk-python", + "expected": "\"replaced key\"", + "got": "\"my_api_key\" new_client = await Client.connect( \"http://localhost:7233\"", + "got_raw": "\"my_api_key\" new_client = await Client.connect( \"http://localhost:7233\", plugins=[MyClientPlugin()] ) assert new_client.namespace == \"my_namespace\" assert new_client.service_client.config.api_key == \"my_api_key\" assert new_client.service_client.config.target_host == \"http://localhost:7233\" assert new_client.service_client.config.target_host == \"http://localhost:7233\" new_client = await Client.connect( \"http://localhost:7233\", plugins=[MyClientPlugin()] ) assert new_client.namespace == \"my_namespace\" assert new_client.service_client", + "exact_match": false, + "code_bleu": 0.11868405219520975, + "edit_similarity": 0.1411764705882353 + }, + { + "repo": "temporalio/sdk-python", + "expected": "1", + "got": "1", + "got_raw": "1 assert inbound_interceptor.header_records[0] == ( \"x-custom-from-workflow\", \"workflow-value\", ) assert result == \"workflow-value\" assert len(inbound_interceptor.outbound_headers) == 1 assert inbound_interceptor.outbound_headers[0] == ( \"x-custom-from-interceptor\", \"interceptor-value\", ) assert result == \"workflow-value\" assert len(inbound_interceptor.outbound_headers) == 1 assert inbound_interceptor.outbound_headers[0] == ( \"x-custom-from-interceptor\", \"interceptor-value\", ) assert result == \"workflow-value\" assert len(inbound_interceptor.out", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "temporalio/sdk-python", + "expected": "version", + "got": "version.strip()", + "got_raw": "version.strip() + \"-dev\" + str(temporalio.service.__version_info__[3]) + str(temporalio.service.__version_info__[4]) + str(temporalio.service.__version_info__[5]) + str(temporalio.service.__version_info__[6]) + str(temporalio.service.__version_info__[7]) + str(temporalio.service.__version_info__[8]) + str(temporalio.service.__version_info__[9]) + str(temporalio.service.__version_info__[10]) + str(temporalio.service.__version_info__[11]) + str(temporalio.service.__version_info__[1", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6363636363636364 + }, + { + "repo": "temporalio/sdk-python", + "expected": "1", + "got": "1", + "got_raw": "1 warning_list[0].message.args[0] == \"Plugin MyCombinedPlugin is already registered\" \" and will be ignored\" \" (did you mean to use a different task queue?)\\n\" \"If you want to use the same plugin on multiple task queues, \" \"you must register it with a unique name.\" \"For example, use MyCombinedPlugin(name='my-task-queue') instead.\" \"If you want to use the same plugin on multiple task queues with \" \"different names, you must use the same instance of the plugin.\" \"For example, use MyCombinedPlugin(name='my-task-queue')", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "textstat/textstat", + "expected": "expected", + "got": "expected", + "got_raw": "expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "textstat/textstat", + "expected": "expected", + "got": "expected", + "got_raw": "expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "textstat/textstat", + "expected": "margin", + "got": "margin", + "got_raw": "margin + 1.0000000000000001 + 0.0000000000000001 + 0.0000000000000001 + 0.0000000000000001 + 0.0000000000000001 + 0.0000000000000001 + 0.000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "textstat/textstat", + "expected": "expected", + "got": "expected", + "got_raw": "expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "textstat/textstat", + "expected": "expected", + "got": "expected", + "got_raw": "expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "textstat/textstat", + "expected": "expected", + "got": "expected", + "got_raw": "expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "textstat/textstat", + "expected": "expected", + "got": "expected", + "got_raw": "expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tfeldmann/organize", + "expected": "{ \"for-test1.txt\": \"WRITE test1.txt\", \"for-test2.txt\": \"WRITE test2.txt\", }", + "got": "{ \"for-test1.txt\": \"WRITE test1.txt\", \"for-test2.txt\": \"WRITE test2.txt\", }", + "got_raw": "{ \"for-test1.txt\": \"WRITE test1.txt\", \"for-test2.txt\": \"WRITE test2.txt\", }", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tfeldmann/organize", + "expected": "[ \"Odd student numbers: student-01\", \"Odd student numbers: student-03\", ]", + "got": "[\"Odd student numbers: student-01.txt\", \"Odd student numbers: student-03.txt\"]", + "got_raw": "[\"Odd student numbers: student-01.txt\", \"Odd student numbers: student-03.txt\"]", + "exact_match": false, + "code_bleu": 0.2705565962292491, + "edit_similarity": 0.9271523178807947 + }, + { + "repo": "tfeldmann/organize", + "expected": "[ \"Found JPG file: asd\", \"Found JPG file: camel\", \"Found JPG file: test\", ]", + "got": "[\"Found JPG file: camel.jPeG\"]", + "got_raw": "[\"Found JPG file: camel.jPeG\"]\n\n\ndef test_filename_move_2(fs, testoutput):\n files = { \"test.jpg\": \"\", \"test.jpg.zip\": \"\", \"test.jpg.zip\": \"\", \"test.jpg.zip\": \"\", } make_files(files, \"test\") config = \"\"\" rules: - locations: /test - filters: - name - extension: - .jpg - jpeg - .zip - .zip - .zip - .zip - actions: - echo: 'Found JPG file: {name}' \"\"\" Config.from_string(config).execute(simulate=False, output=testoutput) assert testoutput.messages == [\"", + "exact_match": false, + "code_bleu": 0.18749999999999997, + "edit_similarity": 0.5142857142857142 + }, + { + "repo": "tfeldmann/organize", + "expected": "FILES", + "got": "FILES", + "got_raw": "FILES | { \"test.txt\": \"\", \"file.txt\": \"Hello world\\nAnother line\", \"another.txt\": \"\", \"folder\": { \"x.txt\": \"\", }, \"test/test.txt\": \"\", \"test/file.txt\": \"Hello world\\nAnother line\", \"test/another.txt\": \"\", \"test/folder\": { \"x.txt\": \"\", }, } | { \"test.txt\": \"\", \"file.txt\": \"Hello world\\nAnother line\", \"another.txt\": \"\", \"folder\": { \"x.txt\": \"\", }, \"test/test.txt\": \"\", \"test/file.txt\": \"Hello world\\nAnother line\", \"test/another.txt", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tfeldmann/organize", + "expected": "[\"file (green)\"]", + "got": "[\"file (GREEN)\"] assert list_tags(tmp_path / \"test.txt\") == [\"test (RED)\"]", + "got_raw": "[\"file (GREEN)\"] assert list_tags(tmp_path / \"test.txt\") == [\"test (RED)\"]", + "exact_match": false, + "code_bleu": 0.09103526405546068, + "edit_similarity": 0.24444444444444444 + }, + { + "repo": "tfeldmann/organize", + "expected": "{ \"2000\": {\"01\": {\"12\": {\"photo1\": \"\"}}}, \"2020\": {\"01\": {\"01\": {\"photo2\": \"\", \"photo3\": \"\"}}}, }", + "got": "{ \"2000\": { \"01\": { \"12\": { \"photo1\": {}, }, }, }, \"2020\": { \"01\": { \"01\": { \"photo2\": {}, \"photo3\": {}, }, }, }, } } } def test_photo_sorting_with_date(fs): make_files([\"photo1\", \"photo2\", \"photo3\"], \"test\") conf = \"\"\" rules: - locations: /test - subfolders: true - filters: - lastmodified - actions: - move: dest: \"/pics/{date.strftime('%Y/%m/%d')}/\"", + "got_raw": "{ \"2000\": { \"01\": { \"12\": { \"photo1\": {}, }, }, }, \"2020\": { \"01\": { \"01\": { \"photo2\": {}, \"photo3\": {}, }, }, }, } } } def test_photo_sorting_with_date(fs): make_files([\"photo1\", \"photo2\", \"photo3\"], \"test\") conf = \"\"\" rules: - locations: /test - subfolders: true - filters: - lastmodified - actions: - move: dest: \"/pics/{date.strftime('%Y/%m/%d')}/\"", + "exact_match": false, + "code_bleu": 0.3269081189354431, + "edit_similarity": 0.39643652561247217 + }, + { + "repo": "tfeldmann/organize", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tfeldmann/organize", + "expected": "{ \"file.txt\": \"Hello world\\nAnother line\", \"folder\": { \"empty_sub\": {}, }, \"empty_folder\": {}, }", + "got": "{ \"test.txt\": \"\", \"file.txt\": \"Hello world\\nAnother line\", \"another.txt\": \"\", \"folder\": { \"x.txt\": \"\", \"empty_sub\": {}, }, }", + "got_raw": "{ \"test.txt\": \"\", \"file.txt\": \"Hello world\\nAnother line\", \"another.txt\": \"\", \"folder\": { \"x.txt\": \"\", \"empty_sub\": {}, }, }", + "exact_match": false, + "code_bleu": 0.4353813334061123, + "edit_similarity": 0.6909090909090909 + }, + { + "repo": "tfeldmann/organize", + "expected": "{\"testtest.py\": \"\"}", + "got": "{ \"test.py\": \"\"", + "got_raw": "{ \"test.py\": \"\", \"test_test.py\": \"\", }", + "exact_match": false, + "code_bleu": 0.4065061985236918, + "edit_similarity": 0.8235294117647058 + }, + { + "repo": "tfeldmann/organize", + "expected": "Path(result)", + "got": "Path(result)", + "got_raw": "Path(result)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tfeldmann/organize", + "expected": "Counter([\"fileA\", \"fileB\"])", + "got": "Counter({\"fileA.txt\": 1, \"fileB.txt\": 1})", + "got_raw": "Counter({\"fileA.txt\": 1, \"fileB.txt\": 1})", + "exact_match": false, + "code_bleu": 0.15537125692760353, + "edit_similarity": 0.7352941176470589 + }, + { + "repo": "tfeldmann/organize", + "expected": "[]", + "got": "[]", + "got_raw": "[]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tfeldmann/organize", + "expected": "{new_name: \"\"}", + "got": "{new_name: \"test.txt\"}", + "got_raw": "{new_name: \"test.txt\"}", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.7777777777777778 + }, + { + "repo": "tfeldmann/organize", + "expected": "{ \"a\": 1, \"b\": {\"b1\": 4, \"b2\": 3}, }", + "got": "{ \"a\": 1, \"b\": {\"b1\": 2, \"b2\": 3}, } + b[\"c\"] + b[\"b\"] + b[\"b\"][\"b3\"] + b[\"b\"][\"b1\"] + b[\"b\"][\"b2\"] + b[\"b\"][\"b3\"] + b[\"c\"] + b[\"b\"] + b[\"b\"][\"b3\"] + b[\"b\"][\"b1\"] + b[\"b\"][\"b2\"] + b[\"b\"][\"b3\"] + b[\"c\"] + b[\"b\"] + b[\"b\"][\"b3\"] +", + "got_raw": "{ \"a\": 1, \"b\": {\"b1\": 2, \"b2\": 3}, } + b[\"c\"] + b[\"b\"] + b[\"b\"][\"b3\"] + b[\"b\"][\"b1\"] + b[\"b\"][\"b2\"] + b[\"b\"][\"b3\"] + b[\"c\"] + b[\"b\"] + b[\"b\"][\"b3\"] + b[\"b\"][\"b1\"] + b[\"b\"][\"b2\"] + b[\"b\"][\"b3\"] + b[\"c\"] + b[\"b\"] + b[\"b\"][\"b3\"] +", + "exact_match": false, + "code_bleu": 0.12308555556976418, + "edit_similarity": 0.2661596958174905 + }, + { + "repo": "theQRL/QRL", + "expected": "1)", + "got": "1)", + "got_raw": "1) p.reset_key_value() self.assertEqual(len(p.key_value), 0) p.key_value[b'a'] = [10] p.key_value[b'b'] = [20] p.key_value[b'c'] = [30] p.key_value[b'd'] = [40] p.key_value[b'e'] = [50] p.key_value[b'f'] = [60] p.key_value[b'g'] = [70] p.key_value[b'h'] = [80] p.key_value[b'i'] = [90] p.key_value[b'j'] = [", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "theQRL/QRL", + "expected": "self.test_data)", + "got": "self.test_data)", + "got_raw": "self.test_data)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "theQRL/QRL", + "expected": "8)", + "got": "8)", + "got_raw": "8) self.assertFalse(self.addr_state.is_token_exists(b'010101')) # I can call update_token_balance with a zero to set the balance to zero. self.addr_state.update_token_balance(b'010101', 0) self.assertEqual(self.addr_state.get_token_balance(b'010101'), 0) self.assertFalse(self.addr_state.is_token_exists(b'010101')) # I can call update_token_balance with a positive number to increase the balance. self.addr_state.update_token_balance(b'010101', 2) self.assertEqual(self", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "theQRL/QRL", + "expected": "4)", + "got": "1)", + "got_raw": "1)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "theQRL/QRL", + "expected": "1)", + "got": "StringToUInt256('1'))", + "got_raw": "StringToUInt256('1')) # tuple (0,0,0,0,0...) length 32) # tuple (0,0,0,0,0...) length 32) # tuple (0,0,0,0,0...) length 32) # tuple (0,0,0,0,0...) length 32) # tuple (0,0,0,0,0...) length 32) # tuple (0,0,0,0,0...) length 32) # tuple (0", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.17391304347826086 + }, + { + "repo": "theQRL/QRL", + "expected": "json.loads(txjson))", + "got": "json.loads(txjson))", + "got_raw": "json.loads(txjson))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "theQRL/QRL", + "expected": "1)", + "got": "1)", + "got_raw": "1) self.assertEqual(len(self.peer_manager._peer_node_status), 1) self.assertEqual(self.peer_manager._channels[0], channel_3) self.assertEqual(self.peer_manager._peer_node_status[channel_3], make_node_chain_state()) self.assertEqual(self.peer_manager._peer_node_status[channel_3].block_number, 0) self.assertEqual(self.peer_manager._peer_node_status[channel_3].header_hash, b'') self.assertEqual(self.peer_manager._peer_node_status[channel_3].cumulative_difficulty, b'0' * 32) self.assertEqual(self.peer_manager._peer_node_status[channel_3].timestamp,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "theQRL/QRL", + "expected": "result)", + "got": "result)", + "got_raw": "result) # MessageRequest.params is not None self.mr.params = self.test_data result = self.mr.validate(self.test_data) self.assertTrue(result) # MessageRequest.params is None self.mr.params = None result = self.mr.validate(self.test_data) self.assertFalse(result) # MessageRequest.params is not None self.mr.params = self.test_data result = self.mr.validate(None) self.assertTrue(result) # MessageRequest.params is None self.mr.params = None result = self.mr.validate(None) self.assertTrue(result) # MessageRequest.params is not None self.mr.params = self.test_data result = self.mr", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "theQRL/QRL", + "expected": "bin2hstr(tx.txhash))", + "got": "bin2hstr(tx.hash()))", + "got_raw": "bin2hstr(tx.hash()))\n self.assertEqual(tx.amount, amount)\n self.assertEqual(tx.fee, 0)\n self.assertEqual(tx.nonce, 1)\n self.assertEqual(tx.version, 1)\n self.assertEqual(tx.type, 3)\n self.assertEqual(tx.addr_to, self.alice.address)\n self.assertEqual(tx.addr_from, None)\n self.assertEqual(tx.is_coinbase, True)\n self.assertEqual(tx.is_coinbase_tx, True)\n self.assertEqual(tx.is_coinbase_block, True)\n self.assertEqual(tx.is_coinbase_block_tx, True", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.9 + }, + { + "repo": "theQRL/QRL", + "expected": "tx)", + "got": "tx)", + "got_raw": "tx) self.assertEqual(tx.to_dict(), { \"type\": 1, \"version\": 1, \"nonce\": 0, \"fee\": 1, \"addrs_to\": [self.bob.address], \"amounts\": [100], \"message_data\": None }) self.assertEqual(tx.to_json(), test_json_Simple) self.assertEqual(tx.to_hex(), bin2hstr(tx.serialize())) self.assertEqual(tx.get_txid(), \"0000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "theQRL/QRL", + "expected": "2)", + "got": "2)", + "got_raw": "2) self.assertEqual(multi_sig_address_state.get_balance(), 40) self.assertEqual(multi_sig_address_state.get_unconfirmed_balance(), 0) self.assertEqual(multi_sig_address_state.get_unconfirmed_balance(1), 10) self.assertEqual(multi_sig_address_state.get_unconfirmed_balance(2), 5) self.assertEqual(multi_sig_address_state.get_unconfirmed_balance(3), 0) self.assertEqual(multi_sig_address_state.get_unconfirmed_balance(4), 0) self.assertEqual(multi_sig_address_state.get_unconfirmed_balance(5), 0) self.assertEqual(multi_sig_address_state.get_unconfirmed_balance", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "theQRL/QRL", + "expected": "1)", + "got": "1)", + "got_raw": "1)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "theQRL/QRL", + "expected": "output)", + "got": "output)", + "got_raw": "output)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "theQRL/QRL", + "expected": "3)", + "got": "3)", + "got_raw": "3)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "theQRL/QRL", + "expected": "2)", + "got": "2)", + "got_raw": "2) self.assertEqual(len(self.peer_manager._peer_node_status), 2) self.assertEqual(self.peer_manager._peer_node_status[channel_2], make_node_chain_state()) self.assertEqual(self.peer_manager._peer_node_status[channel_3], make_node_chain_state()) self.assertEqual(self.peer_manager._peer_node_status[channel_2].block_number, 0) self.assertEqual(self.peer_manager._peer_node_status[channel_3].block_number, 0) self.assertEqual(self.peer_manager._peer_node_status[channel_2].header_hash, b'') self.assertEqual(self.peer_manager._peer_node_status[channel_3].header_hash, b'')", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "theQRL/QRL", + "expected": "xmss.hash_function)", + "got": "xmss.hash_function)", + "got_raw": "xmss.hash_function)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "theQRL/QRL", + "expected": "1)", + "got": "1)", + "got_raw": "1)\r\n self.assertEqual(self.txpool.transactions[0], tx)\r\n self.assertEqual(self.txpool._txs_by_hash[tx.txhash], tx)\r\n self.assertEqual(self.txpool._txs_by_fee[tx.fee], tx)\r\n self.assertEqual(self.txpool._txs_by_time[tx.time], tx)\r\n self.assertEqual(self.txpool._txs_by_pk[tx.PK], tx)\r\n self.assertEqual(self.txpool._txs_by_time_and_pk[tx.time][tx.PK], tx)\r\n self.assertEqual(self.txpool", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "theQRL/QRL", + "expected": "block_11b._data)", + "got": "block_11b._data)", + "got_raw": "block_11b._data)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "theQRL/QRL", + "expected": "4)", + "got": "2)", + "got_raw": "2)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "theQRL/QRL", + "expected": "tx.ots_key)", + "got": "tx.ots_key)", + "got_raw": "tx.ots_key) self.assertEqual(1, tx.fee) self.assertEqual(100, tx.amounts[0]) self.assertEqual(1, len(tx.addrs_to)) self.assertEqual(1, len(tx.addrs_from)) self.assertEqual(1, len(tx.message_data)) self.assertEqual(1, len(tx.votes)) self.assertEqual(1, len(tx.votes_from)) self.assertEqual(1, len(tx.votes_to)) self.assertEqual(1, len(tx.votes_fee)) self.assertEqual(1, len(tx.votes_amounts)) self.assertEqual(1, len(tx.votes_message)) self.assertEqual(", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tmbo/questionary", + "expected": "\"t\"", + "got": "\"python2\"", + "got_raw": "\"python2\" + \"\\r\" + \"\\x03\" + \"\\x03\" + \"\\x03\" + \"\\x03\" + \"\\x03\" + \"\\x03\" + \"\\x03\" + \"\\x03\" + \"\\x03\" + \"\\x03\" + \"\\x03\" + \"\\x03\" + \"\\x03\" + \"\\x03\" + \"\\x03\" + \"\\x03\" + \"\\x03\" + \"\\x03\" + \"\\x03\" + \"\\x03\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "tmbo/questionary", + "expected": "\"write\"", + "got": "\"write\"", + "got_raw": "\"write\" assert mock.method_calls[1][1] == \"Hello World\" assert mock.method_calls[2][0] == \"set_attributes\" assert mock.method_calls[2][1][0] == Attrs( color=\"\", bgcolor=\"\", bold=False, underline=False, italic=False, blink=False, reverse=False, hidden=False, ) assert mock.method_calls[3][0] == \"write\" assert mock.method_calls[3][1] == \"\\n\" mock.return_value = None mock.reset_mock() print_formatted_text( \"Hello World\", style=\"bold italic\", output=DummyOutput(), ) assert len(mock.method_calls", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tmbo/questionary", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as excinfo: feed_cli_with_input( message, text, **kwargs ) assert str(excinfo.value) == \"Cannot select the initial choice\" \" 'separator'.\" \" It is a separator and cannot be selected.\" \" Please use a different initial choice.\" \" You can use the 'initial_choice' keyword argument to select a different initial choice.\" \" You can use the 'choices' keyword argument to add a separator.\" \" You can use the 'separator' keyword argument to add a separator.\" \" You can use the 'separator' keyword argument to add a separator.\" \" You can use the 'separator' keyword", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tmbo/questionary", + "expected": "True", + "got": "True", + "got_raw": "True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tmbo/questionary", + "expected": "filtered", + "got": "filtered", + "got_raw": "filtered and \"b\" in filtered and \"c\" in filtered and \"d\" not in filtered and \"e\" not in filtered and \"f\" not in filtered and \"g\" not in filtered and \"h\" not in filtered and \"i\" not in filtered and \"j\" not in filtered and \"k\" not in filtered and \"l\" not in filtered and \"m\" not in filtered and \"n\" not in filtered and \"o\" not in filtered and \"p\" not in filtered and \"q\" not in filtered and \"r\" not in filtered and \"s\" not in filtered and \"t", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tmbo/questionary", + "expected": "1", + "got": "1.0000000000000002e-160000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "1.0000000000000002e-160000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "tmbo/questionary", + "expected": "{\"hello\": None}", + "got": "{\"hello\": None}", + "got_raw": "{\"hello\": None} # noqa: E124 # noqa: E124 # noqa: E124 # noqa: E124 # noqa: E124 # noqa: E124 # noqa: E124 # noqa: E124 # noqa: E124 # noqa: E124 # noqa: E124 # noqa: E124 # noqa: E124 # noqa: E124 # noqa: E124 # noqa", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tmbo/questionary", + "expected": "KeyboardInterrupt)", + "got": "KeyboardInterrupt)", + "got_raw": "KeyboardInterrupt) as excinfo: feed_cli_with_input([message, text]) assert str(excinfo.value) == \"Foo message\" assert excinfo.type == KeyboardInterrupt", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tmbo/questionary", + "expected": "{\"theme\": \"Ask opening hours\"}", + "got": "{\"key\": 3} assert result_py == {\"key\": 3}", + "got_raw": "{\"key\": 3} assert result_py == {\"key\": 3}", + "exact_match": false, + "code_bleu": 0.10511846841633776, + "edit_similarity": 0.19718309859154928 + }, + { + "repo": "tmux-python/tmuxp", + "expected": "data", + "got": "data.keys()", + "got_raw": "data.keys() assert \"global_workspace_dirs\" in data.keys() assert isinstance(data[\"workspaces\"], list) assert isinstance(data[\"global_workspace_dirs\"], list) assert len(data[\"workspaces\"]) == 2 assert len(data[\"global_workspace_dirs\"]) == 1 assert data[\"workspaces\"][0][\"name\"] == \"dev\" assert data[\"workspaces\"][0][\"config_file\"] == \"dev.yaml\" assert data[\"workspaces\"][1][\"name\"] == \"prod\" assert data[\"workspaces\"][1][\"config_file\"] == \"prod.json\" assert data[\"global_workspace_dirs\"][0] == str(tmuxp_dir", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5333333333333333 + }, + { + "repo": "tmux-python/tmuxp", + "expected": "exc.WorkspaceError)", + "got": "exc.ConfigError)", + "got_raw": "exc.ConfigError) as exc_info: loader.load(sconfig) assert str(exc_info.value) == \"No session name found in configuration\"", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.6285714285714286 + }, + { + "repo": "tmux-python/tmuxp", + "expected": "3", + "got": "2", + "got_raw": "2 * len(option) + 2 * len(value) + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + ", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "tmux-python/tmuxp", + "expected": "2", + "got": "2", + "got_raw": "2\n\nsubcommand1 = info.subcommands[0] assert subcommand1.name == \"sub1\" assert subcommand1.description == \"Subcommand 1\" assert subcommand1.options is not None assert len(subcommand1.options) == 1 option1 = subcommand1.options[0] assert option1.name == \"option1\" assert option1.description == \"Option 1\" assert option1.default is None assert option1.required is True assert option1.type == str assert option1.choices is None assert option1.action == \"store\" assert option1.help == \"Option 1 help\" assert option1.met", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tmux-python/tmuxp", + "expected": "2", + "got": "2", + "got_raw": "2 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tmux-python/tmuxp", + "expected": "\"test\"", + "got": "\"test\"", + "got_raw": "\"test\" # noqa: E501\n finally:\r\n del sys.modules[\"test_parser_module\"] # noqa: E702\n\n\ndef test_get_parser_from_module_import_error() -> None:\r\n \"\"\"Test getting parser from a module that raises ImportError.\"\"\"\r\n with pytest.raises(ImportError) as exc_info:\r\n get_parser_from_module(\"nonexistent_module\", \"create_parser\") # noqa: E501\r\n assert str(exc_info.value) == \"Cannot find parser in nonexistent_module\" # noqa: E501", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tmux-python/tmuxp", + "expected": "output", + "got": "output", + "got_raw": "output and ANSI_MAGENTA in output and ANSI_CYAN in output and len(ANSI_BLUE) > 0 and len(ANSI_MAGENTA) > 0 and len(ANSI_CYAN) > 0 and output.startswith(ANSI_BLUE) and output.endswith(ANSI_CYAN) and \"...\" in output and \"my-session\" in output and \"ipython\" in output and \"Launching\" in output and \"shell\" in output and \"for\" in output and \"session\" in output and \"...\" in output and \"...\" in output and \"...\" in output and \"...\" in output and \"...\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tmux-python/tmuxp", + "expected": "None", + "got": "None", + "got_raw": "None and builder.session.name == \"test\" assert builder.session.list_windows() == [ { \"window_id\": \"0\", \"window_name\": \"test\", \"windows\": [ { \"window_id\": \"1\", \"window_name\": \"test\", \"panes\": [ { \"pane_id\": \"0\", \"pane_index\": 0, \"pane_active\": True, \"pane_height\": 1, \"pane_width\": 1, \"pane_row\": 0, \"pane_col\": 0, \"pane_command\": \"ls\", \"pane_title\": \"ls\", \"pane_pane_id\": \"0\",", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tmux-python/tmuxp", + "expected": "\"valid_input\"", + "got": "\"valid_input\"", + "got_raw": "\"valid_input\" # The user's input is used as the result. # The first empty input is ignored. # The second input is used as the result. # The prompt re-prompts when the user enters empty input with no default. # The user's input is used as the result. # The first empty input is ignored. # The second input is used as the result. # The prompt re-prompts when the user enters empty input with no default. # The user's input is used as the result. # The first empty input is ignored. # The second input", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tmux-python/tmuxp", + "expected": "cli_output", + "got": "cli_output.lower()", + "got_raw": "cli_output.lower() cli_output = cli_output.replace(\"environment\", \"\") cli_output = cli_output.replace(\"tmuxp\", \"\") cli_output = cli_output.replace(\"tmuxp version\", \"\") cli_output = cli_output.replace(\"python\", \"\") cli_output = cli_output.replace(\"python version\", \"\") cli_output = cli_output.replace(\"python path\", \"\") cli_output = cli_output.replace(\"python path (full)\", \"\") cli_output = cli_output.replace(\"python path (full) (tmuxp)\", \"\") cli_output = cli_output.replace(\"python path (full) (tmuxp) (tmuxp)\", \"\") cli_output =", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.7142857142857143 + }, + { + "repo": "tmux-python/tmuxp", + "expected": "1", + "got": "1", + "got_raw": "1 # at least one token should be found\n token = non_ws_tokens[0] # Get the first token found\r\n assert token[0] == expected_token_type # Check the token type\r\n assert token[1] == expected_value # Check the token value", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tmux-python/tmuxp", + "expected": "masked", + "got": "masked.split(\":\")[-1]", + "got_raw": "masked.split(\":\")[-1] # type: ignore # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W503 # noqa: W", + "exact_match": false, + "code_bleu": 0.12605968092174913, + "edit_similarity": 0.4444444444444444 + }, + { + "repo": "tmux-python/tmuxp", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" # default value fields[\"window_name\"] == \"main\" fields[\"window_id\"] == 0 fields[\"layout\"] == \"main\" fields[\"layout_id\"] == 0 fields[\"layout_version\"] == 1 fields[\"layout_type\"] == \"grid\" fields[\"layout_options\"] == {} fields[\"layout_config\"] == {} fields[\"layout_config_version\"] == 1 fields[\"layout_config_type\"] == \"json\" fields[\"layout_config_options\"] == {} fields[\"layout_config_options_version\"] == 1 fields[\"layout_config_options_type\"] == \"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tmux-python/tmuxp", + "expected": "mock", + "got": "mock()", + "got_raw": "mock() # type: ignore # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 ", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.8 + }, + { + "repo": "tmux-python/tmuxp", + "expected": "prompt", + "got": "prompt", + "got_raw": "prompt and ANSI_CYAN in prompt and ANSI_RESET not in prompt and \"yaml\" in prompt and \"json\" in prompt and \"yaml\" not in default_str and \"json\" not in default_str and \"yaml\" in name and \"json\" in name and \"yaml\" not in prompt and \"json\" not in prompt and \"yaml\" in default_str and \"json\" in default_str and \"yaml\" not in choices_str and \"json\" not in choices_str and \"yaml\" in name and \"json\" in name and \"yaml\" not in prompt and \"json\" not in prompt and \"yaml\" in", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tmux-python/tmuxp", + "expected": "5", + "got": "5", + "got_raw": "5 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E50", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tmux-python/tmuxp", + "expected": "result", + "got": "result", + "got_raw": "result and ANSI_BOLD in result and \"tmux path\" in result and \"bold\" in result.lower() and \"magenta\" in result.lower() and \"highlight\" in result.lower() and \"highlighted\" in result.lower() and \"highlighted text\" in result.lower() and \"highlighted text\" in result.lower() and \"highlighted text\" in result.lower() and \"highlighted text\" in result.lower() and \"highlighted text\" in result.lower() and \"highlighted text\" in result.lower() and \"highlighted text\" in result.lower() and \"highlighted text\" in result.lower()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tmux-python/tmuxp", + "expected": "sconfig[\"start_directory\"]", + "got": "sconfig[\"start_directory\"]", + "got_raw": "sconfig[\"start_directory\"] assert f\"{env_val}/test2\" == sconfig[\"shell_command_before\"] assert f\"{env_val}/test3\" == sconfig[\"before_script\"] assert f\"{env_val}\" == sconfig[\"session_name\"] assert f\"{env_val}/lol\" == sconfig[\"options\"][\"default-command\"] assert f\"{env_val}/moo\" == sconfig[\"global_options\"][\"default-shell\"] assert sconfig[\"windows\"][0][\"window_name\"] == \"editor\" assert sconfig[\"windows\"][1][\"window_name\"] == \"logging @ ${env_key}\" assert sconfig[\"windows\"][", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tmux-python/tmuxp", + "expected": "result", + "got": "result[1:3]", + "got_raw": "result[1:3] assert (\"Token.Operator\", \"-h\") in result[3:5] assert (\"Token.Punctuation\", \"[\") in result[5:7] assert (\"Token.Punctuation\", \"]\") in result[7:9] assert (\"Token.Punctuation\", \";\") in result[9:11] assert (\"Token.Name.Attribute\", \"h\") in result[11:13] assert (\"Token.Punctuation\", \"=\") in result[13:15] assert (\"Token.String\", \"True\") in result[15:17] assert (\"Token.Punctuation\", \";\") in", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.7058823529411765 + }, + { + "repo": "tmux-python/tmuxp", + "expected": "config_fixture.expand1.after_workspace()", + "got": "config_fixture.expand1.after_workspace1.expand1_after_workspace1()", + "got_raw": "config_fixture.expand1.after_workspace1.expand1_after_workspace1() \\ + config_fixture.expand1.after_workspace2.expand1_after_workspace2() \\ + config_fixture.expand1.after_workspace3.expand1_after_workspace3() \\ + config_fixture.expand1.after_workspace4.expand1_after_workspace4() \\ + config_fixture.expand1.after_workspace5.expand1_after_workspace5() \\ + config_fixture.expand1.after_workspace6.expand1_after_workspace6() \\ + config_fixture.expand1.after_workspace7.expand1_after_workspace7() \\ + config_fixture.expand1.after_workspace8.expand1_after_workspace8() \\ + config_fixture.expand1.after_workspace9.expand", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.7547169811320755 + }, + { + "repo": "tomerfiliba/plumbum", + "expected": "0", + "got": "0", + "got_raw": "0 # The example should run without errors.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tomerfiliba/plumbum", + "expected": "\"\\033[1m\"", + "got": "\"\\033[1m\"", + "got_raw": "\"\\033[1m\" assert colors.underline == \"\\033[4m\" assert colors.inverse == \"\\033[7m\" assert colors.hidden == \"\\033[8m\" assert colors.strikethrough == \"\\033[9m\" assert colors.dim == \"\\033[2m\" assert colors.faint == \"\\033[2m\" assert colors.italic == \"\\033[3m\" assert colors.italics == \"\\033[3m\" assert colors.underline == \"\\033[4m\" assert colors.over", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tomerfiliba/plumbum", + "expected": "rem", + "got": "rem[\"ls\"]", + "got_raw": "rem[\"ls\"] # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.5 + }, + { + "repo": "tomerfiliba/plumbum", + "expected": "wrapped", + "got": "wrapped", + "got_raw": "wrapped # noqa: E712 assert colors.red.wrap(wrapped) == string assert colors.red.wrap(\"\") == \"\" assert colors.red.wrap(None) == \"\" assert colors.red.wrap(1) == \"1\" assert colors.red.wrap(1.2) == \"1.2\" assert colors.red.wrap(True) == \"True\" assert colors.red.wrap(False) == \"False\" assert colors.red.wrap(()) == \"()\" assert colors.red.wrap([]) == \"[]\" assert colors.red.wrap({}) == \"{}\" assert colors.red.wrap(set()) == \"set()\" ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tomerfiliba/plumbum", + "expected": "output", + "got": "output.strip()", + "got_raw": "output.strip() + \"\\n\" + output.strip() + \"\\n\" + output.strip() + \"\\n\" + output.strip() + \"\\n\" + output.strip() + \"\\n\" + output.strip() + \"\\n\" + output.strip() + \"\\n\" + output.strip() + \"\\n\" + output.strip() + \"\\n\" + output.strip() + \"\\n\" + output.strip() + \"\\n\" + output.strip() + \"\\n\" + output.strip() + \"\\n\" + output.strip() + \"\\n\" + output.strip() + \"\\n\" + output.strip() + \"\\n\" +", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6 + }, + { + "repo": "tomerfiliba/plumbum", + "expected": "\"lala\"", + "got": "\"lala\"", + "got_raw": "\"lala\" if env.PYPY else \"baba\" if env.PYPY else \"baba\" if env.PYPY else \"baba\" if env.PYPY else \"baba\" if env.PYPY else \"baba\" if env.PYPY else \"baba\" if env.PYPY else \"baba\" if env.PYPY else \"baba\" if env.PYPY else \"baba\" if env.PYPY else \"baba\" if env.PYPY else \"baba\" if env.PYPY else \"baba\" if env.PYP", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tomerfiliba/plumbum", + "expected": "colors[2]", + "got": "colors.red", + "got_raw": "colors.red + 2 * colors.black + 2 * colors.blue + 2 * colors.magenta + 2 * colors.cyan + 2 * colors.white + 2 * colors.yellow + 2 * colors.green + 2 * colors.red + 2 * colors.blue + 2 * colors.magenta + 2 * colors.cyan + 2 * colors.white + 2 * colors.yellow + 2 * colors.green + 2 * colors.red + 2 * colors.blue + 2 * colors.magenta + 2 * colors.cyan + 2 * colors.white + 2 * colors.yellow", + "exact_match": false, + "code_bleu": 0.3388507513536918, + "edit_similarity": 0.631578947368421 + }, + { + "repo": "tomerfiliba/plumbum", + "expected": "data", + "got": "data.decode()", + "got_raw": "data.decode() + \"\\n\" + data.decode() + \"\\n\" + data.decode() + \"\\n\" + data.decode() + \"\\n\" + data.decode() + \"\\n\" + data.decode() + \"\\n\" + data.decode() + \"\\n\" + data.decode() + \"\\n\" + data.decode() + \"\\n\" + data.decode() + \"\\n\" + data.decode() + \"\\n\" + data.decode() + \"\\n\" + data.decode() + \"\\n\" + data.decode() + \"\\n\" + data.decode() + \"\\n\" + data.decode() + \"\\n\" +", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.47058823529411764 + }, + { + "repo": "tomerfiliba/plumbum", + "expected": "\"This is output\\n\" * 2", + "got": "\"This is output\\nThis is output\\n\"", + "got_raw": "\"This is output\\nThis is output\\n\"", + "exact_match": false, + "code_bleu": 0.16666666666666666, + "edit_similarity": 0.6785714285714286 + }, + { + "repo": "tomerfiliba/plumbum", + "expected": "13", + "got": "13", + "got_raw": "13 # noqa: E501 capsys.readouterr().err == \"Enter a random int: \" # noqa: E501 capsys.readouterr().out == \"13\\n\" # noqa: E501 with send_stdin(\"13\\n\"): assert prompt(\"Enter a random int:\", type=int) == 13 # noqa: E501 capsys.readouterr().err == \"Enter a random int: \" # noqa: E501 capsys.readouterr().out == \"13\\n\" # noqa: E", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tomerfiliba/plumbum", + "expected": "8", + "got": "8", + "got_raw": "8 * 3 + 16 * 2 + 16 * 4 + 16 * 8 + 16 * 16 + 16 * 32 + 16 * 64 + 16 * 128 + 16 * 256 + 16 * 512 + 16 * 1024 + 16 * 2048 + 16 * 4096 + 16 * 8192 + 16 * 16384 +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tomerfiliba/plumbum", + "expected": "10000", + "got": "len(expected_output)", + "got_raw": "len(expected_output) * 2 + 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.3021375397356768, + "edit_similarity": 0.0 + }, + { + "repo": "tomerfiliba/plumbum", + "expected": "Color(\"Dark_Blue\")", + "got": "Color(\"dark", + "got_raw": "Color(\"dark blue\") # noqa: E711\n\n def test_color_html(self):\n\n assert color_html(\"red\") == \"#ff0000\" # noqa: E711", + "exact_match": false, + "code_bleu": 0.47287080450158786, + "edit_similarity": 0.6896551724137931 + }, + { + "repo": "tomerfiliba/plumbum", + "expected": "\"hi\"", + "got": "\"hi\"", + "got_raw": "\"hi\" capsys.readouterr().err == \"\" capsys.readouterr().out == \"Enter nothing [hi]: \" capsys.readouterr().out == \"\" capsys.readouterr().err == \"\" capsys.readouterr().out == \"Enter nothing [hi]: \" capsys.readouterr().out == \"\" capsys.readouterr().err == \"\" capsys.readouterr().out == \"Enter nothing [hi]: \" capsys.readouterr().out == \"\" capsys.readouterr().err == \"\" capsys.readouterr().out == \"Enter nothing [hi]: \" capsys", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "tomerfiliba/plumbum", + "expected": "True", + "got": "True", + "got_raw": "True # True is the default value for AsyncTF\"\"\" async with AsyncSshMachine(TEST_HOST) as rem: true_cmd = rem[\"true\"] result = await (true_cmd & AsyncTF(0)) assert result == 0 \"\"\" async with AsyncSshMachine(TEST_HOST) as rem: true_cmd = rem[\"true\"] result = await (true_cmd & AsyncTF(1)) assert result == 1 \"\"\" async with AsyncSshMachine(TEST_HOST) as rem: true_cmd = rem[\"true\"] result = await (true_cmd & AsyncTF(2)) assert result == 2 \"\"\" async with AsyncSsh", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ultrabug/mkdocs-static-i18n", + "expected": "None", + "got": "None", + "got_raw": "None and nav.homepage.abs_url == \"/\" + language + \"/\" + config[\"site_url\"] + \"/\" + config[\"site_name\"] + \"/\" + config[\"site_description\"] + \"/\" + config[\"site_author\"] + \"/\" + config[\"site_copyright\"] + \"/\" + config[\"site_language\"] + \"/\" + config[\"site_theme\"] + \"/\" + config[\"site_version\"] + \"/\" + config[\"site_build\"] + \"/\" + config[\"site_build_date\"] + \"/\" + config[\"site_build_time\"] + \"/\" + config[\"site_build_timezone\"] + \"/\" + config[\"site_build_host\"] + \"/\" + config[\"site_build_os", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ultrabug/mkdocs-static-i18n", + "expected": "[ {\"name\": \"english\", \"link\": \"/\", \"lang\": \"en\"}, {\"name\": \"fran\u00e7ais\", \"link\": \"/fr/\", \"lang\": \"fr\"}, ]", + "got": "[ {\"name\": \"english\", \"link\": \"/\", \"lang\": \"en\"}, {\"name\": \"fran\u00e7ais\", \"link\": \"/fr/\", \"lang\": \"fr\"}, ] + i18n_plugin.on_config(mkdocs_config)[\"extra\"][\"alternate\"] + [ {\"name\": \"english\", \"link\": \"/en/\", \"lang\": \"en\"}, {\"name\": \"fran\u00e7ais\", \"link\": \"/fr/\", \"lang\": \"fr\"}, ] + i18n_plugin.on_config(mkdocs_config)[\"extra\"][\"alternate\"] + [ {\"name\": \"english\", \"link\": \"/en", + "got_raw": "[ {\"name\": \"english\", \"link\": \"/\", \"lang\": \"en\"}, {\"name\": \"fran\u00e7ais\", \"link\": \"/fr/\", \"lang\": \"fr\"}, ] + i18n_plugin.on_config(mkdocs_config)[\"extra\"][\"alternate\"] + [ {\"name\": \"english\", \"link\": \"/en/\", \"lang\": \"en\"}, {\"name\": \"fran\u00e7ais\", \"link\": \"/fr/\", \"lang\": \"fr\"}, ] + i18n_plugin.on_config(mkdocs_config)[\"extra\"][\"alternate\"] + [ {\"name\": \"english\", \"link\": \"/en", + "exact_match": false, + "code_bleu": 0.2992964001539562, + "edit_similarity": 0.4345991561181435 + }, + { + "repo": "ultrabug/mkdocs-static-i18n", + "expected": "[ { \"locale\": \"en\", \"name\": \"english\", \"link\": \"/\", \"fixed_link\": None, \"build\": True, \"default\": True, \"nav\": None, \"nav_translations\": None, \"admonition_translations\": None, \"theme\": None, \"site_name\": None, \"copyright\": None, \"extra\": None, \"site_author\": None, \"site_description\": None, \"site_url\": None, }, ]", + "got": "[ { \"locale\": \"en\", \"name\": \"english\", \"default\": True, }, ] assert i18n_plugin.config[\"default_lang\"] == \"en\" assert i18n_plugin.config[\"default_url\"] == \"/en/\" assert i18n_plugin.config[\"url_prefix\"] == \"\" assert i18n_plugin.config[\"base_url\"] == \"\" assert i18n_plugin.config[\"docs_dir\"] == \"docs_suffix_structure_one_language/\" assert i18n_plugin.config[\"docs_dir_suffix\"] == \"\" assert i18n_plugin.config[\"docs_dir_lang_prefix\"] == \"\" assert i1", + "got_raw": "[ { \"locale\": \"en\", \"name\": \"english\", \"default\": True, }, ] assert i18n_plugin.config[\"default_lang\"] == \"en\" assert i18n_plugin.config[\"default_url\"] == \"/en/\" assert i18n_plugin.config[\"url_prefix\"] == \"\" assert i18n_plugin.config[\"base_url\"] == \"\" assert i18n_plugin.config[\"docs_dir\"] == \"docs_suffix_structure_one_language/\" assert i18n_plugin.config[\"docs_dir_suffix\"] == \"\" assert i18n_plugin.config[\"docs_dir_lang_prefix\"] == \"\" assert i1", + "exact_match": false, + "code_bleu": 0.16649528018389614, + "edit_similarity": 0.14210526315789473 + }, + { + "repo": "ultrabug/mkdocs-static-i18n", + "expected": "test_page.dest_uri", + "got": "test_page.dest_uri", + "got_raw": "test_page.dest_uri", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "ultrabug/mkdocs-static-i18n", + "expected": "len(nav.pages) + 1", + "got": "len(nav) + 1 if use_directory_urls else len(nav) - 1 if language == \"en\" else 0 if language == \"fr\" else 1 if language == \"en\" else 0 if language == \"fr\" else 1 if language == \"en\" else 0 if language == \"fr\" else 1 if language == \"en\" else 0 if language == \"fr\" else 1 if language == \"en\" else 0 if language == \"fr\" else 1 if language == \"en\" else 0 if language == \"fr\" else 1 if language ==", + "got_raw": "len(nav) + 1 if use_directory_urls else len(nav) - 1 if language == \"en\" else 0 if language == \"fr\" else 1 if language == \"en\" else 0 if language == \"fr\" else 1 if language == \"en\" else 0 if language == \"fr\" else 1 if language == \"en\" else 0 if language == \"fr\" else 1 if language == \"en\" else 0 if language == \"fr\" else 1 if language == \"en\" else 0 if language == \"fr\" else 1 if language ==", + "exact_match": false, + "code_bleu": 0.031231964143082987, + "edit_similarity": 0.05867970660146699 + }, + { + "repo": "ultrabug/mkdocs-static-i18n", + "expected": "\"en\"", + "got": "\"en\"", + "got_raw": "\"en\" assert str(result[\"site_url\"]) == \"http://example.com/\" assert str(result[\"site_name\"]) == \"My Site\" assert str(result[\"site_description\"]) == \"My Site Description\" assert str(result[\"site_author\"]) == \"John Doe\" assert str(result[\"site_favicon\"]) == \"favicon.ico\" assert str(result[\"site_logo\"]) == \"logo.svg\" assert str(result[\"site_url\"]) == \"http://example.com/\" assert str(result[\"site_url\"]) == \"http://example.com/\" assert str(result[\"site_url\"]) == \"http://example.com/\" assert str(result[\"site_url\"])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "unfoldadmin/django-unfold", + "expected": "False", + "got": "True", + "got_raw": "True and context[\"sidebar_show_all_sites\"] is True and context[\"sidebar_show_all_users\"] is True and context[\"sidebar_show_all_groups\"] is True and context[\"sidebar_show_all_pages\"] is True and context[\"sidebar_show_all_menus\"] is True and context[\"sidebar_show_all_widgets\"] is True and context[\"sidebar_show_all_templates\"] is True and context[\"sidebar_show_all_plugins\"] is True and context[\"sidebar_show_all_themes\"] is True and context[\"sidebar_show_all_languages\"] is True and context[\"sidebar_show_all_languages\"] is True and context[\"sidebar_show_all_languages\"] is True and context[\"sidebar_show_all", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "unfoldadmin/django-unfold", + "expected": "{ \"light\": static(\"icon-light.svg\"), \"dark\": static(\"icon-dark.svg\"), }", + "got": "static(\"icon-light.svg\")", + "got_raw": "static(\"icon-light.svg\")", + "exact_match": false, + "code_bleu": 0.25, + "edit_similarity": 0.5052631578947369 + }, + { + "repo": "unfoldadmin/django-unfold", + "expected": "response.content.decode()", + "got": "response.content.decode()", + "got_raw": "response.content.decode() # noqa: W605\n\n response = admin_client.get( # noqa: W605\n reverse(\"admin:example_project_change\", args=(project.pk,)) # noqa: W605\n )\n assert response.status_code == HTTPStatus.OK\n\n assert \"Test Category\" in response.content.decode() # noqa: W605\n\n admin.site.unregister(Category) # noqa: W605\n admin.site.unregister(Project) # noqa: W605\n\n admin.site.register(Category, CategoryAdmin) # noqa:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "unfoldadmin/django-unfold", + "expected": "\"/lambda/link\"", + "got": "\"/lambda/link\"", + "got_raw": "\"/lambda/link\" in context[\"sidebar_navigation\"][0][\"items\"][0][\"link\"]() or \"/lambda/link\" in context[\"sidebar_navigation\"][0][\"items\"][0][\"link\"].__doc__ or \"/lambda/link\" in context[\"sidebar_navigation\"][0][\"items\"][0][\"link\"].__doc__.__doc__ or \"/lambda/link\" in context[\"sidebar_navigation\"][0][\"items\"][0][\"link\"].__doc__.__doc__.__doc__ or \"/lambda/link\" in context[\"sidebar_navigation\"][0][\"items\"][0][\"link\"].__doc__.__doc__.__doc__.__doc__ or \"/lambda", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "unfoldadmin/django-unfold", + "expected": "\"Custom readonly field\"", + "got": "\"\" \"Custom readonly field\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n", + "got_raw": "\"\" \"Custom readonly field\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n\" \"\\n", + "exact_match": false, + "code_bleu": 0.02673219555880807, + "edit_similarity": 0.18181818181818182 + }, + { + "repo": "unfoldadmin/django-unfold", + "expected": "rendered", + "got": "rendered.strip()", + "got_raw": "rendered.strip()", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "unfoldadmin/django-unfold", + "expected": "HTTPStatus.OK", + "got": "HTTPStatus.OK.value", + "got_raw": "HTTPStatus.OK.value", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.8125 + }, + { + "repo": "unionai-oss/pandera", + "expected": "str(e.value)", + "got": "str(e.value)", + "got_raw": "str(e.value) or str(e.value) in schema.name \\ or str(e.value) in str(e) or str(e) in schema.name \\ or str(e) in str(e.value) or str(e) in str(e.value) + str(e) or str(e) + str(e.value) or str(e) + str(e) + str(e.value) or str(e) + str(e) + str(e) + str(e.value) or str(e) + str(e) + str(e) + str(e) + str(e.value) or str(e) + str(e) + str(e) + str(e)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "unionai-oss/pandera", + "expected": "buffer", + "got": "buffer.getvalue()", + "got_raw": "buffer.getvalue() # type: ignore [return-value] # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa:", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5217391304347826 + }, + { + "repo": "unionai-oss/pandera", + "expected": "csv_data)", + "got": "csv_data)", + "got_raw": "csv_data) result = Table.from_format(csv_data, mock_config) assert result.schema() == pa.schema({\"str_col\": pa.String(), \"int_col\": pa.Int()}) assert result.to_arrow_table().to_pydict() == {\"str_col\": [\"test\"], \"int_col\": [1]} result = Table.from_format(csv_data, mock_config, header=False) assert result.schema() == pa.schema({\"str_col\": pa.String(nullable=True), \"int_col\": pa.Int(nullable=True)}) assert result.to_arrow_table().to_pydict() == {\"str_col\": [\"test\"], \"int_col\": [1]} result = Table", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "unionai-oss/pandera", + "expected": "TypeError)", + "got": "TypeError)", + "got_raw": "TypeError) as exc_info: Check(lambda x: x, supported_types=supported_types) Check( lambda x: x, supported_types=[supported_types] ) Check( lambda x: x, supported_types=supported_types, ) Check( lambda x: x, supported_types=[supported_types], ) Check( lambda x: x, supported_types=(supported_types,), ) Check( lambda x: x, supported_types=(supported_types, supported_types), ) Check( lambda x: x, supported_types=(supported_types, supported_types, supported_types), ) Check( lambda x: x, supported_types=(supported_types, supported_types, supported", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "unionai-oss/pandera", + "expected": "same_check", + "got": "same_check", + "got_raw": "same_check # type: ignore # noqa: E711 # pylint: disable=comparison-with-itself # noqa: E711 # pylint: disable=comparison-with-itself # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "unionai-oss/pandera", + "expected": "[\"1\", \"2\", \"c\"]", + "got": "[1, 2] + [3] * 2 + [4] * 4 + [5] * 5 + [6] * 6 + [7] * 7 + [8] * 8 + [9] * 9 + [10] * 10 + [11] * 11 + [12] * 12 + [13] * 13 + [14] * 14 + [15] * 15 + [16] * 16 + [17] * 17 +", + "got_raw": "[1, 2] + [3] * 2 + [4] * 4 + [5] * 5 + [6] * 6 + [7] * 7 + [8] * 8 + [9] * 9 + [10] * 10 + [11] * 11 + [12] * 12 + [13] * 13 + [14] * 14 + [15] * 15 + [16] * 16 + [17] * 17 +", + "exact_match": false, + "code_bleu": 0.014809533936958785, + "edit_similarity": 0.06349206349206349 + }, + { + "repo": "unionai-oss/pandera", + "expected": "to_dtype.type", + "got": "to_dtype.type()", + "got_raw": "to_dtype.type() or dtype == pl.Utf8 if to_dtype == pe.Category else dtype == pl.Object if to_dtype == pe.Object else dtype == pl.Null if to_dtype == pe.Null else dtype == pl.Utf8 if to_dtype == pe.Utf8 else dtype == pl.Boolean if to_dtype == pe.Bool else dtype == pl.Date if to_dtype == pe.Date else dtype == pl.DateTime if to_dtype == pe.DateTime else dtype == pl.Time if to_dtype == pe.Time else dtype == pl.Timedelta if to_dtype == pe.Timedelta else dtype == pl.Float32 if to_dtype == pe.Float32", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.9285714285714286 + }, + { + "repo": "unionai-oss/pandera", + "expected": "pa.errors.SchemaError)", + "got": "pa.errors.SchemaError)", + "got_raw": "pa.errors.SchemaError) as exc_info: Schema.validate(invalid_data) assert str(exc_info.value) == \"col1: 0 is not greater than 100\" assert str(exc_info.value) == \"col2: -10.0 is not in the range [-10, 10]\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "unionai-oss/pandera", + "expected": "3", + "got": "3", + "got_raw": "3 df_pass[\"col1\"].sum() == 50 df_pass[\"col2\"].isin([\"foo\", \"bar\"]) df_pass[\"col3\"].all() df_pass[\"col1\"].sum() == 50 df_pass[\"col2\"].isin([\"foo\", \"bar\"]) df_pass[\"col3\"].all() df_pass[\"col1\"].sum() == 50 df_pass[\"col2\"].isin([\"foo\", \"bar\"]) df_pass[\"col3\"].all() df_pass[\"col1\"].sum() == 50 df_pass[\"col2\"].isin([\"foo\", \"bar\"]) df_pass[\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "unionai-oss/pandera", + "expected": "expected_dtype.scale", + "got": "expected_dtype.scale", + "got_raw": "expected_dtype.scale", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "unionai-oss/pandera", + "expected": "json_str)", + "got": "json_str)", + "got_raw": "json_str) result = DataFrame.from_format(json_obj, mock_config) mock_read.assert_not_called() result = DataFrame.from_format(Formats.JSON, json_obj, mock_config) mock_read.assert_called_once_with(json_obj) assert result.equals(pl.DataFrame(json_obj)) assert mock_read.call_count == 1 mock_read.reset_mock() result = DataFrame.from_format(Formats.JSON, json_str, mock_config) mock_read.assert_not_called() assert result.equals(pl.DataFrame(json_obj)) assert mock_read.call_count == 0 mock_read.reset_mock() result = DataFrame.from_format(Formats.JSON, \"invalid\", mock_config) mock_read.assert_not_called()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "unionai-oss/pandera", + "expected": "str(exc_native.data)", + "got": "str(exc_native.data)", + "got_raw": "str(exc_native.data) + \"\\n\" + str(exc_native.failure_cases) + \"\\n\" + str(exc_native.schema_errors) + \"\\n\" + str(exc_native.error_counts) + \"\\n\" + str(exc_native) + \"\\n\" + str(exc_native.failure_cases) + \"\\n\" + str(exc_native.schema_errors) + \"\\n\" + str(exc_native.error_counts) + \"\\n\" + str(exc_native) + \"\\n\" + str(exc_native) + \"\\n\" + str(exc_native) + \"\\n\" + str(exc_native) + \"\\n\" + str(exc_native) + \"\\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "unionai-oss/pandera", + "expected": "\"a\"", + "got": "\"a\"", + "got_raw": "\"a\" assert Base.b == \"b\" assert Base.c == \"_c\" assert Base.d == 123 assert Base.i1 == \"i1\" assert Base.i2 == \"i2\" assert Base._c == \"_c\" assert Base._i1 == \"_i1\" assert Base._i2 == \"_i2\" assert Base._a == \"_a\" assert Base._b == \"_b\" assert Base._c == \"_c\" assert Base._d == \"_d\" assert Base._i1 == \"_i1\" assert Base._i2 == \"_i2\" assert Base._a == \"_", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "unionai-oss/pandera", + "expected": "len(example)", + "got": "len(example)", + "got_raw": "len(example) <= max_value + 1 # type: ignore[arg-type] example = data.draw(str_length_st) assert min_value <= len(example) <= max_value + 1 # type: ignore[arg-type] example = data.draw(str_length_st) assert min_value <= len(example) <= max_value + 1 # type: ignore[arg-type] example = data.draw(str_length_st) assert min_value <= len(example) <= max_value + 1 # type: ignore[arg-type] example = data.draw(str_length_st) assert min_value <= len(example) <= max_value + 1 # type", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "unionai-oss/pandera", + "expected": "expected.type", + "got": "expected.type", + "got_raw": "expected.type == expected.type.type == expected.type.fill_value == expected.type.fill_value == expected.type.fill_value == expected.type.fill_value == expected.type.fill_value == expected.type.fill_value == expected.type.fill_value == expected.type.fill_value == expected.type.fill_value == expected.type.fill_value == expected.type.fill_value == expected.type.fill_value == expected.type.fill_value == expected.type.fill_value == expected.type.fill_value == expected.type.fill_value == expected.type.fill_value == expected.type.fill_value == expected.type.fill_value == expected.type.fill_value == expected.type.fill_value == expected.type.fill_value == expected.type.fill_value == expected.type.fill_value == expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "unionai-oss/pandera", + "expected": "expected", + "got": "expected[\"product_info\"]", + "got_raw": "expected[\"product_info\"] # noqa: E501 # type: ignore # noqa: E501 # type: ignore # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 ", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.5 + }, + { + "repo": "unionai-oss/pandera", + "expected": "pd.StringDtype()", + "got": "pd.StringDtype()", + "got_raw": "pd.StringDtype() assert_frame_equal( validated_df, pd.DataFrame( data={\"col1\": [\"category1\", \"category2\"], \"col2\": [\"foo\", \"bar\"]}, dtype=\"string\", ) ) ) def test_parser_with_coercion_and_nulls(): \"\"\"Make sure that parser is applied before coercion.\"\"\" class SchemaWithNulls(pa.DataFrameModel): col1: pd.StringDtype = pa.Field(nullable=True) col2: pd.StringDtype = pa.Field(nullable=False) @pa.dataframe_parser @classmethod def replace_empty_with_na(cls, df): return df.replace([\"\", \" \", \"nan\"],", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "unionai-oss/pandera", + "expected": "buffer)", + "got": "buffer)", + "got_raw": "buffer) buffer.seek(0) assert result == buffer.read() buffer.close() mock_writer.reset_mock() mock_config.to_format_buffer.reset_mock() mock_config.to_format_kwargs.reset_mock() mock_config.to_format.reset_mock() mock_config.to_format_buffer.return_value = None result = Table.to_format(t, mock_config) mock_writer.assert_not_called() assert result is None mock_config.to_format.assert_not_called() mock_config.to_format_kwargs.assert_not_called() mock_config.to_format_buffer.assert_not_called() mock_config.to_format.reset_mock() mock_config.to_format_buffer.reset_mock() mock_config.to_format_kwargs.reset_mock() mock_config.to_format.reset_mock", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "unionai-oss/pandera", + "expected": "ibis.__version__", + "got": "\"0.13.0\"", + "got_raw": "\"0.13.0\" if ibis_version() >= \"0.13.0\" else \"0.12.0\" if ibis_version() >= \"0.12.0\" else \"0.11.0\" if ibis_version() >= \"0.11.0\" else \"0.10.0\" if ibis_version() >= \"0.10.0\" else \"0.9.0\" if ibis_version() >= \"0.9.0\" else \"0.8.0\" if ibis_version() >= \"0", + "exact_match": false, + "code_bleu": 0.16666666666666666, + "edit_similarity": 0.08333333333333333 + }, + { + "repo": "unionai-oss/pandera", + "expected": "value", + "got": "value", + "got_raw": "value or flag == \"nullable\" # type: ignore[arg-type]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "uriyyo/fastapi-pagination", + "expected": "TypeError, match=r\"^CursorPage should be used with CursorParams$\")", + "got": "TypeError) as excinfo: paginate(CursorPage(1, 10, 100, 1000, 10000, 100000))", + "got_raw": "TypeError) as excinfo: paginate(CursorPage(1, 10, 100, 1000, 10000, 100000)) # type: ignore # noqa: E501 # noqa: E501 assert str(excinfo.value) == \"Invalid params type\" # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa:", + "exact_match": false, + "code_bleu": 0.06586656967644004, + "edit_similarity": 0.39436619718309857 + }, + { + "repo": "uriyyo/fastapi-pagination", + "expected": "int", + "got": "int", + "got_raw": "int CustomPage.model_fields[\"b\"].annotation is str CustomPage.model_fields[\"b\"].default is \"my-default\" CustomPage.model_fields[\"b\"].required is False CustomPage.model_fields[\"a\"].default is PydanticUndefined CustomPage.model_fields[\"a\"].required is True CustomPage.model_fields[\"a\"].alias is None CustomPage.model_fields[\"a\"].alias_priority is None CustomPage.model_fields[\"a\"].alias_to is None CustomPage.model_fields[\"a\"].alias_priority is None CustomPage.model_fields[\"a\"].alias_to is None CustomPage.model_fields[\"a\"].alias_priority is None CustomPage.model_fields[\"a", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "uriyyo/fastapi-pagination", + "expected": "ValueError, match=r\"^Not a 'cursor' params$\")", + "got": "TypeError, match=r\"^Expected 'limit-offset' params$\") as exc_info: CursorParams().to_raw_params().as_cursor() assert str(exc_info.value) == \"Expected 'cursor' params\"", + "got_raw": "TypeError, match=r\"^Expected 'limit-offset' params$\") as exc_info: CursorParams().to_raw_params().as_cursor() assert str(exc_info.value) == \"Expected 'cursor' params\"", + "exact_match": false, + "code_bleu": 0.11365352023191169, + "edit_similarity": 0.35071090047393366 + }, + { + "repo": "uriyyo/fastapi-pagination", + "expected": "5", + "got": "50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "uriyyo/fastapi-pagination", + "expected": "response()", + "got": "Response()", + "got_raw": "Response() # type: ignore return Page(items=[1, 2, 3]) @app.get(\"/cursor\", response_model=CursorPage[int]) async def route_cursor(req: Request, res: Response): assert res is Response() # type: ignore return CursorPage(items=[1, 2, 3]) @app.get(\"/limit-offset\", response_model=LimitOffsetPage[int]) async def route_limit_offset(req: Request, res: Response): assert res is Response() # type: ignore return LimitOffsetPage(items=[1, 2, 3])", + "exact_match": false, + "code_bleu": 0.5946035575013605, + "edit_similarity": 0.9 + }, + { + "repo": "uriyyo/fastapi-pagination", + "expected": "str", + "got": "str", + "got_raw": "str assert CustomPage.model_fields[\"b\"].default == \"my-default\" else CustomPage.model_fields[\"b\"].annotation is str assert CustomPage.model_fields[\"b\"].default == \"my-default\" else CustomPage.model_fields[\"b\"].annotation is str assert CustomPage.model_fields[\"b\"].default == \"my-default\" else CustomPage.model_fields[\"b\"].annotation is str assert CustomPage.model_fields[\"b\"].default == \"my-default\" else CustomPage.model_fields[\"b\"].annotation is str assert CustomPage.model_fields[\"b\"].default == \"my-default\" else CustomPage.model_fields[\"b\"].annotation is str assert Custom", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "uriyyo/fastapi-pagination", + "expected": "3", + "got": "3", + "got_raw": "3", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "urllib3/urllib3", + "expected": "0", + "got": "0", + "got_raw": "0\n\n def test_manager_clear_all(self) -> None:\n p = PoolManager(5)\n\n p.connection_from_url(\"http://google.com\")\n p.connection_from_url(\"http://google.com:8080\")\n p.connection_from_url(\"https://google.com\")\n p.connection_from_url(\"https://google.com:8080\")\n assert len(p.pools) == 2\n\n p.clear_all()\n\n assert len(p.pools) == 0\n\n def test_manager_clear_all_with_pool(self) -> None:\n p = PoolManager(5)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "urllib3/urllib3", + "expected": "bytes", + "got": "bytes", + "got_raw": "bytes\n\nbinary_cert = ssl_socket.getpeercert(binary_form=False)\n\nassert type(binary_cert) is dict\n\nassert binary_cert[\"subject\"] == { \"commonName\": \"www.testing.com\", } assert binary_cert[\"issuer\"] == { \"commonName\": \"www.testing.com\", } assert binary_cert[\"version\"] == 3 assert binary_cert[\"serialNumber\"] == \"0000000000000001\" assert binary_cert[\"notBefore\"] == \"Nov 16 13:00:00 2019 GMT\" assert binary_cert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "urllib3/urllib3", + "expected": "EmptyPoolError)", + "got": "BadError)", + "got_raw": "BadError) as e: http._get_conn() assert str(e.value) == \"BadError\" http._get_conn() assert str(e.value) == \"BadError\" http._get_conn() assert str(e.value) == \"BadError\" http._get_conn() assert str(e.value) == \"BadError\" http._get_conn() assert str(e.value) == \"BadError\" http._get_conn() assert str(e.value) == \"BadError\" http._get_conn() assert str(e.value) == \"BadError\" http._get_conn() assert str(e.value) == \"BadError\" http._", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5 + }, + { + "repo": "urllib3/urllib3", + "expected": "3", + "got": "4", + "got_raw": "4 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "urllib3/urllib3", + "expected": "0", + "got": "0", + "got_raw": "0\n\n def test_maxsize_1(self) -> None:\n d: Container[int, int] = Container(1)\n d[1] = 1\n\n assert len(d) == 1\n\n def test_maxsize_2(self) -> None:\n d: Container[int, int] = Container(2)\n d[1] = 1\n d[2] = 2\n\n assert len(d) == 2\n\n def test_maxsize_3(self) -> None:\n d: Container[int, int] = Container(3)\n d[", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "urllib3/urllib3", + "expected": "b\"\"", + "got": "b\"\"", + "got_raw": "b\"\" # Assert the rewind works as expected. rewind_body(body) assert body.read() == b\"test data\" assert body.read() == b\"\" # Assert the file object has been rewound rewind_body(body) assert body.read() == b\"test data\" assert body.read() == b\"\" # Assert the file object has been consumed again assert body.read() == b\"\" # Assert the file object is closed assert is_fp_closed(body) # Assert the rewind works with a file-like object that has a seek method rewind_body(body) assert body.read() == b\"test data\" assert body.read() == b\"\" # Assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "urllib3/urllib3", + "expected": "2", + "got": "2", + "got_raw": "2 * 2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "urllib3/urllib3", + "expected": "443", + "got": "443", + "got_raw": "443 if p.proxy.scheme == \"https\" else 8000 if p.proxy.scheme == \"http\" else 8080 if p.proxy.scheme == \"socks\" else 8081 if p.proxy.scheme == \"socks5\" else 8082 if p.proxy.scheme == \"socks5h\" else 8083 if p.proxy.scheme == \"http+socks\" else 8084 if p.proxy.scheme == \"http+socks5\" else 8085 if p.proxy.scheme == \"http+socks5h\" else", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "urllib3/urllib3", + "expected": "\"http://example.com/\"", + "got": "\"http://localhost:8080/\"", + "got_raw": "\"http://localhost:8080/\" + request.path_info[1:] + \"?\" + request.query_string.decode() + request.body.decode() + request.headers.get(\"host\") + request.headers.get(\"user-agent\") + request.headers.get(\"accept\") + request.headers.get(\"accept-encoding\") + request.headers.get(\"accept-language\") + request.headers.get(\"connection\") + request.headers.get(\"cookie\") + request.headers.get(\"date\") + request.headers.get(\"expect\") + request.headers.get(\"from\") + request.headers.get(\"host\") + request.headers.get(\"if-match\") + request.headers.get(\"if-modified-since", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5333333333333333 + }, + { + "repo": "urllib3/urllib3", + "expected": "80", + "got": "8080", + "got_raw": "8080 if p.proxy.scheme == \"http\" else 8081 if p.proxy.scheme == \"https\" else 0 if p.proxy.scheme == \"ftp\" else 0 if p.proxy.scheme == \"sftp\" else 0 if p.proxy.scheme == \"smtp\" else 0 if p.proxy.scheme == \"pop\" else 0 if p.proxy.scheme == \"imap\" else 0 if p.proxy.scheme == \"telnet\" else 0 if p.proxy.scheme == \"ssh\" else 0 if p.proxy.scheme == \"ws\" else 0 if p.proxy.scheme == \"wss\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "urllib3/urllib3", + "expected": "ResponseNotReady)", + "got": "ResponseNotReady)", + "got_raw": "ResponseNotReady) as e: conn.getresponse() assert str(e.value) == \"Response is already read\" conn.close()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "urllib3/urllib3", + "expected": "5", + "got": "7.00000000000000043488e-05", + "got_raw": "7.00000000000000043488e-05 * 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.07407407407407407 + }, + { + "repo": "urllib3/urllib3", + "expected": "mock.call(ciphers)", + "got": "mock.call(ciphers)", + "got_raw": "mock.call(ciphers)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "urllib3/urllib3", + "expected": "0", + "got": "0", + "got_raw": "0\n\n buffer.append(b\"foo\")\n assert len(buffer) == 3\n\n assert buffer.read() == b\"foo\"\n assert len(buffer) == 0\n\n buffer.append(b\"bar\")\n assert len(buffer) == 3\n\n assert buffer.read() == b\"bar\"\n assert len(buffer) == 0\n\n buffer.append(b\"baz\")\n assert len(buffer) == 3\n\n assert buffer.read() == b\"baz\"\n assert len(buffer) == 0\n\n buffer.append(b\"qux\")\n assert len(buffer) == 3\n\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "urllib3/urllib3", + "expected": "0", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "urllib3/urllib3", + "expected": "default_headers", + "got": "default_headers", + "got_raw": "default_headers | {\"Proxy-Connection\": \"keep-alive\"} | {\"Accept-Encoding\": \"gzip, deflate, br\"} | {\"Accept-Language\": \"en-US,en;q=0.5\"} | {\"User-Agent\": \"urllib3/1.26.1\"} | {\"Accept-Charset\": \"utf-8\"} | {\"Accept-Charset\": \"utf-8\"} | {\"Accept-Charset\": \"utf-8\"} | {\"Accept-Charset\": \"utf-8\"} | {\"Accept-Charset\": \"utf-8\"} | {\"Accept-Charset\": \"utf-8\"} | {\"Accept-Charset", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "urllib3/urllib3", + "expected": "0", + "got": "0.20000000000000003", + "got_raw": "0.20000000000000003 # 0.2s # 1st request # 0.4s # 2nd request # 0.8s # 3rd request # 1.6s # 4th request # 3.2s # 5th request # 6.4s # 6th request # 12.8s # 7th request # 25.6s # 8th request # ", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.1 + }, + { + "repo": "urllib3/urllib3", + "expected": "OSError)", + "got": "ValueError)", + "got_raw": "ValueError) as excinfo: context.wrap_socket(sock) assert str(excinfo.value) == \"Cannot use an unconnected socket\"", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.631578947368421 + }, + { + "repo": "urllib3/urllib3", + "expected": "0", + "got": "0", + "got_raw": "0 and pool.num_requests in (0, MAXSIZE) and pool.num_requests_in_queue == 0 and pool._pool_size == MAXSIZE and pool._maxsize == MAXSIZE and pool._maxsize_per_host == MAXSIZE and pool._size_max_per_host == {} and pool._queue_max_per_host == {} and pool._queue_size_per_host == {} and pool._queue_size == 0 and pool._queue_size_in_flight == 0 and pool._queue_size_in_flight_per_host == {} and pool._queue_size_in_flight_total == 0 and pool._queue_size_total == 0 and pool._queue_size", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "urllib3/urllib3", + "expected": "msg", + "got": "msg", + "got_raw": "msg", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vkbottle/vkbottle", + "expected": "expected_error", + "got": "expected_error", + "got_raw": "expected_error", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vkbottle/vkbottle", + "expected": "{ \"peer_ids\": str(message.peer_id), \"random_id\": 0, \"some_unsigned_param\": \"test\", \"r\": 1, }", + "got": "{ \"peer_ids\": str(message.peer_id), \"r\": 1, \"random_id\": 0, \"some_unsigned_param\": \"test\", } return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\"", + "got_raw": "{ \"peer_ids\": str(message.peer_id), \"r\": 1, \"random_id\": 0, \"some_unsigned_param\": \"test\", } return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\" return \"test\"", + "exact_match": false, + "code_bleu": 0.2871234550470405, + "edit_similarity": 0.3230769230769231 + }, + { + "repo": "vkbottle/vkbottle", + "expected": "msg", + "got": "None", + "got_raw": "None # we don't have full message yet # we have only short message # we have only short message # we have only short message # we have only short message # we have only short message # we have only short message # we have only short message # we have only short message # we have only short message # we have only short message # we have only short message # we have only short message # we have only short message # we have only short message # we have only short message # we have only short message # we have only short", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "vkbottle/vkbottle", + "expected": "{ \"version\": Formatter.VERSION, \"items\": [ {\"type\": \"bold\", \"offset\": 0, \"length\": 7}, {\"type\": \"italic\", \"offset\": 7, \"length\": 6}, ], }", + "got": "{ \"type\": \"bold\", \"text\": \"Hello, \", } + { \"type\": \"italic\", \"text\": \"World!\", } + { \"type\": \"text\", \"text\": \"!\", } + { \"type\": \"text\", \"text\": \"\\n\", } + { \"type\": \"text\", \"text\": \"\\n\", } + { \"type\": \"text\", \"text\": \"\\n\", } + { \"type\": \"text\", \"text\": \"\\n\", } + { \"type\": \"text\", \"text\": \"\\n\", } + { \"type\": \"text\", \"", + "got_raw": "{ \"type\": \"bold\", \"text\": \"Hello, \", } + { \"type\": \"italic\", \"text\": \"World!\", } + { \"type\": \"text\", \"text\": \"!\", } + { \"type\": \"text\", \"text\": \"\\n\", } + { \"type\": \"text\", \"text\": \"\\n\", } + { \"type\": \"text\", \"text\": \"\\n\", } + { \"type\": \"text\", \"text\": \"\\n\", } + { \"type\": \"text\", \"text\": \"\\n\", } + { \"type\": \"text\", \"", + "exact_match": false, + "code_bleu": 0.10545748101078958, + "edit_similarity": 0.2643171806167401 + }, + { + "repo": "vkbottle/vkbottle", + "expected": "1", + "got": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678", + "got_raw": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "vkbottle/vkbottle", + "expected": "False", + "got": "False", + "got_raw": "False", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vkbottle/vkbottle", + "expected": "bot.router.views[\"raw\"]", + "got": "bot.router.views[\"raw_event\"]", + "got_raw": "bot.router.views[\"raw_event\"] bot.labeler.raw_event_view.add_rule(OrRule(AndRule(NotRule(base.IsGroupEvent()), base.IsText()), base.IsCommand()), \"test\") bot.labeler.message_view.add_rule(OrRule(AndRule(NotRule(base.IsGroupEvent()), base.IsText()), base.IsCommand()), \"test\") bot.labeler.message_view.add_rule(NotRule(base.IsCommand()), \"test2\") bot.labeler.message_view.add_rule(base.IsCommand(), \"test3\") bot.labeler.message_view.add_rule(NotRule(base.IsText()), \"test4\") bot.labeler.message_view", + "exact_match": false, + "code_bleu": 0.7506238537503395, + "edit_similarity": 0.8846153846153846 + }, + { + "repo": "vkbottle/vkbottle", + "expected": "CodeError42", + "got": "CodeError42", + "got_raw": "CodeError42\n\n\ndef test_code_error_from_vkapi_error():\n vkapi_error = VKAPIError(42, \"error\")\n code_error = CodeError[42](vkapi_error)\n assert code_error.code == 42\n assert code_error.message == \"error\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vkbottle/vkbottle", + "expected": "100", + "got": "100", + "got_raw": "100\n\n return \"test\"\n\n bot.labeler.add(message_handler)\n\n\ndef test_bot_labeler_message():\n bot = Bot(token=\"token\", labeler=BotLabeler())\n set_http_callback(bot.api, lambda *args: None)\n bot.labeler.add(message_handler)\n bot.run(EXAMPLE_EVENT)\n assert bot.api.messages.send.call_args_list[0][1] == {\n \"peer_id\": 1, \"message\": \"test\", \"random_id\": 0, \"disable_mentions\": 1, \"disable_web_page_preview\":", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vkbottle/vkbottle", + "expected": "expected_exception", + "got": "expected_exception", + "got_raw": "expected_exception", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vkbottle/vkbottle", + "expected": "\"239633676097\"", + "got": "\"239633676097\"", + "got_raw": "\"239633676097\" assert e.value.captcha_img == \"https://api.vk.ru/captcha.php?\" \"sid=239633676097&s=1\" assert e.value.request_params == [ {\"key\": \"oauth\", \"value\": \"1\"}, {\"key\": \"method\", \"value\": \"captcha.force\"}, {\"key\": \"uids\", \"value\": \"66748\"}, {\"key\": \"access_token\", \"value\": \"b9b5151856dcc745d785", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vndee/llm-sandbox", + "expected": "\"0\"", + "got": "\"0\"", + "got_raw": "\"0\" # User-provided value is preserved. mock_handler.run.assert_called_once_with([\"echo\", \"Hello\"]) mock_handler.run.return_value = ConsoleOutput([\"Hello\"]) session.close() mock_client.containers.run.assert_called_once_with( mock_image.id, \"echo Hello\", environment={\"PYTHONUNBUFFERED\": \"0\"}, ) mock_client.images.get.assert_called_once_with(DefaultImage.PYTHON) mock_client.containers.create.assert_called_once_with( image=mock_image.id, command=[\"echo\", \"Hello\"], environment={\"PYTHONUNBUFFERED\": \"0\"}, ) mock_client.run.assert_not_called() mock_client.containers.run", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vndee/llm-sandbox", + "expected": "2", + "got": "1", + "got_raw": "1 # Wait for 1 second after each pod status change. mock_sleep.assert_called_with(1) mock_handler.run.assert_called_once() mock_handler.run.return_value = ConsoleOutput( \"Hello, World!\", \"This is a test session.\" ) mock_handler.run.return_value.error = False mock_handler.run.return_value.stdout = \"Hello, World!\" mock_handler.run.return_value.stderr = \"\" mock_handler.run.return_value.code = 0 mock_handler.run.return_value.exception = None mock_handler.run.return_value.exception_message = \"\" mock_handler.run.return_value.exception_traceback = \"\" mock", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "vndee/llm-sandbox", + "expected": "True", + "got": "True", + "got_raw": "True call_kwargs[\"libraries\"] == [\"numpy\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vndee/llm-sandbox", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" # No error message should be logged in this case. mock_log.error.assert_not_called() mock_log.info.assert_not_called() mock_log.warning.assert_not_called() mock_log.debug.assert_not_called() mock_log.error.assert_not_called() mock_log.exception.assert_not_called() mock_log.critical.assert_not_called() mock_log.fatal.assert_not_called() mock_log.info.assert_not_called() mock_log.warning.assert_not_called() mock_log.debug.assert_not_called() mock_log.error.assert_not_called() mock_log.exception.assert_not_called() mock_log.critical.assert_not_called()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vndee/llm-sandbox", + "expected": "True", + "got": "True", + "got_raw": "True # Default value for enable_plotting assert artifact_session._plotting_backend is None # Default value for _plotting_backend assert artifact_session._plotting_config is None # Default value for _plotting_config assert artifact_session._plotting_output is None # Default value for _plotting_output assert artifact_session._plotting_format is None # Default value for _plotting_format assert artifact_session._plotting_image_format is None # Default value for _plotting_image_format assert artifact_session._plotting_image_quality is None # Default value for _plotting_image_quality ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vndee/llm-sandbox", + "expected": "[]", + "got": "[]", + "got_raw": "[] # Empty plots list since plotting is not supported.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vndee/llm-sandbox", + "expected": "\"root\"", + "got": "\"root\"", + "got_raw": "\"root\" assert PlotLibrary.WP.value == \"wp\" assert PlotLibrary.PLOTLYJS.value == \"plotlyjs\" assert PlotLibrary.PLOTLYD3.value == \"plotlyd3\" assert PlotLibrary.PLOTLYD3JS.value == \"plotlyd3js\" assert PlotLibrary.PLOTLYD3JS2.value == \"plotlyd3js2\" assert PlotLibrary.PLOTLYD3JS3.value == \"plotlyd3js3\" assert PlotLibrary.PLOTLYD3JS4.value == \"plotlyd3js4\" assert PlotLibrary.PLOTLYD", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vndee/llm-sandbox", + "expected": "plot3", + "got": "plot3", + "got_raw": "plot3", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vndee/llm-sandbox", + "expected": "None", + "got": "None", + "got_raw": "None # Not supported in C++ assert handler.config.plot_generation is None # Not supported in C++ assert handler.config.plot_generation_command is None # Not supported in C++ assert handler.config.plot_generation_args is None # Not supported in C++ assert handler.config.plot_generation_kwargs is None # Not supported in C++ assert handler.config.plot_generation_output is None # Not supported in C++ assert handler.config.plot_generation_output_format is None # Not supported in C++ assert handler.config.plot_generation_output_path is None # Not supported in C++ assert handler.config.plot_generation_output", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vndee/llm-sandbox", + "expected": "\"docker\"", + "got": "\"docker\"", + "got_raw": "\"docker\" assert SandboxBackend.GITHUB_ACTIONS == \"github-actions\" assert SandboxBackend.VIRTUAL_ENV == \"virtual-env\" assert SandboxBackend.VIRTUAL_ENV_PYTHON == \"virtual-env-python\" assert SandboxBackend.VIRTUAL_ENV_PYTHON3 == \"virtual-env-python3\" assert SandboxBackend.VIRTUAL_ENV_PYTHON3_10 == \"virtual-env-python3.10\" assert SandboxBackend.VIRTUAL_ENV_PYTHON3_11 == \"virtual-env-python3.11\" assert SandboxBackend.VIRTUAL_ENV_PYTHON3_12 == \"virtual-env-python3.12\" assert SandboxBackend.VIRTUAL_ENV_PY", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vndee/llm-sandbox", + "expected": "True", + "got": "True", + "got_raw": "True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vndee/llm-sandbox", + "expected": "\"cpp\"", + "got": "\"cpp\"", + "got_raw": "\"cpp\" assert SupportedLanguage.R == \"r\" assert SupportedLanguage.PHP == \"php\" assert SupportedLanguage.CSHARP == \"csharp\" assert SupportedLanguage.COBOL == \"cobol\" assert SupportedLanguage.FORTRAN == \"fortran\" assert SupportedLanguage.SCALA == \"scala\" assert SupportedLanguage.RUBY == \"ruby\" assert SupportedLanguage.PHP == \"php\" assert SupportedLanguage.JAVA == \"java\" assert SupportedLanguage.JAVASCRIPT == \"javascript\" assert SupportedLanguage.CPP == \"cpp\" assert SupportedLanguage.R == \"r\" assert SupportedLanguage.PHP == \"php\" assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vndee/llm-sandbox", + "expected": "env_name", + "got": "env_name", + "got_raw": "env_name + \"_env\" if env_name != \"base\" else \"base_env\" + \"_env\" + \"_env\" + \"_env\" + \"_env\" + \"_env\" + \"_env\" + \"_env\" + \"_env\" + \"_env\" + \"_env\" + \"_env\" + \"_env\" + \"_env\" + \"_env\" + \"_env\" + \"_env\" + \"_env\" + \"_env\" + \"_env\" + \"_env\" + \"_env\" + \"_env\" + \"_env\" + \"_env\" + \"_env\" + \"_env\" + \"_env\" + \"_", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vndee/llm-sandbox", + "expected": "\"R\"", + "got": "\"R\"", + "got_raw": "\"R\" # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vndee/llm-sandbox", + "expected": "\"d3js\"", + "got": "\"d3js\"", + "got_raw": "\"d3js\" assert PlotLibrary.PLOTLYJS.value == \"plotlyjs\" assert PlotLibrary.PLOTLYJS_D3.value == \"plotlyjs_d3\" assert PlotLibrary.PLOTLYJS_D3_JS.value == \"plotlyjs_d3_js\" assert PlotLibrary.PLOTLYJS_D3_JS_MIN.value == \"plotlyjs_d3_js_min\" assert PlotLibrary.PLOTLYJS_D3_JS_MIN_MIN.value == \"plotlyjs_d3_js_min_min\" assert PlotLibrary.PLOTLYJS_D3_JS_MIN_MIN_MIN.value == \"plotlyjs_d3_js_min_min_min\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vndee/llm-sandbox", + "expected": "True", + "got": "True", + "got_raw": "True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vndee/llm-sandbox", + "expected": "\"js\"", + "got": "\"js\"", + "got_raw": "\"js\" assert handler.language_name == \"JavaScript\" assert handler.supported_file_extensions == [\"js\"] assert handler.supported_output_formats == [\"text\"] assert handler.supported_input_formats == [\"text\"] assert handler.supported_code_formats == [\"text\"] assert handler.supported_code_block_formats == [\"text\"] assert handler.supported_code_block_formats == [\"text\"] assert handler.supported_code_block_formats == [\"text\"] assert handler.supported_code_block_formats == [\"text\"] assert handler.supported_code_block_formats == [\"text\"] assert handler.supported_code_block_formats == [\"text\"] assert handler.supported_code_block_formats == [\"text\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vndee/llm-sandbox", + "expected": "0", + "got": "0", + "got_raw": "0, f\"Language {lang.value} has no examples\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vndee/llm-sandbox", + "expected": "\"java\"", + "got": "\"java\"", + "got_raw": "\"java\" handler.config.language_name == \"Java\" handler.config.language_description == \"Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible.\" handler.config.language_url == \"https://www.java.com/\" handler.config.language_logo_url == \"https://upload.wikimedia.org/wikipedia/commons/thumb/8/80/Java_logo.svg/1200px-Java_logo.svg.png\" handler.config.language_code == \"java\" handler.config.language_frameworks == [\"Spring\", \"Hibernate\", \"Struts\"] handler.config.language_frameworks", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vndee/llm-sandbox", + "expected": "2", + "got": "1", + "got_raw": "1 # Only the existing mount should be used. assert session.config.runtime_configs[\"mounts\"][0] == { \"type\": \"bind\", \"source\": \"/host\", \"target\": \"/container\", } assert session.config.runtime_configs[\"runtime\"] == {} assert session.config.runtime_configs[\"env\"] == {} assert session.config.runtime_configs[\"user\"] == \"root\" assert session.config.runtime_configs[\"workdir\"] == \"/\" assert session.config.runtime_configs[\"entrypoint\"] == [] assert session.config.runtime_configs[\"cmd\"] == [] assert session.config.runtime_configs[\"tty\"] == True assert session", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "vstorm-co/full-stack-ai-agent-template", + "expected": "60", + "got": "60.0", + "got_raw": "60.0 # 1 minute in seconds # Default value for rate limit period in seconds # Default value for rate limit period in seconds # Default value for rate limit period in seconds # Default value for rate limit period in seconds # Default value for rate limit period in seconds # Default value for rate limit period in seconds # Default value for rate limit period in seconds # Default value for rate limit period in seconds # Default value for rate limit period in seconds # Default value for rate limit period in seconds # Default value for rate limit period in seconds # Default value for rate limit", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "vstorm-co/full-stack-ai-agent-template", + "expected": "True", + "got": "True", + "got_raw": "True assert call_kwargs[1][\"output_dir\"] == str(temp_output_dir) assert call_kwargs[1][\"template\"] == str(TEMPLATE_DIR) assert call_kwargs[1][\"extra_context\"] == minimal_config.to_dict() assert result == str(temp_output_dir / \"test_project\") def test_generates_project_in_output_dir(self, minimal_config: ProjectConfig, temp_output_dir: Path) -> None: \"\"\"Test project is generated in specified output directory.\"\"\" result = generate_project(minimal_config, output_dir=temp_output_dir) assert result == str(temp_output_dir / \"test_project\") def test_generates_project_with_custom_template(self,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vstorm-co/full-stack-ai-agent-template", + "expected": "100.0", + "got": "100.0", + "got_raw": "100.0 # 100% success rate for 10 processed items \"\"\"Test success rate when all items processed.\"\"\" result = PipelineResult(processed=10, failed=0) assert result.success_rate == 100.0 # 100% success rate for 10 processed items \"\"\"Test success rate when some items failed.\"\"\" result = PipelineResult(processed=10, failed=2) assert result.success_rate == 90.0 # 90% success rate for 10 processed items \"\"\"Test success rate when some items failed.\"\"\" result = Pipeline", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vstorm-co/full-stack-ai-agent-template", + "expected": "commands[0][1]", + "got": "commands[0][1]", + "got_raw": "commands[0][1] assert \"migrate\" in commands[1][0] assert \"migrate\" in commands[2][0] assert \"migrate\" in commands[3][0] assert \"migrate\" in commands[4][0] assert \"migrate\" in commands[5][0] assert \"migrate\" in commands[6][0] assert \"migrate\" in commands[7][0] assert \"migrate\" in commands[8][0] assert \"migrate\" in commands[9][0] assert \"migrate\" in commands[10][0] assert", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vstorm-co/full-stack-ai-agent-template", + "expected": "[]", + "got": "[]", + "got_raw": "[]\n\n def test_setters(self):\n \"\"\"Test setters for processed, failed, and errors.\"\"\"\n result = PipelineResult(processed=10)\n result.failed = 3\n result.errors = [\"Error 1\", \"Error 2\"]\n\n assert result.processed == 10\n assert result.failed == 3\n assert result.errors == [\"Error 1\", \"Error 2\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vstorm-co/pydantic-deepagents", + "expected": "prompt", + "got": "prompt.strip()", + "got_raw": "prompt.strip() # Remove leading/trailing whitespace # Remove any extra spaces # Remove any newlines # Remove any tabs # Remove any carriage returns # Remove any other whitespace characters # Remove any other special characters # Remove any other punctuation # Remove any other symbols # Remove any other characters that are not letters, numbers, or spaces # Remove any other characters that are not letters, numbers, or spaces # Remove any other characters that are not letters, numbers, or spaces # Remove any other characters that are not letters, numbers, or spaces # Remove any other characters that are not", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6 + }, + { + "repo": "vstorm-co/pydantic-deepagents", + "expected": "b", + "got": "b", + "got_raw": "b \"\"\"Two OutputStyles with different fields are not equal.\"\"\" c = OutputStyle(name=\"x\", description=\"y\", content=\"w\") assert a != c \"\"\"Two OutputStyles with different names are not equal.\"\"\" d = OutputStyle(name=\"y\", description=\"y\", content=\"z\") assert a != d \"\"\"Two OutputStyles with different descriptions are not equal.\"\"\" e = OutputStyle(name=\"x\", description=\"x\", content=\"z\") assert a != e \"\"\"Two OutputStyles with different contents are not equal.\"\"\" f = OutputStyle(name=\"x\", description=\"y\", content=\"x\") assert a != f \"\"\"Two Output", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vstorm-co/pydantic-deepagents", + "expected": "None", + "got": "None", + "got_raw": "None # type: ignore[assignment] # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E50", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vstorm-co/pydantic-deepagents", + "expected": "None", + "got": "None", + "got_raw": "None and agent.eviction_processor is None # type: ignore # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vstorm-co/pydantic-deepagents", + "expected": "styles", + "got": "styles.keys()", + "got_raw": "styles.keys() assert \"beta\" in styles.keys() assert styles[\"alpha\"].name == \"alpha\" assert styles[\"alpha\"].description == \"Alpha\" assert styles[\"beta\"].name == \"beta\" assert styles[\"beta\"].description == \"Beta\" assert styles[\"beta\"].content == \"Beta content.\" assert styles[\"alpha\"].content == \"Alpha content.\" assert styles[\"alpha\"].style == \"alpha\" assert styles[\"beta\"].style == \"beta\" assert styles[\"alpha\"].style == \"alpha\" assert styles[\"alpha\"].style == \"alpha\" assert styles[\"alpha\"].style == \"alpha\" assert styles[\"alpha\"].", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.631578947368421 + }, + { + "repo": "vstorm-co/pydantic-deepagents", + "expected": "\"ok\"", + "got": "\"ok\"", + "got_raw": "\"ok\" # type: ignore # noqa: E721 # type: ignore # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa: E721 # noqa", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vstorm-co/pydantic-deepagents", + "expected": "\"\"", + "got": "\"\"", + "got_raw": "\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vstorm-co/pydantic-deepagents", + "expected": "1", + "got": "1", + "got_raw": "1 memory_toolset = memory_toolsets[0] assert memory_toolset.memory_max_lines == 50 assert memory_toolset.memory_dir == DEFAULT_MEMORY_DIR assert memory_toolset.memory_filename == DEFAULT_MEMORY_FILENAME + \"_analyst\" assert memory_toolset.memory_file is None assert memory_toolset.memory_file_path is None assert memory_toolset.memory_file_obj is None assert memory_toolset.memory_file_obj_path is None assert memory_toolset.memory_file_obj_name is None assert memory_toolset.memory_file_obj_type is None assert memory_toolset.memory_file_obj_size is None assert memory_toolset.memory_file_obj_last_modified is None assert memory_toolset", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vstorm-co/pydantic-deepagents", + "expected": "200_000", + "got": "200_000.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "200_000.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.1037037037037037 + }, + { + "repo": "vstorm-co/pydantic-deepagents", + "expected": "10", + "got": "10", + "got_raw": "10 assert processor.tail_lines == 3 def test_create_content_preview(self): \"\"\"Factory creates content preview with specified parameters.\"\"\" content = _make_large_content() preview = create_content_preview(content, 100, 3) assert len(preview) == 100 assert preview.startswith(\"line 0:\") assert preview.endswith(\"line 99:\") def test_create_content_preview_no_preview(self): \"\"\"Factory creates content preview with no preview.\"\"\" content = \"This is a test.\" preview = create_content_preview(content, 100, 3) assert preview == content def test_create_content_preview_empty(self): \"\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vstorm-co/pydantic-deepagents", + "expected": "5", + "got": "5", + "got_raw": "5 # type: ignore[call] assert await store.get(\"cp-0\") == cps[0] # type: ignore[call] assert await store.get(\"cp-1\") == cps[1] # type: ignore[call] assert await store.get(\"cp-2\") == cps[2] # type: ignore[call] assert await store.get(\"cp-3\") == cps[3] # type: ignore[call] assert await store.get(\"cp-4\") == cps[4] # type: ignore[call] assert await store.get(\"extra\") is None", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "vstorm-co/pydantic-deepagents", + "expected": "50", + "got": "50.000000000000002", + "got_raw": "50.000000000000002 # A tiny bit different due to floating-point precision. assert toolset._max_lines == 50.000000000000002 # A tiny bit different due to floating-point precision. assert toolset._max_lines == 50.000000000000002 # A tiny bit different due to floating-point precision. assert toolset._max_lines == 50.00000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2 + }, + { + "repo": "vstorm-co/pydantic-deepagents", + "expected": "5", + "got": "5", + "got_raw": "5 # Retries value should be 5 # Cost tracking should be False # (default) # Check other attributes as needed # ... # Return the agent instance # ... # Return the agent instance # ... # Return the agent instance # ... # Return the agent instance # ... # Return the agent instance # ... # Return the agent instance # ... # Return the agent instance # ... # Return the agent instance # ... # Return the agent instance # ... # Return the agent instance # ... # Return the agent instance", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wbopan/moffee", + "expected": "updated_doc", + "got": "updated_doc.split(\"\\n\")[-1]", + "got_raw": "updated_doc.split(\"\\n\")[-1] \\ or updated_doc.split(\"\\n\")[-2] \\ or updated_doc.split(\"\\n\")[-3] \\ or updated_doc.split(\"\\n\")[-4] \\ or updated_doc.split(\"\\n\")[-5] \\ or updated_doc.split(\"\\n\")[-6] \\ or updated_doc.split(\"\\n\")[-7] \\ or updated_doc.split(\"\\n\")[-8] \\ or updated_doc.split(\"\\n\")[-9] \\ or updated_doc.split(\"\\n\")[-10] \\ or updated_doc.split(\"\\n\")[-11] \\ or updated_doc.split(\"\\n", + "exact_match": false, + "code_bleu": 0.12605968092174913, + "edit_similarity": 0.5789473684210527 + }, + { + "repo": "wbopan/moffee", + "expected": "3", + "got": "2", + "got_raw": "2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "wbopan/moffee", + "expected": "output_html", + "got": "[\"js\"", + "got_raw": "[\"js\", \"css\"] + [f\"assets/{name}\" for name in [\"img\", \"fonts\"]] + [f\"assets/{name}/{name}.js\" for name in [\"img\", \"fonts\"]] + [f\"assets/{name}/{name}.css\" for name in [\"img\", \"fonts\"]] + [f\"assets/{name}/{name}.png\" for name in [\"img\", \"fonts\"]] + [f\"assets/{name}/{name}.svg\" for name in [\"img\", \"fonts\"]] + [f\"assets/{name}/{name}.woff\" for name in [\"img\", \"fonts\"]]", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.0 + }, + { + "repo": "wbopan/moffee", + "expected": "True", + "got": "True", + "got_raw": "True \\ No newline at end of file True \\ No newline at end of file True \\ No newline at end of file True \\ No newline at end of file True \\ No newline at end of file True \\ No newline at end of file True \\ No newline at end of file True \\ No newline at end of file True \\ No newline at end of file True \\ No newline at end of file True \\ No newline at end of file True \\ No newline at end of file True \\ No newline at end of file True \\ No newline at end of file True \\ No newline at end of file True \\ No newline at end of file", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wbopan/moffee", + "expected": "2", + "got": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "webis-de/small-text", + "expected": "clf.num_classes)", + "got": "clf.num_classes)", + "got_raw": "clf.num_classes) self.assertEqual(100, clf.embedding_dim) self.assertEqual(embedding_matrix, clf.embedding_matrix) self.assertEqual(10, clf.vocab_length) self.assertEqual(100, clf.kernel_size) self.assertEqual(100, clf.num_filters) self.assertEqual(100, clf.hidden_dim) self.assertEqual(100, clf.dropout) self.assertEqual(100, clf.output_dim) self.assertEqual(100, clf.batch_size) self.assertEqual(100, clf.num_epochs) self.assertEqual(100, clf.lr) self.assertEqual(100,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "webis-de/small-text", + "expected": "counts[2])", + "got": "counts[2])", + "got_raw": "counts[2]) self.assertEqual(1, counts[3]) self.assertEqual(10, np.sum(y)) self.assertEqual(70, np.sum(y[indices])) self.assertEqual(10, np.sum(y[indices] == 0)) self.assertEqual(10, np.sum(y[indices] == 1)) self.assertEqual(10, np.sum(y[indices] == 2)) self.assertEqual(70, np.sum(y[indices] == 3)) self.assertEqual(10, np.sum(y[indices] == 4)) self.assertEqual(10, np.sum(y[indices] ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "webis-de/small-text", + "expected": "loss.shape[0])", + "got": "loss.shape[0])", + "got_raw": "loss.shape[0])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "webis-de/small-text", + "expected": "y_pred.shape[0])", + "got": "len(y_pred))", + "got_raw": "len(y_pred))", + "exact_match": false, + "code_bleu": 0.2158125283826263, + "edit_similarity": 0.5 + }, + { + "repo": "webis-de/small-text", + "expected": "proba.shape[0])", + "got": "proba.shape[0])", + "got_raw": "proba.shape[0])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "webis-de/small-text", + "expected": "stop)", + "got": "stop)", + "got_raw": "stop) self.assertEqual(0, stopping_criterion.get_metric()) self.assertEqual(0, stopping_criterion.get_metric()) self.assertEqual(0, stopping_criterion.get_metric()) self.assertEqual(0, stopping_criterion.get_metric()) self.assertEqual(0, stopping_criterion.get_metric()) self.assertEqual(0, stopping_criterion.get_metric()) self.assertEqual(0, stopping_criterion.get_metric()) self.assertEqual(0, stopping_criterion.get_metric()) self.assertEqual(0, stopping_criterion.get_metric()) self.assertEqual(0, stopping_criterion.get_metric()) self.assertEqual(0, stopping_criterion.get_metric()) self.assertEqual(0,", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "webis-de/small-text", + "expected": "len(ds))", + "got": "len(ds))", + "got_raw": "len(ds))\n\n def test_dataset_getitem(self):\n ds = self._dataset(num_samples=self.NUM_SAMPLES)\n for i in range(self.NUM_SAMPLES):\n assert_array_equal(ds[i], ds.iloc[i])\n assert_array_equal(ds[i], ds.iloc[i, :])\n assert_array_equal(ds[i], ds.iloc[:, i])\n assert_array_equal(ds[i], ds.iloc[:, i, :])\n assert_array_equal(ds[i], ds.iloc[i, i])\n assert_array_equal(ds[i], ds.iloc[i, i, :])\n assert_array_equal(ds[i], ds.iloc", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "webis-de/small-text", + "expected": "output.size(0))", + "got": "output.shape[0])", + "got_raw": "output.shape[0]) self.assertEqual(num_classes, output.shape[1]) self.assertEqual(100, model.embeddings.weight.shape[1]) self.assertEqual(3, model.num_classes) self.assertEqual(2, model.embeddings.weight.shape[0]) self.assertEqual(10, model.conv1d1.out_channels) self.assertEqual(10, model.conv1d2.out_channels) self.assertEqual(10, model.conv1d3.out_channels) self.assertEqual(10, model.conv1d4.out_channels) self.assertEqual(10, model.conv1d5.out_channels) self.assertEqual(10,", + "exact_match": false, + "code_bleu": 0.2777619034011791, + "edit_similarity": 0.7096774193548387 + }, + { + "repo": "webis-de/small-text", + "expected": "model)", + "got": "model)", + "got_raw": "model) from_pretrained_mock.assert_called_once_with('sentence-transformers/all-MiniLM-L6-v2') from_pretrained_mock.return_value.to.return_value = model from_pretrained_mock.return_value.get_config().get.return_value = {'multi_target_strategy': 'one-vs-rest'} from_pretrained_mock.return_value.get_config().get.return_value = {'multi_target_strategy': 'one-vs-rest'} from_pretrained_mock.return_value.get_config().get.return_value = {'multi_target_strategy': 'one-vs-rest'} from_pretrained_mock.return_value.get_config().get.return_value = {'multi_target_strategy': 'one-vs-rest'} from_pre", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "webis-de/small-text", + "expected": "len(dataset))", + "got": "len(dataset))", + "got_raw": "len(dataset))", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "webis-de/small-text", + "expected": "proba.shape[0])", + "got": "proba.shape[0])", + "got_raw": "proba.shape[0]) self.assertEqual(self.num_classes, proba.shape[1]) self.assertEqual(1, proba.shape[2]) self.assertEqual(1, proba.shape[3]) self.assertEqual(1, proba.shape[4]) self.assertEqual(1, proba.shape[5]) self.assertEqual(1, proba.shape[6]) self.assertEqual(1, proba.shape[7]) self.assertEqual(1, proba.shape[8]) self.assertEqual(1, proba.shape[9]) self.assertEqual(1, proba.shape[10]) self.assertEqual(1, proba.shape[1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "webis-de/small-text", + "expected": "amp_args.use_amp)", + "got": "amp_args.use_amp)", + "got_raw": "amp_args.use_amp) self.assertEqual(amp_args.amp_level, \"O0\") self.assertEqual(amp_args.amp_opt_level, \"O0\") self.assertEqual(amp_args.amp_log_interval, 10) self.assertEqual(amp_args.amp_loss_scale, 0.0) self.assertEqual(amp_args.amp_grad_norm, 0.0) self.assertEqual(amp_args.amp_grad_clip, 0.0) self.assertEqual(amp_args.amp_grad_clip_norm, 0.0) self.assertEqual(amp_args.amp_grad_clip_type, \"norm\") self.assertEqual(amp_args.amp", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "webis-de/small-text", + "expected": "str(query_strategy))", + "got": "str(query_strategy))", + "got_raw": "str(query_strategy))\n\n def test_init_with_default_args(self):\n query_strategy = LabelCardinalityInconsistency()\n\n self.assertEqual('LabelCardinalityInconsistency()', str(query_strategy))\n\n def test_init_with_invalid_args(self):\n with self.assertRaises(ValueError) as context:\n LabelCardinalityInconsistency(prediction_threshold=-0.1)\n self.assertEqual(str(context.exception), \"prediction_threshold must be >= 0\")\n\n def test_init_with_invalid_args_2(self):\n with self.assertRaises(ValueError) as context:\n LabelCardinalityInconsistency(prediction_threshold=1.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "webis-de/small-text", + "expected": "model.dropout.p)", + "got": "model.dropout)", + "got_raw": "model.dropout)\n self.assertEqual(0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.4714045207910316, + "edit_similarity": 0.9333333333333333 + }, + { + "repo": "webis-de/small-text", + "expected": "y_pred_proba.shape)", + "got": "y_pred_proba.shape)", + "got_raw": "y_pred_proba.shape)\n self.assertTrue(np.all(np.isfinite(y_pred_proba)))\n self.assertTrue(np.all(np.sum(y_pred_proba, axis=1) == 1.0))\n\n y_pred = clf.predict(test_set)\n self.assertSequenceEqual((len(test_set),), y_pred.shape)\n self.assertTrue(np.all(np.isfinite(y_pred)))\n self.assertTrue(np.all(np.sum(y_pred, axis=1) == 1.0))\n\n y_pred = clf.predict(test_set, dropout_sampling=dropout_sampling)\n self.assertSequenceEqual((len(test_set),", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "webis-de/small-text", + "expected": "strategy.pbar)", + "got": "strategy.progress_bar)", + "got_raw": "strategy.progress_bar)\n self.assertEqual(0.0, strategy.progress_bar_interval)\n self.assertEqual(0.0, strategy.progress_bar_refresh)\n self.assertEqual(0.0, strategy.progress_bar_start)\n self.assertEqual(0.0, strategy.progress_bar_end)\n self.assertEqual(0.0, strategy.progress_bar_total)\n self.assertEqual(0.0, strategy.progress_bar_n)\n self.assertEqual(0.0, strategy.progress_bar_last)\n self.assertEqual(0.0, strategy.progress_bar_last_n)\n self.assertEqual(0.0, strategy.progress", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.7777777777777778 + }, + { + "repo": "webis-de/small-text", + "expected": "amp_args.use_amp)", + "got": "amp_args.enabled)", + "got_raw": "amp_args.enabled)\n self.assertEqual(amp_args.loss_scale, 0.0)\n self.assertEqual(amp_args.opt_level, \"O0\")\n self.assertEqual(amp_args.loss_scale_factor, 1.0)\n self.assertEqual(amp_args.loss_scale_window, 100)\n self.assertEqual(amp_args.max_loss_scale, 256.0)\n self.assertEqual(amp_args.min_loss_scale, 0.00001)\n self.assertEqual(amp_args.loss_scale_update_interval, 1000)\n self.assertEqual(amp_args", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.7058823529411765 + }, + { + "repo": "webis-de/small-text", + "expected": "clf.device)", + "got": "clf.device)", + "got_raw": "clf.device)\n self.assertEqual(2, clf.num_classes)\n self.assertEqual(0.0, clf.lr)\n self.assertEqual(0.0, clf.l2)\n self.assertEqual(0.0, clf.dropout)\n self.assertEqual(0.0, clf.weight_decay)\n self.assertEqual(0.0, clf.batch_size)\n self.assertEqual(0, clf.num_epochs)\n self.assertEqual(0, clf.patience)\n self.assertEqual(0, clf.min_delta)\n self.assertEqual(0, clf.verbose)\n self.assertEqual(0, clf", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "webis-de/small-text", + "expected": "len(ds.x))", + "got": "len(ds.get_features()))", + "got_raw": "len(ds.get_features()))\n self.assertEqual(self.NUM_SAMPLES, \r\nlen(ds.get_features().toarray()))\r\n\r\n self.assertEqual(self.NUM_SAMPLES, \r\nlen(ds.get_features().todense()))\r\n\r\n self.assertEqual(self.NUM_SAMPLES, \r\nlen(ds.get_features().data))\r\n self.assertEqual(self.NUM_CLASSES, \r\nlen(ds.get_features().shape[1]))\r\n\r\n self.assertEqual(self.NUM_SAMPLES, \r\nlen(ds.get_features().indices))\r\n self.assertEqual(self.NUM_SAMPLES, \r\nlen(ds.get_features().indptr))\r\n self.assertEqual(self.NUM_SAMPLES", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.5454545454545454 + }, + { + "repo": "webis-de/small-text", + "expected": "result.x)", + "got": "result.x)", + "got_raw": "result.x) self.assertEqual(len(index), len(result.y)) self.assertTrue(isinstance(result.y, list)) self.assertTrue(isinstance(result.y[0], np.ndarray)) self.assertEqual(len(index), len(result.y[0])) self.assertTrue(isinstance(result.y[0][0], int)) self.assertEqual(len(index), len(result.y[1])) self.assertTrue(isinstance(result.y[1], np.ndarray)) self.assertTrue(isinstance(result.y[1][0], int)) self.assertEqual(len(index), len(result.y[2])) self.assertTrue(isinstance(result.y[2], np.ndarray)) self.assertTrue(isinstance(result.y[2][0], int)) self.assertEqual(len(index), len", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "webisopen/OpenAgent", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "webisopen/OpenAgent", + "expected": "event_data_input_", + "got": "event_data_input_[\"address\"]", + "got_raw": "event_data_input_[\"address\"] and event_data_input_[\"address\"] == \"vitalik.eth\" and \"start\" in event_data_input_[\"start\"] and event_data_input_[\"start\"] == 0 and \"end\" in event_data_input_[\"end\"] and event_data_input_[\"end\"] == 1000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.7555555555555555 + }, + { + "repo": "webisopen/OpenAgent", + "expected": "\"TransferExecutor\"", + "got": "\"TransferExecutor\"", + "got_raw": "\"TransferExecutor\" event_data_output_ = event[\"data\"][\"output\"] assert event_data_output_[\"status\"] == \"success\" assert event_data_output_[\"message\"] == \"ETH transfer successful\" assert event_data_output_[\"txHash\"] == \"0x1234567890abcdef\" assert event_data_output_[\"from\"] == \"0x1234567890abcdef\" assert event_data_output_[\"to\"] == \"0x742d35Cc6634C0532925a3b844B", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "webisopen/OpenAgent", + "expected": "\"binance\"", + "got": "\"binance\"", + "got_raw": "\"binance\" assert event_data_input_[\"symbol\"] == \"BTC/USDT\" assert event_data_input_[\"interval\"] == \"1d\" assert event_data_input_[\"start\"] == 1672531200000 assert event_data_input_[\"end\"] == 1672617600000 assert event_data_input_[\"period\"] == \"1d\" assert event_data_input_[\"limit\"] == 100000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "webisopen/OpenAgent", + "expected": "\"ETH\"", + "got": "\"ETH\"", + "got_raw": "\"ETH\" event_data_input_[\"to_token\"] == \"USDT\" event_data_input_[\"amount\"] == \"20\" event_data_input_[\"slippage\"] == 0.001 event_data_input_[\"max_price\"] == 10000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wee-slack/wee-slack", + "expected": "\"conversations.setTopic\"", + "got": "\"topic\"", + "got_raw": "\"topic\" assert request.channel == \"#general\" assert request.text == \"new topic\" assert request.user == \"test\" assert request.user_id == \"U123\" assert request.user_name == \"test\" assert request.is_direct == False assert request.is_group == False assert request.is_im == True assert request.is_channel == True assert request.is_private == False assert request.is_mpim == False assert request.is_group_dm == False assert request.is_im_dm == False assert request.is_channel_dm == True assert request.is_channel_group == False assert request.is_channel_private == False assert request.is_channel_mpim == False assert request.is_channel", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.45161290322580644 + }, + { + "repo": "wee-slack/wee-slack", + "expected": "ts_different_major", + "got": "ts_different_major", + "got_raw": "ts_different_major\n\n\ndef test_slackts_eq():\n assert ts_base == str_base_not_padded\n\n\ndef test_slackts_lt():\n assert ts_base < ts_different_minor\n\n\ndef test_slackts_le():\n assert ts_base <= str_base_not_padded\n\n\ndef test_slackts_gt():\n assert ts_different_minor > ts_base_not_padded\n\n\ndef test_slackts_ge():\n assert ts_different_minor >= str_base_not_padded", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wee-slack/wee-slack", + "expected": "(command, 0, \"o1o2o3\", \"e1e2e3\")", + "got": "(command, 0, \"o3\", \"e3\")", + "got_raw": "(command, 0, \"o3\", \"e3\")", + "exact_match": false, + "code_bleu": 0.5555238068023582, + "edit_similarity": 0.8571428571428571 + }, + { + "repo": "wee-slack/wee-slack", + "expected": "deleted_str", + "got": "deleted_str", + "got_raw": "deleted_str in deleted_message_channel.messages[deleted_message_ts].message_json[\"text\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wee-slack/wee-slack", + "expected": "case[\"rendered\"]", + "got": "case[\"rendered\"]", + "got_raw": "case[\"rendered\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wee-slack/wee-slack", + "expected": "\"response\"", + "got": "(url", + "got_raw": "(url, options, {\"response_code\": \"200\", \"headers\": \"\", \"output\": \"response\"}) \\ + (url, options, {\"response_code\": \"200\", \"headers\": \"\", \"output\": \"response\"}) \\ + (url, options, {\"response_code\": \"200\", \"headers\": \"\", \"output\": \"response\"}) \\ + (url, options, {\"response_code\": \"200\", \"headers\": \"\", \"output\": \"response\"}) \\ + (url, options, {\"response_code\": \"200\", \"headers\": \"\", \"output\": \"response\"}) \\", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.14285714285714285 + }, + { + "repo": "wee-slack/wee-slack", + "expected": "type(encode_to_utf8(value_set))", + "got": "type(encode_to_utf8(value_set))", + "got_raw": "type(encode_to_utf8(value_set)) assert type(value_tuple) == type(encode_to_utf8(value_tuple)) assert encode_to_utf8(value_set) == encode_to_utf8(value_tuple) assert encode_to_utf8(value_set) is not value_set assert encode_to_utf8(value_tuple) is not value_tuple assert encode_to_utf8(value_set) == value_set.encode(\"utf-8\") assert encode_to_utf8(value_tuple) == value_tuple.encode(\"utf-8\") assert encode_to_utf8(value_set) != value_tuple.encode(\"utf-8\") assert encode_to_utf8(value_tuple) != value_set.encode(\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wee-slack/wee-slack", + "expected": "1", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "wee-slack/wee-slack", + "expected": "e", + "got": "e", + "got_raw": "e", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wee-slack/wee-slack", + "expected": "\"away\"", + "got": "\"away\"", + "got_raw": "\"away\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wee-slack/wee-slack", + "expected": "subteam.description", + "got": "subteam.description.strip()", + "got_raw": "subteam.description.strip() + \"\\n\" + data[\"subteam\"][\"description\"].strip() + \"\\n\" + data[\"subteam\"][\"description\"].strip() + \"\\n\" + data[\"subteam\"][\"description\"].strip() + \"\\n\" + data[\"subteam\"][\"description\"].strip() + \"\\n\" + data[\"subteam\"][\"description\"].strip() + \"\\n\" + data[\"subteam\"][\"description\"].strip() + \"\\n\" + data[\"subteam\"][\"description\"].strip() + \"\\n\" + data[\"subteam\"][\"description\"].strip() + \"\\n\" + data[\"subteam\"][\"description", + "exact_match": false, + "code_bleu": 0.345720784641941, + "edit_similarity": 0.8260869565217391 + }, + { + "repo": "wee-slack/wee-slack", + "expected": "\": my test message\"", + "got": "\"!channel: my test message\"", + "got_raw": "\"!channel: my test message\"", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.9642857142857143 + }, + { + "repo": "wee-slack/wee-slack", + "expected": "\"generally, yep!\"", + "got": "\"Hello, world!\" + thread_ts + \" (thread)\" + \"\\n\" + \"This is a test.\" + thread_ts + \" (thread)\" + \"\\n\" + \"This is a test.\" + thread_ts + \" (thread)\" + \"\\n\" + \"This is a test.\" + thread_ts + \" (thread)\" + \"\\n\" + \"This is a test.\" + thread_ts + \" (thread)\" + \"\\n\" + \"This is a test.\" + thread_ts + \" (thread)\" + \"\\n\" + \"This is a test.\" + thread_ts + \" (thread)\" +", + "got_raw": "\"Hello, world!\" + thread_ts + \" (thread)\" + \"\\n\" + \"This is a test.\" + thread_ts + \" (thread)\" + \"\\n\" + \"This is a test.\" + thread_ts + \" (thread)\" + \"\\n\" + \"This is a test.\" + thread_ts + \" (thread)\" + \"\\n\" + \"This is a test.\" + thread_ts + \" (thread)\" + \"\\n\" + \"This is a test.\" + thread_ts + \" (thread)\" + \"\\n\" + \"This is a test.\" + thread_ts + \" (thread)\" +", + "exact_match": false, + "code_bleu": 0.018695672182779195, + "edit_similarity": 0.042328042328042326 + }, + { + "repo": "wee-slack/wee-slack", + "expected": "value", + "got": "value", + "got_raw": "value", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wemake-services/wemake-python-styleguide", + "expected": "[])", + "got": "[])", + "got_raw": "[])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wemake-services/wemake-python-styleguide", + "expected": "option_values.max_awaits)", + "got": "option_values.max_awaits)", + "got_raw": "option_values.max_awaits)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wemake-services/wemake-python-styleguide", + "expected": "[])", + "got": "[])", + "got_raw": "[])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wemake-services/wemake-python-styleguide", + "expected": "[])", + "got": "[])", + "got_raw": "[])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wemake-services/wemake-python-styleguide", + "expected": "[])", + "got": "[])", + "got_raw": "[])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wemake-services/wemake-python-styleguide", + "expected": "[])", + "got": "[])", + "got_raw": "[])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wemake-services/wemake-python-styleguide", + "expected": "[])", + "got": "[])", + "got_raw": "[])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wemake-services/wemake-python-styleguide", + "expected": "[])", + "got": "[])", + "got_raw": "[])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wemake-services/wemake-python-styleguide", + "expected": "[])", + "got": "[])", + "got_raw": "[])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wemake-services/wemake-python-styleguide", + "expected": "[])", + "got": "[])", + "got_raw": "[])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wemake-services/wemake-python-styleguide", + "expected": "[])", + "got": "[])", + "got_raw": "[])\n\n\n@pytest.mark.parametrize(\n 'src',\n [\n incorrect_typevar_and_tuple,\n incorrect_default_typevar_and_tuple,\n incorrect_new_typevar_and_tuple,\n ],\n)\ndef test_type_var_used(\n assert_errors, parse_ast_tree, default_options, src, type_var_name\n):\n \"\"\"Test that WPS477 raises an error for used TypeVars.\"\"\"\n tree = parse_ast_tree(src)\n\n visitor = ConsecutiveDefaultTypeVarsVisitor(default_options, tree=tree)\n visitor.run()\n\n assert_errors(visitor, [type_var_name])\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wemake-services/wemake-python-styleguide", + "expected": "[])", + "got": "[])", + "got_raw": "[])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wemake-services/wemake-python-styleguide", + "expected": "[])", + "got": "[])", + "got_raw": "[])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wemake-services/wemake-python-styleguide", + "expected": "[])", + "got": "[])", + "got_raw": "[])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wemake-services/wemake-python-styleguide", + "expected": "[])", + "got": "[])", + "got_raw": "[])\n\n\n@pytest.mark.parametrize(\n 'code',\n [\n complex_try_except,\n complex_try_star_except,\n ],\n)\ndef test_try_except_count_custom_settings_2(\n assert_errors,\n parse_ast_tree,\n code,\n default_options,\n):\n \"\"\"Testing that incorrect patterns work.\"\"\"\n tree = parse_ast_tree(code)\n\n visitor = TryExceptVisitor(default_options, tree=tree)\n visitor.run()\n\n assert_errors(visitor, [TooManyExceptCasesViolation])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wemake-services/wemake-python-styleguide", + "expected": "[])", + "got": "[])", + "got_raw": "[])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wemake-services/wemake-python-styleguide", + "expected": "[])", + "got": "[])", + "got_raw": "[])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wemake-services/wemake-python-styleguide", + "expected": "1", + "got": "123", + "got_raw": "123 # WPS501: Invalid option value for '--max-imports' option. Must be a positive integer.", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "wemake-services/wemake-python-styleguide", + "expected": "[])", + "got": "[])", + "got_raw": "[])", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "wemake-services/wemake-python-styleguide", + "expected": "bad_name)", + "got": "bad_name)", + "got_raw": "bad_name)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "whyisdifficult/jiratui", + "expected": "expected_result", + "got": "expected_result", + "got_raw": "expected_result or 'default' # Default color if no color is specified for the status.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "whyisdifficult/jiratui", + "expected": "True", + "got": "True", + "got_raw": "True", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "whyisdifficult/jiratui", + "expected": "[ RelatedJiraIssue( id='10075', key='SCRUM-1', summary='(Sample) Payment Processing with Async', status=IssueStatus( name='In Progress', id='10001', ), issue_type=IssueType(id='10001', name='Epic', scope_project=None), link_type='is cloned by', relation_type='inward', priority=IssuePriority(id='3', name='Medium'), ), ]", + "got": "[]", + "got_raw": "[]", + "exact_match": false, + "code_bleu": 0.016988673071467442, + "edit_similarity": 0.012422360248447204 + }, + { + "repo": "whyisdifficult/jiratui", + "expected": "'Default Title'", + "got": "'Default Title'", + "got_raw": "'Default Title' # type:ignore[assignment] # Default title is used if tui_custom_title is None. def test_set_application_title_fallback_to_tui_custom_title(config_dict): \"\"\"Test _set_application_title method falls back to tui_custom_title.\"\"\" app = create_app_with_config(config_dict, tui_title=None, tui_custom_title='Custom Title') app._set_application_title() assert app.title == 'Custom Title' # type:ignore[assignment] # Custom title is used if tui_title is None. def test_set_application_title_fallback_to_config_title(config_dict", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "whyisdifficult/jiratui", + "expected": "'abd'", + "got": "'d'", + "got_raw": "'d' # noqa: E501 # type:ignore[name-defined] # noqa: F821 # type:ignore[name-defined] # noqa: F821 # type:ignore[name-defined] # noqa: F821 # type:ignore[name-defined] # noqa: F821 # type:ignore[name-defined] # noqa: F821 # type:ignore[name-defined] # noqa: F821 # type:ignore[name-defined] # noqa: F821 # type:ignore[name-defined] # noqa: F821 # type:ignore[name-defined", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.75 + }, + { + "repo": "whyisdifficult/jiratui", + "expected": "'dracula'", + "got": "'flexoki'", + "got_raw": "'flexoki' # type:ignore[attr-defined] # noqa: E501 # type:ignore[attr-defined] # noqa: E501 # type:ignore[attr-defined] # noqa: E501 # type:ignore[attr-defined] # noqa: E501 # type:ignore[attr-defined] # noqa: E501 # type:ignore[attr-defined] # noqa: E501 # type:ignore[attr-defined] # noqa: E501 # type:ignore[attr-defined] # noqa:", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "whyisdifficult/jiratui", + "expected": "'3')", + "got": "'1')", + "got_raw": "'1')", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.75 + }, + { + "repo": "whyisdifficult/jiratui", + "expected": "datetime(2025, 7, 5, 14, 34, 59)", + "got": "datetime(2025, 12, 30, 18, 0, 0) + datetime(1, 1, 1)", + "got_raw": "datetime(2025, 12, 30, 18, 0, 0) + datetime(1, 1, 1) # 1970-01-01 18:00:00 + 1 day # 1970-01-02 18:00:00 + 1 day # 1970-01-03 18:00:00 + 1 day # 1970-01-04 ", + "exact_match": false, + "code_bleu": 0.1751489536280261, + "edit_similarity": 0.5238095238095238 + }, + { + "repo": "whyisdifficult/jiratui", + "expected": "'Hello World!'", + "got": "'Hello World!'", + "got_raw": "'Hello World!' # type:ignore[attr-defined] # noqa: E501 # type:ignore[attr-defined] # noqa: E501 # type:ignore[attr-defined] # noqa: E501 # type:ignore[attr-defined] # noqa: E501 # type:ignore[attr-defined] # noqa: E501 # type:ignore[attr-defined] # noqa: E501 # type:ignore[attr-defined] # noqa: E501 # type:ignore[attr-defined] # noqa:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "whyisdifficult/jiratui", + "expected": "'project = \"P1\" and created >= \"2025-12-01\" and created <= \"2025-12-02\" and updated >= \"2025-12-03\" and updated <= \"2025-12-04\" and status = \"1\" and assignee = \"1\" and type = 2 and q=5 order by key asc'", + "got": "'project = \"P1\" and created >= \"2025-12-01\" and created <= \"2025-12-02\" and updated >= \"2025-12-03\" and updated <= \"2025-12-04\" and status = 1 and assignee = \"1\" and type = 2 and q=5 order by key asc'", + "got_raw": "'project = \"P1\" and created >= \"2025-12-01\" and created <= \"2025-12-02\" and updated >= \"2025-12-03\" and updated <= \"2025-12-04\" and status = 1 and assignee = \"1\" and type = 2 and q=5 order by key asc'", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.9900497512437811 + }, + { + "repo": "whyisdifficult/jiratui", + "expected": "'key-2'", + "got": "'key-2'", + "got_raw": "'key-2' main_screen.issue_attachments_widget.attachments = [] main_screen.issue_attachments_widget.attachments.append( FileAttachmentWidget( id='1', name='test.txt', size=100, url='https://example.com/1', )) main_screen.issue_attachments_widget.attachments.append( FileAttachmentWidget( id='2', name='test2.txt', size=200, url='https://example.com/2', )) main_screen.issue_attachments_widget.attachments.append( FileAttachmentWidget( id='3', name='test3.txt', size=300, url='https://example.com/3", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "whyisdifficult/jiratui", + "expected": "expected_exception, match='some error message')", + "got": "expected_exception) as exc_info: await client.make_request('GET', 'project/P1/statuses')", + "got_raw": "expected_exception) as exc_info: await client.make_request('GET', 'project/P1/statuses') # THEN\n\n assert str(exc_info.value) == 'some error message'", + "exact_match": false, + "code_bleu": 0.10511846841633776, + "edit_similarity": 0.45925925925925926 + }, + { + "repo": "worldcoin/open-iris", + "expected": "normalise", + "got": "normalise", + "got_raw": "normalise # Check if the alignment is normalised or not \"\"\" Test the alignment with different rotation_shift values. \"\"\" # Create simple templates base_template = IrisTemplate( iris_codes=[np.random.choice([True, False], size=(8, 32, 2))], mask_codes=[np.ones((8, 32, 2), dtype=bool)], iris_code_version=\"v2.1\", ) base_template_with_id = IrisTemplateWithId.from_template(base_template, \"image_id_0\") rotated_template = IrisTemplate( iris_codes=[np.roll(base_template.iris_codes[0], 3, axis", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "worldcoin/open-iris", + "expected": "result.pupil_array)", + "got": "result.pupil_array)", + "got_raw": "result.pupil_array)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "worldcoin/open-iris", + "expected": "metadata_1[\"occlusion90\"])", + "got": "metadata_1[\"eye_orientation\"])", + "got_raw": "metadata_1[\"eye_orientation\"])", + "exact_match": false, + "code_bleu": 0.45180100180492244, + "edit_similarity": 0.6785714285714286 + }, + { + "repo": "worldcoin/open-iris", + "expected": "result)", + "got": "result)", + "got_raw": "result)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "worldcoin/open-iris", + "expected": "result", + "got": "result", + "got_raw": "result", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "worldcoin/open-iris", + "expected": "\"v0.1\"", + "got": "expected_result.iris_code_version", + "got_raw": "expected_result.iris_code_version == \"0.1.0\" assert result.iris_version == expected_result.iris_version == \"0.1.0\" assert result.iris_build == expected_result.iris_build == \"2023-01-01\" assert result.iris_build == expected_result.iris_build == \"2023-01-01\" assert result.iris_build == expected_result.iris_build == \"2023-01-01\" assert result.iris_build == expected_result.iris_build == \"2023-01-01", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.05128205128205128 + }, + { + "repo": "worldcoin/open-iris", + "expected": "mock_metadata", + "got": "mock_metadata.metadata()", + "got_raw": "mock_metadata.metadata() if hasattr(mock_metadata, \"metadata\") else mock_metadata.metadata() if hasattr(mock_metadata, \"metadata\") else mock_metadata.metadata() if hasattr(mock_metadata, \"metadata\") else mock_metadata.metadata() if hasattr(mock_metadata, \"metadata\") else mock_metadata.metadata() if hasattr(mock_metadata, \"metadata\") else mock_metadata.metadata() if hasattr(mock_metadata, \"metadata\") else mock_metadata.metadata() if hasattr(mock_metadata, \"metadata\") else mock_metadata.metadata() if hasattr(mock_metadata, \"metadata\") else mock_metadata.metadata() if hasattr(mock_metadata, \"metadata\") else mock_metadata.metadata() if hasattr(mock_metadata, \"metadata", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.7027027027027027 + }, + { + "repo": "worldcoin/open-iris", + "expected": "np.sort(result_ys))", + "got": "np.sort(result_ys))", + "got_raw": "np.sort(result_ys))\r\n\r\n\r\n@pytest.mark.parametrize(\"center_x,center_y\", [(0.0, 0.0), (10.0, 10.0), (-3.3, 4.4)])\r\ndef test_cartesian2polar(center_x: float, center_y: float) -> None:\r\n radius = 10.0\r\n center_x, center_y = 0.0, 0.0\r\n\r\n xs = np.array([radius] * 360) + center_x\r\n ys = np.arange(0, 2 * np.pi", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "worldcoin/open-iris", + "expected": "[]", + "got": "[]", + "got_raw": "[] # No frames in this case\n\n def test_multiframe_orb_output_with_all_missing(self, mock_call_trace_all_missing): # noqa: F811 # pylint: disable=unused-argument # noqa: F811 # pylint: disable=unused-argument # noqa: F811 # pylint: disable=unused-argument # noqa: F811 # pylint: disable=unused-argument # noqa: F811 # pylint: disable=unused-argument # noqa: F811 # pylint: disable=unused", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "worldcoin/open-iris", + "expected": "ValidationError)", + "got": "ValidationError)", + "got_raw": "ValidationError) as exc_info: algorithm() = ContourPointNoiseEyeballDistanceFilter( min_distance_to_noise_and_eyeball=min_distance_to_noise_and_eyeball ) assert exc_info.value.errors() == [ { \"loc\": 0, \"msg\": \"Expected a positive float\", \"type\": \"value_error\", } ]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "worldcoin/open-iris", + "expected": "frame", + "got": "frame", + "got_raw": "frame for frame in aggregation_pipeline_output[\"individual_frames\"] for frame in aggregation_pipeline_output[\"individual_frames\"] for frame in aggregation_pipeline_output[\"individual_frames\"] for frame in aggregation_pipeline_output[\"individual_frames\"] for frame in aggregation_pipeline_output[\"individual_frames\"] for frame in aggregation_pipeline_output[\"individual_frames\"] for frame in aggregation_pipeline_output[\"individual_frames\"] for frame in aggregation_pipeline_output[\"individual_frames\"] for frame in aggregation_pipeline_output[\"individual_frames\"] for frame in aggregation_pipeline_output[\"individual_frames\"] for frame in aggregation_pipeline_output[\"individual_frames\"] for frame in aggregation_pipeline_output[\"individual_frames\"] for frame in aggregation_pipeline_output[\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "worldcoin/open-iris", + "expected": "__version__", + "got": "__version__", + "got_raw": "__version__ # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711 # type: ignore # noqa: E711", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "worldcoin/open-iris", + "expected": "6", + "got": "6", + "got_raw": "6 # 6 distances in the sample data\n\n def test_getitem_method(self, distance_matrix):\n \"\"\"Test that __getitem__ returns the correct distance value.\"\"\"\n\n assert distance_matrix[0, 1] == 0.5 # Distance between 0 and 1\n\n def test_setitem_method(self, distance_matrix):\n \"\"\"Test that __setitem__ sets the correct distance value.\"\"\"\n\n distance_matrix[0, 1] = 0.7 # Set distance between 0 and 1 to 0.7\n assert distance_matrix[0, 1]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "worldcoin/open-iris", + "expected": "plain_str", + "got": "plain_str.decode()", + "got_raw": "plain_str.decode() if isinstance(plain_str, bytes) else plain_str # type: ignore # noqa: E501 assert isinstance(decoded_str, str) assert decoded_str == plain_str.decode() if isinstance(plain_str, bytes) else plain_str # type: ignore # noqa: E501 # Test base64_encode_str with a list of strings plain_list = [\"test\", \"un:\\n - deux\\n - trois\"] encoded_list = be.base64_encode_str(plain_list) assert encoded_list == [base64_str] * len", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "worldcoin/open-iris", + "expected": "error_message", + "got": "error_message.lower()", + "got_raw": "error_message.lower() # type: ignore # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E50", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.7647058823529411 + }, + { + "repo": "worldcoin/open-iris", + "expected": "mock_model.params.ret_msg", + "got": "\"MockParametrizedModelWithCallback", + "got_raw": "\"MockParametrizedModelWithCallback executed\" + \"\\n\" + \"Callback executed\" + \"\\n\" + \"MockParametrizedModelWithCallback executed\" + \"\\n\" + \"Callback executed\" + \"\\n\" + \"MockParametrizedModelWithCallback executed\" + \"\\n\" + \"Callback executed\" + \"\\n\" + \"MockParametrizedModelWithCallback executed\" + \"\\n\" + \"Callback executed\" + \"\\n\" + \"MockParametrizedModelWithCallback executed\" + \"\\n\" + \"Callback executed\" + \"\\n\" + \"MockParametrizedModelWithCallback", + "exact_match": false, + "code_bleu": 0.18072040072196896, + "edit_similarity": 0.3050847457627119 + }, + { + "repo": "worldcoin/open-iris", + "expected": "TypeError)", + "got": "TypeError)", + "got_raw": "TypeError) as error_info: BasePipeline() assert str(error_info.value) == \"Missing 'PACKAGE_VERSION' in the pipeline configuration.\" def test_init(self): \"\"\"Test the initialization of the BasePipeline class.\"\"\" config = simple_config() pipeline = BasePipeline(config) assert pipeline.config == config def test_run(self): \"\"\"Test the run method of the BasePipeline class.\"\"\" config = simple_config() pipeline = BasePipeline(config) pipeline.run() assert pipeline.run() is None def test_run_with_error(self): \"\"\"Test the run method with an error.\"\"\" config = simple_config() pipeline = BasePipeline(config) pipeline.run = Mock(side_effect=", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "worldcoin/open-iris", + "expected": "error_dict_2 is None", + "got": "(error_dict_2 is None) or (error_dict_1 == error_dict_2) or (error_dict_2 == error_dict_1) or (error_dict_1 == error_dict_2) or (error_dict_2 == error_dict_1) or (error_dict_1 == error_dict_2) or (error_dict_2 == error_dict_1) or (error_dict_1 == error_dict_2) or (error_dict_2 == error_dict_1) or (error_dict_1 == error_dict_2) or (error_dict_2 == error_dict_1) or", + "got_raw": "(error_dict_2 is None) or (error_dict_1 == error_dict_2) or (error_dict_2 == error_dict_1) or (error_dict_1 == error_dict_2) or (error_dict_2 == error_dict_1) or (error_dict_1 == error_dict_2) or (error_dict_2 == error_dict_1) or (error_dict_1 == error_dict_2) or (error_dict_2 == error_dict_1) or (error_dict_1 == error_dict_2) or (error_dict_2 == error_dict_1) or", + "exact_match": false, + "code_bleu": 0.029319292438669403, + "edit_similarity": 0.1038961038961039 + }, + { + "repo": "worldcoin/open-iris", + "expected": "expected_index", + "got": "expected_index", + "got_raw": "expected_index", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "worldcoin/open-iris", + "expected": "result.iris_array)", + "got": "result.iris_array)", + "got_raw": "result.iris_array)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "xavctn/img2table", + "expected": "expected", + "got": "expected.replace(\"\\n\"", + "got_raw": "expected.replace(\"\\n\", \"\")[:-1] + \">\" + \"\\n\" + expected.replace(\"\\n\", \"\")[-1] + \"\\n\" + \"\" + \"\\n\" + \"\" + \"\\n\" + expected.replace(\"\\n\", \"\")[:-1] + \">\" + \"\\n\" + expected.replace(\"\\n\", \"\")[-1] + \"\\n\" + \"
\" + \"\\n\" + \"\" + \"\\n\" + expected.replace(\"\\n\", \"\")[:-1] + \">\" + \"\\n\" + expected.replace(\"\\n\", \"\")[-1] + \"\\n\" + \"
\" + \"\\n", + "exact_match": false, + "code_bleu": 0.2730120862709067, + "edit_similarity": 0.5517241379310345 + }, + { + "repo": "xavctn/img2table", + "expected": "(h_lines_expected, v_lines_expected)", + "got": "(h_lines_expected, v_lines_expected)", + "got_raw": "(h_lines_expected, v_lines_expected)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "xavctn/img2table", + "expected": "51", + "got": "1.25", + "got_raw": "1.25", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.3333333333333333 + }, + { + "repo": "xavctn/img2table", + "expected": "expected", + "got": "expected", + "got_raw": "expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "xavctn/img2table", + "expected": "expected", + "got": "expected", + "got_raw": "expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "xavctn/img2table", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as e_info: AzureOCR(subscription_key=\"a\", endpoint=\"a\")\n\n # Test init success\n ocr = AzureOCR(subscription_key=\"a\", endpoint=\"a\")\n assert ocr is not None\n\n\ndef test_azure_ocr_process(mock_azure):\n # Test process error\n with pytest.raises(TypeError) as e_info:\n AzureOCR(subscription_key=\"a\", endpoint=\"a\").process(8)\n\n with pytest.raises(TypeError) as e_info:\n AzureOCR(subscription_key=\"a\", endpoint=\"a\").process(\"a\")\n\n", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "xavctn/img2table", + "expected": "table.nb_rows + 20", + "got": "20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 +", + "got_raw": "20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + ", + "exact_match": false, + "code_bleu": 0.024650822821549748, + "edit_similarity": 0.05649717514124294 + }, + { + "repo": "xavctn/img2table", + "expected": "40", + "got": "40.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "40.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.03076923076923077 + }, + { + "repo": "xavctn/img2table", + "expected": "16", + "got": "30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "xavctn/img2table", + "expected": "EnvironmentError)", + "got": "RuntimeError)", + "got_raw": "RuntimeError) as e: TesseractOCR() assert str(e.value) == \"Tesseract not found. Please install it and set the TESSERACT_PATH environment variable.\"", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.5333333333333333 + }, + { + "repo": "xavctn/img2table", + "expected": "2", + "got": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "xavctn/img2table", + "expected": "len(ocr_df.df)", + "got": "len(ocr_df.df)", + "got_raw": "len(ocr_df.df) + 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "xavctn/img2table", + "expected": "set(expected)", + "got": "set(expected)", + "got_raw": "set(expected)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "xavctn/img2table", + "expected": "(417, 1365, 3)", + "got": "list(img_from_bytes.images)[0].shape == list(img_from_bytesio.images)[0].shape == (1000, 1000, 3)", + "got_raw": "list(img_from_bytes.images)[0].shape == list(img_from_bytesio.images)[0].shape == (1000, 1000, 3) # type: ignore\n\n\ndef test_load_image_from_url():\n img_from_url = Image(src=\"https://example.com/image.jpg\")\n assert img_from_url.src == \"https://example.com/image.jpg\" # type: ignore\n\n\ndef test_load_image_from_invalid_url():\n with pytest.raises(ValueError) as e:\n Image(src=\"invalid_url\") # type: ignore\n assert str(e.value) == \"Invalid image URL:", + "exact_match": false, + "code_bleu": 0.07541356871486662, + "edit_similarity": 0.16216216216216217 + }, + { + "repo": "xaviml/controllerx", + "expected": "expected_direction", + "got": "expected_direction", + "got_raw": "expected_direction", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "xaviml/controllerx", + "expected": "\"media_player/media_previous_track\")", + "got": "\"media_player/media_previous_track\")", + "got_raw": "\"media_player/media_previous_track\") called_service_patch.assert_called_once()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "xaviml/controllerx", + "expected": "expected)", + "got": "expected)", + "got_raw": "expected)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "xaviml/controllerx", + "expected": "expected)", + "got": "expected)", + "got_raw": "expected)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "xaviml/controllerx", + "expected": "stepper)", + "got": "direction_input)", + "got_raw": "direction_input)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.16666666666666666 + }, + { + "repo": "xaviml/controllerx", + "expected": "\"homematic.keypress\")", + "got": "\"homematic.event\")", + "got_raw": "\"homematic.event\")", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.7692307692307693 + }, + { + "repo": "xaviml/controllerx", + "expected": "expected)", + "got": "expected)", + "got_raw": "expected) else: handle_action_patch.assert_not_called()", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "xaviml/controllerx", + "expected": "args[ENTITY_ARG].get( \"attr_test\", DEFAULT_ATTR_TEST )", + "got": "args[ENTITY_ARG][\"attr_test\"] or DEFAULT_ATTR_TEST or \"\"", + "got_raw": "args[ENTITY_ARG][\"attr_test\"] or DEFAULT_ATTR_TEST or \"\" # type: ignore # noqa: E501 # pylint: disable=unsubscriptable-object # noqa: E501 # pylint: disable=unsupported-assignment-operation # noqa: E501 # pylint: disable=unsupported-assignment-operation # noqa: E501 # pylint: disable=unsupported-assignment-operation # noqa: E501 # pylint: disable=unsupported-assignment-operation # noqa: E501 # pylint: disable=unsupported-assignment-operation # noqa: E501 # pylint: disable=", + "exact_match": false, + "code_bleu": 0.3448444257953326, + "edit_similarity": 0.8363636363636363 + }, + { + "repo": "xaviml/controllerx", + "expected": "\"lutron_caseta_button_event\")", + "got": "\"lutron_event\")", + "got_raw": "\"lutron_event\")", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.6818181818181818 + }, + { + "repo": "xaviml/controllerx", + "expected": "integration_name_expected", + "got": "integration_name_expected", + "got_raw": "integration_name_expected", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "xaviml/controllerx", + "expected": "\"controller_id\")", + "got": "\"ha\")", + "got_raw": "\"ha\") as hass_listen_state_mock) as mqtt_listen_event_mock) as z2m_integration = Z2MIntegration(fake_controller, kwargs) await z2m_integration.listen_changes(\"controller_id\") hass_listen_state_mock.assert_called_once_with(\"state_changed\", \"controller_id\") mqtt_listen_event_mock.assert_not_called() z2m_integration = Z2MIntegration(fake_controller, kwargs) await z2m_integration.listen_changes(\"controller_id\", \"my_prefix\") hass_listen_state_mock.assert_not_called() mqtt_listen_event_mock.assert_called_once_with(\"my_prefix\") z2m_integration = Z2MIntegration(fake_controller, kwargs)", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.2857142857142857 + }, + { + "repo": "xaviml/controllerx", + "expected": "ValueError)", + "got": "ValueError)", + "got_raw": "ValueError) as e: sut.get_default_actions_mapping() assert str(e.value) == \"No default actions mapping found\" assert e.value.args[0] == \"No default actions mapping found\" assert e.value.args[1] == \"integration-test\" assert e.value.args[2] == \"test_controller\" assert e.value.args[3] == \"get_default_actions_mapping\" assert e.value.args[4] == \"test\" assert e.value.args[5] == \"test_controller\" assert e.value.args[6] == \"test\" assert e.value.args[7] == \"test_controller\" assert e.value.args", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "xflr6/graphviz", + "expected": "['open', 'nonfilepath'])", + "got": "['open', 'nonfilepath']) mock_popen.return_value.communicate.return_value = (b'', b'') mock_popen.return_value.wait.return_value = 0 return", + "got_raw": "['open', 'nonfilepath']) mock_popen.return_value.communicate.return_value = (b'', b'') mock_popen.return_value.wait.return_value = 0 return\n\n else: # Linux mock_popen.assert_called_once_with( ['xdg-open', 'nonfilepath']) mock_popen.return_value.communicate.return_value = (b'', b'') mock_popen.return_value.wait.return_value = 0 return", + "exact_match": false, + "code_bleu": 0.17662903260733673, + "edit_similarity": 0.294478527607362 + }, + { + "repo": "xflr6/graphviz", + "expected": "mock_err", + "got": "mock_err.decode.return_value.encode.return_value.decode.return_value", + "got_raw": "mock_err.decode.return_value.encode.return_value.decode.return_value \\ # noqa: E501\n mock_err.decode.return_value.encode.return_value.decode.return_value \\ # noqa: E501, N817, N806, N802, N803, N801, N800, N805, N804, N807, N808, N809, N810, N811, N812, N813, N814, N815, N8", + "exact_match": false, + "code_bleu": 0.09552040806823771, + "edit_similarity": 0.21052631578947367 + }, + { + "repo": "xflr6/graphviz", + "expected": "None", + "got": "None", + "got_raw": "None\n\n\ndef test_verify_parameter_none_required_true_fails():\n\n with pytest.raises(TypeError) as excinfo:\n verify_func(None, required=True)\n assert str(excinfo.value) == 'None is not a valid value' \\ ' for parameter \"foo\"'\n\n\ndef test_verify_parameter_required_true_passes():\n\n assert verify_func('foo', required=True) == 'foo'\n\n\ndef test_verify_parameter_required_false_passes():\n\n assert verify_func('foo', required=False) == 'foo'\n\n\ndef test_verify_parameter_default_none_passes():\n\n assert verify_func", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "xflr6/graphviz", + "expected": "stat_before.st_mtime", + "got": "stat_before.st_mtime", + "got_raw": "stat_before.st_mtime + 1.0000000000000004 # 1 second after the first save.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "xflr6/graphviz", + "expected": "(errno.EACCES, errno.EINVAL)", + "got": "(errno.ENOENT, errno.EACCES)", + "got_raw": "(errno.ENOENT, errno.EACCES) # noqa: E128", + "exact_match": false, + "code_bleu": 0.45499414040480374, + "edit_similarity": 0.5 + }, + { + "repo": "xflr6/graphviz", + "expected": "expected_exception, match=match)", + "got": "expected_exception) as excinfo, checker:", + "got_raw": "expected_exception) as excinfo, checker:\n graphviz.render(*args)\n if expected_exception is graphviz.RequiredArgumentError:\n assert str(excinfo.value) == match.format(*args) + '\\n' + match.format(*args[:-1]) + '\\n' + match.format(*args[:-2]) + '\\n' + match.format(*args[:-3]) + '\\n' + match.format(*args[:-4]) + '\\n' + match.format(*args[:-5]) + '\\n' + match.format(*args[:-6]) + '\\n' + match.format(*args[:-7]) +", + "exact_match": false, + "code_bleu": 0.22089591134157885, + "edit_similarity": 0.6388888888888888 + }, + { + "repo": "xflr6/graphviz", + "expected": "expected_quoted", + "got": "expected_quoted", + "got_raw": "expected_quoted + '\\n' + expected_quoted + '\\n' + expected_quoted + '\\n' + expected_quoted + '\\n' + expected_quoted + '\\n' + expected_quoted + '\\n' + expected_quoted + '\\n' + expected_quoted + '\\n' + expected_quoted + '\\n' + expected_quoted + '\\n' + expected_quoted + '\\n' + expected_quoted + '\\n' + expected_quoted + '\\n' + expected_quoted + '\\n' + expected_quoted + '\\n' + expected_quoted + '\\n' +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "xflr6/graphviz", + "expected": "('', '' if quiet else stderr)", + "got": "(_common.INVALID_CMD, stderr, stdout) if quiet else (stdout, stderr, '')", + "got_raw": "(_common.INVALID_CMD, stderr, stdout) if quiet else (stdout, stderr, '')", + "exact_match": false, + "code_bleu": 0.15774545980684188, + "edit_similarity": 0.49504950495049505 + }, + { + "repo": "xflr6/graphviz", + "expected": "'test-output\\\\hello.gv'", + "got": "SOURCE['filename']", + "got_raw": "SOURCE['filename'] + '.gv' + SOURCE['format'] + '.png' + SOURCE['format'] + '.svg' + SOURCE['format'] + '.pdf' + SOURCE['format'] + '.ps' + SOURCE['format'] + '.eps' + SOURCE['format'] + '.dot' + SOURCE['format'] + '.gv' + SOURCE['format'] + '.dot' + SOURCE['format'] + '.gv' + SOURCE['format'] + '.gv' + SOURCE['format'] + '.gv' + SOURCE['format'] + '.gv' + SOURCE['format'] + '.gv' + SOURCE['", + "exact_match": false, + "code_bleu": 0.3021375397356768, + "edit_similarity": 0.14634146341463414 + }, + { + "repo": "xflr6/graphviz", + "expected": "str(e.value)", + "got": "capsys.readouterr().err.lower()", + "got_raw": "capsys.readouterr().err.lower() + '\\n' + e.value.stdout.decode() + '\\n' + e.value.stderr.decode() + '\\n' + e.value.stderr.decode() + '\\n' + e.value.stderr.decode() + '\\n' + e.value.stderr.decode() + '\\n' + e.value.stderr.decode() + '\\n' + e.value.stderr.decode() + '\\n' + e.value.stderr.decode() + '\\n' + e.value.stderr.decode() + '\\n' + e.value.stderr.decode() + '\\n' + e.value.stderr.decode() + '\\n' + e.value.stderr.decode", + "exact_match": false, + "code_bleu": 0.1354599427337814, + "edit_similarity": 0.23255813953488372 + }, + { + "repo": "xflr6/graphviz", + "expected": "ValueError, match=r'missing')", + "got": "TypeError) as excinfo: verify_func(None)", + "got_raw": "TypeError) as excinfo: verify_func(None)\n\n assert str(excinfo.value) == 'Missing required parameter'", + "exact_match": false, + "code_bleu": 0.14113991930789777, + "edit_similarity": 0.34782608695652173 + }, + { + "repo": "xflr6/graphviz", + "expected": "OSError)", + "got": "subprocess.CalledProcessError)", + "got_raw": "subprocess.CalledProcessError) as excinfo: execute(['ls', 'notexist'])\n assert str(excinfo.value) == 'ls: notexist: No such file or directory'\n assert excinfo.value.returncode == 127\n assert excinfo.value.stdout == ''\n assert excinfo.value.stderr == ''\n\n\ndef test_run_check_oserror2():\n\n with pytest.raises(\n### Target:\nsubprocess.CalledProcessError) as excinfo: execute(['ls', 'notexist'], check=True)\n assert str(excinfo.value) == 'ls: notexist:", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.3157894736842105 + }, + { + "repo": "xflr6/graphviz", + "expected": "2", + "got": "1", + "got_raw": "1 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 #", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "xflr6/graphviz", + "expected": "_common.INVALID_CMD", + "got": "['dot'", + "got_raw": "['dot', 'png', b'nongraph'] if quiet else ['dot', 'png'] mock_sys_stderr.write.assert_called_once_with(mock_err) mock_sys_stderr.flush.assert_called_once_with() mock_out.decode.assert_not_called() mock_err.decode.assert_not_called() mock_run.assert_called_once_with(['dot', 'png', b'nongraph'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) mock_out.decode.assert_called_once_with(sentinel.encoding) mock_err.decode.assert_called_once_with(sentinel.encoding) mock_out.decode.return_value.decode.assert_called_once_with(sentinel.encoding) mock_err.decode.return_value.decode.assert_called_once_with(sentinel.encoding", + "exact_match": false, + "code_bleu": 0.30120066786994826, + "edit_similarity": 0.08 + }, + { + "repo": "xflr6/graphviz", + "expected": "formatter", + "got": "formatter", + "got_raw": "formatter + '_format' if format == 'pdf' else formatter + '_render' if format == 'ps' else formatter + '_export' if format == 'eps' else formatter + '_export' if format == 'png' else formatter + '_export' if format == 'svg' else formatter + '_export' if format == 'jpeg' else formatter + '_export' if format == 'gif' else formatter + '_export' if format == 'tiff' else formatter + '_export' if format == 'wbmp' else formatter + '_export' if format == 'pcx' else formatter + '_export'", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "yezz123/authx", + "expected": "\"TEST\"", + "got": "\"TEST\"", + "got_raw": "\"TEST\" assert payload.get(\"jti\") is not None assert payload.get(\"type\") == \"TYPE\" assert payload.get(\"iat\") is not None assert payload.get(\"exp\") is None assert payload.get(\"nbf\") is None assert payload.get(\"aud\") is None assert payload.get(\"iss\") is None assert payload.get(\"iat\") is not None assert payload.get(\"jti\") is not None assert payload.get(\"type\") is not None assert payload.get(\"exp\") is None assert payload.get(\"nbf\") is None assert payload.get(\"aud\") is None assert payload.get(\"iss\") is None assert payload", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "yezz123/authx", + "expected": "\"ERROR\"", + "got": "\"ERROR\"", + "got_raw": "\"ERROR\" caplog.text.split(\"\\n\")[0] == \"Error message\" caplog.text.split(\"\\n\")[1] == \"Traceback\" caplog.text.split(\"\\n\")[2] == \"Exception: Test exception\" caplog.text.split(\"\\n\")[3] == \"\" caplog.text.split(\"\\n\")[4] == \"\" caplog.text.split(\"\\n\")[5] == \"\" caplog.text.split(\"\\n\")[6] == \"\" caplog.text.split(\"\\n\")[7] == \"\" caplog.text.split(\"\\n\")[8] == \"\" caplog.text.split(\"\\n\")[9] == \"\" caplog.text.split", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "yezz123/authx", + "expected": "401", + "got": "401", + "got_raw": "401 # Unauthorized status code for CSRF error assert response.text == detailed_message # Detailed error message in the response body assert response.headers.get(\"content-type\") == \"text/html; charset=utf-8\" # HTML content type assert response.headers.get(\"x-content-type-options\") == \"nosniff\" # X-Content-Type-Options header assert response.headers.get(\"x-frame-options\") == \"SAMEORIGIN\" # X-Frame-Options header assert response.headers.get(\"x-xss-protection\") == \"1; mode=block\" # X-XSS-Protection", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "yezz123/authx", + "expected": "{}", + "got": "{\"extra\":", + "got_raw": "{\"extra\": \"EXTRA\"}", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.18181818181818182 + }, + { + "repo": "yezz123/authx", + "expected": "exc.AccessTokenRequiredError)", + "got": "exc.MissingTokenError)", + "got_raw": "exc.MissingTokenError) as exc_info: api.get(\"/protected\", headers={\"Authorization\": \"Bearer \" + refresh_token}) assert str(exc_info.value) == \"Missing token\" api.get(\"/protected\", headers={\"Authorization\": \"Bearer \" + api.token}) assert api.token is not None assert api.token != refresh_token api.get(\"/protected\", headers={\"Authorization\": \"Bearer \" + api.token}) assert api.token is not None assert api.token == refresh_token api.get(\"/protected\", headers={\"Authorization\": \"Bearer \" + refresh_token}) assert api.token is not None assert api.token != refresh_token api.get(\"/protected\", headers={\"", + "exact_match": false, + "code_bleu": 0.5081327481546147, + "edit_similarity": 0.6666666666666666 + }, + { + "repo": "yezz123/authx", + "expected": "{ \"message\": \"Sample Message\", \"error_type\": ValueError.__name__, }", + "got": "{\"detail\": \"Sample Message\"}", + "got_raw": "{\"detail\": \"Sample Message\"}", + "exact_match": false, + "code_bleu": 0.17010345435994292, + "edit_similarity": 0.5052631578947369 + }, + { + "repo": "yezz123/authx", + "expected": "JWTDecodeError)", + "got": "JWTDecodeError)", + "got_raw": "JWTDecodeError) as exc_info: invalid_token.verify(KEY, ALGO) assert str(exc_info.value) == \"Invalid token\" assert exc_info.value.token == invalid_token.token.decode() assert exc_info.value.csrf == invalid_token.csrf assert exc_info.value.type == invalid_token.type assert exc_info.value.location == invalid_token.location assert exc_info.value.error == \"invalid_token\" assert exc_info.value.message == \"Invalid token\" assert exc_info.value.code == 401 assert exc_info.value.status_code == 401 assert exc_info.value.detail == \"Invalid token\" assert exc_info.value.headers == {} assert exc_info.value.errors", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "yezz123/authx", + "expected": "\"access_token\"", + "got": "\"access_token\"", + "got_raw": "\"access_token\" \"uid\" \"access_token\" \"uid\" \"access_token\" \"uid\" \"access_token\" \"uid\" \"access_token\" \"uid\" \"access_token\" \"uid\" \"access_token\" \"uid\" \"access_token\" \"uid\" \"access_token\" \"uid\" \"access_token\" \"uid\" \"access_token\" \"uid\" \"access_token\" \"uid\" \"access_token\" \"uid\" \"access_token\" \"uid\" \"access_token\" \"uid\" \"access_token\" \"uid\" \"access_token\" \"uid\" \"access_token\" \"uid\" \"access", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "yezz123/authx", + "expected": "{\"message\": \"post\"}", + "got": "{\"message\": \"post\"} mock_get_token.assert_not_called()", + "got_raw": "{\"message\": \"post\"} mock_get_token.assert_not_called()", + "exact_match": false, + "code_bleu": 0.4617366309441026, + "edit_similarity": 0.5205479452054794 + }, + { + "repo": "yezz123/authx", + "expected": "False", + "got": "True", + "got_raw": "True # noqa: E712 # noqa: E501 # noqa: E712 # noqa: E501 # noqa: E712 # noqa: E501 # noqa: E712 # noqa: E501 # noqa: E712 # noqa: E501 # noqa: E712 # noqa: E501 # noqa: E712 # noqa: E501 # noqa: E712 # noqa: E501 # noqa: E712 # noqa: E501 #", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "yezz123/authx", + "expected": "valid_payload.sub", + "got": "\"BOOOM\"", + "got_raw": "\"BOOOM\" assert payload.csrf == \"CSRF_TOKEN\" assert payload.type == \"access\" assert payload.fresh is True assert payload.scopes == [\"read\", \"write\"] assert payload.exp == datetime.timedelta(minutes=20) assert payload.nbf == datetime.datetime(2000, 1, 1, 12, 0, tzinfo=datetime.timezone.utc) assert payload.iat == datetime.datetime(2000, 1, 1, 12, 0, tzinfo=datetime.timezone.utc).timestamp() assert payload.jti == \"unique-identifier\" assert payload.type ==", + "exact_match": false, + "code_bleu": 0.16666666666666666, + "edit_similarity": 0.0 + }, + { + "repo": "yezz123/authx", + "expected": "\"access\"", + "got": "\"access\"", + "got_raw": "\"access\" token = authx.create_access_token(uid=\"blablah\", fresh=False) assert isinstance(token, str) payload = authx._decode_token(token, verify=False) assert not payload.fresh assert payload.sub == \"blablah\" assert payload.type == \"access\" token = authx.create_access_token(uid=\"blablah\", fresh=False, exp=10) payload = authx._decode_token(token, verify=False) assert payload.exp == 10 token = authx.create_access_token(uid=\"blablah\", fresh=False, exp=10, iat=10) payload = auth", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zappa/Zappa", + "expected": "\"y\")", + "got": "\"y\")", + "got_raw": "\"y\") self.assertEqual(merged[\"z\"], \"q\") self.assertEqual(merged[\"multiValueHeaders\"], event[\"multiValueHeaders\"]) self.assertEqual(merged[\"multiValueHeaders\"][\"a\"], [\"c\"]) self.assertEqual(merged[\"multiValueHeaders\"][\"x\"], [\"y\"]) self.assertEqual(merged[\"multiValueHeaders\"][\"z\"], [\"q\"]) self.assertEqual(merged[\"multiValueHeaders\"][\"multiValueHeaders\"], None) self.assertEqual(merged[\"multiValueHeaders\"][\"multiValueHeaders\"], None) self.assertEqual(merged[\"multiValueHeaders\"][\"multiValueHeaders\"], None) self.assertEqual(merged[\"multiValueHeaders\"][\"multiValueHeaders\"],", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zappa/Zappa", + "expected": "url)", + "got": "url)", + "got_raw": "url) # No API found, so return None \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\" \"\"\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zappa/Zappa", + "expected": "200)", + "got": "200)", + "got_raw": "200) self.assertEqual(response[\"isBase64Encoded\"], False) self.assertEqual(response[\"headers\"], {}) self.assertEqual(response[\"body\"], \"Success\") self.assertEqual(response[\"url\"], \"http://1234567890.execute-api.us-east-1.amazonaws.com/return/request/url\") self.assertEqual(response[\"script_name\"], \"\") self.assertEqual(response[\"server_name\"], \"1234567890.execute-api.us-east-1.amazonaws.com\") self.assertEqual(response[\"server_port\"], \"80\") self.assertEqual(response[\"server_protocol\"], \"HTTP/1.1\") self.assertEqual(response[\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zappa/Zappa", + "expected": "3)", + "got": "3)", + "got_raw": "3) self.assertEqual( settings[\"dev\"][\"cors_allow_headers\"][0], \"Content-Type\" ) self.assertEqual( settings[\"dev\"][\"cors_allow_headers\"][1], \"X-API-Key\" ) self.assertEqual( settings[\"dev\"][\"cors_allow_headers\"][2], \"Authorization\" ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zappa/Zappa", + "expected": "\"q\")", + "got": "\"q\")", + "got_raw": "\"q\") self.assertEqual(merged[\"multiValueHeaders\"], event[\"multiValueHeaders\"]) self.assertEqual(merged[\"multiValueHeaders\"][\"a\"], [\"c\"]) self.assertEqual(merged[\"multiValueHeaders\"][\"x\"], [\"y\"]) self.assertEqual(merged[\"multiValueHeaders\"][\"z\"], [\"q\"]) self.assertEqual(merged[\"multiValueHeaders\"][\"multiValueHeaders\"], None) self.assertEqual(merged[\"multiValueHeaders\"][\"multiValueHeaders\"], None) self.assertEqual(merged[\"multiValueHeaders\"][\"multiValueHeaders\"], None) self.assertEqual(merged[\"multiValueHeaders\"][\"multiValueHeaders\"], None) self.assertEqual(merged[\"multiValueHeaders", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zappa/Zappa", + "expected": "\"async_me\")", + "got": "\"async_me\")", + "got_raw": "\"async_me\")", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zeenolife/ai-baby-monitor", + "expected": "mock_capture", + "got": "mock_capture", + "got_raw": "mock_capture # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa: E721 # type: ignore # noqa:", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zeenolife/ai-baby-monitor", + "expected": "approximate", + "got": "approximate", + "got_raw": "approximate # type: ignore # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zeenolife/ai-baby-monitor", + "expected": "1280", + "got": "1280", + "got_raw": "1280 assert config.frame_height == 720 assert config.subsampled_stream_maxlen == 100 assert config.subsample_rate == 8", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zeenolife/ai-baby-monitor", + "expected": "expected_logs_final_order", + "got": "expected_logs_final_order[::-1]", + "got_raw": "expected_logs_final_order[::-1] # Reverse the order to match the expected output.", + "exact_match": false, + "code_bleu": 0.18575057999133598, + "edit_similarity": 0.8928571428571429 + }, + { + "repo": "zeenolife/ai-baby-monitor", + "expected": "[]", + "got": "\"\"", + "got_raw": "\"\" # default", + "exact_match": false, + "code_bleu": 0.25, + "edit_similarity": 0.0 + }, + { + "repo": "zerodha/pykiteconnect", + "expected": "kiteconnect.VARIETY_CO", + "got": "kiteconnect.VARIETY_CO", + "got_raw": "kiteconnect.VARIETY_CO assert order[-1][\"order_type\"] == kiteconnect.ORDER_TYPE_MARKET assert order[-1][\"trigger_price\"] is True assert order[-1][\"price\"] is None assert order[-1][\"tag\"] == \"itest\" assert order[-1][\"order_id\"] == order_id assert order[-1][\"parent_order_id\"] is None assert order[-1][\"status\"] == \"PENDING\" assert order[-1][\"filled_quantity\"] == 0 assert order[-1][\"disclosed_quantity\"] == 0 assert order[-1][\"trigger_status\"] == \"TRIGGER_NOT_SET\" assert order[-1", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zerodha/pykiteconnect", + "expected": "getattr(ex, error_type, ex.GeneralException))", + "got": "ex.NativeException) as e: kiteconnect.positions() assert str(e.value) == message assert e.value.error_type == error_type assert e.value.message == message", + "got_raw": "ex.NativeException) as e: kiteconnect.positions() assert str(e.value) == message assert e.value.error_type == error_type assert e.value.message == message", + "exact_match": false, + "code_bleu": 0.04899017558375205, + "edit_similarity": 0.24120603015075376 + }, + { + "repo": "zerodha/pykiteconnect", + "expected": "status", + "got": "status", + "got_raw": "status or \"REJECTED\" in status or \"REJECTED\" in status or \"REJECTED\" in status or \"REJECTED\" in status or \"REJECTED\" in status or \"REJECTED\" in status or \"REJECTED\" in status or \"REJECTED\" in status or \"REJECTED\" in status or \"REJECTED\" in status or \"REJECTED\" in status or \"REJECTED\" in status or \"REJECTED\" in status or \"REJECTED\" in status or \"REJECTED\" in status or \"REJECTED\" in status or \"REJECTED\" in status or \"REJECTED\" in status or", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zerodha/pykiteconnect", + "expected": "20", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015384615384615385 + }, + { + "repo": "zerodha/pykiteconnect", + "expected": "dict", + "got": "dict", + "got_raw": "dict and len(commodity) > 0 and all( type(x) == str and type(y) == float for x, y in commodity.items() ) and all( y >= 0 for _, y in commodity.items() ) and all( y <= 100 for _, y in commodity.items() ) and all( y >= 0 for _, y in commodity.items() ) and all( y <= 100 for _, y in commodity.items() ) and all( y >= 0 for _, y in commodity.items() ) and all( y <= 100 for _, y in commodity.items() )", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zhongyu09/openchatbi", + "expected": "1", + "got": "1", + "got_raw": "1 # Only one tool call is recovered. assert result[0].content == \"data\" assert result[0].tool_calls == [] assert result[0].id == \"call_1\" assert result[0].type == \"tool\" assert result[0].function == \"search\" assert result[0].args == {} assert result[0].kwargs == {} assert result[0].metadata == {} assert result[0].status == \"success\" assert result[0].error == \"\" assert result[0].output == \"\" assert result[0].", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zhongyu09/openchatbi", + "expected": "\"Sales by Region\"", + "got": "\"Sales by Region\" fig.layout.xaxis.title.text == \"Region\" fig.layout.yaxis.title.text == \"Sales\" fig.layout.barmode == \"stack\" fig.layout.legend.title.text == \"Sales\" fig.layout.legend.items = [go.layout.legend.Item(text=\"North\"", + "got_raw": "\"Sales by Region\" fig.layout.xaxis.title.text == \"Region\" fig.layout.yaxis.title.text == \"Sales\" fig.layout.barmode == \"stack\" fig.layout.legend.title.text == \"Sales\" fig.layout.legend.items = [go.layout.legend.Item(text=\"North\", visible=True), go.layout.legend.Item(text=\"South\", visible=True), go.layout.legend.Item(text=\"East\", visible=True)] fig.layout.legend.items[0].x = 0.1 fig.layout.legend.items[0].y = 0.5 fig.layout.legend.items[1].x = 0.4 fig.layout.legend.items[1].y", + "exact_match": false, + "code_bleu": 0.018440090366831044, + "edit_similarity": 0.13877551020408163 + }, + { + "repo": "zhongyu09/openchatbi", + "expected": "mock_instance1", + "got": "mock_instance1", + "got_raw": "mock_instance1 # type: ignore assert config.embedding_model == mock_embedding_instance assert config.text2sql_llm == mock_instance2 assert config.data_warehouse_config.uri == \"sqlite:///:memory:\" assert config.data_warehouse_config.include_tables is None assert config.data_warehouse_config.database_name == \"test_db\" assert config.organization == \"TestOrg\" assert config.llm_configs == [mock_instance1, mock_instance2] assert config.embedding_configs == [mock_embedding_instance] assert config.text2sql_llm_configs == [mock_instance2] assert config.data_warehouse_configs ==", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zhongyu09/openchatbi", + "expected": "\"llm_node\"", + "got": "\"llm_node\"", + "got_raw": "\"llm_node\" # Continue to the next node after recovery \"\"\"Test that the llm_node handles recovery correctly and continues processing.\"\"\" # Create a mock llm_node function for testing mock_llm = Mock() mock_tools = [] llm_node_func = agent_llm_call(mock_llm, mock_tools) # State with incomplete tool calls messages = [ HumanMessage(content=\"Search for data\"), AIMessage( content=\"I'll search for that data.\", tool_calls=[ {\"name\": \"search\", \"args\": {\"query\": \"data\"}, \"id\": \"call_1\"}, ], ), ] state = AgentState(messages=", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zhongyu09/openchatbi", + "expected": "\"English\"", + "got": "\"English\"", + "got_raw": "\"English\" assert profile.timezone == \"UTC\" assert profile.jargon == \"Technical\" assert profile._jargon == \"Technical\" assert profile._timezone == \"UTC\" assert profile._name == \"John Doe\" assert profile._language == \"English\" assert profile._jargon == \"Technical\" assert profile._timezone == \"UTC\" assert profile._name == \"John Doe\" assert profile._language == \"English\" assert profile._jargon == \"Technical\" assert profile._timezone == \"UTC\" assert profile._name == \"John Doe\" assert profile._language == \"English\" assert profile._jargon == \"Technical", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zhongyu09/openchatbi", + "expected": "False", + "got": "True", + "got_raw": "True # Nested object should be allowed to have additional properties. assert schema[\"properties\"][\"nested\"][\"properties\"][\"inner\"][\"type\"] == \"string\" # Inner property should be of type string. assert schema[\"properties\"][\"nested\"][\"properties\"][\"inner\"][\"title\"] == \"inner\" # Inner property should have a title. assert schema[\"properties\"][\"nested\"][\"properties\"][\"inner\"][\"description\"] == \"\" # Inner property should have an empty description. assert schema[\"properties\"][\"nested\"][\"properties\"][\"inner\"][\"format\"] == \"\" # Inner property should have an empty format. assert schema[\"properties\"][\"nested\"][\"properties\"][\"inner\"][\"enum", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.2222222222222222 + }, + { + "repo": "zhongyu09/openchatbi", + "expected": "result", + "got": "result[\"tables\"]", + "got_raw": "result[\"tables\"] and len(result[\"tables\"]) == 1 and result[\"tables\"][0][\"table\"] == \"users\" and result[\"tables\"][0][\"reason\"] == \"Contains user data\" and result[\"tables\"][0][\"columns\"] == [\"user_id\", \"name\", \"email\"] and result[\"tables\"][0][\"category\"] == \"user\" and result[\"tables\"][0][\"description\"] == \"User data table\" and result[\"tables\"][0][\"selection_rule\"] == \"Use for user-related queries\" and result[\"tables\"][0][\"example\"] == [] and result[\"tables\"][0][\"example_dict\"]", + "exact_match": false, + "code_bleu": 0.35930411196308426, + "edit_similarity": 0.5454545454545454 + }, + { + "repo": "zhongyu09/openchatbi", + "expected": "True)", + "got": "\"columns\")", + "got_raw": "\"columns\")", + "exact_match": false, + "code_bleu": 0.537284965911771, + "edit_similarity": 0.26666666666666666 + }, + { + "repo": "zhongyu09/openchatbi", + "expected": "ValidationError)", + "got": "ValidationError)", + "got_raw": "ValidationError) as e_info: AskHuman(ask=\"What is the capital of France?\") AskHuman(ask=\"What is the capital of France?\") AskHuman(ask=\"What is the capital of France?\") AskHuman(ask=\"What is the capital of France?\") AskHuman(ask=\"What is the capital of France?\") AskHuman(ask=\"What is the capital of France?\") AskHuman(ask=\"What is the capital of France?\") AskHuman(ask=\"What is the capital of France?\") AskHuman(ask=\"What is the capital of France?\") AskHuman(ask=\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zhongyu09/openchatbi", + "expected": "2", + "got": "2", + "got_raw": "2 # 2 calls to create wrapper for each tool type \"\"\" Test getting memory tools with a custom LLM (does not require structured tool wrapper). \"\"\" mock_llm = Mock(spec=FakeListChatModel) memory_tools = get_memory_tools(mock_llm) assert len(memory_tools) == 0 \"\"\" Test getting memory tools with a custom LLM (does not require structured tool wrapper). \"\"\" mock_llm = Mock(spec=FakeListChatModel) memory_tools = get_memory_tools(mock_llm) assert len(memory_tools) == 0 \"\"\" Test getting memory tools with a custom LLM (does not require structured tool wrapper", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zhongyu09/openchatbi", + "expected": "[\"test\"]", + "got": "[\"test\"]", + "got_raw": "[\"test\"]", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zhongyu09/openchatbi", + "expected": "20", + "got": "50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015384615384615385 + }, + { + "repo": "zhongyu09/openchatbi", + "expected": "description.lower()", + "got": "description.lower()", + "got_raw": "description.lower() and \"sales\" in description.lower() and \"month\" in description.lower() and \"Jan\" in description.lower() and \"Feb\" in description.lower() and \"North\" in description.lower() and \"South\" in description.lower() and \"East\" in description.lower() and \"Widget A\" in description.lower() and \"Widget B\" in description.lower() and \"Widget C\" in description.lower() and \"Sales\" in description.lower() and \"Sales Over Time\" in description.lower() and \"Sales by Region\" in description.lower() and \"Sales Distribution by Product\" in description.lower() and \"Widget", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zhongyu09/openchatbi", + "expected": "{}", + "got": "\"\"\"\"Show", + "got_raw": "\"\"\"\"Show user information\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"", + "exact_match": false, + "code_bleu": 0.37991784282579627, + "edit_similarity": 0.0 + }, + { + "repo": "zhongyu09/openchatbi", + "expected": "\"call_2\"", + "got": "\"call_2\"", + "got_raw": "\"call_2\" # The ID should match the original call ID for call_2", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zhongyu09/openchatbi", + "expected": "ids", + "got": "ids", + "got_raw": "ids + [None] * (len(sample_texts) - len(ids)) + [None] * (len(sample_texts) - len(ids)) + [None] * (len(sample_texts) - len(ids)) + [None] * (len(sample_texts) - len(ids)) + [None] * (len(sample_texts) - len(ids)) + [None] * (len(sample_texts) - len(ids)) + [None] * (len(sample_texts) - len(ids)) + [None] * (len(sample_texts) - len(ids)) + [None] * (len(sample_texts) - len(ids)) +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zhongyu09/openchatbi", + "expected": "1", + "got": "1", + "got_raw": "1 and original_state[\"sql\"] == \"SELECT 1;\" and original_state[\"agent_next_node\"] == \"original_node\" and original_state[\"final_answer\"] == \"Original answer\" and len(original_state[\"input\"]) == 0 and len(original_state[\"output\"]) == 0 and len(original_state[\"tools\"]) == 0 and len(original_state[\"tool_results\"]) == 0 and len(original_state[\"tool_calls\"]) == 0 and len(original_state[\"tool_outputs\"]) == 0 and len(original_state[\"tool_errors\"]) == 0 and len(original_state[\"tool_warnings\"]) == 0 and len(original_state[\"", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zhongyu09/openchatbi", + "expected": "True", + "got": "True", + "got_raw": "True # Default value for show_legend is True # Default value for show_legend is True # Default value for show_legend is True # Default value for show_legend is True # Default value for show_legend is True # Default value for show_legend is True # Default value for show_legend is True # Default value for show_legend is True # Default value for show_legend is True # Default value for show_legend is True # Default value for show_legend is True # Default value for show_legend is True # Default value for show_legend is True # Default value for show_legend is True ", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zhongyu09/openchatbi", + "expected": "TypeError)", + "got": "TypeError)", + "got_raw": "TypeError) as excinfo: CatalogStore() # noqa: E501 excinfo.value should be a TypeError with a message indicating that CatalogStore cannot be instantiated directly.", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zwicker-group/py-pde", + "expected": "2", + "got": "2", + "got_raw": "2 * g.num_cells[0] + 1 - 2 * g.num_ghosts[0] - 1 + 1 - 1 + 1 - 1 + 1 - 1 + 1 - 1 + 1 - 1 + 1 - 1 + 1 - 1 + 1 - 1 + 1 - 1 + 1 - 1 + 1 - 1 + 1 - 1 + 1 - 1 + 1 - 1 + 1 - 1 + 1 - 1 + 1 - 1 +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zwicker-group/py-pde", + "expected": "s2.data)", + "got": "s2.data)", + "got_raw": "s2.data)", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zwicker-group/py-pde", + "expected": "0", + "got": "0.000000000000000122070312500000012207031250000001220703125000000122070312500000012207031250000001220703125000000122070312500000", + "got_raw": "0.000000000000000122070312500000012207031250000001220703125000000122070312500000012207031250000001220703125000000122070312500000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "zwicker-group/py-pde", + "expected": "2", + "got": "1", + "got_raw": "1 grid.num_cells == 8 grid.num_boundaries == 2 grid.boundaries == (NeumannBC(0), NeumannBC(0)) grid.boundary_values == (0, 0) grid.boundary_layers == (0, 0) grid.boundary_points == (0, 0) grid.boundary_widths == (0, 0) grid.boundary_centers == (0, 0) grid.boundary_radii == (0, 0) grid.boundary_angles == (0, 0) grid.boundary_angles_inner == (0, 0) grid.boundary_angles_outer", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "zwicker-group/py-pde", + "expected": "3", + "got": "2", + "got_raw": "2 if periodic else 1 if r_inner == 0 else 3 if r_inner == 2 else 4 if r_inner == 1 else 5 if r_inner == 3 else 6 if r_inner == 4 else 7 if r_inner == 5 else 8 if r_inner == 6 else 9 if r_inner == 7 else 10 if r_inner == 8 else 11 if r_inner == 9 else 12 if r_inner == 10 else 13 if r_inner == 11 else 14 if r_inner == 12", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "zwicker-group/py-pde", + "expected": "[1, 3, 2])", + "got": "[1, 3, -6]) grad = v.gradient(bc=\"derivative\", backend=\"numba\") np.testing.assert_allclose(grad.data[0, :], [1, 2, 4]) grad = v.gradient(bc=\"value\", backend=\"numba\") np.testing.assert_allclose(grad.data[0, :], [0, 0, 0]) grad = v.gradient(bc=\"derivative\", backend=\"numpy\") np.testing.assert_allclose(grad.data[0, :], [1, 2, 4]) grad = v.gradient(bc=\"value\", backend=\"numpy\") np.testing.assert_allclose(grad.data", + "got_raw": "[1, 3, -6]) grad = v.gradient(bc=\"derivative\", backend=\"numba\") np.testing.assert_allclose(grad.data[0, :], [1, 2, 4]) grad = v.gradient(bc=\"value\", backend=\"numba\") np.testing.assert_allclose(grad.data[0, :], [0, 0, 0]) grad = v.gradient(bc=\"derivative\", backend=\"numpy\") np.testing.assert_allclose(grad.data[0, :], [1, 2, 4]) grad = v.gradient(bc=\"value\", backend=\"numpy\") np.testing.assert_allclose(grad.data", + "exact_match": false, + "code_bleu": 0.03679840138378093, + "edit_similarity": 0.04275534441805225 + }, + { + "repo": "zwicker-group/py-pde", + "expected": "1", + "got": "1.0", + "got_raw": "1.0 # no guard => always True assert peg(\"1 > 0\") == 1.0 > 0.0 # guard => True if 1 > 0 else 0.0 assert peg(\"1 < 0\") == 1.0 < 0.0 # guard => False if 1 < 0 else 0.0 assert peg(\"1 < 0\", guard=False) == 0.0 # guard => True if 1 < 0 else 1.0 assert peg(\"1 < 0\", guard=True) == 1", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "zwicker-group/py-pde", + "expected": "b2", + "got": "b2", + "got_raw": "b2", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zwicker-group/py-pde", + "expected": "c.to_dict()", + "got": "c._config._config[\"backend\"]._config[\"numba\"]._config[\"multithreading\"]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config", + "got_raw": "c._config._config[\"backend\"]._config[\"numba\"]._config[\"multithreading\"]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config[0]._config", + "exact_match": false, + "code_bleu": 0.012571467411651938, + "edit_similarity": 0.037383177570093455 + }, + { + "repo": "zwicker-group/py-pde", + "expected": "c2", + "got": "c2", + "got_raw": "c2 # pylint: disable=comparison-with-itself # noqa: E711 # pylint: disable=comparison-with-itself # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 # noqa: E711 #", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zwicker-group/py-pde", + "expected": "4", + "got": "1.0", + "got_raw": "1.0 / 4.0 if periodic else 1.0 / 3.0 if grid.num_cells == 3 else 1.0 / 2.0 if grid.num_cells == 2 else 1.0 / 1.0 if grid.num_cells == 1 else 1.0 / 0.0 if grid.num_cells == 0 else 0.0 / 1.0 if grid.num_cells == 1 else 0.0 / 2.0 if grid.num_cells == 2 else 0.0 / 3.0 if grid.num_cells == ", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "zwicker-group/py-pde", + "expected": "2", + "got": "2", + "got_raw": "2 * grid.num_cells + 1 * grid.num_faces + 2 * grid.num_edges + 1 * grid.num_vertices + 1 * grid.num_boundaries + 1 * grid.num_domains + 1 * grid.num_cells + 1 * grid.num_faces + 1 * grid.num_edges + 1 * grid.num_vertices + 1 * grid.num_boundaries + 1 * grid.num_domains + 1 * grid.num_cells + 1 * grid.num_faces + 1 * grid.num_edges + 1 * grid.num_vertices + 1 * grid.num_boundaries + 1 * grid.num_domains +", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zwicker-group/py-pde", + "expected": "errs", + "got": "[]", + "got_raw": "[] # no output from the script itself # TODO: Add output from the script itself # TODO: Add error from the script itself # TODO: Add error from the script itself # TODO: Add error from the script itself # TODO: Add error from the script itself # TODO: Add error from the script itself # TODO: Add error from the script itself # TODO: Add error from the script itself # TODO: Add error from the script itself # TODO: Add error from the script itself # TODO: Add error from the script itself # TODO: Add error from the script", + "exact_match": false, + "code_bleu": 0.4518010018049224, + "edit_similarity": 0.0 + }, + { + "repo": "zwicker-group/py-pde", + "expected": "1", + "got": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "zwicker-group/py-pde", + "expected": "8", + "got": "2", + "got_raw": "2 * 3 + 2 * 1 + 2 * 1 + 2 * 1 + 2 * 1 + 2 * 1 + 2 * 1 + 2 * 1 + 2 * 1 + 2 * 1 + 2 * 1 + 2 * 1 + 2 * 1 + 2 * 1 + 2 * 1 + 2 * 1 + 2 * 1 + 2 * 1 + 2 * 1 + 2 * 1 + 2 * 1 + 2 *", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.0 + }, + { + "repo": "zwicker-group/py-pde", + "expected": "0", + "got": "0", + "got_raw": "0", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zwicker-group/py-pde", + "expected": "0", + "got": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "got_raw": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.015503875968992248 + }, + { + "repo": "zwicker-group/py-pde", + "expected": "xs * ys)", + "got": "xs * ys)", + "got_raw": "xs * ys)\n\n\ndef test_from_expression_error():\n \"\"\"Test error handling for invalid expressions.\"\"\"\n grid = UnitGrid([4, 4])\n with pytest.raises(ValueError) as excinfo:\n Tensor2Field.from_expression(grid, [[1, 1], [\"x**2\"]])\n assert str(excinfo.value) == \"Invalid expression: x**2\"\n\n\ndef test_from_expression_error_2():\n \"\"\"Test error handling for invalid expressions.\"\"\"\n grid = UnitGrid([4, 4])\n with pytest.raises(ValueError) as excinfo:\n Tensor2Field.from", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + }, + { + "repo": "zwicker-group/py-pde", + "expected": "8", + "got": "8.0", + "got_raw": "8.0\n assert e(0) == 0.0\n assert e(1) == 2.0\n assert e(2) == 4.0\n assert e(3) == 6.0\n assert e(4) == 8.0\n assert e(5) == 10.0\n assert e(6) == 12.0\n assert e(7) == 14.0\n assert e(8) == 16.0\n assert e(9) == 18.0", + "exact_match": false, + "code_bleu": 0.5, + "edit_similarity": 0.5 + }, + { + "repo": "zwicker-group/py-pde", + "expected": "s2.data)", + "got": "s2.data)", + "got_raw": "s2.data)\n\n\n@pytest.mark.parametrize(\"dim\", [1, 2, 3])\ndef test_gradient_cart(dim, rng):\n \"\"\"Compare gradient operator.\"\"\"\n grid = CartesianGrid(\n [[0, 2 * np.pi]] * dim,\n shape=rng.integers(30, 35, dim),\n periodic=rng.choice([False, True], dim),\n )\n field = ScalarField.random_harmonic(grid, modes=1, axis_combination=np.add, rng=rng)\n g1 = field.gradient(\"auto_periodic_neumann\", backend=\"numba", + "exact_match": true, + "code_bleu": 1.0, + "edit_similarity": 1.0 + } + ] +} \ No newline at end of file