id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
22,400 | all-22401 | [
"CleanupAvailabilitySetIfExists",
"removes",
"an",
"availability",
"set",
"if",
"there",
"are",
"no",
"virtual",
"machines",
"attached",
"to",
"it",
".",
"Note",
"that",
"this",
"method",
"is",
"not",
"safe",
"for",
"multiple",
"concurrent",
"writers",
"in",
"ca... | [
"func",
"(",
"a",
"AzureClient",
")",
"CleanupAvailabilitySetIfExists",
"(",
"resourceGroup",
",",
"name",
"string",
")",
"error",
"{",
"return",
"a",
".",
"cleanupResourceIfExists",
"(",
"&",
"avSetCleanup",
"{",
"rg",
":",
"resourceGroup",
",",
"name",
":",
... |
22,401 | all-22402 | [
"A",
"is",
"a",
"short",
"-",
"hand",
"function",
"to",
"extract",
"the",
"attribute",
"JSON",
"key",
"of",
"a",
"model",
"field",
".",
"Note",
":",
"A",
"will",
"panic",
"if",
"no",
"field",
"has",
"been",
"found",
"."
] | [
"func",
"A",
"(",
"m",
"Model",
",",
"field",
"string",
")",
"string",
"{",
"// find field",
"f",
":=",
"Init",
"(",
"m",
")",
".",
"Meta",
"(",
")",
".",
"Fields",
"[",
"<mask>",
"]",
"\n",
"if",
"f",
"==",
"nil",
"{",
"panic",
"(",
"fmt",
"."... |
22,402 | all-22403 | [
"MarshalJSON",
"overrides",
"the",
"logic",
"for",
"JSON",
"-",
"encoding",
"a",
"TaskVolume",
"object"
] | [
"func",
"(",
"tv",
"*",
"TaskVolume",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"result",
":=",
"<mask>",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n\n",
"if",
"len",
"(",
"tv",
".",
"Type",
... |
22,403 | all-22404 | [
"Special",
"implementation",
"for",
"Negroni",
"but",
"could",
"be",
"used",
"elsewhere",
"."
] | [
"func",
"(",
"m",
"*",
"JWTMiddleware",
")",
"HandlerWithNext",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"<mask>",
"http",
".",
"HandlerFunc",
")",
"{",
"err",
":=",
"m",
".",
"CheckJWT",
"(",
"w",
",",
"r"... |
22,404 | all-22405 | [
"GetParent",
"is",
"a",
"wrapper",
"around",
"gtk_style_context_get_parent",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"StyleContext",
")",
"GetParent",
"(",
")",
"(",
"*",
"StyleContext",
",",
"<mask>",
")",
"{",
"return",
"fromNativeStyleContext",
"(",
"C",
".",
"gtk_style_context_get_parent",
"(",
"v",
".",
"native",
"(",
")",
")",
")",
"\n",
"}... |
22,405 | all-22406 | [
"PushLinkToChannel",
"pushes",
"a",
"link",
"with",
"a",
"title",
"and",
"url",
"to",
"a",
"specific",
"PushBullet",
"device",
"."
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"PushLinkToChannel",
"(",
"tag",
",",
"title",
",",
"u",
",",
"body",
"string",
")",
"error",
"{",
"data",
":=",
"Link",
"{",
"Tag",
":",
"tag",
",",
"Type",
":",
"\"",
"\"",
",",
"Title",
":",
"title",
",",
... |
22,406 | all-22407 | [
"Locator",
"returns",
"a",
"locator",
"for",
"the",
"given",
"resource"
] | [
"func",
"(",
"r",
"*",
"VolumeAttachment",
")",
"Locator",
"(",
"api",
"*",
"API",
")",
"*",
"VolumeAttachmentLocator",
"{",
"for",
"_",
",",
"l",
":=",
"<mask>",
"r",
".",
"Links",
"{",
"if",
"l",
"[",
"\"",
"\"",
"]",
"==",
"\"",
"\"",
"{",
"re... |
22,407 | all-22408 | [
"NewPipelineManifestReader",
"creates",
"a",
"new",
"manifest",
"reader",
"from",
"a",
"path",
"."
] | [
"func",
"NewPipelineManifestReader",
"(",
"path",
"string",
")",
"(",
"result",
"*",
"PipelineManifestReader",
",",
"retErr",
"error",
")",
"{",
"<mask>",
"=",
"&",
"PipelineManifestReader",
"{",
"}",
"\n",
"var",
"pipelineReader",
"io",
".",
"Reader",
"\n",
"... |
22,408 | all-22409 | [
"WriteContainerStatsResponse",
"writes",
"the",
"container",
"stats",
"to",
"response",
"writer",
"."
] | [
"func",
"WriteContainerStatsResponse",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"taskARN",
"string",
",",
"containerID",
"string",
",",
"statsEngine",
"stats",
".",
"Engine",
")",
"{",
"dockerStats",
",",
"err",
":=",
"statsEngine",
".",
"ContainerDockerStats... |
22,409 | all-22410 | [
"DeepCopy",
"copies",
"the",
"receiver",
"into",
"a",
"new",
"IPv4",
"."
] | [
"func",
"(",
"u",
"*",
"IPv4",
")",
"DeepCopy",
"(",
")",
"*",
"IPv4",
"{",
"if",
"u",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"out",
":=",
"<mask>",
"(",
"IPv4",
")",
"\n",
"u",
".",
"DeepCopyInto",
"(",
"out",
")",
"\n",
"return",... |
22,410 | all-22411 | [
"specify",
"a",
"one",
"-",
"dimensional",
"texture",
"image"
] | [
"func",
"TexImage1D",
"(",
"target",
"uint32",
",",
"level",
"int32",
",",
"internalformat",
"int32",
",",
"<mask>",
"int32",
",",
"border",
"int32",
",",
"format",
"uint32",
",",
"xtype",
"uint32",
",",
"pixels",
"unsafe",
".",
"Pointer",
")",
"{",
"sysca... |
22,411 | all-22412 | [
"NewZapCoreLoggerBuilder",
"generates",
"a",
"zap",
"core",
"logger",
"builder",
"."
] | [
"func",
"NewZapCoreLoggerBuilder",
"(",
"lg",
"*",
"zap",
".",
"Logger",
",",
"cr",
"zapcore",
".",
"Core",
",",
"syncer",
"zapcore",
".",
"WriteSyncer",
")",
"func",
"(",
"*",
"Config",
")",
"error",
"{",
"return",
"func",
"(",
"cfg",
"*",
"Config",
"... |
22,412 | all-22413 | [
"NewLinter",
"returns",
"a",
"new",
"linter",
"from",
"a",
"config"
] | [
"func",
"NewLinter",
"(",
"name",
"string",
",",
"config",
"LinterConfig",
")",
"(",
"*",
"Linter",
",",
"error",
")",
"{",
"if",
"p",
",",
"ok",
":=",
"predefinedPatterns",
"[",
"config",
".",
"Pattern",
"]",
";",
"ok",
"{",
"config",
".",
"Pattern",
... |
22,413 | all-22414 | [
"SetContentType",
"sets",
"Content",
"-",
"Type",
"header",
"value",
"."
] | [
"func",
"(",
"h",
"*",
"ResponseHeader",
")",
"SetContentType",
"(",
"contentType",
"string",
")",
"{",
"h",
".",
"contentType",
"=",
"<mask>",
"(",
"h",
".",
"contentType",
"[",
":",
"0",
"]",
",",
"contentType",
"...",
")",
"\n",
"}"
] |
22,414 | all-22415 | [
"GetPrivateHostIPs",
"returns",
"a",
"list",
"of",
"host",
"s",
"private",
"IP",
"addresses",
"."
] | [
"func",
"GetPrivateHostIPs",
"(",
")",
"(",
"[",
"]",
"net",
".",
"IP",
",",
"error",
")",
"{",
"ips",
",",
"err",
":=",
"GetHostIPs",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"privateI... |
22,415 | all-22416 | [
"parseTokens",
"parses",
"the",
"tokens",
"and",
"return",
"them"
] | [
"func",
"(",
"e",
"*",
"htmlTag",
")",
"parseTokens",
"(",
")",
"[",
"]",
"string",
"{",
"var",
"inQuote",
"bool",
"\n",
"var",
"inDelim",
"bool",
"\n",
"var",
"tokens",
"[",
"]",
"string",
"\n",
"var",
"token",
"string",
"\n\n",
"str",
":=",
"string... |
22,416 | all-22417 | [
"rangeAt",
"returns",
"the",
"underlying",
"InclusiveRange",
"instance",
"that",
"was",
"appended",
"at",
"a",
"given",
"index"
] | [
"func",
"(",
"l",
"*",
"InclusiveRanges",
")",
"rangeAt",
"(",
"idx",
"int",
")",
"*",
"InclusiveRange",
"{",
"if",
"idx",
"<",
"0",
"||",
"idx",
">=",
"l",
".",
"numRanges",
"(",
")",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"return",
"l",
".",
"<... |
22,417 | all-22418 | [
"ListTagsForResource",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockECSSDK",
")",
"ListTagsForResource",
"(",
"arg0",
"*",
"ecs",
".",
"ListTagsForResourceInput",
")",
"(",
"*",
"ecs",
".",
"ListTagsForResourceOutput",
",",
"error",
")",
"{",
"<mask>",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
... |
22,418 | all-22419 | [
"Sync",
"dumps",
"the",
"content",
"of",
"the",
"database",
"to",
"disk",
".",
"This",
"is",
"useful",
"for",
"inspection",
"purposes",
"and",
"it",
"s",
"also",
"needed",
"by",
"the",
"activateifneeded",
"command",
"so",
"it",
"can",
"inspect",
"the",
"da... | [
"func",
"(",
"g",
"*",
"Gateway",
")",
"Sync",
"(",
")",
"{",
"if",
"g",
".",
"server",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n\n",
"dir",
":=",
"filepath",
".",
"Join",
"(",
"g",
".",
"db",
".",
"Dir",
"(",
")",
",",
"\"",
"\"",
")",
"\... |
22,419 | all-22420 | [
"LongestLine",
"returns",
"the",
"longest",
"step",
"line",
"in",
"a",
"feature",
"."
] | [
"func",
"(",
"f",
"*",
"Feature",
")",
"LongestLine",
"(",
")",
"int",
"{",
"if",
"f",
".",
"longestLine",
"==",
"0",
"{",
"f",
".",
"longestLine",
"=",
"len",
"(",
"\"",
"\"",
"+",
"f",
".",
"Title",
")",
"\n",
"for",
"_",
",",
"s",
":=",
"<... |
22,420 | all-22421 | [
"GetCachePath",
"creates",
"a",
"string",
"describing",
"where",
"a",
"given",
"template",
"key",
"would",
"be",
"cached",
"in",
"the",
"file",
"system"
] | [
"func",
"(",
"c",
"*",
"FileCache",
")",
"GetCachePath",
"(",
"key",
"string",
")",
"string",
"{",
"// What's the best, portable way to remove make an absolute path into",
"// a relative path?",
"key",
"=",
"filepath",
".",
"Clean",
"(",
"key",
")",
"\n",
"key",
"="... |
22,421 | all-22422 | [
"String",
"reads",
"and",
"returns",
"content",
"of",
"request",
"body",
"in",
"string",
"."
] | [
"func",
"(",
"rb",
"*",
"RequestBody",
")",
"<mask>",
"(",
")",
"(",
"string",
",",
"error",
")",
"{",
"data",
",",
"err",
":=",
"rb",
".",
"Bytes",
"(",
")",
"\n",
"return",
"string",
"(",
"data",
")",
",",
"err",
"\n",
"}"
] |
22,422 | all-22423 | [
"CallList",
"creates",
"the",
"call",
"to",
"a",
"function",
"satisfying",
"Interface",
"from",
"an",
"Args",
"struct",
"."
] | [
"func",
"(",
"m",
"*",
"Method",
")",
"CallList",
"(",
"reqStruct",
"string",
")",
"string",
"{",
"args",
":=",
"[",
"]",
"string",
"{",
"\"",
"\"",
"}",
"\n",
"for",
"_",
",",
"arg",
":=",
"range",
"m",
".",
"Arguments",
"(",
")",
"{",
"args",
... |
22,423 | all-22424 | [
"GetRole",
"returns",
"the",
"Role",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"u",
"*",
"User",
")",
"GetRole",
"(",
")",
"string",
"{",
"if",
"u",
"==",
"nil",
"||",
"u",
".",
"Role",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"u",
".",
"<mask>",
"\n",
"}"
] |
22,424 | all-22425 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"QueryObjectsParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime13",
"(",
"&",
... |
22,425 | all-22426 | [
"Records",
"returns",
"the",
"list",
"of",
"records",
"."
] | [
"func",
"(",
"p",
"*",
"CloudFlareProvider",
")",
"Records",
"(",
")",
"(",
"[",
"]",
"*",
"endpoint",
".",
"Endpoint",
",",
"error",
")",
"{",
"zones",
",",
"err",
":=",
"p",
".",
"Zones",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",... |
22,426 | all-22427 | [
"query",
"the",
"name",
"of",
"an",
"indexed",
"resource",
"within",
"a",
"program"
] | [
"func",
"GetProgramResourceName",
"(",
"program",
"uint32",
",",
"programInterface",
"uint32",
",",
"index",
"uint32",
",",
"bufSize",
"int32",
",",
"length",
"*",
"int32",
",",
"name",
"*",
"uint8",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpGetProgramReso... |
22,427 | all-22428 | [
"Panicf",
"records",
"the",
"log",
"with",
"fatal",
"level",
"and",
"panics"
] | [
"func",
"Panicf",
"(",
"format",
"string",
",",
"args",
"...",
"<mask>",
"{",
"}",
")",
"{",
"msg",
":=",
"fmt",
".",
"Sprintf",
"(",
"format",
",",
"args",
"...",
")",
"\n",
"logger",
".",
"Output",
"(",
"2",
",",
"LevelError",
",",
"msg",
")",
... |
22,428 | all-22429 | [
"Num",
"satisfies",
"the",
"HasNum",
"interface",
"for",
"String",
"s"
] | [
"func",
"(",
"s",
"<mask>",
")",
"Num",
"(",
")",
"Num",
"{",
"num",
",",
"err",
":=",
"strconv",
".",
"ParseFloat",
"(",
"strings",
".",
"TrimSpace",
"(",
"string",
"(",
"s",
")",
")",
",",
"64",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"retu... |
22,429 | all-22430 | [
"Read",
"reads",
"from",
"the",
"reader",
"into",
"the",
"byte",
"slice",
"."
] | [
"func",
"(",
"r",
"ArgReadHelper",
")",
"Read",
"(",
"bs",
"*",
"[",
"]",
"byte",
")",
"error",
"{",
"return",
"r",
".",
"read",
"(",
"func",
"(",
")",
"error",
"{",
"<mask>",
"err",
"error",
"\n",
"*",
"bs",
",",
"err",
"=",
"ioutil",
".",
"Re... |
22,430 | all-22431 | [
"GetEscalationMessageOk",
"returns",
"a",
"tuple",
"with",
"the",
"EscalationMessage",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"o",
"*",
"Options",
")",
"GetEscalationMessageOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"o",
"==",
"nil",
"||",
"o",
".",
"EscalationMessage",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"re... |
22,431 | all-22432 | [
"GetInstanceMetrics",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockEngine",
")",
"GetInstanceMetrics",
"(",
")",
"(",
"*",
"ecstcs",
".",
"MetricsMetadata",
",",
"[",
"]",
"*",
"ecstcs",
".",
"TaskMetric",
",",
"error",
")",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
","... |
22,432 | all-22433 | [
"NewCountIndex",
"creates",
"an",
"index",
"which",
"counts",
"the",
"points",
"in",
"each",
"cell",
"."
] | [
"func",
"NewCountIndex",
"(",
"resolution",
"Meters",
")",
"*",
"CountIndex",
"{",
"newCounter",
":=",
"func",
"(",
")",
"interface",
"{",
"}",
"{",
"return",
"&",
"singleValueAccumulatingCounter",
"{",
"}",
"\n",
"}",
"\n\n",
"return",
"&",
"CountIndex",
"{... |
22,433 | all-22434 | [
"init",
"()",
"creates",
"the",
"Runner",
"s",
"underlying",
"data",
"structures",
"and",
"returns",
"an",
"error",
"if",
"any",
"problems",
"occur",
"."
] | [
"func",
"(",
"r",
"*",
"Runner",
")",
"init",
"(",
")",
"error",
"{",
"// Ensure default configuration values",
"r",
".",
"config",
"=",
"config",
".",
"DefaultConfig",
"(",
")",
".",
"Merge",
"(",
"r",
".",
"config",
")",
"\n",
"r",
".",
"config",
"."... |
22,434 | all-22435 | [
"Load",
"parses",
"the",
"YAML",
"input",
"s",
"into",
"a",
"Config",
"."
] | [
"func",
"Load",
"(",
"s",
"string",
")",
"(",
"*",
"Config",
",",
"error",
")",
"{",
"cfg",
":=",
"&",
"Config",
"{",
"}",
"\n",
"// If the entire config body is empty the UnmarshalYAML method is",
"// never called. We thus have to set the DefaultConfig at the entry",
"//... |
22,435 | all-22436 | [
"NewContactGroup",
"returns",
"a",
"ContactGroup",
"(",
"with",
"defaults",
"if",
"applicable",
")"
] | [
"func",
"NewContactGroup",
"(",
")",
"*",
"ContactGroup",
"{",
"return",
"&",
"ContactGroup",
"{",
"Escalations",
":",
"<mask>",
"(",
"[",
"]",
"*",
"ContactGroupEscalation",
",",
"config",
".",
"NumSeverityLevels",
")",
",",
"Reminders",
":",
"make",
"(",
"... |
22,436 | all-22437 | [
"zoneIsManaged",
"checks",
"if",
"the",
"zone",
"should",
"be",
"managed",
"(",
"and",
"thus",
"have",
"records",
"deleted",
")",
"by",
"us"
] | [
"func",
"zoneIsManaged",
"(",
"z",
"*",
"route53",
".",
"HostedZone",
")",
"bool",
"{",
"// TODO: Move to a tag on the zone?",
"name",
":=",
"aws",
".",
"StringValue",
"(",
"z",
".",
"Name",
")",
"\n",
"if",
"\"",
"\"",
"==",
"name",
"{",
"return",
"<mask>... |
22,437 | all-22438 | [
"AllowContentType",
"enforces",
"a",
"whitelist",
"of",
"request",
"Content",
"-",
"Types",
"otherwise",
"responds",
"with",
"a",
"415",
"Unsupported",
"Media",
"Type",
"status",
"."
] | [
"func",
"AllowContentType",
"(",
"contentTypes",
"...",
"string",
")",
"func",
"(",
"next",
"http",
".",
"Handler",
")",
"http",
".",
"Handler",
"{",
"cT",
":=",
"[",
"]",
"string",
"{",
"}",
"\n",
"for",
"_",
",",
"t",
":=",
"range",
"contentTypes",
... |
22,438 | all-22439 | [
"Get",
"retreives",
"the",
"value",
"stored",
"in",
"a",
"particular",
"position",
"of",
"the",
"list",
".",
"If",
"no",
"item",
"exists",
"at",
"the",
"given",
"position",
"the",
"second",
"parameter",
"will",
"be",
"returned",
"as",
"false",
"."
] | [
"func",
"(",
"l",
"*",
"List",
")",
"Get",
"(",
"pos",
"uint",
")",
"(",
"interface",
"{",
"}",
",",
"bool",
")",
"{",
"l",
".",
"key",
".",
"RLock",
"(",
")",
"\n",
"defer",
"l",
".",
"<mask>",
".",
"RUnlock",
"(",
")",
"\n\n",
"if",
"pos",
... |
22,439 | all-22440 | [
"/",
"*",
"Allocates",
"and",
"initializes",
"CvMat",
"header",
"and",
"allocates",
"data"
] | [
"func",
"CreateMat",
"(",
"<mask>",
",",
"cols",
",",
"type_",
"int",
")",
"*",
"Mat",
"{",
"mat",
":=",
"C",
".",
"cvCreateMat",
"(",
"C",
".",
"int",
"(",
"rows",
")",
",",
"C",
".",
"int",
"(",
"cols",
")",
",",
"C",
".",
"int",
"(",
"type... |
22,440 | all-22441 | [
"MarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Marshaler",
"."
] | [
"func",
"(",
"t",
"CaptureScreenshotFormat",
")",
"MarshalEasyJSON",
"(",
"out",
"*",
"jwriter",
".",
"Writer",
")",
"{",
"out",
".",
"<mask>",
"(",
"string",
"(",
"t",
")",
")",
"\n",
"}"
] |
22,441 | all-22442 | [
"Apply",
"returns",
"a",
"policy",
"that",
"merges",
"the",
"child",
"into",
"the",
"parent"
] | [
"func",
"(",
"p",
"Policy",
")",
"Apply",
"(",
"child",
"Policy",
")",
"Policy",
"{",
"return",
"Policy",
"{",
"Protect",
":",
"selectBool",
"(",
"p",
".",
"Protect",
",",
"<mask>",
".",
"Protect",
")",
",",
"RequiredStatusChecks",
":",
"mergeContextPolicy... |
22,442 | all-22443 | [
"Jobs",
"returns",
"a",
"thread",
"-",
"safe",
"snapshot",
"of",
"the",
"current",
"job",
"state",
"."
] | [
"func",
"(",
"ja",
"*",
"JobAgent",
")",
"Jobs",
"(",
")",
"[",
"]",
"Job",
"{",
"ja",
".",
"mut",
".",
"Lock",
"(",
")",
"\n",
"defer",
"ja",
".",
"mut",
".",
"Unlock",
"(",
")",
"\n",
"res",
":=",
"<mask>",
"(",
"[",
"]",
"Job",
",",
"len... |
22,443 | all-22444 | [
"SettingsNewFull",
"is",
"a",
"wrapper",
"around",
"g_settings_new_full",
"()",
"."
] | [
"func",
"SettingsNewFull",
"(",
"schema",
"*",
"SettingsSchema",
",",
"backend",
"*",
"SettingsBackend",
",",
"path",
"string",
")",
"*",
"Settings",
"{",
"cstr1",
":=",
"(",
"*",
"C",
".",
"gchar",
")",
"(",
"C",
".",
"CString",
"(",
"<mask>",
")",
")... |
22,444 | all-22445 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"a",
"specified",
"program",
"object"
] | [
"func",
"ProgramUniform4uiv",
"(",
"program",
"uint32",
",",
"location",
"int32",
",",
"count",
"int32",
",",
"value",
"*",
"uint32",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpProgramUniform4uiv",
",",
"4",
",",
"uintptr",
"(",
"program",
")",
",",
"ui... |
22,445 | all-22446 | [
"NewTicker",
"calls",
"time",
".",
"NewTicker",
"."
] | [
"func",
"(",
"g",
"GitOS",
")",
"NewTicker",
"(",
"d",
"time",
".",
"Duration",
")",
"Ticker",
"{",
"return",
"&",
"GitTicker",
"{",
"<mask>",
".",
"NewTicker",
"(",
"d",
")",
"}",
"\n",
"}"
] |
22,446 | all-22447 | [
"readMeta",
"is",
"used",
"to",
"read",
"the",
"meta",
"data",
"for",
"a",
"given",
"named",
"backup"
] | [
"func",
"(",
"f",
"*",
"FileSnapshotStore",
")",
"readMeta",
"(",
"name",
"string",
")",
"(",
"*",
"fileSnapshotMeta",
",",
"error",
")",
"{",
"// Open the meta file",
"metaPath",
":=",
"filepath",
".",
"Join",
"(",
"f",
".",
"path",
",",
"name",
",",
"m... |
22,447 | all-22448 | [
"String",
"returns",
"the",
"NodeType",
"as",
"string",
"value",
"."
] | [
"func",
"(",
"t",
"NodeType",
")",
"String",
"(",
")",
"string",
"{",
"switch",
"t",
"{",
"case",
"NodeTypeElement",
":",
"return",
"\"",
"\"",
"\n",
"case",
"NodeTypeAttribute",
":",
"return",
"\"",
"\"",
"\n",
"case",
"NodeTypeText",
":",
"return",
"\"... |
22,448 | all-22449 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"SetKeyframeKeyReturns",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss19",
"(",
"&",
"... |
22,449 | all-22450 | [
"TTL",
"returns",
"the",
"time",
"to",
"live",
"for",
"this",
"callReq",
"."
] | [
"func",
"(",
"f",
"lazyCallReq",
")",
"TTL",
"(",
")",
"<mask>",
".",
"Duration",
"{",
"ttl",
":=",
"binary",
".",
"BigEndian",
".",
"Uint32",
"(",
"f",
".",
"Payload",
"[",
"_ttlIndex",
":",
"_ttlIndex",
"+",
"_ttlLen",
"]",
")",
"\n",
"return",
"ti... |
22,450 | all-22451 | [
"Retrieve",
"retrieves",
"and",
"processes",
"the",
"specified",
"asset",
"sources",
"and",
"returns",
"them",
"using",
"a",
"http",
".",
"FileSystem",
"interface",
"."
] | [
"func",
"Retrieve",
"(",
"sources",
"[",
"]",
"*",
"Source",
")",
"(",
"http",
".",
"FileSystem",
",",
"error",
")",
"{",
"files",
":=",
"make",
"(",
"mfs",
".",
"Files",
")",
"\n\n",
"for",
"i",
",",
"source",
":=",
"range",
"sources",
"{",
"log",... |
22,451 | all-22452 | [
"shouldWatch",
"returns",
"whether",
"the",
"service",
"of",
"the",
"given",
"name",
"should",
"be",
"watched",
"based",
"on",
"its",
"tags",
".",
"This",
"gets",
"called",
"when",
"the",
"user",
"doesn",
"t",
"specify",
"a",
"list",
"of",
"services",
"in"... | [
"func",
"(",
"d",
"*",
"Discovery",
")",
"shouldWatchFromTags",
"(",
"<mask>",
"[",
"]",
"string",
")",
"bool",
"{",
"// If there's no fixed set of watched tags, we watch everything.",
"if",
"len",
"(",
"d",
".",
"watchedTags",
")",
"==",
"0",
"{",
"return",
"tr... |
22,452 | all-22453 | [
"Do",
"executes",
"Browser",
".",
"getVersion",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"protocolVersion",
"-",
"Protocol",
"version",
".",
"product",
"-",
"Product",
"name",
".",
"revision",
"-",
"Product",
"revision",
".",
"userAgent",
... | [
"func",
"(",
"p",
"*",
"GetVersionParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"protocolVersion",
"string",
",",
"<mask>",
"string",
",",
"revision",
"string",
",",
"userAgent",
"string",
",",
"jsVersion",
"string",
",",
"err",
"err... |
22,453 | all-22454 | [
"HasClientEmail",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"i",
"*",
"IntegrationGCPUpdateRequest",
")",
"HasClientEmail",
"(",
")",
"bool",
"{",
"if",
"i",
"!=",
"nil",
"&&",
"i",
".",
"ClientEmail",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
22,454 | all-22455 | [
"StoreNonce",
"generates",
"and",
"stores",
"a",
"nonce",
"in",
"the",
"outgoing",
"response",
"."
] | [
"func",
"StoreNonce",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"<mask>",
".",
"Request",
")",
"(",
"err",
"error",
")",
"{",
"if",
"c",
":=",
"r",
".",
"Context",
"(",
")",
".",
"Value",
"(",
"nonceSetterKey",
")",
";",
"c",
"!=",
... |
22,455 | all-22456 | [
"HasFocus",
"is",
"a",
"wrapper",
"around",
"gtk_widget_has_focus",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Widget",
")",
"HasFocus",
"(",
")",
"bool",
"{",
"c",
":=",
"C",
".",
"gtk_widget_has_focus",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"<mask>",
"gobool",
"(",
"c",
")",
"\n",
"}"
] |
22,456 | all-22457 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetRelayoutBoundaryParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom35",
"(",
"&",... |
22,457 | all-22458 | [
"ValueOrZero",
"returns",
"the",
"inner",
"value",
"if",
"valid",
"otherwise",
"zero",
"."
] | [
"func",
"(",
"t",
"Time",
")",
"ValueOrZero",
"(",
")",
"<mask>",
".",
"Time",
"{",
"if",
"!",
"t",
".",
"Valid",
"{",
"return",
"time",
".",
"Time",
"{",
"}",
"\n",
"}",
"\n",
"return",
"t",
".",
"Time",
"\n",
"}"
] |
22,458 | all-22459 | [
"ForArch",
"returns",
"a",
"correct",
"Sizes",
"for",
"the",
"given",
"architecture",
"."
] | [
"func",
"ForArch",
"(",
"arch",
"string",
")",
"*",
"Sizes",
"{",
"wordSize",
":=",
"int64",
"(",
"8",
")",
"\n",
"maxAlign",
":=",
"int64",
"(",
"8",
")",
"\n",
"<mask>",
"build",
".",
"Default",
".",
"GOARCH",
"{",
"case",
"\"",
"\"",
",",
"\"",
... |
22,459 | all-22460 | [
"RowsPreviousColumn",
"creates",
"a",
"Rows",
"query",
"with",
"the",
"given",
"previous",
"row",
"ID",
"/",
"key",
"and",
"column",
"ID",
"/",
"key"
] | [
"func",
"(",
"f",
"*",
"Field",
")",
"RowsPreviousColumn",
"(",
"rowIDOrKey",
"interface",
"{",
"}",
",",
"columnIDOrKey",
"interface",
"{",
"}",
")",
"*",
"PQLRowsQuery",
"{",
"rowIDKey",
",",
"err",
":=",
"formatIDKey",
"(",
"rowIDOrKey",
")",
"\n",
"if"... |
22,460 | all-22461 | [
"NewOutgoingPhoto",
"creates",
"a",
"new",
"outgoing",
"photo",
"."
] | [
"func",
"(",
"api",
"*",
"TelegramBotAPI",
")",
"NewOutgoingPhoto",
"(",
"recipient",
"Recipient",
",",
"fileName",
"string",
",",
"reader",
"<mask>",
".",
"Reader",
")",
"*",
"OutgoingPhoto",
"{",
"return",
"&",
"OutgoingPhoto",
"{",
"outgoingMessageBase",
":",... |
22,461 | all-22462 | [
"title",
":",
"list",
"app",
"certificates",
"path",
":",
"/",
"apps",
"/",
"{",
"app",
"}",
"/",
"certificate",
"method",
":",
"GET",
"consume",
":",
"application",
"/",
"x",
"-",
"www",
"-",
"form",
"-",
"urlencoded",
"responses",
":",
"200",
":",
... | [
"func",
"listCertificates",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"error",
"{",
"a",
",",
"err",
":=",
"getAppFromContext",
"(",
"r",
".",
"<mask>",
".",
"Query",
"(",
")"... |
22,462 | all-22463 | [
"DelGroup",
"removes",
"a",
"group",
"from",
"the",
"system",
"."
] | [
"func",
"DelGroup",
"(",
"name",
"string",
")",
"(",
"err",
"error",
")",
"{",
"err",
"=",
"del",
"(",
"<mask>",
",",
"&",
"Group",
"{",
"}",
")",
"\n",
"if",
"err",
"==",
"nil",
"{",
"err",
"=",
"del",
"(",
"name",
",",
"&",
"GShadow",
"{",
... |
22,463 | all-22464 | [
"NewPQLBaseQuery",
"creates",
"a",
"new",
"PQLQuery",
"with",
"the",
"given",
"PQL",
"and",
"index",
"."
] | [
"func",
"NewPQLBaseQuery",
"(",
"pql",
"string",
",",
"index",
"*",
"Index",
",",
"err",
"error",
")",
"*",
"PQLBaseQuery",
"{",
"return",
"&",
"PQLBaseQuery",
"{",
"index",
":",
"index",
",",
"pql",
":",
"pql",
",",
"err",
":",
"err",
",",
"hasKeys",
... |
22,464 | all-22465 | [
"MemorySize",
"returns",
"memory",
"size",
"of",
"the",
"virtual",
"machine",
"."
] | [
"func",
"(",
"v",
"*",
"VM",
")",
"MemorySize",
"(",
")",
"(",
"uint",
",",
"error",
")",
"{",
"<mask>",
"err",
"C",
".",
"VixError",
"=",
"C",
".",
"VIX_OK",
"\n",
"memsize",
":=",
"C",
".",
"VIX_PROPERTY_NONE",
"\n\n",
"err",
"=",
"C",
".",
"ge... |
22,465 | all-22466 | [
"LevelFromString",
"returns",
"a",
"level",
"based",
"on",
"the",
"input",
"string",
"s",
".",
"If",
"the",
"input",
"can",
"t",
"be",
"interpreted",
"as",
"a",
"valid",
"log",
"level",
"the",
"info",
"level",
"and",
"false",
"is",
"returned",
"."
] | [
"func",
"LevelFromString",
"(",
"s",
"string",
")",
"(",
"l",
"Level",
",",
"ok",
"bool",
")",
"{",
"<mask>",
"strings",
".",
"ToLower",
"(",
"s",
")",
"{",
"case",
"\"",
"\"",
",",
"\"",
"\"",
":",
"return",
"LevelTrace",
",",
"true",
"\n",
"case"... |
22,466 | all-22467 | [
"getExistingConn",
"is",
"used",
"to",
"grab",
"a",
"pooled",
"connection",
"."
] | [
"func",
"(",
"n",
"*",
"NetworkTransport",
")",
"getPooledConn",
"(",
"target",
"ServerAddress",
")",
"*",
"netConn",
"{",
"n",
".",
"connPoolLock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"n",
".",
"connPoolLock",
".",
"Unlock",
"(",
")",
"\n\n",
"conns",... |
22,467 | all-22468 | [
"RegisterContainerInstance",
"indicates",
"an",
"expected",
"call",
"of",
"RegisterContainerInstance"
] | [
"func",
"(",
"mr",
"*",
"MockECSClientMockRecorder",
")",
"RegisterContainerInstance",
"(",
"arg0",
",",
"arg1",
",",
"arg2",
",",
"arg3",
",",
"arg4",
"<mask>",
"{",
"}",
")",
"*",
"gomock",
".",
"Call",
"{",
"return",
"mr",
".",
"mock",
".",
"ctrl",
... |
22,468 | all-22469 | [
"Warningf",
"calls",
"Logger",
".",
"Warningf",
"method",
"with",
"provided",
"arguments",
"."
] | [
"func",
"(",
"g",
"GRPCLoggerV2",
")",
"Warningf",
"(",
"<mask>",
"string",
",",
"args",
"...",
"interface",
"{",
"}",
")",
"{",
"g",
".",
"l",
".",
"Warningf",
"(",
"format",
",",
"args",
"...",
")",
"\n",
"}"
] |
22,469 | all-22470 | [
"copyGoModToTemp",
"copies",
"to",
"given",
"go",
".",
"mod",
"file",
"to",
"a",
"temporary",
"directory",
".",
"go",
"list",
"tends",
"to",
"mutate",
"go",
".",
"mod",
"files",
"but",
"gazelle",
"shouldn",
"t",
"do",
"that",
"."
] | [
"func",
"copyGoModToTemp",
"(",
"<mask>",
"string",
")",
"(",
"tempDir",
"string",
",",
"err",
"error",
")",
"{",
"goModOrig",
",",
"err",
":=",
"os",
".",
"Open",
"(",
"filename",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"\"",
"\"",
",",
... |
22,470 | all-22471 | [
"Priority",
"returns",
"a",
"syslog",
".",
"Priority",
"representation",
"of",
"SyslogFacility",
"."
] | [
"func",
"(",
"s",
"SyslogFacility",
")",
"Priority",
"(",
")",
"syslog",
".",
"Priority",
"{",
"return",
"syslogPriorities",
"[",
"strings",
".",
"ToLower",
"(",
"s",
".",
"<mask>",
"(",
")",
")",
"]",
"\n",
"}"
] |
22,471 | all-22472 | [
"cephRBDGenerateUUID",
"regenerates",
"the",
"XFS",
"/",
"btrfs",
"UUID",
"as",
"needed"
] | [
"func",
"(",
"s",
"*",
"storageCeph",
")",
"cephRBDGenerateUUID",
"(",
"volumeName",
"string",
",",
"volumeType",
"string",
")",
"error",
"{",
"// Map the RBD volume",
"RBDDevPath",
",",
"err",
":=",
"cephRBDVolumeMap",
"(",
"s",
".",
"ClusterName",
",",
"s",
... |
22,472 | all-22473 | [
"Value",
"converts",
"a",
"value",
"to",
"a",
"database",
"driver",
"value"
] | [
"func",
"(",
"u",
"UUID4",
")",
"Value",
"(",
")",
"(",
"<mask>",
".",
"Value",
",",
"error",
")",
"{",
"return",
"driver",
".",
"Value",
"(",
"string",
"(",
"u",
")",
")",
",",
"nil",
"\n",
"}"
] |
22,473 | all-22474 | [
"Release",
"removes",
"the",
"directory",
"lock",
"."
] | [
"func",
"(",
"g",
"*",
"directoryLockGuard",
")",
"<mask>",
"(",
")",
"error",
"{",
"g",
".",
"path",
"=",
"\"",
"\"",
"\n",
"return",
"syscall",
".",
"CloseHandle",
"(",
"g",
".",
"h",
")",
"\n",
"}"
] |
22,474 | all-22475 | [
"NewRotatingFileHandler",
"creates",
"a",
"RotatingFileHandler"
] | [
"func",
"NewRotatingFileHandler",
"(",
"fileName",
"string",
",",
"maxBytes",
"int",
",",
"backupCount",
"int",
")",
"(",
"*",
"RotatingFileHandler",
",",
"error",
")",
"{",
"dir",
":=",
"<mask>",
".",
"Dir",
"(",
"fileName",
")",
"\n",
"os",
".",
"MkdirAl... |
22,475 | all-22476 | [
"DependenciesAreResolved",
"validates",
"that",
"the",
"target",
"container",
"can",
"be",
"transitioned",
"given",
"the",
"current",
"known",
"state",
"of",
"the",
"containers",
"in",
"by",
".",
"If",
"this",
"function",
"returns",
"true",
"target",
"should",
"... | [
"func",
"DependenciesAreResolved",
"(",
"target",
"*",
"apicontainer",
".",
"Container",
",",
"by",
"[",
"]",
"*",
"apicontainer",
".",
"Container",
",",
"id",
"string",
",",
"manager",
"credentials",
".",
"Manager",
",",
"resources",
"[",
"]",
"taskresource",... |
22,476 | all-22477 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"StopSamplingReturns",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler2",
"(",
"&... |
22,477 | all-22478 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"EventStyleSheetRemoved",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss51",
"(",
"&",
... |
22,478 | all-22479 | [
"SignBytes",
"creates",
"a",
"signature",
"for",
"buf",
"."
] | [
"func",
"(",
"hs",
"*",
"HmacSigner",
")",
"SignBytes",
"(",
"buf",
"[",
"]",
"byte",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"var",
"err",
"error",
"\n\n",
"// check hs.key",
"if",
"hs",
".",
"key",
"==",
"nil",
"{",
"return",
"nil",
... |
22,479 | all-22480 | [
"GetTitleOk",
"returns",
"a",
"tuple",
"with",
"the",
"Title",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"Widget",
")",
"GetTitleOk",
"(",
")",
"(",
"bool",
",",
"bool",
")",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"Title",
"==",
"nil",
"{",
"return",
"false",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
"w",
".",
"T... |
22,480 | all-22481 | [
"UpdateAccount",
"updates",
"passed",
"account",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"UpdateAccount",
"(",
"cfg",
"*",
"Account",
")",
"(",
"*",
"Account",
",",
"error",
")",
"{",
"if",
"cfg",
"==",
"nil",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n"... |
22,481 | all-22482 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"CompositingReasonsParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree20",
"(",
"&",
"w",
",",
"... |
22,482 | all-22483 | [
"Debug",
"logging"
] | [
"func",
"(",
"l",
"*",
"StdLevelLogger",
")",
"Debug",
"(",
"args",
"...",
"<mask>",
"{",
"}",
")",
"{",
"l",
".",
"logFunc",
"(",
"DebugLevel",
",",
"l",
".",
"context",
",",
"args",
"...",
")",
"\n",
"}"
] |
22,483 | all-22484 | [
"/",
"*",
"Identify",
"an",
"error",
"that",
"occurred",
"during",
"the",
"transaction",
".",
"The",
"first",
"identified",
"error",
"is",
"sent",
"with",
"each",
"transaction",
"."
] | [
"func",
"TransactionNoticeError",
"(",
"id",
"int64",
",",
"exceptionType",
",",
"errorMessage",
",",
"stackTrace",
",",
"stackFrameDelim",
"string",
")",
"(",
"int",
",",
"error",
")",
"{",
"cexceptionType",
":=",
"C",
".",
"CString",
"(",
"exceptionType",
")... |
22,484 | all-22485 | [
"Size",
"returns",
"r",
"s",
"width",
"height",
"and",
"depth",
"."
] | [
"func",
"(",
"r",
"Rectangle",
")",
"Size",
"(",
")",
"Vec3",
"{",
"<mask>",
"Vec3",
"{",
"r",
".",
"Max",
"[",
"0",
"]",
"-",
"r",
".",
"Min",
"[",
"0",
"]",
",",
"r",
".",
"Max",
"[",
"1",
"]",
"-",
"r",
".",
"Min",
"[",
"1",
"]",
","... |
22,485 | all-22486 | [
"DrawScrollBar",
"displays",
"a",
"scrollbar",
".",
"pos",
"is",
"the",
"position",
"of",
"the",
"thumb",
".",
"The",
"function",
"detects",
"direction",
"of",
"the",
"scrollbar",
"automatically",
":",
"if",
"w",
"is",
"greater",
"than",
"h",
"then",
"it",
... | [
"func",
"DrawScrollBar",
"(",
"x",
",",
"y",
",",
"w",
",",
"h",
",",
"<mask>",
"int",
")",
"{",
"xx",
",",
"yy",
",",
"ww",
",",
"hh",
":=",
"clip",
"(",
"x",
",",
"y",
",",
"w",
",",
"h",
")",
"\n",
"if",
"ww",
"<",
"1",
"||",
"hh",
"... |
22,486 | all-22487 | [
"Callback",
"returns",
"a",
"callback",
"that",
"can",
"be",
"used",
"in",
"controllers",
"to",
"protect",
"resources",
"by",
"requiring",
"an",
"access",
"token",
"with",
"the",
"provided",
"scope",
"to",
"be",
"granted",
".",
"Note",
":",
"The",
"callback"... | [
"func",
"Callback",
"(",
"force",
"bool",
",",
"scope",
"...",
"string",
")",
"*",
"fire",
".",
"Callback",
"{",
"return",
"fire",
".",
"C",
"(",
"\"",
"\"",
",",
"fire",
".",
"All",
"(",
")",
",",
"func",
"(",
"ctx",
"*",
"fire",
".",
"Context",... |
22,487 | all-22488 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"UnregisterParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker2",
"(",
"&",
"w",
",",
"v",
... |
22,488 | all-22489 | [
"CDDVD",
"returns",
"the",
"CD",
"/",
"DVD",
"drive",
"identified",
"by",
"ID",
".",
"This",
"function",
"depends",
"entirely",
"on",
"how",
"GoVMX",
"identifies",
"slice",
"s",
"elements"
] | [
"func",
"(",
"v",
"*",
"VM",
")",
"CDDVD",
"(",
"ID",
"string",
")",
"(",
"*",
"CDDVDDrive",
",",
"error",
")",
"{",
"err",
":=",
"v",
".",
"vmxfile",
".",
"Read",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\... |
22,489 | all-22490 | [
"MutateTransaction",
"for",
"ManageDataBuilder",
"causes",
"the",
"underylying",
"ManageData",
"to",
"be",
"added",
"to",
"the",
"operation",
"list",
"for",
"the",
"provided",
"transaction"
] | [
"func",
"(",
"m",
"ManageDataBuilder",
")",
"MutateTransaction",
"(",
"o",
"*",
"TransactionBuilder",
")",
"error",
"{",
"if",
"m",
".",
"Err",
"!=",
"nil",
"{",
"return",
"m",
".",
"Err",
"\n",
"}",
"\n\n",
"m",
".",
"O",
".",
"<mask>",
",",
"m",
... |
22,490 | all-22491 | [
"ListBoxNew",
"is",
"a",
"wrapper",
"around",
"gtk_list_box_new",
"()",
"."
] | [
"func",
"ListBoxNew",
"(",
")",
"(",
"*",
"ListBox",
",",
"<mask>",
")",
"{",
"c",
":=",
"C",
".",
"gtk_list_box_new",
"(",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"return",
"nil",
",",
"nilPtrErr",
"\n",
"}",
"\n",
"return",
"wrapListBox",
"(",
"g... |
22,491 | all-22492 | [
"==",
"Lookup",
"lookUp",
"parses",
"the",
"user",
"line",
"searching",
"a",
"value",
"into",
"the",
"field",
".",
"Returns",
"nil",
"if",
"is",
"not",
"found",
"."
] | [
"func",
"(",
"*",
"User",
")",
"lookUp",
"(",
"line",
"string",
",",
"f",
"field",
",",
"value",
"interface",
"{",
"}",
")",
"interface",
"{",
"}",
"{",
"_field",
":=",
"f",
".",
"(",
"userField",
")",
"\n",
"allField",
":=",
"strings",
".",
"Split... |
22,492 | all-22493 | [
"HasProjectID",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"i",
"*",
"IntegrationGCPUpdateRequest",
")",
"HasProjectID",
"(",
")",
"bool",
"{",
"if",
"i",
"!=",
"nil",
"&&",
"i",
".",
"ProjectID",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
22,493 | all-22494 | [
"NextSequence",
"returns",
"an",
"autoincrementing",
"integer",
"for",
"the",
"bucket",
"."
] | [
"func",
"(",
"b",
"Bucket",
")",
"NextSequence",
"(",
")",
"(",
"uint64",
",",
"error",
")",
"{",
"s",
",",
"err",
":=",
"b",
".",
"Bucket",
".",
"NextSequence",
"(",
")",
"\n",
"<mask>",
"s",
",",
"errorsp",
".",
"WithStacks",
"(",
"err",
")",
"... |
22,494 | all-22495 | [
"GetMetricOk",
"returns",
"a",
"tuple",
"with",
"the",
"Metric",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"m",
"*",
"Metric",
")",
"GetMetricOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"m",
"==",
"nil",
"||",
"m",
".",
"Metric",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"<mask>",
"\n",
"}",
"\n",
"return",
"*",
"m",
... |
22,495 | all-22496 | [
"PutBlob",
"writes",
"contents",
"of",
"stream",
"and",
"returns",
"data",
"representing",
"the",
"result",
".",
"inputInfo",
".",
"Digest",
"can",
"be",
"optionally",
"provided",
"if",
"known",
";",
"it",
"is",
"not",
"mandatory",
"for",
"the",
"implementatio... | [
"func",
"(",
"d",
"*",
"ociArchiveImageDestination",
")",
"PutBlob",
"(",
"ctx",
"<mask>",
".",
"Context",
",",
"stream",
"io",
".",
"Reader",
",",
"inputInfo",
"types",
".",
"BlobInfo",
",",
"cache",
"types",
".",
"BlobInfoCache",
",",
"isConfig",
"bool",
... |
22,496 | all-22497 | [
"Given",
"possibly",
"non",
"-",
"matched",
"pair",
"of",
"things",
"to",
"perform",
"arithmetic",
"operations",
"on",
"align",
"their",
"types",
"so",
"that",
"the",
"given",
"operation",
"can",
"be",
"performed",
"correctly",
".",
"e",
".",
"g",
".",
"gi... | [
"func",
"alignTypesForArithmetic",
"(",
"left",
",",
"right",
"interface",
"{",
"}",
")",
"(",
"reflect",
".",
"Value",
",",
"reflect",
".",
"Value",
")",
"{",
"// These avoid crashes for accessing nil interfaces",
"if",
"left",
"==",
"nil",
"{",
"left",
"=",
... |
22,497 | all-22498 | [
"serve",
"starts",
"a",
"http",
"server",
"and",
"serves",
"Jenkins",
"logs",
"and",
"prometheus",
"metrics",
".",
"Meant",
"to",
"be",
"called",
"inside",
"a",
"goroutine",
"."
] | [
"func",
"serve",
"(",
"jc",
"*",
"jenkins",
".",
"Client",
")",
"{",
"http",
".",
"Handle",
"(",
"\"",
"\"",
",",
"gziphandler",
".",
"GzipHandler",
"(",
"handleLog",
"(",
"jc",
")",
")",
")",
"\n",
"<mask>",
".",
"Handle",
"(",
"\"",
"\"",
",",
... |
22,498 | all-22499 | [
"Leader",
"returns",
"the",
"node",
"that",
"is",
"currently",
"the",
"Leader",
"if",
"there",
"is",
"no",
"leader",
"this",
"function",
"blocks",
"until",
"a",
"leader",
"is",
"elected",
"(",
"or",
"a",
"timeout",
"occurs",
")"
] | [
"func",
"(",
"c",
"*",
"cluster",
")",
"Leader",
"(",
"timeout",
"time",
".",
"Duration",
")",
"*",
"raftNode",
"{",
"<mask>",
":=",
"time",
".",
"Now",
"(",
")",
"\n",
"for",
"true",
"{",
"for",
"_",
",",
"n",
":=",
"range",
"c",
".",
"nodes",
... |
22,499 | all-22500 | [
"validateIAMRoleCredentialsMessage",
"validates",
"fields",
"in",
"the",
"IAMRoleCredentialsMessage",
"It",
"returns",
"an",
"error",
"if",
"any",
"of",
"the",
"following",
"fields",
"are",
"not",
"set",
"in",
"the",
"message",
":",
"messageId",
"taskArn",
"roleCred... | [
"func",
"validateIAMRoleCredentialsMessage",
"(",
"message",
"*",
"ecsacs",
".",
"IAMRoleCredentialsMessage",
")",
"error",
"{",
"if",
"message",
"==",
"nil",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"messageId",
":=",
"a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.