id
int32
0
25.3k
idx
stringlengths
5
9
nl_tokens
listlengths
1
418
pl_tokens
listlengths
22
4.98k
20,500
all-20501
[ "GetUnitOk", "returns", "a", "tuple", "with", "the", "Unit", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "w", "*", "Widget", ")", "GetUnitOk", "(", ")", "(", "string", ",", "bool", ")", "{", "if", "w", "==", "nil", "||", "w", ".", "Unit", "==", "nil", "{", "return", "\"", "\"", ",", "false", "\n", "}", "\n", "return", "*", "w", ".",...
20,501
all-20502
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "StartViolationsReportParams", ")", "UnmarshalJSON", "(", "<mask>", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog2", "(", "...
20,502
all-20503
[ "GetFocusOnClick", "()", "is", "a", "wrapper", "around", "gtk_button_get_focus_on_click", "()", "." ]
[ "func", "(", "v", "*", "Button", ")", "GetFocusOnClick", "(", ")", "bool", "{", "c", ":=", "C", ".", "gtk_button_get_focus_on_click", "(", "v", ".", "native", "(", ")", ")", "\n", "<mask>", "gobool", "(", "c", ")", "\n", "}" ]
20,503
all-20504
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "InspectWorkerParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "<mask>", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker9", "(", ...
20,504
all-20505
[ "Lookup", "()", "is", "a", "wrapper", "around", "gtk_text_tag_table_lookup", "()", "." ]
[ "func", "(", "v", "*", "TextTagTable", ")", "Lookup", "(", "<mask>", "string", ")", "(", "*", "TextTag", ",", "error", ")", "{", "cname", ":=", "C", ".", "CString", "(", "name", ")", "\n", "defer", "C", ".", "free", "(", "unsafe", ".", "Pointer", ...
20,505
all-20506
[ "WriteMultipartForm", "writes", "the", "given", "multipart", "form", "f", "with", "the", "given", "boundary", "to", "w", "." ]
[ "func", "WriteMultipartForm", "(", "w", "io", ".", "<mask>", ",", "f", "*", "multipart", ".", "Form", ",", "boundary", "string", ")", "error", "{", "// Do not care about memory allocations here, since multipart", "// form processing is slow.", "if", "len", "(", "bound...
20,506
all-20507
[ "ValidateTemplates", "returns", "a", "genny", ".", "RunFn", "that", "will", "walk", "the", "given", "box", "and", "run", "each", "of", "the", "files", "found", "through", "each", "of", "the", "template", "validators" ]
[ "func", "ValidateTemplates", "(", "walk", "packd", ".", "Walker", ",", "tvs", "[", "]", "TemplateValidator", ")", "genny", ".", "RunFn", "{", "if", "len", "(", "tvs", ")", "==", "0", "{", "return", "func", "(", "r", "*", "genny", ".", "Runner", ")", ...
20,507
all-20508
[ "AddShortcutFolder", "is", "a", "wrapper", "around", "gtk_file_chooser_add_shortcut_folder", "()", "." ]
[ "func", "(", "v", "*", "FileChooser", ")", "AddShortcutFolder", "(", "folder", "string", ")", "bool", "{", "cstr", ":=", "C", ".", "CString", "(", "folder", ")", "\n", "defer", "C", ".", "<mask>", "(", "unsafe", ".", "Pointer", "(", "cstr", ")", ")",...
20,508
all-20509
[ "Count", "returns", "the", "number", "of", "elements", "that", "the", "selection", "refers", "to", "." ]
[ "func", "(", "s", "*", "Selection", ")", "Count", "(", ")", "(", "int", ",", "error", ")", "{", "elements", ",", "err", ":=", "s", ".", "elements", ".", "Get", "(", ")", "\n", "if", "err", "!=", "nil", "{", "return", "0", ",", "fmt", ".", "Er...
20,509
all-20510
[ "Format", "formats", "the", "node", "." ]
[ "func", "(", "node", "*", "SetExpr", ")", "Format", "(", "buf", "*", "TrackedBuffer", ")", "{", "// We don't have to backtick set variable names.", "if", "node", ".", "Name", ".", "EqualString", "(", "\"", "\"", ")", "||", "<mask>", ".", "Name", ".", "EqualS...
20,510
all-20511
[ "Caller", "returns", "a", "caller", "s", "call", "location", ".", "If", "F1", "calls", "F2", "which", "in", "its", "turn", "calls", "Caller", "then", "this", "function", "will", "return", "a", "location", "within", "F1", "where", "it", "calls", "F2", "."...
[ "func", "Caller", "(", ")", "string", "{", "_", ",", "file", ",", "line", ",", "ok", ":=", "runtime", ".", "Caller", "(", "2", ")", "\n", "if", "!", "ok", "{", "return", "\"", "\"", "\n", "}", "\n\n", "rel", ",", "err", ":=", "filepath", ".", ...
20,511
all-20512
[ "ReceiveEvent", "is", "called", "when", "something", "happens", "on", "an", "issue", ".", "The", "state", "for", "that", "issue", "is", "updated", "." ]
[ "func", "(", "b", "BundledStates", ")", "ReceiveEvent", "(", "ID", "string", ",", "eventName", ",", "label", "string", ",", "t", "time", ".", "Time", ")", "bool", "{", "state", ",", "ok", ":=", "b", ".", "states", "[", "<mask>", "]", "\n", "if", "!...
20,512
all-20513
[ "NewDiscovery", "returns", "a", "Discoverer", "function", "that", "calls", "a", "refresh", "()", "function", "at", "every", "interval", "." ]
[ "func", "NewDiscovery", "(", "l", "log", ".", "Logger", ",", "mech", "string", ",", "interval", "time", ".", "Duration", ",", "refreshf", "func", "(", "ctx", "context", ".", "Context", ")", "(", "[", "]", "*", "targetgroup", ".", "<mask>", ",", "error"...
20,513
all-20514
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "SetBreakpointByURLParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "<mask>", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger15", "(", ...
20,514
all-20515
[ "ImagesGet", "returns", "the", "names", "of", "all", "images", "(", "optionally", "only", "the", "public", "ones", ")", "." ]
[ "func", "(", "c", "*", "Cluster", ")", "ImagesGet", "(", "project", "string", ",", "public", "bool", ")", "(", "[", "]", "string", ",", "error", ")", "{", "err", ":=", "c", ".", "Transaction", "(", "func", "(", "tx", "*", "ClusterTx", ")", "error",...
20,515
all-20516
[ "FindOne", "-" ]
[ "func", "(", "s", "*", "FakeCollection", ")", "FindOne", "(", "id", "string", ",", "result", "interface", "{", "}", ")", "(", "err", "error", ")", "{", "err", "=", "s", ".", "ErrControl", "\n", "*", "(", "result", ".", "(", "*", "taskmanager", ".",...
20,516
all-20517
[ "NewMockAuditLogger", "creates", "a", "new", "mock", "instance" ]
[ "func", "NewMockAuditLogger", "(", "ctrl", "*", "gomock", ".", "<mask>", ")", "*", "MockAuditLogger", "{", "mock", ":=", "&", "MockAuditLogger", "{", "ctrl", ":", "ctrl", "}", "\n", "mock", ".", "recorder", "=", "&", "MockAuditLoggerMockRecorder", "{", "mock...
20,517
all-20518
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "QuerySelectorParams", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "<mask>", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom20", "(", "&", "w", ",", "v", ")", ...
20,518
all-20519
[ "Start", "a", "single", "task", "executing", "the", "given", "function", "with", "the", "given", "schedule", ".", "This", "is", "a", "convenience", "around", "Group", "and", "it", "returns", "two", "functions", "that", "can", "be", "used", "to", "control", ...
[ "func", "Start", "(", "f", "Func", ",", "schedule", "Schedule", ")", "(", "func", "(", "time", ".", "Duration", ")", "error", ",", "func", "(", ")", ")", "{", "group", ":=", "Group", "{", "}", "\n", "task", ":=", "group", ".", "Add", "(", "f", ...
20,519
all-20520
[ "Specify", "the", "value", "of", "a", "uniform", "variable", "for", "a", "specified", "program", "object" ]
[ "func", "ProgramUniform1uiv", "(", "program", "uint32", ",", "<mask>", "int32", ",", "count", "int32", ",", "value", "*", "uint32", ")", "{", "C", ".", "glowProgramUniform1uiv", "(", "gpProgramUniform1uiv", ",", "(", "C", ".", "GLuint", ")", "(", "program", ...
20,520
all-20521
[ "String", "converts", "TransportProtocol", "to", "a", "string" ]
[ "func", "(", "tp", "*", "TransportProtocol", ")", "String", "(", ")", "string", "{", "if", "tp", "==", "nil", "{", "return", "tcp", "\n", "}", "\n", "switch", "*", "tp", "{", "case", "TransportProtocolUDP", ":", "return", "udp", "\n", "case", "Transpor...
20,521
all-20522
[ "Used", "to", "promote", "the", "local", "non", "-", "database", "node", "to", "be", "a", "database", "one", "." ]
[ "func", "internalClusterPostPromote", "(", "d", "*", "Daemon", ",", "r", "*", "http", ".", "Request", ")", "Response", "{", "req", ":=", "internalClusterPostPromoteRequest", "{", "}", "\n\n", "// Parse the request", "err", ":=", "json", ".", "NewDecoder", "(", ...
20,522
all-20523
[ "create", "transform", "feedback", "objects" ]
[ "func", "CreateTransformFeedbacks", "(", "n", "int32", ",", "ids", "*", "uint32", ")", "{", "syscall", ".", "Syscall", "(", "gpCreateTransformFeedbacks", ",", "2", ",", "uintptr", "(", "n", ")", ",", "uintptr", "(", "unsafe", ".", "Pointer", "(", "<mask>",...
20,523
all-20524
[ "NetworkInterfaceDiffOperation", "performs", "operations", "relevant", "to", "managing", "the", "diff", "on", "network_interface", "sub", "-", "resources", "." ]
[ "func", "NetworkInterfaceDiffOperation", "(", "d", "*", "schema", ".", "ResourceDiff", ",", "c", "*", "govmomi", ".", "Client", ")", "error", "{", "// We just need the new values for now, as all we are doing is validating some values based on API version", "n", ":=", "d", "...
20,524
all-20525
[ "GetEventSizeOk", "returns", "a", "tuple", "with", "the", "EventSize", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "w", "*", "Widget", ")", "GetEventSizeOk", "(", ")", "(", "string", ",", "bool", ")", "{", "if", "w", "==", "nil", "||", "w", ".", "EventSize", "==", "nil", "{", "return", "\"", "\"", ",", "false", "\n", "}", "\n", "return", "*", "...
20,525
all-20526
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "DataEntry", ")", "UnmarshalJSON", "(", "data", "[", "]", "<mask>", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb18", "(", "&", "r", ...
20,526
all-20527
[ "GetActiveIter", "is", "a", "wrapper", "around", "gtk_combo_box_get_active_iter", "()", "." ]
[ "func", "(", "v", "*", "ComboBox", ")", "GetActiveIter", "(", ")", "(", "*", "TreeIter", ",", "error", ")", "{", "var", "cIter", "C", ".", "GtkTreeIter", "\n", "c", ":=", "C", ".", "gtk_combo_box_get_active_iter", "(", "v", ".", "native", "(", ")", "...
20,527
all-20528
[ "getLabels", "is", "a", "helper", "function", "that", "retrieves", "a", "paginated", "list", "of", "labels", "from", "a", "github", "URI", "path", "." ]
[ "func", "(", "c", "*", "Client", ")", "getLabels", "(", "path", "string", ")", "(", "[", "]", "Label", ",", "error", ")", "{", "var", "labels", "[", "]", "Label", "\n", "if", "c", ".", "fake", "{", "return", "labels", ",", "nil", "\n", "}", "\n...
20,528
all-20529
[ "Persist", "the", "flash", "inside", "the", "session", "." ]
[ "func", "(", "f", "Flash", ")", "persist", "(", "<mask>", "*", "Session", ")", "{", "b", ",", "_", ":=", "json", ".", "Marshal", "(", "f", ".", "data", ")", "\n", "session", ".", "Set", "(", "flashKey", ",", "b", ")", "\n", "session", ".", "Sav...
20,529
all-20530
[ "specify", "the", "alpha", "test", "function" ]
[ "func", "AlphaFunc", "(", "xfunc", "uint32", ",", "<mask>", "float32", ")", "{", "syscall", ".", "Syscall", "(", "gpAlphaFunc", ",", "2", ",", "uintptr", "(", "xfunc", ")", ",", "uintptr", "(", "math", ".", "Float32bits", "(", "ref", ")", ")", ",", "...
20,530
all-20531
[ "newHelperMethodYield", "creates", "and", "returns", "a", "helper", "method", "yield", "." ]
[ "func", "newHelperMethodYield", "(", "ln", "*", "line", ",", "rslt", "*", "result", ",", "src", "*", "source", ",", "parent", "<mask>", ",", "opts", "*", "Options", ")", "(", "*", "helperMethodYield", ",", "error", ")", "{", "if", "len", "(", "ln", "...
20,531
all-20532
[ "New", "mailer", "generator", ".", "It", "will", "init", "the", "mailers", "directory", "if", "it", "doesn", "t", "already", "exist" ]
[ "func", "New", "(", "opts", "*", "Options", ")", "(", "*", "genny", ".", "Group", ",", "error", ")", "{", "gg", ":=", "&", "genny", ".", "Group", "{", "}", "\n\n", "if", "err", ":=", "opts", ".", "Validate", "(", ")", ";", "err", "!=", "nil", ...
20,532
all-20533
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "ClearEventsParams", ")", "UnmarshalJSON", "(", "<mask>", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice7", "(",...
20,533
all-20534
[ "attach", "a", "renderbuffer", "as", "a", "logical", "buffer", "of", "a", "framebuffer", "object" ]
[ "func", "FramebufferRenderbuffer", "(", "<mask>", "uint32", ",", "attachment", "uint32", ",", "renderbuffertarget", "uint32", ",", "renderbuffer", "uint32", ")", "{", "syscall", ".", "Syscall6", "(", "gpFramebufferRenderbuffer", ",", "4", ",", "uintptr", "(", "tar...
20,534
all-20535
[ "Var", "returns", "the", "package", "-", "level", "variable", "of", "the", "specified", "name", "or", "nil", "if", "not", "found", "." ]
[ "func", "(", "p", "*", "Package", ")", "Var", "(", "name", "string", ")", "(", "g", "*", "Global", ")", "{", "g", ",", "_", "=", "p", ".", "Members", "[", "<mask>", "]", ".", "(", "*", "Global", ")", "\n", "return", "\n", "}" ]
20,535
all-20536
[ "getSignaturesFromLookaside", "implements", "GetSignatures", "()", "from", "the", "lookaside", "location", "configured", "in", "s", ".", "c", ".", "signatureBase", "which", "is", "not", "nil", "." ]
[ "func", "(", "s", "*", "dockerImageSource", ")", "getSignaturesFromLookaside", "(", "ctx", "<mask>", ".", "Context", ",", "instanceDigest", "*", "digest", ".", "Digest", ")", "(", "[", "]", "[", "]", "byte", ",", "error", ")", "{", "manifestDigest", ",", ...
20,536
all-20537
[ "UnmarshalEasyJSON", "satisfies", "easyjson", ".", "Unmarshaler", "." ]
[ "func", "(", "t", "*", "DispatchMouseEventPointerType", ")", "UnmarshalEasyJSON", "(", "in", "*", "jlexer", ".", "Lexer", ")", "{", "switch", "DispatchMouseEventPointerType", "(", "in", ".", "<mask>", "(", ")", ")", "{", "case", "Mouse", ":", "*", "t", "="...
20,537
all-20538
[ "IsClosedConnError", "returns", "true", "if", "the", "error", "is", "from", "closing", "listener", "cmux", ".", "copied", "from", "golang", ".", "org", "/", "x", "/", "net", "/", "http2", "/", "http2", ".", "go" ]
[ "func", "IsClosedConnError", "(", "err", "error", ")", "bool", "{", "// 'use of closed network connection' (Go <=1.8)", "// 'use of closed file or network connection' (Go >1.8, internal/poll.ErrClosing)", "// 'mux: listener closed' (cmux.ErrListenerClosed)", "return", "err", "!=", "nil",...
20,538
all-20539
[ "----------------------------------------" ]
[ "func", "DecodeDisambPrefixBytes", "(", "bz", "[", "]", "byte", ")", "(", "db", "DisambBytes", ",", "hasDb", "bool", ",", "pb", "PrefixBytes", ",", "hasPb", "bool", ",", "n", "int", ",", "err", "error", ")", "{", "// Validate", "if", "len", "(", "bz", ...
20,539
all-20540
[ "GetApmQuery", "returns", "the", "ApmQuery", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "h", "*", "HostmapRequest", ")", "GetApmQuery", "(", ")", "WidgetApmOrLogQuery", "{", "if", "h", "==", "nil", "||", "h", ".", "ApmQuery", "==", "nil", "{", "<mask>", "WidgetApmOrLogQuery", "{", "}", "\n", "}", "\n", "return", "*", "h", "."...
20,540
all-20541
[ "Close", "removes", "resources", "associated", "with", "an", "initialized", "ImageSource", "if", "any", ".", "Close", "deletes", "the", "temporary", "directory", "at", "dst" ]
[ "func", "(", "s", "*", "ociArchiveImageSource", ")", "Close", "(", ")", "<mask>", "{", "defer", "s", ".", "tempDirRef", ".", "deleteTempDir", "(", ")", "\n", "return", "s", ".", "unpackedSrc", ".", "Close", "(", ")", "\n", "}" ]
20,541
all-20542
[ "/", "*", "FindVmsByFilters", "finds", "vms", "by", "filters", "cpu", "memory", "private", "vlan", "public", "vlan", "state" ]
[ "func", "(", "a", "*", "Client", ")", "FindVmsByFilters", "(", "params", "*", "FindVmsByFiltersParams", ")", "(", "*", "FindVmsByFiltersOK", ",", "error", ")", "{", "// TODO: Validate the params before sending", "if", "params", "==", "nil", "{", "params", "=", "...
20,542
all-20543
[ "Returns", "expected", "status", "state", "and", "description", ".", "If", "a", "PR", "is", "not", "mergeable", "we", "have", "to", "select", "a", "TideQuery", "to", "compare", "it", "against", "in", "order", "to", "generate", "a", "diff", "for", "the", ...
[ "func", "expectedStatus", "(", "queryMap", "*", "config", ".", "QueryMap", ",", "pr", "*", "PullRequest", ",", "pool", "<mask>", "[", "string", "]", "PullRequest", ",", "cc", "contextChecker", ")", "(", "string", ",", "string", ")", "{", "if", "_", ",", ...
20,543
all-20544
[ "GetCreateFlags", "registers", "the", "flags", "this", "driver", "adds", "to", "docker", "hosts", "create" ]
[ "func", "(", "d", "*", "Driver", ")", "GetCreateFlags", "(", ")", "[", "]", "mcnflag", ".", "Flag", "{", "return", "[", "]", "mcnflag", ".", "Flag", "{", "mcnflag", ".", "StringFlag", "{", "EnvVar", ":", "\"", "\"", ",", "<mask>", ":", "\"", "\"", ...
20,544
all-20545
[ "HasApmQuery", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "h", "*", "HostmapRequest", ")", "HasApmQuery", "(", ")", "bool", "{", "if", "h", "!=", "nil", "&&", "h", ".", "ApmQuery", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n", "}" ]
20,545
all-20546
[ "ApplyConfig", "updates", "the", "config", "field", "of", "the", "Handler", "struct" ]
[ "func", "(", "h", "*", "<mask>", ")", "ApplyConfig", "(", "conf", "*", "config", ".", "Config", ")", "error", "{", "h", ".", "mtx", ".", "Lock", "(", ")", "\n", "defer", "h", ".", "mtx", ".", "Unlock", "(", ")", "\n\n", "h", ".", "config", "=",...
20,546
all-20547
[ "HasHideZeroCounts", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "m", "*", "ManageStatusDefinition", ")", "HasHideZeroCounts", "(", ")", "bool", "{", "if", "m", "!=", "nil", "&&", "m", ".", "HideZeroCounts", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n", "}" ]
20,547
all-20548
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "EventPseudoElementRemoved", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom58", "(", "&",...
20,548
all-20549
[ "Time", "returns", "the", "time", "in", "100s", "of", "nanoseconds", "since", "15", "Oct", "1582", "encoded", "in", "uuid", ".", "The", "time", "is", "only", "defined", "for", "version", "1", "and", "2", "UUIDs", "." ]
[ "func", "(", "uuid", "UUID", ")", "Time", "(", ")", "Time", "{", "time", ":=", "int64", "(", "binary", ".", "BigEndian", ".", "Uint32", "(", "uuid", "[", "0", ":", "4", "]", ")", ")", "\n", "time", "|=", "int64", "(", "<mask>", ".", "BigEndian", ...
20,549
all-20550
[ "UpdateDashboardList", "returns", "a", "single", "dashboard", "list", "created", "on", "this", "account", "." ]
[ "func", "(", "<mask>", "*", "Client", ")", "UpdateDashboardList", "(", "list", "*", "DashboardList", ")", "error", "{", "req", ":=", "reqUpdateDashboardList", "{", "list", ".", "GetName", "(", ")", "}", "\n", "return", "client", ".", "doJsonRequest", "(", ...
20,550
all-20551
[ "Helper", "method", "that", "loads", "file", "file", "content", "and", "(", "JSON", ")", "unmarshals", "it", "into", "target" ]
[ "func", "unmarshal", "(", "path", "string", ",", "target", "*", "map", "[", "string", "]", "interface", "{", "}", ")", "error", "{", "<mask>", ",", "err", ":=", "loadFile", "(", "path", ")", "\n", "if", "err", "!=", "nil", "{", "return", "fmt", "."...
20,551
all-20552
[ "Trace", "formats", "a", "given", "message", "according", "to", "given", "params", "to", "log", "with", "level", "Trace", "." ]
[ "func", "(", "dl", "*", "DefaultLogger", ")", "Trace", "(", "message", "string", ",", "params", "...", "<mask>", "{", "}", ")", "{", "dl", ".", "logger", ".", "Tracef", "(", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "caller", "(", ")", ",", "m...
20,552
all-20553
[ "SimpleHashFromHashers", "computes", "a", "Merkle", "tree", "from", "items", "that", "can", "be", "hashed", "." ]
[ "func", "SimpleHashFromHashers", "(", "items", "[", "]", "Hasher", ")", "[", "]", "byte", "{", "hashes", ":=", "make", "(", "[", "]", "[", "]", "byte", ",", "len", "(", "items", ")", ")", "\n", "for", "i", ",", "item", ":=", "range", "items", "{"...
20,553
all-20554
[ "HasUnknown", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "t", "*", "ThresholdCount", ")", "HasUnknown", "(", ")", "bool", "{", "if", "t", "!=", "nil", "&&", "t", ".", "<mask>", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
20,554
all-20555
[ "UnmarshalJSON", "satisfies", "json", ".", "Unmarshaler", "." ]
[ "func", "(", "t", "*", "PseudoType", ")", "UnmarshalJSON", "(", "buf", "[", "]", "<mask>", ")", "error", "{", "return", "easyjson", ".", "Unmarshal", "(", "buf", ",", "t", ")", "\n", "}" ]
20,555
all-20556
[ "NewClient", "creates", "a", "client", "of", "ecscni", "which", "is", "used", "to", "invoke", "the", "plugin" ]
[ "func", "NewClient", "(", "cfg", "*", "Config", ")", "CNIClient", "{", "libcniConfig", ":=", "&", "libcni", ".", "CNIConfig", "{", "<mask>", ":", "[", "]", "string", "{", "cfg", ".", "PluginsPath", "}", ",", "}", "\n\n", "return", "&", "cniClient", "{"...
20,556
all-20557
[ "exitInfoText", "returns", "the", "most", "important", "result", "text", "formatted", "for", "the", "first", "line", "of", "plugin", "output", ".", "Returns", "joined", "string", "of", "(", "messageSeparator", "-", "separated", ")", "info", "text", "from", "re...
[ "func", "(", "c", "Check", ")", "exitInfoText", "(", ")", "string", "{", "<mask>", "importantMessages", "[", "]", "string", "\n", "for", "_", ",", "result", ":=", "range", "c", ".", "results", "{", "if", "result", ".", "status", "==", "c", ".", "stat...
20,557
all-20558
[ "RateLimit", "write", "to", "a", "logger", "." ]
[ "func", "RateLimit", "(", "next", "log", ".", "Logger", ",", "<mask>", "rate", ".", "Limit", ")", "log", ".", "Logger", "{", "return", "&", "ratelimiter", "{", "limiter", ":", "rate", ".", "NewLimiter", "(", "limit", ",", "int", "(", "limit", ")", ")...
20,558
all-20559
[ "folderFromObject", "returns", "an", "*", "object", ".", "Folder", "from", "a", "given", "object", "of", "specific", "types", "and", "relative", "path", "of", "a", "type", "defined", "in", "folderType", ".", "If", "no", "such", "folder", "is", "found", "an...
[ "func", "folderFromObject", "(", "client", "*", "govmomi", ".", "Client", ",", "obj", "<mask>", "{", "}", ",", "folderType", "RootPathParticle", ",", "relative", "string", ")", "(", "*", "object", ".", "Folder", ",", "error", ")", "{", "// If we are using th...
20,559
all-20560
[ "PutFileSplitWriter", "writes", "a", "multiple", "files", "to", "PFS", "by", "splitting", "up", "the", "data", "that", "is", "written", "to", "it", ".", "NOTE", ":", "PutFileSplitWriter", "returns", "an", "io", ".", "WriteCloser", "you", "must", "call", "Clo...
[ "func", "(", "c", "APIClient", ")", "PutFileSplitWriter", "(", "repoName", "string", ",", "commitID", "string", ",", "path", "string", ",", "delimiter", "pfs", ".", "Delimiter", ",", "targetFileDatums", "int64", ",", "targetFileBytes", "int64", ",", "headerRecor...
20,560
all-20561
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "GetSamplingProfileReturns", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler9", "("...
20,561
all-20562
[ "Stat", "calls", "os", ".", "Stat", "." ]
[ "func", "(", "g", "GitOS", ")", "Stat", "(", "name", "string", ")", "(", "os", ".", "FileInfo", ",", "error", ")", "{", "return", "<mask>", ".", "Stat", "(", "name", ")", "\n", "}" ]
20,562
all-20563
[ "This", "a", "convenience", "to", "replicate", "a", "certain", "volume", "change", "to", "all", "nodes", "if", "the", "underlying", "driver", "is", "ceph", "." ]
[ "func", "storagePoolVolumeReplicateIfCeph", "(", "tx", "*", "sql", ".", "Tx", ",", "volumeID", "int64", ",", "project", ",", "volumeName", "string", ",", "volumeType", "int", ",", "poolID", "int64", ",", "f", "func", "(", "int64", ")", "error", ")", "error...
20,563
all-20564
[ "MutateTransaction", "for", "ChangeTrustBuilder", "causes", "the", "underylying", "CreateAccountOp", "to", "be", "added", "to", "the", "operation", "list", "for", "the", "provided", "transaction" ]
[ "func", "(", "m", "ChangeTrustBuilder", ")", "MutateTransaction", "(", "o", "*", "TransactionBuilder", ")", "error", "{", "if", "m", ".", "Err", "!=", "nil", "{", "return", "m", ".", "Err", "\n", "}", "\n\n", "m", ".", "O", ".", "Body", ",", "m", "...
20,564
all-20565
[ "Do", "executes", "Emulation", ".", "setVirtualTimePolicy", "against", "the", "provided", "context", ".", "returns", ":", "virtualTimeTicksBase", "-", "Absolute", "timestamp", "at", "which", "virtual", "time", "was", "first", "enabled", "(", "up", "time", "in", ...
[ "func", "(", "p", "*", "SetVirtualTimePolicyParams", ")", "Do", "(", "ctx", "context", ".", "Context", ")", "(", "virtualTimeTicksBase", "float64", ",", "err", "error", ")", "{", "// execute", "<mask>", "res", "SetVirtualTimePolicyReturns", "\n", "err", "=", "...
20,565
all-20566
[ "newOpenShiftClientConfigLoadingRules", "is", "a", "modified", "copy", "of", "openshift", "/", "origin", "/", "pkg", "/", "cmd", "/", "cli", "/", "config", ".", "NewOpenShiftClientConfigLoadingRules", ".", "NewOpenShiftClientConfigLoadingRules", "returns", "file", "prio...
[ "func", "newOpenShiftClientConfigLoadingRules", "(", ")", "*", "clientConfigLoadingRules", "{", "chain", ":=", "[", "]", "string", "{", "}", "\n\n", "envVarFile", ":=", "os", ".", "Getenv", "(", "\"", "\"", ")", "\n", "if", "len", "(", "envVarFile", ")", "...
20,566
all-20567
[ "newRefreshCredentialsHandler", "returns", "a", "new", "refreshCredentialsHandler", "object" ]
[ "func", "newRefreshCredentialsHandler", "(", "ctx", "context", ".", "Context", ",", "cluster", "string", ",", "containerInstanceArn", "string", ",", "acsClient", "wsclient", ".", "ClientServer", ",", "credentialsManager", "credentials", ".", "Manager", ",", "taskEngin...
20,567
all-20568
[ "isCompairsonOperator", "returns", "true", "if", "the", "item", "corresponds", "to", "a", "comparison", "operator", ".", "Returns", "false", "otherwise", "." ]
[ "func", "(", "i", "ItemType", ")", "isComparisonOperator", "(", ")", "bool", "{", "switch", "i", "{", "<mask>", "ItemEQL", ",", "ItemNEQ", ",", "ItemLTE", ",", "ItemLSS", ",", "ItemGTE", ",", "ItemGTR", ":", "return", "true", "\n", "default", ":", "retur...
20,568
all-20569
[ "Helpers" ]
[ "func", "generateVMName", "(", ")", "<mask>", "{", "randomID", ":=", "mcnutils", ".", "TruncateID", "(", "mcnutils", ".", "GenerateRandomID", "(", ")", ")", "\n", "return", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "randomID", ")", "\n", "}" ]
20,569
all-20570
[ "attach", "a", "container", "network", "interface", "to", "an", "external", "network" ]
[ "func", "(", "v", "*", "veth", ")", "attach", "(", "n", "*", "configs", ".", "Network", ")", "(", "err", "error", ")", "{", "bridge", ",", "err", ":=", "<mask>", ".", "InterfaceByName", "(", "n", ".", "Bridge", ")", "\n", "if", "err", "!=", "nil"...
20,570
all-20571
[ "generate", "a", "contiguous", "set", "of", "empty", "display", "lists" ]
[ "func", "GenLists", "(", "xrange", "int32", ")", "uint32", "{", "ret", ",", "_", ",", "_", ":=", "syscall", ".", "Syscall", "(", "gpGenLists", ",", "1", ",", "uintptr", "(", "xrange", ")", ",", "0", ",", "0", ")", "\n", "return", "(", "uint32", "...
20,571
all-20572
[ "newPolicyReferenceMatchFromJSON", "parses", "JSON", "data", "into", "a", "PolicyReferenceMatch", "implementation", "." ]
[ "func", "newPolicyReferenceMatchFromJSON", "(", "data", "[", "]", "byte", ")", "(", "PolicyReferenceMatch", ",", "error", ")", "{", "var", "typeField", "prmCommon", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "data", ",", "&", "typeField", ")", ...
20,572
all-20573
[ "Sign", "returns", "a", "signature", "from", "an", "input", "message", "." ]
[ "func", "(", "k", "*", "Ed25519PrivateKey", ")", "Sign", "(", "<mask>", "[", "]", "byte", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "return", "ed25519", ".", "Sign", "(", "k", ".", "k", ",", "msg", ")", ",", "nil", "\n", "}" ]
20,573
all-20574
[ "HasName", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "d", "*", "DashboardList", ")", "HasName", "(", ")", "bool", "{", "if", "d", "!=", "nil", "&&", "d", ".", "<mask>", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
20,574
all-20575
[ "PutChar", "sets", "value", "for", "the", "Canvas", "cell", ":", "rune", "and", "its", "colors", ".", "Returns", "result", "of", "operation", ":", "e", ".", "g", "if", "the", "symbol", "position", "is", "outside", "Canvas", "the", "operation", "fails", "...
[ "func", "PutChar", "(", "x", ",", "y", "int", ",", "r", "rune", ")", "bool", "{", "if", "InClipRect", "(", "x", ",", "y", ")", "{", "<mask>", ".", "SetCell", "(", "x", ",", "y", ",", "r", ",", "canvas", ".", "textColor", ",", "canvas", ".", "...
20,575
all-20576
[ "ParseAuthConfig", "parses", "the", "auth", "into", "username", ":", "password", "." ]
[ "func", "ParseAuthConfig", "(", "s", "string", ")", "(", "*", "AuthConfig", ",", "error", ")", "{", "if", "s", "==", "\"", "\"", "{", "return", "nil", ",", "ErrAuthStringEmpty", "\n", "}", "\n\n", "var", "a", "AuthConfig", "\n\n", "if", "strings", ".",...
20,576
all-20577
[ "Pack2", "()", "is", "a", "wrapper", "around", "gtk_paned_pack2", "()", "." ]
[ "func", "(", "v", "*", "Paned", ")", "Pack2", "(", "child", "IWidget", ",", "resize", ",", "shrink", "bool", ")", "{", "C", ".", "gtk_paned_pack2", "(", "v", ".", "native", "(", ")", ",", "<mask>", ".", "toWidget", "(", ")", ",", "gbool", "(", "r...
20,577
all-20578
[ "Contains", "returns", "whether", "other", "is", "contained", "by", "the", "package", "of", "l", "or", "a", "sub", "-", "package", ".", "Neither", "label", "may", "be", "relative", "." ]
[ "func", "(", "l", "<mask>", ")", "Contains", "(", "other", "Label", ")", "bool", "{", "if", "l", ".", "Relative", "{", "log", ".", "Panicf", "(", "\"", "\"", ",", "l", ")", "\n", "}", "\n", "if", "other", ".", "Relative", "{", "log", ".", "Pani...
20,578
all-20579
[ "MarshalEasyJSON", "satisfies", "easyjson", ".", "Marshaler", "." ]
[ "func", "(", "t", "ContextState", ")", "MarshalEasyJSON", "(", "out", "*", "jwriter", ".", "<mask>", ")", "{", "out", ".", "String", "(", "string", "(", "t", ")", ")", "\n", "}" ]
20,579
all-20580
[ "expandClusterVMGroup", "reads", "certain", "ResourceData", "keys", "and", "returns", "a", "ClusterVmGroup", "." ]
[ "func", "expandClusterVMGroup", "(", "d", "*", "schema", ".", "ResourceData", ",", "meta", "interface", "{", "}", ",", "name", "string", ")", "(", "*", "types", ".", "ClusterVmGroup", ",", "error", ")", "{", "client", ",", "err", ":=", "resourceVSphereComp...
20,580
all-20581
[ "Creates", "new", "group", "from", "current", "context", "attach", "it", "to", "svg", "and", "return" ]
[ "func", "(", "gc", "*", "GraphicContext", ")", "newGroup", "(", "drawType", "drawType", ")", "*", "Group", "{", "group", ":=", "Group", "{", "}", "\n", "// set attrs to group", "if", "drawType", "&", "stroked", "==", "stroked", "{", "group", ".", "Stroke",...
20,581
all-20582
[ "Creates", "the", "device", "node", "in", "the", "rootfs", "of", "the", "container", "." ]
[ "func", "createDeviceNode", "(", "rootfs", "string", ",", "node", "*", "configs", ".", "Device", ",", "bind", "bool", ")", "error", "{", "dest", ":=", "filepath", ".", "Join", "(", "rootfs", ",", "node", ".", "Path", ")", "\n", "if", "err", ":=", "os...
20,582
all-20583
[ "NewConfig", "returns", "a", "new", "Config", "from", "a", "supplied", "ResourceData", "." ]
[ "func", "NewConfig", "(", "d", "*", "schema", ".", "ResourceData", ")", "(", "*", "Config", ",", "error", ")", "{", "// Handle backcompat support for vcenter_server; once that is removed,", "// vsphere_server can just become a Required field that is referenced inline", "// in Con...
20,583
all-20584
[ "AddHandler", "adds", "a", "function", "to", "be", "called", "whenever", "an", "event", "is", "received" ]
[ "func", "(", "e", "*", "EventListener", ")", "AddHandler", "(", "types", "[", "]", "string", ",", "function", "func", "(", "api", ".", "Event", ")", ")", "(", "*", "EventTarget", ",", "error", ")", "{", "if", "function", "==", "nil", "{", "return", ...
20,584
all-20585
[ "String", "returns", "the", "name", "of", "e" ]
[ "func", "(", "e", "LedgerEntryType", ")", "String", "(", ")", "string", "{", "<mask>", ",", "_", ":=", "ledgerEntryTypeMap", "[", "int32", "(", "e", ")", "]", "\n", "return", "name", "\n", "}" ]
20,585
all-20586
[ "UnmarshalJSON", "satisfies", "json", ".", "Unmarshaler", "." ]
[ "func", "(", "t", "*", "DispatchMouseEventPointerType", ")", "UnmarshalJSON", "(", "buf", "[", "]", "<mask>", ")", "error", "{", "return", "easyjson", ".", "Unmarshal", "(", "buf", ",", "t", ")", "\n", "}" ]
20,586
all-20587
[ "HandlersMap", "returns", "handlers", "map", "needed", "to", "construct", "job", "queue", "." ]
[ "func", "HandlersMap", "(", "worker", "*", "worker", ".", "Worker", ")", "job", ".", "HandlerMap", "{", "return", "job", ".", "HandlerMap", "{", "// Agent jobs.", "data", ".", "JobAgentAfterChannelCreate", ":", "worker", ".", "AgentAfterChannelCreate", ",", "dat...
20,587
all-20588
[ "CreateBucketIfNotExists", "creates", "a", "new", "bucket", "if", "it", "doesn", "t", "already", "exist", ".", "Returns", "an", "error", "if", "the", "bucket", "name", "is", "blank", "or", "if", "the", "bucket", "name", "is", "too", "long", ".", "The", "...
[ "func", "(", "tx", "Tx", ")", "CreateBucketIfNotExists", "(", "folders", "[", "]", "[", "]", "byte", ")", "(", "Bucket", ",", "error", ")", "{", "b", ",", "err", ":=", "<mask>", ".", "Tx", ".", "CreateBucketIfNotExists", "(", "folders", "[", "0", "]"...
20,588
all-20589
[ "GetImage", "downloads", "a", "Media", "object", "and", "returns", "an", "image", ".", "Image", ".", "The", "documentation", "isn", "t", "great", "on", "what", "happens", "-", "as", "of", "October", "2016", "we", "make", "a", "request", "to", "the", "Twi...
[ "func", "(", "m", "*", "MediaService", ")", "GetImage", "(", "ctx", "context", ".", "Context", ",", "messageSid", "string", ",", "sid", "string", ")", "(", "image", ".", "Image", ",", "error", ")", "{", "u", ",", "err", ":=", "m", ".", "GetURL", "(...
20,589
all-20590
[ "GenOracle", "generates", "a", "ora", "DSN", "from", "the", "passed", "URL", "." ]
[ "func", "GenOracle", "(", "u", "*", "URL", ")", "(", "string", ",", "error", ")", "{", "// create dsn", "dsn", ":=", "u", ".", "Host", "+", "u", ".", "Path", "\n\n", "// build user/pass", "var", "un", "string", "\n", "if", "u", ".", "User", "!=", "...
20,590
all-20591
[ "GetRawUsageStats", "gets", "the", "array", "of", "most", "recent", "raw", "UsageStats", "in", "descending", "order", "of", "timestamps", "." ]
[ "func", "(", "queue", "*", "Queue", ")", "GetRawUsageStats", "(", "numStats", "int", ")", "(", "[", "]", "UsageStats", ",", "error", ")", "{", "<mask>", ".", "lock", ".", "Lock", "(", ")", "\n", "defer", "queue", ".", "lock", ".", "Unlock", "(", ")...
20,591
all-20592
[ "Do", "executes", "Page", ".", "getAppManifest", "against", "the", "provided", "context", ".", "returns", ":", "url", "-", "Manifest", "location", ".", "errors", "data", "-", "Manifest", "content", "." ]
[ "func", "(", "p", "*", "GetAppManifestParams", ")", "Do", "(", "ctx", "context", ".", "Context", ")", "(", "url", "string", ",", "errors", "[", "]", "*", "AppManifestError", ",", "data", "string", ",", "err", "error", ")", "{", "// execute", "<mask>", ...
20,592
all-20593
[ "CreateOrgs", "-" ]
[ "func", "(", "m", "*", "DefaultManager", ")", "CreateOrgs", "(", ")", "error", "{", "m", ".", "orgs", "=", "nil", "\n", "desiredOrgs", ",", "err", ":=", "m", ".", "Cfg", ".", "GetOrgConfigs", "(", ")", "\n", "if", "err", "!=", "nil", "{", "return",...
20,593
all-20594
[ "Send", "sends", "a", "crash", "report", "to", "bugsnag", "via", "an", "http", "call", "." ]
[ "func", "(", "r", "*", "BugsnagCrashReporter", ")", "Send", "(", "err", "CrashError", ")", "error", "{", "if", "r", ".", "noReportFileExist", "(", ")", "||", "r", ".", "apiKey", "==", "noreportAPIKey", "{", "log", ".", "Debug", "(", "\"", "\"", ")", ...
20,594
all-20595
[ "ContainerByName", "returns", "the", "*", "Container", "for", "the", "given", "name" ]
[ "func", "(", "task", "*", "Task", ")", "ContainerByName", "(", "name", "string", ")", "(", "*", "apicontainer", ".", "Container", ",", "bool", ")", "{", "for", "_", ",", "container", ":=", "range", "<mask>", ".", "Containers", "{", "if", "container", "...
20,595
all-20596
[ "ensureForkExists", "ensures", "a", "fork", "of", "org", "/", "repo", "exists", "for", "the", "bot", "." ]
[ "func", "(", "s", "*", "Server", ")", "ensureForkExists", "(", "org", ",", "repo", "string", ")", "error", "{", "s", ".", "repoLock", ".", "Lock", "(", ")", "\n", "defer", "s", ".", "repoLock", ".", "Unlock", "(", ")", "\n\n", "// Fork repo if it doesn...
20,596
all-20597
[ "PerformRequestWithContext", "performs", "everything", "the", "PerformRequest", "does", "but", "is", "also", "context", "-", "aware", "." ]
[ "func", "(", "a", "*", "API", ")", "PerformRequestWithContext", "(", "ctx", "context", ".", "Context", ",", "req", "*", "http", ".", "<mask>", ")", "(", "*", "http", ".", "Response", ",", "error", ")", "{", "// Sign last so auth headers don't get printed or lo...
20,597
all-20598
[ "EventuallyWithOffset", "operates", "like", "Eventually", "but", "takes", "an", "additional", "initial", "argument", "to", "indicate", "an", "offset", "in", "the", "call", "stack", ".", "This", "is", "useful", "when", "building", "helper", "functions", "that", "...
[ "func", "EventuallyWithOffset", "(", "offset", "int", ",", "actual", "interface", "{", "}", ",", "intervals", "...", "interface", "{", "}", ")", "AsyncAssertion", "{", "if", "globalFailWrapper", "==", "nil", "{", "panic", "(", "nilFailHandlerPanic", ")", "\n",...
20,598
all-20599
[ "maybeTerm", "returns", "the", "term", "of", "the", "entry", "at", "index", "i", "if", "there", "is", "any", "." ]
[ "func", "(", "u", "*", "unstable", ")", "maybeTerm", "(", "i", "uint64", ")", "(", "uint64", ",", "bool", ")", "{", "if", "i", "<", "u", ".", "offset", "{", "if", "u", ".", "snapshot", "==", "nil", "{", "return", "0", ",", "false", "\n", "}", ...
20,599
all-20600
[ "CanSign", "returns", "true", "if", "it", "s", "possible", "for", "a", "public", "key", "of", "the", "given", "type", "to", "sign", "a", "message", "." ]
[ "func", "(", "pka", "PublicKeyAlgorithm", ")", "CanSign", "(", ")", "bool", "{", "switch", "pka", "{", "<mask>", "PubKeyAlgoRSA", ",", "PubKeyAlgoRSASignOnly", ",", "PubKeyAlgoDSA", ":", "return", "true", "\n", "}", "\n", "return", "false", "\n", "}" ]