id
int32
0
25.3k
idx
stringlengths
5
9
nl_tokens
listlengths
1
418
pl_tokens
listlengths
22
4.98k
21,300
all-21301
[ "GetID", "is", "used", "to", "retrieve", "the", "taskID", "from", "taskARN", "Reference", ":", "http", ":", "//", "docs", ".", "aws", ".", "amazon", ".", "com", "/", "general", "/", "latest", "/", "gr", "/", "aws", "-", "arns", "-", "and", "-", "na...
[ "func", "(", "task", "*", "Task", ")", "GetID", "(", ")", "(", "string", ",", "error", ")", "{", "// Parse taskARN", "parsedARN", ",", "err", ":=", "arn", ".", "Parse", "(", "task", ".", "Arn", ")", "\n", "if", "err", "!=", "nil", "{", "return", ...
21,301
all-21302
[ "ResendRequest", "resends", "a", "transaction", "request", "referenced", "by", "id" ]
[ "func", "(", "c", "Client", ")", "ResendRequest", "(", "id", "string", ")", "(", "bool", ",", "error", ")", "{", "holder", ":=", "map", "[", "string", "]", "interface", "{", "}", "{", "}", "\n", "if", "err", ":=", "c", ".", "Put", "(", "\"", "\...
21,302
all-21303
[ "List", "reaches", "out", "to", "deck", "to", "retrieve", "the", "ProwJobs", "on", "the", "cluster", "via", "proxy" ]
[ "func", "(", "c", "*", "dryRunProwJobClient", ")", "List", "(", "opts", "metav1", ".", "ListOptions", ")", "(", "*", "prowapi", ".", "ProwJobList", ",", "error", ")", "{", "var", "jl", "prowapi", ".", "ProwJobList", "\n", "err", ":=", "c", ".", "<mask>...
21,303
all-21304
[ "GetHead", "automatically", "route", "undefined", "HEAD", "requests", "to", "GET", "handlers", "." ]
[ "func", "GetHead", "(", "next", "http", ".", "Handler", ")", "http", ".", "Handler", "{", "return", "http", ".", "HandlerFunc", "(", "func", "(", "w", "<mask>", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ")", "{", "if", "r", ".", ...
21,304
all-21305
[ "Get", "returns", "node", "pointer", "for", "the", "lookup", "key" ]
[ "func", "(", "nt", "*", "NodeTable", ")", "Get", "(", "key", "[", "]", "byte", ")", "unsafe", ".", "Pointer", "{", "res", ":=", "nt", ".", "find", "(", "key", ")", "\n", "if", "res", ".", "<mask>", "&", "ntFoundMask", "==", "ntFoundMask", "{", "i...
21,305
all-21306
[ "MustNominate", "retrieves", "the", "Nominate", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
[ "func", "(", "u", "ScpStatementPledges", ")", "MustNominate", "(", ")", "ScpNomination", "{", "val", ",", "ok", ":=", "u", ".", "GetNominate", "(", ")", "\n\n", "if", "!", "<mask>", "{", "panic", "(", "\"", "\"", ")", "\n", "}", "\n\n", "return", "va...
21,306
all-21307
[ "SetBorderWindowSize", "is", "a", "wrapper", "around", "gtk_text_view_set_border_window_size", "()", "." ]
[ "func", "(", "v", "*", "TextView", ")", "SetBorderWindowSize", "(", "tp", "TextWindowType", ",", "<mask>", "int", ")", "{", "C", ".", "gtk_text_view_set_border_window_size", "(", "v", ".", "native", "(", ")", ",", "C", ".", "GtkTextWindowType", "(", "tp", ...
21,307
all-21308
[ "ScrollbarNew", "is", "a", "wrapper", "around", "gtk_scrollbar_new", "()", "." ]
[ "func", "ScrollbarNew", "(", "orientation", "Orientation", ",", "adjustment", "*", "Adjustment", ")", "(", "*", "Scrollbar", ",", "<mask>", ")", "{", "c", ":=", "C", ".", "gtk_scrollbar_new", "(", "C", ".", "GtkOrientation", "(", "orientation", ")", ",", "...
21,308
all-21309
[ "Listen", "returns", "TCP", "listener", "with", "SO_REUSEPORT", "option", "set", ".", "The", "returned", "listener", "tries", "enabling", "the", "following", "TCP", "options", "which", "usually", "have", "positive", "impact", "on", "performance", ":", "-", "TCP_...
[ "func", "Listen", "(", "network", ",", "addr", "string", ")", "(", "net", ".", "Listener", ",", "error", ")", "{", "ln", ",", "err", ":=", "cfg", ".", "NewListener", "(", "<mask>", ",", "addr", ")", "\n", "if", "err", "!=", "nil", "&&", "strings", ...
21,309
all-21310
[ "filterPR", "indicates", "if", "a", "PR", "should", "be", "filtered", "out", "of", "the", "subpool", ".", "Specifically", "we", "filter", "out", "PRs", "that", ":", "-", "Have", "known", "merge", "conflicts", ".", "-", "Have", "failing", "or", "missing", ...
[ "func", "filterPR", "(", "ghc", "githubClient", ",", "sp", "*", "subpool", ",", "pr", "*", "PullRequest", ")", "bool", "{", "log", ":=", "sp", ".", "log", ".", "WithFields", "(", "pr", ".", "logFields", "(", ")", ")", "\n", "// Skip PRs that are known to...
21,310
all-21311
[ "Iterate", "over", "entries", "in", "the", "hash", "table", "." ]
[ "func", "(", "c", "*", "CHD", ")", "Iterate", "(", ")", "*", "Iterator", "{", "if", "len", "(", "c", ".", "<mask>", ")", "==", "0", "{", "return", "nil", "\n", "}", "\n", "return", "&", "Iterator", "{", "c", ":", "c", "}", "\n", "}" ]
21,311
all-21312
[ "ListenAndServeTLS", "acts", "identically", "to", "ListenAndServe", "except", "that", "it", "uses", "the", "TELNET", "protocol", "over", "TLS", ".", "From", "a", "TELNET", "protocol", "point", "-", "of", "-", "view", "it", "allows", "for", "secured", "telnet",...
[ "func", "(", "server", "*", "Server", ")", "ListenAndServeTLS", "(", "certFile", "string", ",", "keyFile", "string", ")", "error", "{", "addr", ":=", "server", ".", "Addr", "\n", "if", "\"", "\"", "==", "addr", "{", "addr", "=", "\"", "\"", "\n", "}"...
21,312
all-21313
[ "GetSpanName", "returns", "the", "SpanName", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "t", "*", "TraceServiceDefinition", ")", "GetSpanName", "(", ")", "<mask>", "{", "if", "t", "==", "nil", "||", "t", ".", "SpanName", "==", "nil", "{", "return", "\"", "\"", "\n", "}", "\n", "return", "*", "t", ".", "SpanName", "\n", "}...
21,313
all-21314
[ "Acquire", "gets", "a", "resource", "with", "associated", "leased", "resources" ]
[ "func", "(", "c", "*", "Client", ")", "Acquire", "(", "rtype", ",", "state", ",", "dest", "string", ")", "(", "*", "common", ".", "Resource", ",", "error", ")", "{", "var", "resourcesToRelease", "[", "]", "common", ".", "Resource", "\n", "releaseOnFail...
21,314
all-21315
[ "String", "returns", "OS", "Arch", "or", "OS_Arch", "if", "both", "are", "set", ".", "This", "must", "match", "the", "names", "of", "config_setting", "rules", "in" ]
[ "func", "(", "p", "<mask>", ")", "String", "(", ")", "string", "{", "switch", "{", "case", "p", ".", "OS", "!=", "\"", "\"", "&&", "p", ".", "Arch", "!=", "\"", "\"", ":", "return", "p", ".", "OS", "+", "\"", "\"", "+", "p", ".", "Arch", "\...
21,315
all-21316
[ "CheckRDNSequenceWhiteSpace", "returns", "true", "if", "there", "is", "leading", "or", "trailing", "whitespace", "in", "any", "name", "attribute", "in", "the", "sequence", "respectively", "." ]
[ "func", "CheckRDNSequenceWhiteSpace", "(", "raw", "[", "]", "byte", ")", "(", "leading", ",", "trailing", "bool", ",", "err", "error", ")", "{", "var", "seq", "pkix", ".", "RDNSequence", "\n", "if", "_", ",", "err", "=", "asn1", ".", "Unmarshal", "(", ...
21,316
all-21317
[ "readFile", "reads", "a", "JSON", "or", "YAML", "list", "of", "targets", "groups", "from", "the", "file", "depending", "on", "its", "file", "extension", ".", "It", "returns", "full", "configuration", "target", "groups", "." ]
[ "func", "(", "d", "*", "Discovery", ")", "readFile", "(", "filename", "string", ")", "(", "[", "]", "*", "targetgroup", ".", "Group", ",", "error", ")", "{", "fd", ",", "err", ":=", "os", ".", "Open", "(", "filename", ")", "\n", "if", "err", "!="...
21,317
all-21318
[ "CdromDiffOperation", "performs", "operations", "relevant", "to", "managing", "the", "diff", "on", "cdrom", "sub", "-", "resources" ]
[ "func", "CdromDiffOperation", "(", "d", "*", "schema", ".", "ResourceDiff", ",", "c", "*", "govmomi", ".", "<mask>", ")", "error", "{", "log", ".", "Printf", "(", "\"", "\"", ")", "\n", "cr", ":=", "d", ".", "Get", "(", "subresourceTypeCdrom", ")", "...
21,318
all-21319
[ "Clone", "works", "just", "like", "Copy", "but", "also", "reuses", "the", "same", "socket", "as", "the", "original", "session", "in", "case", "it", "had", "already", "reserved", "one", "due", "to", "its", "consistency", "guarantees", ".", "This", "behavior",...
[ "func", "(", "s", "*", "Session", ")", "Clone", "(", ")", "*", "Session", "{", "s", ".", "m", ".", "Lock", "(", ")", "\n", "scopy", ":=", "copySession", "(", "s", ",", "<mask>", ")", "\n", "s", ".", "m", ".", "Unlock", "(", ")", "\n", "return...
21,319
all-21320
[ "prChanges", "gets", "the", "files", "changed", "by", "the", "PR", "either", "from", "the", "cache", "or", "by", "querying", "GitHub", "." ]
[ "func", "(", "c", "*", "changedFilesAgent", ")", "prChanges", "(", "pr", "*", "PullRequest", ")", "config", ".", "ChangedFilesProvider", "{", "return", "func", "(", ")", "(", "[", "]", "string", ",", "error", ")", "{", "cacheKey", ":=", "changeCacheKey", ...
21,320
all-21321
[ "DispatchTouchEvent", "dispatches", "a", "touch", "event", "to", "the", "page", ".", "See", ":", "https", ":", "//", "chromedevtools", ".", "github", ".", "io", "/", "devtools", "-", "protocol", "/", "tot", "/", "Input#method", "-", "dispatchTouchEvent", "pa...
[ "func", "DispatchTouchEvent", "(", "typeVal", "TouchType", ",", "touchPoints", "[", "]", "*", "TouchPoint", ")", "*", "DispatchTouchEventParams", "{", "return", "&", "DispatchTouchEventParams", "{", "<mask>", ":", "typeVal", ",", "TouchPoints", ":", "touchPoints", ...
21,321
all-21322
[ "/", "*", "ProcessEvent", "processes", "all", "events", "come", "from", "the", "control", "parent", ".", "If", "a", "control", "processes", "an", "event", "it", "should", "return", "true", ".", "If", "the", "method", "returns", "false", "it", "means", "tha...
[ "func", "(", "e", "*", "EditField", ")", "ProcessEvent", "(", "event", "Event", ")", "bool", "{", "if", "!", "e", ".", "Active", "(", ")", "||", "!", "e", ".", "Enabled", "(", ")", "{", "return", "false", "\n", "}", "\n\n", "if", "event", ".", ...
21,322
all-21323
[ "New", "returns", "a", "new", "instance", "of", "Client", "with", "default", "values", "." ]
[ "func", "New", "(", "endpoint", "string", ",", "errorRegistry", "ErrorRegistry", ")", "*", "Client", "{", "return", "&", "<mask>", "{", "Endpoint", ":", "endpoint", ",", "ErrorRegistry", ":", "errorRegistry", ",", "KeyHeader", ":", "DefaultKeyHeader", ",", "HT...
21,323
all-21324
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "EventRequestServedFromCache", ")", "UnmarshalJSON", "(", "<mask>", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork51", "("...
21,324
all-21325
[ "SetCompletion", "()", "is", "a", "wrapper", "around", "gtk_entry_set_completion", "()", "." ]
[ "func", "(", "v", "*", "<mask>", ")", "SetCompletion", "(", "completion", "*", "EntryCompletion", ")", "{", "C", ".", "gtk_entry_set_completion", "(", "v", ".", "native", "(", ")", ",", "completion", ".", "native", "(", ")", ")", "\n", "}" ]
21,325
all-21326
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "BaseAudioContext", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "<mask>", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio8", "(", "&", "w", ",", "v", ")",...
21,326
all-21327
[ "dvsFromPath", "gets", "a", "DVS", "object", "from", "its", "path", "." ]
[ "func", "dvsFromPath", "(", "client", "*", "govmomi", ".", "Client", ",", "name", "string", ",", "dc", "*", "object", ".", "Datacenter", ")", "(", "*", "<mask>", ".", "VmwareDistributedVirtualSwitch", ",", "error", ")", "{", "net", ",", "err", ":=", "net...
21,327
all-21328
[ "Read", "is", "implementation", "of", "io", ".", "Closer", "s", "Close", "." ]
[ "func", "(", "s", "*", "Stream", ")", "Close", "(", ")", "<mask>", "{", "runtime", ".", "SetFinalizer", "(", "s", ",", "nil", ")", "\n", "return", "s", ".", "inner", ".", "Close", "(", ")", "\n", "}" ]
21,328
all-21329
[ "Add", "a", "device", "to", "a", "container" ]
[ "func", "containerDeviceAdd", "(", "client", "lxd", ".", "ContainerServer", ",", "name", "string", ",", "devName", "string", ",", "dev", "map", "[", "string", "]", "string", ")", "error", "{", "// Get the container entry", "container", ",", "etag", ",", "err",...
21,329
all-21330
[ "Encode", "encodes", "Pointer", "into", "byte", "buffer", "." ]
[ "func", "(", "p", "valuePointer", ")", "Encode", "(", "b", "[", "]", "byte", ")", "[", "]", "<mask>", "{", "binary", ".", "BigEndian", ".", "PutUint32", "(", "b", "[", ":", "4", "]", ",", "p", ".", "Fid", ")", "\n", "binary", ".", "BigEndian", ...
21,330
all-21331
[ "TSDBCleanTombstones", "implements", "pb", ".", "AdminServer", "." ]
[ "func", "(", "s", "*", "AdminDisabled", ")", "TSDBCleanTombstones", "(", "_", "context", ".", "Context", ",", "_", "*", "pb", ".", "TSDBCleanTombstonesRequest", ")", "(", "*", "<mask>", ".", "TSDBCleanTombstonesResponse", ",", "error", ")", "{", "return", "n...
21,331
all-21332
[ "Scan", "XML", "token", "stream", "to", "find", "next", "StartElement", "." ]
[ "func", "nextStart", "(", "p", "*", "xml", ".", "Decoder", ")", "(", "xml", ".", "StartElement", ",", "error", ")", "{", "for", "{", "t", ",", "err", ":=", "p", ".", "Token", "(", ")", "\n", "if", "err", "!=", "nil", "||", "t", "==", "nil", "...
21,332
all-21333
[ "IndexOf", "looks", "for", "specified", "string", "into", "current", "slice", "." ]
[ "func", "(", "s", "StringSlice", ")", "IndexOf", "(", "str", "string", ")", "int", "{", "for", "i", ",", "v", ":=", "<mask>", "s", "{", "if", "str", "==", "v", "{", "return", "i", "\n", "}", "\n", "}", "\n\n", "return", "-", "1", "\n", "}" ]
21,333
all-21334
[ "Is", "detects", "whether", "the", "error", "is", "equal", "to", "a", "given", "error", ".", "Errors", "are", "considered", "equal", "by", "this", "function", "if", "they", "are", "the", "same", "object", "or", "if", "they", "both", "contain", "the", "sa...
[ "func", "Is", "(", "e", "error", ",", "<mask>", "error", ")", "bool", "{", "if", "e", "==", "original", "{", "return", "true", "\n", "}", "\n\n", "if", "e", ",", "ok", ":=", "e", ".", "(", "*", "Error", ")", ";", "ok", "{", "return", "Is", "(...
21,334
all-21335
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "SetStyleSheetTextReturns", ")", "UnmarshalJSON", "(", "<mask>", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss13", "(", "&"...
21,335
all-21336
[ "Delete", "removes", "the", "firewall" ]
[ "func", "(", "r", "*", "Firewall", ")", "Delete", "(", "actual", "cloud", ".", "Resource", ",", "immutable", "*", "cluster", ".", "Cluster", ")", "(", "*", "cluster", ".", "Cluster", ",", "cloud", ".", "Resource", ",", "error", ")", "{", "logger", "....
21,336
all-21337
[ "HasType", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "n", "*", "NoteDefinition", ")", "HasType", "(", ")", "bool", "{", "if", "n", "!=", "nil", "&&", "n", ".", "Type", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n", "}" ]
21,337
all-21338
[ "HasAggr", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "s", "*", "Series", ")", "HasAggr", "(", ")", "bool", "{", "if", "s", "!=", "nil", "&&", "s", ".", "Aggr", "!=", "nil", "{", "return", "<mask>", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
21,338
all-21339
[ "Run", "executes", "especified", "command", "on", "Docker", ".", "Returns", "ExternalCmdError", "on", "error", "." ]
[ "func", "(", "s", "*", "Docker", ")", "Run", "(", "cmd", "string", ",", "args", "...", "string", ")", "(", "string", ",", "error", ")", "{", "cmdArgs", ":=", "make", "(", "[", "]", "string", ",", "0", ",", "len", "(", "args", ")", "+", "1", "...
21,339
all-21340
[ "ApplyChanges", "applies", "the", "given", "changes", "." ]
[ "func", "(", "p", "*", "InfobloxProvider", ")", "ApplyChanges", "(", "changes", "*", "plan", ".", "Changes", ")", "error", "{", "zones", ",", "err", ":=", "p", ".", "zones", "(", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", "\n", "}",...
21,340
all-21341
[ "inferProtoMode", "sets", "ProtoConfig", ".", "Mode", "based", "on", "the", "directory", "name", "and", "the", "contents", "of", "f", ".", "If", "the", "proto", "mode", "is", "set", "explicitly", "this", "function", "does", "not", "change", "it", ".", "If"...
[ "func", "inferProtoMode", "(", "c", "*", "config", ".", "Config", ",", "rel", "string", ",", "f", "*", "rule", ".", "File", ")", "{", "pc", ":=", "GetProtoConfig", "(", "c", ")", "\n", "if", "pc", ".", "Mode", "!=", "DefaultMode", "||", "pc", ".", ...
21,341
all-21342
[ "ImageName", "converts", "a", "types", ".", "ImageReference", "into", "an", "URL", "-", "like", "image", "name", "which", "MUST", "be", "such", "that", "ParseImageName", "(", "ImageName", "(", "reference", "))", "returns", "an", "equivalent", "reference", ".",...
[ "func", "ImageName", "(", "ref", "types", ".", "ImageReference", ")", "string", "{", "return", "ref", ".", "Transport", "(", ")", ".", "<mask>", "(", ")", "+", "\"", "\"", "+", "ref", ".", "StringWithinTransport", "(", ")", "\n", "}" ]
21,342
all-21343
[ "Run", "runs", "revision", "-", "based", "compactor", "." ]
[ "func", "(", "rc", "*", "Revision", ")", "Run", "(", ")", "{", "prev", ":=", "int64", "(", "0", ")", "\n", "go", "func", "(", ")", "{", "for", "{", "select", "{", "case", "<-", "rc", ".", "ctx", ".", "Done", "(", ")", ":", "return", "\n", "...
21,343
all-21344
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "<mask>", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory7", "(", "&", "w", ",", "v", ")", "\n", "...
21,344
all-21345
[ "FromPath", "iterates", "and", "merges", "all", "configuration", "files", "in", "a", "given", "directory", "returning", "the", "resulting", "config", "." ]
[ "func", "FromPath", "(", "path", "string", ")", "(", "*", "Config", ",", "error", ")", "{", "// Ensure the given filepath exists", "if", "_", ",", "err", ":=", "os", ".", "Stat", "(", "path", ")", ";", "os", ".", "IsNotExist", "(", "err", ")", "{", "...
21,345
all-21346
[ "Manifest", "is", "like", "ImageSource", ".", "GetManifest", "but", "the", "result", "is", "cached", ";", "it", "is", "OK", "to", "call", "this", "however", "often", "you", "need", "." ]
[ "func", "(", "i", "*", "UnparsedImage", ")", "Manifest", "(", "ctx", "context", ".", "<mask>", ")", "(", "[", "]", "byte", ",", "string", ",", "error", ")", "{", "if", "i", ".", "cachedManifest", "==", "nil", "{", "m", ",", "mt", ",", "err", ":="...
21,346
all-21347
[ "Add", "appends", "an", "entry", "to", "the", "logical", "end", "of", "the", "List", "." ]
[ "func", "(", "l", "*", "List", ")", "Add", "(", "entries", "...", "<mask>", "{", "}", ")", "{", "l", ".", "key", ".", "Lock", "(", ")", "\n", "defer", "l", ".", "key", ".", "Unlock", "(", ")", "\n", "l", ".", "underlyer", "=", "append", "(", ...
21,347
all-21348
[ "ParseBranches", "converts", "all", "arguments", "to", "*", "pfs", ".", "Commit", "structs", "using", "the", "semantics", "of", "ParseBranch" ]
[ "func", "ParseBranches", "(", "args", "[", "]", "string", ")", "(", "[", "]", "*", "pfs", ".", "Branch", ",", "error", ")", "{", "var", "results", "[", "]", "*", "pfs", ".", "Branch", "\n", "for", "_", ",", "arg", ":=", "range", "args", "{", "b...
21,348
all-21349
[ "Detect", "whether", "LXD", "already", "uses", "the", "given", "storage", "pool", "." ]
[ "func", "lxdUsesPool", "(", "dbObj", "*", "db", ".", "Cluster", ",", "onDiskPoolName", "string", ",", "driver", "string", ",", "onDiskProperty", "string", ")", "(", "bool", ",", "string", ",", "error", ")", "{", "pools", ",", "err", ":=", "dbObj", ".", ...
21,349
all-21350
[ "Enqueue", "puts", "a", "value", "into", "a", "queue", "with", "a", "given", "priority", "." ]
[ "func", "(", "q", "*", "PriorityQueue", ")", "Enqueue", "(", "val", "string", ",", "pr", "uint16", ")", "error", "{", "<mask>", ":=", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "q", ".", "key", ",", "pr", ")", "\n", "_", ",", "err", ":=", "ne...
21,350
all-21351
[ "GetPrecisionOk", "returns", "a", "tuple", "with", "the", "Precision", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "g", "*", "GraphDefinition", ")", "GetPrecisionOk", "(", ")", "(", "PrecisionT", ",", "bool", ")", "{", "if", "g", "==", "nil", "||", "g", ".", "Precision", "==", "nil", "{", "return", "\"", "\"", ",", "false", "\n", "}", "\n", "return...
21,351
all-21352
[ "AgentPreOfferingPopUp", "pop", "ups", "an", "offering", "." ]
[ "func", "(", "w", "*", "Worker", ")", "AgentPreOfferingPopUp", "(", "job", "*", "data", ".", "Job", ")", "error", "{", "logger", ":=", "w", ".", "logger", ".", "Add", "(", "\"", "\"", ",", "\"", "\"", ",", "\"", "\"", ",", "job", ")", "\n", "of...
21,352
all-21353
[ "getCluster", "is", "a", "modified", "copy", "of", "k8s", ".", "io", "/", "kubernetes", "/", "pkg", "/", "client", "/", "unversioned", "/", "clientcmd", ".", "DirectClientConfig", ".", "getCluster", "." ]
[ "func", "(", "config", "*", "directClientConfig", ")", "getCluster", "(", ")", "clientcmdCluster", "{", "clusterInfos", ":=", "config", ".", "config", ".", "Clusters", "\n", "clusterInfoName", ":=", "config", ".", "getClusterName", "(", ")", "\n\n", "<mask>", ...
21,353
all-21354
[ "NewMockHttpClient", "creates", "a", "new", "mock", "instance" ]
[ "func", "NewMockHttpClient", "(", "ctrl", "*", "gomock", ".", "<mask>", ")", "*", "MockHttpClient", "{", "mock", ":=", "&", "MockHttpClient", "{", "ctrl", ":", "ctrl", "}", "\n", "mock", ".", "recorder", "=", "&", "MockHttpClientMockRecorder", "{", "mock", ...
21,354
all-21355
[ "HasTitleAlign", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "e", "*", "EventStreamDefinition", ")", "HasTitleAlign", "(", ")", "bool", "{", "if", "e", "!=", "nil", "&&", "e", ".", "TitleAlign", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n", "}" ]
21,355
all-21356
[ "Prepend", "()", "is", "a", "wrapper", "around", "gtk_list_store_prepend", "()", "." ]
[ "func", "(", "v", "*", "ListStore", ")", "Prepend", "(", ")", "*", "TreeIter", "{", "<mask>", "ti", "C", ".", "GtkTreeIter", "\n", "C", ".", "gtk_list_store_prepend", "(", "v", ".", "native", "(", ")", ",", "&", "ti", ")", "\n", "iter", ":=", "&", ...
21,356
all-21357
[ "DetermineRaftNode", "figures", "out", "what", "raft", "node", "ID", "and", "address", "we", "have", "if", "any", ".", "This", "decision", "is", "based", "on", "the", "value", "of", "the", "cluster", ".", "https_address", "config", "key", "and", "on", "the...
[ "func", "DetermineRaftNode", "(", "tx", "*", "db", ".", "NodeTx", ")", "(", "*", "db", ".", "RaftNode", ",", "error", ")", "{", "config", ",", "err", ":=", "ConfigLoad", "(", "tx", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "...
21,357
all-21358
[ "ValidateRequestWithLeeway", "validates", "the", "token", "within", "the", "http", "request", ".", "The", "provided", "leeway", "value", "is", "used", "to", "compare", "time", "values", "." ]
[ "func", "(", "v", "*", "JWTValidator", ")", "ValidateRequestWithLeeway", "(", "r", "*", "<mask>", ".", "Request", ",", "leeway", "time", ".", "Duration", ")", "(", "*", "jwt", ".", "JSONWebToken", ",", "error", ")", "{", "return", "v", ".", "validateRequ...
21,358
all-21359
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "SetFontFamiliesParams", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage10", "(", "&", "w", ",", "v", ")...
21,359
all-21360
[ "GetGroupName", "()", "is", "a", "wrapper", "around", "gtk_notebook_get_group_name", "()", "." ]
[ "func", "(", "v", "*", "Notebook", ")", "GetGroupName", "(", ")", "(", "string", ",", "error", ")", "{", "c", ":=", "C", ".", "gtk_notebook_get_group_name", "(", "v", ".", "native", "(", ")", ")", "\n", "if", "c", "==", "nil", "{", "return", "\"", ...
21,360
all-21361
[ "AddMapping", "maps", "an", "external", "port", "to", "a", "local", "port", "for", "a", "specific", "service", "to", "NAT", "-", "PMP", "interface", "." ]
[ "func", "(", "n", "*", "npmp", ")", "AddMapping", "(", "protocol", "string", ",", "extPort", ",", "intPort", "int", ",", "name", "string", ",", "lifetime", "<mask>", ".", "Duration", ")", "error", "{", "if", "lifetime", "<=", "0", "{", "return", "ErrTo...
21,361
all-21362
[ "Return", "the", "min", "/", "max", "frames", "from", "an", "unsorted", "list" ]
[ "func", "minMaxFrame", "(", "frames", "[", "]", "int", ")", "(", "int", ",", "int", ")", "{", "srcframes", ":=", "make", "(", "[", "]", "int", ",", "len", "(", "frames", ")", ",", "len", "(", "frames", ")", ")", "\n", "copy", "(", "srcframes", ...
21,362
all-21363
[ "WithSessionID", "session", "to", "detach", "." ]
[ "func", "(", "p", "DetachFromTargetParams", ")", "WithSessionID", "(", "sessionID", "SessionID", ")", "*", "DetachFromTargetParams", "{", "p", ".", "SessionID", "=", "sessionID", "\n", "<mask>", "&", "p", "\n", "}" ]
21,363
all-21364
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "CreateTargetParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget23", "(", "&", "...
21,364
all-21365
[ "SetFlagsFromEnv", "parses", "all", "registered", "flags", "in", "the", "given", "flagset", "and", "if", "they", "are", "not", "already", "set", "it", "attempts", "to", "set", "their", "values", "from", "environment", "variables", ".", "Environment", "variables"...
[ "func", "SetFlagsFromEnv", "(", "prefix", "string", ",", "fs", "*", "flag", ".", "FlagSet", ")", "error", "{", "var", "err", "error", "\n", "alreadySet", ":=", "make", "(", "<mask>", "[", "string", "]", "bool", ")", "\n", "fs", ".", "Visit", "(", "fu...
21,365
all-21366
[ "NewWALWatcher", "creates", "a", "new", "WAL", "watcher", "for", "a", "given", "WriteTo", "." ]
[ "func", "NewWALWatcher", "(", "logger", "log", ".", "Logger", ",", "name", "string", ",", "writer", "writeTo", ",", "walDir", "string", ")", "*", "WALWatcher", "{", "if", "logger", "==", "nil", "{", "logger", "=", "log", ".", "NewNopLogger", "(", ")", ...
21,366
all-21367
[ "RemoveTickCallback", "is", "a", "wrapper", "around", "gtk_widget_remove_tick_callback", "()", "." ]
[ "func", "(", "v", "*", "Widget", ")", "RemoveTickCallback", "(", "id", "int", ")", "{", "C", ".", "gtk_widget_remove_tick_callback", "(", "v", ".", "native", "(", ")", ",", "C", ".", "guint", "(", "<mask>", ")", ")", "\n", "}" ]
21,367
all-21368
[ "MappedKind", "records", "the", "fact", "that", "the", "given", "mapping", "was", "applied", "while", "processing", "the", "given", "package", "." ]
[ "func", "(", "mr", "*", "metaResolver", ")", "MappedKind", "(", "pkgRel", "string", ",", "kind", "config", ".", "MappedKind", ")", "{", "mr", ".", "mappedKinds", "[", "pkgRel", "]", "=", "append", "(", "mr", ".", "mappedKinds", "[", "pkgRel", "]", ",",...
21,368
all-21369
[ "withRetryPolicy", "sets", "the", "retry", "policy", "of", "this", "call", "." ]
[ "func", "withRetryPolicy", "(", "rp", "retryPolicy", ")", "retryOption", "{", "return", "retryOption", "{", "applyFunc", ":", "func", "(", "o", "*", "<mask>", ")", "{", "o", ".", "retryPolicy", "=", "rp", "\n", "}", "}", "\n", "}" ]
21,369
all-21370
[ "/", "*", "utility", "function", ":", "convert", "one", "image", "to", "another", "with", "optional", "vertical", "flip" ]
[ "func", "ConvertImage", "(", "src", ",", "dst", "unsafe", ".", "Pointer", ",", "flags", "int", ")", "{", "C", ".", "cvConvertImage", "(", "src", ",", "dst", ",", "C", ".", "int", "(", "<mask>", ")", ")", "\n", "}" ]
21,370
all-21371
[ "SetMaxWidth", "sets", "the", "maximum", "lenght", "of", "the", "EditField", "text", ".", "If", "the", "current", "text", "is", "longer", "it", "is", "truncated" ]
[ "func", "(", "e", "*", "EditField", ")", "SetMaxWidth", "(", "w", "int", ")", "{", "e", ".", "maxWidth", "=", "w", "\n", "if", "w", ">", "0", "&&", "xs", ".", "Len", "(", "e", ".", "<mask>", ")", ">", "w", "{", "e", ".", "title", "=", "xs",...
21,371
all-21372
[ "*", "*", "*", "Append", "writes", "len", "(", "b", ")", "bytes", "at", "the", "end", "of", "the", "named", "file", ".", "It", "returns", "an", "error", "if", "any", ".", "The", "file", "is", "backed", "up", "." ]
[ "func", "Append", "(", "<mask>", "string", ",", "b", "[", "]", "byte", ")", "error", "{", "e", ",", "err", ":=", "NewEdit", "(", "filename", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\n\n", "err", "=", "e", ".", "Ap...
21,372
all-21373
[ "Cancel", "cancels", "an", "existing", "GDPR", "request", "." ]
[ "func", "(", "c", "*", "<mask>", ")", "Cancel", "(", "id", "string", ")", "(", "*", "CancellationResponse", ",", "error", ")", "{", "cancelResp", ":=", "&", "CancellationResponse", "{", "}", "\n", "resp", ",", "err", ":=", "c", ".", "caller", ".", "C...
21,373
all-21374
[ "Do", "executes", "Runtime", ".", "releaseObjectGroup", "against", "the", "provided", "context", "." ]
[ "func", "(", "p", "*", "ReleaseObjectGroupParams", ")", "Do", "(", "ctx", "context", ".", "<mask>", ")", "(", "err", "error", ")", "{", "return", "cdp", ".", "Execute", "(", "ctx", ",", "CommandReleaseObjectGroup", ",", "p", ",", "nil", ")", "\n", "}" ...
21,374
all-21375
[ "Filter", "appends", "a", "new", "filter", "to", "the", "query", "." ]
[ "func", "(", "q", "*", "Query", ")", "Filter", "(", "rule", "string", ")", "*", "Query", "{", "q", ".", "headers", "=", "append", "(", "q", ".", "<mask>", ",", "\"", "\"", "+", "rule", ")", "\n", "return", "q", "\n", "}" ]
21,375
all-21376
[ "SetPrivateMeta", "-", "set", "a", "private", "meta", "data", "record" ]
[ "func", "(", "s", "*", "Task", ")", "SetPrivateMeta", "(", "name", "string", ",", "<mask>", "interface", "{", "}", ")", "{", "if", "s", ".", "PrivateMetaData", "==", "nil", "{", "s", ".", "PrivateMetaData", "=", "make", "(", "map", "[", "string", "]"...
21,376
all-21377
[ "GetPrintPages", "()", "is", "a", "wrapper", "around", "gtk_print_settings_get_print_pages", "()", "." ]
[ "func", "(", "ps", "*", "PrintSettings", ")", "GetPrintPages", "(", ")", "PrintPages", "{", "c", ":=", "C", ".", "gtk_print_settings_get_print_pages", "(", "<mask>", ".", "native", "(", ")", ")", "\n", "return", "PrintPages", "(", "c", ")", "\n", "}" ]
21,377
all-21378
[ "Make", "space", "in", "the", "new", "buckets", "by", "expiring", "the", "really", "bad", "entries", ".", "If", "no", "bad", "entries", "are", "available", "we", "remove", "the", "oldest", "." ]
[ "func", "(", "a", "*", "AddrBook", ")", "expireNew", "(", "bucketIdx", "int", ")", "{", "for", "addrStr", ",", "ka", ":=", "range", "a", ".", "addrNew", "[", "bucketIdx", "]", "{", "// If an entry is bad, throw it away", "if", "ka", ".", "isBad", "(", ")...
21,378
all-21379
[ "AddGroup", "returns", "a", "new", "Group", "." ]
[ "func", "NewGroup", "(", "name", "string", ",", "members", "...", "string", ")", "*", "Group", "{", "return", "&", "Group", "{", "<mask>", ":", "name", ",", "password", ":", "\"", "\"", ",", "GID", ":", "-", "1", ",", "UserList", ":", "members", ",...
21,379
all-21380
[ "validatePlugins", "will", "return", "error", "if", "there", "are", "unknown", "or", "duplicated", "plugins", "." ]
[ "func", "validatePlugins", "(", "plugins", "map", "[", "string", "]", "[", "]", "string", ")", "error", "{", "var", "errors", "[", "]", "string", "\n", "for", "_", ",", "configuration", ":=", "range", "plugins", "{", "for", "_", ",", "plugin", ":=", ...
21,380
all-21381
[ "EncodePeer", "implements", "the", "Transport", "interface", "." ]
[ "func", "(", "n", "*", "NetworkTransport", ")", "EncodePeer", "(", "id", "ServerID", ",", "p", "ServerAddress", ")", "[", "]", "byte", "{", "address", ":=", "n", ".", "getProviderAddressOrFallback", "(", "<mask>", ",", "p", ")", "\n", "return", "[", "]",...
21,381
all-21382
[ "GetJobLog", "returns", "the", "job", "logs", "works", "for", "both", "kubernetes", "and", "jenkins", "agent", "types", "." ]
[ "func", "(", "ja", "*", "JobAgent", ")", "GetJobLog", "(", "job", ",", "id", "string", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "j", ",", "err", ":=", "ja", ".", "GetProwJob", "(", "job", ",", "id", ")", "\n", "if", "err", "!=", "n...
21,382
all-21383
[ "runAgent", "runs", "the", "ECS", "agent", "inside", "a", "goroutine", "and", "waits", "to", "be", "told", "to", "exit", "." ]
[ "func", "(", "h", "*", "handler", ")", "runAgent", "(", "ctx", "context", ".", "Context", ")", "uint32", "{", "agentCtx", ",", "cancel", ":=", "context", ".", "WithCancel", "(", "ctx", ")", "\n", "indicator", ":=", "newTermHandlerIndicator", "(", ")", "\...
21,383
all-21384
[ "GetPalette", "returns", "the", "Palette", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "g", "*", "GraphDefinitionRequestStyle", ")", "GetPalette", "(", ")", "<mask>", "{", "if", "g", "==", "nil", "||", "g", ".", "Palette", "==", "nil", "{", "return", "\"", "\"", "\n", "}", "\n", "return", "*", "g", ".", "Palette", "\n", ...
21,384
all-21385
[ "At", "finds", "an", "element", "at", "the", "provided", "index", ".", "It", "only", "applies", "to", "the", "immediate", "selection", "meaning", "that", "the", "returned", "selection", "may", "still", "refer", "to", "multiple", "elements", "if", "any", "par...
[ "func", "(", "s", "*", "MultiSelection", ")", "At", "(", "index", "int", ")", "*", "Selection", "{", "return", "newSelection", "(", "s", ".", "session", ",", "s", ".", "selectors", ".", "At", "(", "<mask>", ")", ")", "\n", "}" ]
21,385
all-21386
[ "AppendItem", "is", "a", "wrapper", "around", "g_menu_append_item", "()", "." ]
[ "func", "(", "v", "*", "Menu", ")", "AppendItem", "(", "item", "*", "MenuItem", ")", "{", "C", ".", "g_menu_append_item", "(", "v", ".", "native", "(", ")", ",", "<mask>", ".", "native", "(", ")", ")", "\n", "}" ]
21,386
all-21387
[ "offset", "parses", "an", "offset", "modifier", ".", "offset", "<duration", ">" ]
[ "func", "(", "p", "*", "parser", ")", "offset", "(", ")", "time", ".", "Duration", "{", "const", "ctx", "=", "\"", "\"", "\n\n", "p", ".", "next", "(", ")", "\n", "offi", ":=", "p", ".", "expect", "(", "ItemDuration", ",", "ctx", ")", "\n\n", "...
21,387
all-21388
[ "PopupText", "returns", "the", "current", "alert", "confirm", "or", "prompt", "popup", "text", "." ]
[ "func", "(", "p", "*", "Page", ")", "PopupText", "(", ")", "(", "string", ",", "error", ")", "{", "text", ",", "err", ":=", "p", ".", "session", ".", "GetAlertText", "(", ")", "\n", "if", "err", "!=", "nil", "{", "return", "\"", "\"", ",", "fmt...
21,388
all-21389
[ "DelNetworkList", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockCNI", ")", "DelNetworkList", "(", "arg0", "*", "libcni", ".", "NetworkConfigList", ",", "arg1", "*", "libcni", ".", "RuntimeConf", ")", "error", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ...
21,389
all-21390
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "GetVersionParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "<mask>", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser10", "(", "&", ...
21,390
all-21391
[ "sendRPC", "is", "used", "to", "encode", "and", "send", "the", "RPC", "." ]
[ "func", "sendRPC", "(", "conn", "*", "netConn", ",", "rpcType", "uint8", ",", "args", "<mask>", "{", "}", ")", "error", "{", "// Write the request type", "if", "err", ":=", "conn", ".", "w", ".", "WriteByte", "(", "rpcType", ")", ";", "err", "!=", "nil...
21,391
all-21392
[ "updateConfig", "validates", "config", "and", "if", "it", "valides", "successfully", "loads", "it", "into", "the", "apiServer", "s", "config", "cache", ".", "The", "caller", "should", "already", "hold", "a", ".", "configMu", "and", "a", ".", "samlSPMu", "(",...
[ "func", "(", "a", "*", "apiServer", ")", "updateConfig", "(", "config", "*", "auth", ".", "AuthConfig", ")", "error", "{", "if", "config", "==", "nil", "{", "config", "=", "&", "auth", ".", "AuthConfig", "{", "}", "\n", "}", "\n", "newConfig", ",", ...
21,392
all-21393
[ "Get", "adds", "the", "route", "pattern", "that", "matches", "a", "GET", "http", "method", "to", "execute", "the", "handlerFn", "http", ".", "HandlerFunc", "." ]
[ "func", "(", "mx", "*", "Mux", ")", "Get", "(", "pattern", "string", ",", "handlerFn", "http", ".", "HandlerFunc", ")", "{", "mx", ".", "handle", "(", "mGET", ",", "<mask>", ",", "handlerFn", ")", "\n", "}" ]
21,393
all-21394
[ "nextToken", "returns", "the", "next", "token", "from", "the", "promlexer", ".", "It", "skips", "over", "tabs", "and", "spaces", "." ]
[ "func", "(", "p", "*", "PromParser", ")", "nextToken", "(", ")", "<mask>", "{", "for", "{", "if", "tok", ":=", "p", ".", "l", ".", "Lex", "(", ")", ";", "tok", "!=", "tWhitespace", "{", "return", "tok", "\n", "}", "\n", "}", "\n", "}" ]
21,394
all-21395
[ "startProxy", "launches", "an", "HTTP", "proxy", "for", "client", "communication", "which", "proxies", "to", "other", "etcd", "nodes", "." ]
[ "func", "startProxy", "(", "cfg", "*", "config", ")", "error", "{", "lg", ":=", "cfg", ".", "ec", ".", "GetLogger", "(", ")", "\n", "if", "lg", "!=", "nil", "{", "lg", ".", "Info", "(", "\"", "\"", ")", "\n", "}", "else", "{", "plog", ".", "N...
21,395
all-21396
[ "WithTransferMode", "whether", "to", "report", "trace", "events", "as", "series", "of", "dataCollected", "events", "or", "to", "save", "trace", "to", "a", "stream", "(", "defaults", "to", "ReportEvents", ")", "." ]
[ "func", "(", "p", "StartParams", ")", "WithTransferMode", "(", "transferMode", "TransferMode", ")", "*", "StartParams", "{", "p", ".", "TransferMode", "=", "transferMode", "\n", "<mask>", "&", "p", "\n", "}" ]
21,396
all-21397
[ "GetStoragePoolVolumes", "returns", "a", "list", "of", "StorageVolume", "entries", "for", "the", "provided", "pool" ]
[ "func", "(", "r", "*", "ProtocolLXD", ")", "GetStoragePoolVolumes", "(", "pool", "string", ")", "(", "[", "]", "api", ".", "StorageVolume", ",", "error", ")", "{", "if", "!", "r", ".", "HasExtension", "(", "\"", "\"", ")", "{", "return", "nil", ",", ...
21,397
all-21398
[ "UntagResourceWithContext", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockSecretsManagerAPI", ")", "UntagResourceWithContext", "(", "arg0", "aws", ".", "Context", ",", "arg1", "*", "secretsmanager", ".", "UntagResourceInput", ",", "arg2", "...", "request", ".", "Option", ")", "(", "*", "secretsmanager", "...
21,398
all-21399
[ "CheckConfig", "validates", "configuration", "files", "." ]
[ "func", "CheckConfig", "(", "files", "...", "string", ")", "int", "{", "<mask>", ":=", "false", "\n\n", "for", "_", ",", "f", ":=", "range", "files", "{", "ruleFiles", ",", "err", ":=", "checkConfig", "(", "f", ")", "\n", "if", "err", "!=", "nil", ...
21,399
all-21400
[ "Do", "performs", "the", "given", "http", "request", "and", "sets", "the", "corresponding", "response", ".", "Request", "must", "contain", "at", "least", "non", "-", "zero", "RequestURI", "with", "full", "url", "(", "including", "scheme", "and", "host", ")",...
[ "func", "(", "c", "*", "HostClient", ")", "Do", "(", "req", "*", "Request", ",", "resp", "*", "Response", ")", "error", "{", "var", "err", "error", "\n", "<mask>", "retry", "bool", "\n", "maxAttempts", ":=", "c", ".", "MaxIdemponentCallAttempts", "\n", ...