id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
3,300 | all-3301 | [
"Match",
"searches",
"for",
"a",
"rule",
"that",
"can",
"be",
"merged",
"with",
"x",
"in",
"rules",
".",
"A",
"rule",
"is",
"considered",
"a",
"match",
"if",
"its",
"kind",
"is",
"equal",
"to",
"x",
"s",
"kind",
"AND",
"either",
"its",
"name",
"is",
... | [
"func",
"Match",
"(",
"rules",
"[",
"]",
"*",
"rule",
".",
"Rule",
",",
"x",
"*",
"rule",
".",
"Rule",
",",
"info",
"rule",
".",
"KindInfo",
")",
"(",
"*",
"rule",
".",
"Rule",
",",
"error",
")",
"{",
"xname",
":=",
"x",
".",
"Name",
"(",
")"... |
3,301 | all-3302 | [
"readUint32",
"reads",
"a",
"RAR",
"V3",
"encoded",
"uint32"
] | [
"func",
"(",
"r",
"*",
"rarBitReader",
")",
"readUint32",
"(",
")",
"(",
"uint32",
",",
"error",
")",
"{",
"n",
",",
"err",
":=",
"r",
".",
"readBits",
"(",
"2",
")",
"\n",
"if",
"<mask>",
"!=",
"nil",
"{",
"return",
"0",
",",
"err",
"\n",
"}",... |
3,302 | all-3303 | [
"HasStatus",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"g",
"*",
"GroupData",
")",
"HasStatus",
"(",
")",
"bool",
"{",
"if",
"g",
"!=",
"nil",
"&&",
"g",
".",
"<mask>",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
3,303 | all-3304 | [
"GetEd25519",
"retrieves",
"the",
"Ed25519",
"value",
"from",
"the",
"union",
"returning",
"ok",
"if",
"the",
"union",
"s",
"switch",
"indicated",
"the",
"value",
"is",
"valid",
"."
] | [
"func",
"(",
"u",
"NodeId",
")",
"GetEd25519",
"(",
")",
"(",
"result",
"Uint256",
",",
"<mask>",
"bool",
")",
"{",
"return",
"PublicKey",
"(",
"u",
")",
".",
"GetEd25519",
"(",
")",
"\n",
"}"
] |
3,304 | all-3305 | [
"UnmarshalJSON",
"satisfies",
"json",
".",
"Unmarshaler",
"."
] | [
"func",
"(",
"t",
"*",
"MonotonicTime",
")",
"UnmarshalJSON",
"(",
"buf",
"[",
"]",
"<mask>",
")",
"error",
"{",
"return",
"easyjson",
".",
"Unmarshal",
"(",
"buf",
",",
"t",
")",
"\n",
"}"
] |
3,305 | all-3306 | [
"readKey",
"reads",
"a",
"private",
"rsa",
"key",
"from",
"path",
".",
"The",
"key",
"is",
"expected",
"to",
"be",
"in",
"PEM",
"format",
"."
] | [
"func",
"readKey",
"(",
"path",
"string",
")",
"(",
"crypto",
".",
"Signer",
",",
"error",
")",
"{",
"b",
",",
"err",
":=",
"ioutil",
".",
"ReadFile",
"(",
"<mask>",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}"... |
3,306 | all-3307 | [
"Step",
"5",
"Undouble",
"non",
"-",
"vowel",
"endings"
] | [
"func",
"step5",
"(",
"word",
"*",
"snowballword",
".",
"SnowballWord",
")",
"bool",
"{",
"suffix",
",",
"_",
":=",
"word",
".",
"FirstSuffix",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
")",
"\n",
"if",
... |
3,307 | all-3308 | [
"ataWrite",
"performs",
"an",
"ATA",
"28",
"-",
"bit",
"or",
"48",
"-",
"bit",
"write",
"request",
"on",
"rs",
"using",
"the",
"argument",
"values",
"in",
"r",
"."
] | [
"func",
"ataWrite",
"(",
"r",
"*",
"ATAArg",
",",
"rs",
"io",
".",
"ReadSeeker",
")",
"(",
"*",
"ATAArg",
",",
"error",
")",
"{",
"// Only ATA writes allowed here",
"if",
"r",
".",
"CmdStatus",
"!=",
"ATACmdStatusWrite28Bit",
"&&",
"r",
".",
"CmdStatus",
"... |
3,308 | all-3309 | [
"Checkout",
"does",
"git",
"checkout",
"."
] | [
"func",
"(",
"lg",
"*",
"LocalGit",
")",
"Checkout",
"(",
"org",
",",
"repo",
",",
"commitlike",
"string",
")",
"error",
"{",
"rdir",
":=",
"filepath",
".",
"Join",
"(",
"lg",
".",
"Dir",
",",
"org",
",",
"repo",
")",
"\n",
"<mask>",
"runCmd",
"(",... |
3,309 | all-3310 | [
"simultaneously",
"specify",
"storage",
"for",
"all",
"levels",
"of",
"a",
"one",
"-",
"dimensional",
"texture"
] | [
"func",
"TextureStorage1D",
"(",
"texture",
"uint32",
",",
"levels",
"int32",
",",
"internalformat",
"uint32",
",",
"<mask>",
"int32",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpTextureStorage1D",
",",
"4",
",",
"uintptr",
"(",
"texture",
")",
",",
"uintp... |
3,310 | all-3311 | [
"Merge",
"the",
"gossiped",
"data",
"represented",
"by",
"buf",
"into",
"our",
"state",
"."
] | [
"func",
"(",
"p",
"*",
"<mask>",
")",
"OnGossipUnicast",
"(",
"src",
"mesh",
".",
"PeerName",
",",
"buf",
"[",
"]",
"byte",
")",
"error",
"{",
"var",
"set",
"map",
"[",
"mesh",
".",
"PeerName",
"]",
"int",
"\n",
"if",
"err",
":=",
"gob",
".",
"Ne... |
3,311 | all-3312 | [
"GetType",
"returns",
"the",
"Type",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"t",
"*",
"TileDefRequestStyle",
")",
"GetType",
"(",
")",
"string",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"t",
".",
"Type",
"\n",
"}"
] |
3,312 | all-3313 | [
"UnmarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Unmarshaler",
"."
] | [
"func",
"(",
"t",
"*",
"ValueType",
")",
"UnmarshalEasyJSON",
"(",
"in",
"*",
"jlexer",
".",
"Lexer",
")",
"{",
"<mask>",
"ValueType",
"(",
"in",
".",
"String",
"(",
")",
")",
"{",
"case",
"ValueTypeBoolean",
":",
"*",
"t",
"=",
"ValueTypeBoolean",
"\n... |
3,313 | all-3314 | [
"New",
"creates",
"a",
"new",
"functions",
"client"
] | [
"func",
"New",
"(",
"transport",
"runtime",
".",
"ClientTransport",
",",
"formats",
"strfmt",
".",
"Registry",
")",
"*",
"Functions",
"{",
"cli",
":=",
"new",
"(",
"Functions",
")",
"\n",
"cli",
".",
"Transport",
"=",
"transport",
"\n\n",
"cli",
".",
"Ap... |
3,314 | all-3315 | [
"set",
"front",
"and",
"/",
"or",
"back",
"function",
"and",
"reference",
"value",
"for",
"stencil",
"testing"
] | [
"func",
"StencilFuncSeparate",
"(",
"face",
"uint32",
",",
"xfunc",
"uint32",
",",
"<mask>",
"int32",
",",
"mask",
"uint32",
")",
"{",
"C",
".",
"glowStencilFuncSeparate",
"(",
"gpStencilFuncSeparate",
",",
"(",
"C",
".",
"GLenum",
")",
"(",
"face",
")",
"... |
3,315 | all-3316 | [
"New",
"returns",
"a",
"new",
"instance",
"of",
"App",
"and",
"adds",
"some",
"sane",
"and",
"useful",
"defaults",
"."
] | [
"func",
"New",
"(",
"opts",
"Options",
")",
"*",
"App",
"{",
"LoadPlugins",
"(",
")",
"\n",
"envy",
".",
"Load",
"(",
")",
"\n",
"opts",
"=",
"optionsWithDefaults",
"(",
"opts",
")",
"\n\n",
"a",
":=",
"&",
"App",
"{",
"Options",
":",
"opts",
",",
... |
3,316 | all-3317 | [
"GetTabReorderable",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_notebook_get_tab_reorderable",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Notebook",
")",
"GetTabReorderable",
"(",
"child",
"IWidget",
")",
"bool",
"{",
"c",
":=",
"C",
".",
"gtk_notebook_get_tab_reorderable",
"(",
"v",
".",
"native",
"(",
")",
",",
"<mask>",
".",
"toWidget",
"(",
")",
")",
"\n",
"re... |
3,317 | all-3318 | [
"expandVmwareDistributedVirtualSwitchTrunkVlanSpec",
"reads",
"certain",
"ResourceData",
"keys",
"and",
"returns",
"a",
"VmwareDistributedVirtualSwitchTrunkVlanSpec",
"."
] | [
"func",
"expandVmwareDistributedVirtualSwitchTrunkVlanSpec",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
")",
"*",
"types",
".",
"VmwareDistributedVirtualSwitchTrunkVlanSpec",
"{",
"var",
"ranges",
"[",
"]",
"types",
".",
"NumericRange",
"\n",
"data",
":=",
"d",
"... |
3,318 | all-3319 | [
"--",
"Trigger",
"Trigger",
"creates",
"a",
"new",
"PagerDuty",
"incident",
"using",
"the",
"default",
"client",
"with",
"the",
"given",
"description",
".",
"The",
"returned",
"incident",
"key",
"can",
"be",
"used",
"to",
"resolve",
"the",
"incident",
".",
"... | [
"func",
"Trigger",
"(",
"<mask>",
"string",
")",
"(",
"incidentKey",
"string",
",",
"err",
"error",
")",
"{",
"return",
"trigger",
"(",
"description",
",",
"\"",
"\"",
",",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
"{",
"}",
")",
"\n",
"}"
] |
3,319 | all-3320 | [
"ResolvePathToFullyExplicit",
"returns",
"the",
"input",
"path",
"converted",
"to",
"an",
"absolute",
"no",
"-",
"symlinks",
"cleaned",
"up",
"path",
".",
"To",
"do",
"so",
"all",
"elements",
"of",
"the",
"input",
"path",
"must",
"exist",
";",
"as",
"a",
"... | [
"func",
"ResolvePathToFullyExplicit",
"(",
"path",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"switch",
"_",
",",
"err",
":=",
"os",
".",
"Lstat",
"(",
"path",
")",
";",
"{",
"case",
"err",
"==",
"nil",
":",
"return",
"resolveExistingPathToFul... |
3,320 | all-3321 | [
"grow",
"the",
"inflight",
"buffer",
"by",
"doubling",
"up",
"to",
"inflights",
".",
"size",
".",
"We",
"grow",
"on",
"demand",
"instead",
"of",
"preallocating",
"to",
"inflights",
".",
"size",
"to",
"handle",
"systems",
"which",
"have",
"thousands",
"of",
... | [
"func",
"(",
"in",
"*",
"inflights",
")",
"growBuf",
"(",
")",
"{",
"newSize",
":=",
"len",
"(",
"<mask>",
".",
"buffer",
")",
"*",
"2",
"\n",
"if",
"newSize",
"==",
"0",
"{",
"newSize",
"=",
"1",
"\n",
"}",
"else",
"if",
"newSize",
">",
"in",
... |
3,321 | all-3322 | [
"export",
"FileSequence_Index"
] | [
"func",
"FileSequence_Index",
"(",
"id",
"FileSeqId",
",",
"frame",
"int",
")",
"*",
"C",
".",
"<mask>",
"{",
"fs",
",",
"ok",
":=",
"sFileSeqs",
".",
"Get",
"(",
"id",
")",
"\n",
"// caller must free string",
"if",
"!",
"ok",
"{",
"return",
"C",
".",
... |
3,322 | all-3323 | [
"MarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Marshaler",
"."
] | [
"func",
"(",
"t",
"ErrorReason",
")",
"MarshalEasyJSON",
"(",
"out",
"*",
"jwriter",
".",
"Writer",
")",
"{",
"out",
".",
"<mask>",
"(",
"string",
"(",
"t",
")",
")",
"\n",
"}"
] |
3,323 | all-3324 | [
"WriteTo",
"writes",
"query",
"string",
"to",
"w",
".",
"WriteTo",
"implements",
"io",
".",
"WriterTo",
"interface",
"."
] | [
"func",
"(",
"a",
"*",
"Args",
")",
"WriteTo",
"(",
"w",
"<mask>",
".",
"Writer",
")",
"(",
"int64",
",",
"error",
")",
"{",
"n",
",",
"err",
":=",
"w",
".",
"Write",
"(",
"a",
".",
"QueryString",
"(",
")",
")",
"\n",
"return",
"int64",
"(",
... |
3,324 | all-3325 | [
"replace",
"ResponseWriter",
"with",
"a",
"monitorable",
"one",
"return",
"logger"
] | [
"func",
"(",
"m",
"*",
"monitorableWriter",
")",
"Log",
"(",
")",
"{",
"duration",
":=",
"time",
".",
"Now",
"(",
")",
".",
"Sub",
"(",
"m",
".",
"t0",
")",
"\n",
"if",
"m",
".",
"Code",
"==",
"0",
"{",
"m",
".",
"Code",
"=",
"200",
"\n",
"... |
3,325 | all-3326 | [
"The",
"gogo",
"protobuf",
"NewDelimitedReader",
"is",
"buffered",
"which",
"may",
"eat",
"up",
"stream",
"data",
".",
"So",
"we",
"need",
"to",
"implement",
"a",
"compatible",
"delimited",
"reader",
"that",
"reads",
"unbuffered",
".",
"There",
"is",
"a",
"s... | [
"func",
"newDelimitedReader",
"(",
"r",
"<mask>",
".",
"Reader",
",",
"maxSize",
"int",
")",
"*",
"delimitedReader",
"{",
"return",
"&",
"delimitedReader",
"{",
"r",
":",
"r",
",",
"buf",
":",
"pool",
".",
"Get",
"(",
"maxSize",
")",
"}",
"\n",
"}"
] |
3,326 | all-3327 | [
"NewApprovers",
"create",
"a",
"new",
"Approvers",
"with",
"no",
"approval",
"."
] | [
"func",
"NewApprovers",
"(",
"owners",
"Owners",
")",
"Approvers",
"{",
"return",
"Approvers",
"{",
"owners",
":",
"owners",
",",
"approvers",
":",
"<mask>",
"[",
"string",
"]",
"Approval",
"{",
"}",
",",
"assignees",
":",
"sets",
".",
"NewString",
"(",
... |
3,327 | all-3328 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"QueryObjectsReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime12",
"(",
"&",
"w",
",",
"v",
"... |
3,328 | all-3329 | [
"Main",
"draws",
"Hello",
"World",
"and",
"returns",
"the",
"filename",
".",
"This",
"should",
"only",
"be",
"used",
"during",
"testing",
"."
] | [
"func",
"Main",
"(",
"gc",
"draw2d",
".",
"GraphicContext",
",",
"ext",
"string",
")",
"(",
"string",
",",
"<mask>",
")",
"{",
"// Draw hello world",
"Draw",
"(",
"gc",
",",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"gc",
".",
"GetDPI",
"(",
")",
... |
3,329 | all-3330 | [
"rescind",
"releases",
"a",
"lease",
"from",
"this",
"client",
"."
] | [
"func",
"(",
"lkv",
"*",
"leasingKV",
")",
"rescind",
"(",
"ctx",
"<mask>",
".",
"Context",
",",
"key",
"string",
",",
"rev",
"int64",
")",
"{",
"if",
"lkv",
".",
"leases",
".",
"Evict",
"(",
"key",
")",
">",
"rev",
"{",
"return",
"\n",
"}",
"\n"... |
3,330 | all-3331 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetBoxModelParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom51",
"(",
"&",
"r",
... |
3,331 | all-3332 | [
"AddSSHKey",
"adds",
"a",
"new",
"SSH",
"key",
"to",
"the",
"project"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"AddSSHKey",
"(",
"account",
",",
"repo",
",",
"hostname",
",",
"privateKey",
"string",
")",
"error",
"{",
"key",
":=",
"&",
"struct",
"{",
"Hostname",
"string",
"`json:\"hostname\"`",
"\n",
"PrivateKey",
"string",
"`j... |
3,332 | all-3333 | [
"bind",
"a",
"named",
"sampler",
"to",
"a",
"texturing",
"target"
] | [
"func",
"BindSampler",
"(",
"<mask>",
"uint32",
",",
"sampler",
"uint32",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpBindSampler",
",",
"2",
",",
"uintptr",
"(",
"unit",
")",
",",
"uintptr",
"(",
"sampler",
")",
",",
"0",
")",
"\n",
"}"
] |
3,333 | all-3334 | [
"===",
"clamp_min",
"(",
"Vector",
"ValueTypeVector",
"min",
"Scalar",
")",
"Vector",
"==="
] | [
"func",
"funcClampMin",
"(",
"vals",
"[",
"]",
"Value",
",",
"args",
"Expressions",
",",
"enh",
"*",
"EvalNodeHelper",
")",
"<mask>",
"{",
"vec",
":=",
"vals",
"[",
"0",
"]",
".",
"(",
"Vector",
")",
"\n",
"min",
":=",
"vals",
"[",
"1",
"]",
".",
... |
3,334 | all-3335 | [
"ReadAll",
"ReadAll"
] | [
"func",
"(",
"<mask>",
"*",
"MemoryStore",
")",
"ReadAll",
"(",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"dataKeys",
":=",
"ms",
".",
"dataStore",
".",
"Keys",
"(",
")",
"\n",
"dataLen",
":=",
"len",
"(",
"dataKeys",
")",
"\n",
"result... |
3,335 | all-3336 | [
"HasHandle",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"s",
"*",
"SyntheticsUser",
")",
"HasHandle",
"(",
")",
"bool",
"{",
"if",
"s",
"!=",
"nil",
"&&",
"s",
".",
"Handle",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
3,336 | all-3337 | [
"newReference",
"returns",
"a",
"dockerReference",
"for",
"a",
"named",
"reference",
"."
] | [
"func",
"newReference",
"(",
"ref",
"reference",
".",
"Named",
")",
"(",
"dockerReference",
",",
"error",
")",
"{",
"if",
"reference",
".",
"IsNameOnly",
"(",
"ref",
")",
"{",
"return",
"dockerReference",
"{",
"}",
",",
"errors",
".",
"Errorf",
"(",
"\""... |
3,337 | all-3338 | [
"GetContentArea",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_dialog_get_content_area",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Dialog",
")",
"GetContentArea",
"(",
")",
"(",
"*",
"Box",
",",
"error",
")",
"{",
"c",
":=",
"C",
".",
"gtk_dialog_get_content_area",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"return",
"n... |
3,338 | all-3339 | [
"FetchMetrics",
"retrieves",
"all",
"metrics",
"available",
"to",
"API",
"Token",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"FetchMetrics",
"(",
")",
"(",
"*",
"[",
"]",
"Metric",
",",
"error",
")",
"{",
"<mask>",
",",
"err",
":=",
"a",
".",
"Get",
"(",
"config",
".",
"MetricPrefix",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"retur... |
3,339 | all-3340 | [
"PushMetrics",
"is",
"meant",
"to",
"run",
"in",
"a",
"goroutine",
"and",
"continuously",
"push",
"metrics",
"to",
"the",
"provided",
"endpoint",
"."
] | [
"func",
"PushMetrics",
"(",
"component",
",",
"endpoint",
"string",
",",
"interval",
"time",
".",
"Duration",
")",
"{",
"sig",
":=",
"make",
"(",
"chan",
"os",
".",
"Signal",
",",
"1",
")",
"\n",
"signal",
".",
"Notify",
"(",
"sig",
",",
"os",
".",
... |
3,340 | all-3341 | [
"Load",
"attempts",
"to",
"load",
"config",
"from",
"the",
"path",
".",
"It",
"returns",
"an",
"error",
"if",
"either",
"the",
"file",
"can",
"t",
"be",
"read",
"or",
"the",
"configuration",
"is",
"invalid",
"."
] | [
"func",
"(",
"pa",
"*",
"ConfigAgent",
")",
"Load",
"(",
"path",
"string",
")",
"error",
"{",
"b",
",",
"err",
":=",
"ioutil",
".",
"ReadFile",
"(",
"path",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"np",
":=",
... |
3,341 | all-3342 | [
"GetString",
"returns",
"a",
"string",
"value",
"for",
"a",
"specific",
"column",
"."
] | [
"func",
"(",
"r",
"Record",
")",
"GetString",
"(",
"column",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"v",
",",
"err",
":=",
"r",
".",
"getKey",
"(",
"reflect",
".",
"<mask>",
",",
"column",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
... |
3,342 | all-3343 | [
"Handle",
"implements",
"Handler",
"."
] | [
"func",
"(",
"h",
"*",
"HandlerWithErrorConfigurer",
")",
"Handle",
"(",
"ctx",
"context",
".",
"Context",
",",
"conn",
"*",
"Conn",
",",
"req",
"*",
"Request",
")",
"{",
"result",
",",
"err",
":=",
"h",
".",
"handleFunc",
"(",
"ctx",
",",
"conn",
",... |
3,343 | all-3344 | [
"OperationRemove",
"removes",
"the",
"operation",
"with",
"the",
"given",
"UUID",
"."
] | [
"func",
"(",
"c",
"*",
"ClusterTx",
")",
"OperationRemove",
"(",
"uuid",
"string",
")",
"error",
"{",
"result",
",",
"err",
":=",
"c",
".",
"<mask>",
".",
"Exec",
"(",
"\"",
"\"",
",",
"uuid",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"... |
3,344 | all-3345 | [
"NotNil",
"checks",
"a",
"value",
"is",
"non",
"-",
"nil",
"."
] | [
"func",
"NotNil",
"(",
"tb",
"testing",
".",
"TB",
",",
"object",
"interface",
"{",
"}",
",",
"msgAndArgs",
"...",
"interface",
"{",
"}",
")",
"{",
"tb",
".",
"Helper",
"(",
")",
"\n",
"success",
":=",
"true",
"\n\n",
"if",
"object",
"==",
"nil",
"... |
3,345 | all-3346 | [
"SetBuffer",
"is",
"a",
"wrapper",
"around",
"gtk_text_view_set_buffer",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"TextView",
")",
"SetBuffer",
"(",
"<mask>",
"*",
"TextBuffer",
")",
"{",
"C",
".",
"gtk_text_view_set_buffer",
"(",
"v",
".",
"native",
"(",
")",
",",
"buffer",
".",
"native",
"(",
")",
")",
"\n",
"}"
] |
3,346 | all-3347 | [
"CallV2",
"makes",
"a",
"call",
"and",
"does",
"not",
"attempt",
"any",
"retries",
"."
] | [
"func",
"CallV2",
"(",
"ctx",
"context",
".",
"Context",
",",
"sc",
"*",
"tchannel",
".",
"SubChannel",
",",
"cArgs",
"CArgs",
")",
"(",
"*",
"CRes",
",",
"error",
")",
"{",
"call",
",",
"err",
":=",
"sc",
".",
"BeginCall",
"(",
"ctx",
",",
"cArgs"... |
3,347 | all-3348 | [
"Encode",
"serializes",
"the",
"JSON",
"marshalable",
"obj",
"data",
"as",
"a",
"JWT",
"."
] | [
"func",
"(",
"es",
"*",
"EccSigner",
")",
"Encode",
"(",
"obj",
"interface",
"{",
"}",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"return",
"es",
".",
"alg",
".",
"Encode",
"(",
"es",
",",
"obj",
")",
"\n",
"}"
] |
3,348 | all-3349 | [
"MinioSecret",
"creates",
"an",
"amazon",
"secret",
"with",
"the",
"following",
"parameters",
":",
"bucket",
"-",
"S3",
"bucket",
"name",
"id",
"-",
"S3",
"access",
"key",
"id",
"secret",
"-",
"S3",
"secret",
"access",
"key",
"endpoint",
"-",
"S3",
"compat... | [
"func",
"MinioSecret",
"(",
"bucket",
"string",
",",
"<mask>",
"string",
",",
"secret",
"string",
",",
"endpoint",
"string",
",",
"secure",
",",
"isS3V2",
"bool",
")",
"map",
"[",
"string",
"]",
"[",
"]",
"byte",
"{",
"secureV",
":=",
"\"",
"\"",
"\n",... |
3,349 | all-3350 | [
"Raw",
"returns",
"the",
"bytes",
"of",
"the",
"key"
] | [
"func",
"(",
"k",
"*",
"Secp256k1PublicKey",
")",
"Raw",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"return",
"(",
"*",
"btcec",
".",
"PublicKey",
")",
"(",
"k",
")",
".",
"SerializeCompressed",
"(",
")",
",",
"nil",
"\n",
"}"
] |
3,350 | all-3351 | [
"VolumeInspect",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockClient",
")",
"VolumeInspect",
"(",
"arg0",
"context",
".",
"Context",
",",
"arg1",
"string",
")",
"(",
"types",
".",
"Volume",
",",
"error",
")",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"... |
3,351 | all-3352 | [
"Endpoint",
"returns",
"a",
"handler",
"for",
"the",
"common",
"token",
"and",
"authorize",
"endpoint",
"."
] | [
"func",
"(",
"a",
"*",
"Authenticator",
")",
"Endpoint",
"(",
"prefix",
"string",
")",
"http",
".",
"Handler",
"{",
"return",
"http",
".",
"HandlerFunc",
"(",
"func",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
")",
... |
3,352 | all-3353 | [
"GetProject",
"returns",
"the",
"project",
"quota",
"ID",
"for",
"the",
"given",
"path"
] | [
"func",
"GetProject",
"(",
"path",
"string",
")",
"(",
"uint32",
",",
"error",
")",
"{",
"// Call ioctl through CGo",
"cPath",
":=",
"C",
".",
"CString",
"(",
"path",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"(",
"cPath",
")... |
3,353 | all-3354 | [
"SetContainerMetadata",
"sets",
"the",
"content",
"of",
"the",
"container",
"metadata",
"file",
"."
] | [
"func",
"(",
"r",
"*",
"ProtocolLXD",
")",
"SetContainerMetadata",
"(",
"name",
"string",
",",
"metadata",
"api",
".",
"ImageMetadata",
",",
"ETag",
"string",
")",
"error",
"{",
"if",
"!",
"r",
".",
"HasExtension",
"(",
"\"",
"\"",
")",
"{",
"return",
... |
3,354 | all-3355 | [
"primaryExpr",
"parses",
"a",
"primary",
"expression",
".",
"<metric_name",
">",
"|",
"<function_call",
">",
"|",
"<Vector_aggregation",
">",
"|",
"<literal",
">"
] | [
"func",
"(",
"p",
"*",
"parser",
")",
"primaryExpr",
"(",
")",
"Expr",
"{",
"switch",
"t",
":=",
"p",
".",
"next",
"(",
")",
";",
"{",
"case",
"t",
".",
"typ",
"==",
"ItemNumber",
":",
"f",
":=",
"p",
".",
"<mask>",
"(",
"t",
".",
"val",
")",... |
3,355 | all-3356 | [
"InternalServerError",
"configurates",
"handler",
"which",
"is",
"called",
"when",
"route",
"handler",
"returns",
"error",
".",
"If",
"it",
"is",
"not",
"set",
"default",
"handler",
"is",
"used",
".",
"Be",
"sure",
"to",
"set",
"500",
"response",
"code",
"in... | [
"func",
"(",
"r",
"*",
"Router",
")",
"InternalServerError",
"(",
"handlers",
"...",
"Handler",
")",
"{",
"handlers",
"=",
"validateAndWrapHandlers",
"(",
"handlers",
")",
"\n",
"r",
".",
"internalServerError",
"=",
"func",
"(",
"c",
"*",
"<mask>",
",",
"e... |
3,356 | all-3357 | [
"GetAccounts",
"returns",
"accounts",
"."
] | [
"func",
"(",
"h",
"*",
"Handler",
")",
"GetAccounts",
"(",
"tkn",
"string",
")",
"(",
"[",
"]",
"data",
".",
"Account",
",",
"error",
")",
"{",
"logger",
":=",
"h",
".",
"logger",
".",
"Add",
"(",
"\"",
"\"",
",",
"\"",
"\"",
")",
"\n\n",
"if",... |
3,357 | all-3358 | [
"Log",
"calls",
"UI",
".",
"Log",
"to",
"write",
".",
"LogFGColor",
"and",
"LogBGColor",
"are",
"used",
"for",
"color",
"."
] | [
"func",
"(",
"ui",
"*",
"ColorUI",
")",
"<mask>",
"(",
"message",
"string",
")",
"{",
"ct",
".",
"ChangeColor",
"(",
"ui",
".",
"LogFGColor",
".",
"Code",
",",
"ui",
".",
"LogFGColor",
".",
"Bright",
",",
"ui",
".",
"LogBGColor",
".",
"Code",
",",
... |
3,358 | all-3359 | [
"GetBuyPrice",
"gets",
"the",
"current",
"BTC",
"buy",
"price"
] | [
"func",
"(",
"c",
"<mask>",
")",
"GetBuyPrice",
"(",
"qty",
"int",
")",
"(",
"*",
"pricesHolder",
",",
"error",
")",
"{",
"return",
"c",
".",
"getPrice",
"(",
"\"",
"\"",
",",
"qty",
")",
"\n",
"}"
] |
3,359 | all-3360 | [
"NewImage",
"creates",
"a",
"new",
"instance",
"of",
"Image",
"."
] | [
"func",
"NewImage",
"(",
"d",
"*",
"Docker",
",",
"name",
"string",
")",
"*",
"<mask>",
"{",
"return",
"&",
"Image",
"{",
"docker",
":",
"d",
",",
"name",
":",
"name",
",",
"}",
"\n",
"}"
] |
3,360 | all-3361 | [
"New",
"returns",
"a",
"fresh",
"instance",
"of",
"Render"
] | [
"func",
"New",
"(",
")",
"Render",
"{",
"return",
"Render",
"{",
"Templates",
":",
"make",
"(",
"map",
"[",
"string",
"]",
"*",
"template",
".",
"Template",
")",
",",
"Files",
":",
"make",
"(",
"<mask>",
"[",
"string",
"]",
"[",
"]",
"string",
")",... |
3,361 | all-3362 | [
"Contains",
"returns",
"true",
"if",
"the",
"given",
"value",
"is",
"a",
"valid",
"value",
"within",
"the",
"value",
"range",
"."
] | [
"func",
"(",
"r",
"*",
"InclusiveRange",
")",
"Contains",
"(",
"value",
"int",
")",
"bool",
"{",
"// If we attempt to find the closest value, given",
"// the start of the range and the step, we can check",
"// if it is still the same number. If it hasn't changed,",
"// then it is in ... |
3,362 | all-3363 | [
"GetMediaType",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_print_settings_get_media_type",
"()",
"."
] | [
"func",
"(",
"<mask>",
"*",
"PrintSettings",
")",
"GetMediaType",
"(",
")",
"string",
"{",
"c",
":=",
"C",
".",
"gtk_print_settings_get_media_type",
"(",
"ps",
".",
"native",
"(",
")",
")",
"\n",
"return",
"C",
".",
"GoString",
"(",
"(",
"*",
"C",
".",... |
3,363 | all-3364 | [
"FromIDHeader",
"decodes",
"a",
"Content",
"-",
"ID",
"or",
"Message",
"-",
"ID",
"header",
"value",
"(",
"RFC",
"2392",
")",
"into",
"a",
"utf",
"-",
"8",
"string",
".",
"Example",
":",
"<foo%3fbar",
"+",
"baz",
">",
"becomes",
"foo?bar",
"baz",
"."
] | [
"func",
"FromIDHeader",
"(",
"v",
"string",
")",
"string",
"{",
"if",
"v",
"==",
"\"",
"\"",
"{",
"return",
"v",
"\n",
"}",
"\n",
"v",
"=",
"strings",
".",
"TrimLeft",
"(",
"v",
",",
"\"",
"\"",
")",
"\n",
"v",
"=",
"strings",
".",
"TrimRight",
... |
3,364 | all-3365 | [
"NewStaticFilesHandler",
"serves",
"a",
"file",
"under",
"specified",
"filesystem",
"if",
"it",
"can",
"be",
"opened",
"otherwise",
"it",
"serves",
"HTTP",
"from",
"a",
"specified",
"handler",
"."
] | [
"func",
"NewStaticFilesHandler",
"(",
"h",
"http",
".",
"Handler",
",",
"<mask>",
"string",
",",
"fs",
"http",
".",
"FileSystem",
")",
"http",
".",
"Handler",
"{",
"fileserver",
":=",
"http",
".",
"StripPrefix",
"(",
"prefix",
",",
"http",
".",
"FileServer... |
3,365 | all-3366 | [
"establish",
"data",
"storage",
"format",
"and",
"dimensions",
"of",
"a",
"renderbuffer",
"object",
"s",
"image"
] | [
"func",
"NamedRenderbufferStorage",
"(",
"renderbuffer",
"uint32",
",",
"internalformat",
"uint32",
",",
"width",
"int32",
",",
"height",
"int32",
")",
"{",
"C",
".",
"glowNamedRenderbufferStorage",
"(",
"gpNamedRenderbufferStorage",
",",
"(",
"C",
".",
"GLuint",
... |
3,366 | all-3367 | [
"Consul",
"returns",
"the",
"Consul",
"client",
"for",
"this",
"set",
"."
] | [
"func",
"(",
"c",
"*",
"ClientSet",
")",
"Consul",
"(",
")",
"*",
"consulapi",
".",
"<mask>",
"{",
"c",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"consul",
".",
"client",
"\n",
"}"
] |
3,367 | all-3368 | [
"Do",
"executes",
"CSS",
".",
"createStyleSheet",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"styleSheetID",
"-",
"Identifier",
"of",
"the",
"created",
"via",
"-",
"inspector",
"stylesheet",
"."
] | [
"func",
"(",
"p",
"*",
"CreateStyleSheetParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"(",
"styleSheetID",
"StyleSheetID",
",",
"err",
"error",
")",
"{",
"// execute",
"var",
"res",
"CreateStyleSheetReturns",
"\n",
"err",
"=",
"cdp",
".",
... |
3,368 | all-3369 | [
"LoadConfig",
"loads",
"options",
"from",
"serialized",
"config"
] | [
"func",
"(",
"o",
"*",
"Options",
")",
"LoadConfig",
"(",
"config",
"string",
")",
"error",
"{",
"return",
"json",
".",
"Unmarshal",
"(",
"[",
"]",
"<mask>",
"(",
"config",
")",
",",
"o",
")",
"\n",
"}"
] |
3,369 | all-3370 | [
"/",
"*",
"Format",
"returns",
"the",
"file",
"sequence",
"as",
"a",
"formatted",
"string",
"according",
"to",
"the",
"given",
"template",
"."
] | [
"func",
"(",
"s",
"*",
"FileSequence",
")",
"Format",
"(",
"tpl",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"c",
":=",
"<mask>",
"[",
"string",
"]",
"interface",
"{",
"}",
"{",
"\"",
"\"",
":",
"s",
".",
"Dirname",
",",
"\"",
"\"",
... |
3,370 | all-3371 | [
"PushEventHandlers",
"returns",
"a",
"map",
"of",
"plugin",
"names",
"to",
"handlers",
"for",
"the",
"repo",
"."
] | [
"func",
"(",
"pa",
"*",
"ConfigAgent",
")",
"PushEventHandlers",
"(",
"owner",
",",
"repo",
"string",
")",
"map",
"[",
"string",
"]",
"PushEventHandler",
"{",
"pa",
".",
"mut",
".",
"Lock",
"(",
")",
"\n",
"defer",
"pa",
".",
"mut",
".",
"Unlock",
"(... |
3,371 | all-3372 | [
"Use",
"attaches",
"middleware",
"to",
"a",
"route"
] | [
"func",
"(",
"r",
"*",
"Router",
")",
"Use",
"(",
"middleware",
"...",
"interface",
"{",
"}",
")",
"{",
"r",
".",
"dispatcher",
".",
"Middleware",
"(",
"r",
".",
"<mask>",
",",
"r",
".",
"buildMiddlewares",
"(",
"middleware",
")",
"...",
")",
"\n",
... |
3,372 | all-3373 | [
"newNetPipeline",
"is",
"used",
"to",
"construct",
"a",
"netPipeline",
"from",
"a",
"given",
"transport",
"and",
"connection",
"."
] | [
"func",
"newNetPipeline",
"(",
"trans",
"*",
"NetworkTransport",
",",
"<mask>",
"*",
"netConn",
")",
"*",
"netPipeline",
"{",
"n",
":=",
"&",
"netPipeline",
"{",
"conn",
":",
"conn",
",",
"trans",
":",
"trans",
",",
"doneCh",
":",
"make",
"(",
"chan",
... |
3,373 | all-3374 | [
"integer",
"types"
] | [
"func",
"convertNvInteger",
"(",
"v",
"interface",
"{",
"}",
",",
"min",
",",
"max",
"int64",
")",
"(",
"driver",
".",
"Value",
",",
"error",
")",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"v",
",",
"nil",
"\n",
"}",
"\n\n",
"rv",
":=",
"reflec... |
3,374 | all-3375 | [
"shouldContinuePaging",
"returns",
"true",
"if",
"fetching",
"more",
"results",
"(",
"that",
"have",
"earlier",
"timestamps",
"than",
"the",
"provided",
"results",
")",
"could",
"possibly",
"return",
"results",
"in",
"the",
"range",
".",
"shouldContinuePaging",
"a... | [
"func",
"shouldContinuePaging",
"(",
"start",
"time",
".",
"Time",
",",
"results",
"[",
"]",
"<mask>",
".",
"Time",
")",
"bool",
"{",
"// the last result in results is the earliest. if the earliest result is",
"// before the start, fetching more resources may return more results.... |
3,375 | all-3376 | [
"ResponseStatus",
"returns",
"the",
"HTTP",
"response",
"status",
".",
"Remember",
"that",
"the",
"status",
"is",
"only",
"set",
"by",
"the",
"server",
"after",
"WriteHeader",
"has",
"been",
"called",
"."
] | [
"func",
"ResponseStatus",
"(",
"w",
"<mask>",
".",
"ResponseWriter",
")",
"int",
"{",
"return",
"int",
"(",
"httpResponseStruct",
"(",
"reflect",
".",
"ValueOf",
"(",
"w",
")",
")",
".",
"FieldByName",
"(",
"\"",
"\"",
")",
".",
"Int",
"(",
")",
")",
... |
3,376 | all-3377 | [
"GorillaPathPrefix",
"----------------------------------------------------------"
] | [
"func",
"NewGorillaPathPrefix",
"(",
"<mask>",
"string",
")",
"(",
"*",
"GorillaPathPrefix",
",",
"error",
")",
"{",
"regexpPattern",
",",
"err",
":=",
"gorillaPattern",
"(",
"pattern",
",",
"false",
",",
"true",
",",
"false",
")",
"\n",
"if",
"err",
"!=",... |
3,377 | all-3378 | [
"Insert",
"inserts",
"a",
"RangerEntry",
"into",
"prefix",
"trie",
"."
] | [
"func",
"(",
"p",
"*",
"prefixTrie",
")",
"Insert",
"(",
"entry",
"RangerEntry",
")",
"error",
"{",
"<mask>",
":=",
"entry",
".",
"Network",
"(",
")",
"\n",
"return",
"p",
".",
"insert",
"(",
"rnet",
".",
"NewNetwork",
"(",
"network",
")",
",",
"entr... |
3,378 | all-3379 | [
"Since",
"returns",
"the",
"time",
"different",
"from",
"Now",
"and",
"the",
"given",
"time",
"t"
] | [
"func",
"Since",
"(",
"t",
"<mask>",
".",
"Time",
")",
"time",
".",
"Duration",
"{",
"return",
"_time",
".",
"Now",
"(",
")",
".",
"Sub",
"(",
"t",
")",
"\n",
"}"
] |
3,379 | all-3380 | [
"ResolveContainer",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockContainerMetadataResolver",
")",
"ResolveContainer",
"(",
"arg0",
"string",
")",
"(",
"*",
"container",
".",
"DockerContainer",
",",
"error",
")",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
"... |
3,380 | all-3381 | [
"randomTimeout",
"returns",
"a",
"value",
"that",
"is",
"between",
"the",
"minVal",
"and",
"2x",
"minVal",
"."
] | [
"func",
"randomTimeout",
"(",
"minVal",
"time",
".",
"Duration",
")",
"<-",
"chan",
"time",
".",
"Time",
"{",
"if",
"minVal",
"==",
"0",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"<mask>",
":=",
"(",
"time",
".",
"Duration",
"(",
"rand",
".",
"Int63",
... |
3,381 | all-3382 | [
"peek",
"returns",
"but",
"does",
"not",
"consume",
"the",
"next",
"rune",
"in",
"the",
"input",
"."
] | [
"func",
"(",
"l",
"*",
"lexer",
")",
"peek",
"(",
")",
"rune",
"{",
"r",
":=",
"l",
".",
"<mask>",
"(",
")",
"\n",
"l",
".",
"backup",
"(",
")",
"\n",
"return",
"r",
"\n",
"}"
] |
3,382 | all-3383 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"SetShowViewportSizeOnResizeParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay",
"... |
3,383 | all-3384 | [
"Clean",
"removes",
"the",
"metadata",
"files",
"of",
"all",
"containers",
"associated",
"with",
"a",
"task"
] | [
"func",
"(",
"manager",
"*",
"metadataManager",
")",
"Clean",
"(",
"taskARN",
"string",
")",
"error",
"{",
"metadataPath",
",",
"err",
":=",
"getTaskMetadataDir",
"(",
"taskARN",
",",
"manager",
".",
"dataDir",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"... |
3,384 | all-3385 | [
"HasType",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"d",
"*",
"DashboardListItem",
")",
"HasType",
"(",
")",
"bool",
"{",
"if",
"d",
"!=",
"nil",
"&&",
"d",
".",
"Type",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
3,385 | all-3386 | [
"Close",
"is",
"used",
"to",
"indicate",
"a",
"successful",
"end",
"."
] | [
"func",
"(",
"s",
"*",
"FileSnapshotSink",
")",
"Close",
"(",
")",
"error",
"{",
"// Make sure close is idempotent",
"if",
"s",
".",
"closed",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"s",
".",
"closed",
"=",
"<mask>",
"\n\n",
"// Close the open handles",
"if"... |
3,386 | all-3387 | [
"GetProcessQueryOk",
"returns",
"a",
"tuple",
"with",
"the",
"ProcessQuery",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"h",
"*",
"HeatmapRequest",
")",
"GetProcessQueryOk",
"(",
")",
"(",
"WidgetProcessQuery",
",",
"bool",
")",
"{",
"if",
"h",
"==",
"nil",
"||",
"h",
".",
"ProcessQuery",
"==",
"nil",
"{",
"return",
"WidgetProcessQuery",
"{",
"}",
",",
"<mask... |
3,387 | all-3388 | [
"ListRepositories",
"extracts",
"metadata",
"about",
"repositories",
"declared",
"in",
"a",
"file",
"."
] | [
"func",
"ListRepositories",
"(",
"workspace",
"*",
"rule",
".",
"File",
")",
"(",
"repos",
"[",
"]",
"Repo",
",",
"repoNamesByFile",
"<mask>",
"[",
"*",
"rule",
".",
"File",
"]",
"[",
"]",
"string",
",",
"err",
"error",
")",
"{",
"repoNamesByFile",
"="... |
3,388 | all-3389 | [
"Close",
"shuts",
"down",
"the",
"nitro",
"instance"
] | [
"func",
"(",
"m",
"*",
"Nitro",
")",
"Close",
"(",
")",
"{",
"// Wait until all snapshot iterators have finished",
"for",
"s",
":=",
"m",
".",
"snapshots",
".",
"GetStats",
"(",
")",
";",
"int",
"(",
"s",
".",
"NodeCount",
")",
"!=",
"0",
";",
"s",
"="... |
3,389 | all-3390 | [
"NewConsole",
"creates",
"new",
"console",
"for",
"process",
"and",
"returns",
"it"
] | [
"func",
"(",
"p",
"*",
"Process",
")",
"NewConsole",
"(",
"rootuid",
"int",
")",
"(",
"Console",
",",
"error",
")",
"{",
"console",
",",
"err",
":=",
"newConsole",
"(",
"rootuid",
",",
"rootuid",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
... |
3,390 | all-3391 | [
"GetId",
"returns",
"the",
"Id",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"d",
"*",
"Downtime",
")",
"GetId",
"(",
")",
"int",
"{",
"if",
"d",
"==",
"nil",
"||",
"d",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"0",
"\n",
"}",
"\n",
"return",
"*",
"d",
".",
"Id",
"\n",
"}"
] |
3,391 | all-3392 | [
"Tolist",
"returns",
"all",
"the",
"recipients",
"of",
"the",
"email"
] | [
"func",
"(",
"m",
"*",
"Message",
")",
"Tolist",
"(",
")",
"[",
"]",
"string",
"{",
"tolist",
":=",
"m",
".",
"To",
"\n\n",
"for",
"_",
",",
"cc",
":=",
"<mask>",
"m",
".",
"Cc",
"{",
"tolist",
"=",
"append",
"(",
"tolist",
",",
"cc",
")",
"\... |
3,392 | all-3393 | [
"BTCAddrBytesFromPubKeyBytes",
"returns",
"a",
"hex",
"Bitcoin",
"mainnet",
"address",
"and",
"its",
"checksum",
"."
] | [
"func",
"BTCAddrBytesFromPubKeyBytes",
"(",
"pubKeyBytes",
"[",
"]",
"byte",
")",
"(",
"addrBytes",
"[",
"]",
"byte",
",",
"checksum",
"[",
"]",
"byte",
")",
"{",
"versionPrefix",
":=",
"btcPrefixPubKeyHash",
"// TODO Make const or configurable",
"\n",
"h160",
":=... |
3,393 | all-3394 | [
"native",
"returns",
"a",
"pointer",
"to",
"the",
"underlying",
"cairo_pattern_t",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"native",
"(",
")",
"*",
"C",
".",
"cairo_pattern_t",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"return",
"v",
".",
"pattern",
"\n",
"}"
] |
3,394 | all-3395 | [
"flag",
"edges",
"as",
"either",
"boundary",
"or",
"nonboundary"
] | [
"func",
"EdgeFlag",
"(",
"<mask>",
"bool",
")",
"{",
"C",
".",
"glowEdgeFlag",
"(",
"gpEdgeFlag",
",",
"(",
"C",
".",
"GLboolean",
")",
"(",
"boolToInt",
"(",
"flag",
")",
")",
")",
"\n",
"}"
] |
3,395 | all-3396 | [
"ScanAST",
"creates",
"a",
"File",
"wrapped",
"around",
"the",
"given",
"syntax",
"tree",
".",
"This",
"tree",
"will",
"be",
"modified",
"by",
"editing",
"methods",
"."
] | [
"func",
"ScanAST",
"(",
"pkg",
"string",
",",
"bzlFile",
"*",
"bzl",
".",
"File",
")",
"*",
"<mask>",
"{",
"return",
"ScanASTBody",
"(",
"pkg",
",",
"\"",
"\"",
",",
"bzlFile",
")",
"\n",
"}"
] |
3,396 | all-3397 | [
"ParseTs",
"parses",
"the",
"timestamp",
"from",
"the",
"key",
"bytes",
"."
] | [
"func",
"ParseTs",
"(",
"key",
"[",
"]",
"byte",
")",
"uint64",
"{",
"if",
"len",
"(",
"<mask>",
")",
"<=",
"8",
"{",
"return",
"0",
"\n",
"}",
"\n",
"return",
"math",
".",
"MaxUint64",
"-",
"binary",
".",
"BigEndian",
".",
"Uint64",
"(",
"key",
... |
3,397 | all-3398 | [
"rayCasting",
"returns",
"a",
"slice",
"of",
"line",
"originating",
"from",
"point",
"cx",
"cy",
"and",
"intersecting",
"with",
"objects"
] | [
"func",
"rayCasting",
"(",
"cx",
",",
"cy",
"float64",
",",
"objects",
"[",
"]",
"object",
")",
"[",
"]",
"line",
"{",
"const",
"rayLength",
"=",
"1000",
"// something large enough to reach all objects",
"\n\n",
"var",
"rays",
"[",
"]",
"line",
"\n",
"for",
... |
3,398 | all-3399 | [
"v1HandlersSetup",
"adds",
"all",
"handlers",
"except",
"CredentialsHandler",
"in",
"v1",
"package",
"to",
"the",
"server",
"mux",
"."
] | [
"func",
"v1HandlersSetup",
"(",
"serverMux",
"*",
"<mask>",
".",
"ServeMux",
",",
"containerInstanceArn",
"*",
"string",
",",
"taskEngine",
"handlersutils",
".",
"DockerStateResolver",
",",
"cfg",
"*",
"config",
".",
"Config",
")",
"{",
"serverMux",
".",
"Handle... |
3,399 | all-3400 | [
"DeleteMapping",
"removes",
"the",
"port",
"mapping",
"."
] | [
"func",
"(",
"n",
"*",
"discovery",
")",
"DeleteMapping",
"(",
"protocol",
"string",
",",
"extPort",
",",
"intPort",
"int",
")",
"error",
"{",
"if",
"err",
":=",
"n",
".",
"wait",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.