id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
4,200 | all-4201 | [
"Zones",
"returns",
"the",
"list",
"of",
"hosted",
"zones",
"."
] | [
"func",
"(",
"p",
"*",
"NS1Provider",
")",
"zonesFiltered",
"(",
")",
"(",
"[",
"]",
"*",
"dns",
".",
"Zone",
",",
"error",
")",
"{",
"// TODO handle Header Codes",
"zones",
",",
"_",
",",
"err",
":=",
"p",
".",
"client",
".",
"ListZones",
"(",
")",
... |
4,201 | all-4202 | [
"Mutate",
"applies",
"the",
"provided",
"mutators",
"to",
"this",
"builder",
"s",
"offer",
"or",
"operation",
"."
] | [
"func",
"(",
"b",
"*",
"ManageOfferBuilder",
")",
"Mutate",
"(",
"muts",
"...",
"interface",
"{",
"}",
")",
"{",
"for",
"_",
",",
"m",
":=",
"range",
"muts",
"{",
"var",
"err",
"error",
"\n",
"switch",
"mut",
":=",
"m",
".",
"(",
"type",
")",
"{"... |
4,202 | all-4203 | [
"Append",
"queues",
"a",
"sample",
"to",
"be",
"sent",
"to",
"the",
"remote",
"storage",
".",
"Blocks",
"until",
"all",
"samples",
"are",
"enqueued",
"on",
"their",
"shards",
"or",
"a",
"shutdown",
"signal",
"is",
"received",
"."
] | [
"func",
"(",
"t",
"*",
"QueueManager",
")",
"Append",
"(",
"s",
"[",
"]",
"tsdb",
".",
"RefSample",
")",
"bool",
"{",
"type",
"enqueuable",
"struct",
"{",
"ts",
"prompb",
".",
"TimeSeries",
"\n",
"ref",
"uint64",
"\n",
"}",
"\n\n",
"tempSamples",
":=",... |
4,203 | all-4204 | [
"Converts",
"options",
"into",
"CORS",
"headers",
"."
] | [
"func",
"(",
"o",
"*",
"Options",
")",
"Header",
"(",
"origin",
"string",
")",
"(",
"headers",
"<mask>",
"[",
"string",
"]",
"string",
")",
"{",
"headers",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"string",
")",
"\n",
"// if origin is not alowed, don... |
4,204 | all-4205 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"FrameResourceTree",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage46",
"(",
"&",
"w",
",",
"v",
")",
... |
4,205 | all-4206 | [
"Remove",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockFileSystem",
")",
"Remove",
"(",
"arg0",
"<mask>",
")",
"{",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
",",
"arg0",
")",
"\n",
"}"
] |
4,206 | all-4207 | [
"String",
"returns",
"a",
"human",
"readable",
"string",
"representation",
"of",
"this",
"object"
] | [
"func",
"(",
"c",
"*",
"Container",
")",
"String",
"(",
")",
"string",
"{",
"ret",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"c",
".",
"Name",
",",
"c",
".",
"Image",
",",
"c",
".",
"GetKnownStatus",
"(",
")",
".",
"String",
"(",
")",
... |
4,207 | all-4208 | [
"TODO",
":",
"Needs",
"gio",
"/",
"GAppInfo",
"implementation",
"first",
"gtk_app_chooser_get_app_info",
"()",
"GetContentType",
"is",
"a",
"wrapper",
"around",
"gtk_app_chooser_get_content_type",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"AppChooser",
")",
"GetContentType",
"(",
")",
"string",
"{",
"cstr",
":=",
"C",
".",
"gtk_app_chooser_get_content_type",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"("... |
4,208 | all-4209 | [
"Add",
"function",
"adds",
"a",
"node",
"to",
"the",
"receiver",
"node",
".",
"If",
"the",
"receiver",
"is",
"not",
"a",
"directory",
"a",
"Not",
"A",
"Directory",
"error",
"will",
"be",
"returned",
".",
"If",
"there",
"is",
"an",
"existing",
"node",
"... | [
"func",
"(",
"n",
"*",
"node",
")",
"Add",
"(",
"<mask>",
"*",
"node",
")",
"*",
"v2error",
".",
"Error",
"{",
"if",
"!",
"n",
".",
"IsDir",
"(",
")",
"{",
"return",
"v2error",
".",
"NewError",
"(",
"v2error",
".",
"EcodeNotDir",
",",
"\"",
"\"",... |
4,209 | all-4210 | [
"Type",
"gets",
"a",
"type",
"for",
"a",
"Schema",
"reference",
"if",
"it",
"exists"
] | [
"func",
"(",
"r",
"Ref",
")",
"Type",
"(",
")",
"string",
"{",
"if",
"_",
",",
"ok",
":=",
"r",
"[",
"\"",
"\"",
"]",
";",
"<mask>",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"if",
"refIF",
",",
"ok",
":=",
"r",
"[",
"\"",
"\"",
"]",
";... |
4,210 | all-4211 | [
"native",
"returns",
"a",
"pointer",
"to",
"the",
"underlying",
"GtkDrawingArea",
"."
] | [
"func",
"(",
"v",
"*",
"DrawingArea",
")",
"native",
"(",
")",
"*",
"C",
".",
"GtkDrawingArea",
"{",
"if",
"v",
"==",
"nil",
"||",
"v",
".",
"GObject",
"==",
"nil",
"{",
"<mask>",
"nil",
"\n",
"}",
"\n",
"p",
":=",
"unsafe",
".",
"Pointer",
"(",
... |
4,211 | all-4212 | [
"UnmarshalYAML",
"implements",
"the",
"yaml",
".",
"Unmarshaler",
"interface",
"."
] | [
"func",
"(",
"c",
"*",
"GlobalConfig",
")",
"UnmarshalYAML",
"(",
"unmarshal",
"func",
"(",
"interface",
"{",
"}",
")",
"error",
")",
"error",
"{",
"// Create a clean global config as the previous one was already populated",
"// by the default due to the YAML parser behavior ... |
4,212 | all-4213 | [
"SetAddress",
"modifies",
"the",
"receiver",
"setting",
"it",
"s",
"value",
"to",
"the",
"AccountId",
"form",
"of",
"the",
"provided",
"address",
"."
] | [
"func",
"(",
"aid",
"*",
"AccountId",
")",
"SetAddress",
"(",
"address",
"string",
")",
"error",
"{",
"if",
"aid",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"raw",
",",
"err",
":=",
"strkey",
".",
"Decode",
"(",
"strkey",
".",
"VersionByt... |
4,213 | all-4214 | [
"GetAllPotentialApprovers",
"returns",
"the",
"people",
"from",
"relevant",
"owners",
"files",
"needed",
"to",
"get",
"the",
"PR",
"approved"
] | [
"func",
"(",
"o",
"Owners",
")",
"GetAllPotentialApprovers",
"(",
")",
"[",
"]",
"string",
"{",
"approversOnly",
":=",
"[",
"]",
"string",
"{",
"}",
"\n",
"for",
"_",
",",
"approverList",
":=",
"range",
"o",
".",
"GetLeafApprovers",
"(",
")",
"{",
"for... |
4,214 | all-4215 | [
"GetLabel",
"is",
"a",
"wrapper",
"around",
"gtk_frame_get_label",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Frame",
")",
"GetLabel",
"(",
")",
"<mask>",
"{",
"c",
":=",
"C",
".",
"gtk_frame_get_label",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"return",
"goString",
"(",
"c",
")",
"\n",
"}"
] |
4,215 | all-4216 | [
"childOf",
"returns",
"true",
"if",
"the",
"line",
"is",
"a",
"child",
"of",
"the",
"element",
"."
] | [
"func",
"(",
"l",
"*",
"line",
")",
"childOf",
"(",
"parent",
"element",
")",
"(",
"bool",
",",
"error",
")",
"{",
"var",
"ok",
"bool",
"\n",
"var",
"err",
"error",
"\n\n",
"switch",
"{",
"case",
"l",
".",
"isEmpty",
"(",
")",
":",
"ok",
"=",
"... |
4,216 | all-4217 | [
"GBToByte",
"returns",
"n",
"*",
"1000000000",
".",
"The",
"output",
"is",
"returned",
"as",
"int64",
"-",
"if",
"another",
"type",
"is",
"needed",
"it",
"needs",
"to",
"be",
"cast",
".",
"Remember",
"that",
"int32",
"overflows",
"at",
"2GB",
"and",
"uin... | [
"func",
"GBToByte",
"(",
"n",
"interface",
"{",
"}",
")",
"int64",
"{",
"switch",
"v",
":=",
"n",
".",
"(",
"type",
")",
"{",
"case",
"int",
":",
"return",
"int64",
"(",
"v",
"*",
"1000000000",
")",
"\n",
"case",
"int32",
":",
"return",
"int64",
... |
4,217 | all-4218 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"SetFontFamiliesParams",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage10",
"(",
"&",
... |
4,218 | all-4219 | [
"BumpMajor",
"increments",
"the",
"Major",
"field",
"by",
"1",
"and",
"resets",
"all",
"other",
"fields",
"to",
"their",
"default",
"values"
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"BumpMajor",
"(",
")",
"{",
"v",
".",
"Major",
"+=",
"1",
"\n",
"v",
".",
"Minor",
"=",
"0",
"\n",
"v",
".",
"Patch",
"=",
"0",
"\n",
"v",
".",
"PreRelease",
"=",
"PreRelease",
"(",
"\"",
"\"",
")",
"\n",... |
4,219 | all-4220 | [
"GetZone",
"wraps",
"the",
"Get",
"method",
"of",
"the",
"API",
"s",
"Zones",
"service"
] | [
"func",
"(",
"n",
"NS1DomainService",
")",
"GetZone",
"(",
"zone",
"string",
")",
"(",
"*",
"dns",
".",
"Zone",
",",
"*",
"<mask>",
".",
"Response",
",",
"error",
")",
"{",
"return",
"n",
".",
"service",
".",
"Zones",
".",
"Get",
"(",
"zone",
")",
... |
4,220 | all-4221 | [
"String",
"returns",
"the",
"simplified",
"path",
"to",
"a",
"node",
".",
"The",
"simplified",
"path",
"only",
"contains",
"struct",
"field",
"accesses",
".",
"For",
"example",
":",
"MyMap",
".",
"MySlices",
".",
"MyField"
] | [
"func",
"(",
"<mask>",
"Path",
")",
"String",
"(",
")",
"string",
"{",
"var",
"ss",
"[",
"]",
"string",
"\n",
"for",
"_",
",",
"s",
":=",
"range",
"pa",
"{",
"if",
"_",
",",
"ok",
":=",
"s",
".",
"(",
"StructField",
")",
";",
"ok",
"{",
"ss",... |
4,221 | all-4222 | [
"openEventstream",
"opens",
"but",
"does",
"not",
"consume",
"the",
"docker",
"event",
"stream"
] | [
"func",
"(",
"engine",
"*",
"DockerTaskEngine",
")",
"openEventstream",
"(",
"ctx",
"context",
".",
"Context",
")",
"error",
"{",
"events",
",",
"err",
":=",
"engine",
".",
"client",
".",
"ContainerEvents",
"(",
"ctx",
")",
"\n",
"if",
"err",
"!=",
"nil"... |
4,222 | all-4223 | [
"Add",
"(",
"Gob",
"-",
"serialized",
")",
"cache",
"items",
"from",
"an",
"io",
".",
"Reader",
"excluding",
"any",
"items",
"with",
"keys",
"that",
"already",
"exist",
"(",
"and",
"haven",
"t",
"expired",
")",
"in",
"the",
"current",
"cache",
".",
"NO... | [
"func",
"(",
"c",
"*",
"cache",
")",
"Load",
"(",
"r",
"io",
".",
"Reader",
")",
"error",
"{",
"dec",
":=",
"gob",
".",
"NewDecoder",
"(",
"r",
")",
"\n",
"<mask>",
":=",
"map",
"[",
"string",
"]",
"Item",
"{",
"}",
"\n",
"err",
":=",
"dec",
... |
4,223 | all-4224 | [
"specify",
"a",
"three",
"-",
"dimensional",
"texture",
"subimage"
] | [
"func",
"TextureSubImage3D",
"(",
"texture",
"uint32",
",",
"level",
"int32",
",",
"xoffset",
"int32",
",",
"yoffset",
"int32",
",",
"zoffset",
"int32",
",",
"width",
"int32",
",",
"height",
"int32",
",",
"depth",
"int32",
",",
"<mask>",
"uint32",
",",
"xt... |
4,224 | all-4225 | [
"NewClient",
"creates",
"a",
"slack",
"client",
"with",
"an",
"API",
"token",
"."
] | [
"func",
"NewClient",
"(",
"tokenGenerator",
"func",
"(",
")",
"[",
"]",
"byte",
")",
"*",
"Client",
"{",
"return",
"&",
"<mask>",
"{",
"logger",
":",
"logrus",
".",
"WithField",
"(",
"\"",
"\"",
",",
"\"",
"\"",
")",
",",
"tokenGenerator",
":",
"toke... |
4,225 | all-4226 | [
"ExprFromValue",
"converts",
"the",
"given",
"Value",
"into",
"an",
"Expr",
"or",
"returns",
"an",
"error",
"."
] | [
"func",
"ExprFromValue",
"(",
"value",
"sqltypes",
".",
"Value",
")",
"(",
"Expr",
",",
"error",
")",
"{",
"// The type checks here follow the rules defined in sqltypes/types.go.",
"switch",
"{",
"case",
"value",
".",
"Type",
"(",
")",
"==",
"sqltypes",
".",
"Null... |
4,226 | all-4227 | [
"/",
"*",
"BuildWithEnvironment",
"is",
"identical",
"to",
"Build",
"but",
"allows",
"you",
"to",
"specify",
"env",
"vars",
"to",
"be",
"set",
"at",
"build",
"time",
"."
] | [
"func",
"BuildWithEnvironment",
"(",
"packagePath",
"string",
",",
"env",
"[",
"]",
"string",
",",
"args",
"...",
"string",
")",
"(",
"compiledPath",
"string",
",",
"err",
"error",
")",
"{",
"return",
"doBuild",
"(",
"build",
".",
"<mask>",
".",
"GOPATH",
... |
4,227 | all-4228 | [
"NewEnterpriseServer",
"returns",
"an",
"implementation",
"of",
"ec",
".",
"APIServer",
"."
] | [
"func",
"NewEnterpriseServer",
"(",
"env",
"*",
"serviceenv",
".",
"ServiceEnv",
",",
"etcdPrefix",
"string",
")",
"(",
"ec",
".",
"APIServer",
",",
"error",
")",
"{",
"s",
":=",
"&",
"apiServer",
"{",
"pachLogger",
":",
"log",
".",
"NewLogger",
"(",
"\"... |
4,228 | all-4229 | [
"GetPalette",
"returns",
"the",
"Palette",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"t",
"*",
"TileDefRequestStyle",
")",
"GetPalette",
"(",
")",
"string",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"Palette",
"==",
"nil",
"{",
"<mask>",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"t",
".",
"Palette",
"\n",
"}"
] |
4,229 | all-4230 | [
"SetGroup",
"is",
"a",
"wrapper",
"around",
"gtk_radio_button_set_group",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"RadioButton",
")",
"SetGroup",
"(",
"group",
"*",
"glib",
".",
"SList",
")",
"{",
"C",
".",
"gtk_radio_button_set_group",
"(",
"v",
".",
"native",
"(",
")",
",",
"cGSList",
"(",
"<mask>",
")",
")",
"\n",
"}"
] |
4,230 | all-4231 | [
"ArmForSwitch",
"returns",
"which",
"field",
"name",
"should",
"be",
"used",
"for",
"storing",
"the",
"value",
"for",
"an",
"instance",
"of",
"Memo"
] | [
"func",
"(",
"u",
"Memo",
")",
"ArmForSwitch",
"(",
"sw",
"int32",
")",
"(",
"string",
",",
"bool",
")",
"{",
"switch",
"MemoType",
"(",
"sw",
")",
"{",
"case",
"MemoTypeMemoNone",
":",
"return",
"\"",
"\"",
",",
"true",
"\n",
"<mask>",
"MemoTypeMemoTe... |
4,231 | all-4232 | [
"Quantize",
"quantizes",
"the",
"audio",
"signal",
"to",
"match",
"the",
"target",
"bitDepth"
] | [
"func",
"Quantize",
"(",
"buf",
"*",
"audio",
".",
"FloatBuffer",
",",
"bitDepth",
"int",
")",
"{",
"if",
"buf",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n",
"<mask>",
":=",
"math",
".",
"Pow",
"(",
"2",
",",
"float64",
"(",
"bitDepth",
")",
")",
... |
4,232 | all-4233 | [
"GetImageSecret",
"is",
"a",
"helper",
"around",
"CreateImageSecret",
"that",
"returns",
"a",
"secret",
"for",
"the",
"image"
] | [
"func",
"(",
"r",
"*",
"ProtocolLXD",
")",
"GetImageSecret",
"(",
"fingerprint",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"op",
",",
"err",
":=",
"r",
".",
"CreateImageSecret",
"(",
"fingerprint",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
... |
4,233 | all-4234 | [
"Tags",
"appends",
"the",
"given",
"tags",
"to",
"the",
"tags",
"sent",
"with",
"every",
"metrics",
".",
"If",
"a",
"tag",
"already",
"exists",
"it",
"is",
"replaced",
".",
"The",
"tags",
"must",
"be",
"set",
"as",
"key",
"-",
"value",
"pairs",
".",
... | [
"func",
"Tags",
"(",
"tags",
"...",
"string",
")",
"Option",
"{",
"if",
"len",
"(",
"tags",
")",
"%",
"2",
"!=",
"0",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"return",
"Option",
"(",
"func",
"(",
"c",
"*",
"config",
")",
"{",
"... |
4,234 | all-4235 | [
"Scan",
"read",
"a",
"value",
"from",
"a",
"database",
"driver"
] | [
"func",
"(",
"u",
"*",
"UUID5",
")",
"Scan",
"(",
"raw",
"interface",
"{",
"}",
")",
"error",
"{",
"<mask>",
"v",
":=",
"raw",
".",
"(",
"type",
")",
"{",
"case",
"[",
"]",
"byte",
":",
"*",
"u",
"=",
"UUID5",
"(",
"string",
"(",
"v",
")",
... |
4,235 | all-4236 | [
"newRecordOperation",
"returns",
"a",
"RecordOperation",
"based",
"on",
"a",
"given",
"endpoint",
"."
] | [
"func",
"newRecordOperation",
"(",
"ep",
"*",
"endpoint",
".",
"Endpoint",
",",
"opType",
"dns",
".",
"RecordOperationOperationEnum",
")",
"dns",
".",
"RecordOperation",
"{",
"targets",
":=",
"make",
"(",
"[",
"]",
"string",
",",
"len",
"(",
"ep",
".",
"Ta... |
4,236 | all-4237 | [
"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",
"(",
"s",
"*",
"ScatterplotRequest",
")",
"GetAggregatorOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"Aggregator",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"<mask>",
"\n",
"}",
"\n",
"retu... |
4,237 | all-4238 | [
"EndOfWeek",
"end",
"of",
"week"
] | [
"func",
"(",
"now",
"*",
"Now",
")",
"EndOfWeek",
"(",
")",
"time",
".",
"Time",
"{",
"return",
"<mask>",
".",
"BeginningOfWeek",
"(",
")",
".",
"AddDate",
"(",
"0",
",",
"0",
",",
"7",
")",
".",
"Add",
"(",
"-",
"time",
".",
"Nanosecond",
")",
... |
4,238 | all-4239 | [
"TODO",
":",
"gtk_tool_item_get_ellipsize_mode",
"GetIconSize",
"is",
"a",
"wrapper",
"around",
"gtk_tool_item_get_icon_size",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"ToolItem",
")",
"GetIconSize",
"(",
")",
"IconSize",
"{",
"c",
":=",
"C",
".",
"gtk_tool_item_get_icon_size",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"<mask>",
"IconSize",
"(",
"c",
")",
"\n",
"}"
] |
4,239 | all-4240 | [
"Wrappers",
"around",
"Logger",
"interface",
"functions",
"that",
"send",
"a",
"string",
"to",
"the",
"Logger",
"by",
"running",
"it",
"through",
"fmt",
".",
"Sprintf",
"()",
"."
] | [
"func",
"Infof",
"(",
"format",
"string",
",",
"args",
"...",
"interface",
"{",
"}",
")",
"{",
"if",
"Log",
"!=",
"nil",
"{",
"msg",
":=",
"fmt",
".",
"Sprintf",
"(",
"format",
",",
"args",
"...",
")",
"\n",
"pc",
",",
"fn",
",",
"line",
",",
"... |
4,240 | all-4241 | [
"Rel",
"attempts",
"to",
"compute",
"a",
"relative",
"label",
"from",
"this",
"label",
".",
"If",
"this",
"label",
"is",
"already",
"relative",
"or",
"is",
"in",
"a",
"different",
"package",
"this",
"label",
"may",
"be",
"returned",
"unchanged",
"."
] | [
"func",
"(",
"l",
"Label",
")",
"Rel",
"(",
"repo",
",",
"pkg",
"string",
")",
"Label",
"{",
"if",
"l",
".",
"Relative",
"||",
"l",
".",
"Repo",
"!=",
"repo",
"{",
"return",
"l",
"\n",
"}",
"\n",
"if",
"l",
".",
"Pkg",
"==",
"pkg",
"{",
"retu... |
4,241 | all-4242 | [
"createSignature",
"creates",
"a",
"new",
"signature",
"of",
"manifest",
"using",
"keyIdentity",
"."
] | [
"func",
"(",
"c",
"*",
"copier",
")",
"createSignature",
"(",
"manifest",
"[",
"]",
"byte",
",",
"keyIdentity",
"string",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"mech",
",",
"err",
":=",
"signature",
".",
"NewGPGSigningMechanism",
"(",
")"... |
4,242 | all-4243 | [
"fixManifestLayers",
"after",
"validating",
"the",
"supplied",
"manifest",
"(",
"to",
"use",
"correctly",
"-",
"formatted",
"IDs",
"and",
"to",
"not",
"have",
"non",
"-",
"consecutive",
"ID",
"collisions",
"in",
"m",
".",
"History",
")",
"modifies",
"manifest"... | [
"func",
"(",
"m",
"*",
"Schema1",
")",
"fixManifestLayers",
"(",
")",
"error",
"{",
"// m.initialize() has verified that len(m.FSLayers) == len(m.History)",
"for",
"_",
",",
"compat",
":=",
"range",
"m",
".",
"ExtractedV1Compatibility",
"{",
"if",
"err",
":=",
"vali... |
4,243 | all-4244 | [
"validateContextOverlap",
"ensures",
"that",
"there",
"will",
"be",
"no",
"overlap",
"in",
"contexts",
"between",
"a",
"set",
"of",
"jobs",
"running",
"and",
"a",
"set",
"to",
"skip"
] | [
"func",
"validateContextOverlap",
"(",
"toRun",
",",
"toSkip",
"[",
"]",
"config",
".",
"Presubmit",
")",
"error",
"{",
"requestedContexts",
":=",
"sets",
".",
"NewString",
"(",
")",
"\n",
"for",
"_",
",",
"job",
":=",
"range",
"toRun",
"{",
"requestedCont... |
4,244 | all-4245 | [
"progressTask",
"tries",
"to",
"step",
"forwards",
"all",
"containers",
"and",
"resources",
"that",
"are",
"able",
"to",
"be",
"transitioned",
"in",
"the",
"task",
"s",
"current",
"state",
".",
"It",
"will",
"continue",
"listening",
"to",
"events",
"from",
"... | [
"func",
"(",
"mtask",
"*",
"managedTask",
")",
"progressTask",
"(",
")",
"{",
"seelog",
".",
"Debugf",
"(",
"\"",
"\"",
",",
"mtask",
".",
"Arn",
")",
"\n",
"// max number of transitions length to ensure writes will never block on",
"// these and if we exit early transi... |
4,245 | all-4246 | [
"Limit",
"returns",
"a",
"new",
"Condition",
"of",
"LIMIT",
"clause",
"."
] | [
"func",
"(",
"db",
"*",
"DB",
")",
"Limit",
"(",
"lim",
"int",
")",
"*",
"Condition",
"{",
"return",
"newCondition",
"(",
"<mask>",
")",
".",
"Limit",
"(",
"lim",
")",
"\n",
"}"
] |
4,246 | all-4247 | [
"ListReviews",
"returns",
"reviews",
"."
] | [
"func",
"(",
"f",
"*",
"FakeClient",
")",
"ListReviews",
"(",
"owner",
",",
"repo",
"string",
",",
"<mask>",
"int",
")",
"(",
"[",
"]",
"github",
".",
"Review",
",",
"error",
")",
"{",
"return",
"append",
"(",
"[",
"]",
"github",
".",
"Review",
"{"... |
4,247 | all-4248 | [
"render",
"primitives",
"from",
"array",
"data"
] | [
"func",
"DrawElements",
"(",
"mode",
"uint32",
",",
"<mask>",
"int32",
",",
"xtype",
"uint32",
",",
"indices",
"unsafe",
".",
"Pointer",
")",
"{",
"C",
".",
"glowDrawElements",
"(",
"gpDrawElements",
",",
"(",
"C",
".",
"GLenum",
")",
"(",
"mode",
")",
... |
4,248 | all-4249 | [
"GetValue",
"returns",
"the",
"Value",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"d",
"*",
"DashboardConditionalFormat",
")",
"GetValue",
"(",
")",
"json",
".",
"Number",
"{",
"if",
"d",
"==",
"nil",
"||",
"d",
".",
"Value",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"d",
".",
"<mask>",... |
4,249 | all-4250 | [
"GetDisplayFormat",
"returns",
"the",
"DisplayFormat",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"m",
"*",
"ManageStatusDefinition",
")",
"GetDisplayFormat",
"(",
")",
"string",
"{",
"if",
"m",
"==",
"nil",
"||",
"m",
".",
"DisplayFormat",
"==",
"nil",
"{",
"<mask>",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"m",
".",
"DisplayFormat... |
4,250 | all-4251 | [
"VisitAllCookie",
"calls",
"f",
"for",
"each",
"request",
"cookie",
".",
"f",
"must",
"not",
"retain",
"references",
"to",
"key",
"and",
"/",
"or",
"value",
"after",
"returning",
"."
] | [
"func",
"(",
"h",
"*",
"RequestHeader",
")",
"VisitAllCookie",
"(",
"f",
"func",
"(",
"<mask>",
",",
"value",
"[",
"]",
"byte",
")",
")",
"{",
"h",
".",
"parseRawHeaders",
"(",
")",
"\n",
"h",
".",
"collectCookies",
"(",
")",
"\n",
"visitArgs",
"(",
... |
4,251 | all-4252 | [
"Locator",
"returns",
"a",
"locator",
"for",
"the",
"given",
"resource"
] | [
"func",
"(",
"r",
"*",
"IpAddress",
")",
"Locator",
"(",
"api",
"*",
"API",
")",
"*",
"IpAddressLocator",
"{",
"for",
"_",
",",
"l",
":=",
"<mask>",
"r",
".",
"Links",
"{",
"if",
"l",
"[",
"\"",
"\"",
"]",
"==",
"\"",
"\"",
"{",
"return",
"api"... |
4,252 | all-4253 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"Frame",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp2",
"(",
"&",
"r",
",",
"v",... |
4,253 | all-4254 | [
"Set",
"a",
"value",
"onto",
"the",
"current",
"session",
".",
"If",
"a",
"value",
"with",
"that",
"name",
"already",
"exists",
"it",
"will",
"be",
"overridden",
"with",
"the",
"new",
"value",
"."
] | [
"func",
"(",
"s",
"*",
"<mask>",
")",
"Set",
"(",
"name",
",",
"value",
"interface",
"{",
"}",
")",
"{",
"s",
".",
"Session",
".",
"Values",
"[",
"name",
"]",
"=",
"value",
"\n",
"}"
] |
4,254 | all-4255 | [
"NewFloodSub",
"returns",
"a",
"new",
"PubSub",
"object",
"using",
"the",
"FloodSubRouter",
"."
] | [
"func",
"NewFloodSub",
"(",
"ctx",
"<mask>",
".",
"Context",
",",
"h",
"host",
".",
"Host",
",",
"opts",
"...",
"Option",
")",
"(",
"*",
"PubSub",
",",
"error",
")",
"{",
"return",
"NewFloodsubWithProtocols",
"(",
"ctx",
",",
"h",
",",
"[",
"]",
"pro... |
4,255 | all-4256 | [
"Scale",
"is",
"a",
"wrapper",
"around",
"cairo_scale",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"Scale",
"(",
"sx",
",",
"sy",
"float64",
")",
"{",
"C",
".",
"cairo_scale",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"double",
"(",
"sx",
")",
",",
"C",
".",
"double",
"(",
"sy",
")",
")",
"\n... |
4,256 | all-4257 | [
"Render",
"renders",
"a",
"template",
"using",
"the",
"provided",
"template",
"and",
"vars",
"struct",
"and",
"returns",
"a",
"response",
"with",
"the",
"rendered",
"template"
] | [
"func",
"RenderTemplateResponse",
"(",
"t",
"*",
"<mask>",
".",
"Template",
",",
"vars",
"interface",
"{",
"}",
")",
"*",
"OkResponse",
"{",
"response",
":=",
"NewResponse",
"(",
")",
"\n",
"response",
".",
"SetContent",
"(",
"RenderTemplate",
"(",
"t",
",... |
4,257 | all-4258 | [
"NewMockRoundTripper",
"creates",
"a",
"new",
"mock",
"instance"
] | [
"func",
"NewMockRoundTripper",
"(",
"ctrl",
"*",
"gomock",
".",
"<mask>",
")",
"*",
"MockRoundTripper",
"{",
"mock",
":=",
"&",
"MockRoundTripper",
"{",
"ctrl",
":",
"ctrl",
"}",
"\n",
"mock",
".",
"recorder",
"=",
"&",
"MockRoundTripperMockRecorder",
"{",
"... |
4,258 | all-4259 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"PushNodesByBackendIdsToFrontendParams",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom24",... |
4,259 | all-4260 | [
"NewBoskosHandler",
"constructs",
"the",
"boskos",
"handler",
"."
] | [
"func",
"NewBoskosHandler",
"(",
"r",
"*",
"ranch",
".",
"Ranch",
")",
"*",
"<mask>",
".",
"ServeMux",
"{",
"mux",
":=",
"http",
".",
"NewServeMux",
"(",
")",
"\n",
"mux",
".",
"Handle",
"(",
"\"",
"\"",
",",
"handleDefault",
"(",
"r",
")",
")",
"\... |
4,260 | all-4261 | [
"native",
"returns",
"a",
"pointer",
"to",
"the",
"underlying",
"GtkImage",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"native",
"(",
")",
"*",
"C",
".",
"GtkImage",
"{",
"if",
"v",
"==",
"nil",
"||",
"v",
".",
"GObject",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"p",
":=",
"unsafe",
".",
"Pointer",
"(",
"v",
".... |
4,261 | all-4262 | [
"ListImages",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockDockerClient",
")",
"ListImages",
"(",
"arg0",
"<mask>",
".",
"Context",
",",
"arg1",
"time",
".",
"Duration",
")",
"dockerapi",
".",
"ListImagesResponse",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\""... |
4,262 | all-4263 | [
"NewConfig",
"creates",
"a",
"default",
"job",
"queue",
"configuration",
"."
] | [
"func",
"NewConfig",
"(",
")",
"*",
"Config",
"{",
"return",
"&",
"Config",
"{",
"CollectJobs",
":",
"100",
",",
"CollectPeriod",
":",
"1000",
",",
"WorkerBufLen",
":",
"10",
",",
"Workers",
":",
"0",
",",
"TypeConfig",
":",
"TypeConfig",
"{",
"TryLimit"... |
4,263 | all-4264 | [
"RegisterLeaseHandler",
"registers",
"the",
"http",
"handlers",
"for",
"service",
"Lease",
"to",
"mux",
".",
"The",
"handlers",
"forward",
"requests",
"to",
"the",
"grpc",
"endpoint",
"over",
"conn",
"."
] | [
"func",
"RegisterLeaseHandler",
"(",
"ctx",
"context",
".",
"Context",
",",
"mux",
"*",
"runtime",
".",
"ServeMux",
",",
"conn",
"*",
"grpc",
".",
"ClientConn",
")",
"error",
"{",
"return",
"RegisterLeaseHandlerClient",
"(",
"ctx",
",",
"mux",
",",
"etcdserv... |
4,264 | all-4265 | [
"------------------------",
"Selection",
"Dialog",
"---------------------"
] | [
"func",
"CreateEditDialog",
"(",
"title",
",",
"<mask>",
",",
"initialText",
"string",
")",
"*",
"SelectDialog",
"{",
"return",
"CreateSelectDialog",
"(",
"title",
",",
"[",
"]",
"string",
"{",
"message",
",",
"initialText",
"}",
",",
"0",
",",
"SelectDialog... |
4,265 | all-4266 | [
"SetCopyright",
"is",
"a",
"wrapper",
"around",
"gtk_about_dialog_set_copyright",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"AboutDialog",
")",
"SetCopyright",
"(",
"copyright",
"string",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"copyright",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n",
... |
4,266 | all-4267 | [
"FilteredFirehose",
"streams",
"a",
"filtered",
"set",
"of",
"envelopes",
".",
"It",
"has",
"functionality",
"similar",
"to",
"Firehose",
"."
] | [
"func",
"(",
"c",
"*",
"Consumer",
")",
"FilteredFirehose",
"(",
"subscriptionId",
"string",
",",
"authToken",
"string",
",",
"filter",
"EnvelopeFilter",
",",
")",
"(",
"<-",
"chan",
"*",
"<mask>",
".",
"Envelope",
",",
"<-",
"chan",
"error",
")",
"{",
"... |
4,267 | all-4268 | [
"After",
"sleeps",
"for",
"the",
"given",
"duration",
"and",
"then",
"writes",
"to",
"to",
"the",
"returned",
"channel"
] | [
"func",
"(",
"*",
"DefaultTime",
")",
"After",
"(",
"d",
"time",
".",
"Duration",
")",
"<-",
"chan",
"time",
".",
"Time",
"{",
"return",
"<mask>",
".",
"After",
"(",
"d",
")",
"\n",
"}"
] |
4,268 | all-4269 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"AttachToTargetParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget29",
"(",
"&",
... |
4,269 | all-4270 | [
"NewExpiringPointsIndex",
"creates",
"new",
"PointIndex",
"that",
"expires",
"the",
"points",
"in",
"each",
"cell",
"after",
"expiration",
"minutes",
"."
] | [
"func",
"NewExpiringPointsIndex",
"(",
"resolution",
"Meters",
",",
"expiration",
"Minutes",
")",
"*",
"PointsIndex",
"{",
"currentPosition",
":=",
"make",
"(",
"map",
"[",
"string",
"]",
"Point",
")",
"\n\n",
"newExpiringSet",
":=",
"func",
"(",
")",
"interfa... |
4,270 | all-4271 | [
"Copy",
"returns",
"a",
"deep",
"copy",
"of",
"this",
"configuration",
"."
] | [
"func",
"(",
"c",
"*",
"SSLConfig",
")",
"Copy",
"(",
")",
"*",
"SSLConfig",
"{",
"if",
"c",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"var",
"o",
"SSLConfig",
"\n",
"o",
".",
"CaCert",
"=",
"c",
".",
"CaCert",
"\n",
"o",
".",
"CaPa... |
4,271 | all-4272 | [
"DeleteLan",
"deletes",
"a",
"lan",
"where",
"id",
"==",
"lanid"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"DeleteLan",
"(",
"dcid",
",",
"lanid",
"string",
")",
"(",
"*",
"http",
".",
"<mask>",
",",
"error",
")",
"{",
"url",
":=",
"lanPath",
"(",
"dcid",
",",
"lanid",
")",
"\n",
"ret",
":=",
"&",
"http",
".",
"... |
4,272 | all-4273 | [
"ServeHTTP",
"records",
"the",
"time",
"for",
"a",
"request",
"and",
"sends",
"the",
"result",
"to",
"statsd"
] | [
"func",
"(",
"sh",
"*",
"StatsdLogHandler",
")",
"ServeHTTP",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"req",
"*",
"http",
".",
"Request",
")",
"{",
"requestStartTime",
":=",
"time",
".",
"Now",
"(",
")",
"\n",
"sh",
".",
"handler",
".",
"ServeHTT... |
4,273 | all-4274 | [
"NewLeaseTimeToLiveCommand",
"returns",
"the",
"cobra",
"command",
"for",
"lease",
"timetolive",
"."
] | [
"func",
"NewLeaseTimeToLiveCommand",
"(",
")",
"*",
"cobra",
".",
"Command",
"{",
"lc",
":=",
"&",
"cobra",
".",
"Command",
"{",
"Use",
":",
"\"",
"\"",
",",
"Short",
":",
"\"",
"\"",
",",
"Run",
":",
"leaseTimeToLiveCommandFunc",
",",
"}",
"\n",
"lc",... |
4,274 | all-4275 | [
"Returns",
"the",
"information",
"log",
"for",
"a",
"program",
"object"
] | [
"func",
"GetProgramInfoLog",
"(",
"<mask>",
"uint32",
",",
"bufSize",
"int32",
",",
"length",
"*",
"int32",
",",
"infoLog",
"*",
"uint8",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpGetProgramInfoLog",
",",
"4",
",",
"uintptr",
"(",
"program",
")",
",",
... |
4,275 | all-4276 | [
"delete",
"named",
"sampler",
"objects"
] | [
"func",
"DeleteSamplers",
"(",
"<mask>",
"int32",
",",
"samplers",
"*",
"uint32",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpDeleteSamplers",
",",
"2",
",",
"uintptr",
"(",
"count",
")",
",",
"uintptr",
"(",
"unsafe",
".",
"Pointer",
"(",
"samplers",
"... |
4,276 | all-4277 | [
"wsHandler",
"handles",
"incoming",
"websocket",
"connections",
"."
] | [
"func",
"(",
"s",
"*",
"Server",
")",
"wsConnHandler",
"(",
"<mask>",
"*",
"websocket",
".",
"Conn",
")",
"{",
"c",
",",
"err",
":=",
"NewConn",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"log",
".",
"Printf",
"(",
"\"",
"\"",
",",
"err",
"... |
4,277 | all-4278 | [
"title",
":",
"service",
"doc",
"path",
":",
"/",
"services",
"/",
"{",
"name",
"}",
"/",
"doc",
"method",
":",
"GET",
"responses",
":",
"200",
":",
"OK",
"401",
":",
"Unauthorized",
"404",
":",
"Not",
"found"
] | [
"func",
"serviceDoc",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"error",
"{",
"serviceName",
":=",
"r",
".",
"<mask>",
".",
"Query",
"(",
")",
".",
"Get",
"(",
"\"",
"\"",
... |
4,278 | all-4279 | [
"RadioButtonNewWithLabel",
"is",
"a",
"wrapper",
"around",
"gtk_radio_button_new_with_label",
"()",
"."
] | [
"func",
"RadioButtonNewWithLabel",
"(",
"group",
"*",
"glib",
".",
"SList",
",",
"label",
"string",
")",
"(",
"*",
"RadioButton",
",",
"error",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"label",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"u... |
4,279 | all-4280 | [
"NewSidecarAPIServer",
"creates",
"an",
"APIServer",
"that",
"has",
"limited",
"functionalities",
"and",
"is",
"meant",
"to",
"be",
"run",
"as",
"a",
"worker",
"sidecar",
".",
"It",
"cannot",
"for",
"instance",
"create",
"pipelines",
"."
] | [
"func",
"NewSidecarAPIServer",
"(",
"env",
"*",
"serviceenv",
".",
"ServiceEnv",
",",
"etcdPrefix",
"string",
",",
"iamRole",
"string",
",",
"reporter",
"*",
"metrics",
".",
"Reporter",
",",
"workerGrpcPort",
"uint16",
",",
"pprofPort",
"uint16",
",",
"httpPort"... |
4,280 | all-4281 | [
"map",
"all",
"of",
"a",
"buffer",
"object",
"s",
"data",
"store",
"into",
"the",
"client",
"s",
"address",
"space"
] | [
"func",
"MapBuffer",
"(",
"target",
"uint32",
",",
"access",
"uint32",
")",
"unsafe",
".",
"Pointer",
"{",
"<mask>",
",",
"_",
",",
"_",
":=",
"syscall",
".",
"Syscall",
"(",
"gpMapBuffer",
",",
"2",
",",
"uintptr",
"(",
"target",
")",
",",
"uintptr",
... |
4,281 | all-4282 | [
"PathTransform",
"scales",
"a",
"path",
"differently",
"in",
"horizontal",
"and",
"vertical",
"direction",
"."
] | [
"func",
"PathTransform",
"(",
"gc",
"draw2d",
".",
"GraphicContext",
",",
"x",
",",
"y",
",",
"<mask>",
",",
"height",
"float64",
")",
"{",
"gc",
".",
"Save",
"(",
")",
"\n",
"gc",
".",
"SetLineWidth",
"(",
"width",
"/",
"10",
")",
"\n",
"gc",
".",... |
4,282 | all-4283 | [
"borrowed",
"from",
"cespare"
] | [
"func",
"round64",
"(",
"h",
",",
"v",
"uint64",
")",
"uint64",
"{",
"h",
"+=",
"v",
"*",
"prime64x2",
"\n",
"h",
"=",
"rotl64_31",
"(",
"h",
")",
"\n",
"h",
"*=",
"prime64x1",
"\n",
"<mask>",
"h",
"\n",
"}"
] |
4,283 | all-4284 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"UndoParams",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom",
"(",
"&",
"r",
",",
... |
4,284 | all-4285 | [
"isMain",
"returns",
"whether",
"the",
"given",
"function",
"declaration",
"is",
"a",
"main",
"function",
".",
"Such",
"a",
"function",
"must",
"be",
"called",
"main",
"not",
"have",
"a",
"receiver",
"and",
"have",
"no",
"arguments",
"or",
"return",
"types",... | [
"func",
"isMain",
"(",
"f",
"*",
"ast",
".",
"FuncDecl",
")",
"bool",
"{",
"ft",
":=",
"f",
".",
"Type",
"\n",
"return",
"f",
".",
"Name",
".",
"<mask>",
"==",
"\"",
"\"",
"&&",
"f",
".",
"Recv",
"==",
"nil",
"&&",
"ft",
".",
"Params",
".",
"... |
4,285 | all-4286 | [
"DefaultGrantStrategy",
"grants",
"only",
"empty",
"scopes",
"."
] | [
"func",
"DefaultGrantStrategy",
"(",
"scope",
"oauth2",
".",
"Scope",
",",
"_",
"<mask>",
",",
"_",
"ResourceOwner",
")",
"(",
"oauth2",
".",
"Scope",
",",
"error",
")",
"{",
"// check scope",
"if",
"!",
"scope",
".",
"Empty",
"(",
")",
"{",
"return",
... |
4,286 | all-4287 | [
"NewDeriveScale",
"creates",
"a",
"new",
"derive",
"instruments",
"with",
"the",
"given",
"unit",
"."
] | [
"func",
"NewDeriveScale",
"(",
"v",
"float64",
",",
"d",
"time",
".",
"Duration",
")",
"*",
"Derive",
"{",
"return",
"&",
"Derive",
"{",
"value",
":",
"math",
".",
"Float64bits",
"(",
"v",
")",
",",
"<mask>",
":",
"Rate",
"{",
"time",
":",
"time",
... |
4,287 | all-4288 | [
"The",
"assumption",
"that",
"bucket",
"counts",
"increase",
"monotonically",
"with",
"increasing",
"upperBound",
"may",
"be",
"violated",
"during",
":",
"*",
"Recording",
"rule",
"evaluation",
"of",
"histogram_quantile",
"especially",
"when",
"rate",
"()",
"has",
... | [
"func",
"ensureMonotonic",
"(",
"buckets",
"buckets",
")",
"{",
"max",
":=",
"buckets",
"[",
"0",
"]",
".",
"count",
"\n",
"for",
"i",
":=",
"range",
"buckets",
"[",
"1",
":",
"]",
"{",
"switch",
"{",
"case",
"buckets",
"[",
"i",
"]",
".",
"count",... |
4,288 | all-4289 | [
"ZeroValue",
"returns",
"the",
"literal",
"representing",
"the",
"zero",
"value",
"for",
"this",
"field",
".",
"The",
"type",
"code",
"of",
"the",
"field",
"must",
"be",
"TypeColumn",
"."
] | [
"func",
"(",
"f",
"*",
"Field",
")",
"ZeroValue",
"(",
")",
"string",
"{",
"if",
"f",
".",
"Type",
".",
"Code",
"!=",
"TypeColumn",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"switch",
"f",
".",
"Type",
".",
"Name",
"{",
"case",
"\"... |
4,289 | all-4290 | [
"FillString",
"draws",
"a",
"filled",
"and",
"stroked",
"string",
".",
"And",
"filles",
"/",
"stroked",
"path",
"created",
"from",
"string",
".",
"Which",
"may",
"have",
"different",
"-",
"unselectable",
"-",
"output",
"in",
"non",
"raster",
"gc",
"implement... | [
"func",
"FillString",
"(",
"gc",
"draw2d",
".",
"GraphicContext",
",",
"x",
",",
"y",
",",
"width",
",",
"height",
"float64",
")",
"{",
"sx",
",",
"sy",
":=",
"width",
"/",
"100",
",",
"height",
"/",
"100",
"\n",
"gc",
".",
"Save",
"(",
")",
"\n"... |
4,290 | all-4291 | [
"scrollLine",
"scrolls",
"a",
"line",
"horizontally",
"starting",
"at",
"the",
"provided",
"position",
"by",
"a",
"number",
"of",
"columns",
"."
] | [
"func",
"(",
"h",
"*",
"windowsAnsiEventHandler",
")",
"scrollLine",
"(",
"columns",
"int",
",",
"position",
"COORD",
",",
"info",
"*",
"CONSOLE_SCREEN_BUFFER_INFO",
")",
"error",
"{",
"// Copy from and clip to the scroll region (full buffer width)",
"scrollRect",
":=",
... |
4,291 | all-4292 | [
"LastScrape",
"returns",
"the",
"time",
"of",
"the",
"last",
"scrape",
"."
] | [
"func",
"(",
"t",
"*",
"Target",
")",
"LastScrape",
"(",
")",
"<mask>",
".",
"Time",
"{",
"t",
".",
"mtx",
".",
"RLock",
"(",
")",
"\n",
"defer",
"t",
".",
"mtx",
".",
"RUnlock",
"(",
")",
"\n\n",
"return",
"t",
".",
"lastScrape",
"\n",
"}"
] |
4,292 | all-4293 | [
"Log",
"writes",
"std",
"log",
"event"
] | [
"func",
"<mask>",
"(",
"val",
"...",
"interface",
"{",
"}",
")",
"error",
"{",
"return",
"glg",
".",
"out",
"(",
"LOG",
",",
"blankFormat",
"(",
"len",
"(",
"val",
")",
")",
",",
"val",
"...",
")",
"\n",
"}"
] |
4,293 | all-4294 | [
"isZero",
"returns",
"true",
"iff",
"the",
"global",
"config",
"is",
"the",
"zero",
"value",
"."
] | [
"func",
"(",
"c",
"*",
"GlobalConfig",
")",
"isZero",
"(",
")",
"bool",
"{",
"<mask>",
"c",
".",
"ExternalLabels",
"==",
"nil",
"&&",
"c",
".",
"ScrapeInterval",
"==",
"0",
"&&",
"c",
".",
"ScrapeTimeout",
"==",
"0",
"&&",
"c",
".",
"EvaluationInterval... |
4,294 | all-4295 | [
"GetLayoutOk",
"returns",
"a",
"tuple",
"with",
"the",
"Layout",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"b",
"*",
"BoardWidget",
")",
"GetLayoutOk",
"(",
")",
"(",
"WidgetLayout",
",",
"bool",
")",
"{",
"if",
"b",
"==",
"nil",
"||",
"b",
".",
"Layout",
"==",
"nil",
"{",
"return",
"WidgetLayout",
"{",
"}",
",",
"false",
"\n",
"}",
"\n",
... |
4,295 | all-4296 | [
"New",
"returns",
"a",
"MockTracer",
"opentracing",
".",
"Tracer",
"implementation",
"that",
"s",
"intended",
"to",
"facilitate",
"tests",
"of",
"OpenTracing",
"instrumentation",
"."
] | [
"func",
"New",
"(",
")",
"*",
"MockTracer",
"{",
"t",
":=",
"&",
"MockTracer",
"{",
"finishedSpans",
":",
"[",
"]",
"*",
"MockSpan",
"{",
"}",
",",
"injectors",
":",
"make",
"(",
"map",
"[",
"interface",
"{",
"}",
"]",
"Injector",
")",
",",
"extrac... |
4,296 | all-4297 | [
"DeleteBoard",
"deletes",
"a",
"dashboard",
"by",
"the",
"identifier",
"."
] | [
"func",
"(",
"client",
"*",
"Client",
")",
"DeleteBoard",
"(",
"id",
"string",
")",
"error",
"{",
"return",
"client",
".",
"doJsonRequest",
"(",
"\"",
"\"",
",",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"<mask>",
")",
",",
"nil",
",",
"nil",
")... |
4,297 | all-4298 | [
"GetStoragePool",
"returns",
"a",
"StoragePool",
"entry",
"for",
"the",
"provided",
"pool",
"name"
] | [
"func",
"(",
"r",
"*",
"ProtocolLXD",
")",
"GetStoragePool",
"(",
"name",
"string",
")",
"(",
"*",
"api",
".",
"StoragePool",
",",
"string",
",",
"error",
")",
"{",
"if",
"!",
"r",
".",
"HasExtension",
"(",
"\"",
"\"",
")",
"{",
"return",
"nil",
",... |
4,298 | all-4299 | [
"Send",
"sends",
"the",
"request",
"and",
"return",
"the",
"response",
"."
] | [
"func",
"(",
"r",
"*",
"RequestBuilder",
")",
"Send",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"*",
"Response",
",",
"error",
")",
"{",
"req",
":=",
"NewRequest",
"(",
"ctx",
",",
"r",
".",
"shell",
".",
"url",
",",
"r",
".",
"command",
",... |
4,299 | all-4300 | [
"GetURL",
"returns",
"a",
"URL",
"that",
"can",
"be",
"retrieved",
"to",
"download",
"the",
"given",
"image",
"."
] | [
"func",
"(",
"m",
"*",
"MediaService",
")",
"GetURL",
"(",
"ctx",
"context",
".",
"Context",
",",
"messageSid",
"string",
",",
"sid",
"string",
")",
"(",
"*",
"url",
".",
"URL",
",",
"error",
")",
"{",
"uriEnd",
":=",
"strings",
".",
"Join",
"(",
"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.