id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
5,500 | all-5501 | [
"JSONSpec",
"loads",
"a",
"spec",
"from",
"a",
"json",
"document"
] | [
"func",
"JSONSpec",
"(",
"<mask>",
"string",
")",
"(",
"*",
"Document",
",",
"error",
")",
"{",
"data",
",",
"err",
":=",
"JSONDoc",
"(",
"path",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n",
"// convert to... |
5,501 | all-5502 | [
"URL",
"prefixes",
"a",
"url",
"string",
"with",
"the",
"request",
"language",
"."
] | [
"func",
"URL",
"(",
"url",
",",
"prefix",
"string",
",",
"data",
"ContextValue",
")",
"string",
"{",
"if",
"data",
".",
"Current",
".",
"IsRoot",
"(",
")",
"{",
"return",
"url",
"\n",
"}",
"\n\n",
"if",
"prefix",
"==",
"\"",
"\"",
"{",
"prefix",
"=... |
5,502 | all-5503 | [
"flattenExtraConfig",
"reads",
"in",
"the",
"extraConfig",
"from",
"a",
"running",
"virtual",
"machine",
"and",
"*",
"only",
"*",
"sets",
"the",
"keys",
"in",
"extra_config",
"that",
"we",
"know",
"about",
".",
"This",
"is",
"to",
"prevent",
"Terraform",
"fr... | [
"func",
"flattenExtraConfig",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"opts",
"[",
"]",
"types",
".",
"BaseOptionValue",
")",
"error",
"{",
"if",
"len",
"(",
"opts",
")",
"<",
"1",
"{",
"// No opts to read is a no-op",
"return",
"nil",
"\n",
"}"... |
5,503 | all-5504 | [
"ResolveSpecFromEnv",
"will",
"determine",
"the",
"Refs",
"being",
"tested",
"in",
"by",
"parsing",
"Prow",
"environment",
"variable",
"contents"
] | [
"func",
"ResolveSpecFromEnv",
"(",
")",
"(",
"*",
"JobSpec",
",",
"error",
")",
"{",
"specEnv",
",",
"<mask>",
":=",
"os",
".",
"LookupEnv",
"(",
"JobSpecEnv",
")",
"\n",
"if",
"!",
"ok",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
... |
5,504 | all-5505 | [
"ConvertResponse",
"converts",
"http",
"error",
"to",
"internal",
"error",
"type",
"based",
"on",
"HTTP",
"response",
"code",
"and",
"HTTP",
"body",
"contents"
] | [
"func",
"ConvertResponse",
"(",
"re",
"*",
"Response",
",",
"err",
"error",
")",
"(",
"*",
"Response",
",",
"error",
")",
"{",
"if",
"err",
"!=",
"nil",
"{",
"if",
"uerr",
",",
"ok",
":=",
"err",
".",
"(",
"*",
"url",
".",
"Error",
")",
";",
"o... |
5,505 | all-5506 | [
"Host",
"returns",
"Host",
"header",
"value",
"."
] | [
"func",
"(",
"h",
"*",
"RequestHeader",
")",
"Host",
"(",
")",
"[",
"]",
"byte",
"{",
"if",
"len",
"(",
"h",
".",
"host",
")",
">",
"0",
"{",
"return",
"h",
".",
"host",
"\n",
"}",
"\n",
"if",
"!",
"h",
".",
"rawHeadersParsed",
"{",
"// fast pa... |
5,506 | all-5507 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SetStyleTextsReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss11",
"(",
"&",
"w",
",",
"v",
")",... |
5,507 | all-5508 | [
"WriteTo",
"writes",
"data",
"to",
"w",
"."
] | [
"func",
"(",
"e",
"*",
"action",
")",
"WriteTo",
"(",
"w",
"io",
".",
"Writer",
")",
"(",
"int64",
",",
"error",
")",
"{",
"var",
"bf",
"<mask>",
".",
"Buffer",
"\n\n",
"// Write the action",
"bf",
".",
"WriteString",
"(",
"strings",
".",
"TrimSpace",
... |
5,508 | all-5509 | [
"checkQuorumActive",
"returns",
"true",
"if",
"the",
"quorum",
"is",
"active",
"from",
"the",
"view",
"of",
"the",
"local",
"raft",
"state",
"machine",
".",
"Otherwise",
"it",
"returns",
"false",
".",
"checkQuorumActive",
"also",
"resets",
"all",
"RecentActive",... | [
"func",
"(",
"r",
"*",
"raft",
")",
"checkQuorumActive",
"(",
")",
"bool",
"{",
"var",
"act",
"int",
"\n\n",
"r",
".",
"forEachProgress",
"(",
"func",
"(",
"id",
"uint64",
",",
"pr",
"*",
"Progress",
")",
"{",
"if",
"id",
"==",
"r",
".",
"id",
"{... |
5,509 | all-5510 | [
"SetUInt64",
"is",
"a",
"wrapper",
"around",
"g_value_set_uint64",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"SetUInt64",
"(",
"val",
"uint64",
")",
"{",
"C",
".",
"g_value_set_uint64",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"guint64",
"(",
"val",
")",
")",
"\n",
"}"
] |
5,510 | all-5511 | [
"CreateMetricCluster",
"creates",
"a",
"new",
"metric",
"cluster",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"CreateMetricCluster",
"(",
"cfg",
"*",
"MetricCluster",
")",
"(",
"*",
"MetricCluster",
",",
"error",
")",
"{",
"if",
"cfg",
"==",
"nil",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",
"\n... |
5,511 | all-5512 | [
"GetMustShowResourceListOk",
"returns",
"a",
"tuple",
"with",
"the",
"MustShowResourceList",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"Widget",
")",
"GetMustShowResourceListOk",
"(",
")",
"(",
"bool",
",",
"bool",
")",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"MustShowResourceList",
"==",
"nil",
"{",
"return",
"false",
",",
"<mask>",
"\n",
"}",
"\n",
"ret... |
5,512 | all-5513 | [
"Flush",
"implements",
"instruments",
".",
"Reporter"
] | [
"func",
"(",
"r",
"*",
"Reporter",
")",
"Flush",
"(",
")",
"error",
"{",
"r",
".",
"<mask>",
"(",
"strings",
".",
"Join",
"(",
"r",
".",
"metrics",
",",
"\"",
"\"",
")",
")",
"\n",
"r",
".",
"metrics",
"=",
"r",
".",
"metrics",
"[",
":",
"0",... |
5,513 | all-5514 | [
"InsertSection",
"is",
"a",
"wrapper",
"around",
"g_menu_insert_section",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Menu",
")",
"InsertSection",
"(",
"position",
"int",
",",
"label",
"string",
",",
"section",
"*",
"MenuModel",
")",
"{",
"cstr1",
":=",
"(",
"*",
"C",
".",
"gchar",
")",
"(",
"C",
".",
"CString",
"(",
"label",
")",
")",
"\... |
5,514 | all-5515 | [
"Returns",
"the",
"source",
"code",
"to",
"add",
"to",
"the",
"target",
"file",
"."
] | [
"func",
"(",
"b",
"*",
"Buffer",
")",
"code",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"code",
",",
"err",
":=",
"format",
".",
"<mask>",
"(",
"b",
".",
"buf",
".",
"Bytes",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{"... |
5,515 | all-5516 | [
"errNo",
"returns",
"an",
"error",
"if",
"the",
"errno",
"is",
"<",
"0"
] | [
"func",
"errNo",
"(",
"i",
"C",
".",
"int",
")",
"(",
"int",
",",
"error",
")",
"{",
"errno",
":=",
"int",
"(",
"i",
")",
"\n",
"if",
"errno",
"<",
"0",
"{",
"errMsg",
":=",
"\"",
"\"",
"\n",
"if",
"e",
",",
"ok",
":=",
"errNoMap",
"[",
"er... |
5,516 | all-5517 | [
"ConvertEndpointsToZones",
"marshals",
"endpoints",
"into",
"pdns",
"compatible",
"Zone",
"structs"
] | [
"func",
"(",
"p",
"*",
"PDNSProvider",
")",
"ConvertEndpointsToZones",
"(",
"eps",
"[",
"]",
"*",
"endpoint",
".",
"Endpoint",
",",
"changetype",
"pdnsChangeType",
")",
"(",
"zonelist",
"[",
"]",
"pgo",
".",
"Zone",
",",
"_",
"error",
")",
"{",
"zonelist... |
5,517 | all-5518 | [
"setCache",
"sets",
"the",
"template",
"to",
"the",
"cache",
"."
] | [
"func",
"setCache",
"(",
"name",
"string",
",",
"tpl",
"template",
".",
"<mask>",
")",
"{",
"cacheMutex",
".",
"Lock",
"(",
")",
"\n",
"cache",
"[",
"name",
"]",
"=",
"tpl",
"\n",
"cacheMutex",
".",
"Unlock",
"(",
")",
"\n",
"}"
] |
5,518 | all-5519 | [
"ParseRemote",
"splits",
"remote",
"and",
"object"
] | [
"func",
"(",
"c",
"*",
"Config",
")",
"ParseRemote",
"(",
"raw",
"string",
")",
"(",
"string",
",",
"string",
",",
"error",
")",
"{",
"result",
":=",
"strings",
".",
"SplitN",
"(",
"<mask>",
",",
"\"",
"\"",
",",
"2",
")",
"\n",
"if",
"len",
"(",... |
5,519 | all-5520 | [
"GetSizeOk",
"returns",
"a",
"tuple",
"with",
"the",
"Size",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"h",
"*",
"HostmapRequests",
")",
"GetSizeOk",
"(",
")",
"(",
"HostmapRequest",
",",
"bool",
")",
"{",
"if",
"h",
"==",
"nil",
"||",
"h",
".",
"Size",
"==",
"nil",
"{",
"return",
"HostmapRequest",
"{",
"}",
",",
"false",
"\n",
"}",
"\n... |
5,520 | all-5521 | [
"Cause",
"returns",
"the",
"cause",
"of",
"an",
"error"
] | [
"func",
"Cause",
"(",
"err",
"<mask>",
")",
"error",
"{",
"attributes",
":=",
"err",
".",
"Attributes",
"(",
")",
"\n",
"if",
"attributes",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"cause",
",",
"ok",
":=",
"attributes",
"[",
"causeKey",
... |
5,521 | all-5522 | [
"flattenStorageDrsVmConfigInfo",
"saves",
"a",
"StorageDrsVmConfigInfo",
"into",
"the",
"supplied",
"ResourceData",
"."
] | [
"func",
"flattenStorageDrsVMConfigInfo",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"obj",
"*",
"types",
".",
"StorageDrsVmConfigInfo",
")",
"error",
"{",
"if",
"err",
":=",
"d",
".",
"<mask>",
"(",
"\"",
"\"",
",",
"obj",
".",
"Behavior",
")",
"... |
5,522 | all-5523 | [
"waitForHostResources",
"waits",
"for",
"host",
"resources",
"to",
"become",
"available",
"to",
"start",
"the",
"task",
".",
"This",
"involves",
"waiting",
"for",
"previous",
"stops",
"to",
"complete",
"so",
"the",
"resources",
"become",
"free",
"."
] | [
"func",
"(",
"mtask",
"*",
"managedTask",
")",
"waitForHostResources",
"(",
")",
"{",
"if",
"mtask",
".",
"StartSequenceNumber",
"==",
"0",
"{",
"// This is the first transition on this host. No need to wait",
"return",
"\n",
"}",
"\n",
"if",
"mtask",
".",
"GetDesir... |
5,523 | all-5524 | [
"Receive",
"succeeds",
"if",
"there",
"is",
"a",
"value",
"to",
"be",
"received",
"on",
"actual",
".",
"Actual",
"must",
"be",
"a",
"channel",
"(",
"and",
"cannot",
"be",
"a",
"send",
"-",
"only",
"channel",
")",
"--",
"anything",
"else",
"is",
"an",
... | [
"func",
"Receive",
"(",
"args",
"...",
"interface",
"{",
"}",
")",
"types",
".",
"GomegaMatcher",
"{",
"<mask>",
"arg",
"interface",
"{",
"}",
"\n",
"if",
"len",
"(",
"args",
")",
">",
"0",
"{",
"arg",
"=",
"args",
"[",
"0",
"]",
"\n",
"}",
"\n\n... |
5,524 | all-5525 | [
"cleanZoneID",
"removes",
"the",
"/",
"hostedzone",
"/",
"prefix"
] | [
"func",
"cleanZoneID",
"(",
"<mask>",
"string",
")",
"string",
"{",
"if",
"strings",
".",
"HasPrefix",
"(",
"ID",
",",
"\"",
"\"",
")",
"{",
"ID",
"=",
"strings",
".",
"TrimPrefix",
"(",
"ID",
",",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"return",
"ID",
... |
5,525 | all-5526 | [
"title",
":",
"grant",
"access",
"to",
"a",
"service",
"path",
":",
"/",
"services",
"/",
"{",
"service",
"}",
"/",
"team",
"/",
"{",
"team",
"}",
"method",
":",
"PUT",
"responses",
":",
"200",
":",
"Service",
"updated",
"400",
":",
"Team",
"not",
... | [
"func",
"grantServiceAccess",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"(",
"err",
"error",
")",
"{",
"serviceName",
":=",
"r",
".",
"URL",
".",
"Query",
"(",
")",
".",
"Ge... |
5,526 | all-5527 | [
"IsEquivalent",
"returns",
"true",
"if",
"other",
"represents",
"the",
"same",
"data",
"type",
"as",
"the",
"target",
"."
] | [
"func",
"(",
"a",
"*",
"ArrayDataType",
")",
"IsEquivalent",
"(",
"other",
"DataType",
")",
"bool",
"{",
"t",
",",
"ok",
":=",
"other",
".",
"(",
"*",
"ArrayDataType",
")",
"\n",
"if",
"!",
"ok",
"{",
"return",
"<mask>",
"\n",
"}",
"\n",
"return",
... |
5,527 | all-5528 | [
"RawString",
"returns",
"raw",
"log",
"string",
"exclude",
"time",
"&",
"tags"
] | [
"func",
"(",
"g",
"*",
"Glg",
")",
"RawString",
"(",
"data",
"[",
"]",
"byte",
")",
"string",
"{",
"str",
":=",
"*",
"(",
"*",
"string",
")",
"(",
"unsafe",
".",
"Pointer",
"(",
"&",
"<mask>",
")",
")",
"\n",
"return",
"str",
"[",
"strings",
".... |
5,528 | all-5529 | [
"Offset",
"returns",
"a",
"new",
"Condition",
"of",
"OFFSET",
"clause",
"."
] | [
"func",
"(",
"db",
"*",
"DB",
")",
"Offset",
"(",
"<mask>",
"int",
")",
"*",
"Condition",
"{",
"return",
"newCondition",
"(",
"db",
")",
".",
"Offset",
"(",
"offset",
")",
"\n",
"}"
] |
5,529 | all-5530 | [
"grpcHandlerFunc",
"returns",
"an",
"http",
".",
"Handler",
"that",
"delegates",
"to",
"grpcServer",
"on",
"incoming",
"gRPC",
"connections",
"or",
"otherHandler",
"otherwise",
".",
"Given",
"in",
"gRPC",
"docs",
"."
] | [
"func",
"grpcHandlerFunc",
"(",
"grpcServer",
"*",
"grpc",
".",
"Server",
",",
"otherHandler",
"<mask>",
".",
"Handler",
")",
"http",
".",
"Handler",
"{",
"if",
"otherHandler",
"==",
"nil",
"{",
"return",
"http",
".",
"HandlerFunc",
"(",
"func",
"(",
"w",
... |
5,530 | all-5531 | [
"SetTitle",
"is",
"a",
"wrapper",
"around",
"gtk_window_set_title",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Window",
")",
"SetTitle",
"(",
"<mask>",
"string",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"title",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n",
"C",
".",
"g... |
5,531 | all-5532 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"StepOverParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger",
"(",
"&",
"r",
... |
5,532 | all-5533 | [
"WriteHealthKey",
"writes",
"a",
"health",
"key",
"to",
"this",
"member",
"."
] | [
"func",
"(",
"m",
"*",
"Member",
")",
"WriteHealthKey",
"(",
")",
"error",
"{",
"cli",
",",
"err",
":=",
"m",
".",
"CreateEtcdClient",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"err",
","... |
5,533 | all-5534 | [
"ValidEnum",
"validates",
"a",
"proposed",
"value",
"for",
"this",
"enum",
".",
"Implements",
"the",
"Enum",
"interface",
"for",
"PathPaymentResultCode"
] | [
"func",
"(",
"e",
"PathPaymentResultCode",
")",
"ValidEnum",
"(",
"v",
"int32",
")",
"bool",
"{",
"_",
",",
"ok",
":=",
"pathPaymentResultCodeMap",
"[",
"v",
"]",
"\n",
"return",
"<mask>",
"\n",
"}"
] |
5,534 | all-5535 | [
"Domain",
"creates",
"a",
"domain",
"type",
"with",
"the",
"given",
"name"
] | [
"func",
"(",
"cgp",
"*",
"CGP",
")",
"Domain",
"(",
"name",
"string",
")",
"*",
"Domain",
"{",
"return",
"&",
"Domain",
"{",
"cgp",
":",
"cgp",
",",
"<mask>",
":",
"name",
"}",
"\n",
"}"
] |
5,535 | all-5536 | [
"expandStorageDrsAutomationConfig",
"reads",
"certain",
"ResourceData",
"keys",
"and",
"returns",
"a",
"StorageDrsAutomationConfig",
"."
] | [
"func",
"expandStorageDrsAutomationConfig",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
")",
"*",
"types",
".",
"StorageDrsAutomationConfig",
"{",
"obj",
":=",
"&",
"<mask>",
".",
"StorageDrsAutomationConfig",
"{",
"IoLoadBalanceAutomationMode",
":",
"d",
".",
"Ge... |
5,536 | all-5537 | [
"RunAnnotated",
"annotates",
"a",
"task",
"with",
"a",
"description",
"and",
"a",
"sequence",
"of",
"symbols",
"indicating",
"task",
"activity",
"until",
"it",
"terminates"
] | [
"func",
"RunAnnotated",
"(",
"task",
"Task",
",",
"description",
"string",
",",
"symbol",
"string",
",",
"options",
"...",
"interface",
"{",
"}",
")",
"error",
"{",
"doneCh",
":=",
"make",
"(",
"chan",
"bool",
")",
"\n",
"errCh",
":=",
"make",
"(",
"ch... |
5,537 | all-5538 | [
"Elements",
"returns",
"a",
"[]",
"*",
"api",
".",
"Element",
"that",
"can",
"be",
"used",
"to",
"send",
"direct",
"commands",
"to",
"WebDriver",
"elements",
".",
"See",
":",
"https",
":",
"//",
"code",
".",
"google",
".",
"com",
"/",
"p",
"/",
"sele... | [
"func",
"(",
"s",
"*",
"Selection",
")",
"Elements",
"(",
")",
"(",
"[",
"]",
"*",
"api",
".",
"Element",
",",
"error",
")",
"{",
"elements",
",",
"err",
":=",
"s",
".",
"elements",
".",
"Get",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"... |
5,538 | all-5539 | [
"Range",
"implements",
"gRPC",
"KVServer",
".",
"Range",
"gets",
"the",
"keys",
"in",
"the",
"range",
"from",
"the",
"store",
"."
] | [
"func",
"(",
"s",
"*",
"etcdStore",
")",
"Range",
"(",
"ctx",
"<mask>",
".",
"Context",
",",
"req",
"*",
"etcdserverpb",
".",
"RangeRequest",
")",
"(",
"*",
"etcdserverpb",
".",
"RangeResponse",
",",
"error",
")",
"{",
"ireq",
":=",
"etcdserverpb",
".",
... |
5,539 | all-5540 | [
"Valid",
"implements",
"y",
".",
"Interface"
] | [
"func",
"(",
"s",
"*",
"ConcatIterator",
")",
"Valid",
"(",
")",
"bool",
"{",
"<mask>",
"s",
".",
"cur",
"!=",
"nil",
"&&",
"s",
".",
"cur",
".",
"Valid",
"(",
")",
"\n",
"}"
] |
5,540 | all-5541 | [
"publishMetrics",
"invokes",
"the",
"PublishMetricsRequest",
"on",
"the",
"clientserver",
"object",
"."
] | [
"func",
"(",
"cs",
"*",
"clientServer",
")",
"publishMetrics",
"(",
")",
"{",
"if",
"cs",
".",
"publishTicker",
"==",
"nil",
"{",
"seelog",
".",
"Debug",
"(",
"\"",
"\"",
")",
"\n",
"return",
"\n",
"}",
"\n\n",
"// Publish metrics immediately after we connec... |
5,541 | all-5542 | [
"Start",
"-",
"starts",
"the",
"client",
"service",
"to",
"listen",
"to",
"remote",
"events"
] | [
"func",
"(",
"client",
"*",
"Client",
")",
"Start",
"(",
")",
"error",
"{",
"var",
"err",
"error",
"\n",
"service",
":=",
"client",
".",
"service",
"\n",
"if",
"!",
"service",
".",
"started",
"{",
"server",
":=",
"rpc",
".",
"NewServer",
"(",
")",
... |
5,542 | all-5543 | [
"AccelMapUnlockPath",
"is",
"a",
"wrapper",
"around",
"gtk_accel_map_unlock_path",
"()",
"."
] | [
"func",
"AccelMapUnlockPath",
"(",
"<mask>",
"string",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"path",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n\n",
"C",
".",
"gtk_accel_map_unlock_path",
... |
5,543 | all-5544 | [
"specify",
"a",
"one",
"-",
"dimensional",
"texture",
"image"
] | [
"func",
"TexImage1D",
"(",
"target",
"uint32",
",",
"level",
"int32",
",",
"internalformat",
"int32",
",",
"width",
"int32",
",",
"border",
"int32",
",",
"format",
"uint32",
",",
"xtype",
"uint32",
",",
"pixels",
"unsafe",
".",
"Pointer",
")",
"{",
"C",
... |
5,544 | all-5545 | [
"Take",
"retreives",
"just",
"the",
"first",
"n",
"elements",
"from",
"an",
"Enumerable",
"."
] | [
"func",
"Take",
"(",
"subject",
"Enumerable",
",",
"n",
"uint",
")",
"Enumerable",
"{",
"return",
"taker",
"{",
"original",
":",
"<mask>",
",",
"n",
":",
"n",
",",
"}",
"\n",
"}"
] |
5,545 | all-5546 | [
"QueueStats",
"retrieves",
"statistics",
"about",
"queues",
"."
] | [
"func",
"QueueStats",
"(",
"c",
"context",
".",
"Context",
",",
"queueNames",
"[",
"]",
"string",
")",
"(",
"[",
"]",
"QueueStatistics",
",",
"error",
")",
"{",
"req",
":=",
"&",
"pb",
".",
"TaskQueueFetchQueueStatsRequest",
"{",
"QueueName",
":",
"make",
... |
5,546 | all-5547 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"StopParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"<mask>",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler9",
"(",
"&",
"r",
... |
5,547 | all-5548 | [
"MutateSetOptions",
"for",
"InflationDest",
"sets",
"the",
"SetOptionsOp",
"s",
"InflationDest",
"field"
] | [
"func",
"(",
"m",
"InflationDest",
")",
"MutateSetOptions",
"(",
"o",
"*",
"xdr",
".",
"SetOptionsOp",
")",
"(",
"err",
"error",
")",
"{",
"o",
".",
"InflationDest",
"=",
"&",
"xdr",
".",
"AccountId",
"{",
"}",
"\n",
"<mask>",
"=",
"setAccountId",
"(",... |
5,548 | all-5549 | [
"SetModuleSpec",
"sets",
"the",
"comma",
"-",
"separated",
"list",
"of",
"pattern",
"=",
"N",
"settings",
"for",
"file",
"-",
"filtered",
"logging"
] | [
"func",
"(",
"l",
"*",
"Log",
")",
"SetVFilepath",
"(",
"spec",
"FilepathSpec",
")",
"{",
"l",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"defer",
"l",
".",
"mu",
".",
"Unlock",
"(",
")",
"\n",
"l",
".",
"setVState",
"(",
"l",
".",
"verbosity",
",... |
5,549 | all-5550 | [
"Querier",
"returns",
"a",
"storage",
".",
"MergeQuerier",
"combining",
"the",
"remote",
"client",
"queriers",
"of",
"each",
"configured",
"remote",
"read",
"endpoint",
"."
] | [
"func",
"(",
"s",
"*",
"Storage",
")",
"Querier",
"(",
"ctx",
"context",
".",
"Context",
",",
"mint",
",",
"maxt",
"int64",
")",
"(",
"storage",
".",
"Querier",
",",
"error",
")",
"{",
"s",
".",
"mtx",
".",
"Lock",
"(",
")",
"\n",
"queryables",
"... |
5,550 | all-5551 | [
"Allows",
"unmarshaling",
"from",
"byte",
"to",
"MetadataStatus",
"text",
"form"
] | [
"func",
"(",
"status",
"*",
"MetadataStatus",
")",
"UnmarshalText",
"(",
"text",
"[",
"]",
"byte",
")",
"error",
"{",
"t",
":=",
"string",
"(",
"text",
")",
"\n",
"switch",
"t",
"{",
"case",
"MetadataInitialText",
":",
"*",
"status",
"=",
"MetadataInitia... |
5,551 | all-5552 | [
"attach",
"a",
"single",
"layer",
"of",
"a",
"texture",
"object",
"as",
"a",
"logical",
"buffer",
"of",
"a",
"framebuffer",
"object"
] | [
"func",
"NamedFramebufferTextureLayer",
"(",
"framebuffer",
"uint32",
",",
"attachment",
"uint32",
",",
"texture",
"uint32",
",",
"<mask>",
"int32",
",",
"layer",
"int32",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpNamedFramebufferTextureLayer",
",",
"5",
",",
... |
5,552 | all-5553 | [
"for",
"testing"
] | [
"func",
"(",
"router",
"*",
"Router",
")",
"sendPendingGossip",
"(",
")",
"bool",
"{",
"sentSomething",
":=",
"false",
"\n",
"for",
"<mask>",
":=",
"range",
"router",
".",
"Ourself",
".",
"getConnections",
"(",
")",
"{",
"sentSomething",
"=",
"conn",
".",
... |
5,553 | all-5554 | [
"UniqueFieldValidator",
"ensures",
"that",
"the",
"specified",
"field",
"of",
"the",
"current",
"model",
"will",
"remain",
"unique",
"among",
"the",
"specified",
"filters",
".",
"If",
"the",
"value",
"matches",
"the",
"provided",
"zero",
"value",
"the",
"check",... | [
"func",
"UniqueFieldValidator",
"(",
"field",
"string",
",",
"zero",
"interface",
"{",
"}",
",",
"filters",
"...",
"string",
")",
"*",
"Callback",
"{",
"return",
"C",
"(",
"\"",
"\"",
",",
"Only",
"(",
"Create",
",",
"Update",
")",
",",
"func",
"(",
... |
5,554 | all-5555 | [
"/",
"*",
"GdkDisplay",
"GetNMonitors",
"is",
"a",
"wrapper",
"around",
"gdk_display_get_n_monitors",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Display",
")",
"GetNMonitors",
"(",
")",
"int",
"{",
"c",
":=",
"C",
".",
"gdk_display_get_n_monitors",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"<mask>",
"int",
"(",
"c",
")",
"\n",
"}"
] |
5,555 | all-5556 | [
"Plain",
"renders",
"the",
"named",
"files",
"using",
"the",
"text",
"/",
"html",
"content",
"type",
"and",
"the",
"github",
".",
"com",
"/",
"gobuffalo",
"/",
"plush",
"package",
"for",
"templating",
".",
"If",
"more",
"than",
"1",
"file",
"is",
"provid... | [
"func",
"Plain",
"(",
"names",
"...",
"string",
")",
"Renderer",
"{",
"e",
":=",
"New",
"(",
"<mask>",
"{",
"}",
")",
"\n",
"return",
"e",
".",
"Plain",
"(",
"names",
"...",
")",
"\n",
"}"
] |
5,556 | all-5557 | [
"fills",
"all",
"a",
"texture",
"image",
"with",
"a",
"constant",
"value"
] | [
"func",
"ClearTexImage",
"(",
"texture",
"uint32",
",",
"level",
"int32",
",",
"<mask>",
"uint32",
",",
"xtype",
"uint32",
",",
"data",
"unsafe",
".",
"Pointer",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpClearTexImage",
",",
"5",
",",
"uintptr",
"(",
... |
5,557 | all-5558 | [
"Copy",
"copies",
"a",
"hashtree",
"reader",
"in",
"a",
"writer",
"."
] | [
"func",
"(",
"w",
"*",
"<mask>",
")",
"Copy",
"(",
"r",
"*",
"Reader",
")",
"error",
"{",
"for",
"{",
"n",
",",
"err",
":=",
"r",
".",
"Read",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"if",
"err",
"==",
"io",
".",
"EOF",
"{",
"return"... |
5,558 | all-5559 | [
"Domain",
"returns",
"the",
"Chrome",
"DevTools",
"Protocol",
"domain",
"of",
"the",
"event",
"or",
"command",
"."
] | [
"func",
"(",
"t",
"MethodType",
")",
"<mask>",
"(",
")",
"string",
"{",
"return",
"string",
"(",
"t",
"[",
":",
"strings",
".",
"IndexByte",
"(",
"string",
"(",
"t",
")",
",",
"'.'",
")",
"]",
")",
"\n",
"}"
] |
5,559 | all-5560 | [
"Finalize",
"ensures",
"there",
"no",
"nil",
"pointers",
"."
] | [
"func",
"(",
"c",
"*",
"ExecConfig",
")",
"Finalize",
"(",
")",
"{",
"if",
"c",
".",
"Enabled",
"==",
"nil",
"{",
"c",
".",
"Enabled",
"=",
"Bool",
"(",
"StringPresent",
"(",
"c",
".",
"Command",
")",
")",
"\n",
"}",
"\n\n",
"if",
"c",
".",
"Co... |
5,560 | all-5561 | [
"StateAfter",
"returns",
"the",
"state",
"of",
"entry",
"key",
"after",
"the",
"application",
"of",
"the",
"operation",
"at",
"opidx"
] | [
"func",
"(",
"b",
"*",
"Bundle",
")",
"StateAfter",
"(",
"key",
"xdr",
".",
"LedgerKey",
",",
"opidx",
"int",
")",
"(",
"*",
"xdr",
".",
"LedgerEntry",
",",
"error",
")",
"{",
"all",
":=",
"b",
".",
"changes",
"(",
"key",
",",
"opidx",
")",
"\n\n... |
5,561 | all-5562 | [
"Tick",
"increments",
"the",
"internal",
"logical",
"clock",
"for",
"this",
"Node",
".",
"Election",
"timeouts",
"and",
"heartbeat",
"timeouts",
"are",
"in",
"units",
"of",
"ticks",
"."
] | [
"func",
"(",
"n",
"*",
"node",
")",
"Tick",
"(",
")",
"{",
"select",
"{",
"case",
"n",
".",
"tickc",
"<-",
"struct",
"{",
"}",
"{",
"}",
":",
"case",
"<-",
"n",
".",
"<mask>",
":",
"default",
":",
"n",
".",
"logger",
".",
"Warningf",
"(",
"\"... |
5,562 | all-5563 | [
"GetTitleAlignOk",
"returns",
"a",
"tuple",
"with",
"the",
"TitleAlign",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"h",
"*",
"HostmapDefinition",
")",
"GetTitleAlignOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"h",
"==",
"nil",
"||",
"h",
".",
"TitleAlign",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return... |
5,563 | all-5564 | [
"NewOpener",
"returns",
"an",
"opener",
"that",
"can",
"read",
"GCS",
"and",
"local",
"paths",
"."
] | [
"func",
"NewOpener",
"(",
"ctx",
"context",
".",
"Context",
",",
"creds",
"string",
")",
"(",
"Opener",
",",
"error",
")",
"{",
"var",
"options",
"[",
"]",
"option",
".",
"ClientOption",
"\n",
"if",
"creds",
"!=",
"\"",
"\"",
"{",
"options",
"=",
"ap... |
5,564 | all-5565 | [
"GetStyleOk",
"returns",
"a",
"tuple",
"with",
"the",
"Style",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"t",
"*",
"TimeseriesRequest",
")",
"GetStyleOk",
"(",
")",
"(",
"TimeseriesRequestStyle",
",",
"bool",
")",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"Style",
"==",
"nil",
"{",
"return",
"TimeseriesRequestStyle",
"{",
"}",
",",
"false",
... |
5,565 | all-5566 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"SetBreakpointOnFunctionCallParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger13"... |
5,566 | all-5567 | [
"Update",
"updates",
"the",
"current",
"input",
"states",
"."
] | [
"func",
"(",
"i",
"*",
"Input",
")",
"Update",
"(",
")",
"{",
"switch",
"i",
".",
"mouseState",
"{",
"case",
"mouseStateNone",
":",
"if",
"ebiten",
".",
"IsMouseButtonPressed",
"(",
"ebiten",
".",
"MouseButtonLeft",
")",
"{",
"x",
",",
"y",
":=",
"ebit... |
5,567 | all-5568 | [
"Pull",
"clones",
"an",
"entire",
"repo",
"at",
"a",
"certain",
"commit",
".",
"root",
"is",
"the",
"local",
"path",
"you",
"want",
"to",
"clone",
"to",
".",
"fileInfo",
"is",
"the",
"file",
"/",
"dir",
"we",
"are",
"puuling",
".",
"pipes",
"causes",
... | [
"func",
"(",
"p",
"*",
"Puller",
")",
"Pull",
"(",
"client",
"*",
"pachclient",
".",
"APIClient",
",",
"root",
"string",
",",
"repo",
",",
"commit",
",",
"file",
"string",
",",
"pipes",
"bool",
",",
"emptyFiles",
"bool",
",",
"concurrency",
"int",
",",... |
5,568 | all-5569 | [
"ServeContent",
"serves",
"given",
"content",
"to",
"response",
"."
] | [
"func",
"(",
"ctx",
"*",
"Context",
")",
"ServeContent",
"(",
"name",
"string",
",",
"r",
"io",
".",
"ReadSeeker",
",",
"params",
"...",
"interface",
"{",
"}",
")",
"{",
"modtime",
":=",
"time",
".",
"Now",
"(",
")",
"\n",
"for",
"_",
",",
"p",
"... |
5,569 | all-5570 | [
"updateLastAppended",
"is",
"used",
"to",
"update",
"follower",
"replication",
"state",
"after",
"a",
"successful",
"AppendEntries",
"RPC",
".",
"TODO",
":",
"This",
"isn",
"t",
"used",
"during",
"InstallSnapshot",
"but",
"the",
"code",
"there",
"is",
"similar",... | [
"func",
"updateLastAppended",
"(",
"s",
"*",
"followerReplication",
",",
"req",
"*",
"AppendEntriesRequest",
")",
"{",
"// Mark any inflight logs as committed",
"if",
"logs",
":=",
"req",
".",
"Entries",
";",
"len",
"(",
"logs",
")",
">",
"0",
"{",
"last",
":=... |
5,570 | all-5571 | [
"LoginCmd",
"returns",
"a",
"cobra",
".",
"Command",
"to",
"login",
"to",
"a",
"Pachyderm",
"cluster",
"with",
"your",
"GitHub",
"account",
".",
"Any",
"resources",
"that",
"have",
"been",
"restricted",
"to",
"the",
"email",
"address",
"registered",
"with",
... | [
"func",
"LoginCmd",
"(",
"noMetrics",
",",
"noPortForwarding",
"*",
"bool",
")",
"*",
"cobra",
".",
"Command",
"{",
"var",
"useOTP",
"bool",
"\n",
"login",
":=",
"&",
"cobra",
".",
"Command",
"{",
"Short",
":",
"\"",
"\"",
",",
"Long",
":",
"\"",
"\"... |
5,571 | all-5572 | [
"makeRaftPeer",
"converts",
"a",
"net",
".",
"Addr",
"into",
"a",
"raft",
".",
"Peer",
".",
"All",
"peers",
"must",
"perform",
"the",
"Addr",
"-",
"to",
"-",
"Peer",
"mapping",
"in",
"the",
"same",
"way",
".",
"The",
"etcd",
"Raft",
"implementation",
"... | [
"func",
"makeRaftPeer",
"(",
"addr",
"net",
".",
"Addr",
")",
"raft",
".",
"Peer",
"{",
"return",
"raft",
".",
"Peer",
"{",
"ID",
":",
"uint64",
"(",
"addr",
".",
"(",
"meshconn",
".",
"MeshAddr",
")",
".",
"PeerUID",
")",
",",
"<mask>",
":",
"nil"... |
5,572 | all-5573 | [
"SetPaperWidth",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_print_settings_set_paper_width",
"()",
"."
] | [
"func",
"(",
"ps",
"*",
"PrintSettings",
")",
"SetPaperWidth",
"(",
"width",
"float64",
",",
"<mask>",
"Unit",
")",
"{",
"C",
".",
"gtk_print_settings_set_paper_width",
"(",
"ps",
".",
"native",
"(",
")",
",",
"C",
".",
"gdouble",
"(",
"width",
")",
",",... |
5,573 | all-5574 | [
"handleToken",
"checks",
"for",
"an",
"optional",
"token",
"in",
"the",
"request",
".",
"GitLab",
"s",
"webhook",
"tokens",
"are",
"just",
"simple",
"strings",
"that",
"get",
"sent",
"as",
"a",
"header",
"with",
"the",
"hook",
"request",
".",
"If",
"one",
... | [
"func",
"(",
"g",
"GitlabHook",
")",
"handleToken",
"(",
"r",
"*",
"http",
".",
"Request",
",",
"body",
"[",
"]",
"byte",
",",
"secret",
"string",
")",
"error",
"{",
"token",
":=",
"r",
".",
"Header",
".",
"Get",
"(",
"\"",
"\"",
")",
"\n",
"if",... |
5,574 | all-5575 | [
"RegisterClientCommands",
"registers",
"all",
"API",
"client",
"commands",
"."
] | [
"func",
"RegisterClientCommands",
"(",
"app",
"*",
"kingpin",
".",
"Application",
")",
"{",
"cm15Cmd",
":=",
"app",
".",
"Command",
"(",
"Cm15Command",
",",
"cm15",
".",
"APIName",
")",
"\n",
"registrar",
":=",
"rsapi",
".",
"Registrar",
"{",
"APICmd",
":"... |
5,575 | all-5576 | [
"NewSegment",
"creates",
"a",
"new",
"skiplist",
"segment"
] | [
"func",
"(",
"b",
"*",
"Builder",
")",
"NewSegment",
"(",
")",
"*",
"Segment",
"{",
"seg",
":=",
"&",
"Segment",
"{",
"tail",
":",
"make",
"(",
"[",
"]",
"*",
"Node",
",",
"MaxLevel",
"+",
"1",
")",
",",
"head",
":",
"make",
"(",
"[",
"]",
"*... |
5,576 | all-5577 | [
"WithHTTPOnly",
"true",
"if",
"cookie",
"is",
"http",
"-",
"only",
"."
] | [
"func",
"(",
"p",
"SetCookieParams",
")",
"WithHTTPOnly",
"(",
"httpOnly",
"bool",
")",
"*",
"SetCookieParams",
"{",
"p",
".",
"HTTPOnly",
"=",
"httpOnly",
"\n",
"<mask>",
"&",
"p",
"\n",
"}"
] |
5,577 | all-5578 | [
"AgentAfterUncooperativeClose",
"marks",
"channel",
"closed",
"uncoop",
"."
] | [
"func",
"(",
"w",
"*",
"Worker",
")",
"AgentAfterUncooperativeClose",
"(",
"job",
"*",
"data",
".",
"Job",
")",
"error",
"{",
"logger",
":=",
"w",
".",
"logger",
".",
"Add",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"job",
")",
"\n\... |
5,578 | all-5579 | [
"NewPortForwarder",
"creates",
"a",
"new",
"port",
"forwarder"
] | [
"func",
"NewPortForwarder",
"(",
"namespace",
"string",
")",
"(",
"*",
"PortForwarder",
",",
"error",
")",
"{",
"if",
"namespace",
"==",
"\"",
"\"",
"{",
"namespace",
"=",
"\"",
"\"",
"\n",
"}",
"\n\n",
"rules",
":=",
"clientcmd",
".",
"NewDefaultClientCon... |
5,579 | all-5580 | [
"SubImage",
"returns",
"an",
"image",
"representing",
"the",
"portion",
"of",
"the",
"image",
"p",
"visible",
"through",
"r",
".",
"The",
"returned",
"value",
"shares",
"pixels",
"with",
"the",
"original",
"image",
".",
"The",
"returned",
"value",
"is",
"alw... | [
"func",
"(",
"i",
"*",
"Image",
")",
"SubImage",
"(",
"r",
"image",
".",
"Rectangle",
")",
"<mask>",
".",
"Image",
"{",
"i",
".",
"copyCheck",
"(",
")",
"\n",
"if",
"i",
".",
"isDisposed",
"(",
")",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"img",... |
5,580 | all-5581 | [
"Set",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_print_settings_set",
"()",
".",
"TODO",
":",
"Since",
"value",
"can",
"t",
"be",
"nil",
"we",
"can",
"t",
"unset",
"values",
"here",
"."
] | [
"func",
"(",
"ps",
"*",
"PrintSettings",
")",
"Set",
"(",
"key",
",",
"value",
"string",
")",
"{",
"cKey",
":=",
"C",
".",
"CString",
"(",
"key",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"(",
"cKey",
")",
")",
"\n",
... |
5,581 | all-5582 | [
"title",
":",
"assign",
"role",
"to",
"token",
"path",
":",
"/",
"roles",
"/",
"{",
"name",
"}",
"/",
"token",
"method",
":",
"POST",
"consume",
":",
"application",
"/",
"x",
"-",
"www",
"-",
"form",
"-",
"urlencoded",
"responses",
":",
"200",
":",
... | [
"func",
"assignRoleToToken",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"error",
"{",
"if",
"!",
"permission",
".",
"Check",
"(",
"t",
",",
"permission",
".",
"PermRoleUpdateAssign... |
5,582 | all-5583 | [
"GetSourceAccountBalance",
"retrieves",
"the",
"SourceAccountBalance",
"value",
"from",
"the",
"union",
"returning",
"ok",
"if",
"the",
"union",
"s",
"switch",
"indicated",
"the",
"value",
"is",
"valid",
"."
] | [
"func",
"(",
"u",
"AccountMergeResult",
")",
"GetSourceAccountBalance",
"(",
")",
"(",
"<mask>",
"Int64",
",",
"ok",
"bool",
")",
"{",
"armName",
",",
"_",
":=",
"u",
".",
"ArmForSwitch",
"(",
"int32",
"(",
"u",
".",
"Code",
")",
")",
"\n\n",
"if",
"... |
5,583 | all-5584 | [
"operator_name",
"::",
"=",
"many",
"different",
"two",
"character",
"encodings",
".",
"::",
"=",
"cv",
"<type",
">",
"::",
"=",
"v",
"<digit",
">",
"<source",
"-",
"name",
">",
"We",
"need",
"to",
"know",
"whether",
"we",
"are",
"in",
"an",
"expressio... | [
"func",
"(",
"st",
"*",
"state",
")",
"operatorName",
"(",
"inExpression",
"bool",
")",
"(",
"AST",
",",
"int",
")",
"{",
"if",
"len",
"(",
"st",
".",
"str",
")",
"<",
"2",
"{",
"st",
".",
"fail",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"code"... |
5,584 | all-5585 | [
"SetBaggageItem",
"belongs",
"to",
"the",
"Span",
"interface"
] | [
"func",
"(",
"s",
"*",
"MockSpan",
")",
"SetBaggageItem",
"(",
"<mask>",
",",
"val",
"string",
")",
"opentracing",
".",
"Span",
"{",
"s",
".",
"Lock",
"(",
")",
"\n",
"defer",
"s",
".",
"Unlock",
"(",
")",
"\n",
"s",
".",
"SpanContext",
"=",
"s",
... |
5,585 | all-5586 | [
"defaultLookingDHCPOptions",
":",
"This",
"part",
"is",
"a",
"little",
"annoying",
".",
"If",
"you",
"re",
"running",
"in",
"a",
"region",
"with",
"where",
"there",
"is",
"no",
"default",
"-",
"looking",
"DHCP",
"option",
"set",
"when",
"you",
"create",
"a... | [
"func",
"defaultLookingDHCPOptions",
"(",
"dhcp",
"*",
"ec2",
".",
"DhcpOptions",
",",
"region",
"string",
")",
"bool",
"{",
"if",
"len",
"(",
"dhcp",
".",
"Tags",
")",
"!=",
"0",
"{",
"return",
"false",
"\n",
"}",
"\n\n",
"for",
"_",
",",
"conf",
":... |
5,586 | all-5587 | [
"UseTLS",
"enables",
"Transport",
"Layer",
"Security",
"for",
"the",
"connections",
".",
"cert",
"key",
"=",
"Server",
"certificate",
"/",
"private",
"key",
"pair",
".",
"clientCACert",
"=",
"Optional",
"certificate",
"for",
"verifying",
"client",
"certificates",
... | [
"func",
"(",
"s",
"*",
"Server",
")",
"UseTLS",
"(",
"cert",
",",
"privKey",
",",
"clientCACert",
"[",
"]",
"byte",
")",
"error",
"{",
"tlsCert",
",",
"err",
":=",
"tls",
".",
"X509KeyPair",
"(",
"cert",
",",
"privKey",
")",
"\n",
"if",
"err",
"!="... |
5,587 | all-5588 | [
"GetUnitsOk",
"returns",
"a",
"tuple",
"with",
"the",
"Units",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"s",
"*",
"Series",
")",
"GetUnitsOk",
"(",
")",
"(",
"UnitPair",
",",
"bool",
")",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"Units",
"==",
"nil",
"{",
"return",
"UnitPair",
"{",
"}",
",",
"false",
"\n",
"}",
"\n",
"return",
"*... |
5,588 | all-5589 | [
"NewMockGPUManager",
"creates",
"a",
"new",
"mock",
"instance"
] | [
"func",
"NewMockGPUManager",
"(",
"ctrl",
"*",
"gomock",
".",
"<mask>",
")",
"*",
"MockGPUManager",
"{",
"mock",
":=",
"&",
"MockGPUManager",
"{",
"ctrl",
":",
"ctrl",
"}",
"\n",
"mock",
".",
"recorder",
"=",
"&",
"MockGPUManagerMockRecorder",
"{",
"mock",
... |
5,589 | all-5590 | [
"Count",
"returns",
"COUNT",
"function",
"."
] | [
"func",
"(",
"db",
"*",
"DB",
")",
"Count",
"(",
"column",
"...",
"interface",
"{",
"}",
")",
"*",
"Function",
"{",
"switch",
"len",
"(",
"column",
")",
"{",
"<mask>",
"0",
",",
"1",
":",
"// do nothing.",
"default",
":",
"panic",
"(",
"fmt",
".",
... |
5,590 | all-5591 | [
"Warn",
"records",
"the",
"log",
"with",
"warn",
"level"
] | [
"func",
"(",
"l",
"*",
"Logger",
")",
"Warn",
"(",
"args",
"...",
"<mask>",
"{",
"}",
")",
"{",
"l",
".",
"Output",
"(",
"2",
",",
"LevelWarn",
",",
"fmt",
".",
"Sprint",
"(",
"args",
"...",
")",
")",
"\n",
"}"
] |
5,591 | all-5592 | [
"HasHandlerForIdentity",
"verifies",
"if",
"the",
"given",
"identity",
"has",
"a",
"registered",
"handler",
"."
] | [
"func",
"(",
"p",
"*",
"PushCenter",
")",
"HasHandlerForIdentity",
"(",
"identity",
"Identity",
")",
"bool",
"{",
"if",
"identity",
".",
"Name",
"==",
"AllIdentity",
".",
"<mask>",
"{",
"return",
"p",
".",
"defaultHander",
"!=",
"nil",
"\n",
"}",
"\n",
"... |
5,592 | all-5593 | [
"IsFloating",
"is",
"a",
"wrapper",
"around",
"g_object_is_floating",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"IsFloating",
"(",
")",
"bool",
"{",
"c",
":=",
"C",
".",
"g_object_is_floating",
"(",
"C",
".",
"gpointer",
"(",
"v",
".",
"GObject",
")",
")",
"\n",
"return",
"gobool",
"(",
"c",
")",
"\n",
"}"
] |
5,593 | all-5594 | [
"CVAPI",
"(",
"void",
")",
"cvDilate",
"(",
"const",
"CvArr",
"*",
"src",
"CvArr",
"*",
"dst",
"IplConvKernel",
"*",
"element",
"=",
"NULL",
"int",
"iterations",
"=",
"1",
")",
";",
"/",
"*",
"Erodes",
"an",
"image",
"by",
"using",
"a",
"specific",
"... | [
"func",
"Erode",
"(",
"src",
",",
"dst",
"*",
"IplImage",
",",
"element",
"*",
"IplConvKernel",
",",
"iterations",
"int",
")",
"{",
"C",
".",
"cvErode",
"(",
"unsafe",
".",
"Pointer",
"(",
"src",
")",
",",
"unsafe",
".",
"Pointer",
"(",
"dst",
")",
... |
5,594 | all-5595 | [
"checkStreamSupport",
"checks",
"whether",
"the",
"stream",
"type",
"is",
"supported",
"in",
"the",
"given",
"version",
"."
] | [
"func",
"checkStreamSupport",
"(",
"v",
"*",
"semver",
".",
"Version",
",",
"t",
"streamType",
")",
"bool",
"{",
"nv",
":=",
"&",
"semver",
".",
"Version",
"{",
"Major",
":",
"v",
".",
"Major",
",",
"Minor",
":",
"v",
".",
"Minor",
"}",
"\n",
"for"... |
5,595 | all-5596 | [
"SetThresholds",
"creates",
"Thresholds",
"mutator"
] | [
"func",
"SetThresholds",
"(",
"low",
",",
"medium",
",",
"high",
"uint32",
")",
"Thresholds",
"{",
"<mask>",
"Thresholds",
"{",
"Low",
":",
"&",
"low",
",",
"Medium",
":",
"&",
"medium",
",",
"High",
":",
"&",
"high",
",",
"}",
"\n",
"}"
] |
5,596 | all-5597 | [
"defaultJobBase",
"configures",
"common",
"parameters",
"currently",
"Agent",
"and",
"Namespace",
"."
] | [
"func",
"(",
"c",
"*",
"ProwConfig",
")",
"defaultJobBase",
"(",
"base",
"*",
"JobBase",
")",
"{",
"if",
"base",
".",
"Agent",
"==",
"\"",
"\"",
"{",
"// Use kubernetes by default",
"base",
".",
"Agent",
"=",
"string",
"(",
"prowapi",
".",
"KubernetesAgent... |
5,597 | all-5598 | [
"expandMemorySizeConfig",
"is",
"a",
"helper",
"for",
"expandVirtualMachineConfigSpec",
"that",
"determines",
"if",
"we",
"need",
"to",
"restart",
"the",
"system",
"to",
"increase",
"the",
"amount",
"of",
"available",
"memory",
"on",
"the",
"system",
".",
"This",
... | [
"func",
"expandMemorySizeConfig",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
")",
"int64",
"{",
"om",
",",
"nm",
":=",
"d",
".",
"GetChange",
"(",
"\"",
"\"",
")",
"\n",
"cha",
",",
"_",
":=",
"d",
".",
"GetChange",
"(",
"\"",
"\"",
")",
"\n",
... |
5,598 | all-5599 | [
"clearASMSecretValue",
"cycles",
"through",
"the",
"collection",
"of",
"secret",
"value",
"data",
"and",
"removes",
"them",
"from",
"the",
"task"
] | [
"func",
"(",
"secret",
"*",
"ASMSecretResource",
")",
"clearASMSecretValue",
"(",
")",
"{",
"secret",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"secret",
".",
"<mask>",
".",
"Unlock",
"(",
")",
"\n\n",
"for",
"key",
":=",
"range",
"secret",
".... |
5,599 | all-5600 | [
"NewBatchingWriter",
"creates",
"new",
"BatchingWriter",
".",
"If",
"WithScalingInterval",
"is",
"not",
"specified",
"DefaultScalingInterval",
"value",
"is",
"used",
".",
"If",
"WithInstanceLimit",
"is",
"not",
"specified",
"DefaultInstanceLimit",
"is",
"used",
"."
] | [
"func",
"NewBatchingWriter",
"(",
"log",
"ttnlog",
".",
"Interface",
",",
"w",
"BatchPointsWriter",
",",
"opts",
"...",
"BatchingWriterOption",
")",
"*",
"BatchingWriter",
"{",
"bw",
":=",
"&",
"BatchingWriter",
"{",
"log",
":",
"<mask>",
",",
"writer",
":",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.