id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
6,100 | all-6101 | [
"define",
"an",
"array",
"of",
"texture",
"coordinates"
] | [
"func",
"TexCoordPointer",
"(",
"size",
"int32",
",",
"xtype",
"uint32",
",",
"stride",
"int32",
",",
"pointer",
"unsafe",
".",
"Pointer",
")",
"{",
"C",
".",
"glowTexCoordPointer",
"(",
"gpTexCoordPointer",
",",
"(",
"C",
".",
"GLint",
")",
"(",
"<mask>",... |
6,101 | all-6102 | [
"printPlainResults",
"prints",
"plain",
"-",
"text",
"output",
"for",
"results"
] | [
"func",
"printPlainResults",
"(",
"results",
"Results",
")",
"error",
"{",
"for",
"_",
",",
"res",
":=",
"range",
"results",
"{",
"// Explicitely start with the string and error output",
"fmt",
".",
"Printf",
"(",
"\"",
"\\n",
"\"",
",",
"res",
".",
"origString"... |
6,102 | all-6103 | [
"GetTitle",
"returns",
"the",
"Title",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"e",
"*",
"<mask>",
")",
"GetTitle",
"(",
")",
"string",
"{",
"if",
"e",
"==",
"nil",
"||",
"e",
".",
"Title",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"e",
".",
"Title",
"\n",
"}"
] |
6,103 | all-6104 | [
"GetCurrentApproversSetCased",
"returns",
"the",
"set",
"of",
"approvers",
"logins",
"with",
"the",
"original",
"cases",
"."
] | [
"func",
"(",
"ap",
"Approvers",
")",
"GetCurrentApproversSetCased",
"(",
")",
"sets",
".",
"String",
"{",
"currentApprovers",
":=",
"sets",
".",
"NewString",
"(",
")",
"\n\n",
"for",
"_",
",",
"approval",
":=",
"<mask>",
"ap",
".",
"approvers",
"{",
"curre... |
6,104 | all-6105 | [
"Helper",
"function",
"used",
"to",
"log",
"requests",
"and",
"responses",
"from",
"our",
"GRPC",
"method",
"implementations"
] | [
"func",
"(",
"l",
"*",
"logger",
")",
"Log",
"(",
"request",
"<mask>",
"{",
"}",
",",
"response",
"interface",
"{",
"}",
",",
"err",
"error",
",",
"duration",
"time",
".",
"Duration",
")",
"{",
"if",
"err",
"!=",
"nil",
"{",
"l",
".",
"LogAtLevelFr... |
6,105 | all-6106 | [
"cvArcLength",
"(",
"const",
"void",
"*",
"curve",
"CvSlice",
"slice",
"=",
"CV_WHOLE_SEQ",
"int",
"is_closed",
"=",
"-",
"1",
")"
] | [
"func",
"ArcLength",
"(",
"curve",
"*",
"Seq",
",",
"<mask>",
"Slice",
",",
"is_closed",
"bool",
")",
"float64",
"{",
"is_closed_int",
":=",
"0",
"\n",
"if",
"is_closed",
"{",
"is_closed_int",
"=",
"1",
"\n",
"}",
"\n",
"return",
"float64",
"(",
"C",
"... |
6,106 | all-6107 | [
"<expr",
"-",
"primary",
">",
"::",
"=",
"L",
"<type",
">",
"<",
"(",
"value",
")",
"number",
">",
"E",
"::",
"=",
"L",
"<type",
">",
"<",
"(",
"value",
")",
"float",
">",
"E",
"::",
"=",
"L",
"<mangled",
"-",
"name",
">",
"E"
] | [
"func",
"(",
"st",
"*",
"state",
")",
"exprPrimary",
"(",
")",
"AST",
"{",
"st",
".",
"checkChar",
"(",
"'L'",
")",
"\n",
"if",
"len",
"(",
"st",
".",
"str",
")",
"==",
"0",
"{",
"st",
".",
"fail",
"(",
"\"",
"\"",
")",
"\n\n",
"}",
"\n\n",
... |
6,107 | all-6108 | [
"Value",
"converts",
"a",
"value",
"to",
"a",
"database",
"driver",
"value"
] | [
"func",
"(",
"u",
"UUID",
")",
"Value",
"(",
")",
"(",
"driver",
".",
"Value",
",",
"error",
")",
"{",
"return",
"<mask>",
".",
"Value",
"(",
"string",
"(",
"u",
")",
")",
",",
"nil",
"\n",
"}"
] |
6,108 | all-6109 | [
"NewMockClientSDK",
"creates",
"a",
"new",
"mock",
"instance"
] | [
"func",
"NewMockClientSDK",
"(",
"ctrl",
"*",
"gomock",
".",
"<mask>",
")",
"*",
"MockClientSDK",
"{",
"mock",
":=",
"&",
"MockClientSDK",
"{",
"ctrl",
":",
"ctrl",
"}",
"\n",
"mock",
".",
"recorder",
"=",
"&",
"MockClientSDKMockRecorder",
"{",
"mock",
"}"... |
6,109 | all-6110 | [
"HasId",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"s",
"*",
"ScreenboardMonitor",
")",
"HasId",
"(",
")",
"bool",
"{",
"if",
"s",
"!=",
"nil",
"&&",
"s",
".",
"Id",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
6,110 | all-6111 | [
"similar",
"returns",
"true",
"if",
"the",
"two",
"Args",
"are",
"equal",
"or",
"almost",
"but",
"not",
"quite",
"equal",
"."
] | [
"func",
"(",
"a",
"*",
"Args",
")",
"similar",
"(",
"r",
"*",
"Args",
",",
"similar",
"Similarity",
")",
"bool",
"{",
"if",
"a",
".",
"Elided",
"!=",
"r",
".",
"Elided",
"||",
"len",
"(",
"a",
".",
"Values",
")",
"!=",
"len",
"(",
"r",
".",
"... |
6,111 | all-6112 | [
"UnmarshalYAML",
"implements",
"yaml",
".",
"Unmarshaler",
"."
] | [
"func",
"(",
"ls",
"*",
"Labels",
")",
"UnmarshalYAML",
"(",
"unmarshal",
"func",
"(",
"interface",
"{",
"}",
")",
"error",
")",
"error",
"{",
"var",
"m",
"map",
"[",
"string",
"]",
"string",
"\n\n",
"if",
"err",
":=",
"unmarshal",
"(",
"&",
"m",
"... |
6,112 | all-6113 | [
"Error",
"formats",
"message",
"using",
"the",
"default",
"formats",
"for",
"its",
"operands",
"prepends",
"the",
"prefix",
"as",
"necessary",
"and",
"writes",
"to",
"log",
"with",
"LevelError",
".",
"This",
"is",
"part",
"of",
"the",
"Logger",
"interface",
... | [
"func",
"(",
"l",
"*",
"slog",
")",
"Error",
"(",
"args",
"...",
"interface",
"{",
"}",
")",
"{",
"lvl",
":=",
"l",
".",
"Level",
"(",
")",
"\n",
"if",
"lvl",
"<=",
"LevelError",
"{",
"l",
".",
"b",
".",
"<mask>",
"(",
"\"",
"\"",
",",
"l",
... |
6,113 | all-6114 | [
"UnmarshalJSON",
"implements",
"json",
".",
"Unmarshaler",
".",
"It",
"supports",
"number",
"and",
"null",
"input",
".",
"0",
"will",
"not",
"be",
"considered",
"a",
"null",
"Bool",
".",
"It",
"also",
"supports",
"unmarshalling",
"a",
"sql",
".",
"NullBool",... | [
"func",
"(",
"b",
"*",
"Bool",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"var",
"err",
"error",
"\n",
"var",
"v",
"interface",
"{",
"}",
"\n",
"if",
"err",
"=",
"json",
".",
"Unmarshal",
"(",
"data",
",",
"&",
"v",
... |
6,114 | all-6115 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetStyleSheetTextReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss35",
"(",
"&",
"w",
",",
"v",
... |
6,115 | all-6116 | [
"AddDummyV2S1Signature",
"adds",
"an",
"JWS",
"signature",
"with",
"a",
"temporary",
"key",
"(",
"i",
".",
"e",
".",
"useless",
")",
"to",
"a",
"v2s1",
"manifest",
".",
"This",
"is",
"useful",
"to",
"make",
"the",
"manifest",
"acceptable",
"to",
"a",
"Do... | [
"func",
"AddDummyV2S1Signature",
"(",
"manifest",
"[",
"]",
"byte",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"<mask>",
",",
"err",
":=",
"libtrust",
".",
"GenerateECP256PrivateKey",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"n... |
6,116 | all-6117 | [
"GetMountPoint",
"gets",
"the",
"mountpoint",
"of",
"the",
"created",
"volume",
"."
] | [
"func",
"(",
"vol",
"*",
"VolumeResource",
")",
"GetMountPoint",
"(",
")",
"string",
"{",
"vol",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"vol",
".",
"<mask>",
".",
"RUnlock",
"(",
")",
"\n\n",
"return",
"vol",
".",
"VolumeConfig",
".",
"M... |
6,117 | all-6118 | [
"Read",
"a",
"serialized",
"CHD",
"."
] | [
"func",
"Read",
"(",
"r",
"<mask>",
".",
"Reader",
")",
"(",
"*",
"CHD",
",",
"error",
")",
"{",
"b",
",",
"err",
":=",
"ioutil",
".",
"ReadAll",
"(",
"r",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n"... |
6,118 | all-6119 | [
"UnmarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Unmarshaler",
"."
] | [
"func",
"(",
"t",
"*",
"Source",
")",
"UnmarshalEasyJSON",
"(",
"in",
"*",
"jlexer",
".",
"Lexer",
")",
"{",
"switch",
"Source",
"(",
"in",
".",
"String",
"(",
")",
")",
"{",
"case",
"SourceXML",
":",
"*",
"t",
"=",
"SourceXML",
"\n",
"case",
"Sour... |
6,119 | all-6120 | [
"Copy",
"returns",
"a",
"deep",
"copy",
"of",
"this",
"configuration",
"."
] | [
"func",
"(",
"c",
"*",
"TemplateConfigs",
")",
"Copy",
"(",
")",
"*",
"TemplateConfigs",
"{",
"o",
":=",
"<mask>",
"(",
"TemplateConfigs",
",",
"len",
"(",
"*",
"c",
")",
")",
"\n",
"for",
"i",
",",
"t",
":=",
"range",
"*",
"c",
"{",
"o",
"[",
... |
6,120 | all-6121 | [
"ASTToString",
"returns",
"the",
"demangled",
"name",
"of",
"the",
"AST",
"."
] | [
"func",
"ASTToString",
"(",
"a",
"AST",
",",
"<mask>",
"...",
"Option",
")",
"string",
"{",
"tparams",
":=",
"true",
"\n",
"for",
"_",
",",
"o",
":=",
"range",
"options",
"{",
"switch",
"o",
"{",
"case",
"NoTemplateParams",
":",
"tparams",
"=",
"false"... |
6,121 | all-6122 | [
"/",
"*",
"FindVmsByDeployment",
"finds",
"vms",
"by",
"deployment",
"name"
] | [
"func",
"(",
"a",
"*",
"Client",
")",
"FindVmsByDeployment",
"(",
"params",
"*",
"FindVmsByDeploymentParams",
")",
"(",
"*",
"FindVmsByDeploymentOK",
",",
"error",
")",
"{",
"// TODO: Validate the params before sending",
"if",
"params",
"==",
"nil",
"{",
"params",
... |
6,122 | all-6123 | [
"NewError",
"initializes",
"FormErrors",
"with",
"one",
"general",
"error",
"."
] | [
"func",
"NewError",
"(",
"e",
"string",
")",
"FormErrors",
"{",
"<mask>",
":=",
"FormErrors",
"{",
"}",
"\n",
"errors",
".",
"AddError",
"(",
"e",
")",
"\n",
"return",
"errors",
"\n",
"}"
] |
6,123 | all-6124 | [
"BindResponseWriter",
"catches",
"a",
"downstream",
"response",
"writing",
"and",
"transfer",
"its",
"content",
"to",
"the",
"writer",
"w",
"(",
"that",
"will",
"normally",
"take",
"care",
"to",
"use",
"the",
"original",
"ResponseWriter",
")",
".",
"The",
"bef... | [
"func",
"BindResponseWriter",
"(",
"w",
"io",
".",
"Writer",
",",
"c",
"*",
"core",
".",
"Context",
",",
"before",
"...",
"func",
"(",
"[",
"]",
"byte",
")",
")",
"{",
"c",
".",
"ResponseWriter",
"=",
"responseWriterBinder",
"{",
"w",
",",
"c",
".",
... |
6,124 | all-6125 | [
"SetupNS",
"will",
"set",
"up",
"the",
"namespace",
"of",
"container",
"including",
"create",
"the",
"bridge",
"and",
"the",
"veth",
"pair",
"move",
"the",
"eni",
"to",
"container",
"namespace",
"setup",
"the",
"routes"
] | [
"func",
"(",
"client",
"*",
"cniClient",
")",
"SetupNS",
"(",
"ctx",
"context",
".",
"Context",
",",
"cfg",
"*",
"Config",
",",
"timeout",
"time",
".",
"Duration",
")",
"(",
"*",
"current",
".",
"Result",
",",
"error",
")",
"{",
"derivedCtx",
",",
"c... |
6,125 | all-6126 | [
"Shutdown",
"gracefully",
"stops",
"all",
"servers",
"by",
"calling",
"Shutdown",
"method",
"on",
"each",
"of",
"them",
"."
] | [
"func",
"(",
"s",
"*",
"Servers",
")",
"Shutdown",
"(",
"ctx",
"context",
".",
"Context",
")",
"{",
"wg",
":=",
"&",
"sync",
".",
"WaitGroup",
"{",
"}",
"\n",
"for",
"_",
",",
"srv",
":=",
"range",
"s",
".",
"servers",
"{",
"wg",
".",
"Add",
"(... |
6,126 | all-6127 | [
"SetDash",
"is",
"a",
"wrapper",
"around",
"cairo_set_dash",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"SetDash",
"(",
"dashes",
"[",
"]",
"float64",
",",
"offset",
"float64",
")",
"{",
"header",
":=",
"(",
"*",
"reflect",
".",
"SliceHeader",
")",
"(",
"unsafe",
".",
"Pointer",
"(",
"&",
"dashes",
")",
")",
"\n"... |
6,127 | all-6128 | [
"MarkPartitionOffset",
"marks",
"an",
"offset",
"of",
"the",
"provided",
"topic",
"/",
"partition",
"as",
"processed",
".",
"See",
"MarkOffset",
"for",
"additional",
"explanation",
"."
] | [
"func",
"(",
"c",
"*",
"Consumer",
")",
"MarkPartitionOffset",
"(",
"topic",
"string",
",",
"partition",
"int32",
",",
"offset",
"int64",
",",
"<mask>",
"string",
")",
"{",
"if",
"sub",
":=",
"c",
".",
"subs",
".",
"Fetch",
"(",
"topic",
",",
"partitio... |
6,128 | all-6129 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"BreakLocation",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger49",
"(",
"&",
"r... |
6,129 | all-6130 | [
"native",
"returns",
"a",
"pointer",
"to",
"the",
"underlying",
"GdkEvent",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"native",
"(",
")",
"*",
"C",
".",
"GdkEvent",
"{",
"if",
"v",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"return",
"v",
".",
"GdkEvent",
"\n",
"}"
] |
6,130 | all-6131 | [
"Cluster",
"only",
"keeps",
"the",
"major",
".",
"minor",
"."
] | [
"func",
"Cluster",
"(",
"v",
"string",
")",
"string",
"{",
"vs",
":=",
"strings",
".",
"Split",
"(",
"v",
",",
"\"",
"\"",
")",
"\n",
"if",
"len",
"(",
"vs",
")",
"<=",
"2",
"{",
"return",
"v",
"\n",
"}",
"\n",
"return",
"fmt",
".",
"Sprintf",
... |
6,131 | all-6132 | [
"Load",
"will",
"apply",
"the",
"Context",
"to",
"the",
"calling",
"process",
"makeing",
"any",
"secccomp",
"process",
"changes",
"apply",
"after",
"the",
"context",
"is",
"loaded",
"."
] | [
"func",
"(",
"c",
"*",
"Context",
")",
"Load",
"(",
")",
"error",
"{",
"<mask>",
",",
"err",
":=",
"c",
".",
"newFilter",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"if",
"err",
":=",
"prctl",
"(",
"prSetNo... |
6,132 | all-6133 | [
"error",
"terminates",
"processing",
"."
] | [
"func",
"(",
"p",
"*",
"<mask>",
")",
"error",
"(",
"err",
"error",
")",
"{",
"perr",
":=",
"&",
"ParseErr",
"{",
"Line",
":",
"p",
".",
"lex",
".",
"lineNumber",
"(",
")",
",",
"Pos",
":",
"p",
".",
"lex",
".",
"linePosition",
"(",
")",
",",
... |
6,133 | all-6134 | [
"Opens",
"a",
"GeoIP",
"database",
"by",
"filename",
"with",
"specified",
"GeoIPOptions",
"flag",
".",
"All",
"formats",
"supported",
"by",
"libgeoip",
"are",
"supported",
"though",
"there",
"are",
"only",
"functions",
"to",
"access",
"some",
"of",
"the",
"dat... | [
"func",
"OpenDb",
"(",
"<mask>",
"[",
"]",
"string",
",",
"flag",
"int",
")",
"(",
"*",
"GeoIP",
",",
"error",
")",
"{",
"if",
"len",
"(",
"files",
")",
"==",
"0",
"{",
"files",
"=",
"[",
"]",
"string",
"{",
"\"",
"\"",
",",
"// Linux default",
... |
6,134 | all-6135 | [
"querystring",
"implements",
"querystringer",
"to",
"represent",
"the",
"outgoing",
"video",
"file",
"."
] | [
"func",
"(",
"ov",
"*",
"OutgoingVideo",
")",
"querystring",
"(",
")",
"querystring",
"{",
"toReturn",
":=",
"<mask>",
"[",
"string",
"]",
"string",
"(",
"ov",
".",
"getBaseQueryString",
"(",
")",
")",
"\n\n",
"if",
"ov",
".",
"Caption",
"!=",
"\"",
"\... |
6,135 | all-6136 | [
"Next",
"returns",
"the",
"next",
"page",
"of",
"resources",
".",
"If",
"there",
"are",
"no",
"more",
"resources",
"NoMoreResults",
"is",
"returned",
"."
] | [
"func",
"(",
"c",
"*",
"conferencePageIterator",
")",
"Next",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"*",
"ConferencePage",
",",
"error",
")",
"{",
"cp",
":=",
"<mask>",
"(",
"ConferencePage",
")",
"\n",
"err",
":=",
"c",
".",
"p",
".",
"Ne... |
6,136 | all-6137 | [
"RemoveOldest",
"removes",
"the",
"oldest",
"item",
"from",
"the",
"cache",
"."
] | [
"func",
"(",
"c",
"*",
"LRU",
")",
"RemoveOldest",
"(",
")",
"(",
"key",
"string",
",",
"value",
"uint64",
",",
"<mask>",
"bool",
")",
"{",
"ent",
":=",
"c",
".",
"evictList",
".",
"Back",
"(",
")",
"\n",
"if",
"ent",
"!=",
"nil",
"{",
"c",
"."... |
6,137 | all-6138 | [
"AmazonRequest",
"is",
"an",
"example",
"to",
"benchmark",
"a",
"call",
"to",
"googles",
"homepage"
] | [
"func",
"AmazonRequest",
"(",
")",
"error",
"{",
"resp",
",",
"err",
":=",
"http",
".",
"Get",
"(",
"\"",
"\"",
")",
"\n",
"defer",
"func",
"(",
"response",
"*",
"http",
".",
"Response",
")",
"{",
"if",
"response",
"!=",
"nil",
"&&",
"<mask>",
".",... |
6,138 | all-6139 | [
"rawPayload",
"is",
"a",
"helper",
"function",
"that",
"creates",
"a",
"ActionParam",
"for",
"a",
"raw",
"(",
"non",
"object",
")",
"payload"
] | [
"func",
"rawPayload",
"(",
"typ",
"gen",
".",
"DataType",
",",
"p",
"interface",
"{",
"}",
")",
"*",
"<mask>",
".",
"ActionParam",
"{",
"var",
"required",
"bool",
"\n",
"if",
"req",
",",
"ok",
":=",
"p",
".",
"(",
"map",
"[",
"string",
"]",
"interf... |
6,139 | all-6140 | [
"GetId",
"returns",
"the",
"Id",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"e",
"*",
"Event",
")",
"GetId",
"(",
")",
"int",
"{",
"if",
"e",
"==",
"nil",
"||",
"e",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"0",
"\n",
"}",
"\n",
"return",
"*",
"e",
".",
"Id",
"\n",
"}"
] |
6,140 | all-6141 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"KeyframeStyle",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation8",
"(",
"&",
"r... |
6,141 | all-6142 | [
"/",
"*",
"//",
"Insert",
"writes",
"len",
"(",
"b",
")",
"bytes",
"at",
"the",
"start",
"of",
"the",
"named",
"file",
".",
"It",
"returns",
"an",
"error",
"if",
"any",
".",
"The",
"file",
"is",
"backed",
"up",
".",
"func",
"Insert",
"(",
"filename... | [
"func",
"Replace",
"(",
"<mask>",
"string",
",",
"r",
"[",
"]",
"Replacer",
")",
"error",
"{",
"e",
",",
"err",
":=",
"NewEdit",
"(",
"filename",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n\n",
"err",
"=",
"e",
".",
... |
6,142 | all-6143 | [
"fromKey",
"converts",
"toKey",
"back",
"into",
"its",
"parts"
] | [
"func",
"fromKey",
"(",
"key",
"string",
")",
"(",
"string",
",",
"string",
",",
"string",
",",
"error",
")",
"{",
"<mask>",
":=",
"strings",
".",
"Split",
"(",
"key",
",",
"\"",
"\"",
")",
"\n",
"if",
"len",
"(",
"parts",
")",
"!=",
"3",
"{",
... |
6,143 | all-6144 | [
"Actions",
"register",
"actions"
] | [
"func",
"(",
"bar",
"*",
"ActionBar",
")",
"Actions",
"(",
"<mask>",
"...",
"ActionInterface",
")",
"*",
"ActionBar",
"{",
"newBar",
":=",
"&",
"ActionBar",
"{",
"Admin",
":",
"bar",
".",
"Admin",
",",
"actions",
":",
"bar",
".",
"GlobalActions",
"}",
... |
6,144 | all-6145 | [
"AttachBuffer",
"attaches",
"a",
"binary",
"attachment",
"."
] | [
"func",
"(",
"m",
"*",
"Message",
")",
"AttachBuffer",
"(",
"filename",
"string",
",",
"buf",
"[",
"]",
"<mask>",
",",
"inline",
"bool",
")",
"error",
"{",
"m",
".",
"Attachments",
"[",
"filename",
"]",
"=",
"&",
"Attachment",
"{",
"Filename",
":",
"... |
6,145 | all-6146 | [
"Add",
"adds",
"a",
"key",
"-",
"value",
"pair",
"to",
"the",
"block",
".",
"If",
"doNotRestart",
"is",
"true",
"we",
"will",
"not",
"restart",
"even",
"if",
"b",
".",
"counter",
">",
"=",
"restartInterval",
"."
] | [
"func",
"(",
"b",
"*",
"Builder",
")",
"Add",
"(",
"key",
"[",
"]",
"byte",
",",
"value",
"y",
".",
"ValueStruct",
")",
"error",
"{",
"if",
"b",
".",
"counter",
">=",
"restartInterval",
"{",
"b",
".",
"finishBlock",
"(",
")",
"\n",
"// Start a new bl... |
6,146 | all-6147 | [
"setHeapPtr",
"records",
"that",
"the",
"memory",
"at",
"heap",
"address",
"a",
"contains",
"a",
"pointer",
"."
] | [
"func",
"(",
"p",
"*",
"Process",
")",
"setHeapPtr",
"(",
"a",
"core",
".",
"<mask>",
")",
"{",
"h",
":=",
"p",
".",
"allocHeapInfo",
"(",
"a",
")",
"\n",
"if",
"p",
".",
"proc",
".",
"PtrSize",
"(",
")",
"==",
"8",
"{",
"i",
":=",
"uint",
"(... |
6,147 | all-6148 | [
"GetWarningOk",
"returns",
"a",
"tuple",
"with",
"the",
"Warning",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"t",
"*",
"ThresholdCount",
")",
"GetWarningOk",
"(",
")",
"(",
"json",
".",
"Number",
",",
"bool",
")",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"Warning",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"<mask>",
"\n",
"}",
"\n",
... |
6,148 | all-6149 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetCategoriesReturns",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing6",
"(",
"&",
... |
6,149 | all-6150 | [
"Signal",
"sends",
"a",
"signal",
"to",
"the",
"expect",
"process"
] | [
"func",
"(",
"ep",
"*",
"ExpectProcess",
")",
"Signal",
"(",
"sig",
"<mask>",
".",
"Signal",
")",
"error",
"{",
"return",
"ep",
".",
"cmd",
".",
"Process",
".",
"Signal",
"(",
"sig",
")",
"\n",
"}"
] |
6,150 | all-6151 | [
"Do",
"executes",
"Input",
".",
"synthesizeTapGesture",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"SynthesizeTapGestureParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSynthesizeTapGesture",
",",
"p",
",",
"nil",
")",
"\n",
... |
6,151 | all-6152 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"KeyframeStyle",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation8",
"(",
"&",
"w",
",",
"v",
")",... |
6,152 | all-6153 | [
"multiKeyToProto",
"is",
"a",
"batch",
"version",
"of",
"keyToProto",
"."
] | [
"func",
"multiKeyToProto",
"(",
"appID",
"string",
",",
"key",
"[",
"]",
"*",
"Key",
")",
"[",
"]",
"*",
"pb",
".",
"Reference",
"{",
"ret",
":=",
"make",
"(",
"[",
"]",
"*",
"pb",
".",
"Reference",
",",
"len",
"(",
"key",
")",
")",
"\n",
"for"... |
6,153 | all-6154 | [
"Shutdown",
"is",
"a",
"sentinel",
"option",
"to",
"add",
"shutdown",
"listeners",
".",
"Any",
"shutdown",
"listener",
"can",
"have",
"a",
"type",
"of",
"func",
"()",
"func",
"()",
"error",
"or",
"func",
"(",
"context",
".",
"Context",
")",
"error",
"."
... | [
"func",
"Shutdown",
"(",
"shutdownFuncs",
"...",
"<mask>",
"{",
"}",
")",
"Option",
"{",
"return",
"func",
"(",
"s",
"*",
"Sentinel",
")",
"error",
"{",
"s",
".",
"Lock",
"(",
")",
"\n",
"defer",
"s",
".",
"Unlock",
"(",
")",
"\n\n",
"if",
"s",
"... |
6,154 | all-6155 | [
"Stability",
":",
"***",
"EXPERIMENTAL",
"***",
"Terminate",
"an",
"instance",
"in",
"a",
"specified",
"region",
"Required",
"scopes",
":",
"Any",
"of",
":",
"-",
"ec2",
"-",
"manager",
":",
"manage",
"-",
"instances",
":",
"<region",
">",
":",
"<instanceI... | [
"func",
"(",
"eC2Manager",
"*",
"EC2Manager",
")",
"TerminateInstance",
"(",
"region",
",",
"instanceId",
"string",
")",
"error",
"{",
"<mask>",
":=",
"tcclient",
".",
"Client",
"(",
"*",
"eC2Manager",
")",
"\n",
"_",
",",
"_",
",",
"err",
":=",
"(",
"... |
6,155 | all-6156 | [
"NewWrapResponseWriter",
"wraps",
"an",
"http",
".",
"ResponseWriter",
"returning",
"a",
"proxy",
"that",
"allows",
"you",
"to",
"hook",
"into",
"various",
"parts",
"of",
"the",
"response",
"process",
"."
] | [
"func",
"NewWrapResponseWriter",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"protoMajor",
"int",
")",
"WrapResponseWriter",
"{",
"_",
",",
"fl",
":=",
"w",
".",
"(",
"http",
".",
"Flusher",
")",
"\n\n",
"bw",
":=",
"basicWriter",
"{",
"ResponseWriter",
... |
6,156 | all-6157 | [
"update",
"modifies",
"the",
"priority",
"and",
"value",
"of",
"an",
"Item",
"in",
"the",
"queue",
"."
] | [
"func",
"(",
"pq",
"*",
"PriorityQueue",
")",
"update",
"(",
"item",
"*",
"Item",
",",
"value",
"string",
",",
"<mask>",
"int",
")",
"{",
"item",
".",
"value",
"=",
"value",
"\n",
"item",
".",
"priority",
"=",
"priority",
"\n",
"heap",
".",
"Fix",
... |
6,157 | all-6158 | [
"FindByName",
"implements",
"FindByName",
"method",
"of",
"PlatformService",
"interface"
] | [
"func",
"(",
"s",
"*",
"platformService",
")",
"FindByName",
"(",
"name",
"string",
")",
"(",
"*",
"appTypes",
".",
"Platform",
",",
"error",
")",
"{",
"p",
",",
"err",
":=",
"s",
".",
"storage",
".",
"FindByName",
"(",
"<mask>",
")",
"\n",
"if",
"... |
6,158 | all-6159 | [
"Remove",
"an",
"entry",
"from",
"the",
"hosts",
"file",
"."
] | [
"func",
"(",
"h",
"*",
"Hosts",
")",
"Remove",
"(",
"ip",
"string",
",",
"hosts",
"...",
"string",
")",
"error",
"{",
"var",
"outputLines",
"[",
"]",
"HostsLine",
"\n\n",
"if",
"<mask>",
".",
"ParseIP",
"(",
"ip",
")",
"==",
"nil",
"{",
"return",
"... |
6,159 | all-6160 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"CaptureSnapshotParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage78",
"(",
"&",
"w",
",",
"v",
")... |
6,160 | all-6161 | [
"Parse",
"parses",
"the",
"command",
"line",
"arguments",
"including",
"the",
"global",
"flags",
"and",
"if",
"any",
"the",
"cmdflag",
"and",
"its",
"flags",
".",
"If",
"the",
"VersionBoolFlag",
"is",
"defined",
"as",
"a",
"global",
"boolean",
"flag",
"then"... | [
"func",
"Parse",
"(",
")",
"error",
"{",
"args",
":=",
"os",
".",
"Args",
"\n",
"if",
"len",
"(",
"args",
")",
"==",
"1",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"// Global flags.",
"fset",
":=",
"flag",
".",
"CommandLine",
"\n",
"fset",
".",
"Usa... |
6,161 | all-6162 | [
"LinkByName",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockNetLink",
")",
"LinkByName",
"(",
"arg0",
"string",
")",
"(",
"netlink",
".",
"Link",
",",
"error",
")",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
",",
"arg0",
")",
"\n",
"ret0",
","... |
6,162 | all-6163 | [
"CreateContainerBackup",
"requests",
"that",
"LXD",
"creates",
"a",
"new",
"backup",
"for",
"the",
"container"
] | [
"func",
"(",
"r",
"*",
"ProtocolLXD",
")",
"CreateContainerBackup",
"(",
"containerName",
"string",
",",
"backup",
"api",
".",
"ContainerBackupsPost",
")",
"(",
"Operation",
",",
"error",
")",
"{",
"if",
"!",
"r",
".",
"HasExtension",
"(",
"\"",
"\"",
")",... |
6,163 | all-6164 | [
"GetMetadata",
"gets",
"metadata",
"of",
"an",
"object",
"store",
".",
"See",
":",
"https",
":",
"//",
"chromedevtools",
".",
"github",
".",
"io",
"/",
"devtools",
"-",
"protocol",
"/",
"tot",
"/",
"IndexedDB#method",
"-",
"getMetadata",
"parameters",
":",
... | [
"func",
"GetMetadata",
"(",
"securityOrigin",
"string",
",",
"databaseName",
"<mask>",
",",
"objectStoreName",
"string",
")",
"*",
"GetMetadataParams",
"{",
"return",
"&",
"GetMetadataParams",
"{",
"SecurityOrigin",
":",
"securityOrigin",
",",
"DatabaseName",
":",
"... |
6,164 | all-6165 | [
"Close",
"backend",
"stack",
"file",
".",
"If",
"access",
"is",
"requried",
"file",
"will",
"automatically",
"reopened"
] | [
"func",
"(",
"s",
"*",
"Stack",
")",
"Close",
"(",
")",
"error",
"{",
"s",
".",
"<mask>",
".",
"Lock",
"(",
")",
"\n",
"defer",
"s",
".",
"guard",
".",
"Unlock",
"(",
")",
"\n",
"if",
"s",
".",
"file",
"!=",
"nil",
"{",
"err",
":=",
"s",
".... |
6,165 | all-6166 | [
"Retry",
"on",
"transport",
"failures",
".",
"Does",
"not",
"retry",
"on",
"500s",
"."
] | [
"func",
"(",
"c",
"*",
"dryRunProwJobClient",
")",
"requestRetry",
"(",
"path",
"string",
",",
"query",
"map",
"[",
"string",
"]",
"string",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"c",
".",
"retry",
"(",
"path... |
6,166 | all-6167 | [
"StringWithinTransport",
"returns",
"a",
"string",
"representation",
"of",
"the",
"reference",
"which",
"MUST",
"be",
"such",
"that",
"reference",
".",
"Transport",
"()",
".",
"ParseReference",
"(",
"reference",
".",
"StringWithinTransport",
"()",
")",
"returns",
... | [
"func",
"(",
"<mask>",
"daemonReference",
")",
"StringWithinTransport",
"(",
")",
"string",
"{",
"switch",
"{",
"case",
"ref",
".",
"id",
"!=",
"\"",
"\"",
":",
"return",
"ref",
".",
"id",
".",
"String",
"(",
")",
"\n",
"case",
"ref",
".",
"ref",
"!=... |
6,167 | all-6168 | [
"Reset",
"clears",
"uri",
"."
] | [
"func",
"(",
"u",
"*",
"URI",
")",
"Reset",
"(",
")",
"{",
"u",
".",
"pathOriginal",
"=",
"u",
".",
"pathOriginal",
"[",
":",
"0",
"]",
"\n",
"u",
".",
"scheme",
"=",
"u",
".",
"scheme",
"[",
":",
"0",
"]",
"\n",
"u",
".",
"path",
"=",
"u",... |
6,168 | all-6169 | [
"Access",
"returns",
"a",
"handler",
"that",
"writes",
"an",
"access",
"log",
"message",
"to",
"the",
"provided",
"logger",
"provided",
"by",
"the",
"options",
"whenever",
"the",
"handler",
"h",
"is",
"invoked",
".",
"The",
"log",
"message",
"is",
"of",
"t... | [
"func",
"Access",
"(",
"h",
"http",
".",
"Handler",
",",
"opts",
"...",
"Option",
")",
"http",
".",
"Handler",
"{",
"o",
":=",
"options",
"{",
"logger",
":",
"handler",
".",
"OutLogger",
"(",
")",
",",
"dateFormat",
":",
"AccessDateFormat",
"}",
"\n",
... |
6,169 | all-6170 | [
"Set",
"is",
"a",
"wrapper",
"around",
"gtk_alignment_set",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Alignment",
")",
"<mask>",
"(",
"xalign",
",",
"yalign",
",",
"xscale",
",",
"yscale",
"float32",
")",
"{",
"C",
".",
"gtk_alignment_set",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"gfloat",
"(",
"xalign",
")",
",",
... |
6,170 | all-6171 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"EventConsoleProfileStarted",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler22",
"(",
... |
6,171 | all-6172 | [
"AddHostComment",
"creates",
"a",
"new",
"ADD_HOST_COMMENT",
"Nagios",
"command",
".",
"Adds",
"a",
"comment",
"to",
"a",
"particular",
"host",
".",
"If",
"the",
"persistent",
"field",
"is",
"set",
"to",
"zero",
"(",
"0",
")",
"the",
"comment",
"will",
"be... | [
"func",
"AddHostComment",
"(",
"host_name",
"string",
",",
"persistent",
"bool",
",",
"author",
"string",
",",
"<mask>",
"string",
",",
")",
"*",
"livestatus",
".",
"Command",
"{",
"return",
"livestatus",
".",
"NewCommand",
"(",
"\"",
"\"",
",",
"stringifyAr... |
6,172 | all-6173 | [
"NB",
":",
"path",
"is",
"assumed",
"to",
"be",
"in",
"native",
"-",
"OS",
"path",
"separator",
"form"
] | [
"func",
"dirURL",
"(",
"path",
"string",
")",
"*",
"url",
".",
"URL",
"{",
"path",
"=",
"filepath",
".",
"ToSlash",
"(",
"path",
")",
"\n",
"if",
"<mask>",
"[",
"len",
"(",
"path",
")",
"-",
"1",
"]",
"!=",
"'/'",
"{",
"// trailing slash is important... |
6,173 | all-6174 | [
"/",
"*",
"Notify",
"is",
"used",
"to",
"send",
"native",
"push",
"notifications",
"via",
"Apple",
"APNS",
"or",
"Google",
"GCM",
"/",
"FCM",
"systems",
".",
"Please",
"make",
"sure",
"that",
"you",
"have",
"provided",
"a",
"Client",
".",
"PushNotification... | [
"func",
"(",
"c",
"*",
"Client",
")",
"Notify",
"(",
"interests",
"[",
"]",
"string",
",",
"pushNotification",
"PushNotification",
")",
"(",
"*",
"NotifyResponse",
",",
"error",
")",
"{",
"pNRequest",
":=",
"notificationRequest",
"{",
"interests",
",",
"&",
... |
6,174 | all-6175 | [
"ConsumeMessages",
"reads",
"messages",
"from",
"the",
"websocket",
"connection",
"and",
"handles",
"read",
"messages",
"from",
"an",
"active",
"connection",
"."
] | [
"func",
"(",
"cs",
"*",
"ClientServerImpl",
")",
"ConsumeMessages",
"(",
")",
"error",
"{",
"for",
"{",
"if",
"err",
":=",
"cs",
".",
"SetReadDeadline",
"(",
"<mask>",
".",
"Now",
"(",
")",
".",
"Add",
"(",
"cs",
".",
"RWTimeout",
")",
")",
";",
"e... |
6,175 | all-6176 | [
"DeleteNode",
"an",
"item",
"from",
"the",
"skiplist",
"by",
"specifying",
"its",
"node"
] | [
"func",
"(",
"s",
"*",
"Skiplist",
")",
"DeleteNode",
"(",
"n",
"*",
"Node",
",",
"cmp",
"CompareFn",
",",
"buf",
"*",
"ActionBuffer",
",",
"sts",
"*",
"Stats",
")",
"bool",
"{",
"<mask>",
":=",
"s",
".",
"barrier",
".",
"Acquire",
"(",
")",
"\n",
... |
6,176 | all-6177 | [
"Resign",
"lets",
"a",
"leader",
"start",
"a",
"new",
"election",
"."
] | [
"func",
"(",
"e",
"*",
"Election",
")",
"Resign",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"if",
"e",
".",
"leaderSession",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"client",
":=",
"e",
".",
"session",
... |
6,177 | all-6178 | [
"tagsToWhere",
"creates",
"a",
"where",
"query",
"to",
"match",
"tags",
"element"
] | [
"func",
"tagsToWhere",
"(",
"tags",
"map",
"[",
"string",
"]",
"string",
")",
"string",
"{",
"if",
"len",
"(",
"tags",
")",
"==",
"0",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n\n",
"sortedKeys",
":=",
"[",
"]",
"string",
"{",
"}",
"\n",
"for",
"k... |
6,178 | all-6179 | [
"DescribeEntry",
"returns",
"a",
"concise",
"human",
"-",
"readable",
"description",
"of",
"an",
"Entry",
"for",
"debugging",
"."
] | [
"func",
"DescribeEntry",
"(",
"e",
"pb",
".",
"Entry",
",",
"f",
"EntryFormatter",
")",
"string",
"{",
"var",
"formatted",
"string",
"\n",
"if",
"e",
".",
"Type",
"==",
"pb",
".",
"EntryNormal",
"&&",
"f",
"!=",
"nil",
"{",
"formatted",
"=",
"f",
"("... |
6,179 | all-6180 | [
"indicate",
"modifications",
"to",
"a",
"range",
"of",
"a",
"mapped",
"buffer"
] | [
"func",
"FlushMappedBufferRange",
"(",
"target",
"uint32",
",",
"<mask>",
"int",
",",
"length",
"int",
")",
"{",
"C",
".",
"glowFlushMappedBufferRange",
"(",
"gpFlushMappedBufferRange",
",",
"(",
"C",
".",
"GLenum",
")",
"(",
"target",
")",
",",
"(",
"C",
... |
6,180 | all-6181 | [
"writeString",
"adds",
"a",
"string",
"to",
"the",
"string",
"being",
"printed",
"."
] | [
"func",
"(",
"ps",
"*",
"printState",
")",
"writeString",
"(",
"s",
"string",
")",
"{",
"if",
"len",
"(",
"s",
")",
">",
"0",
"{",
"ps",
".",
"<mask>",
"=",
"s",
"[",
"len",
"(",
"s",
")",
"-",
"1",
"]",
"\n",
"}",
"\n",
"ps",
".",
"buf",
... |
6,181 | all-6182 | [
"delete",
"does",
"a",
"recursive",
"deletion"
] | [
"func",
"(",
"t",
"*",
"Tree",
")",
"deletePrefix",
"(",
"parent",
",",
"n",
"*",
"node",
",",
"prefix",
"string",
")",
"int",
"{",
"// Check for key exhaustion",
"if",
"len",
"(",
"prefix",
")",
"==",
"0",
"{",
"// Remove the leaf node",
"subTreeSize",
":... |
6,182 | all-6183 | [
"Criticalf",
"is",
"a",
"shorthand",
"function",
"which",
"exits",
"the",
"check",
"with",
"status",
"CRITICAL",
"and",
"the",
"message",
"provided",
"."
] | [
"func",
"(",
"c",
"*",
"Check",
")",
"Criticalf",
"(",
"<mask>",
"string",
",",
"v",
"...",
"interface",
"{",
"}",
")",
"{",
"c",
".",
"Exitf",
"(",
"CRITICAL",
",",
"format",
",",
"v",
"...",
")",
"\n",
"}"
] |
6,183 | all-6184 | [
"specify",
"a",
"parameter",
"for",
"a",
"program",
"object"
] | [
"func",
"ProgramParameteri",
"(",
"program",
"uint32",
",",
"pname",
"uint32",
",",
"value",
"int32",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpProgramParameteri",
",",
"3",
",",
"uintptr",
"(",
"program",
")",
",",
"uintptr",
"(",
"pname",
")",
",",
... |
6,184 | all-6185 | [
"NameOrID",
"is",
"a",
"convenience",
"method",
"mainly",
"for",
"helping",
"displaying",
"friendly",
"errors",
"where",
"space",
"is",
"important",
"-",
"it",
"displays",
"either",
"the",
"host",
"name",
"or",
"the",
"ID",
"if",
"there",
"was",
"an",
"error... | [
"func",
"NameOrID",
"(",
"client",
"*",
"govmomi",
".",
"Client",
",",
"<mask>",
"string",
")",
"string",
"{",
"name",
",",
"err",
":=",
"hostSystemNameFromID",
"(",
"client",
",",
"id",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"id",
"\n",
... |
6,185 | all-6186 | [
"Terminology",
"from",
"RFC",
"2047",
":",
"encoded",
"-",
"word",
":",
"the",
"entire",
"=",
"?charset?encoding?encoded",
"-",
"text?",
"=",
"string",
"charset",
":",
"the",
"character",
"set",
"portion",
"of",
"the",
"encoded",
"word",
"encoding",
":",
"th... | [
"func",
"readHeader",
"(",
"r",
"*",
"bufio",
".",
"Reader",
",",
"p",
"*",
"Part",
")",
"(",
"textproto",
".",
"MIMEHeader",
",",
"error",
")",
"{",
"// buf holds the massaged output for textproto.Reader.ReadMIMEHeader()",
"buf",
":=",
"&",
"bytes",
".",
"Buffe... |
6,186 | all-6187 | [
"DeleteInstance",
"deletes",
"the",
"service",
"instance",
"from",
"the",
"database",
"."
] | [
"func",
"DeleteInstance",
"(",
"si",
"*",
"ServiceInstance",
",",
"evt",
"*",
"event",
".",
"Event",
",",
"requestID",
"string",
")",
"error",
"{",
"if",
"len",
"(",
"si",
".",
"Apps",
")",
">",
"0",
"{",
"return",
"ErrServiceInstanceBound",
"\n",
"}",
... |
6,187 | all-6188 | [
"EvaluateOnCallFrame",
"evaluates",
"expression",
"on",
"a",
"given",
"call",
"frame",
".",
"See",
":",
"https",
":",
"//",
"chromedevtools",
".",
"github",
".",
"io",
"/",
"devtools",
"-",
"protocol",
"/",
"tot",
"/",
"Debugger#method",
"-",
"evaluateOnCallFr... | [
"func",
"EvaluateOnCallFrame",
"(",
"callFrameID",
"CallFrameID",
",",
"expression",
"string",
")",
"*",
"EvaluateOnCallFrameParams",
"{",
"return",
"&",
"EvaluateOnCallFrameParams",
"{",
"CallFrameID",
":",
"callFrameID",
",",
"Expression",
":",
"<mask>",
",",
"}",
... |
6,188 | all-6189 | [
"Giving",
"a",
"value",
"an",
"index",
"and",
"the",
"key",
"of",
"the",
"item",
"return",
"the",
"path",
"under",
"which",
"the",
"new",
"index",
"item",
"should",
"be",
"stored",
"."
] | [
"func",
"(",
"c",
"*",
"readWriteCollection",
")",
"getIndexPath",
"(",
"val",
"interface",
"{",
"}",
",",
"index",
"*",
"Index",
",",
"<mask>",
"string",
")",
"string",
"{",
"reflVal",
":=",
"reflect",
".",
"ValueOf",
"(",
"val",
")",
"\n",
"field",
"... |
6,189 | all-6190 | [
"Claims",
"unmarshall",
"the",
"claims",
"of",
"the",
"provided",
"token"
] | [
"func",
"(",
"v",
"*",
"JWTValidator",
")",
"Claims",
"(",
"r",
"*",
"http",
".",
"Request",
",",
"token",
"*",
"jwt",
".",
"JSONWebToken",
",",
"values",
"...",
"interface",
"{",
"}",
")",
"error",
"{",
"key",
",",
"err",
":=",
"v",
".",
"config",... |
6,190 | all-6191 | [
"Replaces",
"the",
"source",
"code",
"in",
"a",
"shader",
"object"
] | [
"func",
"ShaderSource",
"(",
"shader",
"uint32",
",",
"<mask>",
"int32",
",",
"xstring",
"*",
"*",
"uint8",
",",
"length",
"*",
"int32",
")",
"{",
"C",
".",
"glowShaderSource",
"(",
"gpShaderSource",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"shader",
")... |
6,191 | all-6192 | [
"export",
"FileSequence_ZFill"
] | [
"func",
"FileSequence_ZFill",
"(",
"<mask>",
"FileSeqId",
")",
"C",
".",
"int",
"{",
"fs",
",",
"ok",
":=",
"sFileSeqs",
".",
"Get",
"(",
"id",
")",
"\n",
"if",
"!",
"ok",
"{",
"return",
"0",
"\n",
"}",
"\n",
"return",
"C",
".",
"int",
"(",
"fs",... |
6,192 | all-6193 | [
"MkTemp",
"creates",
"a",
"temporary",
"file",
"in",
"the",
"guest",
"operating",
"system",
".",
"The",
"user",
"is",
"responsible",
"for",
"removing",
"the",
"file",
"when",
"it",
"is",
"no",
"longer",
"needed",
".",
"Since",
"VMware",
"Workstation",
"6",
... | [
"func",
"(",
"g",
"*",
"Guest",
")",
"MkTemp",
"(",
")",
"(",
"string",
",",
"error",
")",
"{",
"var",
"jobHandle",
"C",
".",
"VixHandle",
"=",
"C",
".",
"VIX_INVALID_HANDLE",
"\n",
"var",
"err",
"C",
".",
"VixError",
"=",
"C",
".",
"VIX_OK",
"\n",... |
6,193 | all-6194 | [
"Rules",
"returns",
"the",
"security",
"rules",
"for",
"the",
"database",
"."
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"Rules",
"(",
"params",
"<mask>",
"[",
"string",
"]",
"string",
")",
"(",
"Rules",
",",
"error",
")",
"{",
"res",
",",
"err",
":=",
"c",
".",
"api",
".",
"Call",
"(",
"\"",
"\"",
",",
"c",
".",
"Url",
"+"... |
6,194 | all-6195 | [
"Logf",
"writes",
"std",
"log",
"event",
"with",
"format"
] | [
"func",
"Logf",
"(",
"format",
"string",
",",
"val",
"...",
"<mask>",
"{",
"}",
")",
"error",
"{",
"return",
"glg",
".",
"out",
"(",
"LOG",
",",
"format",
",",
"val",
"...",
")",
"\n",
"}"
] |
6,195 | all-6196 | [
"BetweenF",
"is",
"the",
"filter",
"form",
"for",
"Between",
"."
] | [
"func",
"BetweenF",
"(",
"left",
",",
"right",
"string",
")",
"func",
"(",
"string",
")",
"string",
"{",
"return",
"func",
"(",
"s",
"string",
")",
"string",
"{",
"return",
"Between",
"(",
"s",
",",
"left",
",",
"<mask>",
")",
"\n",
"}",
"\n",
"}"
... |
6,196 | all-6197 | [
"ChunkReader",
"splits",
"a",
"reader",
"into",
"reasonably",
"sized",
"chunks",
"for",
"the",
"purpose",
"of",
"transmitting",
"the",
"chunks",
"over",
"gRPC",
".",
"For",
"each",
"chunk",
"it",
"calls",
"the",
"given",
"function",
"."
] | [
"func",
"ChunkReader",
"(",
"r",
"<mask>",
".",
"Reader",
",",
"f",
"func",
"(",
"[",
"]",
"byte",
")",
"error",
")",
"(",
"int",
",",
"error",
")",
"{",
"var",
"total",
"int",
"\n",
"buf",
":=",
"GetBuffer",
"(",
")",
"\n",
"defer",
"PutBuffer",
... |
6,197 | all-6198 | [
"GetServiceKey",
"returns",
"the",
"ServiceKey",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"s",
"*",
"ServicePDRequest",
")",
"GetServiceKey",
"(",
")",
"<mask>",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"ServiceKey",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"s",
".",
"ServiceKey",
"\n",
"}... |
6,198 | all-6199 | [
"GetMinFailureDuration",
"returns",
"the",
"MinFailureDuration",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"s",
"*",
"SyntheticsOptions",
")",
"GetMinFailureDuration",
"(",
")",
"int",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"MinFailureDuration",
"==",
"nil",
"{",
"<mask>",
"0",
"\n",
"}",
"\n",
"return",
"*",
"s",
".",
"MinFailureDuration",... |
6,199 | all-6200 | [
"const",
"PangoFontDescription",
"*",
"pango_layout_get_font_description",
"(",
"PangoLayout",
"*",
"layout",
")",
";"
] | [
"func",
"(",
"v",
"*",
"Layout",
")",
"GetFontDescription",
"(",
")",
"*",
"FontDescription",
"{",
"c",
":=",
"C",
".",
"pango_layout_get_font_description",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n\n",
"desc",
":=",
"<mask>",
"(",
"FontDescription",
")"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.