id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
4,900 | all-4901 | [
"Mount",
"pfs",
"to",
"mountPoint",
"opts",
"may",
"be",
"left",
"nil",
"."
] | [
"func",
"Mount",
"(",
"c",
"*",
"client",
".",
"APIClient",
",",
"mountPoint",
"string",
",",
"opts",
"*",
"Options",
")",
"error",
"{",
"nfs",
":=",
"pathfs",
".",
"NewPathNodeFs",
"(",
"newFileSystem",
"(",
"c",
",",
"opts",
".",
"getCommits",
"(",
"... |
4,901 | all-4902 | [
"DeleteResource",
"deletes",
"a",
"resource",
"if",
"it",
"exists",
"errors",
"otherwise"
] | [
"func",
"(",
"s",
"*",
"Storage",
")",
"DeleteResource",
"(",
"name",
"string",
")",
"error",
"{",
"return",
"s",
".",
"resources",
".",
"Delete",
"(",
"<mask>",
")",
"\n",
"}"
] |
4,902 | all-4903 | [
"GetName",
"returns",
"the",
"Name",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"c",
"*",
"Creator",
")",
"GetName",
"(",
")",
"string",
"{",
"if",
"c",
"==",
"nil",
"||",
"c",
".",
"Name",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"c",
".",
"<mask>",
"\n",
"}"
] |
4,903 | all-4904 | [
"sendENIStateChangeWithRetries",
"invokes",
"the",
"sendENIStateChange",
"method",
"with",
"backoff",
"and",
"retries",
".",
"Retries",
"are",
"only",
"effective",
"if",
"sendENIStateChange",
"returns",
"an",
"unmanagedENIError",
".",
"We",
"re",
"effectively",
"waiting... | [
"func",
"(",
"udevWatcher",
"*",
"UdevWatcher",
")",
"sendENIStateChangeWithRetries",
"(",
"parentCtx",
"context",
".",
"Context",
",",
"macAddress",
"string",
",",
"timeout",
"time",
".",
"Duration",
")",
"error",
"{",
"backoff",
":=",
"retry",
".",
"NewExponen... |
4,904 | all-4905 | [
"getV3Filter",
"returns",
"a",
"V3",
"filter",
"function",
"from",
"a",
"code",
"byte",
"slice",
"."
] | [
"func",
"getV3Filter",
"(",
"code",
"[",
"]",
"byte",
")",
"(",
"v3Filter",
",",
"error",
")",
"{",
"// check if filter is a known standard filter",
"c",
":=",
"crc32",
".",
"ChecksumIEEE",
"(",
"code",
")",
"\n",
"for",
"_",
",",
"f",
":=",
"<mask>",
"sta... |
4,905 | all-4906 | [
"title",
":",
"platform",
"list",
"path",
":",
"/",
"platforms",
"method",
":",
"GET",
"produce",
":",
"application",
"/",
"json",
"responses",
":",
"200",
":",
"List",
"platforms",
"204",
":",
"No",
"content",
"401",
":",
"Unauthorized"
] | [
"func",
"platformList",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"<mask>",
",",
"t",
"auth",
".",
"Token",
")",
"error",
"{",
"canUsePlat",
":=",
"permission",
".",
"Check",
"(",
"t",
",",
"permission",
".",
"PermPlatformUpdat... |
4,906 | all-4907 | [
"Execute",
"-",
"generates",
"concourse",
"pipeline",
"and",
"tasks"
] | [
"func",
"(",
"c",
"*",
"GenerateConcoursePipelineCommand",
")",
"Execute",
"(",
"[",
"]",
"string",
")",
"error",
"{",
"lo",
".",
"G",
".",
"Warning",
"(",
"\"",
"\"",
")",
"\n",
"const",
"varsFileName",
"=",
"\"",
"\"",
"\n",
"const",
"pipelineFileName"... |
4,907 | all-4908 | [
"HasPrecision",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"Widget",
")",
"HasPrecision",
"(",
")",
"bool",
"{",
"if",
"w",
"!=",
"nil",
"&&",
"w",
".",
"Precision",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
4,908 | all-4909 | [
"NewFilename",
"should",
"be",
"named",
"TableFilepath",
"--",
"it",
"combines",
"the",
"dir",
"with",
"the",
"ID",
"to",
"make",
"a",
"table",
"filepath",
"."
] | [
"func",
"NewFilename",
"(",
"id",
"uint64",
",",
"dir",
"string",
")",
"string",
"{",
"return",
"filepath",
".",
"Join",
"(",
"dir",
",",
"IDToFilename",
"(",
"<mask>",
")",
")",
"\n",
"}"
] |
4,909 | all-4910 | [
"HasId",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"a",
"*",
"Alert",
")",
"HasId",
"(",
")",
"bool",
"{",
"if",
"a",
"!=",
"nil",
"&&",
"a",
".",
"Id",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
4,910 | all-4911 | [
"WithRequest",
"specifies",
"the",
"details",
"of",
"the",
"HTTP",
"request",
"that",
"will",
"be",
"used",
"to",
"confirm",
"that",
"the",
"Provider",
"provides",
"an",
"API",
"listening",
"on",
"the",
"given",
"interface",
".",
"Mandatory",
"."
] | [
"func",
"(",
"i",
"*",
"Interaction",
")",
"WithRequest",
"(",
"request",
"Request",
")",
"*",
"Interaction",
"{",
"i",
".",
"Request",
"=",
"request",
"\n\n",
"// Check if someone tried to add an object as a string representation",
"// as per original allowed implementatio... |
4,911 | all-4912 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"EventExceptionThrown",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime33",
"(",
"&",
... |
4,912 | all-4913 | [
"frameRangeMatches",
"breaks",
"down",
"the",
"string",
"frame",
"range",
"into",
"groups",
"of",
"range",
"matches",
"for",
"further",
"processing",
"."
] | [
"func",
"frameRangeMatches",
"(",
"frange",
"string",
")",
"(",
"[",
"]",
"[",
"]",
"string",
",",
"error",
")",
"{",
"for",
"_",
",",
"k",
":=",
"range",
"defaultPadding",
".",
"AllChars",
"(",
")",
"{",
"frange",
"=",
"strings",
".",
"Replace",
"("... |
4,913 | all-4914 | [
"GetId",
"returns",
"the",
"Id",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"s",
"*",
"ScreenboardMonitor",
")",
"GetId",
"(",
")",
"int",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"0",
"\n",
"}",
"\n",
"return",
"*",
"s",
".",
"Id",
"\n",
"}"
] |
4,914 | all-4915 | [
"SRS",
"returns",
"the",
"projection",
"of",
"the",
"map",
"."
] | [
"func",
"(",
"m",
"*",
"<mask>",
")",
"SRS",
"(",
")",
"string",
"{",
"return",
"C",
".",
"GoString",
"(",
"C",
".",
"mapnik_map_get_srs",
"(",
"m",
".",
"m",
")",
")",
"\n",
"}"
] |
4,915 | all-4916 | [
"visit",
"will",
"call",
"a",
"node",
"visitor",
"on",
"each",
"node",
"that",
"overlaps",
"the",
"given",
"interval"
] | [
"func",
"(",
"x",
"*",
"intervalNode",
")",
"visit",
"(",
"iv",
"*",
"Interval",
",",
"nv",
"nodeVisitor",
")",
"bool",
"{",
"if",
"x",
"==",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n",
"v",
":=",
"iv",
".",
"Compare",
"(",
"&",
"x",
".",
"i... |
4,916 | all-4917 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"AddScriptToEvaluateOnNewDocumentReturns",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage8... |
4,917 | all-4918 | [
"Collaboration",
"retrieves",
"a",
"detailed",
"view",
"of",
"one",
"of",
"the",
"current",
"user",
"s",
"collaborations"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"Collaboration",
"(",
"identifier",
"string",
")",
"(",
"*",
"Collaboration",
",",
"error",
")",
"{",
"col",
":=",
"new",
"(",
"Collaboration",
")",
"\n",
"_",
",",
"err",
":=",
"c",
".",
"MakeApiRequest",
"(",
"... |
4,918 | all-4919 | [
"UnmarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Unmarshaler",
"."
] | [
"func",
"(",
"t",
"*",
"AuthChallengeResponseResponse",
")",
"UnmarshalEasyJSON",
"(",
"in",
"*",
"jlexer",
".",
"Lexer",
")",
"{",
"switch",
"AuthChallengeResponseResponse",
"(",
"in",
".",
"String",
"(",
")",
")",
"{",
"case",
"AuthChallengeResponseResponseDefau... |
4,919 | all-4920 | [
"fileName",
"returns",
"the",
"file",
"name",
"."
] | [
"func",
"(",
"l",
"*",
"<mask>",
")",
"fileName",
"(",
")",
"string",
"{",
"return",
"l",
".",
"file",
".",
"path",
"+",
"dot",
"+",
"l",
".",
"opts",
".",
"Extension",
"\n",
"}"
] |
4,920 | all-4921 | [
"WithAPICallFunc",
"returns",
"a",
"copy",
"of",
"the",
"parent",
"context",
"that",
"will",
"cause",
"API",
"calls",
"to",
"invoke",
"f",
"instead",
"of",
"their",
"normal",
"operation",
".",
"This",
"is",
"intended",
"for",
"advanced",
"users",
"only",
"."... | [
"func",
"WithAPICallFunc",
"(",
"ctx",
"context",
".",
"Context",
",",
"f",
"APICallFunc",
")",
"context",
".",
"Context",
"{",
"return",
"internal",
".",
"WithCallOverride",
"(",
"ctx",
",",
"<mask>",
".",
"CallOverrideFunc",
"(",
"f",
")",
")",
"\n",
"}"... |
4,921 | all-4922 | [
"GenerateCACertificate",
"generates",
"a",
"new",
"certificate",
"authority",
"from",
"the",
"specified",
"org",
"and",
"bit",
"size",
"and",
"stores",
"the",
"resulting",
"certificate",
"and",
"key",
"file",
"in",
"the",
"arguments",
"."
] | [
"func",
"(",
"xcg",
"*",
"X509CertGenerator",
")",
"GenerateCACertificate",
"(",
"certFile",
",",
"keyFile",
",",
"org",
"string",
",",
"bits",
"int",
")",
"error",
"{",
"template",
",",
"err",
":=",
"xcg",
".",
"newCertificate",
"(",
"org",
")",
"\n",
"... |
4,922 | all-4923 | [
"flattenVmwareUplinkPortTeamingPolicy",
"reads",
"various",
"fields",
"from",
"a",
"VmwareUplinkPortTeamingPolicy",
"into",
"the",
"passed",
"in",
"ResourceData",
"."
] | [
"func",
"flattenVmwareUplinkPortTeamingPolicy",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"obj",
"*",
"<mask>",
".",
"VmwareUplinkPortTeamingPolicy",
")",
"error",
"{",
"if",
"obj",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"structure",
".... |
4,923 | all-4924 | [
"Get",
"returns",
"the",
"element",
"at",
"position",
"i"
] | [
"func",
"(",
"s",
"*",
"Stack",
")",
"Get",
"(",
"i",
"int",
")",
"(",
"<mask>",
"{",
"}",
",",
"error",
")",
"{",
"if",
"i",
"<",
"0",
"||",
"i",
">=",
"len",
"(",
"*",
"s",
")",
"{",
"return",
"nil",
",",
"errors",
".",
"New",
"(",
"str... |
4,924 | all-4925 | [
"DesiredTerminal",
"returns",
"true",
"if",
"the",
"cgroup",
"s",
"desired",
"status",
"is",
"REMOVED"
] | [
"func",
"(",
"vol",
"*",
"VolumeResource",
")",
"DesiredTerminal",
"(",
")",
"bool",
"{",
"vol",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"vol",
".",
"<mask>",
".",
"RUnlock",
"(",
")",
"\n\n",
"return",
"vol",
".",
"desiredStatusUnsafe",
"=... |
4,925 | all-4926 | [
"migrateVSphereVirtualMachineStateV3",
"migrates",
"the",
"state",
"of",
"the",
"vsphere_virtual_machine",
"from",
"version",
"2",
"to",
"version",
"3",
"."
] | [
"func",
"migrateVSphereVirtualMachineStateV3",
"(",
"is",
"*",
"terraform",
".",
"InstanceState",
",",
"meta",
"interface",
"{",
"}",
")",
"error",
"{",
"// All we really preserve from the old state is the UUID of the virtual",
"// machine. We leverage some of the special parts of ... |
4,926 | all-4927 | [
"DefaultParser",
"sets",
"up",
"and",
"assigns",
"the",
"default",
"parser",
"to",
"be",
"used",
"by",
"Xslate",
"."
] | [
"func",
"DefaultParser",
"(",
"tx",
"*",
"Xslate",
",",
"args",
"Args",
")",
"error",
"{",
"syntax",
",",
"ok",
":=",
"args",
".",
"Get",
"(",
"\"",
"\"",
")",
"\n",
"if",
"!",
"ok",
"{",
"syntax",
"=",
"\"",
"\"",
"\n",
"}",
"\n\n",
"switch",
... |
4,927 | all-4928 | [
"SetCustomDirectory",
"sets",
"the",
"default",
"location",
"for",
"the",
"GeoIP",
".",
"dat",
"files",
"used",
"when",
"calling",
"OpenType",
"()"
] | [
"func",
"SetCustomDirectory",
"(",
"dir",
"<mask>",
")",
"{",
"cdir",
":=",
"C",
".",
"CString",
"(",
"dir",
")",
"\n",
"// GeoIP doesn't copy the string, so don't free it when we're done here.",
"// defer C.free(unsafe.Pointer(cdir))",
"C",
".",
"GeoIP_setup_custom_directory... |
4,928 | all-4929 | [
"Wait",
"blocks",
"until",
"all",
"the",
"jobs",
"in",
"the",
"Pool",
"are",
"done",
"."
] | [
"func",
"(",
"pool",
"*",
"Pool",
")",
"Wait",
"(",
")",
"{",
"working_pipe",
":=",
"<mask>",
"(",
"chan",
"bool",
")",
"\n",
"for",
"{",
"pool",
".",
"working_wanted_pipe",
"<-",
"working_pipe",
"\n",
"if",
"!",
"<-",
"working_pipe",
"{",
"break",
"\n... |
4,929 | all-4930 | [
"parseGeneralizedTime",
"parses",
"the",
"GeneralizedTime",
"from",
"the",
"given",
"byte",
"slice",
"and",
"returns",
"the",
"resulting",
"time",
"."
] | [
"func",
"parseGeneralizedTime",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"(",
"ret",
"time",
".",
"Time",
",",
"err",
"error",
")",
"{",
"const",
"formatStr",
"=",
"\"",
"\"",
"\n",
"s",
":=",
"string",
"(",
"bytes",
")",
"\n\n",
"if",
"ret",
",",
"er... |
4,930 | all-4931 | [
"Body",
"renders",
"the",
"<body",
">",
"for",
"JUnit",
"tests"
] | [
"func",
"(",
"lens",
"Lens",
")",
"Body",
"(",
"artifacts",
"[",
"]",
"lenses",
".",
"Artifact",
",",
"resourceDir",
"string",
",",
"data",
"string",
")",
"string",
"{",
"type",
"testResults",
"struct",
"{",
"junit",
"[",
"]",
"junit",
".",
"Result",
"... |
4,931 | all-4932 | [
"New",
"-",
"Creates",
"a",
"new",
"table",
"."
] | [
"func",
"New",
"(",
"<mask>",
"[",
"]",
"string",
")",
"*",
"Table",
"{",
"return",
"&",
"Table",
"{",
"Fields",
":",
"fields",
",",
"Rows",
":",
"make",
"(",
"[",
"]",
"map",
"[",
"string",
"]",
"string",
",",
"0",
")",
",",
"fieldSizes",
":",
... |
4,932 | all-4933 | [
"GetTitle",
"returns",
"the",
"Title",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"h",
"*",
"HeatmapDefinition",
")",
"GetTitle",
"(",
")",
"string",
"{",
"if",
"h",
"==",
"nil",
"||",
"h",
".",
"Title",
"==",
"nil",
"{",
"<mask>",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"h",
".",
"Title",
"\n",
"}"
] |
4,933 | all-4934 | [
"UnmarshalYAML",
"implements",
"the",
"yaml",
".",
"Unmarshaler",
"interface",
"."
] | [
"func",
"(",
"c",
"*",
"SDConfig",
")",
"UnmarshalYAML",
"(",
"unmarshal",
"func",
"(",
"interface",
"{",
"}",
")",
"error",
")",
"error",
"{",
"*",
"c",
"=",
"DefaultSDConfig",
"\n",
"type",
"plain",
"SDConfig",
"\n",
"err",
":=",
"unmarshal",
"(",
"(... |
4,934 | all-4935 | [
"ResolveStorePath",
"returns",
"the",
"store",
"path",
"where",
"the",
"machine",
"is"
] | [
"func",
"(",
"d",
"*",
"BaseDriver",
")",
"ResolveStorePath",
"(",
"<mask>",
"string",
")",
"string",
"{",
"return",
"filepath",
".",
"Join",
"(",
"d",
".",
"StorePath",
",",
"\"",
"\"",
",",
"d",
".",
"MachineName",
",",
"file",
")",
"\n",
"}"
] |
4,935 | all-4936 | [
"Start",
"the",
"WALWatcher",
"."
] | [
"func",
"(",
"w",
"*",
"WALWatcher",
")",
"Start",
"(",
")",
"{",
"w",
".",
"setMetrics",
"(",
")",
"\n",
"level",
".",
"Info",
"(",
"w",
".",
"logger",
")",
".",
"Log",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"w",
".",
"nam... |
4,936 | all-4937 | [
"GetExchangeRate",
"gets",
"the",
"exchange",
"rate",
"between",
"two",
"specified",
"currencies"
] | [
"func",
"(",
"c",
"Client",
")",
"GetExchangeRate",
"(",
"from",
"string",
",",
"to",
"string",
")",
"(",
"float64",
",",
"error",
")",
"{",
"exchanges",
",",
"err",
":=",
"c",
".",
"GetExchangeRates",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
... |
4,937 | all-4938 | [
"MachineProviderConfigs",
"will",
"return",
"all",
"MachineProviderConfigs",
"for",
"a",
"cluster"
] | [
"func",
"(",
"c",
"*",
"Cluster",
")",
"MachineProviderConfigs",
"(",
")",
"[",
"]",
"*",
"MachineProviderConfig",
"{",
"var",
"providerConfigs",
"[",
"]",
"*",
"MachineProviderConfig",
"\n",
"for",
"_",
",",
"machineSet",
":=",
"range",
"c",
".",
"MachineSe... |
4,938 | all-4939 | [
"HasValidTLD",
"checks",
"that",
"a",
"domain",
"ends",
"in",
"a",
"valid",
"TLD",
"that",
"was",
"delegated",
"in",
"the",
"root",
"DNS",
"at",
"the",
"time",
"specified",
"."
] | [
"func",
"HasValidTLD",
"(",
"domain",
"string",
",",
"when",
"<mask>",
".",
"Time",
")",
"bool",
"{",
"labels",
":=",
"strings",
".",
"Split",
"(",
"strings",
".",
"ToLower",
"(",
"domain",
")",
",",
"\"",
"\"",
")",
"\n",
"rightLabel",
":=",
"labels",... |
4,939 | all-4940 | [
"GetQueryStringOk",
"returns",
"a",
"tuple",
"with",
"the",
"QueryString",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"q",
"*",
"QueryConfig",
")",
"GetQueryStringOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"q",
"==",
"nil",
"||",
"q",
".",
"QueryString",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
... |
4,940 | all-4941 | [
"Scan",
"implements",
"the",
"database",
"/",
"sql",
"/",
"Scanner",
"interface",
"."
] | [
"func",
"(",
"l",
"*",
"Lob",
")",
"Scan",
"(",
"src",
"interface",
"{",
"}",
")",
"error",
"{",
"if",
"l",
".",
"wr",
"==",
"nil",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"l",
")",
"\n",
"}",
"\n\n",
"ws",
",",
"ok",
":=... |
4,941 | all-4942 | [
"serviceFunc",
"returns",
"or",
"accumulates",
"health",
"service",
"dependencies",
"."
] | [
"func",
"serviceFunc",
"(",
"b",
"*",
"Brain",
",",
"used",
",",
"missing",
"*",
"dep",
".",
"Set",
")",
"func",
"(",
"...",
"string",
")",
"(",
"[",
"]",
"*",
"dep",
".",
"HealthService",
",",
"error",
")",
"{",
"return",
"func",
"(",
"s",
"..."... |
4,942 | all-4943 | [
"Debug",
"logs",
"msg",
"to",
"all",
"added",
"loggers",
"at",
"LogLevel",
".",
"LevelDebug"
] | [
"func",
"(",
"la",
"*",
"LogAdapter",
")",
"Debug",
"(",
"msg",
"string",
")",
"error",
"{",
"return",
"la",
".",
"<mask>",
"(",
"LevelDebug",
",",
"nil",
",",
"msg",
")",
"\n",
"}"
] |
4,943 | all-4944 | [
"PrintRepoHeader",
"prints",
"a",
"repo",
"header",
"."
] | [
"func",
"PrintRepoHeader",
"(",
"w",
"<mask>",
".",
"Writer",
",",
"printAuth",
"bool",
")",
"{",
"if",
"printAuth",
"{",
"fmt",
".",
"Fprint",
"(",
"w",
",",
"RepoAuthHeader",
")",
"\n",
"return",
"\n",
"}",
"\n",
"fmt",
".",
"Fprint",
"(",
"w",
","... |
4,944 | all-4945 | [
"StartDatastore",
"starts",
"a",
"datastore",
"segment",
"."
] | [
"func",
"(",
"t",
"*",
"tx",
")",
"StartDatastore",
"(",
"table",
",",
"operation",
",",
"sql",
",",
"rollupName",
"string",
")",
"error",
"{",
"t",
".",
"mtx",
".",
"Lock",
"(",
")",
"\n",
"defer",
"t",
".",
"mtx",
".",
"Unlock",
"(",
")",
"\n\n... |
4,945 | all-4946 | [
"Determines",
"if",
"a",
"name",
"corresponds",
"to",
"a",
"shader",
"object"
] | [
"func",
"IsShader",
"(",
"shader",
"uint32",
")",
"bool",
"{",
"ret",
":=",
"C",
".",
"glowIsShader",
"(",
"gpIsShader",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"shader",
")",
")",
"\n",
"return",
"<mask>",
"==",
"TRUE",
"\n",
"}"
] |
4,946 | all-4947 | [
"HasMethod",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"s",
"*",
"SyntheticsRequest",
")",
"HasMethod",
"(",
")",
"bool",
"{",
"if",
"s",
"!=",
"nil",
"&&",
"s",
".",
"Method",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
4,947 | all-4948 | [
"GetTagTable",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_text_buffer_get_tag_table",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"TextBuffer",
")",
"GetTagTable",
"(",
")",
"(",
"*",
"TextTagTable",
",",
"<mask>",
")",
"{",
"c",
":=",
"C",
".",
"gtk_text_buffer_get_tag_table",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"... |
4,948 | all-4949 | [
"Proxy",
"is",
"a",
"proxy",
"between",
"tsuru",
"and",
"the",
"service",
".",
"This",
"method",
"allow",
"customized",
"service",
"methods",
"."
] | [
"func",
"Proxy",
"(",
"service",
"*",
"Service",
",",
"path",
"string",
",",
"evt",
"*",
"event",
".",
"<mask>",
",",
"requestID",
"string",
",",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
")",
"error",
"{",
"endpoint",
... |
4,949 | all-4950 | [
"GetCreator",
"returns",
"the",
"Creator",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"a",
"*",
"Alert",
")",
"GetCreator",
"(",
")",
"int",
"{",
"if",
"a",
"==",
"nil",
"||",
"a",
".",
"Creator",
"==",
"nil",
"{",
"return",
"0",
"\n",
"}",
"\n",
"<mask>",
"*",
"a",
".",
"Creator",
"\n",
"}"
] |
4,950 | all-4951 | [
"HomeDir",
"returns",
"the",
"home",
"directory",
"of",
"the",
"user",
"that",
"owns",
"the",
"current",
"process",
"."
] | [
"func",
"HomeDir",
"(",
")",
"string",
"{",
"if",
"homeDirSet",
"{",
"return",
"homeDir",
"\n",
"}",
"\n",
"if",
"user",
",",
"err",
":=",
"user",
".",
"Current",
"(",
")",
";",
"err",
"==",
"nil",
"{",
"homeDir",
"=",
"user",
".",
"HomeDir",
"\n",... |
4,951 | all-4952 | [
"ContainsVMType",
"-"
] | [
"func",
"(",
"s",
"*",
"CloudConfigManifest",
")",
"ContainsVMType",
"(",
"vmTypeName",
"string",
")",
"(",
"result",
"bool",
")",
"{",
"<mask>",
"=",
"false",
"\n",
"for",
"_",
",",
"vmType",
":=",
"range",
"s",
".",
"VMTypes",
"{",
"if",
"vmType",
".... |
4,952 | all-4953 | [
"Helper",
"functions"
] | [
"func",
"lxcSetConfigItem",
"(",
"c",
"*",
"lxc",
".",
"Container",
",",
"key",
"string",
",",
"value",
"string",
")",
"error",
"{",
"if",
"c",
"==",
"nil",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"if",
"!",
... |
4,953 | all-4954 | [
"Flags",
"returns",
"etcd",
"flags",
"in",
"string",
"slice",
"."
] | [
"func",
"(",
"e",
"*",
"Etcd",
")",
"Flags",
"(",
")",
"(",
"fs",
"[",
"]",
"string",
")",
"{",
"tp",
":=",
"reflect",
".",
"TypeOf",
"(",
"*",
"e",
")",
"\n",
"vo",
":=",
"reflect",
".",
"ValueOf",
"(",
"*",
"e",
")",
"\n",
"for",
"_",
","... |
4,954 | all-4955 | [
"Flush",
"performs",
"a",
"manual",
"flush",
"to",
"all",
"subscribed",
"reporters",
".",
"This",
"method",
"is",
"usually",
"called",
"by",
"a",
"background",
"thread",
"every",
"flushInterval",
"specified",
"in",
"New",
"()"
] | [
"func",
"(",
"r",
"*",
"Registry",
")",
"Flush",
"(",
")",
"error",
"{",
"r",
".",
"mutex",
".",
"RLock",
"(",
")",
"\n",
"reporters",
":=",
"r",
".",
"reporters",
"\n",
"rtags",
":=",
"r",
".",
"tags",
"\n",
"r",
".",
"mutex",
".",
"RUnlock",
... |
4,955 | all-4956 | [
"Returns",
"the",
"record",
"ID",
"for",
"a",
"given",
"record",
"name",
"and",
"zone"
] | [
"func",
"(",
"p",
"*",
"dnsimpleProvider",
")",
"GetRecordID",
"(",
"zone",
"string",
",",
"recordName",
"string",
")",
"(",
"recordID",
"int",
",",
"err",
"error",
")",
"{",
"page",
":=",
"1",
"\n",
"listOptions",
":=",
"&",
"dnsimple",
".",
"ZoneRecord... |
4,956 | all-4957 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SetShowFPSCounterParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay4",
"(",
"&",
"w",
",",
"v",
... |
4,957 | all-4958 | [
"RevokeScreenboard",
"revokes",
"a",
"currently",
"shared",
"screenboard"
] | [
"func",
"(",
"client",
"*",
"Client",
")",
"RevokeScreenboard",
"(",
"id",
"int",
")",
"error",
"{",
"return",
"<mask>",
".",
"doJsonRequest",
"(",
"\"",
"\"",
",",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"id",
")",
",",
"nil",
",",
"nil",
")"... |
4,958 | all-4959 | [
"String",
"formats",
"a",
"config",
"map",
"into",
"the",
"key",
"=",
"val",
"key",
"=",
"val",
"...",
"understood",
"by",
"Parse",
".",
"The",
"order",
"of",
"the",
"keys",
"is",
"stable",
"."
] | [
"func",
"(",
"c",
"Config",
")",
"String",
"(",
")",
"string",
"{",
"// sort 'provider' to the front and keep the keys stable.",
"var",
"keys",
"[",
"]",
"string",
"\n",
"for",
"k",
":=",
"range",
"c",
"{",
"if",
"k",
"!=",
"\"",
"\"",
"{",
"keys",
"=",
... |
4,959 | all-4960 | [
"findPKIndex",
"returns",
"the",
"nested",
"field",
"corresponding",
"to",
"the",
"index",
"sequence",
"of",
"field",
"of",
"primary",
"key",
"."
] | [
"func",
"(",
"db",
"*",
"DB",
")",
"findPKIndex",
"(",
"typ",
"reflect",
".",
"Type",
",",
"index",
"[",
"]",
"int",
")",
"[",
"]",
"int",
"{",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"typ",
".",
"NumField",
"(",
")",
";",
"i",
"++",
"{",
"fi... |
4,960 | all-4961 | [
"Get",
"returns",
"the",
"Location",
"information",
"for",
"the",
"incoming",
"http",
".",
"Request",
"from",
"the",
"context",
".",
"If",
"the",
"location",
"is",
"not",
"set",
"a",
"nil",
"value",
"is",
"returned",
"."
] | [
"func",
"Get",
"(",
"c",
"*",
"gin",
".",
"Context",
")",
"*",
"url",
".",
"URL",
"{",
"v",
",",
"ok",
":=",
"c",
".",
"Get",
"(",
"key",
")",
"\n\n",
"if",
"!",
"ok",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"vv",
",",
"ok",
":=",
"v",
"... |
4,961 | all-4962 | [
"FindByLabel",
"finds",
"exactly",
"one",
"element",
"by",
"associated",
"label",
"text",
"."
] | [
"func",
"(",
"s",
"*",
"selectable",
")",
"FindByLabel",
"(",
"<mask>",
"string",
")",
"*",
"Selection",
"{",
"return",
"newSelection",
"(",
"s",
".",
"session",
",",
"s",
".",
"selectors",
".",
"Append",
"(",
"target",
".",
"Label",
",",
"text",
")",
... |
4,962 | all-4963 | [
"FetchMetricCluster",
"retrieves",
"metric",
"cluster",
"with",
"passed",
"cid",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"FetchMetricCluster",
"(",
"cid",
"CIDType",
",",
"extras",
"string",
")",
"(",
"*",
"MetricCluster",
",",
"error",
")",
"{",
"if",
"cid",
"==",
"nil",
"||",
"*",
"cid",
"==",
"\"",
"\"",
"{",
"return",
"nil",
","... |
4,963 | all-4964 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SetTimingParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation",
"(",
"&",
"w",
",",
"v",
")",
... |
4,964 | all-4965 | [
"The",
"lvm",
".",
"thinpool_name",
"and",
"lvm",
".",
"vg_name",
"config",
"keys",
"are",
"node",
"-",
"specific",
"and",
"need",
"to",
"be",
"linked",
"to",
"nodes",
"."
] | [
"func",
"patchLvmNodeSpecificConfigKeys",
"(",
"name",
"string",
",",
"d",
"*",
"Daemon",
")",
"error",
"{",
"tx",
",",
"err",
":=",
"d",
".",
"cluster",
".",
"Begin",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"errors",
".",
"Wrap",
"(... |
4,965 | all-4966 | [
"return",
"the",
"pointer",
"to",
"a",
"mapped",
"buffer",
"object",
"s",
"data",
"store"
] | [
"func",
"GetNamedBufferPointerv",
"(",
"<mask>",
"uint32",
",",
"pname",
"uint32",
",",
"params",
"*",
"unsafe",
".",
"Pointer",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpGetNamedBufferPointerv",
",",
"3",
",",
"uintptr",
"(",
"buffer",
")",
",",
"uintptr... |
4,966 | all-4967 | [
"limitsCheckAndWait",
"make",
"sure",
"we",
"have",
"not",
"reached",
"the",
"limit",
"or",
"wait"
] | [
"func",
"(",
"<mask>",
"*",
"Client",
")",
"limitsCheckAndWait",
"(",
")",
"{",
"var",
"sleep",
"time",
".",
"Duration",
"\n",
"githubClient",
",",
"err",
":=",
"client",
".",
"getGitHubClient",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"glog",
".... |
4,967 | all-4968 | [
"HasIsReadOnly",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"b",
"*",
"Board",
")",
"HasIsReadOnly",
"(",
")",
"bool",
"{",
"if",
"b",
"!=",
"nil",
"&&",
"b",
".",
"IsReadOnly",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
4,968 | all-4969 | [
"Value",
"converts",
"a",
"value",
"to",
"a",
"database",
"driver",
"value"
] | [
"func",
"(",
"u",
"SSN",
")",
"Value",
"(",
")",
"(",
"driver",
".",
"Value",
",",
"error",
")",
"{",
"return",
"<mask>",
".",
"Value",
"(",
"string",
"(",
"u",
")",
")",
",",
"nil",
"\n",
"}"
] |
4,969 | all-4970 | [
"ListTeamMembers",
"gets",
"a",
"list",
"of",
"team",
"members",
"for",
"the",
"given",
"team",
"id",
"Role",
"options",
"are",
"all",
"maintainer",
"and",
"member",
"https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"teams",
"/"... | [
"func",
"(",
"c",
"*",
"Client",
")",
"ListTeamMembers",
"(",
"id",
"int",
",",
"role",
"string",
")",
"(",
"[",
"]",
"TeamMember",
",",
"error",
")",
"{",
"c",
".",
"<mask>",
"(",
"\"",
"\"",
",",
"id",
",",
"role",
")",
"\n",
"if",
"c",
".",
... |
4,970 | all-4971 | [
"processFilters",
"processes",
"any",
"filters",
"valid",
"at",
"the",
"current",
"read",
"index",
"and",
"stores",
"the",
"output",
"in",
"outbuf",
"."
] | [
"func",
"(",
"d",
"*",
"decodeReader",
")",
"processFilters",
"(",
")",
"(",
"err",
"error",
")",
"{",
"f",
":=",
"d",
".",
"filters",
"[",
"0",
"]",
"\n",
"if",
"f",
".",
"offset",
">",
"0",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"d",
".",
"... |
4,971 | all-4972 | [
"GetAllAddresses",
"returns",
"bitcoin",
"addresses",
"associated",
"with",
"client",
"account"
] | [
"func",
"(",
"c",
"Client",
")",
"GetAllAddresses",
"(",
"params",
"*",
"AddressesParams",
")",
"(",
"*",
"addresses",
",",
"error",
")",
"{",
"holder",
":=",
"addressesHolder",
"{",
"}",
"\n",
"if",
"err",
":=",
"c",
".",
"Get",
"(",
"\"",
"\"",
","... |
4,972 | all-4973 | [
"buildAppPorts",
"creates",
"app",
"ports",
"from",
"proxy",
"config"
] | [
"func",
"buildAppPorts",
"(",
"proxyConfig",
"*",
"ecsacs",
".",
"ProxyConfiguration",
")",
"[",
"]",
"string",
"{",
"<mask>",
"inputAppPorts",
"[",
"]",
"string",
"\n",
"if",
"proxyConfig",
".",
"Properties",
"[",
"appPorts",
"]",
"!=",
"nil",
"{",
"inputAp... |
4,973 | all-4974 | [
"GetIterFirst",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_tree_model_get_iter_first",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"TreeModel",
")",
"GetIterFirst",
"(",
")",
"(",
"*",
"TreeIter",
",",
"bool",
")",
"{",
"<mask>",
"iter",
"C",
".",
"GtkTreeIter",
"\n",
"c",
":=",
"C",
".",
"gtk_tree_model_get_iter_first",
"(",
"v",
".",
"native",
"(",
")",
... |
4,974 | all-4975 | [
"retrieve",
"the",
"index",
"of",
"a",
"subroutine",
"uniform",
"of",
"a",
"given",
"shader",
"stage",
"within",
"a",
"program"
] | [
"func",
"GetSubroutineIndex",
"(",
"program",
"uint32",
",",
"shadertype",
"uint32",
",",
"name",
"*",
"uint8",
")",
"uint32",
"{",
"<mask>",
":=",
"C",
".",
"glowGetSubroutineIndex",
"(",
"gpGetSubroutineIndex",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"prog... |
4,975 | all-4976 | [
"ReceiveComment",
"calls",
"plugin",
".",
"ReceiveComment",
"()",
"for",
"all",
"plugins"
] | [
"func",
"(",
"m",
"*",
"MultiplexerPluginWrapper",
")",
"ReceiveComment",
"(",
"comment",
"sql",
".",
"Comment",
")",
"[",
"]",
"<mask>",
"{",
"points",
":=",
"[",
"]",
"Point",
"{",
"}",
"\n\n",
"for",
"_",
",",
"plugin",
":=",
"range",
"m",
".",
"p... |
4,976 | all-4977 | [
"NewEngine",
"returns",
"a",
"new",
"engine",
"."
] | [
"func",
"NewEngine",
"(",
"opts",
"EngineOpts",
")",
"*",
"Engine",
"{",
"if",
"opts",
".",
"Logger",
"==",
"nil",
"{",
"opts",
".",
"Logger",
"=",
"log",
".",
"NewNopLogger",
"(",
")",
"\n",
"}",
"\n\n",
"metrics",
":=",
"&",
"engineMetrics",
"{",
"... |
4,977 | all-4978 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"the",
"current",
"program",
"object"
] | [
"func",
"Uniform4iv",
"(",
"location",
"int32",
",",
"count",
"int32",
",",
"value",
"*",
"int32",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpUniform4iv",
",",
"3",
",",
"uintptr",
"(",
"location",
")",
",",
"uintptr",
"(",
"<mask>",
")",
",",
"uintp... |
4,978 | all-4979 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"ReloadParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage21",
"(",
"&",
"w",
",",
"v",
")",
"\n"... |
4,979 | all-4980 | [
"RenameObject",
"renames",
"a",
"MO",
"and",
"tracks",
"the",
"task",
"to",
"make",
"sure",
"it",
"completes",
"."
] | [
"func",
"RenameObject",
"(",
"client",
"*",
"govmomi",
".",
"Client",
",",
"ref",
"types",
".",
"ManagedObjectReference",
",",
"new",
"string",
")",
"error",
"{",
"req",
":=",
"types",
".",
"Rename_Task",
"{",
"This",
":",
"ref",
",",
"NewName",
":",
"ne... |
4,980 | all-4981 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"RequestCachedResponseParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage3",
"(",
"&",
"w",
","... |
4,981 | all-4982 | [
"Set",
"is",
"required",
"for",
"kingpin",
"interfaces",
"to",
"allow",
"command",
"line",
"params",
"to",
"be",
"set",
"to",
"our",
"map",
"datatype"
] | [
"func",
"(",
"o",
"*",
"ListRuneOption",
")",
"Set",
"(",
"value",
"string",
")",
"error",
"{",
"val",
":=",
"RuneOption",
"{",
"}",
"\n",
"val",
".",
"Set",
"(",
"<mask>",
")",
"\n",
"*",
"o",
"=",
"append",
"(",
"*",
"o",
",",
"val",
")",
"\n... |
4,982 | all-4983 | [
"Listen",
"bind",
"port",
".",
"Receive",
"messages",
"and",
"send",
"to",
"out",
"channel"
] | [
"func",
"(",
"rcv",
"*",
"TCP",
")",
"Listen",
"(",
"addr",
"*",
"<mask>",
".",
"TCPAddr",
")",
"error",
"{",
"return",
"rcv",
".",
"StartFunc",
"(",
"func",
"(",
")",
"error",
"{",
"tcpListener",
",",
"err",
":=",
"net",
".",
"ListenTCP",
"(",
"\"... |
4,983 | all-4984 | [
"Stem",
"an",
"Spanish",
"word",
".",
"This",
"is",
"the",
"only",
"exported",
"function",
"in",
"this",
"package",
"."
] | [
"func",
"Stem",
"(",
"word",
"string",
",",
"stemStopwWords",
"bool",
")",
"string",
"{",
"<mask>",
"=",
"strings",
".",
"ToLower",
"(",
"strings",
".",
"TrimSpace",
"(",
"word",
")",
")",
"\n\n",
"// Return small words and stop words",
"if",
"len",
"(",
"wo... |
4,984 | all-4985 | [
"FromBytes",
"creates",
"a",
"new",
"temporary",
"file",
"in",
"the",
"directory",
"dir",
"with",
"a",
"name",
"beginning",
"with",
"prefix",
"opens",
"the",
"file",
"for",
"reading",
"and",
"writing",
"writes",
"the",
"provided",
"data",
"into",
"it",
"and"... | [
"func",
"FromBytes",
"(",
"dir",
",",
"prefix",
"string",
",",
"data",
"[",
"]",
"byte",
")",
"(",
"*",
"TempFile",
",",
"error",
")",
"{",
"var",
"tmp",
"*",
"TempFile",
"=",
"&",
"TempFile",
"{",
"dir",
":",
"dir",
",",
"prefix",
":",
"prefix",
... |
4,985 | all-4986 | [
"Convert",
"version",
"number",
"in",
"index",
".",
"json",
"to",
"go",
"package",
"name",
"1",
".",
"6",
"=",
">",
"v1_6"
] | [
"func",
"toPackageName",
"(",
"version",
"string",
")",
"string",
"{",
"if",
"version",
"==",
"\"",
"\"",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"parts",
":=",
"strings",
".",
"Split",
"(",
"<mask>",
",",
"\"",
"\"",
")",
"\n",
"i",
":=",
"1",... |
4,986 | all-4987 | [
"NewMockManager",
"creates",
"a",
"new",
"mock",
"instance"
] | [
"func",
"NewMockManager",
"(",
"ctrl",
"*",
"gomock",
".",
"<mask>",
")",
"*",
"MockManager",
"{",
"mock",
":=",
"&",
"MockManager",
"{",
"ctrl",
":",
"ctrl",
"}",
"\n",
"mock",
".",
"recorder",
"=",
"&",
"MockManagerMockRecorder",
"{",
"mock",
"}",
"\n"... |
4,987 | all-4988 | [
"Gossip",
"yields",
"the",
"current",
"topology",
"as",
"GossipData",
"."
] | [
"func",
"(",
"router",
"*",
"Router",
")",
"Gossip",
"(",
")",
"GossipData",
"{",
"return",
"&",
"topologyGossipData",
"{",
"peers",
":",
"router",
".",
"Peers",
",",
"update",
":",
"router",
".",
"Peers",
".",
"<mask>",
"(",
")",
"}",
"\n",
"}"
] |
4,988 | all-4989 | [
"HasClientEmail",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"i",
"*",
"IntegrationGCPCreateRequest",
")",
"HasClientEmail",
"(",
")",
"bool",
"{",
"if",
"i",
"!=",
"nil",
"&&",
"i",
".",
"ClientEmail",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
4,989 | all-4990 | [
"handle",
"adds",
"new",
"route",
"to",
"the",
"router",
"tree",
"."
] | [
"func",
"(",
"r",
"*",
"Router",
")",
"handle",
"(",
"method",
",",
"pattern",
"string",
",",
"handle",
"Handle",
")",
"*",
"Route",
"{",
"method",
"=",
"strings",
".",
"ToUpper",
"(",
"method",
")",
"\n\n",
"var",
"leaf",
"*",
"Leaf",
"\n",
"// Prev... |
4,990 | all-4991 | [
"Remove",
"retreives",
"a",
"value",
"from",
"this",
"List",
"and",
"shifts",
"all",
"other",
"values",
"."
] | [
"func",
"(",
"l",
"*",
"<mask>",
")",
"Remove",
"(",
"pos",
"uint",
")",
"(",
"interface",
"{",
"}",
",",
"bool",
")",
"{",
"l",
".",
"key",
".",
"Lock",
"(",
")",
"\n",
"defer",
"l",
".",
"key",
".",
"Unlock",
"(",
")",
"\n\n",
"if",
"pos",
... |
4,991 | all-4992 | [
"GetTextAlign",
"returns",
"the",
"TextAlign",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"w",
"*",
"Widget",
")",
"GetTextAlign",
"(",
")",
"string",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"TextAlign",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"<mask>",
"*",
"w",
".",
"TextAlign",
"\n",
"}"
] |
4,992 | all-4993 | [
"Parameters",
":",
"-",
"Query"
] | [
"func",
"(",
"p",
"*",
"HyperbahnClient",
")",
"Discover",
"(",
"query",
"*",
"DiscoveryQuery",
")",
"(",
"r",
"*",
"DiscoveryResult_",
",",
"err",
"error",
")",
"{",
"if",
"err",
"=",
"p",
".",
"sendDiscover",
"(",
"<mask>",
")",
";",
"err",
"!=",
"... |
4,993 | all-4994 | [
"Map",
"returns",
"a",
"string",
"map",
"of",
"the",
"labels",
"."
] | [
"func",
"(",
"ls",
"Labels",
")",
"Map",
"(",
")",
"<mask>",
"[",
"string",
"]",
"string",
"{",
"m",
":=",
"make",
"(",
"map",
"[",
"string",
"]",
"string",
",",
"len",
"(",
"ls",
")",
")",
"\n",
"for",
"_",
",",
"l",
":=",
"range",
"ls",
"{"... |
4,994 | all-4995 | [
"SetConfig",
"sets",
"data",
"sources",
"for",
"configuration",
"."
] | [
"func",
"SetConfig",
"(",
"<mask>",
"interface",
"{",
"}",
",",
"others",
"...",
"interface",
"{",
"}",
")",
"(",
"_",
"*",
"ini",
".",
"File",
",",
"err",
"error",
")",
"{",
"cfg",
",",
"err",
"=",
"ini",
".",
"Load",
"(",
"source",
",",
"others... |
4,995 | all-4996 | [
"withMax",
"sets",
"the",
"maximum",
"number",
"of",
"retries",
"on",
"this",
"call",
"or",
"this",
"interceptor",
"."
] | [
"func",
"withMax",
"(",
"maxRetries",
"uint",
")",
"retryOption",
"{",
"return",
"retryOption",
"{",
"applyFunc",
":",
"func",
"(",
"o",
"*",
"<mask>",
")",
"{",
"o",
".",
"max",
"=",
"maxRetries",
"\n",
"}",
"}",
"\n",
"}"
] |
4,996 | all-4997 | [
"MonoToStereoF32",
"converts",
"a",
"mono",
"stream",
"into",
"a",
"stereo",
"one",
"by",
"copying",
"the",
"mono",
"signal",
"to",
"both",
"channels",
"in",
"an",
"interleaved",
"signal",
"."
] | [
"func",
"MonoToStereoF32",
"(",
"buf",
"*",
"audio",
".",
"Float32Buffer",
")",
"error",
"{",
"if",
"buf",
"==",
"nil",
"||",
"buf",
".",
"Format",
"==",
"nil",
"||",
"buf",
".",
"Format",
".",
"NumChannels",
"!=",
"1",
"{",
"return",
"<mask>",
".",
... |
4,997 | all-4998 | [
"NewPathPaymentResult",
"creates",
"a",
"new",
"PathPaymentResult",
"."
] | [
"func",
"NewPathPaymentResult",
"(",
"code",
"PathPaymentResultCode",
",",
"<mask>",
"interface",
"{",
"}",
")",
"(",
"result",
"PathPaymentResult",
",",
"err",
"error",
")",
"{",
"result",
".",
"Code",
"=",
"code",
"\n",
"switch",
"PathPaymentResultCode",
"(",
... |
4,998 | all-4999 | [
"parseSeriesDesc",
"parses",
"a",
"description",
"of",
"a",
"time",
"series",
"into",
"its",
"metric",
"and",
"value",
"sequence",
"."
] | [
"func",
"(",
"p",
"*",
"parser",
")",
"parseSeriesDesc",
"(",
")",
"(",
"m",
"labels",
".",
"Labels",
",",
"vals",
"[",
"]",
"sequenceValue",
",",
"err",
"error",
")",
"{",
"defer",
"p",
".",
"recover",
"(",
"&",
"err",
")",
"\n\n",
"m",
"=",
"p"... |
4,999 | all-5000 | [
"pareCode",
"parses",
"a",
"string",
"into",
"a",
"Code",
"or",
"returns",
"0",
"if",
"the",
"parse",
"failed"
] | [
"func",
"parseCode",
"(",
"str",
"string",
")",
"Code",
"{",
"<mask>",
",",
"err",
":=",
"strconv",
".",
"Atoi",
"(",
"str",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"Code",
"(",
"0",
")",
"\n",
"}",
"\n",
"return",
"Code",
"(",
"code"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.