id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
5,100 | all-5101 | [
"setDefaultValue",
"is",
"used",
"to",
"install",
"a",
"default",
"value",
"from",
"a",
"tag",
"string",
"into",
"a",
"Value",
".",
"It",
"is",
"successful",
"if",
"the",
"field",
"was",
"optional",
"even",
"if",
"a",
"default",
"value",
"wasn",
"t",
"pr... | [
"func",
"setDefaultValue",
"(",
"v",
"reflect",
".",
"Value",
",",
"params",
"fieldParameters",
")",
"(",
"ok",
"bool",
")",
"{",
"if",
"!",
"params",
".",
"optional",
"{",
"return",
"\n",
"}",
"\n",
"<mask>",
"=",
"true",
"\n",
"if",
"params",
".",
... |
5,101 | all-5102 | [
"mergeExprs",
"combines",
"information",
"from",
"src",
"and",
"dst",
"and",
"returns",
"a",
"merged",
"expression",
".",
"dst",
"may",
"be",
"modified",
"during",
"this",
"process",
".",
"The",
"returned",
"expression",
"may",
"be",
"different",
"from",
"dst"... | [
"func",
"mergeExprs",
"(",
"src",
",",
"dst",
"bzl",
".",
"Expr",
")",
"(",
"bzl",
".",
"Expr",
",",
"error",
")",
"{",
"if",
"ShouldKeep",
"(",
"dst",
")",
"{",
"return",
"nil",
",",
"nil",
"\n",
"}",
"\n",
"if",
"src",
"==",
"nil",
"&&",
"(",... |
5,102 | all-5103 | [
"Resolver",
"returns",
"a",
"resolver",
"for",
"the",
"given",
"rule",
"and",
"package",
"and",
"a",
"bool",
"indicating",
"whether",
"one",
"was",
"found",
".",
"Empty",
"string",
"may",
"be",
"passed",
"for",
"pkgRel",
"which",
"results",
"in",
"consulting... | [
"func",
"(",
"mr",
"metaResolver",
")",
"Resolver",
"(",
"r",
"*",
"rule",
".",
"Rule",
",",
"pkgRel",
"string",
")",
"resolve",
".",
"Resolver",
"{",
"for",
"_",
",",
"mappedKind",
":=",
"<mask>",
"mr",
".",
"mappedKinds",
"[",
"pkgRel",
"]",
"{",
"... |
5,103 | all-5104 | [
"SetLineCap",
"sets",
"the",
"line",
"cap",
"(",
"round",
"but",
"or",
"square",
")"
] | [
"func",
"(",
"gc",
"*",
"GraphicContext",
")",
"SetLineCap",
"(",
"Cap",
"draw2d",
".",
"LineCap",
")",
"{",
"gc",
".",
"StackGraphicContext",
".",
"SetLineCap",
"(",
"Cap",
")",
"\n",
"gc",
".",
"pdf",
".",
"SetLineCapStyle",
"(",
"<mask>",
"[",
"Cap",
... |
5,104 | all-5105 | [
"dependingImages",
"returns",
"all",
"images",
"that",
"is",
"depended",
"by",
"the",
"image",
"."
] | [
"func",
"(",
"i",
"*",
"Image",
")",
"dependingImages",
"(",
")",
"map",
"[",
"*",
"Image",
"]",
"struct",
"{",
"}",
"{",
"r",
":=",
"map",
"[",
"*",
"Image",
"]",
"struct",
"{",
"}",
"{",
"}",
"\n",
"for",
"_",
",",
"c",
":=",
"range",
"i",
... |
5,105 | all-5106 | [
"UnbindUnit",
"is",
"a",
"no",
"-",
"op",
"for",
"OSB",
"API",
"implementations"
] | [
"func",
"(",
"b",
"*",
"brokerClient",
")",
"UnbindUnit",
"(",
"instance",
"*",
"ServiceInstance",
",",
"app",
"<mask>",
".",
"App",
",",
"unit",
"bind",
".",
"Unit",
")",
"error",
"{",
"return",
"nil",
"\n",
"}"
] |
5,106 | all-5107 | [
"GetReliefStyle",
"is",
"a",
"wrapper",
"around",
"gtk_toolbar_get_relief_style",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Toolbar",
")",
"GetReliefStyle",
"(",
")",
"ReliefStyle",
"{",
"c",
":=",
"C",
".",
"gtk_toolbar_get_relief_style",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"<mask>",
"ReliefStyle",
"(",
"c",
")",
"\n",
"}"
] |
5,107 | all-5108 | [
"NewMultiplex",
"creates",
"a",
"new",
"multiplexer",
"session",
"."
] | [
"func",
"NewMultiplex",
"(",
"con",
"net",
".",
"Conn",
",",
"initiator",
"bool",
")",
"*",
"Multiplex",
"{",
"mp",
":=",
"&",
"Multiplex",
"{",
"con",
":",
"con",
",",
"initiator",
":",
"initiator",
",",
"buf",
":",
"bufio",
".",
"NewReader",
"(",
"... |
5,108 | all-5109 | [
"ShowAPIActions",
"displays",
"the",
"command",
"hrefs",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"ShowAPIActions",
"(",
"cmd",
"string",
")",
"<mask>",
"{",
"return",
"a",
".",
"ShowActions",
"(",
"cmd",
",",
"\"",
"\"",
",",
"commandValues",
")",
"\n",
"}"
] |
5,109 | all-5110 | [
"SetRules",
"overwrites",
"the",
"existing",
"security",
"rules",
"with",
"the",
"new",
"rules",
"given",
"."
] | [
"func",
"(",
"c",
"*",
"<mask>",
")",
"SetRules",
"(",
"rules",
"*",
"Rules",
",",
"params",
"map",
"[",
"string",
"]",
"string",
")",
"error",
"{",
"body",
",",
"err",
":=",
"json",
".",
"Marshal",
"(",
"rules",
")",
"\n",
"if",
"err",
"!=",
"ni... |
5,110 | all-5111 | [
"Port",
"returns",
"the",
"actual",
"port",
"the",
"server",
"listens",
"to"
] | [
"func",
"(",
"s",
"*",
"Server",
")",
"Port",
"(",
")",
"string",
"{",
"hostPortSplit",
":=",
"strings",
".",
"Split",
"(",
"s",
".",
"HostPort",
",",
"\"",
"\"",
")",
"\n",
"<mask>",
":=",
"hostPortSplit",
"[",
"len",
"(",
"hostPortSplit",
")",
"-",... |
5,111 | all-5112 | [
"SetInstance",
"is",
"a",
"wrapper",
"around",
"g_value_set_instance",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Value",
")",
"SetInstance",
"(",
"<mask>",
"uintptr",
")",
"{",
"C",
".",
"g_value_set_instance",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"gpointer",
"(",
"instance",
")",
")",
"\n",
"}"
] |
5,112 | all-5113 | [
"MkdirAll",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockFileSystem",
")",
"MkdirAll",
"(",
"arg0",
"string",
",",
"arg1",
"os",
".",
"FileMode",
")",
"error",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
",",
"arg0",
",",
"arg1",
")",
"\n",
... |
5,113 | all-5114 | [
"newChange",
"returns",
"a",
"Change",
"of",
"the",
"given",
"record",
"by",
"the",
"given",
"action",
"e",
".",
"g",
".",
"action",
"=",
"ChangeActionCreate",
"returns",
"a",
"change",
"for",
"creation",
"of",
"the",
"record",
"and",
"action",
"=",
"Chang... | [
"func",
"(",
"p",
"*",
"AWSProvider",
")",
"newChange",
"(",
"action",
"string",
",",
"endpoint",
"*",
"endpoint",
".",
"Endpoint",
",",
"recordsCache",
"[",
"]",
"*",
"endpoint",
".",
"Endpoint",
",",
"zones",
"map",
"[",
"string",
"]",
"*",
"route53",
... |
5,114 | all-5115 | [
"GetId",
"returns",
"the",
"Id",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"m",
"*",
"Monitor",
")",
"GetId",
"(",
")",
"int",
"{",
"if",
"m",
"==",
"nil",
"||",
"m",
".",
"Id",
"==",
"nil",
"{",
"return",
"0",
"\n",
"}",
"\n",
"return",
"*",
"m",
".",
"<mask>",
"\n",
"}"
] |
5,115 | all-5116 | [
"CompileResult",
"compiles",
"the",
"parsed",
"result",
"to",
"the",
"template",
".",
"Template",
"."
] | [
"func",
"CompileResult",
"(",
"name",
"string",
",",
"rslt",
"*",
"result",
",",
"opts",
"*",
"Options",
")",
"(",
"*",
"template",
".",
"Template",
",",
"error",
")",
"{",
"// Initialize the options.",
"opts",
"=",
"InitializeOptions",
"(",
"opts",
")",
"... |
5,116 | all-5117 | [
"ExtendsServicePrefix",
"returns",
"a",
"package",
"selector",
"(",
"if",
"any",
")",
"for",
"the",
"extended",
"service",
"."
] | [
"func",
"(",
"s",
"*",
"Service",
")",
"ExtendsServicePrefix",
"(",
")",
"string",
"{",
"if",
"dotIndex",
":=",
"strings",
".",
"<mask>",
"(",
"s",
".",
"Extends",
",",
"\"",
"\"",
")",
";",
"dotIndex",
">",
"0",
"{",
"return",
"s",
".",
"ExtendsPref... |
5,117 | all-5118 | [
"NewDriver",
"creates",
"a",
"new",
"VirtualBox",
"driver",
"with",
"default",
"settings",
"."
] | [
"func",
"NewDriver",
"(",
"hostName",
",",
"storePath",
"<mask>",
")",
"*",
"Driver",
"{",
"return",
"&",
"Driver",
"{",
"VBoxManager",
":",
"NewVBoxManager",
"(",
")",
",",
"b2dUpdater",
":",
"NewB2DUpdater",
"(",
")",
",",
"sshKeyGenerator",
":",
"NewSSHKe... |
5,118 | all-5119 | [
"DeactivateControls",
"makes",
"all",
"children",
"of",
"parent",
"inactive"
] | [
"func",
"DeactivateControls",
"(",
"parent",
"Control",
")",
"{",
"for",
"_",
",",
"ctrl",
":=",
"<mask>",
"parent",
".",
"Children",
"(",
")",
"{",
"if",
"ctrl",
".",
"Active",
"(",
")",
"{",
"ctrl",
".",
"SetActive",
"(",
"false",
")",
"\n",
"ctrl"... |
5,119 | all-5120 | [
"Find",
"a",
"router",
"with",
"the",
"specific",
"path",
"and",
"return",
"it",
"."
] | [
"func",
"(",
"rs",
"*",
"Routers",
")",
"Find",
"(",
"path",
"string",
")",
"(",
"url",
".",
"Values",
",",
"HandlerFunc",
",",
"view",
".",
"View",
")",
"{",
"defer",
"<mask>",
".",
"RUnlock",
"(",
")",
"\n",
"rs",
".",
"RLock",
"(",
")",
"\n",
... |
5,120 | all-5121 | [
"UnmarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Unmarshaler",
"."
] | [
"func",
"(",
"t",
"*",
"TimeSinceEpoch",
")",
"UnmarshalEasyJSON",
"(",
"in",
"*",
"jlexer",
".",
"Lexer",
")",
"{",
"*",
"t",
"=",
"TimeSinceEpoch",
"(",
"time",
".",
"Unix",
"(",
"0",
",",
"int64",
"(",
"in",
".",
"Float64",
"(",
")",
"*",
"float... |
5,121 | all-5122 | [
"resourceVSphereDRSVMOverrideObjects",
"handles",
"the",
"fetching",
"of",
"the",
"cluster",
"and",
"virtual",
"machine",
"depending",
"on",
"what",
"attributes",
"are",
"available",
":",
"*",
"If",
"the",
"resource",
"ID",
"is",
"available",
"the",
"data",
"is",
... | [
"func",
"resourceVSphereDRSVMOverrideObjects",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"meta",
"interface",
"{",
"}",
",",
")",
"(",
"*",
"<mask>",
".",
"ClusterComputeResource",
",",
"*",
"object",
".",
"VirtualMachine",
",",
"error",
")",
"{",
"... |
5,122 | all-5123 | [
"SetDriverVersion",
"is",
"a",
"setter",
"for",
"nvidia",
"driver",
"version"
] | [
"func",
"(",
"n",
"*",
"NvidiaGPUManager",
")",
"SetDriverVersion",
"(",
"version",
"string",
")",
"{",
"n",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"n",
".",
"<mask>",
".",
"Unlock",
"(",
")",
"\n",
"n",
".",
"DriverVersion",
"=",
"versio... |
5,123 | all-5124 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"EventDetachedFromTarget",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget18",
"(",
"... |
5,124 | all-5125 | [
"SetMetaDataLabel",
"sets",
"an",
"annotation",
"value"
] | [
"func",
"SetMetaDataLabel",
"(",
"obj",
"metav1",
".",
"Object",
",",
"key",
",",
"value",
"string",
")",
"{",
"l",
":=",
"obj",
".",
"GetLabels",
"(",
")",
"\n",
"if",
"l",
"==",
"nil",
"{",
"l",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"str... |
5,125 | all-5126 | [
"SetSizeRequest",
"is",
"a",
"wrapper",
"around",
"gtk_widget_set_size_request",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Widget",
")",
"SetSizeRequest",
"(",
"width",
",",
"height",
"int",
")",
"{",
"C",
".",
"gtk_widget_set_size_request",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"gint",
"(",
"<mask>",
")",
",",
"C",
".",
"gint",
"(",... |
5,126 | all-5127 | [
"start",
"but",
"do",
"not",
"wait",
"for",
"it",
"to",
"complete"
] | [
"func",
"(",
"srv",
"*",
"Server",
")",
"runEtcd",
"(",
")",
"error",
"{",
"errc",
":=",
"make",
"(",
"chan",
"error",
")",
"\n",
"go",
"func",
"(",
")",
"{",
"time",
".",
"Sleep",
"(",
"5",
"*",
"time",
".",
"Second",
")",
"\n",
"// server adver... |
5,127 | all-5128 | [
"===",
"hour",
"(",
"v",
"Vector",
")",
"Scalar",
"==="
] | [
"func",
"funcHour",
"(",
"vals",
"[",
"]",
"Value",
",",
"args",
"Expressions",
",",
"enh",
"*",
"EvalNodeHelper",
")",
"Vector",
"{",
"return",
"dateWrapper",
"(",
"vals",
",",
"enh",
",",
"func",
"(",
"t",
"<mask>",
".",
"Time",
")",
"float64",
"{",
... |
5,128 | all-5129 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SetReturnValueParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger7",
"(",
"&",
"w",
",",
"v",
... |
5,129 | all-5130 | [
"Start",
"worker"
] | [
"func",
"(",
"p",
"*",
"Whisper",
")",
"Start",
"(",
")",
"error",
"{",
"return",
"p",
".",
"StartFunc",
"(",
"func",
"(",
")",
"error",
"{",
"p",
".",
"throttleTicker",
"=",
"NewThrottleTicker",
"(",
"p",
".",
"maxUpdatesPerSecond",
")",
"\n",
"if",
... |
5,130 | all-5131 | [
"TODO",
":",
"cairo_set_font_matrix",
"TODO",
":",
"cairo_get_font_matrix",
"TODO",
":",
"cairo_set_font_options",
"TODO",
":",
"cairo_get_font_options",
"TODO",
":",
"cairo_set_font_face",
"TODO",
":",
"cairo_get_font_face",
"TODO",
":",
"cairo_set_scaled_font",
"TODO",
... | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"ShowText",
"(",
"utf8",
"string",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"utf8",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n",
"C",
".",
"cair... |
5,131 | all-5132 | [
"SIGQUIT",
"to",
"exit",
"with",
"stackstrace"
] | [
"func",
"(",
"srv",
"*",
"Server",
")",
"stopEtcd",
"(",
"sig",
"os",
".",
"Signal",
")",
"error",
"{",
"srv",
".",
"stopProxy",
"(",
")",
"\n\n",
"if",
"srv",
".",
"etcdCmd",
"!=",
"nil",
"{",
"srv",
".",
"lg",
".",
"Info",
"(",
"\"",
"\"",
",... |
5,132 | all-5133 | [
"makeBroadcastRouteStatusSlice",
"takes",
"a",
"snapshot",
"of",
"the",
"broadcast",
"routes",
"in",
"routes",
"."
] | [
"func",
"makeBroadcastRouteStatusSlice",
"(",
"r",
"*",
"routes",
")",
"[",
"]",
"broadcastRouteStatus",
"{",
"r",
".",
"RLock",
"(",
")",
"\n",
"defer",
"r",
".",
"RUnlock",
"(",
")",
"\n\n",
"var",
"slice",
"[",
"]",
"broadcastRouteStatus",
"\n",
"for",
... |
5,133 | all-5134 | [
"String",
"returns",
"the",
"name",
"of",
"e"
] | [
"func",
"(",
"e",
"BucketEntryType",
")",
"String",
"(",
")",
"string",
"{",
"<mask>",
",",
"_",
":=",
"bucketEntryTypeMap",
"[",
"int32",
"(",
"e",
")",
"]",
"\n",
"return",
"name",
"\n",
"}"
] |
5,134 | all-5135 | [
"AddFlags",
"adds",
"comments",
"<comments",
">",
"to",
"the",
"command",
"help"
] | [
"func",
"(",
"c",
"*",
"CommentCounterPlugin",
")",
"AddFlags",
"(",
"cmd",
"*",
"cobra",
".",
"Command",
")",
"{",
"cmd",
".",
"Flags",
"(",
")",
".",
"StringSliceVar",
"(",
"&",
"c",
".",
"<mask>",
",",
"\"",
"\"",
",",
"[",
"]",
"string",
"{",
... |
5,135 | all-5136 | [
"VisitAll",
"calls",
"f",
"for",
"each",
"existing",
"arg",
".",
"f",
"must",
"not",
"retain",
"references",
"to",
"key",
"and",
"value",
"after",
"returning",
".",
"Make",
"key",
"and",
"/",
"or",
"value",
"copies",
"if",
"you",
"need",
"storing",
"them... | [
"func",
"(",
"a",
"*",
"Args",
")",
"VisitAll",
"(",
"f",
"func",
"(",
"<mask>",
",",
"value",
"[",
"]",
"byte",
")",
")",
"{",
"visitArgs",
"(",
"a",
".",
"args",
",",
"f",
")",
"\n",
"}"
] |
5,136 | all-5137 | [
"SQLType",
"returns",
"the",
"SQL",
"type",
"of",
"the",
"v",
"for",
"PostgreSQL",
"."
] | [
"func",
"(",
"d",
"*",
"PostgresDialect",
")",
"SQLType",
"(",
"v",
"interface",
"{",
"}",
",",
"autoIncrement",
"bool",
",",
"size",
"uint64",
")",
"(",
"name",
"string",
",",
"allowNull",
"bool",
")",
"{",
"switch",
"v",
".",
"(",
"type",
")",
"{",... |
5,137 | all-5138 | [
"A",
"client",
"implementation",
"of",
"the",
"PLAIN",
"authentication",
"mechanism",
"as",
"described",
"in",
"RFC",
"4616",
".",
"Authorization",
"identity",
"may",
"be",
"left",
"blank",
"to",
"indicate",
"that",
"it",
"is",
"the",
"same",
"as",
"the",
"u... | [
"func",
"NewPlainClient",
"(",
"identity",
",",
"username",
",",
"password",
"string",
")",
"Client",
"{",
"return",
"&",
"plainClient",
"{",
"identity",
",",
"username",
",",
"<mask>",
"}",
"\n",
"}"
] |
5,138 | all-5139 | [
"Warn",
"calls",
"UI",
".",
"Warn",
"to",
"write",
".",
"Useful",
"when",
"you",
"want",
"separate",
"colors",
"or",
"prefixes",
".",
"WarnFGColor",
"and",
"WarnBGColor",
"are",
"used",
"for",
"color",
"."
] | [
"func",
"(",
"ui",
"*",
"ColorUI",
")",
"Warn",
"(",
"<mask>",
"string",
")",
"{",
"ct",
".",
"ChangeColor",
"(",
"ui",
".",
"WarnFGColor",
".",
"Code",
",",
"ui",
".",
"WarnFGColor",
".",
"Bright",
",",
"ui",
".",
"WarnBGColor",
".",
"Code",
",",
... |
5,139 | all-5140 | [
"List",
"provides",
"a",
"mock",
"function",
"with",
"given",
"fields",
":",
"_a0",
"_a1",
"_a2",
"_a3",
"_a4"
] | [
"func",
"(",
"_m",
"*",
"InstrumentedStorage",
")",
"List",
"(",
"_a0",
"<mask>",
".",
"Context",
",",
"_a1",
"int64",
",",
"_a2",
"int64",
",",
"_a3",
"*",
"time",
".",
"Time",
",",
"_a4",
"*",
"time",
".",
"Time",
")",
"(",
"[",
"]",
"*",
"mnem... |
5,140 | all-5141 | [
"NewReadWriteCloser",
"-",
"a",
"fake",
"readwritecloser",
"constructor"
] | [
"func",
"NewReadWriteCloser",
"(",
"readErr",
",",
"writeErr",
",",
"closeErr",
"<mask>",
")",
"*",
"MockReadWriteCloser",
"{",
"return",
"&",
"MockReadWriteCloser",
"{",
"ReadErr",
":",
"readErr",
",",
"WriteErr",
":",
"writeErr",
",",
"CloseErr",
":",
"closeEr... |
5,141 | all-5142 | [
"AcquireRequest",
"returns",
"an",
"empty",
"Request",
"instance",
"from",
"request",
"pool",
".",
"The",
"returned",
"Request",
"instance",
"may",
"be",
"passed",
"to",
"ReleaseRequest",
"when",
"it",
"is",
"no",
"longer",
"needed",
".",
"This",
"allows",
"Re... | [
"func",
"AcquireRequest",
"(",
")",
"*",
"<mask>",
"{",
"v",
":=",
"requestPool",
".",
"Get",
"(",
")",
"\n",
"if",
"v",
"==",
"nil",
"{",
"return",
"&",
"Request",
"{",
"}",
"\n",
"}",
"\n",
"return",
"v",
".",
"(",
"*",
"Request",
")",
"\n",
... |
5,142 | all-5143 | [
"Infof",
"logs",
"a",
"formatted",
"line",
"with",
"an",
"INFO",
"prefix",
"."
] | [
"func",
"(",
"l",
"*",
"logger",
")",
"Infof",
"(",
"format",
"string",
",",
"vals",
"...",
"<mask>",
"{",
"}",
")",
"{",
"l",
".",
"mut",
".",
"Lock",
"(",
")",
"\n",
"defer",
"l",
".",
"mut",
".",
"Unlock",
"(",
")",
"\n",
"s",
":=",
"fmt",... |
5,143 | all-5144 | [
"RemoveTask",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockTaskEngineState",
")",
"RemoveTask",
"(",
"arg0",
"*",
"task",
".",
"<mask>",
")",
"{",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
",",
"arg0",
")",
"\n",
"}"
] |
5,144 | all-5145 | [
"AddTrigger",
"adds",
"a",
"trigger",
"to",
"the",
"bot",
"s",
"handlers"
] | [
"func",
"(",
"bot",
"*",
"Bot",
")",
"AddTrigger",
"(",
"h",
"Handler",
")",
"{",
"<mask>",
".",
"handlers",
"=",
"append",
"(",
"bot",
".",
"handlers",
",",
"h",
")",
"\n",
"}"
] |
5,145 | all-5146 | [
"OAuthConsumerKey",
"returns",
"the",
"OAuth",
"consumer",
"key",
"provided",
"with",
"the",
"current",
"request",
".",
"This",
"method",
"will",
"return",
"an",
"error",
"if",
"the",
"OAuth",
"request",
"was",
"invalid",
"."
] | [
"func",
"OAuthConsumerKey",
"(",
"c",
"context",
".",
"Context",
")",
"(",
"string",
",",
"error",
")",
"{",
"req",
":=",
"&",
"pb",
".",
"CheckOAuthSignatureRequest",
"{",
"}",
"\n",
"res",
":=",
"&",
"pb",
".",
"CheckOAuthSignatureResponse",
"{",
"}",
... |
5,146 | all-5147 | [
"cafiles",
"returns",
"a",
"list",
"of",
"CA",
"file",
"paths",
"."
] | [
"func",
"(",
"info",
"TLSInfo",
")",
"cafiles",
"(",
")",
"[",
"]",
"string",
"{",
"<mask>",
":=",
"make",
"(",
"[",
"]",
"string",
",",
"0",
")",
"\n",
"if",
"info",
".",
"TrustedCAFile",
"!=",
"\"",
"\"",
"{",
"cs",
"=",
"append",
"(",
"cs",
... |
5,147 | all-5148 | [
"SetSourceRGB",
"is",
"a",
"wrapper",
"around",
"cairo_set_source_rgb",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Context",
")",
"SetSourceRGB",
"(",
"red",
",",
"green",
",",
"blue",
"float64",
")",
"{",
"C",
".",
"cairo_set_source_rgb",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"double",
"(",
"<mask>",
")",
",",
"C",
".",
"d... |
5,148 | all-5149 | [
"Do",
"executes",
"Target",
".",
"detachFromTarget",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"DetachFromTargetParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandDetachFromTarget",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
5,149 | all-5150 | [
"native",
"returns",
"a",
"pointer",
"to",
"the",
"underlying",
"GtkRevealer",
"."
] | [
"func",
"(",
"v",
"*",
"Revealer",
")",
"native",
"(",
")",
"*",
"C",
".",
"GtkRevealer",
"{",
"if",
"v",
"==",
"nil",
"||",
"v",
".",
"GObject",
"==",
"nil",
"{",
"<mask>",
"nil",
"\n",
"}",
"\n",
"p",
":=",
"unsafe",
".",
"Pointer",
"(",
"v",... |
5,150 | all-5151 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SetCacheDisabledParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork16",
"(",
"&",
"w",
",",
"v",
... |
5,151 | all-5152 | [
"ToSlice",
"places",
"all",
"iterated",
"over",
"values",
"in",
"a",
"Slice",
"for",
"easy",
"consumption",
"."
] | [
"func",
"(",
"iter",
"Enumerator",
")",
"ToSlice",
"(",
")",
"[",
"]",
"interface",
"{",
"}",
"{",
"retval",
":=",
"make",
"(",
"[",
"]",
"interface",
"{",
"}",
",",
"0",
")",
"\n",
"for",
"entry",
":=",
"range",
"iter",
"{",
"retval",
"=",
"appe... |
5,152 | all-5153 | [
"inject",
"an",
"application",
"-",
"supplied",
"message",
"into",
"the",
"debug",
"message",
"queue"
] | [
"func",
"DebugMessageInsert",
"(",
"source",
"uint32",
",",
"xtype",
"uint32",
",",
"<mask>",
"uint32",
",",
"severity",
"uint32",
",",
"length",
"int32",
",",
"buf",
"*",
"uint8",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpDebugMessageInsert",
",",
"6",
... |
5,153 | all-5154 | [
"NoCache",
"called",
"when",
"a",
"particular",
"handler",
"is",
"not",
"valid",
"for",
"cache",
".",
"If",
"this",
"function",
"called",
"inside",
"a",
"handler",
"then",
"the",
"handler",
"is",
"not",
"cached",
"."
] | [
"func",
"NoCache",
"(",
"reqCtx",
"*",
"fasthttp",
".",
"RequestCtx",
")",
"{",
"reqCtx",
".",
"Response",
".",
"Header",
".",
"<mask>",
"(",
"cfg",
".",
"NoCacheHeader",
",",
"\"",
"\"",
")",
"\n",
"}"
] |
5,154 | all-5155 | [
"Replace",
"the",
"parent",
"EncodeJson",
"to",
"provide",
"indentation",
"."
] | [
"func",
"(",
"w",
"*",
"jsonIndentResponseWriter",
")",
"EncodeJson",
"(",
"v",
"interface",
"{",
"}",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"b",
",",
"err",
":=",
"json",
".",
"MarshalIndent",
"(",
"v",
",",
"w",
".",
"<mask>",
",",
... |
5,155 | all-5156 | [
"SetNumInstances",
"sets",
"the",
"number",
"of",
"instances",
"of",
"the",
"given",
"module",
".",
"version",
"to",
"the",
"specified",
"value",
".",
"If",
"either",
"module",
"or",
"version",
"are",
"the",
"empty",
"string",
"it",
"means",
"the",
"default"... | [
"func",
"SetNumInstances",
"(",
"c",
"context",
".",
"Context",
",",
"module",
",",
"version",
"string",
",",
"instances",
"int",
")",
"error",
"{",
"req",
":=",
"&",
"<mask>",
".",
"SetNumInstancesRequest",
"{",
"}",
"\n",
"if",
"module",
"!=",
"\"",
"\... |
5,156 | all-5157 | [
"FromBytes",
"creates",
"a",
"new",
"UUID",
"from",
"a",
"byte",
"slice",
".",
"Returns",
"an",
"error",
"if",
"the",
"slice",
"does",
"not",
"have",
"a",
"length",
"of",
"16",
".",
"The",
"bytes",
"are",
"copied",
"from",
"the",
"slice",
"."
] | [
"func",
"FromBytes",
"(",
"b",
"[",
"]",
"<mask>",
")",
"(",
"uuid",
"UUID",
",",
"err",
"error",
")",
"{",
"err",
"=",
"uuid",
".",
"UnmarshalBinary",
"(",
"b",
")",
"\n",
"return",
"uuid",
",",
"err",
"\n",
"}"
] |
5,157 | all-5158 | [
"select",
"a",
"polygon",
"rasterization",
"mode"
] | [
"func",
"PolygonMode",
"(",
"face",
"uint32",
",",
"<mask>",
"uint32",
")",
"{",
"C",
".",
"glowPolygonMode",
"(",
"gpPolygonMode",
",",
"(",
"C",
".",
"GLenum",
")",
"(",
"face",
")",
",",
"(",
"C",
".",
"GLenum",
")",
"(",
"mode",
")",
")",
"\n",... |
5,158 | all-5159 | [
"/",
"*",
"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",
"(",
"la",
"*",
"LogAdapter",
")",
"Infof",
"(",
"msg",
"string",
",",
"a",
"...",
"interface",
"{",
"}",
")",
"error",
"{",
"return",
"la",
".",
"<mask>",
"(",
"LevelInfo",
",",
"nil",
",",
"msg",
",",
"a",
"...",
")",
"\n",
"}"
] |
5,159 | all-5160 | [
"ListCollaborators",
"gets",
"a",
"list",
"of",
"all",
"users",
"who",
"have",
"access",
"to",
"a",
"repo",
"(",
"and",
"can",
"become",
"assignees",
"or",
"requested",
"reviewers",
")",
".",
"See",
"IsCollaborator",
"for",
"more",
"details",
".",
"See",
"... | [
"func",
"(",
"c",
"*",
"Client",
")",
"ListCollaborators",
"(",
"org",
",",
"repo",
"string",
")",
"(",
"[",
"]",
"User",
",",
"error",
")",
"{",
"c",
".",
"log",
"(",
"\"",
"\"",
",",
"org",
",",
"repo",
")",
"\n",
"if",
"c",
".",
"fake",
"{... |
5,160 | all-5161 | [
"GetText",
"indicates",
"an",
"expected",
"call",
"of",
"GetText"
] | [
"func",
"(",
"mr",
"*",
"MockLicenseProviderMockRecorder",
")",
"GetText",
"(",
")",
"*",
"gomock",
".",
"Call",
"{",
"<mask>",
"mr",
".",
"mock",
".",
"ctrl",
".",
"RecordCallWithMethodType",
"(",
"mr",
".",
"mock",
",",
"\"",
"\"",
",",
"reflect",
".",... |
5,161 | all-5162 | [
"Lex",
"returns",
"the",
"next",
"token",
"form",
"the",
"Tokenizer",
".",
"This",
"function",
"is",
"used",
"by",
"go",
"yacc",
"."
] | [
"func",
"(",
"tkn",
"*",
"Tokenizer",
")",
"Lex",
"(",
"lval",
"*",
"yySymType",
")",
"int",
"{",
"typ",
",",
"val",
":=",
"tkn",
".",
"Scan",
"(",
")",
"\n",
"for",
"typ",
"==",
"COMMENT",
"{",
"if",
"tkn",
".",
"AllowComments",
"{",
"break",
"\... |
5,162 | all-5163 | [
"gboolean",
"pango_color_parse",
"(",
"PangoColor",
"*",
"color",
"const",
"char",
"*",
"spec",
")",
";"
] | [
"func",
"(",
"v",
"*",
"Color",
")",
"Parse",
"(",
"spec",
"string",
")",
"bool",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"spec",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n",
"c",
":=",
... |
5,163 | all-5164 | [
"RegisterMachine",
"registers",
"an",
"iaas",
".",
"Machine",
"as",
"an",
"Machine",
"and",
"a",
"host",
"on",
"the",
"current",
"running",
"DockerMachine",
".",
"It",
"expects",
"all",
"data",
"needed",
"to",
"Marshal",
"the",
"host",
"/",
"driver",
"to",
... | [
"func",
"(",
"d",
"*",
"DockerMachine",
")",
"RegisterMachine",
"(",
"opts",
"RegisterMachineOpts",
")",
"(",
"*",
"Machine",
",",
"error",
")",
"{",
"if",
"!",
"d",
".",
"temp",
"{",
"return",
"nil",
",",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
... |
5,164 | all-5165 | [
"DestructivelyPrioritizeReplacementCandidates",
"consumes",
"AND",
"DESTROYS",
"an",
"array",
"of",
"possible",
"replacement",
"candidates",
"with",
"their",
"last",
"known",
"existence",
"times",
"the",
"primary",
"digest",
"the",
"user",
"actually",
"asked",
"for",
... | [
"func",
"DestructivelyPrioritizeReplacementCandidates",
"(",
"cs",
"[",
"]",
"CandidateWithTime",
",",
"primaryDigest",
",",
"uncompressedDigest",
"digest",
".",
"Digest",
")",
"[",
"]",
"<mask>",
".",
"BICReplacementCandidate",
"{",
"return",
"destructivelyPrioritizeRepl... |
5,165 | all-5166 | [
"HasCheck",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"c",
"*",
"CheckStatusDefinition",
")",
"HasCheck",
"(",
")",
"bool",
"{",
"if",
"c",
"!=",
"nil",
"&&",
"c",
".",
"Check",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
5,166 | all-5167 | [
"Warningf",
"logs",
"a",
"WARNING",
"message",
"to",
"the",
"logger",
"specified",
"in",
"opts",
"."
] | [
"func",
"(",
"<mask>",
"*",
"Options",
")",
"Debugf",
"(",
"format",
"string",
",",
"v",
"...",
"interface",
"{",
"}",
")",
"{",
"if",
"opt",
".",
"Logger",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n",
"opt",
".",
"Logger",
".",
"Debugf",
"(",
"f... |
5,167 | all-5168 | [
"Sample",
"implements",
"instruments",
".",
"Reporter"
] | [
"func",
"(",
"r",
"*",
"Reporter",
")",
"Sample",
"(",
"name",
"string",
",",
"<mask>",
"[",
"]",
"string",
",",
"dist",
"instruments",
".",
"Distribution",
")",
"error",
"{",
"r",
".",
"Metric",
"(",
"name",
"+",
"\"",
"\"",
",",
"tags",
",",
"flo... |
5,168 | all-5169 | [
"GetEntries",
"walks",
"the",
"cache",
"dir",
"and",
"returns",
"all",
"paths",
"that",
"exist",
"In",
"the",
"future",
"this",
"*",
"may",
"*",
"be",
"made",
"smarter"
] | [
"func",
"(",
"c",
"*",
"Cache",
")",
"GetEntries",
"(",
")",
"[",
"]",
"EntryInfo",
"{",
"entries",
":=",
"[",
"]",
"EntryInfo",
"{",
"}",
"\n",
"// note we swallow errors because we just need to know what keys exist",
"// some keys missing is OK since this is used for ev... |
5,169 | all-5170 | [
"CanonicalLink",
"gets",
"a",
"link",
"to",
"the",
"location",
"of",
"job",
"-",
"specific",
"artifacts",
"in",
"GCS"
] | [
"func",
"(",
"src",
"*",
"gcsJobSource",
")",
"canonicalLink",
"(",
")",
"string",
"{",
"return",
"<mask>",
".",
"Join",
"(",
"src",
".",
"linkPrefix",
",",
"src",
".",
"bucket",
",",
"src",
".",
"jobPrefix",
")",
"\n",
"}"
] |
5,170 | all-5171 | [
"SetAppMenu",
"is",
"a",
"wrapper",
"around",
"gtk_application_set_app_menu",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"SetAppMenu",
"(",
"m",
"*",
"glib",
".",
"MenuModel",
")",
"{",
"mptr",
":=",
"(",
"*",
"C",
".",
"GMenuModel",
")",
"(",
"unsafe",
".",
"Pointer",
"(",
"m",
".",
"Native",
"(",
")",
")",
")",
"\n",
"C",
... |
5,171 | all-5172 | [
"Configure",
"logging"
] | [
"func",
"(",
"p",
"*",
"Pact",
")",
"setupLogging",
"(",
")",
"{",
"if",
"p",
".",
"logFilter",
"==",
"nil",
"{",
"if",
"p",
".",
"LogLevel",
"==",
"\"",
"\"",
"{",
"p",
".",
"LogLevel",
"=",
"\"",
"\"",
"\n",
"}",
"\n",
"p",
".",
"logFilter",
... |
5,172 | all-5173 | [
"mergePassInto",
"merges",
"a",
"single",
"pass",
"into",
"a",
"full",
"sized",
"image",
"."
] | [
"func",
"(",
"d",
"*",
"decoder",
")",
"mergePassInto",
"(",
"dst",
"image",
".",
"Image",
",",
"src",
"image",
".",
"Image",
",",
"pass",
"int",
")",
"{",
"p",
":=",
"interlacing",
"[",
"pass",
"]",
"\n",
"var",
"(",
"srcPix",
"[",
"]",
"uint8",
... |
5,173 | all-5174 | [
"NewIterator",
"creates",
"a",
"CSVIterator",
"from",
"a",
"Reader",
"."
] | [
"func",
"NewIterator",
"(",
"reader",
"io",
".",
"Reader",
",",
"unmarshaller",
"RecordUnmarshaller",
")",
"*",
"Iterator",
"{",
"return",
"&",
"Iterator",
"{",
"reader",
":",
"reader",
",",
"line",
":",
"0",
",",
"scanner",
":",
"bufio",
".",
"NewScanner"... |
5,174 | all-5175 | [
"ToSlice",
"converts",
"a",
"Queue",
"into",
"a",
"slice",
"."
] | [
"func",
"(",
"q",
"*",
"Queue",
")",
"ToSlice",
"(",
")",
"[",
"]",
"interface",
"{",
"}",
"{",
"q",
".",
"<mask>",
".",
"RLock",
"(",
")",
"\n",
"defer",
"q",
".",
"key",
".",
"RUnlock",
"(",
")",
"\n\n",
"if",
"q",
".",
"underlyer",
"==",
"... |
5,175 | all-5176 | [
"GetInputPurpose",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_entry_get_input_purpose",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"GetInputPurpose",
"(",
")",
"InputPurpose",
"{",
"c",
":=",
"C",
".",
"gtk_entry_get_input_purpose",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"return",
"InputPurpose",
"(",
"c",
")",
"\n",
"}"
] |
5,176 | all-5177 | [
"VarPath",
"returns",
"the",
"provided",
"path",
"elements",
"joined",
"by",
"a",
"slash",
"and",
"appended",
"to",
"the",
"end",
"of",
"$LXD_DIR",
"which",
"defaults",
"to",
"/",
"var",
"/",
"lib",
"/",
"lxd",
"."
] | [
"func",
"VarPath",
"(",
"path",
"...",
"string",
")",
"string",
"{",
"varDir",
":=",
"<mask>",
".",
"Getenv",
"(",
"\"",
"\"",
")",
"\n",
"if",
"varDir",
"==",
"\"",
"\"",
"{",
"varDir",
"=",
"\"",
"\"",
"\n",
"}",
"\n\n",
"items",
":=",
"[",
"]"... |
5,177 | all-5178 | [
"NextDrawable",
"returns",
"a",
"Metal",
"drawable",
".",
"Reference",
":",
"https",
":",
"//",
"developer",
".",
"apple",
".",
"com",
"/",
"documentation",
"/",
"quartzcore",
"/",
"cametallayer",
"/",
"1478172",
"-",
"nextdrawable",
"."
] | [
"func",
"(",
"ml",
"MetalLayer",
")",
"NextDrawable",
"(",
")",
"(",
"MetalDrawable",
",",
"error",
")",
"{",
"<mask>",
":=",
"C",
".",
"MetalLayer_NextDrawable",
"(",
"ml",
".",
"metalLayer",
")",
"\n",
"if",
"md",
"==",
"nil",
"{",
"return",
"MetalDraw... |
5,178 | all-5179 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"EventWebSocketHandshakeResponseReceived",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork... |
5,179 | all-5180 | [
"DisableServiceFlapDetection",
"creates",
"a",
"new",
"DISABLE_SERVICE_FLAP_DETECTION",
"Nagios",
"command",
".",
"Disables",
"flap",
"detection",
"for",
"the",
"specified",
"service",
"."
] | [
"func",
"DisableServiceFlapDetection",
"(",
"host_name",
"string",
",",
"service_description",
"<mask>",
",",
")",
"*",
"livestatus",
".",
"Command",
"{",
"return",
"livestatus",
".",
"NewCommand",
"(",
"\"",
"\"",
",",
"stringifyArg",
"(",
"\"",
"\"",
",",
"\... |
5,180 | all-5181 | [
"Configures",
"the",
"uploading",
"of",
"a",
"generated",
"snapshot",
"file",
"to",
"a",
"remote",
"Backtrace",
"coronerd",
"object",
"store",
".",
"Uploads",
"use",
"simple",
"one",
"-",
"shot",
"semantics",
"and",
"won",
"t",
"retry",
"on",
"failures",
"."... | [
"func",
"(",
"t",
"*",
"BTTracer",
")",
"ConfigurePut",
"(",
"endpoint",
",",
"token",
"string",
",",
"options",
"PutOptions",
")",
"error",
"{",
"if",
"endpoint",
"==",
"\"",
"\"",
"||",
"token",
"==",
"\"",
"\"",
"{",
"return",
"errors",
".",
"New",
... |
5,181 | all-5182 | [
"add",
"punctuation",
"characters",
"to",
"start",
"and",
"end",
"of",
"string"
] | [
"func",
"(",
"g",
"Garbler",
")",
"punctuate",
"(",
"p",
"string",
",",
"numPunc",
"int",
")",
"string",
"{",
"if",
"numPunc",
"<=",
"0",
"{",
"return",
"p",
"\n",
"}",
"\n",
"ret",
":=",
"p",
"\n",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"numPun... |
5,182 | all-5183 | [
"RequestReview",
"tries",
"to",
"add",
"the",
"users",
"listed",
"in",
"logins",
"as",
"requested",
"reviewers",
"of",
"the",
"specified",
"PR",
".",
"If",
"any",
"user",
"in",
"the",
"logins",
"slice",
"is",
"not",
"a",
"contributor",
"of",
"the",
"repo",... | [
"func",
"(",
"c",
"*",
"Client",
")",
"RequestReview",
"(",
"org",
",",
"repo",
"string",
",",
"number",
"int",
",",
"logins",
"[",
"]",
"string",
")",
"error",
"{",
"statusCode",
",",
"err",
":=",
"c",
".",
"tryRequestReview",
"(",
"org",
",",
"repo... |
5,183 | all-5184 | [
"stop",
"terminates",
"all",
"scrape",
"loops",
"and",
"returns",
"after",
"they",
"all",
"terminated",
"."
] | [
"func",
"(",
"sp",
"*",
"scrapePool",
")",
"stop",
"(",
")",
"{",
"sp",
".",
"cancel",
"(",
")",
"\n",
"var",
"wg",
"<mask>",
".",
"WaitGroup",
"\n\n",
"sp",
".",
"mtx",
".",
"Lock",
"(",
")",
"\n",
"defer",
"sp",
".",
"mtx",
".",
"Unlock",
"("... |
5,184 | all-5185 | [
"VerifyJSONRepresenting",
"is",
"similar",
"to",
"VerifyJSON",
".",
"Instead",
"of",
"taking",
"a",
"JSON",
"string",
"however",
"it",
"takes",
"an",
"arbitrary",
"JSON",
"-",
"encodable",
"object",
"and",
"verifies",
"that",
"the",
"requests",
"s",
"body",
"i... | [
"func",
"VerifyJSONRepresenting",
"(",
"<mask>",
"interface",
"{",
"}",
")",
"http",
".",
"HandlerFunc",
"{",
"data",
",",
"err",
":=",
"json",
".",
"Marshal",
"(",
"object",
")",
"\n",
"Expect",
"(",
"err",
")",
".",
"ShouldNot",
"(",
"HaveOccurred",
"(... |
5,185 | all-5186 | [
"Timing",
"adds",
"a",
"value",
"to",
"a",
"histogram"
] | [
"func",
"(",
"m",
"*",
"CirconusMetrics",
")",
"Timing",
"(",
"metric",
"<mask>",
",",
"val",
"float64",
")",
"{",
"m",
".",
"SetHistogramValue",
"(",
"metric",
",",
"val",
")",
"\n",
"}"
] |
5,186 | all-5187 | [
"LogRequest",
"logs",
"a",
"goanna",
"request"
] | [
"func",
"LogRequest",
"(",
"r",
"*",
"Request",
",",
"v",
"...",
"string",
")",
"{",
"serializedHeaders",
":=",
"bytes",
".",
"Buffer",
"{",
"}",
"\n",
"r",
".",
"Header",
".",
"Write",
"(",
"&",
"serializedHeaders",
")",
"\n\n",
"printf",
":=",
"log",... |
5,187 | all-5188 | [
"LiveServers",
"returns",
"a",
"list",
"of",
"server",
"addresses",
"which",
"are",
"currently",
"known",
"to",
"be",
"alive",
"."
] | [
"func",
"(",
"s",
"*",
"<mask>",
")",
"LiveServers",
"(",
")",
"(",
"addrs",
"[",
"]",
"string",
")",
"{",
"s",
".",
"m",
".",
"RLock",
"(",
")",
"\n",
"addrs",
"=",
"s",
".",
"cluster",
"(",
")",
".",
"LiveServers",
"(",
")",
"\n",
"s",
".",... |
5,188 | all-5189 | [
"Extract",
"the",
"project",
"query",
"parameter",
"from",
"the",
"given",
"request",
"."
] | [
"func",
"projectParam",
"(",
"<mask>",
"*",
"http",
".",
"Request",
")",
"string",
"{",
"project",
":=",
"queryParam",
"(",
"request",
",",
"\"",
"\"",
")",
"\n",
"if",
"project",
"==",
"\"",
"\"",
"{",
"project",
"=",
"\"",
"\"",
"\n",
"}",
"\n",
... |
5,189 | all-5190 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SetScriptSourceParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger6",
"(",
"&",
"w",
",",
"v",
... |
5,190 | all-5191 | [
"WithLatitude",
"mock",
"latitude",
"."
] | [
"func",
"(",
"p",
"SetGeolocationOverrideParams",
")",
"WithLatitude",
"(",
"latitude",
"float64",
")",
"*",
"SetGeolocationOverrideParams",
"{",
"p",
".",
"Latitude",
"=",
"latitude",
"\n",
"<mask>",
"&",
"p",
"\n",
"}"
] |
5,191 | all-5192 | [
"------------------------------------------------------------------",
"Switches",
"connected",
"via",
"arbitrary",
"net",
".",
"Conn",
";",
"useful",
"for",
"testing",
"Returns",
"n",
"switches",
"connected",
"according",
"to",
"the",
"connect",
"func",
".",
"If",
"conn... | [
"func",
"MakeConnectedSwitches",
"(",
"n",
"int",
",",
"initSwitch",
"func",
"(",
"int",
",",
"*",
"Switch",
")",
"*",
"Switch",
",",
"connect",
"func",
"(",
"[",
"]",
"*",
"Switch",
",",
"int",
",",
"int",
")",
")",
"[",
"]",
"*",
"Switch",
"{",
... |
5,192 | all-5193 | [
"NewOutgoingCallbackQueryResponse",
"creates",
"a",
"response",
"to",
"a",
"callback",
"query",
"."
] | [
"func",
"(",
"api",
"*",
"TelegramBotAPI",
")",
"NewOutgoingCallbackQueryResponse",
"(",
"queryID",
"string",
")",
"*",
"OutgoingCallbackQueryResponse",
"{",
"<mask>",
"&",
"OutgoingCallbackQueryResponse",
"{",
"api",
":",
"api",
",",
"CallbackQueryID",
":",
"queryID"... |
5,193 | all-5194 | [
"parseTimestamp",
"parses",
"s",
"as",
"a",
"timestamp",
"string",
"and",
"returns",
"the",
"timestamp",
"and",
"reports",
"whether",
"it",
"succeeded",
".",
"Timestamp",
"formats",
"are",
"defined",
"at",
"http",
":",
"//",
"yaml",
".",
"org",
"/",
"type",
... | [
"func",
"parseTimestamp",
"(",
"s",
"string",
")",
"(",
"time",
".",
"Time",
",",
"bool",
")",
"{",
"// TODO write code to check all the formats supported by",
"// http://yaml.org/type/timestamp.html instead of using time.Parse.",
"// Quick check: all date formats start with YYYY-.",... |
5,194 | all-5195 | [
"add",
"adds",
"an",
"inflight",
"into",
"inflights"
] | [
"func",
"(",
"in",
"*",
"inflights",
")",
"add",
"(",
"inflight",
"uint64",
")",
"{",
"if",
"in",
".",
"full",
"(",
")",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"next",
":=",
"in",
".",
"start",
"+",
"in",
".",
"count",
"\n",
"si... |
5,195 | all-5196 | [
"NewExactReadCloser",
"returns",
"a",
"ReadCloser",
"that",
"returns",
"errors",
"if",
"the",
"underlying",
"reader",
"does",
"not",
"read",
"back",
"exactly",
"the",
"requested",
"number",
"of",
"bytes",
"."
] | [
"func",
"NewExactReadCloser",
"(",
"rc",
"io",
".",
"ReadCloser",
",",
"totalBytes",
"int64",
")",
"<mask>",
".",
"ReadCloser",
"{",
"return",
"&",
"exactReadCloser",
"{",
"rc",
":",
"rc",
",",
"totalBytes",
":",
"totalBytes",
"}",
"\n",
"}"
] |
5,196 | all-5197 | [
"title",
":",
"machine",
"template",
"list",
"path",
":",
"/",
"iaas",
"/",
"templates",
"method",
":",
"GET",
"produce",
":",
"application",
"/",
"json",
"responses",
":",
"200",
":",
"OK",
"401",
":",
"Unauthorized"
] | [
"func",
"templatesList",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"token",
"auth",
".",
"Token",
")",
"error",
"{",
"templates",
",",
"err",
":=",
"iaas",
".",
"ListTemplates",
"(",
")",
"\n",
"if",
"err",
... |
5,197 | all-5198 | [
"ForgetConnections",
"removes",
"direct",
"connections",
"to",
"the",
"provided",
"peers",
"specified",
"in",
"host",
":",
"port",
"format",
".",
"TODO",
"(",
"pb",
")",
":",
"Weave",
"Net",
"invokes",
"router",
".",
"ConnectionMaker",
".",
"ForgetConnections",
... | [
"func",
"(",
"cm",
"*",
"connectionMaker",
")",
"ForgetConnections",
"(",
"peers",
"[",
"]",
"string",
")",
"{",
"cm",
".",
"actionChan",
"<-",
"func",
"(",
")",
"bool",
"{",
"for",
"_",
",",
"peer",
":=",
"range",
"peers",
"{",
"delete",
"(",
"cm",
... |
5,198 | all-5199 | [
"ReplaceN",
"replaces",
"regular",
"expressions",
"mathed",
"in",
"r",
".",
"The",
"count",
"determines",
"the",
"number",
"to",
"match",
":",
"n",
">",
"0",
":",
"at",
"most",
"n",
"matches",
"n",
"==",
"0",
":",
"the",
"result",
"is",
"none",
"n",
... | [
"func",
"(",
"e",
"*",
"edit",
")",
"ReplaceN",
"(",
"r",
"[",
"]",
"Replacer",
",",
"n",
"int",
")",
"<mask>",
"{",
"return",
"e",
".",
"genReplace",
"(",
"r",
",",
"n",
")",
"\n",
"}"
] |
5,199 | all-5200 | [
"VirtualMachineCloneSchema",
"represents",
"the",
"schema",
"for",
"the",
"VM",
"clone",
"sub",
"-",
"resource",
".",
"This",
"is",
"a",
"workflow",
"for",
"vsphere_virtual_machine",
"that",
"facilitates",
"the",
"creation",
"of",
"a",
"virtual",
"machine",
"throu... | [
"func",
"VirtualMachineCloneSchema",
"(",
")",
"map",
"[",
"string",
"]",
"*",
"schema",
".",
"Schema",
"{",
"return",
"map",
"[",
"string",
"]",
"*",
"schema",
".",
"Schema",
"{",
"\"",
"\"",
":",
"{",
"Type",
":",
"schema",
".",
"TypeString",
",",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.