id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
9,400 | all-9401 | [
"isResultPointer",
"returns",
"whether",
"the",
"result",
"for",
"this",
"method",
"is",
"a",
"pointer",
"."
] | [
"func",
"(",
"s",
"*",
"State",
")",
"isResultPointer",
"(",
"thriftType",
"*",
"<mask>",
".",
"Type",
")",
"bool",
"{",
"_",
",",
"basicGoType",
":=",
"thriftToGo",
"[",
"s",
".",
"rootType",
"(",
"thriftType",
")",
".",
"Name",
"]",
"\n",
"return",
... |
9,401 | all-9402 | [
"Walk",
"implements",
"the",
"corresponding",
"method",
"in",
"the",
"Client",
"interface"
] | [
"func",
"(",
"o",
"*",
"tracingObjClient",
")",
"Walk",
"(",
"ctx",
"context",
".",
"Context",
",",
"prefix",
"string",
",",
"fn",
"func",
"(",
"name",
"string",
")",
"error",
")",
"error",
"{",
"span",
",",
"ctx",
":=",
"tracing",
".",
"AddSpanToAnyEx... |
9,402 | all-9403 | [
"DrawImage",
"draws",
"the",
"given",
"image",
"on",
"the",
"image",
"i",
".",
"DrawImage",
"accepts",
"the",
"options",
".",
"For",
"details",
"see",
"the",
"document",
"of",
"DrawImageOptions",
".",
"For",
"drawing",
"the",
"pixels",
"of",
"the",
"argument... | [
"func",
"(",
"i",
"*",
"Image",
")",
"DrawImage",
"(",
"img",
"*",
"Image",
",",
"options",
"*",
"DrawImageOptions",
")",
"error",
"{",
"i",
".",
"drawImage",
"(",
"img",
",",
"<mask>",
")",
"\n",
"return",
"nil",
"\n",
"}"
] |
9,403 | all-9404 | [
"populateDiscardStats",
"populates",
"vlog",
".",
"lfDiscardStats",
"This",
"function",
"will",
"be",
"called",
"while",
"initializing",
"valueLog"
] | [
"func",
"(",
"vlog",
"*",
"valueLog",
")",
"populateDiscardStats",
"(",
")",
"error",
"{",
"discardStatsKey",
":=",
"y",
".",
"KeyWithTs",
"(",
"lfDiscardStatsKey",
",",
"math",
".",
"MaxUint64",
")",
"\n",
"<mask>",
",",
"err",
":=",
"vlog",
".",
"db",
... |
9,404 | all-9405 | [
"IsExist",
"indicates",
"whether",
"the",
"agent",
"settings",
"for",
"a",
"given",
"instance",
"ID",
"exists",
"w",
"/",
"i",
"empty",
"."
] | [
"func",
"(",
"c",
"*",
"FakeClient",
")",
"IsExist",
"(",
"instanceID",
"string",
")",
"(",
"bool",
",",
"error",
")",
"{",
"c",
".",
"IsExistCalled",
"=",
"<mask>",
"\n",
"return",
"c",
".",
"Exist",
",",
"c",
".",
"IsExistErr",
"\n",
"}"
] |
9,405 | all-9406 | [
"HasLabel",
"checks",
"if",
"label",
"is",
"in",
"the",
"label",
"set",
"issueLabels",
"."
] | [
"func",
"HasLabel",
"(",
"label",
"string",
",",
"issueLabels",
"[",
"]",
"Label",
")",
"bool",
"{",
"for",
"_",
",",
"l",
":=",
"range",
"issueLabels",
"{",
"if",
"strings",
".",
"ToLower",
"(",
"l",
".",
"Name",
")",
"==",
"strings",
".",
"ToLower"... |
9,406 | all-9407 | [
"DeepCopy",
"is",
"an",
"autogenerated",
"deepcopy",
"function",
"copying",
"the",
"receiver",
"creating",
"a",
"new",
"DNSEndpointSpec",
"."
] | [
"func",
"(",
"in",
"*",
"DNSEndpointSpec",
")",
"DeepCopy",
"(",
")",
"*",
"DNSEndpointSpec",
"{",
"if",
"in",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"out",
":=",
"new",
"(",
"DNSEndpointSpec",
")",
"\n",
"in",
".",
"DeepCopyInto",
"(",
... |
9,407 | all-9408 | [
"HTTPLogger",
"is",
"simple",
"http",
"access",
"logger"
] | [
"func",
"(",
"g",
"*",
"Glg",
")",
"HTTPLogger",
"(",
"name",
"string",
",",
"handler",
"http",
".",
"Handler",
")",
"http",
".",
"Handler",
"{",
"return",
"g",
".",
"HTTPLoggerFunc",
"(",
"name",
",",
"<mask>",
".",
"ServeHTTP",
")",
"\n",
"}"
] |
9,408 | all-9409 | [
"Min",
"returns",
"the",
"smallest",
"value",
"in",
"the",
"total",
"range"
] | [
"func",
"(",
"l",
"*",
"InclusiveRanges",
")",
"Min",
"(",
")",
"int",
"{",
"val",
":=",
"l",
".",
"Start",
"(",
")",
"\n",
"for",
"_",
",",
"aRange",
":=",
"range",
"l",
".",
"<mask>",
"{",
"next",
":=",
"aRange",
".",
"Min",
"(",
")",
"\n",
... |
9,409 | all-9410 | [
"metric",
"parses",
"a",
"metric",
".",
"<label_set",
">",
"<metric_identifier",
">",
"[",
"<label_set",
">",
"]"
] | [
"func",
"(",
"p",
"*",
"parser",
")",
"metric",
"(",
")",
"labels",
".",
"Labels",
"{",
"name",
":=",
"\"",
"\"",
"\n",
"var",
"m",
"labels",
".",
"Labels",
"\n\n",
"t",
":=",
"p",
".",
"peek",
"(",
")",
".",
"typ",
"\n",
"if",
"t",
"==",
"It... |
9,410 | all-9411 | [
"expandCustomizationIdentification",
"reads",
"certain",
"ResourceData",
"keys",
"and",
"returns",
"a",
"CustomizationIdentification",
"."
] | [
"func",
"expandCustomizationIdentification",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
")",
"types",
".",
"CustomizationIdentification",
"{",
"obj",
":=",
"types",
".",
"CustomizationIdentification",
"{",
"JoinWorkgroup",
":",
"d",
".",
"Get",
"(",
"cWindowsKeyP... |
9,411 | all-9412 | [
"GetLastTriggeredTs",
"returns",
"the",
"LastTriggeredTs",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"g",
"*",
"GroupData",
")",
"GetLastTriggeredTs",
"(",
")",
"int",
"{",
"if",
"g",
"==",
"nil",
"||",
"g",
".",
"LastTriggeredTs",
"==",
"nil",
"{",
"<mask>",
"0",
"\n",
"}",
"\n",
"return",
"*",
"g",
".",
"LastTriggeredTs",
"\n",
"}"
] |
9,412 | all-9413 | [
"flattenLinkDiscoveryProtocolConfig",
"reads",
"various",
"fields",
"from",
"a",
"LinkDiscoveryProtocolConfig",
"into",
"the",
"passed",
"in",
"ResourceData",
"."
] | [
"func",
"flattenLinkDiscoveryProtocolConfig",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"obj",
"*",
"<mask>",
".",
"LinkDiscoveryProtocolConfig",
")",
"error",
"{",
"d",
".",
"Set",
"(",
"\"",
"\"",
",",
"obj",
".",
"Operation",
")",
"\n",
"d",
".... |
9,413 | all-9414 | [
"HasNoGroupHosts",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"t",
"*",
"TileDef",
")",
"HasNoGroupHosts",
"(",
")",
"bool",
"{",
"if",
"t",
"!=",
"nil",
"&&",
"t",
".",
"NoGroupHosts",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
9,414 | all-9415 | [
"FileChooserDialogNewWith1Button",
"is",
"a",
"wrapper",
"around",
"gtk_file_chooser_dialog_new",
"()",
"with",
"one",
"button",
"."
] | [
"func",
"FileChooserDialogNewWith1Button",
"(",
"title",
"string",
",",
"<mask>",
"*",
"Window",
",",
"action",
"FileChooserAction",
",",
"first_button_text",
"string",
",",
"first_button_id",
"ResponseType",
")",
"(",
"*",
"FileChooserDialog",
",",
"error",
")",
"{... |
9,415 | all-9416 | [
"ConsistentlyWithOffset",
"operates",
"like",
"Consistnetly",
"but",
"takes",
"an",
"additional",
"initial",
"argument",
"to",
"indicate",
"an",
"offset",
"in",
"the",
"call",
"stack",
".",
"This",
"is",
"useful",
"when",
"building",
"helper",
"functions",
"that",... | [
"func",
"ConsistentlyWithOffset",
"(",
"<mask>",
"int",
",",
"actual",
"interface",
"{",
"}",
",",
"intervals",
"...",
"interface",
"{",
"}",
")",
"AsyncAssertion",
"{",
"if",
"globalFailWrapper",
"==",
"nil",
"{",
"panic",
"(",
"nilFailHandlerPanic",
")",
"\n... |
9,416 | all-9417 | [
"LegalPos",
"returns",
"the",
"legal",
"index",
"positions",
"[",
"a0",
"aLast",
"]",
"and",
"[",
"b0",
"bLast",
"]",
"inclusive",
"where",
"the",
"[",
"a0",
"aLast",
"]",
"holds",
"the",
"first",
"FIFO",
"ordered",
"segment",
"and",
"the",
"[",
"b0",
... | [
"func",
"(",
"b",
"*",
"FixedSizeRingBuf",
")",
"LegalPos",
"(",
")",
"(",
"a0",
",",
"aLast",
",",
"b0",
",",
"bLast",
"int",
")",
"{",
"a0",
"=",
"-",
"1",
"\n",
"aLast",
"=",
"-",
"1",
"\n",
"b0",
"=",
"-",
"1",
"\n",
"bLast",
"=",
"-",
... |
9,417 | all-9418 | [
"resourceVSphereComputeClusterReadCustomAttributes",
"reads",
"the",
"custom",
"attributes",
"for",
"vsphere_compute_cluster",
"."
] | [
"func",
"resourceVSphereComputeClusterReadCustomAttributes",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"meta",
"interface",
"{",
"}",
",",
"cluster",
"*",
"object",
".",
"ClusterComputeResource",
",",
")",
"error",
"{",
"client",
":=",
"meta",
".",
"(",... |
9,418 | all-9419 | [
"ValidEnum",
"validates",
"a",
"proposed",
"value",
"for",
"this",
"enum",
".",
"Implements",
"the",
"Enum",
"interface",
"for",
"ManageOfferEffect"
] | [
"func",
"(",
"e",
"ManageOfferEffect",
")",
"ValidEnum",
"(",
"v",
"int32",
")",
"bool",
"{",
"_",
",",
"ok",
":=",
"manageOfferEffectMap",
"[",
"v",
"]",
"\n",
"return",
"<mask>",
"\n",
"}"
] |
9,419 | all-9420 | [
"Revoke",
"removes",
"a",
"set",
"of",
"permissions",
"to",
"the",
"permission",
"object",
"on",
"which",
"it",
"is",
"called",
"returning",
"a",
"new",
"permission",
"object",
"."
] | [
"func",
"(",
"p",
"Permissions",
")",
"Revoke",
"(",
"lg",
"*",
"zap",
".",
"Logger",
",",
"n",
"*",
"Permissions",
")",
"(",
"Permissions",
",",
"error",
")",
"{",
"var",
"out",
"Permissions",
"\n",
"<mask>",
"err",
"error",
"\n",
"if",
"n",
"==",
... |
9,420 | all-9421 | [
"Return",
"non",
"-",
"array",
"values"
] | [
"func",
"get",
"(",
"values",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
",",
"key",
"string",
")",
"interface",
"{",
"}",
"{",
"if",
"len",
"(",
"key",
")",
"==",
"0",
"||",
"values",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
... |
9,421 | all-9422 | [
"NewLedgerEntryChange",
"creates",
"a",
"new",
"LedgerEntryChange",
"."
] | [
"func",
"NewLedgerEntryChange",
"(",
"aType",
"LedgerEntryChangeType",
",",
"value",
"interface",
"{",
"}",
")",
"(",
"result",
"LedgerEntryChange",
",",
"err",
"error",
")",
"{",
"result",
".",
"Type",
"=",
"aType",
"\n",
"switch",
"LedgerEntryChangeType",
"(",... |
9,422 | all-9423 | [
"GetAll",
"get",
"all",
"Points",
"from",
"the",
"index",
"as",
"a",
"map",
"from",
"id",
"to",
"point"
] | [
"func",
"(",
"points",
"*",
"PointsIndex",
")",
"GetAll",
"(",
")",
"map",
"[",
"string",
"]",
"Point",
"{",
"newpoints",
":=",
"<mask>",
"(",
"map",
"[",
"string",
"]",
"Point",
",",
"0",
")",
"\n",
"for",
"i",
",",
"p",
":=",
"range",
"points",
... |
9,423 | all-9424 | [
"UnmarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Unmarshaler",
"."
] | [
"func",
"(",
"t",
"*",
"ReferrerPolicy",
")",
"UnmarshalEasyJSON",
"(",
"in",
"*",
"jlexer",
".",
"Lexer",
")",
"{",
"switch",
"ReferrerPolicy",
"(",
"in",
".",
"String",
"(",
")",
")",
"{",
"case",
"ReferrerPolicyUnsafeURL",
":",
"*",
"t",
"=",
"Referre... |
9,424 | all-9425 | [
"Serve",
"accepts",
"an",
"incoming",
"TELNET",
"or",
"TELNETS",
"client",
"connection",
"on",
"the",
"net",
".",
"Listener",
"listener",
"."
] | [
"func",
"Serve",
"(",
"listener",
"net",
".",
"Listener",
",",
"handler",
"<mask>",
")",
"error",
"{",
"server",
":=",
"&",
"Server",
"{",
"Handler",
":",
"handler",
"}",
"\n",
"return",
"server",
".",
"Serve",
"(",
"listener",
")",
"\n",
"}"
] |
9,425 | all-9426 | [
"SetCookie",
"sets",
"a",
"cookie",
"with",
"the",
"given",
"cookie",
"data",
";",
"may",
"overwrite",
"equivalent",
"cookies",
"if",
"they",
"exist",
".",
"See",
":",
"https",
":",
"//",
"chromedevtools",
".",
"github",
".",
"io",
"/",
"devtools",
"-",
... | [
"func",
"SetCookie",
"(",
"name",
"string",
",",
"value",
"string",
")",
"*",
"SetCookieParams",
"{",
"return",
"&",
"SetCookieParams",
"{",
"<mask>",
":",
"name",
",",
"Value",
":",
"value",
",",
"}",
"\n",
"}"
] |
9,426 | all-9427 | [
"SetRegistryAuthCredentials",
"sets",
"the",
"credentials",
"for",
"pulling",
"image",
"from",
"ECR"
] | [
"func",
"(",
"c",
"*",
"Container",
")",
"SetRegistryAuthCredentials",
"(",
"credential",
"credentials",
".",
"IAMRoleCredentials",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"<mask>",
".",
"Unlock",
"(",
")",
"\n\n",
"c"... |
9,427 | all-9428 | [
"GetAggrOk",
"returns",
"a",
"tuple",
"with",
"the",
"Aggr",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"s",
"*",
"Series",
")",
"GetAggrOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"Aggr",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
"s",
".",... |
9,428 | all-9429 | [
"Scan",
"read",
"a",
"value",
"from",
"a",
"database",
"driver"
] | [
"func",
"(",
"h",
"*",
"Hostname",
")",
"Scan",
"(",
"raw",
"<mask>",
"{",
"}",
")",
"error",
"{",
"switch",
"v",
":=",
"raw",
".",
"(",
"type",
")",
"{",
"case",
"[",
"]",
"byte",
":",
"*",
"h",
"=",
"Hostname",
"(",
"string",
"(",
"v",
")",... |
9,429 | all-9430 | [
"When",
"you",
"create",
"or",
"delete",
"a",
"file",
"you",
"have",
"to",
"ensure",
"the",
"directory",
"entry",
"for",
"the",
"file",
"is",
"synced",
"in",
"order",
"to",
"guarantee",
"the",
"file",
"is",
"visible",
"(",
"if",
"the",
"system",
"crashes... | [
"func",
"syncDir",
"(",
"dir",
"string",
")",
"error",
"{",
"f",
",",
"err",
":=",
"openDir",
"(",
"dir",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"errors",
".",
"Wrapf",
"(",
"err",
",",
"\"",
"\"",
",",
"dir",
")",
"\n",
"}",
"\n",... |
9,430 | all-9431 | [
"Run",
"starts",
"the",
"job"
] | [
"func",
"(",
"config",
"*",
"Config",
")",
"Run",
"(",
")",
"{",
"err",
":=",
"config",
".",
"ensureLock",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"panic",
"(",
"<mask>",
")",
"\n",
"}",
"\n",
"err",
"=",
"config",
".",
"runWorker",
"(",
... |
9,431 | all-9432 | [
"NewSetCommand",
"returns",
"the",
"CLI",
"command",
"for",
"set",
"."
] | [
"func",
"NewSetCommand",
"(",
")",
"cli",
".",
"Command",
"{",
"return",
"cli",
".",
"Command",
"{",
"Name",
":",
"\"",
"\"",
",",
"Usage",
":",
"\"",
"\"",
",",
"ArgsUsage",
":",
"\"",
"\"",
",",
"Description",
":",
"`Set sets the value of a key.\n\n Wh... |
9,432 | all-9433 | [
"Infof",
"records",
"the",
"log",
"with",
"info",
"level"
] | [
"func",
"(",
"l",
"*",
"Logger",
")",
"Infof",
"(",
"format",
"string",
",",
"args",
"...",
"interface",
"{",
"}",
")",
"{",
"l",
".",
"Output",
"(",
"2",
",",
"LevelInfo",
",",
"fmt",
".",
"Sprintf",
"(",
"<mask>",
",",
"args",
"...",
")",
")",
... |
9,433 | all-9434 | [
"Madvise",
"uses",
"the",
"madvise",
"system",
"call",
"to",
"give",
"advise",
"about",
"the",
"use",
"of",
"memory",
"when",
"using",
"a",
"slice",
"that",
"is",
"memory",
"-",
"mapped",
"to",
"a",
"file",
".",
"Set",
"the",
"readahead",
"flag",
"to",
... | [
"func",
"Madvise",
"(",
"b",
"[",
"]",
"byte",
",",
"readahead",
"bool",
")",
"error",
"{",
"flags",
":=",
"unix",
".",
"MADV_NORMAL",
"\n",
"if",
"!",
"readahead",
"{",
"flags",
"=",
"unix",
".",
"MADV_RANDOM",
"\n",
"}",
"\n",
"return",
"madvise",
... |
9,434 | all-9435 | [
"LoadBoshRelease",
"creates",
"an",
"initialized",
"boshRelease",
"instance",
"from",
"the",
"specifed",
"local",
"or",
"remote",
".",
"tgz",
"file"
] | [
"func",
"LoadBoshRelease",
"(",
"releaseRepo",
"<mask>",
".",
"Release",
",",
"path",
"string",
")",
"(",
"release",
"*",
"BoshRelease",
",",
"err",
"error",
")",
"{",
"var",
"rr",
"io",
".",
"ReadCloser",
"\n",
"rr",
",",
"err",
"=",
"releaseRepo",
".",... |
9,435 | all-9436 | [
"Uname",
"returns",
"the",
"uname",
"of",
"the",
"host",
"machine",
"."
] | [
"func",
"Uname",
"(",
")",
"string",
"{",
"buf",
":=",
"syscall",
".",
"Utsname",
"{",
"}",
"\n",
"err",
":=",
"syscall",
".",
"Uname",
"(",
"&",
"buf",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"panic",
"(",
"\"",
"\"",
"+",
"err",
".",
"<mask... |
9,436 | all-9437 | [
"Send",
"a",
"request",
"to",
"the",
"broker",
"to",
"sync",
"the",
"group",
"on",
"rebalance",
"()",
".",
"Returns",
"a",
"list",
"of",
"topics",
"and",
"partitions",
"to",
"consume",
"."
] | [
"func",
"(",
"c",
"*",
"Consumer",
")",
"syncGroup",
"(",
"strategy",
"*",
"balancer",
")",
"(",
"map",
"[",
"string",
"]",
"[",
"]",
"int32",
",",
"error",
")",
"{",
"memberID",
",",
"generationID",
":=",
"c",
".",
"membership",
"(",
")",
"\n",
"r... |
9,437 | all-9438 | [
"copyExchanges",
"returns",
"a",
"copy",
"of",
"the",
"exchanges",
"if",
"the",
"exchange",
"is",
"active",
".",
"The",
"caller",
"must",
"lock",
"the",
"mexset",
"."
] | [
"func",
"(",
"mexset",
"*",
"messageExchangeSet",
")",
"copyExchanges",
"(",
")",
"(",
"shutdown",
"bool",
",",
"exchanges",
"<mask>",
"[",
"uint32",
"]",
"*",
"messageExchange",
")",
"{",
"if",
"mexset",
".",
"shutdown",
"{",
"return",
"true",
",",
"nil",... |
9,438 | all-9439 | [
"NewGroupMetrics",
"makes",
"a",
"new",
"Metrics",
"and",
"registers",
"them",
"with",
"then",
"provided",
"registerer",
"if",
"not",
"nil",
"."
] | [
"func",
"NewGroupMetrics",
"(",
"reg",
"prometheus",
".",
"Registerer",
")",
"*",
"Metrics",
"{",
"m",
":=",
"&",
"Metrics",
"{",
"evalDuration",
":",
"prometheus",
".",
"NewSummary",
"(",
"prometheus",
".",
"SummaryOpts",
"{",
"Namespace",
":",
"namespace",
... |
9,439 | all-9440 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"EnableReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger44",
"(",
"&",
"w",
",",
"v",
")",... |
9,440 | all-9441 | [
"NewIngressSource",
"creates",
"a",
"new",
"ingressSource",
"with",
"the",
"given",
"config",
"."
] | [
"func",
"NewIngressSource",
"(",
"kubeClient",
"kubernetes",
".",
"Interface",
",",
"namespace",
",",
"annotationFilter",
"string",
",",
"fqdnTemplate",
"string",
",",
"combineFqdnAnnotation",
"bool",
",",
"ignoreHostnameAnnotation",
"bool",
")",
"(",
"Source",
",",
... |
9,441 | all-9442 | [
"Formats",
"the",
"supplied",
"Diff",
"as",
"a",
"unified",
"-",
"diff",
"-",
"like",
"text",
"with",
"infinite",
"context",
"and",
"optionally",
"colorizes",
"it",
"."
] | [
"func",
"(",
"c",
"DiffCmd",
")",
"formatDiff",
"(",
"diffs",
"[",
"]",
"diffmatchpatch",
".",
"Diff",
",",
"color",
"bool",
")",
"string",
"{",
"var",
"buff",
"bytes",
".",
"Buffer",
"\n\n",
"for",
"_",
",",
"diff",
":=",
"range",
"diffs",
"{",
"tex... |
9,442 | all-9443 | [
"creates",
"and",
"initializes",
"a",
"buffer",
"object",
"s",
"immutable",
"data",
"store"
] | [
"func",
"NamedBufferStorage",
"(",
"buffer",
"uint32",
",",
"size",
"int",
",",
"data",
"unsafe",
".",
"Pointer",
",",
"flags",
"uint32",
")",
"{",
"C",
".",
"glowNamedBufferStorage",
"(",
"gpNamedBufferStorage",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"<m... |
9,443 | all-9444 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"CanEmulateReturns",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation20",
"(",
"&",
... |
9,444 | all-9445 | [
"String",
"returns",
"a",
"human",
"readable",
"string",
"representation",
"of",
"DockerContainer"
] | [
"func",
"(",
"dc",
"*",
"DockerContainer",
")",
"<mask>",
"(",
")",
"string",
"{",
"if",
"dc",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"dc",
".",
"DockerID",
",",
"dc",
".",
... |
9,445 | all-9446 | [
"VimValidateVirtualCenter",
"ensures",
"that",
"the",
"client",
"is",
"connected",
"to",
"vCenter",
".",
"This",
"is",
"a",
"lower",
"-",
"level",
"method",
"that",
"does",
"not",
"take",
"the",
"wrapped",
"client",
"from",
"the",
"higher",
"-",
"level",
"go... | [
"func",
"VimValidateVirtualCenter",
"(",
"c",
"*",
"vim25",
".",
"Client",
")",
"error",
"{",
"if",
"c",
".",
"ServiceContent",
".",
"About",
".",
"ApiType",
"!=",
"\"",
"\"",
"{",
"return",
"<mask>",
".",
"New",
"(",
"ErrVirtualCenterOnly",
")",
"\n",
"... |
9,446 | all-9447 | [
"Add",
"adds",
"a",
"peer",
"to",
"the",
"list",
"if",
"it",
"does",
"not",
"exist",
"or",
"returns",
"any",
"existing",
"peer",
"."
] | [
"func",
"(",
"l",
"*",
"PeerList",
")",
"Add",
"(",
"hostPort",
"string",
")",
"*",
"Peer",
"{",
"if",
"ps",
",",
"<mask>",
":=",
"l",
".",
"exists",
"(",
"hostPort",
")",
";",
"ok",
"{",
"return",
"ps",
".",
"Peer",
"\n",
"}",
"\n",
"l",
".",
... |
9,447 | all-9448 | [
"ApplyChanges",
"applies",
"a",
"given",
"set",
"of",
"changes",
"in",
"a",
"given",
"zone",
"."
] | [
"func",
"(",
"p",
"*",
"NS1Provider",
")",
"ApplyChanges",
"(",
"changes",
"*",
"plan",
".",
"Changes",
")",
"error",
"{",
"combinedChanges",
":=",
"make",
"(",
"[",
"]",
"*",
"ns1Change",
",",
"0",
",",
"len",
"(",
"changes",
".",
"Create",
")",
"+"... |
9,448 | all-9449 | [
"Swap",
"swaps",
"the",
"elements",
"at",
"i",
"and",
"j"
] | [
"func",
"(",
"s",
"LexSymbolSorter",
")",
"Swap",
"(",
"i",
",",
"j",
"int",
")",
"{",
"s",
".",
"<mask>",
"[",
"i",
"]",
",",
"s",
".",
"list",
"[",
"j",
"]",
"=",
"s",
".",
"list",
"[",
"j",
"]",
",",
"s",
".",
"list",
"[",
"i",
"]",
... |
9,449 | all-9450 | [
"/",
"*",
"Wait",
"waits",
"until",
"the",
"wrapped",
"command",
"exits",
".",
"It",
"can",
"be",
"passed",
"an",
"optional",
"timeout",
".",
"If",
"the",
"command",
"does",
"not",
"exit",
"within",
"the",
"timeout",
"Wait",
"will",
"trigger",
"a",
"test... | [
"func",
"(",
"s",
"*",
"Session",
")",
"Wait",
"(",
"timeout",
"...",
"interface",
"{",
"}",
")",
"*",
"<mask>",
"{",
"EventuallyWithOffset",
"(",
"1",
",",
"s",
",",
"timeout",
"...",
")",
".",
"Should",
"(",
"Exit",
"(",
")",
")",
"\n",
"return",... |
9,450 | all-9451 | [
"GetQSetHash",
"retrieves",
"the",
"QSetHash",
"value",
"from",
"the",
"union",
"returning",
"ok",
"if",
"the",
"union",
"s",
"switch",
"indicated",
"the",
"value",
"is",
"valid",
"."
] | [
"func",
"(",
"u",
"StellarMessage",
")",
"GetQSetHash",
"(",
")",
"(",
"result",
"Uint256",
",",
"<mask>",
"bool",
")",
"{",
"armName",
",",
"_",
":=",
"u",
".",
"ArmForSwitch",
"(",
"int32",
"(",
"u",
".",
"Type",
")",
")",
"\n\n",
"if",
"armName",
... |
9,451 | all-9452 | [
"String",
"implements",
"fmt",
".",
"String"
] | [
"func",
"(",
"b",
"BuildInfo",
")",
"<mask>",
"(",
")",
"string",
"{",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"b",
".",
"Version",
",",
"b",
".",
"Time",
")",
"\n",
"}"
] |
9,452 | all-9453 | [
"New",
"returns",
"a",
"new",
"Discovery",
"which",
"periodically",
"refreshes",
"its",
"targets",
"."
] | [
"func",
"New",
"(",
"logger",
"log",
".",
"Logger",
",",
"conf",
"*",
"SDConfig",
")",
"(",
"*",
"Discovery",
",",
"error",
")",
"{",
"tls",
",",
"err",
":=",
"config_util",
".",
"NewTLSConfig",
"(",
"&",
"conf",
".",
"TLSConfig",
")",
"\n",
"if",
... |
9,453 | all-9454 | [
"Error",
"satisfies",
"error",
"interface"
] | [
"func",
"(",
"h",
"hookIgnoredError",
")",
"<mask>",
"(",
")",
"string",
"{",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"h",
".",
"hookType",
",",
"h",
".",
"err",
")",
"\n",
"}"
] |
9,454 | all-9455 | [
"SetIconName",
"is",
"a",
"wrapper",
"around",
"gtk_window_set_icon_name",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Window",
")",
"SetIconName",
"(",
"<mask>",
"string",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"name",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n",
"C",
".",
... |
9,455 | all-9456 | [
"first",
"returns",
"the",
"store",
"revision",
"from",
"the",
"first",
"fetch"
] | [
"func",
"(",
"rs",
"readSet",
")",
"first",
"(",
")",
"int64",
"{",
"ret",
":=",
"int64",
"(",
"math",
".",
"MaxInt64",
"-",
"1",
")",
"\n",
"for",
"_",
",",
"resp",
":=",
"range",
"<mask>",
"{",
"if",
"rev",
":=",
"resp",
".",
"Header",
".",
"... |
9,456 | all-9457 | [
"GetPaperSize",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_print_settings_get_paper_size",
"()",
"."
] | [
"func",
"(",
"ps",
"*",
"PrintSettings",
")",
"GetPaperSize",
"(",
")",
"(",
"*",
"PaperSize",
",",
"error",
")",
"{",
"c",
":=",
"C",
".",
"gtk_print_settings_get_paper_size",
"(",
"ps",
".",
"native",
"(",
")",
")",
"\n",
"if",
"c",
"==",
"nil",
"{... |
9,457 | all-9458 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"EventExecutionContextsCleared",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime30",
"(",
"&",
"w",
",",
... |
9,458 | all-9459 | [
"assignEthernetCard",
"is",
"a",
"subset",
"of",
"the",
"logic",
"that",
"goes",
"into",
"AssignController",
"right",
"now",
"but",
"with",
"an",
"unit",
"offset",
"of",
"7",
".",
"This",
"is",
"based",
"on",
"what",
"we",
"have",
"observed",
"on",
"vSpher... | [
"func",
"(",
"r",
"*",
"NetworkInterfaceSubresource",
")",
"assignEthernetCard",
"(",
"l",
"object",
".",
"VirtualDeviceList",
",",
"device",
"types",
".",
"BaseVirtualDevice",
",",
"c",
"types",
".",
"BaseVirtualController",
")",
"error",
"{",
"// The PCI device of... |
9,459 | all-9460 | [
"SetLatency",
"adds",
"latency",
"in",
"millisecond",
"scale",
"with",
"random",
"variations",
"."
] | [
"func",
"SetLatency",
"(",
"ms",
",",
"rv",
"int",
")",
"error",
"{",
"ifces",
",",
"err",
":=",
"GetDefaultInterfaces",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n\n",
"if",
"rv",
">",
"ms",
"{",
"rv",
"=",
"1"... |
9,460 | all-9461 | [
"base64Decode",
"decodes",
"the",
"given",
"string",
"as",
"a",
"base64",
"string",
"returning",
"an",
"error",
"if",
"it",
"fails",
"."
] | [
"func",
"base64Decode",
"(",
"s",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"v",
",",
"err",
":=",
"base64",
".",
"StdEncoding",
".",
"DecodeString",
"(",
"s",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"\"",
"\"",
",",
"<mask>... |
9,461 | all-9462 | [
"String",
"returns",
"a",
"base",
"-",
"64",
"string",
"representation",
"of",
"a",
"cursor",
"."
] | [
"func",
"(",
"c",
"Cursor",
")",
"<mask>",
"(",
")",
"string",
"{",
"if",
"c",
".",
"cc",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"b",
",",
"err",
":=",
"proto",
".",
"Marshal",
"(",
"c",
".",
"cc",
")",
"\n",
"if",
"err",
... |
9,462 | all-9463 | [
"newSTMSerializable",
"initiates",
"a",
"new",
"serialized",
"transaction",
";",
"reads",
"within",
"the",
"same",
"transaction",
"attempt",
"to",
"return",
"data",
"from",
"the",
"revision",
"of",
"the",
"first",
"read",
"."
] | [
"func",
"newSTMSerializable",
"(",
"ctx",
"context",
".",
"Context",
",",
"c",
"*",
"v3",
".",
"<mask>",
",",
"apply",
"func",
"(",
"STM",
")",
"error",
",",
"dryrun",
"bool",
")",
"(",
"*",
"v3",
".",
"TxnResponse",
",",
"error",
")",
"{",
"s",
":... |
9,463 | all-9464 | [
"GoroutineCountCheck",
"returns",
"a",
"Check",
"that",
"fails",
"if",
"too",
"many",
"goroutines",
"are",
"running",
"(",
"which",
"could",
"indicate",
"a",
"resource",
"leak",
")",
"."
] | [
"func",
"GoroutineCountCheck",
"(",
"threshold",
"int",
")",
"Check",
"{",
"return",
"func",
"(",
")",
"error",
"{",
"count",
":=",
"runtime",
".",
"NumGoroutine",
"(",
")",
"\n",
"if",
"<mask>",
">",
"threshold",
"{",
"return",
"fmt",
".",
"Errorf",
"("... |
9,464 | all-9465 | [
"/",
"*",
"InitializeFromReader",
"takes",
"a",
"reader",
"and",
"scans",
"it",
"for",
"an",
"ini",
"configuration",
".",
"The",
"caller",
"should",
"close",
"the",
"reader",
"."
] | [
"func",
"(",
"config",
"*",
"Config",
")",
"InitializeFromReader",
"(",
"input",
"io",
".",
"Reader",
")",
"error",
"{",
"var",
"currentSection",
"*",
"configSection",
"\n\n",
"scanner",
":=",
"bufio",
".",
"NewScanner",
"(",
"input",
")",
"\n",
"config",
... |
9,465 | all-9466 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"EventInspectModeCanceled",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay20",
"(",
"&",
"w",
",",
"v"... |
9,466 | all-9467 | [
"UnmarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Unmarshaler",
"."
] | [
"func",
"(",
"t",
"*",
"ContinueToLocationTargetCallFrames",
")",
"UnmarshalEasyJSON",
"(",
"<mask>",
"*",
"jlexer",
".",
"Lexer",
")",
"{",
"switch",
"ContinueToLocationTargetCallFrames",
"(",
"in",
".",
"String",
"(",
")",
")",
"{",
"case",
"ContinueToLocationTa... |
9,467 | all-9468 | [
"ParseUintHex",
"parses",
"a",
"hexadecimanl",
"representation",
"of",
"a",
"uint64",
"from",
"b",
".",
"The",
"function",
"is",
"equivalent",
"to",
"calling",
"strconv",
".",
"ParseUint",
"(",
"string",
"(",
"b",
")",
"16",
"64",
")",
"but",
"it",
"preven... | [
"func",
"ParseUintHex",
"(",
"b",
"[",
"]",
"byte",
")",
"(",
"uint64",
",",
"error",
")",
"{",
"const",
"max",
"=",
"Uint64Max",
"\n",
"const",
"lim",
"=",
"max",
"/",
"0x10",
"\n",
"var",
"val",
"uint64",
"\n\n",
"if",
"len",
"(",
"b",
")",
"==... |
9,468 | all-9469 | [
"ConvertedFrom",
"reports",
"whether",
"value",
"v",
"was",
"converted",
"from",
"type",
"typ",
"."
] | [
"func",
"ConvertedFrom",
"(",
"v",
"Value",
",",
"typ",
"string",
")",
"bool",
"{",
"change",
",",
"ok",
":=",
"v",
".",
"Value",
".",
"(",
"*",
"ssa",
".",
"ChangeType",
")",
"\n",
"return",
"<mask>",
"&&",
"IsType",
"(",
"change",
".",
"X",
".",
... |
9,469 | all-9470 | [
"Unsubscribe",
"unsubscribes",
"a",
"channel"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"Unsubscribe",
"(",
"ch",
"chan",
"*",
"Event",
")",
"{",
"c",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"mu",
".",
"Unlock",
"(",
")",
"\n\n",
"if",
"c",
".",
"subscribed",
"[",
"ch",
"]... |
9,470 | all-9471 | [
"SetHeading",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_app_chooser_dialog_set_heading",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"AppChooserDialog",
")",
"SetHeading",
"(",
"<mask>",
"string",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"heading",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n",
"C... |
9,471 | all-9472 | [
"CreateProject",
"creates",
"a",
"new",
"empty",
"project",
"."
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"CreateProject",
"(",
"project",
"*",
"Project",
")",
"(",
"*",
"Project",
",",
"error",
")",
"{",
"p",
":=",
"&",
"Project",
"{",
"}",
"\n",
"err",
":=",
"c",
".",
"post",
"(",
"[",
"]",
"string",
"{",
"\"... |
9,472 | all-9473 | [
"FindByPrimaryKeyTo",
"calls",
"db",
".",
"FindByPrimaryKeyTo",
"()",
"returning",
"more",
"descriptive",
"error",
"."
] | [
"func",
"FindByPrimaryKeyTo",
"(",
"db",
"*",
"reform",
".",
"Querier",
",",
"rec",
"reform",
".",
"Record",
",",
"<mask>",
"interface",
"{",
"}",
")",
"error",
"{",
"if",
"err",
":=",
"db",
".",
"FindByPrimaryKeyTo",
"(",
"rec",
",",
"key",
")",
";",
... |
9,473 | all-9474 | [
"ImagesGetByNodeID",
"returns",
"all",
"images",
"that",
"the",
"LXD",
"node",
"instance",
"has",
"with",
"the",
"given",
"node",
"id",
"."
] | [
"func",
"(",
"c",
"*",
"Cluster",
")",
"ImagesGetByNodeID",
"(",
"id",
"int64",
")",
"(",
"map",
"[",
"string",
"]",
"[",
"]",
"string",
",",
"error",
")",
"{",
"images",
":=",
"make",
"(",
"map",
"[",
"string",
"]",
"[",
"]",
"string",
")",
"// ... |
9,474 | all-9475 | [
"Returns",
"a",
"list",
"of",
"filtered",
"Zones"
] | [
"func",
"(",
"p",
"*",
"dnsimpleProvider",
")",
"Zones",
"(",
")",
"(",
"map",
"[",
"string",
"]",
"dnsimple",
".",
"Zone",
",",
"error",
")",
"{",
"zones",
":=",
"make",
"(",
"map",
"[",
"string",
"]",
"dnsimple",
".",
"Zone",
")",
"\n",
"page",
... |
9,475 | all-9476 | [
"/",
"*",
"Infof",
"uses",
"msg",
"as",
"a",
"format",
"string",
"with",
"subsequent",
"parameters",
"as",
"values",
"and",
"logs",
"the",
"resulting",
"message",
"to",
"all",
"added",
"loggers",
"at",
"LogLevel",
".",
"LevelInfo"
] | [
"func",
"(",
"b",
"*",
"Base",
")",
"Infof",
"(",
"msg",
"string",
",",
"a",
"...",
"<mask>",
"{",
"}",
")",
"error",
"{",
"return",
"b",
".",
"Log",
"(",
"LevelInfo",
",",
"nil",
",",
"msg",
",",
"a",
"...",
")",
"\n",
"}"
] |
9,476 | all-9477 | [
"Equals",
"compares",
"two",
"ed25519",
"public",
"keys",
"."
] | [
"func",
"(",
"k",
"*",
"Ed25519PublicKey",
")",
"Equals",
"(",
"o",
"Key",
")",
"bool",
"{",
"edk",
",",
"ok",
":=",
"o",
".",
"(",
"*",
"Ed25519PublicKey",
")",
"\n",
"if",
"!",
"<mask>",
"{",
"return",
"false",
"\n",
"}",
"\n\n",
"return",
"bytes... |
9,477 | all-9478 | [
"CreateRecords",
"creates",
"a",
"given",
"set",
"of",
"DNS",
"records",
"in",
"the",
"given",
"hosted",
"zone",
"."
] | [
"func",
"(",
"p",
"*",
"GoogleProvider",
")",
"CreateRecords",
"(",
"endpoints",
"[",
"]",
"*",
"endpoint",
".",
"Endpoint",
")",
"error",
"{",
"change",
":=",
"&",
"dns",
".",
"Change",
"{",
"}",
"\n\n",
"change",
".",
"Additions",
"=",
"append",
"(",... |
9,478 | all-9479 | [
"CopyTo",
"copies",
"req",
"contents",
"to",
"dst",
"except",
"of",
"body",
"stream",
"."
] | [
"func",
"(",
"req",
"*",
"Request",
")",
"CopyTo",
"(",
"dst",
"*",
"Request",
")",
"{",
"req",
".",
"copyToSkipBody",
"(",
"dst",
")",
"\n",
"if",
"req",
".",
"body",
"!=",
"nil",
"{",
"dst",
".",
"bodyBuffer",
"(",
")",
".",
"<mask>",
"(",
"req... |
9,479 | all-9480 | [
"GetServiceServiceOk",
"returns",
"a",
"tuple",
"with",
"the",
"ServiceService",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"Widget",
")",
"GetServiceServiceOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"ServiceService",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
... |
9,480 | all-9481 | [
"RandomString",
"generates",
"a",
"random",
"set",
"of",
"characters",
"with",
"the",
"given",
"lenght",
"."
] | [
"func",
"RandomString",
"(",
"length",
"int",
")",
"string",
"{",
"src",
":=",
"rand",
".",
"NewSource",
"(",
"time",
".",
"Now",
"(",
")",
".",
"UnixNano",
"(",
")",
")",
"\n",
"b",
":=",
"make",
"(",
"[",
"]",
"byte",
",",
"length",
")",
"\n",
... |
9,481 | all-9482 | [
"CutText",
"makes",
"a",
"text",
"no",
"longer",
"than",
"maxWidth"
] | [
"func",
"CutText",
"(",
"str",
"<mask>",
",",
"maxWidth",
"int",
")",
"string",
"{",
"ln",
":=",
"xs",
".",
"Len",
"(",
"str",
")",
"\n",
"if",
"ln",
"<=",
"maxWidth",
"{",
"return",
"str",
"\n",
"}",
"\n\n",
"return",
"xs",
".",
"Slice",
"(",
"s... |
9,482 | all-9483 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"EventAttributeRemoved",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom67",
"(",
"&",
... |
9,483 | all-9484 | [
"NewGroup",
"reads",
"the",
".",
"gitattributes",
"file",
"in",
"the",
"root",
"of",
"the",
"repository",
"only",
"."
] | [
"func",
"NewGroup",
"(",
"gitAttributesContent",
"func",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
")",
"(",
"*",
"Group",
",",
"error",
")",
"{",
"g",
":=",
"&",
"Group",
"{",
"LinguistGeneratedPatterns",
":",
"[",
"]",
"Pattern",
"{",
"}"... |
9,484 | all-9485 | [
"MarshalText",
"implements",
"encoding",
".",
"TextMarshaler",
".",
"It",
"will",
"encode",
"a",
"zero",
"if",
"this",
"Int",
"is",
"null",
"."
] | [
"func",
"(",
"i",
"Int",
")",
"MarshalText",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"n",
":=",
"i",
".",
"Int64",
"\n",
"if",
"!",
"i",
".",
"Valid",
"{",
"n",
"=",
"0",
"\n",
"}",
"\n",
"return",
"[",
"]",
"byte",
"(",
... |
9,485 | all-9486 | [
"GetIndexes",
"provides",
"a",
"mock",
"function",
"with",
"given",
"fields",
":"
] | [
"func",
"(",
"_m",
"*",
"ObjectStoreOptions",
")",
"GetIndexes",
"(",
")",
"map",
"[",
"string",
"]",
"[",
"]",
"string",
"{",
"ret",
":=",
"_m",
".",
"Called",
"(",
")",
"\n\n",
"var",
"r0",
"map",
"[",
"string",
"]",
"[",
"]",
"string",
"\n",
"... |
9,486 | all-9487 | [
"ChMode",
"is",
"used",
"to",
"change",
"users",
"modes",
"in",
"a",
"channel",
"operator",
"=",
"+",
"o",
"deop",
"=",
"-",
"o",
"ban",
"=",
"+",
"b"
] | [
"func",
"(",
"bot",
"*",
"Bot",
")",
"ChMode",
"(",
"user",
",",
"channel",
",",
"mode",
"string",
")",
"{",
"bot",
".",
"Send",
"(",
"\"",
"\"",
"+",
"channel",
"+",
"\"",
"\"",
"+",
"mode",
"+",
"\"",
"\"",
"+",
"<mask>",
")",
"\n",
"}"
] |
9,487 | all-9488 | [
"/",
"*"
] | [
"func",
"MessageWithDiff",
"(",
"actual",
",",
"message",
",",
"expected",
"string",
")",
"string",
"{",
"if",
"TruncatedDiff",
"&&",
"len",
"(",
"actual",
")",
">=",
"truncateThreshold",
"&&",
"len",
"(",
"expected",
")",
">=",
"truncateThreshold",
"{",
"di... |
9,488 | all-9489 | [
"GetUserPermission",
"returns",
"the",
"user",
"s",
"permission",
"level",
"for",
"a",
"repo",
"https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"repos",
"/",
"collaborators",
"/",
"#review",
"-",
"a",
"-",
"users",
"-",
"permis... | [
"func",
"(",
"c",
"*",
"Client",
")",
"GetUserPermission",
"(",
"org",
",",
"repo",
",",
"user",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"c",
".",
"log",
"(",
"\"",
"\"",
",",
"org",
",",
"repo",
",",
"user",
")",
"\n\n",
"<mask>",
... |
9,489 | all-9490 | [
"MustExtract",
"behaves",
"as",
"Extract",
"but",
"panics",
"if",
"an",
"error",
"occurs",
"."
] | [
"func",
"(",
"a",
"Asset",
")",
"MustExtract",
"(",
"typ",
"<mask>",
"{",
"}",
",",
"code",
"interface",
"{",
"}",
",",
"issuer",
"interface",
"{",
"}",
")",
"{",
"err",
":=",
"a",
".",
"Extract",
"(",
"typ",
",",
"code",
",",
"issuer",
")",
"\n\... |
9,490 | all-9491 | [
"Looks",
"up",
"if",
"the",
"origin",
"matches",
"one",
"of",
"the",
"patterns",
"provided",
"in",
"Options",
".",
"AllowOrigins",
"patterns",
"."
] | [
"func",
"(",
"o",
"*",
"Options",
")",
"IsOriginAllowed",
"(",
"origin",
"string",
")",
"(",
"allowed",
"bool",
")",
"{",
"for",
"_",
",",
"<mask>",
":=",
"range",
"o",
".",
"AllowOrigins",
"{",
"allowed",
",",
"_",
"=",
"regexp",
".",
"MatchString",
... |
9,491 | all-9492 | [
"JsonWrite",
"sets",
"response",
"content",
"type",
"to",
"JSON",
"sets",
"HTTP",
"status",
"and",
"serializes",
"defined",
"content",
"to",
"JSON",
"format",
"."
] | [
"func",
"JsonWrite",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"status",
"int",
",",
"<mask>",
"interface",
"{",
"}",
")",
"{",
"HttpHeader_ContentType_Json",
"(",
")",
".",
"SetWriter",
"(",
"w",
".",
"Header",
"(",
")",
")",
"\n",
"w",
".",
"Writ... |
9,492 | all-9493 | [
"RegisterObserver",
"registers",
"a",
"new",
"observer",
"."
] | [
"func",
"(",
"r",
"*",
"Raft",
")",
"RegisterObserver",
"(",
"or",
"*",
"Observer",
")",
"{",
"r",
".",
"observersLock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"r",
".",
"observersLock",
".",
"Unlock",
"(",
")",
"\n",
"r",
".",
"observers",
"[",
"or... |
9,493 | all-9494 | [
"copy",
"a",
"two",
"-",
"dimensional",
"texture",
"subimage"
] | [
"func",
"CopyTexSubImage2D",
"(",
"target",
"uint32",
",",
"level",
"int32",
",",
"xoffset",
"int32",
",",
"yoffset",
"int32",
",",
"x",
"int32",
",",
"y",
"int32",
",",
"width",
"int32",
",",
"height",
"int32",
")",
"{",
"C",
".",
"glowCopyTexSubImage2D",... |
9,494 | all-9495 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"EventRequestIntercepted",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork52",
"(",
"&",
"w",
",",
"v",... |
9,495 | all-9496 | [
"SetSize",
"changes",
"control",
"size",
".",
"Constant",
"DoNotChange",
"can",
"be",
"used",
"as",
"placeholder",
"to",
"indicate",
"that",
"the",
"control",
"attrubute",
"should",
"be",
"unchanged",
".",
"Method",
"does",
"nothing",
"if",
"new",
"size",
"is"... | [
"func",
"(",
"c",
"*",
"CheckBox",
")",
"SetSize",
"(",
"width",
",",
"height",
"int",
")",
"{",
"if",
"width",
"!=",
"KeepValue",
"&&",
"(",
"width",
">",
"1000",
"||",
"width",
"<",
"c",
".",
"minW",
")",
"{",
"return",
"\n",
"}",
"\n",
"if",
... |
9,496 | all-9497 | [
"cephRBDVolumeExists",
"checks",
"whether",
"a",
"given",
"RBD",
"storage",
"volume",
"exists",
"."
] | [
"func",
"cephRBDVolumeExists",
"(",
"clusterName",
"string",
",",
"poolName",
"string",
",",
"volumeName",
"string",
",",
"volumeType",
"string",
",",
"userName",
"string",
")",
"bool",
"{",
"_",
",",
"err",
":=",
"<mask>",
".",
"RunCommand",
"(",
"\"",
"\""... |
9,497 | all-9498 | [
"Do",
"executes",
"Animation",
".",
"resolveAnimation",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"remoteObject",
"-",
"Corresponding",
"remote",
"object",
"."
] | [
"func",
"(",
"p",
"*",
"ResolveAnimationParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"remoteObject",
"*",
"runtime",
".",
"RemoteObject",
",",
"err",
"error",
")",
"{",
"// execute",
"var",
"res",
"ResolveAnimationReturns",
"\n",
"err... |
9,498 | all-9499 | [
"ServerOptions",
"for",
"logging",
"RPCs"
] | [
"func",
"ServerOptions",
"(",
"log",
"ttnlog",
".",
"Interface",
")",
"[",
"]",
"grpc",
".",
"ServerOption",
"{",
"return",
"[",
"]",
"grpc",
".",
"ServerOption",
"{",
"grpc",
".",
"UnaryInterceptor",
"(",
"UnaryServerInterceptor",
"(",
"log",
")",
")",
",... |
9,499 | all-9500 | [
"SetState",
"is",
"a",
"wrapper",
"around",
"gtk_style_context_set_state",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"StyleContext",
")",
"SetState",
"(",
"state",
"StateFlags",
")",
"{",
"C",
".",
"gtk_style_context_set_state",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"GtkStateFlags",
"(",
"<mask>",
")",
")",
"\n",
"}"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.