id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
7,200 | all-7201 | [
"StartObsessingOverSvc",
"creates",
"a",
"new",
"START_OBSESSING_OVER_SVC",
"Nagios",
"command",
".",
"Enables",
"processing",
"of",
"service",
"checks",
"via",
"the",
"OCSP",
"command",
"for",
"the",
"specified",
"service",
"."
] | [
"func",
"StartObsessingOverSvc",
"(",
"host_name",
"string",
",",
"service_description",
"string",
",",
")",
"*",
"livestatus",
".",
"Command",
"{",
"<mask>",
"livestatus",
".",
"NewCommand",
"(",
"\"",
"\"",
",",
"stringifyArg",
"(",
"\"",
"\"",
",",
"\"",
... |
7,201 | all-7202 | [
"SetQueryStringBytes",
"sets",
"URI",
"query",
"string",
"."
] | [
"func",
"(",
"u",
"*",
"URI",
")",
"SetQueryStringBytes",
"(",
"queryString",
"[",
"]",
"byte",
")",
"{",
"u",
".",
"queryString",
"=",
"append",
"(",
"u",
".",
"queryString",
"[",
":",
"0",
"]",
",",
"queryString",
"...",
")",
"\n",
"u",
".",
"par... |
7,202 | all-7203 | [
"Set",
"stores",
"the",
"function",
"under",
"the",
"name",
"key"
] | [
"func",
"(",
"fc",
"*",
"FuncDepot",
")",
"<mask>",
"(",
"key",
"string",
",",
"v",
"interface",
"{",
"}",
")",
"{",
"fc",
".",
"depot",
"[",
"key",
"]",
"=",
"reflect",
".",
"ValueOf",
"(",
"v",
")",
"\n",
"}"
] |
7,203 | all-7204 | [
"getNodeOffset",
"returns",
"the",
"offset",
"of",
"node",
"in",
"the",
"arena",
".",
"If",
"the",
"node",
"pointer",
"is",
"nil",
"then",
"the",
"zero",
"offset",
"is",
"returned",
"."
] | [
"func",
"(",
"s",
"*",
"Arena",
")",
"getNodeOffset",
"(",
"nd",
"*",
"node",
")",
"uint32",
"{",
"if",
"<mask>",
"==",
"nil",
"{",
"return",
"0",
"\n",
"}",
"\n\n",
"return",
"uint32",
"(",
"uintptr",
"(",
"unsafe",
".",
"Pointer",
"(",
"nd",
")",... |
7,204 | all-7205 | [
"/",
"*",
"Makes",
"a",
"new",
"matrix",
"from",
"<rect",
">",
"subrectangle",
"of",
"input",
"array",
".",
"No",
"data",
"is",
"copied"
] | [
"func",
"GetSubRect",
"(",
"arr",
"Arr",
",",
"submat",
"*",
"Mat",
",",
"rect",
"Rect",
")",
"*",
"Mat",
"{",
"mat_new",
":=",
"C",
".",
"cvGetSubRect",
"(",
"unsafe",
".",
"Pointer",
"(",
"arr",
")",
",",
"(",
"*",
"C",
".",
"CvMat",
")",
"(",
... |
7,205 | all-7206 | [
"FindLabels",
"returns",
"the",
"list",
"of",
"labels",
"matching",
"the",
"regex"
] | [
"func",
"(",
"<mask>",
"*",
"Issue",
")",
"FindLabels",
"(",
"regex",
"*",
"regexp",
".",
"Regexp",
")",
"[",
"]",
"Label",
"{",
"labels",
":=",
"[",
"]",
"Label",
"{",
"}",
"\n\n",
"for",
"_",
",",
"label",
":=",
"range",
"issue",
".",
"Labels",
... |
7,206 | all-7207 | [
"SetPaused",
"sets",
"the",
"paused",
"state",
"of",
"a",
"set",
"of",
"animations",
".",
"See",
":",
"https",
":",
"//",
"chromedevtools",
".",
"github",
".",
"io",
"/",
"devtools",
"-",
"protocol",
"/",
"tot",
"/",
"Animation#method",
"-",
"setPaused",
... | [
"func",
"SetPaused",
"(",
"animations",
"[",
"]",
"<mask>",
",",
"paused",
"bool",
")",
"*",
"SetPausedParams",
"{",
"return",
"&",
"SetPausedParams",
"{",
"Animations",
":",
"animations",
",",
"Paused",
":",
"paused",
",",
"}",
"\n",
"}"
] |
7,207 | all-7208 | [
"ArmForSwitch",
"returns",
"which",
"field",
"name",
"should",
"be",
"used",
"for",
"storing",
"the",
"value",
"for",
"an",
"instance",
"of",
"PaymentResult"
] | [
"func",
"(",
"u",
"PaymentResult",
")",
"ArmForSwitch",
"(",
"sw",
"int32",
")",
"(",
"string",
",",
"bool",
")",
"{",
"<mask>",
"PaymentResultCode",
"(",
"sw",
")",
"{",
"case",
"PaymentResultCodePaymentSuccess",
":",
"return",
"\"",
"\"",
",",
"true",
"\... |
7,208 | all-7209 | [
"HandleError",
"prints",
"provided",
"error",
"to",
"stderr",
"."
] | [
"func",
"(",
"handler",
"*",
"NullHandler",
")",
"HandleError",
"(",
"err",
"error",
")",
"error",
"{",
"<mask>",
".",
"Stderr",
".",
"WriteString",
"(",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\\n",
"\"",
",",
"time",
".",
"Now",
"(",
")",
",",
"err",
... |
7,209 | all-7210 | [
"Attach",
"attaches",
"a",
"file",
"."
] | [
"func",
"(",
"m",
"*",
"<mask>",
")",
"Attach",
"(",
"file",
"string",
")",
"error",
"{",
"return",
"m",
".",
"attach",
"(",
"file",
",",
"false",
")",
"\n",
"}"
] |
7,210 | all-7211 | [
"title",
":",
"app",
"list",
"path",
":",
"/",
"apps",
"method",
":",
"GET",
"produce",
":",
"application",
"/",
"json",
"responses",
":",
"200",
":",
"List",
"apps",
"204",
":",
"No",
"content",
"401",
":",
"Unauthorized"
] | [
"func",
"appList",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"error",
"{",
"filter",
":=",
"&",
"app",
".",
"Filter",
"{",
"}",
"\n",
"if",
"name",
":=",
"r",
".",
"<mask>... |
7,211 | all-7212 | [
"InfoFunc",
"outputs",
"Info",
"level",
"log",
"returned",
"from",
"the",
"function"
] | [
"func",
"InfoFunc",
"(",
"f",
"func",
"(",
")",
"string",
")",
"error",
"{",
"if",
"isModeEnable",
"(",
"<mask>",
")",
"{",
"return",
"glg",
".",
"out",
"(",
"INFO",
",",
"\"",
"\"",
",",
"f",
"(",
")",
")",
"\n",
"}",
"\n",
"return",
"nil",
"\... |
7,212 | all-7213 | [
"GetRenotifyIntervalOk",
"returns",
"a",
"tuple",
"with",
"the",
"RenotifyInterval",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"o",
"*",
"Options",
")",
"GetRenotifyIntervalOk",
"(",
")",
"(",
"int",
",",
"bool",
")",
"{",
"if",
"o",
"==",
"nil",
"||",
"o",
".",
"RenotifyInterval",
"==",
"nil",
"{",
"return",
"0",
",",
"<mask>",
"\n",
"}",
"\n",
"return",
"*",... |
7,213 | all-7214 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetCertificateReturns",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork36",
"(",
"&... |
7,214 | all-7215 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"RestartFrameParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger26",
"(",
"&",
"w",
",",
"v",
"... |
7,215 | all-7216 | [
"MACValue",
"returns",
"the",
"value",
"of",
"the",
"MAC",
"pointer",
"passed",
"in",
"or",
"the",
"default",
"value",
"if",
"the",
"pointer",
"is",
"nil",
"."
] | [
"func",
"MACValue",
"(",
"v",
"*",
"strfmt",
".",
"MAC",
")",
"strfmt",
".",
"MAC",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"strfmt",
".",
"MAC",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"<mask>",
"*",
"v",
"\n",
"}"
] |
7,216 | all-7217 | [
"DefaultConfig",
"returns",
"the",
"default",
"configuration",
"for",
"Linux"
] | [
"func",
"DefaultConfig",
"(",
")",
"Config",
"{",
"return",
"Config",
"{",
"DockerEndpoint",
":",
"\"",
"\"",
",",
"ReservedPorts",
":",
"[",
"]",
"uint16",
"{",
"SSHPort",
",",
"DockerReservedPort",
",",
"DockerReservedSSLPort",
",",
"AgentIntrospectionPort",
"... |
7,217 | all-7218 | [
"GetAlertType",
"returns",
"the",
"AlertType",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"e",
"*",
"<mask>",
")",
"GetAlertType",
"(",
")",
"string",
"{",
"if",
"e",
"==",
"nil",
"||",
"e",
".",
"AlertType",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"e",
".",
"AlertType",
"\n",
"}"
] |
7,218 | all-7219 | [
"GetPrivateIPAddress",
"attempts",
"to",
"retrieve",
"private",
"IP",
"address",
"of",
"the",
"specified",
"network",
"interface",
"name",
".",
"If",
"IP",
"address",
"is",
"not",
"allocated",
"yet",
"returns",
"empty",
"string",
"."
] | [
"func",
"(",
"a",
"AzureClient",
")",
"GetPrivateIPAddress",
"(",
"resourceGroup",
",",
"name",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"f",
":=",
"logutil",
".",
"Fields",
"{",
"\"",
"\"",
":",
"name",
"}",
"\n",
"log",
".",
"Debug",
"... |
7,219 | all-7220 | [
"ListIssueEvents",
"gets",
"a",
"list",
"events",
"from",
"GitHub",
"s",
"events",
"API",
"that",
"pertain",
"to",
"the",
"specified",
"issue",
".",
"The",
"events",
"that",
"are",
"returned",
"have",
"a",
"different",
"format",
"than",
"webhook",
"events",
... | [
"func",
"(",
"c",
"*",
"Client",
")",
"ListIssueEvents",
"(",
"org",
",",
"repo",
"string",
",",
"num",
"int",
")",
"(",
"[",
"]",
"ListedIssueEvent",
",",
"error",
")",
"{",
"c",
".",
"log",
"(",
"\"",
"\"",
",",
"org",
",",
"repo",
",",
"num",
... |
7,220 | all-7221 | [
"/",
"*",
"Fatal",
"uses",
"msg",
"as",
"a",
"format",
"string",
"with",
"subsequent",
"parameters",
"as",
"values",
"and",
"logs",
"the",
"resulting",
"message",
"to",
"all",
"added",
"loggers",
"at",
"LogLevel",
".",
"LevelFatal"
] | [
"func",
"(",
"la",
"*",
"LogAdapter",
")",
"Fatal",
"(",
"msg",
"string",
")",
"error",
"{",
"return",
"la",
".",
"<mask>",
"(",
"LevelFatal",
",",
"nil",
",",
"msg",
")",
"\n",
"}"
] |
7,221 | all-7222 | [
"LoadWithEnvTOML",
"loads",
"TOML",
"files",
"with",
"Env"
] | [
"func",
"LoadWithEnvTOML",
"(",
"conf",
"<mask>",
"{",
"}",
",",
"configPaths",
"...",
"string",
")",
"error",
"{",
"return",
"loadWithFunc",
"(",
"conf",
",",
"configPaths",
",",
"envReplacer",
",",
"toml",
".",
"Unmarshal",
")",
"\n",
"}"
] |
7,222 | all-7223 | [
"mapPackage",
"turns",
"appengine",
"into",
"google",
".",
"golang",
".",
"org",
"/",
"appengine",
"etc",
"."
] | [
"func",
"mapPackage",
"(",
"s",
"string",
")",
"string",
"{",
"if",
"stutterPackage",
"{",
"s",
"+=",
"\"",
"\"",
"+",
"<mask>",
".",
"Base",
"(",
"s",
")",
"\n",
"}",
"\n",
"return",
"newPackageBase",
"+",
"s",
"\n",
"}"
] |
7,223 | all-7224 | [
"WithDelta",
"if",
"true",
"retrieve",
"delta",
"since",
"last",
"call",
"."
] | [
"func",
"(",
"p",
"GetHistogramParams",
")",
"WithDelta",
"(",
"delta",
"bool",
")",
"*",
"GetHistogramParams",
"{",
"p",
".",
"Delta",
"=",
"delta",
"\n",
"<mask>",
"&",
"p",
"\n",
"}"
] |
7,224 | all-7225 | [
"StoreFileInfo",
"inserts",
"initial",
"sample",
"info",
"into",
"database",
"creating",
"a",
"placeholder",
"for",
"it"
] | [
"func",
"(",
"db",
"*",
"Database",
")",
"StoreFileInfo",
"(",
"sample",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"(",
"elastic",
".",
"IndexResponse",
",",
"error",
")",
"{",
"if",
"len",
"(",
"db",
".",
"Plugins",
")",
"==",
"0",
"{... |
7,225 | all-7226 | [
"AssociationByTypeAndContainer",
"gets",
"a",
"list",
"of",
"names",
"of",
"all",
"the",
"associations",
"associated",
"with",
"a",
"container",
"and",
"of",
"a",
"certain",
"type"
] | [
"func",
"(",
"task",
"*",
"Task",
")",
"AssociationsByTypeAndContainer",
"(",
"associationType",
",",
"containerName",
"string",
")",
"[",
"]",
"string",
"{",
"task",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"task",
".",
"lock",
".",
"RUnlock",
... |
7,226 | all-7227 | [
"Command",
"returns",
"the",
"Cmd",
"struct",
"to",
"execute",
"the",
"named",
"program",
"with",
"the",
"given",
"arguments",
".",
"It",
"sets",
"only",
"the",
"Path",
"and",
"Args",
"in",
"the",
"returned",
"structure",
".",
"If",
"name",
"contains",
"no... | [
"func",
"Command",
"(",
"name",
"string",
",",
"arg",
"...",
"string",
")",
"*",
"Cmd",
"{",
"cmd",
":=",
"&",
"Cmd",
"{",
"Path",
":",
"name",
",",
"Args",
":",
"append",
"(",
"[",
"]",
"string",
"{",
"<mask>",
"}",
",",
"arg",
"...",
")",
","... |
7,227 | all-7228 | [
"Add",
"creates",
"a",
"new",
"unique",
"token",
"and",
"stores",
"it",
"into",
"current",
"SessionCache",
"instance",
".",
"The",
"token",
"creation",
"will",
"take",
"at",
"least",
"200",
"microseconds",
"but",
"could",
"normally",
"take",
"2",
".",
"5",
... | [
"func",
"(",
"s",
"*",
"SessionCache",
")",
"Add",
"(",
")",
"string",
"{",
"strSum",
":=",
"s",
".",
"salter",
".",
"DefaultToken",
"(",
")",
"\n\n",
"err",
":=",
"s",
".",
"<mask>",
".",
"Add",
"(",
"strSum",
",",
"nil",
")",
"\n",
"if",
"err",... |
7,228 | all-7229 | [
"Register",
"the",
"standard",
"HandlerFuncs",
"from",
"the",
"net",
"/",
"http",
"/",
"pprof",
"package",
"with",
"the",
"provided",
"gin",
".",
"Engine",
".",
"prefixOptions",
"is",
"a",
"optional",
".",
"If",
"not",
"prefixOptions",
"the",
"default",
"pat... | [
"func",
"Register",
"(",
"r",
"*",
"gin",
".",
"Engine",
",",
"prefixOptions",
"...",
"string",
")",
"{",
"prefix",
":=",
"getPrefix",
"(",
"prefixOptions",
"...",
")",
"\n\n",
"prefixRouter",
":=",
"r",
".",
"Group",
"(",
"prefix",
")",
"\n",
"{",
"pr... |
7,229 | all-7230 | [
"flush",
"flushes",
"the",
"first",
"n",
"bytes",
"of",
"the",
"buffer",
".",
"If",
"n",
"is",
"0",
"the",
"whole",
"buffer",
"is",
"flushed",
"."
] | [
"func",
"(",
"c",
"*",
"conn",
")",
"flush",
"(",
"n",
"int",
")",
"{",
"if",
"len",
"(",
"c",
".",
"buf",
")",
"==",
"0",
"{",
"return",
"\n",
"}",
"\n",
"if",
"n",
"==",
"0",
"{",
"n",
"=",
"len",
"(",
"c",
".",
"buf",
")",
"\n",
"}",... |
7,230 | all-7231 | [
"NetworkAddress",
"returns",
"the",
"network",
"addresss",
"of",
"the",
"network",
"endpoint",
"or",
"an",
"empty",
"string",
"if",
"there",
"s",
"no",
"network",
"endpoint"
] | [
"func",
"(",
"e",
"*",
"Endpoints",
")",
"NetworkAddress",
"(",
")",
"string",
"{",
"e",
".",
"mu",
".",
"RLock",
"(",
")",
"\n",
"defer",
"e",
".",
"mu",
".",
"RUnlock",
"(",
")",
"\n\n",
"listener",
":=",
"e",
".",
"listeners",
"[",
"<mask>",
"... |
7,231 | all-7232 | [
"Close",
"must",
"be",
"called",
"after",
"you",
"re",
"done",
"using",
"a",
"putFileClient",
".",
"Further",
"requests",
"will",
"throw",
"errors",
"."
] | [
"func",
"(",
"c",
"*",
"putFileClient",
")",
"Close",
"(",
")",
"error",
"{",
"_",
",",
"<mask>",
":=",
"c",
".",
"c",
".",
"CloseAndRecv",
"(",
")",
"\n",
"return",
"grpcutil",
".",
"ScrubGRPC",
"(",
"err",
")",
"\n",
"}"
] |
7,232 | all-7233 | [
"Int64",
"defines",
"an",
"int64",
"flag",
"with",
"specified",
"name",
"default",
"value",
"and",
"usage",
"string",
".",
"The",
"return",
"value",
"is",
"the",
"address",
"of",
"an",
"int64",
"variable",
"that",
"stores",
"the",
"value",
"of",
"the",
"fl... | [
"func",
"Int64",
"(",
"name",
"string",
",",
"value",
"int64",
",",
"usage",
"string",
")",
"*",
"int64",
"{",
"return",
"EnvironmentFlags",
".",
"Int64",
"(",
"name",
",",
"value",
",",
"<mask>",
")",
"\n",
"}"
] |
7,233 | all-7234 | [
"OnGossipBroadcast",
"receives",
"broadcasts",
"of",
"TopologyGossipData",
".",
"It",
"returns",
"the",
"received",
"update",
"unchanged",
"."
] | [
"func",
"(",
"router",
"*",
"Router",
")",
"OnGossipBroadcast",
"(",
"_",
"PeerName",
",",
"<mask>",
"[",
"]",
"byte",
")",
"(",
"GossipData",
",",
"error",
")",
"{",
"origUpdate",
",",
"_",
",",
"err",
":=",
"router",
".",
"applyTopologyUpdate",
"(",
... |
7,234 | all-7235 | [
"buildActions",
"is",
"the",
"top",
"level",
"action",
"builder",
"it",
"determines",
"whether",
"to",
"build",
"a",
"new",
"actions",
"/",
"foo",
".",
"go",
"file",
"or",
"append",
"to",
"an",
"existing",
"one"
] | [
"func",
"buildActions",
"(",
"pres",
"*",
"presenter",
")",
"genny",
".",
"RunFn",
"{",
"return",
"func",
"(",
"r",
"*",
"genny",
".",
"Runner",
")",
"error",
"{",
"fn",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"pres",
".",
"<mask>",
".",... |
7,235 | all-7236 | [
"copy",
"a",
"http",
".",
"Request",
"see",
":",
"https",
":",
"//",
"go",
"-",
"review",
".",
"googlesource",
".",
"com",
"/",
"c",
"/",
"go",
"/",
"+",
"/",
"36483",
"/",
"3",
"/",
"src",
"/",
"net",
"/",
"http",
"/",
"server",
".",
"go"
] | [
"func",
"dupeRequest",
"(",
"original",
"*",
"http",
".",
"Request",
")",
"*",
"http",
".",
"Request",
"{",
"r2",
":=",
"new",
"(",
"http",
".",
"Request",
")",
"\n",
"*",
"r2",
"=",
"*",
"original",
"\n",
"r2",
".",
"URL",
"=",
"<mask>",
"(",
"u... |
7,236 | all-7237 | [
"Parameter",
"callback",
"has",
"type",
"C",
".",
"GLDEBUGPROCAMD",
"."
] | [
"func",
"DebugMessageCallbackAMD",
"(",
"callback",
"unsafe",
".",
"Pointer",
",",
"userParam",
"unsafe",
".",
"Pointer",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpDebugMessageCallbackAMD",
",",
"2",
",",
"uintptr",
"(",
"<mask>",
")",
",",
"uintptr",
"(",
... |
7,237 | all-7238 | [
"writeFinishedCommit",
"writes",
"these",
"changes",
"to",
"etcd",
":",
"1",
")",
"it",
"closes",
"the",
"input",
"commit",
"(",
"i",
".",
"e",
".",
"it",
"writes",
"any",
"changes",
"made",
"to",
"it",
"and",
"removes",
"it",
"from",
"the",
"open",
"c... | [
"func",
"(",
"d",
"*",
"driver",
")",
"writeFinishedCommit",
"(",
"ctx",
"context",
".",
"Context",
",",
"commit",
"*",
"pfs",
".",
"Commit",
",",
"commitInfo",
"*",
"pfs",
".",
"CommitInfo",
")",
"error",
"{",
"_",
",",
"err",
":=",
"col",
".",
"New... |
7,238 | all-7239 | [
"export",
"FileSequence_InvertedFrameRangePadded"
] | [
"func",
"FileSequence_InvertedFrameRangePadded",
"(",
"id",
"FileSeqId",
")",
"*",
"C",
".",
"char",
"{",
"fs",
",",
"ok",
":=",
"sFileSeqs",
".",
"Get",
"(",
"id",
")",
"\n",
"// caller must free string",
"if",
"!",
"ok",
"{",
"return",
"C",
".",
"CString... |
7,239 | all-7240 | [
"selectToValue",
"returns",
"a",
"single",
"value",
"fetched",
"from",
"rows",
"."
] | [
"func",
"(",
"db",
"*",
"DB",
")",
"selectToValue",
"(",
"rows",
"*",
"sql",
".",
"Rows",
",",
"t",
"reflect",
".",
"Type",
")",
"(",
"reflect",
".",
"Value",
",",
"error",
")",
"{",
"ptrN",
":=",
"0",
"\n",
"for",
";",
"t",
".",
"Kind",
"(",
... |
7,240 | all-7241 | [
"String",
"is",
"a",
"wrapper",
"around",
"gtk_tree_path_to_string",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"TreePath",
")",
"<mask>",
"(",
")",
"string",
"{",
"c",
":=",
"C",
".",
"gtk_tree_path_to_string",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"return",
"goString",
"(",
"c",
")",
"\n",
"}"
] |
7,241 | all-7242 | [
"protoToAppLogs",
"takes",
"as",
"input",
"an",
"array",
"of",
"pointers",
"to",
"LogLines",
"the",
"internal",
"Protocol",
"Buffer",
"representation",
"of",
"a",
"single",
"application",
"-",
"level",
"log",
"and",
"converts",
"it",
"to",
"an",
"array",
"of",... | [
"func",
"protoToAppLogs",
"(",
"logLines",
"[",
"]",
"*",
"pb",
".",
"LogLine",
")",
"[",
"]",
"AppLog",
"{",
"appLogs",
":=",
"make",
"(",
"[",
"]",
"AppLog",
",",
"len",
"(",
"logLines",
")",
")",
"\n\n",
"for",
"i",
",",
"line",
":=",
"range",
... |
7,242 | all-7243 | [
"GetType",
"returns",
"the",
"Type",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"d",
"*",
"DistributionDefinition",
")",
"GetType",
"(",
")",
"string",
"{",
"if",
"d",
"==",
"nil",
"||",
"d",
".",
"Type",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"d",
".",
"<mask>",
"\n",
"}"
] |
7,243 | all-7244 | [
"Create",
"a",
"rafthttp",
".",
"Dial",
"function",
"that",
"connects",
"over",
"TLS",
"using",
"the",
"given",
"cluster",
"(",
"and",
"optionally",
"CA",
")",
"certificate",
"both",
"as",
"client",
"and",
"remote",
"certificate",
"."
] | [
"func",
"raftDial",
"(",
"cert",
"*",
"shared",
".",
"CertInfo",
")",
"(",
"rafthttp",
".",
"Dial",
",",
"error",
")",
"{",
"config",
",",
"err",
":=",
"tlsClientConfig",
"(",
"<mask>",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
... |
7,244 | all-7245 | [
"GenerateNumberSequence",
"will",
"generate",
"a",
"slice",
"of",
"integers",
"at",
"the",
"provided",
"length",
"and",
"convert",
"them",
"each",
"to",
"a",
"string"
] | [
"func",
"GenerateNumberSequence",
"(",
"length",
"int",
")",
"[",
"]",
"string",
"{",
"numSeq",
":=",
"make",
"(",
"[",
"]",
"string",
",",
"<mask>",
")",
"\n",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
"{",
"numSeq",
"[",
"... |
7,245 | all-7246 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"CompositingReasonsParams",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree20",
"(",... |
7,246 | all-7247 | [
"Repaint",
"draws",
"the",
"control",
"on",
"its",
"View",
"surface"
] | [
"func",
"(",
"b",
"*",
"BarChart",
")",
"Draw",
"(",
")",
"{",
"if",
"b",
".",
"hidden",
"{",
"return",
"\n",
"}",
"\n\n",
"b",
".",
"mtx",
".",
"RLock",
"(",
")",
"\n",
"defer",
"b",
".",
"mtx",
".",
"RUnlock",
"(",
")",
"\n\n",
"PushAttribute... |
7,247 | all-7248 | [
"ReadFrom",
"implements",
"net",
".",
"PacketConn",
".",
"Clients",
"should",
"consume",
"from",
"ReadFrom",
"without",
"blocking",
"."
] | [
"func",
"(",
"p",
"*",
"Peer",
")",
"ReadFrom",
"(",
"b",
"[",
"]",
"byte",
")",
"(",
"n",
"int",
",",
"remote",
"net",
".",
"Addr",
",",
"err",
"error",
")",
"{",
"c",
":=",
"make",
"(",
"chan",
"struct",
"{",
"}",
")",
"\n",
"p",
".",
"ac... |
7,248 | all-7249 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetDOMStorageItemsReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage3",
"(",
"&",
"w",
",",
... |
7,249 | all-7250 | [
"customCheckRetry",
"is",
"a",
"fork",
"of",
"etcd",
"s",
"DefaultCheckRetry",
"except",
"that",
"it",
"issues",
"more",
"retries",
"before",
"giving",
"up",
".",
"Because",
"Pachyderm",
"often",
"starts",
"before",
"etcd",
"is",
"ready",
"retrying",
"Pachd",
... | [
"func",
"customCheckRetry",
"(",
"cluster",
"*",
"etcd",
".",
"Cluster",
",",
"numReqs",
"int",
",",
"lastResp",
"http",
".",
"Response",
",",
"err",
"error",
")",
"error",
"{",
"// Retry for 5 minutes, unless the cluster is super huge",
"maxRetries",
":=",
"2",
"... |
7,250 | all-7251 | [
"seekForPrev",
"will",
"reset",
"iterator",
"and",
"seek",
"to",
"<",
"=",
"key",
"."
] | [
"func",
"(",
"itr",
"*",
"Iterator",
")",
"seekForPrev",
"(",
"key",
"[",
"]",
"byte",
")",
"{",
"// TODO: Optimize this. We shouldn't have to take a Prev step.",
"itr",
".",
"seekFrom",
"(",
"<mask>",
",",
"origin",
")",
"\n",
"if",
"!",
"bytes",
".",
"Equal"... |
7,251 | all-7252 | [
"specify",
"a",
"three",
"-",
"dimensional",
"texture",
"subimage",
"in",
"a",
"compressed",
"format"
] | [
"func",
"CompressedTextureSubImage3D",
"(",
"texture",
"uint32",
",",
"level",
"int32",
",",
"xoffset",
"int32",
",",
"yoffset",
"int32",
",",
"zoffset",
"int32",
",",
"width",
"int32",
",",
"height",
"int32",
",",
"depth",
"int32",
",",
"format",
"uint32",
... |
7,252 | all-7253 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"the",
"current",
"program",
"object"
] | [
"func",
"Uniform1i",
"(",
"<mask>",
"int32",
",",
"v0",
"int32",
")",
"{",
"C",
".",
"glowUniform1i",
"(",
"gpUniform1i",
",",
"(",
"C",
".",
"GLint",
")",
"(",
"location",
")",
",",
"(",
"C",
".",
"GLint",
")",
"(",
"v0",
")",
")",
"\n",
"}"
] |
7,253 | all-7254 | [
"CreateOffline",
"creates",
"a",
"new",
"reference",
"to",
"an",
"offline",
"keypair",
"It",
"returns",
"the",
"created",
"key",
"info"
] | [
"func",
"(",
"kb",
"dbKeybase",
")",
"CreateOffline",
"(",
"name",
"string",
",",
"pub",
"crypto",
".",
"PubKey",
")",
"(",
"Info",
",",
"error",
")",
"{",
"return",
"kb",
".",
"writeOfflineKey",
"(",
"pub",
",",
"<mask>",
")",
",",
"nil",
"\n",
"}"
... |
7,254 | all-7255 | [
"ExpandToPath",
"is",
"a",
"wrapper",
"around",
"gtk_tree_view_expand_to_path",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"TreeView",
")",
"ExpandToPath",
"(",
"path",
"*",
"TreePath",
")",
"{",
"C",
".",
"gtk_tree_view_expand_to_path",
"(",
"v",
".",
"native",
"(",
")",
",",
"<mask>",
".",
"native",
"(",
")",
")",
"\n",
"}"
] |
7,255 | all-7256 | [
"MiddlewareFunc",
"makes",
"TimerMiddleware",
"implement",
"the",
"Middleware",
"interface",
"."
] | [
"func",
"(",
"mw",
"*",
"IfMiddleware",
")",
"MiddlewareFunc",
"(",
"h",
"HandlerFunc",
")",
"HandlerFunc",
"{",
"if",
"mw",
".",
"Condition",
"==",
"nil",
"{",
"log",
".",
"Fatal",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"var",
"ifTrueHandler",
"Hand... |
7,256 | all-7257 | [
"AddBytesK",
"adds",
"key",
"=",
"value",
"argument",
".",
"Multiple",
"values",
"for",
"the",
"same",
"key",
"may",
"be",
"added",
"."
] | [
"func",
"(",
"a",
"*",
"Args",
")",
"AddBytesK",
"(",
"key",
"[",
"]",
"byte",
",",
"<mask>",
"string",
")",
"{",
"a",
".",
"args",
"=",
"appendArg",
"(",
"a",
".",
"args",
",",
"b2s",
"(",
"key",
")",
",",
"value",
",",
"argsHasValue",
")",
"\... |
7,257 | all-7258 | [
"RenderToFile",
"writes",
"the",
"map",
"as",
"an",
"encoded",
"image",
"to",
"the",
"file",
"system",
"."
] | [
"func",
"(",
"m",
"*",
"Map",
")",
"RenderToFile",
"(",
"opts",
"RenderOpts",
",",
"path",
"string",
")",
"error",
"{",
"scaleFactor",
":=",
"opts",
".",
"ScaleFactor",
"\n",
"if",
"scaleFactor",
"==",
"0.0",
"{",
"scaleFactor",
"=",
"1.0",
"\n",
"}",
... |
7,258 | all-7259 | [
"MustAccount",
"retrieves",
"the",
"Account",
"value",
"from",
"the",
"union",
"panicing",
"if",
"the",
"value",
"is",
"not",
"set",
"."
] | [
"func",
"(",
"u",
"LedgerKey",
")",
"MustAccount",
"(",
")",
"LedgerKeyAccount",
"{",
"val",
",",
"<mask>",
":=",
"u",
".",
"GetAccount",
"(",
")",
"\n\n",
"if",
"!",
"ok",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"return",
"val",
"\n... |
7,259 | all-7260 | [
"creates",
"and",
"initializes",
"a",
"buffer",
"object",
"s",
"data",
"store"
] | [
"func",
"BufferData",
"(",
"target",
"uint32",
",",
"size",
"int",
",",
"data",
"unsafe",
".",
"Pointer",
",",
"<mask>",
"uint32",
")",
"{",
"C",
".",
"glowBufferData",
"(",
"gpBufferData",
",",
"(",
"C",
".",
"GLenum",
")",
"(",
"target",
")",
",",
... |
7,260 | all-7261 | [
"CoveredNetworks",
"returns",
"the",
"list",
"of",
"RangerEntry",
"(",
"s",
")",
"the",
"given",
"ipnet",
"covers",
".",
"That",
"is",
"the",
"networks",
"that",
"are",
"completely",
"subsumed",
"by",
"the",
"specified",
"network",
"."
] | [
"func",
"(",
"p",
"*",
"prefixTrie",
")",
"CoveredNetworks",
"(",
"network",
"net",
".",
"IPNet",
")",
"(",
"[",
"]",
"RangerEntry",
",",
"error",
")",
"{",
"net",
":=",
"rnet",
".",
"NewNetwork",
"(",
"network",
")",
"\n",
"return",
"p",
".",
"cover... |
7,261 | all-7262 | [
"Redirect",
"a",
"request",
"with",
"the",
"given",
"status",
"to",
"the",
"given",
"URL",
"."
] | [
"func",
"(",
"d",
"*",
"DefaultContext",
")",
"Redirect",
"(",
"status",
"int",
",",
"url",
"string",
",",
"args",
"...",
"interface",
"{",
"}",
")",
"error",
"{",
"d",
".",
"Flash",
"(",
")",
".",
"persist",
"(",
"d",
".",
"Session",
"(",
")",
"... |
7,262 | all-7263 | [
"MarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Marshaler",
"."
] | [
"func",
"(",
"t",
"ServiceName",
")",
"MarshalEasyJSON",
"(",
"out",
"*",
"jwriter",
".",
"Writer",
")",
"{",
"<mask>",
".",
"String",
"(",
"string",
"(",
"t",
")",
")",
"\n",
"}"
] |
7,263 | all-7264 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"ContinueToLocationParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger47",
"(",
... |
7,264 | all-7265 | [
"Lex",
"an",
"XPath",
"expresion",
"on",
"the",
"io",
".",
"Reader"
] | [
"func",
"Lex",
"(",
"xpath",
"string",
")",
"chan",
"XItem",
"{",
"l",
":=",
"&",
"Lexer",
"{",
"input",
":",
"xpath",
",",
"items",
":",
"make",
"(",
"chan",
"XItem",
")",
",",
"}",
"\n",
"go",
"l",
".",
"run",
"(",
")",
"\n",
"return",
"l",
... |
7,265 | all-7266 | [
"Write",
"serializes",
"the",
"command",
"to",
"the",
"given",
"buffered",
"output",
"satisfies",
"the",
"Command",
"interface",
"."
] | [
"func",
"(",
"c",
"Touch",
")",
"Write",
"(",
"w",
"*",
"bufio",
".",
"<mask>",
")",
"(",
"err",
"error",
")",
"{",
"if",
"_",
",",
"err",
"=",
"w",
".",
"WriteString",
"(",
"\"",
"\"",
")",
";",
"err",
"!=",
"nil",
"{",
"err",
"=",
"errors",... |
7,266 | all-7267 | [
"SetBufferSize",
"sets",
"the",
"pixel",
"buffer",
"at",
"the",
"map",
"image",
"edges",
"where",
"Mapnik",
"should",
"not",
"render",
"any",
"labels",
"."
] | [
"func",
"(",
"m",
"*",
"<mask>",
")",
"SetBufferSize",
"(",
"s",
"int",
")",
"{",
"C",
".",
"mapnik_map_set_buffer_size",
"(",
"m",
".",
"m",
",",
"C",
".",
"int",
"(",
"s",
")",
")",
"\n",
"}"
] |
7,267 | all-7268 | [
"FlushJobAll",
"returns",
"all",
"the",
"jobs",
"which",
"were",
"triggered",
"by",
"commits",
".",
"If",
"toPipelines",
"is",
"non",
"-",
"nil",
"then",
"only",
"the",
"jobs",
"between",
"commits",
"and",
"those",
"pipelines",
"in",
"the",
"DAG",
"will",
... | [
"func",
"(",
"c",
"APIClient",
")",
"FlushJobAll",
"(",
"commits",
"[",
"]",
"*",
"pfs",
".",
"Commit",
",",
"toPipelines",
"[",
"]",
"string",
")",
"(",
"[",
"]",
"*",
"pps",
".",
"JobInfo",
",",
"error",
")",
"{",
"var",
"result",
"[",
"]",
"*"... |
7,268 | all-7269 | [
"DoUpdates",
"iterates",
"generated",
"update",
"data",
"and",
"adds",
"and",
"/",
"or",
"modifies",
"labels",
"on",
"repositories",
"Uses",
"AddLabel",
"GH",
"API",
"to",
"add",
"missing",
"labels",
"And",
"UpdateLabel",
"GH",
"API",
"to",
"update",
"color",
... | [
"func",
"(",
"ru",
"RepoUpdates",
")",
"DoUpdates",
"(",
"org",
"string",
",",
"gc",
"client",
")",
"error",
"{",
"var",
"numUpdates",
"int",
"\n",
"for",
"_",
",",
"updates",
":=",
"range",
"ru",
"{",
"numUpdates",
"+=",
"len",
"(",
"updates",
")",
... |
7,269 | all-7270 | [
"GzipDecompressor",
"is",
"a",
"DecompressorFunc",
"for",
"the",
"gzip",
"compression",
"algorithm",
"."
] | [
"func",
"GzipDecompressor",
"(",
"r",
"<mask>",
".",
"Reader",
")",
"(",
"io",
".",
"ReadCloser",
",",
"error",
")",
"{",
"return",
"pgzip",
".",
"NewReader",
"(",
"r",
")",
"\n",
"}"
] |
7,270 | all-7271 | [
"GetLiveEntry",
"retrieves",
"the",
"LiveEntry",
"value",
"from",
"the",
"union",
"returning",
"ok",
"if",
"the",
"union",
"s",
"switch",
"indicated",
"the",
"value",
"is",
"valid",
"."
] | [
"func",
"(",
"u",
"BucketEntry",
")",
"GetLiveEntry",
"(",
")",
"(",
"result",
"LedgerEntry",
",",
"ok",
"bool",
")",
"{",
"armName",
",",
"_",
":=",
"u",
".",
"ArmForSwitch",
"(",
"int32",
"(",
"u",
".",
"Type",
")",
")",
"\n\n",
"if",
"armName",
... |
7,271 | all-7272 | [
"GetDefaultOk",
"returns",
"a",
"tuple",
"with",
"the",
"Default",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"t",
"*",
"TemplateVariable",
")",
"GetDefaultOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"Default",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*... |
7,272 | all-7273 | [
"shouldWatch",
"returns",
"whether",
"the",
"service",
"of",
"the",
"given",
"name",
"should",
"be",
"watched",
"based",
"on",
"its",
"name",
"."
] | [
"func",
"(",
"d",
"*",
"Discovery",
")",
"shouldWatchFromName",
"(",
"<mask>",
"string",
")",
"bool",
"{",
"// If there's no fixed set of watched services, we watch everything.",
"if",
"len",
"(",
"d",
".",
"watchedServices",
")",
"==",
"0",
"{",
"return",
"true",
... |
7,273 | all-7274 | [
"GetIDOk",
"returns",
"a",
"tuple",
"with",
"the",
"ID",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"l",
"*",
"LogSet",
")",
"GetIDOk",
"(",
")",
"(",
"json",
".",
"Number",
",",
"bool",
")",
"{",
"if",
"l",
"==",
"nil",
"||",
"l",
".",
"ID",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
... |
7,274 | all-7275 | [
"parseGroup",
"parses",
"the",
"row",
"of",
"a",
"group",
"."
] | [
"func",
"parseGroup",
"(",
"row",
"string",
")",
"(",
"*",
"Group",
",",
"error",
")",
"{",
"fields",
":=",
"strings",
".",
"Split",
"(",
"row",
",",
"\"",
"\"",
")",
"\n",
"if",
"len",
"(",
"fields",
")",
"!=",
"4",
"{",
"return",
"nil",
",",
... |
7,275 | all-7276 | [
"ReplyJSON",
"encodes",
"the",
"passed",
"objec",
"as",
"application",
"/",
"json",
"and",
"writes",
"a",
"reply",
"with",
"a",
"given",
"HTTP",
"status",
"code",
"to",
"w",
"ReplyJSON",
"(",
"w",
"404",
"map",
"[",
"string",
"]",
"interface",
"{}",
"{",... | [
"func",
"ReplyJSON",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"code",
"int",
",",
"obj",
"interface",
"{",
"}",
")",
"{",
"w",
".",
"Header",
"(",
")",
".",
"Set",
"(",
"\"",
"\"",
",",
"\"",
"\"",
")",
"\n",
"w",
".",
"WriteHeader",
"(",
... |
7,276 | all-7277 | [
"Name",
"assign",
"a",
"name",
"to",
"the",
"container",
"."
] | [
"func",
"(",
"s",
"*",
"RunConfig",
")",
"Name",
"(",
"name",
"string",
")",
"{",
"s",
".",
"<mask>",
"=",
"append",
"(",
"s",
".",
"Options",
",",
"\"",
"\"",
",",
"name",
")",
"\n",
"}"
] |
7,277 | all-7278 | [
"simulateRequest",
"simulates",
"a",
"request",
"by",
"returning",
"a",
"sample",
"JSON",
"from",
"file"
] | [
"func",
"(",
"r",
"rpc",
")",
"simulateRequest",
"(",
"endpoint",
"string",
",",
"method",
"string",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"// Test files conform to replacing '/' in endpoint with '_'",
"fileName",
":=",
"strings",
".",
"Replace",
"... |
7,278 | all-7279 | [
"Write",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockFile",
")",
"Write",
"(",
"arg0",
"[",
"]",
"byte",
")",
"(",
"int",
",",
"error",
")",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
",",
"arg0",
")",
"\n",
"ret0",
",",
"_",
":=",
... |
7,279 | all-7280 | [
"CanonicalURLPath",
"returns",
"the",
"canonical",
"url",
"path",
"for",
"p",
"which",
"follows",
"the",
"rules",
":",
"1",
".",
"the",
"path",
"always",
"starts",
"with",
"/",
"2",
".",
"replace",
"multiple",
"slashes",
"with",
"a",
"single",
"slash",
"3"... | [
"func",
"CanonicalURLPath",
"(",
"p",
"string",
")",
"string",
"{",
"if",
"p",
"==",
"\"",
"\"",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"if",
"p",
"[",
"0",
"]",
"!=",
"'/'",
"{",
"p",
"=",
"\"",
"\"",
"+",
"p",
"\n",
"}",
"\n",
"np",
... |
7,280 | all-7281 | [
"GetSignatures",
"returns",
"the",
"image",
"s",
"signatures",
".",
"It",
"may",
"use",
"a",
"remote",
"(",
"=",
"slow",
")",
"service",
".",
"If",
"instanceDigest",
"is",
"not",
"nil",
"it",
"contains",
"a",
"digest",
"of",
"the",
"specific",
"manifest",
... | [
"func",
"(",
"s",
"*",
"Source",
")",
"GetSignatures",
"(",
"ctx",
"context",
".",
"Context",
",",
"instanceDigest",
"*",
"digest",
".",
"Digest",
")",
"(",
"[",
"]",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"if",
"instanceDigest",
"!=",
"nil",
"{... |
7,281 | all-7282 | [
"ObjectStat",
"gets",
"stats",
"for",
"the",
"DAG",
"object",
"named",
"by",
"key",
".",
"It",
"returns",
"the",
"stats",
"of",
"the",
"requested",
"Object",
"or",
"an",
"error",
"."
] | [
"func",
"(",
"s",
"*",
"<mask>",
")",
"StatsBW",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"*",
"p2pmetrics",
".",
"Stats",
",",
"error",
")",
"{",
"v",
":=",
"&",
"p2pmetrics",
".",
"Stats",
"{",
"}",
"\n",
"err",
":=",
"s",
".",
"Request... |
7,282 | all-7283 | [
"validateJobConfig",
"validates",
"if",
"all",
"the",
"jobspecs",
"/",
"presets",
"are",
"valid",
"if",
"you",
"are",
"mutating",
"the",
"jobs",
"please",
"add",
"it",
"to",
"finalizeJobConfig",
"above"
] | [
"func",
"(",
"c",
"*",
"Config",
")",
"validateJobConfig",
"(",
")",
"error",
"{",
"type",
"orgRepoJobName",
"struct",
"{",
"orgRepo",
",",
"jobName",
"string",
"\n",
"}",
"\n\n",
"// Validate presubmits.",
"// Checking that no duplicate job in prow config exists on the... |
7,283 | all-7284 | [
"HasLocked",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"o",
"*",
"Options",
")",
"HasLocked",
"(",
")",
"bool",
"{",
"if",
"o",
"!=",
"nil",
"&&",
"o",
".",
"Locked",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
7,284 | all-7285 | [
"GetPrecisionOk",
"returns",
"a",
"tuple",
"with",
"the",
"Precision",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"Widget",
")",
"GetPrecisionOk",
"(",
")",
"(",
"PrecisionT",
",",
"bool",
")",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"Precision",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"<mask>",
"\n",
"}",
"\n",
"return",
"*"... |
7,285 | all-7286 | [
"Parse",
"the",
"structure",
"declaration",
"with",
"the",
"given",
"name",
"found",
"in",
"the",
"given",
"Go",
"package",
"."
] | [
"func",
"Parse",
"(",
"pkg",
"*",
"ast",
".",
"Package",
",",
"name",
"string",
")",
"(",
"*",
"Mapping",
",",
"error",
")",
"{",
"str",
":=",
"findStruct",
"(",
"pkg",
".",
"Scope",
",",
"name",
")",
"\n",
"if",
"str",
"==",
"nil",
"{",
"return"... |
7,286 | all-7287 | [
"getClientConfig",
"returns",
"the",
"config",
"for",
"the",
"ecr",
"client",
"based",
"on",
"authData"
] | [
"func",
"getClientConfig",
"(",
"httpClient",
"*",
"http",
".",
"Client",
",",
"authData",
"*",
"apicontainer",
".",
"ECRAuthData",
")",
"(",
"*",
"aws",
".",
"Config",
",",
"error",
")",
"{",
"cfg",
":=",
"aws",
".",
"NewConfig",
"(",
")",
".",
"WithR... |
7,287 | all-7288 | [
"constructNetworkConfig",
"takes",
"in",
"the",
"config",
"from",
"agent",
"and",
"construct",
"the",
"configuration",
"that",
"s",
"accepted",
"by",
"the",
"libcni"
] | [
"func",
"(",
"client",
"*",
"cniClient",
")",
"constructNetworkConfig",
"(",
"cfg",
"<mask>",
"{",
"}",
",",
"plugin",
"string",
")",
"(",
"*",
"libcni",
".",
"NetworkConfig",
",",
"error",
")",
"{",
"configBytes",
",",
"err",
":=",
"json",
".",
"Marshal... |
7,288 | all-7289 | [
"HasId",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"d",
"*",
"Dashboard",
")",
"HasId",
"(",
")",
"bool",
"{",
"if",
"d",
"!=",
"nil",
"&&",
"d",
".",
"Id",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
7,289 | all-7290 | [
"SessionUser",
"will",
"try",
"to",
"read",
"a",
"unique",
"user",
"ID",
"out",
"of",
"the",
"session",
".",
"Then",
"it",
"tries",
"to",
"populate",
"an",
"anonymous",
"user",
"object",
"from",
"the",
"database",
"based",
"on",
"that",
"ID",
".",
"If",
... | [
"func",
"SessionUser",
"(",
"newUser",
"func",
"(",
")",
"User",
")",
"martini",
".",
"Handler",
"{",
"return",
"func",
"(",
"s",
"sessions",
".",
"Session",
",",
"c",
"martini",
".",
"Context",
",",
"l",
"*",
"log",
".",
"Logger",
")",
"{",
"userId"... |
7,290 | all-7291 | [
"GetLogset",
"returns",
"the",
"Logset",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"l",
"*",
"LogStreamDefinition",
")",
"GetLogset",
"(",
")",
"string",
"{",
"if",
"l",
"==",
"nil",
"||",
"l",
".",
"Logset",
"==",
"nil",
"{",
"<mask>",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"l",
".",
"Logset",
"\n",
"}"
] |
7,291 | all-7292 | [
"schemaDVSCreateSpec",
"returns",
"schema",
"items",
"for",
"resources",
"that",
"need",
"to",
"work",
"with",
"a",
"DVSCreateSpec",
"."
] | [
"func",
"schemaDVSCreateSpec",
"(",
")",
"map",
"[",
"string",
"]",
"*",
"schema",
".",
"Schema",
"{",
"s",
":=",
"<mask>",
"[",
"string",
"]",
"*",
"schema",
".",
"Schema",
"{",
"// DistributedVirtualSwitchProductSpec",
"\"",
"\"",
":",
"{",
"Type",
":",
... |
7,292 | all-7293 | [
"IsPaused",
"returns",
"whether",
"sending",
"log",
"entries",
"to",
"this",
"node",
"has",
"been",
"paused",
".",
"A",
"node",
"may",
"be",
"paused",
"because",
"it",
"has",
"rejected",
"recent",
"MsgApps",
"is",
"currently",
"waiting",
"for",
"a",
"snapsho... | [
"func",
"(",
"pr",
"*",
"Progress",
")",
"IsPaused",
"(",
")",
"bool",
"{",
"switch",
"pr",
".",
"State",
"{",
"case",
"ProgressStateProbe",
":",
"return",
"pr",
".",
"Paused",
"\n",
"case",
"ProgressStateReplicate",
":",
"return",
"pr",
".",
"ins",
".",... |
7,293 | all-7294 | [
"SetKeyBytes",
"sets",
"cookie",
"name",
"."
] | [
"func",
"(",
"c",
"*",
"Cookie",
")",
"SetKeyBytes",
"(",
"key",
"[",
"]",
"byte",
")",
"{",
"c",
".",
"key",
"=",
"append",
"(",
"c",
".",
"<mask>",
"[",
":",
"0",
"]",
",",
"key",
"...",
")",
"\n",
"}"
] |
7,294 | all-7295 | [
"SetupCertificates",
"opens",
"all",
".",
"crt",
".",
"cert",
"and",
".",
"key",
"files",
"in",
"dir",
"and",
"appends",
"/",
"loads",
"certs",
"and",
"key",
"pairs",
"as",
"appropriate",
"to",
"tlsc"
] | [
"func",
"SetupCertificates",
"(",
"dir",
"string",
",",
"tlsc",
"*",
"tls",
".",
"Config",
")",
"error",
"{",
"logrus",
".",
"Debugf",
"(",
"\"",
"\"",
",",
"dir",
")",
"\n",
"fs",
",",
"err",
":=",
"ioutil",
".",
"ReadDir",
"(",
"dir",
")",
"\n",
... |
7,295 | all-7296 | [
"reducedSqueezeRow0",
"erforms",
"a",
"reduced",
"squeeze",
"operation",
"for",
"a",
"single",
"row",
"from",
"the",
"highest",
"to",
"the",
"lowest",
"index",
"using",
"the",
"reduced",
"-",
"round",
"Blake2b",
"s",
"G",
"function",
"as",
"the",
"internal",
... | [
"func",
"reducedSqueezeRow0",
"(",
"state",
"[",
"]",
"uint64",
",",
"rowOut",
"[",
"]",
"uint64",
",",
"nCols",
"int",
")",
"{",
"ptr",
":=",
"(",
"nCols",
"-",
"1",
")",
"*",
"blockLenInt64",
"\n",
"//M[row][C-1-col] = H.reduced_squeeze()",
"for",
"i",
"... |
7,296 | all-7297 | [
"HandleLogout",
"handles",
"GitHub",
"logout",
"request",
"from",
"front",
"-",
"end",
".",
"It",
"invalidates",
"cookie",
"sessions",
"and",
"redirect",
"back",
"to",
"the",
"front",
"page",
"."
] | [
"func",
"(",
"ga",
"*",
"Agent",
")",
"HandleLogout",
"(",
"client",
"OAuthClient",
")",
"http",
".",
"HandlerFunc",
"{",
"return",
"func",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
")",
"{",
"accessTokenSession",
",... |
7,297 | all-7298 | [
"removeIDToContainerTaskUnsafe",
"removes",
"the",
"container",
"from",
"the",
"idToContainer",
"and",
"idToTask",
"maps",
".",
"They",
"key",
"to",
"the",
"maps",
"is",
"either",
"the",
"Docker",
"-",
"generated",
"ID",
"or",
"the",
"agent",
"-",
"generated",
... | [
"func",
"(",
"state",
"*",
"DockerTaskEngineState",
")",
"removeIDToContainerTaskUnsafe",
"(",
"container",
"*",
"apicontainer",
".",
"DockerContainer",
")",
"{",
"// The key to these maps is either the Docker ID or agent-generated name. We use the agent-generated name",
"// before ... |
7,298 | all-7299 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"RareStringData",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot1",
"(",
"&",
"w",
",",
"v",
"... |
7,299 | all-7300 | [
"specify",
"the",
"width",
"of",
"rasterized",
"lines"
] | [
"func",
"LineWidth",
"(",
"width",
"float32",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpLineWidth",
",",
"1",
",",
"uintptr",
"(",
"math",
".",
"Float32bits",
"(",
"<mask>",
")",
")",
",",
"0",
",",
"0",
")",
"\n",
"}"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.