id
int32
0
25.3k
idx
stringlengths
5
9
nl_tokens
listlengths
1
418
pl_tokens
listlengths
22
4.98k
23,200
all-23201
[ "ReadFromResource", "reads", "a", "file", "from", "different", "sources", "at", "the", "moment", "suppoted", "resources", "are", "http", "http", "local", "file", "system", "(", "POSIX", ")" ]
[ "func", "ReadFromResource", "(", "r", "string", ")", "(", "string", ",", "error", ")", "{", "env", ":=", "os", ".", "Getenv", "(", "\"", "\"", ")", "\n\n", "// Hack in here for local bootstrap override", "devMode", ":=", "os", ".", "Getenv", "(", "\"", "\"...
23,201
all-23202
[ "CreateCheckBundle", "creates", "a", "new", "check", "bundle", "(", "check", ")", "." ]
[ "func", "(", "a", "*", "API", ")", "CreateCheckBundle", "(", "cfg", "*", "CheckBundle", ")", "(", "*", "CheckBundle", ",", "error", ")", "{", "if", "cfg", "==", "nil", "{", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ")", "\n", "...
23,202
all-23203
[ "HasDisplayFormat", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "t", "*", "TraceServiceDefinition", ")", "HasDisplayFormat", "(", ")", "bool", "{", "if", "t", "!=", "nil", "&&", "t", ".", "DisplayFormat", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n", "}" ]
23,203
all-23204
[ "Check", "that", "cluster", "-", "related", "preconditions", "are", "met", "for", "bootstrapping", "or", "joining", "a", "cluster", "." ]
[ "func", "membershipCheckClusterStateForBootstrapOrJoin", "(", "tx", "*", "<mask>", ".", "ClusterTx", ")", "error", "{", "nodes", ",", "err", ":=", "tx", ".", "Nodes", "(", ")", "\n", "if", "err", "!=", "nil", "{", "return", "errors", ".", "Wrap", "(", "e...
23,204
all-23205
[ "HasEmail", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "c", "*", "CreatedBy", ")", "HasEmail", "(", ")", "bool", "{", "if", "c", "!=", "nil", "&&", "c", ".", "Email", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n", "}" ]
23,205
all-23206
[ "SetDOMStorageItem", "[", "no", "description", "]", ".", "See", ":", "https", ":", "//", "chromedevtools", ".", "github", ".", "io", "/", "devtools", "-", "protocol", "/", "tot", "/", "DOMStorage#method", "-", "setDOMStorageItem", "parameters", ":", "storageID...
[ "func", "SetDOMStorageItem", "(", "storageID", "*", "StorageID", ",", "key", "string", ",", "value", "string", ")", "*", "SetDOMStorageItemParams", "{", "return", "&", "SetDOMStorageItemParams", "{", "StorageID", ":", "storageID", ",", "Key", ":", "key", ",", ...
23,206
all-23207
[ "EncodeSQL", "performs", "the", "SQL", "encoding", "for", "InsertValues", "." ]
[ "func", "(", "iv", "InsertValues", ")", "EncodeSQL", "(", "buf", "*", "<mask>", ".", "Buffer", ")", "{", "for", "i", ",", "rows", ":=", "range", "iv", "{", "if", "i", "!=", "0", "{", "buf", ".", "WriteString", "(", "\"", "\"", ")", "\n", "}", "...
23,207
all-23208
[ "UnmarshalJSON", "implements", "the", "json", ".", "Unmarshaler", "interface", "." ]
[ "func", "(", "prm", "*", "prmMatchRepository", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "*", "prm", "=", "prmMatchRepository", "{", "}", "\n", "var", "tmp", "prmMatchRepository", "\n", "if", "err", ":=", "paranoidUnmarshalJSONO...
23,208
all-23209
[ "GetAccessRoleOk", "returns", "a", "tuple", "with", "the", "AccessRole", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "u", "*", "User", ")", "GetAccessRoleOk", "(", ")", "(", "string", ",", "bool", ")", "{", "if", "u", "==", "nil", "||", "u", ".", "AccessRole", "==", "nil", "{", "return", "\"", "\"", ",", "false", "\n", "}", "\n", "return", "*", "...
23,209
all-23210
[ "Addr", "returns", "binded", "socket", "address", ".", "For", "bind", "port", "0", "in", "tests" ]
[ "func", "(", "rcv", "*", "UDP", ")", "Addr", "(", ")", "net", ".", "Addr", "{", "if", "rcv", ".", "conn", "==", "nil", "{", "return", "nil", "\n", "}", "\n", "return", "rcv", ".", "<mask>", ".", "LocalAddr", "(", ")", "\n", "}" ]
23,210
all-23211
[ "MatchedRoles", "return", "defined", "roles", "from", "user" ]
[ "func", "MatchedRoles", "(", "req", "*", "http", ".", "Request", ",", "user", "<mask>", "{", "}", ")", "[", "]", "string", "{", "return", "Global", ".", "MatchedRoles", "(", "req", ",", "user", ")", "\n", "}" ]
23,211
all-23212
[ "SetValueWidth", "changes", "width", "of", "the", "value", "panel", "on", "the", "left" ]
[ "func", "(", "b", "*", "SparkChart", ")", "SetValueWidth", "(", "width", "int", ")", "{", "b", ".", "mtx", ".", "Lock", "(", ")", "\n", "defer", "b", ".", "mtx", ".", "Unlock", "(", ")", "\n\n", "b", ".", "valueWidth", "=", "<mask>", "\n", "}" ]
23,212
all-23213
[ "newPipelineHandler", "returns", "a", "handler", "for", "handling", "raft", "messages", "from", "pipeline", "for", "RaftPrefix", ".", "The", "handler", "reads", "out", "the", "raft", "message", "from", "request", "body", "and", "forwards", "it", "to", "the", "...
[ "func", "newPipelineHandler", "(", "t", "*", "Transport", ",", "r", "Raft", ",", "cid", "<mask>", ".", "ID", ")", "http", ".", "Handler", "{", "return", "&", "pipelineHandler", "{", "lg", ":", "t", ".", "Logger", ",", "localID", ":", "t", ".", "ID", ...
23,213
all-23214
[ "HasMustShowErrors", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "w", "*", "Widget", ")", "HasMustShowErrors", "(", ")", "bool", "{", "if", "w", "!=", "nil", "&&", "w", ".", "MustShowErrors", "!=", "nil", "{", "return", "<mask>", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
23,214
all-23215
[ "Get", "gets", "the", "named", "provisioner", "from", "the", "registry", "." ]
[ "func", "Get", "(", "name", "string", ")", "(", "Provisioner", ",", "error", ")", "{", "pFunc", ",", "ok", ":=", "provisioners", "[", "<mask>", "]", "\n", "if", "!", "ok", "{", "return", "nil", ",", "errors", ".", "Errorf", "(", "\"", "\"", ",", ...
23,215
all-23216
[ "measure", "records", "metrics", "about", "the", "provided", "method", "path", "and", "code", ".", "start", "needs", "to", "be", "recorded", "before", "doing", "the", "request", "." ]
[ "func", "(", "c", "*", "Client", ")", "measure", "(", "method", ",", "path", "string", ",", "<mask>", "int", ",", "start", "time", ".", "Time", ")", "{", "if", "c", ".", "metrics", "==", "nil", "{", "return", "\n", "}", "\n", "c", ".", "metrics",...
23,216
all-23217
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "SetDiscoverTargetsParams", ")", "UnmarshalJSON", "(", "<mask>", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget1", "(", "...
23,217
all-23218
[ "=============================================================================", "These", "functions", "were", "adapted", "from", "https", ":", "//", "github", ".", "com", "/", "nsqio", "/", "nsq" ]
[ "func", "writeResponse", "(", "w", "*", "bufio", ".", "Writer", ",", "b", "[", "]", "<mask>", ")", "(", "err", "error", ")", "{", "if", "err", "=", "binary", ".", "Write", "(", "w", ",", "binary", ".", "BigEndian", ",", "int32", "(", "len", "(", ...
23,218
all-23219
[ "MethodNotAllowedHandler", "returns", "the", "default", "Mux", "405", "responder", "whenever", "a", "method", "cannot", "be", "resolved", "for", "a", "route", "." ]
[ "func", "(", "mx", "*", "Mux", ")", "MethodNotAllowedHandler", "(", ")", "<mask>", ".", "HandlerFunc", "{", "if", "mx", ".", "methodNotAllowedHandler", "!=", "nil", "{", "return", "mx", ".", "methodNotAllowedHandler", "\n", "}", "\n", "return", "methodNotAllow...
23,219
all-23220
[ "<type", ">", "+" ]
[ "func", "(", "st", "*", "state", ")", "parmlist", "(", ")", "[", "]", "AST", "{", "var", "ret", "[", "]", "AST", "\n", "for", "{", "if", "len", "(", "st", ".", "str", ")", "<", "1", "{", "<mask>", "\n", "}", "\n", "if", "st", ".", "str", ...
23,220
all-23221
[ "ChangeContactHostNotificationTimeperiod", "creates", "a", "new", "CHANGE_CONTACT_HOST_NOTIFICATION_TIMEPERIOD", "Nagios", "command", ".", "Changes", "the", "host", "notification", "timeperiod", "for", "a", "particular", "contact", "to", "what", "is", "specified", "by", "...
[ "func", "ChangeContactHostNotificationTimeperiod", "(", "contact_name", "<mask>", ",", "notification_timeperiod", "string", ",", ")", "*", "livestatus", ".", "Command", "{", "return", "livestatus", ".", "NewCommand", "(", "\"", "\"", ",", "stringifyArg", "(", "\"", ...
23,221
all-23222
[ "GetMaxAge", "parses", "the", "Cache", "-", "Control", "header", "and", "returns", "a", "LifeChanger", "which", "can", "be", "passed", "to", "the", "response", "s", "Reset" ]
[ "func", "GetMaxAge", "(", "r", "*", "http", ".", "Request", ")", "entry", ".", "LifeChanger", "{", "return", "func", "(", ")", "time", ".", "Duration", "{", "cacheControlHeader", ":=", "r", ".", "Header", ".", "Get", "(", "\"", "\"", ")", "\n", "// h...
23,222
all-23223
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "GetSearchResultsReturns", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom32", "(", "&", "w", ",", "v", "...
23,223
all-23224
[ "determine", "if", "a", "name", "corresponds", "to", "a", "buffer", "object" ]
[ "func", "IsBuffer", "(", "buffer", "uint32", ")", "bool", "{", "ret", ":=", "C", ".", "glowIsBuffer", "(", "gpIsBuffer", ",", "(", "C", ".", "GLuint", ")", "(", "buffer", ")", ")", "\n", "return", "<mask>", "==", "TRUE", "\n", "}" ]
23,224
all-23225
[ "CoveredNetworks", "returns", "the", "list", "of", "RangerEntry", "(", "s", ")", "the", "given", "ipnet", "covers", ".", "That", "is", "the", "networks", "that", "are", "completely", "subsumed", "by", "the", "specified", "network", "." ]
[ "func", "(", "b", "*", "bruteRanger", ")", "CoveredNetworks", "(", "network", "net", ".", "IPNet", ")", "(", "[", "]", "RangerEntry", ",", "error", ")", "{", "entries", ",", "err", ":=", "b", ".", "getEntriesByVersion", "(", "<mask>", ".", "IP", ")", ...
23,225
all-23226
[ "SetBodyStreamWriter", "registers", "the", "given", "sw", "for", "populating", "request", "body", ".", "This", "function", "may", "be", "used", "in", "the", "following", "cases", ":", "*", "if", "request", "body", "is", "too", "big", "(", "more", "than", "...
[ "func", "(", "req", "*", "Request", ")", "SetBodyStreamWriter", "(", "sw", "StreamWriter", ")", "{", "sr", ":=", "NewStreamReader", "(", "sw", ")", "\n", "req", ".", "SetBodyStream", "(", "<mask>", ",", "-", "1", ")", "\n", "}" ]
23,226
all-23227
[ "GetLogSetOk", "returns", "a", "tuple", "with", "the", "LogSet", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "q", "*", "QueryConfig", ")", "GetLogSetOk", "(", ")", "(", "LogSet", ",", "bool", ")", "{", "if", "q", "==", "nil", "||", "q", ".", "LogSet", "==", "nil", "{", "return", "LogSet", "{", "}", ",", "false", "\n", "}", "\n", "return", ...
23,227
all-23228
[ "NewPinger", "returns", "a", "new", "Pinger", "struct", "pointer" ]
[ "func", "NewPinger", "(", ")", "*", "Pinger", "{", "rand", ".", "Seed", "(", "time", ".", "Now", "(", ")", ".", "UnixNano", "(", ")", ")", "\n", "return", "&", "Pinger", "{", "id", ":", "rand", ".", "Intn", "(", "0xffff", ")", ",", "seq", ":", ...
23,228
all-23229
[ "GetPageIterator", "returns", "a", "ConferencePageIterator", "with", "the", "given", "page", "filters", ".", "Call", "iterator", ".", "Next", "()", "to", "get", "the", "first", "page", "of", "resources", "(", "and", "again", "to", "retrieve", "subsequent", "pa...
[ "func", "(", "c", "*", "ConferenceService", ")", "GetPageIterator", "(", "<mask>", "url", ".", "Values", ")", "ConferencePageIterator", "{", "return", "&", "conferencePageIterator", "{", "p", ":", "NewPageIterator", "(", "c", ".", "client", ",", "data", ",", ...
23,229
all-23230
[ "GetStyle", "returns", "the", "Style", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "t", "*", "TileDefRequest", ")", "GetStyle", "(", ")", "TileDefRequestStyle", "{", "if", "t", "==", "nil", "||", "t", ".", "Style", "==", "nil", "{", "return", "TileDefRequestStyle", "{", "}", "\n", "}", "\n", "<mask>", "*", "t", ".", "S...
23,230
all-23231
[ "SetMarkup", "is", "a", "wrapper", "around", "gtk_message_dialog_set_markup", "()", "." ]
[ "func", "(", "v", "*", "MessageDialog", ")", "SetMarkup", "(", "str", "string", ")", "{", "cstr", ":=", "C", ".", "CString", "(", "str", ")", "\n", "defer", "C", ".", "<mask>", "(", "unsafe", ".", "Pointer", "(", "cstr", ")", ")", "\n", "C", ".",...
23,231
all-23232
[ "GetTitle", "returns", "the", "Title", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "d", "*", "Dashboard", ")", "GetTitle", "(", ")", "<mask>", "{", "if", "d", "==", "nil", "||", "d", ".", "Title", "==", "nil", "{", "return", "\"", "\"", "\n", "}", "\n", "return", "*", "d", ".", "Title", "\n", "}" ]
23,232
all-23233
[ "ApplyChanges", "applies", "the", "given", "changes", ".", "Returns", "nil", "if", "the", "operation", "was", "successful", "or", "an", "error", "if", "the", "operation", "failed", "." ]
[ "func", "(", "p", "*", "AlibabaCloudProvider", ")", "applyChangesForPrivateZone", "(", "changes", "*", "plan", ".", "Changes", ")", "error", "{", "log", ".", "Infof", "(", "\"", "\"", ",", "*", "changes", ")", "\n\n", "zones", ",", "err", ":=", "p", "....
23,233
all-23234
[ "Returns", "a", "new", "decoder", ".", "Data", "will", "be", "read", "from", "r", "and", "decoded", "according", "to", "enc", "." ]
[ "func", "NewDecoder", "(", "enc", "*", "Encoding", ",", "r", "<mask>", ".", "Reader", ")", "io", ".", "Reader", "{", "return", "&", "decoder", "{", "enc", ":", "enc", ",", "r", ":", "r", ",", "buf", ":", "bytes", ".", "NewBuffer", "(", "nil", ")"...
23,234
all-23235
[ "fileFunc", "returns", "or", "accumulates", "file", "dependencies", "." ]
[ "func", "fileFunc", "(", "b", "*", "Brain", ",", "used", ",", "<mask>", "*", "dep", ".", "Set", ")", "func", "(", "string", ")", "(", "string", ",", "error", ")", "{", "return", "func", "(", "s", "string", ")", "(", "string", ",", "error", ")", ...
23,235
all-23236
[ "Generate", "n", "passwords", "that", "meet", "the", "given", "requirements" ]
[ "func", "NewPasswords", "(", "reqs", "*", "PasswordStrengthRequirements", ",", "n", "int", ")", "(", "[", "]", "string", ",", "error", ")", "{", "<mask>", "err", "error", "\n", "if", "reqs", "==", "nil", "{", "reqs", "=", "&", "Medium", "\n", "}", "\...
23,236
all-23237
[ "bind", "a", "user", "-", "defined", "varying", "out", "variable", "to", "a", "fragment", "shader", "color", "number", "and", "index" ]
[ "func", "BindFragDataLocationIndexed", "(", "program", "uint32", ",", "colorNumber", "uint32", ",", "index", "uint32", ",", "name", "*", "uint8", ")", "{", "C", ".", "glowBindFragDataLocationIndexed", "(", "gpBindFragDataLocationIndexed", ",", "(", "C", ".", "GLui...
23,237
all-23238
[ "resourceVSphereVirtualMachineCreateBare", "contains", "the", "bare", "metal", "VM", "deploy", "path", ".", "The", "VM", "is", "returned", "." ]
[ "func", "resourceVSphereVirtualMachineCreateBare", "(", "d", "*", "schema", ".", "ResourceData", ",", "meta", "interface", "{", "}", ")", "(", "*", "object", ".", "VirtualMachine", ",", "error", ")", "{", "log", ".", "Printf", "(", "\"", "\"", ",", "resour...
23,238
all-23239
[ "Notification", "that", "a", "container", "was", "moved", ".", "At", "the", "moment", "it", "s", "used", "for", "ceph", "-", "based", "containers", "where", "the", "target", "node", "needs", "to", "create", "the", "appropriate", "mount", "points", "." ]
[ "func", "internalClusterContainerMovedPost", "(", "d", "*", "Daemon", ",", "r", "*", "http", ".", "Request", ")", "Response", "{", "project", ":=", "projectParam", "(", "r", ")", "\n", "containerName", ":=", "mux", ".", "Vars", "(", "r", ")", "[", "\"", ...
23,239
all-23240
[ "Push", "adds", "an", "element", "at", "the", "end", "of", "the", "stack" ]
[ "func", "(", "s", "*", "Stack", ")", "Push", "(", "v", "<mask>", "{", "}", ")", "{", "if", "len", "(", "*", "s", ")", ">=", "s", ".", "BufferSize", "(", ")", "{", "s", ".", "Resize", "(", "calcNewSize", "(", "cap", "(", "*", "s", ")", ")", ...
23,240
all-23241
[ "CreateInlineType", "creates", "a", "new", "inline", "type", "." ]
[ "func", "(", "reg", "*", "TypeRegistry", ")", "CreateInlineType", "(", "name", "string", ")", "*", "gen", ".", "ObjectDataType", "{", "goName", ":=", "toGoTypeName", "(", "<mask>", ")", "\n", "obj", ":=", "gen", ".", "ObjectDataType", "{", "TypeName", ":",...
23,241
all-23242
[ "SaveEntity", "saves", "the", "given", "Identifiable", "into", "the", "server", "." ]
[ "func", "(", "s", "*", "Session", ")", "SaveEntity", "(", "object", "Identifiable", ")", "*", "Error", "{", "url", ",", "berr", ":=", "s", ".", "getPersonalURL", "(", "object", ")", "\n", "if", "berr", "!=", "nil", "{", "return", "berr", "\n", "}", ...
23,242
all-23243
[ "newLine", "creates", "and", "returns", "a", "line", "." ]
[ "func", "newLine", "(", "no", "int", ",", "str", "string", ",", "opts", "*", "Options", ",", "f", "*", "File", ")", "*", "line", "{", "return", "&", "line", "{", "no", ":", "no", ",", "str", ":", "str", ",", "indent", ":", "indent", "(", "str",...
23,243
all-23244
[ "GetThresholdWindows", "returns", "the", "ThresholdWindows", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "o", "*", "<mask>", ")", "GetThresholdWindows", "(", ")", "ThresholdWindows", "{", "if", "o", "==", "nil", "||", "o", ".", "ThresholdWindows", "==", "nil", "{", "return", "ThresholdWindows", "{", "}", "\n", "}", "\n", "return", "*", "o", "...
23,244
all-23245
[ "SetCreatedAt", "sets", "the", "timestamp", "for", "container", "s", "creation", "time" ]
[ "func", "(", "c", "*", "Container", ")", "SetCreatedAt", "(", "createdAt", "time", ".", "Time", ")", "{", "if", "createdAt", ".", "IsZero", "(", ")", "{", "return", "\n", "}", "\n", "c", ".", "<mask>", ".", "Lock", "(", ")", "\n", "defer", "c", "...
23,245
all-23246
[ "native", "returns", "a", "pointer", "to", "the", "underlying", "GtkEntryCompletion", "." ]
[ "func", "(", "v", "*", "EntryCompletion", ")", "native", "(", ")", "*", "C", ".", "GtkEntryCompletion", "{", "if", "v", "==", "nil", "||", "v", ".", "GObject", "==", "nil", "{", "<mask>", "nil", "\n", "}", "\n", "p", ":=", "unsafe", ".", "Pointer",...
23,246
all-23247
[ "GetManageStatusTitleText", "returns", "the", "ManageStatusTitleText", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "w", "*", "Widget", ")", "GetManageStatusTitleText", "(", ")", "string", "{", "if", "w", "==", "nil", "||", "w", ".", "ManageStatusTitleText", "==", "nil", "{", "<mask>", "\"", "\"", "\n", "}", "\n", "return", "*", "w", ".", "ManageStatusT...
23,247
all-23248
[ "GetManifest", "returns", "the", "image", "s", "manifest", "along", "with", "its", "MIME", "type", "(", "which", "may", "be", "empty", "when", "it", "can", "t", "be", "determined", "but", "the", "manifest", "is", "available", ")", ".", "It", "may", "use"...
[ "func", "(", "s", "*", "Source", ")", "GetManifest", "(", "ctx", "context", ".", "Context", ",", "instanceDigest", "*", "digest", ".", "Digest", ")", "(", "[", "]", "byte", ",", "string", ",", "error", ")", "{", "if", "instanceDigest", "!=", "nil", "...
23,248
all-23249
[ "ToHTTP", "writes", "the", "error", "to", "the", "http", "response" ]
[ "func", "ToHTTP", "(", "in", "error", ",", "w", "http", ".", "ResponseWriter", ")", "error", "{", "w", ".", "Header", "(", ")", ".", "Set", "(", "\"", "\"", ",", "\"", "\"", ")", "\n", "if", "err", ",", "ok", ":=", "in", ".", "(", "Error", ")...
23,249
all-23250
[ "MarshalEasyJSON", "satisfies", "easyjson", ".", "Marshaler", "." ]
[ "func", "(", "t", "BreakLocationType", ")", "MarshalEasyJSON", "(", "out", "*", "jwriter", ".", "Writer", ")", "{", "<mask>", ".", "String", "(", "string", "(", "t", ")", ")", "\n", "}" ]
23,250
all-23251
[ "NewMakeMirrorCommand", "returns", "the", "cobra", "command", "for", "makeMirror", "." ]
[ "func", "NewMakeMirrorCommand", "(", ")", "*", "cobra", ".", "Command", "{", "c", ":=", "&", "cobra", ".", "Command", "{", "Use", ":", "\"", "\"", ",", "Short", ":", "\"", "\"", ",", "Run", ":", "makeMirrorCommandFunc", ",", "}", "\n\n", "c", ".", ...
23,251
all-23252
[ "Subscribe", "returns", "a", "new", "Subscription", "for", "the", "given", "topic", ".", "Note", "that", "subscription", "is", "not", "an", "instanteneous", "operation", ".", "It", "may", "take", "some", "time", "before", "the", "subscription", "is", "processe...
[ "func", "(", "p", "*", "PubSub", ")", "Subscribe", "(", "topic", "string", ",", "opts", "...", "SubOpt", ")", "(", "*", "Subscription", ",", "error", ")", "{", "td", ":=", "pb", ".", "TopicDescriptor", "{", "<mask>", ":", "&", "topic", "}", "\n\n", ...
23,252
all-23253
[ "SetTags", "allows", "to", "set", "tags" ]
[ "func", "(", "r", "*", "Registry", ")", "SetTags", "(", "tags", "...", "string", ")", "{", "r", ".", "mutex", ".", "Lock", "(", ")", "\n", "r", ".", "<mask>", "=", "tags", "\n", "r", ".", "mutex", ".", "Unlock", "(", ")", "\n", "}" ]
23,253
all-23254
[ "PublishPacts", "publishes", "a", "set", "of", "pacts", "to", "a", "pact", "broker" ]
[ "func", "(", "p", "*", "PactClient", ")", "PublishPacts", "(", "request", "types", ".", "PublishRequest", ")", "error", "{", "svc", ":=", "p", ".", "publishSvcManager", ".", "NewService", "(", "request", ".", "Args", ")", "\n", "log", ".", "Println", "("...
23,254
all-23255
[ "Specify", "the", "value", "of", "a", "uniform", "variable", "for", "the", "current", "program", "object" ]
[ "func", "Uniform4f", "(", "<mask>", "int32", ",", "v0", "float32", ",", "v1", "float32", ",", "v2", "float32", ",", "v3", "float32", ")", "{", "C", ".", "glowUniform4f", "(", "gpUniform4f", ",", "(", "C", ".", "GLint", ")", "(", "location", ")", ",",...
23,255
all-23256
[ "ContainerRemove", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockClient", ")", "ContainerRemove", "(", "arg0", "context", ".", "Context", ",", "arg1", "string", ",", "arg2", "types", ".", "ContainerRemoveOptions", ")", "error", "{", "<mask>", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ...
23,256
all-23257
[ "CheckFlags", "makes", "sure", "not", "both", "PR", "and", "issues", "are", "ignored" ]
[ "func", "(", "t", "*", "TypeFilterWrapperPlugin", ")", "CheckFlags", "(", ")", "error", "{", "if", "t", ".", "pullRequests", "&&", "t", ".", "<mask>", "{", "return", "fmt", ".", "Errorf", "(", "\"", "\"", ")", "\n", "}", "\n", "return", "nil", "\n", ...
23,257
all-23258
[ "PrependSectionWithoutLabel", "is", "a", "wrapper", "around", "g_menu_prepend_section", "()", "with", "label", "set", "to", "null", "." ]
[ "func", "(", "v", "*", "Menu", ")", "PrependSectionWithoutLabel", "(", "section", "*", "MenuModel", ")", "{", "C", ".", "g_menu_prepend_section", "(", "v", ".", "native", "(", ")", ",", "nil", ",", "<mask>", ".", "native", "(", ")", ")", "\n", "}" ]
23,258
all-23259
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "ExecutionContextDescription", ")", "MarshalJSON", "(", ")", "(", "[", "]", "<mask>", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime27", "(", "&", "w", ",", ...
23,259
all-23260
[ "Prefix", "returns", "an", "AssetPipeline", "that", "prefixes", "URLs", "with", "the", "given", "string" ]
[ "func", "Prefix", "(", "prefix", "string", ",", "p", "AssetPipeline", ")", "AssetPipeline", "{", "if", "<mask>", "==", "\"", "\"", "{", "return", "p", "\n", "}", "\n\n", "return", "&", "prefixPipeline", "{", "prefix", ":", "prefix", ",", "AssetPipeline", ...
23,260
all-23261
[ "Given", "specifies", "a", "provider", "state", ".", "Optional", "." ]
[ "func", "(", "i", "*", "Interaction", ")", "Given", "(", "state", "string", ")", "*", "Interaction", "{", "i", ".", "State", "=", "<mask>", "\n\n", "return", "i", "\n", "}" ]
23,261
all-23262
[ "HasQuery", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "m", "*", "Monitor", ")", "HasQuery", "(", ")", "bool", "{", "if", "m", "!=", "nil", "&&", "m", ".", "Query", "!=", "nil", "{", "return", "<mask>", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
23,262
all-23263
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "StorageID", ")", "UnmarshalJSON", "(", "<mask>", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage", "(", "&", "r", ...
23,263
all-23264
[ "AgentSeal", "encrypts", "message", "using", "client", "s", "public", "key", "and", "packs", "with", "agent", "signature", "." ]
[ "func", "AgentSeal", "(", "<mask>", ",", "clientPub", "[", "]", "byte", ",", "agentKey", "*", "ecdsa", ".", "PrivateKey", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "pubKey", ",", "err", ":=", "ethcrypto", ".", "UnmarshalPubkey", "(", "clientP...
23,264
all-23265
[ "GetTranslatorCredits", "is", "a", "wrapper", "around", "gtk_about_dialog_get_translator_credits", "()", "." ]
[ "func", "(", "v", "*", "AboutDialog", ")", "GetTranslatorCredits", "(", ")", "string", "{", "c", ":=", "C", ".", "gtk_about_dialog_get_translator_credits", "(", "v", ".", "native", "(", ")", ")", "\n", "return", "C", ".", "GoString", "(", "(", "*", "C", ...
23,265
all-23266
[ "UnmarshalBinaryBare", "will", "panic", "if", "ptr", "is", "a", "nil", "-", "pointer", "." ]
[ "func", "(", "cdc", "*", "Codec", ")", "UnmarshalBinaryBare", "(", "bz", "[", "]", "byte", ",", "ptr", "interface", "{", "}", ")", "error", "{", "rv", ":=", "reflect", ".", "ValueOf", "(", "ptr", ")", "\n", "if", "rv", ".", "Kind", "(", ")", "!="...
23,266
all-23267
[ "ImageLastAccessInit", "inits", "the", "last_use_date", "field", "of", "the", "image", "with", "the", "given", "fingerprint", "." ]
[ "func", "(", "c", "*", "Cluster", ")", "ImageLastAccessInit", "(", "fingerprint", "string", ")", "error", "{", "stmt", ":=", "`UPDATE images SET cached=1, last_use_date=strftime(\"%s\") WHERE fingerprint=?`", "\n", "err", ":=", "<mask>", "(", "c", ".", "db", ",", "s...
23,267
all-23268
[ "Delete", "deletes", "the", "entity", "for", "the", "given", "key", "." ]
[ "func", "Delete", "(", "c", "context", ".", "Context", ",", "key", "*", "Key", ")", "error", "{", "err", ":=", "DeleteMulti", "(", "c", ",", "[", "]", "*", "Key", "{", "key", "}", ")", "\n", "if", "me", ",", "<mask>", ":=", "err", ".", "(", "...
23,268
all-23269
[ "CopyTo", "copies", "all", "the", "headers", "to", "dst", "." ]
[ "func", "(", "h", "*", "ResponseHeader", ")", "CopyTo", "(", "dst", "*", "ResponseHeader", ")", "{", "dst", ".", "Reset", "(", ")", "\n\n", "dst", ".", "disableNormalizing", "=", "h", ".", "disableNormalizing", "\n", "dst", ".", "noHTTP11", "=", "h", "...
23,269
all-23270
[ "Main", "draws", "the", "different", "line", "caps", "and", "joins", ".", "This", "should", "only", "be", "used", "during", "testing", "." ]
[ "func", "Main", "(", "gc", "draw2d", ".", "GraphicContext", ",", "ext", "string", ")", "(", "string", ",", "error", ")", "{", "// Draw the line", "const", "offset", "=", "75.0", "\n", "x", ":=", "35.0", "\n", "<mask>", ":=", "[", "]", "draw2d", ".", ...
23,270
all-23271
[ "Process", "method", "starts", "the", "workManager", "by", "processing", "the", "rootPaths", "and", "resolving", "file", "/", "sequence", "listings", "from", "them", ".", "Output", "is", "printed", "according", "to", "application", "Options", ".", "It", "is", ...
[ "func", "(", "w", "*", "workManager", ")", "<mask>", "(", "rootPaths", "[", "]", "string", ")", "error", "{", "if", "w", ".", "hasRun", "{", "return", "errors", ".", "New", "(", "\"", "\"", ")", "\n", "}", "\n\n", "w", ".", "hasRun", "=", "true",...
23,271
all-23272
[ "bind", "a", "named", "buffer", "object" ]
[ "func", "BindBuffer", "(", "target", "uint32", ",", "buffer", "uint32", ")", "{", "C", ".", "glowBindBuffer", "(", "gpBindBuffer", ",", "(", "C", ".", "GLenum", ")", "(", "target", ")", ",", "(", "C", ".", "GLuint", ")", "(", "<mask>", ")", ")", "\...
23,272
all-23273
[ "handlePingReq", "responds", "to", "the", "pingReq", "message", "with", "a", "pingRes", "." ]
[ "func", "(", "c", "*", "Connection", ")", "handlePingReq", "(", "frame", "*", "Frame", ")", "{", "if", "<mask>", ":=", "c", ".", "readState", "(", ")", ";", "state", "!=", "connectionActive", "{", "c", ".", "protocolError", "(", "frame", ".", "Header",...
23,273
all-23274
[ "Helper", "function", "that", "checks", "if", "an", "[]", "asn1", ".", "ObjectIdentifier", "slice", "contains", "an", "asn1", ".", "ObjectIdentifier" ]
[ "func", "SliceContainsOID", "(", "list", "[", "]", "asn1", ".", "ObjectIdentifier", ",", "oid", "asn1", ".", "ObjectIdentifier", ")", "bool", "{", "for", "_", ",", "v", ":=", "<mask>", "list", "{", "if", "oid", ".", "Equal", "(", "v", ")", "{", "retu...
23,274
all-23275
[ "Focus", "implements", "the", "interface", ".", "This", "is", "called", "from", "queue", "context", "so", "be", "careful", "to", "not", "use", "blocking", "calls", "." ]
[ "func", "(", "e", "*", "Edit", ")", "Focus", "(", ")", "{", "if", "e", ".", "cx", "==", "-", "1", "||", "e", ".", "cy", "==", "-", "1", "{", "// || is deliberate to handle \"just in case\"", "e", ".", "cx", "=", "e", ".", "trueX", "\n", "e", ".",...
23,275
all-23276
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "EventListener", ")", "MarshalJSON", "(", ")", "(", "[", "]", "<mask>", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger10", "(", "&", "w", ",", "v", "...
23,276
all-23277
[ "BoundingBoxIntWithPrecision", "returns", "the", "region", "encoded", "by", "the", "integer", "geohash", "with", "the", "specified", "precision", "." ]
[ "func", "BoundingBoxIntWithPrecision", "(", "hash", "uint64", ",", "bits", "uint", ")", "Box", "{", "fullHash", ":=", "<mask>", "<<", "(", "64", "-", "bits", ")", "\n", "latInt", ",", "lngInt", ":=", "deinterleave", "(", "fullHash", ")", "\n", "lat", ":=...
23,277
all-23278
[ "dateToken", "generates", "a", "GitHub", "search", "query", "token", "for", "the", "specified", "date", "range", ".", "See", ":", "https", ":", "//", "help", ".", "github", ".", "com", "/", "articles", "/", "understanding", "-", "the", "-", "search", "-"...
[ "func", "dateToken", "(", "start", ",", "<mask>", "time", ".", "Time", ")", "string", "{", "// GitHub's GraphQL API silently fails if you provide it with an invalid time", "// string.", "// Dates before 1970 (unix epoch) are considered invalid.", "startString", ",", "endString", ...
23,278
all-23279
[ "GetScale", "()", "is", "a", "wrapper", "around", "gtk_print_settings_get_scale", "()", "." ]
[ "func", "(", "<mask>", "*", "PrintSettings", ")", "GetScale", "(", ")", "float64", "{", "c", ":=", "C", ".", "gtk_print_settings_get_scale", "(", "ps", ".", "native", "(", ")", ")", "\n", "return", "float64", "(", "c", ")", "\n", "}" ]
23,279
all-23280
[ "title", ":", "login", "path", ":", "/", "auth", "/", "login", "method", ":", "POST", "consume", ":", "application", "/", "x", "-", "www", "-", "form", "-", "urlencoded", "produce", ":", "application", "/", "json", "responses", ":", "200", ":", "Ok", ...
[ "func", "login", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ")", "(", "err", "error", ")", "{", "params", ":=", "map", "[", "string", "]", "string", "{", "\"", "\"", ":", "r", ".", "URL", ".", "Query", "(", ...
23,280
all-23281
[ "String", "returns", "the", "name", "of", "e" ]
[ "func", "(", "e", "TransactionResultCode", ")", "<mask>", "(", ")", "string", "{", "name", ",", "_", ":=", "transactionResultCodeMap", "[", "int32", "(", "e", ")", "]", "\n", "return", "name", "\n", "}" ]
23,281
all-23282
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "AttachToTargetReturns", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "<mask>", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget28", "(", "&"...
23,282
all-23283
[ "HasLastNotifiedTs", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "g", "*", "GroupData", ")", "HasLastNotifiedTs", "(", ")", "bool", "{", "if", "g", "!=", "nil", "&&", "g", ".", "LastNotifiedTs", "!=", "nil", "{", "return", "<mask>", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
23,283
all-23284
[ "Returns", "how", "many", "nodes", "are", "in", "the", "node", "table", "." ]
[ "func", "(", "s", "*", "<mask>", ")", "NumNodes", "(", ")", "int", "{", "s", ".", "mu", ".", "Lock", "(", ")", "\n", "defer", "s", ".", "mu", ".", "Unlock", "(", ")", "\n", "return", "s", ".", "numNodes", "(", ")", "\n", "}" ]
23,284
all-23285
[ "Prev", "advances", "to", "the", "previous", "position", "." ]
[ "func", "(", "s", "*", "Iterator", ")", "Prev", "(", ")", "{", "y", ".", "AssertTrue", "(", "s", ".", "Valid", "(", ")", ")", "\n", "s", ".", "n", ",", "_", "=", "s", ".", "list", ".", "findNear", "(", "s", ".", "Key", "(", ")", ",", "tru...
23,285
all-23286
[ "WriteToStreamingBytesServer", "writes", "the", "data", "from", "the", "io", ".", "Reader", "to", "the", "StreamingBytesServer", "." ]
[ "func", "WriteToStreamingBytesServer", "(", "<mask>", "io", ".", "Reader", ",", "streamingBytesServer", "StreamingBytesServer", ")", "error", "{", "buf", ":=", "GetBuffer", "(", ")", "\n", "defer", "PutBuffer", "(", "buf", ")", "\n", "_", ",", "err", ":=", "...
23,286
all-23287
[ "If", "n", "is", "an", "*", "ast", ".", "Ident", "isIdent", "returns", "it", ";", "otherwise", "isIdent", "returns", "nil", "." ]
[ "func", "isIdent", "(", "n", "interface", "{", "}", ")", "*", "ast", ".", "Ident", "{", "id", ",", "_", ":=", "n", ".", "(", "*", "ast", ".", "Ident", ")", "\n", "return", "<mask>", "\n", "}" ]
23,287
all-23288
[ "newIncomingContext", "creates", "a", "new", "context", "for", "an", "incoming", "call", "with", "the", "given", "span", "." ]
[ "func", "newIncomingContext", "(", "call", "IncomingCall", ",", "timeout", "time", ".", "Duration", ")", "(", "context", ".", "Context", ",", "context", ".", "CancelFunc", ")", "{", "return", "NewContextBuilder", "(", "timeout", ")", ".", "setIncomingCall", "(...
23,288
all-23289
[ "SetIconFromIconName", "is", "a", "wrapper", "around", "gtk_tooltip_set_icon_from_icon_name", "()", "." ]
[ "func", "(", "t", "*", "Tooltip", ")", "SetIconFromIconName", "(", "iconName", "string", ",", "<mask>", "IconSize", ")", "{", "cstr", ":=", "C", ".", "CString", "(", "iconName", ")", "\n", "defer", "C", ".", "free", "(", "unsafe", ".", "Pointer", "(", ...
23,289
all-23290
[ "buildImplicitLinuxCPUSpec", "builds", "the", "implicit", "task", "CPU", "spec", "when", "task", "CPU", "and", "memory", "limit", "feature", "is", "enabled" ]
[ "func", "(", "task", "*", "Task", ")", "buildImplicitLinuxCPUSpec", "(", ")", "specs", ".", "LinuxCPU", "{", "// If task level CPU limits are missing,", "// aggregate container CPU shares when present", "var", "taskCPUShares", "uint64", "\n", "for", "_", ",", "container",...
23,290
all-23291
[ "Count", "is", "a", "convenience", "for", "checking", "the", "current", "number", "of", "nodes", "in", "the", "cluster", "." ]
[ "func", "Count", "(", "state", "*", "state", ".", "State", ")", "(", "int", ",", "error", ")", "{", "var", "count", "int", "\n", "err", ":=", "state", ".", "Cluster", ".", "Transaction", "(", "func", "(", "tx", "*", "db", ".", "ClusterTx", ")", "...
23,291
all-23292
[ "ReadObject", "gets", "an", "object", "by", "hash", "and", "returns", "it", "directly", "as", "[]", "byte", "." ]
[ "func", "(", "c", "APIClient", ")", "ReadObject", "(", "hash", "string", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "var", "<mask>", "bytes", ".", "Buffer", "\n", "if", "err", ":=", "c", ".", "GetObject", "(", "hash", ",", "&", "buffer", ...
23,292
all-23293
[ "Match", "is", "called", "once", "a", "server", "completes", "writing", "entries", "to", "disk", ":", "either", "the", "leader", "has", "written", "the", "new", "entry", "or", "a", "follower", "has", "replied", "to", "an", "AppendEntries", "RPC", ".", "The...
[ "func", "(", "c", "*", "commitment", ")", "<mask>", "(", "server", "ServerID", ",", "matchIndex", "uint64", ")", "{", "c", ".", "Lock", "(", ")", "\n", "defer", "c", ".", "Unlock", "(", ")", "\n", "if", "prev", ",", "hasVote", ":=", "c", ".", "ma...
23,293
all-23294
[ "WaitForIt", "waits", "for", "a", "service", "or", "URL", "to", "become", "online" ]
[ "func", "WaitForIt", "(", "fullConn", ",", "host", "string", ",", "port", ",", "timeout", "int", ")", "error", "{", "// fullConn := flag.String(\"full-connection\", \"\", \"full connection\")", "// host := flag.String(\"host\", \"\", \"host to connect\")", "// port := flag.Int(\"po...
23,294
all-23295
[ "Scan", "implements", "database", "/", "sql", ".", "Scanner", "." ]
[ "func", "(", "x", "*", "VCS", ")", "Scan", "(", "v", "interface", "{", "}", ")", "error", "{", "if", "data", ",", "ok", ":=", "v", ".", "(", "[", "]", "byte", ")", ";", "<mask>", "{", "*", "x", "=", "VCS", "(", "data", ")", "\n", "return", ...
23,295
all-23296
[ "Zones", "returns", "the", "list", "of", "hosted", "zones", "." ]
[ "func", "(", "p", "*", "AWSProvider", ")", "Zones", "(", ")", "(", "map", "[", "string", "]", "*", "route53", ".", "HostedZone", ",", "error", ")", "{", "zones", ":=", "make", "(", "map", "[", "string", "]", "*", "route53", ".", "HostedZone", ")", ...
23,296
all-23297
[ "isPrintable", "reports", "whether", "the", "given", "b", "is", "in", "the", "ASN", ".", "1", "PrintableString", "set", "." ]
[ "func", "isPrintable", "(", "b", "<mask>", ")", "bool", "{", "return", "'a'", "<=", "b", "&&", "b", "<=", "'z'", "||", "'A'", "<=", "b", "&&", "b", "<=", "'Z'", "||", "'0'", "<=", "b", "&&", "b", "<=", "'9'", "||", "'\\''", "<=", "b", "&&", "...
23,297
all-23298
[ "GetDisplayFormatOk", "returns", "a", "tuple", "with", "the", "DisplayFormat", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "t", "*", "TraceServiceDefinition", ")", "GetDisplayFormatOk", "(", ")", "(", "string", ",", "bool", ")", "{", "if", "t", "==", "nil", "||", "t", ".", "DisplayFormat", "==", "nil", "{", "return", "\"", "\"", ",", "false", "\n", "}", "\n"...
23,298
all-23299
[ "And", "this", "function", "is", "why", "I", "started", "hating", "on", "btrfs", "..." ]
[ "func", "(", "s", "*", "storageBtrfs", ")", "ContainerCreateFromImage", "(", "container", "container", ",", "fingerprint", "string", ",", "tracker", "*", "ioprogress", ".", "ProgressTracker", ")", "error", "{", "logger", ".", "Debugf", "(", "\"", "\\\"", "\\\"...
23,299
all-23300
[ "=====", "Actions", "GET", "/", "api", "/", "temp_instance_prices", "Returns", "a", "JSON", "blob", "with", "all", "prices", "for", "Scenario", "Builder", "." ]
[ "func", "(", "loc", "*", "TempInstancePriceLocator", ")", "Index", "(", ")", "(", "string", ",", "error", ")", "{", "var", "res", "string", "\n", "var", "params", "rsapi", ".", "APIParams", "\n", "var", "p", "rsapi", ".", "APIParams", "\n", "uri", ",",...