id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
23,000 | all-23001 | [
"DeleteObject",
"removes",
"the",
"row",
"identified",
"by",
"the",
"given",
"ID",
".",
"The",
"given",
"table",
"must",
"have",
"a",
"primary",
"key",
"column",
"called",
"id",
".",
"It",
"returns",
"a",
"flag",
"indicating",
"if",
"a",
"matching",
"row",... | [
"func",
"DeleteObject",
"(",
"<mask>",
"*",
"sql",
".",
"Tx",
",",
"table",
"string",
",",
"id",
"int64",
")",
"(",
"bool",
",",
"error",
")",
"{",
"stmt",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"table",
")",
"\n",
"result",
",",
"err... |
23,001 | all-23002 | [
"/",
"*",
"Debugf",
"uses",
"msg",
"as",
"a",
"format",
"string",
"with",
"subsequent",
"parameters",
"as",
"values",
"and",
"logs",
"the",
"resulting",
"message",
"to",
"all",
"added",
"loggers",
"at",
"LogLevel",
".",
"LevelDebug"
] | [
"func",
"(",
"b",
"*",
"Base",
")",
"Debugf",
"(",
"msg",
"string",
",",
"a",
"...",
"interface",
"{",
"}",
")",
"error",
"{",
"return",
"b",
".",
"Log",
"(",
"LevelDebug",
",",
"nil",
",",
"<mask>",
",",
"a",
"...",
")",
"\n",
"}"
] |
23,002 | all-23003 | [
"LeastCommonBitPosition",
"returns",
"the",
"smallest",
"position",
"of",
"the",
"preceding",
"common",
"bits",
"of",
"the",
"2",
"network",
"numbers",
"and",
"returns",
"an",
"error",
"ErrNoGreatestCommonBit",
"if",
"the",
"two",
"network",
"number",
"diverges",
... | [
"func",
"(",
"n",
"NetworkNumber",
")",
"LeastCommonBitPosition",
"(",
"n1",
"NetworkNumber",
")",
"(",
"uint",
",",
"error",
")",
"{",
"if",
"len",
"(",
"n",
")",
"!=",
"len",
"(",
"n1",
")",
"{",
"return",
"0",
",",
"ErrVersionMismatch",
"\n",
"}",
... |
23,003 | all-23004 | [
"T61String",
"parseT61String",
"parses",
"a",
"ASN",
".",
"1",
"T61String",
"(",
"8",
"-",
"bit",
"clean",
"string",
")",
"from",
"the",
"given",
"byte",
"slice",
"and",
"returns",
"it",
"."
] | [
"func",
"parseT61String",
"(",
"bytes",
"[",
"]",
"byte",
")",
"(",
"ret",
"string",
",",
"err",
"error",
")",
"{",
"return",
"string",
"(",
"<mask>",
")",
",",
"nil",
"\n",
"}"
] |
23,004 | all-23005 | [
"GetDowntimes",
"returns",
"a",
"slice",
"of",
"all",
"downtimes",
"."
] | [
"func",
"(",
"client",
"*",
"Client",
")",
"GetDowntimes",
"(",
")",
"(",
"[",
"]",
"Downtime",
",",
"error",
")",
"{",
"var",
"out",
"reqDowntimes",
"\n",
"if",
"err",
":=",
"client",
".",
"doJsonRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"n... |
23,005 | all-23006 | [
"Initialize",
"AppArmor",
"-",
"specific",
"attributes",
"."
] | [
"func",
"(",
"s",
"*",
"OS",
")",
"initAppArmor",
"(",
")",
"{",
"/* Detect AppArmor availability */",
"_",
",",
"err",
":=",
"exec",
".",
"LookPath",
"(",
"\"",
"\"",
")",
"\n",
"if",
"os",
".",
"Getenv",
"(",
"\"",
"\"",
")",
"==",
"\"",
"\"",
"{... |
23,006 | all-23007 | [
"native",
"returns",
"a",
"pointer",
"to",
"the",
"underlying",
"GtkApplicationWindow",
"."
] | [
"func",
"(",
"v",
"*",
"ApplicationWindow",
")",
"native",
"(",
")",
"*",
"C",
".",
"GtkApplicationWindow",
"{",
"if",
"v",
"==",
"nil",
"||",
"v",
".",
"Window",
".",
"GObject",
"==",
"nil",
"{",
"// v.Window is necessary because v.GObject would be ambiguous",
... |
23,007 | all-23008 | [
"WriteZeroes",
"writes",
"cnt",
"zero",
"byte",
"values",
"."
] | [
"func",
"(",
"w",
"*",
"<mask>",
")",
"WriteZeroes",
"(",
"cnt",
"int",
")",
"{",
"if",
"w",
".",
"err",
"!=",
"nil",
"{",
"return",
"\n",
"}",
"\n\n",
"// zero out scratch area",
"l",
":=",
"cnt",
"\n",
"if",
"l",
">",
"len",
"(",
"w",
".",
"b",... |
23,008 | all-23009 | [
"AddSaveable",
"indicates",
"an",
"expected",
"call",
"of",
"AddSaveable"
] | [
"func",
"(",
"mr",
"*",
"MockSaveableOptionMockRecorder",
")",
"AddSaveable",
"(",
"arg0",
",",
"arg1",
"<mask>",
"{",
"}",
")",
"*",
"gomock",
".",
"Call",
"{",
"return",
"mr",
".",
"mock",
".",
"ctrl",
".",
"RecordCallWithMethodType",
"(",
"mr",
".",
"... |
23,009 | all-23010 | [
"CalcLengths",
"returns",
"the",
"maximum",
"length",
"of",
"the",
"source",
"lines",
"and",
"package",
"names",
"."
] | [
"func",
"CalcLengths",
"(",
"buckets",
"[",
"]",
"*",
"stack",
".",
"Bucket",
",",
"fullPath",
"bool",
")",
"(",
"int",
",",
"int",
")",
"{",
"srcLen",
":=",
"0",
"\n",
"pkgLen",
":=",
"0",
"\n",
"for",
"_",
",",
"bucket",
":=",
"<mask>",
"buckets"... |
23,010 | all-23011 | [
"fileSource",
"returns",
"a",
"source",
"ID",
"for",
"the",
"i",
"-",
"th",
"target",
"group",
"in",
"the",
"file",
"."
] | [
"func",
"fileSource",
"(",
"filename",
"string",
",",
"i",
"int",
")",
"string",
"{",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"<mask>",
",",
"i",
")",
"\n",
"}"
] |
23,011 | all-23012 | [
"driverPath",
"finds",
"the",
"path",
"of",
"a",
"driver",
"binary",
"by",
"its",
"name",
".",
"+",
"If",
"the",
"driver",
"is",
"a",
"core",
"driver",
"there",
"is",
"no",
"separate",
"driver",
"binary",
".",
"We",
"reuse",
"current",
"binary",
"if",
... | [
"func",
"driverPath",
"(",
"driverName",
"string",
")",
"string",
"{",
"for",
"_",
",",
"coreDriver",
":=",
"<mask>",
"CoreDrivers",
"{",
"if",
"coreDriver",
"==",
"driverName",
"{",
"if",
"CurrentBinaryIsDockerMachine",
"{",
"return",
"os",
".",
"Args",
"[",
... |
23,012 | all-23013 | [
"Notification",
"is",
"the",
"builder"
] | [
"func",
"Notification",
"(",
"title",
",",
"<mask>",
"string",
")",
"GNotifier",
"{",
"config",
":=",
"&",
"Config",
"{",
"title",
",",
"message",
",",
"5000",
",",
"\"",
"\"",
"}",
"\n",
"n",
":=",
"&",
"notifier",
"{",
"Config",
":",
"config",
"}",... |
23,013 | all-23014 | [
"Session",
"will",
"be",
"used",
"to",
"set",
"the",
"current",
"language",
"."
] | [
"func",
"Session",
"(",
"s",
"handler",
".",
"<mask>",
")",
"Option",
"{",
"return",
"Option",
"{",
"func",
"(",
"o",
"*",
"options",
")",
"{",
"o",
".",
"session",
"=",
"s",
"\n",
"}",
"}",
"\n",
"}"
] |
23,014 | all-23015 | [
"Stop",
"stops",
"RunLoop",
"()",
".",
"It",
"must",
"be",
"called",
"after",
"RunLoop",
"()",
".",
"If",
"not",
"it",
"causes",
"panic",
"."
] | [
"func",
"(",
"p",
"*",
"Pinger",
")",
"Stop",
"(",
")",
"{",
"p",
".",
"debugln",
"(",
"\"",
"\"",
")",
"\n",
"<mask>",
"(",
"p",
".",
"ctx",
".",
"stop",
")",
"\n",
"p",
".",
"debugln",
"(",
"\"",
"\"",
")",
"\n",
"<-",
"p",
".",
"ctx",
... |
23,015 | all-23016 | [
"Replace",
"a",
"piece",
"of",
"middleware",
"with",
"another",
"piece",
"of",
"middleware",
".",
"Great",
"for",
"testing",
"."
] | [
"func",
"(",
"ms",
"*",
"MiddlewareStack",
")",
"Replace",
"(",
"mw1",
"MiddlewareFunc",
",",
"mw2",
"MiddlewareFunc",
")",
"{",
"m1k",
":=",
"funcKey",
"(",
"mw1",
")",
"\n",
"stack",
":=",
"[",
"]",
"MiddlewareFunc",
"{",
"}",
"\n",
"for",
"_",
",",
... |
23,016 | all-23017 | [
"FilterNew",
"is",
"a",
"wrapper",
"around",
"gtk_tree_model_filter_new",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"TreeModel",
")",
"FilterNew",
"(",
"<mask>",
"*",
"TreePath",
")",
"(",
"*",
"TreeModelFilter",
",",
"error",
")",
"{",
"c",
":=",
"C",
".",
"gtk_tree_model_filter_new",
"(",
"v",
".",
"native",
"(",
")",
",",
"root",
".",
"na... |
23,017 | all-23018 | [
"DiscoverEndpoints",
"will",
"make",
"HTTPS",
"requests",
"to",
"find",
"the",
"ac",
"-",
"discovery",
"meta",
"tags",
"and",
"optionally",
"will",
"use",
"HTTP",
"if",
"insecure",
"is",
"set",
".",
"It",
"will",
"not",
"give",
"up",
"until",
"it",
"has",
... | [
"func",
"DiscoverEndpoints",
"(",
"app",
"App",
",",
"insecure",
"discovery",
".",
"InsecureOption",
")",
"(",
"out",
"*",
"Endpoints",
",",
"attempts",
"[",
"]",
"FailedAttempt",
",",
"err",
"error",
")",
"{",
"out",
"=",
"&",
"Endpoints",
"{",
"}",
"\n... |
23,018 | all-23019 | [
"===",
"quantile_over_time",
"(",
"Matrix",
"ValueTypeMatrix",
")",
"Vector",
"==="
] | [
"func",
"funcQuantileOverTime",
"(",
"vals",
"[",
"]",
"Value",
",",
"args",
"Expressions",
",",
"enh",
"*",
"EvalNodeHelper",
")",
"Vector",
"{",
"q",
":=",
"vals",
"[",
"0",
"]",
".",
"(",
"Vector",
")",
"[",
"0",
"]",
".",
"V",
"\n",
"mat",
":="... |
23,019 | all-23020 | [
"AppLogCollection",
"returns",
"the",
"logs",
"collection",
"for",
"one",
"app",
"from",
"MongoDB",
"."
] | [
"func",
"(",
"s",
"*",
"LogStorage",
")",
"AppLogCollection",
"(",
"appName",
"string",
")",
"*",
"storage",
".",
"Collection",
"{",
"if",
"appName",
"==",
"\"",
"\"",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"return",
"s",
".",
"<mask>",
"(",
"\"",
"\... |
23,020 | all-23021 | [
"isMatchPattern",
"see",
"if",
"given",
"string",
"is",
"match",
"pattern",
"."
] | [
"func",
"isMatchPattern",
"(",
"s",
"string",
")",
"bool",
"{",
"<mask>",
"len",
"(",
"s",
")",
">",
"2",
"&&",
"s",
"[",
"0",
"]",
"==",
"'<'",
"&&",
"s",
"[",
"len",
"(",
"s",
")",
"-",
"1",
"]",
"==",
"'>'",
"\n",
"}"
] |
23,021 | all-23022 | [
"Do",
"executes",
"Debugger",
".",
"searchInContent",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"result",
"-",
"List",
"of",
"search",
"matches",
"."
] | [
"func",
"(",
"p",
"*",
"SearchInContentParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"result",
"[",
"]",
"*",
"SearchMatch",
",",
"err",
"error",
")",
"{",
"// execute",
"var",
"res",
"SearchInContentReturns",
"\n",
"err",
"=",
"cd... |
23,022 | all-23023 | [
"/",
"*",
"OrderVMByFilter",
"orders",
"a",
"free",
"vm",
"by",
"filters",
"cpu",
"memory",
"private",
"vlan",
"public",
"vlan",
"state"
] | [
"func",
"(",
"a",
"*",
"Client",
")",
"OrderVMByFilter",
"(",
"params",
"*",
"OrderVMByFilterParams",
")",
"(",
"*",
"OrderVMByFilterOK",
",",
"error",
")",
"{",
"// TODO: Validate the params before sending",
"if",
"params",
"==",
"nil",
"{",
"params",
"=",
"New... |
23,023 | all-23024 | [
"FetchTemplate",
"returns",
"a",
"TemplateSource",
"representing",
"the",
"template",
"at",
"path",
"path",
".",
"Paths",
"are",
"searched",
"relative",
"to",
"the",
"urls",
"given",
"to",
"NewHTTPTemplateFetcher",
"()"
] | [
"func",
"(",
"l",
"*",
"HTTPTemplateFetcher",
")",
"FetchTemplate",
"(",
"<mask>",
"string",
")",
"(",
"TemplateSource",
",",
"error",
")",
"{",
"u",
",",
"err",
":=",
"url",
".",
"Parse",
"(",
"path",
")",
"\n\n",
"if",
"err",
"!=",
"nil",
"{",
"ret... |
23,024 | all-23025 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"ReplaySnapshotReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree4",
"(",
"&",
"w",
",",
"v",
... |
23,025 | all-23026 | [
"overlappingTables",
"returns",
"the",
"tables",
"that",
"intersect",
"with",
"key",
"range",
".",
"Returns",
"a",
"half",
"-",
"interval",
".",
"This",
"function",
"should",
"already",
"have",
"acquired",
"a",
"read",
"lock",
"and",
"this",
"is",
"so",
"imp... | [
"func",
"(",
"s",
"*",
"levelHandler",
")",
"overlappingTables",
"(",
"_",
"levelHandlerRLocked",
",",
"kr",
"keyRange",
")",
"(",
"int",
",",
"int",
")",
"{",
"if",
"len",
"(",
"kr",
".",
"left",
")",
"==",
"0",
"||",
"len",
"(",
"kr",
".",
"right... |
23,026 | all-23027 | [
"NewRequest",
"is",
"like",
"http",
".",
"NewRequest",
"with",
"the",
"exception",
"that",
"it",
"will",
"add",
"basic",
"auth",
"headers",
"if",
"the",
"client",
"is",
"configured",
"for",
"basic",
"auth",
"."
] | [
"func",
"(",
"s",
"*",
"Client",
")",
"NewRequest",
"(",
"method",
",",
"url",
"string",
",",
"body",
"io",
".",
"Reader",
")",
"(",
"*",
"http",
".",
"Request",
",",
"error",
")",
"{",
"req",
",",
"err",
":=",
"http",
".",
"NewRequest",
"(",
"me... |
23,027 | all-23028 | [
"IntRangeZoom",
"param",
"must",
"be",
"a",
"number",
"and",
"range",
"is",
"[",
"n",
"m",
"]",
"tip",
"is",
"zoom",
"."
] | [
"func",
"(",
"c",
"*",
"Controller",
")",
"IntRangeZoom",
"(",
"fieldName",
"string",
",",
"p",
"interface",
"{",
"}",
",",
"n",
"int",
",",
"m",
"int",
",",
"zoom",
"int",
")",
"int",
"{",
"if",
"p",
"==",
"nil",
"{",
"p",
"=",
"0",
"\n",
"}",... |
23,028 | all-23029 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"the",
"current",
"program",
"object"
] | [
"func",
"UniformMatrix2x3fv",
"(",
"<mask>",
"int32",
",",
"count",
"int32",
",",
"transpose",
"bool",
",",
"value",
"*",
"float32",
")",
"{",
"C",
".",
"glowUniformMatrix2x3fv",
"(",
"gpUniformMatrix2x3fv",
",",
"(",
"C",
".",
"GLint",
")",
"(",
"location",... |
23,029 | all-23030 | [
"schemaHostNetworkPolicy",
"returns",
"schema",
"items",
"for",
"resources",
"that",
"need",
"to",
"work",
"with",
"a",
"HostNetworkPolicy",
"such",
"as",
"virtual",
"switches",
"and",
"port",
"groups",
"."
] | [
"func",
"schemaHostNetworkPolicy",
"(",
")",
"map",
"[",
"string",
"]",
"*",
"schema",
".",
"Schema",
"{",
"return",
"map",
"[",
"string",
"]",
"*",
"schema",
".",
"Schema",
"{",
"// HostNicTeamingPolicy/HostNicFailureCriteria",
"\"",
"\"",
":",
"{",
"Type",
... |
23,030 | all-23031 | [
"CreateAcknowledgement",
"creates",
"a",
"new",
"acknowledgement",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"CreateAcknowledgement",
"(",
"cfg",
"*",
"Acknowledgement",
")",
"(",
"*",
"Acknowledgement",
",",
"error",
")",
"{",
"if",
"cfg",
"==",
"nil",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",... |
23,031 | all-23032 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"a",
"specified",
"program",
"object"
] | [
"func",
"ProgramUniform4ui",
"(",
"program",
"uint32",
",",
"<mask>",
"int32",
",",
"v0",
"uint32",
",",
"v1",
"uint32",
",",
"v2",
"uint32",
",",
"v3",
"uint32",
")",
"{",
"C",
".",
"glowProgramUniform4ui",
"(",
"gpProgramUniform4ui",
",",
"(",
"C",
".",
... |
23,032 | all-23033 | [
"New",
"returns",
"a",
"new",
"Circonus",
"API"
] | [
"func",
"New",
"(",
"ac",
"*",
"Config",
")",
"(",
"*",
"API",
",",
"error",
")",
"{",
"if",
"ac",
"==",
"nil",
"{",
"return",
"nil",
",",
"<mask>",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"key",
":=",
"TokenKeyType",
"(",
"ac",
... |
23,033 | all-23034 | [
"NewManageDataResult",
"creates",
"a",
"new",
"ManageDataResult",
"."
] | [
"func",
"NewManageDataResult",
"(",
"code",
"ManageDataResultCode",
",",
"<mask>",
"interface",
"{",
"}",
")",
"(",
"result",
"ManageDataResult",
",",
"err",
"error",
")",
"{",
"result",
".",
"Code",
"=",
"code",
"\n",
"switch",
"ManageDataResultCode",
"(",
"c... |
23,034 | all-23035 | [
"Value",
"converts",
"a",
"value",
"to",
"a",
"database",
"driver",
"value"
] | [
"func",
"(",
"u",
"ISBN",
")",
"Value",
"(",
")",
"(",
"<mask>",
".",
"Value",
",",
"error",
")",
"{",
"return",
"driver",
".",
"Value",
"(",
"string",
"(",
"u",
")",
")",
",",
"nil",
"\n",
"}"
] |
23,035 | all-23036 | [
"Sign",
"returns",
"a",
"signature",
"from",
"input",
"data"
] | [
"func",
"(",
"k",
"*",
"Secp256k1PrivateKey",
")",
"Sign",
"(",
"data",
"[",
"]",
"<mask>",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"hash",
":=",
"sha256",
".",
"Sum256",
"(",
"data",
")",
"\n",
"sig",
",",
"err",
":=",
"(",
"*",
"b... |
23,036 | all-23037 | [
"Pid",
"returns",
"the",
"process",
"ID"
] | [
"func",
"(",
"p",
"<mask>",
")",
"Pid",
"(",
")",
"(",
"int",
",",
"error",
")",
"{",
"// math.MinInt32 is returned here, because it's invalid value",
"// for the kill() system call.",
"if",
"p",
".",
"ops",
"==",
"nil",
"{",
"return",
"math",
".",
"MinInt32",
"... |
23,037 | all-23038 | [
"Find",
"the",
"first",
"suffix",
"that",
"ends",
"at",
"endPos",
"in",
"the",
"word",
"among",
"those",
"provided",
";",
"then",
"check",
"to",
"see",
"if",
"it",
"begins",
"after",
"startPos",
".",
"If",
"it",
"does",
"return",
"it",
"else",
"return",
... | [
"func",
"(",
"w",
"*",
"SnowballWord",
")",
"FirstSuffixIfIn",
"(",
"startPos",
",",
"endPos",
"int",
",",
"suffixes",
"...",
"string",
")",
"(",
"suffix",
"string",
",",
"suffixRunes",
"[",
"]",
"rune",
")",
"{",
"for",
"_",
",",
"suffix",
":=",
"<mas... |
23,038 | all-23039 | [
"UnmarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Unmarshaler",
"."
] | [
"func",
"(",
"t",
"*",
"StyleSheetOrigin",
")",
"UnmarshalEasyJSON",
"(",
"in",
"*",
"jlexer",
".",
"Lexer",
")",
"{",
"switch",
"StyleSheetOrigin",
"(",
"in",
".",
"String",
"(",
")",
")",
"{",
"<mask>",
"StyleSheetOriginInjected",
":",
"*",
"t",
"=",
"... |
23,039 | all-23040 | [
"StartMetricsSession",
"starts",
"a",
"metric",
"session",
".",
"It",
"initializes",
"the",
"stats",
"engine",
"and",
"invokes",
"StartSession",
"."
] | [
"func",
"StartMetricsSession",
"(",
"params",
"*",
"TelemetrySessionParams",
")",
"{",
"ok",
",",
"err",
":=",
"params",
".",
"isContainerHealthMetricsDisabled",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"seelog",
".",
"Warnf",
"(",
"\"",
"\"",
",",
"... |
23,040 | all-23041 | [
"Temp",
"makes",
"a",
"copy",
"of",
"the",
"values",
"and",
"allows",
"operation",
"on",
"those",
"values",
"temporarily",
"during",
"the",
"run",
"of",
"the",
"function",
".",
"At",
"the",
"end",
"of",
"the",
"function",
"run",
"the",
"copy",
"is",
"dis... | [
"func",
"Temp",
"(",
"f",
"func",
"(",
")",
")",
"{",
"oenv",
":=",
"env",
"\n",
"env",
"=",
"map",
"[",
"string",
"]",
"string",
"{",
"}",
"\n",
"for",
"k",
",",
"v",
":=",
"<mask>",
"oenv",
"{",
"env",
"[",
"k",
"]",
"=",
"v",
"\n",
"}",
... |
23,041 | all-23042 | [
"Emits",
"an",
"Event",
"from",
"the",
"EventController",
".",
"Takes",
"an",
"EventBody",
"which",
"is",
"used",
"to",
"build",
"an",
"Event",
".",
"Returns",
"number",
"of",
"handlers",
"that",
"received",
"the",
"event",
"and",
"error",
"if",
"an",
"err... | [
"func",
"(",
"e",
"*",
"EventController",
")",
"Emit",
"(",
"b",
"EventBody",
")",
"(",
"int",
",",
"error",
")",
"{",
"// int used to count the number of Handlers fired.",
"var",
"i",
"int",
"\n",
"// We build an event struct to contain the Body and generate a Header.",
... |
23,042 | all-23043 | [
"decodePeers",
"is",
"used",
"to",
"deserialize",
"an",
"old",
"list",
"of",
"peers",
"into",
"a",
"Configuration",
".",
"This",
"is",
"here",
"for",
"backwards",
"compatibility",
"with",
"old",
"log",
"entries",
"and",
"snapshots",
";",
"it",
"should",
"be"... | [
"func",
"decodePeers",
"(",
"buf",
"[",
"]",
"byte",
",",
"trans",
"Transport",
")",
"Configuration",
"{",
"// Decode the buffer first.",
"var",
"encPeers",
"[",
"]",
"[",
"]",
"byte",
"\n",
"if",
"err",
":=",
"decodeMsgPack",
"(",
"buf",
",",
"&",
"encPee... |
23,043 | all-23044 | [
"OptClientSocketTimeout",
"is",
"the",
"maximum",
"idle",
"socket",
"time",
"in",
"nanoseconds"
] | [
"func",
"OptClientSocketTimeout",
"(",
"timeout",
"<mask>",
".",
"Duration",
")",
"ClientOption",
"{",
"return",
"func",
"(",
"options",
"*",
"ClientOptions",
")",
"error",
"{",
"options",
".",
"SocketTimeout",
"=",
"timeout",
"\n",
"return",
"nil",
"\n",
"}",... |
23,044 | all-23045 | [
"accumulateBatch",
"returns",
"a",
"list",
"of",
"PRs",
"that",
"can",
"be",
"merged",
"after",
"passing",
"batch",
"testing",
"if",
"any",
"exist",
".",
"It",
"also",
"returns",
"a",
"list",
"of",
"PRs",
"currently",
"being",
"batch",
"tested",
"."
] | [
"func",
"accumulateBatch",
"(",
"presubmits",
"map",
"[",
"int",
"]",
"[",
"]",
"config",
".",
"Presubmit",
",",
"prs",
"[",
"]",
"PullRequest",
",",
"pjs",
"[",
"]",
"prowapi",
".",
"ProwJob",
",",
"log",
"*",
"logrus",
".",
"Entry",
")",
"(",
"[",
... |
23,045 | all-23046 | [
"Next",
"returns",
"the",
"next",
"page",
"of",
"resources",
".",
"We",
"may",
"need",
"to",
"fetch",
"multiple",
"pages",
"from",
"the",
"Twilio",
"API",
"before",
"we",
"find",
"one",
"in",
"the",
"right",
"date",
"range",
"so",
"latency",
"may",
"be",... | [
"func",
"(",
"a",
"*",
"alertDateIterator",
")",
"Next",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"(",
"*",
"AlertPage",
",",
"error",
")",
"{",
"var",
"page",
"*",
"AlertPage",
"\n",
"for",
"{",
"// just wipe it clean every time to avoid remnants hanging arou... |
23,046 | all-23047 | [
"Do",
"executes",
"DOMDebugger",
".",
"setEventListenerBreakpoint",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"SetEventListenerBreakpointParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetEventListenerBreakpoint",
",",
"p",
",",
"nil",
")"... |
23,047 | all-23048 | [
"AddOffsetValue",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_level_bar_add_offset_value",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"LevelBar",
")",
"AddOffsetValue",
"(",
"name",
"string",
",",
"value",
"float64",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"<mask>",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
... |
23,048 | all-23049 | [
"Between",
"adds",
"BETWEEN",
"...",
"AND",
"...",
"clause",
"to",
"the",
"Condition",
"and",
"returns",
"it",
"for",
"method",
"chain",
"."
] | [
"func",
"(",
"c",
"*",
"Condition",
")",
"Between",
"(",
"from",
",",
"to",
"<mask>",
"{",
"}",
")",
"*",
"Condition",
"{",
"return",
"c",
".",
"appendQuery",
"(",
"100",
",",
"Between",
",",
"&",
"between",
"{",
"from",
",",
"to",
"}",
")",
"\n"... |
23,049 | all-23050 | [
"base64URLDecode",
"decodes",
"the",
"given",
"string",
"as",
"a",
"URL",
"-",
"safe",
"base64",
"string",
"."
] | [
"func",
"base64URLDecode",
"(",
"s",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"v",
",",
"err",
":=",
"base64",
".",
"URLEncoding",
".",
"DecodeString",
"(",
"s",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"\"",
"\"",
",",
"<ma... |
23,050 | all-23051 | [
"Info",
"outputs",
"Info",
"level",
"log"
] | [
"func",
"Info",
"(",
"val",
"...",
"<mask>",
"{",
"}",
")",
"error",
"{",
"return",
"glg",
".",
"out",
"(",
"INFO",
",",
"blankFormat",
"(",
"len",
"(",
"val",
")",
")",
",",
"val",
"...",
")",
"\n",
"}"
] |
23,051 | all-23052 | [
"SetTooltipCell",
"is",
"a",
"wrapper",
"around",
"gtk_icon_view_set_tooltip_cell",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"IconView",
")",
"SetTooltipCell",
"(",
"tooltip",
"*",
"Tooltip",
",",
"path",
"*",
"TreePath",
",",
"cell",
"*",
"CellRenderer",
")",
"{",
"C",
".",
"gtk_icon_view_set_tooltip_cell",
"(",
"v",
".",
"native",
"(",
")",
",",
"toolt... |
23,052 | all-23053 | [
"GetNotifyAuditOk",
"returns",
"a",
"tuple",
"with",
"the",
"NotifyAudit",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"o",
"*",
"Options",
")",
"GetNotifyAuditOk",
"(",
")",
"(",
"bool",
",",
"bool",
")",
"{",
"if",
"o",
"==",
"nil",
"||",
"o",
".",
"NotifyAudit",
"==",
"nil",
"{",
"return",
"false",
",",
"<mask>",
"\n",
"}",
"\n",
"return",
"*",
"o... |
23,053 | all-23054 | [
"destroy",
"is",
"a",
"wrapper",
"around",
"cairo_destroy",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Context",
")",
"destroy",
"(",
")",
"{",
"if",
"v",
".",
"<mask>",
"!=",
"nil",
"{",
"C",
".",
"cairo_destroy",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"v",
".",
"context",
"=",
"nil",
"\n",
"}",
"\n",
"}"
] |
23,054 | all-23055 | [
"Dispatch",
"receives",
"channels",
"to",
"each",
"type",
"of",
"events",
"and",
"dispatch",
"them",
"to",
"each",
"plugins",
"."
] | [
"func",
"Dispatch",
"(",
"plugin",
"plugins",
".",
"Plugin",
",",
"DB",
"*",
"InfluxDB",
",",
"issues",
"chan",
"sql",
".",
"Issue",
",",
"eventsCommentsChannel",
"chan",
"interface",
"{",
"}",
")",
"{",
"for",
"{",
"var",
"points",
"[",
"]",
"plugins",
... |
23,055 | all-23056 | [
"getAuthToken",
"extracts",
"the",
"auth",
"token",
"embedded",
"in",
"ctx",
"if",
"there",
"is",
"on"
] | [
"func",
"getAuthToken",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"string",
",",
"error",
")",
"{",
"<mask>",
",",
"ok",
":=",
"metadata",
".",
"FromIncomingContext",
"(",
"ctx",
")",
"\n",
"if",
"!",
"ok",
"{",
"return",
"\"",
"\"",
",",
"aut... |
23,056 | all-23057 | [
"CommandFilter",
"builds",
"a",
"filter",
"for",
"/",
"test",
"foo"
] | [
"func",
"CommandFilter",
"(",
"<mask>",
"string",
")",
"Filter",
"{",
"return",
"func",
"(",
"p",
"config",
".",
"Presubmit",
")",
"(",
"bool",
",",
"bool",
",",
"bool",
")",
"{",
"return",
"p",
".",
"TriggerMatches",
"(",
"body",
")",
",",
"p",
".",... |
23,057 | all-23058 | [
"MustAddHandler",
"calls",
"AddHandler",
"and",
"panics",
"in",
"case",
"of",
"an",
"error",
"."
] | [
"func",
"(",
"r",
"*",
"MapErrorRegistry",
")",
"MustAddHandler",
"(",
"code",
"int",
",",
"<mask>",
"func",
"(",
"body",
"[",
"]",
"byte",
")",
"error",
")",
"{",
"if",
"err",
":=",
"r",
".",
"AddHandler",
"(",
"code",
",",
"handler",
")",
";",
"e... |
23,058 | all-23059 | [
"SetRole",
"is",
"a",
"wrapper",
"around",
"gtk_window_set_role",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Window",
")",
"SetRole",
"(",
"s",
"string",
")",
"{",
"cstr",
":=",
"(",
"*",
"C",
".",
"gchar",
")",
"(",
"C",
".",
"CString",
"(",
"s",
")",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"("... |
23,059 | all-23060 | [
"RequestEntries",
"requests",
"data",
"from",
"cache",
".",
"See",
":",
"https",
":",
"//",
"chromedevtools",
".",
"github",
".",
"io",
"/",
"devtools",
"-",
"protocol",
"/",
"tot",
"/",
"CacheStorage#method",
"-",
"requestEntries",
"parameters",
":",
"cacheID... | [
"func",
"RequestEntries",
"(",
"cacheID",
"CacheID",
",",
"skipCount",
"int64",
",",
"pageSize",
"int64",
")",
"*",
"RequestEntriesParams",
"{",
"<mask>",
"&",
"RequestEntriesParams",
"{",
"CacheID",
":",
"cacheID",
",",
"SkipCount",
":",
"skipCount",
",",
"Page... |
23,060 | all-23061 | [
"SetLogger",
"wraps",
"the",
"standard",
"library",
"log",
"package",
".",
"It",
"allows",
"the",
"internal",
"logging",
"of",
"s3gof3r",
"to",
"be",
"set",
"to",
"a",
"desired",
"output",
"and",
"format",
".",
"Setting",
"debug",
"to",
"true",
"enables",
... | [
"func",
"SetLogger",
"(",
"out",
"io",
".",
"Writer",
",",
"prefix",
"string",
",",
"<mask>",
"int",
",",
"debug",
"bool",
")",
"{",
"logger",
"=",
"internalLogger",
"{",
"log",
".",
"New",
"(",
"out",
",",
"prefix",
",",
"flag",
")",
",",
"debug",
... |
23,061 | all-23062 | [
"ServeHTTP",
"validates",
"an",
"incoming",
"Push",
"Pub",
"/",
"Sub",
"subscription",
"and",
"handle",
"them",
"."
] | [
"func",
"(",
"s",
"*",
"PushServer",
")",
"ServeHTTP",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
")",
"{",
"HTTPCode",
":=",
"http",
".",
"StatusOK",
"\n",
"subscription",
":=",
"\"",
"\"",
"\n",
"var",
"finalError... |
23,062 | all-23063 | [
"AddAt",
"injects",
"values",
"beginning",
"at",
"pos",
".",
"If",
"multiple",
"values",
"are",
"provided",
"in",
"entries",
"they",
"are",
"placed",
"in",
"the",
"same",
"order",
"they",
"are",
"provided",
"."
] | [
"func",
"(",
"l",
"*",
"List",
")",
"AddAt",
"(",
"pos",
"uint",
",",
"entries",
"...",
"interface",
"{",
"}",
")",
"{",
"l",
".",
"key",
".",
"Lock",
"(",
")",
"\n",
"defer",
"l",
".",
"key",
".",
"Unlock",
"(",
")",
"\n\n",
"l",
".",
"under... |
23,063 | all-23064 | [
"CompareIssue",
"two",
"Issues",
"and",
"return",
"true",
"if",
"left",
"should",
"sort",
"before",
"right",
"nolint",
":",
"gocyclo"
] | [
"func",
"CompareIssue",
"(",
"l",
",",
"r",
"Issue",
",",
"order",
"[",
"]",
"string",
")",
"bool",
"{",
"for",
"_",
",",
"key",
":=",
"range",
"order",
"{",
"switch",
"{",
"case",
"key",
"==",
"\"",
"\"",
"&&",
"l",
".",
"Path",
"!=",
"r",
"."... |
23,064 | all-23065 | [
"Close",
"gracefully",
"shuts",
"down",
"all",
"servers",
"/",
"listeners",
".",
"Client",
"requests",
"will",
"be",
"terminated",
"with",
"request",
"timeout",
".",
"After",
"timeout",
"enforce",
"remaning",
"requests",
"be",
"closed",
"immediately",
"."
] | [
"func",
"(",
"e",
"*",
"Etcd",
")",
"Close",
"(",
")",
"{",
"fields",
":=",
"[",
"]",
"zap",
".",
"Field",
"{",
"zap",
".",
"String",
"(",
"\"",
"\"",
",",
"e",
".",
"cfg",
".",
"Name",
")",
",",
"zap",
".",
"String",
"(",
"\"",
"\"",
",",
... |
23,065 | all-23066 | [
"CreateTags",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockClientSDK",
")",
"CreateTags",
"(",
"arg0",
"*",
"ec20",
".",
"CreateTagsInput",
")",
"(",
"*",
"ec20",
".",
"CreateTagsOutput",
",",
"error",
")",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\... |
23,066 | all-23067 | [
"serve",
"starts",
"a",
"http",
"server",
"and",
"serves",
"prometheus",
"metrics",
".",
"Meant",
"to",
"be",
"called",
"inside",
"a",
"goroutine",
"."
] | [
"func",
"serve",
"(",
")",
"{",
"http",
".",
"Handle",
"(",
"\"",
"\"",
",",
"promhttp",
".",
"<mask>",
"(",
")",
")",
"\n",
"logrus",
".",
"WithError",
"(",
"http",
".",
"ListenAndServe",
"(",
"\"",
"\"",
",",
"nil",
")",
")",
".",
"Fatal",
"(",... |
23,067 | all-23068 | [
"handleRemoveSubscription",
"removes",
"Subscription",
"sub",
"from",
"bookeeping",
".",
"If",
"this",
"was",
"the",
"last",
"Subscription",
"for",
"a",
"given",
"topic",
"it",
"will",
"also",
"announce",
"that",
"this",
"node",
"is",
"not",
"subscribing",
"to",... | [
"func",
"(",
"p",
"*",
"PubSub",
")",
"handleRemoveSubscription",
"(",
"<mask>",
"*",
"Subscription",
")",
"{",
"subs",
":=",
"p",
".",
"myTopics",
"[",
"sub",
".",
"topic",
"]",
"\n\n",
"if",
"subs",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n\n",
"s... |
23,068 | all-23069 | [
"/",
"*",
"Boolean",
"looks",
"for",
"the",
"specified",
"key",
"and",
"returns",
"it",
"as",
"a",
"bool",
".",
"If",
"not",
"found",
"the",
"default",
"value",
"def",
"is",
"returned",
"."
] | [
"func",
"(",
"config",
"*",
"Config",
")",
"Boolean",
"(",
"key",
"string",
",",
"def",
"bool",
")",
"bool",
"{",
"return",
"getBoolean",
"(",
"config",
".",
"values",
",",
"<mask>",
",",
"def",
")",
"\n",
"}"
] |
23,069 | all-23070 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"the",
"current",
"program",
"object"
] | [
"func",
"Uniform2iv",
"(",
"location",
"int32",
",",
"count",
"int32",
",",
"value",
"*",
"int32",
")",
"{",
"C",
".",
"glowUniform2iv",
"(",
"gpUniform2iv",
",",
"(",
"C",
".",
"GLint",
")",
"(",
"location",
")",
",",
"(",
"C",
".",
"GLsizei",
")",
... |
23,070 | all-23071 | [
"SchedulerLocator",
"builds",
"a",
"locator",
"from",
"the",
"given",
"href",
"."
] | [
"func",
"(",
"api",
"*",
"API",
")",
"SchedulerLocator",
"(",
"href",
"<mask>",
")",
"*",
"SchedulerLocator",
"{",
"return",
"&",
"SchedulerLocator",
"{",
"Href",
"(",
"href",
")",
",",
"api",
"}",
"\n",
"}"
] |
23,071 | all-23072 | [
"keep",
"finds",
"the",
"revision",
"to",
"be",
"kept",
"if",
"compact",
"is",
"called",
"at",
"given",
"atRev",
"."
] | [
"func",
"(",
"ki",
"*",
"keyIndex",
")",
"keep",
"(",
"atRev",
"int64",
",",
"available",
"map",
"[",
"revision",
"]",
"struct",
"{",
"}",
")",
"{",
"if",
"ki",
".",
"isEmpty",
"(",
")",
"{",
"return",
"\n",
"}",
"\n\n",
"genIdx",
",",
"revIndex",
... |
23,072 | all-23073 | [
"/",
"*",
"NewProgressBar",
"creates",
"a",
"new",
"ProgressBar",
".",
"parent",
"-",
"is",
"container",
"that",
"keeps",
"the",
"control",
".",
"width",
"and",
"heigth",
"-",
"are",
"minimal",
"size",
"of",
"the",
"control",
".",
"scale",
"-",
"the",
"w... | [
"func",
"CreateProgressBar",
"(",
"parent",
"Control",
",",
"width",
",",
"height",
"int",
",",
"scale",
"int",
")",
"*",
"ProgressBar",
"{",
"b",
":=",
"new",
"(",
"ProgressBar",
")",
"\n",
"b",
".",
"BaseControl",
"=",
"NewBaseControl",
"(",
")",
"\n\n... |
23,073 | all-23074 | [
"Schema",
"updates",
"begin",
"here",
"Copy",
"core",
".",
"https_address",
"to",
"cluster",
".",
"https_address",
"in",
"case",
"this",
"node",
"is",
"clustered",
"."
] | [
"func",
"updateFromV37",
"(",
"tx",
"*",
"sql",
".",
"Tx",
")",
"error",
"{",
"count",
",",
"err",
":=",
"query",
".",
"Count",
"(",
"tx",
",",
"\"",
"\"",
",",
"\"",
"\"",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"errors",
".",
"Wra... |
23,074 | all-23075 | [
"NewResponseWriter",
"creates",
"a",
"ResponseWriter",
"that",
"wraps",
"an",
"http",
".",
"ResponseWriter"
] | [
"func",
"NewResponseWriter",
"(",
"<mask>",
"string",
",",
"rw",
"http",
".",
"ResponseWriter",
")",
"ResponseWriter",
"{",
"return",
"&",
"responseWriter",
"{",
"method",
",",
"rw",
",",
"0",
",",
"0",
",",
"nil",
"}",
"\n",
"}"
] |
23,075 | all-23076 | [
"Set",
"is",
"required",
"for",
"kingpin",
"interfaces",
"to",
"allow",
"command",
"line",
"params",
"to",
"be",
"set",
"to",
"our",
"map",
"datatype"
] | [
"func",
"(",
"o",
"*",
"ListComplex64Option",
")",
"Set",
"(",
"value",
"string",
")",
"error",
"{",
"val",
":=",
"Complex64Option",
"{",
"}",
"\n",
"val",
".",
"Set",
"(",
"value",
")",
"\n",
"*",
"o",
"=",
"<mask>",
"(",
"*",
"o",
",",
"val",
"... |
23,076 | all-23077 | [
"specify",
"implementation",
"-",
"specific",
"hints"
] | [
"func",
"Hint",
"(",
"<mask>",
"uint32",
",",
"mode",
"uint32",
")",
"{",
"C",
".",
"glowHint",
"(",
"gpHint",
",",
"(",
"C",
".",
"GLenum",
")",
"(",
"target",
")",
",",
"(",
"C",
".",
"GLenum",
")",
"(",
"mode",
")",
")",
"\n",
"}"
] |
23,077 | all-23078 | [
"GetWithExpiration",
"returns",
"an",
"item",
"and",
"its",
"expiration",
"time",
"from",
"the",
"cache",
".",
"It",
"returns",
"the",
"item",
"or",
"nil",
"the",
"expiration",
"time",
"if",
"one",
"is",
"set",
"(",
"if",
"the",
"item",
"never",
"expires",... | [
"func",
"(",
"c",
"*",
"cache",
")",
"GetWithExpiration",
"(",
"k",
"string",
")",
"(",
"interface",
"{",
"}",
",",
"time",
".",
"Time",
",",
"bool",
")",
"{",
"c",
".",
"mu",
".",
"RLock",
"(",
")",
"\n",
"// \"Inlining\" of get and Expired",
"item",
... |
23,078 | all-23079 | [
"indicate",
"modifications",
"to",
"a",
"range",
"of",
"a",
"mapped",
"buffer"
] | [
"func",
"FlushMappedNamedBufferRange",
"(",
"buffer",
"uint32",
",",
"<mask>",
"int",
",",
"length",
"int",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpFlushMappedNamedBufferRange",
",",
"3",
",",
"uintptr",
"(",
"buffer",
")",
",",
"uintptr",
"(",
"offset",
... |
23,079 | all-23080 | [
"HelpProvider",
"constructs",
"the",
"PluginHelp",
"for",
"this",
"plugin",
"that",
"takes",
"into",
"account",
"enabled",
"repositories",
".",
"HelpProvider",
"defines",
"the",
"type",
"for",
"function",
"that",
"construct",
"the",
"PluginHelp",
"for",
"plugins",
... | [
"func",
"HelpProvider",
"(",
"enabledRepos",
"[",
"]",
"string",
")",
"(",
"*",
"pluginhelp",
".",
"PluginHelp",
",",
"error",
")",
"{",
"return",
"&",
"pluginhelp",
".",
"PluginHelp",
"{",
"<mask>",
":",
"`The needs-rebase plugin manages the '`",
"+",
"labels",... |
23,080 | all-23081 | [
"HasFillMax",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"s",
"*",
"Style",
")",
"HasFillMax",
"(",
")",
"bool",
"{",
"if",
"s",
"!=",
"nil",
"&&",
"s",
".",
"FillMax",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
23,081 | all-23082 | [
"SelectRegion",
"is",
"a",
"wrapper",
"around",
"gtk_label_select_region",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"SelectRegion",
"(",
"startOffset",
",",
"endOffset",
"int",
")",
"{",
"C",
".",
"gtk_label_select_region",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"gint",
"(",
"startOffset",
")",
",",
"C",
".",
"gint"... |
23,082 | all-23083 | [
"RecordDigestUncompressedPair",
"records",
"that",
"the",
"uncompressed",
"version",
"of",
"anyDigest",
"is",
"uncompressed",
".",
"It’s",
"allowed",
"for",
"anyDigest",
"==",
"uncompressed",
".",
"WARNING",
":",
"Only",
"call",
"this",
"for",
"LOCALLY",
"VERIFIED",... | [
"func",
"(",
"mem",
"*",
"cache",
")",
"RecordDigestUncompressedPair",
"(",
"anyDigest",
"digest",
".",
"Digest",
",",
"uncompressed",
"digest",
".",
"Digest",
")",
"{",
"mem",
".",
"mutex",
".",
"Lock",
"(",
")",
"\n",
"defer",
"mem",
".",
"mutex",
".",... |
23,083 | all-23084 | [
"BuildTypeDecoder",
"takes",
"a",
"list",
"of",
"interfaces",
"and",
"stores",
"them",
"internally",
"as",
"a",
"list",
"of",
"typeMappings",
"in",
"the",
"format",
"below",
".",
"MyMessage",
":",
"TypeOf",
"(",
"ecstcs",
".",
"MyMessage",
")"
] | [
"func",
"BuildTypeDecoder",
"(",
"recognizedTypes",
"[",
"]",
"interface",
"{",
"}",
")",
"TypeDecoder",
"{",
"typeMappings",
":=",
"make",
"(",
"map",
"[",
"string",
"]",
"reflect",
".",
"Type",
")",
"\n",
"for",
"_",
",",
"recognizedType",
":=",
"<mask>"... |
23,084 | all-23085 | [
"WithTimeout",
"adds",
"the",
"timeout",
"to",
"the",
"put",
"apps",
"app",
"params"
] | [
"func",
"(",
"o",
"*",
"PutAppsAppParams",
")",
"WithTimeout",
"(",
"timeout",
"<mask>",
".",
"Duration",
")",
"*",
"PutAppsAppParams",
"{",
"o",
".",
"SetTimeout",
"(",
"timeout",
")",
"\n",
"return",
"o",
"\n",
"}"
] |
23,085 | all-23086 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SetBreakpointsActiveParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger9",
"(",
"&",
"w",
",",
"... |
23,086 | all-23087 | [
"Do",
"executes",
"Network",
".",
"getRequestPostData",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"postData",
"-",
"Request",
"body",
"string",
"omitting",
"files",
"from",
"multipart",
"requests"
] | [
"func",
"(",
"p",
"*",
"GetRequestPostDataParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"postData",
"string",
",",
"err",
"error",
")",
"{",
"// execute",
"var",
"res",
"GetRequestPostDataReturns",
"\n",
"err",
"=",
"cdp",
".",
"Execu... |
23,087 | all-23088 | [
"From",
"returns",
"a",
"new",
"context",
"with",
"key",
"/",
"value",
"pairs",
"copied",
"both",
"from",
"the",
"list",
"and",
"the",
"context",
"."
] | [
"func",
"(",
"l",
"List",
")",
"From",
"(",
"ctx",
"context",
".",
"Context",
")",
"<mask>",
"{",
"ctx",
"=",
"newContext",
"(",
"ctx",
",",
"l",
")",
"\n",
"return",
"&",
"contextT",
"{",
"ctx",
":",
"ctx",
"}",
"\n",
"}"
] |
23,088 | all-23089 | [
"splitMappingsAt",
"ensures",
"that",
"a",
"is",
"not",
"in",
"the",
"middle",
"of",
"any",
"mapping",
".",
"Splits",
"mappings",
"as",
"necessary",
"."
] | [
"func",
"(",
"p",
"*",
"Process",
")",
"splitMappingsAt",
"(",
"a",
"Address",
")",
"{",
"for",
"_",
",",
"m",
":=",
"range",
"p",
".",
"memory",
".",
"mappings",
"{",
"if",
"a",
"<",
"m",
".",
"min",
"||",
"a",
">",
"m",
".",
"max",
"{",
"co... |
23,089 | all-23090 | [
"typeObject",
"takes",
"an",
"address",
"and",
"a",
"type",
"for",
"the",
"data",
"at",
"that",
"address",
".",
"For",
"each",
"pointer",
"it",
"finds",
"in",
"the",
"memory",
"at",
"that",
"address",
"it",
"calls",
"add",
"with",
"the",
"pointer",
"and"... | [
"func",
"(",
"p",
"*",
"Process",
")",
"typeObject",
"(",
"a",
"core",
".",
"Address",
",",
"t",
"*",
"<mask>",
",",
"r",
"reader",
",",
"add",
"func",
"(",
"core",
".",
"Address",
",",
"*",
"Type",
",",
"int64",
")",
")",
"{",
"ptrSize",
":=",
... |
23,090 | all-23091 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"StickyPositionConstraint",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree",
"(",
"... |
23,091 | all-23092 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"SnapshotCommandLogParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"<mask>",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree2",
"(",
... |
23,092 | all-23093 | [
"Sets",
"the",
"output",
"path",
"for",
"generated",
"snapshots",
".",
"The",
"directory",
"will",
"be",
"created",
"with",
"the",
"specified",
"permission",
"bits",
"if",
"it",
"does",
"not",
"already",
"exist",
".",
"If",
"perm",
"is",
"0",
"a",
"default... | [
"func",
"(",
"t",
"*",
"BTTracer",
")",
"SetOutputPath",
"(",
"path",
"string",
",",
"perm",
"<mask>",
".",
"FileMode",
")",
"error",
"{",
"if",
"perm",
"==",
"0",
"{",
"perm",
"=",
"0755",
"\n",
"}",
"\n\n",
"if",
"err",
":=",
"os",
".",
"MkdirAll... |
23,093 | all-23094 | [
"TODO",
":",
"use",
"balancer",
".",
"epsToAddrs"
] | [
"func",
"epsToAddrs",
"(",
"eps",
"...",
"string",
")",
"(",
"addrs",
"[",
"]",
"resolver",
".",
"Address",
")",
"{",
"addrs",
"=",
"make",
"(",
"[",
"]",
"resolver",
".",
"Address",
",",
"0",
",",
"len",
"(",
"eps",
")",
")",
"\n",
"for",
"_",
... |
23,094 | all-23095 | [
"BuildLoginRequest",
"builds",
"session",
"create",
"requests",
"from",
"users",
"email",
"and",
"password",
"."
] | [
"func",
"(",
"b",
"*",
"basicLoginRequestBuilder",
")",
"BuildLoginRequest",
"(",
"host",
"string",
")",
"(",
"*",
"http",
".",
"Request",
",",
"error",
")",
"{",
"if",
"<mask>",
"==",
"\"",
"\"",
"{",
"host",
"=",
"\"",
"\"",
"\n",
"}",
"\n",
"jsonS... |
23,095 | all-23096 | [
"Get",
"a",
"value",
"from",
"the",
"ENV",
".",
"If",
"it",
"doesn",
"t",
"exist",
"the",
"default",
"value",
"will",
"be",
"returned",
"."
] | [
"func",
"Get",
"(",
"key",
"string",
",",
"<mask>",
"string",
")",
"string",
"{",
"gil",
".",
"RLock",
"(",
")",
"\n",
"defer",
"gil",
".",
"RUnlock",
"(",
")",
"\n",
"if",
"v",
",",
"ok",
":=",
"env",
"[",
"key",
"]",
";",
"ok",
"{",
"return",... |
23,096 | all-23097 | [
"GetNew",
"returns",
"a",
"new",
"previously",
"unselected",
"peer",
"from",
"the",
"peer",
"list",
"or",
"nil",
"if",
"no",
"new",
"unselected",
"peer",
"can",
"be",
"found",
"."
] | [
"func",
"(",
"l",
"*",
"PeerList",
")",
"GetNew",
"(",
"prevSelected",
"map",
"[",
"string",
"]",
"struct",
"{",
"}",
")",
"(",
"*",
"Peer",
",",
"error",
")",
"{",
"l",
".",
"Lock",
"(",
")",
"\n",
"defer",
"l",
".",
"Unlock",
"(",
")",
"\n",
... |
23,097 | all-23098 | [
"Int32",
"returns",
"param",
"as",
"int32"
] | [
"func",
"(",
"p",
"Param",
")",
"Int32",
"(",
")",
"(",
"int32",
",",
"error",
")",
"{",
"i",
",",
"err",
":=",
"strconv",
".",
"ParseInt",
"(",
"string",
"(",
"p",
")",
",",
"10",
",",
"32",
")",
"\n",
"return",
"int32",
"(",
"i",
")",
",",
... |
23,098 | all-23099 | [
"Create",
"takes",
"the",
"representation",
"of",
"a",
"prowJob",
"and",
"creates",
"it",
".",
"Returns",
"the",
"server",
"s",
"representation",
"of",
"the",
"prowJob",
"and",
"an",
"error",
"if",
"there",
"is",
"any",
"."
] | [
"func",
"(",
"c",
"*",
"prowJobs",
")",
"Create",
"(",
"prowJob",
"*",
"v1",
".",
"ProwJob",
")",
"(",
"result",
"*",
"v1",
".",
"ProwJob",
",",
"err",
"error",
")",
"{",
"result",
"=",
"&",
"v1",
".",
"ProwJob",
"{",
"}",
"\n",
"err",
"=",
"c"... |
23,099 | all-23100 | [
"This",
"method",
"loads",
"basic",
"config",
"and",
"returns",
"a",
"copy",
"of",
"the",
"config",
"object",
"."
] | [
"func",
"(",
"s",
"*",
"SAMLAuthScheme",
")",
"loadConfig",
"(",
")",
"(",
"BaseConfig",
",",
"error",
")",
"{",
"if",
"s",
".",
"BaseConfig",
".",
"EntityID",
"!=",
"\"",
"\"",
"{",
"return",
"s",
".",
"BaseConfig",
",",
"nil",
"\n",
"}",
"\n",
"i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.