id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
9,300 | all-9301 | [
"GetResources",
"returns",
"the",
"list",
"of",
"task",
"resources",
"from",
"ResourcesMap"
] | [
"func",
"(",
"task",
"*",
"Task",
")",
"GetResources",
"(",
")",
"[",
"]",
"taskresource",
".",
"TaskResource",
"{",
"<mask>",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"task",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"task",
... |
9,301 | all-9302 | [
"expect",
"consumes",
"an",
"event",
"from",
"the",
"event",
"stream",
"and",
"checks",
"that",
"it",
"s",
"of",
"the",
"expected",
"type",
"."
] | [
"func",
"(",
"p",
"*",
"<mask>",
")",
"expect",
"(",
"e",
"yaml_event_type_t",
")",
"{",
"if",
"p",
".",
"event",
".",
"typ",
"==",
"yaml_NO_EVENT",
"{",
"if",
"!",
"yaml_parser_parse",
"(",
"&",
"p",
".",
"parser",
",",
"&",
"p",
".",
"event",
")"... |
9,302 | all-9303 | [
"InsertNewTable",
"creates",
"a",
"new",
"empty",
"table",
"for",
"the",
"given",
"project",
"and",
"dataset",
"with",
"the",
"field",
"name",
"/",
"types",
"defined",
"in",
"the",
"fields",
"map"
] | [
"func",
"(",
"c",
"*",
"<mask>",
")",
"InsertNewTable",
"(",
"projectID",
",",
"datasetID",
",",
"tableName",
"string",
",",
"fields",
"map",
"[",
"string",
"]",
"string",
")",
"error",
"{",
"// If the table already exists, an error will be raised here.",
"service",... |
9,303 | all-9304 | [
"InsertStrings",
"inserts",
"a",
"new",
"row",
"for",
"each",
"of",
"the",
"given",
"strings",
"using",
"the",
"given",
"insert",
"statement",
"template",
"which",
"must",
"define",
"exactly",
"one",
"insertion",
"column",
"and",
"one",
"substitution",
"placehol... | [
"func",
"InsertStrings",
"(",
"tx",
"*",
"sql",
".",
"Tx",
",",
"stmt",
"string",
",",
"values",
"[",
"]",
"string",
")",
"error",
"{",
"n",
":=",
"len",
"(",
"values",
")",
"\n\n",
"if",
"n",
"==",
"0",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
... |
9,304 | all-9305 | [
"StrLength",
"param",
"is",
"a",
"string",
"length",
"must",
"be",
"n"
] | [
"func",
"(",
"c",
"*",
"Controller",
")",
"StrLength",
"(",
"fieldName",
"string",
",",
"p",
"<mask>",
"{",
"}",
",",
"n",
"int",
")",
"string",
"{",
"if",
"p",
"==",
"nil",
"{",
"p",
"=",
"\"",
"\"",
"\n",
"}",
"\n",
"v",
",",
"ok",
":=",
"p... |
9,305 | all-9306 | [
"Remove",
"Remove"
] | [
"func",
"(",
"ms",
"*",
"MongoStore",
")",
"Remove",
"(",
"words",
"...",
"string",
")",
"error",
"{",
"if",
"len",
"(",
"words",
")",
"==",
"0",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"var",
"err",
"error",
"\n",
"<mask>",
".",
"c",
"(",
"func... |
9,306 | all-9307 | [
"Inject",
"implements",
"the",
"Injector",
"interface"
] | [
"func",
"(",
"t",
"*",
"TextMapPropagator",
")",
"Inject",
"(",
"spanContext",
"MockSpanContext",
",",
"carrier",
"interface",
"{",
"}",
")",
"error",
"{",
"writer",
",",
"ok",
":=",
"carrier",
".",
"(",
"opentracing",
".",
"TextMapWriter",
")",
"\n",
"if"... |
9,307 | all-9308 | [
"lintCounter",
"detects",
"issues",
"specific",
"to",
"counters",
"as",
"well",
"as",
"patterns",
"that",
"should",
"only",
"be",
"used",
"with",
"counters",
"."
] | [
"func",
"lintCounter",
"(",
"mf",
"dto",
".",
"MetricFamily",
")",
"[",
"]",
"Problem",
"{",
"var",
"problems",
"problems",
"\n\n",
"isCounter",
":=",
"mf",
".",
"GetType",
"(",
")",
"==",
"dto",
".",
"MetricType_COUNTER",
"\n",
"isUntyped",
":=",
"mf",
... |
9,308 | all-9309 | [
"SetErrorHandlerFunc",
"returns",
"Middleware",
"that",
"can",
"be",
"used",
"to",
"set",
"the",
"error",
"handler"
] | [
"func",
"SetErrorHandlerFunc",
"(",
"status",
"int",
",",
"handler",
"func",
"(",
"ctx",
"context",
".",
"Context",
",",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"<mask>",
"int",
",",
"err",
"error",
")",
")",
"sc... |
9,309 | all-9310 | [
"isDialErrorRetriable",
"determines",
"whether",
"or",
"not",
"a",
"dialer",
"should",
"retry",
"a",
"failed",
"connection",
"attempt",
"by",
"examining",
"the",
"connection",
"error",
"to",
"see",
"if",
"it",
"is",
"one",
"of",
"the",
"following",
"error",
"t... | [
"func",
"isDialErrorRetriable",
"(",
"err",
"error",
")",
"bool",
"{",
"opErr",
",",
"isOpErr",
":=",
"err",
".",
"(",
"*",
"net",
".",
"OpError",
")",
"\n",
"if",
"!",
"isOpErr",
"{",
"return",
"false",
"\n",
"}",
"\n",
"if",
"opErr",
".",
"Timeout"... |
9,310 | all-9311 | [
"FillStroke",
"first",
"fills",
"the",
"paths",
"and",
"than",
"strokes",
"them"
] | [
"func",
"(",
"gc",
"*",
"GraphicContext",
")",
"FillStroke",
"(",
"paths",
"...",
"*",
"draw2d",
".",
"Path",
")",
"{",
"gc",
".",
"drawPaths",
"(",
"filled",
"|",
"stroked",
",",
"paths",
"...",
")",
"\n",
"gc",
".",
"Current",
".",
"<mask>",
".",
... |
9,311 | all-9312 | [
"UnmarshalBinary",
"interface",
"implementation"
] | [
"func",
"(",
"m",
"*",
"RouteWrapper",
")",
"UnmarshalBinary",
"(",
"b",
"[",
"]",
"byte",
")",
"error",
"{",
"<mask>",
"res",
"RouteWrapper",
"\n",
"if",
"err",
":=",
"swag",
".",
"ReadJSON",
"(",
"b",
",",
"&",
"res",
")",
";",
"err",
"!=",
"nil"... |
9,312 | all-9313 | [
"GetProperty",
"is",
"a",
"wrapper",
"around",
"gtk_style_context_get_property",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"StyleContext",
")",
"GetProperty",
"(",
"property",
"string",
",",
"<mask>",
"StateFlags",
")",
"(",
"interface",
"{",
"}",
",",
"error",
")",
"{",
"cstr",
":=",
"(",
"*",
"C",
".",
"gchar",
")",
"(",
"C",
".",
"CString",
"(... |
9,313 | all-9314 | [
"GetUInt",
"is",
"a",
"wrapper",
"around",
"g_settings_get_uint",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Settings",
")",
"GetUInt",
"(",
"name",
"string",
")",
"uint",
"{",
"cstr1",
":=",
"(",
"*",
"C",
".",
"gchar",
")",
"(",
"C",
".",
"CString",
"(",
"name",
")",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",... |
9,314 | all-9315 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetMediaQueriesParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss40",
"(",
"&",
"w",
",",
"v",
"... |
9,315 | all-9316 | [
"MutateAllowTrust",
"for",
"Authorize",
"sets",
"the",
"AllowTrustOp",
"s",
"Authorize",
"field"
] | [
"func",
"(",
"m",
"Authorize",
")",
"MutateAllowTrust",
"(",
"o",
"*",
"xdr",
".",
"AllowTrustOp",
")",
"error",
"{",
"o",
".",
"Authorize",
"=",
"m",
".",
"<mask>",
"\n",
"return",
"nil",
"\n",
"}"
] |
9,316 | all-9317 | [
"StructName",
"-",
"gets",
"struct",
"name",
"for",
"property"
] | [
"func",
"(",
"v",
"*",
"Record",
")",
"StructName",
"(",
"i",
"int",
",",
"packagename",
"string",
",",
"properties",
"[",
"]",
"string",
")",
"(",
"structname",
"string",
")",
"{",
"if",
"i",
">",
"0",
"{",
"currentNode",
":=",
"v",
".",
"Slice",
... |
9,317 | all-9318 | [
"Close",
"closes",
"the",
"current",
"WAL",
"file",
"and",
"directory",
"."
] | [
"func",
"(",
"w",
"*",
"WAL",
")",
"Close",
"(",
")",
"error",
"{",
"w",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"defer",
"w",
".",
"mu",
".",
"Unlock",
"(",
")",
"\n\n",
"if",
"w",
".",
"fp",
"!=",
"nil",
"{",
"w",
".",
"fp",
".",
"Close... |
9,318 | all-9319 | [
"Run",
"is",
"the",
"main",
"path",
"of",
"execution",
"for",
"the",
"controller",
"loop",
"."
] | [
"func",
"(",
"c",
"*",
"Controller",
")",
"Run",
"(",
"stopCh",
"<-",
"chan",
"struct",
"{",
"}",
")",
"{",
"// handle a panic with logging and exiting",
"defer",
"utilruntime",
".",
"HandleCrash",
"(",
")",
"\n",
"// ignore new items in the queue but when all gorouti... |
9,319 | all-9320 | [
"Returns",
"the",
"location",
"of",
"an",
"attribute",
"variable"
] | [
"func",
"GetAttribLocation",
"(",
"program",
"uint32",
",",
"name",
"*",
"uint8",
")",
"int32",
"{",
"ret",
":=",
"C",
".",
"glowGetAttribLocation",
"(",
"gpGetAttribLocation",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"program",
")",
",",
"(",
"*",
"C",
... |
9,320 | all-9321 | [
"Errorf",
"creates",
"a",
"new",
"error",
"with",
"the",
"given",
"message",
".",
"You",
"can",
"use",
"it",
"as",
"a",
"drop",
"-",
"in",
"replacement",
"for",
"fmt",
".",
"Errorf",
"()",
"to",
"provide",
"descriptive",
"errors",
"in",
"return",
"values... | [
"func",
"Errorf",
"(",
"<mask>",
"string",
",",
"a",
"...",
"interface",
"{",
"}",
")",
"*",
"Error",
"{",
"return",
"Wrap",
"(",
"fmt",
".",
"Errorf",
"(",
"format",
",",
"a",
"...",
")",
",",
"1",
")",
"\n",
"}"
] |
9,321 | all-9322 | [
"virtualEthernetCardString",
"prints",
"a",
"string",
"representation",
"of",
"the",
"ethernet",
"device",
"passed",
"in",
"."
] | [
"func",
"virtualEthernetCardString",
"(",
"d",
"types",
".",
"BaseVirtualEthernetCard",
")",
"string",
"{",
"switch",
"d",
".",
"(",
"<mask>",
")",
"{",
"case",
"*",
"types",
".",
"VirtualE1000",
":",
"return",
"networkInterfaceSubresourceTypeE1000",
"\n",
"case",... |
9,322 | all-9323 | [
"addRemoteFromRequest",
"adds",
"a",
"remote",
"peer",
"according",
"to",
"an",
"http",
"request",
"header"
] | [
"func",
"addRemoteFromRequest",
"(",
"tr",
"Transporter",
",",
"r",
"*",
"http",
".",
"Request",
")",
"{",
"if",
"from",
",",
"err",
":=",
"types",
".",
"IDFromString",
"(",
"r",
".",
"Header",
".",
"Get",
"(",
"\"",
"\"",
")",
")",
";",
"err",
"==... |
9,323 | all-9324 | [
"RemoveImageName",
"removes",
"image",
"name",
"from",
"image",
"state"
] | [
"func",
"(",
"imageState",
"*",
"ImageState",
")",
"RemoveImageName",
"(",
"containerImageName",
"string",
")",
"{",
"imageState",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"imageState",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"for",
"i",
",... |
9,324 | all-9325 | [
"Command",
"line",
"used",
"to",
"run",
"tool"
] | [
"func",
"commandLine",
"(",
")",
"string",
"{",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"os",
".",
"Args",
"[",
"0",
"]",
",",
"strings",
".",
"Join",
"(",
"<mask>",
".",
"Args",
"[",
"1",
":",
"]",
",",
"\"",
"\"",
")",
")",
"... |
9,325 | all-9326 | [
"RenameContainer",
"renames",
"the",
"MAAS",
"device",
"for",
"the",
"container",
"without",
"releasing",
"any",
"allocation"
] | [
"func",
"(",
"c",
"*",
"<mask>",
")",
"RenameContainer",
"(",
"name",
"string",
",",
"newName",
"string",
")",
"error",
"{",
"device",
",",
"err",
":=",
"c",
".",
"getDevice",
"(",
"name",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
... |
9,326 | all-9327 | [
"Assign",
"produces",
"a",
"command",
"to",
"assign",
"a",
"value",
"to",
"a",
"variable",
"within",
"a",
"go",
"session"
] | [
"func",
"Assign",
"(",
"symbol",
"string",
",",
"value",
"interface",
"{",
"}",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"switch",
"value",
".",
"(",
"type",
")",
"{",
"case",
"[",
"]",
"float64",
":",
"return",
"assignDoubleArray",
"(",
... |
9,327 | all-9328 | [
"Do",
"executes",
"ApplicationCache",
".",
"getManifestForFrame",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"manifestURL",
"-",
"Manifest",
"URL",
"for",
"document",
"in",
"the",
"given",
"frame",
"."
] | [
"func",
"(",
"p",
"*",
"GetManifestForFrameParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"manifestURL",
"string",
",",
"err",
"error",
")",
"{",
"// execute",
"var",
"res",
"GetManifestForFrameReturns",
"\n",
"err",
"=",
"cdp",
".",
... |
9,328 | all-9329 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"NavigationEntry",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage24",
"(",
"&",
"r",... |
9,329 | all-9330 | [
"Activate",
"is",
"a",
"wrapper",
"around",
"g_action_activate"
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"Activate",
"(",
"parameter",
"*",
"Variant",
")",
"{",
"C",
".",
"g_action_activate",
"(",
"v",
".",
"native",
"(",
")",
",",
"parameter",
".",
"native",
"(",
")",
")",
"\n",
"}"
] |
9,330 | all-9331 | [
"RemoveDOMStorageItem",
"[",
"no",
"description",
"]",
".",
"See",
":",
"https",
":",
"//",
"chromedevtools",
".",
"github",
".",
"io",
"/",
"devtools",
"-",
"protocol",
"/",
"tot",
"/",
"DOMStorage#method",
"-",
"removeDOMStorageItem",
"parameters",
":",
"sto... | [
"func",
"RemoveDOMStorageItem",
"(",
"storageID",
"*",
"StorageID",
",",
"key",
"string",
")",
"*",
"RemoveDOMStorageItemParams",
"{",
"return",
"&",
"RemoveDOMStorageItemParams",
"{",
"StorageID",
":",
"storageID",
",",
"Key",
":",
"<mask>",
",",
"}",
"\n",
"}"... |
9,331 | all-9332 | [
"AttachPersistentDisk",
"updates",
"the",
"agent",
"settings",
"in",
"order",
"to",
"add",
"an",
"attached",
"persistent",
"disk",
"."
] | [
"func",
"(",
"as",
"AgentSettings",
")",
"AttachPersistentDisk",
"(",
"diskID",
"string",
",",
"updateSetting",
"[",
"]",
"byte",
")",
"(",
"AgentSettings",
",",
"error",
")",
"{",
"persistenDiskSettings",
":=",
"make",
"(",
"map",
"[",
"string",
"]",
"Persi... |
9,332 | all-9333 | [
"Labels",
"returns",
"a",
"copy",
"of",
"the",
"set",
"of",
"all",
"public",
"labels",
"of",
"the",
"target",
"."
] | [
"func",
"(",
"t",
"*",
"Target",
")",
"Labels",
"(",
")",
"labels",
".",
"Labels",
"{",
"lset",
":=",
"make",
"(",
"labels",
".",
"Labels",
",",
"0",
",",
"len",
"(",
"t",
".",
"labels",
")",
")",
"\n",
"for",
"_",
",",
"l",
":=",
"range",
"t... |
9,333 | all-9334 | [
"----------------------------------------",
"Unsigned"
] | [
"func",
"EncodeByte",
"(",
"w",
"io",
".",
"<mask>",
",",
"b",
"byte",
")",
"(",
"err",
"error",
")",
"{",
"return",
"EncodeUvarint",
"(",
"w",
",",
"uint64",
"(",
"b",
")",
")",
"\n",
"}"
] |
9,334 | all-9335 | [
"NewFileCache",
"creates",
"a",
"new",
"FileCache",
"which",
"stores",
"caches",
"underneath",
"the",
"directory",
"specified",
"by",
"dir"
] | [
"func",
"NewFileCache",
"(",
"dir",
"<mask>",
")",
"(",
"*",
"FileCache",
",",
"error",
")",
"{",
"f",
":=",
"&",
"FileCache",
"{",
"dir",
"}",
"\n",
"return",
"f",
",",
"nil",
"\n",
"}"
] |
9,335 | all-9336 | [
"Decode",
"implements",
"binary",
"decoder",
"for",
"snapshot",
"metadata"
] | [
"func",
"(",
"s",
"*",
"Snapshot",
")",
"Decode",
"(",
"buf",
"[",
"]",
"byte",
",",
"r",
"io",
".",
"Reader",
")",
"error",
"{",
"if",
"_",
",",
"err",
":=",
"<mask>",
".",
"ReadFull",
"(",
"r",
",",
"buf",
"[",
"0",
":",
"4",
"]",
")",
";... |
9,336 | all-9337 | [
"NewMockImageManager",
"creates",
"a",
"new",
"mock",
"instance"
] | [
"func",
"NewMockImageManager",
"(",
"ctrl",
"*",
"gomock",
".",
"<mask>",
")",
"*",
"MockImageManager",
"{",
"mock",
":=",
"&",
"MockImageManager",
"{",
"ctrl",
":",
"ctrl",
"}",
"\n",
"mock",
".",
"recorder",
"=",
"&",
"MockImageManagerMockRecorder",
"{",
"... |
9,337 | all-9338 | [
"ReplacePatternF",
"is",
"the",
"filter",
"form",
"of",
"ReplaceRegexp",
"."
] | [
"func",
"ReplacePatternF",
"(",
"pattern",
",",
"repl",
"string",
")",
"func",
"(",
"string",
")",
"string",
"{",
"return",
"func",
"(",
"s",
"string",
")",
"string",
"{",
"return",
"ReplacePattern",
"(",
"s",
",",
"<mask>",
",",
"repl",
")",
"\n",
"}"... |
9,338 | all-9339 | [
"Validate",
"checks",
"a",
"Config",
"instance",
".",
"It",
"will",
"return",
"a",
"sarama",
".",
"ConfigurationError",
"if",
"the",
"specified",
"values",
"don",
"t",
"make",
"sense",
"."
] | [
"func",
"(",
"c",
"*",
"Config",
")",
"Validate",
"(",
")",
"error",
"{",
"if",
"c",
".",
"Group",
".",
"Heartbeat",
".",
"Interval",
"%",
"time",
".",
"Millisecond",
"!=",
"0",
"{",
"sarama",
".",
"Logger",
".",
"Println",
"(",
"\"",
"\"",
")",
... |
9,339 | all-9340 | [
"===",
"days_in_month",
"(",
"v",
"Vector",
")",
"Scalar",
"==="
] | [
"func",
"funcDaysInMonth",
"(",
"vals",
"[",
"]",
"Value",
",",
"args",
"Expressions",
",",
"enh",
"*",
"EvalNodeHelper",
")",
"Vector",
"{",
"return",
"dateWrapper",
"(",
"vals",
",",
"enh",
",",
"func",
"(",
"t",
"time",
".",
"Time",
")",
"float64",
... |
9,340 | all-9341 | [
"expandVirtualMachineBootOptions",
"reads",
"certain",
"ResourceData",
"keys",
"and",
"returns",
"a",
"VirtualMachineBootOptions",
"."
] | [
"func",
"expandVirtualMachineBootOptions",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"client",
"*",
"govmomi",
".",
"Client",
")",
"*",
"types",
".",
"VirtualMachineBootOptions",
"{",
"obj",
":=",
"&",
"types",
".",
"VirtualMachineBootOptions",
"{",
"Bo... |
9,341 | all-9342 | [
"Name",
"identifies",
"the",
"client",
"."
] | [
"func",
"(",
"c",
"Client",
")",
"Name",
"(",
")",
"string",
"{",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"c",
".",
"<mask>",
",",
"c",
".",
"url",
")",
"\n",
"}"
] |
9,342 | all-9343 | [
"GetAPIKey",
"returns",
"a",
"single",
"API",
"key",
"or",
"error",
"on",
"failure"
] | [
"func",
"(",
"client",
"*",
"Client",
")",
"GetAPIKey",
"(",
"key",
"string",
")",
"(",
"*",
"APIKey",
",",
"error",
")",
"{",
"<mask>",
"out",
"reqAPIKey",
"\n",
"if",
"err",
":=",
"client",
".",
"doJsonRequest",
"(",
"\"",
"\"",
",",
"fmt",
".",
... |
9,343 | all-9344 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"a",
"specified",
"program",
"object"
] | [
"func",
"ProgramUniform3f",
"(",
"<mask>",
"uint32",
",",
"location",
"int32",
",",
"v0",
"float32",
",",
"v1",
"float32",
",",
"v2",
"float32",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpProgramUniform3f",
",",
"5",
",",
"uintptr",
"(",
"program",
")",... |
9,344 | all-9345 | [
"WriteHeader",
"writes",
"the",
"header",
"text",
"."
] | [
"func",
"(",
"c",
"*",
"ClientWriter",
")",
"WriteHeader",
"(",
"pkg",
",",
"version",
"string",
",",
"needTime",
",",
"needJSON",
"bool",
",",
"w",
"io",
".",
"Writer",
")",
"error",
"{",
"ctx",
":=",
"<mask>",
"[",
"string",
"]",
"interface",
"{",
... |
9,345 | all-9346 | [
"tagIDFromName",
"helps",
"convert",
"the",
"tag",
"and",
"category",
"names",
"into",
"the",
"final",
"ID",
"used",
"for",
"discovery",
"."
] | [
"func",
"tagIDFromName",
"(",
"ctx",
"context",
".",
"Context",
",",
"client",
"*",
"tags",
".",
"RestClient",
",",
"name",
",",
"category",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"logger",
".",
"Printf",
"(",
"\"",
"\"",
",",
"name",
... |
9,346 | all-9347 | [
"SliceInterfacesToStrings",
"converts",
"an",
"interface",
"slice",
"to",
"a",
"string",
"slice",
".",
"The",
"function",
"does",
"not",
"attempt",
"to",
"do",
"any",
"sanity",
"checking",
"and",
"will",
"panic",
"if",
"one",
"of",
"the",
"items",
"in",
"the... | [
"func",
"SliceInterfacesToStrings",
"(",
"s",
"[",
"]",
"interface",
"{",
"}",
")",
"[",
"]",
"string",
"{",
"var",
"d",
"[",
"]",
"string",
"\n",
"for",
"_",
",",
"v",
":=",
"range",
"s",
"{",
"if",
"o",
",",
"ok",
":=",
"v",
".",
"(",
"string... |
9,347 | all-9348 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"HighlightFrameParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay12",
"(",
"&",
... |
9,348 | all-9349 | [
"determine",
"if",
"a",
"name",
"corresponds",
"to",
"a",
"query",
"object"
] | [
"func",
"IsQuery",
"(",
"id",
"uint32",
")",
"bool",
"{",
"ret",
":=",
"C",
".",
"glowIsQuery",
"(",
"gpIsQuery",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"id",
")",
")",
"\n",
"return",
"<mask>",
"==",
"TRUE",
"\n",
"}"
] |
9,349 | all-9350 | [
"Set",
"sets",
"the",
"value",
"for",
"a",
"given",
"key",
"."
] | [
"func",
"(",
"h",
"*",
"kvHandler",
")",
"Set",
"(",
"ctx",
"thrift",
".",
"Context",
",",
"key",
",",
"value",
"string",
")",
"error",
"{",
"if",
"err",
":=",
"isValidKey",
"(",
"key",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}... |
9,350 | all-9351 | [
"NewStreamEncoder",
"returns",
"a",
"new",
"JSON",
"stream",
"encoder",
"that",
"writes",
"to",
"w",
"."
] | [
"func",
"NewStreamEncoder",
"(",
"w",
"<mask>",
".",
"Writer",
")",
"*",
"objconv",
".",
"StreamEncoder",
"{",
"return",
"objconv",
".",
"NewStreamEncoder",
"(",
"NewEmitter",
"(",
"w",
")",
")",
"\n",
"}"
] |
9,351 | all-9352 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"RequestDataReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb4",
"(",
"&",
"w",
",",
"v",
"... |
9,352 | all-9353 | [
"pushPeer",
"pushes",
"the",
"new",
"peer",
"into",
"the",
"heap",
"."
] | [
"func",
"(",
"ph",
"*",
"peerHeap",
")",
"pushPeer",
"(",
"peerScore",
"*",
"peerScore",
")",
"{",
"ph",
".",
"<mask>",
"++",
"\n",
"newOrder",
":=",
"ph",
".",
"order",
"\n",
"// randRange will affect the deviation of peer's chosenCount",
"randRange",
":=",
"ph... |
9,353 | all-9354 | [
"setCallFunc",
"populates",
"the",
"function",
"parts",
"of",
"a",
"CallCommon",
"structure",
"(",
"Func",
"Method",
"Recv",
"Args",
"[",
"0",
"]",
")",
"based",
"on",
"the",
"kind",
"of",
"invocation",
"occurring",
"in",
"e",
"."
] | [
"func",
"(",
"b",
"*",
"builder",
")",
"setCallFunc",
"(",
"fn",
"*",
"Function",
",",
"e",
"*",
"ast",
".",
"CallExpr",
",",
"c",
"*",
"CallCommon",
")",
"{",
"c",
".",
"pos",
"=",
"e",
".",
"Lparen",
"\n\n",
"// Is this a method call?",
"if",
"sele... |
9,354 | all-9355 | [
"GetPaperHeight",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_print_settings_get_paper_height",
"()",
"."
] | [
"func",
"(",
"<mask>",
"*",
"PrintSettings",
")",
"GetPaperHeight",
"(",
"unit",
"Unit",
")",
"float64",
"{",
"c",
":=",
"C",
".",
"gtk_print_settings_get_paper_height",
"(",
"ps",
".",
"native",
"(",
")",
",",
"C",
".",
"GtkUnit",
"(",
"unit",
")",
")",... |
9,355 | all-9356 | [
"Fatal",
"is",
"equivalent",
"to",
"l",
".",
"Critical",
"(",
"fmt",
".",
"Sprint",
"()",
")",
"followed",
"by",
"a",
"call",
"to",
"os",
".",
"Exit",
"(",
"1",
")",
"."
] | [
"func",
"(",
"l",
"*",
"Logger",
")",
"Fatal",
"(",
"args",
"...",
"<mask>",
"{",
"}",
")",
"{",
"l",
".",
"log",
"(",
"CRITICAL",
",",
"nil",
",",
"args",
"...",
")",
"\n",
"os",
".",
"Exit",
"(",
"1",
")",
"\n",
"}"
] |
9,356 | all-9357 | [
"CloseIssue",
"closes",
"the",
"existing",
"open",
"issue",
"provided",
"See",
"https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"issues",
"/",
"#edit",
"-",
"an",
"-",
"issue"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"CloseIssue",
"(",
"org",
",",
"repo",
"string",
",",
"number",
"int",
")",
"error",
"{",
"c",
".",
"log",
"(",
"\"",
"\"",
",",
"org",
",",
"repo",
",",
"number",
")",
"\n",
"_",
",",
"err",
":=",
"c",
"... |
9,357 | all-9358 | [
"NewAsset",
"creates",
"a",
"new",
"Asset",
"."
] | [
"func",
"NewAsset",
"(",
"aType",
"AssetType",
",",
"value",
"interface",
"{",
"}",
")",
"(",
"result",
"Asset",
",",
"err",
"error",
")",
"{",
"result",
".",
"Type",
"=",
"aType",
"\n",
"switch",
"AssetType",
"(",
"aType",
")",
"{",
"case",
"AssetType... |
9,358 | all-9359 | [
"PostEvent",
"takes",
"as",
"input",
"an",
"event",
"and",
"then",
"posts",
"it",
"to",
"the",
"server",
"."
] | [
"func",
"(",
"client",
"*",
"Client",
")",
"PostEvent",
"(",
"event",
"*",
"Event",
")",
"(",
"*",
"Event",
",",
"error",
")",
"{",
"var",
"<mask>",
"reqGetEvent",
"\n",
"if",
"err",
":=",
"client",
".",
"doJsonRequest",
"(",
"\"",
"\"",
",",
"\"",
... |
9,359 | all-9360 | [
"funcMap",
"is",
"the",
"map",
"of",
"template",
"functions",
"to",
"their",
"respective",
"functions",
"."
] | [
"func",
"funcMap",
"(",
"i",
"*",
"funcMapInput",
")",
"template",
".",
"FuncMap",
"{",
"var",
"scratch",
"Scratch",
"\n\n",
"return",
"template",
".",
"FuncMap",
"{",
"// API functions",
"\"",
"\"",
":",
"datacentersFunc",
"(",
"i",
".",
"brain",
",",
"i"... |
9,360 | all-9361 | [
"FilterBefore",
"returns",
"rows",
"created",
"before",
"a",
"provided",
"key",
".",
"It",
"accepts",
"a",
"filter",
"and",
"result",
"shaping",
"arguments"
] | [
"func",
"(",
"s",
"RethinkStore",
")",
"FilterBefore",
"(",
"id",
"string",
",",
"filter",
"<mask>",
"[",
"string",
"]",
"interface",
"{",
"}",
",",
"count",
"int",
",",
"skip",
"int",
",",
"store",
"string",
",",
"opts",
"ObjectStoreOptions",
")",
"(",
... |
9,361 | all-9362 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetFramesWithManifestsParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"<mask>",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache... |
9,362 | all-9363 | [
"Given",
"a",
"service",
"spec",
"looks",
"up",
"and",
"returns",
"an",
"array",
"of",
"*",
"dns",
".",
"SRV",
"objects",
".",
"These",
"must",
"be",
"massaged",
"into",
"the",
"[]",
"dns",
".",
"RR",
"after",
"the",
"fact",
"."
] | [
"func",
"(",
"ds",
"*",
"DNSServer",
")",
"GetSRV",
"(",
"spec",
"string",
")",
"[",
"]",
"*",
"dns",
".",
"SRV",
"{",
"ds",
".",
"srvMutex",
".",
"RLock",
"(",
")",
"\n",
"defer",
"ds",
".",
"srvMutex",
".",
"RUnlock",
"(",
")",
"\n\n",
"srv",
... |
9,363 | all-9364 | [
"GetPalette",
"returns",
"the",
"Palette",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"c",
"*",
"ConditionalFormat",
")",
"GetPalette",
"(",
")",
"<mask>",
"{",
"if",
"c",
"==",
"nil",
"||",
"c",
".",
"Palette",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"c",
".",
"Palette",
"\n",
"}"
] |
9,364 | all-9365 | [
"configure",
"sends",
"a",
"configuration",
"change",
"through",
"consensus",
"and",
"then",
"waits",
"for",
"it",
"to",
"be",
"applied",
"to",
"the",
"server",
".",
"It",
"will",
"block",
"until",
"the",
"change",
"is",
"performed",
"or",
"there",
"is",
"... | [
"func",
"(",
"s",
"*",
"EtcdServer",
")",
"configure",
"(",
"ctx",
"context",
".",
"Context",
",",
"cc",
"raftpb",
".",
"ConfChange",
")",
"(",
"[",
"]",
"*",
"membership",
".",
"Member",
",",
"error",
")",
"{",
"cc",
".",
"ID",
"=",
"s",
".",
"r... |
9,365 | all-9366 | [
"GetReconciler",
"gets",
"the",
"correct",
"Reconciler",
"for",
"the",
"cloud",
"provider",
"currenty",
"used",
"."
] | [
"func",
"GetReconciler",
"(",
"known",
"*",
"cluster",
".",
"Cluster",
",",
"runtimeParameters",
"*",
"RuntimeParameters",
")",
"(",
"reconciler",
"cloud",
".",
"Reconciler",
",",
"err",
"error",
")",
"{",
"switch",
"known",
".",
"ProviderConfig",
"(",
")",
... |
9,366 | all-9367 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetRequestPostDataParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork33",
"(",
"&",
"w",
",",
"... |
9,367 | all-9368 | [
"Callback",
"sends",
"the",
"CallbackRequest",
"type",
"to",
"the",
"configured",
"StatusCallbackUrl",
".",
"If",
"it",
"fails",
"to",
"deliver",
"in",
"n",
"attempts",
"or",
"the",
"request",
"is",
"invalid",
"it",
"will",
"return",
"an",
"error",
"."
] | [
"func",
"Callback",
"(",
"cbReq",
"*",
"CallbackRequest",
",",
"opts",
"*",
"CallbackOptions",
")",
"error",
"{",
"client",
":=",
"opts",
".",
"Client",
"\n",
"if",
"client",
"==",
"nil",
"{",
"client",
"=",
"http",
".",
"DefaultClient",
"\n",
"}",
"\n",... |
9,368 | all-9369 | [
"DeleteClusterMember",
"makes",
"the",
"given",
"member",
"leave",
"the",
"cluster",
"(",
"gracefully",
"or",
"not",
"depending",
"on",
"the",
"force",
"flag",
")"
] | [
"func",
"(",
"r",
"*",
"ProtocolLXD",
")",
"DeleteClusterMember",
"(",
"<mask>",
"string",
",",
"force",
"bool",
")",
"error",
"{",
"if",
"!",
"r",
".",
"HasExtension",
"(",
"\"",
"\"",
")",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\\\"",
"\\... |
9,369 | all-9370 | [
"emit",
"passes",
"an",
"item",
"back",
"to",
"the",
"client",
"."
] | [
"func",
"(",
"l",
"*",
"lexer",
")",
"emit",
"(",
"t",
"ItemType",
")",
"{",
"l",
".",
"items",
"<-",
"item",
"{",
"t",
",",
"l",
".",
"<mask>",
",",
"l",
".",
"input",
"[",
"l",
".",
"start",
":",
"l",
".",
"pos",
"]",
"}",
"\n",
"l",
".... |
9,370 | all-9371 | [
"Unmarshal",
"decodes",
"a",
"JSON",
"representation",
"of",
"v",
"from",
"b",
"."
] | [
"func",
"Unmarshal",
"(",
"b",
"[",
"]",
"byte",
",",
"v",
"interface",
"{",
"}",
")",
"error",
"{",
"u",
":=",
"unmarshalerPool",
".",
"Get",
"(",
")",
".",
"(",
"*",
"unmarshaler",
")",
"\n",
"u",
".",
"<mask>",
"(",
"b",
")",
"\n\n",
"err",
... |
9,371 | all-9372 | [
"UnregisterTopicValidator",
"removes",
"a",
"validator",
"from",
"a",
"topic",
".",
"Returns",
"an",
"error",
"if",
"there",
"was",
"no",
"validator",
"registered",
"with",
"the",
"topic",
"."
] | [
"func",
"(",
"p",
"*",
"PubSub",
")",
"UnregisterTopicValidator",
"(",
"topic",
"string",
")",
"error",
"{",
"rmVal",
":=",
"&",
"rmValReq",
"{",
"topic",
":",
"topic",
",",
"resp",
":",
"<mask>",
"(",
"chan",
"error",
",",
"1",
")",
",",
"}",
"\n\n"... |
9,372 | all-9373 | [
"handleMessages",
"handles",
"each",
"message",
"one",
"at",
"a",
"time"
] | [
"func",
"(",
"attachENIHandler",
"*",
"attachENIHandler",
")",
"handleMessages",
"(",
")",
"{",
"for",
"{",
"select",
"{",
"case",
"message",
":=",
"<-",
"attachENIHandler",
".",
"messageBuffer",
":",
"if",
"err",
":=",
"attachENIHandler",
".",
"handleSingleMess... |
9,373 | all-9374 | [
"GetProfile",
"fetches",
"the",
"recipient",
"s",
"profile",
"from",
"facebook",
"platform",
"Non",
"empty",
"UserID",
"has",
"to",
"be",
"specified",
"in",
"order",
"to",
"receive",
"the",
"information"
] | [
"func",
"(",
"m",
"*",
"Messenger",
")",
"GetProfile",
"(",
"userID",
"string",
")",
"(",
"*",
"Profile",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"m",
".",
"doRequest",
"(",
"\"",
"\"",
",",
"fmt",
".",
"Sprintf",
"(",
"GraphAPI",
"+",
... |
9,374 | all-9375 | [
"GetLiveSpan",
"returns",
"the",
"LiveSpan",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"t",
"*",
"Time",
")",
"GetLiveSpan",
"(",
")",
"<mask>",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"LiveSpan",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"t",
".",
"LiveSpan",
"\n",
"}"
] |
9,375 | all-9376 | [
"ContentType",
"returns",
"Content",
"-",
"Type",
"header",
"value",
"."
] | [
"func",
"(",
"h",
"*",
"ResponseHeader",
")",
"ContentType",
"(",
")",
"[",
"]",
"<mask>",
"{",
"contentType",
":=",
"h",
".",
"contentType",
"\n",
"if",
"!",
"h",
".",
"noDefaultContentType",
"&&",
"len",
"(",
"h",
".",
"contentType",
")",
"==",
"0",
... |
9,376 | all-9377 | [
"Value",
"converts",
"a",
"value",
"to",
"a",
"database",
"driver",
"value"
] | [
"func",
"(",
"u",
"CreditCard",
")",
"Value",
"(",
")",
"(",
"driver",
".",
"Value",
",",
"error",
")",
"{",
"return",
"<mask>",
".",
"Value",
"(",
"string",
"(",
"u",
")",
")",
",",
"nil",
"\n",
"}"
] |
9,377 | all-9378 | [
"declImports",
"reports",
"whether",
"gen",
"contains",
"an",
"import",
"of",
"path",
"."
] | [
"func",
"declImports",
"(",
"gen",
"*",
"ast",
".",
"GenDecl",
",",
"path",
"string",
")",
"bool",
"{",
"if",
"gen",
".",
"Tok",
"!=",
"token",
".",
"IMPORT",
"{",
"return",
"false",
"\n",
"}",
"\n",
"for",
"_",
",",
"spec",
":=",
"<mask>",
"gen",
... |
9,378 | all-9379 | [
"Error",
"method",
"return",
"string",
"representation",
"of",
"Error",
"It",
"is",
"an",
"implementation",
"of",
"error",
"interface"
] | [
"func",
"(",
"e",
"<mask>",
")",
"Error",
"(",
")",
"string",
"{",
"logWithNumber",
":=",
"make",
"(",
"[",
"]",
"string",
",",
"lenWithoutNil",
"(",
"e",
")",
")",
"\n",
"for",
"i",
",",
"l",
":=",
"range",
"e",
"{",
"if",
"l",
"!=",
"nil",
"{... |
9,379 | all-9380 | [
"Encode",
"serializes",
"the",
"JSON",
"marshalable",
"obj",
"data",
"as",
"a",
"JWT",
"."
] | [
"func",
"(",
"hs",
"*",
"HmacSigner",
")",
"Encode",
"(",
"obj",
"<mask>",
"{",
"}",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"return",
"hs",
".",
"alg",
".",
"Encode",
"(",
"hs",
",",
"obj",
")",
"\n",
"}"
] |
9,380 | all-9381 | [
"NewExponentialFullJitter",
"creates",
"a",
"new",
"backoff",
"using",
"the",
"exponential",
"with",
"full",
"jitter",
"backoff",
"algorithm",
"."
] | [
"func",
"NewExponentialFullJitter",
"(",
"start",
"<mask>",
".",
"Duration",
",",
"limit",
"time",
".",
"Duration",
")",
"*",
"Backoff",
"{",
"return",
"NewBackoff",
"(",
"exponentialFullJitter",
"{",
"limit",
":",
"limit",
"}",
",",
"start",
",",
"limit",
"... |
9,381 | all-9382 | [
"HasPrefix",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"t",
"*",
"TemplateVariable",
")",
"HasPrefix",
"(",
")",
"bool",
"{",
"if",
"t",
"!=",
"nil",
"&&",
"t",
".",
"Prefix",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
9,382 | all-9383 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"DeleteCookiesParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork60",
"(",
"&",
"w",
",",
"v",
"... |
9,383 | all-9384 | [
"NewDataEntryExt",
"creates",
"a",
"new",
"DataEntryExt",
"."
] | [
"func",
"NewDataEntryExt",
"(",
"v",
"int32",
",",
"value",
"interface",
"{",
"}",
")",
"(",
"<mask>",
"DataEntryExt",
",",
"err",
"error",
")",
"{",
"result",
".",
"V",
"=",
"v",
"\n",
"switch",
"int32",
"(",
"v",
")",
"{",
"case",
"0",
":",
"// v... |
9,384 | all-9385 | [
"HasText",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"p",
"*",
"Params",
")",
"HasText",
"(",
")",
"bool",
"{",
"if",
"p",
"!=",
"nil",
"&&",
"p",
".",
"<mask>",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
9,385 | all-9386 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetUsageAndQuotaParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage6",
"(",
"&",
"w",
",",
"v",
... |
9,386 | all-9387 | [
"GetNewHostDelay",
"returns",
"the",
"NewHostDelay",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"o",
"*",
"<mask>",
")",
"GetNewHostDelay",
"(",
")",
"int",
"{",
"if",
"o",
"==",
"nil",
"||",
"o",
".",
"NewHostDelay",
"==",
"nil",
"{",
"return",
"0",
"\n",
"}",
"\n",
"return",
"*",
"o",
".",
"NewHostDelay",
"\n",
"}"
] |
9,387 | all-9388 | [
"newAuthTokenRoundTripper",
"adds",
"the",
"provided",
"auth",
"token",
"to",
"a",
"request",
"."
] | [
"func",
"newAuthTokenRoundTripper",
"(",
"token",
"config_util",
".",
"Secret",
",",
"rt",
"http",
".",
"RoundTripper",
")",
"(",
"http",
".",
"RoundTripper",
",",
"error",
")",
"{",
"return",
"&",
"authTokenRoundTripper",
"{",
"<mask>",
",",
"rt",
"}",
",",... |
9,388 | all-9389 | [
"KnownCreated",
"returns",
"true",
"if",
"the",
"cgroup",
"s",
"known",
"status",
"is",
"CREATED"
] | [
"func",
"(",
"auth",
"*",
"ASMAuthResource",
")",
"KnownCreated",
"(",
")",
"bool",
"{",
"auth",
".",
"<mask>",
".",
"RLock",
"(",
")",
"\n",
"defer",
"auth",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n\n",
"return",
"auth",
".",
"knownStatusUnsafe",
"=... |
9,389 | all-9390 | [
"ProgressBarNew",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_progress_bar_new",
"()",
"."
] | [
"func",
"ProgressBarNew",
"(",
")",
"(",
"*",
"ProgressBar",
",",
"<mask>",
")",
"{",
"c",
":=",
"C",
".",
"gtk_progress_bar_new",
"(",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"return",
"nil",
",",
"nilPtrErr",
"\n",
"}",
"\n",
"return",
"wrapProgressB... |
9,390 | all-9391 | [
"==",
"Editing",
"AddGroup",
"adds",
"a",
"group",
"."
] | [
"func",
"AddGroup",
"(",
"name",
"string",
",",
"members",
"...",
"string",
")",
"(",
"gid",
"int",
",",
"err",
"error",
")",
"{",
"s",
":=",
"NewGShadow",
"(",
"name",
",",
"members",
"...",
")",
"\n",
"if",
"err",
"=",
"s",
".",
"Add",
"(",
"ni... |
9,391 | all-9392 | [
"fixed",
"GetData",
"directly",
"from",
"ptr"
] | [
"func",
"GetData",
"(",
"pointer",
"uintptr",
")",
"(",
"data",
"[",
"]",
"byte",
")",
"{",
"c",
":=",
"(",
"*",
"C",
".",
"GValue",
")",
"(",
"unsafe",
".",
"Pointer",
"(",
"pointer",
")",
")",
"\n",
"p",
":=",
"(",
"*",
"C",
".",
"GtkSelectio... |
9,392 | all-9393 | [
"GetStringPtr",
"reads",
"a",
"ResourceData",
"and",
"returns",
"an",
"appropriate",
"*",
"string",
"for",
"the",
"state",
"of",
"the",
"definition",
".",
"nil",
"is",
"returned",
"if",
"it",
"does",
"not",
"exist",
"."
] | [
"func",
"GetStringPtr",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"<mask>",
"string",
")",
"*",
"string",
"{",
"v",
",",
"e",
":=",
"d",
".",
"GetOkExists",
"(",
"key",
")",
"\n",
"if",
"e",
"{",
"return",
"StringPtr",
"(",
"v",
".",
"(",
... |
9,393 | all-9394 | [
"WithTrail",
"creates",
"a",
"new",
"context",
"with",
"trail",
"appended",
"to"
] | [
"func",
"(",
"ec",
"EvalCtx",
")",
"WithTrail",
"(",
"t",
"string",
")",
"EvalCtx",
"{",
"newEC",
":=",
"ec",
"\n",
"trailCopy",
":=",
"<mask>",
"(",
"[",
"]",
"string",
",",
"0",
",",
"len",
"(",
"ec",
".",
"Trail",
")",
"+",
"1",
")",
"\n",
"... |
9,394 | all-9395 | [
"DefaultDevices",
"loads",
"a",
"satisfactory",
"default",
"device",
"list",
"for",
"the",
"optionally",
"supplied",
"host",
"and",
"descriptor",
"key",
".",
"The",
"result",
"is",
"returned",
"as",
"a",
"higher",
"-",
"level",
"VirtualDeviceList",
"object",
"."... | [
"func",
"(",
"b",
"*",
"EnvironmentBrowser",
")",
"DefaultDevices",
"(",
"ctx",
"context",
".",
"Context",
",",
"key",
"string",
",",
"host",
"*",
"object",
".",
"HostSystem",
")",
"(",
"object",
".",
"VirtualDeviceList",
",",
"error",
")",
"{",
"var",
"... |
9,395 | all-9396 | [
"WithClientIP",
"returns",
"a",
"context",
"which",
"carries",
"the",
"given",
"client",
"IP",
"."
] | [
"func",
"WithClientIP",
"(",
"ctx",
"context",
".",
"<mask>",
",",
"ip",
"net",
".",
"IP",
")",
"context",
".",
"Context",
"{",
"if",
"ip",
"==",
"nil",
"{",
"return",
"ctx",
"\n",
"}",
"\n",
"return",
"context",
".",
"WithValue",
"(",
"ctx",
",",
... |
9,396 | all-9397 | [
"clearStaleComments",
"deletes",
"old",
"comments",
"that",
"are",
"no",
"longer",
"applicable",
"."
] | [
"func",
"clearStaleComments",
"(",
"gc",
"githubClient",
",",
"log",
"*",
"logrus",
".",
"Entry",
",",
"pr",
"*",
"github",
".",
"PullRequestEvent",
",",
"prLabels",
"sets",
".",
"String",
",",
"comments",
"[",
"]",
"github",
".",
"IssueComment",
")",
"err... |
9,397 | all-9398 | [
"AddTask",
"starts",
"tracking",
"a",
"task"
] | [
"func",
"(",
"engine",
"*",
"DockerTaskEngine",
")",
"AddTask",
"(",
"task",
"*",
"apitask",
".",
"Task",
")",
"{",
"defer",
"metrics",
".",
"MetricsEngineGlobal",
".",
"RecordTaskEngineMetric",
"(",
"\"",
"\"",
")",
"(",
")",
"\n",
"err",
":=",
"task",
... |
9,398 | all-9399 | [
"New",
"returns",
"a",
"new",
"uuid",
"."
] | [
"func",
"New",
"(",
")",
"string",
"{",
"<mask>",
"result",
"string",
"\n",
"backoff",
".",
"RetryNotify",
"(",
"func",
"(",
")",
"error",
"{",
"uuid",
",",
"err",
":=",
"uuid",
".",
"NewV4",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",... |
9,399 | all-9400 | [
"Update",
"increases",
"the",
"value",
"associated",
"with",
"the",
"key",
".",
"The",
"key",
"will",
"be",
"inserted",
"if",
"it",
"is",
"not",
"in",
"the",
"cedar",
".",
"It",
"will",
"return",
"ErrInvalidValue",
"if",
"the",
"updated",
"value",
"<",
"... | [
"func",
"(",
"da",
"*",
"Cedar",
")",
"Update",
"(",
"key",
"[",
"]",
"byte",
",",
"value",
"int",
")",
"error",
"{",
"p",
":=",
"da",
".",
"get",
"(",
"key",
",",
"0",
",",
"0",
")",
"\n\n",
"// key was not inserted",
"if",
"*",
"p",
"==",
"Va... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.