id
int32
0
25.3k
idx
stringlengths
5
9
nl_tokens
listlengths
1
418
pl_tokens
listlengths
22
4.98k
5,800
all-5801
[ "HaveLoggedError", "passes", "when", "all", "of", "the", "expected", "log", "messages", "are", "logged", "as", "errors", "in", "the", "browser", "console", ".", "If", "no", "message", "is", "provided", "this", "matcher", "will", "pass", "if", "any", "error",...
[ "func", "HaveLoggedError", "(", "messages", "...", "string", ")", "types", ".", "GomegaMatcher", "{", "return", "&", "internal", ".", "LogMatcher", "{", "ExpectedMessages", ":", "messages", ",", "Levels", ":", "[", "]", "string", "{", "\"", "\"", ",", "\""...
5,801
all-5802
[ "Select", "enables", "selecting", "which", "fields", "should", "be", "retrieved", "for", "the", "results", "found", ".", "For", "example", "the", "following", "query", "would", "only", "retrieve", "the", "name", "field", ":", "err", ":", "=", "collection", "...
[ "func", "(", "q", "*", "Query", ")", "<mask>", "(", "selector", "interface", "{", "}", ")", "*", "Query", "{", "q", ".", "m", ".", "Lock", "(", ")", "\n", "q", ".", "op", ".", "selector", "=", "selector", "\n", "q", ".", "m", ".", "Unlock", "...
5,802
all-5803
[ "Create", "an", "article" ]
[ "func", "Create", "(", "c", "*", "gin", ".", "<mask>", ")", "{", "db", ":=", "c", ".", "MustGet", "(", "\"", "\"", ")", ".", "(", "*", "mgo", ".", "Database", ")", "\n\n", "article", ":=", "models", ".", "Article", "{", "}", "\n", "err", ":=", ...
5,803
all-5804
[ "Returns", "an", "slice", "of", "floats", "or", "the", "specified", "slice", "if", "the", "key", "doesn", "t", "exist", "or", "isn", "t", "a", "valid", "[]", "float64" ]
[ "func", "(", "t", "Typed", ")", "FloatsOr", "(", "<mask>", "string", ",", "d", "[", "]", "float64", ")", "[", "]", "float64", "{", "n", ",", "ok", ":=", "t", ".", "FloatsIf", "(", "key", ")", "\n", "if", "ok", "{", "return", "n", "\n", "}", "...
5,804
all-5805
[ "ValidEnum", "validates", "a", "proposed", "value", "for", "this", "enum", ".", "Implements", "the", "Enum", "interface", "for", "AccountFlags" ]
[ "func", "(", "e", "AccountFlags", ")", "ValidEnum", "(", "v", "int32", ")", "bool", "{", "_", ",", "<mask>", ":=", "accountFlagsMap", "[", "v", "]", "\n", "return", "ok", "\n", "}" ]
5,805
all-5806
[ "Set", "creates", "a", "Set", "query", ".", "Set", "assigns", "a", "value", "of", "1", "to", "a", "bit", "in", "the", "binary", "matrix", "thus", "associating", "the", "given", "row", "in", "the", "given", "field", "with", "the", "given", "column", "."...
[ "func", "(", "f", "*", "Field", ")", "Set", "(", "rowIDOrKey", ",", "colIDOrKey", "interface", "{", "}", ")", "*", "PQLBaseQuery", "{", "rowStr", ",", "colStr", ",", "err", ":=", "formatRowColIDKey", "(", "rowIDOrKey", ",", "colIDOrKey", ")", "\n", "if",...
5,806
all-5807
[ "Sleep", "indicates", "an", "expected", "call", "of", "Sleep" ]
[ "func", "(", "mr", "*", "MockTimeMockRecorder", ")", "Sleep", "(", "arg0", "<mask>", "{", "}", ")", "*", "gomock", ".", "Call", "{", "return", "mr", ".", "mock", ".", "ctrl", ".", "RecordCallWithMethodType", "(", "mr", ".", "mock", ",", "\"", "\"", "...
5,807
all-5808
[ "Authenticate", "controls", "authorizations" ]
[ "func", "(", "c", "*", "AuthController", ")", "Authenticate", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ")", "{", "decoder", ":=", "json", ".", "NewDecoder", "(", "r", ".", "Body", ")", "\n", "var", "user", "User...
5,808
all-5809
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "EventWebSocketFrameError", ")", "UnmarshalJSON", "(", "<mask>", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork44", "(", ...
5,809
all-5810
[ "GetSecretValue", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockSecretsManagerAPI", ")", "GetSecretValue", "(", "arg0", "*", "secretsmanager", ".", "GetSecretValueInput", ")", "(", "*", "secretsmanager", ".", "GetSecretValueOutput", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "...
5,810
all-5811
[ "AddList", "is", "a", "convenience", "function", "to", "add", "a", "new", "list", "to", "a", "window", ".", "It", "wraps", "the", "AddWidget", "call", ".", "AddList", "must", "be", "called", "from", "queue", "." ]
[ "func", "(", "w", "*", "Window", ")", "AddList", "(", "x", ",", "y", ",", "width", ",", "height", "int", ")", "*", "List", "{", "// we can ignore error for builtins", "l", ",", "_", ":=", "w", ".", "AddWidget", "(", "WidgetList", ",", "x", ",", "y", ...
5,811
all-5812
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "GetPossibleBreakpointsReturns", ")", "UnmarshalJSON", "(", "data", "[", "]", "<mask>", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger35", ...
5,812
all-5813
[ "Next", "is", "a", "wrapper", "around", "the", "next", "struct", "field" ]
[ "func", "(", "v", "*", "SList", ")", "Next", "(", ")", "*", "SList", "{", "n", ":=", "v", ".", "native", "(", ")", "\n", "if", "n", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "return", "wrapSList", "(", "n", ".", "<mask>", ")", "\n...
5,813
all-5814
[ "Uint32", "adds", "a", "uint32", "-", "valued", "key", ":", "value", "pair", "to", "a", "Span", ".", "LogFields", "()", "record" ]
[ "func", "Uint32", "(", "<mask>", "string", ",", "val", "uint32", ")", "Field", "{", "return", "Field", "{", "key", ":", "key", ",", "fieldType", ":", "uint32Type", ",", "numericVal", ":", "int64", "(", "val", ")", ",", "}", "\n", "}" ]
5,814
all-5815
[ "ChangeContactModattr", "creates", "a", "new", "CHANGE_CONTACT_MODATTR", "Nagios", "command", ".", "This", "command", "changes", "the", "modified", "attributes", "value", "for", "the", "specified", "contact", ".", "Modified", "attributes", "values", "are", "used", "...
[ "func", "ChangeContactModattr", "(", "contact_name", "string", ",", "value", "string", ",", ")", "*", "livestatus", ".", "Command", "{", "return", "livestatus", ".", "NewCommand", "(", "\"", "\"", ",", "stringifyArg", "(", "\"", "\"", ",", "\"", "\"", ",",...
5,815
all-5816
[ "Using", "the", "classic", "API", "posts", "a", "count", "to", "a", "stat", "using", "DefaultReporter", "at", "a", "specific", "time", "." ]
[ "func", "PostCountTime", "(", "statKey", ",", "userKey", "string", ",", "<mask>", "int", ",", "timestamp", "int64", ")", "error", "{", "return", "DefaultReporter", ".", "PostCountTime", "(", "statKey", ",", "userKey", ",", "count", ",", "timestamp", ")", "\n...
5,816
all-5817
[ "GetType", "returns", "the", "Type", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "t", "*", "TileDefMarker", ")", "GetType", "(", ")", "string", "{", "if", "t", "==", "nil", "||", "t", ".", "<mask>", "==", "nil", "{", "return", "\"", "\"", "\n", "}", "\n", "return", "*", "t", ".", "Type", "\n", "}" ]
5,817
all-5818
[ "GetIP", "returns", "public", "IP", "address", "or", "hostname", "of", "the", "machine", "instance", "." ]
[ "func", "(", "d", "*", "Driver", ")", "GetIP", "(", ")", "(", "string", ",", "error", ")", "{", "if", "err", ":=", "d", ".", "checkLegacyDriver", "(", "<mask>", ")", ";", "err", "!=", "nil", "{", "return", "\"", "\"", ",", "err", "\n", "}", "\n...
5,818
all-5819
[ "GetConfigCmd", "represents", "the", "apply", "command" ]
[ "func", "GetConfigCmd", "(", ")", "*", "cobra", ".", "Command", "{", "var", "cro", "=", "&", "cli", ".", "GetConfigOptions", "{", "}", "\n", "<mask>", "getConfigCmd", "=", "&", "cobra", ".", "Command", "{", "Use", ":", "\"", "\"", ",", "Short", ":", ...
5,819
all-5820
[ "URN", "returns", "the", "RFC", "2141", "URN", "form", "of", "uuid", "urn", ":", "uuid", ":", "xxxxxxxx", "-", "xxxx", "-", "xxxx", "-", "xxxx", "-", "xxxxxxxxxxxx", "or", "if", "uuid", "is", "invalid", "." ]
[ "func", "(", "uuid", "UUID", ")", "URN", "(", ")", "string", "{", "<mask>", "buf", "[", "36", "+", "9", "]", "byte", "\n", "copy", "(", "buf", "[", ":", "]", ",", "\"", "\"", ")", "\n", "encodeHex", "(", "buf", "[", "9", ":", "]", ",", "uui...
5,820
all-5821
[ "GetLabel", "is", "a", "wrapper", "around", "gtk_expander_get_label", "()", "." ]
[ "func", "(", "v", "*", "Expander", ")", "GetLabel", "(", ")", "<mask>", "{", "c", ":=", "C", ".", "gtk_expander_get_label", "(", "v", ".", "native", "(", ")", ")", "\n", "return", "goString", "(", "c", ")", "\n", "}" ]
5,821
all-5822
[ "flattenVMwareDVSConfigInfo", "reads", "various", "fields", "from", "a", "VMwareDVSConfigInfo", "into", "the", "passed", "in", "ResourceData", ".", "This", "is", "the", "flatten", "counterpart", "to", "expandVMwareDVSConfigSpec", "as", "the", "configuration", "info", ...
[ "func", "flattenVMwareDVSConfigInfo", "(", "d", "*", "schema", ".", "ResourceData", ",", "obj", "*", "types", ".", "VMwareDVSConfigInfo", ")", "error", "{", "d", ".", "Set", "(", "\"", "\"", ",", "obj", ".", "Name", ")", "\n", "d", ".", "Set", "(", "...
5,822
all-5823
[ "Distinct", "returns", "a", "derivative", "query", "that", "yields", "de", "-", "duplicated", "entities", "with", "respect", "to", "the", "set", "of", "projected", "fields", ".", "It", "is", "only", "used", "for", "projection", "queries", ".", "Distinct", "c...
[ "func", "(", "q", "*", "<mask>", ")", "Distinct", "(", ")", "*", "Query", "{", "q", "=", "q", ".", "clone", "(", ")", "\n", "q", ".", "distinct", "=", "true", "\n", "return", "q", "\n", "}" ]
5,823
all-5824
[ "PangoLayout", "*", "pango_cairo_create_layout", "(", "cairo_t", "*", "cr", ")", ";" ]
[ "func", "CairoCreateLayout", "(", "cr", "*", "cairo", ".", "Context", ")", "*", "Layout", "{", "c", ":=", "C", ".", "pango_cairo_create_layout", "(", "cairo_context", "(", "cr", ")", ")", "\n", "<mask>", ":=", "new", "(", "Layout", ")", "\n", "layout", ...
5,824
all-5825
[ "New", "returns", "a", "new", "Pool", "with", "size", "buckets", "for", "minSize", "to", "maxSize", "increasing", "by", "the", "given", "factor", "." ]
[ "func", "New", "(", "minSize", ",", "maxSize", "int", ",", "factor", "float64", ",", "makeFunc", "func", "(", "int", ")", "interface", "{", "}", ")", "*", "Pool", "{", "if", "minSize", "<", "1", "{", "panic", "(", "\"", "\"", ")", "\n", "}", "\n"...
5,825
all-5826
[ "NewDaemon", "returns", "a", "new", "Daemon", "object", "with", "the", "given", "configuration", "." ]
[ "func", "NewDaemon", "(", "config", "*", "DaemonConfig", ",", "os", "*", "sys", ".", "OS", ")", "*", "Daemon", "{", "return", "&", "Daemon", "{", "config", ":", "config", ",", "os", ":", "<mask>", ",", "setupChan", ":", "make", "(", "chan", "struct",...
5,826
all-5827
[ "OnePoint", "create", "Points", "instance", "with", "single", "point" ]
[ "func", "OnePoint", "(", "metric", "string", ",", "value", "float64", ",", "timestamp", "int64", ")", "*", "Points", "{", "return", "&", "Points", "{", "Metric", ":", "metric", ",", "Data", ":", "[", "]", "<mask>", "{", "Point", "{", "Value", ":", "v...
5,827
all-5828
[ "RowsLimit", "creates", "a", "Rows", "query", "with", "the", "given", "limit" ]
[ "func", "(", "f", "*", "Field", ")", "RowsLimit", "(", "limit", "int64", ")", "*", "PQLRowsQuery", "{", "if", "limit", "<", "0", "{", "return", "NewPQLRowsQuery", "(", "\"", "\"", ",", "f", ".", "<mask>", ",", "errors", ".", "New", "(", "\"", "\"",...
5,828
all-5829
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "SetMediaTextParams", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss18", "(", "&", "w", ",", "v", ")", ...
5,829
all-5830
[ "SetPresubmits", "updates", "c", ".", "Presubmits", "to", "jobs", "after", "compiling", "and", "validating", "their", "regexes", "." ]
[ "func", "(", "c", "*", "JobConfig", ")", "SetPresubmits", "(", "<mask>", "map", "[", "string", "]", "[", "]", "Presubmit", ")", "error", "{", "nj", ":=", "map", "[", "string", "]", "[", "]", "Presubmit", "{", "}", "\n", "for", "k", ",", "v", ":="...
5,830
all-5831
[ "HasInverted", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "d", "*", "DashboardConditionalFormat", ")", "HasInverted", "(", ")", "bool", "{", "if", "d", "!=", "nil", "&&", "d", ".", "Inverted", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n", "}" ]
5,831
all-5832
[ "Do", "executes", "Page", ".", "generateTestReport", "against", "the", "provided", "context", "." ]
[ "func", "(", "p", "*", "GenerateTestReportParams", ")", "Do", "(", "ctx", "context", ".", "<mask>", ")", "(", "err", "error", ")", "{", "return", "cdp", ".", "Execute", "(", "ctx", ",", "CommandGenerateTestReport", ",", "p", ",", "nil", ")", "\n", "}" ...
5,832
all-5833
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "ClearParams", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage11", "(", "&", "w", ",", "v", ")", ...
5,833
all-5834
[ "Publish", "publishes", "data", "to", "the", "given", "topic", "." ]
[ "func", "(", "p", "*", "PubSub", ")", "Publish", "(", "topic", "string", ",", "data", "[", "]", "byte", ")", "error", "{", "seqno", ":=", "p", ".", "nextSeqno", "(", ")", "\n", "m", ":=", "&", "pb", ".", "Message", "{", "Data", ":", "data", ","...
5,834
all-5835
[ "render", "primitives", "from", "array", "data", "taking", "parameters", "from", "memory" ]
[ "func", "DrawArraysIndirect", "(", "mode", "uint32", ",", "indirect", "unsafe", ".", "Pointer", ")", "{", "syscall", ".", "Syscall", "(", "gpDrawArraysIndirect", ",", "2", ",", "uintptr", "(", "<mask>", ")", ",", "uintptr", "(", "indirect", ")", ",", "0", ...
5,835
all-5836
[ "CheckPassword", "vérifie", "si", "le", "mot", "de", "passe", "est", "correct" ]
[ "func", "CheckPassword", "(", "password", "[", "]", "byte", ",", "salt", "[", "]", "byte", ",", "hpassword", "[", "]", "byte", ")", "(", "bool", ",", "error", ")", "{", "hash", ",", "err", ":=", "HashPassword", "(", "password", ",", "salt", ")", "\...
5,836
all-5837
[ "MoveForward", "moves", "the", "player", "p", "forward", "." ]
[ "func", "(", "p", "*", "player", ")", "MoveForward", "(", ")", "{", "w", ",", "h", ":=", "gophersImage", ".", "Size", "(", ")", "\n", "mx", ":=", "w", "*", "16", "\n", "my", ":=", "h", "*", "16", "\n", "s", ",", "c", ":=", "math", ".", "Sin...
5,837
all-5838
[ "Subscribe", "on", "given", "channels", "." ]
[ "func", "Subscribe", "(", "channels", "[", "]", "string", ")", "(", "Channel", ",", "error", ")", "{", "if", "hubInstance", "==", "nil", "{", "return", "nil", ",", "errorNohub", "\n", "}", "\n", "r", ",", "err", ":=", "hubInstance", ".", "Subscribe", ...
5,838
all-5839
[ "cause", "a", "material", "color", "to", "track", "the", "current", "color" ]
[ "func", "ColorMaterial", "(", "face", "uint32", ",", "<mask>", "uint32", ")", "{", "C", ".", "glowColorMaterial", "(", "gpColorMaterial", ",", "(", "C", ".", "GLenum", ")", "(", "face", ")", ",", "(", "C", ".", "GLenum", ")", "(", "mode", ")", ")", ...
5,839
all-5840
[ "NewNamedError", "creates", "a", "NamedError", "." ]
[ "func", "NewNamedError", "(", "err", "error", ")", "*", "DefaultNamedError", "{", "if", "namedErr", ",", "ok", ":=", "err", ".", "(", "NamedError", ")", ";", "ok", "{", "return", "&", "DefaultNamedError", "{", "Err", ":", "namedErr", ".", "Error", "(", ...
5,840
all-5841
[ "ListSnapshots", "lists", "all", "snapshots" ]
[ "func", "(", "c", "*", "Client", ")", "ListSnapshots", "(", ")", "(", "*", "Snapshots", ",", "error", ")", "{", "url", ":=", "snapshotColPath", "(", ")", "+", "`?depth=`", "+", "c", ".", "client", ".", "depth", "+", "`&pretty=`", "+", "strconv", ".",...
5,841
all-5842
[ "RemoveContainerReference", "removes", "container", "reference", "from", "image", "state" ]
[ "func", "(", "imageState", "*", "ImageState", ")", "RemoveContainerReference", "(", "container", "*", "apicontainer", ".", "Container", ")", "error", "{", "// Get the image state write lock for updating container reference", "imageState", ".", "lock", ".", "Lock", "(", ...
5,842
all-5843
[ "IncrementExisting", "works", "like", "Increment", "but", "assumes", "that", "the", "key", "already", "exists", "in", "memcache", "and", "doesn", "t", "take", "an", "initial", "value", ".", "IncrementExisting", "can", "save", "work", "if", "calculating", "the", ...
[ "func", "IncrementExisting", "(", "c", "context", ".", "Context", ",", "key", "string", ",", "delta", "int64", ")", "(", "newValue", "uint64", ",", "err", "error", ")", "{", "return", "incr", "(", "c", ",", "<mask>", ",", "delta", ",", "nil", ")", "\...
5,843
all-5844
[ "makeBuild", "creates", "a", "build", "from", "the", "prowjob", "using", "the", "prowjob", "s", "buildspec", "." ]
[ "func", "makeBuild", "(", "pj", "prowjobv1", ".", "ProwJob", ",", "defaultTimeout", "<mask>", ".", "Duration", ")", "(", "*", "buildv1alpha1", ".", "Build", ",", "error", ")", "{", "if", "pj", ".", "Spec", ".", "BuildSpec", "==", "nil", "{", "return", ...
5,844
all-5845
[ "Combination", "generator" ]
[ "func", "Combinations", "(", "list", "Replacer", ",", "select_num", "int", ",", "repeatable", "bool", ",", "buf", "int", ")", "(", "c", "chan", "Replacer", ")", "{", "c", "=", "make", "(", "chan", "Replacer", ",", "buf", ")", "\n", "index", ":=", "ma...
5,845
all-5846
[ "RemoveTag", "()", "is", "a", "wrapper", "around", "gtk_text_buffer_remove_tag", "()", "." ]
[ "func", "(", "v", "*", "TextBuffer", ")", "RemoveTag", "(", "tag", "*", "TextTag", ",", "start", ",", "end", "*", "TextIter", ")", "{", "C", ".", "gtk_text_buffer_remove_tag", "(", "v", ".", "native", "(", ")", ",", "<mask>", ".", "native", "(", ")",...
5,846
all-5847
[ "PackStart", "()", "is", "a", "wrapper", "around", "gtk_cell_layout_pack_start", "()", "." ]
[ "func", "(", "v", "*", "CellLayout", ")", "PackStart", "(", "cell", "ICellRenderer", ",", "expand", "bool", ")", "{", "C", ".", "gtk_cell_layout_pack_start", "(", "v", ".", "native", "(", ")", ",", "<mask>", ".", "toCellRenderer", "(", ")", ",", "gbool",...
5,847
all-5848
[ "Verify", "broker", "supports", "the", "check", "type", "to", "be", "used" ]
[ "func", "(", "cm", "*", "CheckManager", ")", "brokerSupportsCheckType", "(", "checkType", "CheckTypeType", ",", "details", "*", "api", ".", "BrokerDetail", ")", "bool", "{", "baseType", ":=", "string", "(", "checkType", ")", "\n\n", "for", "_", ",", "module"...
5,848
all-5849
[ "NewDryRunProwJobClient", "creates", "a", "new", "client", "that", "uses", "deck", "as", "a", "read", "-", "only", "proxy", "for", "ProwJob", "data" ]
[ "func", "NewDryRunProwJobClient", "(", "deckURL", "string", ")", "prowv1", ".", "ProwJobInterface", "{", "return", "&", "dryRunProwJobClient", "{", "deckURL", ":", "deckURL", ",", "<mask>", ":", "&", "http", ".", "Client", "{", "}", ",", "}", "\n", "}" ]
5,849
all-5850
[ "coalesceAdjacentRecords", "coalesces", "the", "list", "of", "records", "into", "groups", "of", "adjacent", "equal", "or", "unequal", "counts", "." ]
[ "func", "coalesceAdjacentRecords", "(", "name", "string", ",", "recs", "[", "]", "reportRecord", ")", "(", "groups", "[", "]", "diffStats", ")", "{", "var", "prevCase", "int", "// Arbitrary index into which case last occurred", "\n", "lastStats", ":=", "func", "("...
5,850
all-5851
[ "ValidForPrefix", "returns", "false", "when", "iteration", "is", "done", "or", "when", "the", "current", "key", "is", "not", "prefixed", "by", "the", "specified", "prefix", "." ]
[ "func", "(", "it", "*", "Iterator", ")", "ValidForPrefix", "(", "<mask>", "[", "]", "byte", ")", "bool", "{", "return", "it", ".", "Valid", "(", ")", "&&", "bytes", ".", "HasPrefix", "(", "it", ".", "item", ".", "key", ",", "prefix", ")", "\n", "...
5,851
all-5852
[ "resourceVSphereVirtualMachineCreateBareStandard", "performs", "the", "steps", "necessary", "during", "resourceVSphereVirtualMachineCreateBare", "to", "create", "a", "virtual", "machine", "when", "a", "datastore", "cluster", "is", "not", "supplied", "." ]
[ "func", "resourceVSphereVirtualMachineCreateBareStandard", "(", "d", "*", "schema", ".", "ResourceData", ",", "meta", "interface", "{", "}", ",", "fo", "*", "object", ".", "Folder", ",", "spec", "types", ".", "VirtualMachineConfigSpec", ",", "pool", "*", "<mask>...
5,852
all-5853
[ "Repeated", "combination", "generator", "for", "int", "slice" ]
[ "func", "repeated_combinations", "(", "list", "[", "]", "int", ",", "select_num", ",", "buf", "int", ")", "(", "c", "chan", "[", "]", "int", ")", "{", "c", "=", "make", "(", "chan", "[", "]", "int", ",", "buf", ")", "\n", "go", "func", "(", ")"...
5,853
all-5854
[ "MergeMethod", "returns", "the", "merge", "method", "to", "use", "for", "a", "repo", ".", "The", "default", "of", "merge", "is", "returned", "when", "not", "overridden", "." ]
[ "func", "(", "t", "*", "Tide", ")", "MergeMethod", "(", "org", ",", "repo", "string", ")", "github", ".", "PullRequestMergeType", "{", "name", ":=", "org", "+", "\"", "\"", "+", "repo", "\n\n", "v", ",", "ok", ":=", "t", ".", "MergeType", "[", "nam...
5,854
all-5855
[ "NewLogBackend", "creates", "a", "new", "LogBackend", "." ]
[ "func", "NewLogBackend", "(", "out", "io", ".", "<mask>", ",", "prefix", "string", ",", "flag", "int", ")", "*", "LogBackend", "{", "b", ":=", "&", "LogBackend", "{", "Logger", ":", "log", ".", "New", "(", "out", ",", "prefix", ",", "flag", ")", "}...
5,855
all-5856
[ "advertiseMatchesCluster", "confirms", "peer", "URLs", "match", "those", "in", "the", "cluster", "peer", "list", "." ]
[ "func", "(", "c", "*", "ServerConfig", ")", "advertiseMatchesCluster", "(", ")", "error", "{", "urls", ",", "apurls", ":=", "c", ".", "InitialPeerURLsMap", "[", "c", ".", "Name", "]", ",", "c", ".", "PeerURLs", ".", "StringSlice", "(", ")", "\n", "urls...
5,856
all-5857
[ "NewRule", "creates", "a", "new", "rule", "." ]
[ "func", "NewRule", "(", "<mask>", "string", ",", "match", "string", ")", "(", "*", "Rule", ",", "error", ")", "{", "matchRegexp", ",", "err", ":=", "regexp", ".", "Compile", "(", "\"", "\"", "+", "match", ")", "\n", "if", "err", "!=", "nil", "{", ...
5,857
all-5858
[ "SendAppendReq", "updates", "the", "ServerStats", "in", "response", "to", "an", "AppendRequest", "being", "sent", "by", "this", "server" ]
[ "func", "(", "ss", "*", "ServerStats", ")", "SendAppendReq", "(", "reqSize", "int", ")", "{", "ss", ".", "Lock", "(", ")", "\n", "defer", "ss", ".", "Unlock", "(", ")", "\n\n", "<mask>", ".", "becomeLeader", "(", ")", "\n\n", "ss", ".", "sendRateQueu...
5,858
all-5859
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "GetFileInfoParams", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom45", "(", "&", "w", ",", "v", ")", ...
5,859
all-5860
[ "Locator", "returns", "a", "locator", "for", "the", "given", "resource" ]
[ "func", "(", "r", "*", "MultiCloudImageSetting", ")", "Locator", "(", "api", "*", "API", ")", "*", "MultiCloudImageSettingLocator", "{", "for", "_", ",", "l", ":=", "<mask>", "r", ".", "Links", "{", "if", "l", "[", "\"", "\"", "]", "==", "\"", "\"", ...
5,860
all-5861
[ "SetTokenData", "implements", "the", "flame", ".", "GenericToken", "interface", "." ]
[ "func", "(", "t", "*", "Token", ")", "SetTokenData", "(", "typ", "TokenType", ",", "scope", "[", "]", "string", ",", "expiresAt", "time", ".", "Time", ",", "client", "Client", ",", "resourceOwner", "ResourceOwner", ")", "{", "t", ".", "Type", "=", "typ...
5,861
all-5862
[ "ReceiveIssue", "is", "a", "wrapper", "on", "plugin", ".", "ReceiveIssue", "()", "logging", "the", "author" ]
[ "func", "(", "a", "*", "AuthorLoggerPluginWrapper", ")", "ReceiveIssue", "(", "issue", "sql", ".", "Issue", ")", "[", "]", "<mask>", "{", "points", ":=", "a", ".", "plugin", ".", "ReceiveIssue", "(", "issue", ")", "\n", "if", "a", ".", "enabled", "{", ...
5,862
all-5863
[ "CheckInternalVisibility", "overrides", "the", "given", "visibility", "if", "the", "package", "is", "internal", "." ]
[ "func", "CheckInternalVisibility", "(", "rel", ",", "visibility", "<mask>", ")", "string", "{", "if", "i", ":=", "strings", ".", "LastIndex", "(", "rel", ",", "\"", "\"", ")", ";", "i", ">=", "0", "{", "visibility", "=", "fmt", ".", "Sprintf", "(", "...
5,863
all-5864
[ "Open", "creates", "and", "opens", "a", "database", "at", "the", "given", "path", ".", "If", "the", "file", "does", "not", "exist", "then", "it", "will", "be", "created", "automatically", ".", "Passing", "in", "nil", "options", "will", "cause", "Bolt", "...
[ "func", "Open", "(", "<mask>", "string", ",", "mode", "os", ".", "FileMode", ",", "options", "*", "bolt", ".", "Options", ")", "(", "DB", ",", "error", ")", "{", "db", ",", "err", ":=", "bolt", ".", "Open", "(", "path", ",", "mode", ",", "options...
5,864
all-5865
[ "Publish", "a", "request", "to", "purge", "caches", "named", "cacheName", "with", "on", "provisionerId", "/", "workerType", "workers", ".", "If", "such", "a", "request", "already", "exists", "its", "before", "timestamp", "is", "updated", "to", "the", "current"...
[ "func", "(", "purgeCache", "*", "PurgeCache", ")", "PurgeCache", "(", "provisionerId", ",", "workerType", "string", ",", "payload", "*", "PurgeCacheRequest", ")", "error", "{", "cd", ":=", "tcclient", ".", "Client", "(", "*", "purgeCache", ")", "\n", "_", ...
5,865
all-5866
[ "NewInmemStore", "returns", "a", "new", "in", "-", "memory", "backend", ".", "Do", "not", "ever", "use", "for", "production", ".", "Only", "for", "testing", "." ]
[ "func", "NewInmemStore", "(", ")", "*", "InmemStore", "{", "i", ":=", "&", "InmemStore", "{", "logs", ":", "make", "(", "map", "[", "uint64", "]", "*", "<mask>", ")", ",", "kv", ":", "make", "(", "map", "[", "string", "]", "[", "]", "byte", ")", ...
5,866
all-5867
[ "FromHeader", "looks", "for", "the", "request", "in", "the", "authentication", "header", "or", "call", "ParseMultipartForm", "if", "not", "present", ".", "TODO", ":", "Implement", "parsing", "form", "data", "." ]
[ "func", "FromHeader", "(", "r", "*", "http", ".", "Request", ")", "(", "*", "jwt", ".", "JSONWebToken", ",", "error", ")", "{", "if", "r", "==", "nil", "{", "return", "nil", ",", "ErrNilRequest", "\n", "}", "\n", "raw", ":=", "\"", "\"", "\n", "i...
5,867
all-5868
[ "LoadCodec", "loads", "a", "pre", "-", "compiled", "language", "file" ]
[ "func", "LoadCodec", "(", "bank", "string", ")", "(", "codec", "*", "WordCodec", ",", "err", "error", ")", "{", "words", ",", "err", ":=", "loadBank", "(", "bank", ")", "\n", "if", "err", "!=", "nil", "{", "return", "codec", ",", "err", "\n", "}", ...
5,868
all-5869
[ "MarshalEasyJSON", "satisfies", "easyjson", ".", "Marshaler", "." ]
[ "func", "(", "t", "DialogType", ")", "MarshalEasyJSON", "(", "out", "*", "jwriter", ".", "Writer", ")", "{", "out", ".", "<mask>", "(", "string", "(", "t", ")", ")", "\n", "}" ]
5,869
all-5870
[ "bind", "a", "buffer", "to", "a", "vertex", "buffer", "bind", "point" ]
[ "func", "BindVertexBuffer", "(", "bindingindex", "uint32", ",", "buffer", "uint32", ",", "offset", "int", ",", "stride", "int32", ")", "{", "syscall", ".", "Syscall6", "(", "gpBindVertexBuffer", ",", "4", ",", "uintptr", "(", "bindingindex", ")", ",", "uintp...
5,870
all-5871
[ "String", "returns", "a", "string", "representation", "of", "the", "key", "and", "value", "." ]
[ "func", "(", "lf", "Field", ")", "String", "(", ")", "string", "{", "return", "fmt", ".", "Sprint", "(", "lf", ".", "<mask>", ",", "\"", "\"", ",", "lf", ".", "Value", "(", ")", ")", "\n", "}" ]
5,871
all-5872
[ "/", "*", "GDK", "Keyval", "KeyvalFromName", "()", "is", "a", "wrapper", "around", "gdk_keyval_from_name", "()", "." ]
[ "func", "KeyvalFromName", "(", "keyvalName", "string", ")", "uint", "{", "str", ":=", "(", "*", "C", ".", "gchar", ")", "(", "C", ".", "CString", "(", "keyvalName", ")", ")", "\n", "defer", "C", ".", "<mask>", "(", "unsafe", ".", "Pointer", "(", "s...
5,872
all-5873
[ "newPipelineConfig", "returns", "a", "client", "and", "informer", "capable", "of", "mutating", "and", "monitoring", "the", "specified", "config", "." ]
[ "func", "newPipelineConfig", "(", "cfg", "rest", ".", "Config", ",", "stop", "chan", "struct", "{", "}", ")", "(", "*", "pipelineConfig", ",", "error", ")", "{", "bc", ",", "err", ":=", "pipelineset", ".", "NewForConfig", "(", "&", "cfg", ")", "\n", ...
5,873
all-5874
[ "flattenClusterVmGroup", "saves", "a", "ClusterVmGroup", "into", "the", "supplied", "ResourceData", "." ]
[ "func", "flattenClusterVMGroup", "(", "d", "*", "schema", ".", "ResourceData", ",", "meta", "interface", "{", "}", ",", "obj", "*", "types", ".", "ClusterVmGroup", ")", "error", "{", "client", ",", "err", ":=", "resourceVSphereComputeClusterVMGroupClient", "(", ...
5,874
all-5875
[ "LoadModule", "loads", "the", "kernel", "module", "with", "the", "given", "name", "by", "invoking", "modprobe", "." ]
[ "func", "LoadModule", "(", "module", "string", ")", "error", "{", "if", "shared", ".", "PathExists", "(", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "module", ")", ")", "{", "return", "nil", "\n", "}", "\n\n", "_", ",", "err", ":=", "<mask>", "."...
5,875
all-5876
[ "GetLimitsResourceListFromPipeline", "returns", "a", "list", "of", "resources", "that", "the", "pipeline", "maximally", "is", "limited", "to", "." ]
[ "func", "GetLimitsResourceListFromPipeline", "(", "pipelineInfo", "*", "pps", ".", "PipelineInfo", ")", "(", "*", "v1", ".", "ResourceList", ",", "<mask>", ")", "{", "return", "getResourceListFromSpec", "(", "pipelineInfo", ".", "ResourceLimits", ",", "pipelineInfo"...
5,876
all-5877
[ "GetSessions", "returns", "sessions", "." ]
[ "func", "(", "h", "*", "Handler", ")", "GetSessions", "(", "tkn", ",", "channel", "string", ")", "(", "[", "]", "<mask>", ".", "Session", ",", "error", ")", "{", "logger", ":=", "h", ".", "logger", ".", "Add", "(", "\"", "\"", ",", "\"", "\"", ...
5,877
all-5878
[ "GetFinishedAt", "sets", "the", "timestamp", "for", "container", "s", "stopped", "time" ]
[ "func", "(", "c", "*", "Container", ")", "GetFinishedAt", "(", ")", "<mask>", ".", "Time", "{", "c", ".", "lock", ".", "RLock", "(", ")", "\n", "defer", "c", ".", "lock", ".", "RUnlock", "(", ")", "\n\n", "return", "c", ".", "finishedAt", "\n", "...
5,878
all-5879
[ "Finalize", "ensures", "there", "no", "nil", "pointers", "." ]
[ "func", "(", "c", "*", "TransportConfig", ")", "Finalize", "(", ")", "{", "if", "c", ".", "DialKeepAlive", "==", "nil", "{", "c", ".", "DialKeepAlive", "=", "TimeDuration", "(", "DefaultDialKeepAlive", ")", "\n", "}", "\n\n", "if", "c", ".", "DialTimeout...
5,879
all-5880
[ "Do", "executes", "DOMDebugger", ".", "removeXHRBreakpoint", "against", "the", "provided", "context", "." ]
[ "func", "(", "p", "*", "RemoveXHRBreakpointParams", ")", "Do", "(", "ctx", "context", ".", "<mask>", ")", "(", "err", "error", ")", "{", "return", "cdp", ".", "Execute", "(", "ctx", ",", "CommandRemoveXHRBreakpoint", ",", "p", ",", "nil", ")", "\n", "}...
5,880
all-5881
[ "UnmarshalEasyJSON", "satisfies", "easyjson", ".", "Unmarshaler", "." ]
[ "func", "(", "t", "*", "BackendNodeID", ")", "UnmarshalEasyJSON", "(", "in", "*", "jlexer", ".", "Lexer", ")", "{", "buf", ":=", "<mask>", ".", "Raw", "(", ")", "\n", "if", "l", ":=", "len", "(", "buf", ")", ";", "l", ">", "2", "&&", "buf", "["...
5,881
all-5882
[ "Version", "returns", "the", "underlying", "docker", "version", "." ]
[ "func", "(", "engine", "*", "DockerTaskEngine", ")", "Version", "(", ")", "(", "string", ",", "error", ")", "{", "return", "engine", ".", "client", ".", "<mask>", "(", "engine", ".", "ctx", ",", "dockerclient", ".", "VersionTimeout", ")", "\n", "}" ]
5,882
all-5883
[ "splitKey", "splits", "a", "key", "into", "the", "format", "we", "want", "and", "also", "postpends", "the", "generation", "number" ]
[ "func", "(", "s", "*", "objBlockAPIServer", ")", "splitKey", "(", "key", "string", ")", "string", "{", "gen", ":=", "s", ".", "getGeneration", "(", ")", "\n", "if", "len", "(", "key", ")", "<", "prefixLength", "{", "return", "fmt", ".", "Sprintf", "(...
5,883
all-5884
[ "NewDataReadWriter", "returns", "a", "new", "callback", "based", "data", "buffer" ]
[ "func", "NewDataReadWriter", "(", "rw", "io", ".", "ReadWriter", ")", "(", "*", "Data", ",", "error", ")", "{", "d", ":=", "newData", "(", ")", "\n", "d", ".", "r", "=", "rw", "\n", "d", ".", "w", "=", "rw", "\n", "d", ".", "cbs", ".", "<mask...
5,884
all-5885
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "EventAttachedToTarget", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget19", "(", "&", ...
5,885
all-5886
[ "isMembersEqual", "checks", "whether", "two", "members", "equal", "except", "ID", "field", ".", "The", "given", "wmembs", "should", "always", "set", "ID", "field", "to", "empty", "string", "." ]
[ "func", "isMembersEqual", "(", "membs", "[", "]", "client", ".", "Member", ",", "wmembs", "[", "]", "<mask>", ".", "Member", ")", "bool", "{", "sort", ".", "Sort", "(", "SortableMemberSliceByPeerURLs", "(", "membs", ")", ")", "\n", "sort", ".", "Sort", ...
5,886
all-5887
[ "similar", "returns", "true", "if", "the", "two", "Signature", "are", "equal", "or", "almost", "but", "not", "quite", "equal", "." ]
[ "func", "(", "s", "*", "Signature", ")", "similar", "(", "r", "*", "Signature", ",", "similar", "Similarity", ")", "bool", "{", "if", "s", ".", "State", "!=", "r", ".", "State", "||", "!", "s", ".", "CreatedBy", ".", "similar", "(", "&", "r", "."...
5,887
all-5888
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "EventScreencastFrame", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "<mask>", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage52", "(", "&", "w", ",", "v", ")"...
5,888
all-5889
[ "Encode", "encodes", "a", "JWT", "using", "the", "Algorithm", "and", "Signer", "returning", "the", "URL", "-", "safe", "encoded", "token", "or", "any", "errors", "encountered", "during", "encoding", "." ]
[ "func", "Encode", "(", "alg", "Algorithm", ",", "signer", "Signer", ",", "obj", "<mask>", "{", "}", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "var", "err", "error", "\n\n", "// grab encode targets", "headerObj", ",", "payloadObj", ",", "err", ...
5,889
all-5890
[ "findCommand", "searches", "the", "list", "of", "template", "configs", "for", "the", "given", "command", "and", "returns", "it", "if", "it", "exists", "." ]
[ "func", "findCommand", "(", "c", "*", "config", ".", "TemplateConfig", ",", "templates", "[", "]", "*", "config", ".", "TemplateConfig", ")", "*", "config", ".", "TemplateConfig", "{", "needle", ":=", "config", ".", "StringVal", "(", "c", ".", "Exec", "....
5,890
all-5891
[ "readBoshJob", "reads", "a", "BOSH", "job", "manifest", "out", "of", "the", "given", "reader", "into", "a", "new", "JobManifest", "struct" ]
[ "func", "(", "r", "*", "BoshRelease", ")", "readBoshJob", "(", "jr", "io", ".", "Reader", ")", "(", "enaml", ".", "JobManifest", ",", "error", ")", "{", "var", "job", "enaml", ".", "JobManifest", "\n", "jw", ":=", "pkg", ".", "NewTgzWalker", "(", "jr...
5,891
all-5892
[ "UpdateIntegrationGCP", "updates", "a", "Google", "Cloud", "Platform", "Integration", "." ]
[ "func", "(", "client", "*", "Client", ")", "UpdateIntegrationGCP", "(", "cir", "*", "IntegrationGCPUpdateRequest", ")", "error", "{", "return", "<mask>", ".", "doJsonRequest", "(", "\"", "\"", ",", "\"", "\"", ",", "cir", ",", "nil", ")", "\n", "}" ]
5,892
all-5893
[ "Scan", "read", "a", "value", "from", "a", "database", "driver" ]
[ "func", "(", "e", "*", "Email", ")", "Scan", "(", "raw", "interface", "{", "}", ")", "error", "{", "switch", "v", ":=", "<mask>", ".", "(", "type", ")", "{", "case", "[", "]", "byte", ":", "*", "e", "=", "Email", "(", "string", "(", "v", ")",...
5,893
all-5894
[ "filterSubpools", "filters", "non", "-", "pool", "PRs", "out", "of", "the", "initially", "identified", "subpools", "deleting", "any", "pools", "that", "become", "empty", ".", "See", "filterSubpool", "for", "filtering", "details", "." ]
[ "func", "(", "c", "*", "Controller", ")", "filterSubpools", "(", "goroutines", "int", ",", "raw", "map", "[", "string", "]", "*", "subpool", ")", "map", "[", "string", "]", "*", "subpool", "{", "filtered", ":=", "make", "(", "map", "[", "string", "]"...
5,894
all-5895
[ "DerivePBKDF2", "implements", "Password", "Based", "Key", "Derivation", "Function", "2", "RFC", "2898", ".", "Derives", "key", "of", "keyBitLength", "size", "given", "password", "salt", "iteration", "count", "and", "hash", "function" ]
[ "func", "DerivePBKDF2", "(", "password", ",", "salt", "[", "]", "byte", ",", "iterationCount", ",", "keyBitLength", "int", ",", "h", "<mask>", ".", "Hash", ")", "[", "]", "byte", "{", "prf", ":=", "hmac", ".", "New", "(", "func", "(", ")", "hash", ...
5,895
all-5896
[ "BindVariablesEqual", "compares", "two", "maps", "of", "bind", "variables", "." ]
[ "func", "BindVariablesEqual", "(", "x", ",", "y", "<mask>", "[", "string", "]", "*", "querypb", ".", "BindVariable", ")", "bool", "{", "return", "reflect", ".", "DeepEqual", "(", "&", "querypb", ".", "BoundQuery", "{", "BindVariables", ":", "x", "}", ","...
5,896
all-5897
[ "sync", "checks", "to", "see", "if", "an", "issue", "is", "already", "on", "github", "and", "tries", "to", "create", "a", "new", "issue", "for", "it", "if", "it", "is", "not", ".", "True", "is", "returned", "iff", "a", "new", "issue", "is", "created"...
[ "func", "(", "c", "*", "IssueCreator", ")", "sync", "(", "issue", "Issue", ")", "bool", "{", "// First look for existing issues with this ID.", "id", ":=", "issue", ".", "ID", "(", ")", "\n", "var", "closedIssues", "[", "]", "*", "github", ".", "Issue", "\...
5,897
all-5898
[ "TranslateGeo", "is", "deprecated", "as", "of", "1", ".", "2", ".", "0", "-", "alpha", ".", "Use", "Translate", "instead", "." ]
[ "func", "TranslateGeo", "(", "tx", ",", "ty", "float64", ")", "GeoM", "{", "g", ":=", "GeoM", "{", "}", "\n", "g", ".", "Translate", "(", "<mask>", ",", "ty", ")", "\n", "return", "g", "\n", "}" ]
5,898
all-5899
[ "DropStatementID", "releases", "the", "hdb", "statement", "handle", "." ]
[ "func", "(", "s", "*", "Session", ")", "DropStatementID", "(", "id", "uint64", ")", "error", "{", "s", ".", "mu", ".", "Lock", "(", ")", "\n", "defer", "s", ".", "mu", ".", "Unlock", "(", ")", "\n\n", "s", ".", "statementID", ".", "<mask>", "=", ...
5,899
all-5900
[ "MustAddError", "calls", "AddError", "and", "panics", "in", "case", "of", "an", "error", "." ]
[ "func", "(", "r", "*", "MapErrorRegistry", ")", "MustAddError", "(", "code", "int", ",", "err", "error", ")", "{", "if", "e", ":=", "r", ".", "AddError", "(", "<mask>", ",", "err", ")", ";", "e", "!=", "nil", "{", "panic", "(", "e", ")", "\n", ...