id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
100 | all-101 | [
"native",
"returns",
"a",
"pointer",
"to",
"the",
"underlying",
"GtkContainer",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"native",
"(",
")",
"*",
"C",
".",
"GtkContainer",
"{",
"if",
"v",
"==",
"nil",
"||",
"v",
".",
"GObject",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"p",
":=",
"unsafe",
".",
"Pointer",
"(",
"v",
... |
101 | all-102 | [
"Request",
"implements",
"the",
"http",
".",
"Handler",
"interface",
"to",
"provide",
"a",
"drop",
"-",
"in",
"Loginshare",
"request",
"/",
"response",
"handler"
] | [
"func",
"(",
"l",
"*",
"LoginShare",
")",
"Request",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
")",
"{",
"lsr",
",",
"err",
":=",
"l",
".",
"validateRequest",
"(",
"r",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{... |
102 | all-103 | [
"WithLocation",
"whether",
"the",
"event",
"was",
"from",
"the",
"left",
"or",
"right",
"side",
"of",
"the",
"keyboard",
".",
"1",
"=",
"Left",
"2",
"=",
"Right",
"(",
"default",
":",
"0",
")",
"."
] | [
"func",
"(",
"p",
"DispatchKeyEventParams",
")",
"WithLocation",
"(",
"location",
"int64",
")",
"*",
"DispatchKeyEventParams",
"{",
"p",
".",
"<mask>",
"=",
"location",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
103 | all-104 | [
"deleteTables",
"remove",
"tables",
"idx0",
"...",
"idx1",
"-",
"1",
"."
] | [
"func",
"(",
"s",
"*",
"levelHandler",
")",
"deleteTables",
"(",
"toDel",
"[",
"]",
"*",
"table",
".",
"Table",
")",
"error",
"{",
"s",
".",
"Lock",
"(",
")",
"// s.Unlock() below",
"\n\n",
"toDelMap",
":=",
"make",
"(",
"map",
"[",
"uint64",
"]",
"s... |
104 | all-105 | [
"GetDescription",
"returns",
"the",
"Description",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"d",
"*",
"DashboardLite",
")",
"GetDescription",
"(",
")",
"string",
"{",
"if",
"d",
"==",
"nil",
"||",
"d",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"d",
".",
"Description",
"\n",
"}"
] |
105 | all-106 | [
"===",
"changes",
"(",
"Matrix",
"ValueTypeMatrix",
")",
"Vector",
"==="
] | [
"func",
"funcChanges",
"(",
"vals",
"[",
"]",
"Value",
",",
"args",
"Expressions",
",",
"enh",
"*",
"EvalNodeHelper",
")",
"Vector",
"{",
"in",
":=",
"vals",
"[",
"0",
"]",
".",
"(",
"Matrix",
")",
"\n\n",
"for",
"_",
",",
"samples",
":=",
"range",
... |
106 | all-107 | [
"Color",
"will",
"set",
"the",
"struct",
"field",
"for",
"the",
"given",
"color",
"to",
"be",
"used"
] | [
"func",
"(",
"s",
"*",
"Spinner",
")",
"Color",
"(",
"colors",
"...",
"string",
")",
"error",
"{",
"colorAttributes",
":=",
"make",
"(",
"[",
"]",
"<mask>",
".",
"Attribute",
",",
"len",
"(",
"colors",
")",
")",
"\n\n",
"// Verify colours are valid and pla... |
107 | all-108 | [
"Stability",
":",
"***",
"EXPERIMENTAL",
"***",
"For",
"a",
"given",
"Issue",
"or",
"Pull",
"Request",
"of",
"a",
"repository",
"this",
"will",
"write",
"a",
"new",
"message",
".",
"Required",
"scopes",
":",
"github",
":",
"create",
"-",
"comment",
":",
... | [
"func",
"(",
"github",
"*",
"Github",
")",
"CreateComment",
"(",
"owner",
",",
"repo",
",",
"number",
"string",
",",
"payload",
"*",
"CreateCommentRequest",
")",
"error",
"{",
"cd",
":=",
"tcclient",
".",
"Client",
"(",
"*",
"github",
")",
"\n",
"_",
"... |
108 | all-109 | [
"GetVisibility",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_entry_get_visibility",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"GetVisibility",
"(",
")",
"bool",
"{",
"c",
":=",
"C",
".",
"gtk_entry_get_visibility",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"return",
"gobool",
"(",
"c",
")",
"\n",
"}"
] |
109 | all-110 | [
"init",
"filelogger",
"split",
"by",
"fileSize"
] | [
"func",
"(",
"f",
"*",
"FileLogger",
")",
"initLoggerBySize",
"(",
")",
"{",
"f",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"defer",
"f",
".",
"mu",
".",
"Unlock",
"(",
")",
"\n\n",
"logFile",
":=",
"joinFilePath",
"(",
"f",
".",
"fileDir",
",",
"f... |
110 | all-111 | [
"pointer",
":",
"append",
"multiLineOptions",
"itself"
] | [
"func",
"(",
"o",
"*",
"multiLineOptions",
")",
"read",
"(",
"rd",
"*",
"bufio",
".",
"Reader",
",",
"lineCnt",
"int",
")",
"{",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"lineCnt",
";",
"i",
"++",
"{",
"m",
":=",
"plainOptions",
"{",
"}",
"\n",
"c... |
111 | all-112 | [
"New",
"creates",
"a",
"new",
"etcdv3",
"client",
"from",
"a",
"given",
"configuration",
"."
] | [
"func",
"New",
"(",
"cfg",
"Config",
")",
"(",
"*",
"<mask>",
",",
"error",
")",
"{",
"if",
"len",
"(",
"cfg",
".",
"Endpoints",
")",
"==",
"0",
"{",
"return",
"nil",
",",
"ErrNoAvailableEndpoints",
"\n",
"}",
"\n\n",
"return",
"newClient",
"(",
"&",... |
112 | all-113 | [
"CompareKV",
"is",
"a",
"comparator",
"for",
"KV",
"item"
] | [
"func",
"CompareKV",
"(",
"a",
"[",
"]",
"<mask>",
",",
"b",
"[",
"]",
"byte",
")",
"int",
"{",
"la",
":=",
"int",
"(",
"binary",
".",
"LittleEndian",
".",
"Uint16",
"(",
"a",
"[",
"0",
":",
"2",
"]",
")",
")",
"\n",
"lb",
":=",
"int",
"(",
... |
113 | all-114 | [
"GetCurrent",
"is",
"a",
"wrapper",
"around",
"gdk_gl_context_get_current",
"()",
"."
] | [
"func",
"GetCurrent",
"(",
")",
"(",
"*",
"GLContext",
",",
"<mask>",
")",
"{",
"c",
":=",
"C",
".",
"gdk_gl_context_get_current",
"(",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"return",
"nil",
",",
"nilPtrErr",
"\n",
"}",
"\n\n",
"return",
"&",
"GLCo... |
114 | all-115 | [
"Handle",
"calls",
"f",
"(",
"ctx",
"call",
")"
] | [
"func",
"(",
"f",
"ErrorHandlerFunc",
")",
"Handle",
"(",
"ctx",
"context",
".",
"Context",
",",
"call",
"*",
"InboundCall",
")",
"{",
"if",
"err",
":=",
"f",
"(",
"ctx",
",",
"call",
")",
";",
"err",
"!=",
"nil",
"{",
"if",
"GetSystemErrorCode",
"("... |
115 | all-116 | [
"String",
"returns",
"the",
"name",
"of",
"e"
] | [
"func",
"(",
"e",
"ThresholdIndexes",
")",
"<mask>",
"(",
")",
"string",
"{",
"name",
",",
"_",
":=",
"thresholdIndexesMap",
"[",
"int32",
"(",
"e",
")",
"]",
"\n",
"return",
"name",
"\n",
"}"
] |
116 | all-117 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"SetTouchEmulationEnabledParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation3",
... |
117 | all-118 | [
"GetEnableLogsSampleOk",
"returns",
"a",
"tuple",
"with",
"the",
"EnableLogsSample",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"o",
"*",
"Options",
")",
"GetEnableLogsSampleOk",
"(",
")",
"(",
"bool",
",",
"bool",
")",
"{",
"if",
"o",
"==",
"nil",
"||",
"o",
".",
"EnableLogsSample",
"==",
"nil",
"{",
"return",
"false",
",",
"<mask>",
"\n",
"}",
"\n",
"return",
... |
118 | all-119 | [
"New",
"http",
".",
"StatusInternalServerError"
] | [
"func",
"(",
"e",
"*",
"BusinessError",
")",
"New",
"(",
"errno",
"int",
",",
"message",
"string",
")",
"*",
"BusinessError",
"{",
"e",
".",
"HTTPCode",
"=",
"<mask>",
".",
"StatusBadRequest",
"\n",
"e",
".",
"Errno",
"=",
"errno",
"\n",
"e",
".",
"M... |
119 | all-120 | [
"Stop",
"-",
"signal",
"for",
"the",
"service",
"to",
"stop",
"serving"
] | [
"func",
"(",
"client",
"*",
"<mask>",
")",
"Stop",
"(",
")",
"{",
"service",
":=",
"client",
".",
"service",
"\n",
"if",
"service",
".",
"started",
"{",
"service",
".",
"wg",
".",
"Done",
"(",
")",
"\n",
"service",
".",
"started",
"=",
"false",
"\n... |
120 | all-121 | [
"Infof",
"logs",
"a",
"message",
"using",
"INFO",
"as",
"log",
"level",
"."
] | [
"func",
"(",
"l",
"*",
"Logger",
")",
"Infof",
"(",
"<mask>",
"string",
",",
"args",
"...",
"interface",
"{",
"}",
")",
"{",
"l",
".",
"log",
"(",
"INFO",
",",
"&",
"format",
",",
"args",
"...",
")",
"\n",
"}"
] |
121 | all-122 | [
"indexExists",
"checks",
"whether",
"the",
"index",
"location",
"specified",
"in",
"the",
"OCI",
"reference",
"exists",
".",
"The",
"implementation",
"is",
"opinionated",
"since",
"in",
"case",
"of",
"unexpected",
"errors",
"false",
"is",
"returned"
] | [
"func",
"indexExists",
"(",
"<mask>",
"ociReference",
")",
"bool",
"{",
"_",
",",
"err",
":=",
"os",
".",
"Stat",
"(",
"ref",
".",
"indexPath",
"(",
")",
")",
"\n",
"if",
"err",
"==",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n",
"if",
"os",
"."... |
122 | all-123 | [
"SetReview",
"writes",
"a",
"review",
"comment",
"base",
"on",
"the",
"change",
"id",
"+",
"revision"
] | [
"func",
"(",
"c",
"*",
"<mask>",
")",
"SetReview",
"(",
"instance",
",",
"id",
",",
"revision",
",",
"message",
"string",
",",
"labels",
"map",
"[",
"string",
"]",
"string",
")",
"error",
"{",
"h",
",",
"ok",
":=",
"c",
".",
"handlers",
"[",
"insta... |
123 | all-124 | [
"validate",
"performs",
"validation",
"and",
"only",
"sends",
"the",
"message",
"if",
"all",
"validators",
"succeed"
] | [
"func",
"(",
"p",
"*",
"PubSub",
")",
"validate",
"(",
"vals",
"[",
"]",
"*",
"topicVal",
",",
"src",
"peer",
".",
"ID",
",",
"msg",
"*",
"Message",
")",
"{",
"if",
"msg",
".",
"Signature",
"!=",
"nil",
"{",
"if",
"!",
"p",
".",
"validateSignatur... |
124 | all-125 | [
"Description",
"tries",
"as",
"hard",
"as",
"possible",
"to",
"give",
"you",
"a",
"one",
"sentence",
"description",
"of",
"this",
"Alert",
"based",
"on",
"its",
"contents",
".",
"Description",
"does",
"not",
"include",
"a",
"trailing",
"period",
"."
] | [
"func",
"(",
"a",
"*",
"Alert",
")",
"<mask>",
"(",
")",
"string",
"{",
"return",
"capitalize",
"(",
"strings",
".",
"TrimSpace",
"(",
"strings",
".",
"TrimSuffix",
"(",
"a",
".",
"description",
"(",
")",
",",
"\"",
"\"",
")",
")",
")",
"\n",
"}"
] |
125 | all-126 | [
"NewReader",
"-",
"get",
"a",
"new",
"s3",
"reader"
] | [
"func",
"(",
"s",
"*",
"S3Bucket",
")",
"NewReader",
"(",
"<mask>",
"string",
")",
"(",
"io",
".",
"ReadCloser",
",",
"error",
")",
"{",
"r",
",",
"_",
",",
"err",
":=",
"s",
".",
"bucket",
".",
"GetReader",
"(",
"path",
",",
"nil",
")",
"\n",
... |
126 | all-127 | [
"findChanges",
"compares",
"the",
"newList",
"of",
"coverage",
"against",
"the",
"base",
"list",
"and",
"returns",
"the",
"result"
] | [
"func",
"findChanges",
"(",
"baseList",
"*",
"calculation",
".",
"CoverageList",
",",
"newList",
"*",
"calculation",
".",
"CoverageList",
")",
"[",
"]",
"*",
"coverageChange",
"{",
"var",
"<mask>",
"[",
"]",
"*",
"coverageChange",
"\n",
"baseFilesMap",
":=",
... |
127 | all-128 | [
"RegisterInjector",
"registers",
"injector",
"for",
"given",
"format"
] | [
"func",
"(",
"t",
"*",
"MockTracer",
")",
"RegisterInjector",
"(",
"format",
"<mask>",
"{",
"}",
",",
"injector",
"Injector",
")",
"{",
"t",
".",
"injectors",
"[",
"format",
"]",
"=",
"injector",
"\n",
"}"
] |
128 | all-129 | [
"Options",
"registers",
"handlers",
"with",
"the",
"given",
"pattern",
"for",
"OPTIONS",
"method"
] | [
"func",
"(",
"r",
"*",
"<mask>",
")",
"Options",
"(",
"pat",
"string",
",",
"f",
"...",
"HandlerFunc",
")",
"{",
"r",
".",
"HandleMethod",
"(",
"pat",
",",
"\"",
"\"",
",",
"f",
"...",
")",
"\n",
"}"
] |
129 | all-130 | [
"Create",
"the",
"device",
"nodes",
"in",
"the",
"container",
"."
] | [
"func",
"createDevices",
"(",
"config",
"*",
"configs",
".",
"Config",
")",
"error",
"{",
"oldMask",
":=",
"syscall",
".",
"Umask",
"(",
"0000",
")",
"\n",
"for",
"_",
",",
"<mask>",
":=",
"range",
"config",
".",
"Devices",
"{",
"// containers running in a... |
130 | all-131 | [
"Issues",
"is",
"the",
"main",
"work",
"method",
"of",
"FlakyJobReporter",
".",
"It",
"fetches",
"and",
"parses",
"flaky",
"job",
"data",
"then",
"syncs",
"the",
"top",
"issues",
"to",
"github",
"with",
"the",
"IssueCreator",
"."
] | [
"func",
"(",
"fjr",
"*",
"FlakyJobReporter",
")",
"Issues",
"(",
"c",
"*",
"<mask>",
".",
"IssueCreator",
")",
"(",
"[",
"]",
"creator",
".",
"Issue",
",",
"error",
")",
"{",
"fjr",
".",
"creator",
"=",
"c",
"\n",
"json",
",",
"err",
":=",
"ReadHTT... |
131 | all-132 | [
"ColorToString",
"returns",
"string",
"representation",
"of",
"the",
"attribute"
] | [
"func",
"ColorToString",
"(",
"attr",
"term",
".",
"Attribute",
")",
"string",
"{",
"var",
"out",
"string",
"\n\n",
"rawClr",
":=",
"attr",
"&",
"15",
"\n",
"if",
"rawClr",
"<",
"8",
"{",
"for",
"k",
",",
"v",
":=",
"range",
"colorMap",
"{",
"if",
... |
132 | all-133 | [
"GetName",
"returns",
"the",
"Name",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"l",
"*",
"LogSet",
")",
"GetName",
"(",
")",
"string",
"{",
"if",
"l",
"==",
"nil",
"||",
"l",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"l",
".",
"Name",
"\n",
"}"
] |
133 | all-134 | [
"FormatICResponse",
"nicely",
"formats",
"a",
"response",
"to",
"an",
"issue",
"comment",
"."
] | [
"func",
"FormatICResponse",
"(",
"ic",
"github",
".",
"IssueComment",
",",
"s",
"string",
")",
"string",
"{",
"return",
"FormatResponseRaw",
"(",
"<mask>",
".",
"Body",
",",
"ic",
".",
"HTMLURL",
",",
"ic",
".",
"User",
".",
"Login",
",",
"s",
")",
"\n... |
134 | all-135 | [
"copyWithoutSnapshotsFull",
"creates",
"a",
"non",
"-",
"sparse",
"copy",
"of",
"a",
"container",
"This",
"does",
"not",
"introduce",
"a",
"dependency",
"relation",
"between",
"the",
"source",
"RBD",
"storage",
"volume",
"and",
"the",
"target",
"RBD",
"storage",... | [
"func",
"(",
"s",
"*",
"storageCeph",
")",
"copyWithoutSnapshotsFull",
"(",
"target",
"container",
",",
"source",
"container",
")",
"error",
"{",
"logger",
".",
"Debugf",
"(",
"`Creating non-sparse copy of RBD storage volume for container \"%s\" to \"%s\" without snapshots`",... |
135 | all-136 | [
"Push",
"header",
"and",
"body",
"to",
"stack",
".",
"Returns",
"new",
"value",
"of",
"stack",
"depth"
] | [
"func",
"(",
"s",
"*",
"Stack",
")",
"Push",
"(",
"header",
",",
"data",
"[",
"]",
"byte",
")",
"(",
"depth",
"int",
",",
"err",
"error",
")",
"{",
"s",
".",
"guard",
".",
"Lock",
"(",
")",
"\n",
"defer",
"s",
".",
"guard",
".",
"Unlock",
"("... |
136 | all-137 | [
"Attempted",
"returns",
"the",
"number",
"of",
"attempted",
"requests",
"for",
"an",
"id",
"in",
"the",
"current",
"period",
".",
"Attempted",
"does",
"not",
"count",
"attempts",
"that",
"exceed",
"the",
"max",
"requests",
"in",
"an",
"interval",
"and",
"onl... | [
"func",
"(",
"r",
"*",
"RateLimiter",
")",
"Attempted",
"(",
"id",
"string",
")",
"(",
"int64",
",",
"error",
")",
"{",
"hash",
":=",
"r",
".",
"hasher",
".",
"Hash",
"(",
"<mask>",
")",
"\n",
"val",
",",
"err",
":=",
"r",
".",
"redisClient",
"."... |
137 | all-138 | [
"newManagedTask",
"is",
"a",
"method",
"on",
"DockerTaskEngine",
"to",
"create",
"a",
"new",
"managedTask",
".",
"This",
"method",
"must",
"only",
"be",
"called",
"when",
"the",
"engine",
".",
"processTasks",
"write",
"lock",
"is",
"already",
"held",
"."
] | [
"func",
"(",
"engine",
"*",
"DockerTaskEngine",
")",
"newManagedTask",
"(",
"task",
"*",
"apitask",
".",
"Task",
")",
"*",
"managedTask",
"{",
"ctx",
",",
"cancel",
":=",
"context",
".",
"WithCancel",
"(",
"engine",
".",
"ctx",
")",
"\n",
"t",
":=",
"&... |
138 | all-139 | [
"Factory",
"is",
"the",
"function",
"that",
"the",
"Pachyderm",
"Vault",
"plugin",
"exports",
"to",
"let",
"Vault",
"create",
"/",
"refresh",
"/",
"revoke",
"Pachyderm",
"tokens"
] | [
"func",
"Factory",
"(",
"ctx",
"context",
".",
"Context",
",",
"c",
"*",
"logical",
".",
"BackendConfig",
")",
"(",
"logical",
".",
"Backend",
",",
"error",
")",
"{",
"result",
":=",
"&",
"backend",
"{",
"}",
"\n",
"result",
".",
"Backend",
"=",
"&",... |
139 | all-140 | [
"Update",
"update",
"rate",
"value",
"based",
"on",
"the",
"stored",
"previous",
"value",
"."
] | [
"func",
"(",
"d",
"*",
"Derive",
")",
"Update",
"(",
"v",
"float64",
")",
"{",
"p",
":=",
"atomic",
".",
"SwapUint64",
"(",
"&",
"d",
".",
"<mask>",
",",
"math",
".",
"Float64bits",
"(",
"v",
")",
")",
"\n",
"d",
".",
"rate",
".",
"Update",
"("... |
140 | all-141 | [
"ListNames",
"returns",
"a",
"list",
"of",
"non",
"deprecated",
"transport",
"names",
".",
"Deprecated",
"transports",
"can",
"be",
"used",
"but",
"are",
"not",
"presented",
"to",
"users",
"."
] | [
"func",
"ListNames",
"(",
")",
"[",
"]",
"string",
"{",
"kt",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"defer",
"kt",
".",
"mu",
".",
"Unlock",
"(",
")",
"\n",
"deprecated",
":=",
"map",
"[",
"string",
"]",
"bool",
"{",
"\"",
"\"",
":",
"<mask>"... |
141 | all-142 | [
"increaseUncommittedSize",
"computes",
"the",
"size",
"of",
"the",
"proposed",
"entries",
"and",
"determines",
"whether",
"they",
"would",
"push",
"leader",
"over",
"its",
"maxUncommittedSize",
"limit",
".",
"If",
"the",
"new",
"entries",
"would",
"exceed",
"the",... | [
"func",
"(",
"r",
"*",
"raft",
")",
"increaseUncommittedSize",
"(",
"ents",
"[",
"]",
"pb",
".",
"<mask>",
")",
"bool",
"{",
"var",
"s",
"uint64",
"\n",
"for",
"_",
",",
"e",
":=",
"range",
"ents",
"{",
"s",
"+=",
"uint64",
"(",
"PayloadSize",
"(",... |
142 | all-143 | [
"TypeString",
"returns",
"the",
"g",
"variant",
"type",
"string",
"for",
"this",
"variant",
"."
] | [
"func",
"(",
"v",
"*",
"Variant",
")",
"TypeString",
"(",
")",
"string",
"{",
"// the string returned from this belongs to GVariant and must not be freed.",
"return",
"C",
".",
"GoString",
"(",
"(",
"*",
"C",
".",
"<mask>",
")",
"(",
"C",
".",
"g_variant_get_type_... |
143 | all-144 | [
"Return",
"a",
"new",
"cache",
"with",
"a",
"given",
"default",
"expiration",
"duration",
"and",
"cleanup",
"interval",
".",
"If",
"the",
"expiration",
"duration",
"is",
"less",
"than",
"one",
"(",
"or",
"NoExpiration",
")",
"the",
"items",
"in",
"the",
"c... | [
"func",
"New",
"(",
"defaultExpiration",
",",
"cleanupInterval",
"time",
".",
"Duration",
")",
"*",
"Cache",
"{",
"items",
":=",
"<mask>",
"(",
"map",
"[",
"string",
"]",
"Item",
")",
"\n",
"return",
"newCacheWithJanitor",
"(",
"defaultExpiration",
",",
"cle... |
144 | all-145 | [
"GetStyleProperty",
"is",
"a",
"wrapper",
"around",
"gtk_style_context_get_style_property",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"StyleContext",
")",
"GetStyleProperty",
"(",
"property",
"string",
")",
"(",
"interface",
"{",
"}",
",",
"error",
")",
"{",
"cstr",
":=",
"(",
"*",
"C",
".",
"gchar",
")",
"(",
"C",
".",
"CString",
"(",
"property",
")",
")",... |
145 | all-146 | [
"readFromFS",
"reads",
"file",
"from",
"a",
"local",
"path",
"and",
"returns",
"as",
"string"
] | [
"func",
"readFromFS",
"(",
"sourcePath",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"// If sourcePath starts with ~ we search for $HOME",
"// and preppend it to the absolutePath overwriting the first character",
"// TODO: Add Windows support",
"if",
"strings",
".",
"Ha... |
146 | all-147 | [
"ApplicationIDIsValid",
"is",
"a",
"wrapper",
"around",
"g_application_id_is_valid",
"()",
"."
] | [
"func",
"ApplicationIDIsValid",
"(",
"id",
"string",
")",
"bool",
"{",
"cstr1",
":=",
"(",
"*",
"C",
".",
"gchar",
")",
"(",
"C",
".",
"CString",
"(",
"<mask>",
")",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr1",... |
147 | all-148 | [
"NewContentNegotiator",
"creates",
"a",
"basic",
"ContentNegotiator",
"with",
"out",
"any",
"attached",
"encoders"
] | [
"func",
"NewContentNegotiator",
"(",
"defaultEncoder",
"Encoder",
",",
"responseWriter",
"http",
".",
"ResponseWriter",
")",
"*",
"ContentNegotiator",
"{",
"<mask>",
":=",
"&",
"ContentNegotiator",
"{",
"}",
"\n",
"result",
".",
"DefaultEncoder",
"=",
"defaultEncode... |
148 | all-149 | [
"GetIncludeTagsOk",
"returns",
"a",
"tuple",
"with",
"the",
"IncludeTags",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"o",
"*",
"Options",
")",
"GetIncludeTagsOk",
"(",
")",
"(",
"bool",
",",
"bool",
")",
"{",
"if",
"o",
"==",
"nil",
"||",
"o",
".",
"IncludeTags",
"==",
"nil",
"{",
"return",
"<mask>",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
"o... |
149 | all-150 | [
"Validate",
"that",
"options",
"are",
"usuable"
] | [
"func",
"(",
"opts",
"*",
"<mask>",
")",
"Validate",
"(",
")",
"error",
"{",
"if",
"opts",
".",
"App",
".",
"IsZero",
"(",
")",
"{",
"opts",
".",
"App",
"=",
"meta",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"if",
"len",
"(",
"opts... |
150 | all-151 | [
"Returns",
"a",
"map",
"[",
"string",
"]",
"interface",
"at",
"the",
"key",
"and",
"whether",
"or",
"not",
"the",
"key",
"existed",
"and",
"the",
"value",
"was",
"an",
"map",
"[",
"string",
"]",
"interface",
"{}"
] | [
"func",
"(",
"t",
"Typed",
")",
"MapIf",
"(",
"key",
"string",
")",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
",",
"bool",
")",
"{",
"value",
",",
"exists",
":=",
"t",
"[",
"key",
"]",
"\n",
"if",
"exists",
"==",
"false",
"{",
"ret... |
151 | all-152 | [
"Update",
"changes",
"the",
"passphrase",
"with",
"which",
"an",
"already",
"stored",
"key",
"is",
"encrypted",
".",
"oldpass",
"must",
"be",
"the",
"current",
"passphrase",
"used",
"for",
"encryption",
"newpass",
"will",
"be",
"the",
"only",
"valid",
"passphr... | [
"func",
"(",
"kb",
"dbKeybase",
")",
"Update",
"(",
"name",
",",
"oldpass",
",",
"newpass",
"string",
")",
"error",
"{",
"info",
",",
"err",
":=",
"kb",
".",
"Get",
"(",
"name",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}"... |
152 | all-153 | [
"initFromOpenTracing",
"initializes",
"injectableSpan",
"fields",
"from",
"an",
"OpenTracing",
"Span",
"assuming",
"the",
"tracing",
"implementation",
"supports",
"Zipkin",
"-",
"style",
"span",
"IDs",
"."
] | [
"func",
"(",
"s",
"*",
"injectableSpan",
")",
"initFromOpenTracing",
"(",
"span",
"opentracing",
".",
"Span",
")",
"error",
"{",
"return",
"span",
".",
"Tracer",
"(",
")",
".",
"Inject",
"(",
"<mask>",
".",
"Context",
"(",
")",
",",
"zipkinSpanFormat",
"... |
153 | all-154 | [
"gitCtxForRefs",
"creates",
"a",
"gitCtx",
"based",
"on",
"the",
"provide",
"refs",
"and",
"baseDir",
"."
] | [
"func",
"gitCtxForRefs",
"(",
"refs",
"prowapi",
".",
"Refs",
",",
"baseDir",
"string",
",",
"env",
"[",
"]",
"<mask>",
")",
"gitCtx",
"{",
"g",
":=",
"gitCtx",
"{",
"cloneDir",
":",
"PathForRefs",
"(",
"baseDir",
",",
"refs",
")",
",",
"env",
":",
"... |
154 | all-155 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"SetBreakpointReturns",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger10",
"(",
"&... |
155 | all-156 | [
"GetTitleSize",
"returns",
"the",
"TitleSize",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"l",
"*",
"LogStreamDefinition",
")",
"GetTitleSize",
"(",
")",
"<mask>",
"{",
"if",
"l",
"==",
"nil",
"||",
"l",
".",
"TitleSize",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"l",
".",
"TitleSize",
"\n",
"}... |
156 | all-157 | [
"GetCmd",
"returns",
"a",
"cobra",
"command",
"that",
"gets",
"either",
"the",
"ACL",
"for",
"a",
"Pachyderm",
"repo",
"or",
"another",
"user",
"s",
"scope",
"of",
"access",
"to",
"that",
"repo"
] | [
"func",
"GetCmd",
"(",
"noMetrics",
",",
"noPortForwarding",
"*",
"bool",
")",
"*",
"cobra",
".",
"Command",
"{",
"<mask>",
":=",
"&",
"cobra",
".",
"Command",
"{",
"Use",
":",
"\"",
"\"",
",",
"Short",
":",
"\"",
"\"",
",",
"Long",
":",
"\"",
"\""... |
157 | all-158 | [
"Contains",
"determines",
"is",
"a",
"field",
"exists",
"in",
"the",
"TupleType"
] | [
"func",
"(",
"t",
"*",
"TupleType",
")",
"Contains",
"(",
"field",
"string",
")",
"bool",
"{",
"_",
",",
"exists",
":=",
"t",
".",
"fields",
"[",
"<mask>",
"]",
"\n",
"return",
"exists",
"\n",
"}"
] |
158 | all-159 | [
"RowsLimitColumn",
"creates",
"a",
"Row",
"query",
"with",
"the",
"given",
"limit",
"and",
"column",
"ID",
"/",
"key"
] | [
"func",
"(",
"f",
"*",
"Field",
")",
"RowsLimitColumn",
"(",
"limit",
"int64",
",",
"columnIDOrKey",
"interface",
"{",
"}",
")",
"*",
"PQLRowsQuery",
"{",
"if",
"limit",
"<",
"0",
"{",
"return",
"NewPQLRowsQuery",
"(",
"\"",
"\"",
",",
"f",
".",
"index... |
159 | all-160 | [
"Range",
"returns",
"the",
"counters",
"within",
"some",
"lat",
"lng",
"range",
"."
] | [
"func",
"(",
"countIndex",
"*",
"CountIndex",
")",
"Range",
"(",
"topLeft",
"Point",
",",
"bottomRight",
"Point",
")",
"[",
"]",
"Point",
"{",
"counters",
":=",
"countIndex",
".",
"index",
".",
"Range",
"(",
"topLeft",
",",
"bottomRight",
")",
"\n\n",
"<... |
160 | all-161 | [
"Bind",
"the",
"interface",
"to",
"the",
"request",
".",
"Body",
".",
"The",
"type",
"of",
"binding",
"is",
"dependent",
"on",
"the",
"Content",
"-",
"Type",
"for",
"the",
"request",
".",
"If",
"the",
"type",
"is",
"application",
"/",
"json",
"it",
"wi... | [
"func",
"(",
"d",
"*",
"DefaultContext",
")",
"Bind",
"(",
"<mask>",
"interface",
"{",
"}",
")",
"error",
"{",
"return",
"binding",
".",
"Exec",
"(",
"d",
".",
"Request",
"(",
")",
",",
"value",
")",
"\n",
"}"
] |
161 | all-162 | [
"Error",
"writes",
"the",
"given",
"values",
"to",
"the",
"Target",
"logger",
"."
] | [
"func",
"(",
"t",
"*",
"Target",
")",
"<mask>",
"(",
"v",
"error",
")",
"{",
"t",
".",
"mut",
".",
"RLock",
"(",
")",
"\n",
"defer",
"t",
".",
"mut",
".",
"RUnlock",
"(",
")",
"\n",
"if",
"t",
".",
"logger",
"!=",
"nil",
"{",
"t",
".",
"log... |
162 | all-163 | [
"tagsFromMetric",
"translates",
"Prometheus",
"metric",
"into",
"OpenTSDB",
"tags",
"."
] | [
"func",
"tagsFromMetric",
"(",
"m",
"<mask>",
".",
"Metric",
")",
"map",
"[",
"string",
"]",
"TagValue",
"{",
"tags",
":=",
"make",
"(",
"map",
"[",
"string",
"]",
"TagValue",
",",
"len",
"(",
"m",
")",
"-",
"1",
")",
"\n",
"for",
"l",
",",
"v",
... |
163 | all-164 | [
"WithMinDuration",
"the",
"minimum",
"duration",
"(",
"in",
"seconds",
")",
"to",
"replay",
"the",
"snapshot",
"."
] | [
"func",
"(",
"p",
"ProfileSnapshotParams",
")",
"WithMinDuration",
"(",
"minDuration",
"float64",
")",
"*",
"ProfileSnapshotParams",
"{",
"p",
".",
"MinDuration",
"=",
"minDuration",
"\n",
"<mask>",
"&",
"p",
"\n",
"}"
] |
164 | all-165 | [
"ForEachRoot",
"calls",
"fn",
"with",
"each",
"garbage",
"collection",
"root",
".",
"If",
"fn",
"returns",
"false",
"ForEachRoot",
"returns",
"immediately",
"."
] | [
"func",
"(",
"p",
"*",
"Process",
")",
"ForEachRoot",
"(",
"fn",
"func",
"(",
"r",
"*",
"<mask>",
")",
"bool",
")",
"{",
"for",
"_",
",",
"r",
":=",
"range",
"p",
".",
"globals",
"{",
"if",
"!",
"fn",
"(",
"r",
")",
"{",
"return",
"\n",
"}",
... |
165 | all-166 | [
"SubmitContainerStateChange",
"indicates",
"an",
"expected",
"call",
"of",
"SubmitContainerStateChange"
] | [
"func",
"(",
"mr",
"*",
"MockECSSubmitStateSDKMockRecorder",
")",
"SubmitContainerStateChange",
"(",
"arg0",
"<mask>",
"{",
"}",
")",
"*",
"gomock",
".",
"Call",
"{",
"return",
"mr",
".",
"mock",
".",
"ctrl",
".",
"RecordCallWithMethodType",
"(",
"mr",
".",
... |
166 | all-167 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SamplingHeapProfile",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler8",
"(",
"&",
"w",
",",
"v",... |
167 | all-168 | [
"NewMux",
"returns",
"a",
"newly",
"initialized",
"Mux",
"object",
"that",
"implements",
"the",
"Router",
"interface",
"."
] | [
"func",
"NewMux",
"(",
")",
"*",
"Mux",
"{",
"mux",
":=",
"&",
"Mux",
"{",
"<mask>",
":",
"&",
"node",
"{",
"}",
",",
"pool",
":",
"&",
"sync",
".",
"Pool",
"{",
"}",
"}",
"\n",
"mux",
".",
"pool",
".",
"New",
"=",
"func",
"(",
")",
"interf... |
168 | all-169 | [
"ReceiveEvent",
"checks",
"if",
"the",
"event",
"matches",
"the",
"entry",
"criteria",
"Returns",
"a",
"new",
"ActiveState",
"or",
"self",
"and",
"true",
"if",
"it",
"changed",
"."
] | [
"func",
"(",
"i",
"*",
"InactiveState",
")",
"ReceiveEvent",
"(",
"eventName",
",",
"label",
"string",
",",
"t",
"<mask>",
".",
"Time",
")",
"(",
"State",
",",
"bool",
")",
"{",
"if",
"i",
".",
"entry",
".",
"Match",
"(",
"eventName",
",",
"label",
... |
169 | all-170 | [
"Helper",
"to",
"bootstrap",
"the",
"raft",
"cluster",
"if",
"needed",
"."
] | [
"func",
"raftMaybeBootstrap",
"(",
"conf",
"*",
"raft",
".",
"Config",
",",
"logs",
"*",
"raftboltdb",
".",
"BoltStore",
",",
"snaps",
"raft",
".",
"SnapshotStore",
",",
"trans",
"raft",
".",
"Transport",
")",
"error",
"{",
"// First check if we were already boo... |
170 | all-171 | [
"ForEachRecordSet",
"calls",
"handler",
"for",
"each",
"recordset",
"in",
"the",
"given",
"DNS",
"zone"
] | [
"func",
"(",
"c",
"designateClient",
")",
"ForEachRecordSet",
"(",
"zoneID",
"string",
",",
"handler",
"func",
"(",
"recordSet",
"*",
"recordsets",
".",
"RecordSet",
")",
"error",
")",
"error",
"{",
"pager",
":=",
"recordsets",
".",
"ListByZone",
"(",
"c",
... |
171 | all-172 | [
"HasPalette",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"d",
"*",
"DashboardConditionalFormat",
")",
"HasPalette",
"(",
")",
"bool",
"{",
"if",
"d",
"!=",
"nil",
"&&",
"d",
".",
"Palette",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
172 | all-173 | [
"ApprovalLocator",
"builds",
"a",
"locator",
"from",
"the",
"given",
"href",
"."
] | [
"func",
"(",
"api",
"*",
"API",
")",
"ApprovalLocator",
"(",
"href",
"<mask>",
")",
"*",
"ApprovalLocator",
"{",
"return",
"&",
"ApprovalLocator",
"{",
"Href",
"(",
"href",
")",
",",
"api",
"}",
"\n",
"}"
] |
173 | all-174 | [
"IsISOCountryCode",
"returns",
"true",
"if",
"the",
"input",
"is",
"a",
"known",
"two",
"-",
"letter",
"country",
"code",
".",
"TODO",
":",
"Document",
"where",
"the",
"list",
"of",
"known",
"countries",
"came",
"from",
"."
] | [
"func",
"IsISOCountryCode",
"(",
"<mask>",
"string",
")",
"bool",
"{",
"in",
"=",
"strings",
".",
"ToUpper",
"(",
"in",
")",
"\n",
"_",
",",
"ok",
":=",
"countries",
"[",
"in",
"]",
"\n",
"return",
"ok",
"\n",
"}"
] |
174 | all-175 | [
"Inspect",
"returns",
"various",
"information",
"for",
"(",
"skopeo",
"inspect",
")",
"parsed",
"from",
"the",
"manifest",
"and",
"configuration",
"."
] | [
"func",
"(",
"m",
"*",
"manifestSchema1",
")",
"Inspect",
"(",
"context",
".",
"Context",
")",
"(",
"*",
"<mask>",
".",
"ImageInspectInfo",
",",
"error",
")",
"{",
"return",
"m",
".",
"m",
".",
"Inspect",
"(",
"nil",
")",
"\n",
"}"
] |
175 | all-176 | [
"TemplateWithDelimiters",
"is",
"string",
"template",
"with",
"user",
"-",
"defineable",
"opening",
"and",
"closing",
"delimiters",
"."
] | [
"func",
"TemplateWithDelimiters",
"(",
"s",
"string",
",",
"values",
"<mask>",
"[",
"string",
"]",
"interface",
"{",
"}",
",",
"opening",
",",
"closing",
"string",
")",
"string",
"{",
"escapeDelimiter",
":=",
"func",
"(",
"delim",
"string",
")",
"string",
... |
176 | all-177 | [
"Delete2",
"is",
"same",
"as",
"Delete",
"()",
".",
"Additionally",
"returns",
"the",
"deleted",
"item",
"s",
"node"
] | [
"func",
"(",
"w",
"*",
"<mask>",
")",
"Delete2",
"(",
"bs",
"[",
"]",
"byte",
")",
"(",
"n",
"*",
"skiplist",
".",
"Node",
",",
"success",
"bool",
")",
"{",
"if",
"n",
":=",
"w",
".",
"GetNode",
"(",
"bs",
")",
";",
"n",
"!=",
"nil",
"{",
"... |
177 | all-178 | [
"Apply",
"satisfies",
"the",
"StartSpanOption",
"interface",
"."
] | [
"func",
"(",
"t",
"Tag",
")",
"Apply",
"(",
"o",
"*",
"StartSpanOptions",
")",
"{",
"if",
"o",
".",
"Tags",
"==",
"nil",
"{",
"o",
".",
"Tags",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"}",
"\n",
"o",
"."... |
178 | all-179 | [
"helpProvider",
"provides",
"information",
"on",
"the",
"plugin"
] | [
"func",
"helpProvider",
"(",
"config",
"*",
"plugins",
".",
"<mask>",
",",
"enabledRepos",
"[",
"]",
"string",
")",
"(",
"*",
"pluginhelp",
".",
"PluginHelp",
",",
"error",
")",
"{",
"// Only the Description field is specified because this plugin is not triggered with c... |
179 | all-180 | [
"Time",
"returns",
"a",
"new",
"time",
".",
"Time",
"object",
"from",
"a",
"millisecond",
"timestamp",
"."
] | [
"func",
"Time",
"(",
"ts",
"int64",
")",
"time",
".",
"Time",
"{",
"return",
"time",
".",
"Unix",
"(",
"ts",
"/",
"1000",
",",
"(",
"ts",
"%",
"1000",
")",
"*",
"int64",
"(",
"<mask>",
".",
"Millisecond",
")",
")",
"\n",
"}"
] |
180 | all-181 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetFrameTreeParams",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage41",
"(",
"&",
"... |
181 | all-182 | [
"GetAsVersion",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockResult",
")",
"GetAsVersion",
"(",
"arg0",
"string",
")",
"(",
"types",
".",
"Result",
",",
"error",
")",
"{",
"<mask>",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
",",
"arg0",
")",
"\n",
"ret0",
... |
182 | all-183 | [
"GeckoDriver",
"returns",
"an",
"instance",
"of",
"a",
"geckodriver",
"WebDriver",
"which",
"supports",
"gecko",
"based",
"brwoser",
"like",
"Firefox",
".",
"Provided",
"Options",
"will",
"apply",
"as",
"default",
"arguments",
"for",
"new",
"pages",
".",
"See",
... | [
"func",
"GeckoDriver",
"(",
"options",
"...",
"Option",
")",
"*",
"WebDriver",
"{",
"var",
"binaryName",
"string",
"\n",
"if",
"runtime",
".",
"GOOS",
"==",
"\"",
"\"",
"{",
"binaryName",
"=",
"\"",
"\"",
"\n",
"}",
"else",
"{",
"binaryName",
"=",
"\""... |
183 | all-184 | [
"Close",
"closes",
"the",
"connection",
"."
] | [
"func",
"(",
"f",
"*",
"Fluent",
")",
"Close",
"(",
")",
"(",
"err",
"error",
")",
"{",
"if",
"f",
".",
"conn",
"!=",
"nil",
"{",
"f",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"defer",
"f",
".",
"mu",
".",
"Unlock",
"(",
")",
"\n",
"}",
"e... |
184 | all-185 | [
"===",
"Vector",
"(",
"s",
"Scalar",
")",
"Vector",
"==="
] | [
"func",
"funcVector",
"(",
"vals",
"[",
"]",
"Value",
",",
"args",
"Expressions",
",",
"enh",
"*",
"EvalNodeHelper",
")",
"Vector",
"{",
"return",
"<mask>",
"(",
"enh",
".",
"out",
",",
"Sample",
"{",
"Metric",
":",
"labels",
".",
"Labels",
"{",
"}",
... |
185 | all-186 | [
"------------------------------------------------------------------------------",
"Process",
"will",
"use",
"the",
"Pool",
"to",
"process",
"a",
"payload",
"and",
"synchronously",
"return",
"the",
"result",
".",
"Process",
"can",
"be",
"called",
"safely",
"by",
"any",
"... | [
"func",
"(",
"p",
"*",
"Pool",
")",
"Process",
"(",
"payload",
"interface",
"{",
"}",
")",
"interface",
"{",
"}",
"{",
"atomic",
".",
"AddInt64",
"(",
"&",
"p",
".",
"queuedJobs",
",",
"1",
")",
"\n\n",
"request",
",",
"open",
":=",
"<-",
"p",
".... |
186 | all-187 | [
"ApplyChanges",
"applies",
"a",
"given",
"set",
"of",
"changes",
"in",
"a",
"given",
"zone",
"."
] | [
"func",
"(",
"p",
"designateProvider",
")",
"ApplyChanges",
"(",
"<mask>",
"*",
"plan",
".",
"Changes",
")",
"error",
"{",
"managedZones",
",",
"err",
":=",
"p",
".",
"getZones",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"... |
187 | all-188 | [
"HTTP",
"returns",
"a",
"handler",
"that",
"will",
"check",
"each",
"request",
"s",
"method",
"against",
"a",
"predefined",
"whitelist",
".",
"If",
"the",
"request",
"s",
"method",
"is",
"not",
"part",
"of",
"the",
"list",
"the",
"response",
"will",
"be",
... | [
"func",
"HTTP",
"(",
"h",
"http",
".",
"Handler",
",",
"verb",
"Verb",
",",
"verbs",
"...",
"Verb",
")",
"http",
".",
"<mask>",
"{",
"verbSet",
":=",
"map",
"[",
"Verb",
"]",
"struct",
"{",
"}",
"{",
"verb",
":",
"struct",
"{",
"}",
"{",
"}",
"... |
188 | all-189 | [
"NewDedupManager",
"creates",
"a",
"new",
"Dedup",
"manager"
] | [
"func",
"NewDedupManager",
"(",
"config",
"*",
"config",
".",
"DedupConfig",
",",
"clients",
"*",
"dep",
".",
"ClientSet",
",",
"brain",
"*",
"template",
".",
"Brain",
",",
"templates",
"[",
"]",
"*",
"template",
".",
"<mask>",
")",
"(",
"*",
"DedupManag... |
189 | all-190 | [
"Delete",
"marks",
"the",
"current",
"iterator",
"record",
"as",
"deleted",
"from",
"the",
"store",
"if",
"it",
"has",
"not",
"been",
"updated",
"since",
"iterating",
"or",
"seeking",
"to",
"it",
".",
"If",
"the",
"record",
"has",
"been",
"updated",
"then"... | [
"func",
"(",
"it",
"*",
"Iterator",
")",
"Delete",
"(",
")",
"error",
"{",
"if",
"!",
"atomic",
".",
"CompareAndSwapUint64",
"(",
"&",
"it",
".",
"nd",
".",
"value",
",",
"it",
".",
"value",
",",
"deletedVal",
")",
"{",
"if",
"it",
".",
"setNode",
... |
190 | all-191 | [
"Root",
"creates",
"new",
"test",
"directory"
] | [
"func",
"Root",
"(",
"t",
"*",
"testing",
".",
"T",
",",
"callback",
"func",
"(",
"dir",
"string",
")",
")",
"{",
"tmpDir",
",",
"err",
":=",
"ioutil",
".",
"TempDir",
"(",
"\"",
"\"",
",",
"\"",
"\"",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
... |
191 | all-192 | [
"setTaskAttachmentSent",
"sets",
"the",
"event",
"s",
"task",
"attachment",
"object",
"as",
"sent"
] | [
"func",
"setTaskAttachmentSent",
"(",
"<mask>",
"*",
"sendableEvent",
")",
"{",
"if",
"event",
".",
"taskChange",
".",
"Attachment",
"!=",
"nil",
"{",
"event",
".",
"taskChange",
".",
"Attachment",
".",
"SetSentStatus",
"(",
")",
"\n",
"event",
".",
"taskCha... |
192 | all-193 | [
"This",
"is",
"useful",
"with",
"kingpin",
"option",
"parser"
] | [
"func",
"(",
"o",
"*",
"BoolOption",
")",
"Set",
"(",
"s",
"string",
")",
"error",
"{",
"err",
":=",
"convertString",
"(",
"s",
",",
"&",
"o",
".",
"<mask>",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"o",
".",
... |
193 | all-194 | [
"CreateCommentReaction",
"adds",
"emoji",
"to",
"a",
"comment",
"."
] | [
"func",
"(",
"f",
"*",
"FakeClient",
")",
"CreateCommentReaction",
"(",
"org",
",",
"repo",
"string",
",",
"<mask>",
"int",
",",
"reaction",
"string",
")",
"error",
"{",
"f",
".",
"CommentReactionsAdded",
"=",
"append",
"(",
"f",
".",
"CommentReactionsAdded"... |
194 | all-195 | [
"processAttachOperations",
"processes",
"all",
"pending",
"attach",
"operations",
"by",
"diffing",
"old",
"and",
"new",
"and",
"adding",
"any",
"IDs",
"that",
"were",
"not",
"found",
"in",
"old",
"."
] | [
"func",
"(",
"p",
"*",
"tagDiffProcessor",
")",
"processAttachOperations",
"(",
")",
"error",
"{",
"tagIDs",
":=",
"p",
".",
"diffNewOld",
"(",
")",
"\n",
"if",
"len",
"(",
"tagIDs",
")",
"<",
"1",
"{",
"// Nothing to do",
"return",
"nil",
"\n",
"}",
"... |
195 | all-196 | [
"Counter",
"fetches",
"an",
"instrument",
"from",
"the",
"registry",
"or",
"creates",
"a",
"new",
"one",
".",
"If",
"another",
"instrument",
"type",
"is",
"already",
"registered",
"with",
"the",
"same",
"name",
"/",
"tags",
"a",
"blank",
"one",
"will",
"be... | [
"func",
"(",
"r",
"*",
"Registry",
")",
"Counter",
"(",
"name",
"string",
",",
"tags",
"[",
"]",
"string",
")",
"*",
"Counter",
"{",
"return",
"r",
".",
"fetchCounter",
"(",
"<mask>",
",",
"tags",
",",
"newCounter",
")",
"\n",
"}"
] |
196 | all-197 | [
"determine",
"if",
"a",
"name",
"corresponds",
"to",
"a",
"framebuffer",
"object"
] | [
"func",
"IsFramebuffer",
"(",
"framebuffer",
"uint32",
")",
"bool",
"{",
"<mask>",
",",
"_",
",",
"_",
":=",
"syscall",
".",
"Syscall",
"(",
"gpIsFramebuffer",
",",
"1",
",",
"uintptr",
"(",
"framebuffer",
")",
",",
"0",
",",
"0",
")",
"\n",
"return",
... |
197 | all-198 | [
"SetFocusVAdjustment",
"is",
"a",
"wrapper",
"around",
"gtk_container_set_focus_vadjustment",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"SetFocusVAdjustment",
"(",
"adjustment",
"*",
"Adjustment",
")",
"{",
"C",
".",
"gtk_container_set_focus_vadjustment",
"(",
"v",
".",
"native",
"(",
")",
",",
"adjustment",
".",
"native",
"(",
")",
")",
"\n",
"}"
] |
198 | all-199 | [
"Kill",
"terminates",
"current",
"container",
"process",
"."
] | [
"func",
"(",
"s",
"*",
"Container",
")",
"Kill",
"(",
")",
"error",
"{",
"err",
":=",
"exec",
".",
"Command",
"(",
"s",
".",
"docker",
".",
"binCmd",
",",
"\"",
"\"",
",",
"s",
".",
"id",
")",
".",
"Run",
"(",
")",
"\n",
"if",
"err",
"!=",
... |
199 | all-200 | [
"clientConfig",
".",
"Namespace",
"()",
"is",
"broken",
"in",
"client",
"-",
"go",
"3",
".",
"0",
":",
"namespace",
"in",
"config",
"erroneously",
"overrides",
"explicit",
"--",
"namespace"
] | [
"func",
"defaultNamespace",
"(",
"c",
"clientcmd",
".",
"ClientConfig",
")",
"(",
"string",
",",
"error",
")",
"{",
"if",
"overrides",
".",
"Context",
".",
"Namespace",
"!=",
"\"",
"\"",
"{",
"return",
"overrides",
".",
"<mask>",
".",
"Namespace",
",",
"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.