id
int32
0
25.3k
idx
stringlengths
5
9
nl_tokens
listlengths
1
418
pl_tokens
listlengths
22
4.98k
6,500
all-6501
[ "GetSentStatus", "safely", "returns", "the", "SentStatusUnsafe", "of", "the", "container" ]
[ "func", "(", "c", "*", "<mask>", ")", "GetSentStatus", "(", ")", "apicontainerstatus", ".", "ContainerStatus", "{", "c", ".", "lock", ".", "RLock", "(", ")", "\n", "defer", "c", ".", "lock", ".", "RUnlock", "(", ")", "\n\n", "return", "c", ".", "Sent...
6,501
all-6502
[ "NewContext", "returns", "a", "new", "root", "context", "used", "to", "make", "TChannel", "requests", "." ]
[ "func", "NewContext", "(", "timeout", "time", ".", "Duration", ")", "(", "context", ".", "Context", ",", "<mask>", ".", "CancelFunc", ")", "{", "return", "NewContextBuilder", "(", "timeout", ")", ".", "Build", "(", ")", "\n", "}" ]
6,502
all-6503
[ "StopAt", "stops", "mock", "server", "at", "given", "index", "." ]
[ "func", "(", "ms", "*", "MockServers", ")", "StopAt", "(", "idx", "int", ")", "{", "ms", ".", "mu", ".", "Lock", "(", ")", "\n", "defer", "ms", ".", "mu", ".", "Unlock", "(", ")", "\n\n", "if", "<mask>", ".", "Servers", "[", "idx", "]", ".", ...
6,503
all-6504
[ "Schema1FromManifest", "creates", "a", "Schema1", "manifest", "instance", "from", "a", "manifest", "blob", ".", "(", "NOTE", ":", "The", "instance", "is", "not", "necessary", "a", "literal", "representation", "of", "the", "original", "blob", "layers", "with", ...
[ "func", "Schema1FromManifest", "(", "manifest", "[", "]", "<mask>", ")", "(", "*", "Schema1", ",", "error", ")", "{", "s1", ":=", "Schema1", "{", "}", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "manifest", ",", "&", "s1", ")", ";", "er...
6,504
all-6505
[ "ClientAfterOfferingPopUp", "updates", "offering", "in", "db", "or", "retrieves", "from", "somc", "if", "new", "." ]
[ "func", "(", "w", "*", "Worker", ")", "ClientAfterOfferingPopUp", "(", "job", "*", "data", ".", "Job", ")", "error", "{", "logger", ":=", "w", ".", "logger", ".", "Add", "(", "\"", "\"", ",", "\"", "\"", ",", "\"", "\"", ",", "job", ")", "\n\n", ...
6,505
all-6506
[ "Exit", "the", "backend", "and", "shutdown", "all", "listeners", ".", "Closes", "the", "ShutdownComplete", "chan", "when", "finsihed", "." ]
[ "func", "(", "o", "*", "<mask>", ")", "Exit", "(", ")", "error", "{", "o", ".", "cmdCtrlLock", ".", "Lock", "(", ")", "\n", "defer", "o", ".", "cmdCtrlLock", ".", "Unlock", "(", ")", "\n", "if", "o", ".", "stopped", "{", "o", ".", "backend", "....
6,506
all-6507
[ "Specify", "the", "value", "of", "a", "uniform", "variable", "for", "a", "specified", "program", "object" ]
[ "func", "ProgramUniformMatrix2fv", "(", "program", "uint32", ",", "location", "int32", ",", "count", "int32", ",", "transpose", "bool", ",", "value", "*", "float32", ")", "{", "syscall", ".", "Syscall6", "(", "gpProgramUniformMatrix2fv", ",", "5", ",", "uintpt...
6,507
all-6508
[ "RuleName", "returns", "a", "name", "for", "a", "proto_library", "derived", "from", "the", "given", "strings", ".", "For", "each", "string", "RuleName", "will", "look", "for", "a", "non", "-", "empty", "suffix", "of", "identifier", "characters", "and", "then...
[ "func", "RuleName", "(", "names", "...", "string", ")", "string", "{", "<mask>", ":=", "\"", "\"", "\n", "for", "_", ",", "name", ":=", "range", "names", "{", "notIdent", ":=", "func", "(", "c", "rune", ")", "bool", "{", "return", "!", "(", "'A'", ...
6,508
all-6509
[ "Claim", "validator" ]
[ "func", "(", "c", "*", "chainedRule", ")", "Claim", "(", "reqCtx", "*", "fasthttp", ".", "RequestCtx", ")", "bool", "{", "if", "!", "c", ".", "Rule", ".", "Claim", "(", "reqCtx", ")", "{", "return", "false", "\n", "}", "\n", "return", "c", ".", "...
6,509
all-6510
[ "onlyRelevantFiles", "processes", "only", ".", "go", "files", "excluding", "folders", "like", "node_modules", "and", "vendor", "." ]
[ "func", "onlyRelevantFiles", "(", "p", "string", ",", "fi", "<mask>", ".", "FileInfo", ",", "err", "error", ",", "fn", "func", "(", "p", "string", ")", "error", ")", "error", "{", "if", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\n\n", "...
6,510
all-6511
[ "Object", "gets", "the", "pfs", "object", "for", "this", "writer", ".", "This", "can", "only", "be", "called", "when", "the", "writer", "is", "closed", "(", "the", "put", "object", "call", "is", "complete", ")" ]
[ "func", "(", "w", "*", "PutObjectWriteCloserAsync", ")", "Object", "(", ")", "(", "*", "pfs", ".", "Object", ",", "error", ")", "{", "<mask>", "{", "case", "err", ":=", "<-", "w", ".", "errChan", ":", "if", "err", "!=", "nil", "{", "return", "nil",...
6,511
all-6512
[ "native", "returns", "a", "pointer", "to", "the", "underlying", "GtkAssistant", "." ]
[ "func", "(", "v", "*", "Assistant", ")", "native", "(", ")", "*", "C", ".", "GtkAssistant", "{", "if", "v", "==", "nil", "||", "v", ".", "GObject", "==", "nil", "{", "<mask>", "nil", "\n", "}", "\n", "p", ":=", "unsafe", ".", "Pointer", "(", "v...
6,512
all-6513
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "ScriptTypeProfile", ")", "UnmarshalJSON", "(", "<mask>", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler14", "(", "&", ...
6,513
all-6514
[ "GetPaletteOk", "returns", "a", "tuple", "with", "the", "Palette", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "d", "*", "DashboardConditionalFormat", ")", "GetPaletteOk", "(", ")", "(", "string", ",", "bool", ")", "{", "if", "d", "==", "nil", "||", "d", ".", "Palette", "==", "nil", "{", "return", "\"", "\"", ",", "false", "\n", "}", "\n", "ret...
6,514
all-6515
[ "UUIDForMOID", "returns", "the", "managed", "object", "reference", "ID", "for", "a", "specific", "virtual", "machine", "MOID", "and", "returns", "a", "MOIDForUUIDResult", "with", "the", "appropriate", "association", "." ]
[ "func", "UUIDForMOID", "(", "client", "*", "govmomi", ".", "Client", ",", "moid", "string", ")", "(", "MOIDForUUIDResult", ",", "error", ")", "{", "vm", ",", "err", ":=", "FromMOID", "(", "<mask>", ",", "moid", ")", "\n", "if", "err", "!=", "nil", "{...
6,515
all-6516
[ "keyFunc", "returns", "or", "accumulates", "key", "dependencies", "." ]
[ "func", "keyFunc", "(", "b", "*", "Brain", ",", "used", ",", "missing", "*", "dep", ".", "Set", ")", "func", "(", "string", ")", "(", "string", ",", "error", ")", "{", "return", "func", "(", "s", "string", ")", "(", "string", ",", "error", ")", ...
6,516
all-6517
[ "SliceContainsString", "returns", "if", "slice", "contains", "substring" ]
[ "func", "SliceContainsString", "(", "a", "string", ",", "list", "[", "]", "string", ")", "bool", "{", "for", "_", ",", "b", ":=", "range", "list", "{", "if", "strings", ".", "Contains", "(", "b", ",", "a", ")", "{", "return", "<mask>", "\n", "}", ...
6,517
all-6518
[ "Run", "uploads", "artifacts", "with", "the", "specified", "options", "forever", ".", "Sends", "a", "stop", "message", "to", "the", "artifact", "uploader", "when", "it", "is", "interrupted", "." ]
[ "func", "(", "o", "*", "<mask>", ")", "Run", "(", ")", "error", "{", "clusterConfig", ",", "err", ":=", "loadClusterConfig", "(", ")", "\n", "if", "err", "!=", "nil", "{", "return", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "err", ")", "\n", "}...
6,518
all-6519
[ "String", "returns", "a", "human", "-", "readable", "representation", "of", "the", "node", "info", "." ]
[ "func", "(", "info", "NodeInfo2", ")", "String", "(", ")", "string", "{", "if", "len", "(", "info", ".", "Hostname", ")", "!=", "0", "{", "return", "info", ".", "Hostname", "\n", "}", "\n", "return", "makeBroadcastAddress", "(", "info", ".", "Broadcast...
6,519
all-6520
[ "NOTE", ":", "secret", "should", "be", "the", "output", "of", "a", "KDF", "like", "bcrypt", "if", "it", "s", "derived", "from", "user", "input", "." ]
[ "func", "GenPrivKeyEd25519FromSecret", "(", "secret", "[", "]", "byte", ")", "PrivKeyEd25519", "{", "privKey32", ":=", "Sha256", "(", "secret", ")", "// Not Ripemd160 because we want 32 bytes.", "\n", "privKeyBytes", ":=", "<mask>", "(", "[", "64", "]", "byte", ")...
6,520
all-6521
[ "RawString", "returns", "v", "s", "string", "value", ".", "If", "v", ".", "Kind", "()", "!", "=", "String", "RawString", "returns", "the", "empty", "string", "." ]
[ "func", "(", "v", "Value", ")", "RawString", "(", ")", "string", "{", "x", ",", "ok", ":=", "v", ".", "data", ".", "(", "string", ")", "\n", "if", "!", "<mask>", "{", "return", "\"", "\"", "\n", "}", "\n", "return", "x", "\n", "}" ]
6,521
all-6522
[ "func", "recoverMessage", "(", "line", "string", ")", "{", "if", "err", ":", "=", "recover", "()", ";", "err", "!", "=", "nil", "{", "log", ".", "Println", "(", "line", ")", "log", ".", "Println", "(", "err", ")", "log", ".", "Println", "(", "str...
[ "func", "parseMessageType", "(", "messageType", "string", ")", "MessageType", "{", "if", "mt", ",", "ok", ":=", "messageTypeMap", "[", "messageType", "]", ";", "<mask>", "{", "return", "mt", ".", "Type", "\n", "}", "\n\n", "return", "UNSET", "\n", "}" ]
6,522
all-6523
[ "UpdateOrgs", "sets", "the", "default", "isolation", "segment", "for", "each", "org", "as", "specified", "in", "the", "cf", "-", "mgmt", "config", "." ]
[ "func", "(", "u", "*", "Updater", ")", "UpdateOrgs", "(", ")", "error", "{", "ocs", ",", "err", ":=", "u", ".", "Cfg", ".", "GetOrgConfigs", "(", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\n", "for", "_", ",", "oc",...
6,523
all-6524
[ "GetAccountOk", "returns", "a", "tuple", "with", "the", "Account", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "c", "*", "ChannelSlackRequest", ")", "GetAccountOk", "(", ")", "(", "string", ",", "bool", ")", "{", "if", "c", "==", "nil", "||", "c", ".", "Account", "==", "nil", "{", "return", "\"", "\"", ",", "<mask>", "\n", "}", "\n", "return", ...
6,524
all-6525
[ "Copy", "copies", "file", "in", "source", "to", "file", "in", "dest", "preserving", "the", "mode", "attributes", "." ]
[ "func", "Copy", "(", "source", ",", "dest", "string", ")", "(", "err", "error", ")", "{", "// Don't backup files of backup.", "if", "dest", "[", "len", "(", "dest", ")", "-", "1", "]", "!=", "'~'", "{", "if", "err", "=", "Backup", "(", "dest", ")", ...
6,525
all-6526
[ "String", "returns", "the", "name", "of", "e" ]
[ "func", "(", "e", "ScpStatementType", ")", "<mask>", "(", ")", "string", "{", "name", ",", "_", ":=", "scpStatementTypeMap", "[", "int32", "(", "e", ")", "]", "\n", "return", "name", "\n", "}" ]
6,526
all-6527
[ "ContainsAll", "returns", "whether", "the", "set", "contains", "all", "given", "values" ]
[ "func", "(", "us", "*", "unsafeSet", ")", "ContainsAll", "(", "values", "[", "]", "string", ")", "bool", "{", "for", "_", ",", "s", ":=", "range", "values", "{", "if", "!", "us", ".", "Contains", "(", "s", ")", "{", "return", "<mask>", "\n", "}",...
6,527
all-6528
[ "GetModifiedAtOk", "returns", "a", "tuple", "with", "the", "ModifiedAt", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "s", "*", "SyntheticsTest", ")", "GetModifiedAtOk", "(", ")", "(", "string", ",", "bool", ")", "{", "if", "s", "==", "nil", "||", "s", ".", "ModifiedAt", "==", "nil", "{", "return", "\"", "\"", ",", "false", "\n", "}", "\n", "return", ...
6,528
all-6529
[ "NewSimpleWithContext", "creates", "a", "basic", "implementation", "of", "the", "Worker", "interface", "that", "is", "backed", "using", "just", "the", "standard", "library", "and", "goroutines", "." ]
[ "func", "NewSimpleWithContext", "(", "ctx", "context", ".", "Context", ")", "*", "Simple", "{", "ctx", ",", "cancel", ":=", "context", ".", "WithCancel", "(", "ctx", ")", "\n\n", "l", ":=", "logrus", ".", "New", "(", ")", "\n", "l", ".", "Level", "="...
6,529
all-6530
[ "DeleteGraphByCID", "deletes", "graph", "with", "passed", "cid", "." ]
[ "func", "(", "a", "*", "API", ")", "DeleteGraphByCID", "(", "cid", "CIDType", ")", "(", "bool", ",", "error", ")", "{", "if", "cid", "==", "nil", "||", "*", "cid", "==", "\"", "\"", "{", "return", "false", ",", "fmt", ".", "Errorf", "(", "\"", ...
6,530
all-6531
[ "Delete", "implements", "ClientInterface" ]
[ "func", "(", "c", "*", "Client", ")", "Delete", "(", "name", "string", ",", "options", "*", "v1", ".", "DeleteOptions", ")", "error", "{", "return", "c", ".", "cl", ".", "Delete", "(", ")", ".", "Namespace", "(", "c", ".", "<mask>", ")", ".", "Re...
6,531
all-6532
[ "CreateRuleSetGroup", "creates", "a", "new", "rule", "set", "group", "." ]
[ "func", "(", "a", "*", "API", ")", "CreateRuleSetGroup", "(", "cfg", "*", "RuleSetGroup", ")", "(", "*", "RuleSetGroup", ",", "error", ")", "{", "if", "cfg", "==", "nil", "{", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ")", "\n", ...
6,532
all-6533
[ "MustHash", "retrieves", "the", "Hash", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
[ "func", "(", "u", "Memo", ")", "MustHash", "(", ")", "Hash", "{", "val", ",", "ok", ":=", "u", ".", "GetHash", "(", ")", "\n\n", "if", "!", "<mask>", "{", "panic", "(", "\"", "\"", ")", "\n", "}", "\n\n", "return", "val", "\n", "}" ]
6,533
all-6534
[ "labels", "parses", "a", "list", "of", "labelnames", ".", "(", "<label_name", ">", "...", ")" ]
[ "func", "(", "p", "*", "parser", ")", "labels", "(", ")", "[", "]", "string", "{", "const", "ctx", "=", "\"", "\"", "\n\n", "p", ".", "expect", "(", "ItemLeftParen", ",", "ctx", ")", "\n\n", "labels", ":=", "[", "]", "string", "{", "}", "\n", "...
6,534
all-6535
[ "Make", "sure", "all", "the", "required", "information", "is", "there" ]
[ "func", "validateCommandLine", "(", "cmdLine", "*", "cmd", ".", "CommandLine", ")", "{", "if", "cmdLine", ".", "Command", "==", "\"", "\"", "||", "cmdLine", ".", "Command", "==", "\"", "\"", "||", "cmdLine", ".", "Command", "==", "\"", "\"", "||", "cmd...
6,535
all-6536
[ "retrieve", "the", "location", "of", "a", "sample" ]
[ "func", "GetMultisamplefv", "(", "pname", "uint32", ",", "index", "uint32", ",", "val", "*", "float32", ")", "{", "C", ".", "glowGetMultisamplefv", "(", "gpGetMultisamplefv", ",", "(", "C", ".", "GLenum", ")", "(", "pname", ")", ",", "(", "C", ".", "GL...
6,536
all-6537
[ "Type", "is", "a", "wrapper", "around", "the", "G_VALUE_HOLDS_GTYPE", "()", "macro", "and", "the", "g_value_get_gtype", "()", "function", ".", "GetType", "()", "returns", "TYPE_INVALID", "if", "v", "does", "not", "hold", "a", "Type", "or", "otherwise", "return...
[ "func", "(", "v", "*", "Value", ")", "Type", "(", ")", "(", "actual", "Type", ",", "fundamental", "<mask>", ",", "err", "error", ")", "{", "if", "!", "gobool", "(", "C", ".", "_g_is_value", "(", "v", ".", "native", "(", ")", ")", ")", "{", "ret...
6,537
all-6538
[ "GenFirebird", "generates", "a", "firebirdsql", "DSN", "from", "the", "passed", "URL", "." ]
[ "func", "GenFirebird", "(", "u", "*", "URL", ")", "(", "string", ",", "error", ")", "{", "z", ":=", "&", "url", ".", "URL", "{", "User", ":", "u", ".", "User", ",", "Host", ":", "u", ".", "Host", ",", "Path", ":", "u", ".", "Path", ",", "Ra...
6,538
all-6539
[ "MultiCloudImageLocator", "builds", "a", "locator", "from", "the", "given", "href", "." ]
[ "func", "(", "api", "*", "API", ")", "MultiCloudImageLocator", "(", "href", "<mask>", ")", "*", "MultiCloudImageLocator", "{", "return", "&", "MultiCloudImageLocator", "{", "Href", "(", "href", ")", ",", "api", "}", "\n", "}" ]
6,539
all-6540
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "GetAllTimeSamplingProfileParams", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "<mask>", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory15", "(", "&", "w", ",",...
6,540
all-6541
[ "injectSource", "adds", "the", "custom", "source", "container", "to", "call", "clonerefs", "correctly", ".", "Returns", "true", "if", "it", "added", "this", "container", "Does", "nothing", "if", "the", "build", "spec", "predefines", "Source" ]
[ "func", "injectSource", "(", "b", "*", "buildv1alpha1", ".", "Build", ",", "pj", "prowjobv1", ".", "ProwJob", ")", "(", "bool", ",", "error", ")", "{", "if", "b", ".", "Spec", ".", "Source", "!=", "nil", "{", "return", "false", ",", "nil", "\n", "}...
6,541
all-6542
[ "CreateSpaceQuotas", "-" ]
[ "func", "(", "m", "*", "Manager", ")", "CreateSpaceQuotas", "(", ")", "error", "{", "spaceConfigs", ",", "err", ":=", "m", ".", "Cfg", ".", "GetSpaceConfigs", "(", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\n\n", "for", ...
6,542
all-6543
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "PlatformFontUsage", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss28", "(", "&", "r", ...
6,543
all-6544
[ "StatsTags", "returns", "the", "stats", "tags", "for", "this", "subchannel", "." ]
[ "func", "(", "c", "*", "SubChannel", ")", "StatsTags", "(", ")", "<mask>", "[", "string", "]", "string", "{", "tags", ":=", "c", ".", "topChannel", ".", "StatsTags", "(", ")", "\n", "tags", "[", "\"", "\"", "]", "=", "c", ".", "serviceName", "\n", ...
6,544
all-6545
[ "WriteTo", "writes", "the", "TupleHeader", "into", "the", "given", "writer", "." ]
[ "func", "(", "t", "*", "TupleHeader", ")", "WriteTo", "(", "w", "io", ".", "Writer", ")", "(", "int64", ",", "error", ")", "{", "if", "len", "(", "t", ".", "Offsets", ")", "!=", "int", "(", "t", ".", "FieldCount", ")", "{", "return", "0", ",", ...
6,545
all-6546
[ "NewClusteringIndex", "creates", "index", "that", "clusters", "the", "points", "at", "three", "levels", "with", "cell", "size", "0", ".", "5", "5", "and", "500km", ".", "Useful", "for", "creating", "maps", "." ]
[ "func", "NewClusteringIndex", "(", ")", "*", "ClusteringIndex", "{", "index", ":=", "&", "ClusteringIndex", "{", "}", "\n", "index", ".", "streetLevel", "=", "NewPointsIndex", "(", "Km", "(", "0.5", ")", ")", "\n", "index", ".", "cityLevel", "=", "NewCount...
6,546
all-6547
[ "opengdpr_callbacks" ]
[ "func", "postCallback", "(", "opts", "*", "ServerOptions", ")", "Handler", "{", "return", "func", "(", "_", "io", ".", "Writer", ",", "r", "io", ".", "Reader", ",", "_", "httprouter", ".", "Params", ")", "error", "{", "req", ":=", "&", "CallbackRequest...
6,547
all-6548
[ "This", "seems", "a", "little", "excessive", "." ]
[ "func", "(", "c", "*", "cmdList", ")", "dotPrefixMatch", "(", "<mask>", "string", ",", "full", "string", ")", "bool", "{", "fullMembs", ":=", "strings", ".", "Split", "(", "full", ",", "\"", "\"", ")", "\n", "shortMembs", ":=", "strings", ".", "Split",...
6,548
all-6549
[ "go", ":", "generate", "stringer", "-", "type", "=", "reqResReaderState" ]
[ "func", "(", "w", "*", "reqResWriter", ")", "argWriter", "(", "last", "bool", ",", "inState", "reqResWriterState", ",", "outState", "reqResWriterState", ")", "(", "ArgWriter", ",", "error", ")", "{", "if", "w", ".", "err", "!=", "nil", "{", "return", "ni...
6,549
all-6550
[ "NewV3", "returns", "a", "new", "snapshot", "Manager", "for", "v3", ".", "x", "snapshot", "." ]
[ "func", "NewV3", "(", "lg", "*", "zap", ".", "Logger", ")", "<mask>", "{", "if", "lg", "==", "nil", "{", "lg", "=", "zap", ".", "NewExample", "(", ")", "\n", "}", "\n", "return", "&", "v3Manager", "{", "lg", ":", "lg", "}", "\n", "}" ]
6,550
all-6551
[ "WithContext", "adds", "the", "context", "to", "the", "delete", "apps", "app", "routes", "route", "params" ]
[ "func", "(", "o", "*", "DeleteAppsAppRoutesRouteParams", ")", "WithContext", "(", "ctx", "context", ".", "<mask>", ")", "*", "DeleteAppsAppRoutesRouteParams", "{", "o", ".", "SetContext", "(", "ctx", ")", "\n", "return", "o", "\n", "}" ]
6,551
all-6552
[ "We", "could", "use", "Fallocate", "but", "some", "test", "CI", "systems", "do", "not", "support", "it", "like", "Travis", "-", "ci", ".", "org", "." ]
[ "func", "CreateFile", "(", "<mask>", "string", ",", "size", "int64", ")", "error", "{", "buf", ":=", "make", "(", "[", "]", "byte", ",", "size", ")", "\n\n", "// Create the file store some data", "fp", ",", "err", ":=", "os", ".", "Create", "(", "filenam...
6,552
all-6553
[ "String", "returns", "a", "copy", "of", "this", "VariantType", "s", "type", "string", "." ]
[ "func", "(", "v", "*", "VariantType", ")", "String", "(", ")", "string", "{", "ch", ":=", "C", ".", "g_variant_type_dup_string", "(", "v", ".", "native", "(", ")", ")", "\n", "defer", "C", ".", "g_free", "(", "C", ".", "gpointer", "(", "ch", ")", ...
6,553
all-6554
[ "Sub", "returns", "the", "rectangle", "r", "translated", "by", "-", "v", "." ]
[ "func", "(", "r", "Rectangle", ")", "Sub", "(", "v", "Vec2", ")", "Rectangle", "{", "<mask>", "Rectangle", "{", "Vec2", "{", "r", ".", "Min", "[", "0", "]", "-", "v", "[", "0", "]", ",", "r", ".", "Min", "[", "1", "]", "-", "v", "[", "1", ...
6,554
all-6555
[ "Collect", "implements", "prometheus", ".", "Collector", "." ]
[ "func", "(", "m", "*", "<mask>", ")", "Collect", "(", "ch", "chan", "<-", "prometheus", ".", "Metric", ")", "{", "for", "_", ",", "g", ":=", "range", "m", ".", "RuleGroups", "(", ")", "{", "ch", "<-", "prometheus", ".", "MustNewConstMetric", "(", "...
6,555
all-6556
[ "WithProtocol", "marshal", "options", "to", "toml", "unmarshal", "to", "map", "[", "string", "]", "interface", "{}", "and", "add", "protocol", "key", "to", "them" ]
[ "func", "WithProtocol", "(", "options", "interface", "{", "}", ",", "protocol", "string", ")", "(", "<mask>", "[", "string", "]", "interface", "{", "}", ",", "error", ")", "{", "buf", ":=", "new", "(", "bytes", ".", "Buffer", ")", "\n", "encoder", ":...
6,556
all-6557
[ "AdminOnly", "middleware", "restricts", "access", "to", "just", "administrators", "." ]
[ "func", "AdminOnly", "(", "next", "http", ".", "Handler", ")", "http", ".", "Handler", "{", "return", "http", ".", "HandlerFunc", "(", "func", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ")", "{", "isAdmin", ",", "...
6,557
all-6558
[ "Find", "paths", "that", "match", "given", "href" ]
[ "func", "(", "r", "*", "Resource", ")", "findMatches", "(", "href", "string", ")", "[", "]", "*", "PathPattern", "{", "var", "matches", "[", "]", "*", "PathPattern", "\n", "for", "_", ",", "<mask>", ":=", "range", "r", ".", "Actions", "{", "for", "...
6,558
all-6559
[ "DockerClient", "creates", "a", "docker", "client", "for", "a", "given", "host", "." ]
[ "func", "DockerClient", "(", "dockerHost", "DockerHost", ")", "(", "*", "dockerclient", ".", "DockerClient", ",", "error", ")", "{", "url", ",", "err", ":=", "dockerHost", ".", "URL", "(", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",",...
6,559
all-6560
[ "RelocateVM", "migrates", "a", "virtual", "machine", "to", "a", "datastore", "cluster", "via", "the", "StorageResourceManager", "API", ".", "It", "mimics", "our", "helper", "in", "the", "virtualmachine", "package", "in", "functionality", "." ]
[ "func", "RelocateVM", "(", "client", "*", "govmomi", ".", "Client", ",", "vm", "*", "object", ".", "VirtualMachine", ",", "spec", "types", ".", "VirtualMachineRelocateSpec", ",", "timeout", "int", ",", "pod", "*", "object", ".", "StoragePod", ",", ")", "er...
6,560
all-6561
[ "cleanupSnapshot", "cleans", "up", "snapshot", "internal", "C", "handle", "." ]
[ "func", "cleanupSnapshot", "(", "s", "*", "Snapshot", ")", "{", "if", "s", ".", "handle", "!=", "C", ".", "VIX_INVALID_HANDLE", "{", "C", ".", "Vix_ReleaseHandle", "(", "s", ".", "handle", ")", "\n", "s", ".", "<mask>", "=", "C", ".", "VIX_INVALID_HAND...
6,561
all-6562
[ "Session", "returns", "the", "session", "for", "the", "current", "request" ]
[ "func", "(", "c", "*", "Controller", ")", "Session", "(", ")", "Session", "{", "if", "c", ".", "Request", ".", "session", "==", "nil", "{", "c", ".", "Request", ".", "session", "=", "c", ".", "sessionFinder", "(", "c", ".", "<mask>", ")", "\n", "...
6,562
all-6563
[ "RemoveLabel", "removes", "label", "from", "org", "/", "repo#number", "returning", "an", "error", "on", "any", "failure", ".", "See", "https", ":", "//", "developer", ".", "github", ".", "com", "/", "v3", "/", "issues", "/", "labels", "/", "#remove", "-"...
[ "func", "(", "c", "*", "Client", ")", "RemoveLabel", "(", "org", ",", "repo", "string", ",", "<mask>", "int", ",", "label", "string", ")", "error", "{", "c", ".", "log", "(", "\"", "\"", ",", "org", ",", "repo", ",", "number", ",", "label", ")", ...
6,563
all-6564
[ "DeleteNotification", "deletes", "a", "created", "notification" ]
[ "func", "(", "p", "*", "Pushy", ")", "DeleteNotification", "(", "pushID", "string", ")", "(", "*", "SimpleSuccess", ",", "*", "Error", ",", "error", ")", "{", "url", ":=", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "p", ".", "APIEndpoint", ",", "...
6,564
all-6565
[ "ImContextFilterKeypress", "is", "a", "wrapper", "around", "gtk_text_view_im_context_filter_keypress", "()", "." ]
[ "func", "(", "v", "*", "TextView", ")", "ImContextFilterKeypress", "(", "event", "*", "gdk", ".", "EventKey", ")", "bool", "{", "return", "gobool", "(", "C", ".", "gtk_text_view_im_context_filter_keypress", "(", "v", ".", "native", "(", ")", ",", "(", "*",...
6,565
all-6566
[ "ListGroupUsers", "lists", "Users", "in", "a", "group" ]
[ "func", "(", "c", "*", "Client", ")", "ListGroupUsers", "(", "groupid", "string", ")", "(", "*", "Users", ",", "error", ")", "{", "url", ":=", "umGroupUsers", "(", "groupid", ")", "+", "`?depth=`", "+", "c", ".", "client", ".", "depth", "+", "`&prett...
6,566
all-6567
[ "broadcast", "calls", "all", "handler", "s", "handler", "function" ]
[ "func", "(", "eventStream", "*", "EventStream", ")", "broadcast", "(", "event", "interface", "{", "}", ")", "{", "eventStream", ".", "handlersLock", ".", "RLock", "(", ")", "\n", "defer", "eventStream", ".", "handlersLock", ".", "RUnlock", "(", ")", "\n\n"...
6,567
all-6568
[ "Returns", "a", "CvBox2D" ]
[ "func", "(", "box", "*", "Box2D", ")", "CVBox", "(", ")", "C", ".", "CvBox2D", "{", "var", "cvBox", "C", ".", "CvBox2D", "\n", "cvBox", ".", "angle", "=", "C", ".", "float", "(", "box", ".", "angle", ")", "\n", "cvBox", ".", "center", ".", "x",...
6,568
all-6569
[ "RemoveMember", "removes", "a", "member", "from", "the", "store", ".", "The", "given", "id", "MUST", "exist", "or", "the", "function", "panics", "." ]
[ "func", "(", "c", "*", "RaftCluster", ")", "RemoveMember", "(", "id", "types", ".", "ID", ")", "{", "c", ".", "Lock", "(", ")", "\n", "defer", "c", ".", "Unlock", "(", ")", "\n", "if", "c", ".", "v2store", "!=", "nil", "{", "mustDeleteMemberFromSto...
6,569
all-6570
[ "HasUntilOccurrences", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "r", "*", "Recurrence", ")", "HasUntilOccurrences", "(", ")", "bool", "{", "if", "r", "!=", "nil", "&&", "r", ".", "UntilOccurrences", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n", "}" ]
6,570
all-6571
[ "PrintRepoInfo", "pretty", "-", "prints", "repo", "info", "." ]
[ "func", "PrintRepoInfo", "(", "w", "<mask>", ".", "Writer", ",", "repoInfo", "*", "pfs", ".", "RepoInfo", ",", "fullTimestamps", "bool", ")", "{", "fmt", ".", "Fprintf", "(", "w", ",", "\"", "\\t", "\"", ",", "repoInfo", ".", "Repo", ".", "Name", ")"...
6,571
all-6572
[ "UnaryServerInterceptor", "logs", "unary", "RPCs", "on", "the", "server", "side" ]
[ "func", "UnaryServerInterceptor", "(", "log", "ttnlog", ".", "Interface", ")", "grpc", ".", "UnaryServerInterceptor", "{", "return", "func", "(", "ctx", "context", ".", "Context", ",", "req", "interface", "{", "}", ",", "<mask>", "*", "grpc", ".", "UnaryServ...
6,572
all-6573
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "ReleaseAnimationsParams", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "<mask>", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation6", "(", "&", "w", ",", "v"...
6,573
all-6574
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "ClearGeolocationOverrideParams", ")", "MarshalJSON", "(", ")", "(", "[", "]", "<mask>", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation18", "(", "&", "w", ...
6,574
all-6575
[ "ClearData", "removes", "a", "key", "/", "value", "pair", "associated", "with", "the", "source", "account" ]
[ "func", "ClearData", "(", "name", "string", ",", "muts", "...", "interface", "{", "}", ")", "(", "result", "ManageDataBuilder", ")", "{", "result", ".", "MD", ".", "DataName", "=", "xdr", ".", "String64", "(", "name", ")", "\n", "<mask>", ".", "MD", ...
6,575
all-6576
[ "The", "following", "function", "is", "needed", "because", "the", "CLI", "acrobatics", "that", "we", "re", "doing", "(", "with", "having", "an", "outer", "and", "inner", "function", "each", "with", "their", "own", "custom", "settings", "and", "flag", "parsin...
[ "func", "flagHackLookup", "(", "flagName", "string", ")", "string", "{", "// e.g. \"-d\" for \"--driver\"", "flagPrefix", ":=", "flagName", "[", "1", ":", "3", "]", "\n\n", "// TODO: Should we support -flag-name (single hyphen) syntax as well?", "for", "i", ",", "arg", ...
6,576
all-6577
[ "Returns", "a", "signed", "URL", "for", "Get", "valid", "for", "the", "specified", "duration", ".", "Required", "scopes", ":", "secrets", ":", "get", ":", "<name", ">", "See", "Get", "for", "more", "details", "." ]
[ "func", "(", "secrets", "*", "Secrets", ")", "Get_SignedURL", "(", "name", "string", ",", "duration", "time", ".", "Duration", ")", "(", "*", "url", ".", "URL", ",", "error", ")", "{", "cd", ":=", "tcclient", ".", "Client", "(", "*", "secrets", ")", ...
6,577
all-6578
[ "UpdateRepo", "updates", "all", "branches", "in", "the", "repo", "with", "the", "specified", "defaults" ]
[ "func", "(", "p", "*", "protector", ")", "UpdateRepo", "(", "orgName", "string", ",", "repoName", "string", ",", "repo", "config", ".", "Repo", ")", "error", "{", "p", ".", "completedRepos", "[", "orgName", "+", "\"", "\"", "+", "repoName", "]", "=", ...
6,578
all-6579
[ "GetRangeSplitItems", "returns", "nways", "split", "range", "pivots", "of", "the", "skiplist", "items", "Explicit", "barrier", "and", "release", "should", "be", "used", "by", "the", "caller", "before", "and", "after", "this", "function", "call" ]
[ "func", "(", "s", "*", "Skiplist", ")", "GetRangeSplitItems", "(", "nways", "int", ")", "[", "]", "unsafe", ".", "Pointer", "{", "var", "deleted", "bool", "\n", "repeat", ":", "var", "itms", "[", "]", "unsafe", ".", "Pointer", "\n", "var", "finished", ...
6,579
all-6580
[ "DeleteUser", "removes", "a", "user", ".", "ErrNotFound", "is", "returned", "if", "the", "user", "isn", "t", "found", "." ]
[ "func", "(", "m", "MongoDb", ")", "DeleteUser", "(", "username", "string", ")", "error", "{", "c", ":=", "m", ".", "Connect", "(", "<mask>", ".", "COLL_NAME_USER", ")", "\n", "defer", "m", ".", "Close", "(", "c", ")", "\n\n", "// raises error if \"userna...
6,580
all-6581
[ "OnKeyPress", "sets", "the", "callback", "that", "is", "called", "when", "a", "user", "presses", "a", "Key", "while", "the", "controls", "is", "active", ".", "If", "a", "handler", "processes", "the", "key", "it", "should", "return", "true", ".", "If", "h...
[ "func", "(", "l", "*", "ListBox", ")", "OnKeyPress", "(", "fn", "func", "(", "term", ".", "<mask>", ")", "bool", ")", "{", "l", ".", "onKeyPress", "=", "fn", "\n", "}" ]
6,581
all-6582
[ "Do", "executes", "Tracing", ".", "recordClockSyncMarker", "against", "the", "provided", "context", "." ]
[ "func", "(", "p", "*", "RecordClockSyncMarkerParams", ")", "Do", "(", "ctx", "<mask>", ".", "Context", ")", "(", "err", "error", ")", "{", "return", "cdp", ".", "Execute", "(", "ctx", ",", "CommandRecordClockSyncMarker", ",", "p", ",", "nil", ")", "\n", ...
6,582
all-6583
[ "Setv", "copies", "values", "between", "two", "tables", "in", "the", "same", "Lua", "state", ".", "It", "overwrites", "existing", "values", "." ]
[ "func", "(", "lo", "*", "LuaObject", ")", "Setv", "(", "src", "*", "LuaObject", ",", "keys", "...", "string", ")", "error", "{", "// TODO: Rename? This function seems to be too specialized, is it worth", "// keeping at all?", "L", ":=", "lo", ".", "l", "\n", "if",...
6,583
all-6584
[ "DeviceToUserDistance", "is", "a", "wrapper", "around", "cairo_device_to_user_distance", "." ]
[ "func", "(", "v", "*", "<mask>", ")", "DeviceToUserDistance", "(", "x", ",", "y", "float64", ")", "(", "float64", ",", "float64", ")", "{", "C", ".", "cairo_device_to_user_distance", "(", "v", ".", "native", "(", ")", ",", "(", "*", "C", ".", "double...
6,584
all-6585
[ "Parse", "the", "template", "this", "can", "be", "called", "many", "times", "as", "a", "successful", "result", "is", "cached", "and", "is", "used", "on", "subsequent", "uses", "." ]
[ "func", "(", "t", "*", "Template", ")", "Parse", "(", ")", "error", "{", "if", "t", ".", "program", "!=", "nil", "{", "return", "nil", "\n", "}", "\n", "program", ",", "err", ":=", "parser", ".", "Parse", "(", "t", ".", "<mask>", ")", "\n", "if...
6,585
all-6586
[ "Handles", "server", "errors", "." ]
[ "func", "(", "ga", "*", "Agent", ")", "serverError", "(", "w", "http", ".", "ResponseWriter", ",", "action", "string", ",", "err", "error", ")", "{", "ga", ".", "logger", ".", "WithError", "(", "err", ")", ".", "Errorf", "(", "\"", "\"", ",", "acti...
6,586
all-6587
[ "FindAndStallTaskForCaller", "--" ]
[ "func", "(", "s", "*", "FakeTaskManager", ")", "FindAndStallTaskForCaller", "(", "callerName", "string", ")", "(", "t", "*", "taskmanager", ".", "<mask>", ",", "err", "error", ")", "{", "return", "s", ".", "ReturnedTask", ",", "s", ".", "ReturnedErr", "\n"...
6,587
all-6588
[ "Json", "is", "middleware", "to", "deserialize", "a", "JSON", "payload", "from", "the", "request", "into", "the", "struct", "that", "is", "passed", "in", ".", "The", "resulting", "struct", "is", "then", "validated", "but", "no", "error", "handling", "is", ...
[ "func", "Json", "(", "jsonStruct", "interface", "{", "}", ",", "ifacePtr", "...", "interface", "{", "}", ")", "martini", ".", "Handler", "{", "return", "func", "(", "context", "martini", ".", "Context", ",", "req", "*", "http", ".", "Request", ")", "{"...
6,588
all-6589
[ "NewRGBAPainter", "creates", "a", "new", "RGBAPainter", "for", "the", "given", "image", "." ]
[ "func", "NewPainter", "(", ")", "*", "Painter", "{", "p", ":=", "new", "(", "Painter", ")", "\n", "p", ".", "vertices", "=", "make", "(", "[", "]", "int32", ",", "0", ",", "1024", ")", "\n", "p", ".", "colors", "=", "<mask>", "(", "[", "]", "...
6,589
all-6590
[ "NewVaultReadQuery", "creates", "a", "new", "datacenter", "dependency", "." ]
[ "func", "NewVaultReadQuery", "(", "s", "string", ")", "(", "*", "VaultReadQuery", ",", "error", ")", "{", "s", "=", "strings", ".", "TrimSpace", "(", "s", ")", "\n", "s", "=", "strings", ".", "Trim", "(", "s", ",", "\"", "\"", ")", "\n", "if", "s...
6,590
all-6591
[ "PullRequestHandlers", "returns", "a", "map", "of", "plugin", "names", "to", "handlers", "for", "the", "repo", "." ]
[ "func", "(", "pa", "*", "ConfigAgent", ")", "PullRequestHandlers", "(", "owner", ",", "repo", "string", ")", "map", "[", "string", "]", "PullRequestHandler", "{", "pa", ".", "mut", ".", "Lock", "(", ")", "\n", "defer", "pa", ".", "mut", ".", "Unlock", ...
6,591
all-6592
[ "RunForS3Gateway", "creates", "a", "port", "forwarder", "for", "the", "s3gateway", "." ]
[ "func", "(", "f", "*", "PortForwarder", ")", "RunForS3Gateway", "(", "localPort", "uint16", ")", "error", "{", "if", "localPort", "==", "0", "{", "localPort", "=", "s3gatewayLocalPort", "\n", "}", "\n", "<mask>", "f", ".", "Run", "(", "\"", "\"", ",", ...
6,592
all-6593
[ "doSubscribe", "handles", "the", "subscription", "logic", "and", "is", "utilized", "by", "the", "public", "Subscribe", "functions" ]
[ "func", "(", "bus", "*", "EventBus", ")", "doSubscribe", "(", "topic", "string", ",", "fn", "interface", "{", "}", ",", "handler", "*", "eventHandler", ")", "error", "{", "bus", ".", "lock", ".", "Lock", "(", ")", "\n", "defer", "bus", ".", "lock", ...
6,593
all-6594
[ "CovList", "constructs", "new", "(", "file", ")", "Group", "Coverage" ]
[ "func", "newCoverageList", "(", "name", "string", ")", "*", "CoverageList", "{", "return", "&", "CoverageList", "{", "Coverage", ":", "&", "Coverage", "{", "<mask>", ":", "name", "}", ",", "Group", ":", "[", "]", "Coverage", "{", "}", ",", "}", "\n", ...
6,594
all-6595
[ "HandshakeTimeout", "performs", "a", "handshake", "between", "a", "given", "node", "and", "the", "peer", ".", "NOTE", ":", "blocking" ]
[ "func", "(", "p", "*", "Peer", ")", "HandshakeTimeout", "(", "ourNodeInfo", "*", "NodeInfo", ",", "timeout", "time", ".", "Duration", ")", "error", "{", "// Set deadline for handshake so we don't block forever on conn.ReadFull", "p", ".", "conn", ".", "SetDeadline", ...
6,595
all-6596
[ "GetKnownStatus", "safely", "returns", "the", "currently", "known", "status", "of", "the", "task" ]
[ "func", "(", "vol", "*", "VolumeResource", ")", "GetKnownStatus", "(", ")", "resourcestatus", ".", "ResourceStatus", "{", "vol", ".", "<mask>", ".", "RLock", "(", ")", "\n", "defer", "vol", ".", "lock", ".", "RUnlock", "(", ")", "\n\n", "return", "vol", ...
6,596
all-6597
[ "Do", "executes", "HeapProfiler", ".", "getObjectByHeapObjectId", "against", "the", "provided", "context", ".", "returns", ":", "result", "-", "Evaluation", "result", "." ]
[ "func", "(", "p", "*", "GetObjectByHeapObjectIDParams", ")", "Do", "(", "ctx", "context", ".", "Context", ")", "(", "result", "*", "runtime", ".", "RemoteObject", ",", "err", "error", ")", "{", "// execute", "var", "res", "GetObjectByHeapObjectIDReturns", "\n"...
6,597
all-6598
[ "split", "is", "like", "path", ".", "Split", "but", "uses", "this", "library", "s", "defaults", "for", "canonical", "paths" ]
[ "func", "split", "(", "p", "string", ")", "(", "string", ",", "string", ")", "{", "return", "<mask>", "(", "path", ".", "Dir", "(", "p", ")", ")", ",", "base", "(", "p", ")", "\n", "}" ]
6,598
all-6599
[ "Vec2Scale", "scales", "a", "vector", "by", "value", "t", ".", "dest", "=", "v", "*", "t", "dest", "[", "out", "]", "The", "result", "vector", ".", "v", "[", "in", "]", "The", "vector", "to", "scale", ".", "t", "[", "in", "]", "The", "scaling", ...
[ "func", "Vec2Scale", "(", "<mask>", ",", "v", "Vec2", ",", "t", "float32", ")", "{", "dest", "[", "0", "]", "=", "v", "[", "0", "]", "*", "t", "\n", "dest", "[", "1", "]", "=", "v", "[", "1", "]", "*", "t", "\n", "}" ]
6,599
all-6600
[ "CanAuthenticate", "makes", "a", "test", "request", "to", "CM", "1", ".", "5", "and", "returns", "nil", "if", "it", "is", "successful", "." ]
[ "func", "(", "s", "*", "oAuthSigner", ")", "CanAuthenticate", "(", "host", "string", ")", "error", "{", "return", "testAuth", "(", "s", ",", "s", ".", "client", ",", "host", ",", "<mask>", ")", "\n", "}" ]