{"url":"/dataset/codesearchnet","name":"CodeSearchNet","full_name":null,"description_markdown":"The **CodeSearchNet** Corpus is a large dataset of functions with associated documentation written in Go, Java, JavaScript, PHP, Python, and Ruby from open source projects on GitHub. The CodeSearchNet Corpus includes:\r\n* Six million methods overall\r\n* Two million of which have associated documentation (docstrings, JavaDoc, and more)\r\n* Metadata that indicates the original location (repository or line number, for example) where the data was found\r\n\r\nSource: [https://github.blog/2019-09-26-introducing-the-codesearchnet-challenge/](https://github.blog/2019-09-26-introducing-the-codesearchnet-challenge/)","description_withheld":null,"homepage":"https://github.com/github/CodeSearchNet","introduced_date":null,"introduced_date_note":null,"introduced_by":{"paper":"/paper/codesearchnet-challenge-evaluating-the-state","title":"CodeSearchNet Challenge: Evaluating the State of Semantic Code Search","first_author":"Hamel Husain","url":null},"license":{"name":"Custom","url":"https://github.com/github/CodeSearchNet#licenses"},"modalities":[{"name":"Texts","url":"/datasets/modality/texts"}],"tasks":[{"name":"Source Code Summarization","url":"/task/code-summarization","datasets_with_task":"/datasets/task/code-summarization"},{"name":"Code Search","url":"/task/code-search","datasets_with_task":"/datasets/task/code-search"},{"name":"Code Documentation Generation","url":"/task/code-documentation-generation","datasets_with_task":"/datasets/task/code-documentation-generation"},{"name":"Method name prediction","url":"/task/method-name-prediction","datasets_with_task":"/datasets/task/method-name-prediction"}],"languages":[],"variants":["CodeSearchNet","CodeSearchNet - Python","CodeSearchNet - Java","CodeSearchNet - Go","CodeSearchNet - Php","CodeSearchNet - Ruby","CodeSearchNet - JavaScript"],"data_loaders":[{"repo":"https://github.com/huggingface/datasets","url":"https://huggingface.co/datasets/claudios/code_search_net","frameworks":["tf","pytorch","jax"]},{"repo":"https://github.com/huggingface/datasets","url":"https://huggingface.co/datasets/code-search-net/code_search_net","frameworks":["tf","pytorch","jax"]},{"repo":"https://github.com/huggingface/datasets","url":"https://huggingface.co/datasets/code_search_net","frameworks":["tf","pytorch","jax"]},{"repo":"https://github.com/github/CodeSearchNet","url":"https://github.com/github/CodeSearchNet","frameworks":["tf"]}],"num_papers_in_archive":308,"source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28"},"benchmarks":[{"leaderboard":"/sota/code-documentation-generation-on-1","task":"Code Documentation Generation","dataset_variant":"CodeSearchNet - Java","rows":8,"metrics":["Smoothed BLEU-4"],"first_row_in_archive_order":{"model":"CodeTrans-MT-Large","paper":"/paper/codetrans-towards-cracking-the-language-of","metrics":{"Smoothed BLEU-4":"21.87"},"code_links":[{"title":"agemagician/CodeTrans","url":"https://github.com/agemagician/CodeTrans"}]},"note":"rows are the archive's own order at snapshot; nothing here re-ranks them"},{"leaderboard":"/sota/code-documentation-generation-on-3","task":"Code Documentation Generation","dataset_variant":"CodeSearchNet - Php","rows":8,"metrics":["Smoothed BLEU-4"],"first_row_in_archive_order":{"model":"CodeTrans-MT-Base","paper":"/paper/codetrans-towards-cracking-the-language-of","metrics":{"Smoothed BLEU-4":"26.23"},"code_links":[{"title":"agemagician/CodeTrans","url":"https://github.com/agemagician/CodeTrans"}]},"note":"rows are the archive's own order at snapshot; nothing here re-ranks them"},{"leaderboard":"/sota/code-documentation-generation-on-5","task":"Code Documentation Generation","dataset_variant":"CodeSearchNet - JavaScript","rows":8,"metrics":["Smoothed BLEU-4"],"first_row_in_archive_order":{"model":"Transformer","paper":"/paper/codebert-a-pre-trained-model-for-programming","metrics":{"Smoothed BLEU-4":"25.61"},"code_links":[{"title":"salesforce/codet5","url":"https://github.com/salesforce/codet5"},{"title":"microsoft/CodeBERT","url":"https://github.com/microsoft/CodeBERT"},{"title":"graykode/commit-autosuggestions","url":"https://github.com/graykode/commit-autosuggestions"},{"title":"sakirinn/llm4cvd","url":"https://github.com/sakirinn/llm4cvd"},{"title":"zhangzwwww/dietcode","url":"https://github.com/zhangzwwww/dietcode"},{"title":"zhangzwwww/dietcodebert","url":"https://github.com/zhangzwwww/dietcodebert"},{"title":"zfj1998/CodeBert-Code2Text","url":"https://github.com/zfj1998/CodeBert-Code2Text"},{"title":"JasonZhu-WHU/CoderAssistant","url":"https://github.com/JasonZhu-WHU/CoderAssistant"},{"title":"aminatadjer/test","url":"https://github.com/aminatadjer/test"}]},"note":"rows are the archive's own order at snapshot; nothing here re-ranks them"},{"leaderboard":"/sota/code-documentation-generation-on","task":"Code Documentation Generation","dataset_variant":"CodeSearchNet - Python","rows":7,"metrics":["Smoothed BLEU-4"],"first_row_in_archive_order":{"model":"CodeTrans-MT-Base","paper":"/paper/codetrans-towards-cracking-the-language-of","metrics":{"Smoothed BLEU-4":"20.39"},"code_links":[{"title":"agemagician/CodeTrans","url":"https://github.com/agemagician/CodeTrans"}]},"note":"rows are the archive's own order at snapshot; nothing here re-ranks them"},{"leaderboard":"/sota/code-documentation-generation-on-2","task":"Code Documentation Generation","dataset_variant":"CodeSearchNet - Go","rows":7,"metrics":["Smoothed BLEU-4"],"first_row_in_archive_order":{"model":"CodeBERT (MLM)","paper":"/paper/codebert-a-pre-trained-model-for-programming","metrics":{"Smoothed BLEU-4":"26.79"},"code_links":[{"title":"salesforce/codet5","url":"https://github.com/salesforce/codet5"},{"title":"microsoft/CodeBERT","url":"https://github.com/microsoft/CodeBERT"},{"title":"graykode/commit-autosuggestions","url":"https://github.com/graykode/commit-autosuggestions"},{"title":"sakirinn/llm4cvd","url":"https://github.com/sakirinn/llm4cvd"},{"title":"zhangzwwww/dietcode","url":"https://github.com/zhangzwwww/dietcode"},{"title":"zhangzwwww/dietcodebert","url":"https://github.com/zhangzwwww/dietcodebert"},{"title":"zfj1998/CodeBert-Code2Text","url":"https://github.com/zfj1998/CodeBert-Code2Text"},{"title":"JasonZhu-WHU/CoderAssistant","url":"https://github.com/JasonZhu-WHU/CoderAssistant"},{"title":"aminatadjer/test","url":"https://github.com/aminatadjer/test"}]},"note":"rows are the archive's own order at snapshot; nothing here re-ranks them"},{"leaderboard":"/sota/code-documentation-generation-on-4","task":"Code Documentation Generation","dataset_variant":"CodeSearchNet - Ruby","rows":7,"metrics":["Smoothed BLEU-4"],"first_row_in_archive_order":{"model":"CodeTrans-MT-Base","paper":"/paper/codetrans-towards-cracking-the-language-of","metrics":{"Smoothed BLEU-4":"15.26"},"code_links":[{"title":"agemagician/CodeTrans","url":"https://github.com/agemagician/CodeTrans"}]},"note":"rows are the archive's own order at snapshot; nothing here re-ranks them"},{"leaderboard":"/sota/code-documentation-generation-on-6","task":"Code Documentation Generation","dataset_variant":"CodeSearchNet","rows":7,"metrics":["Smoothed BLEU-4"],"first_row_in_archive_order":{"model":"CodeBERT (MLM+RTD)","paper":"/paper/codebert-a-pre-trained-model-for-programming","metrics":{"Smoothed BLEU-4":"15.99"},"code_links":[{"title":"salesforce/codet5","url":"https://github.com/salesforce/codet5"},{"title":"microsoft/CodeBERT","url":"https://github.com/microsoft/CodeBERT"},{"title":"graykode/commit-autosuggestions","url":"https://github.com/graykode/commit-autosuggestions"},{"title":"sakirinn/llm4cvd","url":"https://github.com/sakirinn/llm4cvd"},{"title":"zhangzwwww/dietcode","url":"https://github.com/zhangzwwww/dietcode"},{"title":"zhangzwwww/dietcodebert","url":"https://github.com/zhangzwwww/dietcodebert"},{"title":"zfj1998/CodeBert-Code2Text","url":"https://github.com/zfj1998/CodeBert-Code2Text"},{"title":"JasonZhu-WHU/CoderAssistant","url":"https://github.com/JasonZhu-WHU/CoderAssistant"},{"title":"aminatadjer/test","url":"https://github.com/aminatadjer/test"}]},"note":"rows are the archive's own order at snapshot; nothing here re-ranks them"},{"leaderboard":"/sota/code-search-on-codesearchnet","task":"Code Search","dataset_variant":"CodeSearchNet","rows":6,"metrics":["Overall","Go","Ruby","Python","Java","JS","PHP"],"first_row_in_archive_order":{"model":"cpt-code M","paper":"/paper/text-and-code-embeddings-by-contrastive-pre","metrics":{"Go":"97.5","JS":"86.5","Java":"94.4","Overall":"93.5","PHP":"97.2","Python":"99.9","Ruby":"85.5"},"code_links":[{"title":"openmatch/coco-dr","url":"https://github.com/openmatch/coco-dr"}]},"note":"rows are the archive's own order at snapshot; nothing here re-ranks them"},{"leaderboard":"/sota/code-search-on-codesearchnet-ruby","task":"Code Search","dataset_variant":"CodeSearchNet - Ruby","rows":1,"metrics":["MRR"],"first_row_in_archive_order":{"model":"Uni-SBT","paper":"/paper/multimodal-representation-for-neural-code","metrics":{"MRR":"0.3639"},"code_links":[{"title":"jianguda/mrncs","url":"https://github.com/jianguda/mrncs"}]},"note":"rows are the archive's own order at snapshot; nothing here re-ranks them"},{"leaderboard":"/sota/code-summarization-on-codesearchnet","task":"Source Code Summarization","dataset_variant":"CodeSearchNet","rows":1,"metrics":["F1"],"first_row_in_archive_order":{"model":"ContraCode","paper":"/paper/contrastive-code-representation-learning","metrics":{"F1":"17.24"},"code_links":[{"title":"parasj/contracode","url":"https://github.com/parasj/contracode"}]},"note":"rows are the archive's own order at snapshot; nothing here re-ranks them"},{"leaderboard":"/sota/method-name-prediction-on-codesearchnet","task":"Method name prediction","dataset_variant":"CodeSearchNet","rows":1,"metrics":["F1"],"first_row_in_archive_order":{"model":"ContraCode","paper":"/paper/contrastive-code-representation-learning","metrics":{"F1":"17.24"},"code_links":[{"title":"parasj/contracode","url":"https://github.com/parasj/contracode"}]},"note":"rows are the archive's own order at snapshot; nothing here re-ranks them"},{"leaderboard":"/sota/source-code-summarization-on-codesearchnet","task":"Source Code Summarization","dataset_variant":"CodeSearchNet - Python","rows":1,"metrics":["BLEU-4","METEOR"],"first_row_in_archive_order":{"model":"AdaMo-basic","paper":"/paper/assemble-foundation-models-for-automatic-code","metrics":{"BLEU-4":"16.46","METEOR":"12.51%"},"code_links":[{"title":"jianguda/afm4acs","url":"https://github.com/jianguda/afm4acs"}]},"note":"rows are the archive's own order at snapshot; nothing here re-ranks them"}],"papers_with_a_benchmark_row":[{"paper":"/paper/codet5-open-code-large-language-models-for","title":"CodeT5+: Open Code Large Language Models for Code Understanding and Generation","date":"2023-05-13","rows_on_this_dataset":2,"code_links":2,"syntology":{"read_at":"2026-09-24T18:15:14+00:00","samples_harvested":4,"samples_ran":3,"samples_unverified":1,"pointer_only_for_licence":0,"claim":"Per-sample execution on synthesized fixtures; not a correctness claim."}},{"paper":"/paper/text-and-code-embeddings-by-contrastive-pre","title":"Text and Code Embeddings by Contrastive Pre-Training","date":"2022-01-24","rows_on_this_dataset":2,"code_links":1,"syntology":null},{"paper":"/paper/assemble-foundation-models-for-automatic-code","title":"Assemble Foundation Models for Automatic Code Summarization","date":"2022-01-13","rows_on_this_dataset":1,"code_links":1,"syntology":null},{"paper":"/paper/multimodal-representation-for-neural-code","title":"Multimodal Representation for Neural Code Search","date":"2021-07-02","rows_on_this_dataset":1,"code_links":1,"syntology":null},{"paper":"/paper/codetrans-towards-cracking-the-language-of","title":"CodeTrans: Towards Cracking the Language of Silicon's Code Through Self-Supervised Deep Learning and High Performance Computing","date":"2021-04-06","rows_on_this_dataset":6,"code_links":1,"syntology":null},{"paper":"/paper/graphcodebert-pre-training-code","title":"GraphCodeBERT: Pre-training Code Representations with Data Flow","date":"2020-09-17","rows_on_this_dataset":1,"code_links":1,"syntology":null},{"paper":"/paper/contrastive-code-representation-learning","title":"Contrastive Code Representation Learning","date":"2020-07-09","rows_on_this_dataset":2,"code_links":1,"syntology":null},{"paper":"/paper/codebert-a-pre-trained-model-for-programming","title":"CodeBERT: A Pre-Trained Model for Programming and Natural Languages","date":"2020-02-19","rows_on_this_dataset":47,"code_links":9,"syntology":{"read_at":"2026-09-24T18:15:14+00:00","samples_harvested":20,"samples_ran":2,"samples_unverified":18,"pointer_only_for_licence":4,"claim":"Per-sample execution on synthesized fixtures; not a correctness claim."}}],"syntology_totals":{"read_at":"2026-09-24T18:15:14+00:00","papers_with_samples":2,"samples_harvested":24,"samples_ran":5,"samples_unverified":19,"pointer_only_for_licence":4,"papers_with_no_sample_that_ran":0,"note":"the per-paper counts above, summed; not a rate"},"papers_note":"The archive never published its papers-using-dataset list; these are papers with a leaderboard row on this dataset's benchmarks."}