id
int32
0
25.3k
idx
stringlengths
5
9
nl_tokens
listlengths
1
418
pl_tokens
listlengths
22
4.98k
1,100
all-1101
[ "title", ":", "role", "create", "path", ":", "/", "roles", "method", ":", "POST", "consume", ":", "application", "/", "x", "-", "www", "-", "form", "-", "urlencoded", "responses", ":", "201", ":", "Role", "created", "400", ":", "Invalid", "data", "401"...
[ "func", "addRole", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ",", "t", "auth", ".", "Token", ")", "(", "err", "error", ")", "{", "if", "!", "permission", ".", "Check", "(", "t", ",", "permission", ".", "PermRol...
1,101
all-1102
[ "TODO", "Test" ]
[ "func", "CheckIPRangeCounts", "(", "counts", "map", "[", "string", "]", "int", ",", "limits", "[", "]", "int", ")", "bool", "{", "for", "prefix", ",", "<mask>", ":=", "range", "counts", "{", "ipParts", ":=", "strings", ".", "Split", "(", "prefix", ",",...
1,102
all-1103
[ "NameOf", "returns", "the", "name", "of", "the", "function", "value", "." ]
[ "func", "NameOf", "(", "v", "reflect", ".", "Value", ")", "string", "{", "fnc", ":=", "runtime", ".", "FuncForPC", "(", "v", ".", "Pointer", "(", ")", ")", "\n", "if", "fnc", "==", "nil", "{", "return", "\"", "\"", "\n", "}", "\n", "fullName", ":...
1,103
all-1104
[ "NewError", "returns", "an", "error", "corresponding", "to", "a", "typed", "error", "returned", "from", "ACS", ".", "It", "is", "expected", "that", "the", "passed", "in", "interface", "{}", "is", "really", "a", "struct", "which", "has", "a", "Message", "fi...
[ "func", "(", "te", "*", "tcsError", ")", "NewError", "(", "err", "interface", "{", "}", ")", "*", "wsclient", ".", "WSError", "{", "return", "&", "wsclient", ".", "WSError", "{", "ErrObj", ":", "err", ",", "<mask>", ":", "errType", ",", "WSUnretriableE...
1,104
all-1105
[ "NewSMTP", "create", "new", "SMTP" ]
[ "func", "NewSMTP", "(", "filename", "string", ",", "environment", "string", ")", "(", "s", "*", "SMTP", ",", "err", "error", ")", "{", "conf", ",", "err", ":=", "GetSMTP", "(", "<mask>", ",", "environment", ")", "\n", "if", "err", "!=", "nil", "{", ...
1,105
all-1106
[ "XXX_OneofFuncs", "is", "for", "the", "internal", "use", "of", "the", "proto", "package", "." ]
[ "func", "(", "*", "WatchRequest", ")", "XXX_OneofFuncs", "(", ")", "(", "func", "(", "msg", "proto", ".", "<mask>", ",", "b", "*", "proto", ".", "Buffer", ")", "error", ",", "func", "(", "msg", "proto", ".", "Message", ",", "tag", ",", "wire", "int...
1,106
all-1107
[ "MarshalJSON", "implements", "the", "json", ".", "Marshaler", "interface", ".", "The", "time", "is", "a", "quoted", "string", "in", "RFC", "3339", "format", "with", "sub", "-", "second", "precision", "added", "if", "present", "." ]
[ "func", "(", "t", "Time", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "if", "y", ":=", "<mask>", ".", "Time", "(", "t", ")", ".", "Year", "(", ")", ";", "y", "<", "0", "||", "y", ">=", "10000", "{", "// RFC ...
1,107
all-1108
[ "TODO", ":", "gtk_container_child_get_valist", "TODO", ":", "gtk_container_child_set_valist", "ChildNotify", "is", "a", "wrapper", "around", "gtk_container_child_notify", "()", "." ]
[ "func", "(", "v", "*", "Container", ")", "ChildNotify", "(", "<mask>", "IWidget", ",", "childProperty", "string", ")", "{", "cstr", ":=", "C", ".", "CString", "(", "childProperty", ")", "\n", "defer", "C", ".", "free", "(", "unsafe", ".", "Pointer", "(...
1,108
all-1109
[ "MarshalBinaryBare", "encodes", "the", "object", "o", "according", "to", "the", "Amino", "spec", ".", "MarshalBinaryBare", "doesn", "t", "prefix", "the", "byte", "-", "length", "of", "the", "encoding", "so", "the", "caller", "must", "handle", "framing", "." ]
[ "func", "(", "cdc", "*", "Codec", ")", "MarshalBinaryBare", "(", "o", "interface", "{", "}", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "// Dereference value if pointer.", "<mask>", "rv", ",", "_", ",", "isNilPtr", "=", "derefPointers", "(", "re...
1,109
all-1110
[ "SaveToFile", "saves", "the", "cedar", "to", "a", "file", "where", "dataType", "is", "either", "json", "or", "gob", "." ]
[ "func", "(", "da", "*", "Cedar", ")", "SaveToFile", "(", "fileName", "string", ",", "dataType", "string", ")", "error", "{", "file", ",", "err", ":=", "os", ".", "OpenFile", "(", "fileName", ",", "os", ".", "O_CREATE", "|", "os", ".", "O_WRONLY", ","...
1,110
all-1111
[ "UnselectPath", "is", "a", "wrapper", "around", "gtk_icon_view_unselect_path", "()", "." ]
[ "func", "(", "v", "*", "IconView", ")", "UnselectPath", "(", "<mask>", "*", "TreePath", ")", "{", "C", ".", "gtk_icon_view_unselect_path", "(", "v", ".", "native", "(", ")", ",", "path", ".", "native", "(", ")", ")", "\n", "}" ]
1,111
all-1112
[ "define", "an", "array", "of", "edge", "flags" ]
[ "func", "EdgeFlagPointer", "(", "stride", "int32", ",", "<mask>", "unsafe", ".", "Pointer", ")", "{", "C", ".", "glowEdgeFlagPointer", "(", "gpEdgeFlagPointer", ",", "(", "C", ".", "GLsizei", ")", "(", "stride", ")", ",", "pointer", ")", "\n", "}" ]
1,112
all-1113
[ "MustAlphaNum4", "retrieves", "the", "AlphaNum4", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
[ "func", "(", "u", "Asset", ")", "MustAlphaNum4", "(", ")", "AssetAlphaNum4", "{", "val", ",", "ok", ":=", "u", ".", "GetAlphaNum4", "(", ")", "\n\n", "if", "!", "<mask>", "{", "panic", "(", "\"", "\"", ")", "\n", "}", "\n\n", "return", "val", "\n",...
1,113
all-1114
[ "SendLinkMsg", "发送链接消息" ]
[ "func", "(", "w", "*", "Webhook", ")", "SendLinkMsg", "(", "title", ",", "content", ",", "picURL", ",", "msgURL", "string", ")", "error", "{", "return", "w", ".", "SendPayload", "(", "&", "Payload", "{", "MsgType", ":", "\"", "\"", ",", "Link", ":", ...
1,114
all-1115
[ "IndexOf", "finds", "the", "index", "of", "needle", "in", "s", "starting", "from", "start", "." ]
[ "func", "IndexOf", "(", "s", "string", ",", "needle", "string", ",", "start", "int", ")", "int", "{", "l", ":=", "len", "(", "s", ")", "\n", "if", "needle", "==", "\"", "\"", "{", "if", "start", "<", "0", "{", "return", "0", "\n", "}", "else", ...
1,115
all-1116
[ "In", "returns", "true", "if", "the", "parameter", "field", "is", "an", "input", "field", "." ]
[ "func", "(", "f", "*", "ParameterField", ")", "In", "(", ")", "bool", "{", "return", "f", ".", "<mask>", "==", "pmInout", "||", "f", ".", "mode", "==", "pmIn", "\n", "}" ]
1,116
all-1117
[ "title", ":", "add", "platform", "path", ":", "/", "platforms", "method", ":", "POST", "consume", ":", "multipart", "/", "form", "-", "data", "produce", ":", "application", "/", "x", "-", "json", "-", "stream", "responses", ":", "200", ":", "Platform", ...
[ "func", "platformAdd", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ",", "t", "auth", ".", "Token", ")", "(", "err", "error", ")", "{", "name", ":=", "InputValue", "(", "r", ",", "\"", "\"", ")", "\n", "file", "...
1,117
all-1118
[ "findIncludePaths", "finds", "and", "returns", "include", "paths", "." ]
[ "func", "findIncludePaths", "(", "data", "[", "]", "byte", ",", "opts", "*", "Options", ",", "f", "*", "File", ")", "(", "[", "]", "string", ",", "error", ")", "{", "var", "includePaths", "[", "]", "string", "\n\n", "for", "i", ",", "str", ":=", ...
1,118
all-1119
[ "TODO", ":", "No", "need", "to", "return", "the", "pod", "name", "since", "we", "already", "have", "the", "prowjob", "in", "the", "call", "site", "." ]
[ "func", "(", "c", "*", "Controller", ")", "startPod", "(", "pj", "prowapi", ".", "ProwJob", ")", "(", "string", ",", "string", ",", "error", ")", "{", "buildID", ",", "err", ":=", "c", ".", "getBuildID", "(", "pj", ".", "Spec", ".", "<mask>", ")", ...
1,119
all-1120
[ "OBJECT", "IDENTIFIER", "parseObjectIdentifier", "parses", "an", "OBJECT", "IDENTIFIER", "from", "the", "given", "bytes", "and", "returns", "it", ".", "An", "object", "identifier", "is", "a", "sequence", "of", "variable", "length", "integers", "that", "are", "as...
[ "func", "parseObjectIdentifier", "(", "bytes", "[", "]", "byte", ")", "(", "s", "[", "]", "int", ",", "err", "error", ")", "{", "if", "len", "(", "bytes", ")", "==", "0", "{", "err", "=", "asn1", ".", "SyntaxError", "{", "Msg", ":", "\"", "\"", ...
1,120
all-1121
[ "saveHostVirtualSwitchID", "sets", "a", "special", "ID", "for", "a", "host", "virtual", "switch", "composed", "of", "the", "MOID", "for", "the", "concerned", "HostSystem", "and", "the", "virtual", "switch", "s", "key", "." ]
[ "func", "saveHostVirtualSwitchID", "(", "d", "*", "schema", ".", "ResourceData", ",", "hsID", ",", "<mask>", "string", ")", "{", "d", ".", "SetId", "(", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "hostVirtualSwitchIDPrefix", ",", "hsID", ",", "name", "...
1,121
all-1122
[ "GroupByLimit", "creates", "a", "GroupBy", "query", "with", "the", "given", "limit", "and", "Rows", "queries" ]
[ "func", "(", "idx", "*", "Index", ")", "GroupByLimit", "(", "limit", "int64", ",", "rowsQueries", "...", "*", "PQLRowsQuery", ")", "*", "PQLBaseQuery", "{", "if", "len", "(", "rowsQueries", ")", "<", "1", "{", "return", "NewPQLBaseQuery", "(", "\"", "\""...
1,122
all-1123
[ "GetAlertIDOk", "returns", "a", "tuple", "with", "the", "AlertID", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "w", "*", "Widget", ")", "GetAlertIDOk", "(", ")", "(", "int", ",", "bool", ")", "{", "if", "w", "==", "nil", "||", "w", ".", "AlertID", "==", "nil", "{", "return", "0", ",", "<mask>", "\n", "}", "\n", "return", "*", "w", ".", "A...
1,123
all-1124
[ "runActionForeachMachine", "will", "run", "the", "command", "across", "multiple", "machines" ]
[ "func", "runActionForeachMachine", "(", "actionName", "string", ",", "machines", "[", "]", "*", "host", ".", "Host", ")", "[", "]", "error", "{", "var", "(", "numConcurrentActions", "=", "0", "\n", "errorChan", "=", "<mask>", "(", "chan", "error", ")", "...
1,124
all-1125
[ "base64URLEncode", "encodes", "the", "given", "string", "to", "be", "URL", "-", "safe", "." ]
[ "func", "base64URLEncode", "(", "s", "string", ")", "(", "string", ",", "error", ")", "{", "return", "base64", ".", "URLEncoding", ".", "EncodeToString", "(", "[", "]", "<mask>", "(", "s", ")", ")", ",", "nil", "\n", "}" ]
1,125
all-1126
[ "advanceTicks", "advances", "ticks", "of", "Raft", "node", ".", "This", "can", "be", "used", "for", "fast", "-", "forwarding", "election", "ticks", "in", "multi", "data", "-", "center", "deployments", "thus", "speeding", "up", "election", "process", "." ]
[ "func", "(", "r", "*", "raftNode", ")", "advanceTicks", "(", "ticks", "int", ")", "{", "for", "i", ":=", "0", ";", "i", "<", "ticks", ";", "i", "++", "{", "r", ".", "<mask>", "(", ")", "\n", "}", "\n", "}" ]
1,126
all-1127
[ "IsTLS", "returns", "true", "if", "the", "underlying", "connection", "is", "tls", ".", "Conn", ".", "tls", ".", "Conn", "is", "an", "encrypted", "connection", "(", "aka", "SSL", "HTTPS", ")", "." ]
[ "func", "(", "ctx", "*", "RequestCtx", ")", "IsTLS", "(", ")", "bool", "{", "// cast to (connTLSer) instead of (*tls.Conn), since it catches", "// cases with overridden tls.Conn such as:", "//", "// type customConn struct {", "// *tls.Conn", "//", "// // other custom fields...
1,127
all-1128
[ "CustomLog", "outputs", "custom", "level", "log" ]
[ "func", "(", "g", "*", "Glg", ")", "CustomLog", "(", "level", "string", ",", "val", "...", "<mask>", "{", "}", ")", "error", "{", "return", "g", ".", "out", "(", "g", ".", "TagStringToLevel", "(", "level", ")", ",", "blankFormat", "(", "len", "(", ...
1,128
all-1129
[ "SetFontData", "sets", "the", "current", "font", "used", "to", "draw", "text", ".", "Always", "use", "this", "method", "as", "SetFont", "is", "unsupported", "by", "the", "pdf", "graphic", "context", ".", "It", "is", "mandatory", "to", "call", "this", "meth...
[ "func", "(", "gc", "*", "GraphicContext", ")", "SetFontData", "(", "fontData", "draw2d", ".", "FontData", ")", "{", "// TODO: call Makefont embed if json file does not exist yet", "gc", ".", "StackGraphicContext", ".", "SetFontData", "(", "fontData", ")", "\n", "var",...
1,129
all-1130
[ "focusPrevious", "focuses", "on", "the", "previous", "available", "widget", ".", "focusPrevious", "shall", "be", "called", "from", "queue", "context", "." ]
[ "func", "(", "w", "*", "Window", ")", "focusPrevious", "(", ")", "{", "// it is ok to be negative since that'll focus on the first widget", "w", ".", "focus", "--", "\n", "if", "w", ".", "<mask>", "<", "0", "{", "w", ".", "focusWidget", "(", ")", "\n", "retu...
1,130
all-1131
[ "SetParentContext", "sets", "the", "parent", "for", "the", "Context", "." ]
[ "func", "(", "cb", "*", "ContextBuilder", ")", "SetParentContext", "(", "ctx", "<mask>", ".", "Context", ")", "*", "ContextBuilder", "{", "cb", ".", "ParentContext", "=", "ctx", "\n", "return", "cb", "\n", "}" ]
1,131
all-1132
[ "unsafeGet", "gets", "one", "cacheItem", "instance", "from", "its", "key", "without", "locking", ".", "Errors", ":", "InvalidKeyError", "when", "requested", "key", "could", "not", "be", "found", "." ]
[ "func", "(", "s", "*", "Cache", ")", "unsafeGet", "(", "key", "string", ")", "(", "*", "cacheItem", ",", "error", ")", "{", "v", ",", "ok", ":=", "s", ".", "<mask>", "[", "key", "]", "\n", "if", "!", "ok", "{", "return", "nil", ",", "raiqub", ...
1,132
all-1133
[ "HTTPRespondMarshalIndentXML", "marshals", "response", "as", "XML", "to", "responseWriter", "sets", "Content", "-", "Type", "to", "application", "/", "xml", "and", "compresses", "the", "response", "if", "Content", "-", "Encoding", "from", "the", "request", "allows...
[ "func", "HTTPRespondMarshalIndentXML", "(", "response", "interface", "{", "}", ",", "rootElement", "string", ",", "prefix", ",", "indent", "string", ",", "responseWriter", "http", ".", "ResponseWriter", ",", "request", "*", "http", ".", "Request", ")", "(", "e...
1,133
all-1134
[ "Clone", "a", "template", ".", "This", "is", "useful", "for", "defining", "helpers", "on", "per", "instance", "of", "the", "template", "." ]
[ "func", "(", "t", "*", "<mask>", ")", "Clone", "(", ")", "*", "Template", "{", "t2", ":=", "&", "Template", "{", "Input", ":", "t", ".", "Input", ",", "program", ":", "t", ".", "program", ",", "}", "\n", "return", "t2", "\n", "}" ]
1,134
all-1135
[ "Sends", "an", "S3", "multipart", "upload", "initiation", "request", ".", "See", "http", ":", "//", "docs", ".", "amazonwebservices", ".", "com", "/", "AmazonS3", "/", "latest", "/", "dev", "/", "mpuoverview", ".", "html", ".", "This", "initial", "request"...
[ "func", "newUploader", "(", "url", "string", ",", "h", "<mask>", ".", "Header", ",", "c", "*", "Config", ")", "(", "u", "*", "uploader", ",", "err", "error", ")", "{", "u", "=", "new", "(", "uploader", ")", "\n", "u", ".", "s3", "=", "*", "c", ...
1,135
all-1136
[ "PangoFontDescription", "*", "pango_font_description_from_string", "(", "const", "char", "*", "str", ")", ";" ]
[ "func", "FontDescriptionFromString", "(", "str", "string", ")", "*", "FontDescription", "{", "cstr", ":=", "C", ".", "CString", "(", "str", ")", "\n", "defer", "C", ".", "free", "(", "unsafe", ".", "Pointer", "(", "cstr", ")", ")", "\n", "c", ":=", "...
1,136
all-1137
[ "Locator", "returns", "a", "locator", "for", "the", "given", "resource" ]
[ "func", "(", "r", "*", "Credential", ")", "Locator", "(", "api", "*", "API", ")", "*", "CredentialLocator", "{", "for", "_", ",", "l", ":=", "<mask>", "r", ".", "Links", "{", "if", "l", "[", "\"", "\"", "]", "==", "\"", "\"", "{", "return", "ap...
1,137
all-1138
[ "UpdateContainerReference", "updates", "container", "reference", "in", "image", "state" ]
[ "func", "(", "imageState", "*", "ImageState", ")", "UpdateContainerReference", "(", "container", "*", "apicontainer", ".", "Container", ")", "{", "imageState", ".", "<mask>", ".", "Lock", "(", ")", "\n", "defer", "imageState", ".", "lock", ".", "Unlock", "("...
1,138
all-1139
[ "exprList", "parses", "a", "sequence", "of", "expressions", "up", "to", "a", "terminating", "character", "." ]
[ "func", "(", "st", "*", "<mask>", ")", "exprList", "(", "stop", "byte", ")", "AST", "{", "if", "len", "(", "st", ".", "str", ")", ">", "0", "&&", "st", ".", "str", "[", "0", "]", "==", "stop", "{", "st", ".", "advance", "(", "1", ")", "\n",...
1,139
all-1140
[ "AddInline", "returns", "a", "copy", "of", "MailBuilder", "that", "includes", "the", "specified", "inline", ".", "fileName", "and", "contentID", "may", "be", "left", "empty", "." ]
[ "func", "(", "p", "MailBuilder", ")", "AddInline", "(", "b", "[", "]", "byte", ",", "contentType", "string", ",", "fileName", "string", ",", "contentID", "string", ",", ")", "MailBuilder", "{", "part", ":=", "NewPart", "(", "contentType", ")", "\n", "par...
1,140
all-1141
[ "MoveMouseBy", "moves", "the", "mouse", "by", "the", "provided", "offset", "." ]
[ "func", "(", "p", "*", "Page", ")", "MoveMouseBy", "(", "xOffset", ",", "yOffset", "int", ")", "error", "{", "if", "err", ":=", "p", ".", "<mask>", ".", "MoveTo", "(", "nil", ",", "api", ".", "XYOffset", "{", "X", ":", "xOffset", ",", "Y", ":", ...
1,141
all-1142
[ "KeyfileSettingsBackendNew", "is", "a", "wrapper", "around", "g_keyfile_settings_backend_new", "()", "." ]
[ "func", "KeyfileSettingsBackendNew", "(", "filename", ",", "rootPath", ",", "rootGroup", "string", ")", "*", "SettingsBackend", "{", "cstr1", ":=", "(", "*", "C", ".", "gchar", ")", "(", "C", ".", "CString", "(", "filename", ")", ")", "\n", "defer", "C",...
1,142
all-1143
[ "GetApplicable", "returns", "the", "subset", "of", "blockers", "applicable", "to", "the", "specified", "branch", "." ]
[ "func", "(", "b", "Blockers", ")", "GetApplicable", "(", "org", ",", "repo", ",", "branch", "string", ")", "[", "]", "Blocker", "{", "var", "res", "[", "]", "Blocker", "\n", "res", "=", "append", "(", "res", ",", "b", ".", "Repo", "[", "orgRepo", ...
1,143
all-1144
[ "MustTxSetHash", "retrieves", "the", "TxSetHash", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
[ "func", "(", "u", "StellarMessage", ")", "MustTxSetHash", "(", ")", "Uint256", "{", "val", ",", "ok", ":=", "u", ".", "GetTxSetHash", "(", ")", "\n\n", "if", "!", "<mask>", "{", "panic", "(", "\"", "\"", ")", "\n", "}", "\n\n", "return", "val", "\n...
1,144
all-1145
[ "Parse", "incoming", "message" ]
[ "func", "(", "m", "*", "MessageStream", ")", "parse", "(", ")", "{", "for", "{", "b", ":=", "<-", "m", ".", "pool", ".", "Full", "\n", "log", ".", "Debugf", "(", "\"", "\"", ",", "b", ".", "Bytes", "(", ")", ")", "\n", "msg", ",", "err", ":...
1,145
all-1146
[ "SetObject", "sets", "the", "regular", "expresion", "that", "should", "match", "the", "name", "of", "the", "object", "." ]
[ "func", "(", "x", "*", "Exception", ")", "SetObject", "(", "object", "string", ")", "error", "{", "objectRegexp", ",", "err", ":=", "regexp", ".", "Compile", "(", "\"", "\"", "+", "object", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", ...
1,146
all-1147
[ "IntrospectState", "returns", "the", "runtime", "state", "for", "this", "relayer", "." ]
[ "func", "(", "r", "*", "Relayer", ")", "IntrospectState", "(", "opts", "*", "IntrospectionOptions", ")", "RelayerRuntimeState", "{", "<mask>", ":=", "r", ".", "inbound", ".", "Count", "(", ")", "+", "r", ".", "outbound", ".", "Count", "(", ")", "\n", "...
1,147
all-1148
[ "Abs", "computes", "an", "absolute", "label", "(", "one", "with", "a", "repository", "and", "package", "name", ")", "from", "this", "label", ".", "If", "this", "label", "is", "already", "absolute", "it", "is", "returned", "unchanged", "." ]
[ "func", "(", "l", "Label", ")", "Abs", "(", "repo", ",", "pkg", "string", ")", "Label", "{", "if", "!", "l", ".", "Relative", "{", "return", "l", "\n", "}", "\n", "return", "Label", "{", "Repo", ":", "repo", ",", "Pkg", ":", "pkg", ",", "Name",...
1,148
all-1149
[ "NewRandomSub", "returns", "a", "new", "PubSub", "object", "using", "RandomSubRouter", "as", "the", "router", "." ]
[ "func", "NewRandomSub", "(", "ctx", "context", ".", "Context", ",", "h", "host", ".", "Host", ",", "opts", "...", "Option", ")", "(", "*", "PubSub", ",", "error", ")", "{", "rt", ":=", "&", "RandomSubRouter", "{", "peers", ":", "make", "(", "<mask>",...
1,149
all-1150
[ "Fetch", "queries", "the", "Vault", "API" ]
[ "func", "(", "d", "*", "VaultReadQuery", ")", "Fetch", "(", "clients", "*", "ClientSet", ",", "opts", "*", "QueryOptions", ")", "(", "interface", "{", "}", ",", "*", "ResponseMetadata", ",", "error", ")", "{", "select", "{", "case", "<-", "d", ".", "...
1,150
all-1151
[ "ConnectIfContainerIsRemote", "figures", "out", "the", "address", "of", "the", "node", "which", "is", "running", "the", "container", "with", "the", "given", "name", ".", "If", "it", "s", "not", "the", "local", "node", "will", "connect", "to", "it", "and", ...
[ "func", "ConnectIfContainerIsRemote", "(", "cluster", "*", "db", ".", "Cluster", ",", "project", ",", "name", "string", ",", "cert", "*", "shared", ".", "CertInfo", ")", "(", "lxd", ".", "ContainerServer", ",", "error", ")", "{", "var", "address", "string"...
1,151
all-1152
[ "NewReaderLexer", "creates", "a", "new", "lexer" ]
[ "func", "NewReaderLexer", "(", "rdr", "<mask>", ".", "Reader", ")", "*", "parser", ".", "Lexer", "{", "l", ":=", "parser", ".", "NewReaderLexer", "(", "rdr", ",", "SymbolSet", ")", "\n", "l", ".", "SetTagStart", "(", "\"", "\"", ")", "\n", "l", ".", ...
1,152
all-1153
[ "C", "will", "return", "the", "collection", "associated", "to", "the", "passed", "model", "." ]
[ "func", "(", "s", "*", "SubStore", ")", "C", "(", "model", "<mask>", ")", "*", "mgo", ".", "Collection", "{", "return", "s", ".", "DB", "(", ")", ".", "C", "(", "C", "(", "model", ")", ")", "\n", "}" ]
1,153
all-1154
[ "MardkownSHAList", "prints", "the", "list", "of", "commits", "in", "a", "markdown", "-", "friendly", "way", "." ]
[ "func", "MarkdownSHAList", "(", "org", ",", "repo", "string", ",", "list", "[", "]", "github", ".", "GitCommit", ")", "string", "{", "lines", ":=", "make", "(", "[", "]", "string", ",", "len", "(", "list", ")", ")", "\n", "lineFmt", ":=", "\"", "\"...
1,154
all-1155
[ "InitLabels", "returns", "the", "process", "label", "and", "file", "labels", "to", "be", "used", "within", "the", "container", ".", "A", "list", "of", "options", "can", "be", "passed", "into", "this", "function", "to", "alter", "the", "labels", ".", "The",...
[ "func", "InitLabels", "(", "options", "[", "]", "string", ")", "(", "string", ",", "string", ",", "error", ")", "{", "if", "!", "selinux", ".", "SelinuxEnabled", "(", ")", "{", "return", "\"", "\"", ",", "\"", "\"", ",", "nil", "\n", "}", "\n", "...
1,155
all-1156
[ "AddFileAttachment", "returns", "a", "copy", "of", "MailBuilder", "that", "includes", "the", "specified", "attachment", ".", "fileName", "will", "be", "populated", "from", "the", "base", "name", "of", "path", ".", "Content", "type", "will", "be", "detected", "...
[ "func", "(", "p", "MailBuilder", ")", "AddFileAttachment", "(", "path", "string", ")", "MailBuilder", "{", "// Only allow first p.err value", "if", "p", ".", "err", "!=", "nil", "{", "return", "p", "\n", "}", "\n", "f", ",", "err", ":=", "os", ".", "Open...
1,156
all-1157
[ "SetTaskENI", "sets", "the", "eni", "information", "of", "the", "task" ]
[ "func", "(", "task", "*", "Task", ")", "SetTaskENI", "(", "eni", "*", "apieni", ".", "ENI", ")", "{", "task", ".", "<mask>", ".", "Lock", "(", ")", "\n", "defer", "task", ".", "lock", ".", "Unlock", "(", ")", "\n\n", "task", ".", "ENI", "=", "e...
1,157
all-1158
[ "WithFooterTemplate", "HTML", "template", "for", "the", "print", "footer", ".", "Should", "use", "the", "same", "format", "as", "the", "headerTemplate", "." ]
[ "func", "(", "p", "PrintToPDFParams", ")", "WithFooterTemplate", "(", "footerTemplate", "<mask>", ")", "*", "PrintToPDFParams", "{", "p", ".", "FooterTemplate", "=", "footerTemplate", "\n", "return", "&", "p", "\n", "}" ]
1,158
all-1159
[ "GetMetadata", "indicates", "an", "expected", "call", "of", "GetMetadata" ]
[ "func", "(", "mr", "*", "MockHttpClientMockRecorder", ")", "GetMetadata", "(", "arg0", "<mask>", "{", "}", ")", "*", "gomock", ".", "Call", "{", "return", "mr", ".", "mock", ".", "ctrl", ".", "RecordCallWithMethodType", "(", "mr", ".", "mock", ",", "\"",...
1,159
all-1160
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "RemoteObject", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime9", "(", "&", "w", ",", "v", ")", "\...
1,160
all-1161
[ "PutObjectAsync", "puts", "a", "value", "into", "the", "object", "store", "asynchronously", "." ]
[ "func", "(", "c", "APIClient", ")", "PutObjectAsync", "(", "tags", "[", "]", "*", "pfs", ".", "Tag", ")", "(", "*", "PutObjectWriteCloserAsync", ",", "error", ")", "{", "w", ",", "err", ":=", "c", ".", "newPutObjectWriteCloserAsync", "(", "<mask>", ")", ...
1,161
all-1162
[ "DeviceChangeString", "pretty", "-", "prints", "a", "slice", "of", "VirtualDeviceConfigSpec", "." ]
[ "func", "DeviceChangeString", "(", "specs", "[", "]", "types", ".", "BaseVirtualDeviceConfigSpec", ")", "string", "{", "var", "strs", "[", "]", "string", "\n", "for", "_", ",", "v", ":=", "range", "specs", "{", "spec", ":=", "v", ".", "GetVirtualDeviceConf...
1,162
all-1163
[ "SwitchToWindow", "switches", "to", "the", "first", "available", "window", "with", "the", "provided", "name", "(", "JavaScript", "window", ".", "name", "attribute", ")", "." ]
[ "func", "(", "p", "*", "Page", ")", "SwitchToWindow", "(", "name", "string", ")", "error", "{", "if", "err", ":=", "p", ".", "session", ".", "SetWindowByName", "(", "<mask>", ")", ";", "err", "!=", "nil", "{", "return", "fmt", ".", "Errorf", "(", "...
1,163
all-1164
[ "GetValOk", "returns", "a", "tuple", "with", "the", "Val", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "g", "*", "GraphDefinitionMarker", ")", "GetValOk", "(", ")", "(", "json", ".", "Number", ",", "bool", ")", "{", "if", "g", "==", "nil", "||", "g", ".", "Val", "==", "nil", "{", "return", "\"", "\"", ",", "<mask>", "\n", "}", "\n", ...
1,164
all-1165
[ "Returns", "the", "default", "value", "of", "a", "type", ".", "For", "a", "time", "type", "or", "a", "pointer", "(", "s", ")", "to", "time", "the", "default", "value", "is", "not", "zero", "(", "or", "nil", ")", "but", "the", "time", "value", "of",...
[ "func", "defaultValue", "(", "rt", "reflect", ".", "Type", ")", "(", "rv", "reflect", ".", "<mask>", ")", "{", "switch", "rt", ".", "Kind", "(", ")", "{", "case", "reflect", ".", "Ptr", ":", "// Dereference all the way and see if it's a time type.", "rt_", "...
1,165
all-1166
[ "AssertTruef", "is", "AssertTrue", "with", "extra", "info", "." ]
[ "func", "AssertTruef", "(", "b", "bool", ",", "format", "string", ",", "args", "...", "interface", "{", "}", ")", "{", "if", "!", "b", "{", "log", ".", "Fatalf", "(", "\"", "\"", ",", "errors", ".", "Errorf", "(", "<mask>", ",", "args", "...", ")...
1,166
all-1167
[ "MarkPartitionOffset", "stashes", "the", "offset", "for", "the", "provided", "topic", "/", "partition", "combination" ]
[ "func", "(", "s", "*", "OffsetStash", ")", "MarkPartitionOffset", "(", "topic", "string", ",", "partition", "int32", ",", "offset", "int64", ",", "metadata", "string", ")", "{", "s", ".", "mu", ".", "Lock", "(", ")", "\n", "defer", "s", ".", "mu", "....
1,167
all-1168
[ "SetUseUnderline", "is", "a", "wrapper", "around", "gtk_label_set_use_underline", "()", "." ]
[ "func", "(", "v", "*", "<mask>", ")", "SetUseUnderline", "(", "use", "bool", ")", "{", "C", ".", "gtk_label_set_use_underline", "(", "v", ".", "native", "(", ")", ",", "gbool", "(", "use", ")", ")", "\n", "}" ]
1,168
all-1169
[ "GetOverwriteMode", "()", "is", "a", "wrapper", "around", "gtk_entry_get_overwrite_mode", "()", "." ]
[ "func", "(", "v", "*", "<mask>", ")", "GetOverwriteMode", "(", ")", "bool", "{", "c", ":=", "C", ".", "gtk_entry_get_overwrite_mode", "(", "v", ".", "native", "(", ")", ")", "\n", "return", "gobool", "(", "c", ")", "\n", "}" ]
1,169
all-1170
[ "Private", "stuff", "." ]
[ "func", "parseDump", "(", "r", "io", ".", "Reader", ",", "out", "io", ".", "Writer", ")", "(", "[", "]", "*", "Goroutine", ",", "error", ")", "{", "scanner", ":=", "bufio", ".", "NewScanner", "(", "r", ")", "\n", "scanner", ".", "Split", "(", "sc...
1,170
all-1171
[ "Info", "returns", "the", "server", "s", "configuration", "/", "host", "information", "." ]
[ "func", "(", "c", "*", "<mask>", ")", "Info", "(", ")", "(", "Info", ",", "error", ")", "{", "span", ":=", "c", ".", "tracer", ".", "StartSpan", "(", "\"", "\"", ")", "\n", "defer", "span", ".", "Finish", "(", ")", "\n\n", "_", ",", "data", "...
1,171
all-1172
[ "manifestLayerInfosToBlobInfos", "extracts", "a", "[]", "types", ".", "BlobInfo", "from", "a", "[]", "manifest", ".", "LayerInfo", "." ]
[ "func", "manifestLayerInfosToBlobInfos", "(", "layers", "[", "]", "manifest", ".", "LayerInfo", ")", "[", "]", "types", ".", "BlobInfo", "{", "blobs", ":=", "make", "(", "[", "]", "types", ".", "BlobInfo", ",", "len", "(", "layers", ")", ")", "\n", "fo...
1,172
all-1173
[ "ToURL", "converts", "the", "given", "folder", "to", "an", "URL" ]
[ "func", "ToURL", "(", "folder", "string", ")", "string", "{", "result", ":=", "folder", "\n", "for", "_", ",", "<mask>", ":=", "range", "replaces", "{", "result", "=", "strings", ".", "Replace", "(", "result", ",", "replace", ".", "b", ",", "replace", ...
1,173
all-1174
[ "Serve", "serves", "stuff", "." ]
[ "func", "Serve", "(", "servers", "...", "ServerOptions", ",", ")", "(", "retErr", "error", ")", "{", "for", "_", ",", "server", ":=", "range", "servers", "{", "if", "server", ".", "RegisterFunc", "==", "nil", "{", "return", "ErrMustSpecifyRegisterFunc", "\...
1,174
all-1175
[ "ReadConfig", "..." ]
[ "func", "ReadConfig", "(", "filename", "string", ")", "(", "*", "Config", ",", "error", ")", "{", "cfg", ":=", "NewConfig", "(", ")", "\n", "if", "filename", "!=", "\"", "\"", "{", "b", ",", "err", ":=", "ioutil", ".", "ReadFile", "(", "filename", ...
1,175
all-1176
[ "GetTags", "returns", "the", "Tags", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "r", "*", "reqGetTags", ")", "GetTags", "(", ")", "TagMap", "{", "if", "r", "==", "nil", "||", "r", ".", "Tags", "==", "nil", "{", "return", "TagMap", "{", "}", "\n", "}", "\n", "<mask>", "*", "r", ".", "Tags", "\n", "}" ]
1,176
all-1177
[ "GetType", "returns", "the", "Type", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "t", "*", "TimeseriesDefinition", ")", "GetType", "(", ")", "string", "{", "if", "t", "==", "nil", "||", "t", ".", "Type", "==", "nil", "{", "return", "\"", "\"", "\n", "}", "\n", "return", "*", "t", ".", "<mask>", "\n", "}" ]
1,177
all-1178
[ "RespondResult", "sends", "a", "response", "with", "a", "given", "result", "." ]
[ "func", "(", "s", "*", "<mask>", ")", "RespondResult", "(", "logger", "log", ".", "Logger", ",", "w", "http", ".", "ResponseWriter", ",", "result", "interface", "{", "}", ")", "{", "logger", "=", "logger", ".", "Add", "(", "\"", "\"", ",", "result", ...
1,178
all-1179
[ "Int32", "returns", "the", "int32", "value", "stored", "in", "r", ".", "r", "must", "have", "type", "int32", "." ]
[ "func", "(", "r", "<mask>", ")", "Int32", "(", ")", "int32", "{", "if", "r", ".", "typ", ".", "Kind", "!=", "KindInt", "||", "r", ".", "typ", ".", "Size", "!=", "4", "{", "panic", "(", "\"", "\"", "+", "r", ".", "typ", ".", "Name", ")", "\n...
1,179
all-1180
[ "Attribute", "returns", "an", "attribute", "value", "for", "exactly", "one", "element", "." ]
[ "func", "(", "s", "*", "Selection", ")", "Attribute", "(", "attribute", "string", ")", "(", "string", ",", "error", ")", "{", "return", "s", ".", "hasProperty", "(", "<mask>", ".", "Element", ".", "GetAttribute", ",", "attribute", ",", "\"", "\"", ")",...
1,180
all-1181
[ "retrieve", "the", "location", "of", "a", "sample" ]
[ "func", "GetMultisamplefv", "(", "pname", "uint32", ",", "<mask>", "uint32", ",", "val", "*", "float32", ")", "{", "syscall", ".", "Syscall", "(", "gpGetMultisamplefv", ",", "3", ",", "uintptr", "(", "pname", ")", ",", "uintptr", "(", "index", ")", ",", ...
1,181
all-1182
[ "PublishEventContext", "publish", "event", "for", "given", "ctx", "." ]
[ "func", "PublishEventContext", "(", "ctx", "<mask>", ".", "Context", ",", "eventName", "string", ",", "eventBody", "interface", "{", "}", ")", "{", "pub", ":=", "PublisherContext", "(", "ctx", ")", "\n", "if", "pub", "==", "nil", "{", "return", "\n", "}"...
1,182
all-1183
[ "Parse", "parses", "Set", "-", "Cookie", "header", "." ]
[ "func", "(", "c", "*", "Cookie", ")", "Parse", "(", "src", "string", ")", "error", "{", "c", ".", "buf", "=", "<mask>", "(", "c", ".", "buf", "[", ":", "0", "]", ",", "src", "...", ")", "\n", "return", "c", ".", "ParseBytes", "(", "c", ".", ...
1,183
all-1184
[ "ResourcePool", "is", "a", "convenience", "method", "that", "wraps", "fetching", "the", "host", "system", "s", "root", "resource", "pool" ]
[ "func", "ResourcePool", "(", "host", "*", "object", ".", "HostSystem", ")", "(", "*", "<mask>", ".", "ResourcePool", ",", "error", ")", "{", "ctx", ",", "cancel", ":=", "context", ".", "WithTimeout", "(", "context", ".", "Background", "(", ")", ",", "p...
1,184
all-1185
[ "Timeout", "returns", "the", "timeout", "of", "the", "connector", "." ]
[ "func", "(", "c", "*", "Connector", ")", "Timeout", "(", ")", "int", "{", "c", ".", "mu", ".", "RLock", "(", ")", "\n", "defer", "c", ".", "mu", ".", "RUnlock", "(", ")", "\n", "<mask>", "c", ".", "timeout", "\n", "}" ]
1,185
all-1186
[ "NetworkGatewayLocator", "builds", "a", "locator", "from", "the", "given", "href", "." ]
[ "func", "(", "api", "*", "API", ")", "NetworkGatewayLocator", "(", "href", "<mask>", ")", "*", "NetworkGatewayLocator", "{", "return", "&", "NetworkGatewayLocator", "{", "Href", "(", "href", ")", ",", "api", "}", "\n", "}" ]
1,186
all-1187
[ "DeleteCertificate", "removes", "a", "certificate", "from", "the", "LXD", "trust", "store" ]
[ "func", "(", "r", "*", "ProtocolLXD", ")", "DeleteCertificate", "(", "fingerprint", "string", ")", "error", "{", "// Send the request", "_", ",", "_", ",", "err", ":=", "r", ".", "query", "(", "\"", "\"", ",", "fmt", ".", "Sprintf", "(", "\"", "\"", ...
1,187
all-1188
[ "Close", "causes", "currently", "running", "Process", "()", "function", "to", "exit", "." ]
[ "func", "(", "q", "*", "queue", ")", "Close", "(", ")", "{", "q", ".", "mtx", ".", "Lock", "(", ")", "\n", "defer", "q", ".", "mtx", ".", "Unlock", "(", ")", "\n\n", "if", "q", ".", "<mask>", "==", "nil", "{", "return", "\n", "}", "\n\n", "...
1,188
all-1189
[ "flattenDVSContactInfo", "reads", "various", "fields", "from", "a", "DVSContactInfo", "into", "the", "passed", "in", "ResourceData", "." ]
[ "func", "flattenDVSContactInfo", "(", "d", "*", "schema", ".", "ResourceData", ",", "obj", "types", ".", "DVSContactInfo", ")", "error", "{", "d", ".", "<mask>", "(", "\"", "\"", ",", "obj", ".", "Name", ")", "\n", "d", ".", "Set", "(", "\"", "\"", ...
1,189
all-1190
[ "buildHistogram", "builds", "the", "key", "-", "value", "size", "histogram", ".", "When", "keyPrefix", "is", "set", "only", "the", "keys", "that", "have", "prefix", "keyPrefix", "are", "considered", "for", "creating", "the", "histogram" ]
[ "func", "(", "db", "*", "DB", ")", "buildHistogram", "(", "keyPrefix", "[", "]", "byte", ")", "*", "sizeHistogram", "{", "txn", ":=", "<mask>", ".", "NewTransaction", "(", "false", ")", "\n", "defer", "txn", ".", "Discard", "(", ")", "\n\n", "itr", "...
1,190
all-1191
[ "Do", "executes", "DOM", ".", "getContentQuads", "against", "the", "provided", "context", ".", "returns", ":", "quads", "-", "Quads", "that", "describe", "node", "layout", "relative", "to", "viewport", "." ]
[ "func", "(", "p", "*", "GetContentQuadsParams", ")", "Do", "(", "ctx", "context", ".", "Context", ")", "(", "quads", "[", "]", "Quad", ",", "err", "error", ")", "{", "// execute", "<mask>", "res", "GetContentQuadsReturns", "\n", "err", "=", "cdp", ".", ...
1,191
all-1192
[ "Do", "executes", "Page", ".", "setDocumentContent", "against", "the", "provided", "context", "." ]
[ "func", "(", "p", "*", "SetDocumentContentParams", ")", "Do", "(", "ctx", "<mask>", ".", "Context", ")", "(", "err", "error", ")", "{", "return", "cdp", ".", "Execute", "(", "ctx", ",", "CommandSetDocumentContent", ",", "p", ",", "nil", ")", "\n", "}" ...
1,192
all-1193
[ "NewMockECSSDK", "creates", "a", "new", "mock", "instance" ]
[ "func", "NewMockECSSDK", "(", "ctrl", "*", "gomock", ".", "<mask>", ")", "*", "MockECSSDK", "{", "mock", ":=", "&", "MockECSSDK", "{", "ctrl", ":", "ctrl", "}", "\n", "mock", ".", "recorder", "=", "&", "MockECSSDKMockRecorder", "{", "mock", "}", "\n", ...
1,193
all-1194
[ "Set", "is", "required", "for", "kingpin", "interfaces", "to", "allow", "command", "line", "params", "to", "be", "set", "to", "our", "map", "datatype" ]
[ "func", "(", "o", "*", "MapComplex128Option", ")", "Set", "(", "value", "string", ")", "error", "{", "parts", ":=", "stringMapRegex", ".", "Split", "(", "value", ",", "2", ")", "\n", "if", "len", "(", "parts", ")", "!=", "2", "{", "return", "fmt", ...
1,194
all-1195
[ "Do", "executes", "Log", ".", "startViolationsReport", "against", "the", "provided", "context", "." ]
[ "func", "(", "p", "*", "StartViolationsReportParams", ")", "Do", "(", "ctx", "<mask>", ".", "Context", ")", "(", "err", "error", ")", "{", "return", "cdp", ".", "Execute", "(", "ctx", ",", "CommandStartViolationsReport", ",", "p", ",", "nil", ")", "\n", ...
1,195
all-1196
[ "Reset", "clears", "response", "contents", "." ]
[ "func", "(", "resp", "*", "Response", ")", "Reset", "(", ")", "{", "resp", ".", "Header", ".", "Reset", "(", ")", "\n", "resp", ".", "resetSkipHeader", "(", ")", "\n", "resp", ".", "SkipBody", "=", "<mask>", "\n", "resp", ".", "raddr", "=", "nil", ...
1,196
all-1197
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "RequestDatabaseNamesParams", ")", "UnmarshalJSON", "(", "<mask>", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb3", "("...
1,197
all-1198
[ "/", "*", "Private", "methods" ]
[ "func", "(", "a", "*", "AddrBook", ")", "saveRoutine", "(", ")", "{", "dumpAddressTicker", ":=", "time", ".", "NewTicker", "(", "dumpAddressInterval", ")", "\n", "<mask>", ":", "for", "{", "select", "{", "case", "<-", "dumpAddressTicker", ".", "C", ":", ...
1,198
all-1199
[ "PeekPayloadField", "extracts", "the", "specified", "field", "from", "the", "serialized", "JWT", "buf", "s", "payload", "(", "ie", "the", "token", "claims", ")", ".", "An", "error", "will", "be", "returned", "if", "the", "field", "is", "not", "present", "i...
[ "func", "PeekPayloadField", "(", "buf", "[", "]", "<mask>", ",", "field", "string", ")", "(", "string", ",", "error", ")", "{", "return", "peekField", "(", "buf", ",", "field", ",", "tokenPositionPayload", ")", "\n", "}" ]
1,199
all-1200
[ "GetValue", "returns", "the", "Value", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "w", "*", "WidgetMarker", ")", "GetValue", "(", ")", "string", "{", "if", "w", "==", "nil", "||", "w", ".", "<mask>", "==", "nil", "{", "return", "\"", "\"", "\n", "}", "\n", "return", "*", "w", ".", "Value", "\n", "}" ]