id
int32
0
25.3k
idx
stringlengths
5
9
nl_tokens
listlengths
1
418
pl_tokens
listlengths
22
4.98k
300
all-301
[ "SetStart", "sets", "the", "current", "scroll", "position", ".", "Values", "out", "of", "bounds", "will", "be", "clamped", "." ]
[ "func", "(", "l", "*", "List", ")", "SetStart", "(", "i", "int", ")", "{", "if", "i", "<", "0", "{", "i", "=", "0", "\n", "}", "\n", "if", "i", ">", "l", ".", "cursor", "{", "l", ".", "start", "=", "l", ".", "cursor", "\n", "}", "else", ...
301
all-302
[ "Unescape", "returns", "the", "unescaped", "string", "." ]
[ "func", "Unescape", "(", "s", "string", ")", "string", "{", "if", "len", "(", "s", ")", "==", "0", "{", "return", "\"", "\"", "\n", "}", "\n\n", "var", "ret", "string", "\n", "<mask>", "rw", "int", "\n", "for", "i", ":=", "0", ";", "i", "<", ...
302
all-303
[ "Range", "extracts", "a", "selection", "of", "elements", "from", "the", "array", "provided", "inclusive" ]
[ "func", "Range", "(", "from", ",", "to", "int", ")", "OpFunc", "{", "return", "func", "(", "in", "[", "]", "byte", ")", "(", "[", "]", "<mask>", ",", "error", ")", "{", "return", "scanner", ".", "FindRange", "(", "in", ",", "0", ",", "from", ",...
303
all-304
[ "RemoteAddr", "returns", "more", "real", "IP", "address", "." ]
[ "func", "(", "ctx", "*", "<mask>", ")", "RemoteAddr", "(", ")", "string", "{", "addr", ":=", "ctx", ".", "Req", ".", "Header", ".", "Get", "(", "\"", "\"", ")", "\n", "if", "len", "(", "addr", ")", "==", "0", "{", "addr", "=", "ctx", ".", "Re...
304
all-305
[ "SetMaxTime", "constrains", "the", "query", "to", "stop", "after", "running", "for", "the", "specified", "time", ".", "When", "the", "time", "limit", "is", "reached", "MongoDB", "automatically", "cancels", "the", "query", ".", "This", "can", "be", "used", "t...
[ "func", "(", "q", "*", "Query", ")", "SetMaxTime", "(", "d", "time", ".", "Duration", ")", "*", "Query", "{", "q", ".", "m", ".", "Lock", "(", ")", "\n", "q", ".", "op", ".", "<mask>", ".", "MaxTimeMS", "=", "int", "(", "d", "/", "time", ".",...
305
all-306
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "SearchInContentParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger21", "(", "&"...
306
all-307
[ "GetState", "returns", "the", "State", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "a", "*", "Alert", ")", "GetState", "(", ")", "string", "{", "if", "a", "==", "nil", "||", "a", ".", "State", "==", "nil", "{", "<mask>", "\"", "\"", "\n", "}", "\n", "return", "*", "a", ".", "State", "\n", "}" ]
307
all-308
[ "makeRequest", "creates", "and", "executes", "a", "http", ".", "Request", "with", "the", "specified", "parameters", "adding", "authentication", "and", "TLS", "options", "for", "the", "Docker", "client", ".", "The", "host", "name", "and", "schema", "is", "taken...
[ "func", "(", "c", "*", "dockerClient", ")", "makeRequest", "(", "ctx", "context", ".", "Context", ",", "method", ",", "path", "string", ",", "headers", "map", "[", "string", "]", "[", "]", "string", ",", "stream", "io", ".", "Reader", ",", "auth", "s...
308
all-309
[ "WithBody", "adds", "the", "body", "to", "the", "update", "Vm", "params" ]
[ "func", "(", "o", "*", "UpdateVMParams", ")", "WithBody", "(", "body", "*", "<mask>", ".", "VM", ")", "*", "UpdateVMParams", "{", "o", ".", "SetBody", "(", "body", ")", "\n", "return", "o", "\n", "}" ]
309
all-310
[ "Locator", "returns", "a", "locator", "for", "the", "given", "resource" ]
[ "func", "(", "r", "*", "ServerTemplate", ")", "Locator", "(", "api", "*", "API", ")", "*", "ServerTemplateLocator", "{", "<mask>", "api", ".", "ServerTemplateLocator", "(", "r", ".", "Href", ")", "\n", "}" ]
310
all-311
[ "String", "returns", "the", "name", "of", "e" ]
[ "func", "(", "e", "AllowTrustResultCode", ")", "String", "(", ")", "string", "{", "name", ",", "_", ":=", "allowTrustResultCodeMap", "[", "int32", "(", "e", ")", "]", "\n", "return", "<mask>", "\n", "}" ]
311
all-312
[ "Delete", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockCache", ")", "Delete", "(", "arg0", "<mask>", ")", "{", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "}" ]
312
all-313
[ "GetCreatedOk", "returns", "a", "tuple", "with", "the", "Created", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "a", "*", "APIKey", ")", "GetCreatedOk", "(", ")", "(", "time", ".", "Time", ",", "bool", ")", "{", "if", "a", "==", "nil", "||", "a", ".", "Created", "==", "nil", "{", "return", "time", ".", "Time", "{", "}", ",", "<mask>", "\n", ...
313
all-314
[ "Finish", "belongs", "to", "the", "Span", "interface" ]
[ "func", "(", "s", "*", "MockSpan", ")", "Finish", "(", ")", "{", "s", ".", "Lock", "(", ")", "\n", "s", ".", "FinishTime", "=", "<mask>", ".", "Now", "(", ")", "\n", "s", ".", "Unlock", "(", ")", "\n", "s", ".", "tracer", ".", "recordSpan", "...
314
all-315
[ "title", ":", "deploy", "info", "path", ":", "/", "deploys", "/", "{", "deploy", "}", "method", ":", "GET", "produce", ":", "application", "/", "json", "responses", ":", "200", ":", "OK", "401", ":", "Unauthorized", "404", ":", "Not", "found" ]
[ "func", "deployInfo", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ",", "t", "auth", ".", "Token", ")", "error", "{", "depID", ":=", "r", ".", "URL", ".", "Query", "(", ")", ".", "Get", "(", "\"", "\"", ")", "...
315
all-316
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "DiscardSearchResultsParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom70", "(", "&"...
316
all-317
[ "NewDecoder", "returns", "a", "new", "decoder", "that", "takes", "input", "from", "r", "." ]
[ "func", "(", "c", "Codec", ")", "NewDecoder", "(", "r", "<mask>", ".", "Reader", ")", "*", "Decoder", "{", "return", "NewDecoder", "(", "c", ".", "NewParser", "(", "r", ")", ")", "\n", "}" ]
317
all-318
[ "HasNodeType", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "h", "*", "HostmapDefinition", ")", "HasNodeType", "(", ")", "bool", "{", "if", "h", "!=", "nil", "&&", "h", ".", "NodeType", "!=", "nil", "{", "return", "<mask>", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
318
all-319
[ "printLicense", "prints", "the", "Agent", "s", "license", "text" ]
[ "func", "printLicense", "(", ")", "int", "{", "license", ":=", "utils", ".", "NewLicenseProvider", "(", ")", "\n", "<mask>", ",", "err", ":=", "license", ".", "GetText", "(", ")", "\n", "if", "err", "!=", "nil", "{", "fmt", ".", "Fprintln", "(", "os"...
319
all-320
[ "defaultArguments", "will", "append", "each", "arg", "to", "the", "template", "except", "where", "the", "argument", "name", "is", "already", "defined", "." ]
[ "func", "defaultArguments", "(", "t", "*", "buildv1alpha1", ".", "TemplateInstantiationSpec", ",", "rawEnv", "map", "[", "string", "]", "string", ")", "{", "keys", ":=", "sets", ".", "String", "{", "}", "\n", "for", "_", ",", "arg", ":=", "range", "t", ...
320
all-321
[ "HasAccount", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "c", "*", "ChannelSlackRequest", ")", "HasAccount", "(", ")", "bool", "{", "if", "c", "!=", "nil", "&&", "c", ".", "Account", "!=", "nil", "{", "return", "<mask>", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
321
all-322
[ "ParseCommandAndFlags", "parses", "a", "command", "flag", "and", "infers", "the", "resource", "action", "href", "and", "params", "." ]
[ "func", "(", "a", "*", "API", ")", "ParseCommandAndFlags", "(", "cmd", ",", "hrefPrefix", "string", ",", "values", "ActionCommands", ")", "(", "*", "CommandTarget", ",", "[", "]", "string", ",", "error", ")", "{", "resource", ",", "vars", ",", "err", "...
322
all-323
[ "GetText", "is", "a", "wrapper", "around", "gtk_text_iter_get_text", "()", "." ]
[ "func", "(", "v", "*", "TextIter", ")", "GetText", "(", "end", "*", "TextIter", ")", "string", "{", "c", ":=", "C", ".", "gtk_text_iter_get_text", "(", "v", ".", "native", "(", ")", ",", "end", ".", "native", "(", ")", ")", "\n", "return", "C", "...
323
all-324
[ "String", "is", "the", "string", "representation", "of", "this", "authentication", ".", "If", "authentication", "is", "not", "enabled", "this", "returns", "the", "empty", "string", ".", "The", "username", "and", "password", "will", "be", "separated", "by", "a"...
[ "func", "(", "c", "*", "AuthConfig", ")", "<mask>", "(", ")", "string", "{", "if", "!", "BoolVal", "(", "c", ".", "Enabled", ")", "{", "return", "\"", "\"", "\n", "}", "\n\n", "if", "c", ".", "Password", "!=", "nil", "{", "return", "fmt", ".", ...
324
all-325
[ "DefaultConfig", "returns", "the", "default", "configuration", "for", "Windows" ]
[ "func", "DefaultConfig", "(", ")", "Config", "{", "programData", ":=", "utils", ".", "DefaultIfBlank", "(", "os", ".", "Getenv", "(", "\"", "\"", ")", ",", "`C:\\ProgramData`", ")", "\n", "ecsRoot", ":=", "filepath", ".", "Join", "(", "programData", ",", ...
325
all-326
[ "parseGShadow", "parses", "the", "row", "of", "a", "group", "shadow", "." ]
[ "func", "parseGShadow", "(", "row", "string", ")", "(", "*", "GShadow", ",", "error", ")", "{", "fields", ":=", "strings", ".", "Split", "(", "row", ",", "\"", "\"", ")", "\n", "if", "len", "(", "<mask>", ")", "!=", "4", "{", "return", "nil", ","...
326
all-327
[ "MarshalJSON", "implements", "json", ".", "Marshaler", "and", "adds", "the", "jsonrpc", ":", "2", ".", "0", "property", "." ]
[ "func", "(", "r", "Request", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "r2", ":=", "struct", "{", "Method", "string", "`json:\"method\"`", "\n", "Params", "*", "json", ".", "RawMessage", "`json:\"params,omitempty\"`", "\n...
327
all-328
[ "String", "returns", "the", "name", "of", "e" ]
[ "func", "(", "e", "ManageOfferEffect", ")", "String", "(", ")", "string", "{", "name", ",", "_", ":=", "manageOfferEffectMap", "[", "int32", "(", "e", ")", "]", "\n", "return", "<mask>", "\n", "}" ]
328
all-329
[ "Vec2Sub", "performs", "a", "vector", "subtraction", ".", "dest", "=", "v1", "-", "v2", ".", "dest", "[", "out", "]", "The", "result", "vector", ".", "v1", "[", "in", "]", "The", "base", "vector", ".", "v2", "[", "in", "]", "The", "vector", "to", ...
[ "func", "Vec2Sub", "(", "dest", ",", "v1", ",", "v2", "Vec2", ")", "{", "dest", "[", "0", "]", "=", "v1", "[", "0", "]", "-", "v2", "[", "0", "]", "\n", "<mask>", "[", "1", "]", "=", "v1", "[", "1", "]", "-", "v2", "[", "1", "]", "\n", ...
329
all-330
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "EventWebSocketClosed", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork46", "(", "&", ...
330
all-331
[ "execute", "a", "list", "of", "display", "lists" ]
[ "func", "CallLists", "(", "n", "int32", ",", "xtype", "uint32", ",", "<mask>", "unsafe", ".", "Pointer", ")", "{", "syscall", ".", "Syscall", "(", "gpCallLists", ",", "3", ",", "uintptr", "(", "n", ")", ",", "uintptr", "(", "xtype", ")", ",", "uintpt...
331
all-332
[ "readPropertyFile", "opens", "the", "configuration", "file", "and", "creates", "configuration", "struct", "with", "all", "the", "key", "/", "value", "pair", "info", ".", "It", "ignores", "any", "line", "that", "begins", "with", "#", "and", "silently", "ignores...
[ "func", "readPropertyFile", "(", "fi", "<mask>", ".", "FileInfo", ",", "cfpath", "string", ")", "(", "configFile", ",", "error", ")", "{", "cf", ":=", "configFile", "{", "fileInfo", ":", "fi", ",", "configs", ":", "make", "(", "map", "[", "string", "]"...
332
all-333
[ "NewService", "creates", "a", "new", "MessageService", "with", "default", "settings", ".", "Named", "Arguments", "allowed", ":", "--", "consumer", "--", "provider", "--", "pact", "-", "dir" ]
[ "func", "(", "v", "*", "MessageService", ")", "NewService", "(", "args", "[", "]", "string", ")", "Service", "{", "v", ".", "Args", "=", "args", "\n\n", "<mask>", ".", "Printf", "(", "\"", "\\n", "\"", ",", "v", ".", "Args", ")", "\n", "v", ".", ...
333
all-334
[ "CreateFirewallRule", "creates", "a", "firewall", "rule" ]
[ "func", "(", "c", "*", "<mask>", ")", "CreateFirewallRule", "(", "dcID", "string", ",", "serverID", "string", ",", "nicID", "string", ",", "fw", "FirewallRule", ")", "(", "*", "FirewallRule", ",", "error", ")", "{", "url", ":=", "fwruleColPath", "(", "dc...
334
all-335
[ "Equal", "-", "define", "task", "equality" ]
[ "func", "(", "s", "Task", ")", "Equal", "(", "b", "<mask>", ")", "bool", "{", "return", "(", "s", ".", "ID", "==", "b", ".", "ID", "&&", "s", ".", "Timestamp", "==", "b", ".", "Timestamp", "&&", "s", ".", "Expires", "==", "b", ".", "Expires", ...
335
all-336
[ "Add", "adds", "a", "new", "job", "to", "the", "job", "queue", "(", "optionally", "within", "a", "given", "transaction", ")", "." ]
[ "func", "(", "q", "*", "queue", ")", "Add", "(", "tx", "*", "reform", ".", "TX", ",", "j", "*", "data", ".", "Job", ")", "error", "{", "logger", ":=", "q", ".", "logger", ".", "Add", "(", "\"", "\"", ",", "\"", "\"", ",", "\"", "\"", ",", ...
336
all-337
[ "NewSnapshot", "creates", "a", "new", "Nitro", "snapshot", ".", "This", "is", "a", "thread", "-", "unsafe", "API", ".", "While", "this", "API", "is", "invoked", "no", "other", "Nitro", "writer", "should", "concurrently", "call", "any", "public", "APIs", "s...
[ "func", "(", "m", "*", "Nitro", ")", "NewSnapshot", "(", ")", "(", "*", "Snapshot", ",", "error", ")", "{", "buf", ":=", "m", ".", "snapshots", ".", "MakeBuf", "(", ")", "\n", "defer", "m", ".", "snapshots", ".", "FreeBuf", "(", "buf", ")", "\n\n...
337
all-338
[ "ServeFileUncompressed", "returns", "HTTP", "response", "containing", "file", "contents", "from", "the", "given", "path", ".", "Directory", "contents", "is", "returned", "if", "path", "points", "to", "directory", ".", "ServeFile", "may", "be", "used", "for", "sa...
[ "func", "ServeFileUncompressed", "(", "ctx", "*", "RequestCtx", ",", "path", "string", ")", "{", "ctx", ".", "Request", ".", "Header", ".", "DelBytes", "(", "strAcceptEncoding", ")", "\n", "ServeFile", "(", "ctx", ",", "<mask>", ")", "\n", "}" ]
338
all-339
[ "newPubSub", "returns", "a", "PubSub", "receiver", ".", "Optionally", "accepts", "a", "client", "to", "allow", "for", "injecting", "the", "fake", "for", "tests", ".", "If", "client", "is", "nil", "a", "real", "client", "connection", "to", "the", "google", ...
[ "func", "newPubSub", "(", "client", "*", "pubsub", ".", "Client", ",", "name", "string", ",", "options", "*", "Options", ",", "store", "func", "(", "*", "points", ".", "Points", ")", ")", "(", "*", "PubSub", ",", "error", ")", "{", "logger", ":=", ...
339
all-340
[ "flattenStorageDrsSpaceLoadBalanceConfig", "saves", "a", "StorageDrsSpaceLoadBalanceConfig", "into", "the", "supplied", "ResourceData", "." ]
[ "func", "flattenStorageDrsSpaceLoadBalanceConfig", "(", "d", "*", "schema", ".", "ResourceData", ",", "obj", "*", "<mask>", ".", "StorageDrsSpaceLoadBalanceConfig", ",", "version", "viapi", ".", "VSphereVersion", ",", ")", "error", "{", "attrs", ":=", "map", "[", ...
340
all-341
[ "DisplayOpen", "()", "is", "a", "wrapper", "around", "gdk_display_open", "()", "." ]
[ "func", "DisplayOpen", "(", "displayName", "string", ")", "(", "*", "Display", ",", "error", ")", "{", "cstr", ":=", "C", ".", "CString", "(", "displayName", ")", "\n", "defer", "C", ".", "<mask>", "(", "unsafe", ".", "Pointer", "(", "cstr", ")", ")"...
341
all-342
[ "IsSuccess", "means", "the", "job", "passed" ]
[ "func", "(", "jb", "*", "Build", ")", "IsSuccess", "(", ")", "bool", "{", "return", "jb", ".", "Result", "!=", "nil", "&&", "*", "jb", ".", "Result", "==", "<mask>", "\n", "}" ]
342
all-343
[ "setTemplate", "sets", "the", "Template", "field", "of", "any", "TemplateParam", "s", "in", "a", ".", "This", "handles", "the", "forward", "referencing", "template", "parameters", "found", "in", "cast", "operators", "." ]
[ "func", "(", "st", "*", "state", ")", "setTemplate", "(", "a", "AST", ",", "tmpl", "*", "Template", ")", "{", "var", "seen", "[", "]", "AST", "\n", "a", ".", "Traverse", "(", "func", "(", "a", "AST", ")", "bool", "{", "<mask>", "a", ":=", "a", ...
343
all-344
[ "Do", "executes", "Network", ".", "continueInterceptedRequest", "against", "the", "provided", "context", "." ]
[ "func", "(", "p", "*", "ContinueInterceptedRequestParams", ")", "Do", "(", "ctx", "context", ".", "<mask>", ")", "(", "err", "error", ")", "{", "return", "cdp", ".", "Execute", "(", "ctx", ",", "CommandContinueInterceptedRequest", ",", "p", ",", "nil", ")"...
344
all-345
[ "SetMenuLabelText", "()", "is", "a", "wrapper", "around", "gtk_notebook_set_menu_label_text", "()", "." ]
[ "func", "(", "v", "*", "Notebook", ")", "SetMenuLabelText", "(", "<mask>", "IWidget", ",", "menuText", "string", ")", "{", "cstr", ":=", "C", ".", "CString", "(", "menuText", ")", "\n", "defer", "C", ".", "free", "(", "unsafe", ".", "Pointer", "(", "...
345
all-346
[ "Get", "the", "global", "non", "window", "specific", "settings" ]
[ "func", "SettingsGetDefault", "(", ")", "(", "*", "Settings", ",", "error", ")", "{", "c", ":=", "C", ".", "gtk_settings_get_default", "(", ")", "\n", "if", "c", "==", "nil", "{", "<mask>", "nil", ",", "nilPtrErr", "\n", "}", "\n\n", "return", "wrapSet...
346
all-347
[ "SetUseFullPage", "()", "is", "a", "wrapper", "around", "gtk_print_operation_set_use_full_page", "()", "." ]
[ "func", "(", "po", "*", "PrintOperation", ")", "SetUseFullPage", "(", "full", "bool", ")", "{", "C", ".", "gtk_print_operation_set_use_full_page", "(", "<mask>", ".", "native", "(", ")", ",", "gbool", "(", "full", ")", ")", "\n", "}" ]
347
all-348
[ "StorageVolumeConfigAdd", "adds", "a", "new", "storage", "volume", "config", "into", "database", "." ]
[ "func", "StorageVolumeConfigAdd", "(", "tx", "*", "sql", ".", "Tx", ",", "volumeID", "int64", ",", "volumeConfig", "map", "[", "string", "]", "string", ")", "error", "{", "str", ":=", "\"", "\"", "\n", "stmt", ",", "err", ":=", "tx", ".", "Prepare", ...
348
all-349
[ "export", "FileSequence_SetExt" ]
[ "func", "FileSequence_SetExt", "(", "id", "FileSeqId", ",", "ext", "*", "C", ".", "<mask>", ")", "{", "if", "fs", ",", "ok", ":=", "sFileSeqs", ".", "Get", "(", "id", ")", ";", "ok", "{", "str", ":=", "C", ".", "GoString", "(", "ext", ")", "\n", ...
349
all-350
[ "NewPlayerFromBytes", "creates", "a", "new", "player", "with", "the", "given", "bytes", ".", "As", "opposed", "to", "NewPlayer", "you", "don", "t", "have", "to", "care", "if", "src", "is", "already", "used", "by", "another", "player", "or", "not", ".", "...
[ "func", "NewPlayerFromBytes", "(", "<mask>", "*", "Context", ",", "src", "[", "]", "byte", ")", "(", "*", "Player", ",", "error", ")", "{", "b", ":=", "BytesReadSeekCloser", "(", "src", ")", "\n", "p", ",", "err", ":=", "NewPlayer", "(", "context", "...
350
all-351
[ "UnmarshalText", "hydrates", "this", "instance", "from", "text" ]
[ "func", "(", "u", "*", "ISBN10", ")", "UnmarshalText", "(", "data", "[", "]", "byte", ")", "error", "{", "// validation is performed later on", "*", "u", "=", "ISBN10", "(", "string", "(", "<mask>", ")", ")", "\n", "return", "nil", "\n", "}" ]
351
all-352
[ "NumChildren", "returns", "the", "number", "of", "child", "snapshots", "of", "a", "specified", "snapshot", ".", "Remarks", ":", "*", "This", "function", "is", "not", "supported", "when", "using", "the", "VMWARE_PLAYER", "provider", ".", "Since", "VMware", "Wor...
[ "func", "(", "s", "*", "Snapshot", ")", "NumChildren", "(", ")", "(", "int", ",", "error", ")", "{", "var", "err", "C", ".", "VixError", "=", "C", ".", "VIX_OK", "\n", "<mask>", "numChildren", "*", "C", ".", "int", "\n\n", "err", "=", "C", ".", ...
352
all-353
[ "constructor", ".", "NewFloat64RingBuf", "will", "allocate", "internally", "a", "slice", "of", "maxViewItems", "float64", "." ]
[ "func", "NewFloat64RingBuf", "(", "maxViewItems", "int", ")", "*", "Float64RingBuf", "{", "n", ":=", "maxViewItems", "\n", "r", ":=", "&", "Float64RingBuf", "{", "N", ":", "n", ",", "Beg", ":", "0", ",", "Readable", ":", "0", ",", "}", "\n", "r", "."...
353
all-354
[ "NodeID", "returns", "the", "6", "byte", "node", "id", "encoded", "in", "uuid", ".", "It", "returns", "nil", "if", "uuid", "is", "not", "valid", ".", "The", "NodeID", "is", "only", "well", "defined", "for", "version", "1", "and", "2", "UUIDs", "." ]
[ "func", "(", "uuid", "UUID", ")", "NodeID", "(", ")", "[", "]", "byte", "{", "var", "node", "[", "6", "]", "byte", "\n", "copy", "(", "node", "[", ":", "]", ",", "uuid", "[", "10", ":", "]", ")", "\n", "return", "<mask>", "[", ":", "]", "\n...
354
all-355
[ "Add", "adds", "the", "task", "to", "a", "named", "queue", ".", "An", "empty", "queue", "name", "means", "that", "the", "default", "queue", "will", "be", "used", ".", "Add", "returns", "an", "equivalent", "Task", "with", "defaults", "filled", "in", "incl...
[ "func", "Add", "(", "c", "context", ".", "Context", ",", "task", "*", "Task", ",", "queueName", "string", ")", "(", "*", "Task", ",", "error", ")", "{", "req", ",", "err", ":=", "newAddReq", "(", "c", ",", "task", ",", "queueName", ")", "\n", "if...
355
all-356
[ "newSTMReadCommitted", "initiates", "a", "new", "read", "committed", "transaction", "." ]
[ "func", "newSTMReadCommitted", "(", "ctx", "<mask>", ".", "Context", ",", "c", "*", "v3", ".", "Client", ",", "apply", "func", "(", "STM", ")", "error", ")", "(", "*", "v3", ".", "TxnResponse", ",", "error", ")", "{", "s", ":=", "&", "stmReadCommitte...
356
all-357
[ "AddInteraction", "adds", "a", "new", "Pact", "Mock", "Service", "interaction", "." ]
[ "func", "(", "m", "*", "MockService", ")", "AddInteraction", "(", "interaction", "*", "Interaction", ")", "error", "{", "log", ".", "Println", "(", "\"", "\"", ")", "\n", "<mask>", ":=", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "m", ".", "BaseURL...
357
all-358
[ "Format", "renders", "the", "input", "with", "the", "Cursor", "appropriately", "positioned", "." ]
[ "func", "(", "c", "*", "Cursor", ")", "Format", "(", ")", "string", "{", "r", ":=", "c", ".", "input", "\n", "// insert the cursor", "return", "<mask>", "(", "r", ",", "c", ")", "\n", "}" ]
358
all-359
[ "emit", "passes", "an", "item", "pack", "to", "the", "client" ]
[ "func", "(", "l", "*", "Lexer", ")", "emit", "(", "t", "TokenType", ")", "{", "// if the position is the same as the start, do not emit a token", "if", "l", ".", "Pos", "==", "l", ".", "Start", "{", "return", "\n", "}", "\n\n", "tok", ":=", "<mask>", "{", ...
359
all-360
[ "FontButtonNew", "is", "a", "wrapper", "around", "gtk_font_button_new", "()", "." ]
[ "func", "FontButtonNew", "(", ")", "(", "*", "FontButton", ",", "<mask>", ")", "{", "c", ":=", "C", ".", "gtk_font_button_new", "(", ")", "\n", "if", "c", "==", "nil", "{", "return", "nil", ",", "nilPtrErr", "\n", "}", "\n", "obj", ":=", "glib", "....
360
all-361
[ "GetLabelWidget", "is", "a", "wrapper", "around", "gtk_frame_get_label_widget", "()", "." ]
[ "func", "(", "v", "*", "Frame", ")", "GetLabelWidget", "(", ")", "(", "*", "Widget", ",", "<mask>", ")", "{", "c", ":=", "C", ".", "gtk_frame_get_label_widget", "(", "v", ".", "native", "(", ")", ")", "\n", "if", "c", "==", "nil", "{", "return", ...
361
all-362
[ "GetDashboard", "returns", "a", "single", "dashboard", "created", "on", "this", "account", "." ]
[ "func", "(", "client", "*", "Client", ")", "GetDashboard", "(", "<mask>", "interface", "{", "}", ")", "(", "*", "Dashboard", ",", "error", ")", "{", "stringId", ",", "err", ":=", "GetStringId", "(", "id", ")", "\n", "if", "err", "!=", "nil", "{", "...
362
all-363
[ "FillStroke", "first", "fills", "and", "afterwards", "strokes", "a", "path", "." ]
[ "func", "FillStroke", "(", "gc", "draw2d", ".", "GraphicContext", ",", "x", ",", "y", ",", "width", ",", "height", "float64", ")", "{", "sx", ",", "sy", ":=", "width", "/", "210", ",", "height", "/", "215", "\n", "gc", ".", "MoveTo", "(", "x", "+...
363
all-364
[ "Authorize", "user" ]
[ "func", "(", "c", "*", "OAuth2Controller", ")", "Authorize", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ")", "{", "clientID", ":=", "r", ".", "URL", ".", "Query", "(", ")", ".", "Get", "(", "\"", "\"", ")", "\...
364
all-365
[ "NewOpenAPISchemaFor", "returns", "the", "OpenAPISchema", "object", "ready", "to", "validate", "objects", "of", "given", "GroupVersion" ]
[ "func", "NewOpenAPISchemaFor", "(", "delegate", "discovery", ".", "OpenAPISchemaInterface", ",", "gvk", "schema", ".", "GroupVersionKind", ")", "(", "*", "OpenAPISchema", ",", "error", ")", "{", "log", ".", "Debugf", "(", "\"", "\"", ",", "gvk", ")", "\n", ...
365
all-366
[ "fileKey", "finds", "a", "stable", "representation", "of", "the", "caller", "s", "file", "path", ".", "For", "calls", "from", "package", "main", ":", "strip", "all", "leading", "path", "entries", "leaving", "just", "the", "filename", ".", "For", "calls", "...
[ "func", "fileKey", "(", "file", "string", ")", "(", "string", ",", "error", ")", "{", "if", "!", "internal", ".", "IsSecondGen", "(", ")", "||", "internal", ".", "MainPath", "==", "\"", "\"", "{", "return", "file", ",", "nil", "\n", "}", "\n", "// ...
366
all-367
[ "CandidateLocations", "returns", "a", "prioritized", "limited", "number", "of", "blobs", "and", "their", "locations", "that", "could", "possibly", "be", "reused", "within", "the", "specified", "(", "transport", "scope", ")", "(", "if", "they", "still", "exist", ...
[ "func", "(", "mem", "*", "cache", ")", "CandidateLocations", "(", "transport", "types", ".", "ImageTransport", ",", "scope", "types", ".", "BICTransportScope", ",", "primaryDigest", "digest", ".", "Digest", ",", "canSubstitute", "bool", ")", "[", "]", "types",...
367
all-368
[ "Users", "returns", "the", "users", "collection", "from", "MongoDB", "." ]
[ "func", "(", "s", "*", "Storage", ")", "Users", "(", ")", "*", "storage", ".", "Collection", "{", "emailIndex", ":=", "mgo", ".", "Index", "{", "Key", ":", "[", "]", "string", "{", "\"", "\"", "}", ",", "Unique", ":", "true", "}", "\n", "c", ":...
368
all-369
[ "Logf", "formats", "its", "arguments", "according", "to", "the", "format", "analogous", "to", "Printf", "." ]
[ "func", "(", "t", "*", "T", ")", "Logf", "(", "<mask>", "string", ",", "args", "...", "interface", "{", "}", ")", "{", "fmt", ".", "Printf", "(", "format", ",", "args", "...", ")", "\n", "}" ]
369
all-370
[ "NOTE", ":", "this", "function", "specifically", "does", "not", "work", "as", "desired", "because", "text", "styles", "must", "be", "wrapped", "around", "the", "text", "they", "are", "meant", "to", "style", ".", "As", "such", "use", "TextStyle", "()", "or"...
[ "func", "(", "t", "TextStyle", ")", "<mask>", "(", ")", "string", "{", "return", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "t", ".", "start", ",", "t", ".", "stop", ")", "\n", "}" ]
370
all-371
[ "GetId", "returns", "the", "Id", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "c", "*", "Creator", ")", "GetId", "(", ")", "int", "{", "if", "c", "==", "nil", "||", "c", ".", "Id", "==", "nil", "{", "return", "0", "\n", "}", "\n", "return", "*", "c", ".", "<mask>", "\n", "}" ]
371
all-372
[ "Register", "Handler", "with", "the", "worker" ]
[ "func", "(", "w", "*", "Simple", ")", "Register", "(", "name", "string", ",", "h", "Handler", ")", "error", "{", "w", ".", "moot", ".", "Lock", "(", ")", "\n", "defer", "w", ".", "moot", ".", "Unlock", "(", ")", "\n", "if", "_", ",", "<mask>", ...
372
all-373
[ "removeServiceMonitor", "watches", "a", "channel", "to", "remove", "services", "from", "operation", "." ]
[ "func", "(", "s", "*", "ServiceManager", ")", "removeServiceMonitor", "(", ")", "{", "log", ".", "Println", "(", "\"", "\"", ")", "\n", "var", "p", "*", "exec", ".", "Cmd", "\n", "for", "{", "select", "{", "case", "p", "=", "<-", "s", ".", "comma...
373
all-374
[ "Do", "executes", "Debugger", ".", "resume", "against", "the", "provided", "context", "." ]
[ "func", "(", "p", "*", "ResumeParams", ")", "Do", "(", "ctx", "context", ".", "<mask>", ")", "(", "err", "error", ")", "{", "return", "cdp", ".", "Execute", "(", "ctx", ",", "CommandResume", ",", "nil", ",", "nil", ")", "\n", "}" ]
374
all-375
[ "GetTimeAggregator", "returns", "the", "TimeAggregator", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "t", "*", "ThresholdCount", ")", "GetTimeAggregator", "(", ")", "string", "{", "if", "t", "==", "nil", "||", "t", ".", "TimeAggregator", "==", "nil", "{", "return", "\"", "\"", "\n", "}", "\n", "<mask>", "*", "t", ".", "TimeAggregator", ...
375
all-376
[ "title", ":", "service", "delete", "path", ":", "/", "services", "/", "{", "name", "}", "method", ":", "DELETE", "responses", ":", "200", ":", "Service", "removed", "401", ":", "Unauthorized", "403", ":", "Forbidden", "(", "team", "is", "not", "the", "...
[ "func", "serviceDelete", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ",", "t", "auth", ".", "Token", ")", "(", "err", "error", ")", "{", "s", ",", "err", ":=", "getService", "(", "r", ".", "URL", ".", "<mask>", ...
376
all-377
[ "changeContextState", "changes", "pc", ".", "state", "or", "fails", "if", "the", "state", "is", "unexpected" ]
[ "func", "(", "pc", "*", "PolicyContext", ")", "changeState", "(", "expected", ",", "new", "policyContextState", ")", "error", "{", "if", "pc", ".", "state", "!=", "expected", "{", "return", "errors", ".", "Errorf", "(", "`\"Invalid PolicyContext state, expected ...
377
all-378
[ "Add", "adds", "a", "value", "to", "the", "set", "." ]
[ "func", "(", "s", "*", "<mask>", ")", "Add", "(", "value", "interface", "{", "}", ")", "{", "s", ".", "Lock", "(", ")", "\n", "defer", "s", ".", "Unlock", "(", ")", "\n", "s", ".", "m", "[", "value", "]", "=", "struct", "{", "}", "{", "}", ...
378
all-379
[ "LookupIP", "returns", "the", "given", "host", "s", "IP", "addresses", "." ]
[ "func", "LookupIP", "(", "ctx", "<mask>", ".", "Context", ",", "host", "string", ")", "(", "addrs", "[", "]", "net", ".", "IP", ",", "err", "error", ")", "{", "return", "net", ".", "LookupIP", "(", "host", ")", "\n", "}" ]
379
all-380
[ "IsTimeoutError", "reports", "whether", "err", "is", "a", "timeout", "error", "." ]
[ "func", "IsTimeoutError", "(", "err", "error", ")", "bool", "{", "if", "err", "==", "context", ".", "DeadlineExceeded", "{", "return", "true", "\n", "}", "\n", "if", "t", ",", "ok", ":=", "err", ".", "(", "interface", "{", "IsTimeout", "(", ")", "boo...
380
all-381
[ "WalkStatement", "is", "the", "top", "level", "walk", "function", ".", "If", "it", "encounters", "a", "Select", "it", "switches", "to", "a", "mode", "where", "variables", "are", "deduped", "." ]
[ "func", "(", "nz", "*", "normalizer", ")", "WalkStatement", "(", "node", "SQLNode", ")", "(", "bool", ",", "error", ")", "{", "<mask>", "node", ":=", "node", ".", "(", "type", ")", "{", "case", "*", "Select", ":", "_", "=", "Walk", "(", "nz", "."...
381
all-382
[ "AddFromFile", "is", "a", "wrapper", "around", "gtk_builder_add_from_file", "()", "." ]
[ "func", "(", "b", "*", "Builder", ")", "AddFromFile", "(", "filename", "string", ")", "error", "{", "cstr", ":=", "C", ".", "CString", "(", "filename", ")", "\n", "defer", "C", ".", "free", "(", "unsafe", ".", "Pointer", "(", "cstr", ")", ")", "\n"...
382
all-383
[ "map", "all", "or", "part", "of", "a", "buffer", "object", "s", "data", "store", "into", "the", "client", "s", "address", "space" ]
[ "func", "MapBufferRange", "(", "target", "uint32", ",", "offset", "int", ",", "length", "int", ",", "access", "uint32", ")", "unsafe", ".", "Pointer", "{", "ret", ",", "_", ",", "_", ":=", "syscall", ".", "Syscall6", "(", "gpMapBufferRange", ",", "4", ...
383
all-384
[ "GetText", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockLicenseProvider", ")", "GetText", "(", ")", "(", "string", ",", "error", ")", "{", "<mask>", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ...
384
all-385
[ "Hash", "updates", "all", "of", "the", "hashes", "and", "node", "size", "metadata", "it", "also", "checks", "for", "conflicts", "." ]
[ "func", "(", "h", "*", "dbHashTree", ")", "Hash", "(", ")", "error", "{", "return", "h", ".", "Batch", "(", "func", "(", "tx", "*", "bolt", ".", "Tx", ")", "error", "{", "return", "canonicalize", "(", "<mask>", ",", "\"", "\"", ")", "\n", "}", ...
385
all-386
[ "SelectItem", "is", "a", "wrapper", "around", "gtk_menu_shell_select_item", "()", "." ]
[ "func", "(", "v", "*", "MenuShell", ")", "SelectItem", "(", "<mask>", "IMenuItem", ")", "{", "C", ".", "gtk_menu_shell_select_item", "(", "v", ".", "native", "(", ")", ",", "child", ".", "toWidget", "(", ")", ")", "\n", "}" ]
386
all-387
[ "TODO", "(", "ideahitme", ")", ":", "consider", "moving", "this", "to", "Plan" ]
[ "func", "filterOwnedRecords", "(", "ownerID", "string", ",", "eps", "[", "]", "*", "endpoint", ".", "Endpoint", ")", "[", "]", "*", "endpoint", ".", "Endpoint", "{", "filtered", ":=", "[", "]", "*", "endpoint", ".", "Endpoint", "{", "}", "\n", "for", ...
387
all-388
[ "GetOnce", "gets", "a", "value", "from", "the", "current", "session", "and", "then", "deletes", "it", "." ]
[ "func", "(", "s", "*", "Session", ")", "GetOnce", "(", "<mask>", "interface", "{", "}", ")", "interface", "{", "}", "{", "if", "x", ",", "ok", ":=", "s", ".", "Session", ".", "Values", "[", "name", "]", ";", "ok", "{", "s", ".", "Delete", "(", ...
388
all-389
[ "hostNetworkSystemFromHostSystem", "locates", "a", "HostNetworkSystem", "from", "a", "specified", "HostSystem", "." ]
[ "func", "hostNetworkSystemFromHostSystem", "(", "hs", "*", "object", ".", "HostSystem", ")", "(", "*", "object", ".", "HostNetworkSystem", ",", "error", ")", "{", "ctx", ",", "cancel", ":=", "<mask>", ".", "WithTimeout", "(", "context", ".", "Background", "(...
389
all-390
[ "Returns", "an", "time", ".", "time", "at", "the", "key", "and", "whether", "or", "not", "the", "key", "existed", "and", "the", "value", "was", "a", "time", ".", "Time" ]
[ "func", "(", "t", "Typed", ")", "TimeIf", "(", "key", "string", ")", "(", "time", ".", "Time", ",", "bool", ")", "{", "value", ",", "exists", ":=", "t", "[", "key", "]", "\n", "if", "exists", "==", "false", "{", "return", "time", ".", "Time", "...
390
all-391
[ "Protect", "--", "add", "mutex", "and", "taskmanager", "protection", "to", "task" ]
[ "func", "(", "s", "*", "<mask>", ")", "Protect", "(", "taskmanager", "TaskManagerInterface", ",", "mutex", "sync", ".", "RWMutex", ")", "{", "s", ".", "taskManager", "=", "taskmanager", "\n", "s", ".", "mutex", "=", "mutex", "\n", "}" ]
391
all-392
[ "HasStyle", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "d", "*", "DistributionRequest", ")", "HasStyle", "(", ")", "bool", "{", "if", "d", "!=", "nil", "&&", "d", ".", "Style", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n", "}" ]
392
all-393
[ "Union", "merges", "a", "given", "interval", "tree", "into", "the", "receiver", "." ]
[ "func", "(", "ivt", "*", "IntervalTree", ")", "Union", "(", "inIvt", "IntervalTree", ",", "ivl", "Interval", ")", "{", "f", ":=", "func", "(", "n", "*", "IntervalValue", ")", "bool", "{", "ivt", ".", "Insert", "(", "n", ".", "Ivl", ",", "n", ".", ...
393
all-394
[ "SetPointer", "is", "a", "wrapper", "around", "g_value_set_pointer", "()", "." ]
[ "func", "(", "v", "*", "<mask>", ")", "SetPointer", "(", "p", "uintptr", ")", "{", "C", ".", "g_value_set_pointer", "(", "v", ".", "native", "(", ")", ",", "C", ".", "gpointer", "(", "p", ")", ")", "\n", "}" ]
394
all-395
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "EventWebSocketFrameSent", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork42", "(", "&", "w", ",", "v",...
395
all-396
[ "Test", "helper" ]
[ "func", "valueBytesToEntry", "(", "buf", "[", "]", "byte", ")", "(", "e", "Entry", ")", "{", "var", "h", "header", "\n", "h", ".", "Decode", "(", "buf", ")", "\n", "n", ":=", "uint32", "(", "headerBufSize", ")", "\n\n", "e", ".", "<mask>", "=", "...
396
all-397
[ "Returns", "true", "if", "messages", "from", "channels", "were", "exhausted", "." ]
[ "func", "(", "c", "*", "MConnection", ")", "sendMsgPacket", "(", ")", "bool", "{", "// Choose a channel to create a msgPacket from.", "// The chosen channel will be the one whose recentlySent/priority is the least.", "var", "leastRatio", "float32", "=", "math", ".", "MaxFloat32...
397
all-398
[ "virtualMachineNames", "is", "a", "helper", "method", "that", "returns", "all", "the", "names", "for", "a", "list", "of", "virtual", "machines", "comma", "separated", "." ]
[ "func", "virtualMachineNames", "(", "vms", "[", "]", "*", "object", ".", "VirtualMachine", ")", "string", "{", "<mask>", "s", "[", "]", "string", "\n", "for", "_", ",", "vm", ":=", "range", "vms", "{", "s", "=", "append", "(", "s", ",", "vm", ".", ...
398
all-399
[ "/", "*", "NewFrame", "creates", "a", "new", "frame", ".", "view", "-", "is", "a", "View", "that", "manages", "the", "control", "parent", "-", "is", "container", "that", "keeps", "the", "control", ".", "The", "same", "View", "can", "be", "a", "view", ...
[ "func", "CreateFrame", "(", "parent", "Control", ",", "<mask>", ",", "height", "int", ",", "bs", "BorderStyle", ",", "scale", "int", ")", "*", "Frame", "{", "f", ":=", "new", "(", "Frame", ")", "\n", "f", ".", "BaseControl", "=", "NewBaseControl", "(",...
399
all-400
[ "Delete", "an", "article" ]
[ "func", "Delete", "(", "c", "*", "gin", ".", "Context", ")", "{", "db", ":=", "c", ".", "MustGet", "(", "\"", "\"", ")", ".", "(", "*", "mgo", ".", "Database", ")", "\n", "<mask>", ":=", "bson", ".", "M", "{", "\"", "\"", ":", "bson", ".", ...