id
int32
0
25.3k
idx
stringlengths
5
9
nl_tokens
listlengths
1
418
pl_tokens
listlengths
22
4.98k
2,300
all-2301
[ "sourceAttach", "attaches", "a", "source", "to", "the", "default", "main", "loop", "context", "." ]
[ "func", "sourceAttach", "(", "src", "*", "C", ".", "struct__GSource", ",", "rf", "reflect", ".", "Value", ",", "args", "...", "interface", "{", "}", ")", "(", "SourceHandle", ",", "error", ")", "{", "if", "src", "==", "nil", "{", "return", "0", ",", ...
2,301
all-2302
[ "Object", "returns", "the", "position", "of", "the", "end", "of", "the", "object", "that", "begins", "at", "the", "specified", "pos" ]
[ "func", "Object", "(", "in", "[", "]", "byte", ",", "pos", "int", ")", "(", "int", ",", "error", ")", "{", "pos", ",", "err", ":=", "skipSpace", "(", "in", ",", "pos", ")", "\n", "if", "err", "!=", "nil", "{", "return", "0", ",", "err", "\n",...
2,302
all-2303
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "EntryPreview", ")", "UnmarshalJSON", "(", "<mask>", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime39", "(", "&", "r",...
2,303
all-2304
[ "AddUnmatch", "adds", "a", "refular", "expression", "into", "the", "unmatch", "list", "." ]
[ "func", "(", "r", "*", "Rule", ")", "AddUnmatch", "(", "unmatch", "string", ")", "error", "{", "unmatchRegexp", ",", "err", ":=", "regexp", ".", "Compile", "(", "\"", "\"", "+", "unmatch", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", ...
2,304
all-2305
[ "Age", "gives", "the", "time", "since", "the", "state", "has", "been", "activated", "." ]
[ "func", "(", "a", "*", "ActiveState", ")", "Age", "(", "t", "<mask>", ".", "Time", ")", "time", ".", "Duration", "{", "return", "t", ".", "Sub", "(", "a", ".", "startTime", ")", "\n", "}" ]
2,305
all-2306
[ "isThresholdSet", "returns", "true", "if", "one", "of", "min", "max", "warn", "or", "crit", "are", "set", "and", "false", "otherwise", ".", "They", "are", "determined", "to", "be", "set", "if", "they", "are", "not", "a", ")", "the", "nil", "pointer", "...
[ "func", "isThresholdSet", "(", "t", "*", "float64", ")", "bool", "{", "switch", "{", "case", "t", "==", "nil", ":", "return", "false", "\n", "<mask>", "math", ".", "IsInf", "(", "*", "t", ",", "0", ")", ":", "return", "false", "\n", "case", "math",...
2,306
all-2307
[ "Struct", "validates", "a", "struct", "even", "it", "s", "nested", "structs", "and", "returns", "a", "struct", "containing", "the", "errors", "NOTE", ":", "Nested", "Arrays", "or", "Maps", "of", "structs", "do", "not", "get", "validated", "only", "the", "A...
[ "func", "(", "v", "*", "Validate", ")", "Struct", "(", "s", "<mask>", "{", "}", ")", "*", "StructErrors", "{", "return", "v", ".", "structRecursive", "(", "s", ",", "s", ",", "s", ")", "\n", "}" ]
2,307
all-2308
[ "printDash", "-", "Prints", "dash", "(", "on", "top", "and", "header", ")", "." ]
[ "func", "(", "t", "*", "<mask>", ")", "printDash", "(", ")", "{", "s", ":=", "\"", "\"", "\n", "for", "i", ":=", "0", ";", "i", "<", "t", ".", "lineLength", "(", ")", "-", "2", ";", "i", "++", "{", "s", "+=", "\"", "\"", "\n", "}", "\n", ...
2,308
all-2309
[ "ServingURL", "returns", "a", "URL", "that", "will", "serve", "an", "image", "from", "Blobstore", "." ]
[ "func", "ServingURL", "(", "c", "context", ".", "Context", ",", "key", "appengine", ".", "BlobKey", ",", "opts", "*", "ServingURLOptions", ")", "(", "*", "url", ".", "URL", ",", "error", ")", "{", "req", ":=", "&", "pb", ".", "ImagesGetUrlBaseRequest", ...
2,309
all-2310
[ "Check", "that", "all", "the", "given", "updates", "are", "applied", "." ]
[ "func", "checkAllUpdatesAreApplied", "(", "tx", "*", "sql", ".", "Tx", ",", "updates", "[", "]", "Update", ")", "error", "{", "versions", ",", "err", ":=", "selectSchemaVersions", "(", "tx", ")", "\n", "if", "err", "!=", "nil", "{", "return", "fmt", "....
2,310
all-2311
[ "filterAndFixLinks", "removes", "from", "links", "all", "the", "records", "we", "don", "t", "care", "about", "and", "strops", "the", "/", "REST", "/", "prefix" ]
[ "func", "filterAndFixLinks", "(", "links", "[", "]", "string", ",", "filter", "DomainFilter", ")", "[", "]", "string", "{", "var", "result", "[", "]", "string", "\n", "for", "_", ",", "link", ":=", "range", "links", "{", "// link looks like /REST/CNAMERecord...
2,311
all-2312
[ "flattenHostVirtualSwitchSpec", "reads", "various", "fields", "from", "a", "HostVirtualSwitchSpec", "into", "the", "passed", "in", "ResourceData", "." ]
[ "func", "flattenHostVirtualSwitchSpec", "(", "d", "*", "schema", ".", "ResourceData", ",", "obj", "*", "types", ".", "HostVirtualSwitchSpec", ")", "error", "{", "d", ".", "Set", "(", "\"", "\"", ",", "obj", ".", "Mtu", ")", "\n", "d", ".", "<mask>", "(...
2,312
all-2313
[ "ExpandAliases", "returns", "members", "of", "multiple", "aliases", "duplicates", "are", "pruned" ]
[ "func", "(", "a", "RepoAliases", ")", "ExpandAliases", "(", "logins", "sets", ".", "String", ")", "sets", ".", "String", "{", "if", "a", "==", "nil", "{", "return", "logins", "\n", "}", "\n", "// Make logins a copy of the original set to avoid modifying the origin...
2,313
all-2314
[ "GetRecordings", "returns", "an", "array", "of", "recordings", "for", "this", "Call", ".", "Note", "there", "may", "be", "more", "than", "one", "Page", "of", "results", "." ]
[ "func", "(", "c", "*", "CallService", ")", "GetRecordings", "(", "ctx", "context", ".", "Context", ",", "callSid", "string", ",", "data", "url", ".", "Values", ")", "(", "*", "RecordingPage", ",", "error", ")", "{", "if", "data", "==", "nil", "{", "d...
2,314
all-2315
[ "StringSize", "is", "like", "Size", "with", "a", "string", "as", "parameter", "." ]
[ "func", "StringSize", "(", "s", "string", ")", "int", "{", "n", ":=", "0", "\n", "for", "_", ",", "r", ":=", "<mask>", "s", "{", "n", "+=", "RuneLen", "(", "r", ")", "\n", "}", "\n", "return", "n", "\n", "}" ]
2,315
all-2316
[ "TODO", "(", "spxtr", ")", ":", "Cache", "rate", "limit", "." ]
[ "func", "handleLog", "(", "lc", "logClient", ")", "http", ".", "HandlerFunc", "{", "return", "func", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ")", "{", "setHeadersNoCaching", "(", "w", ")", "\n", "w", ".", "Header...
2,316
all-2317
[ "FetchCheckBundles", "retrieves", "all", "check", "bundles", "available", "to", "the", "API", "Token", "." ]
[ "func", "(", "a", "*", "API", ")", "FetchCheckBundles", "(", ")", "(", "*", "[", "]", "CheckBundle", ",", "error", ")", "{", "<mask>", ",", "err", ":=", "a", ".", "Get", "(", "config", ".", "CheckBundlePrefix", ")", "\n", "if", "err", "!=", "nil", ...
2,317
all-2318
[ "isName", "returns", "true", "if", "n", "is", "an", "identifier", "with", "the", "given", "name", "." ]
[ "func", "isName", "(", "n", "ast", ".", "Expr", ",", "name", "string", ")", "bool", "{", "id", ",", "<mask>", ":=", "n", ".", "(", "*", "ast", ".", "Ident", ")", "\n", "return", "ok", "&&", "id", ".", "String", "(", ")", "==", "name", "\n", "...
2,318
all-2319
[ "native", "returns", "a", "pointer", "to", "the", "underlying", "GdkPixbuf", "." ]
[ "func", "(", "v", "*", "PixbufFormat", ")", "native", "(", ")", "*", "C", ".", "GdkPixbufFormat", "{", "if", "v", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "return", "v", ".", "<mask>", "\n", "}" ]
2,319
all-2320
[ "getPatch", "gets", "the", "patch", "for", "the", "provided", "PR", "and", "creates", "a", "local", "copy", "of", "it", ".", "It", "returns", "its", "location", "in", "the", "filesystem", "and", "any", "encountered", "error", "." ]
[ "func", "(", "s", "*", "Server", ")", "getPatch", "(", "org", ",", "repo", ",", "targetBranch", "string", ",", "num", "int", ")", "(", "string", ",", "error", ")", "{", "patch", ",", "err", ":=", "s", ".", "ghc", ".", "GetPullRequestPatch", "(", "o...
2,320
all-2321
[ "ShiftACL", "updates", "uid", "and", "gid", "for", "file", "ACLs", "when", "entering", "/", "exiting", "a", "namespace" ]
[ "func", "ShiftACL", "(", "<mask>", "string", ",", "shiftIds", "func", "(", "uid", "int64", ",", "gid", "int64", ")", "(", "int64", ",", "int64", ")", ")", "error", "{", "err", ":=", "shiftAclType", "(", "path", ",", "C", ".", "ACL_TYPE_ACCESS", ",", ...
2,321
all-2322
[ "Command", "returns", "the", "human", "-", "formatted", "command", "with", "arguments", "." ]
[ "func", "(", "c", "*", "Child", ")", "Command", "(", ")", "string", "{", "list", ":=", "append", "(", "[", "]", "string", "{", "c", ".", "<mask>", "}", ",", "c", ".", "args", "...", ")", "\n", "return", "strings", ".", "Join", "(", "list", ",",...
2,322
all-2323
[ "recvMessage", "blocks", "waiting", "for", "a", "standalone", "response", "message", "(", "typically", "a", "control", "message", ")" ]
[ "func", "(", "c", "*", "Connection", ")", "recvMessage", "(", "ctx", "context", ".", "Context", ",", "<mask>", "message", ",", "mex", "*", "messageExchange", ")", "error", "{", "frame", ",", "err", ":=", "mex", ".", "recvPeerFrameOfType", "(", "msg", "."...
2,323
all-2324
[ "/", "*" ]
[ "func", "FrameSet_New", "(", "frange", "*", "C", ".", "char", ")", "(", "FrameSetId", ",", "Error", ")", "{", "fset", ",", "e", ":=", "fileseq", ".", "NewFrameSet", "(", "C", ".", "GoString", "(", "frange", ")", ")", "\n", "if", "e", "!=", "nil", ...
2,324
all-2325
[ "func", "(", "s", "*", "KV", ")", "debugPrintMore", "()", "{", "s", ".", "lc", ".", "debugPrintMore", "()", "}", "//", "debugPrintMore", "shows", "key", "ranges", "of", "each", "level", ".", "func", "(", "s", "*", "levelsController", ")", "debugPrintMore...
[ "func", "(", "s", "*", "levelsController", ")", "reserveFileID", "(", ")", "uint64", "{", "<mask>", ":=", "atomic", ".", "AddUint64", "(", "&", "s", ".", "nextFileID", ",", "1", ")", "\n", "return", "id", "-", "1", "\n", "}" ]
2,325
all-2326
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "WebSocketResponse", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "<mask>", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork", "(", "&", "w", ",", "v", ")", ...
2,326
all-2327
[ "AddTCPPorts", "adds", "TCP", "-", "only", "ports", ".", "Similar", "to", "using", "-", "pT", ":", "<port1", ">", "<port2", ">", "..." ]
[ "func", "(", "s", "Scan", ")", "AddTCPPorts", "(", "ports", "...", "uint16", ")", "Scan", "{", "s", ".", "configTCPPorts", "=", "append", "(", "s", ".", "configTCPPorts", ",", "<mask>", "...", ")", "\n", "return", "s", "\n", "}" ]
2,327
all-2328
[ "UpdateRecords", "updates", "a", "given", "set", "of", "old", "records", "to", "a", "new", "set", "of", "records", "in", "a", "given", "hosted", "zone", "." ]
[ "func", "(", "p", "*", "GoogleProvider", ")", "UpdateRecords", "(", "records", ",", "oldRecords", "[", "]", "*", "endpoint", ".", "Endpoint", ")", "error", "{", "change", ":=", "&", "dns", ".", "Change", "{", "}", "\n\n", "change", ".", "Additions", "=...
2,328
all-2329
[ "OptQueryShards", "restricts", "the", "set", "of", "shards", "on", "which", "a", "query", "operates", "." ]
[ "func", "OptQueryShards", "(", "shards", "...", "uint64", ")", "QueryOption", "{", "return", "func", "(", "options", "*", "QueryOptions", ")", "error", "{", "<mask>", ".", "Shards", "=", "append", "(", "options", ".", "Shards", ",", "shards", "...", ")", ...
2,329
all-2330
[ "New", "creates", "a", "new", "configured", "certificate", "signer", "." ]
[ "func", "New", "(", "config", "Config", ")", "(", "<mask>", ".", "CertSigner", ",", "error", ")", "{", "newCertSigner", ":=", "&", "certSigner", "{", "Config", ":", "config", ",", "}", "\n\n", "// Dependencies.", "if", "newCertSigner", ".", "VaultClient", ...
2,330
all-2331
[ "GetTimeout", "returns", "the", "status", "code", "and", "body", "of", "url", ".", "The", "contents", "of", "dst", "will", "be", "replaced", "by", "the", "body", "and", "returned", "if", "the", "dst", "is", "too", "small", "a", "new", "slice", "will", ...
[ "func", "(", "c", "*", "Client", ")", "GetTimeout", "(", "dst", "[", "]", "byte", ",", "url", "string", ",", "timeout", "time", ".", "Duration", ")", "(", "statusCode", "int", ",", "body", "[", "]", "byte", ",", "err", "error", ")", "{", "return", ...
2,331
all-2332
[ "AdapterOf", "returns", "the", "adapter", "for", "typ", "setting", "ok", "to", "true", "if", "one", "was", "found", "false", "otherwise", "." ]
[ "func", "AdapterOf", "(", "typ", "reflect", ".", "Type", ")", "(", "a", "Adapter", ",", "<mask>", "bool", ")", "{", "adapterMutex", ".", "RLock", "(", ")", "\n", "a", ",", "ok", "=", "adapterStore", "[", "typ", "]", "\n", "adapterMutex", ".", "RUnloc...
2,332
all-2333
[ "Verify", "runs", "the", "current", "test", "case", "against", "a", "Mock", "Service", ".", "Will", "cleanup", "interactions", "between", "tests", "within", "a", "suite", "." ]
[ "func", "(", "p", "*", "Pact", ")", "Verify", "(", "integrationTest", "func", "(", ")", "error", ")", "error", "{", "p", ".", "Setup", "(", "true", ")", "\n", "log", ".", "Println", "(", "\"", "\"", ")", "\n\n", "// Check if we are verifying messages or ...
2,333
all-2334
[ "query", "the", "name", "of", "an", "active", "uniform" ]
[ "func", "GetActiveUniformName", "(", "program", "uint32", ",", "uniformIndex", "uint32", ",", "bufSize", "int32", ",", "<mask>", "*", "int32", ",", "uniformName", "*", "uint8", ")", "{", "syscall", ".", "Syscall6", "(", "gpGetActiveUniformName", ",", "5", ",",...
2,334
all-2335
[ "Validate", "validates", "Kubernetes", "options", "." ]
[ "func", "(", "o", "*", "ExperimentalKubernetesOptions", ")", "Validate", "(", "dryRun", "bool", ")", "error", "{", "if", "dryRun", "&&", "o", ".", "DeckURI", "==", "\"", "\"", "{", "return", "errors", ".", "New", "(", "\"", "\"", ")", "\n", "}", "\n\...
2,335
all-2336
[ "Do", "executes", "DOMStorage", ".", "removeDOMStorageItem", "against", "the", "provided", "context", "." ]
[ "func", "(", "p", "*", "RemoveDOMStorageItemParams", ")", "Do", "(", "ctx", "context", ".", "<mask>", ")", "(", "err", "error", ")", "{", "return", "cdp", ".", "Execute", "(", "ctx", ",", "CommandRemoveDOMStorageItem", ",", "p", ",", "nil", ")", "\n", ...
2,336
all-2337
[ "-----------------------------------------------------------------------------", "window", ":", "destroy", "-----------------------------------------------------------------------------", "/", "*", "destroy", "window", "and", "all", "the", "trackers", "associated", "with", "it" ]
[ "func", "(", "win", "*", "Window", ")", "Destroy", "(", ")", "{", "C", ".", "cvDestroyWindow", "(", "win", ".", "name_c", ")", "\n", "delete", "(", "allWindows", ",", "win", ".", "name", ")", "\n\n", "for", "_", ",", "bar_name", ":=", "<mask>", "wi...
2,337
all-2338
[ "FirewallPolicy", "retrieves", "a", "detailed", "view", "of", "one", "firewall", "policy" ]
[ "func", "(", "c", "*", "Client", ")", "FirewallPolicy", "(", "identifier", "string", ")", "(", "*", "FirewallPolicy", ",", "error", ")", "{", "policy", ":=", "new", "(", "FirewallPolicy", ")", "\n", "_", ",", "err", ":=", "c", ".", "MakeApiRequest", "(...
2,338
all-2339
[ "NewURIFromAddress", "parses", "the", "passed", "address", "and", "returns", "a", "URI", "." ]
[ "func", "NewURIFromAddress", "(", "<mask>", "string", ")", "(", "*", "URI", ",", "error", ")", "{", "uri", ",", "err", ":=", "parseAddress", "(", "address", ")", "\n", "if", "err", "!=", "nil", "{", "return", "&", "URI", "{", "error", ":", "err", "...
2,339
all-2340
[ "/", "*", "FilterGet", "retrieves", "only", "one", "item", "based", "on", "a", "filter", "It", "is", "used", "as", "a", "shortcut", "to", "FilterGetAll", "with", "size", "==", "1" ]
[ "func", "(", "s", "RethinkStore", ")", "FilterGet", "(", "filter", "map", "[", "string", "]", "interface", "{", "}", ",", "store", "string", ",", "dst", "interface", "{", "}", ",", "opts", "ObjectStoreOptions", ")", "error", "{", "// var rootTerm = s.getRoot...
2,340
all-2341
[ "SetDeletable", "is", "a", "wrapper", "around", "gtk_window_set_deletable", "()", "." ]
[ "func", "(", "v", "*", "Window", ")", "SetDeletable", "(", "setting", "bool", ")", "{", "C", ".", "gtk_window_set_deletable", "(", "v", ".", "native", "(", ")", ",", "gbool", "(", "<mask>", ")", ")", "\n", "}" ]
2,341
all-2342
[ "Exec", "executes", "a", "newImageCommand", "." ]
[ "func", "(", "c", "*", "newImageCommand", ")", "Exec", "(", "indexOffset", "int", ")", "error", "{", "i", ",", "err", ":=", "theGraphicsDriver", ".", "NewImage", "(", "c", ".", "width", ",", "c", ".", "height", ")", "\n", "if", "err", "!=", "nil", ...
2,342
all-2343
[ "Prev", "moves", "the", "visible", "list", "back", "one", "item", ".", "If", "the", "selected", "item", "is", "out", "of", "view", "the", "new", "select", "item", "becomes", "the", "last", "visible", "item", ".", "If", "the", "list", "is", "already", "...
[ "func", "(", "l", "*", "<mask>", ")", "Prev", "(", ")", "{", "if", "l", ".", "cursor", ">", "0", "{", "l", ".", "cursor", "--", "\n", "}", "\n\n", "if", "l", ".", "start", ">", "l", ".", "cursor", "{", "l", ".", "start", "=", "l", ".", "c...
2,343
all-2344
[ "NewWriter", "creates", "a", "Nitro", "writer" ]
[ "func", "(", "m", "*", "Nitro", ")", "NewWriter", "(", ")", "*", "Writer", "{", "w", ":=", "m", ".", "newWriter", "(", ")", "\n", "w", ".", "next", "=", "m", ".", "wlist", "\n", "m", ".", "wlist", "=", "w", "\n", "w", ".", "dwrCtx", ".", "I...
2,344
all-2345
[ "retrieve", "the", "info", "log", "string", "from", "a", "program", "pipeline", "object" ]
[ "func", "GetProgramPipelineInfoLog", "(", "pipeline", "uint32", ",", "bufSize", "int32", ",", "<mask>", "*", "int32", ",", "infoLog", "*", "uint8", ")", "{", "syscall", ".", "Syscall6", "(", "gpGetProgramPipelineInfoLog", ",", "4", ",", "uintptr", "(", "pipeli...
2,345
all-2346
[ "ReleaseIPResource", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockCNIClient", ")", "ReleaseIPResource", "(", "arg0", "*", "ecscni", ".", "Config", ")", "error", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=",...
2,346
all-2347
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "PostData", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoHar3", "(", "&", "w", ",", "v", ")", "\n", "r...
2,347
all-2348
[ "PixbufLoaderNewWithType", "()", "is", "a", "wrapper", "around", "gdk_pixbuf_loader_new_with_type", "()", "." ]
[ "func", "PixbufLoaderNewWithType", "(", "t", "string", ")", "(", "*", "PixbufLoader", ",", "error", ")", "{", "var", "err", "*", "C", ".", "GError", "\n\n", "cstr", ":=", "C", ".", "CString", "(", "t", ")", "\n", "defer", "C", ".", "free", "(", "un...
2,348
all-2349
[ "Stem", "a", "word", "in", "the", "specified", "language", "." ]
[ "func", "Stem", "(", "word", ",", "language", "string", ",", "stemStopWords", "bool", ")", "(", "stemmed", "string", ",", "err", "error", ")", "{", "var", "f", "func", "(", "string", ",", "bool", ")", "string", "\n", "switch", "language", "{", "case", ...
2,349
all-2350
[ "Static", "returns", "a", "middleware", "handler", "that", "serves", "static", "files", "in", "the", "given", "directory", "." ]
[ "func", "Serve", "(", "urlPrefix", "string", ",", "fs", "ServeFileSystem", ")", "gin", ".", "HandlerFunc", "{", "fileserver", ":=", "http", ".", "FileServer", "(", "fs", ")", "\n", "if", "urlPrefix", "!=", "\"", "\"", "{", "fileserver", "=", "http", ".",...
2,350
all-2351
[ "Use", "loadPaths", "to", "load", "a", "file", "of", "new", "-", "line", "delimited", "paths", "such", "as", "resolving", "file", "data", "referenced", "in", "a", "paths", "-", "from", "-", "repo", "command", "." ]
[ "func", "(", "g", "*", "Group", ")", "loadPaths", "(", "r", "<mask>", ".", "Reader", ")", "error", "{", "s", ":=", "bufio", ".", "NewScanner", "(", "r", ")", "\n\n", "for", "s", ".", "Scan", "(", ")", "{", "l", ":=", "strings", ".", "TrimSpace", ...
2,351
all-2352
[ "HasId", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "b", "*", "Board", ")", "HasId", "(", ")", "bool", "{", "if", "b", "!=", "nil", "&&", "b", ".", "<mask>", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
2,352
all-2353
[ "NewReporter", "returns", "a", "new", "Reporter", ".", "You", "must", "specify", "the", "channel", "bufferSize", "and", "the", "goroutine", "poolSize", ".", "You", "can", "pass", "in", "nil", "for", "the", "transport", "and", "it", "will", "create", "an", ...
[ "func", "NewReporter", "(", "bufferSize", ",", "poolSize", "int", ",", "transport", "http", ".", "RoundTripper", ")", "Reporter", "{", "r", ":=", "<mask>", "(", "BasicReporter", ")", "\n", "if", "transport", "==", "nil", "{", "transport", "=", "&", "http",...
2,353
all-2354
[ "returns", "the", "cell", "value", "for", "a", "given", "col", "and", "row", ".", "Col", "and", "row", "are", "absolute", "value", ".", "But", "cache", "keeps", "limited", "number", "of", "rows", "to", "minimize", "memory", "usage", ".", "So", "the", "...
[ "func", "(", "d", "*", "dbCache", ")", "value", "(", "row", ",", "col", "int", ")", "string", "{", "rowId", ":=", "<mask>", "-", "d", ".", "firstRow", "\n", "if", "rowId", ">=", "len", "(", "d", ".", "data", ")", "{", "return", "\"", "\"", "\n"...
2,354
all-2355
[ "TODO", "(", "jrick", ")", "Mask", "(", "depends", "on", "Pattern", ")", "MaskSurface", "is", "a", "wrapper", "around", "cairo_mask_surface", "()", "." ]
[ "func", "(", "v", "*", "<mask>", ")", "MaskSurface", "(", "surface", "*", "Surface", ",", "surfaceX", ",", "surfaceY", "float64", ")", "{", "C", ".", "cairo_mask_surface", "(", "v", ".", "native", "(", ")", ",", "surface", ".", "native", "(", ")", ",...
2,355
all-2356
[ "ParseFile", "takes", "an", "argument", "of", "the", "form", "repo", "[" ]
[ "func", "ParseFile", "(", "arg", "string", ")", "(", "*", "pfs", ".", "<mask>", ",", "error", ")", "{", "repoAndRest", ":=", "strings", ".", "SplitN", "(", "arg", ",", "\"", "\"", ",", "2", ")", "\n", "if", "repoAndRest", "[", "0", "]", "==", "\"...
2,356
all-2357
[ "refresh", "updates", "the", "cookie", "and", "expiration", "used", "to", "sign", "requests", "from", "a", "successful", "session", "creation", "API", "response", "." ]
[ "func", "(", "s", "*", "cookieSigner", ")", "refresh", "(", "resp", "*", "http", ".", "Response", ")", "error", "{", "if", "resp", ".", "StatusCode", "!=", "204", "{", "return", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "resp", ".", "Status", ")"...
2,357
all-2358
[ "UnmarshalYAML", "implements", "the", "yaml", ".", "Unmarshaler", "interface", "." ]
[ "func", "(", "c", "*", "RemoteReadConfig", ")", "UnmarshalYAML", "(", "unmarshal", "func", "(", "interface", "{", "}", ")", "error", ")", "error", "{", "*", "c", "=", "DefaultRemoteReadConfig", "\n", "type", "<mask>", "RemoteReadConfig", "\n", "if", "err", ...
2,358
all-2359
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "SetDOMStorageItemParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage1", "(", ...
2,359
all-2360
[ "UpdateSecretVersionStage", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockSecretsManagerAPI", ")", "UpdateSecretVersionStage", "(", "arg0", "*", "secretsmanager", ".", "UpdateSecretVersionStageInput", ")", "(", "*", "secretsmanager", ".", "UpdateSecretVersionStageOutput", ",", "error", ")", "{", "ret", ":=", "m...
2,360
all-2361
[ "Locator", "returns", "a", "locator", "for", "the", "given", "resource" ]
[ "func", "(", "r", "*", "CloudAccount", ")", "Locator", "(", "api", "*", "API", ")", "*", "CloudAccountLocator", "{", "for", "_", ",", "l", ":=", "<mask>", "r", ".", "Links", "{", "if", "l", "[", "\"", "\"", "]", "==", "\"", "\"", "{", "return", ...
2,361
all-2362
[ "EncodeSQL", "encodes", "the", "value", "into", "an", "SQL", "statement", ".", "Can", "be", "binary", "." ]
[ "func", "(", "v", "Value", ")", "EncodeSQL", "(", "b", "BinWriter", ")", "{", "<mask>", "{", "case", "v", ".", "typ", "==", "Null", ":", "b", ".", "Write", "(", "nullstr", ")", "\n", "case", "v", ".", "IsQuoted", "(", ")", ":", "encodeBytesSQL", ...
2,362
all-2363
[ "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", "(", "s", "*", "ScatterplotRequests", ")", "GetXOk", "(", ")", "(", "ScatterplotRequest", ",", "bool", ")", "{", "if", "s", "==", "nil", "||", "s", ".", "X", "==", "nil", "{", "return", "ScatterplotRequest", "{", "}", ",", "<mask>", "\n", "}"...
2,363
all-2364
[ "unsetSocket", "releases", "any", "slave", "and", "/", "or", "master", "sockets", "reserved", "." ]
[ "func", "(", "s", "*", "<mask>", ")", "unsetSocket", "(", ")", "{", "if", "s", ".", "masterSocket", "!=", "nil", "{", "s", ".", "masterSocket", ".", "Release", "(", ")", "\n", "}", "\n", "if", "s", ".", "slaveSocket", "!=", "nil", "{", "s", ".", ...
2,364
all-2365
[ "NewInlineQueryAnswer", "creates", "a", "new", "inline", "query", "answer", "." ]
[ "func", "(", "api", "*", "TelegramBotAPI", ")", "NewInlineQueryAnswer", "(", "queryID", "string", ",", "<mask>", "[", "]", "InlineQueryResult", ")", "*", "InlineQueryAnswer", "{", "return", "&", "InlineQueryAnswer", "{", "api", ":", "api", ",", "QueryID", ":",...
2,365
all-2366
[ "F", "is", "a", "short", "-", "hand", "function", "to", "extract", "the", "database", "BSON", "field", "name", "of", "a", "model", "field", ".", "Additionally", "it", "supports", "the", "-", "prefix", "for", "retrieving", "sort", "keys", ".", "Note", ":"...
[ "func", "F", "(", "m", "Model", ",", "field", "string", ")", "string", "{", "// check if prefixed", "prefixed", ":=", "strings", ".", "HasPrefix", "(", "field", ",", "\"", "\"", ")", "\n\n", "// remove prefix", "if", "prefixed", "{", "field", "=", "strings...
2,366
all-2367
[ "enable", "binds", "the", "array", "buffer", "the", "given", "program", "to", "use", "the", "array", "buffer", "." ]
[ "func", "(", "a", "*", "arrayBufferLayout", ")", "<mask>", "(", "context", "*", "context", ",", "program", "program", ")", "{", "for", "i", ":=", "range", "a", ".", "parts", "{", "context", ".", "enableVertexAttribArray", "(", "program", ",", "i", ")", ...
2,367
all-2368
[ "Has", "checks", "the", "existence", "of", "the", "key", "in", "the", "context", "." ]
[ "func", "(", "c", "*", "<mask>", ")", "Has", "(", "key", "string", ")", "bool", "{", "return", "c", ".", "Value", "(", "key", ")", "!=", "nil", "\n", "}" ]
2,368
all-2369
[ "DisablePublicServiceAccess", "-", "will", "ensure", "any", "public", "plan", "is", "made", "private" ]
[ "func", "(", "m", "*", "<mask>", ")", "DisablePublicServiceAccess", "(", "serviceInfo", "*", "ServiceInfo", ")", "error", "{", "for", "_", ",", "servicePlan", ":=", "range", "serviceInfo", ".", "AllPlans", "(", ")", "{", "for", "_", ",", "plan", ":=", "r...
2,369
all-2370
[ "BuyNumber", "attempts", "to", "buy", "the", "provided", "phoneNumber", "and", "returns", "it", "if", "successful", "." ]
[ "func", "(", "ipn", "*", "IncomingNumberService", ")", "BuyNumber", "(", "phoneNumber", "string", ")", "(", "*", "IncomingPhoneNumber", ",", "error", ")", "{", "data", ":=", "url", ".", "Values", "{", "\"", "\"", ":", "[", "]", "string", "{", "phoneNumbe...
2,370
all-2371
[ "PublishNamedEvent", "which", "name", "infered", "from", "eventBody", "interface", "name", "." ]
[ "func", "PublishNamedEvent", "(", "pub", "Publisher", ",", "eventBody", "<mask>", "{", "}", ")", "{", "name", ":=", "reflect", ".", "TypeOf", "(", "eventBody", ")", ".", "Name", "(", ")", "\n", "pub", ".", "Publish", "(", "name", ",", "eventBody", ")",...
2,371
all-2372
[ "SdNotify", "sends", "a", "specified", "string", "to", "the", "systemd", "notification", "socket", "." ]
[ "func", "SdNotify", "(", "state", "string", ")", "error", "{", "name", ":=", "os", ".", "Getenv", "(", "\"", "\"", ")", "\n", "if", "name", "==", "\"", "\"", "{", "return", "ErrSdNotifyNoSocket", "\n", "}", "\n\n", "conn", ",", "err", ":=", "net", ...
2,372
all-2373
[ "NotFound", "writes", "a", "404", "HTTP", "response" ]
[ "func", "(", "ctx", "*", "Cotex", ")", "NotFound", "(", "message", "string", ")", "{", "ctx", ".", "ResponseWriter", ".", "WriteHeader", "(", "404", ")", "\n", "ctx", ".", "ResponseWriter", ".", "Write", "(", "[", "]", "<mask>", "(", "message", ")", ...
2,373
all-2374
[ "MenuItemNewWithLabel", "()", "is", "a", "wrapper", "around", "gtk_menu_item_new_with_label", "()", "." ]
[ "func", "MenuItemNewWithLabel", "(", "label", "string", ")", "(", "*", "MenuItem", ",", "error", ")", "{", "cstr", ":=", "C", ".", "CString", "(", "<mask>", ")", "\n", "defer", "C", ".", "free", "(", "unsafe", ".", "Pointer", "(", "cstr", ")", ")", ...
2,374
all-2375
[ "WindowSetDefaultIconName", "is", "a", "wrapper", "around", "gtk_window_set_default_icon_name", "()", "." ]
[ "func", "WindowSetDefaultIconName", "(", "s", "string", ")", "{", "cstr", ":=", "(", "*", "C", ".", "gchar", ")", "(", "C", ".", "CString", "(", "s", ")", ")", "\n", "defer", "C", ".", "<mask>", "(", "unsafe", ".", "Pointer", "(", "cstr", ")", ")...
2,375
all-2376
[ "Load", "is", "a", "modified", "copy", "of", "k8s", ".", "io", "/", "kubernetes", "/", "pkg", "/", "client", "/", "unversioned", "/", "clientcmd", ".", "ClientConfigLoadingRules", ".", "Load", "Load", "starts", "by", "running", "the", "MigrationRules", "and"...
[ "func", "(", "rules", "*", "clientConfigLoadingRules", ")", "Load", "(", ")", "(", "*", "clientcmdConfig", ",", "error", ")", "{", "errlist", ":=", "[", "]", "error", "{", "}", "\n\n", "kubeConfigFiles", ":=", "[", "]", "string", "{", "}", "\n\n", "// ...
2,376
all-2377
[ "IsCreate", "returns", "true", "if", "the", "event", "tells", "that", "the", "key", "is", "newly", "created", "." ]
[ "func", "(", "e", "*", "<mask>", ")", "IsCreate", "(", ")", "bool", "{", "return", "e", ".", "Type", "==", "EventTypePut", "&&", "e", ".", "Kv", ".", "CreateRevision", "==", "e", ".", "Kv", ".", "ModRevision", "\n", "}" ]
2,377
all-2378
[ "newApps", "returns", "a", "Apps" ]
[ "func", "newApps", "(", "c", "*", "TsuruV1Client", ",", "namespace", "string", ")", "*", "apps", "{", "return", "&", "apps", "{", "client", ":", "c", ".", "RESTClient", "(", ")", ",", "<mask>", ":", "namespace", ",", "}", "\n", "}" ]
2,378
all-2379
[ "ReportInfo", "returns", "ChannelInfo", "for", "a", "channel", "." ]
[ "func", "(", "ch", "*", "Channel", ")", "ReportInfo", "(", "opts", "*", "IntrospectionOptions", ")", "ChannelInfo", "{", "return", "ChannelInfo", "{", "<mask>", ":", "ch", ".", "chID", ",", "CreatedStack", ":", "ch", ".", "createdStack", ",", "LocalPeer", ...
2,379
all-2380
[ "Clear", "function", "clear", "up", "the", "statsQueue" ]
[ "func", "(", "q", "*", "statsQueue", ")", "Clear", "(", ")", "{", "q", ".", "rwl", ".", "Lock", "(", ")", "\n", "defer", "q", ".", "rwl", ".", "Unlock", "(", ")", "\n", "q", ".", "back", "=", "-", "1", "\n", "q", ".", "front", "=", "0", "...
2,380
all-2381
[ "Upsert", "-" ]
[ "func", "(", "s", "*", "MockMongo", ")", "Upsert", "(", "selector", "<mask>", "{", "}", ",", "update", "interface", "{", "}", ")", "(", "info", "*", "mgo", ".", "ChangeInfo", ",", "err", "error", ")", "{", "err", "=", "s", ".", "Err", "\n", "retu...
2,381
all-2382
[ "Value", "converts", "a", "value", "to", "a", "database", "driver", "value" ]
[ "func", "(", "u", "MAC", ")", "Value", "(", ")", "(", "driver", ".", "Value", ",", "error", ")", "{", "return", "<mask>", ".", "Value", "(", "string", "(", "u", ")", ")", ",", "nil", "\n", "}" ]
2,382
all-2383
[ "GetIssueLabels", "returns", "the", "list", "of", "labels", "currently", "on", "issue", "org", "/", "repo#number", ".", "See", "https", ":", "//", "developer", ".", "github", ".", "com", "/", "v3", "/", "issues", "/", "labels", "/", "#list", "-", "labels...
[ "func", "(", "c", "*", "<mask>", ")", "GetIssueLabels", "(", "org", ",", "repo", "string", ",", "number", "int", ")", "(", "[", "]", "Label", ",", "error", ")", "{", "c", ".", "log", "(", "\"", "\"", ",", "org", ",", "repo", ",", "number", ")",...
2,383
all-2384
[ "NewStack", "-", "create", "new", "stack", "based", "on", "file" ]
[ "func", "NewStack", "(", "<mask>", "*", "os", ".", "File", ")", "(", "*", "Stack", ",", "error", ")", "{", "stack", ":=", "&", "Stack", "{", "file", ":", "file", ",", "fileName", ":", "file", ".", "Name", "(", ")", "}", "\n", "err", ":=", "stac...
2,384
all-2385
[ "/", "*", "Errorf", "uses", "msg", "as", "a", "format", "string", "with", "subsequent", "parameters", "as", "values", "and", "logs", "the", "resulting", "message", "to", "all", "added", "loggers", "at", "LogLevel", ".", "LevelError" ]
[ "func", "(", "b", "*", "Base", ")", "Errorf", "(", "msg", "string", ",", "a", "...", "<mask>", "{", "}", ")", "error", "{", "return", "b", ".", "Log", "(", "LevelError", ",", "nil", ",", "msg", ",", "a", "...", ")", "\n", "}" ]
2,385
all-2386
[ "Float64", "returns", "v", "s", "float64", "value", "converting", "from", "integer", "if", "necessary", ".", "If", "v", ".", "Kind", "()", "!", "=", "Float64", "and", "v", ".", "Kind", "()", "!", "=", "Int64", "Float64", "returns", "0", "." ]
[ "func", "(", "v", "Value", ")", "Float64", "(", ")", "float64", "{", "x", ",", "<mask>", ":=", "v", ".", "data", ".", "(", "float64", ")", "\n", "if", "!", "ok", "{", "x", ",", "ok", ":=", "v", ".", "data", ".", "(", "int64", ")", "\n", "if...
2,386
all-2387
[ "Authorizer", "returns", "a", "middleware", "that", "can", "be", "used", "to", "authorize", "a", "request", "by", "requiring", "an", "access", "token", "with", "the", "provided", "scope", "to", "be", "granted", "." ]
[ "func", "(", "a", "*", "Authenticator", ")", "Authorizer", "(", "scope", "string", ",", "force", ",", "loadClient", ",", "loadResourceOwner", "bool", ")", "func", "(", "http", ".", "Handler", ")", "http", ".", "<mask>", "{", "return", "func", "(", "next"...
2,387
all-2388
[ "backup", "does", "a", "backup", "of", "a", "file", "." ]
[ "func", "backup", "(", "filename", "string", ")", "error", "{", "if", "DO_BACKUP", "{", "if", "_", ",", "ok", ":=", "_FILES_BACKUPED", "[", "filename", "]", ";", "!", "ok", "{", "if", "err", ":=", "<mask>", ".", "Backup", "(", "filename", ")", ";", ...
2,388
all-2389
[ "TempFile", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockFileSystem", ")", "TempFile", "(", "arg0", ",", "arg1", "string", ")", "(", "*", "os", ".", "File", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ",", "...
2,389
all-2390
[ "NewPhoneNumberButton", "creates", "a", "button", "used", "in", "ButtonTemplate", "that", "upon", "clicking", "opens", "a", "native", "dialer" ]
[ "func", "NewPhoneNumberButton", "(", "title", "string", ",", "phone", "string", ")", "Button", "{", "return", "Button", "{", "<mask>", ":", "ButtonTypePhoneNumber", ",", "Title", ":", "title", ",", "Payload", ":", "phone", ",", "}", "\n", "}" ]
2,390
all-2391
[ "NewRemoteContext", "returns", "a", "context", "that", "gives", "access", "to", "the", "production", "APIs", "for", "the", "application", "at", "the", "given", "host", ".", "All", "communication", "will", "be", "performed", "over", "SSL", "unless", "the", "hos...
[ "func", "NewRemoteContext", "(", "host", "string", ",", "client", "*", "http", ".", "<mask>", ")", "(", "context", ".", "Context", ",", "error", ")", "{", "c", ",", "err", ":=", "NewClient", "(", "host", ",", "client", ")", "\n", "if", "err", "!=", ...
2,391
all-2392
[ "GetElapsedTime", "returns", "the", "elapsed", "time", "since", "an", "ExponentialBackOff", "instance", "is", "created", "and", "is", "reset", "when", "Reset", "()", "is", "called", ".", "The", "elapsed", "time", "is", "computed", "using", "time", ".", "Now", ...
[ "func", "(", "b", "*", "ConstantBackOff", ")", "GetElapsedTime", "(", ")", "time", ".", "Duration", "{", "return", "<mask>", ".", "Now", "(", ")", ".", "Sub", "(", "b", ".", "startTime", ")", "\n", "}" ]
2,392
all-2393
[ "WithWindowsVirtualKeyCode", "windows", "virtual", "key", "code", "(", "default", ":", "0", ")", "." ]
[ "func", "(", "p", "DispatchKeyEventParams", ")", "WithWindowsVirtualKeyCode", "(", "windowsVirtualKeyCode", "int64", ")", "*", "DispatchKeyEventParams", "{", "p", ".", "WindowsVirtualKeyCode", "=", "windowsVirtualKeyCode", "\n", "<mask>", "&", "p", "\n", "}" ]
2,393
all-2394
[ "Popmark", "pops", "the", "mark", "stored", "at", "the", "top", "of", "the", "mark", "stack" ]
[ "func", "(", "st", "*", "State", ")", "Popmark", "(", ")", "int", "{", "x", ":=", "st", ".", "markstack", ".", "Pop", "(", ")", "\n", "<mask>", "x", ".", "(", "int", ")", "\n", "}" ]
2,394
all-2395
[ "Rotate", "is", "a", "wrapper", "around", "cairo_rotate", "." ]
[ "func", "(", "v", "*", "<mask>", ")", "Rotate", "(", "angle", "float64", ")", "{", "C", ".", "cairo_rotate", "(", "v", ".", "native", "(", ")", ",", "C", ".", "double", "(", "angle", ")", ")", "\n", "}" ]
2,395
all-2396
[ "Get", "target", "language", "string" ]
[ "func", "(", "d", "*", "localeStore", ")", "Get", "(", "lang", ",", "section", ",", "format", "string", ")", "(", "string", ",", "bool", ")", "{", "if", "locale", ",", "ok", ":=", "d", ".", "store", "[", "lang", "]", ";", "ok", "{", "if", "<mas...
2,396
all-2397
[ "time" ]
[ "func", "convertNvTime", "(", "v", "interface", "{", "}", ")", "(", "driver", ".", "Value", ",", "error", ")", "{", "if", "v", "==", "nil", "{", "return", "nil", ",", "nil", "\n", "}", "\n\n", "switch", "v", ":=", "v", ".", "(", "type", ")", "{...
2,397
all-2398
[ "PayWith", "is", "a", "helper", "to", "create", "PayWithPath", "struct" ]
[ "func", "PayWith", "(", "sendAsset", "Asset", ",", "maxAmount", "string", ")", "PayWithPath", "{", "return", "PayWithPath", "{", "<mask>", ":", "sendAsset", ",", "MaxAmount", ":", "maxAmount", ",", "}", "\n", "}" ]
2,398
all-2399
[ "findChild", "finds", "a", "child", "node", "that", "matches", "the", "given", "node", "It", "returns", "nil", "if", "no", "node", "found", ".", "This", "is", "to", "see", "if", "we", "already", "have", "a", "similar", "node", "registered" ]
[ "func", "(", "n", "*", "routeNode", ")", "findChild", "(", "nn", "*", "routeNode", ")", "*", "routeNode", "{", "for", "_", ",", "c", ":=", "range", "n", ".", "children", "{", "if", "c", ".", "path", "==", "nn", ".", "<mask>", "{", "// same node", ...
2,399
all-2400
[ "fill", "all", "or", "part", "of", "buffer", "object", "s", "data", "store", "with", "a", "fixed", "value" ]
[ "func", "ClearBufferSubData", "(", "target", "uint32", ",", "internalformat", "uint32", ",", "offset", "int", ",", "size", "int", ",", "format", "uint32", ",", "xtype", "uint32", ",", "data", "unsafe", ".", "Pointer", ")", "{", "C", ".", "glowClearBufferSubD...