id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
23,600 | all-23601 | [
"Load",
"loads",
"a",
"dictionary",
"from",
"a",
"file",
"."
] | [
"func",
"Load",
"(",
"path",
"string",
")",
"(",
"d",
"*",
"Dic",
",",
"err",
"error",
")",
"{",
"d",
"=",
"new",
"(",
"Dic",
")",
"\n",
"r",
",",
"err",
":=",
"zip",
".",
"OpenReader",
"(",
"path",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
... |
23,601 | all-23602 | [
"PackWithSignature",
"packs",
"message",
"with",
"signature",
"."
] | [
"func",
"PackWithSignature",
"(",
"msg",
"[",
"]",
"byte",
",",
"key",
"*",
"ecdsa",
".",
"PrivateKey",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"sig",
",",
"err",
":=",
"signature",
"(",
"key",
",",
"<mask>",
")",
"\n",
"if",
"err",
"... |
23,602 | all-23603 | [
"Transport",
"communicates",
"with",
"etcd",
"tester",
"."
] | [
"func",
"(",
"srv",
"*",
"Server",
")",
"Transport",
"(",
"stream",
"rpcpb",
".",
"Transport_TransportServer",
")",
"(",
"err",
"error",
")",
"{",
"errc",
":=",
"make",
"(",
"chan",
"error",
")",
"\n",
"go",
"func",
"(",
")",
"{",
"for",
"{",
"var",
... |
23,603 | all-23604 | [
"Success",
"calls",
"UI",
".",
"Success",
"to",
"write",
".",
"Useful",
"when",
"you",
"want",
"separate",
"colors",
"or",
"prefixes",
".",
"SuccessPrefix",
"is",
"used",
"to",
"prefix",
"the",
"message",
"."
] | [
"func",
"(",
"ui",
"*",
"PrefixUI",
")",
"Success",
"(",
"message",
"string",
")",
"{",
"if",
"ui",
".",
"SuccessPrefix",
"==",
"\"",
"\"",
"{",
"//Lets keep the space if they want one",
"message",
"=",
"ui",
".",
"SuccessPrefix",
"+",
"message",
"\n",
"}",
... |
23,604 | all-23605 | [
"Compile",
"satisfies",
"the",
"compiler",
".",
"Compiler",
"interface",
".",
"It",
"accepts",
"an",
"AST",
"created",
"by",
"parser",
".",
"Parser",
"and",
"returns",
"vm",
".",
"ByteCode",
"or",
"an",
"error"
] | [
"func",
"(",
"c",
"*",
"BasicCompiler",
")",
"Compile",
"(",
"ast",
"*",
"parser",
".",
"AST",
")",
"(",
"*",
"vm",
".",
"ByteCode",
",",
"error",
")",
"{",
"ctx",
":=",
"&",
"context",
"{",
"ByteCode",
":",
"vm",
".",
"NewByteCode",
"(",
")",
",... |
23,605 | all-23606 | [
"RegisterMethod",
"adds",
"support",
"for",
"custom",
"HTTP",
"method",
"handlers",
"available",
"via",
"Router#Method",
"and",
"Router#MethodFunc"
] | [
"func",
"RegisterMethod",
"(",
"method",
"string",
")",
"{",
"if",
"method",
"==",
"\"",
"\"",
"{",
"return",
"\n",
"}",
"\n",
"method",
"=",
"strings",
".",
"ToUpper",
"(",
"method",
")",
"\n",
"if",
"_",
",",
"ok",
":=",
"methodMap",
"[",
"<mask>",... |
23,606 | all-23607 | [
"returns",
"list",
"of",
"all",
"namespaces",
"matching",
"given",
"hostname"
] | [
"func",
"matchingNamespaces",
"(",
"hostname",
"string",
",",
"namespaces",
"[",
"]",
"*",
"sd",
".",
"NamespaceSummary",
")",
"[",
"]",
"*",
"sd",
".",
"NamespaceSummary",
"{",
"matchingNamespaces",
":=",
"make",
"(",
"[",
"]",
"*",
"sd",
".",
"NamespaceS... |
23,607 | all-23608 | [
"Row",
"creates",
"a",
"Row",
"query",
".",
"Row",
"retrieves",
"the",
"indices",
"of",
"all",
"the",
"set",
"columns",
"in",
"a",
"row",
".",
"It",
"also",
"retrieves",
"any",
"attributes",
"set",
"on",
"that",
"row",
"or",
"column",
"."
] | [
"func",
"(",
"f",
"*",
"Field",
")",
"Row",
"(",
"rowIDOrKey",
"interface",
"{",
"}",
")",
"*",
"PQLRowQuery",
"{",
"rowStr",
",",
"err",
":=",
"formatIDKeyBool",
"(",
"rowIDOrKey",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"NewPQLRowQuery",
... |
23,608 | all-23609 | [
"Key",
"is",
"the",
"index",
"key",
";",
"it",
"may",
"return",
"-",
"1",
"if",
"in",
"a",
"split",
"state"
] | [
"func",
"(",
"si",
"SliceIndex",
")",
"<mask>",
"(",
")",
"int",
"{",
"if",
"si",
".",
"xkey",
"!=",
"si",
".",
"ykey",
"{",
"return",
"-",
"1",
"\n",
"}",
"\n",
"return",
"si",
".",
"xkey",
"\n",
"}"
] |
23,609 | all-23610 | [
"Uses",
"id",
"or",
"address",
"this",
"is",
"only",
"used",
"because",
"previously",
"we",
"didn",
"t",
"have",
"iaas",
"-",
"id",
"in",
"node",
"metadata",
"."
] | [
"func",
"FindMachineByIdOrAddress",
"(",
"id",
"string",
",",
"address",
"string",
")",
"(",
"Machine",
",",
"error",
")",
"{",
"coll",
",",
"err",
":=",
"collection",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"Machine",
"{",
"}",
",",
... |
23,610 | all-23611 | [
"InitWithKube",
"is",
"like",
"InitServiceEnv",
"but",
"also",
"assumes",
"that",
"it",
"s",
"run",
"inside",
"a",
"kubernetes",
"cluster",
"and",
"tries",
"to",
"connect",
"to",
"the",
"kubernetes",
"API",
"server",
"."
] | [
"func",
"InitWithKube",
"(",
"config",
"*",
"<mask>",
")",
"*",
"ServiceEnv",
"{",
"env",
":=",
"InitServiceEnv",
"(",
"config",
")",
"\n",
"env",
".",
"kubeEg",
".",
"Go",
"(",
"env",
".",
"initKubeClient",
")",
"\n",
"return",
"env",
"// env is not ready... |
23,611 | all-23612 | [
"RenameClusterMember",
"changes",
"the",
"name",
"of",
"an",
"existing",
"member"
] | [
"func",
"(",
"r",
"*",
"ProtocolLXD",
")",
"RenameClusterMember",
"(",
"name",
"string",
",",
"member",
"api",
".",
"ClusterMemberPost",
")",
"error",
"{",
"if",
"!",
"r",
".",
"HasExtension",
"(",
"\"",
"\"",
")",
"{",
"return",
"fmt",
".",
"Errorf",
... |
23,612 | all-23613 | [
"GetNetworkLeases",
"returns",
"a",
"list",
"of",
"Network",
"struct"
] | [
"func",
"(",
"r",
"*",
"ProtocolLXD",
")",
"GetNetworkLeases",
"(",
"<mask>",
"string",
")",
"(",
"[",
"]",
"api",
".",
"NetworkLease",
",",
"error",
")",
"{",
"if",
"!",
"r",
".",
"HasExtension",
"(",
"\"",
"\"",
")",
"{",
"return",
"nil",
",",
"f... |
23,613 | all-23614 | [
"/",
"*",
"Initializes",
"CvMat",
"header"
] | [
"func",
"(",
"mat",
"*",
"Mat",
")",
"InitHeader",
"(",
"<mask>",
",",
"cols",
",",
"type_",
"int",
",",
"data",
"unsafe",
".",
"Pointer",
",",
"step",
"int",
")",
"{",
"C",
".",
"cvInitMatHeader",
"(",
"(",
"*",
"C",
".",
"CvMat",
")",
"(",
"mat... |
23,614 | all-23615 | [
"HTTPLogger",
"is",
"simple",
"http",
"access",
"logger"
] | [
"func",
"HTTPLogger",
"(",
"name",
"string",
",",
"handler",
"http",
".",
"<mask>",
")",
"http",
".",
"Handler",
"{",
"return",
"glg",
".",
"HTTPLogger",
"(",
"name",
",",
"handler",
")",
"\n",
"}"
] |
23,615 | all-23616 | [
"Nonce",
"returns",
"a",
"handler",
"that",
"will",
"check",
"each",
"request",
"for",
"the",
"existence",
"of",
"a",
"nonce",
".",
"If",
"a",
"nonce",
"exists",
"it",
"will",
"be",
"checked",
"for",
"expiration",
".",
"A",
"status",
"will",
"be",
"recor... | [
"func",
"Nonce",
"(",
"h",
"http",
".",
"Handler",
",",
"opts",
"...",
"Option",
")",
"http",
".",
"Handler",
"{",
"headerStorage",
":=",
"nonceHeaderStorage",
"{",
"}",
"\n",
"o",
":=",
"options",
"{",
"logger",
":",
"handler",
".",
"OutLogger",
"(",
... |
23,616 | all-23617 | [
"EmbeddedDockerReferenceConflicts",
"whether",
"a",
"Docker",
"reference",
"embedded",
"in",
"the",
"manifest",
"if",
"any",
"conflicts",
"with",
"destination",
"ref",
".",
"It",
"returns",
"false",
"if",
"the",
"manifest",
"does",
"not",
"embed",
"a",
"Docker",
... | [
"func",
"(",
"m",
"*",
"manifestSchema1",
")",
"EmbeddedDockerReferenceConflicts",
"(",
"ref",
"reference",
".",
"Named",
")",
"bool",
"{",
"// This is a bit convoluted: We can’t just have a \"get embedded docker reference\" method",
"// and have the “does it conflict” logic in the g... |
23,617 | all-23618 | [
"DeleteRecords",
"deletes",
"a",
"given",
"set",
"of",
"DNS",
"records",
"in",
"a",
"given",
"zone",
"."
] | [
"func",
"(",
"p",
"*",
"AWSProvider",
")",
"DeleteRecords",
"(",
"endpoints",
"[",
"]",
"*",
"endpoint",
".",
"Endpoint",
")",
"<mask>",
"{",
"return",
"p",
".",
"doRecords",
"(",
"route53",
".",
"ChangeActionDelete",
",",
"endpoints",
")",
"\n",
"}"
] |
23,618 | all-23619 | [
"EncodePeer",
"implements",
"the",
"Transport",
"interface",
"."
] | [
"func",
"(",
"i",
"*",
"InmemTransport",
")",
"EncodePeer",
"(",
"<mask>",
"ServerID",
",",
"p",
"ServerAddress",
")",
"[",
"]",
"byte",
"{",
"return",
"[",
"]",
"byte",
"(",
"p",
")",
"\n",
"}"
] |
23,619 | all-23620 | [
"SetSuperSecureCookie",
"sets",
"given",
"cookie",
"value",
"to",
"response",
"header",
"with",
"secret",
"string",
"."
] | [
"func",
"(",
"ctx",
"*",
"Context",
")",
"SetSuperSecureCookie",
"(",
"secret",
",",
"name",
",",
"value",
"string",
",",
"others",
"...",
"<mask>",
"{",
"}",
")",
"{",
"key",
":=",
"pbkdf2",
".",
"Key",
"(",
"[",
"]",
"byte",
"(",
"secret",
")",
"... |
23,620 | all-23621 | [
"TypeFromInstance",
"is",
"a",
"wrapper",
"around",
"g_type_from_instance",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Object",
")",
"TypeFromInstance",
"(",
")",
"<mask>",
"{",
"c",
":=",
"C",
".",
"_g_type_from_instance",
"(",
"C",
".",
"gpointer",
"(",
"unsafe",
".",
"Pointer",
"(",
"v",
".",
"native",
"(",
")",
")",
")",
")",
"\n",
"retu... |
23,621 | all-23622 | [
"PutString",
"writes",
"a",
"string",
"value",
"for",
"the",
"given",
"field",
".",
"The",
"field",
"type",
"must",
"be",
"a",
"StringField",
"otherwise",
"an",
"error",
"will",
"be",
"returned",
".",
"The",
"type",
"code",
"is",
"written",
"first",
"then"... | [
"func",
"(",
"b",
"*",
"TupleBuilder",
")",
"PutString",
"(",
"field",
"string",
",",
"value",
"string",
")",
"(",
"wrote",
"int",
",",
"err",
"error",
")",
"{",
"// field type should be",
"if",
"err",
"=",
"b",
".",
"typeCheck",
"(",
"field",
",",
"St... |
23,622 | all-23623 | [
"ReadResponse",
"reads",
"a",
"server",
"response",
"into",
"the",
"received",
"o",
"."
] | [
"func",
"(",
"o",
"*",
"DeleteAppsAppRoutesRouteReader",
")",
"ReadResponse",
"(",
"response",
"runtime",
".",
"ClientResponse",
",",
"consumer",
"runtime",
".",
"Consumer",
")",
"(",
"interface",
"{",
"}",
",",
"error",
")",
"{",
"<mask>",
"response",
".",
... |
23,623 | all-23624 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetCertificateParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork37",
"(",
"&",
... |
23,624 | all-23625 | [
"NewTransactionExt",
"creates",
"a",
"new",
"TransactionExt",
"."
] | [
"func",
"NewTransactionExt",
"(",
"v",
"int32",
",",
"value",
"interface",
"{",
"}",
")",
"(",
"result",
"TransactionExt",
",",
"err",
"error",
")",
"{",
"result",
".",
"V",
"=",
"v",
"\n",
"switch",
"int32",
"(",
"v",
")",
"{",
"<mask>",
"0",
":",
... |
23,625 | all-23626 | [
"SetTag",
"belongs",
"to",
"the",
"Span",
"interface"
] | [
"func",
"(",
"s",
"*",
"MockSpan",
")",
"SetTag",
"(",
"key",
"string",
",",
"value",
"<mask>",
"{",
"}",
")",
"opentracing",
".",
"Span",
"{",
"s",
".",
"Lock",
"(",
")",
"\n",
"defer",
"s",
".",
"Unlock",
"(",
")",
"\n",
"if",
"key",
"==",
"s... |
23,626 | all-23627 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetObjectByHeapObjectIDReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler11",
"(",
"&",
"w",
... |
23,627 | all-23628 | [
"RenderView",
"renders",
"a",
"template",
"string",
"using",
"the",
"provided",
"template",
"and",
"vars",
"struct",
"and",
"returns",
"the",
"rendered",
"tamplate"
] | [
"func",
"(",
"c",
"*",
"<mask>",
")",
"RenderView",
"(",
"templateStr",
"string",
",",
"vars",
"interface",
"{",
"}",
")",
"[",
"]",
"byte",
"{",
"t",
",",
"err",
":=",
"template",
".",
"New",
"(",
"\"",
"\"",
")",
".",
"Parse",
"(",
"templateStr",... |
23,628 | all-23629 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"AttachToTargetReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget28",
"(",
"&",
"w",
",",
"v",
... |
23,629 | all-23630 | [
"LogFunc",
"outputs",
"Log",
"level",
"log",
"returned",
"from",
"the",
"function"
] | [
"func",
"(",
"g",
"*",
"Glg",
")",
"LogFunc",
"(",
"f",
"func",
"(",
")",
"string",
")",
"error",
"{",
"if",
"g",
".",
"isModeEnable",
"(",
"LOG",
")",
"{",
"return",
"g",
".",
"<mask>",
"(",
"LOG",
",",
"\"",
"\"",
",",
"f",
"(",
")",
")",
... |
23,630 | all-23631 | [
"Extract",
"calls",
"f",
"(",
"r",
")"
] | [
"func",
"(",
"f",
"RequestTokenExtractorFunc",
")",
"Extract",
"(",
"r",
"*",
"<mask>",
".",
"Request",
")",
"(",
"*",
"jwt",
".",
"JSONWebToken",
",",
"error",
")",
"{",
"return",
"f",
"(",
"r",
")",
"\n",
"}"
] |
23,631 | all-23632 | [
"MarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Marshaler",
"."
] | [
"func",
"(",
"t",
"VirtualTimePolicy",
")",
"MarshalEasyJSON",
"(",
"out",
"*",
"jwriter",
".",
"Writer",
")",
"{",
"out",
".",
"<mask>",
"(",
"string",
"(",
"t",
")",
")",
"\n",
"}"
] |
23,632 | all-23633 | [
"Call",
"the",
"parent",
"CloseNotify",
".",
"Provided",
"in",
"order",
"to",
"implement",
"the",
"http",
".",
"CloseNotifier",
"interface",
"."
] | [
"func",
"(",
"w",
"*",
"gzipResponseWriter",
")",
"CloseNotify",
"(",
")",
"<-",
"chan",
"bool",
"{",
"notifier",
":=",
"w",
".",
"ResponseWriter",
".",
"(",
"<mask>",
".",
"CloseNotifier",
")",
"\n",
"return",
"notifier",
".",
"CloseNotify",
"(",
")",
"... |
23,633 | all-23634 | [
"Write",
"implements",
"Handler",
"interface"
] | [
"func",
"(",
"h",
"*",
"StreamHandler",
")",
"Write",
"(",
"b",
"[",
"]",
"<mask>",
")",
"(",
"n",
"int",
",",
"err",
"error",
")",
"{",
"return",
"h",
".",
"w",
".",
"Write",
"(",
"b",
")",
"\n",
"}"
] |
23,634 | all-23635 | [
"Validate",
"options",
"are",
"useful"
] | [
"func",
"(",
"opts",
"*",
"Options",
")",
"Validate",
"(",
")",
"error",
"{",
"if",
"opts",
".",
"App",
".",
"IsZero",
"(",
")",
"{",
"opts",
".",
"App",
"=",
"meta",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"if",
"len",
"(",
"opt... |
23,635 | all-23636 | [
"RuleGroups",
"returns",
"the",
"list",
"of",
"manager",
"s",
"rule",
"groups",
"."
] | [
"func",
"(",
"m",
"*",
"<mask>",
")",
"RuleGroups",
"(",
")",
"[",
"]",
"*",
"Group",
"{",
"m",
".",
"mtx",
".",
"RLock",
"(",
")",
"\n",
"defer",
"m",
".",
"mtx",
".",
"RUnlock",
"(",
")",
"\n\n",
"rgs",
":=",
"make",
"(",
"[",
"]",
"*",
"... |
23,636 | all-23637 | [
"bind",
"a",
"named",
"buffer",
"object"
] | [
"func",
"BindBuffer",
"(",
"<mask>",
"uint32",
",",
"buffer",
"uint32",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpBindBuffer",
",",
"2",
",",
"uintptr",
"(",
"target",
")",
",",
"uintptr",
"(",
"buffer",
")",
",",
"0",
")",
"\n",
"}"
] |
23,637 | all-23638 | [
"Serialize",
"converts",
"given",
"parts",
"into",
"compact",
"serialization",
"format"
] | [
"func",
"Serialize",
"(",
"parts",
"...",
"[",
"]",
"byte",
")",
"string",
"{",
"result",
":=",
"make",
"(",
"[",
"]",
"string",
",",
"len",
"(",
"parts",
")",
")",
"\n\n",
"for",
"i",
",",
"part",
":=",
"<mask>",
"parts",
"{",
"result",
"[",
"i"... |
23,638 | all-23639 | [
"Lua",
"accepts",
"concatenation",
"with",
"string",
"and",
"number",
"."
] | [
"func",
"string__concat",
"(",
"L",
"*",
"lua",
".",
"State",
")",
"int",
"{",
"v1",
",",
"t1",
":=",
"luaToGoValue",
"(",
"L",
",",
"1",
")",
"\n",
"v2",
",",
"t2",
":=",
"luaToGoValue",
"(",
"L",
",",
"2",
")",
"\n",
"s1",
":=",
"valueToString"... |
23,639 | all-23640 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"NavigateParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage27",
"(",
"&",
"w",
",",
"v",
")",
"\... |
23,640 | all-23641 | [
"Relay",
"is",
"called",
"for",
"each",
"frame",
"that",
"is",
"read",
"on",
"the",
"connection",
"."
] | [
"func",
"(",
"r",
"*",
"Relayer",
")",
"Relay",
"(",
"f",
"*",
"Frame",
")",
"error",
"{",
"if",
"f",
".",
"messageType",
"(",
")",
"!=",
"messageTypeCallReq",
"{",
"err",
":=",
"r",
".",
"handleNonCallReq",
"(",
"f",
")",
"\n",
"if",
"err",
"==",
... |
23,641 | all-23642 | [
"WithSilent",
"in",
"silent",
"mode",
"exceptions",
"thrown",
"during",
"evaluation",
"are",
"not",
"reported",
"and",
"do",
"not",
"pause",
"execution",
".",
"Overrides",
"setPauseOnException",
"state",
"."
] | [
"func",
"(",
"p",
"CallFunctionOnParams",
")",
"WithSilent",
"(",
"silent",
"bool",
")",
"*",
"CallFunctionOnParams",
"{",
"p",
".",
"Silent",
"=",
"silent",
"\n",
"<mask>",
"&",
"p",
"\n",
"}"
] |
23,642 | all-23643 | [
"Handle",
"interprets",
"r",
"and",
"performs",
"an",
"operation",
"on",
"s",
".",
"store",
"according",
"to",
"r",
".",
"Method",
"and",
"other",
"fields",
".",
"If",
"r",
".",
"Method",
"is",
"POST",
"PUT",
"DELETE",
"or",
"a",
"GET",
"with",
"Quorum... | [
"func",
"(",
"r",
"*",
"RequestV2",
")",
"Handle",
"(",
"ctx",
"context",
".",
"Context",
",",
"v2api",
"RequestV2Handler",
")",
"(",
"Response",
",",
"error",
")",
"{",
"if",
"r",
".",
"Method",
"==",
"\"",
"\"",
"&&",
"r",
".",
"Quorum",
"{",
"r"... |
23,643 | all-23644 | [
"EnsureSchema",
"applies",
"all",
"relevant",
"schema",
"updates",
"to",
"the",
"cluster",
"database",
".",
"Before",
"actually",
"doing",
"anything",
"this",
"function",
"will",
"make",
"sure",
"that",
"all",
"nodes",
"in",
"the",
"cluster",
"have",
"a",
"sch... | [
"func",
"EnsureSchema",
"(",
"db",
"*",
"sql",
".",
"DB",
",",
"address",
"string",
",",
"dir",
"string",
")",
"(",
"bool",
",",
"error",
")",
"{",
"someNodesAreBehind",
":=",
"false",
"\n",
"apiExtensions",
":=",
"version",
".",
"APIExtensionsCount",
"(",... |
23,644 | all-23645 | [
"Contains",
"returns",
"true",
"if",
"NetworkNumber",
"is",
"in",
"range",
"of",
"Network",
"false",
"otherwise",
"."
] | [
"func",
"(",
"n",
"Network",
")",
"Contains",
"(",
"nn",
"NetworkNumber",
")",
"bool",
"{",
"if",
"len",
"(",
"n",
".",
"Mask",
")",
"!=",
"len",
"(",
"nn",
")",
"{",
"return",
"false",
"\n",
"}",
"\n",
"if",
"nn",
"[",
"0",
"]",
"&",
"n",
".... |
23,645 | all-23646 | [
"ServiceOAuth",
"instantiates",
"ServiceOAuthAuthentication",
"with",
"the",
"coinbase",
"certificate",
"file"
] | [
"func",
"serviceOAuth",
"(",
"certFilePath",
"string",
")",
"(",
"*",
"serviceOAuthAuthentication",
",",
"error",
")",
"{",
"// First we read the cert",
"certs",
":=",
"x509",
".",
"NewCertPool",
"(",
")",
"\n",
"pemData",
",",
"err",
":=",
"ioutil",
".",
"Rea... |
23,646 | all-23647 | [
"GetMuxValueFromRequest",
"extracts",
"the",
"mux",
"value",
"from",
"the",
"request",
"using",
"a",
"gorilla",
"mux",
"name"
] | [
"func",
"GetMuxValueFromRequest",
"(",
"r",
"*",
"http",
".",
"Request",
",",
"gorillaMuxName",
"string",
")",
"(",
"string",
",",
"bool",
")",
"{",
"vars",
":=",
"mux",
".",
"Vars",
"(",
"r",
")",
"\n",
"val",
",",
"<mask>",
":=",
"vars",
"[",
"gori... |
23,647 | all-23648 | [
"expandClusterAffinityRuleSpec",
"reads",
"certain",
"ResourceData",
"keys",
"and",
"returns",
"a",
"ClusterAffinityRuleSpec",
"."
] | [
"func",
"expandClusterAffinityRuleSpec",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"meta",
"interface",
"{",
"}",
")",
"(",
"*",
"types",
".",
"ClusterAffinityRuleSpec",
",",
"error",
")",
"{",
"<mask>",
",",
"err",
":=",
"resourceVSphereComputeClusterV... |
23,648 | all-23649 | [
"Define",
"VirtualDisk",
"args"
] | [
"func",
"resourceVSphereVirtualDisk",
"(",
")",
"*",
"schema",
".",
"Resource",
"{",
"return",
"&",
"schema",
".",
"Resource",
"{",
"Create",
":",
"resourceVSphereVirtualDiskCreate",
",",
"Read",
":",
"resourceVSphereVirtualDiskRead",
",",
"Delete",
":",
"resourceVS... |
23,649 | all-23650 | [
"LoadWithEnv",
"loads",
"YAML",
"files",
"with",
"Env",
"replace",
"{{",
"env",
"ENV",
"}}",
"to",
"os",
".",
"Getenv",
"(",
"ENV",
")",
"if",
"you",
"set",
"default",
"value",
"then",
"{{",
"env",
"ENV",
"default",
"}}"
] | [
"func",
"LoadWithEnv",
"(",
"conf",
"<mask>",
"{",
"}",
",",
"configPaths",
"...",
"string",
")",
"error",
"{",
"return",
"loadWithFunc",
"(",
"conf",
",",
"configPaths",
",",
"envReplacer",
",",
"yaml",
".",
"Unmarshal",
")",
"\n",
"}"
] |
23,650 | all-23651 | [
"export",
"goMouseCallback"
] | [
"func",
"goMouseCallback",
"(",
"name",
"*",
"C",
".",
"char",
",",
"event",
",",
"x",
",",
"y",
",",
"flags",
"C",
".",
"int",
")",
"{",
"runtime",
".",
"LockOSThread",
"(",
")",
"\n",
"defer",
"runtime",
".",
"UnlockOSThread",
"(",
")",
"\n\n",
"... |
23,651 | all-23652 | [
"WithExecutionContextID",
"specifies",
"in",
"which",
"execution",
"context",
"to",
"perform",
"script",
"run",
".",
"If",
"the",
"parameter",
"is",
"omitted",
"the",
"evaluation",
"will",
"be",
"performed",
"in",
"the",
"context",
"of",
"the",
"inspected",
"pag... | [
"func",
"(",
"p",
"RunScriptParams",
")",
"WithExecutionContextID",
"(",
"executionContextID",
"ExecutionContextID",
")",
"*",
"RunScriptParams",
"{",
"p",
".",
"ExecutionContextID",
"=",
"executionContextID",
"\n",
"<mask>",
"&",
"p",
"\n",
"}"
] |
23,652 | all-23653 | [
"AddSimple",
"is",
"convenience",
"method",
"to",
"add",
"a",
"job",
"."
] | [
"func",
"AddSimple",
"(",
"q",
"Queue",
",",
"tx",
"*",
"reform",
".",
"TX",
",",
"jobType",
",",
"relatedType",
",",
"relatedID",
",",
"creator",
"string",
")",
"error",
"{",
"return",
"AddWithData",
"(",
"q",
",",
"<mask>",
",",
"jobType",
",",
"rela... |
23,653 | all-23654 | [
"Execute",
"-",
"adds",
"a",
"named",
"org",
"to",
"the",
"configuration"
] | [
"func",
"(",
"c",
"*",
"AddOrgToConfigurationCommand",
")",
"Execute",
"(",
"[",
"]",
"string",
")",
"error",
"{",
"orgConfig",
":=",
"&",
"config",
".",
"OrgConfig",
"{",
"Org",
":",
"c",
".",
"OrgName",
",",
"}",
"\n\n",
"c",
".",
"initConfig",
"(",
... |
23,654 | all-23655 | [
"define",
"an",
"array",
"of",
"texture",
"coordinates"
] | [
"func",
"TexCoordPointer",
"(",
"size",
"int32",
",",
"xtype",
"uint32",
",",
"stride",
"int32",
",",
"pointer",
"unsafe",
".",
"Pointer",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpTexCoordPointer",
",",
"4",
",",
"uintptr",
"(",
"<mask>",
")",
",",
... |
23,655 | all-23656 | [
"RemoveDOMBreakpoint",
"removes",
"DOM",
"breakpoint",
"that",
"was",
"set",
"using",
"setDOMBreakpoint",
".",
"See",
":",
"https",
":",
"//",
"chromedevtools",
".",
"github",
".",
"io",
"/",
"devtools",
"-",
"protocol",
"/",
"tot",
"/",
"DOMDebugger#method",
... | [
"func",
"RemoveDOMBreakpoint",
"(",
"nodeID",
"cdp",
".",
"NodeID",
",",
"typeVal",
"DOMBreakpointType",
")",
"*",
"RemoveDOMBreakpointParams",
"{",
"return",
"&",
"RemoveDOMBreakpointParams",
"{",
"NodeID",
":",
"nodeID",
",",
"<mask>",
":",
"typeVal",
",",
"}",
... |
23,656 | all-23657 | [
"Do",
"executes",
"Page",
".",
"reload",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"ReloadParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandReload",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
23,657 | all-23658 | [
"Bubble",
"draws",
"a",
"text",
"balloon",
"."
] | [
"func",
"Bubble",
"(",
"gc",
"draw2d",
".",
"GraphicContext",
",",
"x",
",",
"y",
",",
"<mask>",
",",
"height",
"float64",
")",
"{",
"sx",
",",
"sy",
":=",
"width",
"/",
"100",
",",
"height",
"/",
"100",
"\n",
"gc",
".",
"MoveTo",
"(",
"x",
"+",
... |
23,658 | all-23659 | [
"Fill",
"fills",
"all",
"of",
"the",
"fields",
"the",
"selection",
"refers",
"to",
"with",
"the",
"provided",
"text",
"."
] | [
"func",
"(",
"s",
"*",
"Selection",
")",
"Fill",
"(",
"text",
"string",
")",
"error",
"{",
"return",
"s",
".",
"forEachElement",
"(",
"func",
"(",
"selectedElement",
"element",
".",
"Element",
")",
"error",
"{",
"if",
"err",
":=",
"selectedElement",
".",... |
23,659 | all-23660 | [
"DeleteResourcePolicyWithContext",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockSecretsManagerAPI",
")",
"DeleteResourcePolicyWithContext",
"(",
"arg0",
"aws",
".",
"<mask>",
",",
"arg1",
"*",
"secretsmanager",
".",
"DeleteResourcePolicyInput",
",",
"arg2",
"...",
"request",
".",
"Option",
")",
"(",
"*",
"secrets... |
23,660 | all-23661 | [
"WriteSingleByte",
"writes",
"a",
"single",
"byte",
"to",
"the",
"buffer"
] | [
"func",
"(",
"w",
"*",
"WriteBuffer",
")",
"WriteSingleByte",
"(",
"n",
"<mask>",
")",
"{",
"if",
"w",
".",
"err",
"!=",
"nil",
"{",
"return",
"\n",
"}",
"\n\n",
"if",
"len",
"(",
"w",
".",
"remaining",
")",
"==",
"0",
"{",
"w",
".",
"setErr",
... |
23,661 | all-23662 | [
"runWorker",
"executes",
"the",
"loop",
"to",
"process",
"new",
"items",
"added",
"to",
"the",
"queue",
"."
] | [
"func",
"(",
"c",
"*",
"<mask>",
")",
"runWorker",
"(",
")",
"{",
"c",
".",
"wg",
".",
"Add",
"(",
"1",
")",
"\n",
"for",
"c",
".",
"processNextItem",
"(",
")",
"{",
"}",
"\n",
"c",
".",
"wg",
".",
"Done",
"(",
")",
"\n",
"}"
] |
23,662 | all-23663 | [
"Quote",
"returns",
"a",
"quoted",
"s",
"for",
"a",
"column",
"name",
"."
] | [
"func",
"(",
"d",
"*",
"MySQLDialect",
")",
"Quote",
"(",
"s",
"string",
")",
"<mask>",
"{",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"strings",
".",
"Replace",
"(",
"s",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"-",
"1",
")",
")",
... |
23,663 | all-23664 | [
"Contents",
"returns",
"a",
"slice",
"that",
"contains",
"all",
"items",
"that",
"are",
"the",
"output",
"of",
"filters",
"."
] | [
"func",
"Contents",
"(",
"filters",
"...",
"Filter",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"var",
"result",
"[",
"]",
"string",
"\n",
"err",
":=",
"ForEach",
"(",
"Sequence",
"(",
"filters",
"...",
")",
",",
"func",
"(",
"s",
"strin... |
23,664 | all-23665 | [
"GetStore",
"provides",
"a",
"mock",
"function",
"with",
"given",
"fields",
":"
] | [
"func",
"(",
"_m",
"*",
"ObjectStore",
")",
"GetStore",
"(",
")",
"interface",
"{",
"}",
"{",
"ret",
":=",
"_m",
".",
"Called",
"(",
")",
"\n\n",
"var",
"r0",
"interface",
"{",
"}",
"\n",
"if",
"rf",
",",
"ok",
":=",
"<mask>",
".",
"Get",
"(",
... |
23,665 | all-23666 | [
"WithObjectID",
"JavaScript",
"object",
"id",
"of",
"the",
"node",
"to",
"be",
"highlighted",
"."
] | [
"func",
"(",
"p",
"HighlightNodeParams",
")",
"WithObjectID",
"(",
"objectID",
"runtime",
".",
"RemoteObjectID",
")",
"*",
"HighlightNodeParams",
"{",
"p",
".",
"ObjectID",
"=",
"objectID",
"\n",
"<mask>",
"&",
"p",
"\n",
"}"
] |
23,666 | all-23667 | [
"PointsWithin",
"returns",
"all",
"points",
"with",
"distance",
"of",
"point",
"that",
"match",
"the",
"accept",
"criteria",
"."
] | [
"func",
"(",
"points",
"*",
"PointsIndex",
")",
"PointsWithin",
"(",
"point",
"Point",
",",
"distance",
"Meters",
",",
"accept",
"func",
"(",
"p",
"Point",
")",
"bool",
")",
"[",
"]",
"Point",
"{",
"d",
":=",
"int",
"(",
"distance",
"/",
"<mask>",
".... |
23,667 | all-23668 | [
"Get",
"returns",
"an",
"instrument",
"from",
"the",
"Registry",
"."
] | [
"func",
"(",
"r",
"*",
"Registry",
")",
"Get",
"(",
"name",
"string",
",",
"tags",
"[",
"]",
"string",
")",
"interface",
"{",
"}",
"{",
"key",
":=",
"MetricID",
"(",
"name",
",",
"<mask>",
")",
"\n",
"r",
".",
"mutex",
".",
"RLock",
"(",
")",
"... |
23,668 | all-23669 | [
"Do",
"executes",
"Network",
".",
"getCookies",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"cookies",
"-",
"Array",
"of",
"cookie",
"objects",
"."
] | [
"func",
"(",
"p",
"*",
"GetCookiesParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"cookies",
"[",
"]",
"*",
"Cookie",
",",
"err",
"error",
")",
"{",
"// execute",
"var",
"res",
"GetCookiesReturns",
"\n",
"err",
"=",
"cdp",
".",
"... |
23,669 | all-23670 | [
"Render",
"writes",
"HTML",
"representing",
"this",
"gcsDir",
"to",
"the",
"provided",
"output",
"."
] | [
"func",
"(",
"dir",
"*",
"gcsDir",
")",
"Render",
"(",
"out",
"http",
".",
"ResponseWriter",
",",
"inPath",
"string",
")",
"{",
"htmlPageHeader",
"(",
"out",
",",
"dir",
".",
"Name",
")",
"\n\n",
"if",
"!",
"strings",
".",
"HasSuffix",
"(",
"inPath",
... |
23,670 | all-23671 | [
"Not",
"thread",
"-",
"safe",
"-",
"callers",
"need",
"to",
"hold",
"c",
".",
"mut",
"."
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"getUserData",
"(",
")",
"error",
"{",
"c",
".",
"log",
"(",
"\"",
"\"",
")",
"\n",
"var",
"u",
"User",
"\n",
"_",
",",
"err",
":=",
"c",
".",
"request",
"(",
"&",
"request",
"{",
"method",
":",
"http",
"... |
23,671 | all-23672 | [
"Token",
"returns",
"a",
"new",
"access",
"token"
] | [
"func",
"(",
"c",
"*",
"OAuth2Controller",
")",
"Token",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
")",
"{",
"grantType",
":=",
"r",
".",
"URL",
".",
"Query",
"(",
")",
".",
"Get",
"(",
"\"",
"\"",
")",
"\n",... |
23,672 | all-23673 | [
"Version",
"returns",
"the",
"version",
"of",
"the",
"plugin"
] | [
"func",
"(",
"client",
"*",
"cniClient",
")",
"Version",
"(",
"name",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"file",
":=",
"filepath",
".",
"Join",
"(",
"client",
".",
"pluginsPath",
",",
"name",
")",
"\n\n",
"// Check if the plugin file exi... |
23,673 | all-23674 | [
"getEarliestKnownTaskStatusForContainers",
"gets",
"the",
"lowest",
"(",
"earliest",
")",
"task",
"status",
"based",
"on",
"the",
"known",
"statuses",
"of",
"all",
"containers",
"in",
"the",
"task"
] | [
"func",
"(",
"task",
"*",
"Task",
")",
"getEarliestKnownTaskStatusForContainers",
"(",
")",
"apitaskstatus",
".",
"TaskStatus",
"{",
"if",
"len",
"(",
"task",
".",
"Containers",
")",
"==",
"0",
"{",
"seelog",
".",
"Criticalf",
"(",
"\"",
"\"",
",",
"task",... |
23,674 | all-23675 | [
"FilterCount",
"provides",
"a",
"mock",
"function",
"with",
"given",
"fields",
":",
"filter",
"store",
"opts"
] | [
"func",
"(",
"_m",
"*",
"ObjectStore",
")",
"FilterCount",
"(",
"filter",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
",",
"<mask>",
"string",
",",
"opts",
"gostore",
".",
"ObjectStoreOptions",
")",
"(",
"int64",
",",
"error",
")",
"{",
"ret",
":... |
23,675 | all-23676 | [
"Do",
"executes",
"Animation",
".",
"getCurrentTime",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"currentTime",
"-",
"Current",
"time",
"of",
"the",
"page",
"."
] | [
"func",
"(",
"p",
"*",
"GetCurrentTimeParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"currentTime",
"float64",
",",
"err",
"error",
")",
"{",
"// execute",
"var",
"<mask>",
"GetCurrentTimeReturns",
"\n",
"err",
"=",
"cdp",
".",
"Execu... |
23,676 | all-23677 | [
"diskPathOrName",
"is",
"a",
"helper",
"method",
"that",
"returns",
"the",
"path",
"for",
"a",
"disk",
"-",
"either",
"its",
"path",
"attribute",
"or",
"name",
"as",
"a",
"fallback",
".",
"TODO",
":",
"This",
"method",
"will",
"be",
"removed",
"in",
"fut... | [
"func",
"diskPathOrName",
"(",
"<mask>",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"string",
"{",
"var",
"path",
",",
"name",
"string",
"\n",
"if",
"v",
",",
"ok",
":=",
"data",
"[",
"\"",
"\"",
"]",
";",
"ok",
"&&",
"v",
"!=",
"nil"... |
23,677 | all-23678 | [
"typeFieldName",
"returns",
"the",
"name",
"of",
"the",
"field",
"at",
"offset",
"off",
"in",
"t",
"."
] | [
"func",
"typeFieldName",
"(",
"t",
"*",
"gocore",
".",
"Type",
",",
"off",
"int64",
")",
"string",
"{",
"switch",
"t",
".",
"Kind",
"{",
"case",
"gocore",
".",
"KindBool",
",",
"gocore",
".",
"KindInt",
",",
"gocore",
".",
"KindUint",
",",
"gocore",
... |
23,678 | all-23679 | [
"PushGroupWithContent",
"is",
"a",
"wrapper",
"around",
"cairo_push_group_with_content",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Context",
")",
"PushGroupWithContent",
"(",
"content",
"Content",
")",
"{",
"C",
".",
"cairo_push_group_with_content",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"cairo_content_t",
"(",
"<mask>",
")",
")",
"\n",
"}"
] |
23,679 | all-23680 | [
"writeKeyError",
"logs",
"and",
"writes",
"the",
"given",
"Error",
"to",
"the",
"ResponseWriter",
".",
"If",
"Error",
"is",
"not",
"an",
"etcdErr",
"the",
"error",
"will",
"be",
"converted",
"to",
"an",
"etcd",
"error",
"."
] | [
"func",
"writeKeyError",
"(",
"lg",
"*",
"zap",
".",
"Logger",
",",
"w",
"http",
".",
"ResponseWriter",
",",
"err",
"error",
")",
"{",
"if",
"err",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n",
"switch",
"e",
":=",
"err",
".",
"(",
"type",
")",
"{... |
23,680 | all-23681 | [
"Resolve",
"resolves",
"the",
"URL",
"host",
"to",
"its",
"IP",
"address",
"."
] | [
"func",
"Resolve",
"(",
"u",
"*",
"<mask>",
".",
"URL",
")",
"(",
"*",
"net",
".",
"IPAddr",
",",
"error",
")",
"{",
"host",
",",
"_",
",",
"err",
":=",
"SplitHostPort",
"(",
"u",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
... |
23,681 | all-23682 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"StyleSheetHeader",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss3",
"(",
"&",
"w",
",",
"v",
")",
"\... |
23,682 | all-23683 | [
"Claims",
"returns",
"the",
"claims",
"stored",
"in",
"the",
"request"
] | [
"func",
"Claims",
"(",
"r",
"*",
"http",
".",
"Request",
")",
"jwt",
".",
"Claims",
"{",
"if",
"claims",
",",
"ok",
":=",
"r",
".",
"Context",
"(",
")",
".",
"<mask>",
"(",
"ClaimsKey",
")",
".",
"(",
"jwt",
".",
"Claims",
")",
";",
"ok",
"{",
... |
23,683 | all-23684 | [
"Calculates",
"up",
"-",
"right",
"bounding",
"rectangle",
"of",
"point",
"set",
"points",
"can",
"be",
"either",
"CvSeq",
"*",
"or",
"CvMat",
"*"
] | [
"func",
"BoundingRect",
"(",
"points",
"unsafe",
".",
"Pointer",
")",
"Rect",
"{",
"return",
"(",
"Rect",
")",
"(",
"C",
".",
"cvBoundingRect",
"(",
"<mask>",
",",
"C",
".",
"int",
"(",
"0",
")",
")",
")",
"\n",
"}"
] |
23,684 | all-23685 | [
"SetLastError",
"sets",
"the",
"current",
"error",
"seen",
"by",
"the",
"alerting",
"rule",
"."
] | [
"func",
"(",
"r",
"*",
"AlertingRule",
")",
"SetLastError",
"(",
"<mask>",
"error",
")",
"{",
"r",
".",
"mtx",
".",
"Lock",
"(",
")",
"\n",
"defer",
"r",
".",
"mtx",
".",
"Unlock",
"(",
")",
"\n",
"r",
".",
"lastError",
"=",
"err",
"\n",
"}"
] |
23,685 | all-23686 | [
"GetAccessRoleOk",
"returns",
"a",
"tuple",
"with",
"the",
"AccessRole",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"c",
"*",
"CreatedBy",
")",
"GetAccessRoleOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"c",
"==",
"nil",
"||",
"c",
".",
"AccessRole",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*"... |
23,686 | all-23687 | [
"--------------------------------------------------------------------------",
"Parsers",
"of",
"basic",
"types",
"."
] | [
"func",
"(",
"d",
"*",
"decoder",
")",
"readRegEx",
"(",
")",
"RegEx",
"{",
"<mask>",
":=",
"RegEx",
"{",
"}",
"\n",
"re",
".",
"Pattern",
"=",
"d",
".",
"readCStr",
"(",
")",
"\n",
"re",
".",
"Options",
"=",
"d",
".",
"readCStr",
"(",
")",
"\n... |
23,687 | all-23688 | [
"Returns",
"a",
"float",
"at",
"the",
"key",
"or",
"the",
"specified",
"value",
"if",
"it",
"doesn",
"t",
"exist",
"or",
"isn",
"t",
"a",
"float"
] | [
"func",
"(",
"t",
"Typed",
")",
"FloatOr",
"(",
"<mask>",
"string",
",",
"d",
"float64",
")",
"float64",
"{",
"if",
"value",
",",
"exists",
":=",
"t",
".",
"FloatIf",
"(",
"key",
")",
";",
"exists",
"{",
"return",
"value",
"\n",
"}",
"\n",
"return"... |
23,688 | all-23689 | [
"GetModifiedByOk",
"returns",
"a",
"tuple",
"with",
"the",
"ModifiedBy",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"s",
"*",
"SyntheticsTest",
")",
"GetModifiedByOk",
"(",
")",
"(",
"SyntheticsUser",
",",
"bool",
")",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"ModifiedBy",
"==",
"nil",
"{",
"return",
"SyntheticsUser",
"{",
"}",
",",
"<mask>",
"\n",
... |
23,689 | all-23690 | [
"EncodeWithPrecision",
"encodes",
"the",
"point",
"(",
"lat",
"lng",
")",
"as",
"a",
"string",
"geohash",
"with",
"the",
"specified",
"number",
"of",
"characters",
"of",
"precision",
"(",
"max",
"12",
")",
"."
] | [
"func",
"EncodeWithPrecision",
"(",
"lat",
",",
"lng",
"float64",
",",
"chars",
"uint",
")",
"string",
"{",
"bits",
":=",
"5",
"*",
"chars",
"\n",
"inthash",
":=",
"EncodeIntWithPrecision",
"(",
"<mask>",
",",
"lng",
",",
"bits",
")",
"\n",
"enc",
":=",
... |
23,690 | all-23691 | [
"Execute",
"-",
"renames",
"space",
"config"
] | [
"func",
"(",
"c",
"*",
"RenameSpaceConfigurationCommand",
")",
"Execute",
"(",
"args",
"[",
"]",
"string",
")",
"error",
"{",
"c",
".",
"initConfig",
"(",
")",
"\n",
"spaceConfig",
",",
"err",
":=",
"c",
".",
"ConfigManager",
".",
"GetSpaceConfig",
"(",
... |
23,691 | all-23692 | [
"Logf",
"logs",
"the",
"line",
"Sprintf",
"(",
"formatString",
"args",
"...",
")",
"but",
"formatted",
"as",
"a",
"json",
"message",
"and",
"annotated",
"with",
"all",
"of",
"the",
"metadata",
"stored",
"in",
"loginfo",
".",
"Note",
":",
"this",
"is",
"n... | [
"func",
"(",
"logger",
"*",
"taggedLogger",
")",
"Logf",
"(",
"formatString",
"string",
",",
"args",
"...",
"<mask>",
"{",
"}",
")",
"{",
"logger",
".",
"template",
".",
"Message",
"=",
"fmt",
".",
"Sprintf",
"(",
"formatString",
",",
"args",
"...",
")... |
23,692 | all-23693 | [
"Name",
"allows",
"users",
"to",
"set",
"custom",
"names",
"for",
"the",
"routes",
"."
] | [
"func",
"(",
"ri",
"*",
"RouteInfo",
")",
"Name",
"(",
"<mask>",
"string",
")",
"*",
"RouteInfo",
"{",
"routeIndex",
":=",
"-",
"1",
"\n",
"for",
"index",
",",
"route",
":=",
"range",
"ri",
".",
"App",
".",
"Routes",
"(",
")",
"{",
"if",
"route",
... |
23,693 | all-23694 | [
"GoPaths",
"returns",
"all",
"possible",
"GOPATHS",
"that",
"are",
"set",
"."
] | [
"func",
"GoPaths",
"(",
")",
"[",
"]",
"string",
"{",
"gp",
":=",
"Get",
"(",
"\"",
"\"",
",",
"\"",
"\"",
")",
"\n",
"if",
"runtime",
".",
"GOOS",
"==",
"\"",
"\"",
"{",
"<mask>",
"strings",
".",
"Split",
"(",
"gp",
",",
"\"",
"\"",
")",
"//... |
23,694 | all-23695 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"UntrackIndexedDBForOriginParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"<mask>",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage1",
... |
23,695 | all-23696 | [
"NewExplicitRepoPathBuilder",
"returns",
"a",
"builder",
"that",
"handles",
"the",
"path",
"encoding",
"where",
"a",
"path",
"will",
"always",
"have",
"an",
"explicit",
"org_repo",
"path",
"segment"
] | [
"func",
"NewExplicitRepoPathBuilder",
"(",
")",
"RepoPathBuilder",
"{",
"return",
"func",
"(",
"org",
",",
"repo",
"<mask>",
")",
"string",
"{",
"// handle gerrit repo",
"repo",
"=",
"strings",
".",
"Replace",
"(",
"repo",
",",
"\"",
"\"",
",",
"\"",
"\"",
... |
23,696 | all-23697 | [
"keyExistsFunc",
"returns",
"true",
"if",
"a",
"key",
"exists",
"false",
"otherwise",
"."
] | [
"func",
"keyExistsFunc",
"(",
"b",
"*",
"Brain",
",",
"used",
",",
"missing",
"*",
"dep",
".",
"Set",
")",
"func",
"(",
"string",
")",
"(",
"bool",
",",
"error",
")",
"{",
"return",
"func",
"(",
"s",
"string",
")",
"(",
"bool",
",",
"error",
")",... |
23,697 | all-23698 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"AuthChallenge",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch15",
"(",
"&",
"r",
... |
23,698 | all-23699 | [
"NewEncoder",
"creates",
"a",
"new",
"encoder",
"with",
"the",
"given",
"io",
".",
"Writer"
] | [
"func",
"NewEncoder",
"(",
"w",
"io",
".",
"Writer",
")",
"Encoder",
"{",
"return",
"versionOneEncoder",
"{",
"w",
",",
"make",
"(",
"[",
"]",
"byte",
",",
"9",
")",
",",
"bytes",
".",
"NewBuffer",
"(",
"<mask>",
"(",
"[",
"]",
"byte",
",",
"0",
... |
23,699 | all-23700 | [
"Init",
"our",
"internal",
"data",
"structures",
"."
] | [
"func",
"(",
"s",
"*",
"OS",
")",
"Init",
"(",
")",
"error",
"{",
"err",
":=",
"s",
".",
"initDirs",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n\n",
"s",
".",
"Architectures",
",",
"err",
"=",
"util",
".",
"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.