id
int32
0
25.3k
idx
stringlengths
5
9
nl_tokens
listlengths
1
418
pl_tokens
listlengths
22
4.98k
21,600
all-21601
[ "HasId", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "d", "*", "DashboardList", ")", "HasId", "(", ")", "bool", "{", "if", "d", "!=", "nil", "&&", "d", ".", "Id", "!=", "nil", "{", "return", "<mask>", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
21,601
all-21602
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "PageTimings", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoHar5", "(", "&", "w", ",", "v", ")", "\n", ...
21,602
all-21603
[ "PodAddrs", "extracts", "the", "addresses", "from", "a", "list", "of", "pods", ".", "This", "is", "a", "separate", "method", "so", "that", "we", "can", "unit", "test", "this", "without", "having", "to", "setup", "complicated", "K8S", "cluster", "scenarios", ...
[ "func", "PodAddrs", "(", "pods", "*", "corev1", ".", "PodList", ",", "args", "map", "[", "string", "]", "string", ",", "l", "*", "log", ".", "Logger", ")", "(", "[", "]", "string", ",", "error", ")", "{", "hostNetwork", ":=", "false", "\n", "if", ...
21,603
all-21604
[ "UpdateOrgUsers", "-" ]
[ "func", "(", "m", "*", "DefaultManager", ")", "UpdateOrgUsers", "(", ")", "error", "{", "uaacUsers", ",", "err", ":=", "m", ".", "UAAMgr", ".", "ListUsers", "(", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\n\n", "orgConfig...
21,604
all-21605
[ "GetMargin", "returns", "the", "Margin", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "w", "*", "Widget", ")", "GetMargin", "(", ")", "string", "{", "if", "w", "==", "nil", "||", "w", ".", "Margin", "==", "nil", "{", "<mask>", "\"", "\"", "\n", "}", "\n", "return", "*", "w", ".", "Margin", "\n", "}" ]
21,605
all-21606
[ "recursively", "set", "the", "Source", "attribute", "of", "the", "Options" ]
[ "func", "(", "m", "*", "Merger", ")", "setSource", "(", "v", "reflect", ".", "Value", ")", "{", "if", "v", ".", "Kind", "(", ")", "==", "reflect", ".", "Ptr", "{", "v", "=", "v", ".", "Elem", "(", ")", "\n", "}", "\n", "switch", "v", ".", "...
21,606
all-21607
[ "MustLoadCodec", "panics", "if", "word", "bank", "is", "missing", "only", "for", "tests" ]
[ "func", "MustLoadCodec", "(", "bank", "<mask>", ")", "*", "WordCodec", "{", "codec", ",", "err", ":=", "LoadCodec", "(", "bank", ")", "\n", "if", "err", "!=", "nil", "{", "panic", "(", "err", ")", "\n", "}", "\n", "return", "codec", "\n", "}" ]
21,607
all-21608
[ "MakeCommand", "returns", "a", "download", "command", "." ]
[ "func", "MakeCommand", "(", ")", "*", "cobra", ".", "Command", "{", "flags", ":=", "&", "flags", "{", "}", "\n", "cmd", ":=", "&", "cobra", ".", "Command", "{", "Use", ":", "\"", "\"", ",", "Short", ":", "\"", "\"", ",", "Long", ":", "`Finds and ...
21,608
all-21609
[ "export", "goListBoxFilterFuncs" ]
[ "func", "goListBoxFilterFuncs", "(", "<mask>", "*", "C", ".", "GtkListBoxRow", ",", "userData", "C", ".", "gpointer", ")", "C", ".", "gboolean", "{", "id", ":=", "int", "(", "uintptr", "(", "userData", ")", ")", "\n\n", "listBoxFilterFuncRegistry", ".", "L...
21,609
all-21610
[ "GetInvertedOk", "returns", "a", "tuple", "with", "the", "Inverted", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "d", "*", "DashboardConditionalFormat", ")", "GetInvertedOk", "(", ")", "(", "bool", ",", "bool", ")", "{", "if", "d", "==", "nil", "||", "d", ".", "Inverted", "==", "nil", "{", "return", "false", ",", "false", "\n", "}", "\n", "return",...
21,610
all-21611
[ "A", "load", "from", "pkg", "/", "time", "/", "format", ".", "go", "of", "golang", "source", "code", ".", "formatNano", "appends", "a", "fractional", "second", "as", "nanoseconds", "to", "b", "and", "returns", "the", "result", "." ]
[ "func", "formatNano", "(", "nanosec", "uint", ",", "n", "int", ",", "trim", "bool", ")", "[", "]", "byte", "{", "u", ":=", "nanosec", "\n", "var", "buf", "[", "9", "]", "<mask>", "\n", "for", "start", ":=", "len", "(", "buf", ")", ";", "start", ...
21,611
all-21612
[ "CheckInt", "is", "a", "convenience", "method", "which", "does", "an", "unchecked", "type", "conversion", "from", "an", "int", "to", "a", "float64", "." ]
[ "func", "(", "r", "*", "<mask>", ")", "CheckInt", "(", "val", "int", ")", "bool", "{", "return", "r", ".", "Check", "(", "float64", "(", "val", ")", ")", "\n", "}" ]
21,612
all-21613
[ "SeekToFirst", "seeks", "position", "at", "the", "first", "entry", "in", "list", ".", "Final", "state", "of", "iterator", "is", "Valid", "()", "iff", "list", "is", "not", "empty", "." ]
[ "func", "(", "it", "*", "Iterator", ")", "SeekToFirst", "(", ")", "{", "it", ".", "setNode", "(", "it", ".", "<mask>", ".", "getNext", "(", "it", ".", "list", ".", "head", ",", "0", ")", ",", "false", ")", "\n", "}" ]
21,613
all-21614
[ "dumpResponse", "dumps", "the", "response", "and", "optionally", "the", "request", "(", "in", "case", "of", "JSON", "format", ")", "according", "to", "DumpFormat", ".", "It", "also", "checks", "whether", "the", "special", "recorder", "pipe", "is", "opened", ...
[ "func", "(", "d", "*", "dumpClient", ")", "dumpResponse", "(", "resp", "*", "http", ".", "Response", ",", "req", "*", "<mask>", ".", "Request", ",", "reqBody", "[", "]", "byte", ")", "{", "df", ":=", "d", ".", "dumpFormat", "(", ")", "\n", "if", ...
21,614
all-21615
[ "MetadataAsOperation", "turns", "the", "Response", "metadata", "into", "an", "Operation" ]
[ "func", "(", "r", "*", "Response", ")", "MetadataAsOperation", "(", ")", "(", "*", "<mask>", ",", "error", ")", "{", "op", ":=", "Operation", "{", "}", "\n", "err", ":=", "r", ".", "MetadataAsStruct", "(", "&", "op", ")", "\n", "if", "err", "!=", ...
21,615
all-21616
[ "NewGlyphCache", "initializes", "a", "GlyphCache" ]
[ "func", "NewGlyphCache", "(", ")", "*", "GlyphCacheImp", "{", "glyphs", ":=", "make", "(", "map", "[", "string", "]", "<mask>", "[", "rune", "]", "*", "Glyph", ")", "\n", "return", "&", "GlyphCacheImp", "{", "glyphs", ":", "glyphs", ",", "}", "\n", "...
21,616
all-21617
[ "New", "constructs", "a", "new", "label", "from", "components", "." ]
[ "func", "New", "(", "repo", ",", "pkg", ",", "<mask>", "string", ")", "Label", "{", "return", "Label", "{", "Repo", ":", "repo", ",", "Pkg", ":", "pkg", ",", "Name", ":", "name", "}", "\n", "}" ]
21,617
all-21618
[ "ValidatePath", "checks", "if", "a", "file", "path", "is", "legal" ]
[ "func", "ValidatePath", "(", "path", "string", ")", "error", "{", "path", "=", "<mask>", "(", "path", ")", "\n", "match", ",", "_", ":=", "regexp", ".", "MatchString", "(", "\"", "\"", ",", "path", ")", "\n\n", "if", "!", "match", "{", "return", "f...
21,618
all-21619
[ "decodeToObjOrFieldWithTag", "decodes", "the", "buf", "into", "obj", "s", "field", "having", "the", "specified", "jwt", "tagName", ".", "If", "the", "provided", "obj", "s", "has", "the", "same", "type", "as", "defaultObj", "then", "the", "obj", "is", "set", ...
[ "func", "decodeToObjOrFieldWithTag", "(", "buf", "[", "]", "byte", ",", "obj", "interface", "{", "}", ",", "tagName", "string", ",", "defaultObj", "interface", "{", "}", ")", "error", "{", "// reflect values", "objValElem", ":=", "reflect", ".", "ValueOf", "...
21,619
all-21620
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "ClearCompilationCacheParams", ")", "MarshalJSON", "(", ")", "(", "[", "]", "<mask>", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage76", "(", "&", "w", ",", "...
21,620
all-21621
[ "GetWarningRecovery", "returns", "the", "WarningRecovery", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "t", "*", "ThresholdCount", ")", "GetWarningRecovery", "(", ")", "json", ".", "Number", "{", "if", "t", "==", "nil", "||", "t", ".", "WarningRecovery", "==", "nil", "{", "return", "\"", "\"", "\n", "}", "\n", "<mask>", "*", "t", ".", "...
21,621
all-21622
[ "RegisterGRPC", "registers", "all", "API", "services", "with", "the", "given", "server", "." ]
[ "func", "(", "api", "*", "API", ")", "RegisterGRPC", "(", "srv", "*", "grpc", ".", "Server", ")", "{", "if", "api", ".", "enableAdmin", "{", "<mask>", ".", "RegisterAdminServer", "(", "srv", ",", "NewAdmin", "(", "api", ".", "db", ")", ")", "\n", "...
21,622
all-21623
[ "PUT", "/", "api", "/", "catalog", "/", "catalogs", "/", ":", "catalog_id", "/", "applications", "/", ":", "id", "Update", "the", "content", "of", "an", "existing", "Application", "." ]
[ "func", "(", "loc", "*", "ApplicationLocator", ")", "Update", "(", "options", "rsapi", ".", "APIParams", ")", "error", "{", "var", "params", "rsapi", ".", "APIParams", "\n", "var", "p", "rsapi", ".", "APIParams", "\n", "p", "=", "rsapi", ".", "APIParams"...
21,623
all-21624
[ "Key", "returns", "the", "key", "associated", "with", "the", "current", "iterator" ]
[ "func", "(", "s", "*", "MergeIterator", ")", "Key", "(", ")", "[", "]", "byte", "{", "if", "len", "(", "s", ".", "h", ")", "==", "0", "{", "return", "nil", "\n", "}", "\n", "return", "s", ".", "h", "[", "0", "]", ".", "itr", ".", "<mask>", ...
21,624
all-21625
[ "KNearest", "just", "to", "satisfy", "an", "interface", ".", "Doesn", "t", "make", "much", "sense", "for", "count", "index", "." ]
[ "func", "(", "index", "*", "CountIndex", ")", "KNearest", "(", "point", "Point", ",", "k", "int", ",", "maxDistance", "Meters", ",", "<mask>", "func", "(", "p", "Point", ")", "bool", ")", "[", "]", "Point", "{", "panic", "(", "\"", "\"", ")", "\n",...
21,625
all-21626
[ "nolint", ":", "deadcode", "used", "from", "unit", "test" ]
[ "func", "namespaceToNamespaceSummary", "(", "namespace", "*", "sd", ".", "Namespace", ")", "*", "sd", ".", "NamespaceSummary", "{", "if", "namespace", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "return", "&", "sd", ".", "NamespaceSummary", "{", ...
21,626
all-21627
[ "Stop", "stops", "the", "mock", "server", "immediately", "closing", "all", "open", "connections", "and", "listeners", "." ]
[ "func", "(", "ms", "*", "MockServers", ")", "Stop", "(", ")", "{", "for", "idx", ":=", "range", "ms", ".", "Servers", "{", "ms", ".", "StopAt", "(", "idx", ")", "\n", "}", "\n", "<mask>", ".", "wg", ".", "Wait", "(", ")", "\n", "}" ]
21,627
all-21628
[ "isSafeRetryMutableRPC", "returns", "true", "when", "a", "mutable", "request", "is", "safe", "for", "retry", ".", "mutable", "requests", "(", "e", ".", "g", ".", "Put", "Delete", "Txn", ")", "should", "only", "be", "retried", "when", "the", "status", "code...
[ "func", "isSafeRetryMutableRPC", "(", "err", "error", ")", "bool", "{", "if", "ev", ",", "<mask>", ":=", "status", ".", "FromError", "(", "err", ")", ";", "ok", "&&", "ev", ".", "Code", "(", ")", "!=", "codes", ".", "Unavailable", "{", "// not safe for...
21,628
all-21629
[ "convertOptions", "converts", "an", "option", "value", "based", "on", "name", "value", "pairs", "." ]
[ "func", "convertOptions", "(", "q", "url", ".", "Values", ",", "pairs", "...", "string", ")", "url", ".", "Values", "{", "n", ":=", "make", "(", "url", ".", "Values", ")", "\n", "for", "k", ",", "v", ":=", "<mask>", "q", "{", "x", ":=", "make", ...
21,629
all-21630
[ "CreateMnemonic", "generates", "a", "new", "key", "and", "persists", "it", "to", "storage", "encrypted", "using", "the", "passphrase", ".", "It", "returns", "the", "generated", "seedphrase", "(", "mnemonic", ")", "and", "the", "key", "Info", ".", "It", "retu...
[ "func", "(", "kb", "dbKeybase", ")", "CreateMnemonic", "(", "name", ",", "passphrase", "string", ",", "algo", "SignAlgo", ")", "(", "Info", ",", "string", ",", "error", ")", "{", "// NOTE: secret is SHA256 hashed by secp256k1 and ed25519.", "// 16 byte secret correspo...
21,630
all-21631
[ "Pop", "one", "segment", "from", "tail", "of", "stack", ".", "Returns", "nil", "nil", "nil", "if", "depth", "is", "0" ]
[ "func", "(", "s", "*", "Stack", ")", "Pop", "(", ")", "(", "header", ",", "data", "[", "]", "byte", ",", "err", "error", ")", "{", "if", "s", ".", "depth", "==", "0", "{", "return", "nil", ",", "nil", ",", "nil", "\n", "}", "\n", "s", ".", ...
21,631
all-21632
[ "Seek", "searches", "for", "the", "record", "with", "the", "given", "key", ".", "If", "it", "is", "present", "in", "the", "skiplist", "then", "Seek", "positions", "the", "iterator", "on", "that", "record", "and", "returns", "true", ".", "If", "the", "rec...
[ "func", "(", "it", "*", "Iterator", ")", "Seek", "(", "key", "[", "]", "byte", ")", "(", "found", "bool", ")", "{", "var", "<mask>", "*", "node", "\n", "_", ",", "next", ",", "found", "=", "it", ".", "seekForBaseSplice", "(", "key", ")", "\n", ...
21,632
all-21633
[ "GetEntryAt", "gets", "an", "entry", "from", "the", "geoindex", "if", "missing", "returns", "an", "empty", "entry", "without", "changing", "the", "index", "." ]
[ "func", "(", "geoIndex", "*", "geoIndex", ")", "GetEntryAt", "(", "point", "Point", ")", "interface", "{", "}", "{", "square", ":=", "cellOf", "(", "point", ",", "geoIndex", ".", "resolution", ")", "\n\n", "entries", ",", "ok", ":=", "geoIndex", ".", "...
21,633
all-21634
[ "UpdateNetwork", "updates", "the", "network", "to", "match", "the", "provided", "Network", "struct" ]
[ "func", "(", "r", "*", "ProtocolLXD", ")", "UpdateNetwork", "(", "name", "string", ",", "network", "api", ".", "NetworkPut", ",", "ETag", "string", ")", "error", "{", "if", "!", "r", ".", "HasExtension", "(", "\"", "\"", ")", "{", "return", "fmt", "....
21,634
all-21635
[ "msb64", "returns", "the", "number", "of", "bits", "required", "to", "store", "the", "value", "x" ]
[ "func", "msb64", "(", "n", "uint64", ")", "int", "{", "if", "n", "<=", "0", "{", "return", "-", "1", "\n", "}", "\n", "<mask>", "r", ",", "v", "uint", "\n", "if", "n", ">=", "1", "<<", "32", "{", "r", "+=", "32", "\n", "v", "=", "uint", "...
21,635
all-21636
[ "parse", "a", "value", "as", "the", "appropriate", "type", "and", "store", "it", "in", "the", "struct" ]
[ "func", "setSlice", "(", "dest", "reflect", ".", "Value", ",", "values", "[", "]", "string", ",", "trunc", "bool", ")", "error", "{", "if", "!", "dest", ".", "CanSet", "(", ")", "{", "return", "fmt", ".", "Errorf", "(", "\"", "\"", ")", "\n", "}"...
21,636
all-21637
[ "WithDialTimeout", "instructs", "the", "New", "*", "functions", "to", "use", "t", "as", "the", "deadline", "to", "connect", "to", "pachd" ]
[ "func", "WithDialTimeout", "(", "t", "<mask>", ".", "Duration", ")", "Option", "{", "return", "func", "(", "settings", "*", "clientSettings", ")", "error", "{", "settings", ".", "dialTimeout", "=", "t", "\n", "return", "nil", "\n", "}", "\n", "}" ]
21,637
all-21638
[ "Native", "returns", "a", "pointer", "to", "the", "underlying", "GtkAllocation", "." ]
[ "func", "(", "v", "*", "Allocation", ")", "native", "(", ")", "*", "C", ".", "GtkAllocation", "{", "<mask>", "(", "*", "C", ".", "GtkAllocation", ")", "(", "unsafe", ".", "Pointer", "(", "&", "v", ".", "GdkRectangle", ")", ")", "\n", "}" ]
21,638
all-21639
[ "AcquireDirectoryLock", "acquires", "exclusive", "access", "to", "a", "directory", "." ]
[ "func", "acquireDirectoryLock", "(", "dirPath", "string", ",", "pidFileName", "string", ",", "readOnly", "bool", ")", "(", "*", "directoryLockGuard", ",", "error", ")", "{", "if", "readOnly", "{", "return", "nil", ",", "ErrWindowsNotSupported", "\n", "}", "\n\...
21,639
all-21640
[ "HasLimit", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "w", "*", "WidgetProcessQuery", ")", "HasLimit", "(", ")", "bool", "{", "if", "w", "!=", "nil", "&&", "w", ".", "Limit", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n", "}" ]
21,640
all-21641
[ "create", "transform", "feedback", "objects" ]
[ "func", "CreateTransformFeedbacks", "(", "n", "int32", ",", "<mask>", "*", "uint32", ")", "{", "C", ".", "glowCreateTransformFeedbacks", "(", "gpCreateTransformFeedbacks", ",", "(", "C", ".", "GLsizei", ")", "(", "n", ")", ",", "(", "*", "C", ".", "GLuint"...
21,641
all-21642
[ "/", "*", "One", "can", "use", "this", "method", "to", "get", "a", "list", "of", "all", "the", "channels", "in", "an", "application", "." ]
[ "func", "(", "c", "*", "Client", ")", "Channels", "(", "additionalQueries", "map", "[", "string", "]", "string", ")", "(", "*", "ChannelsList", ",", "error", ")", "{", "path", ":=", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "c", ".", "AppId", ")...
21,642
all-21643
[ "NewReference", "returns", "an", "OCI", "reference", "for", "a", "file", "and", "a", "image", "." ]
[ "func", "NewReference", "(", "file", ",", "image", "string", ")", "(", "types", ".", "ImageReference", ",", "error", ")", "{", "resolved", ",", "err", ":=", "explicitfilepath", ".", "ResolvePathToFullyExplicit", "(", "file", ")", "\n", "if", "err", "!=", "...
21,643
all-21644
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "GetManifestForFrameParams", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache2", "(", "&", "w", "...
21,644
all-21645
[ "Size", "gets", "the", "size", "of", "the", "pod", "log", ".", "Note", ":", "this", "function", "makes", "the", "same", "network", "call", "as", "reading", "the", "entire", "file", "." ]
[ "func", "(", "a", "*", "PodLogArtifact", ")", "Size", "(", ")", "(", "int64", ",", "error", ")", "{", "logs", ",", "err", ":=", "a", ".", "jobAgent", ".", "GetJobLog", "(", "a", ".", "<mask>", ",", "a", ".", "buildID", ")", "\n", "if", "err", "...
21,645
all-21646
[ "GetId", "returns", "the", "Id", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "d", "*", "DashboardListItem", ")", "GetId", "(", ")", "int", "{", "if", "d", "==", "nil", "||", "d", ".", "<mask>", "==", "nil", "{", "return", "0", "\n", "}", "\n", "return", "*", "d", ".", "Id", "\n", "}" ]
21,646
all-21647
[ "GetShadowType", "is", "a", "wrapper", "around", "gtk_scrolled_window_get_shadow_type", "()", "." ]
[ "func", "(", "v", "*", "ScrolledWindow", ")", "GetShadowType", "(", ")", "ShadowType", "{", "c", ":=", "C", ".", "gtk_scrolled_window_get_shadow_type", "(", "v", ".", "native", "(", ")", ")", "\n", "<mask>", "ShadowType", "(", "c", ")", "\n", "}" ]
21,647
all-21648
[ "Add", "inserts", "a", "word", "into", "the", "dictionary", "and", "returns", "whether", "or", "not", "that", "word", "was", "a", "new", "word", ".", "Time", "complexity", ":", "O", "(", "m", ")", "where", "m", "is", "the", "length", "of", "word", "....
[ "func", "(", "dict", "*", "Dictionary", ")", "Add", "(", "word", "string", ")", "(", "wasAdded", "bool", ")", "{", "if", "dict", ".", "root", "==", "nil", "{", "dict", ".", "root", "=", "&", "trieNode", "{", "}", "\n", "}", "\n\n", "cursor", ":="...
21,648
all-21649
[ "List", "implements", "ClientInterface" ]
[ "func", "(", "c", "*", "Client", ")", "List", "(", "opts", "v1", ".", "ListOptions", ")", "(", "Collection", ",", "error", ")", "{", "result", ":=", "c", ".", "NewCollection", "(", ")", "\n", "err", ":=", "c", ".", "cl", ".", "Get", "(", ")", "...
21,649
all-21650
[ "constructVPCSubnetAttributes", "returns", "vpc", "and", "subnet", "IDs", "of", "the", "instance", "as", "an", "attribute", "list" ]
[ "func", "(", "agent", "*", "ecsAgent", ")", "constructVPCSubnetAttributes", "(", ")", "[", "]", "*", "ecs", ".", "Attribute", "{", "return", "[", "]", "*", "ecs", ".", "<mask>", "{", "{", "Name", ":", "aws", ".", "String", "(", "vpcIDAttributeName", ")...
21,650
all-21651
[ "BuildClusterClients", "returns", "Pod", "clients", "for", "build", "clusters", "." ]
[ "func", "(", "o", "*", "ExperimentalKubernetesOptions", ")", "BuildClusterClients", "(", "namespace", "string", ",", "dryRun", "bool", ")", "(", "buildClusterClients", "map", "[", "string", "]", "corev1", ".", "PodInterface", ",", "err", "error", ")", "{", "if...
21,651
all-21652
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "SkipWaitingParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker6", "(", "&"...
21,652
all-21653
[ "HasLogQuery", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "h", "*", "HostmapRequest", ")", "HasLogQuery", "(", ")", "bool", "{", "if", "h", "!=", "nil", "&&", "h", ".", "LogQuery", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n", "}" ]
21,653
all-21654
[ "onSteadyStateIsResolved", "defines", "a", "relationship", "where", "a", "target", "cannot", "be", "created", "until", "dependency", "has", "reached", "the", "steady", "state", ".", "Transitions", "include", "pulling", "." ]
[ "func", "onSteadyStateIsResolved", "(", "<mask>", "*", "apicontainer", ".", "Container", ",", "run", "*", "apicontainer", ".", "Container", ")", "bool", "{", "return", "target", ".", "GetDesiredStatus", "(", ")", ">=", "apicontainerstatus", ".", "ContainerCreated"...
21,654
all-21655
[ "control", "the", "front", "and", "/", "or", "back", "writing", "of", "individual", "bits", "in", "the", "stencil", "planes" ]
[ "func", "StencilMaskSeparate", "(", "face", "uint32", ",", "<mask>", "uint32", ")", "{", "C", ".", "glowStencilMaskSeparate", "(", "gpStencilMaskSeparate", ",", "(", "C", ".", "GLenum", ")", "(", "face", ")", ",", "(", "C", ".", "GLuint", ")", "(", "mask...
21,655
all-21656
[ "CompactPrintCommit", "renders", "c", "as", "a", "compact", "string", "e", ".", "g", ".", "myrepo" ]
[ "func", "CompactPrintCommit", "(", "c", "*", "pfs", ".", "Commit", ")", "string", "{", "return", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "c", ".", "Repo", ".", "<mask>", ",", "c", ".", "ID", ")", "\n", "}" ]
21,656
all-21657
[ "GetTextOk", "returns", "a", "tuple", "with", "the", "Text", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "e", "*", "Event", ")", "GetTextOk", "(", ")", "(", "string", ",", "bool", ")", "{", "if", "e", "==", "nil", "||", "e", ".", "<mask>", "==", "nil", "{", "return", "\"", "\"", ",", "false", "\n", "}", "\n", "return", "*", "e", "."...
21,657
all-21658
[ "CloseAndReportTraces", "tries", "to", "close", "the", "global", "tracer", "which", "in", "the", "case", "of", "the", "Jaeger", "tracer", "causes", "it", "to", "send", "any", "unreported", "traces", "to", "the", "collector" ]
[ "func", "CloseAndReportTraces", "(", ")", "{", "if", "c", ",", "ok", ":=", "opentracing", ".", "GlobalTracer", "(", ")", ".", "(", "io", ".", "Closer", ")", ";", "<mask>", "{", "c", ".", "Close", "(", ")", "\n", "}", "\n", "}" ]
21,658
all-21659
[ "Cancel", "an", "in", "-", "progress", "Call", "with", "the", "given", "sid", ".", "Cancel", "will", "not", "affect", "in", "-", "progress", "Calls", "only", "those", "in", "queued", "or", "ringing", "." ]
[ "func", "(", "c", "*", "CallService", ")", "Cancel", "(", "sid", "string", ")", "(", "*", "Call", ",", "error", ")", "{", "data", ":=", "<mask>", ".", "Values", "{", "}", "\n", "data", ".", "Set", "(", "\"", "\"", ",", "string", "(", "StatusCance...
21,659
all-21660
[ "loggingMiddleware", "logs", "requests", "to", "the", "proxy" ]
[ "func", "loggingMiddleware", "(", "next", "http", ".", "Handler", ")", "<mask>", ".", "Handler", "{", "return", "http", ".", "HandlerFunc", "(", "func", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ")", "{", "log", "....
21,660
all-21661
[ "AddBytesKV", "adds", "key", "=", "value", "argument", ".", "Multiple", "values", "for", "the", "same", "key", "may", "be", "added", "." ]
[ "func", "(", "a", "*", "Args", ")", "AddBytesKV", "(", "key", ",", "<mask>", "[", "]", "byte", ")", "{", "a", ".", "args", "=", "appendArg", "(", "a", ".", "args", ",", "b2s", "(", "key", ")", ",", "b2s", "(", "value", ")", ",", "argsHasValue",...
21,661
all-21662
[ "StrokeStringAt", "draws", "the", "contour", "of", "the", "text", "at", "point", "(", "x", "y", ")" ]
[ "func", "(", "gc", "*", "GraphicContext", ")", "StrokeStringAt", "(", "<mask>", "string", ",", "x", ",", "y", "float64", ")", "(", "cursor", "float64", ")", "{", "return", "gc", ".", "drawString", "(", "text", ",", "stroked", ",", "x", ",", "y", ")",...
21,662
all-21663
[ "AskInt", "asks", "the", "user", "to", "enter", "an", "integer", "between", "a", "min", "and", "max", "value" ]
[ "func", "AskInt", "(", "question", "string", ",", "min", "int64", ",", "max", "int64", ",", "defaultAnswer", "string", ")", "int64", "{", "for", "{", "answer", ":=", "askQuestion", "(", "question", ",", "defaultAnswer", ")", "\n\n", "result", ",", "err", ...
21,663
all-21664
[ "Do", "executes", "Debugger", ".", "getPossibleBreakpoints", "against", "the", "provided", "context", ".", "returns", ":", "locations", "-", "List", "of", "the", "possible", "breakpoint", "locations", "." ]
[ "func", "(", "p", "*", "GetPossibleBreakpointsParams", ")", "Do", "(", "ctx", "<mask>", ".", "Context", ")", "(", "locations", "[", "]", "*", "BreakLocation", ",", "err", "error", ")", "{", "// execute", "var", "res", "GetPossibleBreakpointsReturns", "\n", "...
21,664
all-21665
[ "GetCompareTo", "returns", "the", "CompareTo", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "t", "*", "TileDefRequest", ")", "GetCompareTo", "(", ")", "<mask>", "{", "if", "t", "==", "nil", "||", "t", ".", "CompareTo", "==", "nil", "{", "return", "\"", "\"", "\n", "}", "\n", "return", "*", "t", ".", "CompareTo", "\n", "}" ]
21,665
all-21666
[ "GetContractResources", "returns", "list", "of", "contract", "resources" ]
[ "func", "(", "c", "*", "Client", ")", "GetContractResources", "(", ")", "(", "*", "ContractResources", ",", "error", ")", "{", "url", ":=", "contractResourcePath", "(", ")", "+", "`?depth=`", "+", "c", ".", "client", ".", "<mask>", "+", "`&pretty=`", "+"...
21,666
all-21667
[ "GetBoolPolicy", "reads", "a", "ResourceData", "and", "returns", "an", "appropriate", "BoolPolicy", "for", "the", "state", "of", "the", "definition", ".", "nil", "is", "returned", "if", "it", "does", "not", "exist", "." ]
[ "func", "GetBoolPolicy", "(", "d", "*", "schema", ".", "ResourceData", ",", "key", "string", ")", "*", "<mask>", ".", "BoolPolicy", "{", "v", ",", "e", ":=", "d", ".", "GetOkExists", "(", "key", ")", "\n", "if", "e", "{", "return", "BoolPolicy", "(",...
21,667
all-21668
[ "ReferenceProperties", "is", "a", "convenience", "method", "that", "wraps", "fetching", "the", "Network", "MO", "from", "a", "NetworkReference", ".", "Note", "that", "regardless", "of", "the", "network", "type", "this", "only", "fetches", "the", "Network", "MO",...
[ "func", "ReferenceProperties", "(", "client", "*", "govmomi", ".", "Client", ",", "net", "<mask>", ".", "NetworkReference", ")", "(", "*", "mo", ".", "Network", ",", "error", ")", "{", "ctx", ",", "cancel", ":=", "context", ".", "WithTimeout", "(", "cont...
21,668
all-21669
[ "GetAssetCode12", "retrieves", "the", "AssetCode12", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
[ "func", "(", "u", "AllowTrustOpAsset", ")", "GetAssetCode12", "(", ")", "(", "result", "[", "12", "]", "byte", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "<mask>", ")", ")", "\n\n"...
21,669
all-21670
[ "Release", "removes", "an", "IncomingPhoneNumber", "from", "your", "account", "." ]
[ "func", "(", "ipn", "*", "IncomingNumberService", ")", "Release", "(", "ctx", "context", ".", "<mask>", ",", "sid", "string", ")", "error", "{", "return", "ipn", ".", "client", ".", "DeleteResource", "(", "ctx", ",", "numbersPathPart", ",", "sid", ")", "...
21,670
all-21671
[ "Run", "runs", "all", "the", "operations", "queued", "up", "." ]
[ "func", "(", "b", "*", "Bulk", ")", "Run", "(", ")", "(", "*", "BulkResult", ",", "error", ")", "{", "op", ":=", "&", "insertOp", "{", "b", ".", "c", ".", "FullName", ",", "b", ".", "inserts", ",", "0", "}", "\n", "if", "!", "b", ".", "orde...
21,671
all-21672
[ "Right", "right", "-", "pads", "the", "string", "with", "pad", "up", "to", "len", "runes" ]
[ "func", "Right", "(", "str", "string", ",", "length", "int", ",", "pad", "string", ")", "string", "{", "return", "str", "+", "times", "(", "pad", ",", "<mask>", "-", "len", "(", "str", ")", ")", "\n", "}" ]
21,672
all-21673
[ "title", ":", "remove", "role", "path", ":", "/", "roles", "/", "{", "name", "}", "method", ":", "DELETE", "responses", ":", "200", ":", "Role", "removed", "401", ":", "Unauthorized", "404", ":", "Role", "not", "found", "412", ":", "Role", "with", "u...
[ "func", "removeRole", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ",", "t", "auth", ".", "Token", ")", "(", "err", "error", ")", "{", "if", "!", "permission", ".", "Check", "(", "t", ",", "permission", ".", "Perm...
21,673
all-21674
[ "GenerateRandomID", "returns", "an", "unique", "id" ]
[ "func", "GenerateRandomID", "(", ")", "string", "{", "for", "{", "id", ":=", "make", "(", "[", "]", "byte", ",", "32", ")", "\n", "if", "_", ",", "err", ":=", "io", ".", "ReadFull", "(", "rand", ".", "Reader", ",", "<mask>", ")", ";", "err", "!...
21,674
all-21675
[ "Run", "will", "launch", "the", "queue", "watchers", "and", "task", "workers", "in", "the", "background", "." ]
[ "func", "(", "p", "*", "Pool", ")", "Run", "(", ")", "{", "// start all queues", "for", "queue", ":=", "range", "p", ".", "queues", "{", "queue", ".", "start", "(", "p", ")", "\n", "}", "\n\n", "// start all tasks", "for", "_", ",", "task", ":=", "...
21,675
all-21676
[ "UpdateRecords", "updates", "records", "for", "a", "given", "slice", "of", "endpoints" ]
[ "func", "(", "p", "*", "dnsimpleProvider", ")", "UpdateRecords", "(", "endpoints", "[", "]", "*", "endpoint", ".", "Endpoint", ")", "error", "{", "<mask>", "p", ".", "submitChanges", "(", "newDnsimpleChanges", "(", "dnsimpleUpdate", ",", "endpoints", ")", ")...
21,676
all-21677
[ "BeginningOfQuarter", "beginning", "of", "quarter" ]
[ "func", "(", "now", "*", "Now", ")", "BeginningOfQuarter", "(", ")", "time", ".", "Time", "{", "month", ":=", "<mask>", ".", "BeginningOfMonth", "(", ")", "\n", "offset", ":=", "(", "int", "(", "month", ".", "Month", "(", ")", ")", "-", "1", ")", ...
21,677
all-21678
[ "WriteDeflate", "writes", "deflated", "p", "to", "w", "and", "returns", "the", "number", "of", "compressed", "bytes", "written", "to", "w", "." ]
[ "func", "WriteDeflate", "(", "w", "io", ".", "Writer", ",", "p", "[", "]", "<mask>", ")", "(", "int", ",", "error", ")", "{", "return", "WriteDeflateLevel", "(", "w", ",", "p", ",", "CompressDefaultCompression", ")", "\n", "}" ]
21,678
all-21679
[ "NewOutgoingVideo", "creates", "a", "new", "outgoing", "video", "file", "." ]
[ "func", "(", "api", "*", "TelegramBotAPI", ")", "NewOutgoingVideo", "(", "recipient", "Recipient", ",", "fileName", "string", ",", "<mask>", "io", ".", "Reader", ")", "*", "OutgoingVideo", "{", "return", "&", "OutgoingVideo", "{", "outgoingMessageBase", ":", "...
21,679
all-21680
[ "GetDefaultText", "()", "is", "a", "wrapper", "around", "gtk_app_chooser_widget_get_default_text", "()", ".", "In", "case", "when", "gtk_app_chooser_widget_get_default_text", "()", "returns", "a", "nil", "string", "GetDefaultText", "()", "returns", "a", "non", "-", "n...
[ "func", "(", "v", "*", "AppChooserWidget", ")", "GetDefaultText", "(", ")", "(", "string", ",", "error", ")", "{", "cstr", ":=", "C", ".", "gtk_app_chooser_widget_get_default_text", "(", "v", ".", "native", "(", ")", ")", "\n", "if", "cstr", "==", "nil",...
21,680
all-21681
[ "ValidateGitCloneURL", "returns", "an", "error", "if", "the", "provided", "URL", "is", "invalid" ]
[ "func", "ValidateGitCloneURL", "(", "url", "string", ")", "error", "{", "exampleURL", ":=", "\"", "\"", "\n", "if", "url", "==", "\"", "\"", "{", "return", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "exampleURL", ")", "\n", "}", "\n", "// Use the git ...
21,681
all-21682
[ "Fail", "outputs", "Failed", "log" ]
[ "func", "Fail", "(", "val", "...", "interface", "{", "}", ")", "error", "{", "return", "glg", ".", "<mask>", "(", "FAIL", ",", "blankFormat", "(", "len", "(", "val", ")", ")", ",", "val", "...", ")", "\n", "}" ]
21,682
all-21683
[ "MustParseInLocation", "must", "parse", "string", "to", "time", "in", "location", "or", "will", "panic" ]
[ "func", "MustParseInLocation", "(", "loc", "*", "<mask>", ".", "Location", ",", "strs", "...", "string", ")", "time", ".", "Time", "{", "return", "New", "(", "time", ".", "Now", "(", ")", ".", "In", "(", "loc", ")", ")", ".", "MustParse", "(", "str...
21,683
all-21684
[ "set", "the", "polygon", "stippling", "pattern" ]
[ "func", "PolygonStipple", "(", "<mask>", "*", "uint8", ")", "{", "C", ".", "glowPolygonStipple", "(", "gpPolygonStipple", ",", "(", "*", "C", ".", "GLubyte", ")", "(", "unsafe", ".", "Pointer", "(", "mask", ")", ")", ")", "\n", "}" ]
21,684
all-21685
[ "StartTime", "implements", "the", "Storage", "interface", "." ]
[ "func", "(", "s", "*", "ReadyStorage", ")", "StartTime", "(", ")", "(", "int64", ",", "error", ")", "{", "if", "x", ":=", "s", ".", "<mask>", "(", ")", ";", "x", "!=", "nil", "{", "return", "x", ".", "StartTime", "(", ")", "\n", "}", "\n", "r...
21,685
all-21686
[ "SyncUsers" ]
[ "func", "(", "m", "*", "DefaultManager", ")", "SyncUsers", "(", "uaaUsers", "*", "uaa", ".", "Users", ",", "usersInput", "UsersInput", ")", "error", "{", "roleUsers", ",", "err", ":=", "usersInput", ".", "ListUsers", "(", "usersInput", ",", "uaaUsers", ")"...
21,686
all-21687
[ "Write", "-", "satisfies", "writer", "interface" ]
[ "func", "(", "r", "*", "MockReadWriteCloser", ")", "Write", "(", "p", "[", "]", "<mask>", ")", "(", "n", "int", ",", "err", "error", ")", "{", "if", "err", "=", "r", ".", "WriteErr", ";", "err", "!=", "nil", "{", "r", ".", "BytesWritten", "=", ...
21,687
all-21688
[ "ListDatacenters", "lists", "all", "data", "centers" ]
[ "func", "(", "c", "*", "Client", ")", "ListDatacenters", "(", ")", "(", "*", "Datacenters", ",", "error", ")", "{", "url", ":=", "dcColPath", "(", ")", "+", "`?depth=`", "+", "c", ".", "<mask>", ".", "depth", "+", "`&pretty=`", "+", "strconv", ".", ...
21,688
all-21689
[ "Chain", "builds", "a", "slice", "of", "*", "x509", ".", "Certificate", "from", "this", "CA", "and", "its", "issuers", "." ]
[ "func", "(", "id", "*", "Identity", ")", "Chain", "(", ")", "[", "]", "*", "x509", ".", "Certificate", "{", "chain", ":=", "[", "]", "*", "x509", ".", "Certificate", "{", "}", "\n", "for", "this", ":=", "<mask>", ";", "this", "!=", "nil", ";", ...
21,689
all-21690
[ "Print", "error", "message", "and", "exit", "with", "code", "1" ]
[ "func", "fail", "(", "format", "string", ",", "v", "...", "interface", "{", "}", ")", "{", "if", "!", "strings", ".", "HasSuffix", "(", "format", ",", "\"", "\\n", "\"", ")", "{", "<mask>", "+=", "\"", "\\n", "\"", "\n", "}", "\n", "fmt", ".", ...
21,690
all-21691
[ "UnmarshalJSON", "identifies", "the", "data", "structure", "at", "runtime", "and", "unmarshals", "in", "the", "appropriate", "type" ]
[ "func", "(", "this", "*", "ScopeExpressionTemplate", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "if", "this", "==", "nil", "{", "return", "<mask>", ".", "New", "(", "\"", "\"", ")", "\n", "}", "\n", "this", ".", "RawMessa...
21,691
all-21692
[ "GetNextConferencesInRange", "retrieves", "the", "page", "at", "the", "nextPageURI", "and", "continues", "retrieving", "pages", "until", "any", "results", "are", "found", "in", "the", "range", "given", "by", "start", "or", "end", "or", "we", "determine", "there"...
[ "func", "(", "c", "*", "ConferenceService", ")", "GetNextConferencesInRange", "(", "start", "time", ".", "Time", ",", "end", "time", ".", "Time", ",", "nextPageURI", "string", ")", "ConferencePageIterator", "{", "if", "nextPageURI", "==", "\"", "\"", "{", "p...
21,692
all-21693
[ "ImageGetPools", "get", "the", "names", "of", "all", "storage", "pools", "on", "which", "a", "given", "image", "exists", "." ]
[ "func", "(", "c", "*", "Cluster", ")", "ImageGetPools", "(", "imageFingerprint", "string", ")", "(", "[", "]", "int64", ",", "error", ")", "{", "poolID", ":=", "int64", "(", "-", "1", ")", "\n", "query", ":=", "\"", "\"", "\n", "inargs", ":=", "[",...
21,693
all-21694
[ "Calculates", "the", "per", "-", "element", "bit", "-", "wise", "“exclusive", "or”", "operation", "on", "an", "array", "and", "a", "scalar", "with", "a", "mask", "." ]
[ "func", "XorScalarWithMask", "(", "src", "*", "IplImage", ",", "value", "Scalar", ",", "dst", ",", "mask", "*", "IplImage", ")", "{", "C", ".", "cvXorS", "(", "unsafe", ".", "Pointer", "(", "src", ")", ",", "(", "C", ".", "CvScalar", ")", "(", "val...
21,694
all-21695
[ "UnmarshalText", "implements", "encoding", ".", "TextUnmarshaler", ".", "It", "will", "unmarshal", "to", "a", "null", "Bool", "if", "the", "input", "is", "a", "blank", "or", "not", "an", "integer", ".", "It", "will", "return", "an", "error", "if", "the", ...
[ "func", "(", "b", "*", "Bool", ")", "UnmarshalText", "(", "<mask>", "[", "]", "byte", ")", "error", "{", "str", ":=", "string", "(", "text", ")", "\n", "switch", "str", "{", "case", "\"", "\"", ",", "\"", "\"", ":", "b", ".", "Valid", "=", "fal...
21,695
all-21696
[ "checkLeaderTransition", "waits", "for", "leader", "transition", "returning", "the", "new", "leader", "ID", "." ]
[ "func", "checkLeaderTransition", "(", "m", "*", "member", ",", "oldLead", "uint64", ")", "uint64", "{", "interval", ":=", "time", ".", "Duration", "(", "m", ".", "s", ".", "Cfg", ".", "TickMs", ")", "*", "<mask>", ".", "Millisecond", "\n", "for", "m", ...
21,696
all-21697
[ "Merge", "in", "the", "given", "info", "and", "public", "message", "parts", "into", "this", "error" ]
[ "func", "(", "e", "*", "err", ")", "mergeIn", "(", "info", "Info", ",", "publicMsgParts", "[", "]", "interface", "{", "}", ")", "{", "for", "key", ",", "val", ":=", "range", "info", "{", "for", "e", ".", "info", "[", "key", "]", "!=", "nil", "{...
21,697
all-21698
[ "NewMongoStore", "returns", "a", "new", "MongoStore", ".", "Set", "ensureTTL", "to", "true", "let", "the", "database", "auto", "-", "remove", "expired", "object", "by", "maxAge", "." ]
[ "func", "NewMongoStore", "(", "c", "*", "mgo", ".", "Collection", ",", "maxAge", "int", ",", "ensureTTL", "bool", ",", "keyPairs", "...", "[", "]", "byte", ")", "*", "MongoStore", "{", "store", ":=", "&", "MongoStore", "{", "Codecs", ":", "securecookie",...
21,698
all-21699
[ "GetServiceService", "returns", "the", "ServiceService", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "w", "*", "Widget", ")", "GetServiceService", "(", ")", "<mask>", "{", "if", "w", "==", "nil", "||", "w", ".", "ServiceService", "==", "nil", "{", "return", "\"", "\"", "\n", "}", "\n", "return", "*", "w", ".", "ServiceService", "\n", ...
21,699
all-21700
[ "title", ":", "list", "provisioner", "clusters", "path", ":", "/", "provisioner", "/", "clusters", "method", ":", "GET", "consume", ":", "application", "/", "x", "-", "www", "-", "form", "-", "urlencoded", "produce", ":", "application", "/", "json", "respo...
[ "func", "listClusters", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ",", "t", "auth", ".", "<mask>", ")", "(", "err", "error", ")", "{", "allowed", ":=", "permission", ".", "Check", "(", "t", ",", "permission", "."...