docstring_tokens
list
code_tokens
list
[ "creates", "a", "scroll", "gesture", "that", "starts", "on", "a", "particular", "screen", "location" ]
[ "public", "touch", "actions", "scroll", "(", "web", "element", "on", "element", ",", "int", "x", "offset", ",", "int", "y", "offset", ")", "{", "if", "(", "touch", "screen", "!", "=", "null", ")", "{", "action", "add", "action", "(", "new", "scroll", "action", "(", "touch", "screen", ",", "(", "locatable", ")", "on", "element", ",", "x", "offset", ",", "y", "offset", ")", ")", ";", "}", "return", "this", ";", "}" ]
[ "long", "argument", "greater", "than", "the", "given", "value", "see", "examples", "in", "javadoc", "for", "{", "@", "link", "additional", "matchers", "}", "class" ]
[ "public", "static", "long", "gt", "(", "long", "value", ")", "{", "report", "matcher", "(", "new", "greater", "than", "<", "long", ">", "(", "value", ")", ")", ";", "return", "0", ";", "}" ]
[ "release", "some", "bytes", "that", "we", "'", "re", "using", "on", "persistent", "memory" ]
[ "long", "release", "(", "extended", "block", "id", "key", ",", "long", "bytes", "count", ")", "{", "byte", "index", "=", "block", "key", "to", "volume", "remove", "(", "key", ")", ";", "return", "used", "bytes", "counts", "get", "(", "index", ")", "release", "(", "bytes", "count", ")", ";", "}" ]
[ "sets", "the", "map", "of", "environment", "variables", "for", "expanded", "actions" ]
[ "public", "builder", "set", "environment", "(", "map", "<", "string", ",", "string", ">", "environment", ")", "{", "spawn", "action", "builder", "set", "environment", "(", "environment", ")", ";", "return", "this", ";", "}" ]
[ "returns", "the", "{", "@", "link", "item", "group", "}", "from", "which", "the", "views", "in", "this", "group", "should", "render", "items", "generally", "speaking", ",", "views", "render", "a", "subset", "of", "{", "@", "link", "top", "level", "item", "}", "s", "that", "belong", "to", "this", "item", "group" ]
[ "default", "item", "group", "<", "?", "extends", "top", "level", "item", ">", "get", "item", "group", "(", ")", "{", "return", "jenkins", "get", "(", ")", ";", "}" ]
[ "creates", "a", "new", "pair", "containing", "the", "given", "elements", "in", "order" ]
[ "public", "static", "<", "a", ",", "b", ">", "pair", "<", "a", ",", "b", ">", "of", "(", "@", "nullable", "a", "first", ",", "@", "nullable", "b", "second", ")", "{", "return", "new", "pair", "<", ">", "(", "first", ",", "second", ")", ";", "}" ]
[ "creates", "a", "{", "@", "code", "hash", "code", "}", "from", "a", "byte", "array", "the", "array", "is", "not", "copied", "defensively", ",", "so", "it", "must", "be", "handed", "-", "off", "so", "as", "to", "preserve", "the", "immutability", "contract", "of", "{", "@", "code", "hash", "code", "}" ]
[ "static", "hash", "code", "from", "bytes", "no", "copy", "(", "byte", "[", "]", "bytes", ")", "{", "return", "new", "bytes", "hash", "code", "(", "bytes", ")", ";", "}" ]
[ "returns", "file", "system", "listener" ]
[ "file", "system", "listener", "get", "listener", "(", ")", "{", "return", "listeners", ";", "}" ]
[ "configure", "the", "{", "@", "link", "org", "springframework", "scheduling", "task", "scheduler", "}", "to", "use", "for", "providing", "heartbeat", "support", "setting", "this", "property", "also", "sets", "the", "{", "@", "link", "#", "set", "heartbeat", "value", "heartbeat", "value", "}", "to", "\"", "10000", ",", "10000", "\"", "by", "default", "this", "is", "not", "set" ]
[ "public", "void", "set", "task", "scheduler", "(", "@", "nullable", "task", "scheduler", "task", "scheduler", ")", "{", "this", "task", "scheduler", "=", "task", "scheduler", ";", "if", "(", "task", "scheduler", "!", "=", "null", "&", "&", "this", "heartbeat", "value", "=", "=", "null", ")", "{", "this", "heartbeat", "value", "=", "new", "long", "[", "]", "{", "10000", ",", "10000", "}", ";", "}", "}" ]
[ "create", "a", "handler", "method", "instance", "from", "an", "object", "handler", "that", "is", "either", "a", "handler", "instance", "or", "a", "string", "-", "based", "bean", "name" ]
[ "protected", "handler", "method", "create", "handler", "method", "(", "object", "handler", ",", "method", "method", ")", "{", "handler", "method", "handler", "method", ";", "if", "(", "handler", "instanceof", "string", ")", "{", "application", "context", "context", "=", "get", "application", "context", "(", ")", ";", "assert", "state", "(", "context", "!", "=", "null", ",", "\"", "application", "context", "is", "required", "for", "resolving", "handler", "bean", "names", "\"", ")", ";", "string", "bean", "name", "=", "(", "string", ")", "handler", ";", "handler", "method", "=", "new", "handler", "method", "(", "bean", "name", ",", "context", "get", "autowire", "capable", "bean", "factory", "(", ")", ",", "method", ")", ";", "}", "else", "{", "handler", "method", "=", "new", "handler", "method", "(", "handler", ",", "method", ")", ";", "}", "return", "handler", "method", ";", "}" ]
[ "return", "the", "options", "to", "be", "used", "by", "this", "expression" ]
[ "protected", "find", "options", "get", "options", "(", ")", "{", "return", "(", "this", "options", "=", "=", "null", ")", "?", "new", "find", "options", "(", ")", ":", "this", "options", ";", "}" ]
[ "sets", "the", "y", "position", "where", "the", "sprite", "will", "be", "drawn", "if", "origin", ",", "rotation", ",", "or", "scale", "are", "changed", ",", "it", "is", "slightly", "more", "efficient", "to", "set", "the", "position", "after", "those", "operations", "if", "both", "position", "and", "size", "are", "to", "be", "changed", ",", "it", "is", "better", "to", "use", "{", "@", "link", "#", "set", "bounds", "(", "float", ",", "float", ",", "float", ",", "float", ")", "}" ]
[ "public", "void", "set", "y", "(", "float", "y", ")", "{", "translate", "y", "(", "y", "-", "this", "y", ")", ";", "}" ]
[ "{", "@", "inherit", "doc", "}" ]
[ "public", "int", "hash", "code", "(", ")", "{", "return", "(", "name", "=", "=", "null", "?", "0", ":", "name", "hash", "code", "(", ")", ")", "*", "31", "+", "(", "signature", "=", "=", "null", "?", "0", ":", "signature", "hash", "code", "(", ")", ")", ";", "}" ]
[ "return", "number", "of", "cached", "entries" ]
[ "public", "int", "size", "(", ")", "{", "return", "map", "size", "(", ")", ";", "}" ]
[ "tests", "allocation", "of", "rack", "local", "opportunistic", "containers", "with", "same", "scheduler", "key" ]
[ "public", "void", "test", "lots", "of", "containers", "rack", "local", "allocation", "same", "scheduler", "key", "(", ")", "throws", "exception", "{", "list", "<", "resource", "request", ">", "reqs", "=", "arrays", "as", "list", "(", "create", "resource", "request", "(", "2", ",", "\"", "/", "r", "1", "\"", ",", "1000", ")", ",", "create", "resource", "request", "(", "2", ",", "\"", "h", "1", "\"", ",", "1000", ")", ",", "create", "resource", "request", "(", "2", ",", "resource", "request", "any", ",", "1000", ")", ")", ";", "application", "attempt", "id", "app", "att", "id", "=", "application", "attempt", "id", "new", "instance", "(", "application", "id", "new", "instance", "(", "0l", ",", "1", ")", ",", "1", ")", ";", "node", "queue", "load", "monitor", "selector", "=", "create", "node", "queue", "load", "monitor", "(", "arrays", "as", "list", "(", "\"", "h", "1", "\"", ",", "\"", "h", "2", "\"", ",", "\"", "h", "3", "\"", ",", "\"", "h", "4", "\"", ")", ",", "arrays", "as", "list", "(", "\"", "/", "r", "1", "\"", ",", "\"", "/", "r", "1", "\"", ",", "\"", "/", "r", "1", "\"", ",", "\"", "/", "r", "2", "\"", ")", ",", "arrays", "as", "list", "(", "0", ",", "0", ",", "0", ",", "0", ")", ",", "arrays", "as", "list", "(", "500", ",", "500", ",", "500", ",", "300", ")", ")", ";", "allocator", "set", "node", "queue", "load", "monitor", "(", "selector", ")", ";", "list", "<", "container", ">", "containers", "=", "allocator", "allocate", "containers", "(", "empty", "blacklist", "request", ",", "reqs", ",", "app", "att", "id", ",", "opp", "cntxt", ",", "1l", ",", "\"", "user", "\"", ")", ";", "map", "<", "string", ",", "integer", ">", "hosts", "to", "num", "container", "map", "=", "new", "hash", "map", "<", ">", "(", ")", ";", "for", "(", "container", "c", ":", "containers", ")", "{", "string", "host", "=", "c", "get", "node", "id", "(", ")", "to", "string", "(", ")", ";", "int", "num", "containers", "=", "0", ";", "if", "(", "hosts", "to", "num", "container", "map", "contains", "key", "(", "host", ")", ")", "{", "num", "containers", "=", "hosts", "to", "num", "container", "map", "get", "(", "host", ")", ";", "}", "hosts", "to", "num", "container", "map", "put", "(", "host", ",", "num", "containers", "+", "1", ")", ";", "}", "assert", "equals", "(", "1000", ",", "containers", "size", "(", ")", ")", ";", "assert", "equals", "(", "500", ",", "hosts", "to", "num", "container", "map", "get", "(", "\"", "h", "1", ":", "1234", "\"", ")", "int", "value", "(", ")", ")", ";", "assert", "false", "(", "hosts", "to", "num", "container", "map", "contains", "key", "(", "\"", "h", "4", ":", "1234", "\"", ")", ")", ";", "}" ]
[ "returns", "the", "associated", "value", "type" ]
[ "public", "class", "<", "v", ">", "value", "type", "(", ")", "{", "return", "value", "type", ";", "}" ]
[ "get", "array", "item" ]
[ "public", "list", "<", "integer", ">", "get", "array", "item", "(", ")", "{", "return", "array", "item", ";", "}" ]
[ "returns", "true", "if", "metadata", "and", "snapshot", "files", "should", "be", "compressed" ]
[ "protected", "final", "boolean", "is", "compress", "(", ")", "{", "return", "compress", ";", "}" ]
[ "with", "fix", "to", "jenkins", "-", "11251", "(", "remoting", "2", "15", ")", ",", "this", "is", "no", "longer", "necessary", "but", "i", "'", "m", "keeping", "it", "for", "a", "while", "so", "that", "users", "who", "manually", "deploy", "agent", "jar", "has", "time", "to", "deploy", "new", "version", "before", "this", "goes", "away" ]
[ "private", "void", "sync", "i", "o", "(", ")", "throws", "interrupted", "exception", "{", "try", "{", "if", "(", "channel", "!", "=", "null", ")", "channel", "sync", "local", "i", "o", "(", ")", ";", "}", "catch", "(", "abstract", "method", "error", "e", ")", "{", "/", "/", "legacy", "agent", "jar", "handle", "this", "gracefully", "try", "{", "logger", "log", "(", "level", "warning", ",", "\"", "looks", "like", "an", "old", "agent", "jar", "please", "update", "\"", "+", "which", "jar", "file", "(", "channel", "class", ")", "+", "\"", "to", "the", "new", "version", "\"", ",", "e", ")", ";", "}", "catch", "(", "i", "o", "exception", "ignored", ")", "{", "/", "/", "really", "ignore", "this", "time", "}", "}", "}" ]
[ "return", "the", "list", "of", "values", "associated", "with", "the", "given", "option", "{", "@", "code", "null", "}", "signifies", "that", "the", "option", "was", "not", "present", ";", "empty", "list", "signifies", "that", "no", "values", "were", "associated", "with", "this", "option" ]
[ "public", "list", "<", "string", ">", "get", "option", "values", "(", "string", "option", "name", ")", "{", "return", "this", "option", "args", "get", "(", "option", "name", ")", ";", "}" ]
[ "model", "tests", "for", "additional", "properties", "object" ]
[ "public", "void", "test", "additional", "properties", "object", "(", ")", "{", "/", "/", "todo", ":", "test", "additional", "properties", "object", "}" ]
[ "is", "cas", "authentication", "available", "and", "old", "for", "max", "age", "authorization", "request", "?" ]
[ "public", "boolean", "is", "cas", "authentication", "old", "for", "max", "age", "authorization", "request", "(", "final", "web", "context", "context", ")", "{", "return", "is", "cas", "authentication", "available", "(", "context", ")", "filter", "(", "a", "-", ">", "is", "cas", "authentication", "old", "for", "max", "age", "authorization", "request", "(", "context", ",", "a", ")", ")", "is", "present", "(", ")", ";", "}" ]
[ "returns", "true", "if", "this", "segment", "is", "executable", "when", "loaded" ]
[ "public", "boolean", "is", "execute", "(", ")", "{", "return", "header", "get", "load", "adapter", "(", ")", "is", "segment", "executable", "(", "this", ")", ";", "}" ]
[ "tells", "whether", "the", "last", "action", "can", "be", "undone" ]
[ "public", "boolean", "can", "undo", "(", ")", "{", "return", "content", "!", "=", "null", "&", "&", "content", "can", "undo", "(", ")", ";", "}" ]
[ "get", "the", "index", "of", "the", "attribute", "with", "the", "specified", "name", ",", "or", "{", "@", "code", "-", "1", "}", "if", "there", "is", "no", "attribute", "with", "the", "name" ]
[ "int", "index", "of", "(", "string", "name", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", "attribute", "methods", "length", ";", "i", "+", "+", ")", "{", "if", "(", "this", "attribute", "methods", "[", "i", "]", "get", "name", "(", ")", "equals", "(", "name", ")", ")", "{", "return", "i", ";", "}", "}", "return", "-", "1", ";", "}" ]
[ "creates", "a", "new", "blocking", "-", "style", "stub", "that", "supports", "unary", "and", "streaming", "output", "calls", "on", "the", "service" ]
[ "public", "static", "channelz", "blocking", "stub", "new", "blocking", "stub", "(", "io", "grpc", "channel", "channel", ")", "{", "io", "grpc", "stub", "abstract", "stub", "stub", "factory", "<", "channelz", "blocking", "stub", ">", "factory", "=", "new", "io", "grpc", "stub", "abstract", "stub", "stub", "factory", "<", "channelz", "blocking", "stub", ">", "(", ")", "{", "@", "java", "lang", "override", "public", "channelz", "blocking", "stub", "new", "stub", "(", "io", "grpc", "channel", "channel", ",", "io", "grpc", "call", "options", "call", "options", ")", "{", "return", "new", "channelz", "blocking", "stub", "(", "channel", ",", "call", "options", ")", ";", "}", "}", ";", "return", "channelz", "blocking", "stub", "new", "stub", "(", "factory", ",", "channel", ")", ";", "}" ]
[ "close", "n", "release", "(", ")", "is", "invoked", "after", "all", "messages", "have", "been", "sent" ]
[ "void", "close", "n", "release", "(", ")", "{", "if", "(", "channel", "ref", "get", "(", ")", "!", "=", "null", ")", "channel", "ref", "get", "(", ")", "close", "(", ")", "await", "uninterruptibly", "(", ")", ";", "/", "/", "we", "need", "to", "release", "resources", "new", "thread", "(", "new", "runnable", "(", ")", "{", "@", "override", "public", "void", "run", "(", ")", "{", "factory", "release", "external", "resources", "(", ")", ";", "}", "}", ")", "start", "(", ")", ";", "}" ]
[ "removes", "all", "the", "ranges", "that", "are", "in", "the", "specified", "other", "list", "from", "this", "list" ]
[ "public", "void", "remove", "(", "sorted", "range", "list", "other", ")", "{", "iterator", "<", "range", ">", "it", "=", "other", "get", "ranges", "(", ")", ";", "while", "(", "it", "has", "next", "(", ")", ")", "{", "range", "r", "=", "it", "next", "(", ")", ";", "remove", "range", "(", "r", "min", ",", "r", "max", ")", ";", "}", "}" ]
[ "parse", "a", "block", "id", "to", "find", "the", "block", "type", "note", ":", "the", "old", "block", "id", "generation", "algorithm", "was", "based", "on", "a", "pseudo", "random", "number", "generator", ",", "so", "there", "may", "be", "legacy", "blocks", "that", "make", "this", "conversion", "unreliable" ]
[ "public", "static", "block", "type", "from", "block", "id", "(", "long", "block", "id", ")", "{", "long", "block", "type", "=", "block", "id", "&", "block", "id", "mask", ";", "if", "(", "block", "type", "=", "=", "block", "id", "mask", "striped", ")", "{", "return", "striped", ";", "}", "return", "contiguous", ";", "}" ]
[ "clears", "all", "objects", "from", "map" ]
[ "public", "synchronized", "void", "clear", "all", "(", ")", "{", "ranges", "clear", "(", ")", ";", "last", "range", "=", "null", ";", "}" ]
[ "tracks", "the", "provided", "http", "request", "if", "it", "matches", "the", "criteria", "defined", "by", "this", "tracker" ]
[ "private", "boolean", "track", "(", "final", "http", "request", "http", "request", ",", "final", "google", "cloud", "storage", "operations", "stats", "stats", ")", "{", "if", "(", "matches", "criteria", "(", "http", "request", ")", "=", "=", "false", ")", "return", "false", ";", "stats", "tracker", "accept", "(", "stats", ")", ";", "return", "true", ";", "}" ]
[ "specify", "which", "proxy", "to", "use", "for", "ssl", "connections" ]
[ "public", "proxy", "set", "ssl", "proxy", "(", "string", "ssl", "proxy", ")", "{", "verify", "proxy", "type", "compatibility", "(", "proxy", "type", "manual", ")", ";", "this", "proxy", "type", "=", "proxy", "type", "manual", ";", "this", "ssl", "proxy", "=", "ssl", "proxy", ";", "return", "this", ";", "}" ]
[ "get", "prefix", "ns", "wrapped", "array" ]
[ "public", "list", "<", "integer", ">", "get", "prefix", "ns", "wrapped", "array", "(", ")", "{", "return", "prefix", "ns", "wrapped", "array", ";", "}" ]
[ "copy", "the", "directory" ]
[ "private", "static", "boolean", "copy", "dir", "(", "final", "file", "src", "dir", ",", "final", "file", "dest", "dir", ",", "final", "on", "replace", "listener", "listener", ")", "{", "return", "copy", "or", "move", "dir", "(", "src", "dir", ",", "dest", "dir", ",", "listener", ",", "false", ")", ";", "}" ]
[ "build", "http", "post", "get", "user", "auth", "request" ]
[ "protected", "http", "build", "http", "post", "user", "pre", "auth", "request", "(", "final", "string", "username", ")", "{", "val", "request", "=", "new", "http", "(", "http", "method", "post", "name", "(", ")", ",", "duo", "properties", "get", "duo", "api", "host", "(", ")", ",", "string", "format", "(", "\"", "/", "auth", "/", "v", "%", "s", "/", "preauth", "\"", ",", "auth", "api", "version", ")", ")", ";", "request", "add", "param", "(", "\"", "username", "\"", ",", "username", ")", ";", "configure", "http", "request", "(", "request", ")", ";", "return", "request", ";", "}" ]
[ "enables", "or", "disables", "auto", "-", "rotate", "for", "the", "image", "in", "case", "image", "has", "orientation" ]
[ "public", "image", "request", "builder", "set", "auto", "rotate", "enabled", "(", "boolean", "enabled", ")", "{", "if", "(", "enabled", ")", "{", "return", "set", "rotation", "options", "(", "rotation", "options", "auto", "rotate", "(", ")", ")", ";", "}", "else", "{", "return", "set", "rotation", "options", "(", "rotation", "options", "disable", "rotation", "(", ")", ")", ";", "}", "}" ]
[ "ensures", "read", "on", "re", "-", "open", "(", "after", "seek", "backwards", ")", "when", "s3", "does", "not", "return", "the", "version", "of", "the", "file", "tracked", "in", "the", "metadata", "store", "fails", "immediately", "no", "retries", "should", "happen", "since", "a", "retry", "is", "not", "expected", "to", "recover" ]
[ "public", "void", "test", "eventually", "consistent", "read", "on", "reopen", "(", ")", "throws", "throwable", "{", "require", "s", "3", "guard", "(", ")", ";", "amazon", "s", "3", "s", "3", "client", "spy", "=", "spy", "on", "filesystem", "(", ")", ";", "string", "filename", "=", "\"", "eventually", "-", "reopen", "dat", "\"", ";", "final", "path", "testpath", "=", "write", "eventually", "consistent", "file", "version", "(", "filename", ",", "s", "3", "client", "spy", ",", "0", ",", "0", ",", "0", ")", ";", "try", "(", "f", "s", "data", "input", "stream", "instream", "=", "fs", "open", "(", "testpath", ")", ")", "{", "instream", "read", "(", ")", ";", "/", "/", "overwrite", "the", "file", ",", "returning", "inconsistent", "version", "for", "/", "/", "(", "effectively", ")", "infinite", "retries", "write", "eventually", "consistent", "file", "version", "(", "filename", ",", "s", "3", "client", "spy", ",", "integer", "max", "value", ",", "0", ",", "0", ")", ";", "instream", "seek", "(", "0", ")", ";", "if", "(", "expected", "exception", "interactions", "contains", "(", "interaction", "type", "read", ")", ")", "{", "/", "/", "if", "it", "retries", "at", "all", ",", "it", "will", "retry", "forever", ",", "which", "should", "fail", "/", "/", "the", "test", "the", "expected", "behavior", "is", "immediate", "/", "/", "remote", "file", "changed", "exception", "expect", "read", "failure", "(", "instream", ")", ";", "}", "else", "{", "instream", "read", "(", ")", ";", "}", "}", "}" ]
[ "increment", "the", "number", "of", "bytes", "received", "prior", "to", "doing", "any", "decompression" ]
[ "void", "increment", "compressed", "bytes", "(", "int", "delta", ")", "{", "assert", "delta", ">", "=", "0", ";", "compressed", "+", "=", "delta", ";", "}" ]
[ "checks", "to", "see", "if", "this", "location", "is", "for", "the", "indicated", "variable" ]
[ "public", "boolean", "is", "location", "for", "(", "variable", "var", ")", "{", "if", "(", "!", "function", "addr", "equals", "(", "var", "get", "function", "(", ")", "get", "entry", "point", "(", ")", ")", ")", "{", "return", "false", ";", "}", "if", "(", "var", "instanceof", "parameter", ")", "{", "return", "is", "parameter", "&", "&", "(", "ordinal", "orfirst", "use", "offset", "=", "=", "(", "(", "parameter", ")", "var", ")", "get", "ordinal", "(", ")", ")", ";", "}", "return", "(", "ordinal", "orfirst", "use", "offset", "=", "=", "var", "get", "first", "use", "offset", "(", ")", "&", "&", "variable", "address", "equals", "(", "get", "variable", "address", "(", "var", ")", ")", ")", ";", "}" ]
[ "convenience", "method", "that", "does", "{", "@", "link", "#", "kill", "all", "(", "map", ")", "}", "and", "{", "@", "link", "o", "s", "process", "#", "kill", "recursively", "(", ")", "}", "this", "is", "necessary", "to", "reliably", "kill", "the", "process", "and", "its", "descendants", ",", "as", "some", "os", "may", "not", "implement", "{", "@", "link", "#", "kill", "all", "(", "map", ")", "}", "either", "of", "the", "parameter", "can", "be", "null" ]
[ "public", "void", "kill", "all", "(", "@", "check", "for", "null", "process", "proc", ",", "@", "check", "for", "null", "map", "<", "string", ",", "string", ">", "model", "env", "vars", ")", "throws", "interrupted", "exception", "{", "logger", "fine", "(", "\"", "kill", "all", ":", "process", "=", "\"", "+", "proc", "+", "\"", "and", "envs", "=", "\"", "+", "model", "env", "vars", ")", ";", "if", "(", "proc", "!", "=", "null", ")", "{", "o", "s", "process", "p", "=", "get", "(", "proc", ")", ";", "if", "(", "p", "!", "=", "null", ")", "p", "kill", "recursively", "(", ")", ";", "}", "if", "(", "model", "env", "vars", "!", "=", "null", ")", "kill", "all", "(", "model", "env", "vars", ")", ";", "}" ]
[ "model", "tests", "for", "file", "schema", "test", "class" ]
[ "public", "void", "test", "file", "schema", "test", "class", "(", ")", "{", "/", "/", "todo", ":", "test", "file", "schema", "test", "class", "}" ]
[ "returns", "the", "names", "of", "the", "fields", "of", "starlark", "value", "{", "@", "code", "x", "}", ",", "as", "defined", "by", "java", "methods", "with", "{", "@", "code", "starlark", "method", "(", "struct", "field", "=", "true", ")", "}", "annotations", "under", "the", "specified", "semantics", "most", "callers", "should", "use", "{", "@", "link", "#", "dir", "}", "instead" ]
[ "public", "static", "immutable", "set", "<", "string", ">", "get", "annotated", "field", "names", "(", "starlark", "semantics", "semantics", ",", "object", "x", ")", "{", "return", "call", "utils", "get", "annotated", "field", "names", "(", "semantics", ",", "x", ")", ";", "}" ]
[ "the", "number", "of", "records", "with", "a", "timestamp", "that", "is", "before", "the", "time", "of", "the", "latest", "record", "records", "should", "be", "in", "ascending", "chronological", "order" ]
[ "public", "long", "get", "out", "of", "order", "time", "stamp", "count", "(", ")", "{", "return", "out", "of", "order", "time", "stamp", "count", ";", "}" ]
[ "sets", "whether", "the", "player", "should", "throw", "when", "it", "detects", "it", "'", "s", "stuck", "buffering", "this", "method", "is", "experimental", ",", "and", "will", "be", "renamed", "or", "removed", "in", "a", "future", "release" ]
[ "public", "builder", "experimental", "set", "throw", "when", "stuck", "buffering", "(", "boolean", "throw", "when", "stuck", "buffering", ")", "{", "this", "throw", "when", "stuck", "buffering", "=", "throw", "when", "stuck", "buffering", ";", "return", "this", ";", "}" ]
[ "returns", "the", "original", "element", "list", ",", "unchanged" ]
[ "public", "list", "<", "object", ">", "order", "(", "list", "<", "object", ">", "insertion", "order", ")", "{", "return", "insertion", "order", ";", "}" ]
[ "get", "summarized", "app", "allocation", "from", "multiple", "allocations", "as", "follows", ":", "1", "collect", "latest", "allocation", "attempts", "on", "nodes", "to", "construct", "an", "allocation", "summary", "on", "nodes", "from", "multiple", "app", "allocations", "which", "are", "recorded", "a", "few", "seconds", "before", "the", "last", "allocation", "2", "copy", "other", "fields", "from", "the", "last", "allocation" ]
[ "private", "app", "allocation", "get", "summarized", "app", "allocation", "(", "list", "<", "app", "allocation", ">", "allocations", ",", "double", "max", "time", "in", "seconds", ")", "{", "if", "(", "allocations", "=", "=", "null", "|", "|", "allocations", "is", "empty", "(", ")", ")", "{", "return", "null", ";", "}", "long", "start", "time", "=", "allocations", "get", "(", "allocations", "size", "(", ")", "-", "1", ")", "get", "time", "(", ")", "-", "(", "long", ")", "(", "max", "time", "in", "seconds", "*", "1000", ")", ";", "map", "<", "string", ",", "activity", "node", ">", "node", "activities", "=", "new", "hash", "map", "<", ">", "(", ")", ";", "for", "(", "int", "i", "=", "allocations", "size", "(", ")", "-", "1", ";", "i", ">", "=", "0", ";", "i", "-", "-", ")", "{", "app", "allocation", "app", "allocation", "=", "allocations", "get", "(", "i", ")", ";", "if", "(", "start", "time", ">", "app", "allocation", "get", "time", "(", ")", ")", "{", "break", ";", "}", "list", "<", "activity", "node", ">", "activity", "nodes", "=", "app", "allocation", "get", "allocation", "attempts", "(", ")", ";", "for", "(", "activity", "node", "an", ":", "activity", "nodes", ")", "{", "node", "activities", "put", "if", "absent", "(", "an", "get", "request", "priority", "(", ")", "+", "\"", "\"", "+", "an", "get", "allocation", "request", "id", "(", ")", "+", "\"", "\"", "+", "an", "get", "node", "id", "(", ")", ",", "an", ")", ";", "}", "}", "app", "allocation", "last", "app", "allocation", "=", "allocations", "get", "(", "allocations", "size", "(", ")", "-", "1", ")", ";", "app", "allocation", "summarized", "app", "allocation", "=", "new", "app", "allocation", "(", "last", "app", "allocation", "get", "priority", "(", ")", ",", "null", ",", "last", "app", "allocation", "get", "queue", "name", "(", ")", ")", ";", "summarized", "app", "allocation", "update", "app", "container", "state", "and", "time", "(", "null", ",", "last", "app", "allocation", "get", "activity", "state", "(", ")", ",", "last", "app", "allocation", "get", "time", "(", ")", ",", "last", "app", "allocation", "get", "diagnostic", "(", ")", ")", ";", "summarized", "app", "allocation", "set", "allocation", "attempts", "(", "new", "array", "list", "<", ">", "(", "node", "activities", "values", "(", ")", ")", ")", ";", "return", "summarized", "app", "allocation", ";", "}" ]
[ "convert", "the", "given", "object", "to", "string", "with", "each", "line", "indented", "by", "4", "spaces", "(", "except", "the", "first", "line", ")" ]
[ "private", "string", "to", "indented", "string", "(", "object", "o", ")", "{", "if", "(", "o", "=", "=", "null", ")", "{", "return", "\"", "null", "\"", ";", "}", "return", "o", "to", "string", "(", ")", "replace", "(", "\"", "\\", "n", "\"", ",", "\"", "\\", "n", "\"", ")", ";", "}" ]
[ "return", "the", "{", "@", "link", "session", "status", "}", "instance", "to", "use", "that", "can", "be", "used", "to", "signal", "that", "session", "processing", "is", "complete" ]
[ "public", "session", "status", "get", "session", "status", "(", ")", "{", "return", "this", "session", "status", ";", "}" ]
[ "returns", "{", "@", "code", "true", "}", "since", "this", "class", "supports", "{", "@", "link", "#", "mark", "(", "int", ")", "}", "and", "{", "@", "link", "#", "reset", "(", ")", "}", "methods" ]
[ "public", "boolean", "mark", "supported", "(", ")", "{", "return", "true", ";", "}" ]
[ "add", "all", "extension", "specific", "program", "header", "types", "(", "e", "g", ",", "pt", "prefix", ")", "this", "method", "will", "add", "all", "those", "statically", "defined", "elf", "program", "header", "type", "fields", "within", "this", "class" ]
[ "public", "final", "void", "add", "program", "header", "types", "(", "map", "<", "integer", ",", "elf", "program", "header", "type", ">", "program", "header", "type", "map", ")", "{", "for", "(", "field", "field", ":", "get", "class", "(", ")", "get", "declared", "fields", "(", ")", ")", "{", "string", "name", "=", "null", ";", "try", "{", "if", "(", "modifier", "is", "static", "(", "field", "get", "modifiers", "(", ")", ")", "&", "&", "field", "get", "type", "(", ")", "equals", "(", "elf", "program", "header", "type", "class", ")", ")", "{", "elf", "program", "header", "type", "type", "=", "(", "elf", "program", "header", "type", ")", "field", "get", "(", "this", ")", ";", "name", "=", "type", "name", ";", "elf", "program", "header", "type", "add", "program", "header", "type", "(", "type", ",", "program", "header", "type", "map", ")", ";", "}", "}", "catch", "(", "duplicate", "name", "exception", "e", ")", "{", "msg", "error", "(", "this", ",", "\"", "invalid", "elf", "program", "header", "type", "(", "\"", "+", "name", "+", "\"", ")", "defined", "by", "\"", "+", "get", "class", "(", ")", "get", "name", "(", ")", ",", "e", ")", ";", "}", "catch", "(", "illegal", "argument", "exception", "|", "illegal", "access", "exception", "e", ")", "{", "throw", "new", "assert", "exception", "(", "e", ")", ";", "}", "}", "}" ]
[ "this", "test", "validates", "the", "correctness", "of", "force", "kill", "application", "in", "case", "the", "application", "exists", "in", "the", "cluster" ]
[ "public", "void", "test", "force", "kill", "application", "(", ")", "throws", "yarn", "exception", ",", "i", "o", "exception", ",", "interrupted", "exception", "{", "log", "info", "(", "\"", "test", "federation", "client", "interceptor", ":", "force", "kill", "application", "\"", ")", ";", "application", "id", "app", "id", "=", "application", "id", "new", "instance", "(", "system", "current", "time", "millis", "(", ")", ",", "1", ")", ";", "submit", "application", "request", "request", "=", "mock", "submit", "application", "request", "(", "app", "id", ")", ";", "/", "/", "submit", "the", "application", "we", "are", "going", "to", "kill", "later", "submit", "application", "response", "response", "=", "interceptor", "submit", "application", "(", "request", ")", ";", "assert", "assert", "not", "null", "(", "response", ")", ";", "assert", "assert", "not", "null", "(", "state", "store", "util", "query", "application", "home", "s", "c", "(", "app", "id", ")", ")", ";", "kill", "application", "request", "request", "kill", "=", "kill", "application", "request", "new", "instance", "(", "app", "id", ")", ";", "kill", "application", "response", "response", "kill", "=", "interceptor", "force", "kill", "application", "(", "request", "kill", ")", ";", "assert", "assert", "not", "null", "(", "response", "kill", ")", ";", "}" ]
[ "test", "that", "block", "will", "be", "recovered", "even", "if", "there", "are", "less", "than", "the", "specified", "min", "replication", "datanodes", "involved", "in", "its", "recovery", "check", "that", ",", "after", "recovering", ",", "the", "block", "will", "be", "successfully", "replicated" ]
[ "public", "void", "test", "recovery", "will", "ignore", "min", "replication", "(", ")", "throws", "exception", "{", "tear", "down", "(", ")", ";", "/", "/", "stop", "the", "mocked", "dn", "started", "in", "startup", "(", ")", "final", "int", "block", "size", "=", "4096", ";", "final", "int", "num", "replicas", "=", "3", ";", "final", "string", "filename", "=", "\"", "/", "test", "ignore", "min", "replication", "\"", ";", "final", "path", "file", "path", "=", "new", "path", "(", "filename", ")", ";", "configuration", "configuration", "=", "new", "hdfs", "configuration", "(", ")", ";", "configuration", "set", "int", "(", "dfs", "namenode", "heartbeat", "recheck", "interval", "key", ",", "2000", ")", ";", "configuration", "set", "int", "(", "dfs", "namenode", "replication", "min", "key", ",", "2", ")", ";", "configuration", "set", "long", "(", "dfs", "block", "size", "key", ",", "block", "size", ")", ";", "mini", "d", "f", "s", "cluster", "cluster", "=", "null", ";", "try", "{", "cluster", "=", "new", "mini", "d", "f", "s", "cluster", "builder", "(", "configuration", ")", "num", "data", "nodes", "(", "5", ")", "build", "(", ")", ";", "cluster", "wait", "active", "(", ")", ";", "final", "distributed", "file", "system", "dfs", "=", "cluster", "get", "file", "system", "(", ")", ";", "final", "f", "s", "namesystem", "fsn", "=", "cluster", "get", "namesystem", "(", ")", ";", "/", "/", "create", "a", "file", "and", "never", "close", "the", "output", "stream", "to", "trigger", "recovery", "f", "s", "data", "output", "stream", "out", "=", "dfs", "create", "(", "file", "path", ",", "(", "short", ")", "num", "replicas", ")", ";", "out", "write", "(", "append", "test", "util", "random", "bytes", "(", "0", ",", "block", "size", ")", ")", ";", "out", "hsync", "(", ")", ";", "d", "f", "s", "client", "dfs", "client", "=", "new", "d", "f", "s", "client", "(", "new", "inet", "socket", "address", "(", "\"", "localhost", "\"", ",", "cluster", "get", "name", "node", "port", "(", ")", ")", ",", "configuration", ")", ";", "located", "block", "blk", "=", "dfs", "client", "get", "namenode", "(", ")", "get", "block", "locations", "(", "filename", ",", "0", ",", "block", "size", ")", "get", "last", "located", "block", "(", ")", ";", "/", "/", "kill", "2", "out", "of", "3", "datanodes", "so", "that", "only", "1", "alive", ",", "thus", "<", "min", "replication", "list", "<", "datanode", "info", ">", "data", "nodes", "=", "arrays", "as", "list", "(", "blk", "get", "locations", "(", ")", ")", ";", "assert", "equals", "(", "data", "nodes", "size", "(", ")", ",", "num", "replicas", ")", ";", "for", "(", "datanode", "info", "data", "node", ":", "data", "nodes", "sub", "list", "(", "0", ",", "num", "replicas", "-", "1", ")", ")", "{", "cluster", "stop", "data", "node", "(", "data", "node", "get", "name", "(", ")", ")", ";", "}", "generic", "test", "utils", "wait", "for", "(", "new", "supplier", "<", "boolean", ">", "(", ")", "{", "@", "override", "public", "boolean", "get", "(", ")", "{", "return", "fsn", "get", "num", "dead", "data", "nodes", "(", ")", "=", "=", "2", ";", "}", "}", ",", "300", ",", "300000", ")", ";", "/", "/", "make", "sure", "hard", "lease", "expires", "to", "trigger", "replica", "recovery", "cluster", "set", "lease", "period", "(", "100l", ",", "100l", ")", ";", "/", "/", "wait", "for", "recovery", "to", "succeed", "generic", "test", "utils", "wait", "for", "(", "new", "supplier", "<", "boolean", ">", "(", ")", "{", "@", "override", "public", "boolean", "get", "(", ")", "{", "try", "{", "return", "dfs", "is", "file", "closed", "(", "file", "path", ")", ";", "}", "catch", "(", "i", "o", "exception", "e", ")", "{", "}", "return", "false", ";", "}", "}", ",", "300", ",", "300000", ")", ";", "/", "/", "wait", "for", "the", "block", "to", "be", "replicated", "d", "f", "s", "test", "util", "wait", "for", "replication", "(", "cluster", ",", "d", "f", "s", "test", "util", "get", "first", "block", "(", "dfs", ",", "file", "path", ")", ",", "1", ",", "num", "replicas", ",", "0", ")", ";", "}", "finally", "{", "if", "(", "cluster", "!", "=", "null", ")", "{", "cluster", "shutdown", "(", ")", ";", "}", "}", "}" ]
[ "{", "@", "inherit", "doc", "}" ]
[ "public", "string", "insn", "arg", "string", "(", "dalv", "insn", "insn", ")", "{", "/", "/", "this", "format", "has", "no", "arguments", "return", "\"", "\"", ";", "}" ]
[ "verify", "boot", "works", "configuring", "a", "metrics", "provider" ]
[ "public", "void", "test", "metrics", "provider", "lifecycle", "(", ")", "throws", "exception", "{", "client", "base", "setup", "test", "env", "(", ")", ";", "base", "test", "metrics", "provider", "metrics", "provider", "capturing", "lifecycle", "reset", "(", ")", ";", "/", "/", "setup", "the", "logger", "to", "capture", "all", "logs", "byte", "array", "output", "stream", "os", "=", "new", "byte", "array", "output", "stream", "(", ")", ";", "writer", "appender", "appender", "=", "get", "console", "appender", "(", "os", ",", "level", "warn", ")", ";", "logger", "qlogger", "=", "logger", "get", "logger", "(", "\"", "org", "apache", "zookeeper", "server", "quorum", "\"", ")", ";", "qlogger", "add", "appender", "(", "appender", ")", ";", "try", "{", "final", "int", "client", "port", "qp1", "=", "port", "assignment", "unique", "(", ")", ";", "final", "int", "client", "port", "qp2", "=", "port", "assignment", "unique", "(", ")", ";", "string", "quorum", "cfg", "section", "server", "=", "\"", "server", "1", "=", "127", "0", "0", "1", ":", "\"", "+", "port", "assignment", "unique", "(", ")", "+", "\"", ":", "\"", "+", "port", "assignment", "unique", "(", ")", "+", "\"", ";", "\"", "+", "client", "port", "qp1", "+", "\"", "\\", "nserver", "2", "=", "127", "0", "0", "1", ":", "\"", "+", "port", "assignment", "unique", "(", ")", "+", "\"", ":", "\"", "+", "port", "assignment", "unique", "(", ")", "+", "\"", ";", "\"", "+", "client", "port", "qp2", "+", "\"", "\\", "n", "\"", ";", "/", "/", "server", "1", "boots", "with", "a", "metrics", "provider", "string", "quorum", "cfg", "section", "server", "1", "=", "quorum", "cfg", "section", "server", "+", "\"", "metrics", "provider", "class", "name", "=", "\"", "+", "base", "test", "metrics", "provider", "metrics", "provider", "capturing", "lifecycle", "class", "get", "name", "(", ")", "+", "\"", "\\", "n", "\"", ";", "main", "thread", "q", "1", "=", "new", "main", "thread", "(", "1", ",", "client", "port", "qp1", ",", "quorum", "cfg", "section", "server", "1", ")", ";", "main", "thread", "q", "2", "=", "new", "main", "thread", "(", "2", ",", "client", "port", "qp2", ",", "quorum", "cfg", "section", "server", ")", ";", "q", "1", "start", "(", ")", ";", "q", "2", "start", "(", ")", ";", "boolean", "isup", "1", "=", "client", "base", "wait", "for", "server", "up", "(", "\"", "127", "0", "0", "1", ":", "\"", "+", "client", "port", "qp1", ",", "30000", ")", ";", "boolean", "isup", "2", "=", "client", "base", "wait", "for", "server", "up", "(", "\"", "127", "0", "0", "1", ":", "\"", "+", "client", "port", "qp2", ",", "30000", ")", ";", "assert", "true", "(", "isup", "1", ",", "\"", "server", "1", "never", "came", "up", "\"", ")", ";", "assert", "true", "(", "isup", "2", ",", "\"", "server", "2", "never", "came", "up", "\"", ")", ";", "q", "1", "shutdown", "(", ")", ";", "q", "2", "shutdown", "(", ")", ";", "assert", "true", "(", "client", "base", "wait", "for", "server", "down", "(", "\"", "127", "0", "0", "1", ":", "\"", "+", "client", "port", "qp1", ",", "client", "base", "connection", "timeout", ")", ",", "\"", "waiting", "for", "server", "1", "down", "\"", ")", ";", "assert", "true", "(", "client", "base", "wait", "for", "server", "down", "(", "\"", "127", "0", "0", "1", ":", "\"", "+", "client", "port", "qp2", ",", "client", "base", "connection", "timeout", ")", ",", "\"", "waiting", "for", "server", "2", "down", "\"", ")", ";", "}", "finally", "{", "qlogger", "remove", "appender", "(", "appender", ")", ";", "}", "assert", "true", "(", "base", "test", "metrics", "provider", "metrics", "provider", "capturing", "lifecycle", "configure", "called", "get", "(", ")", ",", "\"", "metrics", "provider", "lifecycle", "error", "\"", ")", ";", "assert", "true", "(", "base", "test", "metrics", "provider", "metrics", "provider", "capturing", "lifecycle", "start", "called", "get", "(", ")", ",", "\"", "metrics", "provider", "lifecycle", "error", "\"", ")", ";", "assert", "true", "(", "base", "test", "metrics", "provider", "metrics", "provider", "capturing", "lifecycle", "get", "root", "context", "called", "get", "(", ")", ",", "\"", "metrics", "provider", "lifecycle", "error", "\"", ")", ";", "assert", "true", "(", "base", "test", "metrics", "provider", "metrics", "provider", "capturing", "lifecycle", "stop", "called", "get", "(", ")", ",", "\"", "metrics", "provider", "lifecycle", "error", "\"", ")", ";", "}" ]
[ "<", "code", ">", "optional", "string", "value", "=", "1", ";", "<", "code", ">" ]
[ "com", "google", "protobuf", "byte", "string", "get", "value", "bytes", "(", ")", ";" ]
[ "includes", "the", "defined", "{", "@", "link", "parameter", "feature", "}", "to", "the", "newexisting", "set", "of", "supported", "features" ]
[ "public", "builder", "include", "parameter", "features", "(", "parameter", "feature", "parameter", "feature", ")", "{", "this", "parameter", "features", "add", "all", "(", "arrays", "stream", "(", "parameter", "feature", ")", "collect", "(", "collectors", "to", "list", "(", ")", ")", ")", ";", "return", "this", ";", "}" ]
[ "get", "array", "enum" ]
[ "public", "list", "<", "array", "enum", "enum", ">", "get", "array", "enum", "(", ")", "{", "return", "array", "enum", ";", "}" ]
[ "remove", "the", "plugin", "specified", "by", "{", "@", "code", "plugin", "name", "}" ]
[ "void", "execute", "(", "terminal", "terminal", ",", "environment", "env", ",", "string", "plugin", "name", ",", "boolean", "purge", ")", "throws", "i", "o", "exception", ",", "user", "exception", "{", "if", "(", "plugin", "name", "=", "=", "null", ")", "{", "throw", "new", "user", "exception", "(", "exit", "codes", "usage", ",", "\"", "plugin", "name", "is", "required", "\"", ")", ";", "}", "/", "/", "first", "make", "sure", "nothing", "extends", "this", "plugin", "list", "<", "string", ">", "used", "by", "=", "new", "array", "list", "<", ">", "(", ")", ";", "set", "<", "plugins", "service", "bundle", ">", "bundles", "=", "plugins", "service", "get", "plugin", "bundles", "(", "env", "plugins", "file", "(", ")", ")", ";", "for", "(", "plugins", "service", "bundle", "bundle", ":", "bundles", ")", "{", "for", "(", "string", "extended", "plugin", ":", "bundle", "plugin", "get", "extended", "plugins", "(", ")", ")", "{", "if", "(", "extended", "plugin", "equals", "(", "plugin", "name", ")", ")", "{", "used", "by", "add", "(", "bundle", "plugin", "get", "name", "(", ")", ")", ";", "}", "}", "}", "if", "(", "used", "by", "is", "empty", "(", ")", "=", "=", "false", ")", "{", "throw", "new", "user", "exception", "(", "plugin", "still", "used", ",", "\"", "plugin", "[", "\"", "+", "plugin", "name", "+", "\"", "]", "cannot", "be", "removed", "\"", "+", "\"", "because", "it", "is", "extended", "by", "other", "plugins", ":", "\"", "+", "used", "by", ")", ";", "}", "final", "path", "plugin", "dir", "=", "env", "plugins", "file", "(", ")", "resolve", "(", "plugin", "name", ")", ";", "final", "path", "plugin", "config", "dir", "=", "env", "config", "file", "(", ")", "resolve", "(", "plugin", "name", ")", ";", "final", "path", "removing", "=", "env", "plugins", "file", "(", ")", "resolve", "(", "\"", "removing", "-", "\"", "+", "plugin", "name", ")", ";", "terminal", "println", "(", "\"", "-", ">", "removing", "[", "\"", "+", "plugin", "name", "+", "\"", "]", "\"", ")", ";", "/", "*", "*", "if", "the", "plugin", "does", "not", "exist", "and", "the", "plugin", "config", "does", "not", "exist", ",", "fail", "to", "the", "user", "that", "the", "plugin", "is", "not", "found", ",", "unless", "there", "'", "s", "*", "a", "marker", "file", "left", "from", "a", "previously", "failed", "attempt", "in", "which", "case", "we", "proceed", "to", "clean", "up", "the", "marker", "file", "or", ",", "if", "the", "plugin", "does", "*", "not", "exist", ",", "the", "plugin", "config", "does", ",", "and", "we", "are", "not", "purging", ",", "again", "fail", "to", "the", "user", "that", "the", "plugin", "is", "not", "found", "*", "/", "if", "(", "(", "!", "files", "exists", "(", "plugin", "dir", ")", "&", "&", "!", "files", "exists", "(", "plugin", "config", "dir", ")", "&", "&", "!", "files", "exists", "(", "removing", ")", ")", "|", "|", "(", "!", "files", "exists", "(", "plugin", "dir", ")", "&", "&", "files", "exists", "(", "plugin", "config", "dir", ")", "&", "&", "!", "purge", ")", ")", "{", "final", "string", "message", "=", "string", "format", "(", "locale", "root", ",", "\"", "plugin", "[", "%", "s", "]", "not", "found", ";", "run", "'", "elasticsearch", "-", "plugin", "list", "'", "to", "get", "list", "of", "installed", "plugins", "\"", ",", "plugin", "name", ")", ";", "throw", "new", "user", "exception", "(", "exit", "codes", "config", ",", "message", ")", ";", "}", "final", "list", "<", "path", ">", "plugin", "paths", "=", "new", "array", "list", "<", ">", "(", ")", ";", "/", "*", "*", "add", "the", "contents", "of", "the", "plugin", "directory", "before", "creating", "the", "marker", "file", "and", "adding", "it", "to", "the", "list", "of", "paths", "to", "be", "deleted", "so", "*", "that", "the", "marker", "file", "is", "the", "last", "file", "to", "be", "deleted", "*", "/", "if", "(", "files", "exists", "(", "plugin", "dir", ")", ")", "{", "try", "(", "stream", "<", "path", ">", "paths", "=", "files", "list", "(", "plugin", "dir", ")", ")", "{", "plugin", "paths", "add", "all", "(", "paths", "collect", "(", "collectors", "to", "list", "(", ")", ")", ")", ";", "}", "terminal", "println", "(", "verbose", ",", "\"", "removing", "[", "\"", "+", "plugin", "dir", "+", "\"", "]", "\"", ")", ";", "}", "final", "path", "plugin", "bin", "dir", "=", "env", "bin", "file", "(", ")", "resolve", "(", "plugin", "name", ")", ";", "if", "(", "files", "exists", "(", "plugin", "bin", "dir", ")", ")", "{", "if", "(", "!", "files", "is", "directory", "(", "plugin", "bin", "dir", ")", ")", "{", "throw", "new", "user", "exception", "(", "exit", "codes", "io", "error", ",", "\"", "bin", "dir", "for", "\"", "+", "plugin", "name", "+", "\"", "is", "not", "a", "directory", "\"", ")", ";", "}", "try", "(", "stream", "<", "path", ">", "paths", "=", "files", "list", "(", "plugin", "bin", "dir", ")", ")", "{", "plugin", "paths", "add", "all", "(", "paths", "collect", "(", "collectors", "to", "list", "(", ")", ")", ")", ";", "}", "plugin", "paths", "add", "(", "plugin", "bin", "dir", ")", ";", "terminal", "println", "(", "verbose", ",", "\"", "removing", "[", "\"", "+", "plugin", "bin", "dir", "+", "\"", "]", "\"", ")", ";", "}", "if", "(", "files", "exists", "(", "plugin", "config", "dir", ")", ")", "{", "if", "(", "purge", ")", "{", "try", "(", "stream", "<", "path", ">", "paths", "=", "files", "list", "(", "plugin", "config", "dir", ")", ")", "{", "plugin", "paths", "add", "all", "(", "paths", "collect", "(", "collectors", "to", "list", "(", ")", ")", ")", ";", "}", "plugin", "paths", "add", "(", "plugin", "config", "dir", ")", ";", "terminal", "println", "(", "verbose", ",", "\"", "removing", "[", "\"", "+", "plugin", "config", "dir", "+", "\"", "]", "\"", ")", ";", "}", "else", "{", "/", "*", "*", "by", "default", "we", "preserve", "the", "config", "files", "in", "case", "the", "user", "is", "upgrading", "the", "plugin", ",", "but", "we", "print", "a", "message", "so", "the", "user", "*", "knows", "in", "case", "they", "want", "to", "remove", "manually", "*", "/", "final", "string", "message", "=", "string", "format", "(", "locale", "root", ",", "\"", "-", ">", "preserving", "plugin", "config", "files", "[", "%", "s", "]", "in", "case", "of", "upgrade", ";", "use", "-", "-", "purge", "if", "not", "needed", "\"", ",", "plugin", "config", "dir", ")", ";", "terminal", "println", "(", "message", ")", ";", "}", "}", "/", "*", "*", "we", "are", "going", "to", "create", "a", "marker", "file", "in", "the", "plugin", "directory", "that", "indicates", "that", "this", "plugin", "is", "a", "state", "of", "removal", "if", "the", "*", "removal", "fails", ",", "the", "existence", "of", "this", "marker", "file", "indicates", "that", "the", "plugin", "is", "in", "a", "garbage", "state", "we", "check", "for", "existence", "of", "this", "*", "marker", "file", "during", "startup", "so", "that", "we", "do", "not", "startup", "with", "plugins", "in", "such", "a", "garbage", "state", "up", "to", "this", "point", ",", "we", "have", "not", "done", "*", "anything", "destructive", ",", "so", "we", "create", "the", "marker", "file", "as", "the", "last", "action", "before", "executing", "destructive", "operations", "we", "place", "this", "*", "marker", "file", "in", "the", "root", "plugin", "directory", "(", "not", "the", "specific", "plugin", "directory", ")", "so", "that", "we", "do", "not", "have", "to", "create", "the", "specific", "plugin", "*", "directory", "if", "it", "does", "not", "exist", "(", "we", "are", "purging", "configuration", "files", ")", "*", "/", "try", "{", "files", "create", "file", "(", "removing", ")", ";", "}", "catch", "(", "final", "file", "already", "exists", "exception", "e", ")", "{", "/", "*", "*", "we", "need", "to", "suppress", "the", "marker", "file", "already", "existing", "as", "we", "could", "be", "in", "this", "state", "if", "a", "previous", "removal", "attempt", "failed", "and", "*", "the", "user", "is", "attempting", "to", "remove", "the", "plugin", "again", "*", "/", "terminal", "println", "(", "verbose", ",", "\"", "marker", "file", "[", "\"", "+", "removing", "+", "\"", "]", "already", "exists", "\"", ")", ";", "}", "/", "/", "add", "the", "plugin", "directory", "plugin", "paths", "add", "(", "plugin", "dir", ")", ";", "/", "/", "finally", ",", "add", "the", "marker", "file", "plugin", "paths", "add", "(", "removing", ")", ";", "i", "o", "utils", "rm", "(", "plugin", "paths", "to", "array", "(", "new", "path", "[", "plugin", "paths", "size", "(", ")", "]", ")", ")", ";", "}" ]
[ "adds", "a", "set", "of", "properties", "to", "animate", "this", "also", "puts", "the", "builder", "in", "a", "state", "to", "configure", "the", "animation", "of", "these", "properties", "using", "{", "@", "link", "#", "animator", "}", "to", "specify", "appear", "fromdisappear", "to", "values", ",", "address", "properties", "individually", "using", "{", "@", "link", "#", "animate", "(", "animated", "property", ")", "}" ]
[ "public", "transition", "units", "builder", "animate", "(", "animated", "property", "properties", ")", "{", "maybe", "commit", "current", "builder", "(", ")", ";", "m", "property", "target", "=", "new", "property", "target", "(", "property", "target", "type", "set", ",", "properties", ")", ";", "return", "this", ";", "}" ]
[ "returns", "an", "immutable", "collection", "of", "the", "values", "in", "this", "multimap", "its", "iterator", "traverses", "the", "values", "for", "the", "first", "key", ",", "the", "values", "for", "the", "second", "key", ",", "and", "so", "on" ]
[ "public", "immutable", "collection", "<", "v", ">", "values", "(", ")", "{", "return", "(", "immutable", "collection", "<", "v", ">", ")", "super", "values", "(", ")", ";", "}" ]
[ "convert", "the", "given", "object", "to", "string", "with", "each", "line", "indented", "by", "4", "spaces", "(", "except", "the", "first", "line", ")" ]
[ "private", "string", "to", "indented", "string", "(", "object", "o", ")", "{", "if", "(", "o", "=", "=", "null", ")", "{", "return", "\"", "null", "\"", ";", "}", "return", "o", "to", "string", "(", ")", "replace", "(", "\"", "\\", "n", "\"", ",", "\"", "\\", "n", "\"", ")", ";", "}" ]
[ "gets", "provider", ",", "check", "it", "for", "not", "null", "and", "call", "function", "to", "get", "nested", "set", "&", "lt", ";", "s", "&", "gt", ";", "from", "it", "gets", "provider", "from", "map", "if", "provider", "is", "null", ",", "return", "default", ",", "empty", ",", "stabled", "ordered", "nested", "set", "if", "provider", "is", "not", "null", ",", "then", "delegates", "to", "mapper", "all", "responsibility", "to", "fetch", "required", "nested", "set", "from", "provider" ]
[ "private", "<", "p", "extends", "transitive", "info", "provider", ",", "s", "extends", "starlark", "value", ">", "nested", "set", "<", "s", ">", "get", "provider", "as", "nested", "set", "(", "class", "<", "p", ">", "provider", "class", ",", "function", "<", "p", ",", "nested", "set", "<", "s", ">", ">", "mapper", ")", "{", "p", "provider", "=", "get", "provider", "(", "provider", "class", ")", ";", "if", "(", "provider", "=", "=", "null", ")", "{", "return", "nested", "set", "builder", "<", "s", ">", "stable", "order", "(", ")", "build", "(", ")", ";", "}", "return", "mapper", "apply", "(", "provider", ")", ";", "}" ]
[ "extract", "data", "from", "a", "json", "string", "and", "use", "them", "to", "construct", "a", "protocol", "buffers", "message" ]
[ "public", "static", "void", "from", "j", "s", "o", "n", "(", "string", "json", ",", "message", "builder", "target", "builder", ")", "throws", "i", "o", "exception", "{", "json", "format", "parser", "(", ")", "using", "type", "registry", "(", "json", "format", "type", "registry", "new", "builder", "(", ")", "add", "(", "target", "builder", "get", "descriptor", "for", "type", "(", ")", ")", "build", "(", ")", ")", "ignoring", "unknown", "fields", "(", ")", "merge", "(", "json", ",", "target", "builder", ")", ";", "}" ]
[ "return", "the", "default", "topic", "creation", "group", "this", "group", "is", "always", "defined", "when", "topic", "creation", "is", "enabled", "but", "is", "{", "@", "code", "null", "}", "if", "topic", "creation", "is", "disabled" ]
[ "public", "topic", "creation", "group", "default", "topic", "group", "(", ")", "{", "return", "default", "topic", "group", ";", "}" ]
[ "return", "the", "spring", "resource", "loader", "to", "use", "for", "loading", "free", "marker", "template", "files" ]
[ "protected", "resource", "loader", "get", "resource", "loader", "(", ")", "{", "return", "this", "resource", "loader", ";", "}" ]
[ "test", "what", "happens", "we", "collide", "with", "mir" ]
[ "public", "void", "test", "collide", "space", "station", "mir", "(", ")", "{", "test", "collision", "(", "new", "space", "station", "mir", "(", "1", ",", "1", ",", "3", ",", "4", ")", ",", "true", ",", "true", ",", "false", ",", "true", ")", ";", "}" ]
[ "returns", "the", "canonical", "path", "for", "the", "given", "path", "see", "{", "@", "link", "path", "#", "resolve", "symbolic", "links", "}", "for", "specification" ]
[ "protected", "path", "resolve", "symbolic", "links", "(", "path", "path", ")", "throws", "i", "o", "exception", "{", "path", "parent", "node", "=", "path", "get", "parent", "directory", "(", ")", ";", "return", "parent", "node", "=", "=", "null", "?", "path", "/", "/", "(", "root", ")", ":", "append", "segment", "(", "resolve", "symbolic", "links", "(", "parent", "node", ")", ",", "path", "get", "base", "name", "(", ")", ",", "32", ")", ";", "}" ]
[ "convert", "the", "given", "object", "to", "string", "with", "each", "line", "indented", "by", "4", "spaces", "(", "except", "the", "first", "line", ")" ]
[ "private", "string", "to", "indented", "string", "(", "object", "o", ")", "{", "if", "(", "o", "=", "=", "null", ")", "{", "return", "\"", "null", "\"", ";", "}", "return", "o", "to", "string", "(", ")", "replace", "(", "\"", "\\", "n", "\"", ",", "\"", "\\", "n", "\"", ")", ";", "}" ]
[ "checks", "whether", "the", "correlations", "in", "proj", "rel", "and", "filter", "are", "related", "to", "the", "correlated", "variables", "provided", "by", "cor", "rel" ]
[ "private", "boolean", "check", "cor", "vars", "(", "correlate", "correlate", ",", "project", "project", ",", "filter", "filter", ",", "list", "<", "rex", "field", "access", ">", "correlated", "join", "keys", ")", "{", "if", "(", "filter", "!", "=", "null", ")", "{", "assert", "correlated", "join", "keys", "!", "=", "null", ";", "/", "/", "check", "that", "all", "correlated", "refs", "in", "the", "filter", "condition", "are", "/", "/", "used", "in", "the", "join", "(", "as", "field", "access", ")", "set", "<", "cor", "ref", ">", "cor", "var", "in", "filter", "=", "sets", "new", "hash", "set", "(", "cm", "map", "ref", "rel", "to", "cor", "ref", "get", "(", "filter", ")", ")", ";", "for", "(", "rex", "field", "access", "correlated", "join", "key", ":", "correlated", "join", "keys", ")", "{", "cor", "var", "in", "filter", "remove", "(", "cm", "map", "field", "access", "to", "cor", "ref", "get", "(", "correlated", "join", "key", ")", ")", ";", "}", "if", "(", "!", "cor", "var", "in", "filter", "is", "empty", "(", ")", ")", "{", "return", "false", ";", "}", "/", "/", "check", "that", "the", "correlated", "variables", "referenced", "in", "these", "/", "/", "comparisons", "do", "come", "from", "the", "correlate", "cor", "var", "in", "filter", "add", "all", "(", "cm", "map", "ref", "rel", "to", "cor", "ref", "get", "(", "filter", ")", ")", ";", "for", "(", "cor", "ref", "cor", "var", ":", "cor", "var", "in", "filter", ")", "{", "if", "(", "cm", "map", "cor", "to", "cor", "rel", "get", "(", "cor", "var", "corr", ")", "!", "=", "correlate", ")", "{", "return", "false", ";", "}", "}", "}", "/", "/", "if", "project", "has", "any", "correlated", "reference", ",", "make", "sure", "they", "are", "also", "/", "/", "provided", "by", "the", "current", "correlate", "they", "will", "be", "projected", "out", "of", "the", "lhs", "/", "/", "of", "the", "correlate", "if", "(", "(", "project", "!", "=", "null", ")", "&", "&", "cm", "map", "ref", "rel", "to", "cor", "ref", "contains", "key", "(", "project", ")", ")", "{", "for", "(", "cor", "ref", "cor", "var", ":", "cm", "map", "ref", "rel", "to", "cor", "ref", "get", "(", "project", ")", ")", "{", "if", "(", "cm", "map", "cor", "to", "cor", "rel", "get", "(", "cor", "var", "corr", ")", "!", "=", "correlate", ")", "{", "return", "false", ";", "}", "}", "}", "return", "true", ";", "}" ]
[ "create", "a", "new", "object", "to", "contain", "the", "response", "data" ]
[ "public", "static", "full", "http", "response", "to", "full", "http", "response", "(", "int", "stream", "id", ",", "http", "2", "headers", "http", "2", "headers", ",", "byte", "buf", "content", ",", "boolean", "validate", "http", "headers", ")", "throws", "http", "2", "exception", "{", "http", "response", "status", "status", "=", "parse", "status", "(", "http", "2", "headers", "status", "(", ")", ")", ";", "/", "/", "http", "/", "2", "does", "not", "define", "a", "way", "to", "carry", "the", "version", "or", "reason", "phrase", "that", "is", "included", "in", "an", "/", "/", "http", "/", "1", "1", "status", "line", "full", "http", "response", "msg", "=", "new", "default", "full", "http", "response", "(", "http", "version", "http", "1", "1", ",", "status", ",", "content", ",", "validate", "http", "headers", ")", ";", "try", "{", "add", "http", "2", "to", "http", "headers", "(", "stream", "id", ",", "http", "2", "headers", ",", "msg", ",", "false", ")", ";", "}", "catch", "(", "http", "2", "exception", "e", ")", "{", "msg", "release", "(", ")", ";", "throw", "e", ";", "}", "catch", "(", "throwable", "t", ")", "{", "msg", "release", "(", ")", ";", "throw", "stream", "error", "(", "stream", "id", ",", "protocol", "error", ",", "t", ",", "\"", "http", "/", "2", "to", "http", "/", "1", "x", "headers", "conversion", "error", "\"", ")", ";", "}", "return", "msg", ";", "}" ]
[ "documentation", "files", "extension" ]
[ "public", "string", "get", "doc", "extension", "(", ")", "{", "return", "doc", "extension", ";", "}" ]
[ "in", "the", "case", "there", "is", "a", "leader", "elected", ",", "and", "a", "quorum", "supporting", "this", "leader", ",", "we", "have", "to", "check", "if", "the", "leader", "has", "voted", "and", "acked", "that", "it", "is", "leading", "we", "need", "this", "check", "to", "avoid", "that", "peers", "keep", "electing", "over", "and", "over", "a", "peer", "that", "has", "crashed", "and", "it", "is", "no", "longer", "leading" ]
[ "protected", "boolean", "check", "leader", "(", "map", "<", "long", ",", "vote", ">", "votes", ",", "long", "leader", ",", "long", "election", "epoch", ")", "{", "boolean", "predicate", "=", "true", ";", "/", "*", "*", "if", "everyone", "else", "thinks", "i", "'", "m", "the", "leader", ",", "i", "must", "be", "the", "leader", "*", "the", "other", "two", "checks", "are", "just", "for", "the", "case", "in", "which", "i", "'", "m", "not", "the", "*", "leader", "if", "i", "'", "m", "not", "the", "leader", "and", "i", "haven", "'", "t", "received", "a", "message", "*", "from", "leader", "stating", "that", "it", "is", "leading", ",", "then", "predicate", "is", "false", "*", "/", "if", "(", "leader", "!", "=", "self", "get", "id", "(", ")", ")", "{", "if", "(", "votes", "get", "(", "leader", ")", "=", "=", "null", ")", "{", "predicate", "=", "false", ";", "}", "else", "if", "(", "votes", "get", "(", "leader", ")", "get", "state", "(", ")", "!", "=", "server", "state", "leading", ")", "{", "predicate", "=", "false", ";", "}", "}", "else", "if", "(", "logicalclock", "get", "(", ")", "!", "=", "election", "epoch", ")", "{", "predicate", "=", "false", ";", "}", "return", "predicate", ";", "}" ]
[ "test", "function", "namespace", "symbols", "being", "removed", "from", "either", "the", "latest", "or", "checked", "out", "program", "when", "it", "doesn", "'", "t", "result", "in", "a", "conflict" ]
[ "public", "void", "test", "remove", "function", "symbol", "no", "conflict", "(", ")", "throws", "exception", "{", "mtf", "initialize", "(", "\"", "notepad", "merge", "listing", "test", "\"", ",", "new", "program", "modifier", "listener", "(", ")", "{", "/", "/", "01002691", ":", "primary", "local", "\"", "aaa", "\"", "scope", "=", "fun", "0", "1", "0", "0", "2", "4", "8f", "/", "/", "01003439", ":", "primary", "local", "\"", "bbb", "\"", "scope", "=", "fun", "0", "1", "0", "0", "3", "3f", "6", "/", "/", "0", "1", "0", "0", "3e", "2", "5", ":", "primary", "local", "\"", "ccc", "\"", "scope", "=", "fun", "0", "1", "0", "0", "3bed", "/", "*", "(", "non", "-", "javadoc", ")", "*", "@", "see", "ghidra", "framework", "data", "program", "modifier", "listener", "#", "modify", "latest", "(", "ghidra", "program", "database", "program", "d", "b", ")", "*", "/", "@", "override", "public", "void", "modify", "latest", "(", "program", "d", "b", "program", ")", "{", "int", "tx", "id", "=", "program", "start", "transaction", "(", "\"", "modify", "latest", "program", "\"", ")", ";", "boolean", "commit", "=", "false", ";", "try", "{", "symbol", "table", "symtab", "=", "program", "get", "symbol", "table", "(", ")", ";", "symtab", "remove", "symbol", "special", "(", "get", "scoped", "symbol", "(", "program", ",", "\"", "0x", "1", "0", "0", "2", "6", "9", "1", "\"", ",", "\"", "aaa", "\"", ")", ")", ";", "symtab", "remove", "symbol", "special", "(", "get", "scoped", "symbol", "(", "program", ",", "\"", "0x", "1", "0", "0", "3e", "2", "5", "\"", ",", "\"", "ccc", "\"", ")", ")", ";", "commit", "=", "true", ";", "}", "finally", "{", "program", "end", "transaction", "(", "tx", "id", ",", "commit", ")", ";", "}", "}", "/", "*", "(", "non", "-", "javadoc", ")", "*", "@", "see", "ghidra", "framework", "data", "program", "modifier", "listener", "#", "modify", "private", "(", "ghidra", "program", "database", "program", "d", "b", ")", "*", "/", "@", "override", "public", "void", "modify", "private", "(", "program", "d", "b", "program", ")", "{", "int", "tx", "id", "=", "program", "start", "transaction", "(", "\"", "modify", "my", "program", "\"", ")", ";", "boolean", "commit", "=", "false", ";", "try", "{", "symbol", "table", "symtab", "=", "program", "get", "symbol", "table", "(", ")", ";", "symtab", "remove", "symbol", "special", "(", "get", "scoped", "symbol", "(", "program", ",", "\"", "0x", "1", "0", "0", "3", "4", "3", "9", "\"", ",", "\"", "bbb", "\"", ")", ")", ";", "symtab", "remove", "symbol", "special", "(", "get", "scoped", "symbol", "(", "program", ",", "\"", "0x", "1", "0", "0", "3e", "2", "5", "\"", ",", "\"", "ccc", "\"", ")", ")", ";", "commit", "=", "true", ";", "}", "finally", "{", "program", "end", "transaction", "(", "tx", "id", ",", "commit", ")", ";", "}", "}", "}", ")", ";", "execute", "merge", "(", "ask", "user", ")", ";", "wait", "for", "merge", "completion", "(", ")", ";", "symbol", "table", "symtab", "=", "result", "program", "get", "symbol", "table", "(", ")", ";", "assert", "null", "(", "symtab", "get", "primary", "symbol", "(", "addr", "(", "\"", "0x", "1", "0", "0", "2", "6", "9", "1", "\"", ")", ")", ")", ";", "/", "/", "removed", "aaa", "in", "latest", "assert", "null", "(", "symtab", "get", "primary", "symbol", "(", "addr", "(", "\"", "0x", "1", "0", "0", "3", "4", "3", "9", "\"", ")", ")", ")", ";", "/", "/", "removed", "bbb", "in", "my", "assert", "null", "(", "symtab", "get", "primary", "symbol", "(", "addr", "(", "\"", "0x", "1", "0", "0", "3e", "2", "5", "\"", ")", ")", ")", ";", "/", "/", "removed", "ccc", "in", "both", "}" ]
[ "sets", "the", "paging", "maximum", "paging", "max", "page", "search", "size", "that", "date", "frame", "transform", "can", "use", "when", "pulling", "the", "data", "from", "the", "source", "index", "if", "oom", "is", "triggered", ",", "the", "paging", "max", "page", "search", "size", "is", "dynamically", "reduced", "so", "that", "the", "transform", "can", "continue", "to", "gather", "data", "deprecated", ",", "use", "{", "@", "link", "org", "elasticsearch", "client", "transform", "transforms", "settings", "config", "builder", "#", "set", "max", "page", "search", "size", "}", "instead" ]
[ "public", "builder", "set", "max", "page", "search", "size", "(", "integer", "max", "page", "search", "size", ")", "{", "this", "max", "page", "search", "size", "=", "max", "page", "search", "size", ";", "return", "this", ";", "}" ]
[ "outputs", "the", "current", "{", "@", "link", "action", "graph", "container", "}", "of", "skyframe" ]
[ "public", "blaze", "command", "result", "dump", "action", "graph", "from", "skyframe", "(", "build", "request", "request", ")", "{", "try", "(", "query", "runtime", "helper", "query", "runtime", "helper", "=", "env", "get", "runtime", "(", ")", "get", "query", "runtime", "helper", "factory", "(", ")", "create", "(", "env", ")", ")", "{", "aquery", "options", "aquery", "options", "=", "request", "get", "options", "(", "aquery", "options", "class", ")", ";", "print", "stream", "print", "stream", "=", "query", "runtime", "helper", "get", "output", "stream", "for", "query", "output", "(", ")", "=", "=", "null", "?", "null", ":", "new", "print", "stream", "(", "query", "runtime", "helper", "get", "output", "stream", "for", "query", "output", "(", ")", ")", ";", "try", "(", "aquery", "output", "handler", "aquery", "output", "handler", "=", "action", "graph", "proto", "output", "formatter", "callback", "construct", "aquery", "output", "handler", "(", "output", "type", "from", "string", "(", "aquery", "options", "output", "format", ")", ",", "query", "runtime", "helper", "get", "output", "stream", "for", "query", "output", "(", ")", ",", "print", "stream", ")", ")", "{", "action", "graph", "dump", "action", "graph", "dump", "=", "new", "action", "graph", "dump", "(", "aquery", "options", "include", "commandline", ",", "aquery", "options", "include", "artifacts", ",", "action", "filters", ",", "aquery", "options", "include", "param", "files", ",", "aquery", "output", "handler", ")", ";", "(", "(", "sequenced", "skyframe", "executor", ")", "env", "get", "skyframe", "executor", "(", ")", ")", "dump", "skyframe", "state", "(", "action", "graph", "dump", ")", ";", "}", "catch", "(", "invalid", "aquery", "output", "format", "exception", "e", ")", "{", "string", "message", "=", "\"", "-", "-", "skyframe", "state", "must", "be", "used", "with", "-", "-", "output", "=", "proto", "|", "textproto", "|", "jsonproto", "\"", "+", "e", "get", "message", "(", ")", ";", "env", "get", "reporter", "(", ")", "handle", "(", "event", "error", "(", "message", ")", ")", ";", "return", "get", "failure", "result", "(", "message", ",", "code", "skyframe", "state", "prereq", "unmet", ")", ";", "}", "return", "blaze", "command", "result", "success", "(", ")", ";", "}", "catch", "(", "command", "line", "expansion", "exception", "e", ")", "{", "string", "message", "=", "\"", "error", "while", "parsing", "command", ":", "\"", "+", "e", "get", "message", "(", ")", ";", "env", "get", "reporter", "(", ")", "handle", "(", "event", "error", "(", "message", ")", ")", ";", "return", "get", "failure", "result", "(", "message", ",", "code", "command", "line", "expansion", "failure", ")", ";", "}", "catch", "(", "i", "o", "exception", "e", ")", "{", "string", "message", "=", "\"", "error", "while", "emitting", "output", ":", "\"", "+", "e", "get", "message", "(", ")", ";", "env", "get", "reporter", "(", ")", "handle", "(", "event", "error", "(", "message", ")", ")", ";", "return", "get", "failure", "result", "(", "message", ",", "code", "output", "failure", ")", ";", "}", "catch", "(", "query", "runtime", "helper", "exception", "e", ")", "{", "env", "get", "reporter", "(", ")", "handle", "(", "event", "error", "(", "e", "get", "message", "(", ")", ")", ")", ";", "return", "blaze", "command", "result", "failure", "detail", "(", "e", "get", "failure", "detail", "(", ")", ")", ";", "}", "}" ]
[ "get", "map", "of", "enum", "string" ]
[ "public", "map", "<", "string", ",", "inner", "enum", ">", "get", "map", "of", "enum", "string", "(", ")", "{", "return", "map", "of", "enum", "string", ";", "}" ]
[ "submit", "a", "callable", "into", "a", "completable", "future", "r", "t", "es", "are", "rethrown", "non", "r", "t", "es", "are", "caught", "and", "wrapped", ";", "i", "o", "exceptions", "to", "{", "@", "code", "runtime", "i", "o", "exception", "}", "instances" ]
[ "public", "static", "<", "t", ">", "completable", "future", "<", "t", ">", "submit", "(", "final", "executor", "executor", ",", "final", "callable", "<", "t", ">", "call", ")", "{", "return", "completable", "future", "supply", "async", "(", "new", "callable", "supplier", "<", "t", ">", "(", "call", ")", ",", "executor", ")", ";", "}" ]
[ "this", "test", "ensures", "that", "for", "an", "unassigned", "primary", "shard", "that", "has", "a", "valid", "shard", "copy", "on", "at", "least", "one", "node", ",", "we", "will", "force", "allocate", "the", "primary", "shard", "to", "one", "of", "those", "nodes", ",", "even", "if", "the", "allocation", "deciders", "all", "return", "a", "no", "decision", "to", "allocate" ]
[ "public", "void", "test", "force", "allocate", "primary", "on", "no", "decision", "(", ")", "throws", "exception", "{", "logger", "info", "(", "\"", "-", "-", ">", "starting", "1", "node", "\"", ")", ";", "final", "string", "node", "=", "internal", "cluster", "(", ")", "start", "node", "(", ")", ";", "logger", "info", "(", "\"", "-", "-", ">", "creating", "index", "with", "1", "primary", "and", "0", "replicas", "\"", ")", ";", "final", "string", "index", "name", "=", "\"", "test", "-", "idx", "\"", ";", "assert", "acked", "(", "client", "(", ")", "admin", "(", ")", "indices", "(", ")", "prepare", "create", "(", "index", "name", ")", "set", "settings", "(", "settings", "builder", "(", ")", "put", "(", "index", "metadata", "index", "number", "of", "shards", "setting", "get", "key", "(", ")", ",", "1", ")", "put", "(", "index", "metadata", "index", "number", "of", "replicas", "setting", "get", "key", "(", ")", ",", "0", ")", ")", "get", "(", ")", ")", ";", "logger", "info", "(", "\"", "-", "-", ">", "update", "the", "settings", "to", "prevent", "allocation", "to", "the", "data", "node", "\"", ")", ";", "assert", "true", "(", "client", "(", ")", "admin", "(", ")", "indices", "(", ")", "prepare", "update", "settings", "(", "index", "name", ")", "set", "settings", "(", "settings", "builder", "(", ")", "put", "(", "index", "metadata", "index", "routing", "exclude", "group", "setting", "get", "key", "(", ")", "+", "\"", "name", "\"", ",", "node", ")", ")", "get", "(", ")", "is", "acknowledged", "(", ")", ")", ";", "logger", "info", "(", "\"", "-", "-", ">", "full", "cluster", "restart", "\"", ")", ";", "internal", "cluster", "(", ")", "full", "restart", "(", ")", ";", "logger", "info", "(", "\"", "-", "-", ">", "checking", "that", "the", "primary", "shard", "is", "force", "allocated", "to", "the", "data", "node", "despite", "being", "blocked", "by", "the", "exclude", "filter", "\"", ")", ";", "ensure", "green", "(", "index", "name", ")", ";", "assert", "equals", "(", "1", ",", "client", "(", ")", "admin", "(", ")", "cluster", "(", ")", "prepare", "state", "(", ")", "get", "(", ")", "get", "state", "(", ")", "routing", "table", "(", ")", "index", "(", "index", "name", ")", "shards", "with", "state", "(", "shard", "routing", "state", "started", ")", "size", "(", ")", ")", ";", "}" ]
[ "choose", "target", "for", "getting", "additional", "datanodes", "for", "an", "existing", "pipeline" ]
[ "public", "datanode", "storage", "info", "[", "]", "choose", "target", "4", "additional", "datanode", "(", "string", "src", ",", "int", "num", "additional", "nodes", ",", "node", "clientnode", ",", "list", "<", "datanode", "storage", "info", ">", "chosen", ",", "set", "<", "node", ">", "excludes", ",", "long", "blocksize", ",", "byte", "storage", "policy", "i", "d", ",", "block", "type", "block", "type", ")", "{", "final", "block", "storage", "policy", "storage", "policy", "=", "storage", "policy", "suite", "get", "policy", "(", "storage", "policy", "i", "d", ")", ";", "final", "block", "placement", "policy", "blockplacement", "=", "placement", "policies", "get", "policy", "(", "block", "type", ")", ";", "return", "blockplacement", "choose", "target", "(", "src", ",", "num", "additional", "nodes", ",", "clientnode", ",", "chosen", ",", "true", ",", "excludes", ",", "blocksize", ",", "storage", "policy", ",", "null", ")", ";", "}" ]
[ "create", "parameters", "for", "this", "parameterized", "test" ]
[ "public", "static", "iterable", "<", "object", "[", "]", ">", "create", "parameters", "(", "named", "x", "content", "registry", "executeable", "section", "registry", ")", "throws", "exception", "{", "string", "[", "]", "paths", "=", "resolve", "paths", "property", "(", "rest", "tests", "suite", ",", "\"", "\"", ")", ";", "/", "/", "default", "to", "all", "tests", "under", "the", "test", "root", "map", "<", "string", ",", "set", "<", "path", ">", ">", "yaml", "suites", "=", "load", "suites", "(", "paths", ")", ";", "list", "<", "client", "yaml", "test", "suite", ">", "suites", "=", "new", "array", "list", "<", ">", "(", ")", ";", "illegal", "argument", "exception", "validation", "exception", "=", "null", ";", "/", "/", "yaml", "suites", "are", "grouped", "by", "directory", "(", "effectively", "by", "api", ")", "for", "(", "string", "api", ":", "yaml", "suites", "key", "set", "(", ")", ")", "{", "list", "<", "path", ">", "yaml", "files", "=", "new", "array", "list", "<", ">", "(", "yaml", "suites", "get", "(", "api", ")", ")", ";", "for", "(", "path", "yaml", "file", ":", "yaml", "files", ")", "{", "client", "yaml", "test", "suite", "suite", "=", "client", "yaml", "test", "suite", "parse", "(", "executeable", "section", "registry", ",", "api", ",", "yaml", "file", ")", ";", "suites", "add", "(", "suite", ")", ";", "try", "{", "suite", "validate", "(", ")", ";", "}", "catch", "(", "illegal", "argument", "exception", "e", ")", "{", "if", "(", "validation", "exception", "=", "=", "null", ")", "{", "validation", "exception", "=", "new", "illegal", "argument", "exception", "(", "\"", "validation", "errors", "for", "the", "following", "test", "suites", ":", "\\", "n", "-", "\"", "+", "e", "get", "message", "(", ")", ")", ";", "}", "else", "{", "string", "previous", "message", "=", "validation", "exception", "get", "message", "(", ")", ";", "throwable", "[", "]", "suppressed", "=", "validation", "exception", "get", "suppressed", "(", ")", ";", "validation", "exception", "=", "new", "illegal", "argument", "exception", "(", "previous", "message", "+", "\"", "\\", "n", "-", "\"", "+", "e", "get", "message", "(", ")", ")", ";", "for", "(", "throwable", "t", ":", "suppressed", ")", "{", "validation", "exception", "add", "suppressed", "(", "t", ")", ";", "}", "}", "validation", "exception", "add", "suppressed", "(", "e", ")", ";", "}", "}", "}", "if", "(", "validation", "exception", "!", "=", "null", ")", "{", "throw", "validation", "exception", ";", "}", "list", "<", "object", "[", "]", ">", "tests", "=", "new", "array", "list", "<", ">", "(", ")", ";", "for", "(", "client", "yaml", "test", "suite", "yaml", "test", "suite", ":", "suites", ")", "{", "for", "(", "client", "yaml", "test", "section", "test", "section", ":", "yaml", "test", "suite", "get", "test", "sections", "(", ")", ")", "{", "tests", "add", "(", "new", "object", "[", "]", "{", "new", "client", "yaml", "test", "candidate", "(", "yaml", "test", "suite", ",", "test", "section", ")", "}", ")", ";", "}", "}", "/", "/", "sort", "the", "candidates", "so", "they", "will", "always", "be", "in", "the", "same", "order", "before", "being", "shuffled", ",", "for", "repeatability", "tests", "sort", "(", "comparator", "comparing", "(", "o", "-", ">", "(", "(", "client", "yaml", "test", "candidate", ")", "o", "[", "0", "]", ")", "get", "test", "path", "(", ")", ")", ")", ";", "return", "tests", ";", "}" ]
[ "aggregate", "the", "values", "of", "records", "in", "this", "stream", "by", "the", "grouped", "key", "and", "defined", "sessions", "note", "that", "sessions", "are", "generated", "on", "a", "per", "-", "key", "basis", "and", "records", "with", "different", "keys", "create", "independent", "sessions", "records", "with", "{", "@", "code", "null", "}", "key", "or", "value", "are", "ignored", "aggregating", "is", "a", "generalization", "of", "{", "@", "link", "#", "reduce", "(", "reducer", ")", "combining", "via", "reduce", "(", ")", "}", "as", "it", ",", "for", "example", ",", "allows", "the", "result", "to", "have", "a", "different", "type", "than", "the", "input", "values", "the", "result", "is", "written", "into", "a", "local", "{", "@", "link", "session", "store", "}", "(", "which", "is", "basically", "an", "ever", "-", "updating", "materialized", "view", ")", "that", "can", "be", "queried", "using", "the", "store", "name", "as", "provided", "with", "{", "@", "link", "materialized", "}", "furthermore", ",", "updates", "to", "the", "store", "are", "sent", "downstream", "into", "a", "{", "@", "link", "k", "table", "}", "changelog", "stream", "the", "specified", "{", "@", "link", "initializer", "}", "is", "applied", "directly", "before", "the", "first", "input", "record", "per", "session", "is", "processed", "to", "provide", "an", "initial", "intermediate", "aggregation", "result", "that", "is", "used", "to", "process", "the", "first", "record", "per", "session", "the", "specified", "{", "@", "link", "aggregator", "}", "is", "applied", "for", "each", "input", "record", "and", "computes", "a", "new", "aggregate", "using", "the", "current", "aggregate", "(", "or", "for", "the", "very", "first", "record", "using", "the", "intermediate", "aggregation", "result", "provided", "via", "the", "{", "@", "link", "initializer", "}", ")", "and", "the", "record", "'", "s", "value", "the", "specified", "{", "@", "link", "merger", "}", "is", "used", "to", "merge", "two", "existing", "sessions", "into", "one", ",", "i", "e", ",", "when", "the", "windows", "overlap", ",", "they", "are", "merged", "into", "a", "single", "session", "and", "the", "old", "sessions", "are", "discarded", "thus", ",", "{", "@", "code", "aggregate", "(", ")", "}", "can", "be", "used", "to", "compute", "aggregate", "functions", "like", "count", "(", "c", "f", "{", "@", "link", "#", "count", "(", ")", "}", ")", "not", "all", "updates", "might", "get", "sent", "downstream", ",", "as", "an", "internal", "cache", "will", "be", "used", "to", "deduplicate", "consecutive", "updates", "to", "the", "same", "window", "and", "key", "if", "caching", "is", "enabled", "on", "the", "{", "@", "link", "materialized", "}", "instance", "when", "caching", "is", "enabled", "the", "rate", "of", "propagated", "updates", "depends", "on", "your", "input", "data", "rate", ",", "the", "number", "of", "distinct", "keys", ",", "the", "number", "of", "parallel", "running", "kafka", "streams", "instances", ",", "and", "the", "{", "@", "link", "streams", "config", "configuration", "}", "parameters", "for", "{", "@", "link", "streams", "config", "#", "cache", "max", "bytes", "buffering", "config", "cache", "size", "}", ",", "and", "{", "@", "link", "streams", "config", "#", "commit", "interval", "ms", "config", "commit", "interval", "}", "to", "query", "the", "local", "{", "@", "link", "session", "store", "}", "it", "must", "be", "obtained", "via", "{", "@", "link", "kafka", "streams", "#", "store", "(", "store", "query", "parameters", ")", "kafka", "streams", "#", "store", "(", ")", "}", ":", "{", "@", "code", "kafka", "streams", "streams", "=", "some", "windowed", "aggregation", "on", "value", "type", "double", "sting", "queryable", "store", "name", "=", "the", "queryable", "store", "name", "should", "be", "the", "name", "of", "the", "store", "as", "defined", "by", "the", "materialized", "instance", "read", "only", "session", "store", "<", "string", ",", "long", ">", "session", "store", "=", "streams", "store", "(", "queryable", "store", "name", ",", "queryable", "store", "types", "<", "string", ",", "long", ">", "session", "store", "(", ")", ")", ";", "string", "key", "=", "\"", "some", "-", "key", "\"", ";", "key", "value", "iterator", "<", "windowed", "<", "string", ">", ",", "long", ">", "agg", "for", "key", "for", "session", "=", "local", "window", "store", "fetch", "(", "key", ")", ";", "key", "must", "be", "local", "(", "application", "state", "is", "shared", "over", "all", "running", "kafka", "streams", "instances", ")", "}", "for", "non", "-", "local", "keys", ",", "a", "custom", "rpc", "mechanism", "must", "be", "implemented", "using", "{", "@", "link", "kafka", "streams", "#", "all", "metadata", "(", ")", "}", "to", "query", "the", "value", "of", "the", "key", "on", "a", "parallel", "running", "instance", "of", "your", "kafka", "streams", "application", "for", "failure", "and", "recovery", "the", "store", "will", "be", "backed", "by", "an", "internal", "changelog", "topic", "that", "will", "be", "created", "in", "kafka", "therefore", ",", "the", "store", "name", "defined", "by", "the", "{", "@", "link", "materialized", "}", "instance", "must", "be", "a", "valid", "kafka", "topic", "name", "and", "cannot", "contain", "characters", "other", "than", "ascii", "alphanumerics", ",", "'", "'", ",", "'", "'", "and", "'", "-", "'", "the", "changelog", "topic", "will", "be", "named", "\"", "$", "{", "application", "id", "}", "-", "$", "{", "store", "name", "}", "-", "changelog", "\"", ",", "where", "\"", "application", "id", "\"", "is", "user", "-", "specified", "in", "{", "@", "link", "streams", "config", "}", "via", "parameter", "{", "@", "link", "streams", "config", "#", "application", "id", "config", "application", "id", "config", "}", ",", "\"", "store", "name", "\"", "is", "the", "provide", "store", "name", "defined", "in", "{", "@", "link", "materialized", "}", ",", "and", "\"", "-", "changelog", "\"", "is", "a", "fixed", "suffix", "you", "can", "retrieve", "all", "generated", "internal", "topic", "names", "via", "{", "@", "link", "topology", "#", "describe", "(", ")", "}" ]
[ "<", "vr", ">", "k", "table", "<", "windowed", "<", "k", ">", ",", "vr", ">", "aggregate", "(", "final", "initializer", "<", "vr", ">", "initializer", ",", "final", "aggregator", "<", "?", "super", "k", ",", "?", "super", "v", ",", "vr", ">", "aggregator", ",", "final", "merger", "<", "?", "super", "k", ",", "vr", ">", "session", "merger", ",", "final", "named", "named", ",", "final", "materialized", "<", "k", ",", "vr", ",", "session", "store", "<", "bytes", ",", "byte", "[", "]", ">", ">", "materialized", ")", ";" ]
[ "returns", "the", "details", "panel", "note", ":", "this", "is", "primarily", "for", "test", "access" ]
[ "plugin", "details", "panel", "get", "details", "panel", "(", ")", "{", "return", "details", "panel", ";", "}" ]
[ "gets", "ldap", "principal", "identifier", "if", "the", "principal", "id", "attribute", "is", "defined", ",", "it", "'", "s", "retrieved", "if", "no", "attribute", "value", "is", "found", ",", "a", "warning", "is", "generated", "and", "the", "provided", "username", "is", "used", "instead", "if", "no", "attribute", "is", "defined", ",", "username", "is", "used", "instead" ]
[ "protected", "string", "get", "ldap", "principal", "identifier", "(", "final", "string", "username", ",", "final", "ldap", "entry", "ldap", "entry", ")", "throws", "login", "exception", "{", "if", "(", "string", "utils", "is", "not", "blank", "(", "this", "principal", "id", "attribute", ")", ")", "{", "val", "principal", "attr", "=", "ldap", "entry", "get", "attribute", "(", "this", "principal", "id", "attribute", ")", ";", "if", "(", "principal", "attr", "=", "=", "null", "|", "|", "principal", "attr", "size", "(", ")", "=", "=", "0", ")", "{", "if", "(", "this", "allow", "missing", "principal", "attribute", "value", ")", "{", "logger", "warn", "(", "\"", "the", "principal", "id", "attribute", "[", "{", "}", "]", "is", "not", "found", "cas", "cannot", "construct", "the", "final", "authenticated", "principal", "\"", "+", "\"", "if", "it", "'", "s", "unable", "to", "locate", "the", "attribute", "that", "is", "designated", "as", "the", "principal", "id", "\"", "+", "\"", "attributes", "available", "on", "the", "ldap", "entry", "are", "[", "{", "}", "]", "since", "principal", "id", "attribute", "is", "not", "available", ",", "cas", "will", "\"", "+", "\"", "fall", "back", "to", "construct", "the", "principal", "based", "on", "the", "provided", "user", "id", ":", "[", "{", "}", "]", "\"", ",", "this", "principal", "id", "attribute", ",", "ldap", "entry", "get", "attributes", "(", ")", ",", "username", ")", ";", "return", "username", ";", "}", "logger", "error", "(", "\"", "the", "principal", "id", "attribute", "[", "{", "}", "]", "is", "not", "found", "cas", "is", "configured", "to", "disallow", "missing", "principal", "attributes", "\"", ",", "this", "principal", "id", "attribute", ")", ";", "throw", "new", "login", "exception", "(", "\"", "principal", "id", "attribute", "is", "not", "found", "for", "\"", "+", "principal", "attr", ")", ";", "}", "val", "value", "=", "principal", "attr", "get", "string", "value", "(", ")", ";", "if", "(", "principal", "attr", "size", "(", ")", ">", "1", ")", "{", "if", "(", "!", "this", "allow", "multiple", "principal", "attribute", "values", ")", "{", "throw", "new", "login", "exception", "(", "\"", "multiple", "principal", "values", "are", "not", "allowed", ":", "\"", "+", "principal", "attr", ")", ";", "}", "logger", "warn", "(", "\"", "found", "multiple", "values", "for", "principal", "id", "attribute", ":", "[", "{", "}", "]", "using", "first", "value", "=", "[", "{", "}", "]", "\"", ",", "principal", "attr", ",", "value", ")", ";", "}", "logger", "debug", "(", "\"", "retrieved", "principal", "id", "attribute", "[", "{", "}", "]", "\"", ",", "value", ")", ";", "return", "value", ";", "}", "logger", "debug", "(", "\"", "principal", "id", "attribute", "is", "not", "defined", "using", "the", "default", "provided", "user", "id", "[", "{", "}", "]", "\"", ",", "username", ")", ";", "return", "username", ";", "}" ]
[ "{", "@", "inherit", "doc", "}" ]
[ "public", "int", "get", "previous", "offset", "(", ")", "{", "return", "previous", "offset", ";", "}" ]
[ "replace", "the", "given", "child", "from", "the", "created", "list" ]
[ "private", "boolean", "replace", "created", "(", "final", "i", "node", "old", "child", ",", "final", "i", "node", "new", "child", ")", "{", "final", "list", "<", "i", "node", ">", "list", "=", "get", "created", "unmodifiable", "(", ")", ";", "final", "int", "i", "=", "search", "(", "list", ",", "old", "child", "get", "local", "name", "bytes", "(", ")", ")", ";", "if", "(", "i", "<", "0", "|", "|", "list", "get", "(", "i", ")", "get", "id", "(", ")", "!", "=", "old", "child", "get", "id", "(", ")", ")", "{", "return", "false", ";", "}", "final", "i", "node", "removed", "=", "set", "created", "(", "i", ",", "new", "child", ")", ";", "preconditions", "check", "state", "(", "removed", "=", "=", "old", "child", ")", ";", "return", "true", ";", "}" ]
[ "returns", "{", "@", "code", "true", "}", "if", "<", "a", "href", "=", "\"", "https", ":", "man", "7", "orglinuxman", "-", "pagesman", "7ip", "7", "html", "\"", ">", "ip", "recvorigdstaddr", "is", "enabled", ",", "{", "@", "code", "false", "}", "otherwise" ]
[ "public", "boolean", "is", "ip", "recv", "orig", "dest", "addr", "(", ")", "{", "try", "{", "return", "(", "(", "epoll", "datagram", "channel", ")", "channel", ")", "socket", "is", "ip", "recv", "orig", "dest", "addr", "(", ")", ";", "}", "catch", "(", "i", "o", "exception", "e", ")", "{", "throw", "new", "channel", "exception", "(", "e", ")", ";", "}", "}" ]
[ "returns", "the", "{", "@", "link", "constraint", "value", "info", "}", "provider", "from", "the", "{", "@", "link", "configured", "target", "}", "in", "the", "{", "@", "link", "value", "or", "exception", "3", "}", ",", "or", "{", "@", "code", "null", "}", "if", "the", "{", "@", "link", "configured", "target", "}", "is", "not", "present", "if", "the", "{", "@", "link", "configured", "target", "}", "does", "not", "have", "a", "{", "@", "link", "constraint", "value", "info", "}", "provider", ",", "a", "{", "@", "link", "invalid", "constraint", "value", "exception", "}", "is", "thrown" ]
[ "private", "static", "constraint", "value", "info", "find", "constraint", "value", "info", "(", "configured", "target", "key", "key", ",", "value", "or", "exception", "3", "<", "configured", "value", "creation", "exception", ",", "no", "such", "thing", "exception", ",", "action", "conflict", "exception", ">", "value", "or", "exception", ")", "throws", "invalid", "constraint", "value", "exception", "{", "try", "{", "configured", "target", "value", "ctv", "=", "(", "configured", "target", "value", ")", "value", "or", "exception", "get", "(", ")", ";", "if", "(", "ctv", "=", "=", "null", ")", "{", "return", "null", ";", "}", "configured", "target", "configured", "target", "=", "ctv", "get", "configured", "target", "(", ")", ";", "constraint", "value", "info", "constraint", "value", "info", "=", "platform", "provider", "utils", "constraint", "value", "(", "configured", "target", ")", ";", "if", "(", "constraint", "value", "info", "=", "=", "null", ")", "{", "throw", "new", "invalid", "constraint", "value", "exception", "(", "configured", "target", "get", "label", "(", ")", ")", ";", "}", "return", "constraint", "value", "info", ";", "}", "catch", "(", "configured", "value", "creation", "exception", "e", ")", "{", "throw", "new", "invalid", "constraint", "value", "exception", "(", "key", "get", "label", "(", ")", ",", "e", ")", ";", "}", "catch", "(", "no", "such", "thing", "exception", "e", ")", "{", "throw", "new", "invalid", "constraint", "value", "exception", "(", "key", "get", "label", "(", ")", ",", "e", ")", ";", "}", "catch", "(", "action", "conflict", "exception", "e", ")", "{", "throw", "new", "invalid", "constraint", "value", "exception", "(", "key", "get", "label", "(", ")", ",", "e", ")", ";", "}", "}" ]
[ "{", "@", "inherit", "doc", "}" ]
[ "public", "double", "get", "five", "minute", "rate", "(", ")", "{", "return", "0d", ";", "}" ]
[ "inserts", "the", "specified", "data", "type", "at", "the", "specified", "component", "index" ]
[ "public", "data", "type", "component", "insert", "(", "int", "row", "index", ",", "data", "type", "dt", ")", "throws", "usr", "exception", "{", "return", "insert", "(", "row", "index", ",", "dt", ",", "dt", "get", "length", "(", ")", ")", ";", "}" ]
[ "in", "this", "testcase", ",", "there", "are", "enough", "total", "number", "of", "nodes", ",", "but", "only", "one", "rack", "is", "actually", "available" ]
[ "public", "void", "test", "choose", "target", "6", "(", ")", "throws", "exception", "{", "datanode", "storage", "info", "storage", "=", "d", "f", "s", "test", "util", "create", "datanode", "storage", "info", "(", "\"", "ds", "-", "xxxx", "\"", ",", "\"", "7", "7", "7", "7", "\"", ",", "\"", "/", "d", "2", "/", "r", "3", "\"", ",", "\"", "host", "7", "\"", ")", ";", "datanode", "descriptor", "new", "dn", "=", "storage", "get", "datanode", "descriptor", "(", ")", ";", "set", "<", "node", ">", "excluded", "nodes", ";", "list", "<", "datanode", "storage", "info", ">", "chosen", "nodes", "=", "new", "array", "list", "<", ">", "(", ")", ";", "excluded", "nodes", "=", "new", "hash", "set", "<", ">", "(", ")", ";", "excluded", "nodes", "add", "(", "data", "nodes", "[", "0", "]", ")", ";", "excluded", "nodes", "add", "(", "data", "nodes", "[", "1", "]", ")", ";", "excluded", "nodes", "add", "(", "data", "nodes", "[", "2", "]", ")", ";", "excluded", "nodes", "add", "(", "data", "nodes", "[", "3", "]", ")", ";", "datanode", "storage", "info", "[", "]", "targets", ";", "/", "/", "only", "two", "nodes", "available", "in", "a", "rack", "try", "picking", "two", "nodes", "only", "one", "/", "/", "should", "return", "targets", "=", "choose", "target", "(", "2", ",", "chosen", "nodes", ",", "excluded", "nodes", ")", ";", "assert", "equals", "(", "1", ",", "targets", "length", ")", ";", "/", "/", "make", "three", "nodes", "available", "in", "a", "rack", "final", "block", "manager", "bm", "=", "namenode", "get", "namesystem", "(", ")", "get", "block", "manager", "(", ")", ";", "bm", "get", "datanode", "manager", "(", ")", "get", "network", "topology", "(", ")", "add", "(", "new", "dn", ")", ";", "bm", "get", "datanode", "manager", "(", ")", "get", "heartbeat", "manager", "(", ")", "add", "datanode", "(", "new", "dn", ")", ";", "update", "heartbeat", "with", "usage", "(", "new", "dn", ",", "2", "*", "hdfs", "server", "constants", "min", "blocks", "for", "write", "*", "block", "size", ",", "0l", ",", "2", "*", "hdfs", "server", "constants", "min", "blocks", "for", "write", "*", "block", "size", ",", "0l", ",", "0l", ",", "0l", ",", "0", ",", "0", ")", ";", "/", "/", "try", "picking", "three", "nodes", "only", "two", "should", "return", "excluded", "nodes", "clear", "(", ")", ";", "excluded", "nodes", "add", "(", "data", "nodes", "[", "0", "]", ")", ";", "excluded", "nodes", "add", "(", "data", "nodes", "[", "1", "]", ")", ";", "excluded", "nodes", "add", "(", "data", "nodes", "[", "2", "]", ")", ";", "excluded", "nodes", "add", "(", "data", "nodes", "[", "3", "]", ")", ";", "chosen", "nodes", "clear", "(", ")", ";", "try", "{", "targets", "=", "choose", "target", "(", "3", ",", "chosen", "nodes", ",", "excluded", "nodes", ")", ";", "assert", "equals", "(", "2", ",", "targets", "length", ")", ";", "}", "finally", "{", "bm", "get", "datanode", "manager", "(", ")", "get", "network", "topology", "(", ")", "remove", "(", "new", "dn", ")", ";", "}", "reset", "heartbeat", "for", "storages", "(", ")", ";", "}" ]
[ "gets", "the", "total", "length", "of", "this", "structure", "in", "bytes", ",", "when", "included", "in", "a", "{", "@", "code", "code", "}", "attribute", "the", "returned", "value", "includes", "the", "two", "bytes", "for", "{", "@", "code", "exception", "table", "length", "}" ]
[ "public", "int", "byte", "length", "(", ")", "{", "return", "2", "+", "size", "(", ")", "*", "8", ";", "}" ]
[ "check", "if", "this", "address", "could", "really", "be", "a", "good", "address", "in", "the", "program", "never", "accept", "0", "as", "a", "valid", "address" ]
[ "private", "boolean", "is", "good", "address", "(", "program", "program", ",", "address", "addr", ")", "{", "if", "(", "addr", "=", "=", "null", ")", "{", "return", "false", ";", "}", "if", "(", "!", "program", "get", "memory", "(", ")", "contains", "(", "addr", ")", ")", "{", "return", "false", ";", "}", "long", "offset", "=", "addr", "get", "offset", "(", ")", ";", "if", "(", "offset", "=", "=", "0x", "0", "|", "|", "offset", "=", "=", "0xffffffff", "|", "|", "offset", "=", "=", "0xffff", "|", "|", "offset", "=", "=", "0xff", ")", "{", "return", "false", ";", "}", "return", "true", ";", "}" ]
[ "leaves", "the", "appropriate", "queue", "for", "this", "type", "of", "item" ]
[ "/", "*", "package", "*", "/", "abstract", "boolean", "leave", "(", "queue", "q", ")", ";" ]
[ "returns", "the", "first", "codec", "capable", "of", "encoding", "the", "specified", "mime", "type", ",", "or", "null", "if", "no", "match", "was", "found" ]
[ "static", "media", "codec", "info", "select", "codec", "(", "final", "string", "mime", "type", ")", "{", "final", "int", "num", "codecs", "=", "media", "codec", "list", "get", "codec", "count", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "num", "codecs", ";", "i", "+", "+", ")", "{", "final", "media", "codec", "info", "codec", "info", "=", "media", "codec", "list", "get", "codec", "info", "at", "(", "i", ")", ";", "if", "(", "!", "codec", "info", "is", "encoder", "(", ")", ")", "{", "continue", ";", "}", "final", "string", "[", "]", "types", "=", "codec", "info", "get", "supported", "types", "(", ")", ";", "for", "(", "string", "type", ":", "types", ")", "{", "if", "(", "type", "equals", "ignore", "case", "(", "mime", "type", ")", ")", "{", "return", "codec", "info", ";", "}", "}", "}", "return", "null", ";", "}" ]
[ "returns", "a", "fresh", "{", "@", "link", "aggregate", "all", "output", "formatter", "callback", "}", "instance", "whose", "{", "@", "link", "aggregate", "all", "callback", "#", "get", "result", "}", "returns", "all", "the", "targets", "in", "the", "result", "sorted", "lexicographically", "by", "{", "@", "link", "label", "}" ]
[ "public", "static", "aggregate", "all", "output", "formatter", "callback", "<", "target", ",", "set", "<", "target", ">", ">", "new", "lexicographically", "sorted", "target", "aggregator", "(", ")", "{", "return", "new", "lexicographically", "sorted", "target", "aggregator", "(", ")", ";", "}" ]
[ "return", "the", "float", "value", "in", "sp" ]
[ "public", "static", "float", "get", "float", "(", "@", "non", "null", "final", "string", "key", ",", "final", "float", "default", "value", ",", "@", "non", "null", "final", "s", "p", "utils", "sp", "utils", ")", "{", "return", "sp", "utils", "get", "float", "(", "key", ",", "default", "value", ")", ";", "}" ]
[ "upgrade", "from", "a", "pre", "-", "federation", "layout", "move", "current", "storage", "into", "a", "backup", "directory", ",", "and", "hardlink", "all", "its", "blocks", "into", "the", "new", "current", "directory", "upgrade", "from", "pre", "-", "0", "22", "to", "0", "22", "or", "later", "release", "e", "g", "0", "190", "20", "=", ">", "0", "220", "23", "if", "<", "sd", ">", "previous", "exists", "then", "delete", "it", "rename", "<", "sd", ">", "current", "to", "<", "sd", ">", "previous", "tmp", "create", "new", "<", "sd", ">", "current", "<", "bpid", ">", "current", "directory", "hard", "links", "for", "block", "files", "are", "created", "from", "<", "sd", ">", "previous", "tmp", "to", "<", "sd", ">", "current", "<", "bpid", ">", "current", "saves", "new", "version", "file", "in", "<", "sd", ">", "current", "<", "bpid", ">", "current", "directory", "rename", "<", "sd", ">", "previous", "tmp", "to", "<", "sd", ">", "previous", "there", "should", "be", "only", "one", "namenode", "in", "the", "cluster", "for", "first", "time", "upgrade", "to", "0", "22" ]
[ "void", "do", "upgrade", "pre", "federation", "(", "final", "storage", "directory", "sd", ",", "final", "namespace", "info", "ns", "info", ",", "final", "list", "<", "callable", "<", "storage", "directory", ">", ">", "callables", ",", "final", "configuration", "conf", ")", "throws", "i", "o", "exception", "{", "final", "int", "old", "l", "v", "=", "get", "layout", "version", "(", ")", ";", "log", "info", "(", "\"", "upgrading", "storage", "directory", "{", "}", "\\", "n", "old", "lv", "=", "{", "}", ";", "old", "c", "time", "=", "{", "}", "\"", "+", "\"", "\\", "n", "new", "lv", "=", "{", "}", ";", "new", "c", "time", "=", "{", "}", "\"", ",", "sd", "get", "root", "(", ")", ",", "old", "l", "v", ",", "this", "get", "c", "time", "(", ")", ",", "data", "node", "layout", "version", "get", "current", "layout", "version", "(", ")", ",", "ns", "info", "get", "c", "time", "(", ")", ")", ";", "final", "file", "cur", "dir", "=", "sd", "get", "current", "dir", "(", ")", ";", "final", "file", "prev", "dir", "=", "sd", "get", "previous", "dir", "(", ")", ";", "final", "file", "bbw", "dir", "=", "new", "file", "(", "sd", "get", "root", "(", ")", ",", "storage", "storage", "1", "bbw", ")", ";", "assert", "cur", "dir", "exists", "(", ")", ":", "\"", "data", "node", "current", "directory", "must", "exist", "\"", ";", "/", "/", "cleanup", "directory", "\"", "detach", "\"", "cleanup", "detach", "dir", "(", "new", "file", "(", "cur", "dir", ",", "storage", "dir", "detached", ")", ")", ";", "/", "/", "1", "delete", "<", "sd", ">", "/", "previous", "dir", "before", "upgrading", "if", "(", "prev", "dir", "exists", "(", ")", ")", "delete", "dir", "(", "prev", "dir", ")", ";", "/", "/", "get", "previous", "tmp", "directory", ",", "<", "sd", ">", "/", "previous", "tmp", "final", "file", "tmp", "dir", "=", "sd", "get", "previous", "tmp", "(", ")", ";", "assert", "!", "tmp", "dir", "exists", "(", ")", ":", "\"", "data", "node", "previous", "tmp", "directory", "must", "not", "exist", "\"", ";", "/", "/", "2", "rename", "<", "sd", ">", "/", "current", "to", "<", "sd", ">", "/", "previous", "tmp", "rename", "(", "cur", "dir", ",", "tmp", "dir", ")", ";", "/", "/", "3", "1", "format", "bp", "file", "cur", "bp", "dir", "=", "block", "pool", "slice", "storage", "get", "bp", "root", "(", "ns", "info", "get", "block", "pool", "i", "d", "(", ")", ",", "cur", "dir", ")", ";", "block", "pool", "slice", "storage", "bp", "storage", "=", "get", "block", "pool", "slice", "storage", "(", "ns", "info", ")", ";", "bp", "storage", "format", "(", "cur", "dir", ",", "ns", "info", ")", ";", "final", "file", "to", "dir", "=", "new", "file", "(", "cur", "bp", "dir", ",", "storage", "dir", "current", ")", ";", "if", "(", "callables", "=", "=", "null", ")", "{", "do", "upgrade", "(", "sd", ",", "ns", "info", ",", "prev", "dir", ",", "tmp", "dir", ",", "bbw", "dir", ",", "to", "dir", ",", "old", "l", "v", ",", "conf", ")", ";", "}", "else", "{", "callables", "add", "(", "new", "callable", "<", "storage", "directory", ">", "(", ")", "{", "@", "override", "public", "storage", "directory", "call", "(", ")", "throws", "exception", "{", "do", "upgrade", "(", "sd", ",", "ns", "info", ",", "prev", "dir", ",", "tmp", "dir", ",", "bbw", "dir", ",", "to", "dir", ",", "old", "l", "v", ",", "conf", ")", ";", "return", "sd", ";", "}", "}", ")", ";", "}", "}" ]
[ "return", "the", "bitmap", "with", "the", "specified", "color" ]
[ "public", "static", "bitmap", "draw", "color", "(", "@", "non", "null", "final", "bitmap", "src", ",", "@", "color", "int", "final", "int", "color", ")", "{", "return", "draw", "color", "(", "src", ",", "color", ",", "false", ")", ";", "}" ]
[ "write", "an", "unserialized", "message", "with", "a", "known", "length", ",", "uncompressed" ]
[ "private", "int", "write", "known", "length", "uncompressed", "(", "input", "stream", "message", ",", "int", "message", "length", ")", "throws", "i", "o", "exception", "{", "if", "(", "max", "outbound", "message", "size", ">", "=", "0", "&", "&", "message", "length", ">", "max", "outbound", "message", "size", ")", "{", "throw", "status", "resource", "exhausted", "with", "description", "(", "string", "format", "(", "\"", "message", "too", "large", "%", "d", ">", "%", "d", "\"", ",", "message", "length", ",", "max", "outbound", "message", "size", ")", ")", "as", "runtime", "exception", "(", ")", ";", "}", "byte", "buffer", "header", "=", "byte", "buffer", "wrap", "(", "header", "scratch", ")", ";", "header", "put", "(", "uncompressed", ")", ";", "header", "put", "int", "(", "message", "length", ")", ";", "/", "/", "allocate", "the", "initial", "buffer", "chunk", "based", "on", "frame", "header", "+", "payload", "length", "/", "/", "note", "that", "the", "allocator", "may", "allocate", "a", "buffer", "larger", "or", "smaller", "than", "this", "length", "if", "(", "buffer", "=", "=", "null", ")", "{", "buffer", "=", "buffer", "allocator", "allocate", "(", "header", "position", "(", ")", "+", "message", "length", ")", ";", "}", "write", "raw", "(", "header", "scratch", ",", "0", ",", "header", "position", "(", ")", ")", ";", "return", "write", "to", "output", "stream", "(", "message", ",", "output", "stream", "adapter", ")", ";", "}" ]
[ "a", "brief", "pause", "to", "guarantee", "timestamps", "are", "different", "this", "doesn", "'", "t", "have", "to", "be", "as", "long", "as", "a", "stabilization", "delay" ]
[ "private", "void", "wait", "for", "different", "timestamps", "(", ")", "throws", "interrupted", "exception", "{", "thread", "sleep", "(", "timestamp", "sleep", ")", ";", "}" ]