id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
1,300 | all-1301 | [
"verifyContainerOrderingStatusResolvable",
"validates",
"that",
"target",
"can",
"be",
"resolved",
"given",
"that",
"the",
"dependsOn",
"containers",
"are",
"resolved",
"and",
"there",
"are",
"existingContainers",
"(",
"map",
"from",
"name",
"to",
"container",
")",
... | [
"func",
"verifyContainerOrderingStatusResolvable",
"(",
"<mask>",
"*",
"apicontainer",
".",
"Container",
",",
"existingContainers",
"map",
"[",
"string",
"]",
"*",
"apicontainer",
".",
"Container",
",",
"resolves",
"func",
"(",
"*",
"apicontainer",
".",
"Container",... |
1,301 | all-1302 | [
"StatusString",
"returns",
"the",
"string",
"of",
"the",
"cgroup",
"resource",
"status"
] | [
"func",
"(",
"secret",
"*",
"SSMSecretResource",
")",
"StatusString",
"(",
"<mask>",
"resourcestatus",
".",
"ResourceStatus",
")",
"string",
"{",
"return",
"SSMSecretStatus",
"(",
"status",
")",
".",
"String",
"(",
")",
"\n",
"}"
] |
1,302 | all-1303 | [
"RequestData",
"requests",
"data",
"from",
"object",
"store",
"or",
"index",
".",
"See",
":",
"https",
":",
"//",
"chromedevtools",
".",
"github",
".",
"io",
"/",
"devtools",
"-",
"protocol",
"/",
"tot",
"/",
"IndexedDB#method",
"-",
"requestData",
"paramete... | [
"func",
"RequestData",
"(",
"securityOrigin",
"string",
",",
"databaseName",
"string",
",",
"objectStoreName",
"<mask>",
",",
"indexName",
"string",
",",
"skipCount",
"int64",
",",
"pageSize",
"int64",
")",
"*",
"RequestDataParams",
"{",
"return",
"&",
"RequestDat... |
1,303 | all-1304 | [
"SetPrefix",
"set",
"Print",
"logger",
"prefix"
] | [
"func",
"(",
"g",
"*",
"Glg",
")",
"SetPrefix",
"(",
"pref",
"string",
")",
"*",
"Glg",
"{",
"v",
",",
"ok",
":=",
"g",
".",
"logger",
".",
"Load",
"(",
"PRINT",
")",
"\n",
"if",
"ok",
"{",
"<mask>",
":=",
"v",
".",
"(",
"*",
"logger",
")",
... |
1,304 | all-1305 | [
"sortExprLabels",
"sorts",
"lists",
"of",
"strings",
"using",
"the",
"same",
"order",
"as",
"buildifier",
".",
"Buildifier",
"also",
"sorts",
"string",
"lists",
"but",
"not",
"those",
"involved",
"with",
"select",
"expressions",
".",
"This",
"function",
"is",
... | [
"func",
"sortExprLabels",
"(",
"e",
"bzl",
".",
"Expr",
",",
"_",
"[",
"]",
"bzl",
".",
"Expr",
")",
"{",
"list",
",",
"ok",
":=",
"e",
".",
"(",
"*",
"bzl",
".",
"ListExpr",
")",
"\n",
"if",
"!",
"ok",
"||",
"len",
"(",
"list",
".",
"List",
... |
1,305 | all-1306 | [
"WaitIsTextAvailable",
"is",
"a",
"wrapper",
"around",
"gtk_clipboard_wait_is_text_available"
] | [
"func",
"(",
"v",
"*",
"Clipboard",
")",
"WaitIsTextAvailable",
"(",
")",
"bool",
"{",
"c",
":=",
"C",
".",
"gtk_clipboard_wait_is_text_available",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"<mask>",
"gobool",
"(",
"c",
")",
"\n",
"}"
] |
1,306 | all-1307 | [
"GetType",
"returns",
"the",
"Type",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"g",
"*",
"GraphDefinitionRequest",
")",
"GetType",
"(",
")",
"string",
"{",
"if",
"g",
"==",
"nil",
"||",
"g",
".",
"Type",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"g",
".",
"<mask>",
"\n",
"}"
] |
1,307 | all-1308 | [
"Write",
"writes",
"a",
"single",
"line",
"to",
"the",
"underlining",
"buffer",
".",
"If",
"the",
"ScreenBuf",
"was",
"previously",
"reset",
"all",
"previous",
"lines",
"are",
"cleared",
"and",
"the",
"output",
"starts",
"from",
"the",
"top",
".",
"Lines",
... | [
"func",
"(",
"s",
"*",
"ScreenBuf",
")",
"Write",
"(",
"b",
"[",
"]",
"byte",
")",
"(",
"int",
",",
"error",
")",
"{",
"if",
"bytes",
".",
"ContainsAny",
"(",
"b",
",",
"\"",
"\\r",
"\\n",
"\"",
")",
"{",
"return",
"0",
",",
"fmt",
".",
"Erro... |
1,308 | all-1309 | [
"GetPrefix",
"returns",
"the",
"Prefix",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"t",
"*",
"TemplateVariable",
")",
"GetPrefix",
"(",
")",
"string",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"Prefix",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"<mask>",
"*",
"t",
".",
"Prefix",
"\n",
"}"
] |
1,309 | all-1310 | [
"GetType",
"returns",
"the",
"Type",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"a",
"*",
"AlertValueDefinition",
")",
"GetType",
"(",
")",
"string",
"{",
"if",
"a",
"==",
"nil",
"||",
"a",
".",
"Type",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"a",
".",
"<mask>",
"\n",
"}"
] |
1,310 | all-1311 | [
"ValidEnum",
"validates",
"a",
"proposed",
"value",
"for",
"this",
"enum",
".",
"Implements",
"the",
"Enum",
"interface",
"for",
"ErrorCode"
] | [
"func",
"(",
"e",
"ErrorCode",
")",
"ValidEnum",
"(",
"v",
"int32",
")",
"bool",
"{",
"_",
",",
"ok",
":=",
"errorCodeMap",
"[",
"v",
"]",
"\n",
"return",
"<mask>",
"\n",
"}"
] |
1,311 | all-1312 | [
"NewSession",
"creates",
"a",
"new",
"database",
"session",
"."
] | [
"func",
"NewSession",
"(",
"ctx",
"context",
".",
"Context",
",",
"prm",
"sessionPrm",
")",
"(",
"*",
"Session",
",",
"error",
")",
"{",
"if",
"trace",
"{",
"outLogger",
".",
"Printf",
"(",
"\"",
"\"",
",",
"prm",
")",
"\n",
"}",
"\n\n",
"<mask>",
... |
1,312 | all-1313 | [
"Uptime",
"returns",
"the",
"uptime",
"of",
"the",
"bot"
] | [
"func",
"(",
"<mask>",
"*",
"Bot",
")",
"Uptime",
"(",
")",
"string",
"{",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"bot",
".",
"started",
",",
"time",
".",
"Since",
"(",
"bot",
".",
"started",
")",
")",
"\n",
"}"
] |
1,313 | all-1314 | [
"copyWithoutSnapshotsFull",
"creates",
"a",
"sparse",
"copy",
"of",
"a",
"container",
"This",
"introduces",
"a",
"dependency",
"relation",
"between",
"the",
"source",
"RBD",
"storage",
"volume",
"and",
"the",
"target",
"RBD",
"storage",
"volume",
"."
] | [
"func",
"(",
"s",
"*",
"storageCeph",
")",
"copyWithoutSnapshotsSparse",
"(",
"<mask>",
"container",
",",
"source",
"container",
")",
"error",
"{",
"logger",
".",
"Debugf",
"(",
"`Creating sparse copy of RBD storage volume for container \"%s\" to \"%s\" without snapshots`",
... |
1,314 | all-1315 | [
"MapWithOverwrite",
"will",
"do",
"the",
"same",
"as",
"Map",
"except",
"that",
"non",
"-",
"empty",
"dst",
"attributes",
"will",
"be",
"overridden",
"by",
"non",
"-",
"empty",
"src",
"attribute",
"values",
".",
"Deprecated",
":",
"Use",
"Map",
"(",
"…",
... | [
"func",
"MapWithOverwrite",
"(",
"dst",
",",
"src",
"interface",
"{",
"}",
",",
"opts",
"...",
"func",
"(",
"*",
"Config",
")",
")",
"error",
"{",
"return",
"_map",
"(",
"dst",
",",
"src",
",",
"<mask>",
"(",
"opts",
",",
"WithOverride",
")",
"...",
... |
1,315 | all-1316 | [
"/",
"1",
".",
"0",
"/",
"storage",
"-",
"pools",
"/",
"{",
"name",
"}",
"/",
"volumes",
"List",
"all",
"storage",
"volumes",
"attached",
"to",
"a",
"given",
"storage",
"pool",
"."
] | [
"func",
"storagePoolVolumesGet",
"(",
"d",
"*",
"Daemon",
",",
"r",
"*",
"http",
".",
"Request",
")",
"Response",
"{",
"project",
":=",
"projectParam",
"(",
"r",
")",
"\n",
"poolName",
":=",
"mux",
".",
"Vars",
"(",
"r",
")",
"[",
"\"",
"\"",
"]",
... |
1,316 | all-1317 | [
"StripSlashes",
"is",
"a",
"middleware",
"that",
"will",
"match",
"request",
"paths",
"with",
"a",
"trailing",
"slash",
"strip",
"it",
"from",
"the",
"path",
"and",
"continue",
"routing",
"through",
"the",
"mux",
"if",
"a",
"route",
"matches",
"then",
"it",
... | [
"func",
"StripSlashes",
"(",
"next",
"http",
".",
"Handler",
")",
"http",
".",
"Handler",
"{",
"fn",
":=",
"func",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
")",
"{",
"var",
"path",
"string",
"\n",
"rctx",
":=",
... |
1,317 | all-1318 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetPlatformFontsForNodeParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"<mask>",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss38",
"(",
... |
1,318 | all-1319 | [
"flattenSrcs",
"transforms",
"srcs",
"attributes",
"structured",
"as",
"concatenations",
"of",
"lists",
"and",
"selects",
"(",
"generated",
"from",
"PlatformStrings",
";",
"see",
"extractPlatformStringsExprs",
"for",
"matching",
"details",
")",
"into",
"a",
"sorted",
... | [
"func",
"flattenSrcs",
"(",
"c",
"*",
"config",
".",
"Config",
",",
"f",
"*",
"rule",
".",
"File",
")",
"{",
"for",
"_",
",",
"r",
":=",
"range",
"f",
".",
"Rules",
"{",
"if",
"!",
"isGoRule",
"(",
"r",
".",
"Kind",
"(",
")",
")",
"{",
"conti... |
1,319 | all-1320 | [
"GetEndIter",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_text_buffer_get_end_iter",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"TextBuffer",
")",
"GetEndIter",
"(",
")",
"*",
"TextIter",
"{",
"<mask>",
"iter",
"C",
".",
"GtkTextIter",
"\n",
"C",
".",
"gtk_text_buffer_get_end_iter",
"(",
"v",
".",
"native",
"(",
")",
",",
"&",
"iter",
")",
"\n",
"return",... |
1,320 | all-1321 | [
"newImageSource",
"returns",
"an",
"ImageSource",
"for",
"reading",
"from",
"an",
"existing",
"directory",
"."
] | [
"func",
"newImageSource",
"(",
"tmpDir",
"string",
",",
"<mask>",
"ostreeReference",
")",
"(",
"types",
".",
"ImageSource",
",",
"error",
")",
"{",
"return",
"&",
"ostreeImageSource",
"{",
"ref",
":",
"ref",
",",
"tmpDir",
":",
"tmpDir",
",",
"compressed",
... |
1,321 | all-1322 | [
"InMemoryWithLogging",
"injects",
"logging",
"when",
"ApplyChanges",
"is",
"called"
] | [
"func",
"InMemoryWithLogging",
"(",
")",
"InMemoryOption",
"{",
"return",
"func",
"(",
"p",
"*",
"InMemoryProvider",
")",
"{",
"p",
".",
"OnApplyChanges",
"=",
"func",
"(",
"<mask>",
"*",
"plan",
".",
"Changes",
")",
"{",
"for",
"_",
",",
"v",
":=",
"r... |
1,322 | all-1323 | [
"GetNewBaseFee",
"retrieves",
"the",
"NewBaseFee",
"value",
"from",
"the",
"union",
"returning",
"ok",
"if",
"the",
"union",
"s",
"switch",
"indicated",
"the",
"value",
"is",
"valid",
"."
] | [
"func",
"(",
"u",
"LedgerUpgrade",
")",
"GetNewBaseFee",
"(",
")",
"(",
"result",
"Uint32",
",",
"ok",
"bool",
")",
"{",
"armName",
",",
"_",
":=",
"u",
".",
"ArmForSwitch",
"(",
"int32",
"(",
"u",
".",
"Type",
")",
")",
"\n\n",
"if",
"armName",
"=... |
1,323 | all-1324 | [
"DFS",
"does",
"depth",
"-",
"first",
"search",
"and",
"returns",
"the",
"list",
"of",
"vertices",
".",
"(",
"https",
":",
"//",
"en",
".",
"wikipedia",
".",
"org",
"/",
"wiki",
"/",
"Depth",
"-",
"first_search",
")",
"0",
".",
"DFS",
"(",
"G",
"v"... | [
"func",
"DFS",
"(",
"g",
"Graph",
",",
"id",
"ID",
")",
"[",
"]",
"ID",
"{",
"if",
"_",
",",
"err",
":=",
"g",
".",
"GetNode",
"(",
"id",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"s",
":=",
"[",
"]",
"ID",
"{... |
1,324 | all-1325 | [
"checkDir",
"will",
"check",
"whether",
"the",
"component",
"is",
"a",
"directory",
"under",
"parent",
"node",
".",
"If",
"it",
"is",
"a",
"directory",
"this",
"function",
"will",
"return",
"the",
"pointer",
"to",
"that",
"node",
".",
"If",
"it",
"does",
... | [
"func",
"(",
"s",
"*",
"store",
")",
"checkDir",
"(",
"parent",
"*",
"node",
",",
"dirName",
"string",
")",
"(",
"*",
"node",
",",
"*",
"v2error",
".",
"Error",
")",
"{",
"node",
",",
"ok",
":=",
"parent",
".",
"Children",
"[",
"dirName",
"]",
"\... |
1,325 | all-1326 | [
"The",
"caller",
"MUST",
"NOT",
"hold",
"s",
".",
"Lock"
] | [
"func",
"(",
"s",
"*",
"MockSpan",
")",
"logFieldsWithTimestamp",
"(",
"ts",
"time",
".",
"Time",
",",
"fields",
"...",
"log",
".",
"Field",
")",
"{",
"lr",
":=",
"MockLogRecord",
"{",
"Timestamp",
":",
"ts",
",",
"Fields",
":",
"<mask>",
"(",
"[",
"... |
1,326 | all-1327 | [
"MoveTo",
"is",
"a",
"wrapper",
"around",
"cairo_move_to",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"MoveTo",
"(",
"x",
",",
"y",
"float64",
")",
"{",
"C",
".",
"cairo_move_to",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"double",
"(",
"x",
")",
",",
"C",
".",
"double",
"(",
"y",
")",
")",
"\n"... |
1,327 | all-1328 | [
"DialTo",
"makes",
"a",
"(",
"un",
"-",
"secure",
")",
"TELNET",
"client",
"connection",
"to",
"the",
"the",
"address",
"specified",
"by",
"addr",
".",
"If",
"a",
"secure",
"connection",
"is",
"desired",
"use",
"DialToTLS",
"instead",
"."
] | [
"func",
"DialTo",
"(",
"addr",
"string",
")",
"(",
"*",
"Conn",
",",
"error",
")",
"{",
"const",
"network",
"=",
"\"",
"\"",
"\n\n",
"if",
"\"",
"\"",
"==",
"addr",
"{",
"addr",
"=",
"\"",
"\"",
"\n",
"}",
"\n\n",
"conn",
",",
"err",
":=",
"net... |
1,328 | all-1329 | [
"Int",
"defines",
"an",
"int",
"flag",
"with",
"specified",
"name",
"default",
"value",
"and",
"usage",
"string",
".",
"The",
"return",
"value",
"is",
"the",
"address",
"of",
"an",
"int",
"variable",
"that",
"stores",
"the",
"value",
"of",
"the",
"flag",
... | [
"func",
"Int",
"(",
"name",
"string",
",",
"value",
"int",
",",
"usage",
"string",
")",
"*",
"int",
"{",
"return",
"EnvironmentFlags",
".",
"Int",
"(",
"name",
",",
"value",
",",
"<mask>",
")",
"\n",
"}"
] |
1,329 | all-1330 | [
"NewAccountMergeResult",
"creates",
"a",
"new",
"AccountMergeResult",
"."
] | [
"func",
"NewAccountMergeResult",
"(",
"code",
"AccountMergeResultCode",
",",
"value",
"interface",
"{",
"}",
")",
"(",
"result",
"AccountMergeResult",
",",
"err",
"error",
")",
"{",
"<mask>",
".",
"Code",
"=",
"code",
"\n",
"switch",
"AccountMergeResultCode",
"(... |
1,330 | all-1331 | [
"returns",
"the",
"plural",
"form",
"of",
"a",
"singular",
"word"
] | [
"func",
"(",
"rs",
"*",
"Ruleset",
")",
"Pluralize",
"(",
"word",
"string",
")",
"string",
"{",
"if",
"len",
"(",
"word",
")",
"==",
"0",
"{",
"return",
"word",
"\n",
"}",
"\n",
"if",
"rs",
".",
"isUncountable",
"(",
"word",
")",
"{",
"return",
"... |
1,331 | all-1332 | [
"Logger",
"returns",
"a",
"middleware",
"handler",
"that",
"logs",
"the",
"request",
"as",
"it",
"goes",
"in",
"and",
"the",
"response",
"as",
"it",
"goes",
"out",
"."
] | [
"func",
"Logger",
"(",
")",
"Handler",
"{",
"return",
"func",
"(",
"ctx",
"*",
"Context",
",",
"log",
"*",
"log",
".",
"Logger",
")",
"{",
"start",
":=",
"time",
".",
"Now",
"(",
")",
"\n\n",
"log",
".",
"Printf",
"(",
"\"",
"\"",
",",
"time",
... |
1,332 | all-1333 | [
"GetCursorLocations",
"is",
"a",
"wrapper",
"around",
"gtk_text_view_get_cursor_locations",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"TextView",
")",
"GetCursorLocations",
"(",
"iter",
"*",
"TextIter",
")",
"(",
"strong",
",",
"weak",
"*",
"gdk",
".",
"Rectangle",
")",
"{",
"<mask>",
"strongRect",
",",
"weakRect",
"C",
".",
"GdkRectangle",
"\n",
"C",
".",
"gtk... |
1,333 | all-1334 | [
"GetResourceOk",
"returns",
"a",
"tuple",
"with",
"the",
"Resource",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"d",
"*",
"DashboardLite",
")",
"GetResourceOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"d",
"==",
"nil",
"||",
"d",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
... |
1,334 | all-1335 | [
"newCookieSigner",
"returns",
"a",
"cookie",
"signer",
"that",
"uses",
"the",
"given",
"builder",
"to",
"build",
"login",
"requests",
"."
] | [
"func",
"newCookieSigner",
"(",
"builder",
"loginRequestBuilder",
",",
"accountID",
"int",
")",
"Authenticator",
"{",
"return",
"&",
"cookieSigner",
"{",
"builder",
":",
"builder",
",",
"accountID",
":",
"accountID",
",",
"refreshAt",
":",
"time",
".",
"Now",
... |
1,335 | all-1336 | [
"UTF8String",
"parseUTF8String",
"parses",
"a",
"ASN",
".",
"1",
"UTF8String",
"(",
"raw",
"UTF",
"-",
"8",
")",
"from",
"the",
"given",
"byte",
"array",
"and",
"returns",
"it",
"."
] | [
"func",
"parseUTF8String",
"(",
"bytes",
"[",
"]",
"byte",
")",
"(",
"ret",
"string",
",",
"err",
"error",
")",
"{",
"if",
"!",
"utf8",
".",
"Valid",
"(",
"bytes",
")",
"{",
"return",
"\"",
"\"",
",",
"<mask>",
".",
"New",
"(",
"\"",
"\"",
")",
... |
1,336 | all-1337 | [
"Return",
"information",
"about",
"the",
"cluster",
"."
] | [
"func",
"clusterGet",
"(",
"d",
"*",
"Daemon",
",",
"r",
"*",
"http",
".",
"Request",
")",
"Response",
"{",
"name",
":=",
"\"",
"\"",
"\n",
"err",
":=",
"d",
".",
"cluster",
".",
"<mask>",
"(",
"func",
"(",
"tx",
"*",
"db",
".",
"ClusterTx",
")",... |
1,337 | all-1338 | [
"PeekBack",
"returns",
"the",
"element",
"at",
"the",
"back",
"of",
"the",
"queue",
"."
] | [
"func",
"(",
"queue",
"*",
"queue",
")",
"PeekBack",
"(",
")",
"<mask>",
"{",
"}",
"{",
"if",
"queue",
".",
"size",
"==",
"0",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"return",
"queue",
".",
"elements",
"[",
"(",
"queue",
".",
"end",
"-",
"1",
... |
1,338 | all-1339 | [
"expandBaseVmwareDistributedVirtualSwitchVlanSpec",
"reads",
"certain",
"ResourceData",
"keys",
"and",
"returns",
"a",
"BaseVmwareDistributedVirtualSwitchVlanSpec",
"."
] | [
"func",
"expandBaseVmwareDistributedVirtualSwitchVlanSpec",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
")",
"types",
".",
"BaseVmwareDistributedVirtualSwitchVlanSpec",
"{",
"var",
"obj",
"types",
".",
"BaseVmwareDistributedVirtualSwitchVlanSpec",
"\n\n",
"_",
",",
"ide",... |
1,339 | all-1340 | [
"StoragePoolNodeJoin",
"adds",
"a",
"new",
"entry",
"in",
"the",
"storage_pools_nodes",
"table",
".",
"It",
"should",
"only",
"be",
"used",
"when",
"a",
"new",
"node",
"joins",
"the",
"cluster",
"when",
"it",
"s",
"safe",
"to",
"assume",
"that",
"the",
"re... | [
"func",
"(",
"c",
"*",
"ClusterTx",
")",
"StoragePoolNodeJoin",
"(",
"poolID",
",",
"nodeID",
"int64",
")",
"error",
"{",
"columns",
":=",
"[",
"]",
"string",
"{",
"\"",
"\"",
",",
"\"",
"\"",
"}",
"\n",
"<mask>",
":=",
"[",
"]",
"interface",
"{",
... |
1,340 | all-1341 | [
"Update",
"the",
"caller",
"ID",
"with",
"the",
"given",
"data",
".",
"Valid",
"parameters",
"may",
"be",
"found",
"here",
":",
"https",
":",
"//",
"www",
".",
"twilio",
".",
"com",
"/",
"docs",
"/",
"api",
"/",
"rest",
"/",
"outgoing",
"-",
"caller"... | [
"func",
"(",
"o",
"*",
"OutgoingCallerIDService",
")",
"Update",
"(",
"ctx",
"context",
".",
"Context",
",",
"sid",
"string",
",",
"data",
"url",
".",
"Values",
")",
"(",
"*",
"OutgoingCallerID",
",",
"error",
")",
"{",
"id",
":=",
"new",
"(",
"Outgoin... |
1,341 | all-1342 | [
"DependentResourcesValidator",
"counts",
"related",
"documents",
"and",
"returns",
"an",
"error",
"if",
"some",
"get",
"found",
".",
"This",
"callback",
"is",
"meant",
"to",
"protect",
"resources",
"from",
"breaking",
"relations",
"when",
"requested",
"to",
"be",
... | [
"func",
"DependentResourcesValidator",
"(",
"pairs",
"map",
"[",
"coal",
".",
"Model",
"]",
"string",
")",
"*",
"Callback",
"{",
"return",
"C",
"(",
"\"",
"\"",
",",
"Only",
"(",
"Delete",
")",
",",
"func",
"(",
"ctx",
"*",
"Context",
")",
"error",
"... |
1,342 | all-1343 | [
"Callback",
"will",
"return",
"a",
"callback",
"that",
"authorizes",
"operations",
"using",
"the",
"strategy",
"."
] | [
"func",
"(",
"s",
"*",
"Strategy",
")",
"Callback",
"(",
")",
"*",
"fire",
".",
"Callback",
"{",
"// enforce defaults",
"if",
"s",
".",
"CollectionAction",
"==",
"nil",
"{",
"s",
".",
"CollectionAction",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"["... |
1,343 | all-1344 | [
"openDBFile",
"opens",
"a",
"file",
"."
] | [
"func",
"openDBFile",
"(",
"filename",
"string",
",",
"<mask>",
"int",
")",
"(",
"*",
"dbfile",
",",
"error",
")",
"{",
"f",
",",
"err",
":=",
"os",
".",
"OpenFile",
"(",
"filename",
",",
"flag",
",",
"0",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{"... |
1,344 | all-1345 | [
"GetUrl",
"returns",
"the",
"Url",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"r",
"*",
"reqGetDashboard",
")",
"GetUrl",
"(",
")",
"string",
"{",
"if",
"r",
"==",
"nil",
"||",
"r",
".",
"Url",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"<mask>",
"*",
"r",
".",
"Url",
"\n",
"}"
] |
1,345 | all-1346 | [
"/",
"*",
"Inializes",
"IplImage",
"header"
] | [
"func",
"(",
"img",
"*",
"IplImage",
")",
"InitHeader",
"(",
"w",
",",
"h",
",",
"<mask>",
",",
"channels",
",",
"origin",
",",
"align",
"int",
")",
"{",
"C",
".",
"cvInitImageHeader",
"(",
"(",
"*",
"C",
".",
"IplImage",
")",
"(",
"img",
")",
",... |
1,346 | all-1347 | [
"NewBufPool",
"creates",
"a",
"new",
"BufPool",
"that",
"returns",
"buffers",
"of",
"the",
"given",
"size",
"."
] | [
"func",
"NewBufPool",
"(",
"size",
"int",
")",
"*",
"BufPool",
"{",
"return",
"&",
"BufPool",
"{",
"<mask>",
".",
"Pool",
"{",
"New",
":",
"func",
"(",
")",
"interface",
"{",
"}",
"{",
"return",
"make",
"(",
"[",
"]",
"byte",
",",
"size",
")",
"}... |
1,347 | all-1348 | [
"RegisterHandler",
"inserts",
"a",
"handler",
"on",
"a",
"list",
"of",
"handlers",
"for",
"version",
"1",
".",
"0"
] | [
"func",
"RegisterHandler",
"(",
"path",
"string",
",",
"method",
"string",
",",
"h",
"<mask>",
".",
"Handler",
")",
"{",
"RegisterHandlerVersion",
"(",
"\"",
"\"",
",",
"path",
",",
"method",
",",
"h",
")",
"\n",
"}"
] |
1,348 | all-1349 | [
"FilterPath",
"returns",
"a",
"new",
"Option",
"where",
"opt",
"is",
"only",
"evaluated",
"if",
"filter",
"f",
"returns",
"true",
"for",
"the",
"current",
"Path",
"in",
"the",
"value",
"tree",
".",
"This",
"filter",
"is",
"called",
"even",
"if",
"a",
"sl... | [
"func",
"FilterPath",
"(",
"f",
"func",
"(",
"Path",
")",
"bool",
",",
"<mask>",
"Option",
")",
"Option",
"{",
"if",
"f",
"==",
"nil",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"if",
"opt",
":=",
"normalizeOption",
"(",
"opt",
")",
";"... |
1,349 | all-1350 | [
"otherFileInfo",
"returns",
"information",
"about",
"a",
"non",
"-",
".",
"go",
"file",
".",
"It",
"will",
"parse",
"part",
"of",
"the",
"file",
"to",
"determine",
"build",
"tags",
".",
"If",
"the",
"file",
"can",
"t",
"be",
"read",
"an",
"error",
"wil... | [
"func",
"otherFileInfo",
"(",
"<mask>",
"string",
")",
"fileInfo",
"{",
"info",
":=",
"fileNameInfo",
"(",
"path",
")",
"\n",
"if",
"info",
".",
"ext",
"==",
"unknownExt",
"{",
"return",
"info",
"\n",
"}",
"\n\n",
"tags",
",",
"err",
":=",
"readTags",
... |
1,350 | all-1351 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"Bounds",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser21",
"(",
"&",
"w",
",",
"v",
")",
"\n",
... |
1,351 | all-1352 | [
"GetFocusVisible",
"is",
"a",
"wrapper",
"around",
"gtk_window_get_focus_visible",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Window",
")",
"GetFocusVisible",
"(",
")",
"bool",
"{",
"c",
":=",
"C",
".",
"gtk_window_get_focus_visible",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"<mask>",
"gobool",
"(",
"c",
")",
"\n",
"}"
] |
1,352 | all-1353 | [
"failResult",
"is",
"a",
"small",
"utility",
"function",
"for",
"creating",
"a",
"failed",
"lint",
"result",
"."
] | [
"func",
"failResult",
"(",
"format",
"string",
",",
"args",
"...",
"interface",
"{",
"}",
")",
"*",
"LintResult",
"{",
"return",
"&",
"LintResult",
"{",
"<mask>",
":",
"Error",
",",
"Details",
":",
"fmt",
".",
"Sprintf",
"(",
"format",
",",
"args",
"..... |
1,353 | all-1354 | [
"void",
"pango_font_description_set_size",
"(",
"PangoFontDescription",
"*",
"desc",
"gint",
"size",
")",
";"
] | [
"func",
"(",
"v",
"*",
"FontDescription",
")",
"SetSize",
"(",
"<mask>",
"int",
")",
"{",
"C",
".",
"pango_font_description_set_size",
"(",
"v",
".",
"native",
"(",
")",
",",
"(",
"C",
".",
"gint",
")",
"(",
"size",
")",
")",
"\n",
"}"
] |
1,354 | all-1355 | [
"SubmitContainerStateChange",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockECSClient",
")",
"SubmitContainerStateChange",
"(",
"arg0",
"api",
".",
"ContainerStateChange",
")",
"error",
"{",
"<mask>",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
",",
"arg0",
")",
"\n",
"ret0",
","... |
1,355 | all-1356 | [
"NextUID",
"returns",
"the",
"next",
"free",
"user",
"id",
"to",
"use",
"."
] | [
"func",
"NextUID",
"(",
")",
"(",
"int",
",",
"error",
")",
"{",
"db",
",",
"uid",
",",
"err",
":=",
"nextUID",
"(",
"false",
")",
"\n",
"db",
".",
"<mask>",
"(",
")",
"\n",
"return",
"uid",
",",
"err",
"\n",
"}"
] |
1,356 | all-1357 | [
"SetPassword",
"sets",
"the",
"password",
"only",
"on",
"the",
"first",
"call",
".",
"Returns",
"error",
"if",
"password",
"already",
"exists",
"."
] | [
"func",
"(",
"h",
"*",
"<mask>",
")",
"SetPassword",
"(",
"password",
"string",
")",
"error",
"{",
"logger",
":=",
"h",
".",
"logger",
".",
"Add",
"(",
"\"",
"\"",
",",
"\"",
"\"",
")",
"\n\n",
"logger",
".",
"Debug",
"(",
"\"",
"\"",
")",
"\n\n"... |
1,357 | all-1358 | [
"Separator",
"returns",
"the",
"character",
"/",
"s",
"used",
"to",
"separate",
"the",
"key",
"from",
"the",
"value",
".",
"The",
"separator",
"is",
"got",
"in",
"the",
"first",
"call",
"to",
"Scan",
"()",
";",
"if",
"it",
"has",
"not",
"been",
"called... | [
"func",
"(",
"s",
"*",
"Scanner",
")",
"Separator",
"(",
")",
"[",
"]",
"byte",
"{",
"if",
"s",
".",
"separator",
"==",
"nil",
"{",
"if",
"<mask>",
":=",
"s",
".",
"Scan",
"(",
")",
";",
"!",
"found",
"{",
"if",
"err",
":=",
"s",
".",
"Err",
... |
1,358 | all-1359 | [
"GetSizeFormatOk",
"returns",
"a",
"tuple",
"with",
"the",
"SizeFormat",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"t",
"*",
"TraceServiceDefinition",
")",
"GetSizeFormatOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"SizeFormat",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"<mask>",
"\n",
"}",
"\n",
"... |
1,359 | all-1360 | [
"Stdout",
"sets",
"the",
"process",
"s",
"standard",
"output",
"."
] | [
"func",
"(",
"g",
"*",
"gitCmd",
")",
"Stdout",
"(",
"stdout",
"<mask>",
".",
"Writer",
")",
"{",
"g",
".",
"Cmd",
".",
"Stdout",
"=",
"stdout",
"\n",
"}"
] |
1,360 | all-1361 | [
"AggregateProfiles",
"takes",
"multiple",
"coverage",
"profiles",
"and",
"produces",
"a",
"new",
"coverage",
"profile",
"that",
"counts",
"the",
"number",
"of",
"profiles",
"that",
"hit",
"a",
"block",
"at",
"least",
"once",
"."
] | [
"func",
"AggregateProfiles",
"(",
"profiles",
"[",
"]",
"[",
"]",
"*",
"cover",
".",
"Profile",
")",
"(",
"[",
"]",
"*",
"cover",
".",
"Profile",
",",
"error",
")",
"{",
"setProfiles",
":=",
"make",
"(",
"[",
"]",
"[",
"]",
"*",
"cover",
".",
"Pr... |
1,361 | all-1362 | [
"export",
"PaddingChars"
] | [
"func",
"PaddingChars",
"(",
"<mask>",
"int",
")",
"*",
"C",
".",
"char",
"{",
"// caller must free string",
"return",
"C",
".",
"CString",
"(",
"fileseq",
".",
"PaddingChars",
"(",
"pad",
")",
")",
"\n",
"}"
] |
1,362 | all-1363 | [
"attach",
"a",
"single",
"layer",
"of",
"a",
"texture",
"object",
"as",
"a",
"logical",
"buffer",
"of",
"a",
"framebuffer",
"object"
] | [
"func",
"FramebufferTextureLayer",
"(",
"<mask>",
"uint32",
",",
"attachment",
"uint32",
",",
"texture",
"uint32",
",",
"level",
"int32",
",",
"layer",
"int32",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpFramebufferTextureLayer",
",",
"5",
",",
"uintptr",
"... |
1,363 | all-1364 | [
"getGCSDirsForPR",
"returns",
"a",
"map",
"from",
"bucket",
"names",
"-",
">",
"set",
"of",
"directories",
"containing",
"presubmit",
"data"
] | [
"func",
"getGCSDirsForPR",
"(",
"config",
"*",
"config",
".",
"Config",
",",
"org",
",",
"repo",
"string",
",",
"pr",
"int",
")",
"(",
"map",
"[",
"string",
"]",
"sets",
".",
"String",
",",
"error",
")",
"{",
"toSearch",
":=",
"make",
"(",
"map",
"... |
1,364 | all-1365 | [
"Job",
"writes",
"out",
"the",
"job",
"differences",
"between",
"the",
"specified",
"releases"
] | [
"func",
"(",
"s",
"*",
"DiffCmd",
")",
"Job",
"(",
"job",
"string",
",",
"w",
"io",
".",
"<mask>",
")",
"error",
"{",
"differ",
",",
"err",
":=",
"diff",
".",
"New",
"(",
"s",
".",
"releaseRepo",
",",
"s",
".",
"release1",
",",
"s",
".",
"relea... |
1,365 | all-1366 | [
"Helper",
"method",
"called",
"by",
"(",
"Start|Finish",
")",
"ReportAndFlushUserAction",
".",
"Like",
"those",
"functions",
"it",
"is",
"used",
"by",
"the",
"pachctl",
"binary",
"and",
"runs",
"on",
"users",
"machines",
"TODO",
"(",
"msteffen",
")",
":",
"W... | [
"func",
"reportAndFlushUserAction",
"(",
"action",
"string",
",",
"value",
"interface",
"{",
"}",
")",
"func",
"(",
")",
"{",
"metricsDone",
":=",
"make",
"(",
"chan",
"struct",
"{",
"}",
")",
"\n",
"go",
"func",
"(",
")",
"{",
"client",
":=",
"newSegm... |
1,366 | all-1367 | [
"converts",
"domain",
"name",
"to",
"FQDN"
] | [
"func",
"canonicalizeDomainName",
"(",
"d",
"string",
")",
"<mask>",
"{",
"if",
"!",
"strings",
".",
"HasSuffix",
"(",
"d",
",",
"\"",
"\"",
")",
"{",
"d",
"+=",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"strings",
".",
"ToLower",
"(",
"d",
")",
"\n",... |
1,367 | all-1368 | [
"MergeCommitTemplate",
"returns",
"a",
"struct",
"with",
"Go",
"template",
"string",
"(",
"s",
")",
"or",
"nil"
] | [
"func",
"(",
"t",
"*",
"Tide",
")",
"MergeCommitTemplate",
"(",
"org",
",",
"repo",
"string",
")",
"TideMergeCommitTemplate",
"{",
"name",
":=",
"org",
"+",
"\"",
"\"",
"+",
"repo",
"\n\n",
"v",
",",
"ok",
":=",
"t",
".",
"MergeTemplate",
"[",
"name",
... |
1,368 | all-1369 | [
"newFragment",
"creates",
"a",
"new",
"fragment",
"for",
"marshaling",
"into"
] | [
"func",
"(",
"w",
"*",
"reqResWriter",
")",
"newFragment",
"(",
"initial",
"bool",
",",
"checksum",
"Checksum",
")",
"(",
"*",
"writableFragment",
",",
"error",
")",
"{",
"if",
"err",
":=",
"w",
".",
"mex",
".",
"checkError",
"(",
")",
";",
"err",
"!... |
1,369 | all-1370 | [
"ListCheckoutKeys",
"fetches",
"the",
"checkout",
"keys",
"associated",
"with",
"the",
"given",
"project"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"ListCheckoutKeys",
"(",
"account",
",",
"repo",
"string",
")",
"(",
"[",
"]",
"*",
"CheckoutKey",
",",
"error",
")",
"{",
"checkoutKeys",
":=",
"[",
"]",
"*",
"CheckoutKey",
"{",
"}",
"\n\n",
"err",
":=",
"c",
... |
1,370 | all-1371 | [
"MemoryInUse",
"returns",
"memory",
"used",
"by",
"nodetable",
"instance"
] | [
"func",
"(",
"nt",
"*",
"NodeTable",
")",
"MemoryInUse",
"(",
")",
"int64",
"{",
"<mask>",
"int64",
"(",
"approxItemSize",
"*",
"(",
"nt",
".",
"fastHTCount",
"+",
"nt",
".",
"slowHTCount",
")",
")",
"\n",
"}"
] |
1,371 | all-1372 | [
"title",
":",
"saml",
"callback",
"path",
":",
"/",
"auth",
"/",
"saml",
"method",
":",
"POST",
"responses",
":",
"200",
":",
"Ok",
"400",
":",
"Invalid",
"data"
] | [
"func",
"samlCallbackLogin",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
")",
"error",
"{",
"if",
"app",
".",
"AuthScheme",
".",
"Name",
"(",
")",
"!=",
"\"",
"\"",
"{",
"return",
"&",
"errors",
".",
"HTTP",
"{",
... |
1,372 | all-1373 | [
"OperationByUUID",
"returns",
"the",
"operation",
"with",
"the",
"given",
"UUID",
"."
] | [
"func",
"(",
"c",
"*",
"ClusterTx",
")",
"OperationByUUID",
"(",
"uuid",
"string",
")",
"(",
"Operation",
",",
"error",
")",
"{",
"null",
":=",
"Operation",
"{",
"}",
"\n",
"operations",
",",
"err",
":=",
"c",
".",
"operations",
"(",
"\"",
"\"",
",",... |
1,373 | all-1374 | [
"WriteError",
"logs",
"and",
"writes",
"the",
"given",
"Error",
"to",
"the",
"ResponseWriter",
"If",
"Error",
"is",
"an",
"etcdErr",
"it",
"is",
"rendered",
"to",
"the",
"ResponseWriter",
"Otherwise",
"it",
"is",
"assumed",
"to",
"be",
"a",
"StatusInternalServ... | [
"func",
"WriteError",
"(",
"lg",
"*",
"zap",
".",
"Logger",
",",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"err",
"error",
")",
"{",
"if",
"err",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n",
"switch",
"e",
":... |
1,374 | all-1375 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"StopTrackingHeapObjectsParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler1",
"(",
"&",
"w",
... |
1,375 | all-1376 | [
"URLPart",
"returns",
"a",
"part",
"of",
"the",
"url",
"and",
"caches",
"it",
"in",
"the",
"context"
] | [
"func",
"URLPart",
"(",
"ctx",
"context",
".",
"Context",
",",
"r",
"*",
"http",
".",
"Request",
",",
"i",
"int",
")",
"(",
"context",
".",
"Context",
",",
"string",
",",
"bool",
")",
"{",
"ctx",
",",
"parts",
":=",
"URLParts",
"(",
"ctx",
",",
"... |
1,376 | all-1377 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"Event",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice6",
"(",
"&",
"r... |
1,377 | all-1378 | [
"GetLog",
"returns",
"the",
"log",
"of",
"the",
"default",
"container",
"in",
"the",
"specified",
"pod",
"in",
"the",
"client",
"s",
"specified",
"namespace",
".",
"Analogous",
"to",
"kubectl",
"logs",
"pod",
"--",
"namespace",
"=",
"client",
".",
"namespace... | [
"func",
"(",
"c",
"*",
"Client",
")",
"GetLog",
"(",
"pod",
"string",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"c",
".",
"<mask>",
"(",
"\"",
"\"",
",",
"pod",
")",
"\n",
"return",
"c",
".",
"requestRetry",
"(",
"&",
"request",
"{",
... |
1,378 | all-1379 | [
"DeleteImage",
"deletes",
"the",
"named",
"image",
"from",
"the",
"registry",
"if",
"supported",
"."
] | [
"func",
"(",
"ref",
"archiveReference",
")",
"DeleteImage",
"(",
"ctx",
"<mask>",
".",
"Context",
",",
"sys",
"*",
"types",
".",
"SystemContext",
")",
"error",
"{",
"// Not really supported, for safety reasons.",
"return",
"errors",
".",
"New",
"(",
"\"",
"\"",
... |
1,379 | all-1380 | [
"GetName",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_widget_get_name",
"()",
".",
"A",
"non",
"-",
"nil",
"error",
"is",
"returned",
"in",
"the",
"case",
"that",
"gtk_widget_get_name",
"returns",
"NULL",
"to",
"differentiate",
"between",
"NULL",
"and",
"an",
... | [
"func",
"(",
"v",
"*",
"Widget",
")",
"GetName",
"(",
")",
"(",
"string",
",",
"error",
")",
"{",
"c",
":=",
"C",
".",
"gtk_widget_get_name",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
... |
1,380 | all-1381 | [
"reconcile",
"ensures",
"a",
"tekton",
"prowjob",
"has",
"a",
"corresponding",
"pipeline",
"updating",
"the",
"prowjob",
"s",
"status",
"as",
"the",
"pipeline",
"progresses",
"."
] | [
"func",
"reconcile",
"(",
"c",
"reconciler",
",",
"key",
"string",
")",
"error",
"{",
"logrus",
".",
"Debugf",
"(",
"\"",
"\\n",
"\"",
",",
"key",
")",
"\n\n",
"ctx",
",",
"namespace",
",",
"name",
",",
"err",
":=",
"fromKey",
"(",
"key",
")",
"\n"... |
1,381 | all-1382 | [
"clientConn",
"returns",
"a",
"loggingConn",
"at",
"the",
"oposite",
"end",
"of",
"the",
"loggingPipe",
"as",
"serverConn",
".",
"There",
"is",
"no",
"fundamental",
"difference",
"between",
"the",
"clientConn",
"and",
"the",
"serverConn",
"as",
"communication",
... | [
"func",
"(",
"p",
"*",
"loggingPipe",
")",
"clientConn",
"(",
")",
"*",
"loggingConn",
"{",
"return",
"&",
"loggingConn",
"{",
"<mask>",
":",
"p",
",",
"r",
":",
"p",
".",
"clientReader",
",",
"w",
":",
"p",
".",
"serverWriter",
",",
"}",
"\n",
"}"... |
1,382 | all-1383 | [
"HasCustomBgColor",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"d",
"*",
"DashboardConditionalFormat",
")",
"HasCustomBgColor",
"(",
")",
"bool",
"{",
"if",
"d",
"!=",
"nil",
"&&",
"d",
".",
"CustomBgColor",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
1,383 | all-1384 | [
"Token",
"generates",
"a",
"base",
"-",
"64",
"string",
"of",
"random",
"bytes",
"with",
"length",
"as",
"specified",
"by",
"size",
"parameter",
"."
] | [
"func",
"(",
"self",
"*",
"Salter",
")",
"Token",
"(",
"size",
"int",
")",
"string",
"{",
"return",
"base64",
".",
"URLEncoding",
".",
"EncodeToString",
"(",
"<mask>",
".",
"BToken",
"(",
"size",
")",
")",
"\n",
"}"
] |
1,384 | all-1385 | [
"hostVSwitchFromName",
"locates",
"a",
"virtual",
"switch",
"on",
"the",
"supplied",
"HostNetworkSystem",
"by",
"name",
"."
] | [
"func",
"hostVSwitchFromName",
"(",
"client",
"*",
"govmomi",
".",
"Client",
",",
"<mask>",
"*",
"object",
".",
"HostNetworkSystem",
",",
"name",
"string",
")",
"(",
"*",
"types",
".",
"HostVirtualSwitch",
",",
"error",
")",
"{",
"var",
"mns",
"mo",
".",
... |
1,385 | all-1386 | [
"set",
"the",
"viewport"
] | [
"func",
"Viewport",
"(",
"x",
"int32",
",",
"y",
"int32",
",",
"width",
"int32",
",",
"height",
"int32",
")",
"{",
"C",
".",
"glowViewport",
"(",
"gpViewport",
",",
"(",
"C",
".",
"GLint",
")",
"(",
"x",
")",
",",
"(",
"C",
".",
"GLint",
")",
"... |
1,386 | all-1387 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetApplicationCacheForFrameParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache6",
"(",
"&",
... |
1,387 | all-1388 | [
"VerifyMessageConsumer",
"is",
"a",
"test",
"convience",
"function",
"for",
"VerifyMessageConsumerRaw",
"accepting",
"an",
"instance",
"of",
"*",
"testing",
".",
"T"
] | [
"func",
"(",
"p",
"*",
"Pact",
")",
"VerifyMessageConsumer",
"(",
"t",
"*",
"testing",
".",
"T",
",",
"message",
"*",
"<mask>",
",",
"handler",
"MessageConsumer",
")",
"error",
"{",
"err",
":=",
"p",
".",
"VerifyMessageConsumerRaw",
"(",
"message",
",",
... |
1,388 | all-1389 | [
"add",
"adds",
"new",
"route",
"to",
"route",
"tree",
"map",
"."
] | [
"func",
"(",
"rm",
"*",
"routeMap",
")",
"add",
"(",
"method",
",",
"pattern",
"string",
",",
"leaf",
"*",
"Leaf",
")",
"{",
"rm",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"rm",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n\n",
"rm",
".",... |
1,389 | all-1390 | [
"NewNodeReaderFilter",
"创建节点过滤器,实现敏感词的过滤",
"从可读流中读取敏感词数据",
"(",
"以指定的分隔符读取数据",
")"
] | [
"func",
"NewNodeReaderFilter",
"(",
"rd",
"io",
".",
"Reader",
",",
"delim",
"<mask>",
")",
"DirtyFilter",
"{",
"nf",
":=",
"&",
"nodeFilter",
"{",
"root",
":",
"newNode",
"(",
")",
",",
"}",
"\n",
"buf",
":=",
"new",
"(",
"bytes",
".",
"Buffer",
")"... |
1,390 | all-1391 | [
"GetMustShowErrorsOk",
"returns",
"a",
"tuple",
"with",
"the",
"MustShowErrors",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"Widget",
")",
"GetMustShowErrorsOk",
"(",
")",
"(",
"bool",
",",
"bool",
")",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"MustShowErrors",
"==",
"nil",
"{",
"return",
"false",
",",
"<mask>",
"\n",
"}",
"\n",
"return",
"*",... |
1,391 | all-1392 | [
"MarshalEasyJSON",
"writes",
"the",
"UUID",
"to",
"a",
"easyjson",
".",
"Writer"
] | [
"func",
"(",
"u",
"UUID",
")",
"MarshalEasyJSON",
"(",
"w",
"*",
"jwriter",
".",
"Writer",
")",
"{",
"w",
".",
"<mask>",
"(",
"string",
"(",
"u",
")",
")",
"\n",
"}"
] |
1,392 | all-1393 | [
"StartUnixListener",
"starts",
"up",
"a",
"unix",
"domain",
"socket",
"listener",
"for",
"reconnects",
"to",
"be",
"sent",
"through"
] | [
"func",
"(",
"irc",
"*",
"Bot",
")",
"StartUnixListener",
"(",
")",
"{",
"unaddr",
",",
"err",
":=",
"net",
".",
"ResolveUnixAddr",
"(",
"\"",
"\"",
",",
"irc",
".",
"unixastr",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"panic",
"(",
"err",
")",
... |
1,393 | all-1394 | [
"platformHostConfigOverride",
"to",
"override",
"platform",
"specific",
"feature",
"sets"
] | [
"func",
"(",
"<mask>",
"*",
"Task",
")",
"platformHostConfigOverride",
"(",
"hostConfig",
"*",
"dockercontainer",
".",
"HostConfig",
")",
"error",
"{",
"// Override cgroup parent",
"return",
"task",
".",
"overrideCgroupParent",
"(",
"hostConfig",
")",
"\n",
"}"
] |
1,394 | all-1395 | [
"CandidServer",
"returns",
"all",
"the",
"Candid",
"settings",
"needed",
"to",
"connect",
"to",
"a",
"server",
"."
] | [
"func",
"(",
"c",
"*",
"Config",
")",
"CandidServer",
"(",
")",
"(",
"string",
",",
"<mask>",
",",
"int64",
",",
"string",
")",
"{",
"return",
"c",
".",
"m",
".",
"GetString",
"(",
"\"",
"\"",
")",
",",
"c",
".",
"m",
".",
"GetString",
"(",
"\"... |
1,395 | all-1396 | [
"sendSymlink",
"sends",
"a",
"symlink",
"into",
"the",
"tar",
"stream",
"."
] | [
"func",
"(",
"d",
"*",
"Destination",
")",
"sendSymlink",
"(",
"path",
"string",
",",
"target",
"string",
")",
"error",
"{",
"hdr",
",",
"err",
":=",
"<mask>",
".",
"FileInfoHeader",
"(",
"&",
"tarFI",
"{",
"path",
":",
"path",
",",
"size",
":",
"0",... |
1,396 | all-1397 | [
"WriteGzipLevel",
"writes",
"response",
"with",
"gzipped",
"body",
"to",
"w",
".",
"Level",
"is",
"the",
"desired",
"compression",
"level",
":",
"*",
"CompressNoCompression",
"*",
"CompressBestSpeed",
"*",
"CompressBestCompression",
"*",
"CompressDefaultCompression",
... | [
"func",
"(",
"resp",
"*",
"Response",
")",
"WriteGzipLevel",
"(",
"w",
"*",
"bufio",
".",
"Writer",
",",
"<mask>",
"int",
")",
"error",
"{",
"if",
"err",
":=",
"resp",
".",
"gzipBody",
"(",
"level",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"err... |
1,397 | all-1398 | [
"CopyTo",
"copies",
"resp",
"contents",
"to",
"dst",
"except",
"of",
"body",
"stream",
"."
] | [
"func",
"(",
"resp",
"*",
"Response",
")",
"CopyTo",
"(",
"dst",
"*",
"Response",
")",
"{",
"resp",
".",
"copyToSkipBody",
"(",
"dst",
")",
"\n",
"if",
"resp",
".",
"bodyRaw",
"!=",
"nil",
"{",
"dst",
".",
"bodyRaw",
"=",
"resp",
".",
"bodyRaw",
"\... |
1,398 | all-1399 | [
"Head",
"adds",
"the",
"route",
"pattern",
"that",
"matches",
"a",
"HEAD",
"http",
"method",
"to",
"execute",
"the",
"handlerFn",
"http",
".",
"HandlerFunc",
"."
] | [
"func",
"(",
"mx",
"*",
"Mux",
")",
"Head",
"(",
"<mask>",
"string",
",",
"handlerFn",
"http",
".",
"HandlerFunc",
")",
"{",
"mx",
".",
"handle",
"(",
"mHEAD",
",",
"pattern",
",",
"handlerFn",
")",
"\n",
"}"
] |
1,399 | all-1400 | [
"getAWSKeys",
"gets",
"the",
"AWS",
"Keys",
"from",
"environment",
"variables",
"or",
"the",
"instance",
"-",
"based",
"metadata",
"on",
"EC2",
"Environment",
"variables",
"are",
"attempted",
"first",
"followed",
"by",
"the",
"instance",
"-",
"based",
"credentia... | [
"func",
"getAWSKeys",
"(",
")",
"(",
"<mask>",
"s3gof3r",
".",
"Keys",
",",
"err",
"error",
")",
"{",
"keys",
",",
"err",
"=",
"s3gof3r",
".",
"EnvKeys",
"(",
")",
"\n",
"if",
"err",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n",
"keys",
",",
"err"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.