id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
21,700 | all-21701 | [
"MustEncode",
"is",
"like",
"Encode",
"but",
"panics",
"on",
"error"
] | [
"func",
"MustEncode",
"(",
"<mask>",
"VersionByte",
",",
"src",
"[",
"]",
"byte",
")",
"string",
"{",
"e",
",",
"err",
":=",
"Encode",
"(",
"version",
",",
"src",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"panic",
"(",
"err",
")",
"\n",
"}",
"\n"... |
21,701 | all-21702 | [
"listEntriesType",
"filters",
"and",
"prints",
"entries",
"based",
"on",
"the",
"entry",
"-",
"type",
"flag"
] | [
"func",
"listEntriesType",
"(",
"entrytype",
"string",
",",
"streamdecoder",
"string",
",",
"ents",
"[",
"]",
"raftpb",
".",
"Entry",
")",
"{",
"entryFilters",
":=",
"evaluateEntrytypeFlag",
"(",
"entrytype",
")",
"\n",
"printerMap",
":=",
"map",
"[",
"string"... |
21,702 | all-21703 | [
"Find",
"finds",
"nodes",
"based",
"on",
"the",
"pathexpr",
".",
"PathExpr"
] | [
"func",
"Find",
"(",
"x",
"tree",
".",
"Node",
",",
"p",
"pathexpr",
".",
"PathExpr",
")",
"[",
"]",
"tree",
".",
"Node",
"{",
"ret",
":=",
"[",
"]",
"tree",
".",
"Node",
"{",
"}",
"\n\n",
"if",
"p",
".",
"Axis",
"==",
"\"",
"\"",
"{",
"findC... |
21,703 | all-21704 | [
"AddTaskIPAddress",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockTaskEngineState",
")",
"AddTaskIPAddress",
"(",
"arg0",
",",
"arg1",
"<mask>",
")",
"{",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
",",
"arg0",
",",
"arg1",
")",
"\n",
"}"
] |
21,704 | all-21705 | [
"CheckApplies",
"returns",
"true",
"if",
"the",
"certificate",
"contains",
"any",
"names",
"that",
"end",
"in",
"one",
"of",
"the",
"two",
"designated",
"zones",
"for",
"reverse",
"DNS",
":",
"in",
"-",
"addr",
".",
"arpa",
"or",
"ip6",
".",
"arpa",
"."
... | [
"func",
"(",
"l",
"*",
"arpaReservedIP",
")",
"CheckApplies",
"(",
"c",
"*",
"x509",
".",
"Certificate",
")",
"bool",
"{",
"names",
":=",
"append",
"(",
"[",
"]",
"string",
"{",
"c",
".",
"Subject",
".",
"CommonName",
"}",
",",
"c",
".",
"DNSNames",
... |
21,705 | all-21706 | [
"insertLink",
"attempts",
"to",
"set",
"metadata",
".",
"links",
".",
"resultstore",
".",
"url",
"to",
"viewURL",
".",
"returns",
"true",
"if",
"started",
"metadata",
"was",
"updated",
"."
] | [
"func",
"insertLink",
"(",
"started",
"*",
"gcs",
".",
"Started",
",",
"viewURL",
"string",
")",
"(",
"bool",
",",
"error",
")",
"{",
"if",
"started",
".",
"Metadata",
"==",
"nil",
"{",
"started",
".",
"Metadata",
"=",
"metadata",
".",
"Metadata",
"{",... |
21,706 | all-21707 | [
"NewMetricsHandler",
"returns",
"a",
"healthcheck",
"Handler",
"that",
"also",
"exposes",
"metrics",
"into",
"the",
"provided",
"Prometheus",
"registry",
"."
] | [
"func",
"NewMetricsHandler",
"(",
"registry",
"prometheus",
".",
"Registerer",
",",
"namespace",
"string",
")",
"<mask>",
"{",
"return",
"&",
"metricsHandler",
"{",
"handler",
":",
"NewHandler",
"(",
")",
",",
"registry",
":",
"registry",
",",
"namespace",
":"... |
21,707 | all-21708 | [
"AllImageStates",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockTaskEngineState",
")",
"AllImageStates",
"(",
")",
"[",
"]",
"*",
"image",
".",
"ImageState",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
")",
"\n",
"ret0",
",",
"_",
":=",
"ret",
"[",
... |
21,708 | all-21709 | [
"native",
"returns",
"a",
"pointer",
"to",
"the",
"underlying",
"GtkRecentManager",
"."
] | [
"func",
"(",
"v",
"*",
"RecentManager",
")",
"native",
"(",
")",
"*",
"C",
".",
"GtkRecentManager",
"{",
"if",
"v",
"==",
"nil",
"||",
"v",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"p",
":=",
"unsafe",
".",
"Pointer",
"(... |
21,709 | all-21710 | [
"ClientAfterChannelTopUp",
"updates",
"deposit",
"of",
"a",
"channel",
"."
] | [
"func",
"(",
"w",
"*",
"Worker",
")",
"ClientAfterChannelTopUp",
"(",
"job",
"*",
"data",
".",
"<mask>",
")",
"error",
"{",
"return",
"w",
".",
"afterChannelTopUp",
"(",
"job",
",",
"data",
".",
"JobClientAfterChannelTopUp",
")",
"\n",
"}"
] |
21,710 | all-21711 | [
"----------------------------------------",
"Signed"
] | [
"func",
"DecodeInt8",
"(",
"bz",
"[",
"]",
"byte",
")",
"(",
"i",
"int8",
",",
"n",
"int",
",",
"err",
"error",
")",
"{",
"var",
"i64",
"=",
"int64",
"(",
"0",
")",
"\n",
"i64",
",",
"n",
",",
"err",
"=",
"DecodeVarint",
"(",
"bz",
")",
"\n",... |
21,711 | all-21712 | [
"DeepCopy",
"is",
"an",
"autogenerated",
"deepcopy",
"function",
"copying",
"the",
"receiver",
"creating",
"a",
"new",
"DNSEndpoint",
"."
] | [
"func",
"(",
"in",
"*",
"DNSEndpoint",
")",
"DeepCopy",
"(",
")",
"*",
"DNSEndpoint",
"{",
"if",
"in",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"out",
":=",
"<mask>",
"(",
"DNSEndpoint",
")",
"\n",
"in",
".",
"DeepCopyInto",
"(",
"out",
... |
21,712 | all-21713 | [
"shrinkEntriesArray",
"discards",
"the",
"underlying",
"array",
"used",
"by",
"the",
"entries",
"slice",
"if",
"most",
"of",
"it",
"isn",
"t",
"being",
"used",
".",
"This",
"avoids",
"holding",
"references",
"to",
"a",
"bunch",
"of",
"potentially",
"large",
... | [
"func",
"(",
"u",
"*",
"unstable",
")",
"shrinkEntriesArray",
"(",
")",
"{",
"// We replace the array if we're using less than half of the space in",
"// it. This number is fairly arbitrary, chosen as an attempt to balance",
"// memory usage vs number of allocations. It could probably be imp... |
21,713 | all-21714 | [
"Seek",
"brings",
"us",
"to",
"element",
">",
"=",
"key",
"if",
"reversed",
"is",
"false",
".",
"Otherwise",
"<",
"=",
"key",
"."
] | [
"func",
"(",
"s",
"*",
"ConcatIterator",
")",
"Seek",
"(",
"key",
"[",
"]",
"byte",
")",
"{",
"var",
"idx",
"int",
"\n",
"if",
"!",
"s",
".",
"reversed",
"{",
"idx",
"=",
"<mask>",
".",
"Search",
"(",
"len",
"(",
"s",
".",
"tables",
")",
",",
... |
21,714 | all-21715 | [
"KeepAlive",
"signals",
"that",
"the",
"connection",
"is",
"still",
"in",
"use",
".",
"It",
"may",
"be",
"called",
"to",
"prevent",
"the",
"socket",
"being",
"closed",
"due",
"to",
"inactivity",
"."
] | [
"func",
"(",
"cn",
"*",
"Conn",
")",
"KeepAlive",
"(",
")",
"error",
"{",
"req",
":=",
"&",
"pb",
".",
"GetSocketNameRequest",
"{",
"SocketDescriptor",
":",
"&",
"cn",
".",
"desc",
",",
"}",
"\n",
"res",
":=",
"&",
"<mask>",
".",
"GetSocketNameReply",
... |
21,715 | all-21716 | [
"Source",
"returns",
"the",
"backing",
"file",
"and",
"offset",
"for",
"the",
"mapping",
"or",
"0",
"if",
"none",
"."
] | [
"func",
"(",
"m",
"*",
"Mapping",
")",
"Source",
"(",
")",
"(",
"string",
",",
"int64",
")",
"{",
"if",
"m",
".",
"f",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"0",
"\n",
"}",
"\n",
"return",
"m",
".",
"f",
".",
"<mask>",
"(",
")",
",",... |
21,716 | all-21717 | [
"setVPCSubnet",
"sets",
"the",
"vpc",
"and",
"subnet",
"ids",
"for",
"the",
"agent",
"by",
"querying",
"the",
"instance",
"metadata",
"service"
] | [
"func",
"(",
"agent",
"*",
"ecsAgent",
")",
"setVPCSubnet",
"(",
")",
"(",
"error",
",",
"bool",
")",
"{",
"mac",
",",
"err",
":=",
"agent",
".",
"ec2MetadataClient",
".",
"PrimaryENIMAC",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"fmt... |
21,717 | all-21718 | [
"HandlerDisconnect",
"is",
"a",
"wrapper",
"around",
"g_signal_handler_disconnect",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Object",
")",
"HandlerDisconnect",
"(",
"handle",
"SignalHandle",
")",
"{",
"C",
".",
"g_signal_handler_disconnect",
"(",
"C",
".",
"gpointer",
"(",
"v",
".",
"GObject",
")",
",",
"C",
".",
"gulong",
"(",
"handle",
")",
")",
"\n... |
21,718 | all-21719 | [
"Finalize",
"ensures",
"there",
"no",
"nil",
"pointers",
"."
] | [
"func",
"(",
"c",
"*",
"WaitConfig",
")",
"Finalize",
"(",
")",
"{",
"if",
"c",
".",
"Enabled",
"==",
"nil",
"{",
"c",
".",
"Enabled",
"=",
"Bool",
"(",
"TimeDurationPresent",
"(",
"c",
".",
"Min",
")",
")",
"\n",
"}",
"\n\n",
"if",
"c",
".",
"... |
21,719 | all-21720 | [
"InsertText",
"is",
"a",
"wrapper",
"around",
"gtk_editable_insert_text",
"()",
".",
"The",
"returned",
"int",
"is",
"the",
"position",
"after",
"the",
"inserted",
"text",
"."
] | [
"func",
"(",
"v",
"*",
"Editable",
")",
"InsertText",
"(",
"newText",
"string",
",",
"position",
"int",
")",
"int",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"newText",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"(",
... |
21,720 | all-21721 | [
"UnmarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Unmarshaler",
"."
] | [
"func",
"(",
"t",
"*",
"PseudoType",
")",
"UnmarshalEasyJSON",
"(",
"in",
"*",
"jlexer",
".",
"Lexer",
")",
"{",
"switch",
"PseudoType",
"(",
"in",
".",
"String",
"(",
")",
")",
"{",
"case",
"PseudoTypeFirstLine",
":",
"*",
"t",
"=",
"PseudoTypeFirstLine... |
21,721 | all-21722 | [
"Reader",
"implements",
"the",
"corresponding",
"method",
"in",
"the",
"Client",
"interface"
] | [
"func",
"(",
"o",
"*",
"tracingObjClient",
")",
"Reader",
"(",
"ctx",
"context",
".",
"<mask>",
",",
"name",
"string",
",",
"offset",
"uint64",
",",
"size",
"uint64",
")",
"(",
"io",
".",
"ReadCloser",
",",
"error",
")",
"{",
"span",
",",
"ctx",
":="... |
21,722 | all-21723 | [
"Claimer",
"is",
"responsible",
"for",
"transforming",
"a",
"standard",
"claims",
"object",
"into",
"a",
"custom",
"one",
"."
] | [
"func",
"Claimer",
"(",
"c",
"func",
"(",
"claims",
"*",
"jwt",
".",
"StandardClaims",
")",
"jwt",
".",
"Claims",
")",
"TokenOpt",
"{",
"return",
"TokenOpt",
"{",
"func",
"(",
"o",
"*",
"<mask>",
")",
"{",
"o",
".",
"claimer",
"=",
"c",
"\n",
"}",
... |
21,723 | all-21724 | [
"BodyWriteTo",
"writes",
"response",
"body",
"to",
"w",
"."
] | [
"func",
"(",
"resp",
"*",
"Response",
")",
"BodyWriteTo",
"(",
"w",
"<mask>",
".",
"Writer",
")",
"error",
"{",
"if",
"resp",
".",
"bodyStream",
"!=",
"nil",
"{",
"_",
",",
"err",
":=",
"copyZeroAlloc",
"(",
"w",
",",
"resp",
".",
"bodyStream",
")",
... |
21,724 | all-21725 | [
"UpdateIntegrationSlack",
"updates",
"the",
"Slack",
"Integration",
".",
"This",
"will",
"replace",
"the",
"existing",
"values",
"with",
"the",
"new",
"values",
"."
] | [
"func",
"(",
"<mask>",
"*",
"Client",
")",
"UpdateIntegrationSlack",
"(",
"slackIntegration",
"*",
"IntegrationSlackRequest",
")",
"error",
"{",
"return",
"client",
".",
"doJsonRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"slackIntegration",
",",
"nil",
")... |
21,725 | all-21726 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"the",
"current",
"program",
"object"
] | [
"func",
"Uniform1fv",
"(",
"location",
"int32",
",",
"<mask>",
"int32",
",",
"value",
"*",
"float32",
")",
"{",
"C",
".",
"glowUniform1fv",
"(",
"gpUniform1fv",
",",
"(",
"C",
".",
"GLint",
")",
"(",
"location",
")",
",",
"(",
"C",
".",
"GLsizei",
")... |
21,726 | all-21727 | [
"updateEmbeddedDockerReference",
"handles",
"the",
"Docker",
"reference",
"embedded",
"in",
"Docker",
"schema1",
"manifests",
"."
] | [
"func",
"(",
"ic",
"*",
"imageCopier",
")",
"updateEmbeddedDockerReference",
"(",
")",
"error",
"{",
"if",
"ic",
".",
"c",
".",
"dest",
".",
"IgnoresEmbeddedDockerReference",
"(",
")",
"{",
"return",
"nil",
"// Destination would prefer us not to update the embedded re... |
21,727 | all-21728 | [
"CreateProwJob",
"creates",
"a",
"prowjob",
"in",
"the",
"client",
"s",
"specified",
"namespace",
".",
"Analogous",
"to",
"kubectl",
"create",
"prowjob",
"--",
"namespace",
"=",
"client",
".",
"namespace"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"CreateProwJob",
"(",
"j",
"prowapi",
".",
"ProwJob",
")",
"(",
"prowapi",
".",
"ProwJob",
",",
"error",
")",
"{",
"var",
"representation",
"string",
"\n",
"if",
"out",
",",
"err",
":=",
"json",
".",
"Marshal",
"... |
21,728 | all-21729 | [
"return",
"a",
"binary",
"representation",
"of",
"a",
"program",
"object",
"s",
"compiled",
"and",
"linked",
"executable",
"source"
] | [
"func",
"GetProgramBinary",
"(",
"program",
"uint32",
",",
"bufSize",
"int32",
",",
"length",
"*",
"int32",
",",
"binaryFormat",
"*",
"uint32",
",",
"<mask>",
"unsafe",
".",
"Pointer",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpGetProgramBinary",
",",
"5"... |
21,729 | all-21730 | [
"Name",
"sets",
"name",
"of",
"route",
"."
] | [
"func",
"(",
"r",
"*",
"Route",
")",
"Name",
"(",
"name",
"string",
")",
"{",
"if",
"len",
"(",
"name",
")",
"==",
"0",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"else",
"if",
"r",
".",
"router",
".",
"namedRoutes",
"[",
"<mask>",
"]",
"... |
21,730 | all-21731 | [
"StringMD5Hex",
"returns",
"the",
"hex",
"encoded",
"MD5",
"hash",
"of",
"data"
] | [
"func",
"StringMD5Hex",
"(",
"data",
"string",
")",
"string",
"{",
"hash",
":=",
"md5",
".",
"New",
"(",
")",
"\n",
"<mask>",
".",
"Write",
"(",
"[",
"]",
"byte",
"(",
"data",
")",
")",
"\n",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",... |
21,731 | all-21732 | [
"createSession",
"is",
"used",
"to",
"create",
"and",
"maintain",
"a",
"session",
"to",
"Consul"
] | [
"func",
"(",
"d",
"*",
"DedupManager",
")",
"createSession",
"(",
"client",
"*",
"consulapi",
".",
"Client",
")",
"{",
"START",
":",
"log",
".",
"Printf",
"(",
"\"",
"\"",
")",
"\n",
"session",
":=",
"client",
".",
"Session",
"(",
")",
"\n",
"session... |
21,732 | all-21733 | [
"retryCmd",
"will",
"retry",
"the",
"command",
"a",
"few",
"times",
"with",
"backoff",
".",
"Use",
"this",
"for",
"any",
"commands",
"that",
"will",
"be",
"talking",
"to",
"GitHub",
"such",
"as",
"clones",
"or",
"fetches",
"."
] | [
"func",
"retryCmd",
"(",
"l",
"*",
"logrus",
".",
"Entry",
",",
"dir",
",",
"cmd",
"string",
",",
"arg",
"...",
"string",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"var",
"b",
"[",
"]",
"byte",
"\n",
"var",
"err",
"error",
"\n",
"slee... |
21,733 | all-21734 | [
"DeleteServer",
"deletes",
"the",
"server",
"where",
"id",
"=",
"srvid",
"and",
"returns",
"Resp",
"struct"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"DeleteServer",
"(",
"dcid",
",",
"srvid",
"string",
")",
"(",
"*",
"http",
".",
"<mask>",
",",
"error",
")",
"{",
"ret",
":=",
"&",
"http",
".",
"Header",
"{",
"}",
"\n",
"err",
":=",
"c",
".",
"client",
"... |
21,734 | all-21735 | [
"Before",
"will",
"retrieve",
"all",
"old",
"rows",
"that",
"were",
"created",
"before",
"the",
"row",
"with",
"id",
"was",
"created",
"[",
"1",
"2",
"3",
"4",
"]",
"before",
"2",
"will",
"return",
"[",
"3",
"4",
"]",
"r",
".",
"db",
"(",
"worksmar... | [
"func",
"(",
"s",
"RethinkStore",
")",
"Before",
"(",
"id",
"string",
",",
"count",
"int",
",",
"skip",
"int",
",",
"store",
"string",
")",
"(",
"rows",
"ObjectRows",
",",
"err",
"error",
")",
"{",
"result",
",",
"err",
":=",
"r",
".",
"DB",
"(",
... |
21,735 | all-21736 | [
"SetStartupID",
"is",
"a",
"wrapper",
"around",
"gtk_window_set_startup_id",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Window",
")",
"SetStartupID",
"(",
"sid",
"string",
")",
"{",
"cstr",
":=",
"(",
"*",
"C",
".",
"gchar",
")",
"(",
"C",
".",
"CString",
"(",
"sid",
")",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointe... |
21,736 | all-21737 | [
"SetScriptTimeout",
"sets",
"the",
"script",
"timeout",
"(",
"in",
"ms",
")"
] | [
"func",
"(",
"p",
"*",
"Page",
")",
"SetScriptTimeout",
"(",
"timeout",
"int",
")",
"error",
"{",
"return",
"p",
".",
"<mask>",
".",
"SetScriptTimeout",
"(",
"timeout",
")",
"\n",
"}"
] |
21,737 | all-21738 | [
"ParseCommand",
"actually",
"runs",
"a",
"command",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"ParseCommand",
"(",
"cmd",
",",
"hrefPrefix",
"string",
",",
"values",
"ActionCommands",
")",
"(",
"*",
"ParsedCommand",
",",
"error",
")",
"{",
"// 0. Show help if requested",
"val",
",",
"ok",
":=",
"values",
"[",
"cmd... |
21,738 | all-21739 | [
"HasTickEvery",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"s",
"*",
"SyntheticsOptions",
")",
"HasTickEvery",
"(",
")",
"bool",
"{",
"if",
"s",
"!=",
"nil",
"&&",
"s",
".",
"TickEvery",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
21,739 | all-21740 | [
"retrieve",
"information",
"about",
"a",
"bound",
"renderbuffer",
"object"
] | [
"func",
"GetRenderbufferParameteriv",
"(",
"<mask>",
"uint32",
",",
"pname",
"uint32",
",",
"params",
"*",
"int32",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpGetRenderbufferParameteriv",
",",
"3",
",",
"uintptr",
"(",
"target",
")",
",",
"uintptr",
"(",
"... |
21,740 | all-21741 | [
"StructuredLogger",
"is",
"a",
"simple",
"but",
"powerful",
"implementation",
"of",
"a",
"custom",
"structured",
"logger",
"backed",
"on",
"logrus",
".",
"I",
"encourage",
"users",
"to",
"copy",
"it",
"adapt",
"it",
"and",
"make",
"it",
"their",
"own",
".",
... | [
"func",
"NewStructuredLogger",
"(",
"logger",
"*",
"logrus",
".",
"Logger",
")",
"func",
"(",
"next",
"http",
".",
"Handler",
")",
"<mask>",
".",
"Handler",
"{",
"return",
"middleware",
".",
"RequestLogger",
"(",
"&",
"StructuredLogger",
"{",
"logger",
"}",
... |
21,741 | all-21742 | [
"Records",
"returns",
"all",
"DNS",
"records",
"found",
"in",
"CoreDNS",
"etcd",
"backend",
".",
"Depending",
"on",
"the",
"record",
"fields",
"it",
"may",
"be",
"mapped",
"to",
"one",
"or",
"two",
"records",
"of",
"type",
"A",
"CNAME",
"TXT",
"A",
"+",
... | [
"func",
"(",
"p",
"coreDNSProvider",
")",
"Records",
"(",
")",
"(",
"[",
"]",
"*",
"endpoint",
".",
"Endpoint",
",",
"error",
")",
"{",
"var",
"result",
"[",
"]",
"*",
"endpoint",
".",
"Endpoint",
"\n",
"services",
",",
"err",
":=",
"p",
".",
"clie... |
21,742 | all-21743 | [
"AccelGroupsFromObject",
"is",
"a",
"wrapper",
"around",
"gtk_accel_groups_from_object",
"()",
"."
] | [
"func",
"AccelGroupsFromObject",
"(",
"obj",
"*",
"glib",
".",
"Object",
")",
"*",
"glib",
".",
"SList",
"{",
"<mask>",
":=",
"C",
".",
"gtk_accel_groups_from_object",
"(",
"(",
"*",
"C",
".",
"GObject",
")",
"(",
"unsafe",
".",
"Pointer",
"(",
"obj",
... |
21,743 | all-21744 | [
"called",
"from",
"queue"
] | [
"func",
"(",
"sw",
"*",
"secondWindow",
")",
"Init",
"(",
"w",
"*",
"ttk",
".",
"Window",
")",
"{",
"sw",
".",
"l",
"=",
"w",
".",
"AddLabel",
"(",
"2",
",",
"2",
",",
"\"",
"\"",
")",
"\n",
"sw",
".",
"l",
".",
"SetAttributes",
"(",
"ttk",
... |
21,744 | all-21745 | [
"IsProgressNotify",
"returns",
"true",
"if",
"the",
"WatchResponse",
"is",
"progress",
"notification",
"."
] | [
"func",
"(",
"wr",
"*",
"WatchResponse",
")",
"IsProgressNotify",
"(",
")",
"bool",
"{",
"return",
"len",
"(",
"wr",
".",
"Events",
")",
"==",
"0",
"&&",
"!",
"wr",
".",
"Canceled",
"&&",
"!",
"wr",
".",
"Created",
"&&",
"wr",
".",
"CompactRevision",... |
21,745 | all-21746 | [
"scan",
"enumerates",
"events",
"from",
"the",
"index",
"history",
"and",
"stops",
"at",
"the",
"first",
"point",
"where",
"the",
"key",
"matches",
"."
] | [
"func",
"(",
"eh",
"*",
"EventHistory",
")",
"scan",
"(",
"key",
"string",
",",
"recursive",
"bool",
",",
"index",
"uint64",
")",
"(",
"*",
"Event",
",",
"*",
"v2error",
".",
"Error",
")",
"{",
"eh",
".",
"rwl",
".",
"RLock",
"(",
")",
"\n",
"def... |
21,746 | all-21747 | [
"AddIPAddr",
"adds",
"an",
"IP",
"address",
"to",
"Pinger",
".",
"ip",
"arg",
"should",
"be",
"a",
"net",
".",
"IPAddr",
"pointer",
"."
] | [
"func",
"(",
"p",
"*",
"Pinger",
")",
"AddIPAddr",
"(",
"ip",
"*",
"net",
".",
"IPAddr",
")",
"{",
"p",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"p",
".",
"addrs",
"[",
"ip",
".",
"String",
"(",
")",
"]",
"=",
"<mask>",
"\n",
"if",
"isIPv4",
... |
21,747 | all-21748 | [
"NewDiscovery",
"returns",
"a",
"new",
"Marathon",
"Discovery",
"."
] | [
"func",
"NewDiscovery",
"(",
"conf",
"SDConfig",
",",
"logger",
"log",
".",
"Logger",
")",
"(",
"*",
"Discovery",
",",
"error",
")",
"{",
"rt",
",",
"err",
":=",
"config_util",
".",
"NewRoundTripperFromConfig",
"(",
"conf",
".",
"HTTPClientConfig",
",",
"\... |
21,748 | all-21749 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetCategoriesParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing7",
"(",
"&",
"w",
",",
"v",
")... |
21,749 | all-21750 | [
"Arg",
"appends",
"a",
"new",
"argument",
"to",
"the",
"command",
"."
] | [
"func",
"(",
"c",
"*",
"Command",
")",
"Arg",
"(",
"v",
"interface",
"{",
"}",
")",
"*",
"Command",
"{",
"c",
".",
"args",
"=",
"<mask>",
"(",
"c",
".",
"args",
",",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"v",
")",
")",
"\n",
"return",
... |
21,750 | all-21751 | [
"deadlineLoop",
"reaps",
"any",
"keep",
"alive",
"channels",
"that",
"have",
"not",
"received",
"a",
"response",
"within",
"the",
"lease",
"TTL"
] | [
"func",
"(",
"l",
"*",
"lessor",
")",
"deadlineLoop",
"(",
")",
"{",
"for",
"{",
"select",
"{",
"case",
"<-",
"time",
".",
"After",
"(",
"time",
".",
"Second",
")",
":",
"case",
"<-",
"l",
".",
"donec",
":",
"return",
"\n",
"}",
"\n",
"now",
":... |
21,751 | all-21752 | [
"Receive",
"receives",
"frames",
"intended",
"for",
"this",
"connection",
".",
"It",
"returns",
"whether",
"the",
"frame",
"was",
"sent",
"and",
"a",
"reason",
"for",
"failure",
"if",
"it",
"failed",
"."
] | [
"func",
"(",
"r",
"*",
"Relayer",
")",
"Receive",
"(",
"f",
"*",
"Frame",
",",
"fType",
"frameType",
")",
"(",
"sent",
"bool",
",",
"failureReason",
"string",
")",
"{",
"id",
":=",
"f",
".",
"Header",
".",
"ID",
"\n\n",
"// If we receive a response frame... |
21,752 | all-21753 | [
"SetBodyRaw",
"sets",
"response",
"body",
"but",
"without",
"copying",
"it",
".",
"From",
"this",
"point",
"onward",
"the",
"body",
"argument",
"must",
"not",
"be",
"changed",
"."
] | [
"func",
"(",
"resp",
"*",
"Response",
")",
"SetBodyRaw",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"{",
"resp",
".",
"ResetBody",
"(",
")",
"\n",
"resp",
".",
"bodyRaw",
"=",
"body",
"\n",
"}"
] |
21,753 | all-21754 | [
"invalidate",
"the",
"content",
"of",
"a",
"region",
"of",
"some",
"or",
"all",
"of",
"a",
"framebuffer",
"s",
"attachments"
] | [
"func",
"InvalidateNamedFramebufferSubData",
"(",
"framebuffer",
"uint32",
",",
"numAttachments",
"int32",
",",
"attachments",
"*",
"uint32",
",",
"x",
"int32",
",",
"y",
"int32",
",",
"<mask>",
"int32",
",",
"height",
"int32",
")",
"{",
"C",
".",
"glowInvalid... |
21,754 | all-21755 | [
"SetXAlign",
"is",
"a",
"wrapper",
"around",
"gtk_label_set_xalign",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"SetXAlign",
"(",
"n",
"float64",
")",
"{",
"C",
".",
"gtk_label_set_xalign",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"gfloat",
"(",
"n",
")",
")",
"\n",
"}"
] |
21,755 | all-21756 | [
"NewRcodezeroChange",
"returns",
"a",
"RcodeZero",
"specific",
"rrset",
"change",
"object",
"."
] | [
"func",
"(",
"p",
"*",
"RcodeZeroProvider",
")",
"NewRcodezeroChange",
"(",
"action",
"string",
",",
"endpoint",
"*",
"endpoint",
".",
"Endpoint",
")",
"*",
"rc0",
".",
"RRSetChange",
"{",
"change",
":=",
"&",
"rc0",
".",
"RRSetChange",
"{",
"Type",
":",
... |
21,756 | all-21757 | [
"Get",
"lxc",
"container",
"state",
"with",
"1",
"second",
"timeout",
"If",
"we",
"don",
"t",
"get",
"a",
"reply",
"assume",
"the",
"lxc",
"monitor",
"is",
"hung"
] | [
"func",
"(",
"c",
"*",
"containerLXC",
")",
"getLxcState",
"(",
")",
"(",
"lxc",
".",
"State",
",",
"error",
")",
"{",
"if",
"c",
".",
"IsSnapshot",
"(",
")",
"{",
"return",
"lxc",
".",
"StateMap",
"[",
"\"",
"\"",
"]",
",",
"nil",
"\n",
"}",
"... |
21,757 | all-21758 | [
"PushFrame",
"pushes",
"a",
"new",
"frame",
"to",
"the",
"frame",
"stack"
] | [
"func",
"(",
"st",
"*",
"State",
")",
"PushFrame",
"(",
")",
"*",
"frame",
".",
"Frame",
"{",
"f",
":=",
"<mask>",
".",
"New",
"(",
"st",
".",
"framestack",
")",
"\n",
"st",
".",
"frames",
".",
"Push",
"(",
"f",
")",
"\n",
"f",
".",
"SetMark",
... |
21,758 | all-21759 | [
"VisitAllCookie",
"calls",
"f",
"for",
"each",
"response",
"cookie",
".",
"Cookie",
"name",
"is",
"passed",
"in",
"key",
"and",
"the",
"whole",
"Set",
"-",
"Cookie",
"header",
"value",
"is",
"passed",
"in",
"value",
"on",
"each",
"f",
"invocation",
".",
... | [
"func",
"(",
"h",
"*",
"ResponseHeader",
")",
"VisitAllCookie",
"(",
"f",
"func",
"(",
"<mask>",
",",
"value",
"[",
"]",
"byte",
")",
")",
"{",
"visitArgs",
"(",
"h",
".",
"cookies",
",",
"f",
")",
"\n",
"}"
] |
21,759 | all-21760 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"SetDeviceMetricsOverrideParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation12",
... |
21,760 | all-21761 | [
"effectiveSr",
"gets",
"the",
"current",
"effective",
"scroll",
"region",
"in",
"buffer",
"coordinates"
] | [
"func",
"(",
"h",
"*",
"windowsAnsiEventHandler",
")",
"effectiveSr",
"(",
"window",
"SMALL_RECT",
")",
"scrollRegion",
"{",
"top",
":=",
"addInRange",
"(",
"window",
".",
"Top",
",",
"h",
".",
"sr",
".",
"top",
",",
"window",
".",
"Top",
",",
"window",
... |
21,761 | all-21762 | [
"Hash",
"returns",
"the",
"hash",
"of",
"this",
"builder",
"s",
"transaction",
"."
] | [
"func",
"(",
"b",
"*",
"TransactionBuilder",
")",
"Hash",
"(",
")",
"(",
"[",
"32",
"]",
"byte",
",",
"error",
")",
"{",
"var",
"txBytes",
"bytes",
".",
"Buffer",
"\n\n",
"_",
",",
"err",
":=",
"fmt",
".",
"Fprintf",
"(",
"&",
"txBytes",
",",
"\"... |
21,762 | all-21763 | [
"RegisterVM",
"adds",
"a",
"virtual",
"machine",
"to",
"the",
"host",
"s",
"inventory",
".",
"Parameters",
":",
"vmxFile",
":",
"The",
"path",
"name",
"of",
"the",
".",
"vmx",
"file",
"on",
"the",
"host",
".",
"Remarks",
":",
"*",
"This",
"function",
"... | [
"func",
"(",
"h",
"*",
"Host",
")",
"RegisterVM",
"(",
"vmxFile",
"string",
")",
"error",
"{",
"var",
"jobHandle",
"C",
".",
"VixHandle",
"=",
"C",
".",
"VIX_INVALID_HANDLE",
"\n",
"var",
"err",
"C",
".",
"VixError",
"=",
"C",
".",
"VIX_OK",
"\n\n",
... |
21,763 | all-21764 | [
"GetState",
"is",
"a",
"wrapper",
"around",
"g_action_get_state"
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"GetState",
"(",
")",
"*",
"Variant",
"{",
"c",
":=",
"C",
".",
"g_action_get_state",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"return",
"... |
21,764 | all-21765 | [
"expandExtraConfig",
"reads",
"in",
"all",
"the",
"extra_config",
"key",
"/",
"value",
"pairs",
"and",
"returns",
"the",
"appropriate",
"OptionValue",
"slice",
".",
"We",
"track",
"changes",
"to",
"keys",
"to",
"determine",
"if",
"any",
"have",
"been",
"remove... | [
"func",
"expandExtraConfig",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
")",
"[",
"]",
"types",
".",
"BaseOptionValue",
"{",
"if",
"d",
".",
"HasChange",
"(",
"\"",
"\"",
")",
"{",
"// While there's a possibility that modification of some settings in",
"// extraC... |
21,765 | all-21766 | [
"SetText",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_clipboard_set_text",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Clipboard",
")",
"SetText",
"(",
"text",
"string",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"text",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n",
"C",
".",
"... |
21,766 | all-21767 | [
"String",
"returns",
"the",
"string",
"representation",
"of",
"a",
"PerfDatum",
"suitable",
"for",
"check",
"output",
"."
] | [
"func",
"(",
"p",
"PerfDatum",
")",
"String",
"(",
")",
"string",
"{",
"val",
":=",
"fmtPerfFloat",
"(",
"p",
".",
"value",
")",
"\n",
"value",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"p",
".",
"label",
",",
"val",
",",
"p",
".",
"un... |
21,767 | all-21768 | [
"Get",
"returns",
"a",
"single",
"Queue",
"or",
"an",
"error",
"."
] | [
"func",
"(",
"c",
"*",
"QueueService",
")",
"Get",
"(",
"ctx",
"context",
".",
"Context",
",",
"sid",
"string",
")",
"(",
"*",
"Queue",
",",
"error",
")",
"{",
"queue",
":=",
"new",
"(",
"Queue",
")",
"\n",
"err",
":=",
"c",
".",
"<mask>",
".",
... |
21,768 | all-21769 | [
"Set",
"is",
"part",
"of",
"the",
"flag",
".",
"Value",
"interface",
"."
] | [
"func",
"(",
"s",
"*",
"Severity",
")",
"<mask>",
"(",
"value",
"string",
")",
"error",
"{",
"var",
"threshold",
"Severity",
"\n",
"// Is it a known name?",
"if",
"v",
",",
"ok",
":=",
"severityByName",
"(",
"value",
")",
";",
"ok",
"{",
"threshold",
"="... |
21,769 | all-21770 | [
"/",
"1",
".",
"0",
"/",
"storage",
"-",
"pools",
"/",
"{",
"name",
"}",
"/",
"resources",
"Get",
"resources",
"for",
"a",
"specific",
"storage",
"pool"
] | [
"func",
"storagePoolResourcesGet",
"(",
"d",
"*",
"Daemon",
",",
"r",
"*",
"http",
".",
"Request",
")",
"Response",
"{",
"// If a target was specified, forward the request to the relevant node.",
"response",
":=",
"ForwardedResponseIfTargetIsRemote",
"(",
"d",
",",
"r",
... |
21,770 | all-21771 | [
"AddContainer",
"adds",
"a",
"container",
"to",
"the",
"state",
".",
"If",
"the",
"container",
"has",
"been",
"added",
"with",
"only",
"a",
"name",
"and",
"no",
"docker",
"-",
"id",
"this",
"updates",
"the",
"state",
"to",
"include",
"the",
"docker",
"id... | [
"func",
"(",
"state",
"*",
"DockerTaskEngineState",
")",
"AddContainer",
"(",
"container",
"*",
"apicontainer",
".",
"DockerContainer",
",",
"task",
"*",
"apitask",
".",
"Task",
")",
"{",
"state",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"state",... |
21,771 | all-21772 | [
"Allows",
"this",
"client",
"to",
"call",
"your",
"application",
"with",
"id",
"appSid",
"(",
"See",
"https",
":",
"//",
"www",
".",
"twilio",
".",
"com",
"/",
"user",
"/",
"account",
"/",
"apps",
")",
".",
"When",
"the",
"call",
"connects",
"Twilio",
... | [
"func",
"(",
"c",
"*",
"Capability",
")",
"AllowClientOutgoing",
"(",
"appSid",
"string",
",",
"appParams",
"<mask>",
"[",
"string",
"]",
"string",
")",
"{",
"c",
".",
"shouldBuildOutgoingScope",
"=",
"true",
"\n",
"c",
".",
"appSid",
"=",
"appSid",
"\n",
... |
21,772 | all-21773 | [
"String",
"returns",
"the",
"name",
"of",
"e"
] | [
"func",
"(",
"e",
"LedgerEntryChangeType",
")",
"String",
"(",
")",
"string",
"{",
"<mask>",
",",
"_",
":=",
"ledgerEntryChangeTypeMap",
"[",
"int32",
"(",
"e",
")",
"]",
"\n",
"return",
"name",
"\n",
"}"
] |
21,773 | all-21774 | [
"GetPaletteOk",
"returns",
"a",
"tuple",
"with",
"the",
"Palette",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"g",
"*",
"GraphDefinitionRequestStyle",
")",
"GetPaletteOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"g",
"==",
"nil",
"||",
"g",
".",
"Palette",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"re... |
21,774 | all-21775 | [
"rewrites",
"supplied",
"host",
"entries",
"to",
"use",
"the",
"domain",
"this",
"dns",
"server",
"manages"
] | [
"func",
"(",
"<mask>",
"*",
"DNSServer",
")",
"qualifySrvHosts",
"(",
"srvs",
"[",
"]",
"SRVRecord",
")",
"[",
"]",
"SRVRecord",
"{",
"newsrvs",
":=",
"[",
"]",
"SRVRecord",
"{",
"}",
"\n\n",
"for",
"_",
",",
"srv",
":=",
"range",
"srvs",
"{",
"newsr... |
21,775 | all-21776 | [
"GetStringOk",
"is",
"a",
"helper",
"routine",
"that",
"returns",
"a",
"boolean",
"representing",
"if",
"a",
"value",
"was",
"set",
"and",
"if",
"so",
"dereferences",
"the",
"pointer",
"to",
"it",
"."
] | [
"func",
"GetStringOk",
"(",
"v",
"*",
"string",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"v",
"!=",
"nil",
"{",
"return",
"*",
"v",
",",
"true",
"\n",
"}",
"\n\n",
"return",
"\"",
"\"",
",",
"<mask>",
"\n",
"}"
] |
21,776 | all-21777 | [
"NewPageWriter",
"creates",
"a",
"new",
"PageWriter",
".",
"pageBytes",
"is",
"the",
"number",
"of",
"bytes",
"to",
"write",
"per",
"page",
".",
"pageOffset",
"is",
"the",
"starting",
"offset",
"of",
"io",
".",
"Writer",
"."
] | [
"func",
"NewPageWriter",
"(",
"w",
"io",
".",
"<mask>",
",",
"pageBytes",
",",
"pageOffset",
"int",
")",
"*",
"PageWriter",
"{",
"return",
"&",
"PageWriter",
"{",
"w",
":",
"w",
",",
"pageOffset",
":",
"pageOffset",
",",
"pageBytes",
":",
"pageBytes",
",... |
21,777 | all-21778 | [
"newCipherBlockReader",
"returns",
"a",
"cipherBlockReader",
"that",
"decrypts",
"the",
"given",
"io",
".",
"Reader",
"using",
"the",
"provided",
"block",
"mode",
"cipher",
"."
] | [
"func",
"newCipherBlockReader",
"(",
"r",
"io",
".",
"Reader",
",",
"mode",
"cipher",
".",
"BlockMode",
")",
"*",
"cipherBlockReader",
"{",
"cr",
":=",
"&",
"cipherBlockReader",
"{",
"r",
":",
"r",
",",
"mode",
":",
"mode",
"}",
"\n",
"cr",
".",
"outbu... |
21,778 | all-21779 | [
"FileLastModified",
"returns",
"last",
"modified",
"time",
"for",
"the",
"file",
"."
] | [
"func",
"FileLastModified",
"(",
"path",
"string",
")",
"(",
"time",
".",
"Time",
",",
"error",
")",
"{",
"f",
",",
"err",
":=",
"os",
".",
"Open",
"(",
"<mask>",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"zeroTime",
",",
"err",
"\n",
"... |
21,779 | all-21780 | [
"Returns",
"a",
"map",
"[",
"string",
"]",
"interface",
"{}",
"at",
"the",
"key",
"or",
"the",
"specified",
"default",
"if",
"the",
"key",
"doesn",
"t",
"exist",
"or",
"if",
"the",
"key",
"isn",
"t",
"a",
"map",
"[",
"string",
"]",
"interface"
] | [
"func",
"(",
"t",
"Typed",
")",
"MapOr",
"(",
"key",
"string",
",",
"d",
"map",
"[",
"string",
"]",
"<mask>",
"{",
"}",
")",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
"{",
"if",
"value",
",",
"exists",
":=",
"t",
".",
"MapIf",
"(",
"key... |
21,780 | all-21781 | [
"ReleaseOne",
"returns",
"one",
"of",
"owned",
"resources",
"back",
"to",
"boskos",
"and",
"set",
"it",
"to",
"dest",
"state",
"."
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"ReleaseOne",
"(",
"name",
",",
"dest",
"string",
")",
"error",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n\n",
"if",
"_",
",",
"err",
":=",
... |
21,781 | all-21782 | [
"Do",
"executes",
"DeviceOrientation",
".",
"clearDeviceOrientationOverride",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"ClearDeviceOrientationOverrideParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandClearDeviceOrientationOverride",
",",
"nil",
",",
"n... |
21,782 | all-21783 | [
"NewForConfig",
"creates",
"a",
"new",
"Clientset",
"for",
"the",
"given",
"config",
"."
] | [
"func",
"NewForConfig",
"(",
"c",
"*",
"rest",
".",
"Config",
")",
"(",
"*",
"Clientset",
",",
"error",
")",
"{",
"configShallowCopy",
":=",
"*",
"c",
"\n",
"if",
"configShallowCopy",
".",
"RateLimiter",
"==",
"nil",
"&&",
"configShallowCopy",
".",
"QPS",
... |
21,783 | all-21784 | [
"typecheck",
"checks",
"correct",
"typing",
"of",
"the",
"parsed",
"statements",
"or",
"expression",
"."
] | [
"func",
"(",
"p",
"*",
"<mask>",
")",
"typecheck",
"(",
"node",
"Node",
")",
"(",
"err",
"error",
")",
"{",
"defer",
"p",
".",
"recover",
"(",
"&",
"err",
")",
"\n\n",
"p",
".",
"checkType",
"(",
"node",
")",
"\n",
"return",
"nil",
"\n",
"}"
] |
21,784 | all-21785 | [
"HashDatum",
"computes",
"and",
"returns",
"the",
"hash",
"of",
"datum",
"+",
"pipeline",
"with",
"a",
"pipeline",
"-",
"specific",
"prefix",
"."
] | [
"func",
"HashDatum",
"(",
"pipelineName",
"string",
",",
"pipelineSalt",
"string",
",",
"data",
"[",
"]",
"*",
"Input",
")",
"string",
"{",
"hash",
":=",
"sha256",
".",
"New",
"(",
")",
"\n",
"for",
"_",
",",
"datum",
":=",
"range",
"data",
"{",
"has... |
21,785 | all-21786 | [
"SetAllowAsync",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_print_operation_set_allow_async",
"()",
"."
] | [
"func",
"(",
"po",
"*",
"PrintOperation",
")",
"PrintOperationSetAllowAsync",
"(",
"allowSync",
"bool",
")",
"{",
"C",
".",
"gtk_print_operation_set_allow_async",
"(",
"<mask>",
".",
"native",
"(",
")",
",",
"gbool",
"(",
"allowSync",
")",
")",
"\n",
"}"
] |
21,786 | all-21787 | [
"SetStrategy",
"sets",
"customized",
"peer",
"selection",
"strategy",
"."
] | [
"func",
"(",
"l",
"*",
"PeerList",
")",
"SetStrategy",
"(",
"sc",
"ScoreCalculator",
")",
"{",
"l",
".",
"Lock",
"(",
")",
"\n",
"defer",
"l",
".",
"Unlock",
"(",
")",
"\n\n",
"l",
".",
"scoreCalculator",
"=",
"sc",
"\n",
"for",
"_",
",",
"<mask>",... |
21,787 | all-21788 | [
"control",
"the",
"reporting",
"of",
"debug",
"messages",
"in",
"a",
"debug",
"context"
] | [
"func",
"DebugMessageControl",
"(",
"source",
"uint32",
",",
"xtype",
"uint32",
",",
"severity",
"uint32",
",",
"count",
"int32",
",",
"ids",
"*",
"uint32",
",",
"enabled",
"bool",
")",
"{",
"C",
".",
"glowDebugMessageControl",
"(",
"gpDebugMessageControl",
",... |
21,788 | all-21789 | [
"helperMethodCSS",
"creates",
"and",
"returns",
"a",
"helper",
"method",
"css",
"."
] | [
"func",
"newHelperMethodCSS",
"(",
"ln",
"*",
"line",
",",
"rslt",
"*",
"<mask>",
",",
"src",
"*",
"source",
",",
"parent",
"element",
",",
"opts",
"*",
"Options",
")",
"*",
"helperMethodCSS",
"{",
"return",
"&",
"helperMethodCSS",
"{",
"elementBase",
":",... |
21,789 | all-21790 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"CallArgument",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime49",
"(",
"&",
"w",
",",
"v",
")",
"... |
21,790 | all-21791 | [
"Do",
"executes",
"Audits",
".",
"getEncodedResponse",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"body",
"-",
"The",
"encoded",
"body",
"as",
"a",
"base64",
"string",
".",
"Omitted",
"if",
"sizeOnly",
"is",
"true",
".",
"originalSize",
"-... | [
"func",
"(",
"p",
"*",
"GetEncodedResponseParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"body",
"[",
"]",
"byte",
",",
"originalSize",
"int64",
",",
"encodedSize",
"int64",
",",
"err",
"error",
")",
"{",
"// execute",
"var",
"res",... |
21,791 | all-21792 | [
"NewCacheServer",
"creates",
"a",
"new",
"CacheServer",
"."
] | [
"func",
"NewCacheServer",
"(",
"router",
"shard",
".",
"Router",
",",
"shards",
"uint64",
")",
"CacheServer",
"{",
"<mask>",
":=",
"&",
"groupCacheServer",
"{",
"Logger",
":",
"log",
".",
"NewLogger",
"(",
"\"",
"\"",
")",
",",
"router",
":",
"router",
"... |
21,792 | all-21793 | [
"Normalize",
"returns",
"the",
"address",
"in",
"a",
"form",
"usable",
"by",
"a",
"HTTP",
"client",
"."
] | [
"func",
"(",
"u",
"*",
"URI",
")",
"Normalize",
"(",
")",
"string",
"{",
"scheme",
":=",
"u",
".",
"scheme",
"\n",
"<mask>",
":=",
"strings",
".",
"Index",
"(",
"scheme",
",",
"\"",
"\"",
")",
"\n",
"if",
"index",
">=",
"0",
"{",
"scheme",
"=",
... |
21,793 | all-21794 | [
"Mmap",
"creates",
"a",
"new",
"CHD",
"aliasing",
"the",
"CHD",
"structure",
"over",
"an",
"existing",
"byte",
"region",
"(",
"typically",
"mmapped",
")",
"."
] | [
"func",
"Mmap",
"(",
"b",
"[",
"]",
"byte",
")",
"(",
"*",
"CHD",
",",
"error",
")",
"{",
"c",
":=",
"&",
"CHD",
"{",
"}",
"\n\n",
"bi",
":=",
"&",
"sliceReader",
"{",
"b",
":",
"b",
"}",
"\n\n",
"// Read vector of hash functions.",
"rl",
":=",
"... |
21,794 | all-21795 | [
"isMultiImage",
"returns",
"true",
"if",
"img",
"is",
"a",
"list",
"of",
"images"
] | [
"func",
"isMultiImage",
"(",
"ctx",
"context",
".",
"<mask>",
",",
"img",
"types",
".",
"UnparsedImage",
")",
"(",
"bool",
",",
"error",
")",
"{",
"_",
",",
"mt",
",",
"err",
":=",
"img",
".",
"Manifest",
"(",
"ctx",
")",
"\n",
"if",
"err",
"!=",
... |
21,795 | all-21796 | [
"RoundTrip",
"executes",
"a",
"single",
"HTTP",
"transaction",
".",
"See",
"net",
"/",
"http",
".",
"RoundTripper",
"."
] | [
"func",
"(",
"t",
"*",
"Transport",
")",
"RoundTrip",
"(",
"req",
"*",
"http",
".",
"Request",
")",
"(",
"*",
"http",
".",
"Response",
",",
"error",
")",
"{",
"if",
"req",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"nil",
",",
"errors",
".",
"New... |
21,796 | all-21797 | [
"Zones",
"filters",
"map",
"[",
"zoneID",
"]",
"zoneName",
"for",
"names",
"having",
"f",
".",
"domain",
"as",
"suffix"
] | [
"func",
"(",
"f",
"*",
"filter",
")",
"Zones",
"(",
"zones",
"map",
"[",
"string",
"]",
"string",
")",
"<mask>",
"[",
"string",
"]",
"string",
"{",
"result",
":=",
"map",
"[",
"string",
"]",
"string",
"{",
"}",
"\n",
"for",
"zoneID",
",",
"zoneName... |
21,797 | all-21798 | [
"Build",
"will",
"validate",
"the",
"set",
"properties",
"and",
"return",
"a",
"ExecStreamer"
] | [
"func",
"(",
"e",
"*",
"execStreamerBuilder",
")",
"Build",
"(",
")",
"(",
"ExecStreamer",
",",
"error",
")",
"{",
"if",
"e",
".",
"d",
".",
"ExecutorName",
"==",
"\"",
"\"",
"{",
"return",
"nil",
",",
"<mask>",
".",
"New",
"(",
"\"",
"\"",
")",
... |
21,798 | all-21799 | [
"GetManageDataOp",
"retrieves",
"the",
"ManageDataOp",
"value",
"from",
"the",
"union",
"returning",
"ok",
"if",
"the",
"union",
"s",
"switch",
"indicated",
"the",
"value",
"is",
"valid",
"."
] | [
"func",
"(",
"u",
"OperationBody",
")",
"GetManageDataOp",
"(",
")",
"(",
"<mask>",
"ManageDataOp",
",",
"ok",
"bool",
")",
"{",
"armName",
",",
"_",
":=",
"u",
".",
"ArmForSwitch",
"(",
"int32",
"(",
"u",
".",
"Type",
")",
")",
"\n\n",
"if",
"armNam... |
21,799 | all-21800 | [
"hasConflict",
"must",
"be",
"called",
"while",
"having",
"a",
"lock",
"."
] | [
"func",
"(",
"o",
"*",
"oracle",
")",
"hasConflict",
"(",
"txn",
"*",
"Txn",
")",
"bool",
"{",
"if",
"len",
"(",
"txn",
".",
"reads",
")",
"==",
"0",
"{",
"return",
"false",
"\n",
"}",
"\n",
"for",
"_",
",",
"ro",
":=",
"range",
"txn",
".",
"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.