id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
1,000 | all-1001 | [
"MarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Marshaler",
"."
] | [
"func",
"(",
"t",
"OrientationType",
")",
"MarshalEasyJSON",
"(",
"out",
"*",
"jwriter",
".",
"<mask>",
")",
"{",
"out",
".",
"String",
"(",
"string",
"(",
"t",
")",
")",
"\n",
"}"
] |
1,001 | all-1002 | [
"Create",
"creates",
"a",
"new",
"cgroup",
"based",
"off",
"the",
"spec",
"post",
"validation"
] | [
"func",
"(",
"c",
"*",
"control",
")",
"Create",
"(",
"cgroupSpec",
"*",
"Spec",
")",
"(",
"cgroups",
".",
"Cgroup",
",",
"error",
")",
"{",
"// Validate incoming spec",
"err",
":=",
"validateCgroupSpec",
"(",
"cgroupSpec",
")",
"\n",
"if",
"err",
"!=",
... |
1,002 | all-1003 | [
"copy",
"a",
"one",
"-",
"dimensional",
"texture",
"subimage"
] | [
"func",
"CopyTextureSubImage1D",
"(",
"texture",
"uint32",
",",
"level",
"int32",
",",
"xoffset",
"int32",
",",
"x",
"int32",
",",
"y",
"int32",
",",
"width",
"int32",
")",
"{",
"C",
".",
"glowCopyTextureSubImage1D",
"(",
"gpCopyTextureSubImage1D",
",",
"(",
... |
1,003 | all-1004 | [
"Do",
"executes",
"DOM",
".",
"removeNode",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"RemoveNodeParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandRemoveNode",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
1,004 | all-1005 | [
"GetClusterMembers",
"returns",
"the",
"current",
"members",
"of",
"the",
"cluster"
] | [
"func",
"(",
"r",
"*",
"ProtocolLXD",
")",
"GetClusterMembers",
"(",
")",
"(",
"[",
"]",
"api",
".",
"ClusterMember",
",",
"error",
")",
"{",
"if",
"!",
"r",
".",
"HasExtension",
"(",
"\"",
"\"",
")",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf"... |
1,005 | all-1006 | [
"UnmarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Unmarshaler",
"."
] | [
"func",
"(",
"t",
"*",
"StreamFormat",
")",
"UnmarshalEasyJSON",
"(",
"in",
"*",
"jlexer",
".",
"Lexer",
")",
"{",
"switch",
"StreamFormat",
"(",
"in",
".",
"<mask>",
"(",
")",
")",
"{",
"case",
"StreamFormatJSON",
":",
"*",
"t",
"=",
"StreamFormatJSON",... |
1,006 | all-1007 | [
"signatureStorageURL",
"returns",
"an",
"URL",
"usable",
"for",
"acessing",
"signature",
"index",
"in",
"base",
"with",
"known",
"manifestDigest",
"or",
"nil",
"if",
"not",
"applicable",
".",
"Returns",
"nil",
"iff",
"base",
"==",
"nil",
".",
"NOTE",
":",
"K... | [
"func",
"signatureStorageURL",
"(",
"base",
"signatureStorageBase",
",",
"manifestDigest",
"digest",
".",
"Digest",
",",
"index",
"int",
")",
"*",
"url",
".",
"URL",
"{",
"if",
"base",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"url",
":=",
"*",... |
1,007 | all-1008 | [
"GetTitleOk",
"returns",
"a",
"tuple",
"with",
"the",
"Title",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"t",
"*",
"TimeseriesDefinition",
")",
"GetTitleOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"Title",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"<mask>",
"\n",
"}",
"\n",
"return",
"... |
1,008 | all-1009 | [
"ProjectGet",
"returns",
"the",
"project",
"with",
"the",
"given",
"key",
"."
] | [
"func",
"(",
"c",
"*",
"ClusterTx",
")",
"ProjectGet",
"(",
"name",
"string",
")",
"(",
"*",
"api",
".",
"Project",
",",
"error",
")",
"{",
"filter",
":=",
"ProjectFilter",
"{",
"}",
"\n",
"filter",
".",
"Name",
"=",
"name",
"\n\n",
"objects",
",",
... |
1,009 | all-1010 | [
"GetAccount",
"returns",
"the",
"Account",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"c",
"*",
"ChannelSlackRequest",
")",
"GetAccount",
"(",
")",
"<mask>",
"{",
"if",
"c",
"==",
"nil",
"||",
"c",
".",
"Account",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"c",
".",
"Account",
"\n",
"}"
] |
1,010 | all-1011 | [
"native",
"()",
"returns",
"a",
"pointer",
"to",
"the",
"underlying",
"GSettingsBackend",
"."
] | [
"func",
"(",
"v",
"*",
"SettingsBackend",
")",
"native",
"(",
")",
"*",
"C",
".",
"GSettingsBackend",
"{",
"if",
"v",
"==",
"nil",
"||",
"v",
".",
"GObject",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"<mask>",
"C",
".",
"toGSettingsBackend"... |
1,011 | all-1012 | [
"getProfileContent",
"generates",
"the",
"apparmor",
"profile",
"template",
"from",
"the",
"given",
"container",
".",
"This",
"includes",
"the",
"stock",
"lxc",
"includes",
"as",
"well",
"as",
"stuff",
"from",
"raw",
".",
"apparmor",
"."
] | [
"func",
"getAAProfileContent",
"(",
"c",
"container",
")",
"string",
"{",
"profile",
":=",
"strings",
".",
"TrimLeft",
"(",
"AA_PROFILE_BASE",
",",
"\"",
"\\n",
"\"",
")",
"\n\n",
"// Apply new features",
"if",
"aaParserSupports",
"(",
"\"",
"\"",
")",
"{",
... |
1,012 | all-1013 | [
"Publish",
"sends",
"a",
"mesage",
"to",
"every",
"client",
"in",
"a",
"streamID"
] | [
"func",
"(",
"s",
"*",
"<mask>",
")",
"Publish",
"(",
"id",
"string",
",",
"event",
"*",
"Event",
")",
"{",
"s",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"defer",
"s",
".",
"mu",
".",
"Unlock",
"(",
")",
"\n",
"if",
"s",
".",
"Streams",
"[",
... |
1,013 | all-1014 | [
"Read",
"field",
"key",
"."
] | [
"func",
"decodeFieldNumberAndTyp3",
"(",
"bz",
"[",
"]",
"<mask>",
")",
"(",
"num",
"uint32",
",",
"typ",
"Typ3",
",",
"n",
"int",
",",
"err",
"error",
")",
"{",
"// Read uvarint value.",
"var",
"value64",
"=",
"uint64",
"(",
"0",
")",
"\n",
"value64",
... |
1,014 | all-1015 | [
"doSerialize",
"handles",
"the",
"auth",
"logic",
"with",
"permissions",
"checked",
"by",
"chk",
"for",
"a",
"serialized",
"request",
"get",
".",
"Returns",
"a",
"non",
"-",
"nil",
"error",
"on",
"authentication",
"failure",
"."
] | [
"func",
"(",
"s",
"*",
"EtcdServer",
")",
"doSerialize",
"(",
"ctx",
"context",
".",
"<mask>",
",",
"chk",
"func",
"(",
"*",
"auth",
".",
"AuthInfo",
")",
"error",
",",
"get",
"func",
"(",
")",
")",
"error",
"{",
"ai",
",",
"err",
":=",
"s",
".",... |
1,015 | all-1016 | [
"Encodes",
"e",
"to",
"buf",
".",
"Returns",
"number",
"of",
"bytes",
"written",
"."
] | [
"func",
"encodeEntry",
"(",
"e",
"*",
"Entry",
",",
"buf",
"*",
"bytes",
".",
"Buffer",
")",
"(",
"int",
",",
"error",
")",
"{",
"h",
":=",
"header",
"{",
"klen",
":",
"uint32",
"(",
"len",
"(",
"e",
".",
"Key",
")",
")",
",",
"vlen",
":",
"u... |
1,016 | all-1017 | [
"ImageNew",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_image_new",
"()",
"."
] | [
"func",
"ImageNew",
"(",
")",
"(",
"*",
"<mask>",
",",
"error",
")",
"{",
"c",
":=",
"C",
".",
"gtk_image_new",
"(",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"return",
"nil",
",",
"nilPtrErr",
"\n",
"}",
"\n",
"obj",
":=",
"glib",
".",
"Take",
"... |
1,017 | all-1018 | [
"NewOCIProvider",
"initialises",
"a",
"new",
"OCI",
"DNS",
"based",
"Provider",
"."
] | [
"func",
"NewOCIProvider",
"(",
"cfg",
"OCIConfig",
",",
"domainFilter",
"DomainFilter",
",",
"zoneIDFilter",
"ZoneIDFilter",
",",
"dryRun",
"bool",
")",
"(",
"*",
"OCIProvider",
",",
"error",
")",
"{",
"var",
"<mask>",
"ociDNSClient",
"\n",
"client",
",",
"err... |
1,018 | all-1019 | [
"MoveTo",
"skips",
"the",
"current",
"position",
"of",
"the",
"path",
"to",
"the",
"given",
"position",
"(",
"x",
"y",
")",
"without",
"adding",
"any",
"strokes",
"."
] | [
"func",
"(",
"p",
"*",
"Path",
")",
"MoveTo",
"(",
"x",
",",
"y",
"float32",
")",
"{",
"p",
".",
"cur",
"=",
"math",
".",
"Point",
"{",
"x",
",",
"y",
"}",
"\n",
"if",
"len",
"(",
"p",
".",
"segs",
")",
">",
"0",
"&&",
"len",
"(",
"p",
... |
1,019 | all-1020 | [
"void",
"pango_font_description_set_style",
"(",
"PangoFontDescription",
"*",
"desc",
"PangoStyle",
"style",
")",
";"
] | [
"func",
"(",
"v",
"*",
"FontDescription",
")",
"SetStyle",
"(",
"style",
"Style",
")",
"{",
"C",
".",
"pango_font_description_set_style",
"(",
"v",
".",
"native",
"(",
")",
",",
"(",
"C",
".",
"PangoStyle",
")",
"(",
"<mask>",
")",
")",
"\n",
"}"
] |
1,020 | all-1021 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"ContinueWithAuthParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch12",
"(",
"&",
... |
1,021 | all-1022 | [
"GetSharedContext",
"is",
"a",
"wrapper",
"around",
"gdk_gl_context_get_shared_context",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"GLContext",
")",
"GetSharedContext",
"(",
")",
"(",
"*",
"GLContext",
",",
"<mask>",
")",
"{",
"c",
":=",
"C",
".",
"gdk_gl_context_get_shared_context",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"if",
"c",
"==",
"nil",
"{"... |
1,022 | all-1023 | [
"vimURL",
"returns",
"a",
"URL",
"to",
"pass",
"to",
"the",
"VIM",
"SOAP",
"client",
"."
] | [
"func",
"(",
"c",
"*",
"Config",
")",
"vimURL",
"(",
")",
"(",
"*",
"url",
".",
"URL",
",",
"error",
")",
"{",
"u",
",",
"err",
":=",
"url",
".",
"Parse",
"(",
"\"",
"\"",
"+",
"c",
".",
"VSphereServer",
"+",
"\"",
"\"",
")",
"\n",
"if",
"e... |
1,023 | all-1024 | [
"Read",
"is",
"io",
".",
"Reader",
"s",
"Read",
".",
"Read",
"fills",
"the",
"data",
"with",
"sine",
"wave",
"samples",
"."
] | [
"func",
"(",
"s",
"*",
"stream",
")",
"Read",
"(",
"buf",
"[",
"]",
"byte",
")",
"(",
"int",
",",
"error",
")",
"{",
"if",
"len",
"(",
"s",
".",
"remaining",
")",
">",
"0",
"{",
"n",
":=",
"copy",
"(",
"buf",
",",
"s",
".",
"remaining",
")"... |
1,024 | all-1025 | [
"Auto",
"figures",
"out",
"how",
"to",
"render",
"the",
"model",
"based",
"information",
"about",
"the",
"request",
"and",
"the",
"name",
"of",
"the",
"model",
".",
"Auto",
"supports",
"automatic",
"rendering",
"of",
"HTML",
"JSON",
"and",
"XML",
".",
"Any... | [
"func",
"(",
"e",
"*",
"Engine",
")",
"Auto",
"(",
"ctx",
"context",
".",
"Context",
",",
"i",
"interface",
"{",
"}",
")",
"Renderer",
"{",
"<mask>",
",",
"_",
":=",
"ctx",
".",
"Value",
"(",
"\"",
"\"",
")",
".",
"(",
"string",
")",
"\n",
"if"... |
1,025 | all-1026 | [
"RemoveTask",
"indicates",
"an",
"expected",
"call",
"of",
"RemoveTask"
] | [
"func",
"(",
"mr",
"*",
"MockTaskEngineStateMockRecorder",
")",
"RemoveTask",
"(",
"arg0",
"<mask>",
"{",
"}",
")",
"*",
"gomock",
".",
"Call",
"{",
"return",
"mr",
".",
"mock",
".",
"ctrl",
".",
"RecordCallWithMethodType",
"(",
"mr",
".",
"mock",
",",
"... |
1,026 | all-1027 | [
"Get",
"checks",
"for",
"a",
"relay",
"item",
"by",
"ID",
"returning",
"the",
"item",
"and",
"a",
"bool",
"indicating",
"whether",
"the",
"item",
"was",
"found",
"."
] | [
"func",
"(",
"r",
"*",
"relayItems",
")",
"Get",
"(",
"id",
"uint32",
")",
"(",
"relayItem",
",",
"bool",
")",
"{",
"r",
".",
"RLock",
"(",
")",
"\n",
"item",
",",
"ok",
":=",
"r",
".",
"items",
"[",
"id",
"]",
"\n",
"r",
".",
"RUnlock",
"(",... |
1,027 | all-1028 | [
"canHaveDefaultValue",
"reports",
"whether",
"k",
"is",
"a",
"Kind",
"that",
"we",
"will",
"set",
"a",
"default",
"value",
"for",
".",
"(",
"A",
"signed",
"integer",
"essentially",
".",
")"
] | [
"func",
"canHaveDefaultValue",
"(",
"k",
"reflect",
".",
"Kind",
")",
"bool",
"{",
"switch",
"k",
"{",
"case",
"reflect",
".",
"Int",
",",
"reflect",
".",
"Int8",
",",
"reflect",
".",
"Int16",
",",
"reflect",
".",
"Int32",
",",
"reflect",
".",
"Int64",... |
1,028 | all-1029 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"a",
"specified",
"program",
"object"
] | [
"func",
"ProgramUniform4f",
"(",
"program",
"uint32",
",",
"location",
"int32",
",",
"v0",
"float32",
",",
"v1",
"float32",
",",
"v2",
"float32",
",",
"v3",
"float32",
")",
"{",
"C",
".",
"glowProgramUniform4f",
"(",
"gpProgramUniform4f",
",",
"(",
"C",
".... |
1,029 | all-1030 | [
"set",
"the",
"value",
"of",
"a",
"sub",
"-",
"word",
"of",
"the",
"sample",
"mask"
] | [
"func",
"SampleMaski",
"(",
"maskNumber",
"uint32",
",",
"<mask>",
"uint32",
")",
"{",
"C",
".",
"glowSampleMaski",
"(",
"gpSampleMaski",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"maskNumber",
")",
",",
"(",
"C",
".",
"GLbitfield",
")",
"(",
"mask",
")"... |
1,030 | all-1031 | [
"/",
"*",
"write",
"frame",
"to",
"video",
"file"
] | [
"func",
"(",
"<mask>",
"*",
"VideoWriter",
")",
"WriteFrame",
"(",
"image",
"*",
"IplImage",
")",
"int",
"{",
"rv",
":=",
"C",
".",
"cvWriteFrame",
"(",
"(",
"*",
"C",
".",
"CvVideoWriter",
")",
"(",
"writer",
")",
",",
"(",
"*",
"C",
".",
"IplImag... |
1,031 | all-1032 | [
"SetHost",
"sets",
"the",
"host",
"used",
"to",
"create",
"Self",
"-",
"Service",
"session",
".",
"Pass",
"in",
"the",
"CM",
"1",
".",
"5",
"host",
"this",
"method",
"computes",
"the",
"Self",
"-",
"Service",
"host",
"from",
"it",
"."
] | [
"func",
"(",
"a",
"*",
"ssAuthenticator",
")",
"SetHost",
"(",
"host",
"string",
")",
"{",
"a",
".",
"auther",
".",
"SetHost",
"(",
"<mask>",
")",
"\n",
"urlElems",
":=",
"strings",
".",
"Split",
"(",
"host",
",",
"\"",
"\"",
")",
"\n",
"hostPrefix",... |
1,032 | all-1033 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetProcessInfoParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo2",
"(",
"&",
"w",
",",
"v",
... |
1,033 | all-1034 | [
"MarshalEasyJSON",
"writes",
"the",
"CIDR",
"to",
"a",
"easyjson",
".",
"Writer"
] | [
"func",
"(",
"u",
"CIDR",
")",
"MarshalEasyJSON",
"(",
"w",
"*",
"jwriter",
".",
"Writer",
")",
"{",
"w",
".",
"<mask>",
"(",
"string",
"(",
"u",
")",
")",
"\n",
"}"
] |
1,034 | all-1035 | [
"Insert",
"or",
"updates",
"the",
"key",
"/",
"value",
"rows",
"of",
"the",
"given",
"config",
"table",
"."
] | [
"func",
"upsertConfig",
"(",
"tx",
"*",
"sql",
".",
"Tx",
",",
"table",
"string",
",",
"values",
"map",
"[",
"string",
"]",
"string",
")",
"error",
"{",
"if",
"len",
"(",
"values",
")",
"==",
"0",
"{",
"return",
"nil",
"// Nothing to update",
"\n",
"... |
1,035 | all-1036 | [
"Unmount",
"unmounts",
"currently",
"mounted",
"ZFS",
"file",
"systems",
"."
] | [
"func",
"(",
"d",
"*",
"Dataset",
")",
"Unmount",
"(",
"force",
"bool",
")",
"(",
"*",
"Dataset",
",",
"error",
")",
"{",
"if",
"d",
".",
"Type",
"==",
"DatasetSnapshot",
"{",
"return",
"nil",
",",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
"\n"... |
1,036 | all-1037 | [
"NewStreamReader",
"returns",
"a",
"reader",
"which",
"replays",
"all",
"the",
"data",
"generated",
"by",
"sw",
".",
"The",
"returned",
"reader",
"may",
"be",
"passed",
"to",
"Response",
".",
"SetBodyStream",
".",
"Close",
"must",
"be",
"called",
"on",
"the"... | [
"func",
"NewStreamReader",
"(",
"sw",
"StreamWriter",
")",
"io",
".",
"ReadCloser",
"{",
"pc",
":=",
"fasthttputil",
".",
"NewPipeConns",
"(",
")",
"\n",
"pw",
":=",
"pc",
".",
"Conn1",
"(",
")",
"\n",
"pr",
":=",
"pc",
".",
"Conn2",
"(",
")",
"\n\n"... |
1,037 | all-1038 | [
"ReStock",
"--",
"this",
"will",
"grab",
"a",
"requestid",
"from",
"procurementMeta",
"and",
"call",
"the",
"innkeeper",
"client",
"to",
"deprovision",
"."
] | [
"func",
"(",
"s",
"*",
"SkuM1Small",
")",
"ReStock",
"(",
")",
"(",
"tm",
"*",
"taskmanager",
".",
"Task",
")",
"{",
"tm",
"=",
"new",
"(",
"taskmanager",
".",
"Task",
")",
"\n",
"lo",
".",
"G",
".",
"Debug",
"(",
"\"",
"\"",
",",
"s",
".",
"... |
1,038 | all-1039 | [
"FullSrcLine",
"returns",
"/",
"path",
"/",
"to",
"/",
"source",
".",
"go",
":",
"line",
".",
"This",
"file",
"path",
"is",
"mutated",
"to",
"look",
"like",
"the",
"local",
"path",
"."
] | [
"func",
"(",
"c",
"*",
"Call",
")",
"FullSrcLine",
"(",
")",
"string",
"{",
"<mask>",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"c",
".",
"SrcPath",
",",
"c",
".",
"Line",
")",
"\n",
"}"
] |
1,039 | all-1040 | [
"createProgressBar",
"creates",
"a",
"mpb",
".",
"Bar",
"in",
"pool",
".",
"Note",
"that",
"if",
"the",
"copier",
"s",
"reportWriter",
"is",
"ioutil",
".",
"Discard",
"the",
"progress",
"bar",
"s",
"output",
"will",
"be",
"discarded"
] | [
"func",
"(",
"c",
"*",
"copier",
")",
"createProgressBar",
"(",
"pool",
"*",
"mpb",
".",
"Progress",
",",
"info",
"types",
".",
"BlobInfo",
",",
"<mask>",
"string",
",",
"onComplete",
"string",
")",
"*",
"mpb",
".",
"Bar",
"{",
"// shortDigestLen is the le... |
1,040 | all-1041 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"RequestNodeReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom12",
"(",
"&",
"w",
",",
"v",
")",
... |
1,041 | all-1042 | [
"title",
":",
"set",
"unit",
"status",
"path",
":",
"/",
"apps",
"/",
"{",
"app",
"}",
"/",
"units",
"/",
"{",
"unit",
"}",
"method",
":",
"POST",
"consume",
":",
"application",
"/",
"x",
"-",
"www",
"-",
"form",
"-",
"urlencoded",
"responses",
":"... | [
"func",
"setUnitStatus",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"error",
"{",
"unitName",
":=",
"r",
".",
"URL",
".",
"<mask>",
"(",
")",
".",
"Get",
"(",
"\"",
"\"",
"... |
1,042 | all-1043 | [
"Records",
"returns",
"all",
"DNS",
"records",
"controlled",
"by",
"the",
"configured",
"PDNS",
"server",
"(",
"for",
"all",
"zones",
")"
] | [
"func",
"(",
"p",
"*",
"PDNSProvider",
")",
"Records",
"(",
")",
"(",
"endpoints",
"[",
"]",
"*",
"endpoint",
".",
"Endpoint",
",",
"_",
"error",
")",
"{",
"zones",
",",
"_",
",",
"err",
":=",
"p",
".",
"client",
".",
"ListZones",
"(",
")",
"\n",... |
1,043 | all-1044 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"StopCastingParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast",
"(",
"&",
"w",
",",
"v",
")",
"... |
1,044 | all-1045 | [
"GetDeviceOffset",
"is",
"a",
"wrapper",
"around",
"cairo_surface_get_device_offset",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Surface",
")",
"GetDeviceOffset",
"(",
")",
"(",
"x",
",",
"y",
"float64",
")",
"{",
"<mask>",
"xOffset",
",",
"yOffset",
"C",
".",
"double",
"\n",
"C",
".",
"cairo_surface_get_device_offset",
"(",
"v",
".",
"native",
"(",
")",
... |
1,045 | all-1046 | [
"MenuItemNewSection",
"is",
"a",
"wrapper",
"around",
"g_menu_item_new_section",
"()",
"."
] | [
"func",
"MenuItemNewSection",
"(",
"label",
"string",
",",
"<mask>",
"*",
"MenuModel",
")",
"*",
"MenuItem",
"{",
"cstr1",
":=",
"(",
"*",
"C",
".",
"gchar",
")",
"(",
"C",
".",
"CString",
"(",
"label",
")",
")",
"\n",
"defer",
"C",
".",
"free",
"(... |
1,046 | all-1047 | [
"Fetches",
"a",
"symbol",
"specified",
"in",
"op",
"arg",
"from",
"template",
"variables",
".",
"XXX",
"need",
"to",
"handle",
"local",
"vars?"
] | [
"func",
"txFetchSymbol",
"(",
"st",
"*",
"State",
")",
"{",
"// Need to handle local vars?",
"key",
":=",
"st",
".",
"CurrentOp",
"(",
")",
".",
"Arg",
"(",
")",
"\n",
"vars",
":=",
"st",
".",
"Vars",
"(",
")",
"\n",
"if",
"v",
",",
"ok",
":=",
"va... |
1,047 | all-1048 | [
"FullyQualifiedAppID",
"returns",
"the",
"fully",
"-",
"qualified",
"application",
"ID",
".",
"This",
"may",
"contain",
"a",
"partition",
"prefix",
"(",
"e",
".",
"g",
".",
"s~",
"for",
"High",
"Replication",
"apps",
")",
"or",
"a",
"domain",
"prefix",
"("... | [
"func",
"FullyQualifiedAppID",
"(",
"ctx",
"netcontext",
".",
"Context",
")",
"string",
"{",
"if",
"id",
",",
"ok",
":=",
"ctx",
".",
"Value",
"(",
"&",
"appIDOverrideKey",
")",
".",
"(",
"string",
")",
";",
"ok",
"{",
"return",
"<mask>",
"\n",
"}",
... |
1,048 | all-1049 | [
"AddBytesKV",
"adds",
"the",
"given",
"key",
":",
"value",
"header",
".",
"Multiple",
"headers",
"with",
"the",
"same",
"key",
"may",
"be",
"added",
"with",
"this",
"function",
".",
"Use",
"SetBytesKV",
"for",
"setting",
"a",
"single",
"header",
"for",
"th... | [
"func",
"(",
"h",
"*",
"RequestHeader",
")",
"AddBytesKV",
"(",
"<mask>",
",",
"value",
"[",
"]",
"byte",
")",
"{",
"h",
".",
"Add",
"(",
"b2s",
"(",
"key",
")",
",",
"b2s",
"(",
"value",
")",
")",
"\n",
"}"
] |
1,049 | all-1050 | [
"NewBase64Cleaner",
"returns",
"a",
"Base64Cleaner",
"object",
"for",
"the",
"specified",
"reader",
".",
"Base64Cleaner",
"implements",
"the",
"io",
".",
"Reader",
"interface",
"."
] | [
"func",
"NewBase64Cleaner",
"(",
"r",
"io",
".",
"Reader",
")",
"*",
"Base64Cleaner",
"{",
"return",
"&",
"Base64Cleaner",
"{",
"Errors",
":",
"<mask>",
"(",
"[",
"]",
"error",
",",
"0",
")",
",",
"r",
":",
"r",
",",
"}",
"\n",
"}"
] |
1,050 | all-1051 | [
"NewColumnIterator",
"creates",
"a",
"new",
"iterator",
"for",
"column",
"data",
"."
] | [
"func",
"NewColumnIterator",
"(",
"<mask>",
"Format",
",",
"reader",
"io",
".",
"Reader",
")",
"*",
"Iterator",
"{",
"return",
"NewIterator",
"(",
"reader",
",",
"ColumnUnmarshaller",
"(",
"format",
")",
")",
"\n",
"}"
] |
1,051 | all-1052 | [
"HasPalette",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"WidgetConditionalFormat",
")",
"HasPalette",
"(",
")",
"bool",
"{",
"if",
"w",
"!=",
"nil",
"&&",
"w",
".",
"Palette",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
1,052 | all-1053 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"SetRequestInterceptionParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"<mask>",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork10",
"(... |
1,053 | all-1054 | [
"NextIP",
"returns",
"the",
"next",
"sequential",
"ip",
"."
] | [
"func",
"NextIP",
"(",
"ip",
"<mask>",
".",
"IP",
")",
"net",
".",
"IP",
"{",
"return",
"NewNetworkNumber",
"(",
"ip",
")",
".",
"Next",
"(",
")",
".",
"ToIP",
"(",
")",
"\n",
"}"
] |
1,054 | all-1055 | [
"InsertSubmenu",
"is",
"a",
"wrapper",
"around",
"g_menu_insert_submenu",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Menu",
")",
"InsertSubmenu",
"(",
"position",
"int",
",",
"label",
"string",
",",
"submenu",
"*",
"MenuModel",
")",
"{",
"cstr1",
":=",
"(",
"*",
"C",
".",
"gchar",
")",
"(",
"C",
".",
"CString",
"(",
"<mask>",
")",
")",
"... |
1,055 | all-1056 | [
"Create",
"a",
"new",
"net",
".",
"Listener",
"bound",
"to",
"the",
"tcp",
"socket",
"of",
"the",
"network",
"endpoint",
"."
] | [
"func",
"networkCreateListener",
"(",
"address",
"string",
",",
"cert",
"*",
"shared",
".",
"CertInfo",
")",
"<mask>",
".",
"Listener",
"{",
"listener",
",",
"err",
":=",
"net",
".",
"Listen",
"(",
"\"",
"\"",
",",
"util",
".",
"CanonicalNetworkAddress",
"... |
1,056 | all-1057 | [
"Lerp",
"returns",
"the",
"result",
"vector",
"of",
"a",
"linear",
"interpolation",
"between",
"two",
"vectors",
".",
"v",
"toward",
"v1",
".",
"The",
"interpolation",
"factor",
"t",
"should",
"be",
"comprised",
"betwenn",
"0",
"and",
"1",
".",
"0",
".",
... | [
"func",
"(",
"v",
"Vec3",
")",
"Lerp",
"(",
"v1",
"Vec3",
",",
"t",
"float32",
")",
"Vec3",
"{",
"<mask>",
"Vec3",
"{",
"v",
"[",
"0",
"]",
"+",
"(",
"v1",
"[",
"0",
"]",
"-",
"v",
"[",
"0",
"]",
")",
"*",
"t",
",",
"v",
"[",
"1",
"]",
... |
1,057 | all-1058 | [
"runCmdOutput",
"is",
"a",
"helper",
"function",
"to",
"run",
"commands",
"and",
"return",
"output",
".",
"It",
"runs",
"command",
"with",
"args",
"from",
"directory",
"at",
"dir",
".",
"If",
"successful",
"returns",
"output",
"and",
"nil",
"error"
] | [
"func",
"runCmdOutput",
"(",
"command",
"string",
",",
"args",
"[",
"]",
"string",
",",
"dir",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"cmd",
":=",
"gos",
".",
"Command",
"(",
"command",
",",
"args",
"...",
")",
"\n",
"cmd",
".",
"Dir... |
1,058 | all-1059 | [
"FindOneTo",
"calls",
"db",
".",
"FindOneTo",
"()",
"returning",
"more",
"descriptive",
"error",
"."
] | [
"func",
"FindOneTo",
"(",
"db",
"*",
"reform",
".",
"Querier",
",",
"str",
"reform",
".",
"Struct",
",",
"<mask>",
"string",
",",
"arg",
"interface",
"{",
"}",
")",
"error",
"{",
"if",
"err",
":=",
"db",
".",
"FindOneTo",
"(",
"str",
",",
"column",
... |
1,059 | all-1060 | [
"WithFormat",
"image",
"compression",
"format",
"."
] | [
"func",
"(",
"p",
"StartScreencastParams",
")",
"WithFormat",
"(",
"format",
"ScreencastFormat",
")",
"*",
"StartScreencastParams",
"{",
"p",
".",
"Format",
"=",
"<mask>",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
1,060 | all-1061 | [
"SetFocusHAdjustment",
"is",
"a",
"wrapper",
"around",
"gtk_container_set_focus_hadjustment",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"SetFocusHAdjustment",
"(",
"adjustment",
"*",
"Adjustment",
")",
"{",
"C",
".",
"gtk_container_set_focus_hadjustment",
"(",
"v",
".",
"native",
"(",
")",
",",
"adjustment",
".",
"native",
"(",
")",
")",
"\n",
"}"
] |
1,061 | all-1062 | [
"rewind",
"resets",
"this",
"fileBuffer",
"to",
"read",
"from",
"the",
"beginning"
] | [
"func",
"(",
"r",
"*",
"fileBuffer",
")",
"rewind",
"(",
")",
"{",
"r",
".",
"Reader",
"=",
"io",
".",
"MultiReader",
"(",
"r",
".",
"cache",
",",
"r",
".",
"<mask>",
".",
"Reader",
")",
"\n",
"}"
] |
1,062 | all-1063 | [
"PathToTree",
"computes",
"the",
"hashtree",
"shard",
"for",
"a",
"path",
"."
] | [
"func",
"PathToTree",
"(",
"path",
"string",
",",
"numTrees",
"int64",
")",
"uint64",
"{",
"path",
"=",
"<mask>",
"(",
"path",
")",
"\n",
"return",
"pathToTree",
"(",
"b",
"(",
"path",
")",
",",
"numTrees",
")",
"\n",
"}"
] |
1,063 | all-1064 | [
"LaunchBuild",
"launches",
"a",
"regular",
"or",
"parameterized",
"Jenkins",
"build",
"depending",
"on",
"whether",
"or",
"not",
"we",
"have",
"params",
"to",
"POST"
] | [
"func",
"(",
"c",
"*",
"<mask>",
")",
"LaunchBuild",
"(",
"spec",
"*",
"prowapi",
".",
"ProwJobSpec",
",",
"params",
"url",
".",
"Values",
")",
"error",
"{",
"var",
"path",
"string",
"\n\n",
"if",
"params",
"!=",
"nil",
"{",
"path",
"=",
"getBuildWithP... |
1,064 | all-1065 | [
"seenMessage",
"returns",
"whether",
"we",
"already",
"saw",
"this",
"message",
"before"
] | [
"func",
"(",
"p",
"*",
"PubSub",
")",
"seenMessage",
"(",
"id",
"string",
")",
"bool",
"{",
"return",
"p",
".",
"seenMessages",
".",
"Has",
"(",
"<mask>",
")",
"\n",
"}"
] |
1,065 | all-1066 | [
"GetPeriodOk",
"returns",
"a",
"tuple",
"with",
"the",
"Period",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"t",
"*",
"ThresholdCount",
")",
"GetPeriodOk",
"(",
")",
"(",
"Period",
",",
"bool",
")",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"Period",
"==",
"nil",
"{",
"return",
"Period",
"{",
"}",
",",
"<mask>",
"\n",
"}",
"\n",
"return... |
1,066 | all-1067 | [
"<template",
"-",
"arg",
">",
"::",
"=",
"<type",
">",
"::",
"=",
"X",
"<expression",
">",
"E",
"::",
"=",
"<expr",
"-",
"primary",
">"
] | [
"func",
"(",
"st",
"*",
"state",
")",
"templateArg",
"(",
")",
"AST",
"{",
"if",
"len",
"(",
"st",
".",
"str",
")",
"==",
"0",
"{",
"st",
".",
"fail",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"switch",
"st",
".",
"str",
"[",
"0",
"]",
"{",
... |
1,067 | all-1068 | [
"resolveStale",
"resolves",
"the",
"image",
"s",
"stale",
"state",
"."
] | [
"func",
"(",
"i",
"*",
"<mask>",
")",
"resolveStale",
"(",
")",
"{",
"if",
"!",
"IsRestoringEnabled",
"(",
")",
"{",
"return",
"\n",
"}",
"\n\n",
"if",
"i",
".",
"volatile",
"{",
"return",
"\n",
"}",
"\n",
"if",
"i",
".",
"screen",
"{",
"return",
... |
1,068 | all-1069 | [
"alertmanagersFromGroup",
"extracts",
"a",
"list",
"of",
"alertmanagers",
"from",
"a",
"target",
"group",
"and",
"an",
"associated",
"AlertmanagerConfig",
"."
] | [
"func",
"alertmanagerFromGroup",
"(",
"tg",
"*",
"targetgroup",
".",
"Group",
",",
"cfg",
"*",
"config",
".",
"AlertmanagerConfig",
")",
"(",
"[",
"]",
"alertmanager",
",",
"[",
"]",
"alertmanager",
",",
"error",
")",
"{",
"var",
"<mask>",
"[",
"]",
"ale... |
1,069 | all-1070 | [
"WriteB",
"writes",
"a",
"byte",
"."
] | [
"func",
"(",
"w",
"*",
"Writer",
")",
"WriteB",
"(",
"b",
"<mask>",
")",
"{",
"// WriteB as sig differs from WriteByte (vet issues)",
"if",
"w",
".",
"err",
"!=",
"nil",
"{",
"return",
"\n",
"}",
"\n",
"w",
".",
"wr",
".",
"WriteByte",
"(",
"b",
")",
"... |
1,070 | all-1071 | [
"endpointsFromService",
"extracts",
"the",
"endpoints",
"from",
"a",
"service",
"object"
] | [
"func",
"(",
"sc",
"*",
"serviceSource",
")",
"endpoints",
"(",
"svc",
"*",
"v1",
".",
"<mask>",
",",
"nodeTargets",
"endpoint",
".",
"Targets",
")",
"[",
"]",
"*",
"endpoint",
".",
"Endpoint",
"{",
"var",
"endpoints",
"[",
"]",
"*",
"endpoint",
".",
... |
1,071 | all-1072 | [
"bind",
"a",
"renderbuffer",
"to",
"a",
"renderbuffer",
"target"
] | [
"func",
"BindRenderbuffer",
"(",
"<mask>",
"uint32",
",",
"renderbuffer",
"uint32",
")",
"{",
"C",
".",
"glowBindRenderbuffer",
"(",
"gpBindRenderbuffer",
",",
"(",
"C",
".",
"GLenum",
")",
"(",
"target",
")",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"ren... |
1,072 | all-1073 | [
"GetMonitorIdOk",
"returns",
"a",
"tuple",
"with",
"the",
"MonitorId",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"d",
"*",
"Downtime",
")",
"GetMonitorIdOk",
"(",
")",
"(",
"int",
",",
"bool",
")",
"{",
"if",
"d",
"==",
"nil",
"||",
"d",
".",
"MonitorId",
"==",
"nil",
"{",
"return",
"0",
",",
"<mask>",
"\n",
"}",
"\n",
"return",
"*",
"d",
"."... |
1,073 | all-1074 | [
"GetContainerLog",
"returns",
"the",
"log",
"of",
"a",
"container",
"in",
"the",
"specified",
"pod",
"in",
"the",
"client",
"s",
"specified",
"namespace",
".",
"Analogous",
"to",
"kubectl",
"logs",
"pod",
"-",
"c",
"container",
"--",
"namespace",
"=",
"clien... | [
"func",
"(",
"c",
"*",
"Client",
")",
"GetContainerLog",
"(",
"pod",
",",
"container",
"string",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"c",
".",
"log",
"(",
"\"",
"\"",
",",
"pod",
")",
"\n",
"return",
"c",
".",
"requestRetry",
"(",... |
1,074 | all-1075 | [
"Writes",
"the",
"golang",
"text",
"template",
"at",
"templatePath",
"to",
"outputPath",
"using",
"the",
"given",
"data"
] | [
"func",
"writeTemplate",
"(",
"templatePath",
"string",
",",
"outputPath",
"string",
",",
"<mask>",
"interface",
"{",
"}",
")",
"error",
"{",
"// set up template",
"funcMap",
":=",
"template",
".",
"FuncMap",
"{",
"\"",
"\"",
":",
"func",
"(",
"input",
"stri... |
1,075 | all-1076 | [
"SetAuthRequest",
"sets",
"the",
"AuthRequest",
"function",
"for",
"the",
"underlying",
"trace",
"HTTP",
"listener",
"which",
"determines",
"whether",
"a",
"specific",
"request",
"is",
"permitted",
"to",
"load",
"the",
"/",
"debug",
"/",
"requests",
"or",
"/",
... | [
"func",
"SetAuthRequest",
"(",
"f",
"func",
"(",
"req",
"*",
"http",
".",
"<mask>",
")",
"(",
"any",
",",
"sensitive",
"bool",
")",
")",
"{",
"xtr",
".",
"AuthRequest",
"=",
"f",
"\n",
"}"
] |
1,076 | all-1077 | [
"OffscreenWindowNew",
"is",
"a",
"wrapper",
"around",
"gtk_offscreen_window_new",
"()",
"."
] | [
"func",
"OffscreenWindowNew",
"(",
")",
"(",
"*",
"OffscreenWindow",
",",
"<mask>",
")",
"{",
"c",
":=",
"C",
".",
"gtk_offscreen_window_new",
"(",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"return",
"nil",
",",
"nilPtrErr",
"\n",
"}",
"\n",
"return",
"w... |
1,077 | all-1078 | [
"UpdateStatus",
"updates",
"a",
"task",
"s",
"known",
"and",
"desired",
"statuses",
"to",
"be",
"compatible",
"with",
"all",
"of",
"its",
"containers",
"It",
"will",
"return",
"a",
"bool",
"indicating",
"if",
"there",
"was",
"a",
"change"
] | [
"func",
"(",
"task",
"*",
"Task",
")",
"UpdateStatus",
"(",
")",
"bool",
"{",
"<mask>",
":=",
"task",
".",
"updateTaskKnownStatus",
"(",
")",
"\n",
"// DesiredStatus can change based on a new known status",
"task",
".",
"UpdateDesiredStatus",
"(",
")",
"\n",
"retu... |
1,078 | all-1079 | [
"SetAutoStartupNotification",
"is",
"a",
"wrapper",
"around",
"gtk_window_set_auto_startup_notification",
"()",
".",
"This",
"doesn",
"t",
"seem",
"write",
".",
"Might",
"need",
"to",
"rethink?",
"/",
"*",
"func",
"(",
"v",
"*",
"Window",
")",
"SetAutoStartupNotif... | [
"func",
"(",
"v",
"*",
"Window",
")",
"GetMnemonicsVisible",
"(",
")",
"bool",
"{",
"c",
":=",
"C",
".",
"gtk_window_get_mnemonics_visible",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"<mask>",
"gobool",
"(",
"c",
")",
"\n",
"}"
] |
1,079 | all-1080 | [
"Count",
"creates",
"a",
"Count",
"query",
".",
"Returns",
"the",
"number",
"of",
"set",
"columns",
"in",
"the",
"ROW_CALL",
"passed",
"in",
"."
] | [
"func",
"(",
"idx",
"*",
"Index",
")",
"Count",
"(",
"row",
"*",
"PQLRowQuery",
")",
"*",
"PQLBaseQuery",
"{",
"serializedQuery",
":=",
"row",
".",
"serialize",
"(",
")",
"\n",
"q",
":=",
"NewPQLBaseQuery",
"(",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
... |
1,080 | all-1081 | [
"UnmarshalJSON",
"sets",
"the",
"Duration",
"from",
"JSON"
] | [
"func",
"(",
"d",
"*",
"Duration",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"l",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"d",
".",
"UnmarshalEasyJSON",
"(",
"&",
"l",
")",
"\n",
"return",
... |
1,081 | all-1082 | [
"check",
"the",
"completeness",
"status",
"of",
"a",
"framebuffer"
] | [
"func",
"CheckFramebufferStatus",
"(",
"target",
"uint32",
")",
"uint32",
"{",
"ret",
":=",
"C",
".",
"glowCheckFramebufferStatus",
"(",
"gpCheckFramebufferStatus",
",",
"(",
"C",
".",
"GLenum",
")",
"(",
"<mask>",
")",
")",
"\n",
"return",
"(",
"uint32",
")... |
1,082 | all-1083 | [
"Rollback",
"rolls",
"back",
"the",
"receiving",
"ZFS",
"dataset",
"to",
"a",
"previous",
"snapshot",
".",
"Optionally",
"intermediate",
"snapshots",
"can",
"be",
"destroyed",
".",
"A",
"ZFS",
"snapshot",
"rollback",
"cannot",
"be",
"completed",
"without",
"this... | [
"func",
"(",
"d",
"*",
"Dataset",
")",
"Rollback",
"(",
"destroyMoreRecent",
"bool",
")",
"error",
"{",
"if",
"d",
".",
"Type",
"!=",
"DatasetSnapshot",
"{",
"return",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"args",
":=",
"make... |
1,083 | all-1084 | [
"GetPageIterator",
"returns",
"an",
"iterator",
"which",
"can",
"be",
"used",
"to",
"retrieve",
"pages",
"."
] | [
"func",
"(",
"c",
"*",
"CallService",
")",
"GetPageIterator",
"(",
"<mask>",
"url",
".",
"Values",
")",
"CallPageIterator",
"{",
"iter",
":=",
"NewPageIterator",
"(",
"c",
".",
"client",
",",
"data",
",",
"callsPathPart",
")",
"\n",
"return",
"&",
"callPag... |
1,084 | all-1085 | [
"Add",
"writes",
"the",
"given",
"item",
"if",
"no",
"value",
"already",
"exists",
"for",
"its",
"key",
".",
"ErrNotStored",
"is",
"returned",
"if",
"that",
"condition",
"is",
"not",
"met",
"."
] | [
"func",
"(",
"cd",
"Codec",
")",
"Add",
"(",
"c",
"context",
".",
"Context",
",",
"item",
"*",
"Item",
")",
"error",
"{",
"return",
"singleError",
"(",
"<mask>",
".",
"set",
"(",
"c",
",",
"[",
"]",
"*",
"Item",
"{",
"item",
"}",
",",
"pb",
"."... |
1,085 | all-1086 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"RequestEntriesReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage",
"(",
"&",
"w",
",",
"v"... |
1,086 | all-1087 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SetDocumentContentParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage12",
"(",
"&",
"w",
",",
"v",
... |
1,087 | all-1088 | [
"Start",
"starts",
"the",
"stat",
"process",
"that",
"will",
"log",
"relevant",
"memory",
"-",
"related",
"stats",
"to",
"ctx",
"at",
"an",
"interval",
"determined",
"by",
"interval",
"."
] | [
"func",
"Start",
"(",
"ctx",
"log",
".",
"Interface",
",",
"interval",
"time",
".",
"Duration",
")",
"{",
"ctx",
".",
"WithField",
"(",
"\"",
"\"",
",",
"interval",
")",
".",
"Debug",
"(",
"\"",
"\"",
")",
"\n",
"go",
"func",
"(",
")",
"{",
"mems... |
1,088 | all-1089 | [
"secret",
"must",
"be",
"32",
"bytes",
"long",
".",
"Use",
"something",
"like",
"Sha256",
"(",
"Bcrypt",
"(",
"passphrase",
"))",
"The",
"ciphertext",
"is",
"(",
"secretbox",
".",
"Overhead",
"+",
"24",
")",
"bytes",
"longer",
"than",
"the",
"plaintext",
... | [
"func",
"EncryptSymmetric",
"(",
"plaintext",
"[",
"]",
"byte",
",",
"secret",
"[",
"]",
"byte",
")",
"(",
"ciphertext",
"[",
"]",
"byte",
")",
"{",
"if",
"len",
"(",
"secret",
")",
"!=",
"secretLen",
"{",
"PanicSanity",
"(",
"Fmt",
"(",
"\"",
"\"",
... |
1,089 | all-1090 | [
"Records",
"returns",
"the",
"list",
"of",
"records",
"in",
"a",
"given",
"zone",
"."
] | [
"func",
"(",
"p",
"*",
"DigitalOceanProvider",
")",
"Records",
"(",
")",
"(",
"[",
"]",
"*",
"endpoint",
".",
"Endpoint",
",",
"error",
")",
"{",
"zones",
",",
"err",
":=",
"p",
".",
"Zones",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return... |
1,090 | all-1091 | [
"GdkCairoSetSourcePixBuf",
"()",
"is",
"a",
"wrapper",
"around",
"gdk_cairo_set_source_pixbuf",
"()",
"."
] | [
"func",
"GdkCairoSetSourcePixBuf",
"(",
"cr",
"*",
"cairo",
".",
"Context",
",",
"pixbuf",
"*",
"gdk",
".",
"Pixbuf",
",",
"pixbufX",
",",
"pixbufY",
"float64",
")",
"{",
"context",
":=",
"(",
"*",
"C",
".",
"cairo_t",
")",
"(",
"unsafe",
".",
"Pointer... |
1,091 | all-1092 | [
"FetchDashboard",
"retrieves",
"dashboard",
"with",
"passed",
"cid",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"FetchDashboard",
"(",
"cid",
"CIDType",
")",
"(",
"*",
"Dashboard",
",",
"error",
")",
"{",
"if",
"cid",
"==",
"nil",
"||",
"*",
"cid",
"==",
"\"",
"\"",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
... |
1,092 | all-1093 | [
"Returns",
"associated",
"issue",
"or",
"0",
"if",
"it",
"can",
"t",
"find",
"any",
".",
"This",
"is",
"really",
"simple",
"and",
"could",
"be",
"improved",
"later",
"."
] | [
"func",
"findAssociatedIssue",
"(",
"<mask>",
",",
"org",
"string",
")",
"(",
"int",
",",
"error",
")",
"{",
"associatedIssueRegex",
",",
"err",
":=",
"regexp",
".",
"Compile",
"(",
"fmt",
".",
"Sprintf",
"(",
"associatedIssueRegexFormat",
",",
"org",
")",
... |
1,093 | all-1094 | [
"MarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Marshaler",
"."
] | [
"func",
"(",
"t",
"GestureType",
")",
"MarshalEasyJSON",
"(",
"out",
"*",
"jwriter",
".",
"Writer",
")",
"{",
"<mask>",
".",
"String",
"(",
"string",
"(",
"t",
")",
")",
"\n",
"}"
] |
1,094 | all-1095 | [
"GetApmQueryOk",
"returns",
"a",
"tuple",
"with",
"the",
"ApmQuery",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"h",
"*",
"HostmapRequest",
")",
"GetApmQueryOk",
"(",
")",
"(",
"WidgetApmOrLogQuery",
",",
"bool",
")",
"{",
"if",
"h",
"==",
"nil",
"||",
"h",
".",
"ApmQuery",
"==",
"nil",
"{",
"return",
"WidgetApmOrLogQuery",
"{",
"}",
",",
"false",
"... |
1,095 | all-1096 | [
"Validate",
"validates",
"all",
"rules",
"in",
"the",
"rule",
"groups",
"."
] | [
"func",
"(",
"g",
"*",
"RuleGroups",
")",
"Validate",
"(",
")",
"(",
"errs",
"[",
"]",
"error",
")",
"{",
"set",
":=",
"map",
"[",
"string",
"]",
"struct",
"{",
"}",
"{",
"}",
"\n\n",
"for",
"_",
",",
"g",
":=",
"range",
"g",
".",
"Groups",
"... |
1,096 | all-1097 | [
"reads",
"specified",
"JSON",
"file",
"in",
"to",
"data"
] | [
"func",
"readJSON",
"(",
"bucket",
"storageBucket",
",",
"key",
"string",
",",
"data",
"<mask>",
"{",
"}",
")",
"error",
"{",
"rawData",
",",
"err",
":=",
"bucket",
".",
"readObject",
"(",
"key",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"f... |
1,097 | all-1098 | [
"UnmarshalJSON",
"implements",
"the",
"json",
".",
"Unmarshaler",
"interface",
"."
] | [
"func",
"(",
"tg",
"*",
"Group",
")",
"UnmarshalJSON",
"(",
"b",
"[",
"]",
"byte",
")",
"error",
"{",
"g",
":=",
"struct",
"{",
"Targets",
"[",
"]",
"string",
"`json:\"targets\"`",
"\n",
"Labels",
"model",
".",
"LabelSet",
"`json:\"labels\"`",
"\n",
"}",... |
1,098 | all-1099 | [
"GetPixbuf",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_image_get_pixbuf",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Image",
")",
"GetPixbuf",
"(",
")",
"*",
"gdk",
".",
"Pixbuf",
"{",
"c",
":=",
"C",
".",
"gtk_image_get_pixbuf",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n\... |
1,099 | all-1100 | [
"HasVizType",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"Widget",
")",
"HasVizType",
"(",
")",
"bool",
"{",
"if",
"w",
"!=",
"nil",
"&&",
"w",
".",
"VizType",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.