id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
23,300 | all-23301 | [
"Validate",
"is",
"middleware",
"to",
"enforce",
"required",
"fields",
".",
"If",
"the",
"struct",
"passed",
"in",
"is",
"a",
"Validator",
"then",
"the",
"user",
"-",
"defined",
"Validate",
"method",
"is",
"executed",
"and",
"its",
"errors",
"are",
"mapped",... | [
"func",
"Validate",
"(",
"obj",
"interface",
"{",
"}",
")",
"martini",
".",
"Handler",
"{",
"return",
"func",
"(",
"context",
"martini",
".",
"Context",
",",
"req",
"*",
"http",
".",
"Request",
")",
"{",
"errors",
":=",
"newErrors",
"(",
")",
"\n",
"... |
23,301 | all-23302 | [
"Error",
"implements",
"the",
"Error",
"interface",
"."
] | [
"func",
"(",
"e",
"*",
"hdbError",
")",
"<mask>",
"(",
")",
"string",
"{",
"if",
"e",
".",
"stmtNo",
"!=",
"-",
"1",
"{",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"e",
".",
"errorLevel",
",",
"e",
".",
"errorCode",
",",
"e",
".",
... |
23,302 | all-23303 | [
"Run",
"implements",
"the",
"Discoverer",
"interface",
"."
] | [
"func",
"(",
"d",
"*",
"Discovery",
")",
"Run",
"(",
"ctx",
"context",
".",
"Context",
",",
"ch",
"chan",
"<-",
"[",
"]",
"*",
"targetgroup",
".",
"Group",
")",
"{",
"if",
"d",
".",
"finalizer",
"!=",
"nil",
"{",
"defer",
"d",
".",
"finalizer",
"... |
23,303 | all-23304 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"SetShowScrollBottleneckRectsParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"<mask>",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay1",... |
23,304 | all-23305 | [
"After",
"some",
"interval",
"time",
"goto",
"check",
"the",
"current",
"fileLogger",
"s",
"size",
"or",
"date"
] | [
"func",
"(",
"f",
"*",
"FileLogger",
")",
"fileMonitor",
"(",
")",
"{",
"defer",
"func",
"(",
")",
"{",
"if",
"err",
":=",
"recover",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"f",
".",
"lg",
".",
"Printf",
"(",
"\"",
"\\n",
"\"",
",",
"err",
"... |
23,305 | all-23306 | [
"newProcess",
"constructs",
"and",
"returns",
"a",
"Process",
".",
"It",
"will",
"call",
"tf",
"TeardownFunc",
"exactly",
"once",
":",
"**",
"after",
"**",
"all",
"children",
"have",
"fully",
"Closed",
"**",
"after",
"**",
"entering",
"<",
"-",
"Closing",
... | [
"func",
"newProcess",
"(",
"tf",
"TeardownFunc",
")",
"*",
"process",
"{",
"return",
"&",
"process",
"{",
"teardown",
":",
"tf",
",",
"closed",
":",
"make",
"(",
"chan",
"struct",
"{",
"}",
")",
",",
"closing",
":",
"make",
"(",
"chan",
"struct",
"{"... |
23,306 | all-23307 | [
"Cert",
"attempts",
"to",
"parse",
"the",
"certificate",
"string",
"to",
"return",
"it",
"as",
"an",
"object",
".",
"If",
"the",
"certificate",
"is",
"an",
"empty",
"string",
"(",
"e",
".",
"g",
".",
"in",
"the",
"case",
"of",
"permanent",
"credentials",... | [
"func",
"(",
"creds",
"*",
"Credentials",
")",
"Cert",
"(",
")",
"(",
"cert",
"*",
"Certificate",
",",
"err",
"error",
")",
"{",
"if",
"creds",
".",
"Certificate",
"==",
"\"",
"\"",
"{",
"return",
"\n",
"}",
"\n",
"cert",
"=",
"new",
"(",
"Certific... |
23,307 | all-23308 | [
"InstanceCombinationLocator",
"builds",
"a",
"locator",
"from",
"the",
"given",
"href",
"."
] | [
"func",
"(",
"api",
"*",
"API",
")",
"InstanceCombinationLocator",
"(",
"href",
"string",
")",
"*",
"InstanceCombinationLocator",
"{",
"<mask>",
"&",
"InstanceCombinationLocator",
"{",
"Href",
"(",
"href",
")",
",",
"api",
"}",
"\n",
"}"
] |
23,308 | all-23309 | [
"CopyFileToHost",
"copies",
"a",
"file",
"or",
"directory",
"from",
"the",
"guest",
"operating",
"system",
"to",
"the",
"local",
"system",
"(",
"where",
"the",
"VIX",
"client",
"is",
"running",
")",
".",
"Parameters",
":",
"guestpath",
":",
"The",
"path",
... | [
"func",
"(",
"g",
"*",
"Guest",
")",
"CopyFileToHost",
"(",
"guestpath",
",",
"hostpath",
"string",
")",
"error",
"{",
"var",
"jobHandle",
"C",
".",
"VixHandle",
"=",
"C",
".",
"VIX_INVALID_HANDLE",
"\n",
"var",
"err",
"C",
".",
"VixError",
"=",
"C",
"... |
23,309 | all-23310 | [
"UnmarshalJSON",
"implements",
"the",
"json",
".",
"Unmarshaler",
"interface",
"."
] | [
"func",
"(",
"prm",
"*",
"prmMatchRepoDigestOrExact",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"<mask>",
")",
"error",
"{",
"*",
"prm",
"=",
"prmMatchRepoDigestOrExact",
"{",
"}",
"\n",
"var",
"tmp",
"prmMatchRepoDigestOrExact",
"\n",
"if",
"err",
":=",
... |
23,310 | all-23311 | [
"TODO",
"(",
"jrick",
")",
"GetSource",
"(",
"depends",
"on",
"Pattern",
")",
"SetAntialias",
"is",
"a",
"wrapper",
"around",
"cairo_set_antialias",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"SetAntialias",
"(",
"antialias",
"Antialias",
")",
"{",
"C",
".",
"cairo_set_antialias",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"cairo_antialias_t",
"(",
"antialias",
")",
")",
"\n",
"}"
] |
23,311 | all-23312 | [
"NewCatalogDatacentersQuery",
"creates",
"a",
"new",
"datacenter",
"dependency",
"."
] | [
"func",
"NewCatalogDatacentersQuery",
"(",
"ignoreFailing",
"bool",
")",
"(",
"*",
"CatalogDatacentersQuery",
",",
"error",
")",
"{",
"return",
"&",
"CatalogDatacentersQuery",
"{",
"ignoreFailing",
":",
"ignoreFailing",
",",
"stopCh",
":",
"<mask>",
"(",
"chan",
"... |
23,312 | all-23313 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SignedExchangeError",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork8",
"(",
"&",
"w",
",",
"v",
")... |
23,313 | all-23314 | [
"NewNodeFilter",
"创建节点过滤器,实现敏感词的过滤",
"从切片中读取敏感词数据"
] | [
"func",
"NewNodeFilter",
"(",
"text",
"[",
"]",
"string",
")",
"DirtyFilter",
"{",
"nf",
":=",
"&",
"nodeFilter",
"{",
"<mask>",
":",
"newNode",
"(",
")",
",",
"}",
"\n",
"for",
"i",
",",
"l",
":=",
"0",
",",
"len",
"(",
"text",
")",
";",
"i",
... |
23,314 | all-23315 | [
"Fetch",
"retrieves",
"all",
"types",
"of",
"events",
"and",
"push",
"them",
"to",
"output",
"channels"
] | [
"func",
"(",
"f",
"*",
"Fetcher",
")",
"Fetch",
"(",
"db",
"*",
"gorm",
".",
"DB",
")",
"error",
"{",
"if",
"err",
":=",
"f",
".",
"fetchRecentIssues",
"(",
"<mask>",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"if",
"e... |
23,315 | all-23316 | [
"Intersects",
"returns",
"true",
"if",
"there",
"is",
"some",
"tree",
"node",
"intersecting",
"the",
"given",
"interval",
"."
] | [
"func",
"(",
"ivt",
"*",
"IntervalTree",
")",
"Intersects",
"(",
"iv",
"Interval",
")",
"bool",
"{",
"x",
":=",
"ivt",
".",
"root",
"\n",
"for",
"x",
"!=",
"nil",
"&&",
"<mask>",
".",
"Compare",
"(",
"&",
"x",
".",
"iv",
".",
"Ivl",
")",
"!=",
... |
23,316 | all-23317 | [
"GetManageStatusShowTitle",
"returns",
"the",
"ManageStatusShowTitle",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"w",
"*",
"Widget",
")",
"GetManageStatusShowTitle",
"(",
")",
"bool",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"ManageStatusShowTitle",
"==",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n",
"return",
"*",
"w",
".",
"ManageStatusShowTit... |
23,317 | all-23318 | [
"LoadPackage",
"parses",
"a",
"text",
"string",
"."
] | [
"func",
"LoadPackage",
"(",
"parser",
"<mask>",
",",
"name",
",",
"text",
"string",
")",
"(",
"Package",
",",
"error",
")",
"{",
"return",
"parser",
".",
"Parse",
"(",
"name",
",",
"text",
")",
"\n",
"}"
] |
23,318 | all-23319 | [
"TriggerIncidentKey",
"triggers",
"an",
"incident",
"using",
"the",
"default",
"client",
"with",
"a",
"given",
"incident",
"key",
"only",
"if",
"that",
"incident",
"has",
"been",
"resolved",
"or",
"if",
"that",
"incident",
"doesn",
"t",
"exist",
"yet",
"."
] | [
"func",
"TriggerIncidentKey",
"(",
"description",
"string",
",",
"key",
"string",
")",
"(",
"incidentKey",
"string",
",",
"err",
"error",
")",
"{",
"return",
"trigger",
"(",
"description",
",",
"<mask>",
",",
"map",
"[",
"string",
"]",
"interface",
"{",
"}... |
23,319 | all-23320 | [
"NewPrivate",
"constructs",
"ecdsa",
".",
"PrivateKey",
"from",
"given",
"(",
"X",
"Y",
")",
"and",
"D"
] | [
"func",
"NewPrivate",
"(",
"x",
",",
"y",
",",
"d",
"[",
"]",
"<mask>",
")",
"(",
"*",
"ecdsa",
".",
"PrivateKey",
")",
"{",
"return",
"&",
"ecdsa",
".",
"PrivateKey",
"{",
"D",
":",
"new",
"(",
"big",
".",
"Int",
")",
".",
"SetBytes",
"(",
"d"... |
23,320 | all-23321 | [
"SplitPort",
"splits",
"port",
"number",
"and",
"protocol",
"name",
"from",
"Ports",
"string",
"."
] | [
"func",
"(",
"s",
"NetworkSettings",
")",
"SplitPort",
"(",
"<mask>",
"int",
")",
"(",
"uint16",
",",
"string",
")",
"{",
"ptProt",
",",
"_",
":=",
"s",
".",
"PortAt",
"(",
"index",
")",
"\n",
"vect",
":=",
"strings",
".",
"Split",
"(",
"ptProt",
"... |
23,321 | all-23322 | [
"Print",
"qualifiers",
"as",
"an",
"inner",
"type",
"by",
"just",
"printing",
"the",
"qualifiers",
"."
] | [
"func",
"(",
"twq",
"*",
"TypeWithQualifiers",
")",
"printInner",
"(",
"<mask>",
"*",
"printState",
")",
"{",
"ps",
".",
"writeByte",
"(",
"' '",
")",
"\n",
"ps",
".",
"writeString",
"(",
"strings",
".",
"Join",
"(",
"twq",
".",
"Qualifiers",
",",
"\""... |
23,322 | all-23323 | [
"----------------------------------------",
".",
"String",
"()"
] | [
"func",
"(",
"ti",
"TypeInfo",
")",
"String",
"(",
")",
"string",
"{",
"buf",
":=",
"new",
"(",
"bytes",
".",
"Buffer",
")",
"\n",
"buf",
".",
"Write",
"(",
"[",
"]",
"byte",
"(",
"\"",
"\"",
")",
")",
"\n",
"buf",
".",
"Write",
"(",
"[",
"]"... |
23,323 | all-23324 | [
"getCWStatsSet",
"gets",
"the",
"stats",
"set",
"for",
"either",
"CPU",
"or",
"Memory",
"based",
"on",
"the",
"function",
"pointer",
"."
] | [
"func",
"(",
"<mask>",
"*",
"Queue",
")",
"getCWStatsSet",
"(",
"f",
"getUsageFunc",
")",
"(",
"*",
"ecstcs",
".",
"CWStatsSet",
",",
"error",
")",
"{",
"queue",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"queue",
".",
"lock",
".",
"Unlock",
... |
23,324 | all-23325 | [
"repackage",
"repackages",
"the",
"main",
"package",
"specified",
"in",
"the",
"provided",
"configuration",
"and",
"re",
"-",
"writes",
"them",
"into",
"the",
"provided",
"output",
"directory",
".",
"The",
"repackaged",
"files",
"are",
"placed",
"into",
"a",
"... | [
"func",
"repackage",
"(",
"config",
"Config",
",",
"outputDir",
"string",
")",
"error",
"{",
"if",
"outputDirInfo",
",",
"err",
":=",
"os",
".",
"Stat",
"(",
"outputDir",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"<mask>",
".",
"Wrapf",
"(",
"err",
... |
23,325 | all-23326 | [
"GetType",
"returns",
"the",
"Type",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"e",
"*",
"EventStreamDefinition",
")",
"GetType",
"(",
")",
"string",
"{",
"if",
"e",
"==",
"nil",
"||",
"e",
".",
"Type",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"e",
".",
"<mask>",
"\n",
"}"
] |
23,326 | all-23327 | [
"PopupAtStatusIcon",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_menu_popup",
"()",
"specific",
"to",
"usage",
"with",
"GtkStatusIcon",
".",
"gomenu_popup",
"()",
"is",
"defined",
"in",
"menu",
".",
"go",
".",
"h",
"this",
"is",
"a",
"workaround",
"to",
"pass... | [
"func",
"(",
"v",
"*",
"Menu",
")",
"PopupAtStatusIcon",
"(",
"statusIcon",
"*",
"StatusIcon",
",",
"button",
"uint",
",",
"activateTime",
"uint32",
")",
"{",
"C",
".",
"gotk_menu_popup_at_status_icon",
"(",
"v",
".",
"native",
"(",
")",
",",
"statusIcon",
... |
23,327 | all-23328 | [
"Do",
"executes",
"Input",
".",
"insertText",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"InsertTextParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandInsertText",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
23,328 | all-23329 | [
"UrlFor",
"returns",
"the",
"avsolute",
"URL",
"for",
"the",
"route",
"name",
".",
"UrlBase",
"is",
"used",
"for",
"the",
"URL",
"Host",
"and",
"Scheme"
] | [
"func",
"AbsoluteUrlFor",
"(",
"name",
"string",
",",
"args",
"...",
"string",
")",
"*",
"url",
".",
"URL",
"{",
"u",
":=",
"UrlFor",
"(",
"<mask>",
",",
"args",
"...",
")",
"\n",
"u",
".",
"Host",
"=",
"UrlBase",
".",
"Host",
"\n",
"u",
".",
"Sc... |
23,329 | all-23330 | [
"Wrap",
"is",
"used",
"to",
"create",
"a",
"new",
"instrumented",
"driver",
"it",
"takes",
"a",
"vendor",
"specific",
"driver",
"and",
"a",
"Hooks",
"instance",
"to",
"produce",
"a",
"new",
"driver",
"instance",
".",
"It",
"s",
"usually",
"used",
"inside",... | [
"func",
"Wrap",
"(",
"driver",
"driver",
".",
"Driver",
",",
"hooks",
"Hooks",
")",
"driver",
".",
"Driver",
"{",
"return",
"&",
"Driver",
"{",
"<mask>",
",",
"hooks",
"}",
"\n",
"}"
] |
23,330 | all-23331 | [
"Print",
"is",
"a",
"dummy",
"method",
"."
] | [
"func",
"(",
"l",
"*",
"nullLogger",
")",
"Print",
"(",
"start",
"<mask>",
".",
"Time",
",",
"query",
"string",
",",
"args",
"...",
"interface",
"{",
"}",
")",
"error",
"{",
"return",
"nil",
"\n",
"}"
] |
23,331 | all-23332 | [
"TreeRowReferenceNew",
"is",
"a",
"wrapper",
"around",
"gtk_tree_row_reference_new",
"()",
"."
] | [
"func",
"TreeRowReferenceNew",
"(",
"model",
"*",
"TreeModel",
",",
"path",
"*",
"TreePath",
")",
"(",
"*",
"TreeRowReference",
",",
"error",
")",
"{",
"c",
":=",
"C",
".",
"gtk_tree_row_reference_new",
"(",
"model",
".",
"native",
"(",
")",
",",
"path",
... |
23,332 | all-23333 | [
"A",
"factory",
"method",
"that",
"enables",
"various",
"MetricsClients",
"to",
"be",
"created",
"."
] | [
"func",
"NewMetricsClient",
"(",
"api",
"APIType",
",",
"registry",
"*",
"prometheus",
".",
"Registry",
")",
"MetricsClient",
"{",
"switch",
"api",
"{",
"case",
"DockerAPI",
":",
"return",
"NewGenericMetricsClient",
"(",
"DockerSubsystem",
",",
"registry",
")",
... |
23,333 | all-23334 | [
"SetTransientFor",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_native_dialog_set_transient_for",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"NativeDialog",
")",
"SetTransientFor",
"(",
"parent",
"IWindow",
")",
"{",
"<mask>",
"pw",
"*",
"C",
".",
"GtkWindow",
"=",
"nil",
"\n",
"if",
"parent",
"!=",
"nil",
"{",
"pw",
"=",
"parent",
".",
"toWindow",
"(",
")",
"\n",
... |
23,334 | all-23335 | [
"NewIssueEvent",
"creates",
"a",
"new",
"(",
"orm",
")",
"Issue",
"from",
"a",
"github",
"Issue"
] | [
"func",
"NewIssueEvent",
"(",
"gIssueEvent",
"*",
"github",
".",
"IssueEvent",
",",
"issueID",
"int",
",",
"repository",
"string",
")",
"(",
"*",
"sql",
".",
"IssueEvent",
",",
"error",
")",
"{",
"if",
"gIssueEvent",
".",
"ID",
"==",
"nil",
"||",
"gIssue... |
23,335 | all-23336 | [
"TrackAnonymous",
"sends",
"a",
"single",
"event",
"to",
"Customer",
".",
"io",
"for",
"the",
"anonymous",
"user"
] | [
"func",
"(",
"c",
"*",
"CustomerIO",
")",
"TrackAnonymous",
"(",
"eventName",
"string",
",",
"data",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"error",
"{",
"body",
":=",
"<mask>",
"[",
"string",
"]",
"interface",
"{",
"}",
"{",
"\"",
"\... |
23,336 | all-23337 | [
"NewLease",
"wraps",
"a",
"Lease",
"interface",
"to",
"filter",
"for",
"only",
"keys",
"with",
"a",
"prefix",
"and",
"remove",
"that",
"prefix",
"when",
"fetching",
"attached",
"keys",
"through",
"TimeToLive",
"."
] | [
"func",
"NewLease",
"(",
"l",
"clientv3",
".",
"Lease",
",",
"prefix",
"string",
")",
"clientv3",
".",
"Lease",
"{",
"return",
"&",
"leasePrefix",
"{",
"l",
",",
"[",
"]",
"byte",
"(",
"<mask>",
")",
"}",
"\n",
"}"
] |
23,337 | all-23338 | [
"DeepCopyInto",
"is",
"an",
"autogenerated",
"deepcopy",
"function",
"copying",
"the",
"receiver",
"writing",
"into",
"out",
".",
"in",
"must",
"be",
"non",
"-",
"nil",
"."
] | [
"func",
"(",
"in",
"*",
"Refs",
")",
"DeepCopyInto",
"(",
"out",
"*",
"Refs",
")",
"{",
"*",
"out",
"=",
"*",
"in",
"\n",
"if",
"in",
".",
"Pulls",
"!=",
"nil",
"{",
"in",
",",
"out",
":=",
"&",
"<mask>",
".",
"Pulls",
",",
"&",
"out",
".",
... |
23,338 | all-23339 | [
"Start",
"all",
"the",
"tasks",
"in",
"the",
"group",
"."
] | [
"func",
"(",
"g",
"*",
"Group",
")",
"Start",
"(",
")",
"{",
"ctx",
":=",
"context",
".",
"Background",
"(",
")",
"\n",
"ctx",
",",
"g",
".",
"cancel",
"=",
"context",
".",
"WithCancel",
"(",
"ctx",
")",
"\n",
"g",
".",
"wg",
".",
"Add",
"(",
... |
23,339 | all-23340 | [
"GetFacet",
"returns",
"the",
"Facet",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"a",
"*",
"ApmOrLogQueryGroupBy",
")",
"GetFacet",
"(",
")",
"<mask>",
"{",
"if",
"a",
"==",
"nil",
"||",
"a",
".",
"Facet",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"a",
".",
"Facet",
"\n",
"}"
] |
23,340 | all-23341 | [
"InsertBefore",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_list_store_insert_before",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"ListStore",
")",
"InsertBefore",
"(",
"sibling",
"*",
"TreeIter",
")",
"*",
"TreeIter",
"{",
"<mask>",
"ti",
"C",
".",
"GtkTreeIter",
"\n",
"C",
".",
"gtk_list_store_insert_before",
"(",
"v",
".",
"native",
"(",
")",
",",
"&",
"... |
23,341 | all-23342 | [
"RemoveSvcAcknowledgement",
"creates",
"a",
"new",
"REMOVE_SVC_ACKNOWLEDGEMENT",
"Nagios",
"command",
".",
"This",
"removes",
"the",
"problem",
"acknowledgement",
"for",
"a",
"particular",
"service",
".",
"Once",
"the",
"acknowledgement",
"has",
"been",
"removed",
"no... | [
"func",
"RemoveSvcAcknowledgement",
"(",
"host_name",
"<mask>",
",",
"service_description",
"string",
",",
")",
"*",
"livestatus",
".",
"Command",
"{",
"return",
"livestatus",
".",
"NewCommand",
"(",
"\"",
"\"",
",",
"stringifyArg",
"(",
"\"",
"\"",
",",
"\"",... |
23,342 | all-23343 | [
"WriteString",
"writes",
"string",
"data",
"into",
"the",
"response",
"object",
"."
] | [
"func",
"(",
"ctx",
"*",
"Cotex",
")",
"WriteString",
"(",
"<mask>",
"string",
")",
"{",
"ctx",
".",
"ResponseWriter",
".",
"Write",
"(",
"[",
"]",
"byte",
"(",
"content",
")",
")",
"\n",
"}"
] |
23,343 | all-23344 | [
"SetHeaders",
"sets",
"the",
"message",
"headers",
"."
] | [
"func",
"(",
"m",
"*",
"Message",
")",
"SetHeaders",
"(",
"h",
"<mask>",
"[",
"string",
"]",
"[",
"]",
"string",
")",
"{",
"for",
"k",
",",
"v",
":=",
"range",
"h",
"{",
"m",
".",
"SetHeader",
"(",
"k",
",",
"v",
"...",
")",
"\n",
"}",
"\n",
... |
23,344 | all-23345 | [
"Equals",
"returns",
"true",
"if",
"other",
"is",
"equivalent",
"to",
"aid"
] | [
"func",
"(",
"aid",
"*",
"AccountId",
")",
"Equals",
"(",
"other",
"AccountId",
")",
"bool",
"{",
"if",
"aid",
".",
"<mask>",
"!=",
"other",
".",
"Type",
"{",
"return",
"false",
"\n",
"}",
"\n\n",
"switch",
"aid",
".",
"Type",
"{",
"case",
"CryptoKey... |
23,345 | all-23346 | [
"Encode",
"encodes",
"given",
"byte",
"array",
"to",
"base64url",
"string"
] | [
"func",
"Encode",
"(",
"data",
"[",
"]",
"byte",
")",
"string",
"{",
"result",
":=",
"base64",
".",
"StdEncoding",
".",
"EncodeToString",
"(",
"data",
")",
"\n",
"<mask>",
"=",
"strings",
".",
"Replace",
"(",
"result",
",",
"\"",
"\"",
",",
"\"",
"\"... |
23,346 | all-23347 | [
"render",
"multiple",
"sets",
"of",
"primitives",
"from",
"array",
"data",
"taking",
"parameters",
"from",
"memory"
] | [
"func",
"MultiDrawArraysIndirect",
"(",
"mode",
"uint32",
",",
"indirect",
"unsafe",
".",
"Pointer",
",",
"drawcount",
"int32",
",",
"stride",
"int32",
")",
"{",
"C",
".",
"glowMultiDrawArraysIndirect",
"(",
"gpMultiDrawArraysIndirect",
",",
"(",
"C",
".",
"GLen... |
23,347 | all-23348 | [
"Encode",
"image",
".",
"Image",
"with",
"Mapniks",
"image",
"encoder",
".",
"This",
"is",
"optimized",
"for",
"*",
"image",
".",
"NRGBA",
"or",
"*",
"image",
".",
"RGBA",
"."
] | [
"func",
"Encode",
"(",
"img",
"image",
".",
"Image",
",",
"<mask>",
"string",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"tmp",
":=",
"toNRGBA",
"(",
"img",
")",
"\n",
"i",
":=",
"C",
".",
"mapnik_image_from_raw",
"(",
"(",
"*",
"C",
"."... |
23,348 | all-23349 | [
"Do",
"executes",
"CSS",
".",
"setStyleTexts",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"styles",
"-",
"The",
"resulting",
"styles",
"after",
"modification",
"."
] | [
"func",
"(",
"p",
"*",
"SetStyleTextsParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"styles",
"[",
"]",
"*",
"Style",
",",
"err",
"error",
")",
"{",
"// execute",
"var",
"res",
"SetStyleTextsReturns",
"\n",
"err",
"=",
"cdp",
".",
... |
23,349 | all-23350 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SetFileInputFilesParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom7",
"(",
"&",
"w",
",",
"v",
")... |
23,350 | all-23351 | [
"IssuingCertificateURL",
"is",
"an",
"Option",
"for",
"setting",
"the",
"identity",
"s",
"certificate",
"s",
"IssuingCertificateURL",
"."
] | [
"func",
"IssuingCertificateURL",
"(",
"<mask>",
"...",
"string",
")",
"Option",
"{",
"return",
"func",
"(",
"c",
"*",
"configuration",
")",
"{",
"c",
".",
"issuingCertificateURL",
"=",
"append",
"(",
"c",
".",
"issuingCertificateURL",
",",
"value",
"...",
")... |
23,351 | all-23352 | [
"NewLeaderStats",
"generates",
"a",
"new",
"LeaderStats",
"with",
"the",
"given",
"id",
"as",
"leader"
] | [
"func",
"NewLeaderStats",
"(",
"id",
"string",
")",
"*",
"LeaderStats",
"{",
"return",
"&",
"LeaderStats",
"{",
"leaderStats",
":",
"leaderStats",
"{",
"Leader",
":",
"<mask>",
",",
"Followers",
":",
"make",
"(",
"map",
"[",
"string",
"]",
"*",
"FollowerSt... |
23,352 | all-23353 | [
"Template",
"renders",
"the",
"named",
"files",
"using",
"the",
"specified",
"content",
"type",
"and",
"the",
"github",
".",
"com",
"/",
"gobuffalo",
"/",
"plush",
"package",
"for",
"templating",
".",
"If",
"more",
"than",
"1",
"file",
"is",
"provided",
"t... | [
"func",
"Template",
"(",
"c",
"string",
",",
"<mask>",
"...",
"string",
")",
"Renderer",
"{",
"e",
":=",
"New",
"(",
"Options",
"{",
"}",
")",
"\n",
"return",
"e",
".",
"Template",
"(",
"c",
",",
"names",
"...",
")",
"\n",
"}"
] |
23,353 | all-23354 | [
"void",
"pango_cairo_show_layout",
"(",
"cairo_t",
"*",
"cr",
"PangoLayout",
"*",
"layout",
")",
";"
] | [
"func",
"CairoShowLayout",
"(",
"cr",
"*",
"cairo",
".",
"Context",
",",
"<mask>",
"*",
"Layout",
")",
"{",
"C",
".",
"pango_cairo_show_layout",
"(",
"cairo_context",
"(",
"cr",
")",
",",
"layout",
".",
"native",
"(",
")",
")",
"\n",
"}"
] |
23,354 | all-23355 | [
"title",
":",
"node",
"healing",
"info",
"path",
":",
"/",
"healing",
"/",
"node",
"method",
":",
"GET",
"produce",
":",
"application",
"/",
"json",
"responses",
":",
"200",
":",
"Ok",
"401",
":",
"Unauthorized"
] | [
"func",
"nodeHealingRead",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"error",
"{",
"pools",
",",
"err",
":=",
"permission",
".",
"ListContextValues",
"(",
"t",
",",
"permission",
... |
23,355 | all-23356 | [
"ServePProf",
"sets",
"up",
"a",
"handler",
"for",
"pprof",
"debug",
"endpoints",
"and",
"starts",
"a",
"server",
"for",
"them",
"asynchronously",
".",
"The",
"contents",
"of",
"this",
"function",
"are",
"identical",
"to",
"what",
"the",
"net",
"/",
"http",
... | [
"func",
"ServePProf",
"(",
")",
"{",
"pprofMux",
":=",
"<mask>",
".",
"NewServeMux",
"(",
")",
"\n",
"pprofMux",
".",
"HandleFunc",
"(",
"\"",
"\"",
",",
"pprof",
".",
"Index",
")",
"\n",
"pprofMux",
".",
"HandleFunc",
"(",
"\"",
"\"",
",",
"pprof",
... |
23,356 | all-23357 | [
"Set",
"is",
"required",
"for",
"kingpin",
"interfaces",
"to",
"allow",
"command",
"line",
"params",
"to",
"be",
"set",
"to",
"our",
"map",
"datatype"
] | [
"func",
"(",
"o",
"*",
"ListUint32Option",
")",
"<mask>",
"(",
"value",
"string",
")",
"error",
"{",
"val",
":=",
"Uint32Option",
"{",
"}",
"\n",
"val",
".",
"Set",
"(",
"value",
")",
"\n",
"*",
"o",
"=",
"append",
"(",
"*",
"o",
",",
"val",
")",... |
23,357 | all-23358 | [
"LoadRulesFromFile",
"loads",
"rules",
"from",
"a",
"YAML",
"file",
"."
] | [
"func",
"(",
"s",
"*",
"Seekret",
")",
"LoadRulesFromFile",
"(",
"file",
"string",
",",
"defaulEnabled",
"bool",
")",
"error",
"{",
"var",
"ruleYamlMap",
"map",
"[",
"string",
"]",
"ruleYaml",
"\n\n",
"if",
"file",
"==",
"\"",
"\"",
"{",
"return",
"nil",... |
23,358 | all-23359 | [
"GetTriggeringValueOk",
"returns",
"a",
"tuple",
"with",
"the",
"TriggeringValue",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"g",
"*",
"GroupData",
")",
"GetTriggeringValueOk",
"(",
")",
"(",
"TriggeringValue",
",",
"bool",
")",
"{",
"if",
"g",
"==",
"nil",
"||",
"g",
".",
"TriggeringValue",
"==",
"nil",
"{",
"return",
"TriggeringValue",
"{",
"}",
",",
"<mask>",
... |
23,359 | all-23360 | [
"RestartNode",
"is",
"similar",
"to",
"StartNode",
"but",
"does",
"not",
"take",
"a",
"list",
"of",
"peers",
".",
"The",
"current",
"membership",
"of",
"the",
"cluster",
"will",
"be",
"restored",
"from",
"the",
"Storage",
".",
"If",
"the",
"caller",
"has",... | [
"func",
"RestartNode",
"(",
"c",
"*",
"Config",
")",
"Node",
"{",
"r",
":=",
"newRaft",
"(",
"c",
")",
"\n\n",
"n",
":=",
"newNode",
"(",
")",
"\n",
"n",
".",
"logger",
"=",
"c",
".",
"Logger",
"\n",
"<mask>",
"n",
".",
"run",
"(",
"r",
")",
... |
23,360 | all-23361 | [
"MustTxSet",
"retrieves",
"the",
"TxSet",
"value",
"from",
"the",
"union",
"panicing",
"if",
"the",
"value",
"is",
"not",
"set",
"."
] | [
"func",
"(",
"u",
"StellarMessage",
")",
"MustTxSet",
"(",
")",
"TransactionSet",
"{",
"val",
",",
"ok",
":=",
"u",
".",
"GetTxSet",
"(",
")",
"\n\n",
"if",
"!",
"<mask>",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"return",
"val",
"\n"... |
23,361 | all-23362 | [
"NewDialer",
"creates",
"a",
"new",
"Dialer",
"object",
".",
"Before",
"any",
"calls",
"to",
"Dial",
"are",
"made",
"underlying",
"dialers",
"must",
"be",
"added",
"with",
"AddDialer",
"and",
"Protector",
"(",
"if",
"any",
")",
"must",
"be",
"set",
"."
] | [
"func",
"NewDialer",
"(",
"p",
"peer",
".",
"ID",
",",
"pk",
"ci",
".",
"PrivKey",
",",
"wrap",
"ConnWrapper",
")",
"*",
"Dialer",
"{",
"return",
"&",
"Dialer",
"{",
"LocalPeer",
":",
"p",
",",
"PrivateKey",
":",
"pk",
",",
"Wrapper",
":",
"<mask>",
... |
23,362 | all-23363 | [
"GetTextAlign",
"returns",
"the",
"TextAlign",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"a",
"*",
"AlertValueDefinition",
")",
"GetTextAlign",
"(",
")",
"<mask>",
"{",
"if",
"a",
"==",
"nil",
"||",
"a",
".",
"TextAlign",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"a",
".",
"TextAlign",
"\n",
"... |
23,363 | all-23364 | [
"Implements",
"Err"
] | [
"func",
"(",
"e",
"*",
"err",
")",
"Info",
"(",
"key",
"string",
")",
"interface",
"{",
"}",
"{",
"if",
"e",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"return",
"e",
".",
"info",
"[",
"key",
"]",
"\n",
"}"
] |
23,364 | all-23365 | [
"flattenVMwareUplinkLacpPolicy",
"reads",
"various",
"fields",
"from",
"a",
"VMwareUplinkLacpPolicy",
"into",
"the",
"passed",
"in",
"ResourceData",
"."
] | [
"func",
"flattenVMwareUplinkLacpPolicy",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"obj",
"*",
"<mask>",
".",
"VMwareUplinkLacpPolicy",
")",
"error",
"{",
"if",
"obj",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"structure",
".",
"SetBoolP... |
23,365 | all-23366 | [
"GetCachedSecretValue",
"retrieves",
"the",
"secret",
"value",
"from",
"secretData",
"field"
] | [
"func",
"(",
"secret",
"*",
"SSMSecretResource",
")",
"GetCachedSecretValue",
"(",
"secretKey",
"string",
")",
"(",
"string",
",",
"bool",
")",
"{",
"secret",
".",
"<mask>",
".",
"RLock",
"(",
")",
"\n",
"defer",
"secret",
".",
"lock",
".",
"RUnlock",
"(... |
23,366 | all-23367 | [
"expandDiskSettings",
"sets",
"appropriate",
"fields",
"on",
"an",
"existing",
"disk",
"-",
"this",
"is",
"used",
"during",
"Create",
"and",
"Update",
"to",
"set",
"attributes",
"to",
"those",
"found",
"in",
"configuration",
"."
] | [
"func",
"(",
"r",
"*",
"DiskSubresource",
")",
"expandDiskSettings",
"(",
"disk",
"*",
"types",
".",
"VirtualDisk",
")",
"error",
"{",
"// Backing settings",
"b",
":=",
"disk",
".",
"Backing",
".",
"(",
"*",
"types",
".",
"VirtualDiskFlatVer2BackingInfo",
")",... |
23,367 | all-23368 | [
"SetTooltipText",
"is",
"a",
"wrapper",
"around",
"gtk_tool_item_set_tooltip_text",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"ToolItem",
")",
"SetTooltipText",
"(",
"text",
"string",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"text",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n",
"C",
".... |
23,368 | all-23369 | [
"Return",
"the",
"code",
"for",
"a",
"dest",
"function",
"to",
"be",
"passed",
"as",
"parameter",
"to",
"query",
".",
"SelectObjects",
"in",
"order",
"to",
"scan",
"a",
"single",
"row",
"."
] | [
"func",
"destFunc",
"(",
"slice",
"string",
",",
"typ",
"string",
",",
"fields",
"[",
"]",
"*",
"Field",
")",
"string",
"{",
"f",
":=",
"fmt",
".",
"Sprintf",
"(",
"`func(i int) []interface{} {\n %s = append(%s, %s{})\n return [... |
23,369 | all-23370 | [
"Set",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockCache",
")",
"<mask>",
"(",
"arg0",
"string",
",",
"arg1",
"async",
".",
"Value",
")",
"{",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
",",
"arg0",
",",
"arg1",
")",
"\n",
"}"
] |
23,370 | all-23371 | [
"Header",
"sets",
"the",
"given",
"header",
"."
] | [
"func",
"(",
"r",
"*",
"RequestBuilder",
")",
"<mask>",
"(",
"name",
",",
"value",
"string",
")",
"*",
"RequestBuilder",
"{",
"if",
"r",
".",
"headers",
"==",
"nil",
"{",
"r",
".",
"headers",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"string",
"... |
23,371 | all-23372 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SearchInResourceParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage16",
"(",
"&",
"w",
",",
"v",
"... |
23,372 | all-23373 | [
"offset",
"returns",
"the",
"time",
"until",
"the",
"next",
"scrape",
"cycle",
"for",
"the",
"target",
".",
"It",
"includes",
"the",
"global",
"server",
"jitterSeed",
"for",
"scrapes",
"from",
"multiple",
"Prometheus",
"to",
"try",
"to",
"be",
"at",
"differe... | [
"func",
"(",
"t",
"*",
"Target",
")",
"offset",
"(",
"interval",
"time",
".",
"Duration",
",",
"jitterSeed",
"uint64",
")",
"time",
".",
"Duration",
"{",
"now",
":=",
"time",
".",
"Now",
"(",
")",
".",
"UnixNano",
"(",
")",
"\n\n",
"// Base is a pinned... |
23,373 | all-23374 | [
"SetHash",
"sets",
"URI",
"hash",
"."
] | [
"func",
"(",
"u",
"*",
"URI",
")",
"SetHash",
"(",
"<mask>",
"string",
")",
"{",
"u",
".",
"hash",
"=",
"append",
"(",
"u",
".",
"hash",
"[",
":",
"0",
"]",
",",
"hash",
"...",
")",
"\n",
"}"
] |
23,374 | all-23375 | [
"CheckMenuItemNewWithLabel",
"is",
"a",
"wrapper",
"around",
"gtk_check_menu_item_new_with_label",
"()",
"."
] | [
"func",
"CheckMenuItemNewWithLabel",
"(",
"<mask>",
"string",
")",
"(",
"*",
"CheckMenuItem",
",",
"error",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"label",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")"... |
23,375 | all-23376 | [
"URL",
"returns",
"a",
"URL",
"to",
"the",
"action",
"given",
"a",
"set",
"of",
"values",
"that",
"can",
"be",
"used",
"to",
"substitute",
"the",
"action",
"paths",
"pattern",
"variables",
".",
"This",
"method",
"tries",
"to",
"use",
"a",
"many",
"variab... | [
"func",
"(",
"a",
"*",
"Action",
")",
"URL",
"(",
"vars",
"[",
"]",
"*",
"PathVariable",
")",
"(",
"*",
"ActionPath",
",",
"error",
")",
"{",
"candidates",
":=",
"make",
"(",
"[",
"]",
"*",
"ActionPath",
",",
"len",
"(",
"a",
".",
"PathPatterns",
... |
23,376 | all-23377 | [
"handleUpdate",
":",
"Handler",
"for",
"/",
"update",
"Method",
":",
"POST",
"URLParams",
"Required",
":",
"name",
"=",
"[",
"string",
"]",
":",
"name",
"of",
"target",
"resource",
"Required",
":",
"owner",
"=",
"[",
"string",
"]",
":",
"owner",
"of",
... | [
"func",
"handleUpdate",
"(",
"r",
"*",
"ranch",
".",
"Ranch",
")",
"http",
".",
"HandlerFunc",
"{",
"return",
"func",
"(",
"res",
"http",
".",
"ResponseWriter",
",",
"req",
"*",
"http",
".",
"Request",
")",
"{",
"logrus",
".",
"WithField",
"(",
"\"",
... |
23,377 | all-23378 | [
"DumpStop",
"implements",
"gracefully",
"stop",
":",
"*",
"Start",
"writing",
"all",
"new",
"data",
"to",
"xlogs",
"*",
"Stop",
"cache",
"worker",
"*",
"Dump",
"all",
"cache",
"to",
"file",
"*",
"Stop",
"listeners",
"*",
"Close",
"xlogs",
"*",
"Exit",
"a... | [
"func",
"(",
"app",
"*",
"App",
")",
"DumpStop",
"(",
")",
"error",
"{",
"app",
".",
"Lock",
"(",
")",
"\n",
"defer",
"app",
".",
"Unlock",
"(",
")",
"\n\n",
"if",
"!",
"app",
".",
"Config",
".",
"Dump",
".",
"Enabled",
"{",
"return",
"nil",
"\... |
23,378 | all-23379 | [
"Printf",
"implements",
"fmt",
".",
"Printf",
"for",
"markdown"
] | [
"func",
"(",
"<mask>",
"*",
"markdown",
")",
"Printf",
"(",
"format",
"string",
",",
"args",
"...",
"interface",
"{",
"}",
")",
"{",
"fmt",
".",
"Fprintf",
"(",
"md",
",",
"format",
",",
"args",
"...",
")",
"\n",
"}"
] |
23,379 | all-23380 | [
"setVState",
"sets",
"a",
"consistent",
"state",
"for",
"V",
"logging",
".",
"A",
"nil",
"value",
"for",
"modules",
"or",
"filepaths",
"will",
"result",
"in",
"that",
"filter",
"not",
"being",
"changed",
".",
"l",
".",
"mu",
"is",
"held",
"."
] | [
"func",
"(",
"l",
"*",
"Log",
")",
"setVState",
"(",
"verbosity",
"Level",
",",
"<mask>",
"[",
"]",
"modulePat",
",",
"filepaths",
"[",
"]",
"filepathPat",
",",
"setFilter",
"bool",
")",
"{",
"// Turn verbosity off so V will not fire while we are in transition.",
... |
23,380 | all-23381 | [
"HasFacet",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"a",
"*",
"ApmOrLogQueryGroupBy",
")",
"HasFacet",
"(",
")",
"bool",
"{",
"if",
"a",
"!=",
"nil",
"&&",
"a",
".",
"Facet",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
23,381 | all-23382 | [
"FinishedSpans",
"returns",
"all",
"spans",
"that",
"have",
"been",
"Finish",
"()",
"ed",
"since",
"the",
"MockTracer",
"was",
"constructed",
"or",
"since",
"the",
"last",
"call",
"to",
"its",
"Reset",
"()",
"method",
"."
] | [
"func",
"(",
"t",
"*",
"MockTracer",
")",
"FinishedSpans",
"(",
")",
"[",
"]",
"*",
"MockSpan",
"{",
"t",
".",
"RLock",
"(",
")",
"\n",
"defer",
"t",
".",
"RUnlock",
"(",
")",
"\n",
"spans",
":=",
"<mask>",
"(",
"[",
"]",
"*",
"MockSpan",
",",
... |
23,382 | all-23383 | [
"SetChunkSize",
"sets",
"size",
"of",
"saved",
"chunks",
".",
"Once",
"the",
"file",
"is",
"written",
"to",
"it",
"will",
"be",
"split",
"in",
"blocks",
"of",
"that",
"size",
"and",
"each",
"block",
"saved",
"into",
"an",
"independent",
"chunk",
"document"... | [
"func",
"(",
"file",
"*",
"GridFile",
")",
"SetChunkSize",
"(",
"bytes",
"int",
")",
"{",
"file",
".",
"assertMode",
"(",
"gfsWriting",
")",
"\n",
"debugf",
"(",
"\"",
"\"",
",",
"file",
",",
"bytes",
")",
"\n",
"file",
".",
"m",
".",
"Lock",
"(",
... |
23,383 | all-23384 | [
"Hijack",
"Satisfy",
"the",
"http",
".",
"ResponseWriter",
"interface"
] | [
"func",
"(",
"w",
"*",
"StatusResponseWriter",
")",
"Hijack",
"(",
")",
"(",
"net",
".",
"Conn",
",",
"*",
"bufio",
".",
"ReadWriter",
",",
"error",
")",
"{",
"if",
"hj",
",",
"<mask>",
":=",
"w",
".",
"ResponseWriter",
".",
"(",
"http",
".",
"Hija... |
23,384 | all-23385 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SetWindowBoundsParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser",
"(",
"&",
"w",
",",
"v",
"... |
23,385 | all-23386 | [
"GetPathAtPos",
"is",
"a",
"wrapper",
"around",
"gtk_tree_view_get_path_at_pos",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"TreeView",
")",
"GetPathAtPos",
"(",
"x",
",",
"y",
"int",
",",
"<mask>",
"*",
"TreePath",
",",
"column",
"*",
"TreeViewColumn",
",",
"cellX",
",",
"cellY",
"*",
"int",
")",
"bool",
"{",
"var",
"ctp",
"*",
"*",
"C",
".",
"... |
23,386 | all-23387 | [
"WriteTo",
"writes",
"request",
"to",
"w",
".",
"It",
"implements",
"io",
".",
"WriterTo",
"."
] | [
"func",
"(",
"req",
"*",
"Request",
")",
"WriteTo",
"(",
"w",
"<mask>",
".",
"Writer",
")",
"(",
"int64",
",",
"error",
")",
"{",
"return",
"writeBufio",
"(",
"req",
",",
"w",
")",
"\n",
"}"
] |
23,387 | all-23388 | [
"SubmitContainerStateChange",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockECSSubmitStateSDK",
")",
"SubmitContainerStateChange",
"(",
"arg0",
"*",
"ecs",
".",
"SubmitContainerStateChangeInput",
")",
"(",
"*",
"ecs",
".",
"SubmitContainerStateChangeOutput",
",",
"error",
")",
"{",
"ret",
":=",
"m",
".",
"ctr... |
23,388 | all-23389 | [
"Collection",
"..."
] | [
"func",
"(",
"c",
"*",
"Collection",
")",
"<mask>",
"(",
")",
"*",
"mgo",
".",
"Collection",
"{",
"return",
"c",
".",
"Connection",
".",
"Session",
".",
"DB",
"(",
"c",
".",
"Database",
")",
".",
"C",
"(",
"c",
".",
"Name",
")",
"\n",
"}"
] |
23,389 | all-23390 | [
"ServeATA",
"replies",
"to",
"an",
"AoE",
"ATA",
"request",
"after",
"performing",
"the",
"requested",
"ATA",
"operations",
"on",
"the",
"io",
".",
"ReadSeeker",
".",
"ServeATA",
"can",
"handle",
"a",
"variety",
"of",
"ATA",
"requests",
"including",
"reads",
... | [
"func",
"ServeATA",
"(",
"w",
"ResponseSender",
",",
"r",
"*",
"Header",
",",
"rs",
"io",
".",
"ReadSeeker",
")",
"(",
"int",
",",
"error",
")",
"{",
"// Ensure request intends to issue an ATA command",
"if",
"r",
".",
"Command",
"!=",
"CommandIssueATACommand",
... |
23,390 | all-23391 | [
"Size",
"returns",
"the",
"size",
"of",
"lsm",
"and",
"value",
"log",
"files",
"in",
"bytes",
".",
"It",
"can",
"be",
"used",
"to",
"decide",
"how",
"often",
"to",
"call",
"RunValueLogGC",
"."
] | [
"func",
"(",
"db",
"*",
"DB",
")",
"Size",
"(",
")",
"(",
"lsm",
",",
"vlog",
"int64",
")",
"{",
"if",
"y",
".",
"LSMSize",
".",
"Get",
"(",
"db",
".",
"<mask>",
".",
"Dir",
")",
"==",
"nil",
"{",
"lsm",
",",
"vlog",
"=",
"0",
",",
"0",
"... |
23,391 | all-23392 | [
"isAWSAlias",
"determines",
"if",
"a",
"given",
"hostname",
"belongs",
"to",
"an",
"AWS",
"Alias",
"record",
"by",
"doing",
"an",
"reverse",
"lookup",
"."
] | [
"func",
"isAWSAlias",
"(",
"ep",
"*",
"endpoint",
".",
"Endpoint",
",",
"addrs",
"[",
"]",
"*",
"endpoint",
".",
"Endpoint",
")",
"string",
"{",
"if",
"<mask>",
",",
"exists",
":=",
"ep",
".",
"GetProviderSpecificProperty",
"(",
"\"",
"\"",
")",
";",
"... |
23,392 | all-23393 | [
"CreateCertificate",
"adds",
"a",
"new",
"certificate",
"to",
"the",
"LXD",
"trust",
"store"
] | [
"func",
"(",
"r",
"*",
"ProtocolLXD",
")",
"CreateCertificate",
"(",
"certificate",
"api",
".",
"CertificatesPost",
")",
"error",
"{",
"// Send the request",
"_",
",",
"_",
",",
"err",
":=",
"r",
".",
"<mask>",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"c... |
23,393 | all-23394 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"ViolationSetting",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog",
"(",
"&",
"w",
",",
"v",
")",
"\n... |
23,394 | all-23395 | [
"UrlFor",
"returns",
"the",
"URL",
"object",
"from",
"UriBase",
"with",
"the",
"Path",
"set",
"to",
"path",
"and",
"the",
"query",
"string",
"built",
"with",
"queryParams",
"."
] | [
"func",
"(",
"r",
"*",
"Request",
")",
"UrlFor",
"(",
"path",
"string",
",",
"queryParams",
"map",
"[",
"string",
"]",
"[",
"]",
"string",
")",
"*",
"url",
".",
"URL",
"{",
"baseUrl",
":=",
"r",
".",
"BaseUrl",
"(",
")",
"\n",
"baseUrl",
".",
"Pa... |
23,395 | all-23396 | [
"GetMACAddress",
"retrieves",
"the",
"MAC",
"address",
"of",
"a",
"device",
"using",
"netlink"
] | [
"func",
"GetMACAddress",
"(",
"ctx",
"<mask>",
".",
"Context",
",",
"timeout",
"time",
".",
"Duration",
",",
"dev",
"string",
",",
"netlinkClient",
"netlinkwrapper",
".",
"NetLink",
")",
"(",
"string",
",",
"error",
")",
"{",
"retriever",
":=",
"&",
"macAd... |
23,396 | all-23397 | [
"nanosecond",
":",
"HDB",
"-",
"7",
"digits",
"precision",
"(",
"not",
"9",
"digits",
")"
] | [
"func",
"convertTimeToLongdate",
"(",
"t",
"<mask>",
".",
"Time",
")",
"int64",
"{",
"t",
"=",
"t",
".",
"UTC",
"(",
")",
"\n",
"return",
"(",
"(",
"(",
"(",
"(",
"(",
"(",
"int64",
"(",
"convertTimeToDayDate",
"(",
"t",
")",
")",
"-",
"1",
")",
... |
23,397 | all-23398 | [
"We",
"will",
"only",
"wait",
"on",
"the",
"children",
"we",
"have",
"now",
".",
"We",
"will",
"not",
"wait",
"on",
"children",
"added",
"subsequently",
".",
"this",
"may",
"change",
"in",
"the",
"future",
"."
] | [
"func",
"(",
"p",
"*",
"process",
")",
"CloseAfterChildren",
"(",
")",
"error",
"{",
"p",
".",
"Lock",
"(",
")",
"\n",
"select",
"{",
"case",
"<-",
"p",
".",
"Closed",
"(",
")",
":",
"p",
".",
"Unlock",
"(",
")",
"\n",
"return",
"p",
".",
"Clos... |
23,398 | all-23399 | [
"DesiredTerminal",
"returns",
"true",
"if",
"the",
"cgroup",
"s",
"desired",
"status",
"is",
"REMOVED"
] | [
"func",
"(",
"auth",
"*",
"ASMAuthResource",
")",
"DesiredTerminal",
"(",
")",
"bool",
"{",
"auth",
".",
"<mask>",
".",
"RLock",
"(",
")",
"\n",
"defer",
"auth",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n\n",
"return",
"auth",
".",
"desiredStatusUnsafe",... |
23,399 | all-23400 | [
"MoveServersToServerGroup",
"atomically",
"moves",
"servers",
"from",
"one",
"group",
"to",
"another",
".",
"The",
"src",
"parameter",
"specifies",
"the",
"group",
"to",
"which",
"the",
"servers",
"currently",
"belong",
"The",
"dst",
"parameter",
"specifies",
"the... | [
"func",
"(",
"c",
"*",
"Client",
")",
"MoveServersToServerGroup",
"(",
"src",
"string",
",",
"dst",
"string",
",",
"serverIds",
"[",
"]",
"string",
")",
"(",
"*",
"ServerGroup",
",",
"error",
")",
"{",
"group",
":=",
"new",
"(",
"ServerGroup",
")",
"\n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.