id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
4,500 | all-4501 | [
"Profiles",
"returns",
"a",
"string",
"list",
"of",
"profiles",
"."
] | [
"func",
"(",
"c",
"*",
"Cluster",
")",
"Profiles",
"(",
"project",
"string",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"err",
":=",
"c",
".",
"Transaction",
"(",
"func",
"(",
"tx",
"*",
"ClusterTx",
")",
"error",
"{",
"enabled",
",",
... |
4,501 | all-4502 | [
"EnterPopupText",
"enters",
"text",
"into",
"an",
"open",
"prompt",
"popup",
"."
] | [
"func",
"(",
"p",
"*",
"Page",
")",
"EnterPopupText",
"(",
"text",
"string",
")",
"error",
"{",
"if",
"err",
":=",
"p",
".",
"<mask>",
".",
"SetAlertText",
"(",
"text",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
... |
4,502 | all-4503 | [
"Open",
"the",
"cluster",
"database",
"object",
".",
"The",
"name",
"argument",
"is",
"the",
"name",
"of",
"the",
"cluster",
"database",
".",
"It",
"defaults",
"to",
"db",
".",
"bin",
"but",
"can",
"be",
"overwritten",
"for",
"testing",
".",
"The",
"dial... | [
"func",
"Open",
"(",
"name",
"string",
",",
"store",
"dqlite",
".",
"ServerStore",
",",
"options",
"...",
"dqlite",
".",
"DriverOption",
")",
"(",
"*",
"sql",
".",
"DB",
",",
"error",
")",
"{",
"driver",
",",
"err",
":=",
"dqlite",
".",
"NewDriver",
... |
4,503 | all-4504 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"EventScriptParsed",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger37",
"(",
"&",
... |
4,504 | all-4505 | [
"PendingNonceAt",
"returns",
"the",
"account",
"nonce",
"of",
"the",
"given",
"account",
"in",
"the",
"pending",
"state",
".",
"This",
"is",
"the",
"nonce",
"that",
"should",
"be",
"used",
"for",
"the",
"next",
"transaction",
"."
] | [
"func",
"(",
"b",
"*",
"backendInstance",
")",
"PendingNonceAt",
"(",
"ctx",
"context",
".",
"Context",
",",
"account",
"common",
".",
"<mask>",
")",
"(",
"uint64",
",",
"error",
")",
"{",
"ctx",
",",
"cancel",
":=",
"b",
".",
"addTimeout",
"(",
"ctx",... |
4,505 | all-4506 | [
"GetAngle",
"is",
"a",
"wrapper",
"around",
"gtk_label_get_angle",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"GetAngle",
"(",
")",
"float64",
"{",
"c",
":=",
"C",
".",
"gtk_label_get_angle",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"return",
"float64",
"(",
"c",
")",
"\n",
"}"
] |
4,506 | all-4507 | [
"PackEnd",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_box_pack_end",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Box",
")",
"PackEnd",
"(",
"child",
"IWidget",
",",
"expand",
",",
"fill",
"bool",
",",
"padding",
"uint",
")",
"{",
"C",
".",
"gtk_box_pack_end",
"(",
"v",
".",
"native",
"(",
")",
",",
"child",
".",
"toWidget",
"(",
")",
... |
4,507 | all-4508 | [
"Match",
"checks",
"whether",
"a",
"zone",
"matches",
"one",
"of",
"the",
"provided",
"zone",
"ids"
] | [
"func",
"(",
"f",
"ZoneIDFilter",
")",
"Match",
"(",
"zoneID",
"string",
")",
"bool",
"{",
"// An empty filter includes all zones.",
"if",
"len",
"(",
"f",
".",
"zoneIDs",
")",
"==",
"0",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"for",
"_",
",",
"id",
... |
4,508 | all-4509 | [
"Extract",
"returns",
"positional",
"and",
"named",
"variables",
"extracted",
"from",
"the",
"URL",
"path",
"."
] | [
"func",
"(",
"m",
"*",
"GorillaPath",
")",
"Extract",
"(",
"result",
"*",
"Result",
",",
"r",
"*",
"http",
".",
"Request",
")",
"{",
"result",
".",
"Values",
"=",
"mergeValues",
"(",
"result",
".",
"Values",
",",
"m",
".",
"Values",
"(",
"r",
".",
... |
4,509 | all-4510 | [
"GetAggregatorOk",
"returns",
"a",
"tuple",
"with",
"the",
"Aggregator",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"q",
"*",
"QueryValueRequest",
")",
"GetAggregatorOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"q",
"==",
"nil",
"||",
"q",
".",
"Aggregator",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"<mask>",
"\n",
"}",
"\n",
"retur... |
4,510 | all-4511 | [
"Patch",
"applies",
"the",
"patch",
"and",
"returns",
"the",
"patched",
"app",
"."
] | [
"func",
"(",
"c",
"*",
"FakeApps",
")",
"Patch",
"(",
"name",
"string",
",",
"pt",
"types",
".",
"PatchType",
",",
"<mask>",
"[",
"]",
"byte",
",",
"subresources",
"...",
"string",
")",
"(",
"result",
"*",
"tsuru_v1",
".",
"App",
",",
"err",
"error",... |
4,511 | all-4512 | [
"OCIConfig",
"returns",
"the",
"image",
"configuration",
"as",
"per",
"OCI",
"v1",
"image",
"-",
"spec",
".",
"Information",
"about",
"layers",
"in",
"the",
"resulting",
"configuration",
"isn",
"t",
"guaranteed",
"to",
"be",
"returned",
"to",
"due",
"how",
"... | [
"func",
"(",
"m",
"*",
"manifestSchema2",
")",
"OCIConfig",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"*",
"imgspecv1",
".",
"Image",
",",
"error",
")",
"{",
"configBlob",
",",
"err",
":=",
"m",
".",
"ConfigBlob",
"(",
"ctx",
")",
"\n",
"if",
... |
4,512 | all-4513 | [
"flattenDVSTrafficShapingPolicyIngress",
"reads",
"various",
"fields",
"from",
"the",
"DVSTrafficShapingPolicy",
"ingress",
"policy",
"into",
"the",
"passed",
"in",
"ResourceData",
"."
] | [
"func",
"flattenDVSTrafficShapingPolicyIngress",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"obj",
"*",
"<mask>",
".",
"DVSTrafficShapingPolicy",
")",
"error",
"{",
"if",
"obj",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"structure",
".",
... |
4,513 | all-4514 | [
"NewRequestTx",
"returns",
"a",
"new",
"transaction",
"with",
"a",
"request",
"url",
"."
] | [
"func",
"NewRequestTx",
"(",
"name",
"string",
",",
"url",
"string",
")",
"*",
"<mask>",
"{",
"t",
":=",
"NewTx",
"(",
"name",
")",
"\n",
"t",
".",
"url",
"=",
"url",
"\n",
"return",
"t",
"\n",
"}"
] |
4,514 | all-4515 | [
"newGraph",
"returns",
"a",
"new",
"graph",
"."
] | [
"func",
"newGraph",
"(",
")",
"*",
"graph",
"{",
"return",
"&",
"graph",
"{",
"idToNodes",
":",
"make",
"(",
"map",
"[",
"<mask>",
"]",
"Node",
")",
",",
"nodeToSources",
":",
"make",
"(",
"map",
"[",
"ID",
"]",
"map",
"[",
"ID",
"]",
"float64",
... |
4,515 | all-4516 | [
"Range",
"creates",
"a",
"Range",
"query",
".",
"Similar",
"to",
"Row",
"but",
"only",
"returns",
"columns",
"which",
"were",
"set",
"with",
"timestamps",
"between",
"the",
"given",
"start",
"and",
"end",
"timestamps",
".",
"*",
"Deprecated",
"at",
"Pilosa",... | [
"func",
"(",
"f",
"*",
"Field",
")",
"Range",
"(",
"rowIDOrKey",
"interface",
"{",
"}",
",",
"start",
"<mask>",
".",
"Time",
",",
"end",
"time",
".",
"Time",
")",
"*",
"PQLRowQuery",
"{",
"rowStr",
",",
"err",
":=",
"formatIDKeyBool",
"(",
"rowIDOrKey"... |
4,516 | all-4517 | [
"GetMaxWidthChars",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_entry_get_max_width_chars",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"GetMaxWidthChars",
"(",
")",
"int",
"{",
"c",
":=",
"C",
".",
"gtk_entry_get_max_width_chars",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"return",
"int",
"(",
"c",
")",
"\n",
"}"
] |
4,517 | all-4518 | [
"NewDigitalOceanProvider",
"initializes",
"a",
"new",
"DigitalOcean",
"DNS",
"based",
"Provider",
"."
] | [
"func",
"NewDigitalOceanProvider",
"(",
"domainFilter",
"DomainFilter",
",",
"dryRun",
"bool",
")",
"(",
"*",
"DigitalOceanProvider",
",",
"error",
")",
"{",
"token",
",",
"ok",
":=",
"os",
".",
"LookupEnv",
"(",
"\"",
"\"",
")",
"\n",
"if",
"!",
"ok",
"... |
4,518 | all-4519 | [
"newState",
"parses",
"the",
"type",
"information",
"for",
"a",
"parsed",
"Thrift",
"file",
"and",
"returns",
"the",
"state",
"."
] | [
"func",
"newState",
"(",
"v",
"*",
"<mask>",
".",
"Thrift",
",",
"all",
"map",
"[",
"string",
"]",
"parseState",
")",
"*",
"State",
"{",
"typedefs",
":=",
"make",
"(",
"map",
"[",
"string",
"]",
"*",
"parser",
".",
"Type",
")",
"\n",
"for",
"k",
... |
4,519 | all-4520 | [
"GetRepoProjects",
"returns",
"the",
"list",
"of",
"projects",
"in",
"this",
"repo",
".",
"See",
"https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"projects",
"/",
"#list",
"-",
"repository",
"-",
"projects"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"GetRepoProjects",
"(",
"owner",
",",
"repo",
"string",
")",
"(",
"[",
"]",
"Project",
",",
"error",
")",
"{",
"c",
".",
"log",
"(",
"\"",
"\"",
",",
"owner",
",",
"repo",
")",
"\n",
"path",
":=",
"(",
"fmt... |
4,520 | all-4521 | [
"HasThresholdWindows",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"o",
"*",
"<mask>",
")",
"HasThresholdWindows",
"(",
")",
"bool",
"{",
"if",
"o",
"!=",
"nil",
"&&",
"o",
".",
"ThresholdWindows",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
4,521 | all-4522 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"Registration",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker8",
"(",
"&",
"... |
4,522 | all-4523 | [
"Run",
"executes",
"the",
"select",
"list",
".",
"Its",
"displays",
"the",
"label",
"and",
"the",
"list",
"of",
"items",
"asking",
"the",
"user",
"to",
"chose",
"any",
"value",
"within",
"to",
"list",
"or",
"add",
"his",
"own",
".",
"Run",
"will",
"kee... | [
"func",
"(",
"sa",
"*",
"SelectWithAdd",
")",
"Run",
"(",
")",
"(",
"int",
",",
"string",
",",
"error",
")",
"{",
"if",
"len",
"(",
"sa",
".",
"Items",
")",
">",
"0",
"{",
"newItems",
":=",
"append",
"(",
"[",
"]",
"string",
"{",
"sa",
".",
"... |
4,523 | all-4524 | [
"Register",
"a",
"new",
"subchannel",
"for",
"the",
"given",
"serviceName"
] | [
"func",
"(",
"subChMap",
"*",
"subChannelMap",
")",
"registerNewSubChannel",
"(",
"serviceName",
"string",
",",
"ch",
"*",
"Channel",
")",
"(",
"_",
"*",
"SubChannel",
",",
"added",
"bool",
")",
"{",
"subChMap",
".",
"Lock",
"(",
")",
"\n",
"defer",
"sub... |
4,524 | all-4525 | [
"WithFromStep",
"the",
"first",
"step",
"to",
"replay",
"from",
"(",
"replay",
"from",
"the",
"very",
"start",
"if",
"not",
"specified",
")",
"."
] | [
"func",
"(",
"p",
"ReplaySnapshotParams",
")",
"WithFromStep",
"(",
"fromStep",
"int64",
")",
"*",
"ReplaySnapshotParams",
"{",
"p",
".",
"FromStep",
"=",
"fromStep",
"\n",
"<mask>",
"&",
"p",
"\n",
"}"
] |
4,525 | all-4526 | [
"GetIdmapSet",
"reads",
"the",
"uid",
"/",
"gid",
"allocation",
"."
] | [
"func",
"GetIdmapSet",
"(",
")",
"*",
"idmap",
".",
"IdmapSet",
"{",
"idmapSet",
",",
"err",
":=",
"idmap",
".",
"DefaultIdmapSet",
"(",
"\"",
"\"",
",",
"\"",
"\"",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"logger",
".",
"Warn",
"(",
"\"",
"\"",
... |
4,526 | all-4527 | [
"EnableSvcCheck",
"creates",
"a",
"new",
"ENABLE_SVC_CHECK",
"Nagios",
"command",
".",
"Enables",
"active",
"checks",
"for",
"a",
"particular",
"service",
"."
] | [
"func",
"EnableSvcCheck",
"(",
"host_name",
"string",
",",
"service_description",
"<mask>",
",",
")",
"*",
"livestatus",
".",
"Command",
"{",
"return",
"livestatus",
".",
"NewCommand",
"(",
"\"",
"\"",
",",
"stringifyArg",
"(",
"\"",
"\"",
",",
"\"",
"\"",
... |
4,527 | all-4528 | [
"HasMetric",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"m",
"*",
"Metric",
")",
"HasMetric",
"(",
")",
"bool",
"{",
"if",
"m",
"!=",
"nil",
"&&",
"m",
".",
"Metric",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
4,528 | all-4529 | [
"MarkComplete",
"figures",
"out",
"which",
"ARNs",
"were",
"in",
"previous",
"passes",
"but",
"not",
"this",
"one",
"and",
"eliminates",
"them",
".",
"It",
"should",
"only",
"be",
"run",
"after",
"all",
"resources",
"have",
"been",
"marked",
"."
] | [
"func",
"(",
"s",
"*",
"<mask>",
")",
"MarkComplete",
"(",
")",
"int",
"{",
"var",
"gone",
"[",
"]",
"string",
"\n",
"for",
"key",
":=",
"range",
"s",
".",
"firstSeen",
"{",
"if",
"!",
"s",
".",
"marked",
"[",
"key",
"]",
"{",
"gone",
"=",
"app... |
4,529 | all-4530 | [
"Exec",
"runs",
"the",
"system",
"command",
".",
"If",
"multiple",
"arguments",
"are",
"given",
"they",
"re",
"concatenated",
"to",
"one",
"command",
".",
"Example",
":",
"t",
".",
"Exec",
"(",
"ls",
"-",
"ltr",
")",
"t",
".",
"Exec",
"(",
"ls",
"FIL... | [
"func",
"(",
"t",
"*",
"T",
")",
"Exec",
"(",
"cmd",
"...",
"string",
")",
"(",
"err",
"error",
")",
"{",
"toRun",
":=",
"strings",
".",
"Join",
"(",
"cmd",
",",
"\"",
"\"",
")",
"\n",
"<mask>",
",",
"err",
":=",
"shellquote",
".",
"Split",
"("... |
4,530 | all-4531 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetAttributesReturns",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom52",
"(",
"&",
"r... |
4,531 | all-4532 | [
"PrintDefaults",
"prints",
"to",
"standard",
"error",
"unless",
"configured",
"otherwise",
"the",
"default",
"values",
"of",
"all",
"defined",
"flags",
"in",
"the",
"set",
".",
"If",
"there",
"is",
"more",
"than",
"one",
"name",
"for",
"a",
"given",
"flag",
... | [
"func",
"(",
"f",
"*",
"FlagSet",
")",
"PrintDefaults",
"(",
")",
"{",
"// group together all flags for a given value",
"flags",
":=",
"make",
"(",
"map",
"[",
"interface",
"{",
"}",
"]",
"flagsByLength",
")",
"\n",
"f",
".",
"VisitAll",
"(",
"func",
"(",
... |
4,532 | all-4533 | [
"title",
":",
"rebuild",
"routes",
"path",
":",
"/",
"apps",
"/",
"{",
"app",
"}",
"/",
"routes",
"method",
":",
"POST",
"produce",
":",
"application",
"/",
"json",
"responses",
":",
"200",
":",
"Ok",
"401",
":",
"Unauthorized",
"404",
":",
"App",
"n... | [
"func",
"appRebuildRoutes",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"<mask>",
",",
"t",
"auth",
".",
"Token",
")",
"(",
"err",
"error",
")",
"{",
"a",
",",
"err",
":=",
"getAppFromContext",
"(",
"r",
".",
"URL",
".",
"Q... |
4,533 | all-4534 | [
"newBatchPoints",
"creates",
"new",
"influxdb",
".",
"BatchPoints",
"with",
"specified",
"bpConf",
".",
"Panics",
"on",
"errors",
"."
] | [
"func",
"newBatchPoints",
"(",
"bpConf",
"influxdb",
".",
"BatchPointsConfig",
")",
"influxdb",
".",
"BatchPoints",
"{",
"bp",
",",
"err",
":=",
"influxdb",
".",
"NewBatchPoints",
"(",
"bpConf",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"// Can only happen if ... |
4,534 | all-4535 | [
"CredentialsFromEnvVars",
"creates",
"and",
"returns",
"Taskcluster",
"credentials",
"initialised",
"from",
"the",
"values",
"of",
"environment",
"variables",
":",
"TASKCLUSTER_CLIENT_ID",
"TASKCLUSTER_ACCESS_TOKEN",
"TASKCLUSTER_CERTIFICATE",
"No",
"validation",
"is",
"perfo... | [
"func",
"CredentialsFromEnvVars",
"(",
")",
"*",
"Credentials",
"{",
"return",
"&",
"Credentials",
"{",
"ClientID",
":",
"<mask>",
".",
"Getenv",
"(",
"\"",
"\"",
")",
",",
"AccessToken",
":",
"os",
".",
"Getenv",
"(",
"\"",
"\"",
")",
",",
"Certificate"... |
4,535 | all-4536 | [
"NewDBHashTree",
"creates",
"a",
"database",
"(",
"bolt",
")",
"backed",
"hashtree",
"."
] | [
"func",
"NewDBHashTree",
"(",
"storageRoot",
"string",
")",
"(",
"HashTree",
",",
"error",
")",
"{",
"file",
":=",
"dbFile",
"(",
"storageRoot",
")",
"\n",
"if",
"err",
":=",
"os",
".",
"MkdirAll",
"(",
"pathlib",
".",
"Dir",
"(",
"file",
")",
",",
"... |
4,536 | all-4537 | [
"GetActiveID",
"is",
"a",
"wrapper",
"around",
"gtk_combo_box_get_active_id",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"ComboBox",
")",
"GetActiveID",
"(",
")",
"string",
"{",
"c",
":=",
"C",
".",
"gtk_combo_box_get_active_id",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"return",
"C",
".",
"GoString",
"(",
"(",
"*",
"C",
".",
"<mask>",
")"... |
4,537 | all-4538 | [
"ForEachRootPtr",
"behaves",
"like",
"ForEachPtr",
"but",
"it",
"starts",
"with",
"a",
"Root",
"instead",
"of",
"an",
"Object",
"."
] | [
"func",
"(",
"p",
"*",
"Process",
")",
"ForEachRootPtr",
"(",
"r",
"*",
"Root",
",",
"fn",
"func",
"(",
"int64",
",",
"Object",
",",
"int64",
")",
"bool",
")",
"{",
"edges1",
"(",
"p",
",",
"r",
",",
"0",
",",
"r",
".",
"<mask>",
",",
"fn",
"... |
4,538 | all-4539 | [
"SetProgramName",
"is",
"a",
"wrapper",
"around",
"gtk_about_dialog_set_program_name",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"AboutDialog",
")",
"SetProgramName",
"(",
"name",
"string",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"name",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n",
"C",
... |
4,539 | all-4540 | [
"Cmds",
"returns",
"a",
"slice",
"containing",
"pps",
"commands",
"."
] | [
"func",
"Cmds",
"(",
"noMetrics",
"*",
"bool",
",",
"noPortForwarding",
"*",
"bool",
")",
"[",
"]",
"*",
"cobra",
".",
"Command",
"{",
"var",
"commands",
"[",
"]",
"*",
"cobra",
".",
"Command",
"\n\n",
"raw",
":=",
"false",
"\n",
"rawFlags",
":=",
"p... |
4,540 | all-4541 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"EventRequestWillBeSent",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork50",
"(",
"... |
4,541 | all-4542 | [
"resourceVSphereComputeClusterHostGroupFetchObjects",
"fetches",
"the",
"objects",
"for",
"a",
"cluster",
"host",
"group",
".",
"This",
"is",
"currently",
"just",
"the",
"cluster",
"object",
"as",
"the",
"name",
"of",
"the",
"group",
"is",
"a",
"static",
"value",
... | [
"func",
"resourceVSphereComputeClusterHostGroupFetchObjects",
"(",
"meta",
"interface",
"{",
"}",
",",
"clusterID",
"string",
",",
"name",
"string",
",",
")",
"(",
"*",
"object",
".",
"ClusterComputeResource",
",",
"string",
",",
"error",
")",
"{",
"client",
","... |
4,542 | all-4543 | [
"GoogleServiceAccountCredentialsJSON",
"is",
"an",
"option",
"that",
"creates",
"the",
"Stackdriver",
"logging",
"service",
"using",
"the",
"supplied",
"Google",
"service",
"account",
"credentials",
".",
"Google",
"Service",
"Account",
"credentials",
"can",
"be",
"dow... | [
"func",
"GoogleServiceAccountCredentialsJSON",
"(",
"buf",
"[",
"]",
"byte",
")",
"Option",
"{",
"return",
"func",
"(",
"sh",
"*",
"StackdriverHook",
")",
"error",
"{",
"var",
"err",
"error",
"\n\n",
"// load credentials",
"gsa",
",",
"err",
":=",
"gserviceacc... |
4,543 | all-4544 | [
"processRegexMatches",
"processes",
"the",
"user",
"command",
"regex",
"matches",
"and",
"returns",
"the",
"proposed",
"project",
"name",
"proposed",
"column",
"name",
"whether",
"the",
"command",
"is",
"to",
"remove",
"issue",
"/",
"PR",
"from",
"project",
"and... | [
"func",
"processRegexMatches",
"(",
"matches",
"[",
"]",
"string",
")",
"(",
"string",
",",
"string",
",",
"bool",
",",
"string",
")",
"{",
"var",
"shouldClear",
"=",
"false",
"\n",
"proposedProject",
":=",
"matches",
"[",
"1",
"]",
"\n",
"proposedColumnNa... |
4,544 | all-4545 | [
"Will",
"connect",
"switches",
"i",
"and",
"j",
"via",
"net",
".",
"Pipe",
"()",
"Blocks",
"until",
"a",
"conection",
"is",
"established",
".",
"NOTE",
":",
"caller",
"ensures",
"i",
"and",
"j",
"are",
"within",
"bounds"
] | [
"func",
"Connect2Switches",
"(",
"switches",
"[",
"]",
"*",
"Switch",
",",
"i",
",",
"j",
"int",
")",
"{",
"switchI",
":=",
"switches",
"[",
"i",
"]",
"\n",
"switchJ",
":=",
"switches",
"[",
"j",
"]",
"\n",
"c1",
",",
"c2",
":=",
"net",
".",
"Pip... |
4,545 | all-4546 | [
"batchSet",
"applies",
"a",
"list",
"of",
"badger",
".",
"Entry",
".",
"If",
"a",
"request",
"level",
"error",
"occurs",
"it",
"will",
"be",
"returned",
".",
"Check",
"(",
"kv",
".",
"BatchSet",
"(",
"entries",
"))"
] | [
"func",
"(",
"db",
"*",
"DB",
")",
"batchSet",
"(",
"entries",
"[",
"]",
"*",
"<mask>",
")",
"error",
"{",
"req",
",",
"err",
":=",
"db",
".",
"sendToWriteCh",
"(",
"entries",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
... |
4,546 | all-4547 | [
"SearchCheckBundles",
"returns",
"check",
"bundles",
"matching",
"the",
"specified",
"search",
"query",
"and",
"/",
"or",
"filter",
".",
"If",
"nil",
"is",
"passed",
"for",
"both",
"parameters",
"all",
"check",
"bundles",
"will",
"be",
"returned",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"SearchCheckBundles",
"(",
"searchCriteria",
"*",
"SearchQueryType",
",",
"filterCriteria",
"*",
"map",
"[",
"string",
"]",
"[",
"]",
"string",
")",
"(",
"*",
"[",
"]",
"CheckBundle",
",",
"error",
")",
"{",
"q",
":="... |
4,547 | all-4548 | [
"render",
"multiple",
"sets",
"of",
"primitives",
"by",
"specifying",
"indices",
"of",
"array",
"data",
"elements"
] | [
"func",
"MultiDrawElements",
"(",
"mode",
"uint32",
",",
"count",
"*",
"int32",
",",
"xtype",
"uint32",
",",
"indices",
"*",
"unsafe",
".",
"Pointer",
",",
"drawcount",
"int32",
")",
"{",
"C",
".",
"glowMultiDrawElements",
"(",
"gpMultiDrawElements",
",",
"(... |
4,548 | all-4549 | [
"Main",
"callback",
"for",
"miekg",
"/",
"dns",
".",
"Collects",
"information",
"about",
"the",
"query",
"constructs",
"a",
"response",
"and",
"returns",
"it",
"to",
"the",
"connector",
"."
] | [
"func",
"(",
"ds",
"*",
"DNSServer",
")",
"ServeDNS",
"(",
"w",
"dns",
".",
"ResponseWriter",
",",
"r",
"*",
"dns",
".",
"Msg",
")",
"{",
"m",
":=",
"&",
"dns",
".",
"Msg",
"{",
"}",
"\n",
"m",
".",
"SetReply",
"(",
"r",
")",
"\n\n",
"answers",... |
4,549 | all-4550 | [
"SetBody",
"sets",
"the",
"body",
"of",
"the",
"message",
".",
"It",
"replaces",
"any",
"content",
"previously",
"set",
"by",
"SetBody",
"SetBodyWriter",
"AddAlternative",
"or",
"AddAlternativeWriter",
"."
] | [
"func",
"(",
"m",
"*",
"<mask>",
")",
"SetBody",
"(",
"contentType",
",",
"body",
"string",
",",
"settings",
"...",
"PartSetting",
")",
"{",
"m",
".",
"SetBodyWriter",
"(",
"contentType",
",",
"newCopier",
"(",
"body",
")",
",",
"settings",
"...",
")",
... |
4,550 | all-4551 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"HeaderEntry",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"<mask>",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch3",
"(",
"&",
"r",
"... |
4,551 | all-4552 | [
"Create",
"a",
"worker",
"type",
".",
"A",
"worker",
"type",
"contains",
"all",
"the",
"configuration",
"needed",
"for",
"the",
"provisioner",
"to",
"manage",
"the",
"instances",
".",
"Each",
"worker",
"type",
"knows",
"which",
"regions",
"and",
"which",
"in... | [
"func",
"(",
"awsProvisioner",
"*",
"AwsProvisioner",
")",
"CreateWorkerType",
"(",
"workerType",
"string",
",",
"payload",
"*",
"CreateWorkerTypeRequest",
")",
"(",
"*",
"WorkerTypeResponse",
",",
"error",
")",
"{",
"<mask>",
":=",
"tcclient",
".",
"Client",
"(... |
4,552 | all-4553 | [
"NeighborIntWithPrecision",
"returns",
"a",
"uint64s",
"that",
"corresponds",
"to",
"the",
"provided",
"hash",
"s",
"neighbor",
"in",
"the",
"provided",
"direction",
"at",
"the",
"given",
"precision",
"."
] | [
"func",
"NeighborIntWithPrecision",
"(",
"hash",
"uint64",
",",
"<mask>",
"uint",
",",
"direction",
"Direction",
")",
"uint64",
"{",
"return",
"NeighborsIntWithPrecision",
"(",
"hash",
",",
"bits",
")",
"[",
"direction",
"]",
"\n",
"}"
] |
4,553 | all-4554 | [
"Errorf",
"is",
"like",
"Printf",
"but",
"it",
"marks",
"this",
"event",
"as",
"an",
"error",
"."
] | [
"func",
"(",
"e",
"*",
"EventLog",
")",
"Errorf",
"(",
"format",
"string",
",",
"a",
"...",
"interface",
"{",
"}",
")",
"{",
"<mask>",
".",
"Printf",
"(",
"\"",
"\"",
"+",
"format",
",",
"a",
"...",
")",
"\n",
"e",
".",
"el",
".",
"Errorf",
"("... |
4,554 | all-4555 | [
"List",
"function",
"return",
"a",
"slice",
"of",
"nodes",
"under",
"the",
"receiver",
"node",
".",
"If",
"the",
"receiver",
"node",
"is",
"not",
"a",
"directory",
"a",
"Not",
"A",
"Directory",
"error",
"will",
"be",
"returned",
"."
] | [
"func",
"(",
"n",
"*",
"node",
")",
"List",
"(",
")",
"(",
"[",
"]",
"*",
"<mask>",
",",
"*",
"v2error",
".",
"Error",
")",
"{",
"if",
"!",
"n",
".",
"IsDir",
"(",
")",
"{",
"return",
"nil",
",",
"v2error",
".",
"NewError",
"(",
"v2error",
".... |
4,555 | all-4556 | [
"Purpose",
"of",
"BytesTwo",
"()",
"and",
"AdvanceBytesTwo",
"()",
":",
"avoid",
"extra",
"copying",
"of",
"data",
".",
"AdvanceBytesTwo",
"()",
"takes",
"a",
"TwoBuffers",
"as",
"input",
"this",
"must",
"have",
"been",
"from",
"a",
"previous",
"call",
"to",... | [
"func",
"(",
"b",
"*",
"AtomicFixedSizeRingBuf",
")",
"AdvanceBytesTwo",
"(",
"tb",
"TwoBuffers",
")",
"{",
"b",
".",
"tex",
".",
"Lock",
"(",
")",
"\n",
"defer",
"b",
".",
"tex",
".",
"Unlock",
"(",
")",
"\n\n",
"tblen",
":=",
"len",
"(",
"tb",
".... |
4,556 | all-4557 | [
"AppendEntries",
"is",
"used",
"to",
"add",
"another",
"request",
"to",
"the",
"pipeline",
".",
"The",
"send",
"may",
"block",
"which",
"is",
"an",
"effective",
"form",
"of",
"back",
"-",
"pressure",
"."
] | [
"func",
"(",
"p",
"*",
"pipeline",
")",
"AppendEntries",
"(",
"args",
"*",
"raft",
".",
"AppendEntriesRequest",
",",
"resp",
"*",
"raft",
".",
"AppendEntriesResponse",
")",
"(",
"raft",
".",
"AppendFuture",
",",
"error",
")",
"{",
"e",
":=",
"&",
"append... |
4,557 | all-4558 | [
"Do",
"executes",
"Runtime",
".",
"terminateExecution",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"TerminateExecutionParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandTerminateExecution",
",",
"nil",
",",
"nil",
")",
"\n",
"}... |
4,558 | all-4559 | [
"GetAliasNameOk",
"returns",
"a",
"tuple",
"with",
"the",
"AliasName",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"WidgetMetadata",
")",
"GetAliasNameOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"AliasName",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"<mask>",
"\n",
"}",
"\n",
"return",
... |
4,559 | all-4560 | [
"check",
"the",
"completeness",
"status",
"of",
"a",
"framebuffer"
] | [
"func",
"CheckNamedFramebufferStatus",
"(",
"framebuffer",
"uint32",
",",
"target",
"uint32",
")",
"uint32",
"{",
"ret",
",",
"_",
",",
"_",
":=",
"syscall",
".",
"Syscall",
"(",
"gpCheckNamedFramebufferStatus",
",",
"2",
",",
"uintptr",
"(",
"framebuffer",
")... |
4,560 | all-4561 | [
"return",
"length",
"in",
"bytes",
"for",
"regular",
"files"
] | [
"func",
"fileSize",
"(",
"file",
"string",
")",
"int64",
"{",
"f",
",",
"e",
":=",
"os",
".",
"Stat",
"(",
"<mask>",
")",
"\n",
"if",
"e",
"!=",
"nil",
"{",
"return",
"0",
"\n",
"}",
"\n\n",
"return",
"f",
".",
"Size",
"(",
")",
"\n",
"}"
] |
4,561 | all-4562 | [
"UnmarshalText",
"hydrates",
"this",
"instance",
"from",
"text"
] | [
"func",
"(",
"u",
"*",
"SSN",
")",
"UnmarshalText",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"// validation is performed later on",
"*",
"u",
"=",
"SSN",
"(",
"string",
"(",
"<mask>",
")",
")",
"\n",
"return",
"nil",
"\n",
"}"
] |
4,562 | all-4563 | [
"Returns",
"information",
"about",
"an",
"active",
"uniform",
"variable",
"for",
"the",
"specified",
"program",
"object"
] | [
"func",
"GetActiveUniform",
"(",
"program",
"uint32",
",",
"index",
"uint32",
",",
"bufSize",
"int32",
",",
"length",
"*",
"int32",
",",
"size",
"*",
"int32",
",",
"xtype",
"*",
"uint32",
",",
"name",
"*",
"uint8",
")",
"{",
"C",
".",
"glowGetActiveUnifo... |
4,563 | all-4564 | [
"SetHostBytes",
"sets",
"host",
"for",
"the",
"uri",
"."
] | [
"func",
"(",
"u",
"*",
"URI",
")",
"SetHostBytes",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"{",
"u",
".",
"host",
"=",
"append",
"(",
"u",
".",
"host",
"[",
":",
"0",
"]",
",",
"host",
"...",
")",
"\n",
"lowercaseBytes",
"(",
"u",
".",
"host",
... |
4,564 | all-4565 | [
"PSCAddress",
"returns",
"Privatix",
"service",
"contract",
"address",
"."
] | [
"func",
"(",
"b",
"*",
"backendInstance",
")",
"PSCAddress",
"(",
")",
"common",
".",
"<mask>",
"{",
"return",
"common",
".",
"HexToAddress",
"(",
"b",
".",
"cfg",
".",
"Contract",
".",
"PSCAddrHex",
")",
"\n",
"}"
] |
4,565 | all-4566 | [
"HasQuery",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"g",
"*",
"GraphDefinitionRequest",
")",
"HasQuery",
"(",
")",
"bool",
"{",
"if",
"g",
"!=",
"nil",
"&&",
"g",
".",
"Query",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
4,566 | all-4567 | [
"Stability",
":",
"***",
"EXPERIMENTAL",
"***",
"For",
"a",
"given",
"changeset",
"(",
"SHA",
")",
"of",
"a",
"repository",
"this",
"will",
"attach",
"a",
"commit",
"status",
"on",
"github",
".",
"These",
"statuses",
"are",
"links",
"displayed",
"next",
"t... | [
"func",
"(",
"github",
"*",
"Github",
")",
"CreateStatus",
"(",
"owner",
",",
"repo",
",",
"sha",
"string",
",",
"payload",
"*",
"CreateStatusRequest",
")",
"error",
"{",
"cd",
":=",
"tcclient",
".",
"Client",
"(",
"*",
"github",
")",
"\n",
"_",
",",
... |
4,567 | all-4568 | [
"getSize",
"must",
"be",
"called",
"from",
"the",
"main",
"thread",
"."
] | [
"func",
"(",
"u",
"*",
"UserInterface",
")",
"glfwSize",
"(",
")",
"(",
"int",
",",
"int",
")",
"{",
"w",
":=",
"int",
"(",
"float64",
"(",
"u",
".",
"windowWidth",
")",
"*",
"u",
".",
"getScale",
"(",
")",
"*",
"u",
".",
"glfwScale",
"(",
")",... |
4,568 | all-4569 | [
"ValidatePayload",
"ensures",
"that",
"the",
"request",
"payload",
"signature",
"matches",
"the",
"key",
"."
] | [
"func",
"ValidatePayload",
"(",
"payload",
"[",
"]",
"byte",
",",
"sig",
"string",
",",
"key",
"[",
"]",
"byte",
")",
"bool",
"{",
"if",
"!",
"strings",
".",
"HasPrefix",
"(",
"sig",
",",
"\"",
"\"",
")",
"{",
"return",
"false",
"\n",
"}",
"\n",
... |
4,569 | all-4570 | [
"ParseByteRange",
"parses",
"Range",
":",
"bytes",
"=",
"...",
"header",
"value",
".",
"It",
"follows",
"https",
":",
"//",
"www",
".",
"w3",
".",
"org",
"/",
"Protocols",
"/",
"rfc2616",
"/",
"rfc2616",
"-",
"sec14",
".",
"html#sec14",
".",
"35",
"."
... | [
"func",
"ParseByteRange",
"(",
"byteRange",
"[",
"]",
"byte",
",",
"contentLength",
"int",
")",
"(",
"startPos",
",",
"endPos",
"int",
",",
"err",
"error",
")",
"{",
"b",
":=",
"byteRange",
"\n",
"if",
"!",
"bytes",
".",
"HasPrefix",
"(",
"b",
",",
"... |
4,570 | all-4571 | [
"Get",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_print_settings_get",
"()",
"."
] | [
"func",
"(",
"ps",
"*",
"PrintSettings",
")",
"Get",
"(",
"key",
"string",
")",
"string",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"key",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n",
"c",... |
4,571 | all-4572 | [
"DrawingAreaNew",
"is",
"a",
"wrapper",
"around",
"gtk_drawing_area_new",
"()",
"."
] | [
"func",
"DrawingAreaNew",
"(",
")",
"(",
"*",
"DrawingArea",
",",
"<mask>",
")",
"{",
"c",
":=",
"C",
".",
"gtk_drawing_area_new",
"(",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"return",
"nil",
",",
"nilPtrErr",
"\n",
"}",
"\n",
"obj",
":=",
"glib",
... |
4,572 | all-4573 | [
"Reader",
"returns",
"the",
"io",
".",
"Reader",
"instance",
"for",
"the",
"file",
"source"
] | [
"func",
"(",
"s",
"*",
"FileSource",
")",
"Reader",
"(",
")",
"(",
"io",
".",
"Reader",
",",
"error",
")",
"{",
"fh",
",",
"err",
":=",
"os",
".",
"Open",
"(",
"s",
".",
"<mask>",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
","... |
4,573 | all-4574 | [
"QueryRange",
"performs",
"a",
"range",
"query",
"against",
"a",
"Prometheus",
"server",
"."
] | [
"func",
"QueryRange",
"(",
"<mask>",
",",
"query",
",",
"start",
",",
"end",
"string",
",",
"step",
"time",
".",
"Duration",
",",
"p",
"printer",
")",
"int",
"{",
"config",
":=",
"api",
".",
"Config",
"{",
"Address",
":",
"url",
",",
"}",
"\n\n",
"... |
4,574 | all-4575 | [
"Read",
"is",
"implementation",
"of",
"ReadSeekCloser",
"s",
"Read",
"."
] | [
"func",
"(",
"i",
"*",
"InfiniteLoop",
")",
"Read",
"(",
"b",
"[",
"]",
"byte",
")",
"(",
"int",
",",
"error",
")",
"{",
"if",
"err",
":=",
"i",
".",
"ensurePos",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"0",
",",
"err",
"\n",
"}",
... |
4,575 | all-4576 | [
"Remove",
"removes",
"a",
"RangerEntry",
"identified",
"by",
"given",
"network",
"from",
"ranger",
"."
] | [
"func",
"(",
"b",
"*",
"bruteRanger",
")",
"Remove",
"(",
"network",
"net",
".",
"IPNet",
")",
"(",
"RangerEntry",
",",
"error",
")",
"{",
"networks",
",",
"err",
":=",
"b",
".",
"getEntriesByVersion",
"(",
"network",
".",
"IP",
")",
"\n",
"if",
"err... |
4,576 | all-4577 | [
"Pop",
"removes",
"an",
"element",
"from",
"the",
"front",
"of",
"the",
"queue",
"."
] | [
"func",
"(",
"queue",
"*",
"queue",
")",
"Pop",
"(",
")",
"interface",
"{",
"}",
"{",
"if",
"queue",
".",
"size",
"==",
"0",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"if",
"queue",
".",
"size",
"<",
"<mask>",
".",
"cap",
"/",
"4",
"&&",
"queue"... |
4,577 | all-4578 | [
"SetUnitStatus",
"changes",
"the",
"status",
"of",
"the",
"given",
"unit",
"."
] | [
"func",
"(",
"app",
"*",
"App",
")",
"SetUnitStatus",
"(",
"unitName",
"string",
",",
"<mask>",
"provision",
".",
"Status",
")",
"error",
"{",
"units",
",",
"err",
":=",
"app",
".",
"Units",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
... |
4,578 | all-4579 | [
"HTTPPostJSON",
"marshalles",
"data",
"as",
"JSON",
"and",
"sends",
"it",
"as",
"HTTP",
"POST",
"request",
"to",
"url",
".",
"If",
"the",
"response",
"status",
"code",
"is",
"not",
"200",
"OK",
"then",
"the",
"status",
"is",
"returned",
"as",
"an",
"erro... | [
"func",
"HTTPPostJSON",
"(",
"url",
"string",
",",
"data",
"interface",
"{",
"}",
")",
"error",
"{",
"b",
",",
"err",
":=",
"json",
".",
"MarshalIndent",
"(",
"data",
",",
"\"",
"\"",
",",
"\"",
"\"",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"re... |
4,579 | all-4580 | [
"ForEachReversePtr",
"calls",
"fn",
"for",
"all",
"pointers",
"it",
"finds",
"pointing",
"to",
"y",
".",
"It",
"calls",
"fn",
"with",
":",
"the",
"object",
"or",
"root",
"which",
"points",
"to",
"y",
"(",
"exactly",
"one",
"will",
"be",
"non",
"-",
"ni... | [
"func",
"(",
"p",
"*",
"Process",
")",
"ForEachReversePtr",
"(",
"y",
"Object",
",",
"fn",
"func",
"(",
"x",
"<mask>",
",",
"r",
"*",
"Root",
",",
"i",
",",
"j",
"int64",
")",
"bool",
")",
"{",
"p",
".",
"reverseEdges",
"(",
")",
"\n\n",
"idx",
... |
4,580 | all-4581 | [
"CreateSpaces",
"-"
] | [
"func",
"(",
"m",
"*",
"DefaultManager",
")",
"CreateSpaces",
"(",
")",
"error",
"{",
"m",
".",
"spaces",
"=",
"nil",
"\n",
"configSpaceList",
",",
"err",
":=",
"m",
".",
"Cfg",
".",
"GetSpaceConfigs",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
... |
4,581 | all-4582 | [
"GetCount",
"returns",
"the",
"Count",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"p",
"*",
"Params",
")",
"GetCount",
"(",
")",
"string",
"{",
"if",
"p",
"==",
"nil",
"||",
"p",
".",
"Count",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"<mask>",
"*",
"p",
".",
"Count",
"\n",
"}"
] |
4,582 | all-4583 | [
"/",
"*",
"Similar",
"to",
"[",
"NewEvaluableExpression",
"]",
"except",
"that",
"instead",
"of",
"a",
"string",
"an",
"already",
"-",
"tokenized",
"expression",
"is",
"given",
".",
"This",
"is",
"useful",
"in",
"cases",
"where",
"you",
"may",
"be",
"gener... | [
"func",
"NewEvaluableExpressionFromTokens",
"(",
"tokens",
"[",
"]",
"ExpressionToken",
")",
"(",
"*",
"EvaluableExpression",
",",
"error",
")",
"{",
"var",
"ret",
"*",
"EvaluableExpression",
"\n",
"<mask>",
"err",
"error",
"\n\n",
"ret",
"=",
"new",
"(",
"Eva... |
4,583 | all-4584 | [
"PathForSpec",
"determines",
"the",
"GCS",
"path",
"prefix",
"for",
"files",
"uploaded",
"for",
"a",
"specific",
"job",
"spec"
] | [
"func",
"PathForSpec",
"(",
"spec",
"*",
"downwardapi",
".",
"JobSpec",
",",
"pathSegment",
"RepoPathBuilder",
")",
"string",
"{",
"switch",
"spec",
".",
"<mask>",
"{",
"case",
"prowapi",
".",
"PeriodicJob",
",",
"prowapi",
".",
"PostsubmitJob",
":",
"return",... |
4,584 | all-4585 | [
"Configure",
"is",
"called",
"automatically",
"from",
"New",
"()",
"to",
"configure",
"the",
"xslate",
"instance",
"from",
"arguments"
] | [
"func",
"(",
"tx",
"*",
"Xslate",
")",
"Configure",
"(",
"args",
"ConfigureArgs",
")",
"error",
"{",
"// The compiler currently does not have any configurable options, but",
"// one may want to replace the entire compiler struct",
"defaults",
":=",
"map",
"[",
"string",
"]",
... |
4,585 | all-4586 | [
"DeleteFile",
"deletes",
"a",
"file",
"from",
"a",
"Commit",
".",
"DeleteFile",
"leaves",
"a",
"tombstone",
"in",
"the",
"Commit",
"assuming",
"the",
"file",
"isn",
"t",
"written",
"to",
"later",
"attempting",
"to",
"get",
"the",
"file",
"from",
"the",
"fi... | [
"func",
"(",
"c",
"APIClient",
")",
"DeleteFile",
"(",
"repoName",
"string",
",",
"commitID",
"string",
",",
"<mask>",
"string",
")",
"error",
"{",
"_",
",",
"err",
":=",
"c",
".",
"PfsAPIClient",
".",
"DeleteFile",
"(",
"c",
".",
"Ctx",
"(",
")",
",... |
4,586 | all-4587 | [
"Equal",
"reports",
"whether",
"tokens",
"a",
"and",
"b",
"are",
"equal",
".",
"Two",
"tokens",
"are",
"equal",
"if",
"both",
"their",
"types",
"and",
"values",
"are",
"equal",
".",
"A",
"nil",
"token",
"can",
"never",
"be",
"equal",
"to",
"another",
"... | [
"func",
"(",
"a",
"*",
"Token",
")",
"Equal",
"(",
"b",
"*",
"Token",
")",
"bool",
"{",
"if",
"a",
"==",
"nil",
"||",
"b",
"==",
"nil",
"{",
"return",
"false",
"\n",
"}",
"\n",
"if",
"a",
".",
"tokenType",
"!=",
"b",
".",
"tokenType",
"{",
"r... |
4,587 | all-4588 | [
"SetTraceInfo",
"sets",
"the",
"trace",
"info",
"for",
"the",
"trace",
".",
"This",
"is",
"currently",
"unused",
"."
] | [
"func",
"(",
"t",
"*",
"trace",
")",
"SetTraceInfo",
"(",
"traceID",
"uint64",
",",
"spanID",
"uint64",
")",
"{",
"t",
".",
"<mask>",
".",
"SetTraceInfo",
"(",
"traceID",
",",
"spanID",
")",
"\n",
"}"
] |
4,588 | all-4589 | [
"resourceVSphereComputeClusterSaveNameAndPath",
"saves",
"the",
"name",
"and",
"path",
"of",
"a",
"StoragePod",
"into",
"the",
"supplied",
"ResourceData",
"."
] | [
"func",
"resourceVSphereComputeClusterSaveNameAndPath",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"cluster",
"*",
"<mask>",
".",
"ClusterComputeResource",
")",
"error",
"{",
"log",
".",
"Printf",
"(",
"\"",
"\"",
",",
"resourceVSphereComputeClusterIDString",
... |
4,589 | all-4590 | [
"GenerateECDSAKeyPairWithCurve",
"generates",
"a",
"new",
"ecdsa",
"private",
"and",
"public",
"key",
"with",
"a",
"speicified",
"curve"
] | [
"func",
"GenerateECDSAKeyPairWithCurve",
"(",
"curve",
"elliptic",
".",
"Curve",
",",
"src",
"<mask>",
".",
"Reader",
")",
"(",
"PrivKey",
",",
"PubKey",
",",
"error",
")",
"{",
"priv",
",",
"err",
":=",
"ecdsa",
".",
"GenerateKey",
"(",
"curve",
",",
"s... |
4,590 | all-4591 | [
"CreateJob",
"creates",
"a",
"basic",
"empty",
"configuration",
"with",
"some",
"defaults",
"."
] | [
"func",
"CreateJob",
"(",
")",
"Config",
"{",
"return",
"Config",
"{",
"LockProvider",
":",
"nil",
",",
"RuntimeProcessor",
":",
"nil",
",",
"ResultProcessor",
":",
"nil",
",",
"RuntimeProcessingFrequency",
":",
"200",
"*",
"<mask>",
".",
"Millisecond",
",",
... |
4,591 | all-4592 | [
"ReadTimeout",
"sets",
"the",
"connection",
"timeout",
"for",
"read",
"operations",
".",
"Be",
"careful",
"when",
"using",
"a",
"read",
"timeout",
"in",
"conjunction",
"with",
"wait",
"conditions",
".",
"A",
"value",
"of",
"0",
"disables",
"the",
"timeout",
... | [
"func",
"(",
"q",
"*",
"<mask>",
")",
"ReadTimeout",
"(",
"timeout",
"time",
".",
"Duration",
")",
"*",
"Query",
"{",
"q",
".",
"readTimeout",
"=",
"timeout",
"\n",
"return",
"q",
"\n",
"}"
] |
4,592 | all-4593 | [
"Validate",
"validates",
"this",
"error",
"type"
] | [
"func",
"(",
"m",
"ErrorType",
")",
"Validate",
"(",
"formats",
"strfmt",
".",
"Registry",
")",
"error",
"{",
"var",
"<mask>",
"[",
"]",
"error",
"\n\n",
"// value enum",
"if",
"err",
":=",
"m",
".",
"validateErrorTypeEnum",
"(",
"\"",
"\"",
",",
"\"",
... |
4,593 | all-4594 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"PushNodesByBackendIdsToFrontendReturns",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom23"... |
4,594 | all-4595 | [
"Store",
"stores",
"the",
"app",
"name",
"related",
"with",
"the",
"router",
"name",
"."
] | [
"func",
"Store",
"(",
"appName",
",",
"routerName",
",",
"kind",
"string",
")",
"error",
"{",
"coll",
",",
"err",
":=",
"collection",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"defer",
"coll",
".",
"Close",
"(... |
4,595 | all-4596 | [
"ClientPreChannelTopUp",
"checks",
"client",
"balance",
"and",
"creates",
"transaction",
"for",
"increase",
"the",
"channel",
"deposit",
"."
] | [
"func",
"(",
"w",
"*",
"Worker",
")",
"ClientPreChannelTopUp",
"(",
"job",
"*",
"<mask>",
".",
"Job",
")",
"error",
"{",
"logger",
":=",
"w",
".",
"logger",
".",
"Add",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"job",
")",
"\n\n",
... |
4,596 | all-4597 | [
"/",
"1",
".",
"0",
"/",
"storage",
"-",
"pools",
"/",
"{",
"name",
"}",
"Replace",
"pool",
"properties",
"."
] | [
"func",
"storagePoolPut",
"(",
"d",
"*",
"Daemon",
",",
"r",
"*",
"http",
".",
"Request",
")",
"Response",
"{",
"poolName",
":=",
"mux",
".",
"Vars",
"(",
"r",
")",
"[",
"\"",
"\"",
"]",
"\n\n",
"// Get the existing storage pool.",
"_",
",",
"dbInfo",
... |
4,597 | all-4598 | [
"LabelNames",
"returns",
"all",
"the",
"unique",
"label",
"names",
"present",
"in",
"the",
"block",
"in",
"sorted",
"order",
"."
] | [
"func",
"(",
"q",
"*",
"mergeQuerier",
")",
"LabelNames",
"(",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"labelNamesMap",
":=",
"make",
"(",
"map",
"[",
"string",
"]",
"struct",
"{",
"}",
")",
"\n",
"for",
"_",
",",
"b",
":=",
"range"... |
4,598 | all-4599 | [
"GetTolerance",
"is",
"a",
"wrapper",
"around",
"cairo_get_tolerance",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"GetTolerance",
"(",
")",
"float64",
"{",
"c",
":=",
"C",
".",
"cairo_get_tolerance",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"return",
"float64",
"(",
"c",
")",
"\n",
"}"
] |
4,599 | all-4600 | [
"SetBackend",
"overrides",
"any",
"previously",
"defined",
"backend",
"for",
"this",
"logger",
"."
] | [
"func",
"(",
"l",
"*",
"Logger",
")",
"SetBackend",
"(",
"backend",
"LeveledBackend",
")",
"{",
"l",
".",
"backend",
"=",
"backend",
"\n",
"l",
".",
"haveBackend",
"=",
"<mask>",
"\n",
"}"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.