id
int32
0
25.3k
idx
stringlengths
5
9
nl_tokens
listlengths
1
418
pl_tokens
listlengths
22
4.98k
22,600
all-22601
[ "Extract", "unique", "audit", "entries", "from", "the", "newly", "received", "list", "by", "comparing", "the", "href", "of", "audit", "entries", "in", "the", "old", "list", "." ]
[ "func", "extractUnique", "(", "oldEntries", ",", "newEntries", "[", "]", "*", "cm15", ".", "AuditEntry", ")", "[", "]", "*", "cm15", ".", "AuditEntry", "{", "var", "uniqueEntries", "=", "make", "(", "[", "]", "*", "cm15", ".", "AuditEntry", ",", "0", ...
22,601
all-22602
[ "produceKVs", "picks", "up", "ranges", "from", "rangeCh", "generates", "KV", "lists", "and", "sends", "them", "to", "kvChan", "." ]
[ "func", "(", "st", "*", "Stream", ")", "produceKVs", "(", "ctx", "context", ".", "Context", ")", "error", "{", "var", "size", "int", "\n", "var", "txn", "*", "Txn", "\n", "if", "st", ".", "readTs", ">", "0", "{", "txn", "=", "st", ".", "db", "....
22,602
all-22603
[ "TODO", "(", "jrick", ")", "Pangolayout", "/", "*", "func", "(", "v", "*", "Entry", ")", "GetLayout", "()", "{", "}", "GetLayoutOffsets", "()", "is", "a", "wrapper", "around", "gtk_entry_get_layout_offsets", "()", "." ]
[ "func", "(", "v", "*", "<mask>", ")", "GetLayoutOffsets", "(", ")", "(", "x", ",", "y", "int", ")", "{", "var", "gx", ",", "gy", "C", ".", "gint", "\n", "C", ".", "gtk_entry_get_layout_offsets", "(", "v", ".", "native", "(", ")", ",", "&", "gx", ...
22,603
all-22604
[ "WithAccuracy", "mock", "accuracy", "." ]
[ "func", "(", "p", "SetGeolocationOverrideParams", ")", "WithAccuracy", "(", "accuracy", "float64", ")", "*", "SetGeolocationOverrideParams", "{", "p", ".", "Accuracy", "=", "accuracy", "\n", "<mask>", "&", "p", "\n", "}" ]
22,604
all-22605
[ "sendHeartbeat", "sends", "a", "heartbeat", "RPC", "to", "the", "given", "peer", "." ]
[ "func", "(", "r", "*", "raft", ")", "sendHeartbeat", "(", "to", "uint64", ",", "ctx", "[", "]", "byte", ")", "{", "// Attach the commit as min(to.matched, r.committed).", "// When the leader sends out heartbeat message,", "// the receiver(follower) might not be matched with the...
22,605
all-22606
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "GetEventListenersParams", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "<mask>", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger9", "(", "&", "w", ",", "...
22,606
all-22607
[ "title", ":", "logout", "path", ":", "/", "users", "/", "tokens", "method", ":", "DELETE", "responses", ":", "200", ":", "Ok" ]
[ "func", "logout", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "<mask>", ",", "t", "auth", ".", "Token", ")", "(", "err", "error", ")", "{", "return", "app", ".", "AuthScheme", ".", "Logout", "(", "t", ".", "GetValue", "(", ...
22,607
all-22608
[ "Ask", "will", "call", "output", "with", "message", "then", "wait", "for", "Reader", "to", "print", "newline", "(", "\\", "n", ")", ".", "If", "Reader", "is", "os", ".", "Stdin", "then", "that", "is", "when", "ever", "a", "user", "presses", "[", "ent...
[ "func", "(", "ui", "*", "BasicUI", ")", "Ask", "(", "message", ",", "trim", "string", ")", "(", "string", ",", "error", ")", "{", "if", "<mask>", "!=", "\"", "\"", "{", "ui", ".", "Output", "(", "message", ")", "\n", "}", "\n", "reader", ":=", ...
22,608
all-22609
[ "AgentAfterChannelTopUp", "updates", "deposit", "of", "a", "channel", "." ]
[ "func", "(", "w", "*", "Worker", ")", "AgentAfterChannelTopUp", "(", "job", "*", "<mask>", ".", "Job", ")", "error", "{", "return", "w", ".", "afterChannelTopUp", "(", "job", ",", "data", ".", "JobAgentAfterChannelTopUp", ")", "\n", "}" ]
22,609
all-22610
[ "GetZpool", "retrieves", "a", "single", "ZFS", "zpool", "by", "name", "." ]
[ "func", "GetZpool", "(", "name", "string", ")", "(", "*", "Zpool", ",", "error", ")", "{", "args", ":=", "zpoolArgs", "\n", "args", "=", "append", "(", "args", ",", "name", ")", "\n", "out", ",", "err", ":=", "zpool", "(", "args", "...", ")", "\n...
22,610
all-22611
[ "GetQueryOk", "returns", "a", "tuple", "with", "the", "Query", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "l", "*", "LogStreamDefinition", ")", "GetQueryOk", "(", ")", "(", "string", ",", "bool", ")", "{", "if", "l", "==", "nil", "||", "l", ".", "Query", "==", "nil", "{", "return", "\"", "\"", ",", "false", "\n", "}", "\n", "return", "*"...
22,611
all-22612
[ "UpdateConfig", "updates", "the", "given", "keys", "in", "the", "given", "table", ".", "Config", "keys", "set", "to", "empty", "values", "will", "be", "deleted", "." ]
[ "func", "UpdateConfig", "(", "tx", "*", "sql", ".", "Tx", ",", "table", "string", ",", "values", "map", "[", "string", "]", "string", ")", "error", "{", "changes", ":=", "map", "[", "string", "]", "string", "{", "}", "\n", "deletes", ":=", "[", "]"...
22,612
all-22613
[ "--------------------------------------------------------------------", "Send", "a", "request", "to", "the", "broker", "to", "join", "group", "on", "rebalance", "()" ]
[ "func", "(", "c", "*", "Consumer", ")", "joinGroup", "(", ")", "(", "*", "balancer", ",", "error", ")", "{", "memberID", ",", "_", ":=", "c", ".", "membership", "(", ")", "\n", "req", ":=", "&", "sarama", ".", "JoinGroupRequest", "{", "GroupId", ":...
22,613
all-22614
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "SetEffectivePropertyValueForNodeParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss21", ...
22,614
all-22615
[ "Parse", "native", "names", "into", "go", "parameter", "names" ]
[ "func", "parseParamName", "(", "name", "string", ")", "string", "{", "if", "name", "==", "\"", "\"", "{", "return", "\"", "\"", "\n", "}", "\n", "if", "name", "==", "\"", "\"", "{", "return", "\"", "\"", "\n", "}", "\n", "if", "<mask>", "==", "\"...
22,615
all-22616
[ "GetClient", "creates", "the", "ECR", "SDK", "client", "based", "on", "the", "authdata" ]
[ "func", "(", "factory", "*", "ecrFactory", ")", "GetClient", "(", "authData", "*", "apicontainer", ".", "ECRAuthData", ")", "(", "ECRClient", ",", "error", ")", "{", "clientConfig", ",", "<mask>", ":=", "getClientConfig", "(", "factory", ".", "httpClient", "...
22,616
all-22617
[ "bind", "a", "range", "within", "a", "buffer", "object", "to", "an", "indexed", "buffer", "target" ]
[ "func", "BindBufferRange", "(", "target", "uint32", ",", "index", "uint32", ",", "buffer", "uint32", ",", "offset", "int", ",", "<mask>", "int", ")", "{", "C", ".", "glowBindBufferRange", "(", "gpBindBufferRange", ",", "(", "C", ".", "GLenum", ")", "(", ...
22,617
all-22618
[ "canRemove", "returns", "whether", "this", "peer", "can", "be", "safely", "removed", "from", "the", "root", "peer", "list", "." ]
[ "func", "(", "p", "*", "Peer", ")", "canRemove", "(", ")", "bool", "{", "p", ".", "RLock", "(", ")", "\n", "<mask>", ":=", "len", "(", "p", ".", "inboundConnections", ")", "+", "len", "(", "p", ".", "outboundConnections", ")", "+", "int", "(", "p...
22,618
all-22619
[ "Flush", "flushes", "the", "Client", "s", "buffer", "." ]
[ "func", "(", "c", "*", "Client", ")", "Flush", "(", ")", "{", "if", "c", ".", "muted", "{", "return", "\n", "}", "\n", "c", ".", "<mask>", ".", "mu", ".", "Lock", "(", ")", "\n", "c", ".", "conn", ".", "flush", "(", "0", ")", "\n", "c", "...
22,619
all-22620
[ "processCgoExported", "marks", "functions", "as", "used", "if", "they", "re", "being", "exported", "to", "cgo", "." ]
[ "func", "(", "c", "*", "Checker", ")", "processCgoExported", "(", "pkg", "*", "lint", ".", "Pkg", ",", "node", "ast", ".", "Node", ")", "{", "if", "node", ",", "ok", ":=", "node", ".", "(", "*", "ast", ".", "FuncDecl", ")", ";", "ok", "{", "if"...
22,620
all-22621
[ "String", "returns", "the", "name", "of", "e" ]
[ "func", "(", "e", "AccountMergeResultCode", ")", "<mask>", "(", ")", "string", "{", "name", ",", "_", ":=", "accountMergeResultCodeMap", "[", "int32", "(", "e", ")", "]", "\n", "return", "name", "\n", "}" ]
22,621
all-22622
[ "Do", "-" ]
[ "func", "(", "s", "*", "MockClientDoer", ")", "Do", "(", "rq", "*", "http", ".", "<mask>", ")", "(", "rs", "*", "http", ".", "Response", ",", "e", "error", ")", "{", "s", ".", "Req", "=", "rq", "\n", "rs", "=", "s", ".", "Res", "\n", "e", "...
22,622
all-22623
[ "GetName", "()", "is", "a", "wrapper", "around", "gdk_display_get_name", "()", "." ]
[ "func", "(", "v", "*", "Display", ")", "GetName", "(", ")", "(", "string", ",", "error", ")", "{", "c", ":=", "C", ".", "gdk_display_get_name", "(", "v", ".", "native", "(", ")", ")", "\n", "if", "c", "==", "nil", "{", "return", "\"", "\"", ","...
22,623
all-22624
[ "ReadResponse", "reads", "a", "server", "response", "into", "the", "received", "o", "." ]
[ "func", "(", "o", "*", "FindVmsByFiltersReader", ")", "ReadResponse", "(", "response", "runtime", ".", "ClientResponse", ",", "consumer", "runtime", ".", "Consumer", ")", "(", "interface", "{", "}", ",", "error", ")", "{", "switch", "response", ".", "Code", ...
22,624
all-22625
[ "GetIntegrationSlack", "gets", "all", "the", "Slack", "Integrations", "from", "the", "system", "." ]
[ "func", "(", "client", "*", "Client", ")", "GetIntegrationSlack", "(", ")", "(", "*", "IntegrationSlackRequest", ",", "error", ")", "{", "var", "out", "IntegrationSlackRequest", "\n", "if", "err", ":=", "client", ".", "doJsonRequest", "(", "\"", "\"", ",", ...
22,625
all-22626
[ "Cleanup", "performs", "resource", "cleanup" ]
[ "func", "(", "vol", "*", "VolumeResource", ")", "Cleanup", "(", ")", "error", "{", "// Enable volume clean up if it's task scoped", "if", "vol", ".", "VolumeConfig", ".", "Scope", "!=", "TaskScope", "{", "seelog", ".", "Debugf", "(", "\"", "\"", ",", "vol", ...
22,626
all-22627
[ "GetNameOk", "returns", "a", "tuple", "with", "the", "Name", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "m", "*", "Monitor", ")", "GetNameOk", "(", ")", "(", "string", ",", "bool", ")", "{", "if", "m", "==", "nil", "||", "m", ".", "Name", "==", "nil", "{", "return", "\"", "\"", ",", "false", "\n", "}", "\n", "return", "*", "m", "."...
22,627
all-22628
[ "IgnoreUnexported", "returns", "an", "Option", "that", "only", "ignores", "the", "immediate", "unexported", "fields", "of", "a", "struct", "including", "anonymous", "fields", "of", "unexported", "types", ".", "In", "particular", "unexported", "fields", "within", "...
[ "func", "IgnoreUnexported", "(", "typs", "...", "<mask>", "{", "}", ")", "cmp", ".", "Option", "{", "ux", ":=", "newUnexportedFilter", "(", "typs", "...", ")", "\n", "return", "cmp", ".", "FilterPath", "(", "ux", ".", "filter", ",", "cmp", ".", "Ignore...
22,628
all-22629
[ "loadLabels", "returns", "what", "labels", "exist", "in", "github" ]
[ "func", "loadLabels", "(", "gc", "client", ",", "org", "string", ",", "repos", "[", "]", "string", ")", "(", "*", "RepoLabels", ",", "error", ")", "{", "repoChan", ":=", "make", "(", "chan", "string", ",", "len", "(", "repos", ")", ")", "\n", "for"...
22,629
all-22630
[ "Equals", "reports", "whenever", "2", "peers", "are", "actually", "represent", "the", "same", "node", "." ]
[ "func", "(", "p", "*", "Peer", ")", "Equals", "(", "<mask>", "*", "Peer", ")", "bool", "{", "return", "p", ".", "Key", "==", "other", ".", "Key", "\n", "}" ]
22,630
all-22631
[ "NewMeasuredWriter", "wraps", "a", "writer", "." ]
[ "func", "NewMeasuredWriter", "(", "w", "io", ".", "<mask>", ")", "*", "MeasuredWriter", "{", "return", "&", "MeasuredWriter", "{", "wrap", ":", "w", ",", "rate", ":", "newCounter", "(", ")", "}", "\n", "}" ]
22,631
all-22632
[ "prop", "value", "enum" ]
[ "func", "(", "m", "*", "<mask>", ")", "validateTypeEnum", "(", "path", ",", "location", "string", ",", "value", "interface", "{", "}", ")", "error", "{", "if", "err", ":=", "validate", ".", "Enum", "(", "path", ",", "location", ",", "value", ",", "ro...
22,632
all-22633
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "SetDockTileParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser1", "(", "&", "r...
22,633
all-22634
[ "doImp", "actually", "performs", "the", "HTTP", "request", "logging", "according", "to", "the", "various", "settings", "." ]
[ "func", "(", "d", "*", "dumpClient", ")", "doImp", "(", "req", "*", "http", ".", "Request", ",", "hidden", "bool", ",", "ctx", "context", ".", "Context", ")", "(", "*", "http", ".", "Response", ",", "error", ")", "{", "if", "req", ".", "URL", "."...
22,634
all-22635
[ "transferLeadershipCommandFunc", "executes", "the", "compaction", "command", "." ]
[ "func", "transferLeadershipCommandFunc", "(", "cmd", "*", "cobra", ".", "Command", ",", "args", "[", "]", "string", ")", "{", "if", "len", "(", "args", ")", "!=", "1", "{", "ExitWithError", "(", "ExitBadArgs", ",", "fmt", ".", "Errorf", "(", "\"", "\""...
22,635
all-22636
[ "MustCreateAccountResult", "retrieves", "the", "CreateAccountResult", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
[ "func", "(", "u", "OperationResultTr", ")", "MustCreateAccountResult", "(", ")", "CreateAccountResult", "{", "val", ",", "ok", ":=", "u", ".", "GetCreateAccountResult", "(", ")", "\n\n", "if", "!", "<mask>", "{", "panic", "(", "\"", "\"", ")", "\n", "}", ...
22,636
all-22637
[ "Printf", "writes", "a", "formatted", "string", "to", "c", ".", "reportWriter", ".", "Note", "that", "the", "method", "name", "Printf", "is", "not", "entirely", "arbitrary", ":", "(", "go", "tool", "vet", ")", "has", "a", "built", "-", "in", "list", "o...
[ "func", "(", "c", "*", "copier", ")", "Printf", "(", "format", "string", ",", "a", "...", "interface", "{", "}", ")", "{", "fmt", ".", "Fprintf", "(", "c", ".", "reportWriter", ",", "<mask>", ",", "a", "...", ")", "\n", "}" ]
22,637
all-22638
[ "Subscriber", "create", "a", "Subscriber", "type", "from", "a", "MalingList", "with", "the", "given", "email", "and", "name" ]
[ "func", "(", "ml", "*", "MailingList", ")", "Subscriber", "(", "email", ",", "<mask>", "string", ")", "*", "Subscriber", "{", "return", "&", "Subscriber", "{", "MailingList", ":", "ml", ",", "Email", ":", "email", ",", "RealName", ":", "name", "}", "\n...
22,638
all-22639
[ "ActivateMnemonic", "is", "a", "wrapper", "around", "gtk_window_mnemonic_activate", "()", "." ]
[ "func", "(", "v", "*", "Window", ")", "ActivateMnemonic", "(", "keyval", "uint", ",", "<mask>", "gdk", ".", "ModifierType", ")", "bool", "{", "c", ":=", "C", ".", "gtk_window_mnemonic_activate", "(", "v", ".", "native", "(", ")", ",", "C", ".", "guint"...
22,639
all-22640
[ "WillRespondWith", "specifies", "the", "details", "of", "the", "HTTP", "response", "that", "will", "be", "used", "to", "confirm", "that", "the", "Provider", "must", "satisfy", ".", "Mandatory", "." ]
[ "func", "(", "i", "*", "Interaction", ")", "WillRespondWith", "(", "response", "<mask>", ")", "*", "Interaction", "{", "i", ".", "Response", "=", "response", "\n\n", "return", "i", "\n", "}" ]
22,640
all-22641
[ "Clear", "fills", "the", "current", "canvas", "with", "a", "default", "transparent", "color" ]
[ "func", "(", "gc", "*", "GraphicContext", ")", "Clear", "(", ")", "{", "width", ",", "<mask>", ":=", "gc", ".", "img", ".", "Bounds", "(", ")", ".", "Dx", "(", ")", ",", "gc", ".", "img", ".", "Bounds", "(", ")", ".", "Dy", "(", ")", "\n", ...
22,641
all-22642
[ "HasType", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "c", "*", "ChangeDefinition", ")", "HasType", "(", ")", "bool", "{", "if", "c", "!=", "nil", "&&", "c", ".", "<mask>", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
22,642
all-22643
[ "parseImageName", "parses", "a", "publisher", ":", "offer", ":", "sku", ":", "version", "into", "those", "parts", "." ]
[ "func", "parseImageName", "(", "image", "string", ")", "(", "imageName", ",", "error", ")", "{", "l", ":=", "strings", ".", "Split", "(", "<mask>", ",", "\"", "\"", ")", "\n", "if", "len", "(", "l", ")", "!=", "4", "{", "return", "imageName", "{", ...
22,643
all-22644
[ "InitializeOptions", "initializes", "the", "options", "." ]
[ "func", "InitializeOptions", "(", "opts", "*", "Options", ")", "*", "Options", "{", "if", "opts", "==", "nil", "{", "opts", "=", "&", "Options", "{", "}", "\n", "}", "\n\n", "if", "opts", ".", "Extension", "==", "\"", "\"", "{", "opts", ".", "Exten...
22,644
all-22645
[ "Facets", "returns", "the", "facets", "found", "within", "the", "search", "results", "if", "any", "facets", "were", "requested", "in", "the", "SearchOptions", "." ]
[ "func", "(", "t", "*", "Iterator", ")", "Facets", "(", ")", "(", "[", "]", "[", "]", "FacetResult", ",", "error", ")", "{", "t", ".", "fetchMore", "(", ")", "\n", "if", "t", ".", "err", "!=", "nil", "&&", "t", ".", "err", "!=", "Done", "{", ...
22,645
all-22646
[ "Sets", "text", "on", "the", "menu_item", "label" ]
[ "func", "(", "v", "*", "MenuItem", ")", "SetLabel", "(", "<mask>", "string", ")", "{", "cstr", ":=", "C", ".", "CString", "(", "label", ")", "\n", "defer", "C", ".", "free", "(", "unsafe", ".", "Pointer", "(", "cstr", ")", ")", "\n", "C", ".", ...
22,646
all-22647
[ "Check", "if", "the", "provided", "function", "is", "being", "called", "in", "the", "op", "options", "." ]
[ "func", "isOpFuncCalled", "(", "op", "string", ",", "opts", "[", "]", "OpOption", ")", "bool", "{", "for", "_", ",", "opt", ":=", "<mask>", "opts", "{", "v", ":=", "reflect", ".", "ValueOf", "(", "opt", ")", "\n", "if", "v", ".", "Kind", "(", ")"...
22,647
all-22648
[ "==", "Set", "system", "-", "wide", "variables", "Setsys", "sets", "the", "value", "of", "the", "environment", "variable", "named", "by", "the", "key", "that", "affects", "the", "system", "as", "a", "whole", ".", "You", "must", "be", "Root", ".", "It", ...
[ "func", "Setsys", "(", "key", ",", "value", "string", ")", "error", "{", "if", "!", "_IS_ROOT", "{", "return", "ErrNoRoot", "\n", "}", "\n", "return", "_Set", "(", "_SETTINGS", ".", "<mask>", ",", "key", ",", "value", ")", "\n", "}" ]
22,648
all-22649
[ "endpointsFromGatewayConfig", "extracts", "the", "endpoints", "from", "an", "Istio", "Gateway", "Config", "object" ]
[ "func", "(", "sc", "*", "gatewaySource", ")", "endpointsFromGatewayConfig", "(", "config", "istiomodel", ".", "Config", ")", "(", "[", "]", "*", "endpoint", ".", "Endpoint", ",", "error", ")", "{", "var", "endpoints", "[", "]", "*", "endpoint", ".", "End...
22,649
all-22650
[ "AccelMapSave", "is", "a", "wrapper", "around", "gtk_accel_map_save", "()", "." ]
[ "func", "AccelMapSave", "(", "fileName", "string", ")", "{", "cstr", ":=", "C", ".", "CString", "(", "fileName", ")", "\n", "defer", "C", ".", "<mask>", "(", "unsafe", ".", "Pointer", "(", "cstr", ")", ")", "\n\n", "C", ".", "gtk_accel_map_save", "(", ...
22,650
all-22651
[ "ParseScope", "parses", "the", "string", "s", "to", "a", "scope", "(", "for", "example", "parsing", "a", "command", "-", "line", "argument", "." ]
[ "func", "ParseScope", "(", "s", "string", ")", "(", "Scope", ",", "error", ")", "{", "for", "<mask>", ",", "value", ":=", "range", "Scope_value", "{", "if", "strings", ".", "EqualFold", "(", "s", ",", "name", ")", "{", "return", "Scope", "(", "value"...
22,651
all-22652
[ "WithPanicResponse", "sets", "a", "fixed", "body", "and", "its", "content", "type", "HTTP", "header", "that", "will", "be", "returned", "as", "HTTP", "response", "on", "panic", "event", ".", "If", "WithPanicResponseHandler", "is", "defined", "this", "options", ...
[ "func", "WithPanicResponse", "(", "<mask>", ",", "contentType", "string", ")", "Option", "{", "return", "func", "(", "o", "*", "Handler", ")", "{", "o", ".", "panicBody", "=", "body", "\n", "o", ".", "panicContentType", "=", "contentType", "\n", "}", "\n...
22,652
all-22653
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "AddRuleParams", ")", "UnmarshalJSON", "(", "<mask>", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss64", "(", "&", "r", ...
22,653
all-22654
[ "removeAll", "stops", "the", "periodic", "usage", "data", "collection", "for", "all", "containers" ]
[ "func", "(", "engine", "*", "DockerStatsEngine", ")", "removeAll", "(", ")", "{", "engine", ".", "lock", ".", "Lock", "(", ")", "\n", "defer", "engine", ".", "lock", ".", "Unlock", "(", ")", "\n\n", "for", "task", ",", "containers", ":=", "range", "<...
22,654
all-22655
[ "ConfigureQorResourceBeforeInitialize", "configure", "qor", "resource", "for", "qor", "admin" ]
[ "func", "(", "serialize", "*", "SerializableMeta", ")", "ConfigureQorResourceBeforeInitialize", "(", "res", "resource", ".", "Resourcer", ")", "{", "if", "res", ",", "ok", ":=", "res", ".", "(", "*", "admin", ".", "Resource", ")", ";", "ok", "{", "res", ...
22,655
all-22656
[ "Diff", "computes", "the", "difference", "between", "old", "and", "new", "according", "to", "the", "bsdiff", "algorithm", "and", "writes", "the", "result", "to", "patch", "." ]
[ "func", "Diff", "(", "<mask>", ",", "new", "io", ".", "Reader", ",", "patch", "io", ".", "Writer", ")", "error", "{", "obuf", ",", "err", ":=", "ioutil", ".", "ReadAll", "(", "old", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", "\n",...
22,656
all-22657
[ "NetworkUpdateCert", "updates", "the", "TLS", "keypair", "and", "CA", "used", "by", "the", "network", "endpoint", ".", "If", "the", "network", "endpoint", "is", "active", "in", "-", "flight", "requests", "will", "continue", "using", "the", "old", "certificate"...
[ "func", "(", "e", "*", "Endpoints", ")", "NetworkUpdateCert", "(", "cert", "*", "shared", ".", "CertInfo", ")", "{", "e", ".", "mu", ".", "Lock", "(", ")", "\n", "defer", "e", ".", "mu", ".", "Unlock", "(", ")", "\n", "e", ".", "cert", "=", "ce...
22,657
all-22658
[ "IsDone", "returns", "false", "while", "the", "iterator", "is", "valid", "and", "can", "produce", "another", "value", "via", "a", "call", "to", "Next", "()" ]
[ "func", "(", "it", "*", "inclusiveRangeIt", ")", "IsDone", "(", ")", "bool", "{", "if", "<mask>", ".", "pos", ">=", "it", ".", "ptr", ".", "Len", "(", ")", "{", "return", "true", "\n", "}", "\n", "return", "false", "\n", "}" ]
22,658
all-22659
[ "Set", "is", "required", "for", "kingpin", "interfaces", "to", "allow", "command", "line", "params", "to", "be", "set", "to", "our", "map", "datatype" ]
[ "func", "(", "o", "*", "MapBoolOption", ")", "<mask>", "(", "value", "string", ")", "error", "{", "parts", ":=", "stringMapRegex", ".", "Split", "(", "value", ",", "2", ")", "\n", "if", "len", "(", "parts", ")", "!=", "2", "{", "return", "fmt", "."...
22,659
all-22660
[ "set", "rasterization", "mode" ]
[ "func", "RenderMode", "(", "mode", "uint32", ")", "int32", "{", "ret", ",", "_", ",", "_", ":=", "syscall", ".", "Syscall", "(", "gpRenderMode", ",", "1", ",", "uintptr", "(", "<mask>", ")", ",", "0", ",", "0", ")", "\n", "return", "(", "int32", ...
22,660
all-22661
[ "getConfigPath", "returns", "the", "system", "-", "registries", "config", "path", "if", "specified", ".", "Otherwise", "systemRegistriesConfPath", "is", "returned", "." ]
[ "func", "getConfigPath", "(", "ctx", "*", "<mask>", ".", "SystemContext", ")", "string", "{", "confPath", ":=", "systemRegistriesConfPath", "\n", "if", "ctx", "!=", "nil", "{", "if", "ctx", ".", "SystemRegistriesConfPath", "!=", "\"", "\"", "{", "confPath", ...
22,661
all-22662
[ "makeChecks", "renders", "a", "ContextPolicy", "into", "the", "corresponding", "GitHub", "api", "object", ".", "Returns", "nil", "when", "input", "policy", "is", "nil", ".", "Otherwise", "returns", "non", "-", "nil", "Contexts", "(", "empty", "if", "unset", ...
[ "func", "makeChecks", "(", "cp", "*", "branchprotection", ".", "ContextPolicy", ")", "*", "github", ".", "RequiredStatusChecks", "{", "if", "cp", "==", "nil", "{", "return", "nil", "\n", "}", "\n", "return", "&", "github", ".", "RequiredStatusChecks", "{", ...
22,662
all-22663
[ "scratchFilePrefix", "returns", "an", "etcd", "prefix", "that", "s", "used", "to", "temporarily", "store", "the", "state", "of", "a", "file", "in", "an", "open", "commit", ".", "Once", "the", "commit", "is", "finished", "the", "scratch", "space", "is", "re...
[ "func", "(", "d", "*", "driver", ")", "scratchFilePrefix", "(", "file", "*", "pfs", ".", "File", ")", "(", "string", ",", "error", ")", "{", "return", "path", ".", "Join", "(", "d", ".", "scratchCommitPrefix", "(", "<mask>", ".", "Commit", ")", ",", ...
22,663
all-22664
[ "link", "is", "LINK", "from", "the", "papers", "." ]
[ "func", "(", "d", "*", "ltDom", ")", "<mask>", "(", "v", ",", "w", "vName", ")", "{", "d", ".", "ancestor", "[", "w", "]", "=", "v", "\n", "}" ]
22,664
all-22665
[ "Jump", "travels", "from", "a", "node", "from", "to", "another", "node", "to", "by", "following", "the", "path", "path", ".", "For", "example", "if", "the", "following", "keys", "were", "inserted", ":", "id", "key", "19", "abc", "23", "ab", "37", "abcd...
[ "func", "(", "da", "*", "Cedar", ")", "Jump", "(", "path", "[", "]", "byte", ",", "from", "int", ")", "(", "to", "int", ",", "err", "error", ")", "{", "for", "_", ",", "b", ":=", "range", "path", "{", "if", "da", ".", "Array", "[", "from", ...
22,665
all-22666
[ "FuncMap", "will", "return", "helper", "to", "render", "inline", "edit", "button" ]
[ "func", "(", "<mask>", "*", "ActionBar", ")", "FuncMap", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ")", "template", ".", "FuncMap", "{", "funcMap", ":=", "template", ".", "FuncMap", "{", "}", "\n\n", "funcMap", "["...
22,666
all-22667
[ "Name", "sets", "the", "name", "of", "the", "manager", "." ]
[ "func", "Name", "(", "n", "string", ")", "func", "(", "*", "<mask>", ")", "{", "return", "func", "(", "m", "*", "Manager", ")", "{", "m", ".", "mtx", ".", "Lock", "(", ")", "\n", "defer", "m", ".", "mtx", ".", "Unlock", "(", ")", "\n", "m", ...
22,667
all-22668
[ "applyConfChange", "applies", "a", "ConfChange", "to", "the", "server", ".", "It", "is", "only", "invoked", "with", "a", "ConfChange", "that", "has", "already", "passed", "through", "Raft" ]
[ "func", "(", "s", "*", "EtcdServer", ")", "applyConfChange", "(", "cc", "raftpb", ".", "ConfChange", ",", "confState", "*", "raftpb", ".", "ConfState", ")", "(", "bool", ",", "error", ")", "{", "if", "err", ":=", "s", ".", "cluster", ".", "ValidateConf...
22,668
all-22669
[ "SetTabLabel", "()", "is", "a", "wrapper", "around", "gtk_notebook_set_tab_label", "()", "." ]
[ "func", "(", "v", "*", "Notebook", ")", "SetTabLabel", "(", "<mask>", ",", "tabLabel", "IWidget", ")", "{", "C", ".", "gtk_notebook_set_tab_label", "(", "v", ".", "native", "(", ")", ",", "child", ".", "toWidget", "(", ")", ",", "tabLabel", ".", "toWid...
22,669
all-22670
[ "importBreakPaths", "returns", "a", "slice", "that", "contains", "the", "import", "paths", "before", "which", "a", "line", "breaks", "should", "be", "inserted", "." ]
[ "func", "importBreakPaths", "(", "file", "*", "ast", ".", "File", ")", "[", "]", "string", "{", "var", "output", "[", "]", "string", "\n\n", "for", "_", ",", "decl", ":=", "range", "file", ".", "Decls", "{", "if", "<mask>", ",", "ok", ":=", "decl",...
22,670
all-22671
[ "copy", "a", "three", "-", "dimensional", "texture", "subimage" ]
[ "func", "CopyTextureSubImage3D", "(", "texture", "uint32", ",", "level", "int32", ",", "xoffset", "int32", ",", "yoffset", "int32", ",", "zoffset", "int32", ",", "x", "int32", ",", "y", "int32", ",", "width", "int32", ",", "height", "int32", ")", "{", "C...
22,671
all-22672
[ "doJsonRequestUnredacted", "is", "the", "simplest", "type", "of", "request", ":", "a", "method", "on", "a", "URI", "that", "returns", "some", "JSON", "result", "which", "we", "unmarshal", "into", "the", "passed", "interface", "." ]
[ "func", "(", "client", "*", "Client", ")", "doJsonRequestUnredacted", "(", "method", ",", "api", "string", ",", "reqbody", ",", "out", "<mask>", "{", "}", ")", "error", "{", "req", ",", "err", ":=", "client", ".", "createRequest", "(", "method", ",", "...
22,672
all-22673
[ "New", "creates", "Cmp", "for", "single", "comparison", "mode", "." ]
[ "func", "New", "(", "buf", "[", "]", "byte", ",", "options", "<mask>", ")", "*", "Cmp", "{", "return", "NewMultiple", "(", "buf", ",", "options", ",", "nil", ",", "true", ")", "\n", "}" ]
22,673
all-22674
[ "Debugf", "logs", "at", "the", "DEBUG", "log", "level", "using", "a", "standard", "printf", "format", "string" ]
[ "func", "Debugf", "(", "format", "string", ",", "args", "...", "interface", "{", "}", ")", "{", "if", "Log", "!=", "nil", "{", "<mask>", ".", "Debug", "(", "fmt", ".", "Sprintf", "(", "format", ",", "args", "...", ")", ")", "\n", "}", "\n", "}" ]
22,674
all-22675
[ "MarshalJSON", "overrides", "the", "logic", "for", "JSON", "-", "encoding", "the", "ResourceStatus", "type" ]
[ "func", "(", "vs", "*", "VolumeStatus", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "if", "<mask>", "==", "nil", "{", "return", "nil", ",", "nil", "\n", "}", "\n", "return", "[", "]", "byte", "(", "`\"`", "+", "...
22,675
all-22676
[ "You", "can", "call", "this", "as", "many", "times", "as", "you", "d", "like", ".", "XXX", "TODO", "review" ]
[ "func", "(", "ri", "*", "randInfo", ")", "MixEntropy", "(", "seedBytes", "[", "]", "byte", ")", "{", "ri", ".", "mtx", ".", "Lock", "(", ")", "\n", "defer", "ri", ".", "mtx", ".", "Unlock", "(", ")", "\n", "// Make new ri.seedBytes using passed seedBytes...
22,676
all-22677
[ "SetLevelWriter", "sets", "writer", "to", "glg", "std", "writer", "per", "logging", "level" ]
[ "func", "(", "g", "*", "Glg", ")", "SetLevelWriter", "(", "level", "LEVEL", ",", "<mask>", "io", ".", "Writer", ")", "*", "Glg", "{", "if", "writer", "==", "nil", "{", "return", "g", "\n", "}", "\n\n", "lev", ",", "ok", ":=", "g", ".", "logger", ...
22,677
all-22678
[ "Distinct", "unmarshals", "into", "result", "the", "list", "of", "distinct", "values", "for", "the", "given", "key", ".", "For", "example", ":", "var", "result", "[]", "int", "err", ":", "=", "collection", ".", "Find", "(", "bson", ".", "M", "{", "gend...
[ "func", "(", "q", "*", "Query", ")", "Distinct", "(", "key", "string", ",", "result", "interface", "{", "}", ")", "error", "{", "q", ".", "m", ".", "Lock", "(", ")", "\n", "session", ":=", "q", ".", "session", "\n", "op", ":=", "q", ".", "op", ...
22,678
all-22679
[ "checkIsAuthorized", "returns", "an", "error", "if", "the", "current", "user", "(", "in", "pachClient", ")", "has", "authorization", "scope", "s", "for", "repo", "r" ]
[ "func", "(", "d", "*", "driver", ")", "checkIsAuthorized", "(", "pachClient", "*", "client", ".", "APIClient", ",", "r", "*", "pfs", ".", "Repo", ",", "s", "auth", ".", "Scope", ")", "error", "{", "ctx", ":=", "pachClient", ".", "Ctx", "(", ")", "\...
22,679
all-22680
[ "Enqueue", "will", "enqueue", "a", "job", "using", "the", "specified", "name", "and", "data", ".", "If", "a", "delay", "is", "specified", "the", "job", "will", "not", "be", "dequeued", "until", "the", "specified", "time", "has", "passed", "." ]
[ "func", "Enqueue", "(", "store", "*", "coal", ".", "SubStore", ",", "name", "string", ",", "data", "Model", ",", "delay", "time", ".", "Duration", ")", "(", "*", "Job", ",", "error", ")", "{", "// set default data", "if", "data", "==", "nil", "{", "d...
22,680
all-22681
[ "Delete", "deletes", "specified", "token", "from", "current", "SessionCache", "instance", "." ]
[ "func", "(", "s", "*", "SessionCache", ")", "Delete", "(", "token", "string", ")", "error", "{", "err", ":=", "s", ".", "cache", ".", "Delete", "(", "token", ")", "\n", "if", "err", "!=", "nil", "{", "return", "s", ".", "getInvalidTokenError", "(", ...
22,681
all-22682
[ "LastNLines", "reads", "the", "last", "n", "lines", "from", "an", "artifact", "." ]
[ "func", "LastNLines", "(", "a", "Artifact", ",", "n", "int64", ")", "(", "[", "]", "<mask>", ",", "error", ")", "{", "// 300B, a reasonable log line length, probably a bit more scalable than a hard-coded value", "return", "LastNLinesChunked", "(", "a", ",", "n", ",", ...
22,682
all-22683
[ "Run", "()", "is", "a", "wrapper", "around", "gtk_native_dialog_run", "()", "." ]
[ "func", "(", "v", "*", "NativeDialog", ")", "Run", "(", ")", "int", "{", "c", ":=", "C", ".", "gtk_native_dialog_run", "(", "v", ".", "native", "(", ")", ")", "\n", "<mask>", "int", "(", "c", ")", "\n", "}" ]
22,683
all-22684
[ "MarshalJSON", "calls", "json", ".", "RawMessage", "method", "of", "the", "same", "name", ".", "Required", "since", "Var3", "is", "of", "type", "json", ".", "RawMessage", "..." ]
[ "func", "(", "this", "*", "Var3", ")", "MarshalJSON", "(", ")", "(", "[", "]", "<mask>", ",", "error", ")", "{", "x", ":=", "json", ".", "RawMessage", "(", "*", "this", ")", "\n", "return", "(", "&", "x", ")", ".", "MarshalJSON", "(", ")", "\n"...
22,684
all-22685
[ "SetTrustline", "mutates", "key", "such", "that", "it", "represents", "the", "identity", "of", "the", "trustline", "owned", "by", "account", "and", "for", "asset", "." ]
[ "func", "(", "key", "*", "LedgerKey", ")", "SetTrustline", "(", "account", "AccountId", ",", "line", "Asset", ")", "error", "{", "data", ":=", "LedgerKeyTrustLine", "{", "account", ",", "<mask>", "}", "\n", "nkey", ",", "err", ":=", "NewLedgerKey", "(", ...
22,685
all-22686
[ "HasRoleName", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "i", "*", "IntegrationAWSAccountDeleteRequest", ")", "HasRoleName", "(", ")", "bool", "{", "if", "i", "!=", "nil", "&&", "i", ".", "RoleName", "!=", "nil", "{", "return", "<mask>", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
22,686
all-22687
[ "Header", "renders", "the", "content", "of", "<head", ">", "from", "template", ".", "html", "." ]
[ "func", "(", "lens", "Lens", ")", "Header", "(", "artifacts", "[", "]", "lenses", ".", "Artifact", ",", "resourceDir", "string", ")", "string", "{", "t", ",", "err", ":=", "template", ".", "ParseFiles", "(", "filepath", ".", "Join", "(", "resourceDir", ...
22,687
all-22688
[ "Set", "allows", "to", "set", "a", "list", "of", "values", "into", "a", "particular", "key", "." ]
[ "func", "(", "f", "Flash", ")", "<mask>", "(", "key", "string", ",", "values", "[", "]", "string", ")", "{", "f", ".", "data", "[", "key", "]", "=", "values", "\n", "}" ]
22,688
all-22689
[ "MarshalEasyJSON", "satisfies", "easyjson", ".", "Marshaler", "." ]
[ "func", "(", "t", "TimeSinceEpoch", ")", "MarshalEasyJSON", "(", "out", "*", "jwriter", ".", "Writer", ")", "{", "v", ":=", "float64", "(", "time", ".", "Time", "(", "t", ")", ".", "UnixNano", "(", ")", "/", "int64", "(", "time", ".", "Second", ")"...
22,689
all-22690
[ "WriteFile", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockIOUtil", ")", "WriteFile", "(", "arg0", "string", ",", "arg1", "[", "]", "byte", ",", "arg2", "os", ".", "FileMode", ")", "error", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg...
22,690
all-22691
[ "Do", "executes", "HeapProfiler", ".", "stopSampling", "against", "the", "provided", "context", ".", "returns", ":", "profile", "-", "Recorded", "sampling", "heap", "profile", "." ]
[ "func", "(", "p", "*", "StopSamplingParams", ")", "Do", "(", "ctx", "<mask>", ".", "Context", ")", "(", "profile", "*", "SamplingHeapProfile", ",", "err", "error", ")", "{", "// execute", "var", "res", "StopSamplingReturns", "\n", "err", "=", "cdp", ".", ...
22,691
all-22692
[ "GenerateQuery", "generates", "a", "query", "by", "substituting", "the", "specified", "bindVariables", ".", "The", "extras", "parameter", "specifies", "special", "parameters", "that", "can", "perform", "custom", "encoding", "." ]
[ "func", "(", "pq", "*", "ParsedQuery", ")", "GenerateQuery", "(", "bindVariables", "map", "[", "string", "]", "*", "querypb", ".", "BindVariable", ",", "extras", "map", "[", "string", "]", "Encodable", ")", "(", "[", "]", "byte", ",", "error", ")", "{"...
22,692
all-22693
[ "String", "satisfies", "stringer", "interface", "." ]
[ "func", "(", "fs", "FrameState", ")", "<mask>", "(", ")", "string", "{", "var", "s", "[", "]", "string", "\n", "for", "k", ",", "v", ":=", "range", "frameStateNames", "{", "if", "fs", "&", "k", "!=", "0", "{", "s", "=", "append", "(", "s", ",",...
22,693
all-22694
[ "Return", "a", "Transport", "object", "that", "defaults", "to", "using", "the", "same", "store", "that", "we", "used", "to", "build", "this", "reference", "object", "." ]
[ "func", "(", "s", "storageReference", ")", "Transport", "(", ")", "types", ".", "ImageTransport", "{", "return", "&", "storageTransport", "{", "<mask>", ":", "s", ".", "transport", ".", "store", ",", "defaultUIDMap", ":", "s", ".", "transport", ".", "defau...
22,694
all-22695
[ "Finds", "a", "Func", "for", "the", "given", "address", ".", "Sort", "must", "have", "been", "called", "already", "." ]
[ "func", "(", "t", "*", "funcTab", ")", "find", "(", "pc", "core", ".", "Address", ")", "*", "Func", "{", "n", ":=", "sort", ".", "Search", "(", "len", "(", "t", ".", "entries", ")", ",", "func", "(", "i", "int", ")", "bool", "{", "return", "t...
22,695
all-22696
[ "Write", "a", "marker", "file", "to", "GCS", "named", "after", "this", "node", "to", "indicate", "logexporter", "s", "success", ".", "The", "directory", "to", "which", "we", "write", "this", "file", "can", "then", "be", "used", "as", "a", "registry", "to...
[ "func", "writeSuccessMarkerFile", "(", ")", "error", "{", "markerFilePath", ":=", "*", "gcsPath", "+", "\"", "\"", "+", "*", "nodeName", "+", "\"", "\"", "\n", "cmd", ":=", "<mask>", ".", "Command", "(", "\"", "\"", ",", "\"", "\"", ",", "\"", "\"", ...
22,696
all-22697
[ "chooseContainerToRemove", "finds", "a", "container", "from", "the", "the", "node", "with", "maximum", "number", "of", "containers", "and", "returns", "it" ]
[ "func", "(", "s", "*", "segregatedScheduler", ")", "chooseContainerToRemove", "(", "nodes", "[", "]", "cluster", ".", "Node", ",", "appName", ",", "process", "string", ")", "(", "string", ",", "error", ")", "{", "_", ",", "chosenNode", ",", "err", ":=", ...
22,697
all-22698
[ "GetXOk", "returns", "a", "tuple", "with", "the", "X", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "w", "*", "Widget", ")", "GetXOk", "(", ")", "(", "int", ",", "bool", ")", "{", "if", "w", "==", "nil", "||", "w", ".", "X", "==", "nil", "{", "return", "0", ",", "false", "\n", "}", "\n", "return", "*", "w", ".", "X", ",", "...
22,698
all-22699
[ "GetResourcePolicyWithContext", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockSecretsManagerAPI", ")", "GetResourcePolicyWithContext", "(", "arg0", "aws", ".", "Context", ",", "arg1", "*", "secretsmanager", ".", "GetResourcePolicyInput", ",", "arg2", "...", "request", ".", "Option", ")", "(", "*", "secretsmanag...
22,699
all-22700
[ "NewDataReadWriteSeeker", "returns", "a", "new", "callback", "based", "data", "buffer" ]
[ "func", "NewDataReadWriteSeeker", "(", "rw", "io", ".", "ReadWriteSeeker", ")", "(", "*", "Data", ",", "error", ")", "{", "d", ":=", "newData", "(", ")", "\n", "d", ".", "r", "=", "rw", "\n", "d", ".", "w", "=", "rw", "\n", "d", ".", "s", "=", ...