id
int32
0
25.3k
idx
stringlengths
5
9
nl_tokens
listlengths
1
418
pl_tokens
listlengths
22
4.98k
24,500
all-24501
[ "walk", "walks", "all", "the", "nodePath", "and", "apply", "the", "walkFunc", "on", "each", "directory" ]
[ "func", "(", "s", "*", "store", ")", "walk", "(", "nodePath", "string", ",", "walkFunc", "func", "(", "prev", "*", "node", ",", "component", "string", ")", "(", "*", "node", ",", "*", "v2error", ".", "<mask>", ")", ")", "(", "*", "node", ",", "*"...
24,501
all-24502
[ "NewImageSource", "returns", "a", "types", ".", "ImageSource", "for", "this", "reference", ".", "The", "caller", "must", "call", ".", "Close", "()", "on", "the", "returned", "ImageSource", "." ]
[ "func", "(", "ref", "archiveReference", ")", "NewImageSource", "(", "ctx", "<mask>", ".", "Context", ",", "sys", "*", "types", ".", "SystemContext", ")", "(", "types", ".", "ImageSource", ",", "error", ")", "{", "return", "newImageSource", "(", "ctx", ",",...
24,502
all-24503
[ "Write", "compresses", "data", "from", "the", "supplied", "buffer", "into", "the", "underlying", "io", ".", "Writer", ".", "Write", "does", "not", "return", "until", "the", "data", "has", "been", "written", "." ]
[ "func", "(", "z", "*", "Writer", ")", "Write", "(", "buf", "[", "]", "byte", ")", "(", "int", ",", "error", ")", "{", "if", "!", "z", ".", "Header", ".", "<mask>", "{", "if", "err", ":=", "z", ".", "writeHeader", "(", ")", ";", "err", "!=", ...
24,503
all-24504
[ "NewReadonlyHandler", "wraps", "the", "given", "HTTP", "handler", "to", "allow", "only", "GET", "requests" ]
[ "func", "NewReadonlyHandler", "(", "hdlr", "http", ".", "<mask>", ")", "http", ".", "Handler", "{", "readonly", ":=", "readonlyHandlerFunc", "(", "hdlr", ")", "\n", "return", "http", ".", "HandlerFunc", "(", "readonly", ")", "\n", "}" ]
24,504
all-24505
[ "Do", "executes", "Browser", ".", "setDockTile", "against", "the", "provided", "context", "." ]
[ "func", "(", "p", "*", "SetDockTileParams", ")", "Do", "(", "ctx", "<mask>", ".", "Context", ")", "(", "err", "error", ")", "{", "return", "cdp", ".", "Execute", "(", "ctx", ",", "CommandSetDockTile", ",", "p", ",", "nil", ")", "\n", "}" ]
24,505
all-24506
[ "Alias", "creates", "an", "Alias", "type", "from", "an", "account" ]
[ "func", "(", "acc", "*", "Account", ")", "Alias", "(", "name", "string", ")", "*", "Alias", "{", "return", "&", "Alias", "{", "account", ":", "<mask>", ",", "Name", ":", "name", "}", "\n", "}" ]
24,506
all-24507
[ "title", ":", "index", "path", ":", "/", "method", ":", "GET", "responses", ":", "200", ":", "OK" ]
[ "func", "index", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ")", "error", "{", "host", ",", "_", ":=", "config", ".", "GetString", "(", "\"", "\"", ")", "\n", "userCreate", ",", "_", ":=", "config", ".", "GetBoo...
24,507
all-24508
[ "InspectCluster", "retrieves", "cluster", "state" ]
[ "func", "(", "c", "APIClient", ")", "InspectCluster", "(", ")", "(", "*", "admin", ".", "ClusterInfo", ",", "error", ")", "{", "clusterInfo", ",", "err", ":=", "c", ".", "AdminAPIClient", ".", "InspectCluster", "(", "c", ".", "Ctx", "(", ")", ",", "&...
24,508
all-24509
[ "GetText", "retrieves", "the", "Text", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
[ "func", "(", "u", "Memo", ")", "GetText", "(", ")", "(", "result", "string", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Type", ")", ")", "\n\n", "if", "armName", "==", "\"", "...
24,509
all-24510
[ "SetCounterFunc", "set", "counter", "to", "a", "function", "[", "called", "at", "flush", "interval", "]" ]
[ "func", "(", "m", "*", "CirconusMetrics", ")", "SetCounterFunc", "(", "metric", "<mask>", ",", "fn", "func", "(", ")", "uint64", ")", "{", "m", ".", "cfm", ".", "Lock", "(", ")", "\n", "defer", "m", ".", "cfm", ".", "Unlock", "(", ")", "\n", "m",...
24,510
all-24511
[ "/", "*", "Write", "p", "bytes", "to", "our", "file", "." ]
[ "func", "(", "l", "*", "Writer", ")", "Write", "(", "p", "[", "]", "<mask>", ")", "(", "int", ",", "error", ")", "{", "l", ".", "mutex", ".", "Lock", "(", ")", "\n", "defer", "l", ".", "mutex", ".", "Unlock", "(", ")", "\n", "inode", ",", "...
24,511
all-24512
[ "ChangeHostModattr", "creates", "a", "new", "CHANGE_HOST_MODATTR", "Nagios", "command", ".", "This", "command", "changes", "the", "modified", "attributes", "value", "for", "the", "specified", "host", ".", "Modified", "attributes", "values", "are", "used", "by", "N...
[ "func", "ChangeHostModattr", "(", "host_name", "string", ",", "value", "string", ",", ")", "*", "livestatus", ".", "Command", "{", "return", "livestatus", ".", "NewCommand", "(", "\"", "\"", ",", "stringifyArg", "(", "\"", "\"", ",", "\"", "\"", ",", "ho...
24,512
all-24513
[ "findAuthentication", "looks", "for", "auth", "of", "registry", "in", "path" ]
[ "func", "findAuthentication", "(", "registry", ",", "path", "string", ",", "legacyFormat", "bool", ")", "(", "string", ",", "string", ",", "error", ")", "{", "auths", ",", "err", ":=", "readJSONFile", "(", "path", ",", "legacyFormat", ")", "\n", "if", "e...
24,513
all-24514
[ "Performs", "validation", "and", "combines", "errors", "from", "validation", "with", "errors", "from", "deserialization", "then", "maps", "both", "the", "resulting", "struct", "and", "the", "errors", "to", "the", "context", "." ]
[ "func", "validateAndMap", "(", "obj", "reflect", ".", "Value", ",", "context", "martini", ".", "Context", ",", "errors", "*", "Errors", ",", "ifacePtr", "...", "interface", "{", "}", ")", "{", "context", ".", "Invoke", "(", "Validate", "(", "obj", ".", ...
24,514
all-24515
[ "isInstanceLaunchedInVPC", "returns", "false", "when", "the", "http", "status", "code", "is", "set", "to", "not", "found", "(", "404", ")", "when", "querying", "the", "vpc", "id", "from", "instance", "metadata" ]
[ "func", "isInstanceLaunchedInVPC", "(", "err", "error", ")", "bool", "{", "if", "metadataErr", ",", "<mask>", ":=", "err", ".", "(", "*", "ec2", ".", "MetadataError", ")", ";", "ok", "&&", "metadataErr", ".", "GetStatusCode", "(", ")", "==", "http", ".",...
24,515
all-24516
[ "HasAPIToken", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "i", "*", "IntegrationPDRequest", ")", "HasAPIToken", "(", ")", "bool", "{", "if", "i", "!=", "nil", "&&", "i", ".", "APIToken", "!=", "nil", "{", "return", "<mask>", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
24,516
all-24517
[ "GetChangeTypeOk", "returns", "a", "tuple", "with", "the", "ChangeType", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "g", "*", "GraphDefinitionRequest", ")", "GetChangeTypeOk", "(", ")", "(", "string", ",", "bool", ")", "{", "if", "g", "==", "nil", "||", "g", ".", "ChangeType", "==", "nil", "{", "return", "\"", "\"", ",", "false", "\n", "}", "\n", "r...
24,517
all-24518
[ "HasBin", "check", "whether", "Docker", "binary", "is", "available", "." ]
[ "func", "(", "s", "*", "Docker", ")", "HasBin", "(", ")", "bool", "{", "_", ",", "err", ":=", "<mask>", ".", "LookPath", "(", "s", ".", "binCmd", ")", "\n", "return", "err", "==", "nil", "\n", "}" ]
24,518
all-24519
[ "String", "implements", "the", "Stringer", "interface", "." ]
[ "func", "(", "f", "*", "ResultField", ")", "<mask>", "(", ")", "string", "{", "return", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "f", ".", "columnOptions", ",", "f", ".", "tc", ",", "f", ".", "fraction", ",", "f", ".", "length", ",", "f", "...
24,519
all-24520
[ "stacks", "is", "a", "wrapper", "for", "runtime", ".", "Stack", "that", "attempts", "to", "recover", "the", "data", "for", "all", "goroutines", "." ]
[ "func", "stacks", "(", "all", "bool", ",", "max", "int", ")", "[", "]", "byte", "{", "// We don't know how big the traces are, so grow a few times if they don't fit. Start large, though.", "n", ":=", "initialMaxStackBufSize", "\n", "var", "trace", "[", "]", "byte", "\n"...
24,520
all-24521
[ "SettingsNewWithBackend", "is", "a", "wrapper", "around", "g_settings_new_with_backend", "()", "." ]
[ "func", "SettingsNewWithBackend", "(", "schemaID", "string", ",", "backend", "*", "SettingsBackend", ")", "*", "Settings", "{", "cstr1", ":=", "(", "*", "C", ".", "gchar", ")", "(", "C", ".", "CString", "(", "schemaID", ")", ")", "\n", "defer", "C", "....
24,521
all-24522
[ "GetBackendSecretVolumeAndMount", "returns", "a", "properly", "configured", "Volume", "and", "VolumeMount", "object", "given", "a", "backend", ".", "The", "backend", "needs", "to", "be", "one", "of", "the", "constants", "defined", "in", "pfs", "/", "server", "."...
[ "func", "GetBackendSecretVolumeAndMount", "(", "backend", "string", ")", "(", "v1", ".", "Volume", ",", "v1", ".", "VolumeMount", ")", "{", "return", "v1", ".", "Volume", "{", "Name", ":", "client", ".", "StorageSecretName", ",", "VolumeSource", ":", "v1", ...
24,522
all-24523
[ "ForEachPtr", "calls", "fn", "for", "all", "heap", "pointers", "it", "finds", "in", "x", ".", "It", "calls", "fn", "with", ":", "the", "offset", "of", "the", "pointer", "slot", "in", "x", "the", "pointed", "-", "to", "object", "y", "the", "offset", "...
[ "func", "(", "p", "*", "Process", ")", "ForEachPtr", "(", "x", "Object", ",", "fn", "func", "(", "int64", ",", "Object", ",", "int64", ")", "bool", ")", "{", "<mask>", ":=", "p", ".", "Size", "(", "x", ")", "\n", "for", "i", ":=", "int64", "(",...
24,523
all-24524
[ "handleError", "tests", "the", "context", "Error", "and", "assign", "it", "to", "response", "." ]
[ "func", "(", "mux", "*", "ServerMux", ")", "handleError", "(", "ctx", "*", "Context", ",", "err", "error", ")", "bool", "{", "if", "err", "==", "nil", "{", "return", "false", "\n", "}", "\n", "if", "e", ",", "ok", ":=", "err", ".", "(", "Error", ...
24,524
all-24525
[ "FileMove", "tries", "to", "move", "a", "file", "by", "using", "os", ".", "Rename", "if", "that", "fails", "it", "tries", "to", "copy", "the", "file", "and", "remove", "the", "source", "." ]
[ "func", "FileMove", "(", "oldPath", "string", ",", "newPath", "string", ")", "error", "{", "err", ":=", "os", ".", "Rename", "(", "oldPath", ",", "newPath", ")", "\n", "if", "err", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "err", "=", "...
24,525
all-24526
[ "SyncSchema", "updates", "a", "schema", "with", "the", "indexes", "and", "fields", "on", "the", "server", "and", "creates", "the", "indexes", "and", "fields", "in", "the", "schema", "on", "the", "server", "side", ".", "This", "function", "does", "not", "de...
[ "func", "(", "c", "*", "Client", ")", "SyncSchema", "(", "schema", "*", "Schema", ")", "error", "{", "span", ":=", "c", ".", "tracer", ".", "StartSpan", "(", "\"", "\"", ")", "\n", "defer", "<mask>", ".", "Finish", "(", ")", "\n\n", "serverSchema", ...
24,526
all-24527
[ "ReadLen8String", "reads", "an", "8", "-", "bit", "length", "preceded", "string", "value" ]
[ "func", "(", "r", "*", "ReadBuffer", ")", "ReadLen8String", "(", ")", "string", "{", "n", ":=", "r", ".", "ReadSingleByte", "(", ")", "\n", "<mask>", "r", ".", "ReadString", "(", "int", "(", "n", ")", ")", "\n", "}" ]
24,527
all-24528
[ "Enumerate", "lists", "each", "element", "present", "in", "the", "collection" ]
[ "func", "(", "l", "*", "List", ")", "Enumerate", "(", "cancel", "<-", "chan", "struct", "{", "}", ")", "Enumerator", "{", "retval", ":=", "make", "(", "chan", "interface", "{", "}", ")", "\n\n", "go", "func", "(", ")", "{", "l", ".", "key", ".", ...
24,528
all-24529
[ "Specify", "the", "value", "of", "a", "uniform", "variable", "for", "the", "current", "program", "object" ]
[ "func", "Uniform4iv", "(", "location", "int32", ",", "<mask>", "int32", ",", "value", "*", "int32", ")", "{", "C", ".", "glowUniform4iv", "(", "gpUniform4iv", ",", "(", "C", ".", "GLint", ")", "(", "location", ")", ",", "(", "C", ".", "GLsizei", ")",...
24,529
all-24530
[ "ValueBytes", "returns", "the", "byte", "slice", "holding", "the", "comparison", "value", "if", "any", "." ]
[ "func", "(", "cmp", "*", "Cmp", ")", "ValueBytes", "(", ")", "[", "]", "byte", "{", "if", "tu", ",", "<mask>", ":=", "cmp", ".", "TargetUnion", ".", "(", "*", "pb", ".", "Compare_Value", ")", ";", "ok", "{", "return", "tu", ".", "Value", "\n", ...
24,530
all-24531
[ "Int64", "returns", "v", "s", "int64", "value", ".", "If", "v", ".", "Kind", "()", "!", "=", "Int64", "Int64", "returns", "0", "." ]
[ "func", "(", "v", "Value", ")", "Int64", "(", ")", "int64", "{", "x", ",", "<mask>", ":=", "v", ".", "data", ".", "(", "int64", ")", "\n", "if", "!", "ok", "{", "return", "0", "\n", "}", "\n", "return", "x", "\n", "}" ]
24,531
all-24532
[ "StatusString", "returns", "the", "string", "of", "the", "cgroup", "resource", "status" ]
[ "func", "(", "secret", "*", "ASMSecretResource", ")", "StatusString", "(", "status", "resourcestatus", ".", "ResourceStatus", ")", "string", "{", "return", "ASMSecretStatus", "(", "<mask>", ")", ".", "String", "(", ")", "\n", "}" ]
24,532
all-24533
[ "StringVar", "defines", "a", "string", "flag", "with", "specified", "name", "default", "value", "and", "usage", "string", ".", "The", "argument", "p", "points", "to", "a", "string", "variable", "in", "which", "to", "store", "the", "value", "of", "the", "fl...
[ "func", "StringVar", "(", "p", "*", "string", ",", "<mask>", "string", ",", "value", "string", ",", "usage", "string", ")", "{", "EnvironmentFlags", ".", "StringVar", "(", "p", ",", "name", ",", "value", ",", "usage", ")", "\n", "}" ]
24,533
all-24534
[ "NewStreamHandler", "creates", "a", "StreamHandler" ]
[ "func", "NewStreamHandler", "(", "w", "<mask>", ".", "Writer", ")", "(", "*", "StreamHandler", ",", "error", ")", "{", "h", ":=", "new", "(", "StreamHandler", ")", "\n\n", "h", ".", "w", "=", "w", "\n\n", "return", "h", ",", "nil", "\n", "}" ]
24,534
all-24535
[ "Do", "executes", "Runtime", ".", "releaseObject", "against", "the", "provided", "context", "." ]
[ "func", "(", "p", "*", "ReleaseObjectParams", ")", "Do", "(", "ctx", "context", ".", "<mask>", ")", "(", "err", "error", ")", "{", "return", "cdp", ".", "Execute", "(", "ctx", ",", "CommandReleaseObject", ",", "p", ",", "nil", ")", "\n", "}" ]
24,535
all-24536
[ "CheckUnexportedReturn", "checks", "that", "exported", "functions", "on", "exported", "types", "do", "not", "return", "unexported", "types", "." ]
[ "func", "(", "c", "*", "Checker", ")", "CheckUnexportedReturn", "(", "j", "*", "lint", ".", "Job", ")", "{", "for", "_", ",", "fn", ":=", "range", "j", ".", "Program", ".", "InitialFunctions", "{", "if", "fn", ".", "Synthetic", "!=", "\"", "\"", "|...
24,536
all-24537
[ "specify", "clear", "values", "for", "the", "accumulation", "buffer" ]
[ "func", "ClearAccum", "(", "red", "float32", ",", "green", "float32", ",", "blue", "float32", ",", "alpha", "float32", ")", "{", "C", ".", "glowClearAccum", "(", "gpClearAccum", ",", "(", "C", ".", "GLfloat", ")", "(", "red", ")", ",", "(", "C", ".",...
24,537
all-24538
[ "CommitAndStop", "commits", "the", "previous", "tx", "and", "does", "not", "create", "a", "new", "one", "." ]
[ "func", "(", "t", "*", "batchTx", ")", "CommitAndStop", "(", ")", "{", "t", ".", "Lock", "(", ")", "\n", "t", ".", "<mask>", "(", "true", ")", "\n", "t", ".", "Unlock", "(", ")", "\n", "}" ]
24,538
all-24539
[ "Associates", "a", "generic", "vertex", "attribute", "index", "with", "a", "named", "attribute", "variable" ]
[ "func", "BindAttribLocation", "(", "program", "uint32", ",", "index", "uint32", ",", "name", "*", "uint8", ")", "{", "syscall", ".", "Syscall", "(", "gpBindAttribLocation", ",", "3", ",", "uintptr", "(", "program", ")", ",", "uintptr", "(", "<mask>", ")", ...
24,539
all-24540
[ "HandlerFunc", "can", "be", "used", "to", "handle", "HTTP", "requests", "performed", "against", "the", "LXD", "API", "RaftEndpoint", "(", "/", "internal", "/", "raft", ")", "in", "order", "to", "join", "/", "leave", "/", "form", "the", "raft", "cluster", ...
[ "func", "(", "i", "*", "raftInstance", ")", "HandlerFunc", "(", ")", "http", ".", "HandlerFunc", "{", "if", "i", ".", "<mask>", "==", "nil", "{", "return", "nil", "\n", "}", "\n", "return", "i", ".", "handler", ".", "ServeHTTP", "\n", "}" ]
24,540
all-24541
[ "TeamHasMember", "checks", "if", "a", "user", "belongs", "to", "a", "team" ]
[ "func", "(", "f", "*", "FakeClient", ")", "TeamHasMember", "(", "teamID", "int", ",", "memberLogin", "string", ")", "(", "bool", ",", "error", ")", "{", "teamMembers", ",", "_", ":=", "f", ".", "ListTeamMembers", "(", "teamID", ",", "github", ".", "Rol...
24,541
all-24542
[ "Find", "searches", "from", "the", "given", "dir", "and", "up", "for", "the", "WORKSPACE", "file", "returning", "the", "directory", "containing", "it", "or", "an", "error", "if", "none", "found", "in", "the", "tree", "." ]
[ "func", "Find", "(", "dir", "string", ")", "(", "string", ",", "error", ")", "{", "dir", ",", "err", ":=", "filepath", ".", "Abs", "(", "dir", ")", "\n", "if", "err", "!=", "nil", "{", "return", "\"", "\"", ",", "err", "\n", "}", "\n\n", "for",...
24,542
all-24543
[ "Patch", "applies", "the", "patch", "and", "returns", "the", "patched", "prowJob", "." ]
[ "func", "(", "c", "*", "FakeProwJobs", ")", "Patch", "(", "name", "string", ",", "pt", "types", ".", "PatchType", ",", "<mask>", "[", "]", "byte", ",", "subresources", "...", "string", ")", "(", "result", "*", "prowjobsv1", ".", "ProwJob", ",", "err", ...
24,543
all-24544
[ "GetOrAdd", "a", "subchannel", "for", "the", "given", "serviceName", "on", "the", "map" ]
[ "func", "(", "subChMap", "*", "subChannelMap", ")", "getOrAdd", "(", "serviceName", "string", ",", "ch", "*", "Channel", ")", "(", "_", "*", "SubChannel", ",", "added", "bool", ")", "{", "if", "sc", ",", "ok", ":=", "subChMap", ".", "get", "(", "serv...
24,544
all-24545
[ "HasFrame", "returns", "true", "if", "the", "frameset", "contains", "the", "given", "frame", "value", "." ]
[ "func", "(", "s", "*", "FrameSet", ")", "HasFrame", "(", "frame", "int", ")", "bool", "{", "return", "s", ".", "rangePtr", ".", "Contains", "(", "<mask>", ")", "\n", "}" ]
24,545
all-24546
[ "GetSecret", "returns", "the", "value", "of", "a", "secret", "stored", "in", "a", "map", "." ]
[ "func", "(", "a", "*", "Agent", ")", "GetSecret", "(", "secretPath", "string", ")", "[", "]", "<mask>", "{", "a", ".", "RLock", "(", ")", "\n", "defer", "a", ".", "RUnlock", "(", ")", "\n", "return", "a", ".", "secretsMap", "[", "secretPath", "]", ...
24,546
all-24547
[ "New", "returns", "a", "new", "Communigate", "Pro", "client" ]
[ "func", "New", "(", "url", ",", "<mask>", ",", "pass", "string", ")", "*", "CGP", "{", "return", "&", "CGP", "{", "url", ":", "url", ",", "user", ":", "user", ",", "pass", ":", "pass", "}", "\n", "}" ]
24,547
all-24548
[ "NewController", "returns", "a", "new", "gerrit", "controller", "client" ]
[ "func", "NewController", "(", "lastSyncFallback", ",", "cookiefilePath", "string", ",", "projects", "map", "[", "string", "]", "[", "]", "string", ",", "kc", "*", "kube", ".", "Client", ",", "cfg", "config", ".", "Getter", ")", "(", "*", "Controller", ",...
24,548
all-24549
[ "signatureFunc", "is", "a", "cached", "version", "of", "signatureFunc", "." ]
[ "func", "(", "enh", "*", "EvalNodeHelper", ")", "signatureFunc", "(", "on", "bool", ",", "names", "...", "string", ")", "func", "(", "labels", ".", "Labels", ")", "uint64", "{", "if", "enh", ".", "sigf", "==", "nil", "{", "enh", ".", "sigf", "=", "...
24,549
all-24550
[ "Write", "serializes", "the", "frame", "to", "the", "given", "buffered", "output", "satisfies", "the", "Frame", "interface", "." ]
[ "func", "(", "e", "Error", ")", "Write", "(", "w", "*", "bufio", ".", "<mask>", ")", "(", "err", "error", ")", "{", "if", "err", "=", "writeFrameHeader", "(", "w", ",", "FrameTypeError", ",", "len", "(", "e", ")", ")", ";", "err", "!=", "nil", ...
24,550
all-24551
[ "SetAvailabilityZone", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockManager", ")", "SetAvailabilityZone", "(", "arg0", "<mask>", ")", "{", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "}" ]
24,551
all-24552
[ "TODO", ":", "Uncomment", "when", "gio", "builds", "successfully", "AppChooserDialogNew", "()", "is", "a", "wrapper", "around", "gtk_app_chooser_dialog_new", "()", ".", "func", "AppChooserDialogNew", "(", "parent", "*", "Window", "flags", "DialogFlags", "file", "*",...
[ "func", "AppChooserDialogNewForContentType", "(", "<mask>", "*", "Window", ",", "flags", "DialogFlags", ",", "content_type", "string", ")", "(", "*", "AppChooserDialog", ",", "error", ")", "{", "cstr", ":=", "C", ".", "CString", "(", "content_type", ")", "\n",...
24,552
all-24553
[ "datacentersFunc", "returns", "or", "accumulates", "datacenter", "dependencies", "." ]
[ "func", "datacentersFunc", "(", "b", "*", "Brain", ",", "used", ",", "missing", "*", "dep", ".", "Set", ")", "func", "(", "ignore", "...", "bool", ")", "(", "[", "]", "string", ",", "error", ")", "{", "return", "func", "(", "i", "...", "bool", ")...
24,553
all-24554
[ "MarshalJSON", "implements", "json", "marshaling", "for", "the", "context" ]
[ "func", "(", "d", "*", "DefaultContext", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "m", ":=", "<mask>", "[", "string", "]", "interface", "{", "}", "{", "}", "\n", "data", ":=", "d", ".", "Data", "(", ")", "\n"...
24,554
all-24555
[ "LoadFile", "reads", "a", "schema", "document", "from", "a", "file", "." ]
[ "func", "LoadFile", "(", "filename", "string", ",", "parser", "Parser", ")", "(", "Package", ",", "error", ")", "{", "file", ",", "err", ":=", "os", ".", "Open", "(", "filename", ")", "\n", "if", "err", "!=", "nil", "{", "return", "Package", "{", "...
24,555
all-24556
[ "GetOrg", "returns", "organization", "from", "org", "or", "user", ":", "name", "Org", "can", "be", "organization", "name", "like", "kubernetes", "But", "we", "can", "also", "request", "all", "user", "s", "public", "repos", "via", "user", ":", "github_user_na...
[ "func", "GetOrg", "(", "org", "string", ")", "(", "string", ",", "bool", ")", "{", "data", ":=", "strings", ".", "Split", "(", "org", ",", "\"", "\"", ")", "\n", "if", "len", "(", "data", ")", "==", "2", "&&", "data", "[", "0", "]", "==", "\"...
24,556
all-24557
[ "multiply", "the", "current", "matrix", "with", "an", "orthographic", "matrix" ]
[ "func", "Ortho", "(", "left", "float64", ",", "right", "float64", ",", "bottom", "float64", ",", "top", "float64", ",", "zNear", "float64", ",", "zFar", "float64", ")", "{", "C", ".", "glowOrtho", "(", "gpOrtho", ",", "(", "C", ".", "GLdouble", ")", ...
24,557
all-24558
[ "NewClient", "creates", "a", "new", "API", "client", "." ]
[ "func", "NewClient", "(", "apiKey", "string", ")", "*", "Client", "{", "return", "&", "Client", "{", "client", ":", "&", "http", ".", "Client", "{", "Transport", ":", "&", "http", ".", "Transport", "{", "<mask>", ":", "http", ".", "ProxyFromEnvironment",...
24,558
all-24559
[ "UniqueStrings", "returns", "a", "slice", "of", "randomly", "generated", "unique", "strings", "." ]
[ "func", "UniqueStrings", "(", "slen", "uint", ",", "n", "int", ")", "(", "ss", "[", "]", "string", ")", "{", "exist", ":=", "make", "(", "map", "[", "string", "]", "struct", "{", "}", ")", "\n", "ss", "=", "<mask>", "(", "[", "]", "string", ","...
24,559
all-24560
[ "specifies", "the", "parameters", "for", "patch", "primitives" ]
[ "func", "PatchParameteri", "(", "pname", "uint32", ",", "value", "int32", ")", "{", "syscall", ".", "Syscall", "(", "gpPatchParameteri", ",", "2", ",", "uintptr", "(", "pname", ")", ",", "uintptr", "(", "<mask>", ")", ",", "0", ")", "\n", "}" ]
24,560
all-24561
[ "ReadLine", "reads", "unbuffered", "until", "a", "newline", "\\", "n", "byte", "and", "removes", "an", "optional", "carriege", "return", "\\", "r", "at", "the", "end", "of", "the", "line", ".", "In", "case", "of", "an", "error", "the", "string", "up", ...
[ "func", "ReadLine", "(", "reader", "io", ".", "Reader", ")", "(", "<mask>", "string", ",", "err", "error", ")", "{", "buffer", ":=", "bytes", ".", "NewBuffer", "(", "make", "(", "[", "]", "byte", ",", "0", ",", "4096", ")", ")", "\n", "p", ":=", ...
24,561
all-24562
[ "leaseKeepAliveCommandFunc", "executes", "the", "lease", "keep", "-", "alive", "command", "." ]
[ "func", "leaseKeepAliveCommandFunc", "(", "cmd", "*", "cobra", ".", "Command", ",", "args", "[", "]", "string", ")", "{", "if", "len", "(", "args", ")", "!=", "1", "{", "ExitWithError", "(", "ExitBadArgs", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ...
24,562
all-24563
[ "MethodOverride", "is", "the", "default", "implementation", "for", "the", "Options#MethodOverride", ".", "By", "default", "it", "will", "look", "for", "a", "form", "value", "name", "_method", "and", "change", "the", "request", "method", "if", "that", "is", "pr...
[ "func", "MethodOverride", "(", "<mask>", "http", ".", "ResponseWriter", ",", "req", "*", "http", ".", "Request", ")", "{", "if", "req", ".", "Method", "==", "\"", "\"", "{", "req", ".", "Method", "=", "defaults", ".", "String", "(", "req", ".", "Form...
24,563
all-24564
[ "OSFamily", "uses", "the", "compute", "resource", "s", "environment", "browser", "to", "get", "the", "OS", "family", "for", "a", "specific", "guest", "ID", "." ]
[ "func", "OSFamily", "(", "client", "*", "govmomi", ".", "Client", ",", "ref", "types", ".", "ManagedObjectReference", ",", "guest", "string", ")", "(", "string", ",", "error", ")", "{", "b", ",", "err", ":=", "EnvironmentBrowserFromReference", "(", "<mask>",...
24,564
all-24565
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "GetRelayoutBoundaryParams", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom35", "(", "&", "w", ",", "v", ...
24,565
all-24566
[ "PrintHeaders", "prints", "the", "http", "headers", "as", "k", "v", "pairs" ]
[ "func", "(", "r", "*", "Resp", ")", "PrintHeaders", "(", ")", "{", "for", "key", ",", "value", ":=", "<mask>", "r", ".", "Headers", "{", "fmt", ".", "Println", "(", "key", ",", "\"", "\"", ",", "value", "[", "0", "]", ")", "\n", "}", "\n\n", ...
24,566
all-24567
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "QuerySelectorAllParams", ")", "MarshalJSON", "(", ")", "(", "[", "]", "<mask>", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom22", "(", "&", "w", ",", "v", ...
24,567
all-24568
[ "used", "for", "determine", "the", "fileLogger", "f", "is", "time", "to", "split", ".", "size", ":", "once", "the", "current", "fileLogger", "s", "fileSize", ">", "=", "config", ".", "fileSize", "need", "to", "split", "daily", ":", "once", "the", "curren...
[ "func", "(", "f", "*", "FileLogger", ")", "isMustSplit", "(", ")", "bool", "{", "switch", "f", ".", "splitType", "{", "<mask>", "SplitType_Size", ":", "logFile", ":=", "joinFilePath", "(", "f", ".", "fileDir", ",", "f", ".", "fileName", ")", "\n", "if"...
24,568
all-24569
[ "Delete", "all", "expired", "items", "from", "the", "cache", "." ]
[ "func", "(", "c", "*", "cache", ")", "DeleteExpired", "(", ")", "{", "var", "evictedItems", "[", "]", "keyAndValue", "\n", "now", ":=", "time", ".", "Now", "(", ")", ".", "UnixNano", "(", ")", "\n", "c", ".", "mu", ".", "Lock", "(", ")", "\n", ...
24,569
all-24570
[ "Lookup", "()", "is", "a", "wrapper", "around", "g_settings_schema_source_lookup", "()", "." ]
[ "func", "(", "v", "*", "SettingsSchemaSource", ")", "Lookup", "(", "schema", "string", ",", "recursive", "bool", ")", "*", "SettingsSchema", "{", "cstr", ":=", "(", "*", "C", ".", "gchar", ")", "(", "C", ".", "CString", "(", "schema", ")", ")", "\n",...
24,570
all-24571
[ "DispatchOptional", "implements", "Dispatcher", ".", "DispatchOptional" ]
[ "func", "(", "d", "*", "SerialDispatcher", ")", "DispatchOptional", "(", "cmd", "interface", "{", "}", ")", "(", "err", "error", ")", "{", "d", ".", "mutex", ".", "RLock", "(", ")", "\n", "defer", "d", ".", "mutex", ".", "RUnlock", "(", ")", "\n\n"...
24,571
all-24572
[ "Child", "returns", "the", "child", "snapshot", "corresponding", "to", "the", "index", "parameter", ".", "Parameters", ":", "index", ":", "Index", "into", "the", "list", "of", "snapshots", ".", "Remarks", ":", "*", "Snapshots", "are", "indexed", "from", "0",...
[ "func", "(", "s", "*", "Snapshot", ")", "Child", "(", "index", "int", ")", "(", "*", "Snapshot", ",", "error", ")", "{", "var", "snapshotHandle", "C", ".", "VixHandle", "=", "C", ".", "VIX_INVALID_HANDLE", "\n", "var", "err", "C", ".", "VixError", "=...
24,572
all-24573
[ "NewFieldError", "initializes", "FormErrors", "with", "one", "field", "error", "." ]
[ "func", "NewFieldError", "(", "field", ",", "e", "string", ")", "FormErrors", "{", "errors", ":=", "FormErrors", "{", "}", "\n", "errors", ".", "AddFieldError", "(", "field", ",", "e", ")", "\n", "return", "<mask>", "\n", "}" ]
24,573
all-24574
[ "baseVirtualEthernetCardToBaseVirtualDevice", "converts", "a", "BaseVirtualEthernetCard", "value", "into", "a", "BaseVirtualDevice", "." ]
[ "func", "baseVirtualEthernetCardToBaseVirtualDevice", "(", "v", "types", ".", "BaseVirtualEthernetCard", ")", "types", ".", "BaseVirtualDevice", "{", "switch", "t", ":=", "v", ".", "(", "type", ")", "{", "case", "*", "types", ".", "VirtualE1000", ":", "return", ...
24,574
all-24575
[ "ListDatumF", "returns", "info", "about", "all", "datums", "in", "a", "Job", "calling", "f", "with", "each", "datum", "info", "." ]
[ "func", "(", "c", "APIClient", ")", "ListDatumF", "(", "jobID", "string", ",", "pageSize", "int64", ",", "page", "int64", ",", "f", "func", "(", "di", "*", "pps", ".", "DatumInfo", ")", "error", ")", "error", "{", "client", ",", "err", ":=", "c", "...
24,575
all-24576
[ "pack14", "packs", "14", "values", "from", "in", "using", "2", "bits", "each" ]
[ "func", "pack14", "(", "in", "[", "]", "uint32", ")", "uint32", "{", "return", "1", "<<", "28", "|", "in", "[", "0", "]", "|", "in", "[", "1", "]", "<<", "2", "|", "in", "[", "2", "]", "<<", "4", "|", "in", "[", "3", "]", "<<", "6", "|"...
24,576
all-24577
[ "Compare", "is", "a", "wrapper", "around", "gtk_text_iter_compare", "()", "." ]
[ "func", "(", "v", "*", "TextIter", ")", "Compare", "(", "v1", "*", "TextIter", ")", "int", "{", "<mask>", "int", "(", "C", ".", "gtk_text_iter_compare", "(", "v", ".", "native", "(", ")", ",", "v1", ".", "native", "(", ")", ")", ")", "\n", "}" ]
24,577
all-24578
[ "Execute", "-", "adds", "a", "named", "org", "to", "the", "configuration" ]
[ "func", "(", "c", "*", "AddOrgToConfigurationCommand", ")", "Execute", "(", "[", "]", "string", ")", "error", "{", "lo", ".", "G", ".", "Warning", "(", "\"", "\"", ")", "\n", "orgConfig", ":=", "&", "config", ".", "OrgConfig", "{", "Org", ":", "c", ...
24,578
all-24579
[ "GetError", "()", "is", "a", "wrapper", "around", "gtk_print_operation_get_error", "()", "." ]
[ "func", "(", "<mask>", "*", "PrintOperation", ")", "PrintOperationGetError", "(", ")", "error", "{", "var", "err", "*", "C", ".", "GError", "=", "nil", "\n", "C", ".", "gtk_print_operation_get_error", "(", "po", ".", "native", "(", ")", ",", "&", "err", ...
24,579
all-24580
[ "GetRef", "returns", "the", "SHA", "of", "the", "given", "ref", "such", "as", "heads", "/", "master", ".", "See", "https", ":", "//", "developer", ".", "github", ".", "com", "/", "v3", "/", "git", "/", "refs", "/", "#get", "-", "a", "-", "reference...
[ "func", "(", "c", "*", "Client", ")", "GetRef", "(", "org", ",", "repo", ",", "ref", "string", ")", "(", "string", ",", "error", ")", "{", "c", ".", "log", "(", "\"", "\"", ",", "org", ",", "repo", ",", "ref", ")", "\n", "var", "res", "struct...
24,580
all-24581
[ "CreateAlert", "adds", "a", "new", "alert", "to", "the", "system", ".", "This", "returns", "a", "pointer", "to", "an", "Alert", "so", "you", "can", "pass", "that", "to", "UpdateAlert", "later", "if", "needed", "." ]
[ "func", "(", "client", "*", "Client", ")", "CreateAlert", "(", "alert", "*", "Alert", ")", "(", "*", "Alert", ",", "error", ")", "{", "var", "out", "Alert", "\n", "if", "err", ":=", "client", ".", "doJsonRequest", "(", "\"", "\"", ",", "\"", "\"", ...
24,581
all-24582
[ "osDiskStorageContainerURL", "crafts", "a", "URL", "with", "a", "trailing", "slash", "pointing", "to", "the", "full", "Azure", "Blob", "Container", "URL", "for", "given", "VM", "name", "." ]
[ "func", "osDiskStorageContainerURL", "(", "account", "*", "<mask>", ".", "AccountProperties", ",", "vmName", "string", ")", "string", "{", "return", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "to", ".", "String", "(", "account", ".", "PrimaryEndpoints", "....
24,582
all-24583
[ "Fetches", "a", "rant", "and", "its", "comments", "given", "a", "valid", "rant", "id" ]
[ "func", "(", "c", "*", "Client", ")", "Rant", "(", "rantId", "int", ")", "(", "RantModel", ",", "[", "]", "CommentModel", ",", "error", ")", "{", "url", ":=", "fmt", ".", "Sprintf", "(", "RANT_PATH", ",", "API", ",", "rantId", ",", "APP_VERSION", "...
24,583
all-24584
[ "updatePeer", "updates", "the", "score", "for", "the", "given", "peer", "." ]
[ "func", "(", "ph", "*", "peerHeap", ")", "updatePeer", "(", "peerScore", "*", "peerScore", ")", "{", "heap", ".", "Fix", "(", "ph", ",", "peerScore", ".", "<mask>", ")", "\n", "}" ]
24,584
all-24585
[ "RunFilter", "sorts", "items", "by", "the", "specified", "sorting", "keys", ".", "It", "implements", "the", "Filter", "interface", "." ]
[ "func", "(", "s", "*", "SortFilter", ")", "RunFilter", "(", "arg", "Arg", ")", "error", "{", "state", ":=", "sortState", "{", "s", ".", "cmp", ",", "nil", "}", "\n", "for", "item", ":=", "range", "arg", ".", "In", "{", "state", ".", "data", "=", ...
24,585
all-24586
[ "IsAWSErrorCodeEqual", "returns", "true", "if", "the", "err", "implements", "Error", "interface", "of", "awserr", "and", "it", "has", "the", "same", "error", "code", "as", "the", "passed", "in", "error", "code", "." ]
[ "func", "IsAWSErrorCodeEqual", "(", "err", "error", ",", "code", "string", ")", "bool", "{", "awsErr", ",", "ok", ":=", "err", ".", "(", "awserr", ".", "<mask>", ")", "\n", "return", "ok", "&&", "awsErr", ".", "Code", "(", ")", "==", "code", "\n", ...
24,586
all-24587
[ "FetchAccounts", "retrieves", "all", "accounts", "available", "to", "the", "API", "Token", "." ]
[ "func", "(", "a", "*", "API", ")", "FetchAccounts", "(", ")", "(", "*", "[", "]", "Account", ",", "error", ")", "{", "<mask>", ",", "err", ":=", "a", ".", "Get", "(", "config", ".", "AccountPrefix", ")", "\n", "if", "err", "!=", "nil", "{", "re...
24,587
all-24588
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "SetEmitTouchEventsForMouseParams", ")", "UnmarshalJSON", "(", "<mask>", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation10"...
24,588
all-24589
[ "AddBytesKV", "adds", "the", "given", "key", ":", "value", "header", ".", "Multiple", "headers", "with", "the", "same", "key", "may", "be", "added", "with", "this", "function", ".", "Use", "SetBytesKV", "for", "setting", "a", "single", "header", "for", "th...
[ "func", "(", "h", "*", "ResponseHeader", ")", "AddBytesKV", "(", "key", ",", "value", "[", "]", "byte", ")", "{", "h", ".", "Add", "(", "b2s", "(", "<mask>", ")", ",", "b2s", "(", "value", ")", ")", "\n", "}" ]
24,589
all-24590
[ "Metric", "gets", "the", "metric", "value", "for", "a", "member" ]
[ "func", "(", "m", "*", "member", ")", "Metric", "(", "metricName", "string", ")", "(", "string", ",", "error", ")", "{", "cfgtls", ":=", "transport", ".", "TLSInfo", "{", "}", "\n", "tr", ",", "err", ":=", "transport", ".", "NewTimeoutTransport", "(", ...
24,590
all-24591
[ "Up", "brings", "up", "all", "configured", "endpoints", "and", "starts", "accepting", "HTTP", "requests", "." ]
[ "func", "(", "e", "*", "Endpoints", ")", "up", "(", "config", "*", "Config", ")", "error", "{", "e", ".", "mu", ".", "Lock", "(", ")", "\n", "defer", "e", ".", "mu", ".", "Unlock", "(", ")", "\n\n", "e", ".", "servers", "=", "map", "[", "kind...
24,591
all-24592
[ "DeriveScale", "fetches", "an", "instrument", "from", "the", "registry", "or", "creates", "a", "new", "one", "with", "a", "custom", "scale", ".", "If", "another", "instrument", "type", "is", "already", "registered", "with", "the", "same", "name", "/", "tags"...
[ "func", "(", "r", "*", "Registry", ")", "DeriveScale", "(", "name", "string", ",", "tags", "[", "]", "string", ",", "v", "float64", ",", "d", "time", ".", "Duration", ")", "*", "Derive", "{", "factory", ":=", "func", "(", ")", "interface", "{", "}"...
24,592
all-24593
[ "Do", "executes", "Runtime", ".", "callFunctionOn", "against", "the", "provided", "context", ".", "returns", ":", "result", "-", "Call", "result", ".", "exceptionDetails", "-", "Exception", "details", "." ]
[ "func", "(", "p", "*", "CallFunctionOnParams", ")", "Do", "(", "ctx", "context", ".", "Context", ")", "(", "result", "*", "RemoteObject", ",", "exceptionDetails", "*", "ExceptionDetails", ",", "err", "error", ")", "{", "// execute", "var", "res", "CallFuncti...
24,593
all-24594
[ "Remove", "removes", "RangerEntry", "identified", "by", "given", "network", "from", "trie", "." ]
[ "func", "(", "p", "*", "prefixTrie", ")", "Remove", "(", "network", "<mask>", ".", "IPNet", ")", "(", "RangerEntry", ",", "error", ")", "{", "return", "p", ".", "remove", "(", "rnet", ".", "NewNetwork", "(", "network", ")", ")", "\n", "}" ]
24,594
all-24595
[ "Status", "returns", "true", "if", "maintenance", "is", "enabled", "." ]
[ "func", "(", "s", "*", "MemoryStore", ")", "Status", "(", ")", "(", "on", "bool", ",", "err", "error", ")", "{", "s", ".", "mu", ".", "Lock", "(", ")", "\n", "<mask>", "=", "s", ".", "on", "\n", "s", ".", "mu", ".", "Unlock", "(", ")", "\n"...
24,595
all-24596
[ "handleResourceStateChange", "attempts", "to", "update", "resource", "s", "known", "status", "depending", "on", "the", "current", "status", "and", "errors", "during", "transition" ]
[ "func", "(", "mtask", "*", "managedTask", ")", "handleResourceStateChange", "(", "resChange", "resourceStateChange", ")", "{", "// locate the resource", "res", ":=", "resChange", ".", "resource", "\n", "if", "!", "mtask", ".", "isResourceFound", "(", "res", ")", ...
24,596
all-24597
[ "WithTimestamp", "time", "at", "which", "the", "event", "occurred", "." ]
[ "func", "(", "p", "DispatchMouseEventParams", ")", "WithTimestamp", "(", "timestamp", "*", "TimeSinceEpoch", ")", "*", "DispatchMouseEventParams", "{", "p", ".", "Timestamp", "=", "timestamp", "\n", "<mask>", "&", "p", "\n", "}" ]
24,597
all-24598
[ "Retrieve", "a", "list", "of", "all", "tables", "in", "an", "account", ".", "Required", "scopes", ":", "auth", ":", "azure", "-", "table", ":", "list", "-", "tables", ":", "<account", ">", "See", "#azureTables" ]
[ "func", "(", "auth", "*", "Auth", ")", "AzureTables", "(", "account", ",", "continuationToken", "string", ")", "(", "*", "AzureListTableResponse", ",", "error", ")", "{", "v", ":=", "<mask>", ".", "Values", "{", "}", "\n", "if", "continuationToken", "!=", ...
24,598
all-24599
[ "copy", "a", "block", "of", "pixels", "from", "one", "framebuffer", "object", "to", "another" ]
[ "func", "BlitFramebuffer", "(", "srcX0", "int32", ",", "srcY0", "int32", ",", "srcX1", "int32", ",", "srcY1", "int32", ",", "dstX0", "int32", ",", "dstY0", "int32", ",", "dstX1", "int32", ",", "dstY1", "int32", ",", "mask", "uint32", ",", "<mask>", "uint...
24,599
all-24600
[ "Error", "implements", "error" ]
[ "func", "(", "u", "*", "NotMarshallableWSRequest", ")", "Error", "(", ")", "string", "{", "ret", ":=", "\"", "\"", "\n", "if", "u", ".", "<mask>", "!=", "\"", "\"", "{", "ret", "+=", "\"", "\"", "+", "u", ".", "Type", "+", "\"", "\"", "\n", "}"...