id
int32
0
25.3k
idx
stringlengths
5
9
nl_tokens
listlengths
1
418
pl_tokens
listlengths
22
4.98k
9,500
all-9501
[ "Insert", "is", "a", "wrapper", "around", "gtk_list_box_insert", "()", "." ]
[ "func", "(", "v", "*", "ListBox", ")", "Insert", "(", "child", "IWidget", ",", "<mask>", "int", ")", "{", "C", ".", "gtk_list_box_insert", "(", "v", ".", "native", "(", ")", ",", "child", ".", "toWidget", "(", ")", ",", "C", ".", "gint", "(", "po...
9,501
all-9502
[ "MustPayouts", "retrieves", "the", "Payouts", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
[ "func", "(", "u", "InflationResult", ")", "MustPayouts", "(", ")", "[", "]", "InflationPayout", "{", "val", ",", "ok", ":=", "u", ".", "GetPayouts", "(", ")", "\n\n", "if", "!", "<mask>", "{", "panic", "(", "\"", "\"", ")", "\n", "}", "\n\n", "retu...
9,502
all-9503
[ "SafeUnmarshal", "decodes", "the", "provided", "reader", "into", "the", "destination", "and", "verifies", "that", "provided", "bytes", "are", "all", "consumed", "by", "the", "unmarshalling", "process", "." ]
[ "func", "SafeUnmarshal", "(", "data", "[", "]", "byte", ",", "dest", "<mask>", "{", "}", ")", "error", "{", "r", ":=", "bytes", ".", "NewReader", "(", "data", ")", "\n", "n", ",", "err", ":=", "Unmarshal", "(", "r", ",", "dest", ")", "\n\n", "if"...
9,503
all-9504
[ "Set", "is", "required", "for", "kingpin", "interfaces", "to", "allow", "command", "line", "params", "to", "be", "set", "to", "our", "map", "datatype" ]
[ "func", "(", "o", "*", "MapErrorOption", ")", "Set", "(", "value", "string", ")", "error", "{", "parts", ":=", "stringMapRegex", ".", "Split", "(", "value", ",", "2", ")", "\n", "if", "len", "(", "parts", ")", "!=", "2", "{", "return", "fmt", ".", ...
9,504
all-9505
[ "Set", "sets", "the", "value", "in", "the", "format", "min", "[", ":", "max", "]", "for", "a", "wait", "timer", "." ]
[ "func", "(", "w", "*", "WaitVar", ")", "Set", "(", "value", "string", ")", "error", "{", "wait", ",", "err", ":=", "ParseWaitConfig", "(", "value", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\n\n", "w", ".", "Min", "="...
9,505
all-9506
[ "NewRSASigner", "creates", "an", "RSA", "Signer", "for", "the", "specified", "Algorithm", "and", "provided", "low", "level", "RSA", "implementation", "." ]
[ "func", "NewRSASigner", "(", "alg", "Algorithm", ",", "method", "RSASignerVerifier", ")", "func", "(", "Store", ",", "crypto", ".", "Hash", ")", "(", "Signer", ",", "error", ")", "{", "return", "func", "(", "store", "Store", ",", "hash", "crypto", ".", ...
9,506
all-9507
[ "Status", "is", "a", "wrapper", "around", "cairo_pattern_status", "()", "." ]
[ "func", "(", "v", "*", "Pattern", ")", "<mask>", "(", ")", "Status", "{", "c", ":=", "C", ".", "cairo_pattern_status", "(", "v", ".", "native", "(", ")", ")", "\n", "return", "Status", "(", "c", ")", "\n", "}" ]
9,507
all-9508
[ "SetSize", "changes", "control", "size", ".", "Constant", "DoNotChange", "can", "be", "used", "as", "placeholder", "to", "indicate", "that", "the", "control", "attrubute", "should", "be", "unchanged", ".", "Method", "does", "nothing", "if", "new", "size", "is"...
[ "func", "(", "e", "*", "EditField", ")", "SetSize", "(", "width", ",", "height", "int", ")", "{", "if", "width", "!=", "KeepValue", "&&", "(", "<mask>", ">", "1000", "||", "width", "<", "e", ".", "minW", ")", "{", "return", "\n", "}", "\n", "if",...
9,508
all-9509
[ "A", "zero", "Port", "is", "taken", "to", "mean", "no", "port", "provided", "per", "BEP", "7", "." ]
[ "func", "(", "me", "NodeAddr", ")", "String", "(", ")", "string", "{", "if", "me", ".", "Port", "==", "0", "{", "return", "<mask>", ".", "IP", ".", "String", "(", ")", "\n", "}", "\n", "return", "net", ".", "JoinHostPort", "(", "me", ".", "IP", ...
9,509
all-9510
[ "DeepCopyObject", "is", "an", "autogenerated", "deepcopy", "function", "copying", "the", "receiver", "creating", "a", "new", "runtime", ".", "Object", "." ]
[ "func", "(", "<mask>", "*", "ProwJob", ")", "DeepCopyObject", "(", ")", "runtime", ".", "Object", "{", "if", "c", ":=", "in", ".", "DeepCopy", "(", ")", ";", "c", "!=", "nil", "{", "return", "c", "\n", "}", "\n", "return", "nil", "\n", "}" ]
9,510
all-9511
[ "Copy", "returns", "a", "deep", "copy", "of", "this", "configuration", "." ]
[ "func", "(", "c", "*", "VaultConfig", ")", "Copy", "(", ")", "*", "VaultConfig", "{", "if", "c", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "<mask>", "o", "VaultConfig", "\n", "o", ".", "Address", "=", "c", ".", "Address", "\n\n", "o", ...
9,511
all-9512
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "PushNodeByPathToFrontendReturns", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom25", "(", ...
9,512
all-9513
[ "IsCustom", "()", "is", "a", "wrapper", "around", "gtk_paper_size_is_custom", "()", "." ]
[ "func", "(", "<mask>", "*", "PaperSize", ")", "IsCustom", "(", ")", "bool", "{", "c", ":=", "C", ".", "gtk_paper_size_is_custom", "(", "ps", ".", "native", "(", ")", ")", "\n", "return", "gobool", "(", "c", ")", "\n", "}" ]
9,513
all-9514
[ "validateAndWrapHandlers", "preforms", "validation", "and", "wrapping", "for", "each", "input", "handler", ".", "It", "accepts", "an", "optional", "wrapper", "function", "to", "perform", "custom", "wrapping", "on", "handlers", "." ]
[ "func", "validateAndWrapHandlers", "(", "handlers", "[", "]", "<mask>", ",", "wrappers", "...", "func", "(", "Handler", ")", "Handler", ")", "[", "]", "Handler", "{", "var", "wrapper", "func", "(", "Handler", ")", "Handler", "\n", "if", "len", "(", "wrap...
9,514
all-9515
[ "cancelCtxIfJobFails", "watches", "jobID", "s", "JobPtr", "and", "if", "its", "state", "is", "changed", "to", "a", "terminal", "state", "(", "KILLED", "FAILED", "or", "SUCCESS", ")", "cancel", "the", "jobCtx", "so", "we", "kill", "any", "user", "processes" ]
[ "func", "(", "a", "*", "APIServer", ")", "cancelCtxIfJobFails", "(", "jobCtx", "context", ".", "Context", ",", "jobCancel", "func", "(", ")", ",", "jobID", "string", ")", "{", "logger", ":=", "a", ".", "getWorkerLogger", "(", ")", "// this worker's formattin...
9,515
all-9516
[ "Generate", "password", "requirements", "from", "an", "existing", "password", "." ]
[ "func", "MakeRequirements", "(", "password", "string", ")", "PasswordStrengthRequirements", "{", "pwd", ":=", "[", "]", "byte", "(", "password", ")", "\n", "reqs", ":=", "PasswordStrengthRequirements", "{", "}", "\n", "reqs", ".", "MaximumTotalLength", "=", "len...
9,516
all-9517
[ "Negate", "negates", "the", "most", "recent", "filter", "." ]
[ "func", "(", "q", "*", "<mask>", ")", "Negate", "(", ")", "*", "Query", "{", "q", ".", "headers", "=", "append", "(", "q", ".", "headers", ",", "\"", "\"", ")", "\n", "return", "q", "\n", "}" ]
9,517
all-9518
[ "Set", "verifies", "the", "argument", "to", "be", "a", "valid", "member", "of", "the", "allowed", "values", "before", "setting", "the", "underlying", "flag", "value", "." ]
[ "func", "(", "ss", "*", "SelectiveStringsValue", ")", "Set", "(", "s", "string", ")", "error", "{", "<mask>", ":=", "strings", ".", "Split", "(", "s", ",", "\"", "\"", ")", "\n", "for", "i", ":=", "range", "vs", "{", "if", "_", ",", "ok", ":=", ...
9,518
all-9519
[ "MergeConfig", "merges", "two", "config", "objects", "together", "and", "returns", "the", "resulting", "configuration", ".", "Values", "from", "the", "right", "take", "precedence", "over", "the", "left", "side", "." ]
[ "func", "MergeConfig", "(", "a", ",", "b", "*", "Config", ")", "*", "Config", "{", "// Return quickly if either side was nil", "if", "a", "==", "nil", "{", "return", "b", "\n", "}", "\n", "if", "b", "==", "nil", "{", "return", "a", "\n", "}", "\n\n", ...
9,519
all-9520
[ "ArmForSwitch", "returns", "which", "field", "name", "should", "be", "used", "for", "storing", "the", "value", "for", "an", "instance", "of", "OperationResult" ]
[ "func", "(", "u", "OperationResult", ")", "ArmForSwitch", "(", "sw", "int32", ")", "(", "string", ",", "bool", ")", "{", "switch", "OperationResultCode", "(", "sw", ")", "{", "case", "OperationResultCodeOpInner", ":", "return", "\"", "\"", ",", "<mask>", "...
9,520
all-9521
[ "Keys", "returns", "the", "list", "of", "keys", "in", "this", "map", ".", "You", "can", "use", "this", "from", "a", "template", "like", "so", "[", "%", "FOREACH", "key", "IN", "hash", ".", "Keys", "(", "mymap", ")", "%", "]", "...", "[", "%", "EN...
[ "func", "Keys", "(", "m", "map", "[", "interface", "{", "}", "]", "<mask>", "{", "}", ")", "[", "]", "interface", "{", "}", "{", "l", ":=", "make", "(", "[", "]", "interface", "{", "}", ",", "len", "(", "m", ")", ")", "\n", "i", ":=", "0", ...
9,521
all-9522
[ "ShouldPullWithExecutionRole", "returns", "whether", "this", "container", "has", "its", "own", "ECR", "credentials" ]
[ "func", "(", "c", "*", "<mask>", ")", "ShouldPullWithExecutionRole", "(", ")", "bool", "{", "c", ".", "lock", ".", "RLock", "(", ")", "\n", "defer", "c", ".", "lock", ".", "RUnlock", "(", ")", "\n\n", "return", "c", ".", "RegistryAuthentication", "!=",...
9,522
all-9523
[ "DelByType", "removes", "the", "specified", "format", "returns", "true", "when", "an", "item", "was", "actually", "removed" ]
[ "func", "(", "f", "*", "defaultFormats", ")", "DelByFormat", "(", "strfmt", "Format", ")", "bool", "{", "f", ".", "Lock", "(", ")", "\n", "defer", "f", ".", "Unlock", "(", ")", "\n\n", "tpe", ":=", "reflect", ".", "TypeOf", "(", "strfmt", ")", "\n"...
9,523
all-9524
[ "add", "returns", "the", "sum", "of", "a", "and", "b", "." ]
[ "func", "add", "(", "b", ",", "a", "interface", "{", "}", ")", "(", "interface", "{", "}", ",", "error", ")", "{", "av", ":=", "reflect", ".", "ValueOf", "(", "a", ")", "\n", "bv", ":=", "reflect", ".", "ValueOf", "(", "b", ")", "\n\n", "switch...
9,524
all-9525
[ "Remove", "implements", "Remove", "method", "of", "PlatformService", "interface" ]
[ "func", "(", "s", "*", "platformService", ")", "Remove", "(", "name", "string", ")", "error", "{", "if", "name", "==", "\"", "\"", "{", "return", "appTypes", ".", "ErrPlatformNameMissing", "\n", "}", "\n", "conn", ",", "err", ":=", "db", ".", "Conn", ...
9,525
all-9526
[ "WithAdditionalPachdCert", "instructs", "the", "New", "*", "functions", "to", "additionally", "trust", "the", "signed", "cert", "mounted", "in", "Pachd", "s", "cert", "volume", ".", "This", "is", "used", "by", "Pachd", "when", "connecting", "to", "itself", "("...
[ "func", "WithAdditionalPachdCert", "(", ")", "Option", "{", "return", "func", "(", "settings", "*", "clientSettings", ")", "error", "{", "if", "_", ",", "err", ":=", "<mask>", ".", "Stat", "(", "grpcutil", ".", "TLSVolumePath", ")", ";", "err", "==", "ni...
9,526
all-9527
[ "HasProjectID", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "i", "*", "IntegrationGCPCreateRequest", ")", "HasProjectID", "(", ")", "bool", "{", "if", "i", "!=", "nil", "&&", "i", ".", "ProjectID", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n", "}" ]
9,527
all-9528
[ "Find", "the", "host", "with", "the", "minimum", "(", "good", "to", "add", "a", "new", "container", ")", "and", "maximum", "(", "good", "to", "remove", "a", "container", ")", "value", "for", "the", "pair", "[", "(", "number", "of", "containers", "for",...
[ "func", "(", "s", "*", "segregatedScheduler", ")", "minMaxNodes", "(", "nodes", "[", "]", "cluster", ".", "Node", ",", "appName", ",", "process", "string", ")", "(", "string", ",", "string", ",", "error", ")", "{", "nodesList", ":=", "make", "(", "node...
9,528
all-9529
[ "HasType", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "q", "*", "QueryValueDefinition", ")", "HasType", "(", ")", "bool", "{", "if", "q", "!=", "nil", "&&", "q", ".", "<mask>", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
9,529
all-9530
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "InternalPropertyDescriptor", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime18", "(", "&", "w", ",", "...
9,530
all-9531
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "PushNodesByBackendIdsToFrontendParams", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom24", "(", "&", "w", "...
9,531
all-9532
[ "Push", "creates", "a", "new", "value", "under", "the", "current", "root", "url", ".", "A", "populated", "pointer", "with", "that", "value", "is", "also", "returned", "." ]
[ "func", "(", "c", "*", "Client", ")", "Push", "(", "value", "interface", "{", "}", ",", "params", "map", "[", "string", "]", "string", ")", "(", "*", "<mask>", ",", "error", ")", "{", "body", ",", "err", ":=", "json", ".", "Marshal", "(", "value"...
9,532
all-9533
[ "HasType", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "t", "*", "TileDefRequest", ")", "HasType", "(", ")", "bool", "{", "if", "t", "!=", "nil", "&&", "t", ".", "Type", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n", "}" ]
9,533
all-9534
[ "Read", "the", "user", "s", "answer", "from", "the", "input", "stream", "trimming", "newline", "and", "providing", "a", "default", "." ]
[ "func", "readAnswer", "(", "defaultAnswer", "string", ")", "string", "{", "answer", ",", "_", ":=", "stdin", ".", "ReadString", "(", "'\\n'", ")", "\n", "answer", "=", "strings", ".", "TrimSuffix", "(", "answer", ",", "\"", "\\n", "\"", ")", "\n", "ans...
9,534
all-9535
[ "get", "gets", "the", "named", "builder", "from", "the", "registry", "." ]
[ "func", "get", "(", "name", "string", ")", "(", "Builder", ",", "error", ")", "{", "b", ",", "ok", ":=", "builders", "[", "name", "]", "\n", "if", "!", "ok", "{", "return", "nil", ",", "<mask>", ".", "Errorf", "(", "\"", "\"", ",", "name", ")",...
9,535
all-9536
[ "===", "floor", "(", "Vector", "ValueTypeVector", ")", "Vector", "===" ]
[ "func", "funcFloor", "(", "vals", "[", "]", "Value", ",", "args", "Expressions", ",", "enh", "*", "EvalNodeHelper", ")", "<mask>", "{", "return", "simpleFunc", "(", "vals", ",", "enh", ",", "math", ".", "Floor", ")", "\n", "}" ]
9,536
all-9537
[ "bind", "one", "or", "more", "named", "sampler", "objects", "to", "a", "sequence", "of", "consecutive", "sampler", "units" ]
[ "func", "BindSamplers", "(", "<mask>", "uint32", ",", "count", "int32", ",", "samplers", "*", "uint32", ")", "{", "C", ".", "glowBindSamplers", "(", "gpBindSamplers", ",", "(", "C", ".", "GLuint", ")", "(", "first", ")", ",", "(", "C", ".", "GLsizei", ...
9,537
all-9538
[ "Contain", "returns", "whether", "the", "named", "file", "contains", "the", "byte", "slice", "b", ".", "The", "return", "value", "is", "a", "boolean", "." ]
[ "func", "Contain", "(", "filename", "string", ",", "b", "[", "]", "byte", ")", "(", "bool", ",", "error", ")", "{", "f", ",", "err", ":=", "os", ".", "Open", "(", "filename", ")", "\n", "if", "err", "!=", "nil", "{", "return", "false", ",", "fm...
9,538
all-9539
[ "IsErrPartiallyActivated", "checks", "if", "an", "error", "is", "a", "ErrPartiallyActivated" ]
[ "func", "IsErrPartiallyActivated", "(", "err", "error", ")", "bool", "{", "if", "err", "==", "nil", "{", "return", "false", "\n", "}", "\n", "// TODO(msteffen) This is unstructured because we have no way to propagate", "// structured errors across GRPC boundaries. Fix", "retu...
9,539
all-9540
[ "UnmuteHost", "unmutes", "all", "monitors", "for", "the", "given", "host" ]
[ "func", "(", "client", "*", "Client", ")", "UnmuteHost", "(", "host", "string", ")", "(", "*", "HostActionResp", ",", "error", ")", "{", "var", "out", "HostActionResp", "\n", "uri", ":=", "\"", "\"", "+", "<mask>", "+", "\"", "\"", "\n", "if", "err",...
9,540
all-9541
[ "MustGetDuration", "fetches", "the", "config", "and", "parses", "it", "into", "a", "duration", ".", "Panics", "on", "failure", "." ]
[ "func", "(", "c", "*", "cachedLoader", ")", "MustGetDuration", "(", "key", "string", ")", "time", ".", "Duration", "{", "s", ":=", "c", ".", "MustGetString", "(", "key", ")", "\n", "ret", ",", "err", ":=", "time", ".", "ParseDuration", "(", "s", ")",...
9,541
all-9542
[ "flattenClusterVmComponentProtectionSettings", "saves", "a", "ClusterVmComponentProtectionSettings", "into", "the", "supplied", "ResourceData", "." ]
[ "func", "flattenClusterVMComponentProtectionSettings", "(", "d", "*", "schema", ".", "ResourceData", ",", "obj", "*", "types", ".", "ClusterVmComponentProtectionSettings", ")", "error", "{", "return", "structure", ".", "SetBatch", "(", "d", ",", "map", "[", "strin...
9,542
all-9543
[ "load", "a", "program", "object", "with", "a", "program", "binary" ]
[ "func", "ProgramBinary", "(", "program", "uint32", ",", "binaryFormat", "uint32", ",", "<mask>", "unsafe", ".", "Pointer", ",", "length", "int32", ")", "{", "syscall", ".", "Syscall6", "(", "gpProgramBinary", ",", "4", ",", "uintptr", "(", "program", ")", ...
9,543
all-9544
[ "RunBenchmarks", "runs", "the", "benchmarking", "for", "the", "given", "function" ]
[ "func", "(", "b", "*", "Bench", ")", "RunBenchmarks", "(", "r", "RequestFunc", ")", "{", "b", ".", "request", "=", "r", "\n", "<mask>", ":=", "b", ".", "internalRun", "(", "b", ".", "showProgress", ")", "\n", "b", ".", "processResults", "(", "results...
9,544
all-9545
[ "HasTime", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "a", "*", "AlertGraphDefinition", ")", "HasTime", "(", ")", "bool", "{", "if", "a", "!=", "nil", "&&", "a", ".", "Time", "!=", "nil", "{", "return", "<mask>", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
9,545
all-9546
[ "FetchIssueEvents", "from", "github", "and", "return", "the", "full", "list", "until", "it", "matches", "latest", "The", "entire", "last", "page", "will", "be", "included", "so", "you", "can", "have", "redundancy", "." ]
[ "func", "(", "client", "*", "Client", ")", "FetchIssueEvents", "(", "issueID", "int", ",", "latest", "*", "int", ",", "c", "chan", "*", "github", ".", "IssueEvent", ")", "{", "opt", ":=", "&", "github", ".", "ListOptions", "{", "PerPage", ":", "100", ...
9,546
all-9547
[ "List", "the", "namespaces", "immediately", "under", "a", "given", "namespace", ".", "This", "endpoint", "lists", "up", "to", "1000", "namespaces", ".", "If", "more", "namespaces", "are", "present", "a", "continuationToken", "will", "be", "returned", "which", ...
[ "func", "(", "index", "*", "Index", ")", "ListNamespaces", "(", "namespace", ",", "continuationToken", ",", "limit", "string", ")", "(", "*", "ListNamespacesResponse", ",", "error", ")", "{", "v", ":=", "url", ".", "Values", "{", "}", "\n", "if", "contin...
9,547
all-9548
[ "Return", "all", "versions", "in", "the", "schema", "table", "in", "increasing", "order", "." ]
[ "func", "selectSchemaVersions", "(", "tx", "*", "sql", ".", "Tx", ")", "(", "[", "]", "int", ",", "error", ")", "{", "statement", ":=", "`\nSELECT version FROM schema ORDER BY version\n`", "\n", "return", "<mask>", ".", "SelectIntegers", "(", "tx", ",", "state...
9,548
all-9549
[ "ClientPreServiceSuspend", "suspends", "service", "." ]
[ "func", "(", "w", "*", "Worker", ")", "ClientPreServiceSuspend", "(", "job", "*", "data", ".", "Job", ")", "error", "{", "logger", ":=", "w", ".", "logger", ".", "Add", "(", "\"", "\"", ",", "\"", "\"", ",", "\"", "\"", ",", "job", ")", "\n\n", ...
9,549
all-9550
[ "RetryNWithBackoffCtx", "takes", "a", "context", "a", "Backoff", "a", "maximum", "number", "of", "tries", "n", "and", "a", "function", "that", "returns", "an", "error", ".", "The", "function", "is", "called", "until", "it", "does", "not", "return", "an", "...
[ "func", "RetryNWithBackoffCtx", "(", "ctx", "context", ".", "Context", ",", "backoff", "Backoff", ",", "n", "int", ",", "fn", "func", "(", ")", "error", ")", "error", "{", "<mask>", "err", "error", "\n", "RetryWithBackoffCtx", "(", "ctx", ",", "backoff", ...
9,550
all-9551
[ "PlotData", "plots", "the", "results", "onto", "a", "graph", "and", "saves", "the", "output", "to", "the", "given", "writer" ]
[ "func", "PlotData", "(", "interval", "time", ".", "Duration", ",", "r", "results", ".", "ResultSet", ",", "w", "io", ".", "Writer", ")", "{", "set", ":=", "r", ".", "Reduce", "(", "interval", ")", "\n", "t", ":=", "results", ".", "TabularResults", "{...
9,551
all-9552
[ "Call", "initiates", "a", "JSON", "-", "RPC", "call", "using", "the", "specified", "method", "and", "params", "and", "waits", "for", "the", "response", ".", "If", "the", "response", "is", "successful", "its", "result", "is", "stored", "in", "result", "(", ...
[ "func", "(", "c", "*", "Conn", ")", "Call", "(", "ctx", "context", ".", "Context", ",", "method", "string", ",", "params", ",", "result", "interface", "{", "}", ",", "opts", "...", "CallOption", ")", "error", "{", "req", ":=", "&", "Request", "{", ...
9,552
all-9553
[ "appendDrawTrianglesHistory", "appends", "a", "draw", "-", "image", "history", "item", "to", "the", "image", "." ]
[ "func", "(", "i", "*", "Image", ")", "appendDrawTrianglesHistory", "(", "<mask>", "*", "Image", ",", "vertices", "[", "]", "float32", ",", "indices", "[", "]", "uint16", ",", "colorm", "*", "affine", ".", "ColorM", ",", "mode", "graphics", ".", "Composit...
9,553
all-9554
[ "Rate", "function", "returns", "the", "package", "rate", "and", "byte", "rate" ]
[ "func", "(", "q", "*", "statsQueue", ")", "Rate", "(", ")", "(", "float64", ",", "float64", ")", "{", "front", ",", "back", ":=", "q", ".", "frontAndBack", "(", ")", "\n\n", "if", "front", "==", "nil", "||", "back", "==", "nil", "{", "return", "0...
9,554
all-9555
[ "Mux", "is", "an", "associated", "http", ".", "ServeMux", "instance", "." ]
[ "func", "(", "s", "*", "Server", ")", "Mux", "(", ")", "*", "http", ".", "ServeMux", "{", "return", "s", ".", "srv", ".", "<mask>", ".", "(", "*", "http", ".", "ServeMux", ")", "\n", "}" ]
9,555
all-9556
[ "cephRBDVolumeMarkDeleted", "marks", "an", "RBD", "storage", "volume", "as", "being", "in", "zombie", "state", "An", "RBD", "storage", "volume", "that", "is", "in", "zombie", "state", "is", "not", "tracked", "in", "LXD", "s", "database", "anymore", "but", "s...
[ "func", "cephRBDVolumeMarkDeleted", "(", "clusterName", "string", ",", "poolName", "string", ",", "volumeType", "string", ",", "oldVolumeName", "string", ",", "newVolumeName", "string", ",", "userName", "string", ",", "suffix", "string", ")", "error", "{", "delete...
9,556
all-9557
[ "Apply", "f", "to", "all", "peers", "reachable", "by", "peer", ".", "If", "establishedAndSymmetric", "is", "true", "only", "peers", "with", "established", "bidirectional", "connections", "will", "be", "selected", ".", "The", "exclude", "maps", "is", "treated", ...
[ "func", "(", "peer", "*", "Peer", ")", "forEachConnectedPeer", "(", "establishedAndSymmetric", "bool", ",", "exclude", "map", "[", "PeerName", "]", "PeerName", ",", "f", "func", "(", "*", "Peer", ")", ")", "{", "for", "remoteName", ",", "conn", ":=", "ra...
9,557
all-9558
[ "KeyToPath", "converts", "a", "cache", "entry", "key", "to", "a", "path", "on", "disk" ]
[ "func", "(", "c", "*", "Cache", ")", "KeyToPath", "(", "<mask>", "string", ")", "string", "{", "return", "filepath", ".", "Join", "(", "c", ".", "diskRoot", ",", "key", ")", "\n", "}" ]
9,558
all-9559
[ "ArcNegative", "is", "a", "wrapper", "around", "cairo_arc_negative", "()", "." ]
[ "func", "(", "v", "*", "<mask>", ")", "ArcNegative", "(", "xc", ",", "yc", ",", "radius", ",", "angle1", ",", "angle2", "float64", ")", "{", "C", ".", "cairo_arc_negative", "(", "v", ".", "native", "(", ")", ",", "C", ".", "double", "(", "xc", ")...
9,559
all-9560
[ "Add", "an", "interface", "to", "bridge", ".", "This", "is", "identical", "to", "running", ":", "ip", "link", "set", "$name", "master", "$master" ]
[ "func", "NetworkSetMaster", "(", "iface", ",", "master", "*", "net", ".", "Interface", ")", "error", "{", "data", ":=", "uint32Attr", "(", "syscall", ".", "IFLA_MASTER", ",", "uint32", "(", "master", ".", "Index", ")", ")", "\n", "return", "networkMasterAc...
9,560
all-9561
[ "LoadImage", "indicates", "an", "expected", "call", "of", "LoadImage" ]
[ "func", "(", "mr", "*", "MockLoaderMockRecorder", ")", "LoadImage", "(", "arg0", ",", "arg1", ",", "arg2", "<mask>", "{", "}", ")", "*", "gomock", ".", "Call", "{", "return", "mr", ".", "mock", ".", "ctrl", ".", "RecordCallWithMethodType", "(", "mr", "...
9,561
all-9562
[ "MapSetX", "behaves", "the", "same", "as", "MapSet", "except", "it", "will", "not", "overwrite", "the", "map", "key", "if", "it", "already", "exists", "." ]
[ "func", "(", "s", "*", "Scratch", ")", "MapSetX", "(", "k", ",", "mk", "string", ",", "v", "<mask>", "{", "}", ")", "(", "string", ",", "error", ")", "{", "s", ".", "init", "(", ")", "\n\n", "s", ".", "Lock", "(", ")", "\n", "defer", "s", "...
9,562
all-9563
[ "/", "*", "PostApps", "posts", "new", "app" ]
[ "func", "(", "a", "*", "Client", ")", "PostApps", "(", "params", "*", "PostAppsParams", ")", "(", "*", "PostAppsOK", ",", "error", ")", "{", "// TODO: Validate the params before sending", "if", "params", "==", "nil", "{", "params", "=", "NewPostAppsParams", "(...
9,563
all-9564
[ "Errors", "returned", "from", "handleLine", "break", "out", "of", "readConnections", "which", "starts", "a", "reconnect", "This", "means", "that", "we", "should", "only", "return", "fatal", "errors", "as", "errors", "here" ]
[ "func", "(", "c", "*", "Client", ")", "handleLine", "(", "line", "string", ")", "error", "{", "go", "func", "(", ")", "{", "// Send a message on the `messageReceived` channel, but do not block in case no one is receiving on the other end", "select", "{", "case", "c", "....
9,564
all-9565
[ "AppendBytes", "appends", "request", "header", "representation", "to", "dst", "and", "returns", "the", "extended", "dst", "." ]
[ "func", "(", "h", "*", "RequestHeader", ")", "AppendBytes", "(", "dst", "[", "]", "byte", ")", "[", "]", "byte", "{", "// there is no need in h.parseRawHeaders() here - raw headers are specially handled below.", "dst", "=", "append", "(", "dst", ",", "h", ".", "Me...
9,565
all-9566
[ "canonicalName", "returns", "a", "list", "of", "identifiers", "where", "any", "struct", "field", "access", "through", "an", "embedded", "field", "is", "expanded", "to", "include", "the", "names", "of", "the", "embedded", "types", "themselves", ".", "For", "exa...
[ "func", "canonicalName", "(", "t", "reflect", ".", "Type", ",", "sel", "string", ")", "(", "[", "]", "string", ",", "error", ")", "{", "var", "name", "string", "\n", "sel", "=", "strings", ".", "TrimPrefix", "(", "sel", ",", "\"", "\"", ")", "\n", ...
9,566
all-9567
[ "String", "returns", "the", "string", "format", "for", "this", "wait", "variable" ]
[ "func", "(", "w", "*", "WaitVar", ")", "<mask>", "(", ")", "string", "{", "return", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "w", ".", "Min", ",", "w", ".", "Max", ")", "\n", "}" ]
9,567
all-9568
[ "UnmarshalBinary", "unmarshals", "a", "byte", "slice", "into", "a", "Header", ".", "If", "the", "byte", "slice", "does", "not", "contain", "enough", "data", "to", "form", "a", "valid", "Header", "or", "an", "argument", "is", "malformed", "io", ".", "ErrUne...
[ "func", "(", "h", "*", "Header", ")", "UnmarshalBinary", "(", "b", "[", "]", "byte", ")", "error", "{", "// Must contain minimum length for header", "if", "len", "(", "b", ")", "<", "headerLen", "{", "return", "io", ".", "ErrUnexpectedEOF", "\n", "}", "\n\...
9,568
all-9569
[ "GetLogEntry", "returns", "the", "in", "-", "context", "LogEntry", "for", "a", "request", "." ]
[ "func", "GetLogEntry", "(", "r", "*", "http", ".", "Request", ")", "LogEntry", "{", "entry", ",", "_", ":=", "r", ".", "<mask>", "(", ")", ".", "Value", "(", "LogEntryCtxKey", ")", ".", "(", "LogEntry", ")", "\n", "return", "entry", "\n", "}" ]
9,569
all-9570
[ "GetRootDiskDevice", "returns", "the", "container", "device", "that", "is", "configured", "as", "root", "disk" ]
[ "func", "GetRootDiskDevice", "(", "<mask>", "map", "[", "string", "]", "map", "[", "string", "]", "string", ")", "(", "string", ",", "map", "[", "string", "]", "string", ",", "error", ")", "{", "var", "devName", "string", "\n", "var", "dev", "map", "...
9,570
all-9571
[ "ReadResponse", "reads", "a", "server", "response", "into", "the", "received", "o", "." ]
[ "func", "(", "o", "*", "PutAppsAppReader", ")", "ReadResponse", "(", "response", "runtime", ".", "ClientResponse", ",", "consumer", "runtime", ".", "Consumer", ")", "(", "interface", "{", "}", ",", "error", ")", "{", "switch", "response", ".", "Code", "(",...
9,571
all-9572
[ "Specify", "the", "value", "of", "a", "uniform", "variable", "for", "a", "specified", "program", "object" ]
[ "func", "ProgramUniformMatrix4x2fv", "(", "program", "uint32", ",", "location", "int32", ",", "count", "int32", ",", "transpose", "bool", ",", "value", "*", "float32", ")", "{", "syscall", ".", "Syscall6", "(", "gpProgramUniformMatrix4x2fv", ",", "5", ",", "ui...
9,572
all-9573
[ "Set", "adds", "a", "string", "tag", "to", "the", "span" ]
[ "func", "(", "tag", "spanKindTagName", ")", "Set", "(", "span", "opentracing", ".", "Span", ",", "value", "SpanKindEnum", ")", "{", "span", ".", "SetTag", "(", "string", "(", "tag", ")", ",", "<mask>", ")", "\n", "}" ]
9,573
all-9574
[ "NewClusterByConfig", "returns", "an", "unlaunched", "cluster", "defined", "by", "a", "cluster", "configuration" ]
[ "func", "NewClusterByConfig", "(", "t", "testing", ".", "TB", ",", "cfg", "*", "ClusterConfig", ")", "*", "cluster", "{", "<mask>", "newCluster", "(", "t", ",", "cfg", ")", "\n", "}" ]
9,574
all-9575
[ "WithAdditionalRootCAs", "instructs", "the", "New", "*", "functions", "to", "additionally", "trust", "the", "given", "base64", "-", "encoded", "signed", "x509", "certificates", "as", "root", "certificates", ".", "Introduced", "to", "pass", "certs", "in", "the", ...
[ "func", "WithAdditionalRootCAs", "(", "pemBytes", "[", "]", "byte", ")", "Option", "{", "return", "func", "(", "settings", "*", "clientSettings", ")", "error", "{", "// append certs from config", "if", "settings", ".", "caCerts", "==", "nil", "{", "settings", ...
9,575
all-9576
[ "Specify", "the", "value", "of", "a", "uniform", "variable", "for", "a", "specified", "program", "object" ]
[ "func", "ProgramUniformMatrix4fv", "(", "program", "uint32", ",", "location", "int32", ",", "count", "int32", ",", "transpose", "bool", ",", "value", "*", "float32", ")", "{", "syscall", ".", "Syscall6", "(", "gpProgramUniformMatrix4fv", ",", "5", ",", "uintpt...
9,576
all-9577
[ "Register", "registers", "a", "Scheme", "." ]
[ "func", "Register", "(", "scheme", "Scheme", ")", "{", "if", "scheme", ".", "Generator", "==", "nil", "{", "panic", "(", "\"", "\"", ")", "\n", "}", "\n\n", "if", "scheme", ".", "Opaque", "&&", "scheme", ".", "Proto", "&", "ProtoUnix", "!=", "0", "...
9,577
all-9578
[ "SetFillRule", "is", "a", "wrapper", "around", "cairo_set_fill_rule", "()", "." ]
[ "func", "(", "v", "*", "<mask>", ")", "SetFillRule", "(", "fillRule", "FillRule", ")", "{", "C", ".", "cairo_set_fill_rule", "(", "v", ".", "native", "(", ")", ",", "C", ".", "cairo_fill_rule_t", "(", "fillRule", ")", ")", "\n", "}" ]
9,578
all-9579
[ "NewIterator", "returns", "a", "new", "iterator", ".", "Depending", "upon", "the", "options", "either", "only", "keys", "or", "both", "key", "-", "value", "pairs", "would", "be", "fetched", ".", "The", "keys", "are", "returned", "in", "lexicographically", "s...
[ "func", "(", "txn", "*", "Txn", ")", "NewIterator", "(", "opt", "IteratorOptions", ")", "*", "Iterator", "{", "if", "txn", ".", "discarded", "{", "panic", "(", "\"", "\"", ")", "\n", "}", "\n", "// Do not change the order of the next if. We must track the number...
9,579
all-9580
[ "HasLayoutType", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "b", "*", "Board", ")", "HasLayoutType", "(", ")", "bool", "{", "if", "b", "!=", "nil", "&&", "b", ".", "LayoutType", "!=", "nil", "{", "return", "<mask>", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
9,580
all-9581
[ "SetDirection", "is", "a", "wrapper", "around", "gtk_menu_button_set_direction", "()", "." ]
[ "func", "(", "v", "*", "MenuButton", ")", "SetDirection", "(", "direction", "ArrowType", ")", "{", "C", ".", "gtk_menu_button_set_direction", "(", "v", ".", "native", "(", ")", ",", "C", ".", "GtkArrowType", "(", "<mask>", ")", ")", "\n", "}" ]
9,581
all-9582
[ "ListPRCommits", "lists", "the", "commits", "in", "a", "pull", "request", ".", "GitHub", "API", "docs", ":", "https", ":", "//", "developer", ".", "github", ".", "com", "/", "v3", "/", "pulls", "/", "#list", "-", "commits", "-", "on", "-", "a", "-", ...
[ "func", "(", "c", "*", "Client", ")", "ListPRCommits", "(", "org", ",", "repo", "string", ",", "number", "int", ")", "(", "[", "]", "RepositoryCommit", ",", "error", ")", "{", "c", ".", "log", "(", "\"", "\"", ",", "org", ",", "repo", ",", "numbe...
9,582
all-9583
[ "implements", "the", "fuzz", "(", "delay", "kill", "conn", ")", "and", "returns", "whether", "or", "not", "the", "read", "/", "write", "should", "be", "ignored" ]
[ "func", "(", "fc", "*", "FuzzedConnection", ")", "fuzz", "(", ")", "bool", "{", "if", "!", "fc", ".", "shouldFuzz", "(", ")", "{", "return", "false", "\n", "}", "\n\n", "switch", "fc", ".", "config", ".", "Mode", "{", "case", "FuzzModeDrop", ":", "...
9,583
all-9584
[ "ToMap", "converts", "a", "regular", "table", "to", "a", "map", "of", "header", "names", "to", "their", "row", "data", ".", "For", "example", ":", "t", ":", "=", "TabularData", "{", "[]", "string", "{", "header1", "header2", "}", "[]", "string", "{", ...
[ "func", "(", "t", "TabularData", ")", "ToMap", "(", ")", "TabularDataMap", "{", "m", ":=", "TabularDataMap", "{", "}", "\n", "if", "len", "(", "t", ")", ">", "1", "{", "for", "_", ",", "th", ":=", "range", "t", "[", "0", "]", "{", "m", "[", "...
9,584
all-9585
[ "/////////////////////////////////" ]
[ "func", "pairs", "(", "values", "...", "interface", "{", "}", ")", "(", "map", "[", "interface", "{", "}", "]", "interface", "{", "}", ",", "error", ")", "{", "if", "len", "(", "values", ")", "%", "2", "!=", "0", "{", "return", "nil", ",", "err...
9,585
all-9586
[ "WithPayload", "adds", "the", "payload", "to", "the", "add", "Vm", "o", "k", "response" ]
[ "func", "(", "o", "*", "AddVMOK", ")", "WithPayload", "(", "payload", "<mask>", ")", "*", "AddVMOK", "{", "o", ".", "Payload", "=", "payload", "\n", "return", "o", "\n", "}" ]
9,586
all-9587
[ "render", "multiple", "instances", "of", "primitives", "using", "a", "count", "derived", "from", "a", "transform", "feedback", "object" ]
[ "func", "DrawTransformFeedbackInstanced", "(", "<mask>", "uint32", ",", "id", "uint32", ",", "instancecount", "int32", ")", "{", "C", ".", "glowDrawTransformFeedbackInstanced", "(", "gpDrawTransformFeedbackInstanced", ",", "(", "C", ".", "GLenum", ")", "(", "mode", ...
9,587
all-9588
[ "GetDouble", "is", "a", "wrapper", "around", "g_settings_get_double", "()", "." ]
[ "func", "(", "v", "*", "Settings", ")", "GetDouble", "(", "<mask>", "string", ")", "float64", "{", "cstr1", ":=", "(", "*", "C", ".", "gchar", ")", "(", "C", ".", "CString", "(", "name", ")", ")", "\n", "defer", "C", ".", "free", "(", "unsafe", ...
9,588
all-9589
[ "Validate", "the", "rule", "and", "return", "a", "list", "of", "encountered", "errors", "." ]
[ "func", "(", "r", "*", "Rule", ")", "Validate", "(", ")", "(", "errs", "[", "]", "error", ")", "{", "if", "r", ".", "Record", "!=", "\"", "\"", "&&", "r", ".", "Alert", "!=", "\"", "\"", "{", "errs", "=", "append", "(", "errs", ",", "errors",...
9,589
all-9590
[ "Masked", "returns", "a", "new", "network", "conforming", "to", "new", "mask", "." ]
[ "func", "(", "n", "Network", ")", "Masked", "(", "ones", "int", ")", "Network", "{", "<mask>", ":=", "net", ".", "CIDRMask", "(", "ones", ",", "len", "(", "n", ".", "Number", ")", "*", "BitsPerUint32", ")", "\n", "return", "NewNetwork", "(", "net", ...
9,590
all-9591
[ "TagStringToLevel", "converts", "level", "string", "to", "Glg", ".", "LEVEL" ]
[ "func", "(", "g", "*", "Glg", ")", "TagStringToLevel", "(", "<mask>", "string", ")", "LEVEL", "{", "l", ",", "ok", ":=", "g", ".", "levelMap", ".", "Load", "(", "tag", ")", "\n", "if", "!", "ok", "{", "return", "255", "\n", "}", "\n", "return", ...
9,591
all-9592
[ "ServeHTTPContext", "calls", "f", "(", "w", "r", "c", ")" ]
[ "func", "(", "f", "HandlerFunc", ")", "ServeHTTPContext", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "<mask>", ",", "c", "*", "Context", ")", "{", "f", "(", "w", ",", "r", ",", "c", ")", "\n", "}" ]
9,592
all-9593
[ "CompileRegexp", "compiles", "a", "regular", "expression", "pattern", "and", "creates", "a", "template", "to", "revert", "it", "." ]
[ "func", "CompileRegexp", "(", "pattern", "string", ")", "(", "*", "Regexp", ",", "error", ")", "{", "compiled", ",", "err", ":=", "regexp", ".", "Compile", "(", "pattern", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", ...
9,593
all-9594
[ "NodeIsEmpty", "returns", "an", "empty", "string", "if", "the", "node", "with", "the", "given", "ID", "has", "no", "containers", "or", "images", "associated", "with", "it", ".", "Otherwise", "it", "returns", "a", "message", "say", "what", "s", "left", "." ...
[ "func", "(", "c", "*", "ClusterTx", ")", "NodeIsEmpty", "(", "id", "int64", ")", "(", "string", ",", "error", ")", "{", "// Check if the node has any containers.", "containers", ",", "err", ":=", "query", ".", "SelectStrings", "(", "c", ".", "tx", ",", "\"...
9,594
all-9595
[ "isBlocked", "returns", "a", "boolean", "value", "indicating", "whether", "there", "is", "a", "block", "at", "the", "position", "(", "x", "y", ")", "of", "the", "piece", "with", "the", "given", "angle", "." ]
[ "func", "(", "p", "*", "Piece", ")", "isBlocked", "(", "i", ",", "j", "int", ",", "angle", "Angle", ")", "bool", "{", "size", ":=", "len", "(", "p", ".", "blocks", ")", "\n", "i2", ",", "j2", ":=", "i", ",", "j", "\n", "switch", "angle", "{",...
9,595
all-9596
[ "Account", "retrieves", "a", "detailed", "view", "of", "one", "account" ]
[ "func", "(", "c", "*", "Client", ")", "Account", "(", "identifier", "string", ")", "(", "*", "Account", ",", "error", ")", "{", "account", ":=", "new", "(", "Account", ")", "\n", "_", ",", "err", ":=", "c", ".", "MakeApiRequest", "(", "\"", "\"", ...
9,596
all-9597
[ "Hosts", "returns", "all", "available", "hosts", "in", "the", "cluster", "." ]
[ "func", "(", "c", "*", "Cluster", ")", "Hosts", "(", ")", "[", "]", "URI", "{", "hosts", ":=", "make", "(", "[", "]", "URI", ",", "0", ",", "len", "(", "c", ".", "hosts", ")", ")", "\n", "for", "i", ",", "host", ":=", "range", "c", ".", "...
9,597
all-9598
[ "FileChooserNativeDialogNew", "is", "a", "wrapper", "around", "gtk_file_chooser_native_new", "()", "." ]
[ "func", "FileChooserNativeDialogNew", "(", "title", "string", ",", "parent", "*", "Window", ",", "action", "FileChooserAction", ",", "accept_label", "string", ",", "cancel_label", "string", ")", "(", "*", "FileChooserNativeDialog", ",", "error", ")", "{", "c_title...
9,598
all-9599
[ "Return", "the", "Time", "Based", "One", "Time", "Password", "for", "the", "time", "-", "period", "that", "is", "Now", "+", "the", "given", "periods", ".", "This", "is", "useful", "if", "you", "want", "to", "provide", "some", "flexibility", "around", "th...
[ "func", "(", "totp", "*", "TOTP", ")", "FromNow", "(", "periods", "int64", ")", "int32", "{", "period", ":=", "(", "time", ".", "Now", "(", ")", ".", "Unix", "(", ")", "/", "int64", "(", "totp", ".", "Period", ")", ")", "+", "int64", "(", "peri...
9,599
all-9600
[ "watch", "watches", "the", "file", "for", "changes" ]
[ "func", "(", "d", "*", "VaultAgentTokenQuery", ")", "watch", "(", "lastStat", "os", ".", "FileInfo", ")", "<-", "chan", "*", "watchResult", "{", "ch", ":=", "make", "(", "chan", "*", "watchResult", ",", "1", ")", "\n\n", "go", "func", "(", "lastStat", ...