id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
24,000 | all-24001 | [
"SetIconTooltipText",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_entry_set_icon_tooltip_text",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"SetIconTooltipText",
"(",
"iconPos",
"EntryIconPosition",
",",
"tooltip",
"string",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"tooltip",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
... |
24,001 | all-24002 | [
"SetKnownStatus",
"safely",
"sets",
"the",
"currently",
"known",
"status",
"of",
"the",
"resource"
] | [
"func",
"(",
"auth",
"*",
"ASMAuthResource",
")",
"SetKnownStatus",
"(",
"status",
"resourcestatus",
".",
"ResourceStatus",
")",
"{",
"auth",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"auth",
".",
"<mask>",
".",
"Unlock",
"(",
")",
"\n\n",
"auth... |
24,002 | all-24003 | [
"newConn",
"constructs",
"a",
"new",
"connection"
] | [
"func",
"newSecureConn",
"(",
"ctx",
"context",
".",
"<mask>",
",",
"sk",
"ic",
".",
"PrivKey",
",",
"insecure",
"iconn",
".",
"Conn",
")",
"(",
"iconn",
".",
"Conn",
",",
"error",
")",
"{",
"if",
"insecure",
"==",
"nil",
"{",
"return",
"nil",
",",
... |
24,003 | all-24004 | [
"getConfig",
"parses",
"and",
"returns",
"the",
"configuration",
"data",
"from",
"the",
"storage",
"backend",
"."
] | [
"func",
"getConfig",
"(",
"ctx",
"context",
".",
"Context",
",",
"s",
"logical",
".",
"Storage",
")",
"(",
"*",
"config",
",",
"error",
")",
"{",
"entry",
",",
"err",
":=",
"s",
".",
"Get",
"(",
"ctx",
",",
"\"",
"\"",
")",
"\n",
"if",
"err",
"... |
24,004 | all-24005 | [
"pushError",
"reports",
"err",
"(",
"can",
"be",
"nil",
")",
"to",
"the",
"waiter",
".",
"It",
"does",
"not",
"block",
"and",
"must",
"only",
"be",
"executed",
"once",
"."
] | [
"func",
"(",
"p",
"*",
"batchPoint",
")",
"pushError",
"(",
"err",
"error",
")",
"{",
"p",
".",
"errch",
"<-",
"err",
"\n",
"<mask>",
"(",
"p",
".",
"errch",
")",
"\n",
"}"
] |
24,005 | all-24006 | [
"AppendSubmenu",
"is",
"a",
"wrapper",
"around",
"g_menu_append_submenu",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Menu",
")",
"AppendSubmenu",
"(",
"<mask>",
"string",
",",
"submenu",
"*",
"MenuModel",
")",
"{",
"cstr1",
":=",
"(",
"*",
"C",
".",
"gchar",
")",
"(",
"C",
".",
"CString",
"(",
"label",
")",
")",
"\n",
"defer",
"C",
".",
... |
24,006 | all-24007 | [
"skipStatement",
"scans",
"until",
"the",
"EOF",
"or",
"end",
"of",
"statement",
"is",
"encountered",
"."
] | [
"func",
"(",
"tkn",
"*",
"Tokenizer",
")",
"skipStatement",
"(",
")",
"{",
"ch",
":=",
"tkn",
".",
"lastChar",
"\n",
"for",
"ch",
"!=",
"';'",
"&&",
"ch",
"!=",
"eofChar",
"{",
"tkn",
".",
"<mask>",
"(",
")",
"\n",
"ch",
"=",
"tkn",
".",
"lastCha... |
24,007 | all-24008 | [
"chainHandlers",
"takes",
"a",
"set",
"of",
"middleware",
"and",
"joins",
"them",
"together",
"into",
"a",
"single",
"Middleware",
"making",
"it",
"much",
"simpler",
"to",
"compose",
"middleware",
"together"
] | [
"func",
"chainHandlers",
"(",
"mw",
"...",
"Middleware",
")",
"Middleware",
"{",
"return",
"func",
"(",
"<mask>",
"http",
".",
"Handler",
")",
"http",
".",
"Handler",
"{",
"return",
"http",
".",
"HandlerFunc",
"(",
"func",
"(",
"w",
"http",
".",
"Respons... |
24,008 | all-24009 | [
"GetAggregation",
"returns",
"the",
"Aggregation",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"e",
"*",
"<mask>",
")",
"GetAggregation",
"(",
")",
"string",
"{",
"if",
"e",
"==",
"nil",
"||",
"e",
".",
"Aggregation",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"e",
".",
"Aggregation",
"\n",
"}"
] |
24,009 | all-24010 | [
"Do",
"executes",
"Emulation",
".",
"setTouchEmulationEnabled",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"SetTouchEmulationEnabledParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetTouchEmulationEnabled",
",",
"p",
",",
"nil",
")",
... |
24,010 | all-24011 | [
"===",
"ceil",
"(",
"Vector",
"ValueTypeVector",
")",
"Vector",
"==="
] | [
"func",
"funcCeil",
"(",
"vals",
"[",
"]",
"Value",
",",
"args",
"Expressions",
",",
"enh",
"*",
"EvalNodeHelper",
")",
"<mask>",
"{",
"return",
"simpleFunc",
"(",
"vals",
",",
"enh",
",",
"math",
".",
"Ceil",
")",
"\n",
"}"
] |
24,011 | all-24012 | [
"ReadUint32",
"returns",
"a",
"uint32",
"read",
"from",
"address",
"a",
"of",
"the",
"inferior",
"."
] | [
"func",
"(",
"p",
"*",
"Process",
")",
"ReadUint32",
"(",
"a",
"Address",
")",
"uint32",
"{",
"m",
":=",
"p",
".",
"findMapping",
"(",
"a",
")",
"\n",
"if",
"m",
"==",
"nil",
"{",
"panic",
"(",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"a",
... |
24,012 | all-24013 | [
"Next",
"returns",
"the",
"next",
"page",
"of",
"resources",
".",
"If",
"there",
"are",
"no",
"more",
"resources",
"NoMoreResults",
"is",
"returned",
"."
] | [
"func",
"(",
"c",
"*",
"QueuePageIterator",
")",
"Next",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"*",
"QueuePage",
",",
"error",
")",
"{",
"qp",
":=",
"new",
"(",
"QueuePage",
")",
"\n",
"err",
":=",
"c",
".",
"p",
".",
"Next",
"(",
"ctx"... |
24,013 | all-24014 | [
"copy",
"pixels",
"into",
"a",
"1D",
"texture",
"image"
] | [
"func",
"CopyTexImage1D",
"(",
"target",
"uint32",
",",
"level",
"int32",
",",
"internalformat",
"uint32",
",",
"x",
"int32",
",",
"y",
"int32",
",",
"width",
"int32",
",",
"border",
"int32",
")",
"{",
"syscall",
".",
"Syscall9",
"(",
"gpCopyTexImage1D",
"... |
24,014 | all-24015 | [
"MarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Marshaler",
"."
] | [
"func",
"(",
"t",
"ValueType",
")",
"MarshalEasyJSON",
"(",
"out",
"*",
"jwriter",
".",
"Writer",
")",
"{",
"out",
".",
"<mask>",
"(",
"string",
"(",
"t",
")",
")",
"\n",
"}"
] |
24,015 | all-24016 | [
"Run",
"processes",
"billing",
"for",
"active",
"client",
"channels",
".",
"This",
"function",
"does",
"not",
"return",
"until",
"an",
"error",
"occurs",
"or",
"Close",
"()",
"is",
"called",
"."
] | [
"func",
"(",
"m",
"*",
"Monitor",
")",
"Run",
"(",
")",
"error",
"{",
"m",
".",
"mtx",
".",
"Lock",
"(",
")",
"\n",
"if",
"m",
".",
"exit",
"!=",
"nil",
"{",
"m",
".",
"mtx",
".",
"Unlock",
"(",
")",
"\n",
"return",
"ErrAlreadyRunning",
"\n",
... |
24,016 | all-24017 | [
"simultaneously",
"specify",
"storage",
"for",
"all",
"levels",
"of",
"a",
"one",
"-",
"dimensional",
"texture"
] | [
"func",
"TexStorage1D",
"(",
"target",
"uint32",
",",
"levels",
"int32",
",",
"internalformat",
"uint32",
",",
"width",
"int32",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpTexStorage1D",
",",
"4",
",",
"uintptr",
"(",
"<mask>",
")",
",",
"uintptr",
"(",... |
24,017 | all-24018 | [
"bind",
"a",
"transform",
"feedback",
"object"
] | [
"func",
"BindTransformFeedback",
"(",
"<mask>",
"uint32",
",",
"id",
"uint32",
")",
"{",
"C",
".",
"glowBindTransformFeedback",
"(",
"gpBindTransformFeedback",
",",
"(",
"C",
".",
"GLenum",
")",
"(",
"target",
")",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
... |
24,018 | all-24019 | [
"Marshal",
"writes",
"an",
"xdr",
"element",
"v",
"into",
"w",
"."
] | [
"func",
"Marshal",
"(",
"w",
"io",
".",
"<mask>",
",",
"v",
"interface",
"{",
"}",
")",
"(",
"int",
",",
"error",
")",
"{",
"// delegate to xdr package's Marshal",
"return",
"xdr",
".",
"Marshal",
"(",
"w",
",",
"v",
")",
"\n",
"}"
] |
24,019 | all-24020 | [
"Given",
"a",
"tag",
"string",
"with",
"the",
"format",
"specified",
"in",
"the",
"package",
"comment",
"parseFieldParameters",
"will",
"parse",
"it",
"into",
"a",
"fieldParameters",
"structure",
"ignoring",
"unknown",
"parts",
"of",
"the",
"string",
"."
] | [
"func",
"parseFieldParameters",
"(",
"str",
"string",
")",
"(",
"ret",
"fieldParameters",
")",
"{",
"for",
"_",
",",
"part",
":=",
"range",
"strings",
".",
"Split",
"(",
"str",
",",
"\"",
"\"",
")",
"{",
"switch",
"{",
"case",
"part",
"==",
"\"",
"\"... |
24,020 | all-24021 | [
"prop",
"value",
"enum"
] | [
"func",
"(",
"m",
"*",
"TaskAllOf1",
")",
"validateReasonEnum",
"(",
"path",
",",
"location",
"string",
",",
"value",
"string",
")",
"error",
"{",
"if",
"err",
":=",
"validate",
".",
"Enum",
"(",
"<mask>",
",",
"location",
",",
"value",
",",
"taskAllOf1T... |
24,021 | all-24022 | [
"NewLedgerHeaderExt",
"creates",
"a",
"new",
"LedgerHeaderExt",
"."
] | [
"func",
"NewLedgerHeaderExt",
"(",
"v",
"int32",
",",
"value",
"<mask>",
"{",
"}",
")",
"(",
"result",
"LedgerHeaderExt",
",",
"err",
"error",
")",
"{",
"result",
".",
"V",
"=",
"v",
"\n",
"switch",
"int32",
"(",
"v",
")",
"{",
"case",
"0",
":",
"/... |
24,022 | all-24023 | [
"KeyPressDuration",
"returns",
"how",
"long",
"the",
"key",
"is",
"pressed",
"in",
"frames",
".",
"KeyPressDuration",
"is",
"concurrent",
"safe",
"."
] | [
"func",
"KeyPressDuration",
"(",
"key",
"ebiten",
".",
"Key",
")",
"int",
"{",
"theInputState",
".",
"m",
".",
"RLock",
"(",
")",
"\n",
"s",
":=",
"theInputState",
".",
"keyDurations",
"[",
"<mask>",
"]",
"\n",
"theInputState",
".",
"m",
".",
"RUnlock",
... |
24,023 | all-24024 | [
"Parse",
"parse",
"string",
"to",
"time"
] | [
"func",
"Parse",
"(",
"strs",
"...",
"string",
")",
"(",
"time",
".",
"Time",
",",
"error",
")",
"{",
"return",
"New",
"(",
"<mask>",
".",
"Now",
"(",
")",
")",
".",
"Parse",
"(",
"strs",
"...",
")",
"\n",
"}"
] |
24,024 | all-24025 | [
"computeDiffID",
"reads",
"all",
"input",
"from",
"layerStream",
"uncompresses",
"it",
"using",
"decompressor",
"if",
"necessary",
"and",
"returns",
"its",
"digest",
"."
] | [
"func",
"computeDiffID",
"(",
"stream",
"io",
".",
"Reader",
",",
"decompressor",
"compression",
".",
"DecompressorFunc",
")",
"(",
"digest",
".",
"Digest",
",",
"error",
")",
"{",
"if",
"decompressor",
"!=",
"nil",
"{",
"s",
",",
"err",
":=",
"decompresso... |
24,025 | all-24026 | [
"GetUsername",
"finds",
"the",
"login",
"for",
"each",
"token"
] | [
"func",
"GetUsername",
"(",
"<mask>",
"*",
"github",
".",
"Client",
")",
"(",
"string",
",",
"error",
")",
"{",
"user",
",",
"_",
",",
"err",
":=",
"client",
".",
"Users",
".",
"Get",
"(",
"context",
".",
"Background",
"(",
")",
",",
"\"",
"\"",
... |
24,026 | all-24027 | [
"NewMockWebsocketConn",
"creates",
"a",
"new",
"mock",
"instance"
] | [
"func",
"NewMockWebsocketConn",
"(",
"ctrl",
"*",
"gomock",
".",
"<mask>",
")",
"*",
"MockWebsocketConn",
"{",
"mock",
":=",
"&",
"MockWebsocketConn",
"{",
"ctrl",
":",
"ctrl",
"}",
"\n",
"mock",
".",
"recorder",
"=",
"&",
"MockWebsocketConnMockRecorder",
"{",... |
24,027 | all-24028 | [
"Browser",
"returns",
"the",
"HostDatastoreBrowser",
"for",
"a",
"certain",
"datastore",
".",
"This",
"is",
"a",
"convenience",
"method",
"that",
"exists",
"to",
"abstract",
"the",
"context",
"."
] | [
"func",
"Browser",
"(",
"ds",
"*",
"object",
".",
"Datastore",
")",
"(",
"*",
"object",
".",
"HostDatastoreBrowser",
",",
"error",
")",
"{",
"ctx",
",",
"cancel",
":=",
"context",
".",
"WithTimeout",
"(",
"<mask>",
".",
"Background",
"(",
")",
",",
"pr... |
24,028 | all-24029 | [
"Where",
"adds",
"WHERE",
"clause",
"to",
"the",
"Condition",
"and",
"returns",
"it",
"for",
"method",
"chain",
"."
] | [
"func",
"(",
"c",
"*",
"Condition",
")",
"Where",
"(",
"cond",
"<mask>",
"{",
"}",
",",
"args",
"...",
"interface",
"{",
"}",
")",
"*",
"Condition",
"{",
"return",
"c",
".",
"appendQueryByCondOrExpr",
"(",
"\"",
"\"",
",",
"0",
",",
"Where",
",",
"... |
24,029 | all-24030 | [
"GetNPagesToPrint",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_print_operation_get_n_pages_to_print",
"()",
"."
] | [
"func",
"(",
"po",
"*",
"PrintOperation",
")",
"GetNPagesToPrint",
"(",
")",
"int",
"{",
"c",
":=",
"C",
".",
"gtk_print_operation_get_n_pages_to_print",
"(",
"<mask>",
".",
"native",
"(",
")",
")",
"\n",
"return",
"int",
"(",
"c",
")",
"\n",
"}"
] |
24,030 | all-24031 | [
"MarshalJSON",
"implements",
"of",
"json",
".",
"Marshaler",
"interface",
".",
"It",
"marshals",
"string",
"representations",
"of",
"time",
".",
"Duration",
"."
] | [
"func",
"(",
"o",
"Options",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"return",
"json",
".",
"Marshal",
"(",
"optionsJSON",
"{",
"Timeout",
":",
"marshal",
".",
"Duration",
"(",
"o",
".",
"Timeout",
")",
",",
"... |
24,031 | all-24032 | [
"HasChildren",
"checks",
"to",
"see",
"if",
"a",
"compute",
"resource",
"has",
"any",
"child",
"items",
"(",
"hosts",
"and",
"virtual",
"machines",
")",
"and",
"returns",
"true",
"if",
"that",
"is",
"the",
"case",
".",
"This",
"is",
"useful",
"when",
"ch... | [
"func",
"HasChildren",
"(",
"obj",
"BaseComputeResource",
")",
"(",
"bool",
",",
"error",
")",
"{",
"props",
",",
"err",
":=",
"BaseProperties",
"(",
"obj",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"<mask>",
",",
"err",
"\n",
"}",
"\n\n",
... |
24,032 | all-24033 | [
"NewRClientWithAuth",
"creates",
"a",
"RClient",
"with",
"the",
"specified",
"credentials",
"and",
"RServe",
"server",
"details"
] | [
"func",
"NewRClientWithAuth",
"(",
"host",
"string",
",",
"port",
"int64",
",",
"user",
",",
"password",
"string",
")",
"(",
"RClient",
",",
"error",
")",
"{",
"addr",
",",
"err",
":=",
"net",
".",
"ResolveTCPAddr",
"(",
"\"",
"\"",
",",
"host",
"+",
... |
24,033 | all-24034 | [
"NewInlineQueryResultArticle",
"returns",
"a",
"new",
"InlineQueryResultArticle",
"with",
"all",
"mandatory",
"fields",
"set",
"."
] | [
"func",
"NewInlineQueryResultArticle",
"(",
"id",
",",
"<mask>",
",",
"text",
"string",
")",
"*",
"InlineQueryResultArticle",
"{",
"return",
"&",
"InlineQueryResultArticle",
"{",
"InlineQueryResultBase",
":",
"InlineQueryResultBase",
"{",
"Type",
":",
"ArticleResult",
... |
24,034 | all-24035 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SearchInResponseBodyReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork20",
"(",
"&",
"w",
",",
... |
24,035 | all-24036 | [
"FileModeGoString",
"returns",
"the",
"value",
"of",
"the",
"os",
".",
"FileMode",
"for",
"printing",
"in",
"a",
"string",
"."
] | [
"func",
"FileModeGoString",
"(",
"o",
"*",
"<mask>",
".",
"FileMode",
")",
"string",
"{",
"if",
"o",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"*",
"o",
")",
"\n",
"}"
] |
24,036 | all-24037 | [
"NewSalter",
"creates",
"a",
"new",
"instance",
"of",
"Salter",
".",
"It",
"requires",
"a",
"list",
"of",
"sources",
"of",
"random",
"data",
"and",
"optionally",
"an",
"input",
"to",
"salt",
"next",
"token",
"."
] | [
"func",
"NewSalter",
"(",
"sources",
"RandomSourceList",
",",
"input",
"[",
"]",
"byte",
")",
"*",
"Salter",
"{",
"if",
"input",
"==",
"nil",
"{",
"input",
"=",
"[",
"]",
"byte",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"hash",
":=",
"sha256",
".",... |
24,037 | all-24038 | [
"Len",
"returns",
"the",
"length",
"of",
"the",
"array",
"v",
".",
"If",
"v",
".",
"Kind",
"()",
"!",
"=",
"Array",
"Len",
"returns",
"0",
"."
] | [
"func",
"(",
"v",
"Value",
")",
"Len",
"(",
")",
"int",
"{",
"x",
",",
"<mask>",
":=",
"v",
".",
"data",
".",
"(",
"array",
")",
"\n",
"if",
"!",
"ok",
"{",
"return",
"0",
"\n",
"}",
"\n",
"return",
"len",
"(",
"x",
")",
"\n",
"}"
] |
24,038 | all-24039 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"MoveToReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom29",
"(",
"&",
"w",
",",
"v",
")",
"\n"... |
24,039 | all-24040 | [
"NewSdk",
"is",
"used",
"to",
"create",
"a",
"Sdk",
"client",
"to",
"connect",
"to",
"the",
"cloud",
"provider",
"."
] | [
"func",
"NewSdk",
"(",
")",
"(",
"*",
"Sdk",
",",
"error",
")",
"{",
"sdk",
":=",
"&",
"Sdk",
"{",
"}",
"\n\n",
"client",
",",
"err",
":=",
"google",
".",
"DefaultClient",
"(",
"context",
".",
"TODO",
"(",
")",
",",
"compute",
".",
"ComputeScope",
... |
24,040 | all-24041 | [
"Start",
"starts",
"an",
"existing",
"GCE",
"instance",
"or",
"create",
"an",
"instance",
"with",
"an",
"existing",
"disk",
"."
] | [
"func",
"(",
"d",
"*",
"Driver",
")",
"Start",
"(",
")",
"error",
"{",
"c",
",",
"err",
":=",
"newComputeUtil",
"(",
"d",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n\n",
"instance",
",",
"err",
":=",
"c",
".",
"ins... |
24,041 | all-24042 | [
"Read",
"all",
"the",
"series",
"records",
"from",
"a",
"Checkpoint",
"directory",
"."
] | [
"func",
"(",
"w",
"*",
"WALWatcher",
")",
"readCheckpoint",
"(",
"checkpointDir",
"string",
")",
"error",
"{",
"level",
".",
"Debug",
"(",
"w",
".",
"logger",
")",
".",
"Log",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"checkpointDir",
... |
24,042 | all-24043 | [
"BoshReleaseOrEmpty",
"returns",
"the",
"named",
"BOSH",
"release",
"from",
"this",
"pivnet",
"release",
"if",
"it",
"exists",
"otherwise",
"emptyBoshRelease",
"is",
"returned",
"."
] | [
"func",
"(",
"r",
"*",
"PivnetRelease",
")",
"BoshReleaseOrEmpty",
"(",
"name",
"string",
")",
"*",
"BoshRelease",
"{",
"br",
":=",
"r",
".",
"BoshRelease",
"[",
"<mask>",
"]",
"\n",
"if",
"br",
"==",
"nil",
"{",
"br",
"=",
"emptyBoshRelease",
"\n",
"}... |
24,043 | all-24044 | [
"expect",
"consumes",
"the",
"next",
"token",
"and",
"guarantees",
"it",
"has",
"the",
"required",
"type",
"."
] | [
"func",
"(",
"p",
"*",
"parser",
")",
"expect",
"(",
"exp",
"ItemType",
",",
"context",
"string",
")",
"item",
"{",
"token",
":=",
"p",
".",
"<mask>",
"(",
")",
"\n",
"if",
"token",
".",
"typ",
"!=",
"exp",
"{",
"p",
".",
"errorf",
"(",
"\"",
"... |
24,044 | all-24045 | [
"Create",
"a",
"new",
"temporary",
"file",
"in",
"the",
"directory",
"dir",
"with",
"a",
"name",
"beginning",
"with",
"prefix",
"writes",
"the",
"provided",
"data",
"into",
"it",
"and",
"returns",
"it",
"s",
"path",
".",
"If",
"dir",
"is",
"the",
"empty"... | [
"func",
"Create",
"(",
"dir",
",",
"prefix",
"string",
",",
"data",
"[",
"]",
"byte",
")",
"(",
"path",
"string",
",",
"err",
"error",
")",
"{",
"var",
"tmp",
"*",
"os",
".",
"File",
"\n\n",
"tmp",
",",
"err",
"=",
"ioutil",
".",
"TempFile",
"(",... |
24,045 | all-24046 | [
"Wrap",
"the",
"given",
"error",
"in",
"an",
"errs",
".",
"Err",
".",
"If",
"err",
"is",
"nil",
"Wrap",
"returns",
"nil",
".",
"Use",
"Err",
".",
"WrappedError",
"for",
"direct",
"access",
"to",
"the",
"wrapped",
"error",
"."
] | [
"func",
"Wrap",
"(",
"wrapErr",
"error",
",",
"info",
"Info",
",",
"publicMsg",
"...",
"interface",
"{",
"}",
")",
"Err",
"{",
"if",
"wrapErr",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"if",
"info",
"==",
"nil",
"{",
"<mask>",
"=",
"Info... |
24,046 | all-24047 | [
"Fail",
"Response",
"fail"
] | [
"func",
"(",
"ctx",
"*",
"Context",
")",
"Fail",
"(",
"err",
"error",
")",
"{",
"if",
"err",
"==",
"nil",
"{",
"log",
".",
"WithFields",
"(",
"log",
".",
"Fields",
"{",
"\"",
"\"",
":",
"ctx",
".",
"Request",
".",
"<mask>",
".",
"Path",
"}",
")... |
24,047 | all-24048 | [
"SetValid",
"changes",
"this",
"Float",
"s",
"value",
"and",
"also",
"sets",
"it",
"to",
"be",
"non",
"-",
"null",
"."
] | [
"func",
"(",
"f",
"*",
"<mask>",
")",
"SetValid",
"(",
"v",
"float64",
")",
"{",
"f",
".",
"Float64",
"=",
"v",
"\n",
"f",
".",
"Valid",
"=",
"true",
"\n",
"}"
] |
24,048 | all-24049 | [
"injectedSteps",
"returns",
"initial",
"containers",
"a",
"final",
"container",
"and",
"an",
"additional",
"volume",
"."
] | [
"func",
"injectedSteps",
"(",
"encodedJobSpec",
"string",
",",
"dc",
"prowjobv1",
".",
"DecorationConfig",
",",
"injectedSource",
"bool",
",",
"toolsMount",
"coreapi",
".",
"VolumeMount",
",",
"entries",
"[",
"]",
"wrapper",
".",
"Options",
")",
"(",
"[",
"]",... |
24,049 | all-24050 | [
"Activate",
"is",
"a",
"wrapper",
"around",
"gtk_accel_group_activate",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"AccelGroup",
")",
"Activate",
"(",
"quark",
"glib",
".",
"Quark",
",",
"acceleratable",
"*",
"glib",
".",
"Object",
",",
"key",
"uint",
",",
"mods",
"gdk",
".",
"ModifierType",
")",
"bool",
"{",
"return",
"gobool",
"(",
"C",
"... |
24,050 | all-24051 | [
"Send",
"accumulates",
"the",
"GossipData",
"and",
"will",
"send",
"it",
"eventually",
".",
"Send",
"and",
"Broadcast",
"accumulate",
"into",
"different",
"buckets",
"."
] | [
"func",
"(",
"s",
"*",
"gossipSender",
")",
"Send",
"(",
"data",
"GossipData",
")",
"{",
"s",
".",
"Lock",
"(",
")",
"\n",
"defer",
"s",
".",
"Unlock",
"(",
")",
"\n",
"if",
"s",
".",
"empty",
"(",
")",
"{",
"defer",
"s",
".",
"prod",
"(",
")... |
24,051 | all-24052 | [
"resourceVSphereComputeClusterProcessHostUpdate",
"processes",
"any",
"changes",
"in",
"host",
"membership",
"in",
"the",
"cluster",
".",
"Note",
"that",
"this",
"has",
"implications",
"for",
"interoperability",
"with",
"any",
"future",
"host",
"resources",
"that",
"w... | [
"func",
"resourceVSphereComputeClusterProcessHostUpdate",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"meta",
"interface",
"{",
"}",
",",
"cluster",
"*",
"object",
".",
"ClusterComputeResource",
",",
")",
"error",
"{",
"log",
".",
"Printf",
"(",
"\"",
"... |
24,052 | all-24053 | [
"buildEnv",
"constructs",
"the",
"environment",
"map",
"for",
"the",
"job"
] | [
"func",
"buildEnv",
"(",
"pj",
"prowjobv1",
".",
"ProwJob",
",",
"buildID",
"string",
")",
"(",
"map",
"[",
"string",
"]",
"string",
",",
"error",
")",
"{",
"return",
"downwardapi",
".",
"EnvForSpec",
"(",
"downwardapi",
".",
"NewJobSpec",
"(",
"pj",
"."... |
24,053 | all-24054 | [
"sendFile",
"sends",
"a",
"file",
"into",
"the",
"tar",
"stream",
"."
] | [
"func",
"(",
"d",
"*",
"Destination",
")",
"sendFile",
"(",
"path",
"string",
",",
"expectedSize",
"int64",
",",
"stream",
"<mask>",
".",
"Reader",
")",
"error",
"{",
"hdr",
",",
"err",
":=",
"tar",
".",
"FileInfoHeader",
"(",
"&",
"tarFI",
"{",
"path"... |
24,054 | all-24055 | [
"Get",
"executes",
"GET",
"request",
"to",
"the",
"server",
"endpoint",
"with",
"optional",
"query",
"arguments",
"passed",
"in",
"params",
"re",
"err",
":",
"=",
"c",
".",
"Get",
"(",
"c",
".",
"Endpoint",
"(",
"users",
")",
"url",
".",
"Values",
"{",... | [
"func",
"(",
"c",
"*",
"Client",
")",
"Get",
"(",
"ctx",
"context",
".",
"Context",
",",
"endpoint",
"string",
",",
"params",
"url",
".",
"Values",
")",
"(",
"*",
"Response",
",",
"error",
")",
"{",
"// If the sanitizer is enabled, make sure the requested path... |
24,055 | all-24056 | [
"ns1BuildRecord",
"returns",
"a",
"dns",
".",
"Record",
"for",
"a",
"change",
"set"
] | [
"func",
"ns1BuildRecord",
"(",
"zoneName",
"string",
",",
"change",
"*",
"ns1Change",
")",
"*",
"dns",
".",
"Record",
"{",
"record",
":=",
"dns",
".",
"NewRecord",
"(",
"zoneName",
",",
"change",
".",
"Endpoint",
".",
"DNSName",
",",
"change",
".",
"Endp... |
24,056 | all-24057 | [
"set",
"the",
"scale",
"and",
"units",
"used",
"to",
"calculate",
"depth",
"values"
] | [
"func",
"PolygonOffset",
"(",
"<mask>",
"float32",
",",
"units",
"float32",
")",
"{",
"C",
".",
"glowPolygonOffset",
"(",
"gpPolygonOffset",
",",
"(",
"C",
".",
"GLfloat",
")",
"(",
"factor",
")",
",",
"(",
"C",
".",
"GLfloat",
")",
"(",
"units",
")",
... |
24,057 | all-24058 | [
"SortSlices",
"returns",
"a",
"Transformer",
"option",
"that",
"sorts",
"all",
"[]",
"V",
".",
"The",
"less",
"function",
"must",
"be",
"of",
"the",
"form",
"func",
"(",
"T",
"T",
")",
"bool",
"which",
"is",
"used",
"to",
"sort",
"any",
"slice",
"with"... | [
"func",
"SortSlices",
"(",
"lessFunc",
"<mask>",
"{",
"}",
")",
"cmp",
".",
"Option",
"{",
"vf",
":=",
"reflect",
".",
"ValueOf",
"(",
"lessFunc",
")",
"\n",
"if",
"!",
"function",
".",
"IsType",
"(",
"vf",
".",
"Type",
"(",
")",
",",
"function",
"... |
24,058 | all-24059 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SamplingProfileNode",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory4",
"(",
"&",
"w",
",",
"v",
")"... |
24,059 | all-24060 | [
"GetPrintSettings",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_print_operation_get_print_settings",
"()",
"."
] | [
"func",
"(",
"<mask>",
"*",
"PrintOperation",
")",
"GetPrintSettings",
"(",
"ps",
"*",
"PageSetup",
")",
"(",
"*",
"PrintSettings",
",",
"error",
")",
"{",
"c",
":=",
"C",
".",
"gtk_print_operation_get_print_settings",
"(",
"po",
".",
"native",
"(",
")",
"... |
24,060 | all-24061 | [
"flattenHostPortGroupSpec",
"reads",
"various",
"fields",
"from",
"a",
"HostPortGroupSpec",
"into",
"the",
"passed",
"in",
"ResourceData",
"."
] | [
"func",
"flattenHostPortGroupSpec",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"obj",
"*",
"<mask>",
".",
"HostPortGroupSpec",
")",
"error",
"{",
"d",
".",
"Set",
"(",
"\"",
"\"",
",",
"obj",
".",
"VlanId",
")",
"\n",
"if",
"err",
":=",
"flatte... |
24,061 | all-24062 | [
"Do",
"executes",
"Network",
".",
"deleteCookies",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"DeleteCookiesParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandDeleteCookies",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
24,062 | all-24063 | [
"retrieve",
"information",
"about",
"implementation",
"-",
"dependent",
"support",
"for",
"internal",
"formats"
] | [
"func",
"GetInternalformativ",
"(",
"target",
"uint32",
",",
"internalformat",
"uint32",
",",
"pname",
"uint32",
",",
"bufSize",
"int32",
",",
"params",
"*",
"int32",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpGetInternalformativ",
",",
"5",
",",
"uintptr",... |
24,063 | all-24064 | [
"ProfileConfigClear",
"resets",
"the",
"config",
"of",
"the",
"profile",
"with",
"the",
"given",
"ID",
"."
] | [
"func",
"ProfileConfigClear",
"(",
"tx",
"*",
"sql",
".",
"Tx",
",",
"id",
"int64",
")",
"error",
"{",
"_",
",",
"err",
":=",
"tx",
".",
"Exec",
"(",
"\"",
"\"",
",",
"id",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
... |
24,064 | all-24065 | [
"ListPullRequestComments",
"returns",
"review",
"comments",
"."
] | [
"func",
"(",
"f",
"*",
"FakeClient",
")",
"ListPullRequestComments",
"(",
"<mask>",
",",
"repo",
"string",
",",
"number",
"int",
")",
"(",
"[",
"]",
"github",
".",
"ReviewComment",
",",
"error",
")",
"{",
"return",
"append",
"(",
"[",
"]",
"github",
".... |
24,065 | all-24066 | [
"CreateProvisionBroker",
"creates",
"a",
"new",
"provison",
"broker",
"[",
"request",
"]",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"CreateProvisionBroker",
"(",
"cfg",
"*",
"ProvisionBroker",
")",
"(",
"*",
"ProvisionBroker",
",",
"error",
")",
"{",
"if",
"cfg",
"==",
"nil",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",... |
24,066 | all-24067 | [
"SoftwareVersion",
"returns",
"the",
"version",
"of",
"the",
"currently",
"running",
"instance"
] | [
"func",
"(",
"o",
"*",
"<mask>",
")",
"SoftwareVersion",
"(",
")",
"string",
"{",
"o",
".",
"cmdCtrlLock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"o",
".",
"cmdCtrlLock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"o",
".",
"binaryUpgrade",
".",
"GetC... |
24,067 | all-24068 | [
"containerNextState",
"determines",
"the",
"next",
"state",
"a",
"container",
"should",
"go",
"to",
".",
"It",
"returns",
"a",
"transition",
"struct",
"including",
"the",
"information",
":",
"*",
"container",
"state",
"it",
"should",
"transition",
"to",
"*",
"... | [
"func",
"(",
"mtask",
"*",
"managedTask",
")",
"containerNextState",
"(",
"container",
"*",
"apicontainer",
".",
"Container",
")",
"*",
"containerTransition",
"{",
"containerKnownStatus",
":=",
"container",
".",
"GetKnownStatus",
"(",
")",
"\n",
"containerDesiredSta... |
24,068 | all-24069 | [
"GetManageOfferOp",
"retrieves",
"the",
"ManageOfferOp",
"value",
"from",
"the",
"union",
"returning",
"ok",
"if",
"the",
"union",
"s",
"switch",
"indicated",
"the",
"value",
"is",
"valid",
"."
] | [
"func",
"(",
"u",
"OperationBody",
")",
"GetManageOfferOp",
"(",
")",
"(",
"result",
"ManageOfferOp",
",",
"<mask>",
"bool",
")",
"{",
"armName",
",",
"_",
":=",
"u",
".",
"ArmForSwitch",
"(",
"int32",
"(",
"u",
".",
"Type",
")",
")",
"\n\n",
"if",
"... |
24,069 | all-24070 | [
"Create",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockOS",
")",
"Create",
"(",
"arg0",
"string",
")",
"(",
"oswrapper",
".",
"File",
",",
"error",
")",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
",",
"arg0",
")",
"\n",
"ret0",
",",
"_"... |
24,070 | all-24071 | [
"Getpid",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockOS",
")",
"Getpid",
"(",
")",
"int",
"{",
"<mask>",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
")",
"\n",
"ret0",
",",
"_",
":=",
"ret",
"[",
"0",
"]",
".",
"(",
"int",
")",
"\n",
"return",
... |
24,071 | all-24072 | [
"Generate",
"a",
"new",
"Time",
"Based",
"One",
"Time",
"Password",
"with",
"the",
"given",
"secret",
"(",
"a",
"b32",
"encoded",
"key",
")"
] | [
"func",
"New",
"(",
"secretB32",
"string",
")",
"(",
"*",
"TOTP",
",",
"error",
")",
"{",
"// Decode the secret",
"key",
",",
"err",
":=",
"base32",
".",
"StdEncoding",
".",
"DecodeString",
"(",
"secretB32",
")",
"\n",
"if",
"nil",
"!=",
"err",
"{",
"r... |
24,072 | all-24073 | [
"GetHostIPs",
"returns",
"a",
"list",
"of",
"IP",
"addresses",
"of",
"all",
"host",
"s",
"interfaces",
"."
] | [
"func",
"GetHostIPs",
"(",
")",
"(",
"[",
"]",
"net",
".",
"IP",
",",
"error",
")",
"{",
"ifaces",
",",
"err",
":=",
"net",
".",
"Interfaces",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",... |
24,073 | all-24074 | [
"Generic",
"ReplaceAtLine",
":",
"replaces",
"a",
"number",
"of",
"regular",
"expressions",
"matched",
"in",
"r",
"if",
"the",
"line",
"is",
"matched",
"at",
"the",
"first",
"."
] | [
"func",
"(",
"e",
"*",
"edit",
")",
"genReplaceAtLine",
"(",
"r",
"[",
"]",
"ReplacerAtLine",
",",
"n",
"int",
")",
"error",
"{",
"if",
"n",
"==",
"0",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"if",
"_",
",",
"err",
":=",
"e",
".",
"file",
".",
... |
24,074 | all-24075 | [
"BytesTwo",
"returns",
"all",
"readable",
"bytes",
"but",
"in",
"two",
"separate",
"slices",
"to",
"avoid",
"copying",
".",
"The",
"two",
"slices",
"are",
"from",
"the",
"same",
"buffer",
"but",
"are",
"not",
"contiguous",
".",
"Either",
"or",
"both",
"may... | [
"func",
"(",
"b",
"*",
"AtomicFixedSizeRingBuf",
")",
"BytesTwo",
"(",
")",
"TwoBuffers",
"{",
"b",
".",
"tex",
".",
"Lock",
"(",
")",
"\n",
"defer",
"b",
".",
"tex",
".",
"Unlock",
"(",
")",
"\n",
"<mask>",
"b",
".",
"unatomic_BytesTwo",
"(",
")",
... |
24,075 | all-24076 | [
"Format",
"implements",
"the",
"fmt",
".",
"Formatter",
"interface",
".",
"If",
"the",
"context",
"is",
"printed",
"with",
"%",
"+",
"v",
"then",
"it",
"prints",
"using",
"the",
"String",
"method",
"of",
"the",
"wrapped",
"context",
"."
] | [
"func",
"(",
"c",
"*",
"contextT",
")",
"Format",
"(",
"f",
"fmt",
".",
"State",
",",
"ch",
"rune",
")",
"{",
"if",
"ch",
"==",
"'v'",
"&&",
"f",
".",
"Flag",
"(",
"'+'",
")",
"{",
"fmt",
".",
"Fprint",
"(",
"f",
",",
"c",
".",
"ctx",
")",
... |
24,076 | all-24077 | [
"SetContentType",
"sets",
"Content",
"-",
"Type",
"header",
"value",
"."
] | [
"func",
"(",
"h",
"*",
"RequestHeader",
")",
"SetContentType",
"(",
"contentType",
"string",
")",
"{",
"h",
".",
"parseRawHeaders",
"(",
")",
"\n",
"h",
".",
"contentType",
"=",
"<mask>",
"(",
"h",
".",
"contentType",
"[",
":",
"0",
"]",
",",
"contentT... |
24,077 | all-24078 | [
"Usage",
"writes",
"usage",
"information",
"to",
"stderr",
"using",
"the",
"default",
"header",
"and",
"table",
"format"
] | [
"func",
"Usage",
"(",
"prefix",
"string",
",",
"spec",
"interface",
"{",
"}",
")",
"error",
"{",
"// The default is to output the usage information as a table",
"// Create tabwriter instance to support table output",
"tabs",
":=",
"tabwriter",
".",
"NewWriter",
"(",
"os",
... |
24,078 | all-24079 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"the",
"current",
"program",
"object"
] | [
"func",
"UniformMatrix2x4fv",
"(",
"<mask>",
"int32",
",",
"count",
"int32",
",",
"transpose",
"bool",
",",
"value",
"*",
"float32",
")",
"{",
"C",
".",
"glowUniformMatrix2x4fv",
"(",
"gpUniformMatrix2x4fv",
",",
"(",
"C",
".",
"GLint",
")",
"(",
"location",... |
24,079 | all-24080 | [
"Size",
"returns",
"the",
"size",
"of",
"the",
"artifact",
"in",
"GCS"
] | [
"func",
"(",
"a",
"*",
"GCSArtifact",
")",
"Size",
"(",
")",
"(",
"int64",
",",
"error",
")",
"{",
"attrs",
",",
"err",
":=",
"a",
".",
"<mask>",
".",
"Attrs",
"(",
"a",
".",
"ctx",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"0",
","... |
24,080 | all-24081 | [
"CreateTokenHandler",
"parses",
"the",
"token",
"and",
"create",
"a",
"handler"
] | [
"func",
"CreateTokenHandler",
"(",
"tokenStream",
"io",
".",
"Reader",
",",
"influxdb",
"*",
"InfluxDB",
")",
"(",
"*",
"TokenHandler",
",",
"error",
")",
"{",
"<mask>",
",",
"err",
":=",
"ioutil",
".",
"ReadAll",
"(",
"tokenStream",
")",
"\n",
"if",
"er... |
24,081 | all-24082 | [
"Execute",
"-",
"creates",
"organizations"
] | [
"func",
"(",
"c",
"*",
"CreateOrgsCommand",
")",
"Execute",
"(",
"[",
"]",
"string",
")",
"error",
"{",
"var",
"cfMgmt",
"*",
"CFMgmt",
"\n",
"<mask>",
"err",
"error",
"\n",
"if",
"cfMgmt",
",",
"err",
"=",
"InitializePeekManagers",
"(",
"c",
".",
"Bas... |
24,082 | all-24083 | [
"GetFillMax",
"returns",
"the",
"FillMax",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"s",
"*",
"Style",
")",
"GetFillMax",
"(",
")",
"json",
".",
"Number",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"FillMax",
"==",
"nil",
"{",
"<mask>",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"s",
".",
"FillMax",
"\n",
"}"
] |
24,083 | all-24084 | [
"PolicyConfigurationNamespaces",
"returns",
"a",
"list",
"of",
"other",
"policy",
"configuration",
"namespaces",
"to",
"search",
"for",
"if",
"explicit",
"configuration",
"for",
"PolicyConfigurationIdentity",
"()",
"is",
"not",
"set",
".",
"The",
"list",
"will",
"be... | [
"func",
"(",
"ref",
"dirReference",
")",
"PolicyConfigurationNamespaces",
"(",
")",
"[",
"]",
"string",
"{",
"<mask>",
":=",
"[",
"]",
"string",
"{",
"}",
"\n",
"path",
":=",
"ref",
".",
"resolvedPath",
"\n",
"for",
"{",
"lastSlash",
":=",
"strings",
"."... |
24,084 | all-24085 | [
"WithObjectID",
"JavaScript",
"object",
"id",
"of",
"the",
"node",
"wrapper",
"."
] | [
"func",
"(",
"p",
"GetOuterHTMLParams",
")",
"WithObjectID",
"(",
"objectID",
"runtime",
".",
"RemoteObjectID",
")",
"*",
"GetOuterHTMLParams",
"{",
"p",
".",
"ObjectID",
"=",
"objectID",
"\n",
"<mask>",
"&",
"p",
"\n",
"}"
] |
24,085 | all-24086 | [
"ToggleButtonNewWithLabel",
"is",
"a",
"wrapper",
"around",
"gtk_toggle_button_new_with_label",
"()",
"."
] | [
"func",
"ToggleButtonNewWithLabel",
"(",
"label",
"string",
")",
"(",
"*",
"ToggleButton",
",",
"error",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"label",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",... |
24,086 | all-24087 | [
"sudo",
"is",
"a",
"helper",
"function",
"that",
"copies",
"pachClient",
"grants",
"it",
"PPS",
"s",
"superuser",
"token",
"and",
"calls",
"f",
"with",
"the",
"superuser",
"client",
".",
"This",
"helps",
"isolate",
"PPS",
"s",
"use",
"of",
"its",
"superuse... | [
"func",
"(",
"a",
"*",
"apiServer",
")",
"sudo",
"(",
"pachClient",
"*",
"client",
".",
"APIClient",
",",
"f",
"func",
"(",
"*",
"client",
".",
"APIClient",
")",
"error",
")",
"error",
"{",
"// Get PPS auth token",
"superUserTokenOnce",
".",
"Do",
"(",
"... |
24,087 | all-24088 | [
"cancelWatcher",
"removes",
"references",
"of",
"the",
"watcher",
"from",
"the",
"watchableStore"
] | [
"func",
"(",
"s",
"*",
"watchableStore",
")",
"cancelWatcher",
"(",
"wa",
"*",
"watcher",
")",
"{",
"for",
"{",
"s",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"if",
"s",
".",
"unsynced",
".",
"delete",
"(",
"wa",
")",
"{",
"slowWatcherGauge",
".",
... |
24,088 | all-24089 | [
"MakeSlice",
"returns",
"a",
"pointer",
"to",
"a",
"zero",
"length",
"slice",
"of",
"the",
"model",
"e",
".",
"g",
".",
"*",
"[]",
"*",
"Post",
".",
"Note",
":",
"Don",
"t",
"forget",
"to",
"initialize",
"the",
"slice",
"using",
"InitSlice",
"()",
"a... | [
"func",
"(",
"m",
"*",
"Meta",
")",
"MakeSlice",
"(",
")",
"interface",
"{",
"}",
"{",
"slice",
":=",
"reflect",
".",
"MakeSlice",
"(",
"reflect",
".",
"SliceOf",
"(",
"reflect",
".",
"TypeOf",
"(",
"m",
".",
"model",
")",
")",
",",
"0",
",",
"0"... |
24,089 | all-24090 | [
"setOfferingHash",
"computes",
"and",
"sets",
"values",
"for",
"raw",
"msg",
"and",
"hash",
"fields",
"."
] | [
"func",
"(",
"h",
"*",
"Handler",
")",
"setOfferingHash",
"(",
"logger",
"log",
".",
"Logger",
",",
"offering",
"*",
"data",
".",
"Offering",
",",
"template",
"*",
"data",
".",
"Template",
",",
"agent",
"*",
"data",
".",
"Account",
")",
"error",
"{",
... |
24,090 | all-24091 | [
"SetBSON",
"sets",
"the",
"ObjectId",
"from",
"raw",
"bson",
"data"
] | [
"func",
"(",
"id",
"*",
"ObjectId",
")",
"SetBSON",
"(",
"raw",
"bson",
".",
"Raw",
")",
"error",
"{",
"var",
"m",
"bson",
".",
"M",
"\n",
"if",
"err",
":=",
"raw",
".",
"Unmarshal",
"(",
"&",
"m",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
... |
24,091 | all-24092 | [
"GetHost",
"returns",
"the",
"Host",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"m",
"*",
"Metric",
")",
"GetHost",
"(",
")",
"string",
"{",
"if",
"m",
"==",
"nil",
"||",
"m",
".",
"Host",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"<mask>",
"*",
"m",
".",
"Host",
"\n",
"}"
] |
24,092 | all-24093 | [
"Before",
"is",
"for",
"adding",
"middleware",
"for",
"running",
"before",
"routing"
] | [
"func",
"(",
"c4",
"*",
"Seefor",
")",
"Before",
"(",
"middleware",
"...",
"Before",
")",
"{",
"c4",
".",
"befores",
"=",
"<mask>",
"(",
"c4",
".",
"befores",
",",
"middleware",
"...",
")",
"\n",
"}"
] |
24,093 | all-24094 | [
"NewMockContainerMetadataResolver",
"creates",
"a",
"new",
"mock",
"instance"
] | [
"func",
"NewMockContainerMetadataResolver",
"(",
"ctrl",
"*",
"gomock",
".",
"<mask>",
")",
"*",
"MockContainerMetadataResolver",
"{",
"mock",
":=",
"&",
"MockContainerMetadataResolver",
"{",
"ctrl",
":",
"ctrl",
"}",
"\n",
"mock",
".",
"recorder",
"=",
"&",
"Mo... |
24,094 | all-24095 | [
"Do",
"executes",
"Network",
".",
"takeResponseBodyForInterceptionAsStream",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"stream"
] | [
"func",
"(",
"p",
"*",
"TakeResponseBodyForInterceptionAsStreamParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"stream",
"io",
".",
"StreamHandle",
",",
"err",
"error",
")",
"{",
"// execute",
"var",
"res",
"TakeResponseBodyForInterceptionAsSt... |
24,095 | all-24096 | [
"SetTimeout",
"sets",
"the",
"timeout",
"for",
"the",
"Context",
"."
] | [
"func",
"(",
"cb",
"*",
"ContextBuilder",
")",
"SetTimeout",
"(",
"timeout",
"<mask>",
".",
"Duration",
")",
"*",
"ContextBuilder",
"{",
"cb",
".",
"Timeout",
"=",
"timeout",
"\n",
"return",
"cb",
"\n",
"}"
] |
24,096 | all-24097 | [
"Unsubscribe",
"deletes",
"the",
"handler",
"from",
"the",
"EventStream"
] | [
"func",
"(",
"eventStream",
"*",
"EventStream",
")",
"Unsubscribe",
"(",
"name",
"string",
")",
"{",
"eventStream",
".",
"handlersLock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"eventStream",
".",
"handlersLock",
".",
"Unlock",
"(",
")",
"\n\n",
"for",
"hand... |
24,097 | all-24098 | [
"ListAdminsCmd",
"returns",
"a",
"cobra",
"command",
"that",
"lists",
"the",
"current",
"cluster",
"admins"
] | [
"func",
"ListAdminsCmd",
"(",
"noMetrics",
",",
"noPortForwarding",
"*",
"bool",
")",
"*",
"cobra",
".",
"Command",
"{",
"listAdmins",
":=",
"&",
"cobra",
".",
"Command",
"{",
"Short",
":",
"\"",
"\"",
",",
"Long",
":",
"\"",
"\"",
",",
"Run",
":",
"... |
24,098 | all-24099 | [
"GetContainers",
"returns",
"containers",
"created",
"by",
"the",
"benchmark",
"."
] | [
"func",
"GetContainers",
"(",
"c",
"lxd",
".",
"ContainerServer",
")",
"(",
"[",
"]",
"api",
".",
"<mask>",
",",
"error",
")",
"{",
"containers",
":=",
"[",
"]",
"api",
".",
"Container",
"{",
"}",
"\n\n",
"allContainers",
",",
"err",
":=",
"c",
".",
... |
24,099 | all-24100 | [
"SetMachineProviderConfig",
"will",
"attempt",
"to",
"match",
"a",
"provider",
"config",
"to",
"a",
"machine",
"set",
"on",
"the",
"Name",
"field",
".",
"If",
"a",
"match",
"cannot",
"be",
"made",
"we",
"warn",
"and",
"move",
"on",
"."
] | [
"func",
"(",
"c",
"*",
"Cluster",
")",
"SetMachineProviderConfigs",
"(",
"providerConfigs",
"[",
"]",
"*",
"MachineProviderConfig",
")",
"{",
"for",
"_",
",",
"providerConfig",
":=",
"range",
"providerConfigs",
"{",
"<mask>",
":=",
"providerConfig",
".",
"Server... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.