id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
6,300 | all-6301 | [
"SavedRestSessionOrNew",
"either",
"loads",
"a",
"saved",
"REST",
"session",
"from",
"disk",
"or",
"creates",
"a",
"new",
"one",
"."
] | [
"func",
"(",
"c",
"*",
"Config",
")",
"SavedRestSessionOrNew",
"(",
"u",
"*",
"url",
".",
"URL",
")",
"(",
"*",
"tags",
".",
"RestClient",
",",
"error",
")",
"{",
"ctx",
",",
"cancel",
":=",
"context",
".",
"WithTimeout",
"(",
"context",
".",
"Backgr... |
6,301 | all-6302 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"ReleaseObjectGroupParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime11",
"(",
"&",
"w",
",",
"v"... |
6,302 | all-6303 | [
"UnmarshalText",
"validates",
"the",
"text",
"is",
"a",
"valid",
"string"
] | [
"func",
"(",
"l",
"*",
"RepoPermissionLevel",
")",
"UnmarshalText",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"v",
":=",
"RepoPermissionLevel",
"(",
"text",
")",
"\n",
"if",
"_",
",",
"ok",
":=",
"repoPermissionLevels",
"[",
"v",
"]",
";",
"!... |
6,303 | all-6304 | [
"Close",
"closes",
"the",
"underlying",
"connection",
"."
] | [
"func",
"(",
"cs",
"*",
"clientServer",
")",
"Close",
"(",
")",
"error",
"{",
"if",
"cs",
".",
"publishTicker",
"!=",
"nil",
"{",
"cs",
".",
"publishTicker",
".",
"Stop",
"(",
")",
"\n",
"}",
"\n",
"if",
"cs",
".",
"publishHealthTicker",
"!=",
"nil",... |
6,304 | all-6305 | [
"Execute",
"-",
"enables",
"/",
"disables",
"service",
"access"
] | [
"func",
"(",
"c",
"*",
"ServiceAccessCommand",
")",
"Execute",
"(",
"[",
"]",
"string",
")",
"error",
"{",
"var",
"cfMgmt",
"*",
"CFMgmt",
"\n",
"<mask>",
"err",
"error",
"\n",
"if",
"cfMgmt",
",",
"err",
"=",
"InitializePeekManagers",
"(",
"c",
".",
"... |
6,305 | all-6306 | [
"Bucket",
"retrieves",
"a",
"nested",
"bucket",
"by",
"name",
".",
"Returns",
"nil",
"if",
"the",
"bucket",
"does",
"not",
"exist",
".",
"The",
"bucket",
"instance",
"is",
"only",
"valid",
"for",
"the",
"lifetime",
"of",
"the",
"transaction",
".",
"folders... | [
"func",
"(",
"b",
"Bucket",
")",
"OpenBucket",
"(",
"folders",
"[",
"]",
"[",
"]",
"byte",
",",
"f",
"func",
"(",
"Bucket",
")",
"error",
")",
"error",
"{",
"bb",
":=",
"b",
".",
"Bucket",
"\n",
"for",
"_",
",",
"fld",
":=",
"<mask>",
"folders",
... |
6,306 | all-6307 | [
"Routes",
"calculates",
"the",
"routing",
"table",
"from",
"this",
"peer",
"to",
"all",
"peers",
"reachable",
"from",
"it",
"returning",
"a",
"next",
"hop",
"map",
"of",
"PeerNameX",
"-",
">",
"PeerNameY",
"which",
"says",
"in",
"order",
"to",
"send",
"a",... | [
"func",
"(",
"<mask>",
"*",
"Peer",
")",
"routes",
"(",
"stopAt",
"*",
"Peer",
",",
"establishedAndSymmetric",
"bool",
")",
"(",
"bool",
",",
"map",
"[",
"PeerName",
"]",
"PeerName",
")",
"{",
"routes",
":=",
"make",
"(",
"unicastRoutes",
")",
"\n",
"r... |
6,307 | all-6308 | [
"GetPrecisionOk",
"returns",
"a",
"tuple",
"with",
"the",
"Precision",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"a",
"*",
"AlertValueDefinition",
")",
"GetPrecisionOk",
"(",
")",
"(",
"int",
",",
"bool",
")",
"{",
"if",
"a",
"==",
"nil",
"||",
"a",
".",
"Precision",
"==",
"nil",
"{",
"return",
"0",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
... |
6,308 | all-6309 | [
"LuaToGo",
"converts",
"the",
"Lua",
"value",
"at",
"index",
"idx",
"to",
"the",
"Go",
"value",
".",
"The",
"Go",
"value",
"must",
"be",
"a",
"non",
"-",
"nil",
"pointer",
".",
"Conversions",
"to",
"strings",
"and",
"numbers",
"are",
"straightforward",
"... | [
"func",
"LuaToGo",
"(",
"L",
"*",
"lua",
".",
"State",
",",
"idx",
"int",
",",
"a",
"interface",
"{",
"}",
")",
"error",
"{",
"// LuaToGo should not pop the Lua stack to be consistent with L.ToString(), etc.",
"// It is also easier in practice when we want to keep working wit... |
6,309 | all-6310 | [
"UpdateLabel",
"provides",
"a",
"wrapper",
"around",
"the",
"UpdateLabel",
"data",
"objects"
] | [
"func",
"UpdateLabel",
"(",
"ctx",
"context",
".",
"Context",
",",
"m",
"*",
"license",
".",
"<mask>",
",",
"licenseKey",
"string",
",",
"key",
"string",
",",
"val",
"string",
")",
"error",
"{",
"req",
":=",
"types",
".",
"UpdateLicenseLabel",
"{",
"This... |
6,310 | all-6311 | [
"String",
"returns",
"the",
"name",
"of",
"e"
] | [
"func",
"(",
"e",
"OperationResultCode",
")",
"<mask>",
"(",
")",
"string",
"{",
"name",
",",
"_",
":=",
"operationResultCodeMap",
"[",
"int32",
"(",
"e",
")",
"]",
"\n",
"return",
"name",
"\n",
"}"
] |
6,311 | all-6312 | [
"ListPrefix",
"returns",
"keys",
"(",
"and",
"values",
")",
"that",
"begin",
"with",
"prefix",
"f",
"will",
"be",
"called",
"with",
"each",
"key",
"val",
"will",
"contain",
"the",
"value",
"for",
"the",
"key",
".",
"You",
"can",
"break",
"out",
"of",
"... | [
"func",
"(",
"c",
"*",
"readonlyCollection",
")",
"ListPrefix",
"(",
"prefix",
"string",
",",
"val",
"proto",
".",
"Message",
",",
"opts",
"*",
"Options",
",",
"f",
"func",
"(",
"string",
")",
"error",
")",
"error",
"{",
"queryPrefix",
":=",
"c",
".",
... |
6,312 | all-6313 | [
"Match",
"checks",
"whether",
"a",
"domain",
"can",
"be",
"found",
"in",
"the",
"DomainFilter",
"."
] | [
"func",
"(",
"df",
"DomainFilter",
")",
"Match",
"(",
"domain",
"string",
")",
"bool",
"{",
"// return always true, if not filter is specified",
"if",
"len",
"(",
"df",
".",
"filters",
")",
"==",
"0",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"for",
"_",
"... |
6,313 | all-6314 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetOuterHTMLParams",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom37",
"(",
"&",
"r... |
6,314 | all-6315 | [
"cond",
"emits",
"to",
"fn",
"code",
"to",
"evaluate",
"boolean",
"condition",
"e",
"and",
"jump",
"to",
"t",
"or",
"f",
"depending",
"on",
"its",
"value",
"performing",
"various",
"simplifications",
".",
"Postcondition",
":",
"fn",
".",
"currentBlock",
"is"... | [
"func",
"(",
"b",
"*",
"builder",
")",
"cond",
"(",
"fn",
"*",
"Function",
",",
"e",
"ast",
".",
"Expr",
",",
"t",
",",
"f",
"*",
"BasicBlock",
")",
"{",
"switch",
"e",
":=",
"e",
".",
"(",
"type",
")",
"{",
"case",
"*",
"ast",
".",
"ParenExp... |
6,315 | all-6316 | [
"Release",
"deletes",
"the",
"barrier",
"key",
"to",
"unblock",
"all",
"waiting",
"processes",
"."
] | [
"func",
"(",
"b",
"*",
"Barrier",
")",
"Release",
"(",
")",
"error",
"{",
"_",
",",
"err",
":=",
"b",
".",
"<mask>",
".",
"Delete",
"(",
"b",
".",
"ctx",
",",
"b",
".",
"key",
")",
"\n",
"return",
"err",
"\n",
"}"
] |
6,316 | all-6317 | [
"Do",
"executes",
"Profiler",
".",
"stopTypeProfile",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"StopTypeProfileParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandStopTypeProfile",
",",
"nil",
",",
"nil",
")",
"\n",
"}"
] |
6,317 | all-6318 | [
"Do",
"executes",
"DOM",
".",
"requestChildNodes",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"RequestChildNodesParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandRequestChildNodes",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
6,318 | all-6319 | [
"FindItems",
"finds",
"VIX",
"objects",
".",
"For",
"example",
"when",
"used",
"to",
"find",
"all",
"running",
"virtual",
"machines",
"Host",
".",
"FindItems",
"()",
"returns",
"a",
"series",
"of",
"virtual",
"machine",
"file",
"path",
"names",
"."
] | [
"func",
"(",
"h",
"*",
"Host",
")",
"FindItems",
"(",
"options",
"SearchType",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"var",
"jobHandle",
"C",
".",
"VixHandle",
"=",
"C",
".",
"VIX_INVALID_HANDLE",
"\n",
"<mask>",
"err",
"C",
".",
"Vix... |
6,319 | all-6320 | [
"ListLocations",
"returns",
"location",
"collection",
"data"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"ListLocations",
"(",
")",
"(",
"*",
"Locations",
",",
"error",
")",
"{",
"<mask>",
":=",
"locationColPath",
"(",
")",
"+",
"`?depth=`",
"+",
"c",
".",
"client",
".",
"depth",
"+",
"`&pretty=`",
"+",
"strconv",
"... |
6,320 | all-6321 | [
"clean",
"canonicalizes",
"path",
"for",
"internal",
"use",
":",
"leading",
"slash",
"and",
"no",
"trailing",
"slash",
".",
"Also",
"clean",
"the",
"result",
"with",
"internalDefault",
"."
] | [
"func",
"clean",
"(",
"p",
"string",
")",
"string",
"{",
"if",
"!",
"strings",
".",
"HasPrefix",
"(",
"p",
",",
"\"",
"\"",
")",
"{",
"p",
"=",
"\"",
"\"",
"+",
"p",
"\n",
"}",
"\n",
"return",
"internalDefault",
"(",
"<mask>",
".",
"Clean",
"(",
... |
6,321 | all-6322 | [
"NewTaskStateChangeEvent",
"creates",
"a",
"new",
"task",
"state",
"change",
"event"
] | [
"func",
"NewTaskStateChangeEvent",
"(",
"task",
"*",
"apitask",
".",
"Task",
",",
"reason",
"string",
")",
"(",
"TaskStateChange",
",",
"error",
")",
"{",
"var",
"event",
"TaskStateChange",
"\n",
"taskKnownStatus",
":=",
"task",
".",
"GetKnownStatus",
"(",
")"... |
6,322 | all-6323 | [
"UpdateIntegrationPD",
"updates",
"the",
"PagerDuty",
"Integration",
".",
"This",
"will",
"replace",
"the",
"existing",
"values",
"with",
"the",
"new",
"values",
"."
] | [
"func",
"(",
"client",
"*",
"<mask>",
")",
"UpdateIntegrationPD",
"(",
"pdIntegration",
"*",
"IntegrationPDRequest",
")",
"error",
"{",
"return",
"client",
".",
"doJsonRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"pdIntegration",
",",
"nil",
")",
"\n",
... |
6,323 | all-6324 | [
"Returns",
"an",
"slice",
"of",
"Typed",
"helpers",
"or",
"a",
"nil",
"slice"
] | [
"func",
"(",
"t",
"Typed",
")",
"Objects",
"(",
"key",
"string",
")",
"[",
"]",
"Typed",
"{",
"value",
",",
"_",
":=",
"t",
".",
"ObjectsIf",
"(",
"<mask>",
")",
"\n",
"return",
"value",
"\n",
"}"
] |
6,324 | all-6325 | [
"DeepCopy",
"is",
"an",
"autogenerated",
"deepcopy",
"function",
"copying",
"the",
"receiver",
"creating",
"a",
"new",
"ProwJobStatus",
"."
] | [
"func",
"(",
"in",
"*",
"ProwJobStatus",
")",
"DeepCopy",
"(",
")",
"*",
"ProwJobStatus",
"{",
"if",
"in",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"out",
":=",
"<mask>",
"(",
"ProwJobStatus",
")",
"\n",
"in",
".",
"DeepCopyInto",
"(",
"ou... |
6,325 | all-6326 | [
"title",
":",
"template",
"destroy",
"path",
":",
"/",
"iaas",
"/",
"templates",
"/",
"{",
"template_name",
"}",
"method",
":",
"DELETE",
"responses",
":",
"200",
":",
"OK",
"401",
":",
"Unauthorized",
"404",
":",
"Not",
"found"
] | [
"func",
"templateDestroy",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"token",
"auth",
".",
"Token",
")",
"(",
"err",
"error",
")",
"{",
"templateName",
":=",
"r",
".",
"URL",
".",
"Query",
"(",
")",
".",
"... |
6,326 | all-6327 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"AttachToBrowserTargetReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget30",
"(",
"&",
"w",
",",
... |
6,327 | all-6328 | [
"Do",
"executes",
"Page",
".",
"navigate",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"frameID",
"-",
"Frame",
"id",
"that",
"has",
"navigated",
"(",
"or",
"failed",
"to",
"navigate",
")",
"loaderID",
"-",
"Loader",
"identifier",
".",
"e... | [
"func",
"(",
"p",
"*",
"NavigateParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"frameID",
"cdp",
".",
"FrameID",
",",
"loaderID",
"cdp",
".",
"LoaderID",
",",
"errorText",
"string",
",",
"err",
"error",
")",
"{",
"// execute",
"va... |
6,328 | all-6329 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"FontSizes",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage48",
"(",
"&",
"r",
","... |
6,329 | all-6330 | [
"native",
"returns",
"a",
"pointer",
"to",
"the",
"underlying",
"GtkAccelMap",
"."
] | [
"func",
"(",
"v",
"*",
"AccelMap",
")",
"native",
"(",
")",
"*",
"C",
".",
"GtkAccelMap",
"{",
"if",
"v",
"==",
"nil",
"||",
"v",
".",
"GObject",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"p",
":=",
"unsafe",
".",
"Pointer",
"(",
"v",... |
6,330 | all-6331 | [
"currentAlerts",
"returns",
"all",
"instances",
"of",
"alerts",
"for",
"this",
"rule",
".",
"This",
"may",
"include",
"inactive",
"alerts",
"that",
"were",
"previously",
"firing",
"."
] | [
"func",
"(",
"r",
"*",
"AlertingRule",
")",
"currentAlerts",
"(",
")",
"[",
"]",
"*",
"Alert",
"{",
"r",
".",
"mtx",
".",
"Lock",
"(",
")",
"\n",
"defer",
"r",
".",
"mtx",
".",
"Unlock",
"(",
")",
"\n\n",
"alerts",
":=",
"make",
"(",
"[",
"]",
... |
6,331 | all-6332 | [
"GetTypeOk",
"returns",
"a",
"tuple",
"with",
"the",
"Type",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"n",
"*",
"NoteDefinition",
")",
"GetTypeOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"n",
"==",
"nil",
"||",
"n",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
"... |
6,332 | all-6333 | [
"stmt",
"lowers",
"statement",
"s",
"to",
"SSA",
"form",
"emitting",
"code",
"to",
"fn",
"."
] | [
"func",
"(",
"b",
"*",
"builder",
")",
"stmt",
"(",
"fn",
"*",
"Function",
",",
"_s",
"ast",
".",
"Stmt",
")",
"{",
"// The label of the current statement. If non-nil, its _goto",
"// target is always set; its _break and _continue are set only",
"// within the body of switch... |
6,333 | all-6334 | [
"******",
"matrix",
"iterator",
":",
"used",
"for",
"n",
"-",
"ary",
"operations",
"on",
"dense",
"arrays",
"********",
"P290",
"/",
"*",
"Returns",
"width",
"and",
"height",
"of",
"array",
"in",
"elements"
] | [
"func",
"GetSizeWidth",
"(",
"img",
"*",
"IplImage",
")",
"int",
"{",
"size",
":=",
"C",
".",
"cvGetSize",
"(",
"unsafe",
".",
"Pointer",
"(",
"img",
")",
")",
"\n",
"w",
":=",
"int",
"(",
"size",
".",
"<mask>",
")",
"\n",
"return",
"w",
"\n",
"}... |
6,334 | all-6335 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"EventLastSeenObjectID",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler17",
"(",
"&",
"w",
",",
"... |
6,335 | all-6336 | [
"DupSecOpt",
"takes",
"an",
"SELinux",
"process",
"label",
"and",
"returns",
"security",
"options",
"that",
"can",
"will",
"set",
"the",
"SELinux",
"Type",
"and",
"Level",
"for",
"future",
"container",
"processes"
] | [
"func",
"DupSecOpt",
"(",
"src",
"string",
")",
"[",
"]",
"string",
"{",
"if",
"src",
"==",
"\"",
"\"",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"con",
":=",
"NewContext",
"(",
"src",
")",
"\n",
"if",
"con",
"[",
"\"",
"\"",
"]",
"==",
"\"",
"\""... |
6,336 | all-6337 | [
"Visible",
"returns",
"true",
"if",
"all",
"of",
"the",
"elements",
"that",
"the",
"selection",
"refers",
"to",
"are",
"visible",
"."
] | [
"func",
"(",
"s",
"*",
"Selection",
")",
"Visible",
"(",
")",
"(",
"bool",
",",
"error",
")",
"{",
"return",
"s",
".",
"hasState",
"(",
"<mask>",
".",
"Element",
".",
"IsDisplayed",
",",
"\"",
"\"",
")",
"\n",
"}"
] |
6,337 | all-6338 | [
"Subscribers",
"returns",
"a",
"list",
"of",
"subscriber",
"of",
"a",
"mailing",
"list",
"."
] | [
"func",
"(",
"ml",
"*",
"MailingList",
")",
"Subscribers",
"(",
")",
"(",
"[",
"]",
"*",
"Subscriber",
",",
"error",
")",
"{",
"var",
"res",
"readSubscribersResponse",
"\n",
"err",
":=",
"ml",
".",
"Domain",
".",
"cgp",
".",
"request",
"(",
"readSubscr... |
6,338 | all-6339 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetStyleSheetTextReturns",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss35",
"(",
"&"... |
6,339 | all-6340 | [
"Returns",
"paste",
"link",
"string",
"and",
"nil",
"if",
"everything",
"is",
"ok"
] | [
"func",
"(",
"api",
"*",
"API",
")",
"SendPaste",
"(",
"paste",
"Paste",
")",
"(",
"string",
",",
"error",
")",
"{",
"if",
"paste",
".",
"UserKey",
"==",
"\"",
"\"",
"&&",
"paste",
".",
"Privacy",
"==",
"\"",
"\"",
"{",
"return",
"\"",
"\"",
",",... |
6,340 | all-6341 | [
"Stop",
"closes",
"all",
"idle",
"connections",
"for",
"any",
"attached",
"clients",
"."
] | [
"func",
"(",
"c",
"*",
"ClientSet",
")",
"Stop",
"(",
")",
"{",
"c",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"Unlock",
"(",
")",
"\n\n",
"if",
"c",
".",
"consul",
"!=",
"nil",
"{",
"c",
".",
"consul",
".",
"transport",
".",
"CloseIdleCo... |
6,341 | all-6342 | [
"HasTitleAlign",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"c",
"*",
"ChangeDefinition",
")",
"HasTitleAlign",
"(",
")",
"bool",
"{",
"if",
"c",
"!=",
"nil",
"&&",
"c",
".",
"TitleAlign",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
6,342 | all-6343 | [
"UnmarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Unmarshaler",
"."
] | [
"func",
"(",
"t",
"*",
"MixedContentType",
")",
"UnmarshalEasyJSON",
"(",
"in",
"*",
"jlexer",
".",
"Lexer",
")",
"{",
"switch",
"MixedContentType",
"(",
"in",
".",
"<mask>",
"(",
")",
")",
"{",
"case",
"MixedContentTypeBlockable",
":",
"*",
"t",
"=",
"M... |
6,343 | all-6344 | [
"executeLF",
"executes",
"a",
"LF",
"without",
"a",
"CR",
"."
] | [
"func",
"(",
"h",
"*",
"windowsAnsiEventHandler",
")",
"executeLF",
"(",
")",
"error",
"{",
"handled",
",",
"err",
":=",
"h",
".",
"simulateLF",
"(",
"false",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"if",
"!",
"h... |
6,344 | all-6345 | [
"New",
"creates",
"a",
"new",
"instance",
"of",
"Server",
"."
] | [
"func",
"New",
"(",
"handler",
"http",
".",
"Handler",
",",
"opts",
"...",
"Option",
")",
"(",
"s",
"*",
"Server",
")",
"{",
"o",
":=",
"&",
"Options",
"{",
"}",
"\n",
"for",
"_",
",",
"opt",
":=",
"range",
"opts",
"{",
"opt",
"(",
"o",
")",
... |
6,345 | all-6346 | [
"Delete",
"the",
"Application",
"with",
"the",
"given",
"sid",
".",
"If",
"the",
"Application",
"has",
"already",
"been",
"deleted",
"or",
"does",
"not",
"exist",
"Delete",
"returns",
"nil",
".",
"If",
"another",
"error",
"or",
"a",
"timeout",
"occurs",
"t... | [
"func",
"(",
"r",
"*",
"ApplicationService",
")",
"Delete",
"(",
"ctx",
"context",
".",
"Context",
",",
"sid",
"string",
")",
"error",
"{",
"return",
"r",
".",
"<mask>",
".",
"DeleteResource",
"(",
"ctx",
",",
"applicationPathPart",
",",
"sid",
")",
"\n"... |
6,346 | all-6347 | [
"ToMap",
"converts",
"a",
"UserData",
"to",
"UserDataMap"
] | [
"func",
"(",
"ud",
"*",
"UserData",
")",
"ToMap",
"(",
")",
"UserDataMap",
"{",
"m",
":=",
"UserDataMap",
"{",
"}",
"\n",
"ud",
".",
"Range",
"(",
"func",
"(",
"<mask>",
",",
"value",
"interface",
"{",
"}",
")",
"bool",
"{",
"m",
"[",
"key",
".",... |
6,347 | all-6348 | [
"NewCluster",
"returns",
"an",
"unlaunched",
"cluster",
"of",
"the",
"given",
"size",
"which",
"has",
"been",
"set",
"to",
"use",
"static",
"bootstrap",
"."
] | [
"func",
"NewCluster",
"(",
"t",
"testing",
".",
"TB",
",",
"size",
"int",
")",
"*",
"cluster",
"{",
"return",
"newCluster",
"(",
"t",
",",
"&",
"ClusterConfig",
"{",
"Size",
":",
"<mask>",
"}",
")",
"\n",
"}"
] |
6,348 | all-6349 | [
"Append",
"appends",
"an",
"op",
"code",
"to",
"the",
"current",
"list",
"of",
"op",
"codes",
"."
] | [
"func",
"(",
"b",
"*",
"ByteCode",
")",
"Append",
"(",
"op",
"Op",
")",
"{",
"b",
".",
"OpList",
"=",
"<mask>",
"(",
"b",
".",
"OpList",
",",
"op",
")",
"\n",
"}"
] |
6,349 | all-6350 | [
"NewWatchServer",
"returns",
"a",
"new",
"watch",
"server",
"."
] | [
"func",
"NewWatchServer",
"(",
"s",
"*",
"etcdserver",
".",
"EtcdServer",
")",
"pb",
".",
"WatchServer",
"{",
"return",
"&",
"watchServer",
"{",
"lg",
":",
"s",
".",
"Cfg",
".",
"Logger",
",",
"clusterID",
":",
"int64",
"(",
"s",
".",
"Cluster",
"(",
... |
6,350 | all-6351 | [
"AddChildInWindow",
"is",
"a",
"wrapper",
"around",
"gtk_text_view_add_child_in_window",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"TextView",
")",
"AddChildInWindow",
"(",
"<mask>",
"IWidget",
",",
"tp",
"TextWindowType",
",",
"xpos",
",",
"ypos",
"int",
")",
"{",
"C",
".",
"gtk_text_view_add_child_in_window",
"(",
"v",
".",
"native",
"(",
")",
",",
"child",
... |
6,351 | all-6352 | [
"LoadFromData",
"is",
"a",
"wrapper",
"around",
"gtk_css_provider_load_from_data",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"CssProvider",
")",
"LoadFromData",
"(",
"data",
"string",
")",
"error",
"{",
"cdata",
":=",
"C",
".",
"CString",
"(",
"data",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"(",
"cdata",
")",
")",
"\n",... |
6,352 | all-6353 | [
"ChGPasswd",
"updates",
"group",
"passwd",
".",
"The",
"passwd",
"must",
"be",
"supplied",
"in",
"clear",
"-",
"text",
"."
] | [
"func",
"ChGPasswd",
"(",
"group",
"string",
",",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"gshadow",
",",
"err",
":=",
"LookupGShadow",
"(",
"group",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"gshadow",
".",
... |
6,353 | all-6354 | [
"NewData",
"returns",
"a",
"new",
"memory",
"based",
"data",
"buffer"
] | [
"func",
"NewData",
"(",
")",
"(",
"*",
"Data",
",",
"<mask>",
")",
"{",
"d",
":=",
"newData",
"(",
")",
"\n",
"return",
"d",
",",
"handleError",
"(",
"C",
".",
"gpgme_data_new",
"(",
"&",
"d",
".",
"dh",
")",
")",
"\n",
"}"
] |
6,354 | all-6355 | [
"ThemeNames",
"returns",
"the",
"list",
"of",
"short",
"theme",
"names",
"(",
"file",
"names",
")"
] | [
"func",
"ThemeNames",
"(",
")",
"[",
"]",
"string",
"{",
"var",
"str",
"[",
"]",
"string",
"\n",
"str",
"=",
"append",
"(",
"str",
",",
"defaultTheme",
")",
"\n\n",
"path",
":=",
"themeManager",
".",
"themePath",
"\n",
"if",
"path",
"==",
"\"",
"\"",... |
6,355 | all-6356 | [
"writeHeaders",
"is",
"a",
"helper",
"function",
"that",
"writes",
"the",
"given",
"HTTP",
"headers",
"to",
"the",
"given",
"buffer",
"as",
"human",
"readable",
"strings",
".",
"If",
"DumpFormat",
"is",
"not",
"Verbose",
"then",
"writeHeaders",
"filters",
"out... | [
"func",
"(",
"d",
"*",
"dumpClient",
")",
"writeHeaders",
"(",
"buffer",
"*",
"bytes",
".",
"Buffer",
",",
"headers",
"http",
".",
"Header",
")",
"{",
"filterHeaders",
"(",
"d",
".",
"dumpFormat",
"(",
")",
",",
"d",
".",
"hiddenHeaders",
"(",
")",
"... |
6,356 | all-6357 | [
"title",
":",
"node",
"container",
"update",
"path",
":",
"/",
"docker",
"/",
"nodecontainers",
"/",
"{",
"name",
"}",
"method",
":",
"POST",
"consume",
":",
"application",
"/",
"x",
"-",
"www",
"-",
"form",
"-",
"urlencoded",
"responses",
":",
"200",
... | [
"func",
"nodeContainerUpdate",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"(",
"err",
"error",
")",
"{",
"var",
"config",
"nodecontainer",
".",
"NodeContainerConfig",
"\n",
"err",
... |
6,357 | all-6358 | [
"Getdowntime",
"retrieves",
"an",
"downtime",
"by",
"identifier",
"."
] | [
"func",
"(",
"client",
"*",
"Client",
")",
"GetDowntime",
"(",
"id",
"int",
")",
"(",
"*",
"Downtime",
",",
"error",
")",
"{",
"var",
"out",
"Downtime",
"\n",
"if",
"err",
":=",
"client",
".",
"doJsonRequest",
"(",
"\"",
"\"",
",",
"fmt",
".",
"Spr... |
6,358 | all-6359 | [
"BuildNS",
"resolves",
"all",
"the",
"namespace",
"nodes",
"of",
"the",
"element",
"and",
"returns",
"them"
] | [
"func",
"BuildNS",
"(",
"t",
"Elem",
")",
"(",
"ret",
"[",
"]",
"NS",
")",
"{",
"vals",
":=",
"make",
"(",
"map",
"[",
"xml",
".",
"Name",
"]",
"string",
")",
"\n\n",
"if",
"nselem",
",",
"ok",
":=",
"t",
".",
"(",
"NSElem",
")",
";",
"ok",
... |
6,359 | all-6360 | [
"RunGroup",
"runs",
"a",
"parse",
".",
"Group",
".",
"Consider",
"RunFile",
"instead",
"."
] | [
"func",
"(",
"r",
"*",
"<mask>",
")",
"RunGroup",
"(",
"groups",
"...",
"*",
"parse",
".",
"Group",
")",
"{",
"for",
"_",
",",
"group",
":=",
"range",
"groups",
"{",
"r",
".",
"runGroup",
"(",
"group",
")",
"\n",
"}",
"\n",
"}"
] |
6,360 | all-6361 | [
"GetTimestampOk",
"returns",
"a",
"tuple",
"with",
"the",
"Timestamp",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"c",
"*",
"Check",
")",
"GetTimestampOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"c",
"==",
"nil",
"||",
"c",
".",
"Timestamp",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"<mask>",
"\n",
"}",
"\n",
"return",
"*",
"... |
6,361 | all-6362 | [
"paeth",
"implements",
"the",
"Paeth",
"filter",
"function",
"as",
"per",
"the",
"PNG",
"specification",
"."
] | [
"func",
"paeth",
"(",
"a",
",",
"b",
",",
"c",
"uint8",
")",
"uint8",
"{",
"// This is an optimized version of the sample code in the PNG spec.",
"// For example, the sample code starts with:",
"//\tp := int(a) + int(b) - int(c)",
"//\tpa := abs(p - int(a))",
"// but the optimized fo... |
6,362 | all-6363 | [
"VerifyBytes",
"creates",
"a",
"signature",
"for",
"buf",
"comparing",
"it",
"against",
"the",
"raw",
"sig",
".",
"If",
"the",
"sig",
"is",
"invalid",
"then",
"ErrInvalidSignature",
"is",
"returned",
"."
] | [
"func",
"(",
"<mask>",
"*",
"EccSigner",
")",
"VerifyBytes",
"(",
"buf",
",",
"sig",
"[",
"]",
"byte",
")",
"error",
"{",
"var",
"err",
"error",
"\n\n",
"// check es.pub",
"if",
"es",
".",
"pub",
"==",
"nil",
"{",
"return",
"ErrInvalidPublicKey",
"\n",
... |
6,363 | all-6364 | [
"WithFields",
"adds",
"multiple",
"fields",
"to",
"the",
"logger"
] | [
"func",
"(",
"n",
"*",
"Namespaced",
")",
"WithFields",
"(",
"fields",
"<mask>",
".",
"Fields",
")",
"log",
".",
"Interface",
"{",
"return",
"&",
"Namespaced",
"{",
"Interface",
":",
"n",
".",
"Interface",
".",
"WithFields",
"(",
"fields",
")",
",",
"n... |
6,364 | all-6365 | [
"ThrottleBacklog",
"is",
"a",
"middleware",
"that",
"limits",
"number",
"of",
"currently",
"processed",
"requests",
"at",
"a",
"time",
"and",
"provides",
"a",
"backlog",
"for",
"holding",
"a",
"finite",
"number",
"of",
"pending",
"requests",
"."
] | [
"func",
"ThrottleBacklog",
"(",
"limit",
"int",
",",
"backlogLimit",
"int",
",",
"backlogTimeout",
"time",
".",
"Duration",
")",
"func",
"(",
"http",
".",
"Handler",
")",
"http",
".",
"Handler",
"{",
"if",
"limit",
"<",
"1",
"{",
"panic",
"(",
"\"",
"\... |
6,365 | all-6366 | [
"GetBalance",
"returns",
"current",
"balance",
"in",
"BTC"
] | [
"func",
"(",
"c",
"<mask>",
")",
"GetBalance",
"(",
")",
"(",
"float64",
",",
"error",
")",
"{",
"balance",
":=",
"map",
"[",
"string",
"]",
"string",
"{",
"}",
"\n",
"if",
"err",
":=",
"c",
".",
"Get",
"(",
"\"",
"\"",
",",
"nil",
",",
"&",
... |
6,366 | all-6367 | [
"ValidateScope",
"validates",
"a",
"policy",
"configuration",
"scope",
"for",
"an",
"OCI",
"transport",
"."
] | [
"func",
"ValidateScope",
"(",
"scope",
"string",
")",
"error",
"{",
"var",
"err",
"error",
"\n",
"if",
"runtime",
".",
"GOOS",
"==",
"\"",
"\"",
"{",
"err",
"=",
"validateScopeWindows",
"(",
"scope",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"validateSc... |
6,367 | all-6368 | [
"ValidEnum",
"validates",
"a",
"proposed",
"value",
"for",
"this",
"enum",
".",
"Implements",
"the",
"Enum",
"interface",
"for",
"BucketEntryType"
] | [
"func",
"(",
"e",
"BucketEntryType",
")",
"ValidEnum",
"(",
"v",
"int32",
")",
"bool",
"{",
"_",
",",
"ok",
":=",
"bucketEntryTypeMap",
"[",
"v",
"]",
"\n",
"return",
"<mask>",
"\n",
"}"
] |
6,368 | all-6369 | [
"Buy",
"an",
"amount",
"of",
"BTC",
"and",
"bypass",
"rate",
"limits",
"by",
"setting",
"agreeBtcAmountVaries",
"to",
"true"
] | [
"func",
"(",
"c",
"Client",
")",
"Buy",
"(",
"amount",
"float64",
",",
"agreeBtcAmountVaries",
"bool",
")",
"(",
"*",
"transfer",
",",
"error",
")",
"{",
"params",
":=",
"map",
"[",
"string",
"]",
"<mask>",
"{",
"}",
"{",
"\"",
"\"",
":",
"amount",
... |
6,369 | all-6370 | [
"HasDisplayType",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"WidgetMarker",
")",
"HasDisplayType",
"(",
")",
"bool",
"{",
"if",
"w",
"!=",
"nil",
"&&",
"w",
".",
"DisplayType",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
6,370 | all-6371 | [
"StringWithinTransport",
"returns",
"a",
"string",
"representation",
"of",
"the",
"reference",
"which",
"MUST",
"be",
"such",
"that",
"reference",
".",
"Transport",
"()",
".",
"ParseReference",
"(",
"reference",
".",
"StringWithinTransport",
"()",
")",
"returns",
... | [
"func",
"(",
"ref",
"ociArchiveReference",
")",
"StringWithinTransport",
"(",
")",
"string",
"{",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"<mask>",
".",
"file",
",",
"ref",
".",
"image",
")",
"\n",
"}"
] |
6,371 | all-6372 | [
"startUdevWatcher",
"starts",
"the",
"udev",
"monitor",
"and",
"the",
"watcher",
"for",
"receiving",
"notifications",
"from",
"the",
"monitor"
] | [
"func",
"(",
"agent",
"*",
"ecsAgent",
")",
"startUdevWatcher",
"(",
"state",
"dockerstate",
".",
"TaskEngineState",
",",
"stateChangeEvents",
"chan",
"<-",
"statechange",
".",
"Event",
")",
"error",
"{",
"seelog",
".",
"Debug",
"(",
"\"",
"\"",
")",
"\n",
... |
6,372 | all-6373 | [
"NewImageFromImage",
"creates",
"a",
"new",
"image",
"with",
"the",
"given",
"image",
"(",
"source",
")",
".",
"If",
"source",
"s",
"width",
"or",
"height",
"is",
"less",
"than",
"1",
"or",
"more",
"than",
"device",
"-",
"dependent",
"maximum",
"size",
"... | [
"func",
"NewImageFromImage",
"(",
"source",
"image",
".",
"Image",
",",
"filter",
"Filter",
")",
"(",
"*",
"Image",
",",
"error",
")",
"{",
"size",
":=",
"source",
".",
"Bounds",
"(",
")",
".",
"Size",
"(",
")",
"\n\n",
"width",
",",
"height",
":=",
... |
6,373 | all-6374 | [
"GetLineCap",
"is",
"a",
"wrapper",
"around",
"cairo_get_line_cap",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"GetLineCap",
"(",
")",
"LineCap",
"{",
"c",
":=",
"C",
".",
"cairo_get_line_cap",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"return",
"LineCap",
"(",
"c",
")",
"\n",
"}"
] |
6,374 | all-6375 | [
"MarshalEasyJSON",
"writes",
"the",
"HexColor",
"to",
"a",
"easyjson",
".",
"Writer"
] | [
"func",
"(",
"h",
"HexColor",
")",
"MarshalEasyJSON",
"(",
"w",
"*",
"jwriter",
".",
"<mask>",
")",
"{",
"w",
".",
"String",
"(",
"string",
"(",
"h",
")",
")",
"\n",
"}"
] |
6,375 | all-6376 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"EventWorkerVersionUpdated",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker10",
"(",
"&",
"w",
","... |
6,376 | all-6377 | [
"AddEntity",
"adds",
"the",
"entity",
"to",
"all",
"systems",
"that",
"have",
"been",
"added",
"via",
"AddSystemInterface",
".",
"If",
"the",
"system",
"was",
"added",
"via",
"AddSystem",
"the",
"entity",
"will",
"not",
"be",
"added",
"to",
"it",
"."
] | [
"func",
"(",
"w",
"*",
"World",
")",
"AddEntity",
"(",
"e",
"Identifier",
")",
"{",
"if",
"w",
".",
"sysIn",
"==",
"nil",
"{",
"w",
".",
"sysIn",
"=",
"make",
"(",
"map",
"[",
"reflect",
".",
"Type",
"]",
"reflect",
".",
"Type",
")",
"\n",
"}",... |
6,377 | all-6378 | [
"Validate",
"inspects",
"the",
"fields",
"of",
"the",
"type",
"to",
"determine",
"if",
"they",
"are",
"valid",
"."
] | [
"func",
"(",
"s",
"*",
"RunTaskInput",
")",
"Validate",
"(",
")",
"error",
"{",
"invalidParams",
":=",
"<mask>",
".",
"ErrInvalidParams",
"{",
"Context",
":",
"\"",
"\"",
"}",
"\n",
"if",
"s",
".",
"TaskDefinition",
"==",
"nil",
"{",
"invalidParams",
"."... |
6,378 | all-6379 | [
"Arguments",
"adds",
"the",
"arguments",
"to",
"the",
"args",
"."
] | [
"func",
"(",
"r",
"*",
"RequestBuilder",
")",
"Arguments",
"(",
"args",
"...",
"string",
")",
"*",
"RequestBuilder",
"{",
"r",
".",
"args",
"=",
"<mask>",
"(",
"r",
".",
"args",
",",
"args",
"...",
")",
"\n",
"return",
"r",
"\n",
"}"
] |
6,379 | all-6380 | [
"NewMockDockerMetadataClient",
"creates",
"a",
"new",
"mock",
"instance"
] | [
"func",
"NewMockDockerMetadataClient",
"(",
"ctrl",
"*",
"gomock",
".",
"<mask>",
")",
"*",
"MockDockerMetadataClient",
"{",
"mock",
":=",
"&",
"MockDockerMetadataClient",
"{",
"ctrl",
":",
"ctrl",
"}",
"\n",
"mock",
".",
"recorder",
"=",
"&",
"MockDockerMetadat... |
6,380 | all-6381 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"StopViolationsReportParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog1",
"(",
"&",
"w",
",",
"v",
... |
6,381 | all-6382 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"RequestMemoryDumpReturns",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing2",
"(",
"&... |
6,382 | all-6383 | [
"ensureParent",
"makes",
"sure",
"that",
"the",
"parent",
"directory",
"of",
"current",
"is",
"created",
"and",
"populated",
"with",
"the",
"proper",
"cpus",
"and",
"mems",
"files",
"copied",
"from",
"it",
"s",
"parent",
"."
] | [
"func",
"(",
"s",
"*",
"CpusetGroup",
")",
"ensureParent",
"(",
"current",
",",
"<mask>",
"string",
")",
"error",
"{",
"parent",
":=",
"filepath",
".",
"Dir",
"(",
"current",
")",
"\n",
"if",
"filepath",
".",
"Clean",
"(",
"parent",
")",
"==",
"root",
... |
6,383 | all-6384 | [
"appendReplacementCandiates",
"creates",
"prioritize",
".",
"CandidateWithTime",
"values",
"for",
"digest",
"in",
"scopeBucket",
"and",
"returns",
"the",
"result",
"of",
"appending",
"them",
"to",
"candidates",
"."
] | [
"func",
"(",
"bdc",
"*",
"cache",
")",
"appendReplacementCandidates",
"(",
"candidates",
"[",
"]",
"prioritize",
".",
"CandidateWithTime",
",",
"scopeBucket",
"*",
"bolt",
".",
"Bucket",
",",
"digest",
"digest",
".",
"Digest",
")",
"[",
"]",
"prioritize",
".... |
6,384 | all-6385 | [
"Make",
"a",
"vmdk",
"disk",
"image",
"with",
"the",
"given",
"size",
"(",
"in",
"MB",
")",
"."
] | [
"func",
"vdiskmanager",
"(",
"dest",
"string",
",",
"size",
"int",
")",
"error",
"{",
"cmd",
":=",
"exec",
".",
"Command",
"(",
"vdiskmanbin",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"fmt",
".",
"Sprintf",
"(",
"\... |
6,385 | all-6386 | [
"CreateSubnet",
"creates",
"or",
"updates",
"a",
"subnet",
"if",
"it",
"does",
"not",
"already",
"exist",
"."
] | [
"func",
"(",
"a",
"AzureClient",
")",
"CreateSubnet",
"(",
"ctx",
"*",
"DeploymentContext",
",",
"resourceGroup",
",",
"virtualNetwork",
",",
"name",
",",
"subnetPrefix",
"string",
")",
"error",
"{",
"subnet",
",",
"err",
":=",
"a",
".",
"GetSubnet",
"(",
... |
6,386 | all-6387 | [
"ensure",
"retreives",
"a",
"value",
"associated",
"with",
"the",
"given",
"key",
"from",
"the",
"cache",
".",
"If",
"the",
"key",
"does",
"not",
"exist",
"in",
"the",
"cache",
"the",
"load",
"function",
"will",
"be",
"called",
"and",
"its",
"result",
"w... | [
"func",
"(",
"m",
"*",
"remoteCacheMap",
")",
"ensure",
"(",
"key",
"string",
",",
"load",
"func",
"(",
")",
"(",
"interface",
"{",
"}",
",",
"error",
")",
")",
"(",
"interface",
"{",
"}",
",",
"error",
")",
"{",
"m",
".",
"mu",
".",
"Lock",
"(... |
6,387 | all-6388 | [
"WriteRequest",
"writes",
"a",
"http",
".",
"Request",
"to",
"the",
"given",
"writers",
"."
] | [
"func",
"WriteRequest",
"(",
"call",
"tchannel",
".",
"ArgWritable",
",",
"req",
"*",
"http",
".",
"Request",
")",
"error",
"{",
"// TODO(prashant): Allow creating write buffers that let you grow the buffer underneath.",
"wb",
":=",
"typed",
".",
"NewWriteBufferWithSize",
... |
6,388 | all-6389 | [
"NewClientFromURLAndSecret",
"constructs",
"a",
"client",
"by",
"parsing",
"URL",
"and",
"then",
"constructing",
"the",
"correct",
"client",
"for",
"that",
"URL",
"using",
"secrets",
"."
] | [
"func",
"NewClientFromURLAndSecret",
"(",
"url",
"*",
"ObjectStoreURL",
",",
"reversed",
"...",
"bool",
")",
"(",
"c",
"Client",
",",
"err",
"error",
")",
"{",
"switch",
"url",
".",
"Store",
"{",
"case",
"\"",
"\"",
":",
"c",
",",
"err",
"=",
"NewAmazo... |
6,389 | all-6390 | [
"GetTokenData",
"implements",
"the",
"flame",
".",
"GenericToken",
"interface",
"."
] | [
"func",
"(",
"t",
"*",
"Token",
")",
"GetTokenData",
"(",
")",
"(",
"TokenType",
",",
"[",
"]",
"string",
",",
"<mask>",
".",
"Time",
",",
"bson",
".",
"ObjectId",
",",
"*",
"bson",
".",
"ObjectId",
")",
"{",
"return",
"t",
".",
"Type",
",",
"t",... |
6,390 | all-6391 | [
"StoragePoolVolumeRename",
"renames",
"the",
"storage",
"volume",
"attached",
"to",
"a",
"given",
"storage",
"pool",
"."
] | [
"func",
"(",
"c",
"*",
"Cluster",
")",
"StoragePoolVolumeRename",
"(",
"<mask>",
",",
"oldVolumeName",
"string",
",",
"newVolumeName",
"string",
",",
"volumeType",
"int",
",",
"poolID",
"int64",
")",
"error",
"{",
"volumeID",
",",
"_",
",",
"err",
":=",
"c... |
6,391 | all-6392 | [
"splitQuoted",
"splits",
"the",
"string",
"s",
"around",
"each",
"instance",
"of",
"one",
"or",
"more",
"consecutive",
"white",
"space",
"characters",
"while",
"taking",
"into",
"account",
"quotes",
"and",
"escaping",
"and",
"returns",
"an",
"array",
"of",
"su... | [
"func",
"splitQuoted",
"(",
"s",
"string",
")",
"(",
"r",
"[",
"]",
"string",
",",
"err",
"error",
")",
"{",
"var",
"args",
"[",
"]",
"string",
"\n",
"arg",
":=",
"make",
"(",
"[",
"]",
"rune",
",",
"len",
"(",
"s",
")",
")",
"\n",
"escaped",
... |
6,392 | all-6393 | [
"RecoverPubKey",
"recover",
"public",
"key",
"from",
"signature",
"values",
"."
] | [
"func",
"RecoverPubKey",
"(",
"signer",
"types",
".",
"Signer",
",",
"tx",
"*",
"types",
".",
"Transaction",
")",
"(",
"*",
"ecdsa",
".",
"PublicKey",
",",
"error",
")",
"{",
"V",
",",
"R",
",",
"S",
":=",
"tx",
".",
"RawSignatureValues",
"(",
")",
... |
6,393 | all-6394 | [
"specify",
"a",
"two",
"-",
"dimensional",
"texture",
"subimage"
] | [
"func",
"TextureSubImage2D",
"(",
"texture",
"uint32",
",",
"level",
"int32",
",",
"xoffset",
"int32",
",",
"yoffset",
"int32",
",",
"width",
"int32",
",",
"height",
"int32",
",",
"format",
"uint32",
",",
"xtype",
"uint32",
",",
"pixels",
"unsafe",
".",
"P... |
6,394 | all-6395 | [
"Get",
"gets",
"the",
"value",
"stored",
"by",
"specified",
"token",
"."
] | [
"func",
"(",
"s",
"*",
"SessionCache",
")",
"Get",
"(",
"token",
"string",
")",
"(",
"interface",
"{",
"}",
",",
"error",
")",
"{",
"v",
",",
"err",
":=",
"s",
".",
"<mask>",
".",
"Get",
"(",
"token",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
... |
6,395 | all-6396 | [
"IsExtInCert",
"is",
"equivalent",
"to",
"GetExtFromCert",
"()",
"!",
"=",
"nil",
"."
] | [
"func",
"IsExtInCert",
"(",
"cert",
"*",
"x509",
".",
"Certificate",
",",
"oid",
"asn1",
".",
"ObjectIdentifier",
")",
"bool",
"{",
"if",
"<mask>",
"!=",
"nil",
"&&",
"GetExtFromCert",
"(",
"cert",
",",
"oid",
")",
"!=",
"nil",
"{",
"return",
"true",
"... |
6,396 | all-6397 | [
"HandleFunc",
"registers",
"a",
"handler",
"function",
"for",
"a",
"given",
"pattern",
"."
] | [
"func",
"(",
"s",
"*",
"Server",
")",
"HandleFunc",
"(",
"pattern",
"string",
",",
"handler",
"HandlerFunc",
")",
"{",
"s",
".",
"Mux",
"(",
")",
".",
"HandleFunc",
"(",
"pattern",
",",
"func",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
... |
6,397 | all-6398 | [
"flushable",
"returns",
"a",
"boolean",
"value",
"indicating",
"whether",
"there",
"is",
"a",
"flushable",
"line",
"in",
"the",
"field",
"."
] | [
"func",
"(",
"f",
"*",
"<mask>",
")",
"flushable",
"(",
")",
"bool",
"{",
"for",
"j",
":=",
"fieldBlockNumY",
"-",
"1",
";",
"0",
"<=",
"j",
";",
"j",
"--",
"{",
"if",
"f",
".",
"flushableLine",
"(",
"j",
")",
"{",
"return",
"true",
"\n",
"}",
... |
6,398 | all-6399 | [
"GetTitleSize",
"returns",
"the",
"TitleSize",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"t",
"*",
"TimeseriesDefinition",
")",
"GetTitleSize",
"(",
")",
"<mask>",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"TitleSize",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"t",
".",
"TitleSize",
"\n",
"... |
6,399 | all-6400 | [
"isNetworkStatsError",
"returns",
"if",
"the",
"error",
"indicates",
"that",
"files",
"in",
"/",
"sys",
"/",
"class",
"/",
"net",
"could",
"not",
"be",
"opened",
"."
] | [
"func",
"isNetworkStatsError",
"(",
"err",
"error",
")",
"bool",
"{",
"matched",
",",
"mErr",
":=",
"regexp",
".",
"MatchString",
"(",
"networkStatsErrorPattern",
",",
"err",
".",
"<mask>",
"(",
")",
")",
"\n",
"if",
"mErr",
"!=",
"nil",
"{",
"seelog",
"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.