id
int32
0
25.3k
idx
stringlengths
5
9
nl_tokens
listlengths
1
418
pl_tokens
listlengths
22
4.98k
23,100
all-23101
[ "SauceLabs", "opens", "a", "Sauce", "Labs", "session", "and", "returns", "a", "*", "Page", ".", "Does", "not", "support", "Sauce", "Connect", ".", "This", "method", "takes", "the", "same", "Options", "as", "NewPage", ".", "Passing", "the", "Desired", "Opti...
[ "func", "SauceLabs", "(", "name", ",", "platform", ",", "browser", ",", "version", ",", "username", ",", "accessKey", "string", ",", "options", "...", "Option", ")", "(", "*", "Page", ",", "error", ")", "{", "url", ":=", "fmt", ".", "Sprintf", "(", "...
23,101
all-23102
[ "Objects", "returns", "all", "known", "objects", "named", "as", "well", "as", "unnamed", ".", "The", "returned", "elements", "are", "not", "in", "a", "stable", "order", "." ]
[ "func", "(", "g", "*", "Graph", ")", "Objects", "(", ")", "[", "]", "*", "Object", "{", "objects", ":=", "make", "(", "[", "]", "*", "Object", ",", "0", ",", "len", "(", "g", ".", "unnamed", ")", "+", "len", "(", "g", ".", "named", ")", ")"...
23,102
all-23103
[ "Fetch", "retrieves", "this", "dependency", "and", "returns", "the", "result", "or", "any", "errors", "that", "occur", "in", "the", "process", "." ]
[ "func", "(", "d", "*", "FileQuery", ")", "Fetch", "(", "clients", "*", "ClientSet", ",", "opts", "*", "QueryOptions", ")", "(", "interface", "{", "}", ",", "*", "ResponseMetadata", ",", "error", ")", "{", "log", ".", "Printf", "(", "\"", "\"", ",", ...
23,103
all-23104
[ "newBruteRanger", "returns", "a", "new", "Ranger", "." ]
[ "func", "newBruteRanger", "(", ")", "Ranger", "{", "return", "&", "bruteRanger", "{", "ipV4Entries", ":", "<mask>", "(", "map", "[", "string", "]", "RangerEntry", ")", ",", "ipV6Entries", ":", "make", "(", "map", "[", "string", "]", "RangerEntry", ")", "...
23,104
all-23105
[ "processNextItem", "attempts", "to", "upload", "container", "logs", "to", "GCS" ]
[ "func", "(", "c", "*", "Controller", ")", "processNextItem", "(", ")", "bool", "{", "key", ",", "quit", ":=", "c", ".", "queue", ".", "Get", "(", ")", "\n", "if", "quit", "{", "return", "false", "\n", "}", "\n", "defer", "c", ".", "queue", ".", ...
23,105
all-23106
[ "Fill", "extra", "image", "fields", "such", "as", "properties", "and", "alias", ".", "This", "is", "called", "after", "fetching", "a", "single", "row", "from", "the", "images", "table", "." ]
[ "func", "(", "c", "*", "Cluster", ")", "imageFill", "(", "id", "int", ",", "image", "*", "api", ".", "Image", ",", "create", ",", "expire", ",", "used", ",", "upload", "*", "time", ".", "Time", ",", "arch", "int", ")", "error", "{", "// Some of the...
23,106
all-23107
[ "gValueSlice", "converts", "a", "C", "array", "of", "GValues", "to", "a", "Go", "slice", "." ]
[ "func", "gValueSlice", "(", "values", "*", "C", ".", "GValue", ",", "nValues", "int", ")", "(", "slice", "[", "]", "C", ".", "GValue", ")", "{", "<mask>", ":=", "(", "*", "reflect", ".", "SliceHeader", ")", "(", "(", "unsafe", ".", "Pointer", "(", ...
23,107
all-23108
[ "GetMonitorWidthMM", "is", "a", "wrapper", "around", "gdk_screen_get_monitor_width_mm", "()", "." ]
[ "func", "(", "v", "*", "Screen", ")", "GetMonitorWidthMM", "(", "m", "int", ")", "int", "{", "<mask>", "int", "(", "C", ".", "gdk_screen_get_monitor_width_mm", "(", "v", ".", "native", "(", ")", ",", "C", ".", "gint", "(", "m", ")", ")", ")", "\n",...
23,108
all-23109
[ "Logging", "logs", "http", "requests" ]
[ "func", "Logging", "(", "next", "http", ".", "Handler", ",", "log", "*", "logrus", ".", "Logger", ")", "http", ".", "Handler", "{", "return", "http", ".", "HandlerFunc", "(", "func", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", "."...
23,109
all-23110
[ "setEvaluationTimestamp", "updates", "evaluationTimestamp", "to", "the", "timestamp", "of", "when", "the", "rule", "group", "was", "last", "evaluated", "." ]
[ "func", "(", "g", "*", "Group", ")", "setEvaluationTimestamp", "(", "<mask>", "time", ".", "Time", ")", "{", "g", ".", "metrics", ".", "groupLastEvalTime", ".", "WithLabelValues", "(", "groupKey", "(", "g", ".", "file", ",", "g", ".", "name", ")", ")",...
23,110
all-23111
[ "MustV0", "retrieves", "the", "V0", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
[ "func", "(", "u", "ScpHistoryEntry", ")", "MustV0", "(", ")", "ScpHistoryEntryV0", "{", "val", ",", "<mask>", ":=", "u", ".", "GetV0", "(", ")", "\n\n", "if", "!", "ok", "{", "panic", "(", "\"", "\"", ")", "\n", "}", "\n\n", "return", "val", "\n", ...
23,111
all-23112
[ "Deal", "with", "the", "login", "request", "." ]
[ "func", "(", "c", "*", "Client", ")", "loginHandler", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ")", "{", "username", ":=", "r", ".", "FormValue", "(", "\"", "\"", ")", "\n", "password", ":=", "r", ".", "FormVa...
23,112
all-23113
[ "Do", "executes", "Debugger", ".", "setBlackboxPatterns", "against", "the", "provided", "context", "." ]
[ "func", "(", "p", "*", "SetBlackboxPatternsParams", ")", "Do", "(", "ctx", "context", ".", "<mask>", ")", "(", "err", "error", ")", "{", "return", "cdp", ".", "Execute", "(", "ctx", ",", "CommandSetBlackboxPatterns", ",", "p", ",", "nil", ")", "\n", "}...
23,113
all-23114
[ "ColorButtonNewWithRGBA", "is", "a", "wrapper", "around", "gtk_color_button_new_with_rgba", "()", "." ]
[ "func", "ColorButtonNewWithRGBA", "(", "gdkColor", "*", "gdk", ".", "RGBA", ")", "(", "*", "ColorButton", ",", "<mask>", ")", "{", "c", ":=", "C", ".", "gtk_color_button_new_with_rgba", "(", "(", "*", "C", ".", "GdkRGBA", ")", "(", "unsafe", ".", "Pointe...
23,114
all-23115
[ "SetDraw", "is", "a", "wrapper", "around", "gtk_separator_tool_item_set_draw", "()", "." ]
[ "func", "(", "v", "*", "SeparatorToolItem", ")", "SetDraw", "(", "draw", "bool", ")", "{", "C", ".", "gtk_separator_tool_item_set_draw", "(", "v", ".", "native", "(", ")", ",", "gbool", "(", "<mask>", ")", ")", "\n", "}" ]
23,115
all-23116
[ "Critical", "formats", "message", "using", "the", "default", "formats", "for", "its", "operands", "prepends", "the", "prefix", "as", "necessary", "and", "writes", "to", "log", "with", "LevelCritical", ".", "This", "is", "part", "of", "the", "Logger", "interfac...
[ "func", "(", "l", "*", "slog", ")", "Critical", "(", "args", "...", "interface", "{", "}", ")", "{", "lvl", ":=", "l", ".", "Level", "(", ")", "\n", "if", "lvl", "<=", "LevelCritical", "{", "l", ".", "b", ".", "<mask>", "(", "\"", "\"", ",", ...
23,116
all-23117
[ "MustData", "retrieves", "the", "Data", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
[ "func", "(", "u", "LedgerKey", ")", "MustData", "(", ")", "LedgerKeyData", "{", "val", ",", "<mask>", ":=", "u", ".", "GetData", "(", ")", "\n\n", "if", "!", "ok", "{", "panic", "(", "\"", "\"", ")", "\n", "}", "\n\n", "return", "val", "\n", "}" ...
23,117
all-23118
[ "AddGauge", "adds", "value", "to", "existing", "gauge" ]
[ "func", "(", "m", "*", "CirconusMetrics", ")", "AddGauge", "(", "metric", "string", ",", "val", "interface", "{", "}", ")", "{", "m", ".", "gm", ".", "Lock", "(", ")", "\n", "defer", "m", ".", "gm", ".", "Unlock", "(", ")", "\n\n", "v", ",", "o...
23,118
all-23119
[ "WithDefaults", "patches", "a", "http", ".", "Server", "based", "on", "a", "best", "practice", "configuration", "from", "Cloudflare", ":", "https", ":", "//", "blog", ".", "cloudflare", ".", "com", "/", "exposing", "-", "go", "-", "on", "-", "the", "-", ...
[ "func", "WithDefaults", "(", "srv", "*", "http", ".", "Server", ")", "*", "http", ".", "<mask>", "{", "if", "srv", ".", "TLSConfig", "==", "nil", "{", "srv", ".", "TLSConfig", "=", "&", "tls", ".", "Config", "{", "}", "\n", "}", "\n\n", "srv", "....
23,119
all-23120
[ "calculateLBA", "calculates", "a", "logical", "block", "address", "from", "the", "LBA", "array", "and", "48", "-", "bit", "flags", "from", "an", "ATAArg", "." ]
[ "func", "calculateLBA", "(", "rlba", "[", "6", "]", "uint8", ",", "is48Bit", "bool", ")", "int64", "{", "// Pad two bytes at the end to parse as uint64", "b", ":=", "[", "]", "<mask>", "{", "rlba", "[", "0", "]", ",", "rlba", "[", "1", "]", ",", "rlba", ...
23,120
all-23121
[ "UnmarshalJSON", "sets", "the", "Base64", "from", "JSON" ]
[ "func", "(", "b", "*", "Base64", ")", "UnmarshalJSON", "(", "<mask>", "[", "]", "byte", ")", "error", "{", "l", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "b", ".", "UnmarshalEasyJSON", "(", "&", "l", ")", "\n", "return", ...
23,121
all-23122
[ "title", ":", "user", "create", "path", ":", "/", "users", "method", ":", "POST", "consume", ":", "application", "/", "x", "-", "www", "-", "form", "-", "urlencoded", "responses", ":", "201", ":", "User", "created", "400", ":", "Invalid", "data", "401"...
[ "func", "createUser", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ")", "error", "{", "registrationEnabled", ",", "_", ":=", "config", ".", "GetBool", "(", "\"", "\"", ")", "\n", "if", "!", "registrationEnabled", "{", ...
23,122
all-23123
[ "MarshalJSON", "returns", "the", "Base64", "as", "JSON" ]
[ "func", "(", "b", "Base64", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "<mask>", "w", "jwriter", ".", "Writer", "\n", "b", ".", "MarshalEasyJSON", "(", "&", "w", ")", "\n", "return", "w", ".", "BuildBytes", "(", ...
23,123
all-23124
[ "StdinPipe", "returns", "a", "pipe", "that", "will", "be", "connected", "to", "the", "command", "s", "standard", "input", "when", "the", "command", "starts", ".", "The", "pipe", "will", "be", "closed", "automatically", "after", "Wait", "sees", "the", "comman...
[ "func", "(", "c", "*", "Cmd", ")", "StdinPipe", "(", ")", "(", "io", ".", "WriteCloser", ",", "error", ")", "{", "if", "c", ".", "Stdin", "!=", "nil", "{", "return", "nil", ",", "errors", ".", "New", "(", "\"", "\"", ")", "\n", "}", "\n", "if...
23,124
all-23125
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "ComputedProperty", ")", "UnmarshalJSON", "(", "data", "[", "]", "<mask>", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss60", "(", "&", "r",...
23,125
all-23126
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "UnregisterParams", ")", "UnmarshalJSON", "(", "<mask>", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker2", "(", "&...
23,126
all-23127
[ "SetParams", "sets", "value", "of", "param", "with", "given", "name", "." ]
[ "func", "(", "ctx", "*", "Context", ")", "SetParams", "(", "<mask>", ",", "val", "string", ")", "{", "if", "name", "!=", "\"", "\"", "&&", "!", "strings", ".", "HasPrefix", "(", "name", ",", "\"", "\"", ")", "{", "name", "=", "\"", "\"", "+", "...
23,127
all-23128
[ "ListTasks", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockTaskEngine", ")", "ListTasks", "(", ")", "(", "[", "]", "*", "<mask>", ".", "Task", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ")", "\n", "ret0", ",", "_", ":=", ...
23,128
all-23129
[ "MutateChangeTrust", "for", "Limit", "sets", "the", "ChangeTrustOp", "s", "Limit", "field" ]
[ "func", "(", "m", "Limit", ")", "MutateChangeTrust", "(", "o", "*", "xdr", ".", "ChangeTrustOp", ")", "(", "err", "error", ")", "{", "o", ".", "Limit", ",", "err", "=", "<mask>", ".", "Parse", "(", "string", "(", "m", ")", ")", "\n", "return", "\...
23,129
all-23130
[ "BToken", "generates", "an", "array", "of", "random", "bytes", "with", "length", "as", "specified", "by", "size", "parameter", "." ]
[ "func", "(", "self", "*", "Salter", ")", "BToken", "(", "size", "int", ")", "[", "]", "byte", "{", "mac", ":=", "hmac", ".", "New", "(", "sha256", ".", "New", ",", "self", ".", "salt", ")", "\n\n", "for", "_", ",", "v", ":=", "<mask>", "self", ...
23,130
all-23131
[ "NewHandler", "creates", "a", "ControllerHandler", "from", "the", "factory", "and", "methodName" ]
[ "func", "NewHandler", "(", "factory", "ControllerFactoryFunc", ",", "methodName", "string", ")", "ControllerHandler", "{", "handler", ":=", "ControllerHandler", "{", "factory", ":", "factory", ",", "methodName", ":", "methodName", "}", "\n", "if", "!", "handler", ...
23,131
all-23132
[ "GetWebsite", "is", "a", "wrapper", "around", "gtk_about_dialog_get_website", "()", "." ]
[ "func", "(", "v", "*", "AboutDialog", ")", "GetWebsite", "(", ")", "string", "{", "c", ":=", "C", ".", "gtk_about_dialog_get_website", "(", "v", ".", "native", "(", ")", ")", "\n", "return", "C", ".", "GoString", "(", "(", "*", "C", ".", "<mask>", ...
23,132
all-23133
[ "Flush", "any", "changes", "made", "to", "hosts", "file", "." ]
[ "func", "(", "h", "Hosts", ")", "Flush", "(", ")", "error", "{", "file", ",", "err", ":=", "<mask>", ".", "Create", "(", "h", ".", "Path", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\n\n", "w", ":=", "bufio", ".", ...
23,133
all-23134
[ "Run", "executes", "the", "trace", "behavior" ]
[ "func", "(", "b", "*", "Behavior", ")", "Run", "(", "t", "crossdock", ".", "T", ")", "{", "logParams", "(", "t", ")", "\n", "sampled", ",", "err", ":=", "strconv", ".", "ParseBool", "(", "t", ".", "Param", "(", "sampledParam", ")", ")", "\n", "if...
23,134
all-23135
[ "Do", "executes", "DeviceOrientation", ".", "setDeviceOrientationOverride", "against", "the", "provided", "context", "." ]
[ "func", "(", "p", "*", "SetDeviceOrientationOverrideParams", ")", "Do", "(", "ctx", "<mask>", ".", "Context", ")", "(", "err", "error", ")", "{", "return", "cdp", ".", "Execute", "(", "ctx", ",", "CommandSetDeviceOrientationOverride", ",", "p", ",", "nil", ...
23,135
all-23136
[ "UpdateProfile", "updates", "the", "profile", "to", "match", "the", "provided", "Profile", "struct" ]
[ "func", "(", "r", "*", "ProtocolLXD", ")", "UpdateProfile", "(", "<mask>", "string", ",", "profile", "api", ".", "ProfilePut", ",", "ETag", "string", ")", "error", "{", "// Send the request", "_", ",", "_", ",", "err", ":=", "r", ".", "query", "(", "\"...
23,136
all-23137
[ "GetPayouts", "retrieves", "the", "Payouts", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
[ "func", "(", "u", "InflationResult", ")", "GetPayouts", "(", ")", "(", "result", "[", "]", "InflationPayout", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Code", ")", ")", "\n\n", "...
23,137
all-23138
[ "Run", "executes", "the", "rule", "into", "a", "content", "to", "find", "all", "lines", "that", "matches", "it", "." ]
[ "func", "(", "r", "*", "Rule", ")", "Run", "(", "content", "[", "]", "byte", ")", "[", "]", "RunResult", "{", "var", "results", "[", "]", "RunResult", "\n\n", "b", ":=", "bufio", ".", "NewScanner", "(", "bytes", ".", "NewReader", "(", "content", ")...
23,138
all-23139
[ "Do", "executes", "Target", ".", "setAutoAttach", "against", "the", "provided", "context", "." ]
[ "func", "(", "p", "*", "SetAutoAttachParams", ")", "Do", "(", "ctx", "context", ".", "<mask>", ")", "(", "err", "error", ")", "{", "return", "cdp", ".", "Execute", "(", "ctx", ",", "CommandSetAutoAttach", ",", "p", ",", "nil", ")", "\n", "}" ]
23,139
all-23140
[ "WithProviders", "allows", "specifying", "your", "own", "set", "of", "providers", "." ]
[ "func", "WithProviders", "(", "m", "map", "[", "string", "]", "<mask>", ")", "Option", "{", "return", "func", "(", "d", "*", "Discover", ")", "error", "{", "d", ".", "Providers", "=", "m", "\n", "return", "nil", "\n", "}", "\n", "}" ]
23,140
all-23141
[ "same", "with", "Error", "()" ]
[ "func", "(", "f", "*", "FileLogger", ")", "E", "(", "format", "string", ",", "v", "...", "<mask>", "{", "}", ")", "{", "f", ".", "Error", "(", "format", ",", "v", "...", ")", "\n", "}" ]
23,141
all-23142
[ "setExtends", "will", "set", "the", "ExtendsService", "for", "all", "services", ".", "It", "is", "done", "after", "all", "files", "are", "parsed", "as", "services", "may", "extend", "those", "found", "in", "an", "included", "file", "." ]
[ "func", "setExtends", "(", "state", "map", "[", "string", "]", "parseState", ")", "error", "{", "for", "_", ",", "v", ":=", "range", "state", "{", "for", "_", ",", "s", ":=", "range", "v", ".", "services", "{", "if", "s", ".", "Extends", "==", "\...
23,142
all-23143
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "StopTrackingHeapObjectsParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler1", ...
23,143
all-23144
[ "Update", "the", "min", "and", "max", "fields", "if", "value", "is", "less", "than", "or", "greater", "than", "the", "current", "min", "/", "max", "value", "." ]
[ "func", "(", "histogram", "*", "histogramData", ")", "Update", "(", "value", "int64", ")", "{", "if", "value", ">", "histogram", ".", "max", "{", "histogram", ".", "max", "=", "value", "\n", "}", "\n", "if", "value", "<", "histogram", ".", "min", "{"...
23,144
all-23145
[ "MiddlewareFunc", "makes", "PoweredByMiddleware", "implement", "the", "Middleware", "interface", "." ]
[ "func", "(", "mw", "*", "PoweredByMiddleware", ")", "MiddlewareFunc", "(", "h", "HandlerFunc", ")", "HandlerFunc", "{", "poweredBy", ":=", "xPoweredByDefault", "\n", "if", "mw", ".", "XPoweredBy", "!=", "\"", "\"", "{", "poweredBy", "=", "mw", ".", "XPowered...
23,145
all-23146
[ "WithQuery", "requested", "substring", "in", "name", ".", "Only", "histograms", "which", "have", "query", "as", "a", "substring", "in", "their", "name", "are", "extracted", ".", "An", "empty", "or", "absent", "query", "returns", "all", "histograms", "." ]
[ "func", "(", "p", "GetHistogramsParams", ")", "WithQuery", "(", "<mask>", "string", ")", "*", "GetHistogramsParams", "{", "p", ".", "Query", "=", "query", "\n", "return", "&", "p", "\n", "}" ]
23,146
all-23147
[ "Warnf", "outputs", "formatted", "Warn", "level", "log" ]
[ "func", "(", "g", "*", "Glg", ")", "Warnf", "(", "format", "string", ",", "val", "...", "interface", "{", "}", ")", "error", "{", "return", "g", ".", "out", "(", "WARN", ",", "<mask>", ",", "val", "...", ")", "\n", "}" ]
23,147
all-23148
[ "ReadUint32", "returns", "the", "next", "value", "in", "the", "buffer", "as", "a", "uint32" ]
[ "func", "(", "r", "*", "ReadBuffer", ")", "ReadUint32", "(", ")", "uint32", "{", "if", "b", ":=", "r", ".", "ReadBytes", "(", "4", ")", ";", "b", "!=", "nil", "{", "return", "<mask>", ".", "BigEndian", ".", "Uint32", "(", "b", ")", "\n", "}", "...
23,148
all-23149
[ "GetYAlign", "is", "a", "wrapper", "around", "gtk_label_get_yalign", "()", "." ]
[ "func", "(", "v", "*", "<mask>", ")", "GetYAlign", "(", ")", "float64", "{", "c", ":=", "C", ".", "gtk_label_get_yalign", "(", "v", ".", "native", "(", ")", ")", "\n", "return", "float64", "(", "c", ")", "\n", "}" ]
23,149
all-23150
[ "GetShare", "gets", "a", "share" ]
[ "func", "(", "c", "*", "Client", ")", "GetShare", "(", "groupid", "string", ",", "resourceid", "string", ")", "(", "*", "Share", ",", "error", ")", "{", "url", ":=", "umGroupSharePath", "(", "groupid", ",", "resourceid", ")", "+", "`?depth=`", "+", "c"...
23,150
all-23151
[ "==", "Locking", "LockUser", "locks", "the", "passwd", "of", "the", "given", "user", "." ]
[ "func", "LockUser", "(", "name", "string", ")", "error", "{", "shadow", ",", "err", ":=", "LookupShadow", "(", "name", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\n\n", "if", "shadow", ".", "<mask>", "[", "0", "]", "!=",...
23,151
all-23152
[ "DoneMany", "works", "like", "Done", "but", "accepts", "multiple", "indices", "." ]
[ "func", "(", "w", "*", "WaterMark", ")", "DoneMany", "(", "indices", "[", "]", "uint64", ")", "{", "w", ".", "markCh", "<-", "<mask>", "{", "index", ":", "0", ",", "indices", ":", "indices", ",", "done", ":", "true", "}", "\n", "}" ]
23,152
all-23153
[ "controls", "feedback", "mode" ]
[ "func", "FeedbackBuffer", "(", "size", "int32", ",", "xtype", "uint32", ",", "<mask>", "*", "float32", ")", "{", "syscall", ".", "Syscall", "(", "gpFeedbackBuffer", ",", "3", ",", "uintptr", "(", "size", ")", ",", "uintptr", "(", "xtype", ")", ",", "ui...
23,153
all-23154
[ "NewSetHeadersHandler", "sets", "provied", "headers", "on", "HTTP", "response", "." ]
[ "func", "NewSetHeadersHandler", "(", "h", "http", ".", "Handler", ",", "headers", "map", "[", "string", "]", "string", ")", "http", ".", "Handler", "{", "return", "http", ".", "HandlerFunc", "(", "func", "(", "w", "http", ".", "ResponseWriter", ",", "r",...
23,154
all-23155
[ "RestoreSecretWithContext", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockSecretsManagerAPI", ")", "RestoreSecretWithContext", "(", "arg0", "aws", ".", "Context", ",", "arg1", "*", "secretsmanager", ".", "RestoreSecretInput", ",", "arg2", "...", "request", ".", "Option", ")", "(", "*", "secretsmanager", "...
23,155
all-23156
[ "SetMaxRetryDelay", "sets", "the", "maximum", "duration", "that", "automatically", "reconnecting", "methods", "on", "c", "(", "e", ".", "g", ".", "Firehose", "Stream", "TailingLogs", ")", "will", "sleep", "for", "after", "receiving", "many", "successive", "error...
[ "func", "(", "c", "*", "<mask>", ")", "SetMaxRetryDelay", "(", "d", "time", ".", "Duration", ")", "{", "atomic", ".", "StoreInt64", "(", "&", "c", ".", "maxRetryDelay", ",", "int64", "(", "d", ")", ")", "\n", "}" ]
23,156
all-23157
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "SetAttributesAsTextParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom8", "(", "&", ...
23,157
all-23158
[ "putNewKV", "attempts", "to", "create", "the", "given", "key", "only", "succeeding", "if", "the", "key", "did", "not", "yet", "exist", "." ]
[ "func", "putNewKV", "(", "kv", "v3", ".", "KV", ",", "<mask>", ",", "val", "string", ",", "leaseID", "v3", ".", "LeaseID", ")", "(", "int64", ",", "error", ")", "{", "cmp", ":=", "v3", ".", "Compare", "(", "v3", ".", "Version", "(", "key", ")", ...
23,158
all-23159
[ "GetDeviceEnabled", "is", "a", "wrapper", "around", "gtk_widget_get_device_enabled", "()", "." ]
[ "func", "(", "v", "*", "Widget", ")", "GetDeviceEnabled", "(", "device", "*", "gdk", ".", "<mask>", ")", "bool", "{", "c", ":=", "C", ".", "gtk_widget_get_device_enabled", "(", "v", ".", "native", "(", ")", ",", "(", "*", "C", ".", "GdkDevice", ")", ...
23,159
all-23160
[ "UnmarshalEasyJSON", "satisfies", "easyjson", ".", "Unmarshaler", "." ]
[ "func", "(", "t", "*", "AuthChallengeSource", ")", "UnmarshalEasyJSON", "(", "in", "*", "jlexer", ".", "Lexer", ")", "{", "<mask>", "AuthChallengeSource", "(", "in", ".", "String", "(", ")", ")", "{", "case", "AuthChallengeSourceServer", ":", "*", "t", "="...
23,160
all-23161
[ "sum64", "sums", "the", "md5", "hash", "to", "an", "uint64", "." ]
[ "func", "sum64", "(", "hash", "[", "md5", ".", "Size", "]", "<mask>", ")", "uint64", "{", "var", "s", "uint64", "\n\n", "for", "i", ",", "b", ":=", "range", "hash", "{", "shift", ":=", "uint64", "(", "(", "md5", ".", "Size", "-", "i", "-", "1",...
23,161
all-23162
[ "KeysOnly", "returns", "a", "derivative", "query", "that", "yields", "only", "keys", "not", "keys", "and", "entities", ".", "It", "cannot", "be", "used", "with", "projection", "queries", "." ]
[ "func", "(", "q", "*", "Query", ")", "KeysOnly", "(", ")", "*", "<mask>", "{", "q", "=", "q", ".", "clone", "(", ")", "\n", "q", ".", "keysOnly", "=", "true", "\n", "return", "q", "\n", "}" ]
23,162
all-23163
[ "Prepare", "prepares", "for", "a", "git", "pull", "and", "validates", "the", "configured", "directory" ]
[ "func", "(", "r", "*", "Repo", ")", "Prepare", "(", ")", "error", "{", "// check if directory exists or is empty", "// if not, create directory", "fs", ",", "err", ":=", "gos", ".", "ReadDir", "(", "r", ".", "Path", ")", "\n", "if", "err", "!=", "nil", "||...
23,163
all-23164
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "Effect", ")", "UnmarshalJSON", "(", "<mask>", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation17", "(", "&", "r", "...
23,164
all-23165
[ "ParseReference", "converts", "a", "string", "which", "should", "not", "start", "with", "the", "ImageTransport", ".", "Name", "prefix", "into", "an", "OCI", "ImageReference", "." ]
[ "func", "ParseReference", "(", "reference", "string", ")", "(", "types", ".", "ImageReference", ",", "error", ")", "{", "dir", ",", "image", ":=", "<mask>", ".", "SplitPathAndImage", "(", "reference", ")", "\n", "return", "NewReference", "(", "dir", ",", "...
23,165
all-23166
[ "SetX", "behaves", "the", "same", "as", "Set", "except", "it", "will", "not", "overwrite", "existing", "keys", "if", "already", "present", "." ]
[ "func", "(", "s", "*", "Scratch", ")", "SetX", "(", "k", "string", ",", "v", "interface", "{", "}", ")", "string", "{", "s", ".", "init", "(", ")", "\n\n", "s", ".", "Lock", "(", ")", "\n", "defer", "s", ".", "Unlock", "(", ")", "\n", "if", ...
23,166
all-23167
[ "Locator", "returns", "a", "locator", "for", "the", "given", "resource" ]
[ "func", "(", "r", "*", "EndUser", ")", "Locator", "(", "api", "*", "API", ")", "*", "EndUserLocator", "{", "<mask>", "api", ".", "EndUserLocator", "(", "r", ".", "Href", ")", "\n", "}" ]
23,167
all-23168
[ "String", "returns", "version", "as", "a", "string" ]
[ "func", "(", "v", "*", "DottedVersion", ")", "String", "(", ")", "string", "{", "version", ":=", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "v", ".", "Major", ",", "v", ".", "Minor", ")", "\n", "if", "v", ".", "Patch", "!=", "-", "1", "{", ...
23,168
all-23169
[ "NewConsumer", "initializes", "a", "new", "consumer" ]
[ "func", "NewConsumer", "(", "addrs", "[", "]", "string", ",", "groupID", "string", ",", "topics", "[", "]", "string", ",", "config", "*", "Config", ")", "(", "*", "Consumer", ",", "error", ")", "{", "<mask>", ",", "err", ":=", "NewClient", "(", "addr...
23,169
all-23170
[ "ValidateCustomizationSpec", "checks", "the", "validity", "of", "the", "supplied", "customization", "spec", ".", "It", "should", "be", "called", "during", "diff", "customization", "to", "veto", "invalid", "configs", "." ]
[ "func", "ValidateCustomizationSpec", "(", "d", "*", "schema", ".", "ResourceDiff", ",", "family", "string", ")", "error", "{", "// Validate that the proper section exists for OS family suboptions.", "linuxExists", ":=", "len", "(", "d", ".", "Get", "(", "cKeyPrefix", ...
23,170
all-23171
[ "Start", "is", "used", "to", "start", "the", "de", "-", "duplication", "manager" ]
[ "func", "(", "d", "*", "DedupManager", ")", "Start", "(", ")", "error", "{", "log", ".", "Printf", "(", "\"", "\"", ")", "\n\n", "<mask>", ":=", "d", ".", "clients", ".", "Consul", "(", ")", "\n", "go", "d", ".", "createSession", "(", "client", "...
23,171
all-23172
[ "revokeExpiredLeases", "finds", "all", "leases", "past", "their", "expiry", "and", "sends", "them", "to", "epxired", "channel", "for", "to", "be", "revoked", "." ]
[ "func", "(", "le", "*", "lessor", ")", "revokeExpiredLeases", "(", ")", "{", "var", "<mask>", "[", "]", "*", "Lease", "\n\n", "// rate limit", "revokeLimit", ":=", "leaseRevokeRate", "/", "2", "\n\n", "le", ".", "mu", ".", "RLock", "(", ")", "\n", "if"...
23,172
all-23173
[ "Reconfigure", "reconfigures", "any", "BaseComputeResource", "that", "uses", "a", "BaseComputeResourceConfigSpec", "as", "configuration", "(", "example", ":", "standalone", "hosts", "or", "clusters", ")", ".", "Modify", "is", "always", "set", "." ]
[ "func", "Reconfigure", "(", "obj", "BaseComputeResource", ",", "spec", "types", ".", "BaseComputeResourceConfigSpec", ")", "error", "{", "var", "c", "*", "object", ".", "ComputeResource", "\n", "switch", "t", ":=", "obj", ".", "(", "type", ")", "{", "case", ...
23,173
all-23174
[ "Return", "a", "copy", "of", "our", "complete", "state", "." ]
[ "func", "(", "p", "*", "peer", ")", "Gossip", "(", ")", "(", "complete", "mesh", ".", "GossipData", ")", "{", "complete", "=", "p", ".", "st", ".", "copy", "(", ")", "\n", "p", ".", "logger", ".", "Printf", "(", "\"", "\"", ",", "<mask>", ".", ...
23,174
all-23175
[ "HasShortName", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "m", "*", "MetricMetadata", ")", "HasShortName", "(", ")", "bool", "{", "if", "m", "!=", "nil", "&&", "m", ".", "ShortName", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n", "}" ]
23,175
all-23176
[ "parseTriageData", "unmarshals", "raw", "json", "data", "into", "a", "triageData", "struct", "and", "creates", "a", "BuildIndexer", "for", "every", "job", "." ]
[ "func", "parseTriageData", "(", "jsonIn", "[", "]", "byte", ")", "(", "*", "triageData", ",", "error", ")", "{", "var", "<mask>", "triageData", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "jsonIn", ",", "&", "data", ")", ";", "err", "!=",...
23,176
all-23177
[ "Start", "the", "server", "." ]
[ "func", "(", "s", "*", "Server", ")", "Start", "(", ")", "(", "err", "error", ")", "{", "<mask>", ".", "Infof", "(", "\"", "\"", ",", "s", ".", "Config", ".", "Port", ")", "\n", "var", "l", "net", ".", "Listener", "\n", "go", "func", "(", ")"...
23,177
all-23178
[ "Remove", "is", "a", "wrapper", "around", "g_menu_remove", "()", "." ]
[ "func", "(", "v", "*", "<mask>", ")", "Remove", "(", "position", "int", ")", "{", "C", ".", "g_menu_remove", "(", "v", ".", "native", "(", ")", ",", "C", ".", "gint", "(", "position", ")", ")", "\n", "}" ]
23,178
all-23179
[ "MSetForUid", "sets", "multiple", "values", "of", "the", "environment", "variables", "named", "by", "the", "keys", "that", "affects", "a", "particular", "user", ".", "It", "returns", "an", "error", "if", "any", "." ]
[ "func", "MSetForUid", "(", "id", "int", ",", "keys", ",", "values", "[", "]", "string", ")", "error", "{", "_settings", ",", "err", ":=", "getSettingsForUid", "(", "id", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\n\n", ...
23,179
all-23180
[ "NormalizeMax", "sets", "the", "max", "value", "to", "1", "and", "normalize", "the", "rest", "of", "the", "data", "." ]
[ "func", "NormalizeMax", "(", "buf", "*", "<mask>", ".", "FloatBuffer", ")", "{", "if", "buf", "==", "nil", "{", "return", "\n", "}", "\n", "max", ":=", "0.0", "\n\n", "for", "i", ":=", "0", ";", "i", "<", "len", "(", "buf", ".", "Data", ")", ";...
23,180
all-23181
[ "define", "an", "array", "of", "color", "indexes" ]
[ "func", "IndexPointer", "(", "xtype", "uint32", ",", "stride", "int32", ",", "<mask>", "unsafe", ".", "Pointer", ")", "{", "syscall", ".", "Syscall", "(", "gpIndexPointer", ",", "3", ",", "uintptr", "(", "xtype", ")", ",", "uintptr", "(", "stride", ")", ...
23,181
all-23182
[ "Connect", "connects", "to", "the", "given", "WebSocket", "server", ".", "addr", "should", "be", "formatted", "as", "ws", ":", "//", "host", ":", "port", "-", "or", "-", "wss", ":", "//", "host", ":", "port", "(", "i", ".", "e", ".", "ws", ":", "...
[ "func", "(", "c", "*", "Conn", ")", "Connect", "(", "addr", "string", ")", "error", "{", "ws", ",", "err", ":=", "websocket", ".", "Dial", "(", "addr", ",", "\"", "\"", ",", "\"", "\"", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err",...
23,182
all-23183
[ "GetPageIterator", "returns", "a", "KeyPageIterator", "with", "the", "given", "page", "filters", ".", "Call", "iterator", ".", "Next", "()", "to", "get", "the", "first", "page", "of", "resources", "(", "and", "again", "to", "retrieve", "subsequent", "pages", ...
[ "func", "(", "c", "*", "KeyService", ")", "GetPageIterator", "(", "data", "<mask>", ".", "Values", ")", "*", "KeyPageIterator", "{", "iter", ":=", "NewPageIterator", "(", "c", ".", "client", ",", "data", ",", "keyPathPart", ")", "\n", "return", "&", "Key...
23,183
all-23184
[ "NewReaderByteCodeLoader", "creates", "a", "new", "object" ]
[ "func", "NewReaderByteCodeLoader", "(", "p", "parser", ".", "<mask>", ",", "c", "compiler", ".", "Compiler", ")", "*", "ReaderByteCodeLoader", "{", "return", "&", "ReaderByteCodeLoader", "{", "NewFlags", "(", ")", ",", "p", ",", "c", "}", "\n", "}" ]
23,184
all-23185
[ "Release", "returns", "the", "message", "to", "the", "pool", "for", "re", "-", "use", "." ]
[ "func", "(", "m", "*", "Message", ")", "Release", "(", ")", "{", "if", "m", "!=", "nil", "{", "m", ".", "Text", "=", "nil", "\n", "m", ".", "<mask>", "=", "m", ".", "List", "[", ":", "0", "]", "\n", "messagePool", ".", "Put", "(", "m", ")",...
23,185
all-23186
[ "MustAllowTrustResult", "retrieves", "the", "AllowTrustResult", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
[ "func", "(", "u", "OperationResultTr", ")", "MustAllowTrustResult", "(", ")", "AllowTrustResult", "{", "val", ",", "ok", ":=", "u", ".", "GetAllowTrustResult", "(", ")", "\n\n", "if", "!", "<mask>", "{", "panic", "(", "\"", "\"", ")", "\n", "}", "\n\n", ...
23,186
all-23187
[ "Touch", "performs", "the", "provided", "Touch", "event", "at", "the", "location", "of", "each", "element", "in", "the", "selection", "." ]
[ "func", "(", "s", "*", "Selection", ")", "Touch", "(", "event", "Touch", ")", "error", "{", "var", "touchFunc", "func", "(", "x", ",", "y", "int", ")", "error", "\n", "<mask>", "event", "{", "case", "HoldFinger", ":", "touchFunc", "=", "s", ".", "s...
23,187
all-23188
[ "GetResourceByName", "convenience", "method", "to", "find", "and", "return", "a", "resource", "by", "name" ]
[ "func", "(", "s", "*", "ConcoursePipeline", ")", "GetResourceByName", "(", "name", "string", ")", "*", "atc", ".", "ResourceConfig", "{", "for", "i", ",", "v", ":=", "<mask>", "s", ".", "Resources", "{", "if", "v", ".", "Name", "==", "name", "{", "re...
23,188
all-23189
[ "NewPatternFromRGB", "is", "a", "wrapper", "around", "cairo_pattern_create_rgb", "()", "." ]
[ "func", "NewPatternFromRGB", "(", "red", ",", "green", ",", "<mask>", "float64", ")", "(", "*", "Pattern", ",", "error", ")", "{", "c", ":=", "C", ".", "cairo_pattern_create_rgb", "(", "C", ".", "double", "(", "red", ")", ",", "C", ".", "double", "("...
23,189
all-23190
[ "repl", "replaces", "%", "directives", "with", "right", "time" ]
[ "func", "repl", "(", "match", "string", ",", "t", "time", ".", "Time", ")", "string", "{", "if", "match", "==", "\"", "\"", "{", "return", "\"", "\"", "\n", "}", "\n\n", "formatFunc", ",", "<mask>", ":=", "formats", "[", "match", "]", "\n", "if", ...
23,190
all-23191
[ "PrintDetailedFileInfo", "pretty", "-", "prints", "detailed", "file", "info", "." ]
[ "func", "PrintDetailedFileInfo", "(", "fileInfo", "*", "pfs", ".", "FileInfo", ")", "error", "{", "template", ",", "err", ":=", "template", ".", "New", "(", "\"", "\"", ")", ".", "Funcs", "(", "funcMap", ")", ".", "Parse", "(", "`Path: {{.File.Path}}\nType...
23,191
all-23192
[ "DeleteWorksheet", "deletes", "passed", "worksheet", "." ]
[ "func", "(", "a", "*", "API", ")", "DeleteWorksheet", "(", "cfg", "*", "Worksheet", ")", "(", "bool", ",", "error", ")", "{", "if", "cfg", "==", "nil", "{", "return", "<mask>", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ")", "\n", "}", "\n", "...
23,192
all-23193
[ "Draw", "draws", "a", "given", "text", "on", "a", "given", "destination", "image", "dst", ".", "face", "is", "the", "font", "for", "text", "rendering", ".", "(", "x", "y", ")", "represents", "a", "dot", "(", "period", ")", "position", ".", "Be", "car...
[ "func", "Draw", "(", "dst", "*", "ebiten", ".", "Image", ",", "text", "string", ",", "face", "<mask>", ".", "Face", ",", "x", ",", "y", "int", ",", "clr", "color", ".", "Color", ")", "{", "textM", ".", "Lock", "(", ")", "\n\n", "fx", ":=", "fix...
23,193
all-23194
[ "CheckButtonNew", "is", "a", "wrapper", "around", "gtk_check_button_new", "()", "." ]
[ "func", "CheckButtonNew", "(", ")", "(", "*", "CheckButton", ",", "<mask>", ")", "{", "c", ":=", "C", ".", "gtk_check_button_new", "(", ")", "\n", "if", "c", "==", "nil", "{", "return", "nil", ",", "nilPtrErr", "\n", "}", "\n", "obj", ":=", "glib", ...
23,194
all-23195
[ "GetInt64", "returns", "the", "value", "of", "the", "given", "key", "which", "must", "be", "of", "type", "Int64", "." ]
[ "func", "(", "m", "*", "Map", ")", "GetInt64", "(", "name", "string", ")", "int64", "{", "m", ".", "schema", ".", "assertKeyType", "(", "name", ",", "Int64", ")", "\n", "n", ",", "err", ":=", "strconv", ".", "ParseInt", "(", "m", ".", "GetRaw", "...
23,195
all-23196
[ "EstimatedSize", "returns", "the", "approximate", "size", "of", "the", "key", "-", "value", "pair", ".", "This", "can", "be", "called", "while", "iterating", "through", "a", "store", "to", "quickly", "estimate", "the", "size", "of", "a", "range", "of", "ke...
[ "func", "(", "item", "*", "Item", ")", "EstimatedSize", "(", ")", "int64", "{", "if", "!", "item", ".", "hasValue", "(", ")", "{", "return", "0", "\n", "}", "\n", "if", "(", "item", ".", "meta", "&", "bitValuePointer", ")", "==", "0", "{", "retur...
23,196
all-23197
[ "ExportField", "exports", "columns", "for", "a", "field", "." ]
[ "func", "(", "c", "*", "Client", ")", "ExportField", "(", "field", "*", "Field", ")", "(", "io", ".", "Reader", ",", "error", ")", "{", "span", ":=", "c", ".", "tracer", ".", "StartSpan", "(", "\"", "\"", ")", "\n", "defer", "span", ".", "Finish"...
23,197
all-23198
[ "ScaleNewWithRange", "is", "a", "wrapper", "around", "gtk_scale_new_with_range", "()", "." ]
[ "func", "ScaleNewWithRange", "(", "orientation", "Orientation", ",", "min", ",", "<mask>", ",", "step", "float64", ")", "(", "*", "Scale", ",", "error", ")", "{", "c", ":=", "C", ".", "gtk_scale_new_with_range", "(", "C", ".", "GtkOrientation", "(", "orien...
23,198
all-23199
[ "WithFormat", "image", "compression", "format", "(", "defaults", "to", "png", ")", "." ]
[ "func", "(", "p", "CaptureScreenshotParams", ")", "WithFormat", "(", "format", "CaptureScreenshotFormat", ")", "*", "CaptureScreenshotParams", "{", "p", ".", "Format", "=", "<mask>", "\n", "return", "&", "p", "\n", "}" ]
23,199
all-23200
[ "render", "multiple", "sets", "of", "primitives", "by", "specifying", "indices", "of", "array", "data", "elements" ]
[ "func", "MultiDrawElements", "(", "<mask>", "uint32", ",", "count", "*", "int32", ",", "xtype", "uint32", ",", "indices", "*", "unsafe", ".", "Pointer", ",", "drawcount", "int32", ")", "{", "syscall", ".", "Syscall6", "(", "gpMultiDrawElements", ",", "5", ...