id
int32
0
25.3k
idx
stringlengths
5
9
nl_tokens
listlengths
1
418
pl_tokens
listlengths
22
4.98k
900
all-901
[ "ParseReference", "converts", "a", "string", "which", "should", "not", "start", "with", "the", "ImageTransport", ".", "Name", "prefix", "into", "an", "ImageReference", "." ]
[ "func", "(", "t", "openshiftTransport", ")", "ParseReference", "(", "<mask>", "string", ")", "(", "types", ".", "ImageReference", ",", "error", ")", "{", "return", "ParseReference", "(", "reference", ")", "\n", "}" ]
901
all-902
[ "resourceVSphereDatastoreClusterApplyFolderChange", "applies", "any", "changes", "to", "a", "StoragePod", "s", "folder", "location", "." ]
[ "func", "resourceVSphereDatastoreClusterApplyFolderChange", "(", "d", "*", "schema", ".", "ResourceData", ",", "meta", "interface", "{", "}", ",", "pod", "*", "<mask>", ".", "StoragePod", ",", ")", "(", "*", "object", ".", "StoragePod", ",", "error", ")", "{...
902
all-903
[ "On", "adds", "[", "LEFT", "]", "JOIN", "...", "ON", "clause", "to", "the", "Condition", "and", "returns", "it", "for", "method", "chain", "." ]
[ "func", "(", "jc", "*", "JoinCondition", ")", "On", "(", "larg", "interface", "{", "}", ",", "args", "...", "string", ")", "*", "Condition", "{", "var", "lcolumn", "string", "\n", "switch", "rv", ":=", "reflect", ".", "ValueOf", "(", "larg", ")", ";"...
903
all-904
[ "Send", "sends", "the", "given", "message", "through", "the", "connection", "." ]
[ "func", "(", "c", "*", "Conn", ")", "send", "(", "msg", "interface", "{", "}", ")", "error", "{", "if", "!", "c", ".", "connected", ".", "Load", "(", ")", ".", "(", "bool", ")", "{", "return", "<mask>", ".", "New", "(", "\"", "\"", ")", "\n",...
904
all-905
[ "Expect", "is", "used", "to", "make", "assertions", ".", "See", "documentation", "for", "Expect", "." ]
[ "func", "(", "g", "*", "WithT", ")", "Expect", "(", "actual", "interface", "{", "}", ",", "extra", "...", "<mask>", "{", "}", ")", "Assertion", "{", "return", "assertion", ".", "New", "(", "actual", ",", "testingtsupport", ".", "BuildTestingTGomegaFailWrap...
905
all-906
[ "GetValueOk", "returns", "a", "tuple", "with", "the", "Value", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "g", "*", "GraphDefinitionMarker", ")", "GetValueOk", "(", ")", "(", "string", ",", "bool", ")", "{", "if", "g", "==", "nil", "||", "g", ".", "Value", "==", "nil", "{", "return", "\"", "\"", ",", "<mask>", "\n", "}", "\n", "return", ...
906
all-907
[ "StartStatusCheck", "starts", "a", "periodic", "status", "checker", "." ]
[ "func", "(", "r", "*", "Server", ")", "StartStatusCheck", "(", ")", "{", "// Initialize the last changed timestamp", "r", ".", "hasStatusChanged", "(", ")", "\n\n", "r", ".", "statusDone", "=", "make", "(", "chan", "int", ")", "\n", "<mask>", "func", "(", ...
907
all-908
[ "Reset", "sets", "the", "Backoff", "to", "its", "initial", "conditions", "ready", "to", "start", "over", "." ]
[ "func", "(", "b", "*", "Backoff", ")", "Reset", "(", ")", "{", "b", ".", "<mask>", "=", "0", "\n", "b", ".", "LastDuration", "=", "0", "\n", "b", ".", "NextDuration", "=", "b", ".", "getNextDuration", "(", ")", "\n", "}" ]
908
all-909
[ "AllPeriodics", "returns", "all", "prow", "periodic", "jobs", "." ]
[ "func", "(", "c", "*", "JobConfig", ")", "AllPeriodics", "(", ")", "[", "]", "Periodic", "{", "var", "listPeriodic", "func", "(", "ps", "[", "]", "Periodic", ")", "[", "]", "Periodic", "\n", "listPeriodic", "=", "func", "(", "ps", "[", "]", "Periodic...
909
all-910
[ "SetScheme", "sets", "the", "scheme", "of", "this", "URI", "." ]
[ "func", "(", "u", "*", "URI", ")", "SetScheme", "(", "scheme", "string", ")", "error", "{", "m", ":=", "schemeRegexp", ".", "FindStringSubmatch", "(", "scheme", ")", "\n", "if", "m", "==", "nil", "{", "return", "<mask>", ".", "New", "(", "\"", "\"", ...
910
all-911
[ "ServerBaseContext", "wraps", "an", "http", ".", "Handler", "to", "set", "the", "request", "context", "to", "the", "baseCtx", "." ]
[ "func", "ServerBaseContext", "(", "baseCtx", "context", ".", "Context", ",", "h", "http", ".", "Handler", ")", "http", ".", "Handler", "{", "fn", ":=", "http", ".", "HandlerFunc", "(", "func", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "ht...
911
all-912
[ "ImageImport", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockClient", ")", "ImageImport", "(", "arg0", "context", ".", "<mask>", ",", "arg1", "types", ".", "ImageImportSource", ",", "arg2", "string", ",", "arg3", "types", ".", "ImageImportOptions", ")", "(", "io", ".", "ReadCloser", ",", ...
912
all-913
[ "ProfileContainersGet", "gets", "the", "names", "of", "the", "containers", "associated", "with", "the", "profile", "with", "the", "given", "name", "." ]
[ "func", "(", "c", "*", "Cluster", ")", "ProfileContainersGet", "(", "project", ",", "<mask>", "string", ")", "(", "map", "[", "string", "]", "[", "]", "string", ",", "error", ")", "{", "err", ":=", "c", ".", "Transaction", "(", "func", "(", "tx", "...
913
all-914
[ "NewInfo", "returns", "a", "info", "describing", "the", "named", "file", "." ]
[ "func", "NewInfo", "(", "name", "string", ")", "(", "*", "info", ",", "error", ")", "{", "i", ",", "err", ":=", "os", ".", "Stat", "(", "<mask>", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "return", ...
914
all-915
[ "NewMockCNIClient", "creates", "a", "new", "mock", "instance" ]
[ "func", "NewMockCNIClient", "(", "ctrl", "*", "gomock", ".", "<mask>", ")", "*", "MockCNIClient", "{", "mock", ":=", "&", "MockCNIClient", "{", "ctrl", ":", "ctrl", "}", "\n", "mock", ".", "recorder", "=", "&", "MockCNIClientMockRecorder", "{", "mock", "}"...
915
all-916
[ "newArchive50", "creates", "a", "new", "fileBlockReader", "for", "a", "Version", "5", "archive", "." ]
[ "func", "newArchive50", "(", "r", "*", "bufio", ".", "Reader", ",", "password", "string", ")", "fileBlockReader", "{", "a", ":=", "new", "(", "archive50", ")", "\n", "a", ".", "v", "=", "r", "\n", "a", ".", "pass", "=", "[", "]", "byte", "(", "<m...
916
all-917
[ "Start", "provides", "a", "mock", "function", "with", "given", "fields", ":", "_a0", "_a1", "_a2", "_a3", "_a4", "_a5" ]
[ "func", "(", "_m", "*", "Storage", ")", "Start", "(", "_a0", "context", ".", "Context", ",", "_a1", "string", ",", "_a2", "string", ",", "_a3", "string", ",", "_a4", "string", ",", "_a5", "map", "[", "string", "]", "string", ")", "(", "*", "mnemosy...
917
all-918
[ "Insert", "is", "a", "wrapper", "around", "g_menu_insert", "()", "." ]
[ "func", "(", "v", "*", "Menu", ")", "Insert", "(", "<mask>", "int", ",", "label", ",", "detailed_action", "string", ")", "{", "cstr1", ":=", "(", "*", "C", ".", "gchar", ")", "(", "C", ".", "CString", "(", "label", ")", ")", "\n", "defer", "C", ...
918
all-919
[ "FromBase64ToHex", "return", "hex", "of", "base", "64", "encoded", "." ]
[ "func", "FromBase64ToHex", "(", "s", "Base64String", ")", "(", "string", ",", "error", ")", "{", "b", ",", "err", ":=", "ToBytes", "(", "s", ")", "\n", "if", "err", "!=", "nil", "{", "return", "\"", "\"", ",", "err", "\n", "}", "\n", "return", "<...
919
all-920
[ "useLine", "is", "like", "cobra", ".", "Command", ".", "UseLine", "but", "tweaked", "to", "use", "commandPath", "." ]
[ "func", "useLine", "(", "c", "*", "cobra", ".", "Command", ")", "string", "{", "<mask>", "useline", "string", "\n", "if", "c", ".", "HasParent", "(", ")", "{", "useline", "=", "commandPath", "(", "c", ".", "Parent", "(", ")", ")", "+", "\"", "\"", ...
920
all-921
[ "Calculates", "the", "per", "-", "element", "bit", "-", "wise", "disjunction", "of", "an", "array", "and", "a", "scalar", "." ]
[ "func", "OrScalar", "(", "src", "*", "IplImage", ",", "<mask>", "Scalar", ",", "dst", "*", "IplImage", ")", "{", "OrScalarWithMask", "(", "src", ",", "value", ",", "dst", ",", "nil", ")", "\n", "}" ]
921
all-922
[ "ParseReference", "converts", "a", "string", "which", "should", "not", "start", "with", "the", "ImageTransport", ".", "Name", "prefix", "into", "an", "ImageReference", "." ]
[ "func", "(", "s", "stubTransport", ")", "ParseReference", "(", "<mask>", "string", ")", "(", "types", ".", "ImageReference", ",", "error", ")", "{", "return", "nil", ",", "fmt", ".", "Errorf", "(", "`The transport \"%s:\" is not supported in this build`", ",", "...
922
all-923
[ "WithRoute", "adds", "the", "route", "to", "the", "put", "apps", "app", "routes", "route", "params" ]
[ "func", "(", "o", "*", "PutAppsAppRoutesRouteParams", ")", "WithRoute", "(", "route", "string", ")", "*", "PutAppsAppRoutesRouteParams", "{", "o", ".", "SetRoute", "(", "<mask>", ")", "\n", "return", "o", "\n", "}" ]
923
all-924
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "TakePreciseCoverageParams", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler5", "(", "&", "w", ",", "v...
924
all-925
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "ProfileSnapshotReturns", ")", "UnmarshalJSON", "(", "<mask>", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree7", "(", ...
925
all-926
[ "GetEvaluationDuration", "returns", "the", "time", "in", "seconds", "it", "took", "to", "evaluate", "the", "rule", "group", "." ]
[ "func", "(", "g", "*", "Group", ")", "GetEvaluationDuration", "(", ")", "<mask>", ".", "Duration", "{", "g", ".", "mtx", ".", "Lock", "(", ")", "\n", "defer", "g", ".", "mtx", ".", "Unlock", "(", ")", "\n", "return", "g", ".", "evaluationDuration", ...
926
all-927
[ "===", "Scalar", "(", "node", "ValueTypeVector", ")", "Scalar", "===" ]
[ "func", "funcScalar", "(", "vals", "[", "]", "Value", ",", "args", "Expressions", ",", "enh", "*", "EvalNodeHelper", ")", "Vector", "{", "v", ":=", "vals", "[", "0", "]", ".", "(", "Vector", ")", "\n", "if", "len", "(", "v", ")", "!=", "1", "{", ...
927
all-928
[ "checkRulesGoVersion", "checks", "whether", "a", "compatible", "version", "of", "rules_go", "is", "being", "used", "in", "the", "workspace", ".", "A", "message", "will", "be", "logged", "if", "an", "incompatible", "version", "is", "found", ".", "Note", "that",...
[ "func", "checkRulesGoVersion", "(", "repoRoot", "string", ")", "{", "const", "message", "=", "`Gazelle may not be compatible with this version of rules_go.\nUpdate io_bazel_rules_go to a newer version in your WORKSPACE file.`", "\n\n", "rulesGoPath", ",", "err", ":=", "repo", ".", ...
928
all-929
[ "addedBlockingPresubmits", "determines", "new", "blocking", "presubmits", "based", "on", "a", "config", "update", ".", "New", "blocking", "presubmits", "are", "either", "brand", "-", "new", "presubmits", "or", "extant", "presubmits", "that", "are", "now", "reporti...
[ "func", "addedBlockingPresubmits", "(", "old", ",", "new", "map", "[", "string", "]", "[", "]", "config", ".", "Presubmit", ")", "map", "[", "string", "]", "[", "]", "config", ".", "Presubmit", "{", "added", ":=", "map", "[", "string", "]", "[", "]",...
929
all-930
[ "GetTitle", "()", "is", "a", "wrapper", "around", "gtk_native_dialog_get_title", "()", "." ]
[ "func", "(", "v", "*", "NativeDialog", ")", "GetTitle", "(", ")", "(", "string", ",", "error", ")", "{", "<mask>", "stringReturn", "(", "(", "*", "C", ".", "gchar", ")", "(", "C", ".", "gtk_native_dialog_get_title", "(", "v", ".", "native", "(", ")",...
930
all-931
[ "CheckCompact", "ensures", "that", "historical", "data", "before", "given", "revision", "has", "been", "compacted", "." ]
[ "func", "(", "m", "*", "Member", ")", "CheckCompact", "(", "rev", "int64", ")", "error", "{", "cli", ",", "err", ":=", "m", ".", "CreateEtcdClient", "(", ")", "\n", "if", "err", "!=", "nil", "{", "return", "fmt", ".", "Errorf", "(", "\"", "\"", "...
931
all-932
[ "LogMessage", "creates", "a", "message", "that", "complies", "with", "fmt", ".", "Stringer", "but", "also", "includes", "a", "message", "and", "key", "/", "value", "pairs", "for", "structured", "logging", ".", "Use", "it", "in", "trace", ".", "LazyLog", ":...
[ "func", "LogMessage", "(", "<mask>", "string", ",", "keyvals", "...", "keyval", ")", "*", "logmessage", "{", "return", "&", "logmessage", "{", "m", ":", "message", ",", "kv", ":", "keyvals", "}", "\n", "}" ]
932
all-933
[ "PeekFront", "returns", "the", "entry", "logically", "stored", "at", "the", "front", "of", "this", "list", "without", "removing", "it", "." ]
[ "func", "(", "list", "*", "LinkedList", ")", "PeekFront", "(", ")", "(", "interface", "{", "}", ",", "bool", ")", "{", "list", ".", "key", ".", "RLock", "(", ")", "\n", "defer", "list", ".", "<mask>", ".", "RUnlock", "(", ")", "\n\n", "if", "list...
933
all-934
[ "Function", "for", "debug", "printing" ]
[ "func", "stringifyHTTPResponseBody", "(", "r", "*", "http", ".", "Response", ")", "(", "body", "string", ")", "{", "if", "r", "==", "nil", "{", "return", "\"", "\"", "\n", "}", "\n\n", "buf", ":=", "new", "(", "bytes", ".", "<mask>", ")", "\n", "bu...
934
all-935
[ "Ping", "sends", "a", "ping", "message", "to", "the", "given", "hostPort", "and", "waits", "for", "a", "response", "." ]
[ "func", "(", "ch", "*", "Channel", ")", "Ping", "(", "ctx", "context", ".", "<mask>", ",", "hostPort", "string", ")", "error", "{", "peer", ":=", "ch", ".", "RootPeers", "(", ")", ".", "GetOrAdd", "(", "hostPort", ")", "\n", "conn", ",", "err", ":=...
935
all-936
[ "define", "an", "array", "of", "edge", "flags" ]
[ "func", "EdgeFlagPointer", "(", "stride", "int32", ",", "pointer", "unsafe", ".", "Pointer", ")", "{", "syscall", ".", "Syscall", "(", "gpEdgeFlagPointer", ",", "2", ",", "uintptr", "(", "stride", ")", ",", "uintptr", "(", "<mask>", ")", ",", "0", ")", ...
936
all-937
[ "MutateCreateAccount", "for", "NativeAmount", "sets", "the", "CreateAccountOp", "s", "StartingBalance", "field" ]
[ "func", "(", "m", "NativeAmount", ")", "MutateCreateAccount", "(", "o", "*", "xdr", ".", "CreateAccountOp", ")", "(", "err", "error", ")", "{", "o", ".", "StartingBalance", ",", "err", "=", "<mask>", ".", "Parse", "(", "m", ".", "Amount", ")", "\n", ...
937
all-938
[ "Subscribe", "subscribes", "to", "a", "topic", ".", "Returns", "error", "if", "fn", "is", "not", "a", "function", "." ]
[ "func", "(", "bus", "*", "EventBus", ")", "Subscribe", "(", "topic", "string", ",", "fn", "<mask>", "{", "}", ")", "error", "{", "return", "bus", ".", "doSubscribe", "(", "topic", ",", "fn", ",", "&", "eventHandler", "{", "reflect", ".", "ValueOf", "...
938
all-939
[ "MenuButtonNew", "is", "a", "wrapper", "around", "gtk_menu_button_new", "()", "." ]
[ "func", "MenuButtonNew", "(", ")", "(", "*", "MenuButton", ",", "<mask>", ")", "{", "c", ":=", "C", ".", "gtk_menu_button_new", "(", ")", "\n", "if", "c", "==", "nil", "{", "return", "nil", ",", "nilPtrErr", "\n", "}", "\n", "return", "wrapMenuButton",...
939
all-940
[ "HasFollowRedirects", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "s", "*", "SyntheticsOptions", ")", "HasFollowRedirects", "(", ")", "bool", "{", "if", "s", "!=", "nil", "&&", "s", ".", "FollowRedirects", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n", "}" ]
940
all-941
[ "ToServerListQuery", "formats", "a", "ListOpts", "into", "a", "query", "string", "." ]
[ "func", "(", "opts", "ListOpts", ")", "ToServerListQuery", "(", ")", "(", "string", ",", "error", ")", "{", "q", ",", "err", ":=", "gophercloud", ".", "BuildQueryString", "(", "opts", ")", "\n", "return", "q", ".", "<mask>", "(", ")", ",", "err", "\n...
941
all-942
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "EventFrameStoppedLoading", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage60", "(", "&", "w", ",", "v", ...
942
all-943
[ "CONTRACT", ":", "by", "the", "time", "this", "is", "called", "len", "(", "bz", ")", ">", "=", "_n", "Returns", "true", "so", "you", "can", "write", "one", "-", "liners", "." ]
[ "func", "slide", "(", "bz", "*", "[", "]", "byte", ",", "n", "*", "int", ",", "_n", "int", ")", "bool", "{", "if", "_n", "<", "0", "||", "_n", ">", "len", "(", "*", "bz", ")", "{", "panic", "(", "fmt", ".", "Sprintf", "(", "\"", "\"", ","...
943
all-944
[ "EscapeHTML", "is", "alias", "for", "html", ".", "EscapeString", "." ]
[ "func", "EscapeHTML", "(", "s", "string", ")", "string", "{", "if", "Verbose", "{", "fmt", ".", "Println", "(", "\"", "\"", ")", "\n", "}", "\n", "return", "<mask>", ".", "EscapeString", "(", "s", ")", "\n", "}" ]
944
all-945
[ "ReverseBytes", "returns", "the", "buf", "in", "the", "opposite", "order" ]
[ "func", "ReverseBytes", "(", "buf", "[", "]", "byte", ")", "[", "]", "byte", "{", "var", "res", "[", "]", "byte", "\n", "if", "len", "(", "buf", ")", "==", "0", "{", "return", "res", "\n", "}", "\n\n", "// Walk till mid-way, swapping bytes from each end:...
945
all-946
[ "Do", "executes", "ServiceWorker", ".", "unregister", "against", "the", "provided", "context", "." ]
[ "func", "(", "p", "*", "UnregisterParams", ")", "Do", "(", "ctx", "context", ".", "<mask>", ")", "(", "err", "error", ")", "{", "return", "cdp", ".", "Execute", "(", "ctx", ",", "CommandUnregister", ",", "p", ",", "nil", ")", "\n", "}" ]
946
all-947
[ "GetTaskHealthMetrics", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockEngine", ")", "GetTaskHealthMetrics", "(", ")", "(", "*", "ecstcs", ".", "HealthMetadata", ",", "[", "]", "*", "ecstcs", ".", "TaskHealth", ",", "error", ")", "{", "<mask>", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ...
947
all-948
[ "Specify", "the", "value", "of", "a", "uniform", "variable", "for", "a", "specified", "program", "object" ]
[ "func", "ProgramUniformMatrix3fv", "(", "program", "uint32", ",", "location", "int32", ",", "count", "int32", ",", "transpose", "bool", ",", "<mask>", "*", "float32", ")", "{", "C", ".", "glowProgramUniformMatrix3fv", "(", "gpProgramUniformMatrix3fv", ",", "(", ...
948
all-949
[ "StoragePoolsGetDrivers", "returns", "the", "names", "of", "all", "storage", "volumes", "attached", "to", "a", "given", "storage", "pool", "." ]
[ "func", "(", "c", "*", "Cluster", ")", "StoragePoolsGetDrivers", "(", ")", "(", "[", "]", "string", ",", "error", ")", "{", "var", "poolDriver", "string", "\n", "query", ":=", "\"", "\"", "\n", "inargs", ":=", "[", "]", "interface", "{", "}", "{", ...
949
all-950
[ "GetContainerInstanceArn", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockAuditLogger", ")", "GetContainerInstanceArn", "(", ")", "string", "{", "<mask>", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "strin...
950
all-951
[ "WebpackCheck", "will", "compare", "the", "current", "default", "Buffalo", "webpack", ".", "config", ".", "js", "against", "the", "applications", "webpack", ".", "config", ".", "js", ".", "If", "they", "are", "different", "you", "have", "the", "option", "to"...
[ "func", "WebpackCheck", "(", "r", "*", "Runner", ")", "error", "{", "fmt", ".", "Println", "(", "\"", "\"", ")", "\n\n", "if", "!", "r", ".", "App", ".", "WithWebpack", "{", "return", "nil", "\n", "}", "\n\n", "<mask>", ":=", "webpack", ".", "Templ...
951
all-952
[ "rewriteImport", "rewrites", "any", "import", "of", "path", "oldPath", "to", "path", "newPath", "." ]
[ "func", "rewriteImport", "(", "f", "*", "ast", ".", "<mask>", ",", "oldPath", ",", "newPath", "string", ")", "(", "rewrote", "bool", ")", "{", "for", "_", ",", "imp", ":=", "range", "f", ".", "Imports", "{", "if", "importPath", "(", "imp", ")", "==...
952
all-953
[ "CreateSnapshot", "makes", "a", "snapshot", "which", "can", "be", "retrieved", "with", "Snapshot", "()", "and", "can", "be", "used", "to", "reconstruct", "the", "state", "at", "that", "point", ".", "If", "any", "configuration", "changes", "have", "been", "ma...
[ "func", "(", "ms", "*", "MemoryStorage", ")", "CreateSnapshot", "(", "i", "uint64", ",", "cs", "*", "pb", ".", "ConfState", ",", "<mask>", "[", "]", "byte", ")", "(", "pb", ".", "Snapshot", ",", "error", ")", "{", "ms", ".", "Lock", "(", ")", "\n...
953
all-954
[ "newImageSource", "returns", "an", "ImageSource", "for", "reading", "from", "an", "existing", "directory", ".", "newImageSource", "untars", "the", "file", "and", "saves", "it", "in", "a", "temp", "directory" ]
[ "func", "newImageSource", "(", "ctx", "context", ".", "Context", ",", "sys", "*", "<mask>", ".", "SystemContext", ",", "ref", "ociArchiveReference", ")", "(", "types", ".", "ImageSource", ",", "error", ")", "{", "tempDirRef", ",", "err", ":=", "createUntarTe...
954
all-955
[ "Forwarder", "returns", "a", "forwarder", "type", "with", "the", "given", "from", "and", "dest" ]
[ "func", "(", "dom", "*", "<mask>", ")", "Forwarder", "(", "name", ",", "to", "string", ")", "*", "Forwarder", "{", "return", "&", "Forwarder", "{", "Domain", ":", "dom", ",", "Name", ":", "name", ",", "To", ":", "to", "}", "\n", "}" ]
955
all-956
[ "Get", "implements", "ClientInterface" ]
[ "func", "(", "c", "*", "dummyClient", ")", "Get", "(", "name", "string", ")", "(", "<mask>", ",", "error", ")", "{", "obj", ",", "ok", ":=", "c", ".", "objects", "[", "name", "]", "\n", "if", "ok", "{", "return", "obj", ",", "nil", "\n", "}", ...
956
all-957
[ "GetTokens", "gets", "tokens", "for", "an", "OAuth", "user", "specifying", "a", "grantType", "(", "i", ".", "e", "authorization_code", ")" ]
[ "func", "(", "o", "OAuth", ")", "GetTokens", "(", "code", "string", ",", "grantType", "string", ")", "(", "*", "oauthTokens", ",", "error", ")", "{", "postVars", ":=", "map", "[", "string", "]", "string", "{", "\"", "\"", ":", "grantType", ",", "\"",...
957
all-958
[ "Report", "is", "creating", "/", "updating", "/", "removing", "reports", "in", "GitHub", "based", "on", "the", "state", "of", "the", "provided", "ProwJob", "." ]
[ "func", "Report", "(", "ghc", "GitHubClient", ",", "reportTemplate", "*", "template", ".", "Template", ",", "pj", "prowapi", ".", "ProwJob", ",", "validTypes", "[", "]", "prowapi", ".", "ProwJobType", ")", "error", "{", "if", "ghc", "==", "nil", "{", "re...
958
all-959
[ "Registers", "Handler", "with", "the", "EventController", ".", "Takes", "a", "string", "for", "the", "unique", "name", "(", "key", ")", "and", "the", "handler", "that", "conforms", "the", "to", "Handler", "interface", ".", "The", "name", "(", "key", ")", ...
[ "func", "(", "e", "*", "EventController", ")", "RegisterHandler", "(", "n", "string", ",", "h", "<mask>", ")", "error", "{", "e", ".", "lazyLoadHandler", "(", ")", "\n\n", "if", "e", ".", "IsHandlerRegistered", "(", "n", ")", "{", "return", "errors", "...
959
all-960
[ "If", "qs", "exists", "then", "return", "it", "with", "a", "leadin", "?", "apache", "log", "style", "." ]
[ "func", "(", "u", "*", "accessLogUtil", ")", "ApacheQueryString", "(", ")", "string", "{", "if", "u", ".", "R", ".", "URL", ".", "RawQuery", "!=", "\"", "\"", "{", "return", "\"", "\"", "+", "u", ".", "R", ".", "<mask>", ".", "RawQuery", "\n", "}...
960
all-961
[ "DelNetwork", "indicates", "an", "expected", "call", "of", "DelNetwork" ]
[ "func", "(", "mr", "*", "MockCNIMockRecorder", ")", "DelNetwork", "(", "arg0", ",", "arg1", "<mask>", "{", "}", ")", "*", "gomock", ".", "Call", "{", "return", "mr", ".", "mock", ".", "ctrl", ".", "RecordCallWithMethodType", "(", "mr", ".", "mock", ","...
961
all-962
[ "Pull", "attempts", "a", "git", "pull", ".", "It", "retries", "at", "most", "numRetries", "times", "if", "error", "occurs" ]
[ "func", "(", "r", "*", "Repo", ")", "Pull", "(", ")", "error", "{", "r", ".", "Lock", "(", ")", "\n", "defer", "r", ".", "Unlock", "(", ")", "\n\n", "// prevent a pull if the last one was less than 5 seconds ago", "if", "gos", ".", "TimeSince", "(", "r", ...
962
all-963
[ "Getpid", "indicates", "an", "expected", "call", "of", "Getpid" ]
[ "func", "(", "mr", "*", "MockOSMockRecorder", ")", "Getpid", "(", ")", "*", "gomock", ".", "Call", "{", "<mask>", "mr", ".", "mock", ".", "ctrl", ".", "RecordCallWithMethodType", "(", "mr", ".", "mock", ",", "\"", "\"", ",", "reflect", ".", "TypeOf", ...
963
all-964
[ "native", "returns", "a", "pointer", "to", "the", "underlying", "GVariantBuilder", "." ]
[ "func", "(", "v", "*", "VariantBuilder", ")", "native", "(", ")", "*", "C", ".", "GVariantBuilder", "{", "if", "v", "==", "nil", "||", "v", ".", "GVariantBuilder", "==", "nil", "{", "return", "nil", "\n", "}", "\n", "p", ":=", "unsafe", ".", "Point...
964
all-965
[ "MoveProjectCard", "moves", "a", "specific", "project", "card", "to", "a", "specified", "column", "in", "the", "same", "project", "See", "https", ":", "//", "developer", ".", "github", ".", "com", "/", "v3", "/", "projects", "/", "cards", "/", "#move", "...
[ "func", "(", "c", "*", "Client", ")", "MoveProjectCard", "(", "projectCardID", "int", ",", "newColumnID", "int", ")", "error", "{", "c", ".", "log", "(", "\"", "\"", ",", "projectCardID", ",", "newColumnID", ")", "\n", "_", ",", "err", ":=", "c", "."...
965
all-966
[ "Mount", "mounts", "a", "http", ".", "Handler", "(", "or", "Buffalo", "app", ")", "and", "passes", "through", "all", "requests", "to", "it", ".", "func", "muxer", "()", "http", ".", "Handler", "{", "f", ":", "=", "func", "(", "res", "http", ".", "R...
[ "func", "(", "a", "*", "App", ")", "Mount", "(", "p", "string", ",", "h", "http", ".", "Handler", ")", "{", "prefix", ":=", "<mask>", ".", "Join", "(", "a", ".", "Prefix", ",", "p", ")", "\n", "path", ":=", "path", ".", "Join", "(", "p", ",",...
966
all-967
[ "New", "generator", "for", "creating", "a", "Buffalo", "application" ]
[ "func", "New", "(", "opts", "*", "<mask>", ")", "(", "*", "genny", ".", "Group", ",", "error", ")", "{", "gg", ":=", "&", "genny", ".", "Group", "{", "}", "\n\n", "// add the root generator", "g", ",", "err", ":=", "rootGenerator", "(", "opts", ")", ...
967
all-968
[ "AttributeValue", "returns", "the", "named", "attribute", "for", "the", "node", "." ]
[ "func", "(", "n", "*", "Node", ")", "AttributeValue", "(", "<mask>", "string", ")", "string", "{", "n", ".", "RLock", "(", ")", "\n", "defer", "n", ".", "RUnlock", "(", ")", "\n\n", "for", "i", ":=", "0", ";", "i", "<", "len", "(", "n", ".", ...
968
all-969
[ "HasTickEdge", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "n", "*", "NoteDefinition", ")", "HasTickEdge", "(", ")", "bool", "{", "if", "n", "!=", "nil", "&&", "n", ".", "TickEdge", "!=", "nil", "{", "return", "<mask>", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
969
all-970
[ "SetConsoleScreenBufferSize", "sets", "the", "size", "of", "the", "console", "screen", "buffer", ".", "See", "https", ":", "//", "msdn", ".", "microsoft", ".", "com", "/", "en", "-", "us", "/", "library", "/", "windows", "/", "desktop", "/", "ms686044", ...
[ "func", "SetConsoleScreenBufferSize", "(", "handle", "uintptr", ",", "coord", "COORD", ")", "error", "{", "r1", ",", "r2", ",", "err", ":=", "setConsoleScreenBufferSizeProc", ".", "Call", "(", "<mask>", ",", "coordToPointer", "(", "coord", ")", ")", "\n", "u...
970
all-971
[ "EntryNewWithBuffer", "()", "is", "a", "wrapper", "around", "gtk_entry_new_with_buffer", "()", "." ]
[ "func", "EntryNewWithBuffer", "(", "buffer", "*", "EntryBuffer", ")", "(", "*", "<mask>", ",", "error", ")", "{", "c", ":=", "C", ".", "gtk_entry_new_with_buffer", "(", "buffer", ".", "native", "(", ")", ")", "\n", "if", "c", "==", "nil", "{", "return"...
971
all-972
[ "NotFound", "resets", "response", "and", "sets", "404", "Not", "Found", "response", "status", "code", "." ]
[ "func", "(", "ctx", "*", "RequestCtx", ")", "NotFound", "(", ")", "{", "ctx", ".", "<mask>", ".", "Reset", "(", ")", "\n", "ctx", ".", "SetStatusCode", "(", "StatusNotFound", ")", "\n", "ctx", ".", "SetBodyString", "(", "\"", "\"", ")", "\n", "}" ]
972
all-973
[ "HasTextAlign", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "n", "*", "NoteDefinition", ")", "HasTextAlign", "(", ")", "bool", "{", "if", "n", "!=", "nil", "&&", "n", ".", "TextAlign", "!=", "nil", "{", "return", "<mask>", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
973
all-974
[ "render", "primitives", "from", "array", "data" ]
[ "func", "DrawArrays", "(", "<mask>", "uint32", ",", "first", "int32", ",", "count", "int32", ")", "{", "syscall", ".", "Syscall", "(", "gpDrawArrays", ",", "3", ",", "uintptr", "(", "mode", ")", ",", "uintptr", "(", "first", ")", ",", "uintptr", "(", ...
974
all-975
[ "ApplyTransition", "calls", "the", "function", "required", "to", "move", "to", "the", "specified", "status" ]
[ "func", "(", "cgroup", "*", "CgroupResource", ")", "ApplyTransition", "(", "nextState", "resourcestatus", ".", "ResourceStatus", ")", "error", "{", "transitionFunc", ",", "ok", ":=", "cgroup", ".", "statusToTransitions", "[", "nextState", "]", "\n", "if", "!", ...
975
all-976
[ "Serve", "accepts", "an", "incoming", "TELNET", "client", "connection", "on", "the", "net", ".", "Listener", "listener", "." ]
[ "func", "(", "server", "*", "Server", ")", "Serve", "(", "listener", "net", ".", "Listener", ")", "error", "{", "defer", "listener", ".", "Close", "(", ")", "\n\n\n", "logger", ":=", "server", ".", "logger", "(", ")", "\n\n\n", "handler", ":=", "server...
976
all-977
[ "HasIsAdmin", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "c", "*", "CreatedBy", ")", "HasIsAdmin", "(", ")", "bool", "{", "if", "c", "!=", "nil", "&&", "c", ".", "IsAdmin", "!=", "nil", "{", "return", "<mask>", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
977
all-978
[ "CONTRACT", ":", "rv", ".", "CanAddr", "()", "is", "true", "." ]
[ "func", "(", "cdc", "*", "Codec", ")", "decodeReflectBinaryByteArray", "(", "bz", "[", "]", "byte", ",", "info", "*", "TypeInfo", ",", "rv", "reflect", ".", "<mask>", ",", "fopts", "FieldOptions", ")", "(", "n", "int", ",", "err", "error", ")", "{", ...
978
all-979
[ "DeviceIsGrabbed", "()", "is", "a", "wrapper", "around", "gdk_display_device_is_grabbed", "()", "." ]
[ "func", "(", "v", "*", "Display", ")", "DeviceIsGrabbed", "(", "device", "*", "Device", ")", "bool", "{", "c", ":=", "C", ".", "gdk_display_device_is_grabbed", "(", "v", ".", "native", "(", ")", ",", "<mask>", ".", "native", "(", ")", ")", "\n", "ret...
979
all-980
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "StopSamplingReturns", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler2", "(", "&", "w", ",", "v",...
980
all-981
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "GetInfoParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo4", "(", "&", "r"...
981
all-982
[ "query", "information", "about", "an", "active", "uniform", "block" ]
[ "func", "GetActiveUniformBlockiv", "(", "<mask>", "uint32", ",", "uniformBlockIndex", "uint32", ",", "pname", "uint32", ",", "params", "*", "int32", ")", "{", "C", ".", "glowGetActiveUniformBlockiv", "(", "gpGetActiveUniformBlockiv", ",", "(", "C", ".", "GLuint", ...
982
all-983
[ "NewMockInfoLogger", "creates", "a", "new", "mock", "instance" ]
[ "func", "NewMockInfoLogger", "(", "ctrl", "*", "gomock", ".", "<mask>", ")", "*", "MockInfoLogger", "{", "mock", ":=", "&", "MockInfoLogger", "{", "ctrl", ":", "ctrl", "}", "\n", "mock", ".", "recorder", "=", "&", "MockInfoLoggerMockRecorder", "{", "mock", ...
983
all-984
[ "SetColors", "sets", "all", "colors", "values", "in", "the", "RGBA", "." ]
[ "func", "(", "c", "*", "RGBA", ")", "SetColors", "(", "r", ",", "g", ",", "b", ",", "a", "float64", ")", "{", "c", ".", "rgba", ".", "red", "=", "C", ".", "gdouble", "(", "r", ")", "\n", "c", ".", "rgba", ".", "<mask>", "=", "C", ".", "gd...
984
all-985
[ "Write", "meta", "-", "info", "to", "specified", "place" ]
[ "func", "(", "fb", "*", "fileBlock", ")", "writeTo", "(", "writer", "io", ".", "WriteSeeker", ",", "offset", "int64", ")", "error", "{", "_", ",", "err", ":=", "writer", ".", "Seek", "(", "offset", ",", "os", ".", "SEEK_SET", ")", "\n", "if", "err"...
985
all-986
[ "GetID", "()", "is", "a", "wrapper", "around", "g_settings_schema_get_id", "()", "." ]
[ "func", "(", "v", "*", "SettingsSchema", ")", "GetID", "(", ")", "string", "{", "return", "C", ".", "GoString", "(", "(", "*", "C", ".", "<mask>", ")", "(", "C", ".", "g_settings_schema_get_id", "(", "v", ".", "native", "(", ")", ")", ")", ")", "...
986
all-987
[ "indexesOutsideRange", "returns", "the", "indexes", "of", "times", "in", "results", "that", "are", "outside", "of", "[", "start", "end", ")", ".", "indexesOutsideRange", "panics", "if", "start", "is", "later", "than", "end", "." ]
[ "func", "indexesOutsideRange", "(", "start", "time", ".", "Time", ",", "end", "time", ".", "Time", ",", "results", "[", "]", "<mask>", ".", "Time", ")", "[", "]", "int", "{", "if", "start", ".", "After", "(", "end", ")", "{", "panic", "(", "\"", ...
987
all-988
[ "Identical", "to", "os", ".", "Environ", "but", "limited", "to", "the", "environment", "variable", "equivalents", "for", "the", "flags", "your", "program", "cares", "about", "." ]
[ "func", "Environ", "(", ")", "[", "]", "string", "{", "s", ":=", "make", "(", "[", "]", "string", ",", "0", ")", "\n\n", "FlagSet", ".", "VisitAll", "(", "func", "(", "f", "*", "<mask>", ".", "Flag", ")", "{", "if", "value", ",", "ok", ":=", ...
988
all-989
[ "ReadInt32", "returns", "an", "int32", "read", "from", "address", "a", "of", "the", "inferior", "." ]
[ "func", "(", "p", "*", "<mask>", ")", "ReadInt32", "(", "a", "Address", ")", "int32", "{", "return", "int32", "(", "p", ".", "ReadUint32", "(", "a", ")", ")", "\n", "}" ]
989
all-990
[ "Value", "satisfy", "driver", ".", "Valuer", "interface", "." ]
[ "func", "(", "b", "Bag", ")", "Value", "(", ")", "(", "driver", ".", "<mask>", ",", "error", ")", "{", "buf", ":=", "bytes", ".", "NewBuffer", "(", "nil", ")", "\n", "err", ":=", "gob", ".", "NewEncoder", "(", "buf", ")", ".", "Encode", "(", "b...
990
all-991
[ "Validate", "checks", "all", "things", "are", "well", "and", "constructs", "the", "CLI", "args", "to", "the", "message", "service" ]
[ "func", "(", "m", "*", "PactReificationRequest", ")", "Validate", "(", ")", "error", "{", "m", ".", "Args", "=", "[", "]", "string", "{", "}", "\n\n", "body", ",", "err", ":=", "json", ".", "Marshal", "(", "m", ".", "Message", ")", "\n", "if", "e...
991
all-992
[ "Set", "sets", "key", "=", "value", "argument", "." ]
[ "func", "(", "a", "*", "Args", ")", "<mask>", "(", "key", ",", "value", "string", ")", "{", "a", ".", "args", "=", "setArg", "(", "a", ".", "args", ",", "key", ",", "value", ",", "argsHasValue", ")", "\n", "}" ]
992
all-993
[ "SetAuthors", "is", "a", "wrapper", "around", "gtk_about_dialog_set_authors", "()", "." ]
[ "func", "(", "v", "*", "AboutDialog", ")", "SetAuthors", "(", "authors", "[", "]", "string", ")", "{", "cauthors", ":=", "C", ".", "make_strings", "(", "C", ".", "int", "(", "len", "(", "authors", ")", "+", "1", ")", ")", "\n", "for", "i", ",", ...
993
all-994
[ "Locator", "returns", "a", "locator", "for", "the", "given", "resource" ]
[ "func", "(", "r", "*", "<mask>", ")", "Locator", "(", "api", "*", "API", ")", "*", "ImageLocator", "{", "for", "_", ",", "l", ":=", "range", "r", ".", "Links", "{", "if", "l", "[", "\"", "\"", "]", "==", "\"", "\"", "{", "return", "api", ".",...
994
all-995
[ "Shutdown", "executes", "grpc", ".", "Server", ".", "GracefulStop", "method", "." ]
[ "func", "(", "s", "*", "Server", ")", "Shutdown", "(", "ctx", "context", ".", "<mask>", ")", "(", "err", "error", ")", "{", "s", ".", "Server", ".", "GracefulStop", "(", ")", "\n", "return", "\n", "}" ]
995
all-996
[ "StopObsessingOverSvc", "creates", "a", "new", "STOP_OBSESSING_OVER_SVC", "Nagios", "command", ".", "Disables", "processing", "of", "service", "checks", "via", "the", "OCSP", "command", "for", "the", "specified", "service", "." ]
[ "func", "StopObsessingOverSvc", "(", "host_name", "<mask>", ",", "service_description", "string", ",", ")", "*", "livestatus", ".", "Command", "{", "return", "livestatus", ".", "NewCommand", "(", "\"", "\"", ",", "stringifyArg", "(", "\"", "\"", ",", "\"", "...
996
all-997
[ "ImageList", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockClient", ")", "ImageList", "(", "arg0", "context", ".", "Context", ",", "arg1", "types", ".", "ImageListOptions", ")", "(", "[", "]", "types", ".", "ImageSummary", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", "."...
997
all-998
[ "ContainsDiskType", "-" ]
[ "func", "(", "s", "*", "CloudConfigManifest", ")", "ContainsDiskType", "(", "diskTypeName", "string", ")", "(", "result", "bool", ")", "{", "<mask>", "=", "false", "\n", "for", "_", ",", "diskType", ":=", "range", "s", ".", "DiskTypes", "{", "if", "diskT...
998
all-999
[ "Seek", "to", "a", "specified", "key", "or", "the", "next", "bigger", "one", "if", "an", "item", "with", "key", "does", "not", "exist", "." ]
[ "func", "(", "it", "*", "Iterator", ")", "Seek", "(", "bs", "[", "]", "byte", ")", "{", "itm", ":=", "it", ".", "snap", ".", "db", ".", "newItem", "(", "bs", ",", "false", ")", "\n", "<mask>", ".", "iter", ".", "Seek", "(", "unsafe", ".", "Po...
999
all-1000
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "CallFunctionOnParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "<mask>", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime47", "(", "&"...