id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
20,100 | all-20101 | [
"Infof",
"formats",
"message",
"according",
"to",
"format",
"specifier",
"prepends",
"the",
"prefix",
"as",
"necessary",
"and",
"writes",
"to",
"log",
"with",
"LevelInfo",
".",
"This",
"is",
"part",
"of",
"the",
"Logger",
"interface",
"implementation",
"."
] | [
"func",
"(",
"l",
"*",
"slog",
")",
"Infof",
"(",
"format",
"string",
",",
"args",
"...",
"interface",
"{",
"}",
")",
"{",
"lvl",
":=",
"l",
".",
"Level",
"(",
")",
"\n",
"if",
"lvl",
"<=",
"LevelInfo",
"{",
"l",
".",
"b",
".",
"printf",
"(",
... |
20,101 | all-20102 | [
"Seek",
"brings",
"us",
"to",
"element",
"with",
"key",
">",
"=",
"given",
"key",
"."
] | [
"func",
"(",
"s",
"*",
"MergeIterator",
")",
"Seek",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"{",
"for",
"_",
",",
"itr",
":=",
"range",
"s",
".",
"all",
"{",
"itr",
".",
"Seek",
"(",
"key",
")",
"\n",
"}",
"\n",
"s",
".",
"initHeap",
"(",
")",... |
20,102 | all-20103 | [
"InitWatcher",
"initialzes",
"a",
"watcher",
"to",
"watch",
"templates",
"changes",
"in",
"the",
"pattern",
".",
"f",
"would",
"be",
"InitHtmlTemplates",
"or",
"InitTextTemplates",
".",
"If",
"the",
"watcher",
"raises",
"an",
"error",
"internally",
"the",
"callb... | [
"func",
"InitWatcher",
"(",
"pattern",
"string",
",",
"f",
"func",
"(",
"string",
")",
"error",
",",
"ef",
"func",
"(",
"error",
")",
")",
"(",
"err",
"error",
")",
"{",
"if",
"err",
"=",
"f",
"(",
"pattern",
")",
";",
"err",
"!=",
"nil",
"{",
... |
20,103 | all-20104 | [
"NewSyncer",
"creates",
"a",
"Syncer",
"."
] | [
"func",
"NewSyncer",
"(",
"c",
"*",
"clientv3",
".",
"Client",
",",
"prefix",
"string",
",",
"rev",
"int64",
")",
"Syncer",
"{",
"return",
"&",
"syncer",
"{",
"c",
":",
"c",
",",
"<mask>",
":",
"prefix",
",",
"rev",
":",
"rev",
"}",
"\n",
"}"
] |
20,104 | all-20105 | [
"RestrictFilter",
"restricts",
"the",
"filter",
"to",
"only",
"work",
"on",
"a",
"certain",
"field"
] | [
"func",
"RestrictFilter",
"(",
"fieldName",
"string",
",",
"<mask>",
"Filter",
")",
"Filter",
"{",
"return",
"FilterFunc",
"(",
"func",
"(",
"k",
"string",
",",
"v",
"interface",
"{",
"}",
")",
"interface",
"{",
"}",
"{",
"if",
"fieldName",
"==",
"k",
... |
20,105 | all-20106 | [
"SetTooltipMarkup",
"is",
"a",
"wrapper",
"around",
"gtk_status_icon_set_tooltip_markup",
"()"
] | [
"func",
"(",
"v",
"*",
"StatusIcon",
")",
"SetTooltipMarkup",
"(",
"markup",
"string",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"markup",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n",
"... |
20,106 | all-20107 | [
"Delete",
"deletes",
"the",
"key",
"at",
"path",
"If",
"the",
"path",
"does",
"not",
"exist",
"Delete",
"returns",
"nil",
"(",
"no",
"error",
")",
"."
] | [
"func",
"(",
"b",
"*",
"Bucket",
")",
"Delete",
"(",
"path",
"string",
")",
"error",
"{",
"if",
"err",
":=",
"b",
".",
"delete",
"(",
"path",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"// try to delete md5 file",
"if",
"b... |
20,107 | all-20108 | [
"findDuplicate",
"returns",
"an",
"arbitrary",
"basic",
"block",
"that",
"appeared",
"more",
"than",
"once",
"in",
"blocks",
"or",
"nil",
"if",
"all",
"were",
"unique",
"."
] | [
"func",
"findDuplicate",
"(",
"blocks",
"[",
"]",
"*",
"BasicBlock",
")",
"*",
"BasicBlock",
"{",
"if",
"len",
"(",
"blocks",
")",
"<",
"2",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"if",
"blocks",
"[",
"0",
"]",
"==",
"blocks",
"[",
"1",
"]",
"{",... |
20,108 | all-20109 | [
"FindByXPath",
"finds",
"exactly",
"one",
"element",
"by",
"XPath",
"selector",
"."
] | [
"func",
"(",
"s",
"*",
"selectable",
")",
"FindByXPath",
"(",
"selector",
"string",
")",
"*",
"Selection",
"{",
"return",
"newSelection",
"(",
"s",
".",
"session",
",",
"s",
".",
"selectors",
".",
"Append",
"(",
"<mask>",
".",
"XPath",
",",
"selector",
... |
20,109 | all-20110 | [
"IsClosed",
"()",
"is",
"a",
"wrapper",
"around",
"gdk_display_is_closed",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Display",
")",
"IsClosed",
"(",
")",
"bool",
"{",
"c",
":=",
"C",
".",
"gdk_display_is_closed",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"<mask>",
"gobool",
"(",
"c",
")",
"\n",
"}"
] |
20,110 | all-20111 | [
"NewScpStatementPledges",
"creates",
"a",
"new",
"ScpStatementPledges",
"."
] | [
"func",
"NewScpStatementPledges",
"(",
"aType",
"ScpStatementType",
",",
"value",
"interface",
"{",
"}",
")",
"(",
"result",
"ScpStatementPledges",
",",
"err",
"error",
")",
"{",
"result",
".",
"Type",
"=",
"aType",
"\n",
"switch",
"ScpStatementType",
"(",
"aT... |
20,111 | all-20112 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"EventStyleSheetChanged",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss52",
"(",
"&",
"w",
",",
"v",
... |
20,112 | all-20113 | [
"Handle",
"executes",
"the",
"trigger",
"action",
"if",
"the",
"condition",
"is",
"satisfied"
] | [
"func",
"(",
"t",
"Trigger",
")",
"Handle",
"(",
"b",
"*",
"Bot",
",",
"m",
"*",
"Message",
")",
"bool",
"{",
"return",
"t",
".",
"Condition",
"(",
"b",
",",
"m",
")",
"&&",
"t",
".",
"<mask>",
"(",
"b",
",",
"m",
")",
"\n",
"}"
] |
20,113 | all-20114 | [
"Validate",
"validates",
"that",
"the",
"given",
"spec",
"is",
"supported",
"by",
"thrift",
"-",
"gen",
"."
] | [
"func",
"Validate",
"(",
"svc",
"*",
"parser",
".",
"Service",
")",
"error",
"{",
"for",
"_",
",",
"m",
":=",
"<mask>",
"svc",
".",
"Methods",
"{",
"if",
"err",
":=",
"validateMethod",
"(",
"svc",
",",
"m",
")",
";",
"err",
"!=",
"nil",
"{",
"ret... |
20,114 | all-20115 | [
"create",
"query",
"objects"
] | [
"func",
"CreateQueries",
"(",
"<mask>",
"uint32",
",",
"n",
"int32",
",",
"ids",
"*",
"uint32",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpCreateQueries",
",",
"3",
",",
"uintptr",
"(",
"target",
")",
",",
"uintptr",
"(",
"n",
")",
",",
"uintptr",
... |
20,115 | all-20116 | [
"Do",
"executes",
"Debugger",
".",
"setReturnValue",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"SetReturnValueParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetReturnValue",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
20,116 | all-20117 | [
"Handle",
"is",
"a",
"HTTP",
"handler",
"for",
"CORS",
"-",
"able",
"API",
"."
] | [
"func",
"(",
"s",
"*",
"CORSMiddleware",
")",
"Handle",
"(",
"next",
"http",
".",
"Handler",
")",
"http",
".",
"Handler",
"{",
"fn",
":=",
"func",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
")",
"{",
"origin",
"... |
20,117 | all-20118 | [
"GetOffsetValue",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_level_bar_get_offset_value",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"LevelBar",
")",
"GetOffsetValue",
"(",
"name",
"string",
")",
"(",
"float64",
",",
"bool",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"name",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"(",
... |
20,118 | all-20119 | [
"Locator",
"returns",
"a",
"locator",
"for",
"the",
"given",
"resource"
] | [
"func",
"(",
"r",
"*",
"ServerArray",
")",
"Locator",
"(",
"api",
"*",
"API",
")",
"*",
"ServerArrayLocator",
"{",
"for",
"_",
",",
"l",
":=",
"<mask>",
"r",
".",
"Links",
"{",
"if",
"l",
"[",
"\"",
"\"",
"]",
"==",
"\"",
"\"",
"{",
"return",
"... |
20,119 | all-20120 | [
"LineReader",
"returns",
"a",
"channel",
"that",
"reads",
"the",
"contents",
"of",
"a",
"reader",
"line",
"-",
"by",
"-",
"line",
"."
] | [
"func",
"LineReader",
"(",
"r",
"<mask>",
".",
"Reader",
")",
"(",
"<-",
"chan",
"string",
",",
"error",
")",
"{",
"return",
"lineReader",
"(",
"func",
"(",
")",
"(",
"io",
".",
"Reader",
",",
"func",
"(",
")",
",",
"error",
")",
"{",
"return",
"... |
20,120 | all-20121 | [
"Close",
"implements",
"the",
"Query",
"interface",
"."
] | [
"func",
"(",
"q",
"*",
"<mask>",
")",
"Close",
"(",
")",
"{",
"for",
"_",
",",
"s",
":=",
"range",
"q",
".",
"matrix",
"{",
"putPointSlice",
"(",
"s",
".",
"Points",
")",
"\n",
"}",
"\n",
"}"
] |
20,121 | all-20122 | [
"CurrentOAuth",
"returns",
"the",
"user",
"associated",
"with",
"the",
"OAuth",
"consumer",
"making",
"this",
"request",
".",
"If",
"the",
"OAuth",
"consumer",
"did",
"not",
"make",
"a",
"valid",
"OAuth",
"request",
"or",
"the",
"scopes",
"is",
"non",
"-",
... | [
"func",
"CurrentOAuth",
"(",
"c",
"context",
".",
"Context",
",",
"scopes",
"...",
"string",
")",
"(",
"*",
"User",
",",
"error",
")",
"{",
"req",
":=",
"&",
"pb",
".",
"GetOAuthUserRequest",
"{",
"}",
"\n",
"if",
"len",
"(",
"scopes",
")",
"!=",
"... |
20,122 | all-20123 | [
"AllPostsubmits",
"returns",
"all",
"prow",
"postsubmit",
"jobs",
"in",
"repos",
".",
"if",
"repos",
"is",
"empty",
"return",
"all",
"postsubmits",
"."
] | [
"func",
"(",
"c",
"*",
"JobConfig",
")",
"AllPostsubmits",
"(",
"repos",
"[",
"]",
"string",
")",
"[",
"]",
"Postsubmit",
"{",
"var",
"res",
"[",
"]",
"Postsubmit",
"\n\n",
"for",
"repo",
",",
"v",
":=",
"range",
"c",
".",
"Postsubmits",
"{",
"if",
... |
20,123 | all-20124 | [
"read",
"unsigned",
"32",
"-",
"bit",
"integer"
] | [
"func",
"readuint32",
"(",
"pos",
"uint32",
")",
"uint32",
"{",
"pos2",
":=",
"int64",
"(",
"pos",
")",
"\n",
"var",
"retval",
"uint32",
"\n",
"data",
":=",
"make",
"(",
"[",
"]",
"byte",
",",
"4",
")",
"\n",
"_",
",",
"err",
":=",
"f",
".",
"R... |
20,124 | all-20125 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SetVariableValueParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger3",
"(",
"&",
"w",
",",
"v",
... |
20,125 | all-20126 | [
"Set",
"is",
"required",
"for",
"kingpin",
"interfaces",
"to",
"allow",
"command",
"line",
"params",
"to",
"be",
"set",
"to",
"our",
"map",
"datatype"
] | [
"func",
"(",
"o",
"*",
"ListInt64Option",
")",
"Set",
"(",
"value",
"string",
")",
"error",
"{",
"val",
":=",
"Int64Option",
"{",
"}",
"\n",
"val",
".",
"Set",
"(",
"<mask>",
")",
"\n",
"*",
"o",
"=",
"append",
"(",
"*",
"o",
",",
"val",
")",
"... |
20,126 | all-20127 | [
"DeepCopy",
"is",
"an",
"autogenerated",
"deepcopy",
"function",
"copying",
"the",
"receiver",
"creating",
"a",
"new",
"Labels",
"."
] | [
"func",
"(",
"in",
"Labels",
")",
"DeepCopy",
"(",
")",
"Labels",
"{",
"if",
"in",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"<mask>",
":=",
"new",
"(",
"Labels",
")",
"\n",
"in",
".",
"DeepCopyInto",
"(",
"out",
")",
"\n",
"return",
"*... |
20,127 | all-20128 | [
"NewOutgoingVenue",
"creates",
"a",
"new",
"outgoing",
"location",
"."
] | [
"func",
"(",
"api",
"*",
"TelegramBotAPI",
")",
"NewOutgoingVenue",
"(",
"recipient",
"Recipient",
",",
"latitude",
",",
"longitude",
"float32",
",",
"title",
",",
"address",
"string",
")",
"*",
"OutgoingVenue",
"{",
"return",
"&",
"OutgoingVenue",
"{",
"outgo... |
20,128 | all-20129 | [
"GoChild",
"is",
"like",
"Go",
"but",
"it",
"registers",
"the",
"returned",
"Process",
"as",
"a",
"child",
"of",
"parent",
"**",
"before",
"**",
"spawning",
"the",
"goroutine",
"which",
"ensures",
"proper",
"synchronization",
"with",
"parent",
".",
"It",
"is... | [
"func",
"GoChild",
"(",
"parent",
"Process",
",",
"f",
"ProcessFunc",
")",
"Process",
"{",
"p",
":=",
"WithParent",
"(",
"<mask>",
")",
"\n",
"p",
".",
"Go",
"(",
"f",
")",
"\n",
"return",
"p",
"\n",
"}"
] |
20,129 | all-20130 | [
"getIndex",
"returns",
"a",
"pointer",
"to",
"the",
"index",
"references",
"by",
"this",
"ociReference",
".",
"If",
"an",
"error",
"occurs",
"opening",
"an",
"index",
"nil",
"is",
"returned",
"together",
"with",
"an",
"error",
"."
] | [
"func",
"(",
"ref",
"ociReference",
")",
"getIndex",
"(",
")",
"(",
"*",
"imgspecv1",
".",
"Index",
",",
"error",
")",
"{",
"indexJSON",
",",
"err",
":=",
"os",
".",
"Open",
"(",
"ref",
".",
"indexPath",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"n... |
20,130 | all-20131 | [
"PreviousIP",
"returns",
"the",
"previous",
"sequential",
"ip",
"."
] | [
"func",
"PreviousIP",
"(",
"ip",
"net",
".",
"IP",
")",
"<mask>",
".",
"IP",
"{",
"return",
"NewNetworkNumber",
"(",
"ip",
")",
".",
"Previous",
"(",
")",
".",
"ToIP",
"(",
")",
"\n",
"}"
] |
20,131 | all-20132 | [
"HasStatus",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"c",
"*",
"Check",
")",
"HasStatus",
"(",
")",
"bool",
"{",
"if",
"c",
"!=",
"nil",
"&&",
"c",
".",
"Status",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
20,132 | all-20133 | [
"example",
"input",
"M",
"/",
"/",
"testpool",
"/",
"bar",
"/",
"+",
"F",
"/",
"testpool",
"/",
"bar",
"/",
"hello",
".",
"txt",
"M",
"/",
"/",
"testpool",
"/",
"bar",
"/",
"hello",
".",
"txt",
"(",
"+",
"1",
")",
"M",
"/",
"/",
"testpool",
"... | [
"func",
"parseInodeChanges",
"(",
"lines",
"[",
"]",
"[",
"]",
"string",
")",
"(",
"[",
"]",
"*",
"InodeChange",
",",
"error",
")",
"{",
"changes",
":=",
"<mask>",
"(",
"[",
"]",
"*",
"InodeChange",
",",
"len",
"(",
"lines",
")",
")",
"\n\n",
"for"... |
20,133 | all-20134 | [
"Status",
"reports",
"the",
"following",
"statistics",
"of",
"the",
"cedar",
":",
"keys",
":",
"number",
"of",
"keys",
"that",
"are",
"in",
"the",
"cedar",
"nodes",
":",
"number",
"of",
"trie",
"nodes",
"(",
"slots",
"in",
"the",
"base",
"array",
")",
... | [
"func",
"(",
"da",
"*",
"Cedar",
")",
"Status",
"(",
")",
"(",
"keys",
",",
"nodes",
",",
"size",
",",
"capacity",
"int",
")",
"{",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"da",
".",
"Size",
";",
"i",
"++",
"{",
"n",
":=",
"da",
".",
"<mask>"... |
20,134 | all-20135 | [
"UnmarshalText",
"implements",
"the",
"TextUnmarshaler",
"interface",
"."
] | [
"func",
"(",
"l",
"*",
"List",
")",
"UnmarshalText",
"(",
"text",
"[",
"]",
"byte",
")",
"error",
"{",
"m",
":=",
"parse",
".",
"Bytes",
"(",
"text",
")",
"\n",
"defer",
"m",
".",
"Release",
"(",
")",
"\n",
"capacity",
":=",
"len",
"(",
"m",
".... |
20,135 | all-20136 | [
"stringMarkdownDash",
"-",
"output",
"dash",
"in",
"middle",
"of",
"table",
"."
] | [
"func",
"(",
"t",
"*",
"Table",
")",
"stringMarkdownDash",
"(",
")",
"string",
"{",
"r",
":=",
"make",
"(",
"map",
"[",
"string",
"]",
"string",
")",
"\n",
"for",
"_",
",",
"name",
":=",
"range",
"t",
".",
"Fields",
"{",
"r",
"[",
"name",
"]",
... |
20,136 | all-20137 | [
"MoveBy",
"moves",
"the",
"sprite",
"by",
"(",
"x",
"y",
")",
"."
] | [
"func",
"(",
"s",
"*",
"Sprite",
")",
"MoveBy",
"(",
"x",
",",
"y",
"int",
")",
"{",
"w",
",",
"h",
":=",
"s",
".",
"<mask>",
".",
"Size",
"(",
")",
"\n\n",
"s",
".",
"x",
"+=",
"x",
"\n",
"s",
".",
"y",
"+=",
"y",
"\n",
"if",
"s",
".",... |
20,137 | all-20138 | [
"Do",
"executes",
"Emulation",
".",
"setEmitTouchEventsForMouse",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"SetEmitTouchEventsForMouseParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetEmitTouchEventsForMouse",
",",
"p",
",",
"nil",
")"... |
20,138 | all-20139 | [
"***************************************************************************",
"\\",
"Basic",
"GUI",
"functions",
"*",
"\\",
"****************************************************************************",
"/",
"*",
"this",
"function",
"is",
"used",
"to",
"set",
"some",
"external",
... | [
"func",
"initSystem",
"(",
"args",
"[",
"]",
"string",
")",
"int",
"{",
"argc",
":=",
"C",
".",
"int",
"(",
"len",
"(",
"args",
")",
")",
"\n",
"argv",
":=",
"make",
"(",
"[",
"]",
"*",
"C",
".",
"<mask>",
",",
"len",
"(",
"args",
")",
")",
... |
20,139 | all-20140 | [
"Aliases",
"returns",
"a",
"list",
"of",
"domain",
"aliases"
] | [
"func",
"(",
"dom",
"Domain",
")",
"Aliases",
"(",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"var",
"vl",
"valueList",
"\n",
"err",
":=",
"dom",
".",
"cgp",
".",
"request",
"(",
"getDomainAliases",
"{",
"Domain",
":",
"dom",
".",
"<mask... |
20,140 | all-20141 | [
"SetBranch",
"sets",
"a",
"commit",
"and",
"its",
"ancestors",
"as",
"a",
"branch",
".",
"SetBranch",
"is",
"deprecated",
"in",
"favor",
"of",
"CommitBranch",
"."
] | [
"func",
"(",
"c",
"APIClient",
")",
"SetBranch",
"(",
"repoName",
"string",
",",
"commit",
"string",
",",
"branch",
"string",
")",
"error",
"{",
"return",
"c",
".",
"CreateBranch",
"(",
"repoName",
",",
"branch",
",",
"<mask>",
",",
"nil",
")",
"\n",
"... |
20,141 | all-20142 | [
"authorizePipelineOp",
"checks",
"if",
"the",
"user",
"indicated",
"by",
"ctx",
"is",
"authorized",
"to",
"perform",
"operation",
"on",
"the",
"pipeline",
"in",
"info"
] | [
"func",
"(",
"a",
"*",
"apiServer",
")",
"authorizePipelineOp",
"(",
"pachClient",
"*",
"client",
".",
"APIClient",
",",
"operation",
"pipelineOperation",
",",
"input",
"*",
"pps",
".",
"Input",
",",
"output",
"string",
")",
"error",
"{",
"ctx",
":=",
"pac... |
20,142 | all-20143 | [
"Index",
"retrieves",
"the",
"current",
"index",
"of",
"the",
"store",
"."
] | [
"func",
"(",
"s",
"*",
"<mask>",
")",
"Index",
"(",
")",
"uint64",
"{",
"s",
".",
"worldLock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"s",
".",
"worldLock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"s",
".",
"CurrentIndex",
"\n",
"}"
] |
20,143 | all-20144 | [
"newWatchHub",
"creates",
"a",
"watcherHub",
".",
"The",
"capacity",
"determines",
"how",
"many",
"events",
"we",
"will",
"keep",
"in",
"the",
"eventHistory",
".",
"Typically",
"we",
"only",
"need",
"to",
"keep",
"a",
"small",
"size",
"of",
"history",
"[",
... | [
"func",
"newWatchHub",
"(",
"capacity",
"int",
")",
"*",
"watcherHub",
"{",
"return",
"&",
"watcherHub",
"{",
"watchers",
":",
"make",
"(",
"map",
"[",
"string",
"]",
"*",
"list",
".",
"List",
")",
",",
"EventHistory",
":",
"newEventHistory",
"(",
"<mask... |
20,144 | all-20145 | [
"Infof",
"logging"
] | [
"func",
"(",
"l",
"*",
"StdLevelLogger",
")",
"Infof",
"(",
"msg",
"string",
",",
"args",
"...",
"interface",
"{",
"}",
")",
"{",
"l",
".",
"logfFunc",
"(",
"InfoLevel",
",",
"l",
".",
"context",
",",
"<mask>",
",",
"args",
"...",
")",
"\n",
"}"
] |
20,145 | all-20146 | [
"FileChooserButtonNew",
"is",
"a",
"wrapper",
"around",
"gtk_file_chooser_button_new",
"()",
"."
] | [
"func",
"FileChooserButtonNew",
"(",
"title",
"string",
",",
"<mask>",
"FileChooserAction",
")",
"(",
"*",
"FileChooserButton",
",",
"error",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"title",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
... |
20,146 | all-20147 | [
"Receive",
"accepts",
"a",
"Dependency",
"and",
"data",
"for",
"that",
"dep",
".",
"This",
"data",
"is",
"cached",
"on",
"the",
"Runner",
".",
"This",
"data",
"is",
"then",
"used",
"to",
"determine",
"if",
"a",
"Template",
"is",
"renderable",
"(",
"i",
... | [
"func",
"(",
"r",
"*",
"Runner",
")",
"Receive",
"(",
"d",
"dep",
".",
"Dependency",
",",
"data",
"interface",
"{",
"}",
")",
"{",
"r",
".",
"dependenciesLock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"r",
".",
"dependenciesLock",
".",
"Unlock",
"(",
... |
20,147 | all-20148 | [
"DeleteSeries",
"implements",
"pb",
".",
"AdminServer",
"."
] | [
"func",
"(",
"s",
"*",
"AdminDisabled",
")",
"DeleteSeries",
"(",
"_",
"context",
".",
"Context",
",",
"r",
"*",
"pb",
".",
"SeriesDeleteRequest",
")",
"(",
"*",
"<mask>",
".",
"SeriesDeleteResponse",
",",
"error",
")",
"{",
"return",
"nil",
",",
"errAdm... |
20,148 | all-20149 | [
"RemoveKeyUsingFile",
"removes",
"an",
"existing",
"key",
"from",
"keyring",
"given",
"a",
"file"
] | [
"func",
"(",
"k",
"*",
"Keyring",
")",
"RemoveKeyUsingFile",
"(",
"pubkey",
"string",
")",
"error",
"{",
"p",
",",
"err",
":=",
"ioutil",
".",
"ReadFile",
"(",
"pubkey",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n\n",
... |
20,149 | all-20150 | [
"newSequentialKV",
"allocates",
"a",
"new",
"sequential",
"key",
"<prefix",
">",
"/",
"nnnnn",
"with",
"a",
"given",
"prefix",
"and",
"value",
".",
"Note",
":",
"a",
"bookkeeping",
"node",
"__<prefix",
">",
"is",
"also",
"allocated",
"."
] | [
"func",
"newSequentialKV",
"(",
"kv",
"v3",
".",
"KV",
",",
"prefix",
",",
"val",
"string",
")",
"(",
"*",
"RemoteKV",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"kv",
".",
"Get",
"(",
"context",
".",
"TODO",
"(",
")",
",",
"prefix",
",",
... |
20,150 | all-20151 | [
"SetHost",
"sets",
"Host",
"header",
"value",
"."
] | [
"func",
"(",
"h",
"*",
"RequestHeader",
")",
"SetHost",
"(",
"<mask>",
"string",
")",
"{",
"h",
".",
"parseRawHeaders",
"(",
")",
"\n",
"h",
".",
"host",
"=",
"append",
"(",
"h",
".",
"host",
"[",
":",
"0",
"]",
",",
"host",
"...",
")",
"\n",
"... |
20,151 | all-20152 | [
"ShouldRun",
"returns",
"true",
"if",
"the",
"input",
"branch",
"matches",
"given",
"the",
"whitelist",
"/",
"blacklist",
"."
] | [
"func",
"(",
"br",
"Brancher",
")",
"ShouldRun",
"(",
"branch",
"string",
")",
"bool",
"{",
"if",
"br",
".",
"RunsAgainstAllBranch",
"(",
")",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"// Favor SkipBranches over Branches",
"if",
"len",
"(",
"br",
".",
"Sk... |
20,152 | all-20153 | [
"specify",
"storage",
"for",
"a",
"two",
"-",
"dimensional",
"multisample",
"texture"
] | [
"func",
"TextureStorage2DMultisample",
"(",
"texture",
"uint32",
",",
"samples",
"int32",
",",
"internalformat",
"uint32",
",",
"width",
"int32",
",",
"<mask>",
"int32",
",",
"fixedsamplelocations",
"bool",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpTextureStor... |
20,153 | all-20154 | [
"title",
":",
"remove",
"pool",
"path",
":",
"/",
"pools",
"/",
"{",
"name",
"}",
"method",
":",
"DELETE",
"responses",
":",
"200",
":",
"Pool",
"removed",
"401",
":",
"Unauthorized",
"403",
":",
"Pool",
"still",
"has",
"apps",
"404",
":",
"Pool",
"n... | [
"func",
"removePoolHandler",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"(",
"err",
"error",
")",
"{",
"allowed",
":=",
"permission",
".",
"Check",
"(",
"t",
",",
"permission",
... |
20,154 | all-20155 | [
"UpdateRepo",
"returns",
"an",
"object",
"describing",
"a",
"repository",
"at",
"the",
"most",
"recent",
"commit",
"or",
"version",
"tag",
".",
"This",
"function",
"uses",
"RemoteCache",
"to",
"retrieve",
"information",
"about",
"the",
"repository",
".",
"Depend... | [
"func",
"UpdateRepo",
"(",
"rc",
"*",
"RemoteCache",
",",
"importPath",
"string",
")",
"(",
"Repo",
",",
"error",
")",
"{",
"root",
",",
"name",
",",
"err",
":=",
"rc",
".",
"Root",
"(",
"importPath",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"retu... |
20,155 | all-20156 | [
"StoragePoolNodeVolumeGetTypeID",
"get",
"the",
"ID",
"of",
"a",
"storage",
"volume",
"on",
"a",
"given",
"storage",
"pool",
"of",
"a",
"given",
"storage",
"volume",
"type",
"on",
"the",
"current",
"node",
"."
] | [
"func",
"(",
"c",
"*",
"Cluster",
")",
"StoragePoolNodeVolumeGetTypeID",
"(",
"volumeName",
"<mask>",
",",
"volumeType",
"int",
",",
"poolID",
"int64",
")",
"(",
"int64",
",",
"error",
")",
"{",
"return",
"c",
".",
"StoragePoolVolumeGetTypeID",
"(",
"\"",
"\... |
20,156 | all-20157 | [
"topJobsFailed",
"returns",
"the",
"top",
"count",
"job",
"names",
"sorted",
"by",
"number",
"of",
"failing",
"builds",
"."
] | [
"func",
"(",
"c",
"*",
"Cluster",
")",
"topJobsFailed",
"(",
"count",
"int",
")",
"[",
"]",
"*",
"Job",
"{",
"slice",
":=",
"make",
"(",
"[",
"]",
"*",
"Job",
",",
"len",
"(",
"c",
".",
"jobs",
")",
")",
"\n",
"i",
":=",
"0",
"\n",
"for",
"... |
20,157 | all-20158 | [
"TODO",
"(",
"jrick",
")",
"GdkRectangle",
"/",
"*",
"func",
"(",
"v",
"*",
"Entry",
")",
"GetIconArea",
"()",
"{",
"}",
"SetInputPurpose",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_entry_set_input_purpose",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"SetInputPurpose",
"(",
"purpose",
"InputPurpose",
")",
"{",
"C",
".",
"gtk_entry_set_input_purpose",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"GtkInputPurpose",
"(",
"purpose",
")",
")",
"\n",
"}"
] |
20,158 | all-20159 | [
"NewListener",
"creates",
"a",
"Listener",
"which",
"accepts",
"connections",
"from",
"an",
"inner",
"Listener",
"and",
"wraps",
"each",
"connection",
"with",
"Server",
".",
"The",
"configuration",
"config",
"must",
"be",
"non",
"-",
"nil",
"and",
"must",
"hav... | [
"func",
"newTLSKeepaliveListener",
"(",
"inner",
"net",
".",
"Listener",
",",
"config",
"*",
"tls",
".",
"Config",
")",
"<mask>",
".",
"Listener",
"{",
"l",
":=",
"&",
"tlsKeepaliveListener",
"{",
"}",
"\n",
"l",
".",
"Listener",
"=",
"inner",
"\n",
"l",... |
20,159 | all-20160 | [
"Write",
"serializes",
"the",
"frame",
"to",
"the",
"given",
"buffered",
"output",
"satisfies",
"the",
"Frame",
"interface",
"."
] | [
"func",
"(",
"m",
"Message",
")",
"Write",
"(",
"w",
"*",
"bufio",
".",
"Writer",
")",
"(",
"err",
"error",
")",
"{",
"if",
"err",
"=",
"writeFrameHeader",
"(",
"w",
",",
"FrameTypeMessage",
",",
"len",
"(",
"m",
".",
"Body",
")",
"+",
"26",
")",... |
20,160 | all-20161 | [
"SetUintBytes",
"sets",
"uint",
"value",
"for",
"the",
"given",
"key",
"."
] | [
"func",
"(",
"a",
"*",
"Args",
")",
"SetUintBytes",
"(",
"key",
"[",
"]",
"byte",
",",
"<mask>",
"int",
")",
"{",
"a",
".",
"SetUint",
"(",
"b2s",
"(",
"key",
")",
",",
"value",
")",
"\n",
"}"
] |
20,161 | all-20162 | [
"define",
"the",
"scissor",
"box"
] | [
"func",
"Scissor",
"(",
"x",
"int32",
",",
"y",
"int32",
",",
"width",
"int32",
",",
"<mask>",
"int32",
")",
"{",
"C",
".",
"glowScissor",
"(",
"gpScissor",
",",
"(",
"C",
".",
"GLint",
")",
"(",
"x",
")",
",",
"(",
"C",
".",
"GLint",
")",
"(",... |
20,162 | all-20163 | [
"<closure",
"-",
"type",
"-",
"name",
">",
"::",
"=",
"Ul",
"<lambda",
"-",
"sig",
">",
"E",
"[",
"<nonnegative",
"number",
">",
"]",
"_"
] | [
"func",
"(",
"st",
"*",
"state",
")",
"closureTypeName",
"(",
")",
"AST",
"{",
"st",
".",
"checkChar",
"(",
"'U'",
")",
"\n",
"st",
".",
"checkChar",
"(",
"'l'",
")",
"\n",
"<mask>",
":=",
"st",
".",
"parmlist",
"(",
")",
"\n",
"if",
"len",
"(",
... |
20,163 | all-20164 | [
"Things",
"we",
"do",
"have",
"to",
"care",
"about"
] | [
"func",
"(",
"s",
"*",
"storageZfs",
")",
"ContainerStorageReady",
"(",
"container",
"container",
")",
"bool",
"{",
"volumeName",
":=",
"projectPrefix",
"(",
"container",
".",
"Project",
"(",
")",
",",
"container",
".",
"<mask>",
"(",
")",
")",
"\n",
"fs",... |
20,164 | all-20165 | [
"Location",
"related",
"functions",
"and",
"methods",
"Create",
"a",
"Location"
] | [
"func",
"NewLocation",
"(",
"host",
"uuid",
".",
"UUID",
",",
"lp",
"Profile",
")",
"(",
"*",
"Location",
",",
"error",
")",
"{",
"l",
":=",
"new",
"(",
"Location",
")",
"\n",
"l",
".",
"UUID",
",",
"_",
"=",
"uuid",
".",
"V4",
"(",
")",
"\n",
... |
20,165 | all-20166 | [
"Accept",
"implements",
"the",
"corresponding",
"method",
"of",
"net",
".",
"Listener",
"for",
"TestListener"
] | [
"func",
"(",
"l",
"*",
"TestListener",
")",
"Accept",
"(",
")",
"(",
"net",
".",
"Conn",
",",
"error",
")",
"{",
"<mask>",
":=",
"<-",
"l",
".",
"connCh",
"\n",
"if",
"conn",
"==",
"nil",
"{",
"return",
"nil",
",",
"errors",
".",
"New",
"(",
"\... |
20,166 | all-20167 | [
"getAuthConfigFromECR",
"calls",
"the",
"ECR",
"API",
"to",
"get",
"docker",
"auth",
"config"
] | [
"func",
"(",
"authProvider",
"*",
"ecrAuthProvider",
")",
"getAuthConfigFromECR",
"(",
"image",
"string",
",",
"key",
"cacheKey",
",",
"authData",
"*",
"apicontainer",
".",
"ECRAuthData",
")",
"(",
"types",
".",
"AuthConfig",
",",
"error",
")",
"{",
"// Create... |
20,167 | all-20168 | [
"Create",
"the",
"schema",
"table",
"."
] | [
"func",
"createSchemaTable",
"(",
"tx",
"*",
"sql",
".",
"Tx",
")",
"error",
"{",
"statement",
":=",
"`\nCREATE TABLE schema (\n id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,\n version INTEGER NOT NULL,\n updated_at DATETIME NOT NULL,\n UNIQUE (version)\n)\n`",
"\... |
20,168 | all-20169 | [
"heartbeat",
"loop",
"triggered",
"by",
"the",
"mainLoop"
] | [
"func",
"(",
"c",
"*",
"Consumer",
")",
"hbLoop",
"(",
"stopped",
"<-",
"chan",
"none",
")",
"{",
"ticker",
":=",
"time",
".",
"NewTicker",
"(",
"c",
".",
"client",
".",
"config",
".",
"Group",
".",
"Heartbeat",
".",
"Interval",
")",
"\n",
"defer",
... |
20,169 | all-20170 | [
"requiresASMSecret",
"returns",
"true",
"if",
"at",
"least",
"one",
"container",
"in",
"the",
"task",
"needs",
"to",
"retrieve",
"secret",
"from",
"AWS",
"Secrets",
"Manager"
] | [
"func",
"(",
"task",
"*",
"Task",
")",
"requiresASMSecret",
"(",
")",
"bool",
"{",
"for",
"_",
",",
"container",
":=",
"range",
"task",
".",
"Containers",
"{",
"if",
"container",
".",
"ShouldCreateWithASMSecret",
"(",
")",
"{",
"return",
"true",
"\n",
"}... |
20,170 | all-20171 | [
"SetSyncTimeout",
"sets",
"the",
"amount",
"of",
"time",
"an",
"operation",
"with",
"this",
"session",
"will",
"wait",
"before",
"returning",
"an",
"error",
"in",
"case",
"a",
"connection",
"to",
"a",
"usable",
"server",
"can",
"t",
"be",
"established",
".",... | [
"func",
"(",
"s",
"*",
"Session",
")",
"SetSyncTimeout",
"(",
"d",
"<mask>",
".",
"Duration",
")",
"{",
"s",
".",
"m",
".",
"Lock",
"(",
")",
"\n",
"s",
".",
"syncTimeout",
"=",
"d",
"\n",
"s",
".",
"m",
".",
"Unlock",
"(",
")",
"\n",
"}"
] |
20,171 | all-20172 | [
"parseSecurityRuleProtocol",
"parses",
"a",
"protocol",
"string",
"into",
"a",
"network",
".",
"SecurityRuleProtocol",
"and",
"returns",
"error",
"if",
"the",
"protocol",
"is",
"not",
"supported"
] | [
"func",
"parseSecurityRuleProtocol",
"(",
"proto",
"string",
")",
"(",
"network",
".",
"SecurityRuleProtocol",
",",
"error",
")",
"{",
"<mask>",
"strings",
".",
"ToLower",
"(",
"proto",
")",
"{",
"case",
"\"",
"\"",
":",
"return",
"network",
".",
"TCP",
",... |
20,172 | all-20173 | [
"Push",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_statusbar_push",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Statusbar",
")",
"Push",
"(",
"contextID",
"uint",
",",
"text",
"string",
")",
"uint",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"<mask>",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
... |
20,173 | all-20174 | [
"String",
"is",
"required",
"for",
"kingpin",
"to",
"generate",
"usage",
"with",
"this",
"datatype"
] | [
"func",
"(",
"o",
"BoolOption",
")",
"String",
"(",
")",
"string",
"{",
"if",
"StringifyValue",
"{",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"o",
".",
"Value",
")",
"\n",
"}",
"\n",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
... |
20,174 | all-20175 | [
"ExpandPath",
"returns",
"working",
"directory",
"path"
] | [
"func",
"ExpandPath",
"(",
"path",
"string",
")",
"string",
"{",
"switch",
"path",
"{",
"case",
"\"",
"\"",
":",
"wd",
",",
"err",
":=",
"os",
".",
"Getwd",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"logger",
".",
"Critical",
"(",
"\"",
"\""... |
20,175 | all-20176 | [
"HasTime",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"e",
"*",
"Event",
")",
"HasTime",
"(",
")",
"bool",
"{",
"if",
"e",
"!=",
"nil",
"&&",
"e",
".",
"Time",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
20,176 | all-20177 | [
"SuspendChannel",
"tries",
"to",
"suspend",
"a",
"given",
"channel",
"."
] | [
"func",
"(",
"p",
"*",
"Processor",
")",
"SuspendChannel",
"(",
"id",
",",
"jobCreator",
"string",
",",
"agent",
"bool",
")",
"(",
"string",
",",
"error",
")",
"{",
"var",
"jobType",
"string",
"\n",
"if",
"agent",
"{",
"jobType",
"=",
"data",
".",
"J... |
20,177 | all-20178 | [
"repeatingKeyPressed",
"return",
"true",
"when",
"key",
"is",
"pressed",
"considering",
"the",
"repeat",
"state",
"."
] | [
"func",
"repeatingKeyPressed",
"(",
"<mask>",
"ebiten",
".",
"Key",
")",
"bool",
"{",
"const",
"(",
"delay",
"=",
"30",
"\n",
"interval",
"=",
"3",
"\n",
")",
"\n",
"d",
":=",
"inpututil",
".",
"KeyPressDuration",
"(",
"key",
")",
"\n",
"if",
"d",
"=... |
20,178 | all-20179 | [
"Do",
"executes",
"CacheStorage",
".",
"requestEntries",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"cacheDataEntries",
"-",
"Array",
"of",
"object",
"store",
"data",
"entries",
".",
"returnCount",
"-",
"Count",
"of",
"returned",
"entries",
"f... | [
"func",
"(",
"p",
"*",
"RequestEntriesParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"cacheDataEntries",
"[",
"]",
"*",
"DataEntry",
",",
"returnCount",
"float64",
",",
"err",
"error",
")",
"{",
"// execute",
"<mask>",
"res",
"Request... |
20,179 | all-20180 | [
"Noticef",
"logs",
"provided",
"message",
"with",
"formatting",
"in",
"NOTICE",
"level",
"."
] | [
"func",
"(",
"logger",
"*",
"Logger",
")",
"Noticef",
"(",
"format",
"string",
",",
"a",
"...",
"interface",
"{",
"}",
")",
"{",
"logger",
".",
"<mask>",
"(",
"NOTICE",
",",
"format",
",",
"a",
"...",
")",
"\n",
"}"
] |
20,180 | all-20181 | [
"Walk",
"executes",
"a",
"callback",
"against",
"every",
"node",
"in",
"the",
"subtree",
"of",
"path",
"."
] | [
"func",
"Walk",
"(",
"rs",
"[",
"]",
"io",
".",
"ReadCloser",
",",
"walkPath",
"string",
",",
"f",
"func",
"(",
"path",
"string",
",",
"node",
"*",
"NodeProto",
")",
"error",
")",
"error",
"{",
"walkPath",
"=",
"clean",
"(",
"walkPath",
")",
"\n",
... |
20,181 | all-20182 | [
"GetLabelAlign",
"is",
"a",
"wrapper",
"around",
"gtk_frame_get_label_align",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Frame",
")",
"GetLabelAlign",
"(",
")",
"(",
"xAlign",
",",
"yAlign",
"float32",
")",
"{",
"<mask>",
"x",
",",
"y",
"C",
".",
"gfloat",
"\n",
"C",
".",
"gtk_frame_get_label_align",
"(",
"v",
".",
"native",
"(",
")",
",",
"&"... |
20,182 | all-20183 | [
"watchGC",
"watches",
"for",
"GC",
"runs",
"and",
"invalidate",
"all",
"cache",
"when",
"GC",
"happens",
"."
] | [
"func",
"(",
"s",
"*",
"objBlockAPIServer",
")",
"watchGC",
"(",
"etcdAddress",
"string",
")",
"{",
"b",
":=",
"backoff",
".",
"NewInfiniteBackOff",
"(",
")",
"\n",
"backoff",
".",
"RetryNotify",
"(",
"func",
"(",
")",
"error",
"{",
"etcdClient",
",",
"e... |
20,183 | all-20184 | [
"PolicyConfigurationNamespaces",
"returns",
"a",
"list",
"of",
"other",
"policy",
"configuration",
"namespaces",
"to",
"search",
"for",
"if",
"explicit",
"configuration",
"for",
"PolicyConfigurationIdentity",
"()",
"is",
"not",
"set"
] | [
"func",
"(",
"<mask>",
"ociArchiveReference",
")",
"PolicyConfigurationNamespaces",
"(",
")",
"[",
"]",
"string",
"{",
"res",
":=",
"[",
"]",
"string",
"{",
"}",
"\n",
"path",
":=",
"ref",
".",
"resolvedFile",
"\n",
"for",
"{",
"lastSlash",
":=",
"strings"... |
20,184 | all-20185 | [
"Read",
"downloads",
"the",
"specified",
"Release",
"to",
"the",
"local",
"cache",
"dir",
"and",
"returns",
"a",
"reader",
"to",
"the",
"underyling",
"release",
"package",
"."
] | [
"func",
"(",
"r",
"*",
"Release",
")",
"Read",
"(",
"releaseLocation",
"string",
")",
"(",
"io",
".",
"ReadCloser",
",",
"error",
")",
"{",
"<mask>",
",",
"err",
":=",
"r",
".",
"Pull",
"(",
"releaseLocation",
")",
"\n",
"if",
"err",
"!=",
"nil",
"... |
20,185 | all-20186 | [
"NewClient",
"creates",
"a",
"new",
"bosh",
"client",
".",
"It",
"queries",
"bosh",
"s",
"/",
"info",
"endpoint",
"to",
"determine",
"if",
"user",
"authentication",
"should",
"be",
"done",
"via",
"UAA",
"or",
"basic",
"auth",
"."
] | [
"func",
"NewClient",
"(",
"user",
",",
"pass",
",",
"host",
"string",
",",
"port",
"int",
",",
"sslIgnore",
"bool",
")",
"(",
"*",
"Client",
",",
"error",
")",
"{",
"c",
":=",
"&",
"Client",
"{",
"user",
":",
"user",
",",
"pass",
":",
"pass",
","... |
20,186 | all-20187 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"ResetPageScaleFactorParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"<mask>",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation16",
"(... |
20,187 | all-20188 | [
"NewSharedInformerFactory",
"constructs",
"a",
"new",
"instance",
"of",
"sharedInformerFactory"
] | [
"func",
"NewSharedInformerFactory",
"(",
"<mask>",
"versioned",
".",
"Interface",
",",
"defaultResync",
"time",
".",
"Duration",
")",
"SharedInformerFactory",
"{",
"return",
"NewFilteredSharedInformerFactory",
"(",
"client",
",",
"defaultResync",
",",
"v1",
".",
"Name... |
20,188 | all-20189 | [
"NotifyStartupComplete",
"()",
"is",
"a",
"wrapper",
"around",
"gdk_display_notify_startup_complete",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Display",
")",
"NotifyStartupComplete",
"(",
"startupID",
"string",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"startupID",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"... |
20,189 | all-20190 | [
"detect",
"the",
"vmrun",
"and",
"vmware",
"-",
"vdiskmanager",
"cmds",
"path",
"if",
"needed"
] | [
"func",
"setVmwareCmd",
"(",
"cmd",
"string",
")",
"string",
"{",
"if",
"<mask>",
",",
"err",
":=",
"exec",
".",
"LookPath",
"(",
"cmd",
")",
";",
"err",
"==",
"nil",
"{",
"return",
"path",
"\n",
"}",
"\n",
"return",
"filepath",
".",
"Join",
"(",
"... |
20,190 | all-20191 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetDocumentParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"<mask>",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom47",
"(",
"&",
"r"... |
20,191 | all-20192 | [
"Broadcast",
"messages",
"received",
"from",
"one",
"group",
"member",
"to",
"others",
".",
"If",
"incoming",
"messages",
"not",
"arrived",
"during",
"timeout",
"then",
"function",
"returns",
"."
] | [
"func",
"(",
"g",
"*",
"Group",
")",
"Broadcast",
"(",
"timeout",
"time",
".",
"Duration",
")",
"{",
"var",
"timeoutChannel",
"<-",
"chan",
"time",
".",
"Time",
"\n",
"if",
"timeout",
"!=",
"0",
"{",
"timeoutChannel",
"=",
"time",
".",
"After",
"(",
... |
20,192 | all-20193 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"Metric",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformance1",
"(",
"&",
"w",
",",
"v",
")",
"\... |
20,193 | all-20194 | [
"NewTCPTransportWithLogger",
"returns",
"a",
"NetworkTransport",
"that",
"is",
"built",
"on",
"top",
"of",
"a",
"TCP",
"streaming",
"transport",
"layer",
"with",
"log",
"output",
"going",
"to",
"the",
"supplied",
"Logger"
] | [
"func",
"NewTCPTransportWithLogger",
"(",
"bindAddr",
"string",
",",
"advertise",
"net",
".",
"Addr",
",",
"maxPool",
"int",
",",
"timeout",
"time",
".",
"Duration",
",",
"logger",
"*",
"log",
".",
"Logger",
",",
")",
"(",
"*",
"NetworkTransport",
",",
"er... |
20,194 | all-20195 | [
"FilterPresubmits",
"determines",
"which",
"presubmits",
"should",
"run",
".",
"We",
"only",
"want",
"to",
"trigger",
"jobs",
"that",
"should",
"run",
"but",
"the",
"pool",
"of",
"jobs",
"we",
"filter",
"to",
"those",
"that",
"should",
"run",
"depends",
"on"... | [
"func",
"FilterPresubmits",
"(",
"honorOkToTest",
"bool",
",",
"gitHubClient",
"GitHubClient",
",",
"body",
"string",
",",
"pr",
"*",
"github",
".",
"PullRequest",
",",
"presubmits",
"[",
"]",
"config",
".",
"Presubmit",
",",
"logger",
"*",
"logrus",
".",
"E... |
20,195 | all-20196 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"EventPaused",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger40",
"(",
"&",
"w",
",",
"v",
")",
"... |
20,196 | all-20197 | [
"WithProcessClosed",
"returns",
"a",
"context",
".",
"Context",
"that",
"is",
"cancelled",
"after",
"Process",
"p",
"is",
"Closed",
".",
"It",
"is",
"the",
"equivalent",
"of",
":",
"func",
"WithProcessClosed",
"(",
"ctx",
"context",
".",
"Context",
"p",
"gop... | [
"func",
"WithProcessClosed",
"(",
"ctx",
"context",
".",
"Context",
",",
"p",
"goprocess",
".",
"Process",
")",
"context",
".",
"Context",
"{",
"ctx",
",",
"cancel",
":=",
"<mask>",
".",
"WithCancel",
"(",
"ctx",
")",
"\n",
"go",
"func",
"(",
")",
"{",... |
20,197 | all-20198 | [
"Commit",
"finishes",
"writing",
"data",
"to",
"the",
"underlying",
"io",
".",
"Writer",
".",
"It",
"is",
"the",
"caller",
"s",
"responsibility",
"to",
"close",
"it",
"if",
"necessary",
"."
] | [
"func",
"(",
"d",
"*",
"Destination",
")",
"Commit",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"error",
"{",
"return",
"d",
".",
"tar",
".",
"Close",
"(",
")",
"\n",
"}"
] |
20,198 | all-20199 | [
"Message",
"returns",
"an",
"error",
"message",
"from",
"a",
"given",
"error",
"code",
"."
] | [
"func",
"<mask>",
"(",
"e",
"Error",
")",
"(",
"string",
",",
"bool",
")",
"{",
"msg",
",",
"ok",
":=",
"msgs",
"[",
"e",
"]",
"\n",
"return",
"msg",
",",
"ok",
"\n",
"}"
] |
20,199 | all-20200 | [
"AsyncQuery",
"loads",
"the",
"data",
"by",
"paging",
"through",
"the",
"query",
"results",
"and",
"sends",
"back",
"payloads",
"over",
"the",
"dataChan",
"-",
"dataChan",
"sends",
"a",
"payload",
"containing",
"Data",
"objects",
"made",
"up",
"of",
"the",
"... | [
"func",
"(",
"c",
"*",
"Client",
")",
"AsyncQuery",
"(",
"pageSize",
"int",
",",
"dataset",
",",
"<mask>",
",",
"queryStr",
"string",
",",
"dataChan",
"chan",
"Data",
")",
"{",
"c",
".",
"pagedQuery",
"(",
"pageSize",
",",
"dataset",
",",
"project",
",... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.