id
int32
0
25.3k
idx
stringlengths
5
9
nl_tokens
listlengths
1
418
pl_tokens
listlengths
22
4.98k
22,800
all-22801
[ "UnmarshalEd25519PrivateKey", "returns", "a", "private", "key", "from", "input", "bytes", "." ]
[ "func", "UnmarshalEd25519PrivateKey", "(", "data", "[", "]", "byte", ")", "(", "PrivKey", ",", "error", ")", "{", "switch", "len", "(", "data", ")", "{", "case", "ed25519", ".", "PrivateKeySize", "+", "ed25519", ".", "PublicKeySize", ":", "// Remove the redu...
22,801
all-22802
[ "writeByte", "adds", "a", "byte", "to", "the", "string", "being", "printed", "." ]
[ "func", "(", "ps", "*", "printState", ")", "writeByte", "(", "b", "byte", ")", "{", "ps", ".", "last", "=", "b", "\n", "<mask>", ".", "buf", ".", "WriteByte", "(", "b", ")", "\n", "}" ]
22,802
all-22803
[ "Returns", "an", "slice", "of", "map", "[", "string", "]", "interfaces", "or", "a", "nil", "slice" ]
[ "func", "(", "t", "Typed", ")", "Maps", "(", "key", "string", ")", "[", "]", "map", "[", "string", "]", "interface", "{", "}", "{", "value", ",", "exists", ":=", "t", "[", "key", "]", "\n", "if", "exists", "==", "true", "{", "if", "a", ",", "...
22,803
all-22804
[ "ConstructMuxVar", "constructs", "the", "mux", "var", "that", "is", "used", "in", "the", "gorilla", "/", "mux", "styled", "path", "example", ":", "{", "id", "}", "{", "id", ":", "[", "0", "-", "9", "]", "+", "}", "." ]
[ "func", "ConstructMuxVar", "(", "name", "string", ",", "pattern", "string", ")", "string", "{", "if", "pattern", "==", "\"", "\"", "{", "return", "\"", "\"", "+", "<mask>", "+", "\"", "\"", "\n", "}", "\n\n", "return", "\"", "\"", "+", "name", "+", ...
22,804
all-22805
[ "AddTagsToHost", "does", "exactly", "what", "it", "says", "on", "the", "tin", ".", "Given", "a", "list", "of", "tags", "add", "them", "to", "the", "host", ".", "The", "source", "is", "optionally", "specified", "and", "defaults", "to", "users", "as", "per...
[ "func", "(", "client", "*", "Client", ")", "AddTagsToHost", "(", "host", ",", "source", "string", ",", "tags", "[", "]", "string", ")", "error", "{", "uri", ":=", "\"", "\"", "+", "host", "\n", "if", "source", "!=", "\"", "\"", "{", "uri", "+=", ...
22,805
all-22806
[ "expandVirtualMachineConfigSpecChanged", "compares", "an", "existing", "VirtualMachineConfigInfo", "with", "a", "VirtualMachineConfigSpec", "generated", "from", "existing", "resource", "data", "and", "compares", "them", "to", "see", "if", "there", "is", "a", "change", "...
[ "func", "expandVirtualMachineConfigSpecChanged", "(", "d", "*", "schema", ".", "ResourceData", ",", "client", "*", "govmomi", ".", "Client", ",", "info", "*", "types", ".", "VirtualMachineConfigInfo", ")", "(", "types", ".", "VirtualMachineConfigSpec", ",", "bool"...
22,806
all-22807
[ "IsDateTime", "returns", "true", "when", "the", "string", "is", "a", "valid", "date", "-", "time" ]
[ "func", "IsDateTime", "(", "str", "string", ")", "bool", "{", "if", "len", "(", "str", ")", "<", "4", "{", "return", "false", "\n", "}", "\n", "s", ":=", "strings", ".", "Split", "(", "strings", ".", "ToLower", "(", "str", ")", ",", "\"", "\"", ...
22,807
all-22808
[ "Decodes", "the", "next", "value", "from", "the", "stream", "into", "v", "." ]
[ "func", "(", "d", "*", "StreamDecoder", ")", "Decode", "(", "v", "<mask>", "{", "}", ")", "error", "{", "if", "d", ".", "err", "!=", "nil", "{", "return", "d", ".", "err", "\n", "}", "\n\n", "err", ":=", "error", "(", "nil", ")", "\n", "cnt", ...
22,808
all-22809
[ "CSS", "returns", "a", "CSS", "style", "property", "value", "for", "exactly", "one", "element", "." ]
[ "func", "(", "s", "*", "Selection", ")", "CSS", "(", "property", "string", ")", "(", "string", ",", "error", ")", "{", "return", "s", ".", "hasProperty", "(", "<mask>", ".", "Element", ".", "GetCSS", ",", "property", ",", "\"", "\"", ")", "\n", "}"...
22,809
all-22810
[ "String", "returns", "a", "human", "readable", "representation", "of", "the", "type", "." ]
[ "func", "(", "t", "Type", ")", "String", "(", ")", "string", "{", "switch", "t", "{", "case", "Nil", ":", "return", "\"", "\"", "\n", "case", "Bool", ":", "return", "\"", "\"", "\n", "case", "Int", ":", "return", "\"", "\"", "\n", "case", "Uint",...
22,810
all-22811
[ "GetLink", "is", "a", "wrapper", "around", "g_menu_item_get_link", "()", "." ]
[ "func", "(", "v", "*", "MenuItem", ")", "GetLink", "(", "link", "string", ")", "*", "MenuModel", "{", "cstr1", ":=", "(", "*", "C", ".", "gchar", ")", "(", "C", ".", "CString", "(", "<mask>", ")", ")", "\n", "defer", "C", ".", "free", "(", "uns...
22,811
all-22812
[ "NewFileTemplateFetcher", "creates", "a", "new", "struct", ".", "paths", "must", "give", "us", "the", "directories", "for", "us", "to", "look", "the", "templates", "in" ]
[ "func", "NewFileTemplateFetcher", "(", "paths", "[", "]", "string", ")", "(", "*", "FileTemplateFetcher", ",", "error", ")", "{", "l", ":=", "&", "FileTemplateFetcher", "{", "Paths", ":", "make", "(", "[", "]", "string", ",", "len", "(", "paths", ")", ...
22,812
all-22813
[ "InitialState", "implements", "the", "Storage", "interface", "." ]
[ "func", "(", "ms", "*", "MemoryStorage", ")", "InitialState", "(", ")", "(", "<mask>", ".", "HardState", ",", "pb", ".", "ConfState", ",", "error", ")", "{", "return", "ms", ".", "hardState", ",", "ms", ".", "snapshot", ".", "Metadata", ".", "ConfState...
22,813
all-22814
[ "Add", "entry", ".", "Input", "and", "entry", ".", "Output", "to", "schemaURLs", "if", "they", "are", "set" ]
[ "func", "(", "entry", "*", "APIEntry", ")", "postPopulate", "(", "apiDef", "*", "APIDefinition", ")", "{", "if", "x", ":=", "&", "entry", ".", "Parent", ".", "apiDef", ".", "schemaURLs", ";", "entry", ".", "Input", "!=", "\"", "\"", "{", "entry", "."...
22,814
all-22815
[ "PrintFile", "values", "for", "a", "pfs", "file", "." ]
[ "func", "PrintFile", "(", "w", "io", ".", "Writer", ",", "file", "*", "pfsclient", ".", "File", ")", "{", "fmt", ".", "Fprintf", "(", "w", ",", "\"", "\\t", "\\t", "\\t", "\\n", "\"", ",", "file", ".", "Commit", ".", "Repo", ".", "Name", ",", "...
22,815
all-22816
[ "/", "*", "Error", "uses", "msg", "as", "a", "format", "string", "with", "subsequent", "parameters", "as", "values", "and", "logs", "the", "resulting", "message", "to", "all", "added", "loggers", "at", "LogLevel", ".", "LevelError" ]
[ "func", "(", "b", "*", "<mask>", ")", "Error", "(", "msg", "string", ")", "error", "{", "return", "b", ".", "Log", "(", "LevelError", ",", "nil", ",", "msg", ")", "\n", "}" ]
22,816
all-22817
[ "Returns", "a", "string", "slice", "+", "true", "if", "valid", "Returns", "nil", "+", "false", "otherwise", "(", "returns", "nil", "+", "false", "if", "one", "of", "the", "values", "is", "not", "a", "valid", "string", ")" ]
[ "func", "(", "t", "Typed", ")", "StringsIf", "(", "key", "string", ")", "(", "[", "]", "string", ",", "bool", ")", "{", "value", ",", "exists", ":=", "t", "[", "key", "]", "\n", "if", "exists", "==", "false", "{", "return", "nil", ",", "false", ...
22,817
all-22818
[ "WithTimeout", "adds", "the", "timeout", "to", "the", "add", "Vm", "params" ]
[ "func", "(", "o", "*", "AddVMParams", ")", "WithTimeout", "(", "timeout", "<mask>", ".", "Duration", ")", "*", "AddVMParams", "{", "o", ".", "SetTimeout", "(", "timeout", ")", "\n", "return", "o", "\n", "}" ]
22,818
all-22819
[ "DateValue", "returns", "the", "value", "of", "the", "Date", "pointer", "passed", "in", "or", "the", "default", "value", "if", "the", "pointer", "is", "nil", "." ]
[ "func", "DateValue", "(", "v", "*", "strfmt", ".", "<mask>", ")", "strfmt", ".", "Date", "{", "if", "v", "==", "nil", "{", "return", "strfmt", ".", "Date", "{", "}", "\n", "}", "\n\n", "return", "*", "v", "\n", "}" ]
22,819
all-22820
[ "Add", "adds", "the", "response", "of", "a", "request", "to", "the", "cache", "if", "its", "revision", "is", "larger", "than", "the", "compacted", "revision", "of", "the", "cache", "." ]
[ "func", "(", "c", "*", "cache", ")", "Add", "(", "req", "*", "pb", ".", "RangeRequest", ",", "resp", "*", "pb", ".", "RangeResponse", ")", "{", "key", ":=", "keyFunc", "(", "req", ")", "\n\n", "c", ".", "mu", ".", "Lock", "(", ")", "\n", "defer...
22,820
all-22821
[ "Add", "new", "storage", "pool", "config", "." ]
[ "func", "storagePoolConfigAdd", "(", "<mask>", "*", "sql", ".", "Tx", ",", "poolID", ",", "nodeID", "int64", ",", "poolConfig", "map", "[", "string", "]", "string", ")", "error", "{", "str", ":=", "\"", "\"", "\n", "stmt", ",", "err", ":=", "tx", "."...
22,821
all-22822
[ "Next", "()", "returns", "the", "current", "value", "in", "the", "iteration", "and", "advances", "the", "interator", ".", "Next", "()", "will", "produce", "a", "valid", "result", "as", "long", "as", "a", "call", "to", "isDone", "()", "returns", "false", ...
[ "func", "(", "it", "*", "inclusiveRangeIt", ")", "Next", "(", ")", "int", "{", "val", ",", "err", ":=", "it", ".", "ptr", ".", "Value", "(", "it", ".", "pos", ")", "\n", "it", ".", "pos", "++", "\n", "if", "err", "!=", "nil", "{", "return", "...
22,822
all-22823
[ "ScaleButtonNew", "()", "is", "a", "wrapper", "around", "gtk_scale_button_new", "()", "." ]
[ "func", "ScaleButtonNew", "(", "size", "IconSize", ",", "min", ",", "max", ",", "<mask>", "float64", ",", "icons", "[", "]", "string", ")", "(", "*", "ScaleButton", ",", "error", ")", "{", "cicons", ":=", "make", "(", "[", "]", "*", "C", ".", "gcha...
22,823
all-22824
[ "Do", "executes", "DOM", ".", "getNodeForLocation", "against", "the", "provided", "context", ".", "returns", ":", "backendNodeID", "-", "Resulting", "node", ".", "nodeID", "-", "Id", "of", "the", "node", "at", "given", "coordinates", "only", "when", "enabled",...
[ "func", "(", "p", "*", "GetNodeForLocationParams", ")", "Do", "(", "ctx", "context", ".", "Context", ")", "(", "backendNodeID", "cdp", ".", "BackendNodeID", ",", "nodeID", "cdp", ".", "NodeID", ",", "err", "error", ")", "{", "// execute", "var", "res", "...
22,824
all-22825
[ "cleanHost", "is", "used", "to", "conver", "from", "the", "rawHost", "format", "to", "a", "more", "usable", "format" ]
[ "func", "(", "host", "rawHost", ")", "cleanHost", "(", ")", "Host", "{", "output", ":=", "Host", "{", "nil", ",", "host", ".", "Status", ".", "State", ",", "host", ".", "Address", ".", "Address", ",", "host", ".", "Address", ".", "AddressType", ",", ...
22,825
all-22826
[ "endpointsFromIngress", "extracts", "the", "endpoints", "from", "ingress", "object" ]
[ "func", "endpointsFromIngress", "(", "ing", "*", "v1beta1", ".", "Ingress", ",", "ignoreHostnameAnnotation", "bool", ")", "[", "]", "*", "endpoint", ".", "Endpoint", "{", "var", "endpoints", "[", "]", "*", "endpoint", ".", "Endpoint", "\n\n", "ttl", ",", "...
22,826
all-22827
[ "ListZones", "wraps", "the", "List", "method", "of", "the", "API", "s", "Zones", "service" ]
[ "func", "(", "n", "NS1DomainService", ")", "ListZones", "(", ")", "(", "[", "]", "*", "dns", ".", "Zone", ",", "*", "<mask>", ".", "Response", ",", "error", ")", "{", "return", "n", ".", "service", ".", "Zones", ".", "List", "(", ")", "\n", "}" ]
22,827
all-22828
[ "/", "*", "Given", "a", "planner", "creates", "a", "function", "which", "will", "evaluate", "a", "specific", "precedence", "level", "of", "operators", "and", "link", "it", "to", "other", "precedent", "s", "which", "recurse", "to", "parse", "other", "preceden...
[ "func", "makePrecedentFromPlanner", "(", "planner", "*", "precedencePlanner", ")", "precedent", "{", "var", "generated", "precedent", "\n", "var", "nextRight", "precedent", "\n\n", "generated", "=", "func", "(", "stream", "*", "tokenStream", ")", "(", "*", "eval...
22,828
all-22829
[ "ReStock", "-", "this", "will", "reclaim", "resources", "for", "a", "given", "lease" ]
[ "func", "(", "s", "*", "Lease", ")", "ReStock", "(", ")", "(", "skuTask", "*", "taskmanager", ".", "Task", ")", "{", "if", "skuConstructor", ",", "ok", ":=", "s", ".", "availableSkus", "[", "s", ".", "Sku", "]", ";", "ok", "{", "leaseMap", ":=", ...
22,829
all-22830
[ "PSCSettle", "calls", "settle", "method", "of", "Privatix", "service", "contract", "." ]
[ "func", "(", "b", "*", "backendInstance", ")", "PSCSettle", "(", "opts", "*", "bind", ".", "TransactOpts", ",", "agent", "common", ".", "Address", ",", "blockNumber", "uint32", ",", "<mask>", "[", "common", ".", "HashLength", "]", "byte", ")", "(", "*", ...
22,830
all-22831
[ "readBlockHeader", "determines", "and", "initializes", "the", "current", "decoder", "for", "a", "new", "decode", "block", "." ]
[ "func", "(", "d", "*", "decoder29", ")", "readBlockHeader", "(", ")", "error", "{", "d", ".", "br", ".", "alignByte", "(", ")", "\n", "n", ",", "err", ":=", "d", ".", "br", ".", "readBits", "(", "1", ")", "\n", "if", "err", "==", "nil", "{", ...
22,831
all-22832
[ "Step", "advances", "the", "state", "machine", "using", "the", "given", "message", "." ]
[ "func", "(", "rn", "*", "RawNode", ")", "Step", "(", "m", "<mask>", ".", "Message", ")", "error", "{", "// ignore unexpected local messages receiving over network", "if", "IsLocalMsg", "(", "m", ".", "Type", ")", "{", "return", "ErrStepLocalMsg", "\n", "}", "\...
22,832
all-22833
[ "GetActiveWindow", "is", "a", "wrapper", "around", "gdk_screen_get_active_window", "()", "." ]
[ "func", "(", "v", "*", "Screen", ")", "GetActiveWindow", "(", ")", "(", "*", "Window", ",", "<mask>", ")", "{", "return", "toWindow", "(", "C", ".", "gdk_screen_get_active_window", "(", "v", ".", "native", "(", ")", ")", ")", "\n", "}" ]
22,833
all-22834
[ "clientcmdNewConfig", "is", "a", "modified", "copy", "of", "k8s", ".", "io", "/", "kubernetes", "/", "pkg", "/", "client", "/", "unversioned", "/", "clientcmd", "/", "api", ".", "NewConfig", ".", "NewConfig", "is", "a", "convenience", "function", "that", "...
[ "func", "clientcmdNewConfig", "(", ")", "*", "clientcmdConfig", "{", "return", "&", "clientcmdConfig", "{", "Clusters", ":", "<mask>", "(", "map", "[", "string", "]", "*", "clientcmdCluster", ")", ",", "AuthInfos", ":", "make", "(", "map", "[", "string", "...
22,834
all-22835
[ "ReadUint64", "returns", "the", "next", "value", "in", "the", "buffer", "as", "a", "uint64" ]
[ "func", "(", "r", "*", "ReadBuffer", ")", "ReadUint64", "(", ")", "uint64", "{", "if", "b", ":=", "r", ".", "ReadBytes", "(", "8", ")", ";", "b", "!=", "nil", "{", "return", "<mask>", ".", "BigEndian", ".", "Uint64", "(", "b", ")", "\n", "}", "...
22,835
all-22836
[ "IsEquivalent", "returns", "true", "if", "other", "represents", "the", "same", "data", "type", "as", "the", "target", "." ]
[ "func", "(", "e", "*", "EnumerableDataType", ")", "IsEquivalent", "(", "other", "DataType", ")", "bool", "{", "_", ",", "<mask>", ":=", "other", ".", "(", "*", "EnumerableDataType", ")", "\n", "return", "ok", "\n", "}" ]
22,836
all-22837
[ "GetType", "returns", "the", "Type", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "h", "*", "HostmapDefinition", ")", "GetType", "(", ")", "string", "{", "if", "h", "==", "nil", "||", "h", ".", "Type", "==", "nil", "{", "return", "\"", "\"", "\n", "}", "\n", "return", "*", "h", ".", "<mask>", "\n", "}" ]
22,837
all-22838
[ "GetUrlOk", "returns", "a", "tuple", "with", "the", "Url", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "c", "*", "<mask>", ")", "GetUrlOk", "(", ")", "(", "string", ",", "bool", ")", "{", "if", "c", "==", "nil", "||", "c", ".", "Url", "==", "nil", "{", "return", "\"", "\"", ",", "false", "\n", "}", "\n", "return", "*", "c", ".", ...
22,838
all-22839
[ "retrieve", "the", "name", "of", "an", "active", "uniform", "block" ]
[ "func", "GetActiveUniformBlockName", "(", "program", "uint32", ",", "uniformBlockIndex", "uint32", ",", "bufSize", "int32", ",", "length", "*", "int32", ",", "uniformBlockName", "*", "uint8", ")", "{", "syscall", ".", "Syscall6", "(", "gpGetActiveUniformBlockName", ...
22,839
all-22840
[ "NewHistogram", "returns", "a", "histogram", "instance", "." ]
[ "func", "(", "m", "*", "CirconusMetrics", ")", "NewHistogram", "(", "metric", "string", ")", "*", "Histogram", "{", "m", ".", "hm", ".", "Lock", "(", ")", "\n", "defer", "m", ".", "hm", ".", "Unlock", "(", ")", "\n\n", "if", "hist", ",", "ok", ":...
22,840
all-22841
[ "WriteFile", "indicates", "an", "expected", "call", "of", "WriteFile" ]
[ "func", "(", "mr", "*", "MockIOUtilMockRecorder", ")", "WriteFile", "(", "arg0", ",", "arg1", ",", "arg2", "<mask>", "{", "}", ")", "*", "gomock", ".", "Call", "{", "return", "mr", ".", "mock", ".", "ctrl", ".", "RecordCallWithMethodType", "(", "mr", "...
22,841
all-22842
[ "specify", "clear", "values", "for", "the", "accumulation", "buffer" ]
[ "func", "ClearAccum", "(", "red", "float32", ",", "green", "float32", ",", "blue", "float32", ",", "alpha", "float32", ")", "{", "syscall", ".", "Syscall6", "(", "gpClearAccum", ",", "4", ",", "uintptr", "(", "math", ".", "Float32bits", "(", "red", ")", ...
22,842
all-22843
[ "BaggageItem", "belongs", "to", "the", "Span", "interface" ]
[ "func", "(", "s", "*", "MockSpan", ")", "BaggageItem", "(", "key", "string", ")", "string", "{", "s", ".", "RLock", "(", ")", "\n", "defer", "s", ".", "RUnlock", "(", ")", "\n", "return", "s", ".", "SpanContext", ".", "Baggage", "[", "<mask>", "]",...
22,843
all-22844
[ "NewRadioGroup", "creates", "a", "new", "RadioGroup" ]
[ "func", "CreateRadioGroup", "(", ")", "*", "RadioGroup", "{", "c", ":=", "<mask>", "(", "RadioGroup", ")", "\n", "c", ".", "items", "=", "make", "(", "[", "]", "*", "Radio", ",", "0", ")", "\n", "return", "c", "\n", "}" ]
22,844
all-22845
[ "next", "advances", "to", "the", "next", "file", "block", "in", "the", "archive" ]
[ "func", "(", "a", "*", "archive15", ")", "next", "(", ")", "(", "*", "fileBlockHeader", ",", "error", ")", "{", "for", "{", "// could return an io.EOF here as 1.5 archives may not have an end block.", "h", ",", "err", ":=", "a", ".", "readBlockHeader", "(", ")",...
22,845
all-22846
[ "newCloudFlareChanges", "returns", "a", "collection", "of", "Changes", "based", "on", "the", "given", "records", "and", "action", "." ]
[ "func", "newCloudFlareChanges", "(", "action", "string", ",", "endpoints", "[", "]", "*", "endpoint", ".", "Endpoint", ",", "proxiedByDefault", "bool", ")", "[", "]", "*", "cloudFlareChange", "{", "changes", ":=", "make", "(", "[", "]", "*", "cloudFlareChang...
22,846
all-22847
[ "DeleteCheckBundle", "deletes", "passed", "check", "bundle", "." ]
[ "func", "(", "a", "*", "API", ")", "DeleteCheckBundle", "(", "cfg", "*", "CheckBundle", ")", "(", "bool", ",", "error", ")", "{", "if", "cfg", "==", "nil", "{", "return", "<mask>", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ")", "\n", "}", "\n",...
22,847
all-22848
[ "GRPCCode", "returns", "the", "corresponding", "http", "status", "code", "from", "an", "error", "type" ]
[ "func", "(", "t", "Type", ")", "GRPCCode", "(", ")", "codes", ".", "Code", "{", "switch", "t", "{", "case", "InvalidArgument", ":", "return", "codes", ".", "InvalidArgument", "\n", "case", "OutOfRange", ":", "return", "codes", ".", "OutOfRange", "\n", "c...
22,848
all-22849
[ "put", "puts", "the", "connection", "back", "to", "the", "pool", ".", "If", "the", "pool", "is", "closed", "put", "simply", "close", "any", "connections", "received", "and", "return", "immediately", ".", "A", "nil", "net", ".", "Conn", "is", "illegal", "...
[ "func", "(", "p", "*", "blockingPool", ")", "put", "(", "conn", "*", "WrappedConn", ")", "error", "{", "//in case that pool is closed and pool.conns is set to nil", "conns", ":=", "p", ".", "conns", "\n", "if", "conns", "==", "nil", "{", "//conn.Conn is possibly n...
22,849
all-22850
[ "GetHandle", "returns", "the", "Handle", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "c", "*", "<mask>", ")", "GetHandle", "(", ")", "string", "{", "if", "c", "==", "nil", "||", "c", ".", "Handle", "==", "nil", "{", "return", "\"", "\"", "\n", "}", "\n", "return", "*", "c", ".", "Handle", "\n", "}" ]
22,850
all-22851
[ "openBackend", "returns", "a", "backend", "using", "the", "current", "etcd", "db", "." ]
[ "func", "openBackend", "(", "cfg", "ServerConfig", ")", "backend", ".", "Backend", "{", "fn", ":=", "cfg", ".", "backendPath", "(", ")", "\n\n", "now", ",", "beOpened", ":=", "time", ".", "Now", "(", ")", ",", "make", "(", "chan", "backend", ".", "Ba...
22,851
all-22852
[ "Broadcast", "runs", "a", "go", "routine", "for", "each", "attempted", "send", "which", "will", "block", "trying", "to", "send", "for", "defaultSendTimeoutSeconds", ".", "Returns", "a", "channel", "which", "receives", "success", "values", "for", "each", "attempt...
[ "func", "(", "sw", "*", "Switch", ")", "Broadcast", "(", "chID", "byte", ",", "msg", "interface", "{", "}", ")", "chan", "bool", "{", "successChan", ":=", "make", "(", "chan", "bool", ",", "len", "(", "sw", ".", "peers", ".", "List", "(", ")", ")...
22,852
all-22853
[ "Querier", "implements", "the", "Storage", "interface", "." ]
[ "func", "(", "s", "*", "ReadyStorage", ")", "Querier", "(", "ctx", "context", ".", "Context", ",", "mint", ",", "maxt", "int64", ")", "(", "storage", ".", "Querier", ",", "error", ")", "{", "if", "x", ":=", "s", ".", "<mask>", "(", ")", ";", "x",...
22,853
all-22854
[ "WithPrefetch", "is", "a", "hint", "to", "prefetch", "a", "list", "of", "keys", "before", "trying", "to", "apply", ".", "If", "an", "STM", "transaction", "will", "unconditionally", "fetch", "a", "set", "of", "keys", "prefetching", "those", "keys", "will", ...
[ "func", "WithPrefetch", "(", "keys", "...", "string", ")", "stmOption", "{", "return", "func", "(", "so", "*", "stmOptions", ")", "{", "so", ".", "prefetch", "=", "append", "(", "so", ".", "prefetch", ",", "<mask>", "...", ")", "}", "\n", "}" ]
22,854
all-22855
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "EventStyleSheetAdded", ")", "UnmarshalJSON", "(", "data", "[", "]", "<mask>", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss53", "(", "&", ...
22,855
all-22856
[ "TerminateChannel", "tries", "to", "terminate", "a", "given", "channel", "." ]
[ "func", "(", "p", "*", "Processor", ")", "TerminateChannel", "(", "<mask>", ",", "jobCreator", "string", ",", "agent", "bool", ")", "(", "string", ",", "error", ")", "{", "var", "jobType", "string", "\n", "if", "agent", "{", "jobType", "=", "data", "."...
22,856
all-22857
[ "Add", "adds", "a", "key", "into", "the", "cache", "and", "handles", "overflow" ]
[ "func", "(", "mkc", "*", "memoryKeyCacher", ")", "Add", "(", "keyID", "string", ",", "downloadedKeys", "[", "]", "jose", ".", "JSONWebKey", ")", "(", "*", "jose", ".", "JSONWebKey", ",", "error", ")", "{", "var", "addingKey", "jose", ".", "JSONWebKey", ...
22,857
all-22858
[ "Done", "is", "called", "on", "a", "completed", "request" ]
[ "func", "(", "t", "*", "WriterTracer", ")", "Done", "(", "re", "*", "Response", ",", "err", "error", ")", "(", "*", "Response", ",", "error", ")", "{", "t", ".", "EndTime", "=", "time", ".", "Now", "(", ")", ".", "UTC", "(", ")", "\n", "if", ...
22,858
all-22859
[ "SetDesiredStatus", "sets", "the", "desired", "status", "of", "the", "task" ]
[ "func", "(", "task", "*", "Task", ")", "SetDesiredStatus", "(", "status", "apitaskstatus", ".", "TaskStatus", ")", "{", "task", ".", "lock", ".", "Lock", "(", ")", "\n", "defer", "task", ".", "lock", ".", "Unlock", "(", ")", "\n\n", "<mask>", ".", "D...
22,859
all-22860
[ "SetDefaultGeometry", "is", "a", "wrapper", "around", "gtk_window_set_default_geometry", "()", "." ]
[ "func", "(", "v", "*", "Window", ")", "SetDefaultGeometry", "(", "width", ",", "height", "int", ")", "{", "C", ".", "gtk_window_set_default_geometry", "(", "v", ".", "native", "(", ")", ",", "C", ".", "gint", "(", "<mask>", ")", ",", "C", ".", "gint"...
22,860
all-22861
[ "WriteOnTargetList", "writes", "the", "given", "target", "in", "the", "target", "list", "file", "." ]
[ "func", "WriteOnTargetList", "(", "label", ",", "target", "string", ")", "error", "{", "label", "=", "strings", ".", "TrimSpace", "(", "label", ")", "\n", "target", "=", "strings", ".", "TrimSpace", "(", "target", ")", "\n", "targetExist", ",", "err", ":...
22,861
all-22862
[ "HasMargin", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "i", "*", "ImageDefinition", ")", "HasMargin", "(", ")", "bool", "{", "if", "i", "!=", "nil", "&&", "i", ".", "Margin", "!=", "nil", "{", "return", "<mask>", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
22,862
all-22863
[ "NewDnsimpleProvider", "initializes", "a", "new", "Dnsimple", "based", "provider" ]
[ "func", "NewDnsimpleProvider", "(", "domainFilter", "DomainFilter", ",", "zoneIDFilter", "ZoneIDFilter", ",", "dryRun", "bool", ")", "(", "<mask>", ",", "error", ")", "{", "oauthToken", ":=", "os", ".", "Getenv", "(", "\"", "\"", ")", "\n", "if", "len", "(...
22,863
all-22864
[ "GetKnownStatus", "gets", "the", "KnownStatus", "of", "the", "task" ]
[ "func", "(", "task", "*", "Task", ")", "GetKnownStatus", "(", ")", "apitaskstatus", ".", "TaskStatus", "{", "task", ".", "lock", ".", "RLock", "(", ")", "\n", "defer", "task", ".", "<mask>", ".", "RUnlock", "(", ")", "\n\n", "return", "task", ".", "K...
22,864
all-22865
[ "Authenticate", "validates", "an", "incoming", "http", "Request", "It", "will", "check", "over", "what", "protocol", "it", "came", "what", "type", "of", "request", "it", "is", "and", "will", "validate", "the", "TLS", "certificate", "or", "Macaroon", ".", "Th...
[ "func", "(", "d", "*", "Daemon", ")", "Authenticate", "(", "r", "*", "http", ".", "Request", ")", "(", "bool", ",", "string", ",", "string", ",", "error", ")", "{", "// Allow internal cluster traffic", "if", "r", ".", "TLS", "!=", "nil", "{", "<mask>",...
22,865
all-22866
[ "Step", "6", "Un", "-", "accent" ]
[ "func", "step6", "(", "<mask>", "*", "snowballword", ".", "SnowballWord", ")", "bool", "{", "// If the words ends é or è (unicode code points 233 and 232)", "// followed by at least one non-vowel, remove the accent from the e.", "// Note, this step is oddly articulated on Porter's Snowball...
22,866
all-22867
[ "lookupProject", "retrieves", "the", "project", "name", "from", "the", "metadata", "of", "the", "current", "node", "." ]
[ "func", "lookupProject", "(", ")", "(", "string", ",", "error", ")", "{", "req", ",", "err", ":=", "http", ".", "NewRequest", "(", "\"", "\"", ",", "\"", "\"", ",", "nil", ")", "\n", "if", "err", "!=", "nil", "{", "return", "\"", "\"", ",", "er...
22,867
all-22868
[ "AddHandler", "adds", "a", "function", "to", "be", "called", "whenever", "an", "event", "is", "received" ]
[ "func", "(", "op", "*", "remoteOperation", ")", "AddHandler", "(", "function", "func", "(", "api", ".", "Operation", ")", ")", "(", "*", "EventTarget", ",", "error", ")", "{", "var", "err", "error", "\n", "var", "target", "*", "EventTarget", "\n\n", "/...
22,868
all-22869
[ "UnmarshalJSON", "satisfies", "json", ".", "Unmarshaler", "." ]
[ "func", "(", "t", "*", "ContinueToLocationTargetCallFrames", ")", "UnmarshalJSON", "(", "buf", "[", "]", "<mask>", ")", "error", "{", "return", "easyjson", ".", "Unmarshal", "(", "buf", ",", "t", ")", "\n", "}" ]
22,869
all-22870
[ "simultaneously", "specify", "storage", "for", "all", "levels", "of", "a", "three", "-", "dimensional", "two", "-", "dimensional", "array", "or", "cube", "-", "map", "array", "texture" ]
[ "func", "TextureStorage3D", "(", "texture", "uint32", ",", "levels", "int32", ",", "internalformat", "uint32", ",", "width", "int32", ",", "height", "int32", ",", "depth", "int32", ")", "{", "syscall", ".", "Syscall6", "(", "gpTextureStorage3D", ",", "6", ",...
22,870
all-22871
[ "NewTransactionAt", "follows", "the", "same", "logic", "as", "DB", ".", "NewTransaction", "()", "but", "uses", "the", "provided", "read", "timestamp", ".", "This", "is", "only", "useful", "for", "databases", "built", "on", "top", "of", "Badger", "(", "like",...
[ "func", "(", "db", "*", "DB", ")", "NewTransactionAt", "(", "readTs", "uint64", ",", "update", "bool", ")", "*", "Txn", "{", "if", "!", "db", ".", "opt", ".", "managedTxns", "{", "panic", "(", "\"", "\"", ")", "\n", "}", "\n", "txn", ":=", "db", ...
22,871
all-22872
[ "RemoveDuplicates", "removes", "duplicate", "items", "from", "a", "list" ]
[ "func", "RemoveDuplicates", "(", "elements", "[", "]", "string", ")", "[", "]", "string", "{", "// Use map to record duplicates as we find them.", "encountered", ":=", "map", "[", "string", "]", "bool", "{", "}", "\n", "result", ":=", "[", "]", "string", "{", ...
22,872
all-22873
[ "DebugPrint", "draws", "the", "string", "str", "on", "the", "image", "on", "left", "top", "corner", ".", "The", "available", "runes", "are", "in", "U", "+", "0000", "to", "U", "+", "00FF", "which", "is", "C0", "Controls", "and", "Basic", "Latin", "and"...
[ "func", "DebugPrint", "(", "<mask>", "*", "ebiten", ".", "Image", ",", "str", "string", ")", "error", "{", "DebugPrintAt", "(", "image", ",", "str", ",", "0", ",", "0", ")", "\n", "return", "nil", "\n", "}" ]
22,873
all-22874
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "GetMetricsParams", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformance3", "(", "&", "w", ",", "v", "...
22,874
all-22875
[ "SetSize", "()", "is", "a", "wrapper", "around", "gtk_paper_size_set_size", "()", "." ]
[ "func", "(", "ps", "*", "PaperSize", ")", "SetSize", "(", "width", ",", "<mask>", "float64", ",", "unit", "Unit", ")", "{", "C", ".", "gtk_paper_size_set_size", "(", "ps", ".", "native", "(", ")", ",", "C", ".", "gdouble", "(", "width", ")", ",", "...
22,875
all-22876
[ "Properties", "is", "a", "convenience", "method", "that", "wraps", "fetching", "the", "ClusterComputeResource", "MO", "from", "its", "higher", "-", "level", "object", "." ]
[ "func", "Properties", "(", "cluster", "*", "object", ".", "ClusterComputeResource", ")", "(", "*", "mo", ".", "ClusterComputeResource", ",", "error", ")", "{", "ctx", ",", "cancel", ":=", "<mask>", ".", "WithTimeout", "(", "context", ".", "Background", "(", ...
22,876
all-22877
[ "Series", "returns", "the", "bytes", "of", "the", "series", "the", "timestamp", "if", "set", "and", "the", "value", "of", "the", "current", "sample", "." ]
[ "func", "(", "p", "*", "PromParser", ")", "Series", "(", ")", "(", "[", "]", "byte", ",", "*", "int64", ",", "float64", ")", "{", "if", "p", ".", "hasTS", "{", "return", "p", ".", "series", ",", "&", "p", ".", "<mask>", ",", "p", ".", "val", ...
22,877
all-22878
[ "vectorSelector", "evaluates", "a", "*", "VectorSelector", "expression", "." ]
[ "func", "(", "ev", "*", "evaluator", ")", "vectorSelector", "(", "node", "*", "VectorSelector", ",", "ts", "int64", ")", "Vector", "{", "checkForSeriesSetExpansion", "(", "ev", ".", "ctx", ",", "node", ")", "\n\n", "var", "(", "vec", "=", "make", "(", ...
22,878
all-22879
[ "Get", "gets", "the", "item", "for", "the", "given", "key", ".", "ErrCacheMiss", "is", "returned", "for", "a", "memcache", "cache", "miss", ".", "The", "key", "must", "be", "at", "most", "250", "bytes", "in", "length", "." ]
[ "func", "Get", "(", "c", "context", ".", "Context", ",", "key", "string", ")", "(", "*", "Item", ",", "error", ")", "{", "m", ",", "err", ":=", "GetMulti", "(", "c", ",", "[", "]", "string", "{", "key", "}", ")", "\n", "if", "err", "!=", "nil...
22,879
all-22880
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "DispatchKeyEventParams", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput9", "(", "&", "w", ",", "v", "...
22,880
all-22881
[ "GetLength", "()", "is", "a", "wrapper", "around", "gtk_print_settings_get_length", "()", "." ]
[ "func", "(", "<mask>", "*", "PrintSettings", ")", "GetLength", "(", "key", "string", ",", "unit", "Unit", ")", "float64", "{", "cstr", ":=", "C", ".", "CString", "(", "key", ")", "\n", "defer", "C", ".", "free", "(", "unsafe", ".", "Pointer", "(", ...
22,881
all-22882
[ "FindByName", "finds", "exactly", "element", "with", "the", "provided", "name", "attribute", "." ]
[ "func", "(", "s", "*", "selectable", ")", "FindByName", "(", "name", "string", ")", "*", "Selection", "{", "return", "newSelection", "(", "s", ".", "<mask>", ",", "s", ".", "selectors", ".", "Append", "(", "target", ".", "Name", ",", "name", ")", "."...
22,882
all-22883
[ "IndexOfIgnoreCase", "looks", "for", "specified", "string", "disregarding", "letter", "casing", "into", "current", "slice", "." ]
[ "func", "(", "s", "StringSlice", ")", "IndexOfIgnoreCase", "(", "str", "string", ")", "int", "{", "str", "=", "strings", ".", "ToLower", "(", "str", ")", "\n", "for", "i", ",", "v", ":=", "<mask>", "s", "{", "if", "str", "==", "strings", ".", "ToLo...
22,883
all-22884
[ "Capabilities", "returns", "the", "capabilities", "supported", "by", "a", "plugin" ]
[ "func", "(", "client", "*", "cniClient", ")", "Capabilities", "(", "name", "string", ")", "(", "[", "]", "string", ",", "error", ")", "{", "file", ":=", "filepath", ".", "Join", "(", "client", ".", "pluginsPath", ",", "name", ")", "\n\n", "// Check if ...
22,884
all-22885
[ "Execute", "-", "updates", "space", "quotas" ]
[ "func", "(", "c", "*", "UpdateSpaceQuotasCommand", ")", "Execute", "(", "[", "]", "string", ")", "error", "{", "var", "cfMgmt", "*", "CFMgmt", "\n", "<mask>", "err", "error", "\n", "if", "cfMgmt", ",", "err", "=", "InitializePeekManagers", "(", "c", ".",...
22,885
all-22886
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "GetRequestPostDataParams", ")", "UnmarshalJSON", "(", "<mask>", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork33", "(", ...
22,886
all-22887
[ "HasServiceKey", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "s", "*", "servicePD", ")", "HasServiceKey", "(", ")", "bool", "{", "if", "s", "!=", "nil", "&&", "s", ".", "ServiceKey", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n", "}" ]
22,887
all-22888
[ "Locator", "returns", "a", "locator", "for", "the", "given", "resource" ]
[ "func", "(", "r", "*", "RunnableBinding", ")", "Locator", "(", "api", "*", "API", ")", "*", "RunnableBindingLocator", "{", "for", "_", ",", "l", ":=", "<mask>", "r", ".", "Links", "{", "if", "l", "[", "\"", "\"", "]", "==", "\"", "\"", "{", "retu...
22,888
all-22889
[ "readFrames", "is", "the", "loop", "that", "reads", "frames", "from", "the", "network", "connection", "and", "dispatches", "to", "the", "appropriate", "handler", ".", "Run", "within", "its", "own", "goroutine", "to", "prevent", "overlapping", "reads", "on", "t...
[ "func", "(", "c", "*", "<mask>", ")", "readFrames", "(", "_", "uint32", ")", "{", "headerBuf", ":=", "make", "(", "[", "]", "byte", ",", "FrameHeaderSize", ")", "\n\n", "handleErr", ":=", "func", "(", "err", "error", ")", "{", "if", "!", "c", ".", ...
22,889
all-22890
[ "NewLuaObject", "creates", "a", "new", "LuaObject", "from", "stack", "index", "." ]
[ "func", "NewLuaObject", "(", "L", "*", "lua", ".", "State", ",", "idx", "int", ")", "*", "LuaObject", "{", "L", ".", "PushValue", "(", "idx", ")", "\n", "ref", ":=", "L", ".", "Ref", "(", "lua", ".", "LUA_REGISTRYINDEX", ")", "\n", "return", "&", ...
22,890
all-22891
[ "ConvertIterToChildIter", "is", "a", "wrapper", "around", "gtk_tree_model_filter_convert_child_iter_to_iter", "()", "." ]
[ "func", "(", "v", "*", "TreeModelFilter", ")", "ConvertIterToChildIter", "(", "filterIter", "*", "TreeIter", ")", "*", "TreeIter", "{", "<mask>", "iter", "C", ".", "GtkTreeIter", "\n", "C", ".", "gtk_tree_model_filter_convert_iter_to_child_iter", "(", "v", ".", ...
22,891
all-22892
[ "UnmarshalYAML", "implements", "the", "yaml", ".", "Unmarshaler", "interface", "." ]
[ "func", "(", "c", "*", "SDConfig", ")", "UnmarshalYAML", "(", "unmarshal", "func", "(", "<mask>", "{", "}", ")", "error", ")", "error", "{", "*", "c", "=", "DefaultSDConfig", "\n", "type", "plain", "SDConfig", "\n", "err", ":=", "unmarshal", "(", "(", ...
22,892
all-22893
[ "NewEventMatcher", "returns", "the", "correct", "EventMatcher", "based", "on", "description", "Incoming", "event", "should", "have", "the", "following", "form", ":", "eventName", ":", "labelName", ".", "If", "eventName", "is", "not", "label", "then", "the", "sec...
[ "func", "NewEventMatcher", "(", "eventDescription", "string", ")", "EventMatcher", "{", "split", ":=", "strings", ".", "SplitN", "(", "eventDescription", ",", "\"", "\"", ",", "2", ")", "\n", "switch", "split", "[", "0", "]", "{", "<mask>", "\"", "\"", "...
22,893
all-22894
[ "ArmForSwitch", "returns", "which", "field", "name", "should", "be", "used", "for", "storing", "the", "value", "for", "an", "instance", "of", "ManageOfferResult" ]
[ "func", "(", "u", "ManageOfferResult", ")", "ArmForSwitch", "(", "sw", "int32", ")", "(", "string", ",", "bool", ")", "{", "switch", "ManageOfferResultCode", "(", "sw", ")", "{", "case", "ManageOfferResultCodeManageOfferSuccess", ":", "return", "\"", "\"", ","...
22,894
all-22895
[ "NewPublishHealthMetricsRequest", "creates", "a", "PublishHealthRequest" ]
[ "func", "NewPublishHealthMetricsRequest", "(", "<mask>", "*", "HealthMetadata", ",", "healthMetrics", "[", "]", "*", "TaskHealth", ")", "*", "PublishHealthRequest", "{", "return", "&", "PublishHealthRequest", "{", "Metadata", ":", "metadata", ",", "Tasks", ":", "h...
22,895
all-22896
[ "UnmarshalPublicKey", "converts", "a", "protobuf", "serialized", "public", "key", "into", "its", "representative", "object" ]
[ "func", "UnmarshalPublicKey", "(", "data", "[", "]", "byte", ")", "(", "PubKey", ",", "error", ")", "{", "pmes", ":=", "new", "(", "pb", ".", "PublicKey", ")", "\n", "err", ":=", "proto", ".", "Unmarshal", "(", "data", ",", "pmes", ")", "\n", "if",...
22,896
all-22897
[ "StorageVolumeDescriptionUpdate", "updates", "the", "description", "of", "a", "storage", "volume", "." ]
[ "func", "StorageVolumeDescriptionUpdate", "(", "tx", "*", "sql", ".", "Tx", ",", "volumeID", "int64", ",", "description", "string", ")", "error", "{", "_", ",", "err", ":=", "tx", ".", "Exec", "(", "\"", "\"", ",", "<mask>", ",", "volumeID", ")", "\n",...
22,897
all-22898
[ "TODO", "(", "krzyzacy", ")", ":", "Move", "this", "logic", "into", "github", "/", "reporter", "once", "we", "unify", "all", "reporting", "logic", "to", "crier" ]
[ "func", "ShouldReport", "(", "pj", "prowapi", ".", "ProwJob", ",", "validTypes", "[", "]", "prowapi", ".", "ProwJobType", ")", "bool", "{", "valid", ":=", "false", "\n", "for", "_", ",", "t", ":=", "range", "validTypes", "{", "if", "pj", ".", "Spec", ...
22,898
all-22899
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "ReplaySnapshotParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree5", "(", "&",...
22,899
all-22900
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "KeyframeRule", ")", "MarshalJSON", "(", ")", "(", "[", "]", "<mask>", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss33", "(", "&", "w", ",", "v", ")", "\n...