id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
5,700 | all-5701 | [
"String",
"is",
"a",
"string",
"representation",
"of",
"the",
"set",
"."
] | [
"func",
"(",
"s",
"*",
"Set",
")",
"String",
"(",
")",
"string",
"{",
"s",
".",
"RLock",
"(",
")",
"\n",
"defer",
"s",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"strings",
".",
"Join",
"(",
"s",
".",
"<mask>",
",",
"\"",
"\"",
")",
"\n",
"}"
... |
5,701 | all-5702 | [
"Returns",
"a",
"Typed",
"helper",
"at",
"the",
"key",
"If",
"the",
"key",
"doesn",
"t",
"exist",
"a",
"default",
"Typed",
"helper",
"is",
"returned",
"(",
"which",
"will",
"return",
"default",
"values",
"for",
"any",
"subsequent",
"sub",
"queries",
")"
] | [
"func",
"(",
"t",
"Typed",
")",
"<mask>",
"(",
"key",
"string",
")",
"Typed",
"{",
"o",
":=",
"t",
".",
"ObjectOr",
"(",
"key",
",",
"nil",
")",
"\n",
"if",
"o",
"==",
"nil",
"{",
"return",
"Typed",
"(",
"nil",
")",
"\n",
"}",
"\n",
"return",
... |
5,702 | all-5703 | [
"DeleteUser",
"deletes",
"a",
"user",
"and",
"returns",
"an",
"error",
"if",
"deletion",
"failed"
] | [
"func",
"(",
"<mask>",
"*",
"Client",
")",
"DeleteUser",
"(",
"handle",
"string",
")",
"error",
"{",
"uri",
":=",
"\"",
"\"",
"+",
"handle",
"\n",
"return",
"client",
".",
"doJsonRequest",
"(",
"\"",
"\"",
",",
"uri",
",",
"nil",
",",
"nil",
")",
"... |
5,703 | all-5704 | [
"MandatoryParams",
"returns",
"the",
"list",
"of",
"all",
"action",
"mandatory",
"parameters"
] | [
"func",
"(",
"a",
"*",
"<mask>",
")",
"MandatoryParams",
"(",
")",
"[",
"]",
"*",
"ActionParam",
"{",
"m",
":=",
"make",
"(",
"[",
"]",
"*",
"ActionParam",
",",
"len",
"(",
"a",
".",
"Params",
")",
")",
"\n",
"i",
":=",
"0",
"\n",
"for",
"_",
... |
5,704 | all-5705 | [
"Check",
"that",
"cluster",
"-",
"related",
"preconditions",
"are",
"met",
"for",
"accepting",
"a",
"new",
"node",
"."
] | [
"func",
"membershipCheckClusterStateForAccept",
"(",
"tx",
"*",
"db",
".",
"ClusterTx",
",",
"<mask>",
"string",
",",
"address",
"string",
",",
"schema",
"int",
",",
"api",
"int",
")",
"error",
"{",
"nodes",
",",
"err",
":=",
"tx",
".",
"Nodes",
"(",
")"... |
5,705 | all-5706 | [
"MustSuccess",
"retrieves",
"the",
"Success",
"value",
"from",
"the",
"union",
"panicing",
"if",
"the",
"value",
"is",
"not",
"set",
"."
] | [
"func",
"(",
"u",
"PathPaymentResult",
")",
"MustSuccess",
"(",
")",
"PathPaymentResultSuccess",
"{",
"val",
",",
"ok",
":=",
"u",
".",
"GetSuccess",
"(",
")",
"\n\n",
"if",
"!",
"<mask>",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"return"... |
5,706 | all-5707 | [
"Return",
"a",
"slice",
"of",
"binary",
"integer",
"tuples",
".",
"Each",
"tuple",
"contains",
"the",
"schema",
"version",
"and",
"number",
"of",
"api",
"extensions",
"of",
"a",
"node",
"in",
"the",
"cluster",
"."
] | [
"func",
"selectNodesVersions",
"(",
"tx",
"*",
"sql",
".",
"Tx",
")",
"(",
"[",
"]",
"[",
"2",
"]",
"int",
",",
"error",
")",
"{",
"versions",
":=",
"[",
"]",
"[",
"2",
"]",
"int",
"{",
"}",
"\n\n",
"dest",
":=",
"func",
"(",
"i",
"int",
")",... |
5,707 | all-5708 | [
"Getgroups",
"returns",
"a",
"list",
"of",
"the",
"numeric",
"ids",
"of",
"groups",
"that",
"the",
"caller",
"belongs",
"to",
"."
] | [
"func",
"Getgroups",
"(",
")",
"[",
"]",
"int",
"{",
"user",
":=",
"GetUsername",
"(",
")",
"\n",
"list",
":=",
"make",
"(",
"[",
"]",
"int",
",",
"0",
")",
"\n\n",
"// The user could have its own group.",
"if",
"g",
",",
"err",
":=",
"LookupGroup",
"(... |
5,708 | all-5709 | [
"GetStyle",
"returns",
"the",
"Style",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"d",
"*",
"DistributionRequest",
")",
"GetStyle",
"(",
")",
"WidgetRequestStyle",
"{",
"if",
"d",
"==",
"nil",
"||",
"d",
".",
"Style",
"==",
"nil",
"{",
"<mask>",
"WidgetRequestStyle",
"{",
"}",
"\n",
"}",
"\n",
"return",
"*",
"d",
".",
... |
5,709 | all-5710 | [
"GetHello",
"retrieves",
"the",
"Hello",
"value",
"from",
"the",
"union",
"returning",
"ok",
"if",
"the",
"union",
"s",
"switch",
"indicated",
"the",
"value",
"is",
"valid",
"."
] | [
"func",
"(",
"u",
"StellarMessage",
")",
"GetHello",
"(",
")",
"(",
"result",
"Hello",
",",
"<mask>",
"bool",
")",
"{",
"armName",
",",
"_",
":=",
"u",
".",
"ArmForSwitch",
"(",
"int32",
"(",
"u",
".",
"Type",
")",
")",
"\n\n",
"if",
"armName",
"==... |
5,710 | all-5711 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetEventListenersParams",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger9",
"(",... |
5,711 | all-5712 | [
"TextIndexToLayoutIndex",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_entry_text_index_to_layout_index",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"TextIndexToLayoutIndex",
"(",
"textIndex",
"int",
")",
"int",
"{",
"c",
":=",
"C",
".",
"gtk_entry_text_index_to_layout_index",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"gint",
"(",
"textIndex",
")",
")",
... |
5,712 | all-5713 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"ResetNavigationHistoryParams",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage19",
"(",
... |
5,713 | all-5714 | [
"Name",
"is",
"a",
"handler"
] | [
"func",
"(",
"h",
"*",
"Hello",
")",
"Name",
"(",
"ctx",
"context",
".",
"Context",
",",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"<mask>",
".",
"Request",
")",
"{",
"name",
":=",
"scaffold",
".",
"GetParam",
"(",
"ctx",
",",
"\"",
"\"",
... |
5,714 | all-5715 | [
"explainGroup",
"explains",
"all",
"the",
"subcommands",
"for",
"a",
"particular",
"group",
"."
] | [
"func",
"explainGroup",
"(",
"w",
"io",
".",
"Writer",
",",
"group",
"*",
"commandGroup",
")",
"{",
"if",
"len",
"(",
"group",
".",
"commands",
")",
"==",
"0",
"{",
"return",
"\n",
"}",
"\n",
"if",
"group",
".",
"name",
"==",
"\"",
"\"",
"{",
"fm... |
5,715 | all-5716 | [
"NewLogAdapterFor",
"creates",
"a",
"LogAdapter",
"that",
"wraps",
"the",
"given",
"loger",
"with",
"the",
"given",
"attributes",
"."
] | [
"func",
"NewLogAdapterFor",
"(",
"base",
"WrappableLogger",
",",
"attrs",
"*",
"Attrs",
")",
"*",
"LogAdapter",
"{",
"if",
"attrs",
"==",
"nil",
"{",
"attrs",
"=",
"NewAttrs",
"(",
")",
"\n",
"}",
"\n\n",
"return",
"&",
"LogAdapter",
"{",
"<mask>",
":",
... |
5,716 | all-5717 | [
"NewDockerStatsEngine",
"creates",
"a",
"new",
"instance",
"of",
"the",
"DockerStatsEngine",
"object",
".",
"MustInit",
"()",
"must",
"be",
"called",
"to",
"initialize",
"the",
"fields",
"of",
"the",
"new",
"event",
"listener",
"."
] | [
"func",
"NewDockerStatsEngine",
"(",
"cfg",
"*",
"config",
".",
"Config",
",",
"<mask>",
"dockerapi",
".",
"DockerClient",
",",
"containerChangeEventStream",
"*",
"eventstream",
".",
"EventStream",
")",
"*",
"DockerStatsEngine",
"{",
"return",
"&",
"DockerStatsEngin... |
5,717 | all-5718 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"DisposeBrowserContextParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget20",
"(",
"&",
"w",
",",
"... |
5,718 | all-5719 | [
"Do",
"executes",
"Runtime",
".",
"runIfWaitingForDebugger",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"RunIfWaitingForDebuggerParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandRunIfWaitingForDebugger",
",",
"nil",
",",
"nil",
")",
... |
5,719 | all-5720 | [
"recordTransition",
"records",
"state",
"change",
"happening",
"in",
"every",
"subConn",
"and",
"based",
"on",
"that",
"it",
"evaluates",
"what",
"aggregated",
"state",
"should",
"be",
".",
"It",
"can",
"only",
"transition",
"between",
"Ready",
"Connecting",
"an... | [
"func",
"(",
"cse",
"*",
"connectivityStateEvaluator",
")",
"recordTransition",
"(",
"oldState",
",",
"newState",
"connectivity",
".",
"State",
")",
"connectivity",
".",
"State",
"{",
"// Update counters.",
"for",
"idx",
",",
"state",
":=",
"<mask>",
"[",
"]",
... |
5,720 | all-5721 | [
"GetSpacing",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_box_get_spacing",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Box",
")",
"GetSpacing",
"(",
")",
"int",
"{",
"c",
":=",
"C",
".",
"gtk_box_get_spacing",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"<mask>",
"int",
"(",
"c",
")",
"\n",
"}"
] |
5,721 | all-5722 | [
"NewCmdWithRunner",
"creates",
"a",
"new",
"CmdWithRunner",
"for",
"the",
"provided",
"name",
"and",
"runner",
".",
"Returns",
"an",
"error",
"if",
"the",
"provided",
"name",
"is",
"not",
"a",
"legal",
"command",
"name",
"."
] | [
"func",
"NewCmdWithRunner",
"(",
"cmdName",
"string",
",",
"runner",
"func",
"(",
")",
")",
"(",
"*",
"CmdWithRunner",
",",
"error",
")",
"{",
"if",
"cmdName",
"==",
"\"",
"\"",
"{",
"return",
"nil",
",",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
... |
5,722 | all-5723 | [
"cleanupPauseContainerNetwork",
"will",
"clean",
"up",
"the",
"network",
"namespace",
"of",
"pause",
"container"
] | [
"func",
"(",
"engine",
"*",
"DockerTaskEngine",
")",
"cleanupPauseContainerNetwork",
"(",
"task",
"*",
"apitask",
".",
"Task",
",",
"container",
"*",
"apicontainer",
".",
"<mask>",
")",
"error",
"{",
"seelog",
".",
"Infof",
"(",
"\"",
"\"",
",",
"task",
".... |
5,723 | all-5724 | [
"mustWaitPinReady",
"waits",
"up",
"to",
"3",
"-",
"second",
"until",
"connection",
"is",
"up",
"(",
"pin",
"endpoint",
")",
".",
"Fatal",
"on",
"time",
"-",
"out",
"."
] | [
"func",
"mustWaitPinReady",
"(",
"t",
"*",
"testing",
".",
"T",
",",
"cli",
"*",
"clientv3",
".",
"Client",
")",
"{",
"// TODO: decrease timeout after balancer rewrite!!!",
"ctx",
",",
"cancel",
":=",
"context",
".",
"WithTimeout",
"(",
"context",
".",
"Backgrou... |
5,724 | all-5725 | [
"CloudLocator",
"builds",
"a",
"locator",
"from",
"the",
"given",
"href",
"."
] | [
"func",
"(",
"api",
"*",
"API",
")",
"CloudLocator",
"(",
"href",
"string",
")",
"*",
"CloudLocator",
"{",
"<mask>",
"&",
"CloudLocator",
"{",
"Href",
"(",
"href",
")",
",",
"api",
"}",
"\n",
"}"
] |
5,725 | all-5726 | [
"Pop",
"pops",
"a",
"segment",
"id",
"off",
"of",
"the",
"segment",
"stack",
".",
"It",
"returns",
"false",
"if",
"the",
"stack",
"is",
"empty",
"."
] | [
"func",
"(",
"s",
"*",
"SegmentStack",
")",
"Pop",
"(",
")",
"(",
"int64",
",",
"bool",
")",
"{",
"s",
".",
"Lock",
"(",
")",
"\n",
"defer",
"s",
".",
"Unlock",
"(",
")",
"\n",
"if",
"s",
".",
"Len",
"(",
")",
"==",
"0",
"{",
"return",
"roo... |
5,726 | all-5727 | [
"Sorti",
"rearranges",
"the",
"position",
"of",
"integer",
"entries",
"in",
"this",
"list",
"so",
"that",
"they",
"are",
"ascending",
"."
] | [
"func",
"(",
"list",
"*",
"LinkedList",
")",
"Sorti",
"(",
")",
"(",
"err",
"error",
")",
"{",
"list",
".",
"key",
".",
"Lock",
"(",
")",
"\n",
"defer",
"list",
".",
"key",
".",
"Unlock",
"(",
")",
"\n\n",
"list",
".",
"first",
",",
"err",
"=",... |
5,727 | all-5728 | [
"GetSizingOk",
"returns",
"a",
"tuple",
"with",
"the",
"Sizing",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"Widget",
")",
"GetSizingOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"Sizing",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"<mask>",
"\n",
"}",
"\n",
"return",
"*",
"w",
... |
5,728 | all-5729 | [
"Print",
"the",
"inner",
"types",
"."
] | [
"func",
"(",
"ps",
"*",
"printState",
")",
"printInner",
"(",
"prefixOnly",
"bool",
")",
"[",
"]",
"AST",
"{",
"var",
"save",
"[",
"]",
"AST",
"\n",
"var",
"psave",
"*",
"[",
"]",
"AST",
"\n",
"if",
"prefixOnly",
"{",
"psave",
"=",
"&",
"save",
"... |
5,729 | all-5730 | [
"Pop",
"retrieves",
"the",
"last",
"added",
"event"
] | [
"func",
"(",
"t",
"*",
"EventTimeHeap",
")",
"Pop",
"(",
")",
"interface",
"{",
"}",
"{",
"<mask>",
":=",
"*",
"t",
"\n",
"n",
":=",
"len",
"(",
"old",
")",
"\n",
"x",
":=",
"old",
"[",
"n",
"-",
"1",
"]",
"\n",
"*",
"t",
"=",
"old",
"[",
... |
5,730 | all-5731 | [
"NewContextWithContext",
"returns",
"a",
"new",
"plush",
".",
"Context",
"given",
"another",
"context"
] | [
"func",
"NewContextWithContext",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"*",
"Context",
"{",
"c",
":=",
"NewContext",
"(",
")",
"\n",
"c",
".",
"Context",
"=",
"ctx",
"\n",
"return",
"c",
"\n",
"}"
] |
5,731 | all-5732 | [
"URLPath",
"build",
"path",
"part",
"of",
"URL",
"by",
"given",
"pair",
"values",
"."
] | [
"func",
"(",
"l",
"*",
"Leaf",
")",
"URLPath",
"(",
"pairs",
"...",
"string",
")",
"string",
"{",
"if",
"len",
"(",
"pairs",
")",
"%",
"2",
"!=",
"0",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"urlPath",
":=",
"l",
".",
"rawPattern... |
5,732 | all-5733 | [
"numToString",
"converts",
"a",
"number",
"a",
"string",
"using",
"the",
"given",
"alpabet",
"."
] | [
"func",
"(",
"b",
"*",
"base57",
")",
"numToString",
"(",
"number",
"*",
"big",
".",
"Int",
",",
"padToLen",
"int",
")",
"string",
"{",
"var",
"(",
"out",
"string",
"\n",
"digit",
"*",
"big",
".",
"Int",
"\n",
")",
"\n\n",
"for",
"number",
".",
"... |
5,733 | all-5734 | [
"ItemToResourcesConfig",
"casts",
"an",
"Item",
"object",
"to",
"a",
"ResourcesConfig"
] | [
"func",
"ItemToResourcesConfig",
"(",
"i",
"Item",
")",
"(",
"ResourcesConfig",
",",
"error",
")",
"{",
"conf",
",",
"<mask>",
":=",
"i",
".",
"(",
"ResourcesConfig",
")",
"\n",
"if",
"!",
"ok",
"{",
"return",
"ResourcesConfig",
"{",
"}",
",",
"fmt",
"... |
5,734 | all-5735 | [
"depaginate",
"adds",
"depagination",
"on",
"top",
"of",
"the",
"retry",
"and",
"rate",
"limiting",
"logic",
"provided",
"by",
"retry",
"."
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"depaginate",
"(",
"action",
"string",
",",
"opts",
"*",
"github",
".",
"ListOptions",
",",
"call",
"func",
"(",
")",
"(",
"[",
"]",
"interface",
"{",
"}",
",",
"*",
"github",
".",
"Response",
",",
"error",
")"... |
5,735 | all-5736 | [
"Map",
"applies",
"a",
"function",
"that",
"processes",
"individual",
"strings",
"to",
"the",
"strings",
"in",
"ps",
"and",
"returns",
"a",
"new",
"PlatformStrings",
"with",
"the",
"result",
".",
"Empty",
"strings",
"returned",
"by",
"the",
"function",
"are",
... | [
"func",
"(",
"ps",
"*",
"PlatformStrings",
")",
"Map",
"(",
"f",
"func",
"(",
"s",
"string",
")",
"(",
"string",
",",
"error",
")",
")",
"(",
"PlatformStrings",
",",
"[",
"]",
"error",
")",
"{",
"var",
"errors",
"[",
"]",
"error",
"\n",
"mapSlice",... |
5,736 | all-5737 | [
"CreateContainerFromBackup",
"is",
"a",
"convenience",
"function",
"to",
"make",
"it",
"easier",
"to",
"create",
"a",
"container",
"from",
"a",
"backup"
] | [
"func",
"(",
"r",
"*",
"ProtocolLXD",
")",
"CreateContainerFromBackup",
"(",
"args",
"ContainerBackupArgs",
")",
"(",
"Operation",
",",
"error",
")",
"{",
"if",
"!",
"r",
".",
"HasExtension",
"(",
"\"",
"\"",
")",
"{",
"return",
"nil",
",",
"fmt",
".",
... |
5,737 | all-5738 | [
"Insert",
"is",
"a",
"wrapper",
"around",
"gtk_menu_shell_insert",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"MenuShell",
")",
"Insert",
"(",
"child",
"IMenuItem",
",",
"<mask>",
"int",
")",
"{",
"C",
".",
"gtk_menu_shell_insert",
"(",
"v",
".",
"native",
"(",
")",
",",
"child",
".",
"toWidget",
"(",
")",
",",
"C",
".",
"gint",
"(",... |
5,738 | all-5739 | [
"/",
"*",
"Generally",
"used",
"when",
"formatting",
"type",
"check",
"errors",
".",
"We",
"could",
"store",
"the",
"stringified",
"symbol",
"somewhere",
"else",
"and",
"not",
"require",
"a",
"duplicated",
"codeblock",
"to",
"translate",
"OperatorSymbol",
"to",
... | [
"func",
"(",
"this",
"OperatorSymbol",
")",
"String",
"(",
")",
"string",
"{",
"switch",
"this",
"{",
"case",
"NOOP",
":",
"return",
"\"",
"\"",
"\n",
"case",
"VALUE",
":",
"return",
"\"",
"\"",
"\n",
"case",
"EQ",
":",
"return",
"\"",
"\"",
"\n",
... |
5,739 | all-5740 | [
"NodeRename",
"changes",
"the",
"name",
"of",
"an",
"existing",
"node",
".",
"Return",
"an",
"error",
"if",
"a",
"node",
"with",
"the",
"same",
"name",
"already",
"exists",
"."
] | [
"func",
"(",
"c",
"*",
"ClusterTx",
")",
"NodeRename",
"(",
"old",
",",
"new",
"string",
")",
"error",
"{",
"count",
",",
"err",
":=",
"query",
".",
"Count",
"(",
"c",
".",
"tx",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"new",
")",
"\n",
"if",
... |
5,740 | all-5741 | [
"Ordered",
"converts",
"an",
"unordered",
"hashtree",
"into",
"an",
"ordered",
"hashtree",
"."
] | [
"func",
"(",
"u",
"*",
"Unordered",
")",
"Ordered",
"(",
")",
"*",
"Ordered",
"{",
"paths",
":=",
"make",
"(",
"[",
"]",
"string",
",",
"len",
"(",
"u",
".",
"fs",
")",
")",
"\n",
"i",
":=",
"0",
"\n",
"for",
"path",
":=",
"<mask>",
"u",
".",... |
5,741 | all-5742 | [
"UpdateGroup",
"updates",
"a",
"group"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"UpdateGroup",
"(",
"groupid",
"string",
",",
"obj",
"Group",
")",
"(",
"*",
"<mask>",
",",
"error",
")",
"{",
"url",
":=",
"umGroupPath",
"(",
"groupid",
")",
"+",
"`?depth=`",
"+",
"c",
".",
"client",
".",
"d... |
5,742 | all-5743 | [
"findControllerForDevice",
"locates",
"a",
"controller",
"via",
"its",
"virtual",
"device",
"."
] | [
"func",
"findControllerForDevice",
"(",
"l",
"object",
".",
"VirtualDeviceList",
",",
"bvd",
"types",
".",
"BaseVirtualDevice",
")",
"(",
"types",
".",
"BaseVirtualController",
",",
"error",
")",
"{",
"vd",
":=",
"bvd",
".",
"GetVirtualDevice",
"(",
")",
"\n",... |
5,743 | all-5744 | [
"Create",
"creates",
"the",
"node",
"at",
"nodePath",
".",
"Create",
"will",
"help",
"to",
"create",
"intermediate",
"directories",
"with",
"no",
"ttl",
".",
"If",
"the",
"node",
"has",
"already",
"existed",
"create",
"will",
"fail",
".",
"If",
"any",
"nod... | [
"func",
"(",
"s",
"*",
"<mask>",
")",
"Create",
"(",
"nodePath",
"string",
",",
"dir",
"bool",
",",
"value",
"string",
",",
"unique",
"bool",
",",
"expireOpts",
"TTLOptionSet",
")",
"(",
"*",
"Event",
",",
"error",
")",
"{",
"var",
"err",
"*",
"v2err... |
5,744 | all-5745 | [
"HasLogQuery",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"d",
"*",
"DistributionRequest",
")",
"HasLogQuery",
"(",
")",
"bool",
"{",
"if",
"d",
"!=",
"nil",
"&&",
"d",
".",
"LogQuery",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
5,745 | all-5746 | [
"Mmap",
"uses",
"the",
"mmap",
"system",
"call",
"to",
"memory",
"-",
"map",
"a",
"file",
".",
"If",
"writable",
"is",
"true",
"memory",
"protection",
"of",
"the",
"pages",
"is",
"set",
"so",
"that",
"they",
"may",
"be",
"written",
"to",
"as",
"well",
... | [
"func",
"Mmap",
"(",
"fd",
"*",
"os",
".",
"File",
",",
"writable",
"bool",
",",
"size",
"int64",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"mtype",
":=",
"unix",
".",
"PROT_READ",
"\n",
"if",
"writable",
"{",
"mtype",
"|=",
"unix",
"... |
5,746 | all-5747 | [
"hasVote",
"returns",
"true",
"if",
"the",
"server",
"identified",
"by",
"id",
"is",
"a",
"Voter",
"in",
"the",
"provided",
"Configuration",
"."
] | [
"func",
"hasVote",
"(",
"configuration",
"Configuration",
",",
"id",
"ServerID",
")",
"bool",
"{",
"for",
"_",
",",
"server",
":=",
"range",
"configuration",
".",
"Servers",
"{",
"if",
"server",
".",
"ID",
"==",
"id",
"{",
"return",
"server",
".",
"Suffr... |
5,747 | all-5748 | [
"WithUrls",
"the",
"list",
"of",
"URLs",
"for",
"which",
"applicable",
"cookies",
"will",
"be",
"fetched",
"."
] | [
"func",
"(",
"p",
"GetCookiesParams",
")",
"WithUrls",
"(",
"urls",
"[",
"]",
"<mask>",
")",
"*",
"GetCookiesParams",
"{",
"p",
".",
"Urls",
"=",
"urls",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
5,748 | all-5749 | [
"ErrorFunc",
"outputs",
"Error",
"level",
"log",
"returned",
"from",
"the",
"function"
] | [
"func",
"(",
"g",
"*",
"Glg",
")",
"ErrorFunc",
"(",
"f",
"func",
"(",
")",
"string",
")",
"error",
"{",
"if",
"g",
".",
"isModeEnable",
"(",
"ERR",
")",
"{",
"return",
"g",
".",
"<mask>",
"(",
"ERR",
",",
"\"",
"\"",
",",
"f",
"(",
")",
")",... |
5,749 | all-5750 | [
"ReturnWith",
"takes",
"the",
"result",
"name",
"and",
"the",
"error",
"name",
"and",
"generates",
"the",
"return",
"expression",
"."
] | [
"func",
"(",
"m",
"*",
"Method",
")",
"ReturnWith",
"(",
"respName",
"string",
",",
"errName",
"string",
")",
"string",
"{",
"if",
"!",
"m",
".",
"HasReturn",
"(",
")",
"{",
"<mask>",
"errName",
"\n",
"}",
"\n",
"return",
"fmt",
".",
"Sprintf",
"(",
... |
5,750 | all-5751 | [
"PathFromDatacenter",
"returns",
"the",
"combined",
"result",
"of",
"RootFromDatacenter",
"plus",
"a",
"relative",
"path",
"for",
"a",
"given",
"particle",
"and",
"datacenter",
"object",
"."
] | [
"func",
"(",
"p",
"RootPathParticle",
")",
"PathFromDatacenter",
"(",
"dc",
"*",
"object",
".",
"Datacenter",
",",
"<mask>",
"string",
")",
"string",
"{",
"return",
"p",
".",
"RootFromDatacenter",
"(",
"dc",
")",
"+",
"\"",
"\"",
"+",
"relative",
"\n",
"... |
5,751 | all-5752 | [
"/",
"*",
"Returns",
"true",
"if",
"this",
"operator",
"is",
"contained",
"by",
"the",
"given",
"array",
"of",
"candidate",
"symbols",
".",
"False",
"otherwise",
"."
] | [
"func",
"(",
"this",
"OperatorSymbol",
")",
"IsModifierType",
"(",
"candidate",
"[",
"]",
"OperatorSymbol",
")",
"bool",
"{",
"for",
"_",
",",
"symbolType",
":=",
"range",
"candidate",
"{",
"if",
"this",
"==",
"symbolType",
"{",
"return",
"true",
"\n",
"}"... |
5,752 | all-5753 | [
"Or",
"adds",
"OR",
"operator",
"to",
"the",
"Condition",
"and",
"returns",
"it",
"for",
"method",
"chain",
"."
] | [
"func",
"(",
"c",
"*",
"Condition",
")",
"Or",
"(",
"cond",
"interface",
"{",
"}",
",",
"args",
"...",
"<mask>",
"{",
"}",
")",
"*",
"Condition",
"{",
"return",
"c",
".",
"appendQueryByCondOrExpr",
"(",
"\"",
"\"",
",",
"100",
",",
"Or",
",",
"cond... |
5,753 | all-5754 | [
"SetForUid",
"sets",
"the",
"value",
"of",
"the",
"environment",
"variable",
"named",
"by",
"the",
"key",
"that",
"affects",
"a",
"particular",
"user",
".",
"It",
"returns",
"an",
"error",
"if",
"any",
"."
] | [
"func",
"SetForUid",
"(",
"id",
"int",
",",
"key",
",",
"value",
"string",
")",
"error",
"{",
"_settings",
",",
"err",
":=",
"getSettingsForUid",
"(",
"id",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n\n",
"if",
"err",
... |
5,754 | all-5755 | [
"Anyp",
"tests",
"an",
"Enumerable",
"to",
"see",
"if",
"there",
"are",
"any",
"elements",
"present",
"that",
"meet",
"a",
"criteria",
"."
] | [
"func",
"Anyp",
"(",
"iterator",
"Enumerable",
",",
"p",
"Predicate",
")",
"bool",
"{",
"done",
":=",
"make",
"(",
"chan",
"struct",
"{",
"}",
")",
"\n",
"defer",
"close",
"(",
"done",
")",
"\n\n",
"for",
"element",
":=",
"range",
"iterator",
".",
"E... |
5,755 | all-5756 | [
"RemoveServer",
"will",
"remove",
"the",
"given",
"server",
"from",
"the",
"cluster",
".",
"If",
"the",
"current",
"leader",
"is",
"being",
"removed",
"it",
"will",
"cause",
"a",
"new",
"election",
"to",
"occur",
".",
"This",
"must",
"be",
"run",
"on",
"... | [
"func",
"(",
"r",
"*",
"Raft",
")",
"RemoveServer",
"(",
"id",
"ServerID",
",",
"prevIndex",
"uint64",
",",
"timeout",
"time",
".",
"Duration",
")",
"IndexFuture",
"{",
"if",
"r",
".",
"protocolVersion",
"<",
"2",
"{",
"return",
"errorFuture",
"{",
"ErrU... |
5,756 | all-5757 | [
"detectProperties",
"detects",
"various",
"properties",
"of",
"the",
"registry",
".",
"See",
"the",
"dockerClient",
"documentation",
"for",
"members",
"which",
"are",
"affected",
"by",
"this",
"."
] | [
"func",
"(",
"c",
"*",
"dockerClient",
")",
"detectProperties",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"error",
"{",
"c",
".",
"detectPropertiesOnce",
".",
"Do",
"(",
"func",
"(",
")",
"{",
"c",
".",
"detectPropertiesError",
"=",
"c",
".",
"detectPro... |
5,757 | all-5758 | [
"Warn",
"shows",
"a",
"temporary",
"message",
"instead",
"of",
"the",
"status"
] | [
"func",
"(",
"p",
"*",
"ProgressRenderer",
")",
"Warn",
"(",
"status",
"string",
",",
"timeout",
"time",
".",
"Duration",
")",
"{",
"// Acquire rendering lock",
"p",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"p",
".",
"lock",
".",
"Unlock",
"(... |
5,758 | all-5759 | [
"title",
":",
"list",
"keys",
"path",
":",
"/",
"users",
"/",
"keys",
"method",
":",
"GET",
"produce",
":",
"application",
"/",
"json",
"responses",
":",
"200",
":",
"OK",
"400",
":",
"Invalid",
"data",
"401",
":",
"Unauthorized"
] | [
"func",
"listKeys",
"(",
"w",
"<mask>",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"error",
"{",
"u",
",",
"err",
":=",
"auth",
".",
"ConvertNewUser",
"(",
"t",
".",
"User",
"(",
")",
")",
"... |
5,759 | all-5760 | [
"FromGRPC",
"parses",
"a",
"gRPC",
"error",
"and",
"returns",
"an",
"Error"
] | [
"func",
"FromGRPC",
"(",
"in",
"error",
")",
"Error",
"{",
"out",
":=",
"&",
"impl",
"{",
"message",
":",
"grpc",
".",
"ErrorDesc",
"(",
"in",
")",
",",
"typ",
":",
"GRPCCodeToType",
"(",
"grpc",
".",
"Code",
"(",
"in",
")",
")",
",",
"code",
":"... |
5,760 | all-5761 | [
"GetUintOrZero",
"returns",
"uint",
"value",
"for",
"the",
"given",
"key",
".",
"Zero",
"(",
"0",
")",
"is",
"returned",
"on",
"error",
"."
] | [
"func",
"(",
"a",
"*",
"Args",
")",
"GetUintOrZero",
"(",
"key",
"string",
")",
"int",
"{",
"n",
",",
"err",
":=",
"a",
".",
"GetUint",
"(",
"<mask>",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"n",
"=",
"0",
"\n",
"}",
"\n",
"return",
"n",
"\... |
5,761 | all-5762 | [
"NewOutgoingStickerResend",
"creates",
"a",
"new",
"outgoing",
"sticker",
"message",
"for",
"re",
"-",
"sending",
"."
] | [
"func",
"(",
"api",
"*",
"TelegramBotAPI",
")",
"NewOutgoingStickerResend",
"(",
"recipient",
"Recipient",
",",
"fileID",
"<mask>",
")",
"*",
"OutgoingSticker",
"{",
"return",
"&",
"OutgoingSticker",
"{",
"outgoingMessageBase",
":",
"outgoingMessageBase",
"{",
"outg... |
5,762 | all-5763 | [
"ImageLastAccessUpdate",
"updates",
"the",
"last_use_date",
"field",
"of",
"the",
"image",
"with",
"the",
"given",
"fingerprint",
"."
] | [
"func",
"(",
"c",
"*",
"Cluster",
")",
"ImageLastAccessUpdate",
"(",
"fingerprint",
"string",
",",
"date",
"time",
".",
"Time",
")",
"error",
"{",
"stmt",
":=",
"`UPDATE images SET last_use_date=? WHERE fingerprint=?`",
"\n",
"err",
":=",
"exec",
"(",
"c",
".",
... |
5,763 | all-5764 | [
"GetUnitOk",
"returns",
"a",
"tuple",
"with",
"the",
"Unit",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"a",
"*",
"AlertValueDefinition",
")",
"GetUnitOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"a",
"==",
"nil",
"||",
"a",
".",
"Unit",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",... |
5,764 | all-5765 | [
"HTTPDelete",
"performs",
"a",
"HTTP",
"DELETE",
"request"
] | [
"func",
"HTTPDelete",
"(",
"url",
"string",
")",
"(",
"statusCode",
"int",
",",
"statusText",
"string",
",",
"err",
"error",
")",
"{",
"request",
",",
"err",
":=",
"http",
".",
"NewRequest",
"(",
"\"",
"\"",
",",
"url",
",",
"nil",
")",
"\n",
"if",
... |
5,765 | all-5766 | [
"VerifySignature",
"returns",
"true",
"if",
"signature",
"is",
"correct",
"."
] | [
"func",
"VerifySignature",
"(",
"pubk",
",",
"msg",
",",
"sig",
"[",
"]",
"byte",
")",
"bool",
"{",
"return",
"ethcrypto",
".",
"VerifySignature",
"(",
"pubk",
",",
"<mask>",
",",
"sig",
")",
"\n",
"}"
] |
5,766 | all-5767 | [
"GetCountry",
"returns",
"country",
"code",
"by",
"ip",
".",
"Parses",
"response",
"in",
"JSON",
"format",
"and",
"returns",
"a",
"value",
"of",
"the",
"field",
"."
] | [
"func",
"GetCountry",
"(",
"timeout",
"uint64",
",",
"url",
",",
"field",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"ctx",
",",
"cancel",
":=",
"context",
".",
"WithTimeout",
"(",
"context",
".",
"Background",
"(",
")",
",",
"time",
".",
... |
5,767 | all-5768 | [
"NewCatalogNodeQuery",
"parses",
"the",
"given",
"string",
"into",
"a",
"dependency",
".",
"If",
"the",
"name",
"is",
"empty",
"then",
"the",
"name",
"of",
"the",
"local",
"agent",
"is",
"used",
"."
] | [
"func",
"NewCatalogNodeQuery",
"(",
"s",
"string",
")",
"(",
"*",
"CatalogNodeQuery",
",",
"error",
")",
"{",
"if",
"s",
"!=",
"\"",
"\"",
"&&",
"!",
"CatalogNodeQueryRe",
".",
"MatchString",
"(",
"s",
")",
"{",
"return",
"nil",
",",
"fmt",
".",
"Error... |
5,768 | all-5769 | [
"NewCache",
"creates",
"a",
"new",
"cache",
"."
] | [
"func",
"NewCache",
"(",
"size",
"int",
")",
"(",
"*",
"Cache",
",",
"error",
")",
"{",
"c",
",",
"err",
":=",
"lru",
".",
"NewWithEvict",
"(",
"size",
",",
"func",
"(",
"key",
"interface",
"{",
"}",
",",
"value",
"interface",
"{",
"}",
")",
"{",... |
5,769 | all-5770 | [
"GetLengthOk",
"returns",
"a",
"tuple",
"with",
"the",
"Length",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"s",
"*",
"Series",
")",
"GetLengthOk",
"(",
")",
"(",
"int",
",",
"bool",
")",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"Length",
"==",
"nil",
"{",
"return",
"0",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
"s",
".",
"Leng... |
5,770 | all-5771 | [
"title",
":",
"get",
"envs",
"path",
":",
"/",
"apps",
"/",
"{",
"app",
"}",
"/",
"env",
"method",
":",
"GET",
"produce",
":",
"application",
"/",
"x",
"-",
"json",
"-",
"stream",
"responses",
":",
"200",
":",
"OK",
"401",
":",
"Unauthorized",
"404... | [
"func",
"getEnv",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"error",
"{",
"var",
"variables",
"[",
"]",
"string",
"\n",
"if",
"envs",
",",
"ok",
":=",
"r",
".",
"URL",
"."... |
5,771 | all-5772 | [
"GetQuery",
"returns",
"the",
"Query",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"w",
"*",
"Widget",
")",
"GetQuery",
"(",
")",
"string",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"w",
".",
"Query",
"\n",
"}"
] |
5,772 | all-5773 | [
"Date",
"returns",
"a",
"copy",
"of",
"MailBuilder",
"with",
"the",
"specified",
"Date",
"header",
"."
] | [
"func",
"(",
"p",
"MailBuilder",
")",
"Date",
"(",
"date",
"time",
".",
"Time",
")",
"MailBuilder",
"{",
"p",
".",
"<mask>",
"=",
"date",
"\n",
"return",
"p",
"\n",
"}"
] |
5,773 | all-5774 | [
"Execute",
"-",
"adds",
"/",
"removes",
"shared",
"domains"
] | [
"func",
"(",
"c",
"*",
"SharedDomainsCommand",
")",
"Execute",
"(",
"[",
"]",
"string",
")",
"error",
"{",
"var",
"cfMgmt",
"*",
"CFMgmt",
"\n",
"<mask>",
"err",
"error",
"\n",
"if",
"cfMgmt",
",",
"err",
"=",
"InitializePeekManagers",
"(",
"c",
".",
"... |
5,774 | all-5775 | [
"HasTitleSize",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"q",
"*",
"QueryValueDefinition",
")",
"HasTitleSize",
"(",
")",
"bool",
"{",
"if",
"q",
"!=",
"nil",
"&&",
"q",
".",
"TitleSize",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
5,775 | all-5776 | [
"Spawn",
"the",
"rsync",
"process"
] | [
"func",
"rsyncSendSetup",
"(",
"path",
"string",
",",
"rsyncArgs",
"string",
")",
"(",
"*",
"exec",
".",
"Cmd",
",",
"<mask>",
".",
"Conn",
",",
"io",
".",
"ReadCloser",
",",
"error",
")",
"{",
"auds",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
... |
5,776 | all-5777 | [
"CreateOrgHook",
"creates",
"a",
"new",
"hook",
"for",
"the",
"org",
"https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"orgs",
"/",
"hooks",
"/",
"#create",
"-",
"a",
"-",
"hook"
] | [
"func",
"(",
"c",
"*",
"<mask>",
")",
"CreateOrgHook",
"(",
"org",
"string",
",",
"req",
"HookRequest",
")",
"(",
"int",
",",
"error",
")",
"{",
"c",
".",
"log",
"(",
"\"",
"\"",
",",
"org",
")",
"\n",
"return",
"c",
".",
"createHook",
"(",
"org"... |
5,777 | all-5778 | [
"EstimateGas",
"tries",
"to",
"estimate",
"the",
"gas",
"needed",
"to",
"execute",
"a",
"specific",
"transaction",
"based",
"on",
"the",
"current",
"pending",
"state",
"of",
"the",
"backend",
"blockchain",
"."
] | [
"func",
"(",
"b",
"*",
"backendInstance",
")",
"EstimateGas",
"(",
"ctx",
"<mask>",
".",
"Context",
",",
"call",
"ethereum",
".",
"CallMsg",
")",
"(",
"gas",
"uint64",
",",
"err",
"error",
")",
"{",
"ctx2",
",",
"cancel",
":=",
"b",
".",
"addTimeout",
... |
5,778 | all-5779 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"a",
"specified",
"program",
"object"
] | [
"func",
"ProgramUniform4iv",
"(",
"program",
"uint32",
",",
"location",
"int32",
",",
"count",
"int32",
",",
"value",
"*",
"int32",
")",
"{",
"C",
".",
"glowProgramUniform4iv",
"(",
"gpProgramUniform4iv",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"program",
... |
5,779 | all-5780 | [
"Run",
"starts",
"the",
"server",
"group",
"returning",
"the",
"first",
"encountered",
"error",
"upon",
"shutdown",
"."
] | [
"func",
"(",
"s",
"*",
"Sentinel",
")",
"Run",
"(",
"ctxt",
"context",
".",
"Context",
")",
"error",
"{",
"s",
".",
"Lock",
"(",
")",
"\n",
"if",
"s",
".",
"started",
"{",
"defer",
"s",
".",
"Unlock",
"(",
")",
"\n",
"return",
"ErrAlreadyStarted",
... |
5,780 | all-5781 | [
"log",
"creates",
"log",
"record",
"and",
"submits",
"it",
"for",
"processing",
"."
] | [
"func",
"(",
"logger",
"*",
"Logger",
")",
"log",
"(",
"level",
"Level",
",",
"format",
"string",
",",
"a",
"...",
"interface",
"{",
"}",
")",
"{",
"var",
"message",
"string",
"\n",
"if",
"format",
"==",
"\"",
"\"",
"{",
"message",
"=",
"fmt",
".",... |
5,781 | all-5782 | [
"resourceVSphereResourcePoolReadTags",
"reads",
"the",
"tags",
"for",
"vsphere_resource_pool",
"."
] | [
"func",
"resourceVSphereResourcePoolReadTags",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"meta",
"interface",
"{",
"}",
",",
"rp",
"*",
"object",
".",
"ResourcePool",
")",
"error",
"{",
"if",
"tagsClient",
",",
"_",
":=",
"meta",
".",
"(",
"*",
... |
5,782 | all-5783 | [
"AcquireResponseRecorder",
"returns",
"a",
"ResponseRecorder"
] | [
"func",
"AcquireResponseRecorder",
"(",
"underline",
"<mask>",
".",
"ResponseWriter",
")",
"*",
"ResponseRecorder",
"{",
"v",
":=",
"rpool",
".",
"Get",
"(",
")",
"\n",
"var",
"res",
"*",
"ResponseRecorder",
"\n",
"if",
"v",
"!=",
"nil",
"{",
"res",
"=",
... |
5,783 | all-5784 | [
"GetThresholds",
"returns",
"the",
"Thresholds",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"o",
"*",
"<mask>",
")",
"GetThresholds",
"(",
")",
"ThresholdCount",
"{",
"if",
"o",
"==",
"nil",
"||",
"o",
".",
"Thresholds",
"==",
"nil",
"{",
"return",
"ThresholdCount",
"{",
"}",
"\n",
"}",
"\n",
"return",
"*",
"o",
".",
"Threshold... |
5,784 | all-5785 | [
"AddFlags",
"binds",
"flags",
"to",
"options"
] | [
"func",
"(",
"o",
"*",
"Options",
")",
"AddFlags",
"(",
"flags",
"*",
"flag",
".",
"FlagSet",
")",
"{",
"flags",
".",
"IntVar",
"(",
"&",
"o",
".",
"NumWorkers",
",",
"\"",
"\"",
",",
"25",
",",
"\"",
"\"",
")",
"\n",
"flags",
".",
"StringVar",
... |
5,785 | all-5786 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"a",
"specified",
"program",
"object"
] | [
"func",
"ProgramUniformMatrix3x4fv",
"(",
"<mask>",
"uint32",
",",
"location",
"int32",
",",
"count",
"int32",
",",
"transpose",
"bool",
",",
"value",
"*",
"float32",
")",
"{",
"C",
".",
"glowProgramUniformMatrix3x4fv",
"(",
"gpProgramUniformMatrix3x4fv",
",",
"("... |
5,786 | all-5787 | [
"render",
"indexed",
"primitives",
"from",
"array",
"data",
"taking",
"parameters",
"from",
"memory"
] | [
"func",
"DrawElementsIndirect",
"(",
"mode",
"uint32",
",",
"xtype",
"uint32",
",",
"indirect",
"unsafe",
".",
"Pointer",
")",
"{",
"C",
".",
"glowDrawElementsIndirect",
"(",
"gpDrawElementsIndirect",
",",
"(",
"C",
".",
"GLenum",
")",
"(",
"<mask>",
")",
",... |
5,787 | all-5788 | [
"cmps",
"returns",
"a",
"cmp",
"list",
"testing",
"no",
"writes",
"have",
"happened",
"past",
"rev"
] | [
"func",
"(",
"ws",
"writeSet",
")",
"cmps",
"(",
"rev",
"int64",
")",
"[",
"]",
"v3",
".",
"Cmp",
"{",
"cmps",
":=",
"make",
"(",
"[",
"]",
"v3",
".",
"Cmp",
",",
"0",
",",
"len",
"(",
"ws",
")",
")",
"\n",
"for",
"key",
":=",
"range",
"ws"... |
5,788 | all-5789 | [
"TouchPressDuration",
"returns",
"how",
"long",
"the",
"touch",
"remains",
"in",
"frames",
".",
"TouchPressDuration",
"is",
"concurrent",
"safe",
"."
] | [
"func",
"TouchPressDuration",
"(",
"id",
"int",
")",
"int",
"{",
"theInputState",
".",
"m",
".",
"RLock",
"(",
")",
"\n",
"s",
":=",
"theInputState",
".",
"touchDurations",
"[",
"<mask>",
"]",
"\n",
"theInputState",
".",
"m",
".",
"RUnlock",
"(",
")",
... |
5,789 | all-5790 | [
"NotifyDevice",
"sends",
"notification",
"data",
"to",
"devices"
] | [
"func",
"(",
"p",
"*",
"Pushy",
")",
"NotifyDevice",
"(",
"request",
"SendNotificationRequest",
")",
"(",
"*",
"NotificationResponse",
",",
"*",
"Error",
",",
"error",
")",
"{",
"url",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"p",
".",
"APIEn... |
5,790 | all-5791 | [
"Unwrap",
"same",
"thing",
"as",
"Contact",
"just",
"different",
"interface",
"combines",
"several",
"array",
"into",
"single",
"one"
] | [
"func",
"Unwrap",
"(",
"arrays",
"[",
"]",
"[",
"]",
"byte",
")",
"[",
"]",
"byte",
"{",
"var",
"result",
"[",
"]",
"byte",
"=",
"arrays",
"[",
"0",
"]",
"\n\n",
"for",
"_",
",",
"arr",
":=",
"range",
"arrays",
"[",
"1",
":",
"]",
"{",
"resul... |
5,791 | all-5792 | [
"WithTransitionType",
"intended",
"transition",
"type",
"."
] | [
"func",
"(",
"p",
"NavigateParams",
")",
"WithTransitionType",
"(",
"transitionType",
"TransitionType",
")",
"*",
"NavigateParams",
"{",
"p",
".",
"TransitionType",
"=",
"transitionType",
"\n",
"<mask>",
"&",
"p",
"\n",
"}"
] |
5,792 | all-5793 | [
"GetStateType",
"is",
"a",
"wrapper",
"around",
"g_action_get_state_type"
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"GetStateType",
"(",
")",
"*",
"VariantType",
"{",
"c",
":=",
"C",
".",
"g_action_get_state_type",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
... |
5,793 | all-5794 | [
"MustHello",
"retrieves",
"the",
"Hello",
"value",
"from",
"the",
"union",
"panicing",
"if",
"the",
"value",
"is",
"not",
"set",
"."
] | [
"func",
"(",
"u",
"StellarMessage",
")",
"MustHello",
"(",
")",
"Hello",
"{",
"val",
",",
"<mask>",
":=",
"u",
".",
"GetHello",
"(",
")",
"\n\n",
"if",
"!",
"ok",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"return",
"val",
"\n",
"}"
] |
5,794 | all-5795 | [
"Delete",
"deletes",
"a",
"key",
"/",
"value",
"pair",
"."
] | [
"func",
"(",
"c",
"*",
"Cache",
")",
"Delete",
"(",
"key",
"string",
")",
"error",
"{",
"c",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"mu",
".",
"Unlock",
"(",
")",
"\n",
"if",
"!",
"c",
".",
"<mask>",
"[",
"key",
"]",
"{"... |
5,795 | all-5796 | [
"UnlockServer",
"unlocks",
"a",
"previously",
"locked",
"existing",
"server",
"allowing",
"destruction",
"again",
".",
"Deprecated",
"use",
"UnLockResource",
"instead",
"."
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"UnlockServer",
"(",
"identifier",
"string",
")",
"error",
"{",
"return",
"c",
".",
"UnLockResource",
"(",
"<mask>",
"{",
"Id",
":",
"identifier",
"}",
")",
"\n",
"}"
] |
5,796 | all-5797 | [
"AgentAfterUncooperativeCloseRequest",
"sets",
"channel",
"s",
"status",
"to",
"challenge",
"period",
"."
] | [
"func",
"(",
"w",
"*",
"Worker",
")",
"AgentAfterUncooperativeCloseRequest",
"(",
"job",
"*",
"data",
".",
"Job",
")",
"error",
"{",
"logger",
":=",
"w",
".",
"logger",
".",
"Add",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"job",
")",... |
5,797 | all-5798 | [
"Status",
"returns",
"the",
"service",
"instance",
"status",
"."
] | [
"func",
"(",
"si",
"*",
"ServiceInstance",
")",
"Status",
"(",
"requestID",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"s",
",",
"err",
":=",
"Get",
"(",
"si",
".",
"ServiceName",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"\"",... |
5,798 | all-5799 | [
"Comment",
"inserts",
"the",
"comment",
"character",
"in",
"lines",
"that",
"mach",
"any",
"regular",
"expression",
"in",
"reLine",
"."
] | [
"func",
"(",
"e",
"*",
"edit",
")",
"Comment",
"(",
"reLine",
"[",
"]",
"string",
")",
"error",
"{",
"allReSearch",
":=",
"make",
"(",
"[",
"]",
"*",
"regexp",
".",
"Regexp",
",",
"len",
"(",
"reLine",
")",
")",
"\n\n",
"for",
"i",
",",
"v",
":... |
5,799 | all-5800 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"a",
"specified",
"program",
"object"
] | [
"func",
"ProgramUniform3iv",
"(",
"program",
"uint32",
",",
"<mask>",
"int32",
",",
"count",
"int32",
",",
"value",
"*",
"int32",
")",
"{",
"C",
".",
"glowProgramUniform3iv",
"(",
"gpProgramUniform3iv",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"program",
")... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.