id
int32
0
25.3k
idx
stringlengths
5
9
nl_tokens
listlengths
1
418
pl_tokens
listlengths
22
4.98k
200
all-201
[ "ReadArgsV2", "reads", "arg2", "and", "arg3", "from", "a", "reader", "." ]
[ "func", "ReadArgsV2", "(", "r", "tchannel", ".", "ArgReadable", ")", "(", "[", "]", "byte", ",", "[", "]", "byte", ",", "error", ")", "{", "<mask>", "arg2", ",", "arg3", "[", "]", "byte", "\n\n", "if", "err", ":=", "tchannel", ".", "NewArgReader", ...
201
all-202
[ "WithNodeID", "ID", "of", "the", "node", "to", "resolve", "." ]
[ "func", "(", "p", "ResolveNodeParams", ")", "WithNodeID", "(", "nodeID", "cdp", ".", "NodeID", ")", "*", "ResolveNodeParams", "{", "p", ".", "NodeID", "=", "nodeID", "\n", "<mask>", "&", "p", "\n", "}" ]
202
all-203
[ "New", "creates", "a", "store", "where", "the", "given", "namespaces", "will", "be", "created", "as", "initial", "directories", "." ]
[ "func", "New", "(", "namespaces", "...", "string", ")", "<mask>", "{", "s", ":=", "newStore", "(", "namespaces", "...", ")", "\n", "s", ".", "clock", "=", "clockwork", ".", "NewRealClock", "(", ")", "\n", "return", "s", "\n", "}" ]
203
all-204
[ "Verify", "creates", "a", "signature", "for", "buf", "comparing", "it", "against", "the", "URL", "-", "safe", "base64", "encoded", "sig", "and", "returning", "the", "decoded", "signature", ".", "If", "the", "sig", "is", "invalid", "then", "ErrInvalidSignature"...
[ "func", "(", "es", "*", "EccSigner", ")", "Verify", "(", "buf", ",", "sig", "[", "]", "byte", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "<mask>", "err", "error", "\n\n", "// decode", "dec", ",", "err", ":=", "b64", ".", "DecodeString", ...
204
all-205
[ "AddHandler", "registers", "a", "new", "RPC", "handler", "in", "a", "given", "namespace", "." ]
[ "func", "(", "s", "*", "Server", ")", "AddHandler", "(", "namespace", "string", ",", "<mask>", "interface", "{", "}", ")", "error", "{", "return", "s", ".", "rpcsrv", ".", "RegisterName", "(", "namespace", ",", "handler", ")", "\n", "}" ]
205
all-206
[ "Start", "starts", "a", "client", "s", "connection", "and", "registers", ".", "The", "client", "responds", "to", "PING", "commands", ".", "All", "messages", "received", "from", "the", "server", "will", "be", "sent", "on", "the", "receive", "channel", ".", ...
[ "func", "(", "c", "*", "Client", ")", "Start", "(", ")", "(", "<-", "chan", "irc", ".", "Message", ",", "chan", "<-", "irc", ".", "Message", ",", "<-", "chan", "error", ",", "error", ",", ")", "{", "if", "err", ":=", "c", ".", "connect", "(", ...
206
all-207
[ "excerpt", "replaces", "middle", "part", "with", "ellipsis", "and", "returns", "a", "double", "-", "quoted", "string", "safely", "escaped", "with", "Go", "syntax", "." ]
[ "func", "excerpt", "(", "str", "<mask>", ",", "pre", ",", "suf", "int", ")", "string", "{", "if", "pre", "+", "suf", ">", "len", "(", "str", ")", "{", "return", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "str", ")", "\n", "}", "\n", "return",...
207
all-208
[ "find", "unix", "home", "directory" ]
[ "func", "homeDir", "(", ")", "(", "string", ",", "error", ")", "{", "if", "h", ":=", "os", ".", "Getenv", "(", "\"", "\"", ")", ";", "h", "!=", "\"", "\"", "{", "return", "h", ",", "nil", "\n", "}", "\n", "h", ",", "err", ":=", "<mask>", "....
208
all-209
[ "convertDockerImageReference", "takes", "an", "image", "API", "DockerImageReference", "value", "and", "returns", "a", "reference", "we", "can", "actually", "use", ";", "currently", "OpenShift", "stores", "the", "cluster", "-", "internal", "service", "IPs", "here", ...
[ "func", "(", "c", "*", "openshiftClient", ")", "convertDockerImageReference", "(", "ref", "string", ")", "(", "string", ",", "error", ")", "{", "<mask>", ":=", "strings", ".", "SplitN", "(", "ref", ",", "\"", "\"", ",", "2", ")", "\n", "if", "len", "...
209
all-210
[ "kubeEnv", "transforms", "a", "mapping", "of", "environment", "variables", "into", "their", "serialized", "form", "for", "a", "PodSpec", "sorting", "by", "the", "name", "of", "the", "env", "vars" ]
[ "func", "kubeEnv", "(", "environment", "map", "[", "string", "]", "string", ")", "[", "]", "coreapi", ".", "EnvVar", "{", "var", "keys", "[", "]", "string", "\n", "for", "key", ":=", "range", "environment", "{", "keys", "=", "append", "(", "keys", ",...
210
all-211
[ "selectTransferEncoding", "scans", "content", "for", "non", "-", "ASCII", "characters", "and", "selects", "b", "or", "q", "encoding", "." ]
[ "func", "selectTransferEncoding", "(", "<mask>", "[", "]", "byte", ",", "quoteLineBreaks", "bool", ")", "transferEncoding", "{", "if", "len", "(", "content", ")", "==", "0", "{", "return", "te7Bit", "\n", "}", "\n", "// Binary chars remaining before we choose b64 ...
211
all-212
[ "HasAuthProviderX509CertURL", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "i", "*", "IntegrationGCPCreateRequest", ")", "HasAuthProviderX509CertURL", "(", ")", "bool", "{", "if", "i", "!=", "nil", "&&", "i", ".", "AuthProviderX509CertURL", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n"...
212
all-213
[ "InitPlugin", "creates", "an", "instance", "of", "the", "named", "plugin", "." ]
[ "func", "InitDbProvider", "(", "name", "string", ",", "configFilePath", "string", ")", "(", "DbInterface", ",", "error", ")", "{", "var", "dbprovider", "DbInterface", "\n\n", "if", "name", "==", "\"", "\"", "{", "logger", ".", "Get", "(", ")", ".", "Info...
213
all-214
[ "/", "*", "Signal", "sends", "the", "running", "command", "the", "passed", "in", "signal", ".", "It", "does", "not", "wait", "for", "the", "process", "to", "exit", "." ]
[ "func", "(", "s", "*", "Session", ")", "Signal", "(", "signal", "os", ".", "Signal", ")", "*", "Session", "{", "if", "s", ".", "processIsAlive", "(", ")", "{", "s", ".", "Command", ".", "<mask>", ".", "Signal", "(", "signal", ")", "\n", "}", "\n"...
214
all-215
[ "Restart", "restarts", "a", "machine", "which", "is", "known", "to", "be", "running", "." ]
[ "func", "(", "d", "*", "Driver", ")", "Restart", "(", ")", "error", "{", "if", "err", ":=", "d", ".", "Stop", "(", ")", ";", "<mask>", "!=", "nil", "{", "return", "err", "\n", "}", "\n\n", "return", "d", ".", "Start", "(", ")", "\n", "}" ]
215
all-216
[ "GetMulti", "is", "a", "batch", "version", "of", "Get", ".", "The", "returned", "map", "from", "keys", "to", "items", "may", "have", "fewer", "elements", "than", "the", "input", "slice", "due", "to", "memcache", "cache", "misses", ".", "Each", "key", "mu...
[ "func", "GetMulti", "(", "c", "context", ".", "Context", ",", "key", "[", "]", "string", ")", "(", "map", "[", "string", "]", "*", "Item", ",", "error", ")", "{", "if", "len", "(", "<mask>", ")", "==", "0", "{", "return", "nil", ",", "nil", "\n...
216
all-217
[ "Host", "lets", "you", "specify", "the", "host", "(", "s", ")", "the", "route", "is", "available", "for" ]
[ "func", "(", "r", "*", "Router", ")", "Host", "(", "hosts", "...", "string", ")", "*", "Router", "{", "c", ":=", "r", ".", "route", ".", "<mask>", "(", ")", "\n", "c", ".", "Hosts", "=", "hosts", "\n", "return", "r", ".", "clone", "(", "c", "...
217
all-218
[ "Exec", "executes", "the", "XPath", "expression", "xp", "against", "the", "tree", "t", "with", "the", "namespace", "mappings", "ns", "." ]
[ "func", "Exec", "(", "n", "*", "parser", ".", "Node", ",", "t", "tree", ".", "Node", ",", "ns", "map", "[", "string", "]", "string", ",", "fns", "map", "[", "xml", ".", "Name", "]", "<mask>", ".", "Wrap", ",", "v", "map", "[", "string", "]", ...
218
all-219
[ "HasOverallStateModified", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "m", "*", "Monitor", ")", "HasOverallStateModified", "(", ")", "bool", "{", "if", "m", "!=", "nil", "&&", "m", ".", "OverallStateModified", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n", "}" ]
219
all-220
[ "attach", "a", "range", "of", "a", "buffer", "object", "s", "data", "store", "to", "a", "buffer", "texture", "object" ]
[ "func", "TexBufferRange", "(", "target", "uint32", ",", "internalformat", "uint32", ",", "buffer", "uint32", ",", "offset", "int", ",", "size", "int", ")", "{", "C", ".", "glowTexBufferRange", "(", "gpTexBufferRange", ",", "(", "C", ".", "GLenum", ")", "("...
220
all-221
[ "dropMetricName", "is", "a", "cached", "version", "of", "dropMetricName", "." ]
[ "func", "(", "enh", "*", "EvalNodeHelper", ")", "dropMetricName", "(", "l", "labels", ".", "Labels", ")", "labels", ".", "Labels", "{", "if", "enh", ".", "dmn", "==", "nil", "{", "enh", ".", "dmn", "=", "make", "(", "map", "[", "uint64", "]", "labe...
221
all-222
[ "WithURLRegex", "regex", "pattern", "for", "the", "URLs", "of", "the", "resources", "to", "set", "breakpoints", "on", ".", "Either", "url", "or", "urlRegex", "must", "be", "specified", "." ]
[ "func", "(", "p", "SetBreakpointByURLParams", ")", "WithURLRegex", "(", "urlRegex", "<mask>", ")", "*", "SetBreakpointByURLParams", "{", "p", ".", "URLRegex", "=", "urlRegex", "\n", "return", "&", "p", "\n", "}" ]
222
all-223
[ "Offset", "adds", "OFFSET", "clause", "to", "the", "Condition", "and", "returns", "it", "for", "method", "chain", "." ]
[ "func", "(", "c", "*", "Condition", ")", "Offset", "(", "<mask>", "int", ")", "*", "Condition", "{", "return", "c", ".", "appendQuery", "(", "700", ",", "Offset", ",", "offset", ")", "\n", "}" ]
223
all-224
[ "IsVmdkDatastorePath", "ensures", "that", "a", "string", "can", "be", "parsed", "as", "a", "datastore", "path", "pointing", "to", "a", "virtual", "disk", ".", "This", "only", "checks", "the", "validity", "of", "the", "path", "not", "whether", "or", "not", ...
[ "func", "IsVmdkDatastorePath", "(", "p", "string", ")", "bool", "{", "dp", ",", "success", ":=", "DatastorePathFromString", "(", "p", ")", "\n", "if", "!", "success", "{", "log", ".", "Printf", "(", "\"", "\"", ",", "p", ")", "\n", "return", "false", ...
224
all-225
[ "Readlink", "returns", "the", "file", "pointed", "to", "by", "the", "given", "soft", "link", "or", "an", "error", "of", "type", "PathError", "otherwise", ".", "This", "mimics", "the", "os", ".", "Readlink", "()", "function", "but", "works", "around", "a", ...
[ "func", "Readlink", "(", "name", "string", ")", "(", "string", ",", "error", ")", "{", "for", "len", ":=", "128", ";", ";", "len", "*=", "2", "{", "b", ":=", "<mask>", "(", "[", "]", "byte", ",", "len", ")", "\n", "n", ",", "e", ":=", "syscal...
225
all-226
[ "Unmarshal", "unmarshals", "the", "item", "in", "an", "event", "into", "a", "protobuf", "message", "." ]
[ "func", "(", "e", "*", "Event", ")", "Unmarshal", "(", "key", "*", "string", ",", "val", "proto", ".", "Message", ")", "error", "{", "if", "err", ":=", "CheckType", "(", "e", ".", "Template", ",", "val", ")", ";", "err", "!=", "nil", "{", "return...
226
all-227
[ "Inspect", "returns", "various", "information", "for", "(", "skopeo", "inspect", ")", "parsed", "from", "the", "manifest", "and", "configuration", "." ]
[ "func", "(", "m", "*", "Schema2", ")", "Inspect", "(", "configGetter", "func", "(", "types", ".", "BlobInfo", ")", "(", "[", "]", "byte", ",", "error", ")", ")", "(", "*", "types", ".", "ImageInspectInfo", ",", "error", ")", "{", "config", ",", "er...
227
all-228
[ "publishEntries", "writes", "committed", "log", "entries", "to", "commit", "channel", "and", "returns", "whether", "all", "entries", "could", "be", "published", "." ]
[ "func", "(", "rc", "*", "raftNode", ")", "publishEntries", "(", "ents", "[", "]", "raftpb", ".", "Entry", ")", "bool", "{", "for", "i", ":=", "range", "ents", "{", "switch", "ents", "[", "i", "]", ".", "Type", "{", "case", "raftpb", ".", "EntryNorm...
228
all-229
[ "Create", "a", "new", "workManager", "with", "input", "and", "output", "channels", "with", "a", "given", "list", "of", "options" ]
[ "func", "NewWorkManager", "(", ")", "*", "workManager", "{", "<mask>", "fileopts", "[", "]", "fileseq", ".", "FileOption", "\n", "if", "Options", ".", "AllFiles", "{", "fileopts", "=", "append", "(", "fileopts", ",", "fileseq", ".", "HiddenFiles", ")", "\n...
229
all-230
[ "attach", "multiple", "buffer", "objects", "to", "a", "vertex", "array", "object" ]
[ "func", "VertexArrayVertexBuffers", "(", "vaobj", "uint32", ",", "<mask>", "uint32", ",", "count", "int32", ",", "buffers", "*", "uint32", ",", "offsets", "*", "int", ",", "strides", "*", "int32", ")", "{", "C", ".", "glowVertexArrayVertexBuffers", "(", "gpV...
230
all-231
[ "WatchByIndex", "watches", "items", "in", "a", "collection", "that", "match", "a", "particular", "index" ]
[ "func", "(", "c", "*", "readonlyCollection", ")", "WatchByIndex", "(", "index", "*", "<mask>", ",", "val", "interface", "{", "}", ")", "(", "watch", ".", "Watcher", ",", "error", ")", "{", "eventCh", ":=", "make", "(", "chan", "*", "watch", ".", "Eve...
231
all-232
[ "HasTimeRange", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "q", "*", "QueryConfig", ")", "HasTimeRange", "(", ")", "bool", "{", "if", "q", "!=", "nil", "&&", "q", ".", "TimeRange", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n", "}" ]
232
all-233
[ "Close", "is", "used", "to", "stop", "the", "network", "transport", "." ]
[ "func", "(", "n", "*", "NetworkTransport", ")", "Close", "(", ")", "error", "{", "n", ".", "shutdownLock", ".", "Lock", "(", ")", "\n", "defer", "n", ".", "shutdownLock", ".", "Unlock", "(", ")", "\n\n", "if", "!", "n", ".", "shutdown", "{", "<mask...
233
all-234
[ "validate", "ensures", "that", "this", "configuration", "is", "well", "-", "formed", "." ]
[ "func", "(", "c", "*", "ConsumerConfig", ")", "validate", "(", ")", "error", "{", "if", "len", "(", "c", ".", "Topic", ")", "==", "0", "{", "return", "errors", ".", "New", "(", "\"", "\"", ")", "\n", "}", "\n\n", "if", "len", "(", "c", ".", "...
234
all-235
[ "CreatePod", "creates", "a", "pod", "in", "the", "client", "s", "specified", "namespace", ".", "Analogous", "to", "kubectl", "create", "pod", "--", "namespace", "=", "client", ".", "namespace" ]
[ "func", "(", "c", "*", "Client", ")", "CreatePod", "(", "p", "v1", ".", "Pod", ")", "(", "Pod", ",", "error", ")", "{", "c", ".", "log", "(", "\"", "\"", ",", "p", ")", "\n", "var", "retPod", "Pod", "\n", "err", ":=", "c", ".", "request", "...
235
all-236
[ "configureEnvironmentForInstall", "sets", "GOPATH", "and", "GOBIN", "so", "that", "vendored", "linters", "can", "be", "installed" ]
[ "func", "configureEnvironmentForInstall", "(", ")", "{", "if", "config", ".", "Update", "{", "warning", "(", "`Linters are now vendored by default, --update ignored. The original\nbehaviour can be re-enabled with --no-vendored-linters.\n\nTo request an update for a vendored linter file an is...
236
all-237
[ "NewLogger", "creates", "and", "returns", "new", "logger", "instance", "with", "provided", "name", "log", "level", "handlers", "and", "buffer", "length", ".", "If", "a", "logger", "with", "the", "same", "name", "already", "exists", "it", "will", "be", "repla...
[ "func", "NewLogger", "(", "name", "string", ",", "<mask>", "Level", ",", "handlers", "[", "]", "Handler", ",", "bufferLength", "int", ")", "(", "l", "*", "Logger", ")", "{", "l", "=", "&", "Logger", "{", "Name", ":", "name", ",", "Level", ":", "lev...
237
all-238
[ "UpdateCheck", "determines", "if", "the", "check", "needs", "to", "be", "updated", "(", "new", "metrics", "tags", "etc", ".", ")" ]
[ "func", "(", "cm", "*", "CheckManager", ")", "UpdateCheck", "(", "newMetrics", "<mask>", "[", "string", "]", "*", "api", ".", "CheckBundleMetric", ")", "{", "// only if check manager is enabled", "if", "!", "cm", ".", "enabled", "{", "return", "\n", "}", "\n...
238
all-239
[ "===", "predict_linear", "(", "node", "ValueTypeMatrix", "k", "ValueTypeScalar", ")", "Vector", "===" ]
[ "func", "funcPredictLinear", "(", "vals", "[", "]", "Value", ",", "args", "Expressions", ",", "enh", "*", "EvalNodeHelper", ")", "<mask>", "{", "mat", ":=", "vals", "[", "0", "]", ".", "(", "Matrix", ")", "\n", "duration", ":=", "vals", "[", "1", "]"...
239
all-240
[ "POST", "/", "api", "/", "manager", "/", "projects", "/", ":", "project_id", "/", "scheduled_actions", "Create", "a", "new", "ScheduledAction", "resource", "." ]
[ "func", "(", "loc", "*", "ScheduledActionLocator", ")", "Create", "(", "action", "string", ",", "executionId", "string", ",", "firstOccurrence", "*", "time", ".", "Time", ",", "options", "rsapi", ".", "APIParams", ")", "(", "*", "ScheduledActionLocator", ",", ...
240
all-241
[ "buildAndSelectGuestIPs", "builds", "a", "list", "of", "IP", "addresses", "known", "to", "VMware", "tools", ".", "From", "this", "list", "it", "selects", "the", "first", "IP", "address", "it", "seems", "that", "s", "associated", "with", "a", "default", "gate...
[ "func", "buildAndSelectGuestIPs", "(", "d", "*", "schema", ".", "ResourceData", ",", "guest", "types", ".", "GuestInfo", ")", "error", "{", "log", ".", "Printf", "(", "\"", "\"", ",", "resourceVSphereVirtualMachineIDString", "(", "d", ")", ")", "\n", "var", ...
241
all-242
[ "Clean", "by", "janitor", "script" ]
[ "func", "janitorClean", "(", "resource", "*", "common", ".", "Resource", ",", "flags", "[", "]", "string", ")", "error", "{", "args", ":=", "append", "(", "[", "]", "string", "{", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "format", "(", "resource"...
242
all-243
[ "HasY", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "s", "*", "ScatterplotRequests", ")", "HasY", "(", ")", "bool", "{", "if", "s", "!=", "nil", "&&", "s", ".", "Y", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n", "}" ]
243
all-244
[ "Do", "executes", "CSS", ".", "setEffectivePropertyValueForNode", "against", "the", "provided", "context", "." ]
[ "func", "(", "p", "*", "SetEffectivePropertyValueForNodeParams", ")", "Do", "(", "ctx", "context", ".", "<mask>", ")", "(", "err", "error", ")", "{", "return", "cdp", ".", "Execute", "(", "ctx", ",", "CommandSetEffectivePropertyValueForNode", ",", "p", ",", ...
244
all-245
[ "newConnectionMaker", "returns", "a", "usable", "ConnectionMaker", "seeded", "with", "peers", "making", "outbound", "connections", "from", "localAddr", "and", "listening", "on", "port", ".", "If", "discovery", "is", "true", "ConnectionMaker", "will", "attempt", "to"...
[ "func", "newConnectionMaker", "(", "ourself", "*", "localPeer", ",", "peers", "*", "Peers", ",", "localAddr", "string", ",", "port", "int", ",", "discovery", "bool", ",", "logger", "Logger", ")", "*", "connectionMaker", "{", "actionChan", ":=", "make", "(", ...
245
all-246
[ "getCache", "returns", "the", "cached", "template", "." ]
[ "func", "getCache", "(", "name", "string", ")", "(", "<mask>", ".", "Template", ",", "bool", ")", "{", "cacheMutex", ".", "RLock", "(", ")", "\n", "tpl", ",", "ok", ":=", "cache", "[", "name", "]", "\n", "cacheMutex", ".", "RUnlock", "(", ")", "\n"...
246
all-247
[ "UnmarshalEasyJSON", "satisfies", "easyjson", ".", "Unmarshaler", "." ]
[ "func", "(", "t", "*", "KeyType", ")", "UnmarshalEasyJSON", "(", "in", "*", "jlexer", ".", "Lexer", ")", "{", "switch", "KeyType", "(", "<mask>", ".", "String", "(", ")", ")", "{", "case", "KeyDown", ":", "*", "t", "=", "KeyDown", "\n", "case", "Ke...
247
all-248
[ "operationsByZone", "segments", "a", "slice", "of", "RecordOperations", "by", "their", "zone", "." ]
[ "func", "operationsByZone", "(", "zones", "map", "[", "string", "]", "*", "dns", ".", "ZoneSummary", ",", "ops", "[", "]", "dns", ".", "RecordOperation", ")", "map", "[", "string", "]", "[", "]", "dns", ".", "RecordOperation", "{", "changes", ":=", "ma...
248
all-249
[ "newBuffer", "returns", "a", "new", "buffer", "reading", "from", "r", "at", "the", "given", "offset", "." ]
[ "func", "newBuffer", "(", "r", "io", ".", "Reader", ",", "offset", "int64", ")", "*", "buffer", "{", "return", "&", "<mask>", "{", "r", ":", "r", ",", "offset", ":", "offset", ",", "buf", ":", "make", "(", "[", "]", "byte", ",", "0", ",", "4096...
249
all-250
[ "GetTagsAsUniqueStrings", "gets", "all", "tags", "as", "a", "slice", "of", "unique", "strings", ".", "This", "is", "here", "to", "have", "a", "means", "of", "being", "somewhat", "backwards", "compatible", "with", "previous", "versions", "of", "mention" ]
[ "func", "GetTagsAsUniqueStrings", "(", "prefix", "rune", ",", "str", "string", ",", "terminator", "...", "rune", ")", "(", "strs", "[", "]", "string", ")", "{", "tags", ":=", "GetTags", "(", "prefix", ",", "str", ",", "terminator", "...", ")", "\n", "f...
250
all-251
[ "FetchAnnotations", "retrieves", "all", "annotations", "available", "to", "the", "API", "Token", "." ]
[ "func", "(", "a", "*", "API", ")", "FetchAnnotations", "(", ")", "(", "*", "[", "]", "Annotation", ",", "error", ")", "{", "result", ",", "err", ":=", "a", ".", "Get", "(", "config", ".", "AnnotationPrefix", ")", "\n", "if", "err", "!=", "nil", "...
251
all-252
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "GetMetadataParams", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb12", "(", "&", "w", ",", "v", "...
252
all-253
[ "render", "indexed", "primitives", "from", "array", "data", "taking", "parameters", "from", "memory" ]
[ "func", "MultiDrawElementsIndirect", "(", "<mask>", "uint32", ",", "xtype", "uint32", ",", "indirect", "unsafe", ".", "Pointer", ",", "drawcount", "int32", ",", "stride", "int32", ")", "{", "C", ".", "glowMultiDrawElementsIndirect", "(", "gpMultiDrawElementsIndirect...
253
all-254
[ "Search", "the", "network", "for", "SSDP", "devices", "using", "the", "given", "search", "string", "and", "duration", "to", "discover", "new", "devices", ".", "This", "function", "will", "return", "an", "array", "of", "SearchReponses", "discovered", "." ]
[ "func", "Search", "(", "st", "string", ",", "mx", "time", ".", "Duration", ")", "(", "[", "]", "SearchResponse", ",", "error", ")", "{", "<mask>", ",", "err", ":=", "listenForSearchResponses", "(", ")", "\n", "if", "err", "!=", "nil", "{", "return", ...
254
all-255
[ "Arbitrary", "numbers", "used", "to", "do", "a", "simple", "topological", "sort", "of", "resources", "." ]
[ "func", "depTier", "(", "disco", "discovery", ".", "OpenAPISchemaInterface", ",", "mapper", "meta", ".", "RESTMapper", ",", "o", "schema", ".", "ObjectKind", ")", "(", "int", ",", "error", ")", "{", "gvk", ":=", "o", ".", "GroupVersionKind", "(", ")", "\...
255
all-256
[ "ParseVersion", "parses", "a", "version", "of", "the", "form", "12", ".", "34", ".", "56", "-", "abcd", ".", "Non", "-", "negative", "integer", "components", "are", "separated", "by", "dots", ".", "An", "arbitrary", "suffix", "may", "appear", "after", "-...
[ "func", "ParseVersion", "(", "vs", "string", ")", "(", "Version", ",", "error", ")", "{", "i", ":=", "strings", ".", "IndexByte", "(", "vs", ",", "'-'", ")", "\n", "if", "i", ">=", "0", "{", "vs", "=", "vs", "[", ":", "i", "]", "\n", "}", "\n...
256
all-257
[ "Flush", "the", "response" ]
[ "func", "(", "w", "*", "<mask>", ")", "Flush", "(", ")", "{", "if", "f", ",", "ok", ":=", "w", ".", "ResponseWriter", ".", "(", "http", ".", "Flusher", ")", ";", "ok", "{", "f", ".", "Flush", "(", ")", "\n", "}", "\n", "}" ]
257
all-258
[ "flattenClusterHostGroup", "saves", "a", "ClusterHostGroup", "into", "the", "supplied", "ResourceData", "." ]
[ "func", "flattenClusterHostGroup", "(", "d", "*", "schema", ".", "ResourceData", ",", "obj", "*", "types", ".", "ClusterHostGroup", ")", "error", "{", "var", "hostIDs", "[", "]", "string", "\n", "for", "_", ",", "v", ":=", "range", "obj", ".", "Host", ...
258
all-259
[ "determine", "if", "a", "name", "corresponds", "to", "a", "program", "pipeline", "object" ]
[ "func", "IsProgramPipeline", "(", "pipeline", "uint32", ")", "bool", "{", "<mask>", ":=", "C", ".", "glowIsProgramPipeline", "(", "gpIsProgramPipeline", ",", "(", "C", ".", "GLuint", ")", "(", "pipeline", ")", ")", "\n", "return", "ret", "==", "TRUE", "\n"...
259
all-260
[ "Copy", "returns", "a", "deep", "copy", "of", "this", "configuration", "." ]
[ "func", "(", "c", "*", "RetryConfig", ")", "Copy", "(", ")", "*", "RetryConfig", "{", "if", "c", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "<mask>", "o", "RetryConfig", "\n\n", "o", ".", "Attempts", "=", "c", ".", "Attempts", "\n\n", "o...
260
all-261
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "CreateStyleSheetReturns", ")", "UnmarshalJSON", "(", "data", "[", "]", "<mask>", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss58", "(", "&",...
261
all-262
[ "set", "front", "and", "/", "or", "back", "function", "and", "reference", "value", "for", "stencil", "testing" ]
[ "func", "StencilFuncSeparate", "(", "face", "uint32", ",", "xfunc", "uint32", ",", "ref", "int32", ",", "mask", "uint32", ")", "{", "syscall", ".", "Syscall6", "(", "gpStencilFuncSeparate", ",", "4", ",", "uintptr", "(", "face", ")", ",", "uintptr", "(", ...
262
all-263
[ "DeleteSnapshot", "deletes", "a", "specified", "snapshot" ]
[ "func", "(", "c", "*", "Client", ")", "DeleteSnapshot", "(", "snapshotID", "string", ")", "(", "*", "http", ".", "Header", ",", "error", ")", "{", "url", ":=", "snapshotColPath", "(", ")", "+", "slash", "(", "snapshotID", ")", "+", "`?depth=`", "+", ...
263
all-264
[ "IsEquivalent", "returns", "true", "if", "other", "represents", "the", "same", "data", "type", "as", "the", "target", "." ]
[ "func", "(", "o", "*", "ObjectDataType", ")", "IsEquivalent", "(", "other", "DataType", ")", "bool", "{", "a", ",", "ok", ":=", "other", ".", "(", "*", "ObjectDataType", ")", "\n", "if", "!", "ok", "{", "return", "false", "\n", "}", "\n", "if", "o"...
264
all-265
[ "SelectPath", "is", "a", "wrapper", "around", "gtk_icon_view_select_path", "()", "." ]
[ "func", "(", "v", "*", "IconView", ")", "SelectPath", "(", "<mask>", "*", "TreePath", ")", "{", "C", ".", "gtk_icon_view_select_path", "(", "v", ".", "native", "(", ")", ",", "path", ".", "native", "(", ")", ")", "\n", "}" ]
265
all-266
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "CreateStyleSheetParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "<mask>", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss59", "(", "&", ...
266
all-267
[ "LoadFromPngFile", "Open", "a", "png", "file" ]
[ "func", "LoadFromPngFile", "(", "filePath", "string", ")", "(", "<mask>", ".", "Image", ",", "error", ")", "{", "// Open file", "f", ",", "err", ":=", "os", ".", "OpenFile", "(", "filePath", ",", "0", ",", "0", ")", "\n", "if", "err", "!=", "nil", ...
267
all-268
[ "Locator", "returns", "a", "locator", "for", "the", "given", "resource" ]
[ "func", "(", "r", "*", "Permission", ")", "Locator", "(", "api", "*", "API", ")", "*", "PermissionLocator", "{", "for", "_", ",", "l", ":=", "<mask>", "r", ".", "Links", "{", "if", "l", "[", "\"", "\"", "]", "==", "\"", "\"", "{", "return", "ap...
268
all-269
[ "hideConsoleWindowOnWindows", "will", "hide", "the", "console", "window", "that", "is", "showing", "when", "compiling", "on", "Windows", "without", "specifying", "the", "-", "ldflags", "-", "Hwindowsgui", "flag", "." ]
[ "func", "hideConsoleWindowOnWindows", "(", ")", "{", "<mask>", ",", "err", ":=", "getCurrentProcessId", "(", ")", "\n", "if", "err", "!=", "nil", "{", "// Ignore errors because:", "// 1. It is not critical if the console can't be hid.", "// 2. There is nothing to do when erro...
269
all-270
[ "NewStorage", "returns", "a", "remote", ".", "Storage", "." ]
[ "func", "NewStorage", "(", "l", "log", ".", "Logger", ",", "reg", "prometheus", ".", "Registerer", ",", "stCallback", "startTimeCallback", ",", "walDir", "string", ",", "flushDeadline", "time", ".", "Duration", ")", "*", "Storage", "{", "if", "l", "==", "n...
270
all-271
[ "New", "generator", "to", "generate", "refresh", "templates" ]
[ "func", "New", "(", "opts", "*", "<mask>", ")", "(", "*", "genny", ".", "Generator", ",", "error", ")", "{", "g", ":=", "genny", ".", "New", "(", ")", "\n", "if", "err", ":=", "opts", ".", "Validate", "(", ")", ";", "err", "!=", "nil", "{", "...
271
all-272
[ "ShouldPullWithASMAuth", "returns", "true", "if", "this", "container", "needs", "to", "retrieve", "private", "registry", "authentication", "data", "from", "ASM" ]
[ "func", "(", "c", "*", "Container", ")", "ShouldPullWithASMAuth", "(", ")", "bool", "{", "c", ".", "<mask>", ".", "RLock", "(", ")", "\n", "defer", "c", ".", "lock", ".", "RUnlock", "(", ")", "\n\n", "return", "c", ".", "RegistryAuthentication", "!=", ...
272
all-273
[ "creates", "and", "initializes", "a", "buffer", "object", "s", "data", "store" ]
[ "func", "BufferData", "(", "<mask>", "uint32", ",", "size", "int", ",", "data", "unsafe", ".", "Pointer", ",", "usage", "uint32", ")", "{", "syscall", ".", "Syscall6", "(", "gpBufferData", ",", "4", ",", "uintptr", "(", "target", ")", ",", "uintptr", "...
273
all-274
[ "Fatal", "records", "the", "log", "with", "fatal", "level", "and", "exits" ]
[ "func", "(", "l", "*", "Logger", ")", "Fatal", "(", "args", "...", "interface", "{", "}", ")", "{", "l", ".", "Output", "(", "2", ",", "LevelFatal", ",", "fmt", ".", "Sprint", "(", "args", "...", ")", ")", "\n", "<mask>", ".", "Exit", "(", "1",...
274
all-275
[ "encoding", "::", "=", "<", "(", "function", ")", "name", ">", "<bare", "-", "function", "-", "type", ">", "<", "(", "data", ")", "name", ">", "<special", "-", "name", ">" ]
[ "func", "(", "st", "*", "state", ")", "encoding", "(", "params", "bool", ",", "local", "forLocalNameType", ")", "AST", "{", "if", "len", "(", "st", ".", "str", ")", "<", "1", "{", "st", ".", "fail", "(", "\"", "\"", ")", "\n", "}", "\n\n", "if"...
275
all-276
[ "GetIconName", "is", "a", "wrapper", "around", "gtk_tool_button_get_icon_name", "()", "." ]
[ "func", "(", "v", "*", "ToolButton", ")", "GetIconName", "(", ")", "<mask>", "{", "c", ":=", "C", ".", "gtk_tool_button_get_icon_name", "(", "v", ".", "native", "(", ")", ")", "\n", "return", "goString", "(", "c", ")", "\n", "}" ]
276
all-277
[ "PachdDeployment", "returns", "a", "pachd", "k8s", "Deployment", "." ]
[ "func", "PachdDeployment", "(", "opts", "*", "AssetOpts", ",", "objectStoreBackend", "backend", ",", "hostPath", "string", ")", "*", "apps", ".", "Deployment", "{", "// set port defaults", "if", "opts", ".", "PachdPort", "==", "0", "{", "opts", ".", "PachdPort...
277
all-278
[ "filterRecordsForPlan", "removes", "records", "that", "are", "not", "relevant", "to", "the", "planner", ".", "Currently", "this", "just", "removes", "TXT", "records", "to", "prevent", "them", "from", "being", "deleted", "erroneously", "by", "the", "planner", "("...
[ "func", "filterRecordsForPlan", "(", "records", "[", "]", "*", "endpoint", ".", "Endpoint", ")", "[", "]", "*", "endpoint", ".", "Endpoint", "{", "filtered", ":=", "[", "]", "*", "endpoint", ".", "Endpoint", "{", "}", "\n\n", "for", "_", ",", "record",...
278
all-279
[ "NewPatternFromRGBA", "is", "a", "wrapper", "around", "cairo_pattern_create_rgba", "()", "." ]
[ "func", "NewPatternFromRGBA", "(", "red", ",", "green", ",", "blue", ",", "alpha", "float64", ")", "(", "*", "Pattern", ",", "error", ")", "{", "c", ":=", "C", ".", "cairo_pattern_create_rgba", "(", "C", ".", "double", "(", "red", ")", ",", "C", ".",...
279
all-280
[ "List", "lists", "all", "ProwJobs", "in", "the", "indexer", "." ]
[ "func", "(", "s", "*", "prowJobLister", ")", "List", "(", "selector", "labels", ".", "Selector", ")", "(", "<mask>", "[", "]", "*", "v1", ".", "ProwJob", ",", "err", "error", ")", "{", "err", "=", "cache", ".", "ListAll", "(", "s", ".", "indexer", ...
280
all-281
[ "simulateLF", "simulates", "a", "LF", "or", "CR", "+", "LF", "by", "scrolling", "if", "necessary", "to", "handle", "the", "current", "cursor", "position", "and", "scroll", "region", "settings", "in", "which", "case", "it", "returns", "true", ".", "If", "no...
[ "func", "(", "h", "*", "windowsAnsiEventHandler", ")", "simulateLF", "(", "includeCR", "bool", ")", "(", "bool", ",", "error", ")", "{", "if", "h", ".", "wrapNext", "{", "if", "err", ":=", "h", ".", "Flush", "(", ")", ";", "err", "!=", "nil", "{", ...
281
all-282
[ "Copy", "an", "lvm", "container", "." ]
[ "func", "(", "s", "*", "storageLvm", ")", "copyContainer", "(", "target", "<mask>", ",", "source", "container", ",", "refresh", "bool", ")", "error", "{", "targetPool", ",", "err", ":=", "target", ".", "StoragePool", "(", ")", "\n", "if", "err", "!=", ...
282
all-283
[ "ListenAndServeTLSEmbed", "serves", "HTTPS", "requests", "from", "the", "given", "TCP4", "addr", ".", "certData", "and", "keyData", "must", "contain", "valid", "TLS", "certificate", "and", "key", "data", ".", "Pass", "custom", "listener", "to", "Serve", "if", ...
[ "func", "(", "s", "*", "Server", ")", "ListenAndServeTLSEmbed", "(", "addr", "string", ",", "certData", ",", "keyData", "[", "]", "byte", ")", "error", "{", "ln", ",", "err", ":=", "<mask>", ".", "Listen", "(", "\"", "\"", ",", "addr", ")", "\n", "...
283
all-284
[ "Move", "a", "container", "using", "special", "POST", "/", "containers", "/", "<name", ">", "?target", "=", "<member", ">", "API", "." ]
[ "func", "moveClusterContainer", "(", "conf", "*", "config", ".", "Config", ",", "sourceResource", ",", "destResource", ",", "target", "string", ")", "error", "{", "// Parse the source.", "sourceRemote", ",", "sourceName", ",", "err", ":=", "conf", ".", "ParseRem...
284
all-285
[ "GetPrivateKeyOk", "returns", "a", "tuple", "with", "the", "PrivateKey", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "i", "*", "IntegrationGCPCreateRequest", ")", "GetPrivateKeyOk", "(", ")", "(", "string", ",", "bool", ")", "{", "if", "i", "==", "nil", "||", "i", ".", "PrivateKey", "==", "nil", "{", "return", "\"", "\"", ",", "<mask>", "\n", "}", "\n"...
285
all-286
[ "SetShowDefault", "()", "is", "a", "wrapper", "around", "gtk_app_chooser_widget_set_show_default", "()", "." ]
[ "func", "(", "v", "*", "AppChooserWidget", ")", "SetShowDefault", "(", "<mask>", "bool", ")", "{", "C", ".", "gtk_app_chooser_widget_set_show_default", "(", "v", ".", "native", "(", ")", ",", "gbool", "(", "setting", ")", ")", "\n", "}" ]
286
all-287
[ "ForwardedOperationResponse", "creates", "a", "response", "that", "forwards", "the", "metadata", "of", "an", "operation", "created", "on", "another", "node", "." ]
[ "func", "ForwardedOperationResponse", "(", "project", "string", ",", "op", "*", "api", ".", "Operation", ")", "Response", "{", "return", "&", "forwardedOperationResponse", "{", "op", ":", "op", ",", "<mask>", ":", "project", ",", "}", "\n", "}" ]
287
all-288
[ "ClearData", "removes", "all", "bar", "from", "chart" ]
[ "func", "(", "b", "*", "BarChart", ")", "ClearData", "(", ")", "{", "b", ".", "mtx", ".", "Lock", "(", ")", "\n", "defer", "b", ".", "mtx", ".", "Unlock", "(", ")", "\n\n", "b", ".", "<mask>", "=", "make", "(", "[", "]", "BarData", ",", "0", ...
288
all-289
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "SetBreakpointParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger11", "(", "&", ...
289
all-290
[ "Stability", ":", "***", "EXPERIMENTAL", "***", "Add", "the", "given", "address", "to", "the", "notification", "denylist", ".", "The", "address", "can", "be", "of", "either", "of", "the", "three", "supported", "address", "type", "namely", "pulse", "email", "...
[ "func", "(", "notify", "*", "Notify", ")", "AddDenylistAddress", "(", "payload", "*", "NotificationTypeAndAddress", ")", "error", "{", "<mask>", ":=", "tcclient", ".", "Client", "(", "*", "notify", ")", "\n", "_", ",", "_", ",", "err", ":=", "(", "&", ...
290
all-291
[ "Do", "executes", "CacheStorage", ".", "deleteCache", "against", "the", "provided", "context", "." ]
[ "func", "(", "p", "*", "DeleteCacheParams", ")", "Do", "(", "ctx", "<mask>", ".", "Context", ")", "(", "err", "error", ")", "{", "return", "cdp", ".", "Execute", "(", "ctx", ",", "CommandDeleteCache", ",", "p", ",", "nil", ")", "\n", "}" ]
291
all-292
[ "signature", "computes", "and", "returns", "signature", "." ]
[ "func", "signature", "(", "key", "*", "ecdsa", ".", "PrivateKey", ",", "msg", "[", "]", "byte", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "hash", ":=", "ethcrypto", ".", "Keccak256", "(", "msg", ")", "\n", "sig", ",", "err", ":=", "ethc...
292
all-293
[ "Import", "takes", "a", "json", "byte", "array", "and", "inserts", "the", "key", "value", "pairs", "into", "consul", "prefixed", "by", "the", "namespace" ]
[ "func", "(", "c", "*", "cachedLoader", ")", "Import", "(", "data", "[", "]", "byte", ")", "error", "{", "conf", ":=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "err", ":=", "json", ".", "Unmarshal", "(", "data", ",...
293
all-294
[ "AddItem", "is", "a", "wrapper", "around", "gtk_recent_manager_add_item", "()", "." ]
[ "func", "(", "v", "*", "RecentManager", ")", "AddItem", "(", "fileURI", "string", ")", "bool", "{", "cstr", ":=", "C", ".", "CString", "(", "fileURI", ")", "\n", "defer", "C", ".", "<mask>", "(", "unsafe", ".", "Pointer", "(", "cstr", ")", ")", "\n...
294
all-295
[ "datacenterPathFromHostSystemID", "returns", "the", "datacenter", "section", "of", "a", "HostSystem", "s", "inventory", "path", "." ]
[ "func", "datacenterPathFromHostSystemID", "(", "<mask>", "*", "govmomi", ".", "Client", ",", "hsID", "string", ")", "(", "string", ",", "error", ")", "{", "hs", ",", "err", ":=", "hostsystem", ".", "FromID", "(", "client", ",", "hsID", ")", "\n", "if", ...
295
all-296
[ "SubscribeChan", "sends", "all", "events", "to", "the", "provided", "channel" ]
[ "func", "(", "c", "*", "Client", ")", "SubscribeChan", "(", "stream", "string", ",", "ch", "chan", "*", "Event", ")", "error", "{", "var", "connected", "bool", "\n", "errch", ":=", "make", "(", "chan", "error", ")", "\n", "c", ".", "mu", ".", "Lock...
296
all-297
[ "WithArguments", "call", "arguments", ".", "All", "call", "arguments", "must", "belong", "to", "the", "same", "JavaScript", "world", "as", "the", "target", "object", "." ]
[ "func", "(", "p", "CallFunctionOnParams", ")", "WithArguments", "(", "arguments", "[", "]", "*", "CallArgument", ")", "*", "CallFunctionOnParams", "{", "p", ".", "Arguments", "=", "arguments", "\n", "<mask>", "&", "p", "\n", "}" ]
297
all-298
[ "DetachCDDVD", "detaches", "a", "CD", "/", "DVD", "device", "from", "the", "virtual", "machine", "." ]
[ "func", "(", "v", "*", "VM", ")", "DetachCDDVD", "(", "drive", "*", "CDDVDDrive", ")", "error", "{", "if", "running", ",", "_", ":=", "v", ".", "IsRunning", "(", ")", ";", "running", "{", "return", "&", "Error", "{", "Operation", ":", "\"", "\"", ...
298
all-299
[ "NewNode", "returns", "a", "new", "node", "discovery", "." ]
[ "func", "NewNode", "(", "l", "log", ".", "Logger", ",", "inf", "<mask>", ".", "SharedInformer", ")", "*", "Node", "{", "if", "l", "==", "nil", "{", "l", "=", "log", ".", "NewNopLogger", "(", ")", "\n", "}", "\n", "n", ":=", "&", "Node", "{", "l...
299
all-300
[ "GetTitleAlign", "returns", "the", "TitleAlign", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "d", "*", "DistributionDefinition", ")", "GetTitleAlign", "(", ")", "<mask>", "{", "if", "d", "==", "nil", "||", "d", ".", "TitleAlign", "==", "nil", "{", "return", "\"", "\"", "\n", "}", "\n", "return", "*", "d", ".", "TitleAlign", "\n"...