id
int32
0
25.3k
idx
stringlengths
5
9
nl_tokens
listlengths
1
418
pl_tokens
listlengths
22
4.98k
22,000
all-22001
[ "TraceDatastore", "adds", "a", "datastore", "segment", "to", "the", "newrelic", "transaction", "if", "one", "exists", "in", "the", "context", "." ]
[ "func", "TraceDatastore", "(", "ctx", "context", ".", "Context", ",", "table", ",", "<mask>", ",", "sql", ",", "rollupName", "string", ")", "*", "Trace", "{", "return", "trace", "(", "ctx", ",", "rollupName", ",", "func", "(", "tx", "Tx", ")", "error",...
22,001
all-22002
[ "ListRecentBuilds", "fetches", "the", "list", "of", "recent", "builds", "for", "all", "repositories", "the", "user", "is", "watching", "If", "limit", "is", "-", "1", "fetches", "all", "builds" ]
[ "func", "(", "c", "*", "Client", ")", "ListRecentBuilds", "(", "limit", ",", "offset", "int", ")", "(", "[", "]", "*", "Build", ",", "error", ")", "{", "return", "c", ".", "recentBuilds", "(", "\"", "\"", ",", "nil", ",", "limit", ",", "<mask>", ...
22,002
all-22003
[ "ReorderOverlay", "()", "is", "a", "wrapper", "around", "gtk_overlay_reorder_overlay", "()", "." ]
[ "func", "(", "v", "*", "Overlay", ")", "ReorderOverlay", "(", "child", "IWidget", ",", "position", "int", ")", "{", "C", ".", "gtk_overlay_reorder_overlay", "(", "v", ".", "native", "(", ")", ",", "<mask>", ".", "toWidget", "(", ")", ",", "C", ".", "...
22,003
all-22004
[ "Copy", "returns", "a", "deep", "copy", "of", "this", "configuration", "." ]
[ "func", "(", "c", "*", "EnvConfig", ")", "Copy", "(", ")", "*", "EnvConfig", "{", "if", "c", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "var", "o", "EnvConfig", "\n\n", "if", "c", ".", "Blacklist", "!=", "nil", "{", "o", ".", "Blacklis...
22,004
all-22005
[ "GetAccountID", "returns", "the", "AccountID", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "i", "*", "IntegrationAWSAccount", ")", "GetAccountID", "(", ")", "<mask>", "{", "if", "i", "==", "nil", "||", "i", ".", "AccountID", "==", "nil", "{", "return", "\"", "\"", "\n", "}", "\n", "return", "*", "i", ".", "AccountID", "\n", ...
22,005
all-22006
[ "Offering", "returns", "offerings", "raw", "msg", "with", "given", "hash", "." ]
[ "func", "(", "h", "*", "Handler", ")", "Offering", "(", "hash", "data", ".", "HexString", ")", "(", "*", "data", ".", "Base64String", ",", "error", ")", "{", "logger", ":=", "h", ".", "logger", ".", "Add", "(", "\"", "\"", ",", "\"", "\"", ")", ...
22,006
all-22007
[ "HasHeight", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "w", "*", "WidgetLayout", ")", "HasHeight", "(", ")", "bool", "{", "if", "w", "!=", "nil", "&&", "w", ".", "Height", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n", "}" ]
22,007
all-22008
[ "WriteIndentedN", "indents", "all", "lines", "n", "spaces", "." ]
[ "func", "WriteIndentedN", "(", "w", "io", ".", "<mask>", ",", "b", "[", "]", "byte", ",", "n", "int", ")", "error", "{", "s", ":=", "bufio", ".", "NewScanner", "(", "bytes", ".", "NewReader", "(", "b", ")", ")", "\n", "if", "!", "s", ".", "Scan...
22,008
all-22009
[ "Pipelines", "returns", "a", "Collection", "of", "pipelines" ]
[ "func", "Pipelines", "(", "etcdClient", "*", "etcd", ".", "Client", ",", "etcdPrefix", "string", ")", "col", ".", "<mask>", "{", "return", "col", ".", "NewCollection", "(", "etcdClient", ",", "path", ".", "Join", "(", "etcdPrefix", ",", "pipelinesPrefix", ...
22,009
all-22010
[ "InitializeCommentPruner", "attaches", "a", "commentpruner", ".", "EventClient", "to", "the", "agent", "to", "handle", "pruning", "comments", "." ]
[ "func", "(", "a", "*", "<mask>", ")", "InitializeCommentPruner", "(", "org", ",", "repo", "string", ",", "pr", "int", ")", "{", "a", ".", "commentPruner", "=", "commentpruner", ".", "NewEventClient", "(", "a", ".", "GitHubClient", ",", "a", ".", "Logger"...
22,010
all-22011
[ "SeekForPrev", "searches", "for", "the", "record", "with", "the", "given", "key", ".", "If", "it", "is", "present", "in", "the", "skiplist", "then", "SeekForPrev", "positions", "the", "iterator", "on", "that", "record", "and", "returns", "true", ".", "If", ...
[ "func", "(", "it", "*", "Iterator", ")", "SeekForPrev", "(", "key", "[", "]", "byte", ")", "(", "<mask>", "bool", ")", "{", "var", "prev", ",", "next", "*", "node", "\n", "prev", ",", "next", ",", "found", "=", "it", ".", "seekForBaseSplice", "(", ...
22,011
all-22012
[ "SetupNS", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockCNIClient", ")", "SetupNS", "(", "arg0", "context", ".", "Context", ",", "arg1", "*", "ecscni", ".", "Config", ",", "arg2", "time", ".", "Duration", ")", "(", "*", "current", ".", "Result", ",", "error", ")", "{", "ret", ...
22,012
all-22013
[ "FillStroke", "first", "fills", "the", "paths", "and", "than", "strokes", "them" ]
[ "func", "(", "gc", "*", "GraphicContext", ")", "FillStroke", "(", "paths", "...", "*", "draw2d", ".", "Path", ")", "{", "var", "rule", "string", "\n", "if", "gc", ".", "Current", ".", "FillRule", "!=", "draw2d", ".", "FillRuleWinding", "{", "rule", "="...
22,013
all-22014
[ "aggregation", "evaluates", "an", "aggregation", "operation", "on", "a", "Vector", "." ]
[ "func", "(", "ev", "*", "evaluator", ")", "aggregation", "(", "op", "ItemType", ",", "grouping", "[", "]", "string", ",", "without", "bool", ",", "param", "interface", "{", "}", ",", "vec", "Vector", ",", "enh", "*", "EvalNodeHelper", ")", "Vector", "{...
22,014
all-22015
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "AddCompilationCacheParams", ")", "UnmarshalJSON", "(", "<mask>", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage85", "(", "...
22,015
all-22016
[ "HasRelatedId", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "c", "*", "<mask>", ")", "HasRelatedId", "(", ")", "bool", "{", "if", "c", "!=", "nil", "&&", "c", ".", "RelatedId", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
22,016
all-22017
[ "IssuedAt", "is", "an", "option", "that", "toggles", "whether", "or", "not", "the", "Issued", "At", "(", "iat", ")", "field", "is", "generated", "for", "the", "token", "." ]
[ "func", "IssuedAt", "(", "enable", "bool", ")", "Option", "{", "return", "func", "(", "tok", "*", "Bearer", ")", "error", "{", "tok", ".", "addIssuedAt", "=", "<mask>", "\n", "return", "nil", "\n", "}", "\n", "}" ]
22,017
all-22018
[ "RunInTransaction", "runs", "f", "in", "a", "transaction", ".", "It", "calls", "f", "with", "a", "transaction", "context", "tc", "that", "f", "should", "use", "for", "all", "App", "Engine", "operations", ".", "If", "f", "returns", "nil", "RunInTransaction", ...
[ "func", "RunInTransaction", "(", "c", "context", ".", "Context", ",", "f", "func", "(", "tc", "context", ".", "Context", ")", "error", ",", "opts", "*", "TransactionOptions", ")", "error", "{", "xg", ":=", "false", "\n", "if", "opts", "!=", "nil", "{",...
22,018
all-22019
[ "ReceiveIssueEvent", "calls", "plugin", ".", "ReceiveIssueEvent", "()", "if", "issues", "are", "not", "ignored" ]
[ "func", "(", "t", "*", "TypeFilterWrapperPlugin", ")", "ReceiveIssueEvent", "(", "event", "sql", ".", "IssueEvent", ")", "[", "]", "Point", "{", "if", "!", "t", ".", "pass", "[", "event", ".", "IssueID", "]", "{", "return", "nil", "\n", "}", "\n", "r...
22,019
all-22020
[ "loadClusterConfig", "loads", "connection", "configuration", "for", "the", "cluster", "we", "re", "deploying", "to", ".", "We", "prefer", "to", "use", "in", "-", "cluster", "configuration", "if", "possible", "but", "will", "fall", "back", "to", "using", "defau...
[ "func", "loadClusterConfig", "(", "masterURL", ",", "kubeConfig", "string", ")", "(", "*", "<mask>", ".", "Config", ",", "error", ")", "{", "clusterConfig", ",", "err", ":=", "clientcmd", ".", "BuildConfigFromFlags", "(", "masterURL", ",", "kubeConfig", ")", ...
22,020
all-22021
[ "HasPaletteFlip", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "s", "*", "Style", ")", "HasPaletteFlip", "(", ")", "bool", "{", "if", "s", "!=", "nil", "&&", "s", ".", "PaletteFlip", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n", "}" ]
22,021
all-22022
[ "CreateButton", "gets", "a", "new", "payment", "button", "including", "EmbedHtml", "as", "a", "field", "on", "button", "struct" ]
[ "func", "(", "c", "Client", ")", "CreateButton", "(", "params", "*", "Button", ")", "(", "*", "Button", ",", "error", ")", "{", "finalParams", ":=", "&", "struct", "{", "Button", "*", "Button", "`json:\"button\"`", "\n", "}", "{", "Button", ":", "param...
22,022
all-22023
[ "leaseGrantCommandFunc", "executes", "the", "lease", "grant", "command", "." ]
[ "func", "leaseGrantCommandFunc", "(", "cmd", "*", "cobra", ".", "Command", ",", "args", "[", "]", "string", ")", "{", "if", "len", "(", "args", ")", "!=", "1", "{", "ExitWithError", "(", "ExitBadArgs", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ")",...
22,023
all-22024
[ "GetUserCacheDir", "is", "a", "wrapper", "around", "g_get_user_cache_dir", "()", "." ]
[ "func", "GetUserCacheDir", "(", ")", "string", "{", "c", ":=", "C", ".", "g_get_user_cache_dir", "(", ")", "\n", "return", "C", ".", "GoString", "(", "(", "*", "C", ".", "<mask>", ")", "(", "c", ")", ")", "\n", "}" ]
22,024
all-22025
[ "Detect", "CGroup", "support", "." ]
[ "func", "(", "s", "*", "OS", ")", "initCGroup", "(", ")", "{", "flags", ":=", "[", "]", "*", "bool", "{", "&", "s", ".", "CGroupBlkioController", ",", "&", "s", ".", "CGroupCPUController", ",", "&", "s", ".", "CGroupCPUacctController", ",", "&", "s",...
22,025
all-22026
[ "Expiration", "is", "a", "GServiceAccount", "option", "to", "set", "a", "expiration", "limit", "for", "tokens", "generated", "from", "the", "token", "source", "." ]
[ "func", "Expiration", "(", "expiration", "<mask>", ".", "Duration", ")", "Option", "{", "return", "func", "(", "gsa", "*", "GServiceAccount", ")", "error", "{", "gsa", ".", "expiration", "=", "expiration", "\n", "return", "nil", "\n", "}", "\n", "}" ]
22,026
all-22027
[ "ListJobF", "returns", "info", "about", "all", "jobs", "calling", "f", "with", "each", "JobInfo", ".", "If", "f", "returns", "an", "error", "iteration", "of", "jobs", "will", "stop", "and", "ListJobF", "will", "return", "that", "error", "unless", "the", "e...
[ "func", "(", "c", "APIClient", ")", "ListJobF", "(", "pipelineName", "string", ",", "inputCommit", "[", "]", "*", "pfs", ".", "Commit", ",", "outputCommit", "*", "pfs", ".", "Commit", ",", "f", "func", "(", "*", "pps", ".", "JobInfo", ")", "error", "...
22,027
all-22028
[ "ParseVerb", "parses", "the", "verb", "at", "the", "beginning", "of", "f", ".", "It", "returns", "the", "verb", "how", "much", "of", "the", "input", "was", "consumed", "and", "an", "error", "if", "any", "." ]
[ "func", "ParseVerb", "(", "f", "string", ")", "(", "Verb", ",", "int", ",", "error", ")", "{", "if", "len", "(", "f", ")", "<", "2", "{", "return", "Verb", "{", "}", ",", "0", ",", "ErrInvalid", "\n", "}", "\n", "const", "(", "flags", "=", "1...
22,028
all-22029
[ "compress", "is", "COMPRESS", "from", "the", "papers", "." ]
[ "func", "(", "d", "*", "ltDom", ")", "compress", "(", "v", "vName", ")", "{", "var", "stackBuf", "[", "20", "]", "vName", "\n", "stack", ":=", "stackBuf", "[", ":", "0", "]", "\n", "for", "d", ".", "ancestor", "[", "d", ".", "ancestor", "[", "v...
22,029
all-22030
[ "MarshalJSON", "overrides", "the", "logic", "for", "JSON", "-", "encoding", "the", "ResourceStatus", "type" ]
[ "func", "(", "cs", "*", "CgroupStatus", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "if", "cs", "==", "nil", "{", "return", "nil", ",", "nil", "\n", "}", "\n", "return", "[", "]", "byte", "(", "`\"`", "+", "cs",...
22,030
all-22031
[ "listDirs", "returns", "a", "slice", "containing", "all", "the", "subdirectories", "under", "dir", "including", "dir", "itself", "." ]
[ "func", "listDirs", "(", "dir", "string", ")", "(", "[", "]", "string", ",", "[", "]", "error", ")", "{", "var", "dirs", "[", "]", "string", "\n", "var", "errs", "[", "]", "error", "\n", "err", ":=", "filepath", ".", "Walk", "(", "dir", ",", "f...
22,031
all-22032
[ "CreateRequestMessage", "creates", "the", "request", "json", "message", "using", "the", "given", "input", ".", "Note", "the", "input", "*", "MUST", "*", "be", "a", "pointer", "to", "a", "valid", "backend", "type", "that", "this", "client", "recognises", "." ...
[ "func", "(", "cs", "*", "ClientServerImpl", ")", "CreateRequestMessage", "(", "input", "interface", "{", "}", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "msg", ":=", "&", "RequestMessage", "{", "}", "\n\n", "recognizedTypes", ":=", "cs", ".", ...
22,032
all-22033
[ "printArgs", "prints", "the", "arguments", "of", "a", "function", "type", ".", "It", "looks", "at", "the", "inner", "types", "for", "spacing", "." ]
[ "func", "(", "ft", "*", "FunctionType", ")", "printArgs", "(", "ps", "*", "printState", ")", "{", "paren", ":=", "false", "\n", "space", ":=", "false", "\n", "for", "i", ":=", "len", "(", "ps", ".", "inner", ")", "-", "1", ";", "i", ">=", "0", ...
22,033
all-22034
[ "validateToken", "makes", "a", "call", "to", "Azure", "SDK", "with", "given", "token", "essentially", "making", "sure", "if", "the", "access_token", "valid", "if", "not", "it", "uses", "SDK’s", "functionality", "to", "automatically", "refresh", "the", "token", ...
[ "func", "validateToken", "(", "env", "azure", ".", "Environment", ",", "<mask>", "*", "azure", ".", "ServicePrincipalToken", ")", "error", "{", "c", ":=", "subscriptionsClient", "(", "env", ".", "ResourceManagerEndpoint", ")", "\n", "c", ".", "Authorizer", "="...
22,034
all-22035
[ "GetenvDefault", "retrieves", "the", "value", "of", "the", "environment", "variable", "named", "by", "the", "key", ".", "It", "returns", "the", "given", "defaultValue", "if", "the", "variable", "is", "not", "present", "." ]
[ "func", "GetenvDefault", "(", "key", ",", "defaultValue", "string", ")", "string", "{", "ret", ":=", "os", ".", "Getenv", "(", "key", ")", "\n", "if", "<mask>", "==", "\"", "\"", "{", "return", "defaultValue", "\n", "}", "\n\n", "return", "ret", "\n", ...
22,035
all-22036
[ "SetTransport", "changes", "the", "transport", "on", "the", "client", "and", "all", "its", "subresources" ]
[ "func", "(", "c", "*", "Functions", ")", "SetTransport", "(", "transport", "runtime", ".", "ClientTransport", ")", "{", "c", ".", "Transport", "=", "transport", "\n\n", "c", ".", "Apps", ".", "SetTransport", "(", "transport", ")", "\n\n", "c", ".", "Rout...
22,036
all-22037
[ "unionStrings", "merges", "the", "parent", "and", "child", "items", "together" ]
[ "func", "unionStrings", "(", "parent", ",", "child", "[", "]", "string", ")", "[", "]", "string", "{", "if", "child", "==", "nil", "{", "return", "parent", "\n", "}", "\n", "if", "<mask>", "==", "nil", "{", "return", "child", "\n", "}", "\n", "s", ...
22,037
all-22038
[ "set", "front", "and", "back", "stencil", "test", "actions" ]
[ "func", "StencilOp", "(", "<mask>", "uint32", ",", "zfail", "uint32", ",", "zpass", "uint32", ")", "{", "syscall", ".", "Syscall", "(", "gpStencilOp", ",", "3", ",", "uintptr", "(", "fail", ")", ",", "uintptr", "(", "zfail", ")", ",", "uintptr", "(", ...
22,038
all-22039
[ "GetConferencesInRange", "gets", "an", "Iterator", "containing", "conferences", "in", "the", "range", "[", "start", "end", ")", "optionally", "further", "filtered", "by", "data", ".", "GetConferencesInRange", "panics", "if", "start", "is", "not", "before", "end", ...
[ "func", "(", "c", "*", "ConferenceService", ")", "GetConferencesInRange", "(", "<mask>", "time", ".", "Time", ",", "end", "time", ".", "Time", ",", "data", "url", ".", "Values", ")", "ConferencePageIterator", "{", "if", "start", ".", "After", "(", "end", ...
22,039
all-22040
[ "ReadEvent", "scans", "the", "EventStream", "for", "events", "." ]
[ "func", "(", "e", "*", "EventStreamReader", ")", "ReadEvent", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "if", "e", ".", "scanner", ".", "Scan", "(", ")", "{", "<mask>", ":=", "e", ".", "scanner", ".", "Bytes", "(", ")", "\n", "re...
22,040
all-22041
[ "NewReference", "returns", "a", "docker", "-", "daemon", "reference", "for", "either", "the", "supplied", "image", "ID", "(", "config", "digest", ")", "or", "the", "supplied", "reference", "(", "which", "must", "satisfy", "!reference", ".", "IsNameOnly", ")" ]
[ "func", "NewReference", "(", "id", "digest", ".", "Digest", ",", "ref", "<mask>", ".", "Named", ")", "(", "types", ".", "ImageReference", ",", "error", ")", "{", "if", "id", "!=", "\"", "\"", "&&", "ref", "!=", "nil", "{", "return", "nil", ",", "er...
22,041
all-22042
[ "FetchGraphs", "retrieves", "all", "graphs", "available", "to", "the", "API", "Token", "." ]
[ "func", "(", "a", "*", "API", ")", "FetchGraphs", "(", ")", "(", "*", "[", "]", "Graph", ",", "error", ")", "{", "<mask>", ",", "err", ":=", "a", ".", "Get", "(", "config", ".", "GraphPrefix", ")", "\n", "if", "err", "!=", "nil", "{", "return",...
22,042
all-22043
[ "GoString", "defines", "the", "printable", "version", "of", "this", "struct", "." ]
[ "func", "(", "c", "*", "SyslogConfig", ")", "GoString", "(", ")", "string", "{", "if", "c", "==", "nil", "{", "return", "\"", "\"", "\n", "}", "\n\n", "<mask>", "fmt", ".", "Sprintf", "(", "\"", "\"", "+", "\"", "\"", "+", "\"", "\"", "+", "\""...
22,043
all-22044
[ "And", "combines", "the", "n", "last", "filters", "into", "a", "new", "filter", "using", "a", "And", "operation", "." ]
[ "func", "(", "q", "*", "Query", ")", "And", "(", "n", "int", ")", "*", "Query", "{", "q", ".", "<mask>", "=", "append", "(", "q", ".", "headers", ",", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "n", ")", ")", "\n", "return", "q", "\n", "}...
22,044
all-22045
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "ClearDeviceOrientationOverrideParams", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceorientation1", "(", "&"...
22,045
all-22046
[ "StatusString", "returns", "the", "string", "of", "the", "cgroup", "resource", "status" ]
[ "func", "(", "auth", "*", "ASMAuthResource", ")", "StatusString", "(", "<mask>", "resourcestatus", ".", "ResourceStatus", ")", "string", "{", "return", "ASMAuthStatus", "(", "status", ")", ".", "String", "(", ")", "\n", "}" ]
22,046
all-22047
[ "totalBytes", "returns", "the", "size", "in", "bytes", "for", "one", "element", "of", "the", "array", "buffer", "." ]
[ "func", "(", "a", "*", "arrayBufferLayout", ")", "totalBytes", "(", ")", "int", "{", "if", "a", ".", "total", "!=", "0", "{", "return", "a", ".", "total", "\n", "}", "\n", "t", ":=", "0", "\n", "for", "_", ",", "p", ":=", "range", "a", ".", "...
22,047
all-22048
[ "Write", "serializes", "the", "command", "to", "the", "given", "buffered", "output", "satisfies", "the", "Command", "interface", "." ]
[ "func", "(", "c", "Req", ")", "Write", "(", "w", "*", "bufio", ".", "Writer", ")", "(", "err", "error", ")", "{", "if", "_", ",", "err", "=", "w", ".", "WriteString", "(", "\"", "\"", ")", ";", "err", "!=", "nil", "{", "err", "=", "errors", ...
22,048
all-22049
[ "GetMulti", "is", "a", "batch", "version", "of", "Get", ".", "The", "returned", "map", "from", "keys", "to", "items", "may", "have", "fewer", "elements", "than", "the", "input", "slice", "due", "to", "memcache", "cache", "misses", ".", "Each", "key", "mu...
[ "func", "(", "c", "*", "Client", ")", "GetMulti", "(", "keys", "[", "]", "string", ")", "(", "map", "[", "string", "]", "*", "Item", ",", "error", ")", "{", "keyMap", ":=", "make", "(", "map", "[", "*", "Addr", "]", "[", "]", "string", ")", "...
22,049
all-22050
[ "Also", "accept", "policy", "that", "s", "tied", "to", "the", "combination", "of", "the", "graph", "root", "and", "driver", "name", "to", "apply", "to", "all", "images", "stored", "in", "the", "Store", "and", "to", "just", "the", "graph", "root", "in", ...
[ "func", "(", "s", "storageReference", ")", "PolicyConfigurationNamespaces", "(", ")", "[", "]", "string", "{", "storeSpec", ":=", "\"", "\"", "+", "s", ".", "transport", ".", "store", ".", "GraphDriverName", "(", ")", "+", "\"", "\"", "+", "s", ".", "t...
22,050
all-22051
[ "Fatalf", "is", "equivalent", "to", "l", ".", "Critical", "followed", "by", "a", "call", "to", "os", ".", "Exit", "(", "1", ")", "." ]
[ "func", "(", "l", "*", "Logger", ")", "Fatalf", "(", "format", "string", ",", "args", "...", "interface", "{", "}", ")", "{", "l", ".", "log", "(", "CRITICAL", ",", "&", "<mask>", ",", "args", "...", ")", "\n", "os", ".", "Exit", "(", "1", ")",...
22,051
all-22052
[ "ValidDependencies", "takes", "a", "task", "and", "verifies", "that", "it", "is", "possible", "to", "allow", "all", "containers", "within", "it", "to", "reach", "the", "desired", "status", "by", "proceeding", "in", "some", "order", "." ]
[ "func", "ValidDependencies", "(", "task", "*", "apitask", ".", "Task", ")", "bool", "{", "unresolved", ":=", "make", "(", "[", "]", "*", "apicontainer", ".", "Container", ",", "len", "(", "task", ".", "Containers", ")", ")", "\n", "resolved", ":=", "ma...
22,052
all-22053
[ "AlertLocator", "builds", "a", "locator", "from", "the", "given", "href", "." ]
[ "func", "(", "api", "*", "API", ")", "AlertLocator", "(", "href", "string", ")", "*", "AlertLocator", "{", "<mask>", "&", "AlertLocator", "{", "Href", "(", "href", ")", ",", "api", "}", "\n", "}" ]
22,053
all-22054
[ "eventHandler", "is", "used", "to", "manage", "udev", "net", "subsystem", "events", "to", "add", "/", "remove", "interfaces" ]
[ "func", "(", "udevWatcher", "*", "UdevWatcher", ")", "eventHandler", "(", ")", "{", "// The shutdown channel will be used to terminate the watch for udev events", "shutdown", ":=", "udevWatcher", ".", "udevMonitor", ".", "Monitor", "(", "udevWatcher", ".", "events", ")", ...
22,054
all-22055
[ "CheckoutNewBranch", "creates", "a", "new", "branch", "and", "checks", "it", "out", "." ]
[ "func", "(", "r", "*", "Repo", ")", "CheckoutNewBranch", "(", "branch", "<mask>", ")", "error", "{", "r", ".", "logger", ".", "Infof", "(", "\"", "\"", ",", "branch", ")", "\n", "co", ":=", "r", ".", "gitCommand", "(", "\"", "\"", ",", "\"", "\""...
22,055
all-22056
[ "DrawRect", "draws", "a", "rectangle", "on", "the", "given", "destination", "dst", ".", "DrawRect", "is", "intended", "to", "be", "used", "mainly", "for", "debugging", "or", "prototyping", "purpose", "." ]
[ "func", "DrawRect", "(", "dst", "*", "ebiten", ".", "Image", ",", "x", ",", "y", ",", "<mask>", ",", "height", "float64", ",", "clr", "color", ".", "Color", ")", "{", "ew", ",", "eh", ":=", "emptyImage", ".", "Size", "(", ")", "\n\n", "op", ":=",...
22,056
all-22057
[ "FindVirtualDeviceByAddr", "locates", "the", "subresource", "s", "virtual", "device", "in", "the", "supplied", "VirtualDeviceList", "by", "its", "device", "address", "." ]
[ "func", "(", "r", "*", "Subresource", ")", "FindVirtualDeviceByAddr", "(", "l", "object", ".", "VirtualDeviceList", ")", "(", "types", ".", "BaseVirtualDevice", ",", "error", ")", "{", "log", ".", "Printf", "(", "\"", "\"", ",", "r", ".", "DevAddr", "(",...
22,057
all-22058
[ "ListServers", "returns", "a", "server", "struct", "collection" ]
[ "func", "(", "c", "*", "<mask>", ")", "ListServers", "(", "dcid", "string", ")", "(", "*", "Servers", ",", "error", ")", "{", "url", ":=", "serverColPath", "(", "dcid", ")", "+", "`?depth=`", "+", "c", ".", "client", ".", "depth", "+", "`&pretty=`", ...
22,058
all-22059
[ "LoadResponse", "deserializes", "the", "JSON", "response", "into", "a", "generic", "object", ".", "If", "the", "response", "has", "a", "Location", "header", "then", "the", "returned", "object", "is", "a", "map", "with", "one", "key", "Location", "containing", ...
[ "func", "(", "a", "*", "API", ")", "LoadResponse", "(", "resp", "*", "http", ".", "Response", ")", "(", "interface", "{", "}", ",", "error", ")", "{", "defer", "resp", ".", "Body", ".", "Close", "(", ")", "\n", "var", "respBody", "interface", "{", ...
22,059
all-22060
[ "Create", "a", "database", "connection", "and", "perform", "any", "updates", "needed", "." ]
[ "func", "initializeDbObject", "(", "d", "*", "Daemon", ")", "(", "*", "db", ".", "Dump", ",", "error", ")", "{", "logger", ".", "Info", "(", "\"", "\"", ")", "\n", "// Rename the old database name if needed.", "if", "shared", ".", "PathExists", "(", "d", ...
22,060
all-22061
[ "Run", "starts", "a", "query", "for", "log", "records", "which", "contain", "request", "and", "application", "level", "log", "information", "." ]
[ "func", "(", "params", "*", "<mask>", ")", "Run", "(", "c", "context", ".", "Context", ")", "*", "Result", "{", "req", ",", "err", ":=", "makeRequest", "(", "params", ",", "internal", ".", "FullyQualifiedAppID", "(", "c", ")", ",", "appengine", ".", ...
22,061
all-22062
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "SetProduceCompilationCacheParams", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage7", "(", "&", "w", ",", ...
22,062
all-22063
[ "AcquireByState", "asks", "boskos", "for", "a", "resources", "of", "certain", "type", "and", "set", "the", "resource", "to", "dest", "state", ".", "Returns", "a", "list", "of", "resources", "on", "success", "." ]
[ "func", "(", "c", "*", "Client", ")", "AcquireByState", "(", "state", ",", "dest", "string", ",", "names", "[", "]", "string", ")", "(", "[", "]", "common", ".", "Resource", ",", "error", ")", "{", "resources", ",", "err", ":=", "c", ".", "acquireB...
22,063
all-22064
[ "ChecksumZero", "returns", "the", "32bits", "Hash", "value", "." ]
[ "func", "ChecksumZero", "(", "input", "[", "]", "byte", ")", "uint32", "{", "n", ":=", "len", "(", "input", ")", "\n", "h32", ":=", "uint32", "(", "n", ")", "\n\n", "if", "n", "<", "16", "{", "h32", "+=", "prime32_5", "\n", "}", "else", "{", "v...
22,064
all-22065
[ "Exists", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockControl", ")", "Exists", "(", "arg0", "string", ")", "bool", "{", "<mask>", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".",...
22,065
all-22066
[ "PrependSubmenu", "is", "a", "wrapper", "around", "g_menu_prepend_submenu", "()", "." ]
[ "func", "(", "v", "*", "Menu", ")", "PrependSubmenu", "(", "label", "string", ",", "submenu", "*", "MenuModel", ")", "{", "cstr1", ":=", "(", "*", "C", ".", "gchar", ")", "(", "C", ".", "CString", "(", "<mask>", ")", ")", "\n", "defer", "C", ".",...
22,066
all-22067
[ "RenderEvents", "returns", "the", "render", "events", "for", "each", "template", "was", "rendered", ".", "The", "map", "is", "keyed", "by", "template", "ID", "." ]
[ "func", "(", "r", "*", "Runner", ")", "RenderEvents", "(", ")", "map", "[", "string", "]", "*", "RenderEvent", "{", "r", ".", "renderEventsLock", ".", "RLock", "(", ")", "\n", "defer", "r", ".", "renderEventsLock", ".", "RUnlock", "(", ")", "\n\n", "...
22,067
all-22068
[ "NewMockCgroup", "creates", "a", "new", "mock", "instance" ]
[ "func", "NewMockCgroup", "(", "ctrl", "*", "gomock", ".", "<mask>", ")", "*", "MockCgroup", "{", "mock", ":=", "&", "MockCgroup", "{", "ctrl", ":", "ctrl", "}", "\n", "mock", ".", "recorder", "=", "&", "MockCgroupMockRecorder", "{", "mock", "}", "\n", ...
22,068
all-22069
[ "SubmitTaskStateChange", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockECSClient", ")", "SubmitTaskStateChange", "(", "arg0", "api", ".", "TaskStateChange", ")", "error", "{", "<mask>", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ...
22,069
all-22070
[ "SetContentRange", "sets", "Content", "-", "Range", ":", "bytes", "startPos", "-", "endPos", "/", "contentLength", "header", "." ]
[ "func", "(", "h", "*", "ResponseHeader", ")", "SetContentRange", "(", "startPos", ",", "endPos", ",", "contentLength", "int", ")", "{", "b", ":=", "h", ".", "bufKV", ".", "<mask>", "[", ":", "0", "]", "\n", "b", "=", "append", "(", "b", ",", "strBy...
22,070
all-22071
[ "InstanceMetricLocator", "builds", "a", "locator", "from", "the", "given", "href", "." ]
[ "func", "(", "api", "*", "API", ")", "InstanceMetricLocator", "(", "href", "<mask>", ")", "*", "InstanceMetricLocator", "{", "return", "&", "InstanceMetricLocator", "{", "Href", "(", "href", ")", ",", "api", "}", "\n", "}" ]
22,071
all-22072
[ "ImageTooBig", "checks", "if", "image", "is", "bigger", "than", "github", "limits" ]
[ "func", "ImageTooBig", "(", "url", "string", ")", "(", "bool", ",", "error", ")", "{", "// limit is 10MB", "limit", ":=", "10000000", "\n", "// try to get the image size from Content-Length header", "resp", ",", "err", ":=", "http", ".", "Head", "(", "url", ")",...
22,072
all-22073
[ "NewMockDockerStateResolver", "creates", "a", "new", "mock", "instance" ]
[ "func", "NewMockDockerStateResolver", "(", "ctrl", "*", "gomock", ".", "<mask>", ")", "*", "MockDockerStateResolver", "{", "mock", ":=", "&", "MockDockerStateResolver", "{", "ctrl", ":", "ctrl", "}", "\n", "mock", ".", "recorder", "=", "&", "MockDockerStateResol...
22,073
all-22074
[ "StorageRootFromEnv", "gets", "the", "storage", "root", "based", "on", "environment", "variables", "." ]
[ "func", "StorageRootFromEnv", "(", ")", "(", "string", ",", "error", ")", "{", "storageRoot", ",", "ok", ":=", "os", ".", "LookupEnv", "(", "PachRootEnvVar", ")", "\n", "if", "!", "ok", "{", "return", "\"", "\"", ",", "fmt", ".", "Errorf", "(", "\"",...
22,074
all-22075
[ "NewS64", "creates", "a", "new", "hash", ".", "Hash64", "computing", "the", "64bit", "xxHash", "checksum", "starting", "with", "the", "specific", "seed", "." ]
[ "func", "NewS64", "(", "seed", "uint64", ")", "(", "xx", "*", "XXHash64", ")", "{", "<mask>", "=", "&", "XXHash64", "{", "seed", ":", "seed", ",", "}", "\n", "xx", ".", "Reset", "(", ")", "\n", "return", "\n", "}" ]
22,075
all-22076
[ "querystring", "implements", "querystringer", "to", "represent", "the", "outgoing", "certificate", "file", "." ]
[ "func", "(", "ow", "*", "outgoingSetWebhook", ")", "querystring", "(", ")", "querystring", "{", "toReturn", ":=", "make", "(", "<mask>", "[", "string", "]", "string", ")", "\n\n", "if", "ow", ".", "URL", "!=", "\"", "\"", "{", "toReturn", "[", "\"", ...
22,076
all-22077
[ "GetStatus", "()", "is", "a", "wrapper", "around", "gtk_print_operation_get_status", "()", "." ]
[ "func", "(", "<mask>", "*", "PrintOperation", ")", "GetStatus", "(", ")", "PrintStatus", "{", "c", ":=", "C", ".", "gtk_print_operation_get_status", "(", "po", ".", "native", "(", ")", ")", "\n", "return", "PrintStatus", "(", "c", ")", "\n", "}" ]
22,077
all-22078
[ "Set", "store", "a", "value", "to", "specified", "token", "." ]
[ "func", "(", "s", "*", "SessionCache", ")", "Set", "(", "<mask>", "string", ",", "value", "interface", "{", "}", ")", "error", "{", "err", ":=", "s", ".", "cache", ".", "Set", "(", "token", ",", "value", ")", "\n", "if", "err", "!=", "nil", "{", ...
22,078
all-22079
[ "CleanupNS", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockCNIClient", ")", "CleanupNS", "(", "arg0", "context", ".", "Context", ",", "arg1", "*", "ecscni", ".", "Config", ",", "arg2", "time", ".", "Duration", ")", "error", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "...
22,079
all-22080
[ "virtualMachineFromSearchIndex", "gets", "the", "virtual", "machine", "reference", "via", "the", "SearchIndex", "MO", "and", "is", "the", "method", "used", "to", "fetch", "UUIDs", "on", "newer", "versions", "of", "vSphere", "." ]
[ "func", "virtualMachineFromSearchIndex", "(", "ctx", "context", ".", "Context", ",", "client", "*", "govmomi", ".", "Client", ",", "uuid", "string", ")", "(", "object", ".", "Reference", ",", "error", ")", "{", "log", ".", "Printf", "(", "\"", "\"", ",",...
22,080
all-22081
[ "String", "prints", "upto", "the", "first", "fifteen", "elements", "of", "the", "list", "in", "string", "format", "." ]
[ "func", "(", "list", "*", "LinkedList", ")", "String", "(", ")", "string", "{", "list", ".", "key", ".", "RLock", "(", ")", "\n", "defer", "list", ".", "key", ".", "RUnlock", "(", ")", "\n\n", "builder", ":=", "bytes", ".", "NewBufferString", "(", ...
22,081
all-22082
[ "Length", "returns", "the", "number", "of", "items", "in", "the", "Queue", "." ]
[ "func", "(", "q", "*", "Queue", ")", "Length", "(", ")", "uint", "{", "q", ".", "key", ".", "RLock", "(", ")", "\n", "defer", "q", ".", "key", ".", "RUnlock", "(", ")", "\n", "if", "nil", "==", "q", ".", "underlyer", "{", "return", "0", "\n",...
22,082
all-22083
[ "RemoveTag", "removes", "the", "tag", "with", "the", "specified", "key", "." ]
[ "func", "(", "s", "*", "DeploymentManifest", ")", "RemoveTag", "(", "key", "string", ")", "{", "if", "s", ".", "Tags", "!=", "nil", "{", "<mask>", "(", "s", ".", "Tags", ",", "key", ")", "\n", "}", "\n", "}" ]
22,083
all-22084
[ "/", "*", "ShutdownLoggers", "will", "run", "ShutdownLogger", "on", "each", "Logger", "in", "Base", ".", "If", "an", "error", "occurs", "while", "shutting", "down", "a", "Logger", "the", "error", "will", "be", "returned", "and", "all", "the", "loggers", "t...
[ "func", "(", "b", "*", "Base", ")", "ShutdownLoggers", "(", ")", "error", "{", "// Before shutting down we should flush all the messsages", "b", ".", "Flush", "(", ")", "\n\n", "for", "_", ",", "logger", ":=", "<mask>", "b", ".", "loggers", "{", "err", ":=",...
22,084
all-22085
[ "UnmarshalText", "hydrates", "this", "instance", "from", "text" ]
[ "func", "(", "u", "*", "UUID4", ")", "UnmarshalText", "(", "data", "[", "]", "byte", ")", "error", "{", "// validation is performed later on", "*", "u", "=", "UUID4", "(", "string", "(", "<mask>", ")", ")", "\n", "return", "nil", "\n", "}" ]
22,085
all-22086
[ "New", "is", "used", "to", "return", "an", "instance", "of", "the", "UdevWatcher", "struct" ]
[ "func", "New", "(", "ctx", "context", ".", "<mask>", ",", "primaryMAC", "string", ",", "udevwrap", "udevwrapper", ".", "Udev", ",", "state", "dockerstate", ".", "TaskEngineState", ",", "stateChangeEvents", "chan", "<-", "statechange", ".", "Event", ")", "*", ...
22,086
all-22087
[ "UpdateAnnotation", "updates", "passed", "annotation", "." ]
[ "func", "(", "a", "*", "API", ")", "UpdateAnnotation", "(", "cfg", "*", "Annotation", ")", "(", "*", "Annotation", ",", "error", ")", "{", "if", "cfg", "==", "nil", "{", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ")", "\n", "}",...
22,087
all-22088
[ "ToolsState", "returns", "state", "of", "the", "VMware", "Tools", "suite", "in", "the", "guest", "." ]
[ "func", "(", "v", "*", "VM", ")", "ToolsState", "(", ")", "(", "GuestToolsState", ",", "error", ")", "{", "var", "err", "C", ".", "VixError", "=", "C", ".", "VIX_OK", "\n", "state", ":=", "C", ".", "VIX_TOOLSSTATE_UNKNOWN", "\n\n", "err", "=", "C", ...
22,088
all-22089
[ "Format", "formats", "the", "node", "." ]
[ "func", "(", "node", "*", "Update", ")", "Format", "(", "buf", "*", "TrackedBuffer", ")", "{", "buf", ".", "Myprintf", "(", "\"", "\"", ",", "<mask>", ".", "Comments", ",", "node", ".", "TableExprs", ",", "node", ".", "Exprs", ",", "node", ".", "Wh...
22,089
all-22090
[ "routineColor", "returns", "the", "color", "for", "the", "header", "of", "the", "goroutines", "bucket", "." ]
[ "func", "(", "p", "*", "Palette", ")", "routineColor", "(", "bucket", "*", "<mask>", ".", "Bucket", ",", "multipleBuckets", "bool", ")", "string", "{", "if", "bucket", ".", "First", "&&", "multipleBuckets", "{", "return", "p", ".", "RoutineFirst", "\n", ...
22,090
all-22091
[ "CleanUrl", "check", "the", "characteres", "in", "url", "and", "parser", "it", "with", "url", ".", "Parse", ".", "If", "url", "is", "ok", "return", "one", "string", "with", "it", "or", "if", "the", "scheme", "is", "missing", "return", "the", "url", "an...
[ "func", "CleanUrl", "(", "rawurl", "string", ",", "min", ",", "max", "int", ")", "(", "string", ",", "error", ")", "{", "err", ":=", "CheckUrl", "(", "rawurl", ",", "min", ",", "<mask>", ")", "\n", "if", "err", "!=", "nil", "{", "return", "\"", "...
22,091
all-22092
[ "Step", "1", "is", "the", "removal", "of", "standard", "suffixes", "all", "of", "which", "must", "occur", "in", "RV", ".", "Search", "for", "a", "PERFECTIVE", "GERUND", "ending", ".", "If", "one", "is", "found", "remove", "it", "and", "that", "is", "th...
[ "func", "step1", "(", "word", "*", "snowballword", ".", "SnowballWord", ")", "bool", "{", "// `stop` will be used to signal early termination", "var", "stop", "bool", "\n\n", "// Search for a PERFECTIVE GERUND ending", "stop", "=", "removePerfectiveGerundEnding", "(", "word...
22,092
all-22093
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "ClearGeolocationOverrideParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation18", ...
22,093
all-22094
[ "newDummyClient", "creates", "a", "in", "memory", "client", "representation", "for", "testing", "such", "that", "we", "do", "not", "need", "to", "use", "a", "kubernetes", "API", "Server", "." ]
[ "func", "newDummyClient", "(", "t", "Type", ")", "*", "dummyClient", "{", "c", ":=", "&", "dummyClient", "{", "t", ":", "t", ",", "objects", ":", "make", "(", "<mask>", "[", "string", "]", "Object", ")", ",", "}", "\n", "return", "c", "\n", "}" ]
22,094
all-22095
[ "ListBuilds", "returns", "a", "list", "of", "all", "Jenkins", "builds", "for", "the", "provided", "jobs", "(", "both", "scheduled", "and", "enqueued", ")", "." ]
[ "func", "(", "c", "*", "Client", ")", "ListBuilds", "(", "jobs", "[", "]", "BuildQueryParams", ")", "(", "map", "[", "string", "]", "Build", ",", "error", ")", "{", "// Get queued builds.", "jenkinsBuilds", ",", "err", ":=", "c", ".", "GetEnqueuedBuilds", ...
22,095
all-22096
[ "GetEvaluationTimestamp", "returns", "the", "time", "the", "last", "evaluation", "of", "the", "rule", "group", "took", "place", "." ]
[ "func", "(", "g", "*", "Group", ")", "GetEvaluationTimestamp", "(", ")", "<mask>", ".", "Time", "{", "g", ".", "mtx", ".", "Lock", "(", ")", "\n", "defer", "g", ".", "mtx", ".", "Unlock", "(", ")", "\n", "return", "g", ".", "evaluationTimestamp", "...
22,096
all-22097
[ "withStateLock", "performs", "an", "action", "with", "the", "connection", "state", "mutex", "locked" ]
[ "func", "(", "c", "*", "<mask>", ")", "withStateLock", "(", "f", "func", "(", ")", "error", ")", "error", "{", "c", ".", "stateMut", ".", "Lock", "(", ")", "\n", "err", ":=", "f", "(", ")", "\n", "c", ".", "stateMut", ".", "Unlock", "(", ")", ...
22,097
all-22098
[ "UnmarshalText", "parses", "a", "text", "representation", "into", "a", "date", "type" ]
[ "func", "(", "d", "*", "Date", ")", "UnmarshalText", "(", "text", "[", "]", "byte", ")", "error", "{", "if", "len", "(", "text", ")", "==", "0", "{", "return", "nil", "\n", "}", "\n", "dd", ",", "err", ":=", "time", ".", "Parse", "(", "RFC3339F...
22,098
all-22099
[ "RequestPhase", "is", "a", "wrapper", "around", "gdk_frame_clock_request_phase", "()", "." ]
[ "func", "(", "v", "*", "FrameClock", ")", "RequestPhase", "(", "<mask>", "ClockPhase", ")", "{", "C", ".", "gdk_frame_clock_request_phase", "(", "v", ".", "native", "(", ")", ",", "C", ".", "GdkFrameClockPhase", "(", "phase", ")", ")", "\n", "}" ]
22,099
all-22100
[ "GetType", "returns", "the", "Type", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "m", "*", "Monitor", ")", "GetType", "(", ")", "string", "{", "if", "m", "==", "nil", "||", "m", ".", "Type", "==", "nil", "{", "return", "\"", "\"", "\n", "}", "\n", "return", "*", "m", ".", "<mask>", "\n", "}" ]