Datasets:
mteb
/

Modalities:
Text
Formats:
parquet
Languages:
code
ArXiv:
Libraries:
Datasets
pandas
License:
Dataset Viewer
Auto-converted to Parquet
id
stringlengths
2
7
text
stringlengths
17
51.2k
title
stringclasses
1 value
c0
nil { return 0, err } b[i-1] = c b = append(b[:i], b[i+1:]...) i--*/ continue } } if !endQuote { return 0, NewParseError("missing '\"' in string value") } return i + 1, nil }
c1
if isLitValue(lv, b) { n = len(lv) } } if n == 0 { return 0, NewParseError("invalid boolean value") } return n, nil }
c2
return 0, 0, err } negativeIndex = 0 case 'b': if helper.numberFormat == hex { break } fallthrough case 'o', 'x': if i == 0 && b[i] != '0' { return 0, 0, NewParseError("incorrect base format, expected leading '0'") } if i != 1 { return 0, 0, NewParseError(fmt.Sprintf("incorrect base format found %s at %d index", string(b[i]), i)) } if err := helper.Determine(b[i]); err != nil { return 0, 0, err } default: if isWhitespace(b[i]) { break loop } if isNewline(b[i:]) { break loop } if !(helper.numberFormat == hex && isHexByte(b[i])) { if i+2 < len(b) && !isNewline(b[i:i+2]) { return 0, 0, NewParseError("invalid numerical character") } else if !isNewline([]rune{b[i]}) { return 0, 0, NewParseError("invalid numerical character") } break loop } } } } return helper.Base(), i, nil }
c3
if !isDigit(b[i]) { return i } } return i }
c4
case '\\': // backslash default: return false } return value[len(value)-1] == '\\' }
c5
Sections{}, awserr.New(ErrCodeUnableToReadFile, "unable to open file", err) } defer f.Close() return Parse(f) }
c6
if err = Walk(tree, v); err != nil { return Sections{}, err } return v.Sections, nil }
c7
if err = Walk(tree, v); err != nil { return Sections{}, err } return v.Sections, nil }
c8
b.GoType(ref, true), b.BuildShape(ref, c.Input, false), ) }
c9
s.MessageVersion = &v return s }
c10
{ s.Prompt = v return s }
c11
*CodeHook) *FulfillmentActivity { s.CodeHook = v return s }
c12
*GetBotAliasesOutput { s.BotAliases = v return s }
c13
[]*BotChannelAssociation) *GetBotChannelAssociationsOutput { s.BotChannelAssociations = v return s }
c14
s.VersionOrAlias = &v return s }
c15
[]*string) *GetUtterancesViewInput { s.BotVersions = v return s }
c16
s.IntentVersion = &v return s }
c17
s.GroupNumber = &v return s }
c18
s.ProcessBehavior = &v return s }
c19
s.SlotConstraint = &v return s }
c20
*Slot { s.SlotType = &v return s }
c21
s.SlotTypeVersion = &v return s }
c22
s.ValueElicitationPrompt = v return s }
c23
s.DistinctUsers = &v return s }
c24
s.FirstUtteredDate = &v return s }
c25
s.LastUtteredDate = &v return s }
c26
s.UtteranceString = &v return s }
c27
return nil, awserr.New("MissingCMKIDError", "Material description is missing CMK ID", nil) } kp.CipherData.MaterialDescription = m kp.cmkID = cmkID kp.WrapAlgorithm = KMSWrap return &kp, nil }
c28
GrantTokens: []*string{}, }) if err != nil { return nil, err } return out.Plaintext, nil }
c29
Key: out.Plaintext, IV: iv, WrapAlgorithm: KMSWrap, MaterialDescription: kp.CipherData.MaterialDescription, EncryptedKey: out.CiphertextBlob, } return cd, nil }
c30
error) { reader := cc.Cipher.Decrypt(src) return &CryptoReadCloser{Body: src, Decrypter: reader}, nil }
c31
{ s.UpdateId = &v return s }
c32
{ s.UpdateIds = v return s }
c33
*Logging { s.ClusterLogging = v return s }
c34
*Update { s.Params = v return s }
c35
return v.IsSeeker() case io.ReadSeeker: return true default: return false } }
c36
io.Reader: return t.Read(p) } return 0, nil }
c37
ok := r.r.(io.Seeker) return ok }
c38
a io.Readers might not actually be seekable. switch v := s.(type) { case ReaderSeekerCloser: return v.GetLen() case *ReaderSeekerCloser: return v.GetLen() } return seekerLen(s) }
c39
case io.Closer: return t.Close() } return nil }
c40
if int64(cap(b.buf)) < expLen { if b.GrowthCoeff < 1 { b.GrowthCoeff = 1 } newBuf := make([]byte, expLen, int64(b.GrowthCoeff*float64(expLen))) copy(newBuf, b.buf) b.buf = newBuf } b.buf = b.buf[:expLen] } copy(b.buf[pos:], p) return pLen, nil }
c41
defer b.m.Unlock() return b.buf }
c42
{ s.CpuThreshold = &v return s }
c43
int64) *AutoScalingThresholds { s.IgnoreMetricsTime = &v return s }
c44
{ s.LoadThreshold = &v return s }
c45
{ s.MemoryThreshold = &v return s }
c46
s.ThresholdsWaitTime = &v return s }
c47
*BlockDeviceMapping { s.Ebs = v return s }
c48
s.BerkshelfVersion = &v return s }
c49
s.ManageBerkshelf = &v return s }
c50
[]*string) *CloneStackInput { s.CloneAppIds = v return s }
c51
s.ClonePermissions = &v return s }
c52
s.SourceStackId = &v return s }
c53
int64) *CloudWatchLogsLogStream { s.BatchCount = &v return s }
c54
{ s.BufferDuration = &v return s }
c55
{ s.DatetimeFormat = &v return s }
c56
string) *CloudWatchLogsLogStream { s.FileFingerprintLines = &v return s }
c57
{ s.InitialPosition = &v return s }
c58
string) *CloudWatchLogsLogStream { s.MultiLineStartPattern = &v return s }
c59
s.AcknowledgedAt = &v return s }
c60
s.DeleteElasticIp = &v return s }
c61
bool) *DeleteInstanceInput { s.DeleteVolumes = &v return s }
c62
[]*AgentVersion) *DescribeAgentVersionsOutput { s.AgentVersions = v return s }
c63
[]*string) *DescribeCommandsInput { s.CommandIds = v return s }
c64
[]*string) *DescribeEcsClustersInput { s.EcsClusterArns = v return s }
c65
[]*EcsCluster) *DescribeEcsClustersOutput { s.EcsClusters = v return s }
c66
[]*string) *DescribeElasticIpsInput { s.Ips = v return s }
c67
[]*ElasticIp) *DescribeElasticIpsOutput { s.ElasticIps = v return s }
c68
[]*ElasticLoadBalancer) *DescribeElasticLoadBalancersOutput { s.ElasticLoadBalancers = v return s }
c69
*DescribeLoadBasedAutoScalingOutput { s.LoadBasedAutoScalingConfigurations = v return s }
c70
*SelfUserProfile) *DescribeMyUserProfileOutput { s.UserProfile = v return s }
c71
[]*OperatingSystem) *DescribeOperatingSystemsOutput { s.OperatingSystems = v return s }
c72
[]*string) *DescribeRaidArraysInput { s.RaidArrayIds = v return s }
c73
[]*RaidArray) *DescribeRaidArraysOutput { s.RaidArrays = v return s }
c74
[]*string) *DescribeRdsDbInstancesInput { s.RdsDbInstanceArns = v return s }
c75
[]*RdsDbInstance) *DescribeRdsDbInstancesOutput { s.RdsDbInstances = v return s }
c76
[]*string) *DescribeServiceErrorsInput { s.ServiceErrorIds = v return s }
c77
[]*ServiceError) *DescribeServiceErrorsOutput { s.ServiceErrors = v return s }
c78
string) *DescribeStackProvisioningParametersOutput { s.AgentInstallerUrl = &v return s }
c79
*StackSummary) *DescribeStackSummaryOutput { s.StackSummary = v return s }
c80
[]*string) *DescribeStacksInput { s.StackIds = v return s }
c81
[]*Stack) *DescribeStacksOutput { s.Stacks = v return s }
c82
*DescribeTimeBasedAutoScalingOutput { s.TimeBasedAutoScalingConfigurations = v return s }
c83
[]*string) *DescribeUserProfilesInput { s.IamUserArns = v return s }
c84
[]*string) *DescribeVolumesInput { s.VolumeIds = v return s }
c85
s.EcsClusterName = &v return s }
c86
{ s.Ec2InstanceIds = v return s }
c87
bool) *EnvironmentVariable { s.Secure = &v return s }
c88
*GrantAccessOutput { s.TemporaryCredential = v return s }
c89
s.EcsContainerInstanceArn = &v return s }
c90
s.InfrastructureClass = &v return s }
c91
s.LastServiceErrorId = &v return s }
c92
s.PrivateDns = &v return s }
c93
s.PublicDns = &v return s }
c94
s.RegisteredBy = &v return s }
c95
s.ReportedAgentVersion = &v return s }
c96
*Instance { s.ReportedOs = v return s }
c97
s.RootDeviceVolumeId = &v return s }
c98
s.SshHostDsaKeyFingerprint = &v return s }
c99
s.SshHostRsaKeyFingerprint = &v return s }
End of preview. Expand in Data Studio

CodeSearchNetCCRetrieval

An MTEB dataset
Massive Text Embedding Benchmark

The dataset is a collection of code snippets. The task is to retrieve the most relevant code snippet for a given code snippet.

Task category t2t
Domains Programming, Written
Reference https://arxiv.org/abs/2407.02883

Source datasets:

How to evaluate on this task

You can evaluate an embedding model on this dataset using the following code:

import mteb

task = mteb.get_task("CodeSearchNetCCRetrieval")
evaluator = mteb.MTEB([task])

model = mteb.get_model(YOUR_MODEL)
evaluator.run(model)

To learn more about how to run models on mteb task check out the GitHub repository.

Citation

If you use this dataset, please cite the dataset as well as mteb, as this dataset likely includes additional processing as a part of the MMTEB Contribution.


@misc{li2024coircomprehensivebenchmarkcode,
  archiveprefix = {arXiv},
  author = {Xiangyang Li and Kuicai Dong and Yi Quan Lee and Wei Xia and Yichun Yin and Hao Zhang and Yong Liu and Yasheng Wang and Ruiming Tang},
  eprint = {2407.02883},
  primaryclass = {cs.IR},
  title = {CoIR: A Comprehensive Benchmark for Code Information Retrieval Models},
  url = {https://arxiv.org/abs/2407.02883},
  year = {2024},
}


@article{enevoldsen2025mmtebmassivemultilingualtext,
  title={MMTEB: Massive Multilingual Text Embedding Benchmark},
  author={Kenneth Enevoldsen and Isaac Chung and Imene Kerboua and Márton Kardos and Ashwin Mathur and David Stap and Jay Gala and Wissam Siblini and Dominik Krzemiński and Genta Indra Winata and Saba Sturua and Saiteja Utpala and Mathieu Ciancone and Marion Schaeffer and Gabriel Sequeira and Diganta Misra and Shreeya Dhakal and Jonathan Rystrøm and Roman Solomatin and Ömer Çağatan and Akash Kundu and Martin Bernstorff and Shitao Xiao and Akshita Sukhlecha and Bhavish Pahwa and Rafał Poświata and Kranthi Kiran GV and Shawon Ashraf and Daniel Auras and Björn Plüster and Jan Philipp Harries and Loïc Magne and Isabelle Mohr and Mariya Hendriksen and Dawei Zhu and Hippolyte Gisserot-Boukhlef and Tom Aarsen and Jan Kostkan and Konrad Wojtasik and Taemin Lee and Marek Šuppa and Crystina Zhang and Roberta Rocca and Mohammed Hamdy and Andrianos Michail and John Yang and Manuel Faysse and Aleksei Vatolin and Nandan Thakur and Manan Dey and Dipam Vasani and Pranjal Chitale and Simone Tedeschi and Nguyen Tai and Artem Snegirev and Michael Günther and Mengzhou Xia and Weijia Shi and Xing Han Lù and Jordan Clive and Gayatri Krishnakumar and Anna Maksimova and Silvan Wehrli and Maria Tikhonova and Henil Panchal and Aleksandr Abramov and Malte Ostendorff and Zheng Liu and Simon Clematide and Lester James Miranda and Alena Fenogenova and Guangyu Song and Ruqiya Bin Safi and Wen-Ding Li and Alessia Borghini and Federico Cassano and Hongjin Su and Jimmy Lin and Howard Yen and Lasse Hansen and Sara Hooker and Chenghao Xiao and Vaibhav Adlakha and Orion Weller and Siva Reddy and Niklas Muennighoff},
  publisher = {arXiv},
  journal={arXiv preprint arXiv:2502.13595},
  year={2025},
  url={https://arxiv.org/abs/2502.13595},
  doi = {10.48550/arXiv.2502.13595},
}

@article{muennighoff2022mteb,
  author = {Muennighoff, Niklas and Tazi, Nouamane and Magne, Loïc and Reimers, Nils},
  title = {MTEB: Massive Text Embedding Benchmark},
  publisher = {arXiv},
  journal={arXiv preprint arXiv:2210.07316},
  year = {2022}
  url = {https://arxiv.org/abs/2210.07316},
  doi = {10.48550/ARXIV.2210.07316},
}

Dataset Statistics

Dataset Statistics

The following code contains the descriptive statistics from the task. These can also be obtained using:

import mteb

task = mteb.get_task("CodeSearchNetCCRetrieval")

desc_stats = task.metadata.descriptive_stats
{
    "test": {
        "num_samples": 1058035,
        "number_of_characters": 284081702,
        "documents_text_statistics": {
            "total_text_length": 263684735,
            "min_text_length": 16,
            "average_text_length": 262.249182972409,
            "max_text_length": 139971,
            "unique_texts": 995481
        },
        "documents_image_statistics": null,
        "queries_text_statistics": {
            "total_text_length": 20396967,
            "min_text_length": 23,
            "average_text_length": 388.06276516809044,
            "max_text_length": 214210,
            "unique_texts": 52439
        },
        "queries_image_statistics": null,
        "relevant_docs_statistics": {
            "num_relevant_docs": 52561,
            "min_relevant_docs_per_query": 1,
            "average_relevant_docs_per_query": 1.0,
            "max_relevant_docs_per_query": 1,
            "unique_relevant_docs": 52561
        },
        "top_ranked_statistics": null,
        "hf_subset_descriptive_stats": {
            "python": {
                "num_samples": 295570,
                "number_of_characters": 109985967,
                "documents_text_statistics": {
                    "total_text_length": 101754313,
                    "min_text_length": 16,
                    "average_text_length": 362.56400453230333,
                    "max_text_length": 10111,
                    "unique_texts": 280036
                },
                "documents_image_statistics": null,
                "queries_text_statistics": {
                    "total_text_length": 8231654,
                    "min_text_length": 38,
                    "average_text_length": 551.7934039415471,
                    "max_text_length": 8326,
                    "unique_texts": 14918
                },
                "queries_image_statistics": null,
                "relevant_docs_statistics": {
                    "num_relevant_docs": 14918,
                    "min_relevant_docs_per_query": 1,
                    "average_relevant_docs_per_query": 1.0,
                    "max_relevant_docs_per_query": 1,
                    "unique_relevant_docs": 14918
                },
                "top_ranked_statistics": null
            },
            "javascript": {
                "num_samples": 68492,
                "number_of_characters": 18661880,
                "documents_text_statistics": {
                    "total_text_length": 17201640,
                    "min_text_length": 17,
                    "average_text_length": 263.8247879633748,
                    "max_text_length": 139971,
                    "unique_texts": 64779
                },
                "documents_image_statistics": null,
                "queries_text_statistics": {
                    "total_text_length": 1460240,
                    "min_text_length": 40,
                    "average_text_length": 443.70707991491946,
                    "max_text_length": 214210,
                    "unique_texts": 3291
                },
                "queries_image_statistics": null,
                "relevant_docs_statistics": {
                    "num_relevant_docs": 3291,
                    "min_relevant_docs_per_query": 1,
                    "average_relevant_docs_per_query": 1.0,
                    "max_relevant_docs_per_query": 1,
                    "unique_relevant_docs": 3291
                },
                "top_ranked_statistics": null
            },
            "go": {
                "num_samples": 190857,
                "number_of_characters": 33082384,
                "documents_text_statistics": {
                    "total_text_length": 31183720,
                    "min_text_length": 16,
                    "average_text_length": 170.64995758885817,
                    "max_text_length": 51245,
                    "unique_texts": 179845
                },
                "documents_image_statistics": null,
                "queries_text_statistics": {
                    "total_text_length": 1898664,
                    "min_text_length": 23,
                    "average_text_length": 233.76803742920464,
                    "max_text_length": 3589,
                    "unique_texts": 8122
                },
                "queries_image_statistics": null,
                "relevant_docs_statistics": {
                    "num_relevant_docs": 8122,
                    "min_relevant_docs_per_query": 1,
                    "average_relevant_docs_per_query": 1.0,
                    "max_relevant_docs_per_query": 1,
                    "unique_relevant_docs": 8122
                },
                "top_ranked_statistics": null
            },
            "ruby": {
                "num_samples": 28849,
                "number_of_characters": 5236077,
                "documents_text_statistics": {
                    "total_text_length": 4899550,
                    "min_text_length": 19,
                    "average_text_length": 177.59714368566043,
                    "max_text_length": 6201,
                    "unique_texts": 26997
                },
                "documents_image_statistics": null,
                "queries_text_statistics": {
                    "total_text_length": 336527,
                    "min_text_length": 36,
                    "average_text_length": 266.8731165741475,
                    "max_text_length": 2244,
                    "unique_texts": 1261
                },
                "queries_image_statistics": null,
                "relevant_docs_statistics": {
                    "num_relevant_docs": 1261,
                    "min_relevant_docs_per_query": 1,
                    "average_relevant_docs_per_query": 1.0,
                    "max_relevant_docs_per_query": 1,
                    "unique_relevant_docs": 1261
                },
                "top_ranked_statistics": null
            },
            "java": {
                "num_samples": 192016,
                "number_of_characters": 48626999,
                "documents_text_statistics": {
                    "total_text_length": 44874537,
                    "min_text_length": 21,
                    "average_text_length": 247.8420918916829,
                    "max_text_length": 15046,
                    "unique_texts": 178984
                },
                "documents_image_statistics": null,
                "queries_text_statistics": {
                    "total_text_length": 3752462,
                    "min_text_length": 38,
                    "average_text_length": 342.5341853035144,
                    "max_text_length": 5066,
                    "unique_texts": 10844
                },
                "queries_image_statistics": null,
                "relevant_docs_statistics": {
                    "num_relevant_docs": 10955,
                    "min_relevant_docs_per_query": 1,
                    "average_relevant_docs_per_query": 1.0,
                    "max_relevant_docs_per_query": 1,
                    "unique_relevant_docs": 10955
                },
                "top_ranked_statistics": null
            },
            "php": {
                "num_samples": 282251,
                "number_of_characters": 68488395,
                "documents_text_statistics": {
                    "total_text_length": 63770975,
                    "min_text_length": 20,
                    "average_text_length": 237.74115800579338,
                    "max_text_length": 6961,
                    "unique_texts": 264876
                },
                "documents_image_statistics": null,
                "queries_text_statistics": {
                    "total_text_length": 4717420,
                    "min_text_length": 40,
                    "average_text_length": 336.62194947909234,
                    "max_text_length": 2995,
                    "unique_texts": 14003
                },
                "queries_image_statistics": null,
                "relevant_docs_statistics": {
                    "num_relevant_docs": 14014,
                    "min_relevant_docs_per_query": 1,
                    "average_relevant_docs_per_query": 1.0,
                    "max_relevant_docs_per_query": 1,
                    "unique_relevant_docs": 14014
                },
                "top_ranked_statistics": null
            }
        }
    }
}

This dataset card was automatically generated using MTEB

Downloads last month
203