docstring_tokens
list
code_tokens
list
[ "appends", "the", "provided", "value", "to", "the", "provided", "path", "in", "the", "document", "any", "non", "existing", "path", "element", "will", "be", "created", "if", "the", "path", "identifies", "a", "list", ",", "the", "value", "will", "be", "appended", "to", "the", "existing", "list", "if", "the", "path", "identifies", "a", "scalar", ",", "the", "scalar", "will", "be", "converted", "to", "a", "list", "and", "the", "provided", "value", "will", "be", "added", "to", "the", "newly", "created", "list", "supports", "multiple", "values", "too", "provided", "in", "forms", "of", "list", ",", "in", "that", "case", "all", "the", "values", "will", "be", "appended", "to", "the", "existing", "(", "or", "newly", "created", ")", "list" ]
[ "public", "void", "append", "field", "value", "(", "template", "script", "factory", "field", "path", "template", ",", "value", "source", "value", "source", ")", "{", "map", "<", "string", ",", "object", ">", "model", "=", "create", "template", "model", "(", ")", ";", "append", "field", "value", "(", "field", "path", "template", "new", "instance", "(", "model", ")", "execute", "(", ")", ",", "value", "source", "copy", "and", "resolve", "(", "model", ")", ")", ";", "}" ]
[ "returns", "the", "estimated", "duration", "for", "this", "run", "if", "it", "is", "currently", "running", "default", "to", "{", "@", "link", "job", "#", "get", "estimated", "duration", "(", ")", "}", ",", "may", "be", "overridden", "in", "subclasses", "if", "duration", "may", "depend", "on", "run", "specific", "parameters", "(", "like", "incremental", "maven", "builds", ")" ]
[ "public", "long", "get", "estimated", "duration", "(", ")", "{", "return", "project", "get", "estimated", "duration", "(", ")", ";", "}" ]
[ "perform", "the", "exchange", "without", "a", "request", "body" ]
[ "response", "spec", "exchange", "(", ")", ";" ]
[ "get", "capital", "snake" ]
[ "public", "string", "get", "capital", "snake", "(", ")", "{", "return", "capital", "snake", ";", "}" ]
[ "makes", "an", "instance", "for", "the", "given", "value", "this", "may", "(", "but", "does", "not", "necessarily", ")", "return", "an", "already", "-", "allocated", "instance" ]
[ "public", "static", "cst", "long", "make", "(", "long", "value", ")", "{", "/", "*", "*", "note", ":", "javadoc", "notwithstanding", ",", "this", "implementation", "always", "*", "allocates", "*", "/", "return", "new", "cst", "long", "(", "value", ")", ";", "}" ]
[ "in", "the", "docker", "context", ",", "it", "'", "s", "a", "little", "bit", "tricky", "to", "get", "a", "password", "-", "protected", "keystore", "all", "of", "the", "utilities", "we", "'", "d", "want", "to", "use", "are", "on", "the", "docker", "image", "this", "method", "mounts", "a", "temporary", "directory", "to", "a", "docker", "container", ",", "password", "-", "protects", "the", "keystore", ",", "and", "then", "returns", "the", "path", "of", "the", "file", "that", "appears", "in", "the", "mounted", "directory", "(", "now", "accessible", "from", "the", "local", "filesystem", ")" ]
[ "private", "path", "get", "keystore", "file", "from", "docker", "container", "(", "string", "password", ",", "path", "docker", "keystore", ")", "throws", "i", "o", "exception", "{", "/", "/", "mount", "a", "temporary", "directory", "for", "copying", "the", "keystore", "path", "docker", "temp", "=", "path", "of", "(", "\"", "/", "usr", "/", "tmp", "/", "keystore", "-", "tmp", "\"", ")", ";", "path", "temp", "directory", "=", "create", "temp", "dir", "(", "keystore", "management", "tests", "class", "get", "simple", "name", "(", ")", ")", ";", "map", "<", "path", ",", "path", ">", "volumes", "=", "map", "of", "(", "temp", "directory", ",", "docker", "temp", ")", ";", "/", "/", "it", "'", "s", "very", "tricky", "to", "properly", "quote", "a", "pipeline", "that", "you", "'", "re", "passing", "to", "/", "/", "a", "docker", "exec", "command", ",", "so", "we", "'", "re", "just", "going", "to", "put", "a", "small", "script", "in", "the", "/", "/", "temp", "folder", "list", "<", "string", ">", "set", "password", "script", "=", "list", "of", "(", "\"", "echo", "\\", "\"", "\"", "+", "password", ",", "password", ",", "\"", "\\", "\"", "|", "\"", "+", "installation", "executables", "(", ")", "keystore", "tool", "to", "string", "(", ")", "+", "\"", "passwd", "\"", ")", ";", "files", "write", "(", "temp", "directory", "resolve", "(", "\"", "set", "-", "pass", "sh", "\"", ")", ",", "set", "password", "script", ")", ";", "run", "container", "(", "distribution", "(", ")", ",", "builder", "(", ")", "volumes", "(", "volumes", ")", ")", ";", "try", "{", "wait", "for", "path", "to", "exist", "(", "docker", "temp", ")", ";", "wait", "for", "path", "to", "exist", "(", "docker", "keystore", ")", ";", "}", "catch", "(", "interrupted", "exception", "e", ")", "{", "throw", "new", "runtime", "exception", "(", "e", ")", ";", "}", "/", "/", "we", "need", "a", "local", "shell", "to", "put", "the", "correct", "permissions", "on", "our", "mounted", "directory", "shell", "local", "shell", "=", "new", "shell", "(", ")", ";", "local", "shell", "run", "(", "\"", "docker", "exec", "-", "-", "tty", "\"", "+", "docker", "get", "container", "id", "(", ")", "+", "\"", "chown", "elasticsearch", ":", "root", "\"", "+", "docker", "temp", ")", ";", "local", "shell", "run", "(", "\"", "docker", "exec", "-", "-", "tty", "\"", "+", "docker", "get", "container", "id", "(", ")", "+", "\"", "chown", "elasticsearch", ":", "root", "\"", "+", "docker", "temp", "resolve", "(", "\"", "set", "-", "pass", "sh", "\"", ")", ")", ";", "sh", "run", "(", "\"", "bash", "\"", "+", "docker", "temp", "resolve", "(", "\"", "set", "-", "pass", "sh", "\"", ")", ")", ";", "/", "/", "copy", "keystore", "to", "temp", "file", "to", "make", "it", "available", "to", "docker", "host", "sh", "run", "(", "\"", "cp", "\"", "+", "docker", "keystore", "+", "\"", "\"", "+", "docker", "temp", ")", ";", "return", "temp", "directory", "resolve", "(", "\"", "elasticsearch", "keystore", "\"", ")", ";", "}" ]
[ "sanitize", "credentials", "set", "it", "'", "s", "important", "to", "keep", "the", "order", "of", "the", "credentials", "in", "the", "final", "set", "as", "they", "were", "presented" ]
[ "private", "static", "set", "<", "credential", ">", "sanitize", "credentials", "(", "final", "credential", "[", "]", "credentials", ")", "{", "if", "(", "credentials", "!", "=", "null", "&", "&", "credentials", "length", ">", "0", ")", "{", "return", "arrays", "stream", "(", "credentials", ")", "filter", "(", "objects", ":", ":", "non", "null", ")", "collect", "(", "collectors", "to", "collection", "(", "linked", "hash", "set", ":", ":", "new", ")", ")", ";", "}", "return", "new", "hash", "set", "<", ">", "(", "0", ")", ";", "}" ]
[ "enqueues", "a", "single", "job", "that", "depends", "on", "a", "collection", "of", "job", "id", "'", "s", ",", "as", "well", "as", "any", "unfinished", "items", "in", "the", "specified", "queue" ]
[ "public", "void", "add", "(", "@", "non", "null", "job", "job", ",", "@", "nullable", "string", "depends", "on", "queue", ")", "{", "job", "tracker", "on", "state", "change", "(", "job", ",", "job", "tracker", "job", "state", "pending", ")", ";", "run", "on", "executor", "(", "(", ")", "-", ">", "{", "job", "controller", "submit", "job", "with", "existing", "dependencies", "(", "job", ",", "collections", "empty", "list", "(", ")", ",", "depends", "on", "queue", ")", ";", "job", "controller", "wake", "up", "(", ")", ";", "}", ")", ";", "}" ]
[ "includes", "the", "defined", "{", "@", "link", "security", "feature", "}", "to", "the", "newexisting", "set", "of", "supported", "features" ]
[ "public", "builder", "include", "security", "features", "(", "security", "feature", "security", "feature", ")", "{", "this", "security", "features", "add", "all", "(", "arrays", "stream", "(", "security", "feature", ")", "collect", "(", "collectors", "to", "list", "(", ")", ")", ")", ";", "return", "this", ";", "}" ]
[ "the", "template", "source", "definition" ]
[ "public", "put", "index", "template", "request", "source", "(", "byte", "[", "]", "source", ",", "int", "offset", ",", "int", "length", ",", "x", "content", "type", "x", "content", "type", ")", "{", "return", "source", "(", "new", "bytes", "array", "(", "source", ",", "offset", ",", "length", ")", ",", "x", "content", "type", ")", ";", "}" ]
[ "decides", "if", "the", "given", "descriptor", "should", "be", "visible", "to", "the", "user" ]
[ "public", "boolean", "filter", "type", "(", "@", "non", "null", "class", "<", "?", ">", "context", "class", ",", "@", "non", "null", "descriptor", "descriptor", ")", "{", "return", "true", ";", "}" ]
[ "callback", "invoked", "to", "let", "this", "application", "know", "the", "protocol", "chosen", "by", "the", "peer" ]
[ "void", "selected", "(", "string", "protocol", ")", "throws", "exception", ";" ]
[ "get", "the", "low", "pc", "value", "of", "the", "compile", "unit" ]
[ "public", "number", "get", "low", "p", "c", "(", ")", "{", "return", "this", "low", "pc", ";", "}" ]
[ "return", "true", "if", "obj", "is", "equal", "to", "this" ]
[ "public", "boolean", "equals", "(", "object", "obj", ")", "{", "if", "(", "!", "super", "equals", "(", "obj", ")", ")", "{", "return", "false", ";", "}", "instruction", "d", "b", "inst", "=", "(", "instruction", "d", "b", ")", "obj", ";", "return", "proto", "equals", "(", "inst", "proto", ")", ";", "}" ]
[ "reset", "this", "cursor", "'", "s", "status" ]
[ "public", "void", "reset", "(", ")", "{", "this", "base", "address", "map", "clear", "(", ")", ";", "this", "cursor", "=", "0", ";", "}" ]
[ "returns", "the", "content", "string", "to", "be", "used", "for", "the", "http", "request" ]
[ "public", "string", "get", "content", "(", ")", "{", "return", "content", ";", "}" ]
[ "get", "a", "map", "of", "custom", "configs", "by", "removing", "from", "the", "originals", "all", "the", "streams", ",", "consumer", ",", "producer", ",", "and", "admin", "client", "configs", "prefixed", "properties", "are", "also", "removed", "because", "they", "are", "already", "added", "by", "{", "@", "link", "#", "get", "client", "props", "with", "prefix", "(", "string", ",", "set", ")", "}", "this", "allows", "to", "set", "a", "custom", "property", "for", "a", "specific", "client", "alone", "if", "specified", "using", "a", "prefix", ",", "or", "for", "all", "when", "no", "prefix", "is", "used" ]
[ "private", "map", "<", "string", ",", "object", ">", "get", "client", "custom", "props", "(", ")", "{", "final", "map", "<", "string", ",", "object", ">", "props", "=", "originals", "(", ")", ";", "props", "key", "set", "(", ")", "remove", "all", "(", "config", "names", "(", ")", ")", ";", "props", "key", "set", "(", ")", "remove", "all", "(", "consumer", "config", "config", "names", "(", ")", ")", ";", "props", "key", "set", "(", ")", "remove", "all", "(", "producer", "config", "config", "names", "(", ")", ")", ";", "props", "key", "set", "(", ")", "remove", "all", "(", "admin", "client", "config", "config", "names", "(", ")", ")", ";", "props", "key", "set", "(", ")", "remove", "all", "(", "originals", "with", "prefix", "(", "consumer", "prefix", ",", "false", ")", "key", "set", "(", ")", ")", ";", "props", "key", "set", "(", ")", "remove", "all", "(", "originals", "with", "prefix", "(", "producer", "prefix", ",", "false", ")", "key", "set", "(", ")", ")", ";", "props", "key", "set", "(", ")", "remove", "all", "(", "originals", "with", "prefix", "(", "admin", "client", "prefix", ",", "false", ")", "key", "set", "(", ")", ")", ";", "return", "props", ";", "}" ]
[ "returns", "a", "boolean", "to", "denote", "whether", "a", "cache", "file", "is", "visible", "to", "all", "(", "public", ")", "or", "not" ]
[ "static", "boolean", "is", "public", "(", "configuration", "conf", ",", "uri", "uri", ",", "map", "<", "uri", ",", "file", "status", ">", "stat", "cache", ")", "throws", "i", "o", "exception", "{", "boolean", "is", "public", "=", "true", ";", "file", "system", "fs", "=", "file", "system", "get", "(", "uri", ",", "conf", ")", ";", "path", "current", "=", "new", "path", "(", "uri", "get", "path", "(", ")", ")", ";", "current", "=", "fs", "make", "qualified", "(", "current", ")", ";", "/", "/", "if", "we", "'", "re", "looking", "at", "a", "wildcarded", "path", ",", "we", "only", "need", "to", "check", "that", "the", "/", "/", "ancestors", "allow", "execution", "otherwise", ",", "look", "for", "read", "permissions", "in", "/", "/", "addition", "to", "the", "ancestors", "'", "permissions", "if", "(", "!", "current", "get", "name", "(", ")", "equals", "(", "distributed", "cache", "wildcard", ")", ")", "{", "is", "public", "=", "check", "permission", "of", "other", "(", "fs", ",", "current", ",", "fs", "action", "read", ",", "stat", "cache", ")", ";", "}", "return", "is", "public", "&", "&", "ancestors", "have", "execute", "permissions", "(", "fs", ",", "current", "get", "parent", "(", ")", ",", "stat", "cache", ")", ";", "}" ]
[ "returns", "the", "highest", "zxid", "that", "this", "host", "has", "seen" ]
[ "public", "long", "get", "last", "logged", "zxid", "(", ")", "{", "if", "(", "!", "zk", "db", "is", "initialized", "(", ")", ")", "{", "load", "data", "base", "(", ")", ";", "}", "return", "zk", "db", "get", "data", "tree", "last", "processed", "zxid", "(", ")", ";", "}" ]
[ "if", "this", "type", "is", "a", "{", "@", "link", "map", "}", "and", "its", "key", "type", "is", "parameterized", ",", "returns", "the", "map", "'", "s", "key", "type", "if", "the", "map", "'", "s", "key", "type", "is", "not", "parameterized", ",", "returns", "{", "@", "code", "null", "}", "indicating", "the", "key", "type", "is", "not", "declared" ]
[ "public", "type", "descriptor", "get", "map", "key", "type", "descriptor", "(", ")", "{", "assert", "state", "(", "is", "map", "(", ")", ",", "\"", "not", "a", "[", "java", "util", "map", "]", "\"", ")", ";", "return", "get", "related", "if", "resolvable", "(", "this", ",", "get", "resolvable", "type", "(", ")", "as", "map", "(", ")", "get", "generic", "(", "0", ")", ")", ";", "}" ]
[ "get", "declared", "method", "with", "provided", "name", "and", "parameter", "types", "in", "given", "class", "and", "its", "super", "classes", "all", "parameters", "should", "be", "valid" ]
[ "private", "method", "get", "declared", "method", "for", "(", "class", "<", "?", ">", "clazz", ",", "string", "name", ",", "class", "<", "?", ">", "parameter", "types", ")", "{", "try", "{", "return", "clazz", "get", "declared", "method", "(", "name", ",", "parameter", "types", ")", ";", "}", "catch", "(", "no", "such", "method", "exception", "e", ")", "{", "class", "<", "?", ">", "super", "class", "=", "clazz", "get", "superclass", "(", ")", ";", "if", "(", "super", "class", "!", "=", "null", ")", "{", "return", "get", "declared", "method", "for", "(", "super", "class", ",", "name", ",", "parameter", "types", ")", ";", "}", "}", "return", "null", ";", "}" ]
[ "{", "@", "inherit", "doc", "}" ]
[ "public", "boolean", "is", "compatible", "(", "dalv", "insn", "insn", ")", "{", "if", "(", "!", "(", "(", "insn", "instanceof", "target", "insn", ")", "&", "&", "(", "insn", "get", "registers", "(", ")", "size", "(", ")", "=", "=", "0", ")", ")", ")", "{", "return", "false", ";", "}", "target", "insn", "ti", "=", "(", "target", "insn", ")", "insn", ";", "return", "ti", "has", "target", "offset", "(", ")", "?", "branch", "fits", "(", "ti", ")", ":", "true", ";", "}" ]
[ "return", "the", "attributes", "map", "mainly", "here", "for", "debugging", "purposes", ":", "preferably", ",", "use", "{", "@", "link", "#", "add", "attribute", "}", "and", "{", "@", "link", "#", "get", "attribute", "}" ]
[ "public", "map", "<", "string", ",", "serializable", ">", "get", "attributes", "(", ")", "{", "return", "this", "attributes", ";", "}" ]
[ "<", "code", ">", "optional", "string", "uri", "=", "2", ";", "<", "code", ">" ]
[ "public", "builder", "set", "uri", "(", "java", "lang", "string", "value", ")", "{", "copy", "on", "write", "(", ")", ";", "instance", "set", "uri", "(", "value", ")", ";", "return", "this", ";", "}" ]
[ "{", "@", "inherit", "doc", "}" ]
[ "public", "timestamp", "get", "timestamp", "(", "int", "column", "index", ")", "throws", "s", "q", "l", "exception", "{", "return", "null", ";", "}" ]
[ "visits", "an", "annotation", "on", "a", "type", "in", "the", "class", "signature" ]
[ "public", "annotation", "visitor", "visit", "type", "annotation", "(", "final", "int", "type", "ref", ",", "final", "type", "path", "type", "path", ",", "final", "string", "descriptor", ",", "final", "boolean", "visible", ")", "{", "if", "(", "api", "<", "opcodes", "asm5", ")", "{", "throw", "new", "unsupported", "operation", "exception", "(", "\"", "type", "annotation", "requires", "asm5", "\"", ")", ";", "}", "if", "(", "cv", "!", "=", "null", ")", "{", "return", "cv", "visit", "type", "annotation", "(", "type", "ref", ",", "type", "path", ",", "descriptor", ",", "visible", ")", ";", "}", "return", "null", ";", "}" ]
[ "add", "a", "hostname", "to", "a", "list", "of", "network", "dependencies" ]
[ "public", "void", "add", "dependent", "host", "name", "(", "string", "hostname", ")", "{", "dependent", "host", "names", "add", "(", "hostname", ")", ";", "}" ]
[ "construct", "the", "preferred", "type", "of", "sequence", "file", "writer" ]
[ "public", "static", "writer", "create", "writer", "(", "file", "system", "fs", ",", "configuration", "conf", ",", "path", "name", ",", "class", "key", "class", ",", "class", "val", "class", ",", "int", "buffer", "size", ",", "short", "replication", ",", "long", "block", "size", ",", "compression", "type", "compression", "type", ",", "compression", "codec", "codec", ",", "progressable", "progress", ",", "metadata", "metadata", ")", "throws", "i", "o", "exception", "{", "return", "create", "writer", "(", "conf", ",", "writer", "file", "(", "name", ")", ",", "writer", "filesystem", "(", "fs", ")", ",", "writer", "key", "class", "(", "key", "class", ")", ",", "writer", "value", "class", "(", "val", "class", ")", ",", "writer", "buffer", "size", "(", "buffer", "size", ")", ",", "writer", "replication", "(", "replication", ")", ",", "writer", "block", "size", "(", "block", "size", ")", ",", "writer", "compression", "(", "compression", "type", ",", "codec", ")", ",", "writer", "progressable", "(", "progress", ")", ",", "writer", "metadata", "(", "metadata", ")", ")", ";", "}" ]
[ "gets", "the", "transition", "duration" ]
[ "public", "int", "get", "transition", "duration", "(", ")", "{", "return", "m", "duration", "ms", ";", "}" ]
[ "reset", "the", "client", "send", "message", "count", "if", "the", "current", "heartbeat", "period", "has", "expired" ]
[ "void", "update", "client", "send", "message", "count", "(", "long", "now", ")", "{", "if", "(", "this", "client", "send", "message", "count", "!", "=", "null", "&", "&", "this", "client", "send", "interval", ">", "(", "now", "-", "client", "send", "message", "timestamp", ")", ")", "{", "this", "client", "send", "message", "count", "set", "(", "0", ")", ";", "this", "client", "send", "message", "timestamp", "=", "now", ";", "}", "}" ]
[ "test", "the", "property", "'", "namespace", "boolean", "'" ]
[ "public", "void", "namespace", "boolean", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "namespace", "boolean", "}" ]
[ "model", "tests", "for", "pet" ]
[ "public", "void", "test", "pet", "(", ")", "{", "/", "/", "todo", ":", "test", "pet", "}" ]
[ "get", "the", "parameter", "sql", "type" ]
[ "public", "int", "get", "sql", "type", "(", ")", "{", "return", "this", "sql", "type", ";", "}" ]
[ "returns", "the", "timestamp", "for", "the", "contained", "exception" ]
[ "public", "long", "get", "timestamp", "(", ")", "{", "return", "timestamp", ";", "}" ]
[ "{", "@", "code", "finalized", "tmp", "}", "is", "a", "transient", "directory", ",", "which", "holds", "the", "{", "@", "code", "previous", "}", "file", "system", "state", "while", "it", "is", "being", "removed", "in", "response", "to", "the", "finalize", "request", "finalize", "operation", "will", "remove", "{", "@", "code", "finalized", "tmp", "}", "when", "completed", ",", "otherwise", "the", "removal", "will", "resume", "upon", "the", "system", "startup" ]
[ "public", "file", "get", "finalized", "tmp", "(", ")", "{", "if", "(", "root", "=", "=", "null", ")", "{", "return", "null", ";", "}", "return", "new", "file", "(", "root", ",", "storage", "tmp", "finalized", ")", ";", "}" ]
[ "block", "recovery", "f", "i", "05", "one", "dn", "throws", "recovery", "in", "progress", "exception" ]
[ "public", "void", "test", "recovery", "in", "progress", "exception", "(", ")", "throws", "i", "o", "exception", ",", "interrupted", "exception", "{", "if", "(", "log", "is", "debug", "enabled", "(", ")", ")", "{", "log", "debug", "(", "\"", "running", "\"", "+", "generic", "test", "utils", "get", "method", "name", "(", ")", ")", ";", "}", "do", "throw", "(", "new", "recovery", "in", "progress", "exception", "(", "\"", "replica", "recovery", "is", "in", "progress", "\"", ")", ")", "when", "(", "spy", "d", "n", ")", "init", "replica", "recovery", "(", "any", "(", "recovering", "block", "class", ")", ")", ";", "for", "(", "recovering", "block", "r", "block", ":", "init", "recovering", "blocks", "(", ")", ")", "{", "block", "recovery", "worker", "recovery", "task", "contiguous", "recovery", "task", "contiguous", "=", "recovery", "worker", "new", "recovery", "task", "contiguous", "(", "r", "block", ")", ";", "block", "recovery", "worker", "recovery", "task", "contiguous", "spy", "task", "=", "spy", "(", "recovery", "task", "contiguous", ")", ";", "spy", "task", "recover", "(", ")", ";", "verify", "(", "spy", "task", ",", "never", "(", ")", ")", "sync", "block", "(", "any", "list", "(", ")", ")", ";", "}", "}" ]
[ "specify", "the", "destroy", "annotation", "to", "check", "for", ",", "indicating", "destruction", "methods", "to", "call", "when", "the", "context", "is", "shutting", "down", "any", "custom", "annotation", "can", "be", "used", ",", "since", "there", "are", "no", "required", "annotation", "attributes", "there", "is", "no", "default", ",", "although", "a", "typical", "choice", "is", "the", "jsr", "-", "250", "{", "@", "link", "javax", "annotation", "pre", "destroy", "}", "annotation" ]
[ "public", "void", "set", "destroy", "annotation", "type", "(", "class", "<", "?", "extends", "annotation", ">", "destroy", "annotation", "type", ")", "{", "this", "destroy", "annotation", "type", "=", "destroy", "annotation", "type", ";", "}" ]
[ "return", "the", "configured", "{", "@", "link", "task", "executor", "}" ]
[ "public", "async", "listenable", "task", "executor", "get", "task", "executor", "(", ")", "{", "return", "this", "task", "executor", ";", "}" ]
[ "appends", "{", "@", "code", "value", "}", "to", "the", "end", "of", "the", "values", "the", "built", "{", "@", "link", "immutable", "int", "array", "}", "will", "contain" ]
[ "public", "builder", "add", "(", "int", "value", ")", "{", "ensure", "room", "for", "(", "1", ")", ";", "array", "[", "count", "]", "=", "value", ";", "count", "+", "=", "1", ";", "return", "this", ";", "}" ]
[ "similar", "to", "test", "simple", "rollover", ",", "but", "ensure", "the", "cluster", "comes", "back", ",", "has", "the", "right", "data", ",", "and", "is", "able", "to", "serve", "new", "requests" ]
[ "public", "void", "test", "rollover", "then", "restart", "(", ")", "throws", "exception", "{", "zoo", "keeper", "zk", "=", "get", "client", "(", "idx", "follower", ")", ";", "int", "count", "created", "=", "create", "nodes", "(", "zk", ",", "0", ",", "10", ")", ";", "adjust", "epoch", "near", "end", "(", ")", ";", "count", "created", "+", "=", "create", "nodes", "(", "zk", ",", "count", "created", ",", "10", ")", ";", "shutdown", "all", "(", ")", ";", "start", "all", "(", ")", ";", "zk", "=", "get", "client", "(", "idx", "leader", ")", ";", "check", "nodes", "(", "zk", ",", "0", ",", "count", "created", ")", ";", "count", "created", "+", "=", "create", "nodes", "(", "zk", ",", "count", "created", ",", "10", ")", ";", "adjust", "epoch", "near", "end", "(", ")", ";", "check", "nodes", "(", "zk", ",", "0", ",", "count", "created", ")", ";", "count", "created", "+", "=", "create", "nodes", "(", "zk", ",", "count", "created", ",", "10", ")", ";", "shutdown", "all", "(", ")", ";", "start", "all", "(", ")", ";", "zk", "=", "get", "client", "(", "idx", "follower", ")", ";", "check", "nodes", "(", "zk", ",", "0", ",", "count", "created", ")", ";", "count", "created", "+", "=", "create", "nodes", "(", "zk", ",", "count", "created", ",", "10", ")", ";", "shutdown", "all", "(", ")", ";", "start", "all", "(", ")", ";", "zk", "=", "get", "client", "(", "idx", "leader", ")", ";", "check", "nodes", "(", "zk", ",", "0", ",", "count", "created", ")", ";", "count", "created", "+", "=", "create", "nodes", "(", "zk", ",", "count", "created", ",", "10", ")", ";", "/", "/", "sanity", "check", "assert", "true", "(", "count", "created", ">", "0", ")", ";", "assert", "true", "(", "count", "created", "<", "60", ")", ";", "}" ]
[ "the", "same", "as", "{", "@", "link", "#", "find", "matching", "vertex", "(", "visual", "vertex", ")", "}", ",", "except", "that", "you", "can", "provide", "a", "collection", "of", "vertices", "to", "be", "ignored", "<", "p", ">", "this", "is", "useful", "during", "graph", "transformations", "when", "duplicate", "vertices", "may", "be", "in", "the", "graph", "at", "the", "same", "time" ]
[ "public", "abstract", "v", "find", "matching", "vertex", "(", "v", "v", ",", "collection", "<", "v", ">", "ignore", ")", ";" ]
[ "given", "a", "list", "of", "delete", "requests", ",", "convert", "them", "all", "to", "paths" ]
[ "public", "list", "<", "path", ">", "keys", "to", "paths", "(", "final", "collection", "<", "delete", "objects", "request", "key", "version", ">", "keys", "to", "delete", ")", "{", "return", "to", "path", "list", "(", "keys", "to", "key", "paths", "(", "keys", "to", "delete", ")", ")", ";", "}" ]
[ "creates", "a", "metadata", "column", "from", "metadata", "of", "the", "given", "column", "name", "or", "from", "metadata", "of", "the", "given", "alias", "(", "if", "not", "null", ")", "allows", "to", "specify", "whether", "the", "column", "is", "virtual", "or", "not" ]
[ "public", "static", "metadata", "column", "metadata", "(", "string", "name", ",", "data", "type", "type", ",", "@", "nullable", "string", "metadata", "alias", ",", "boolean", "is", "virtual", ")", "{", "preconditions", "check", "not", "null", "(", "name", ",", "\"", "column", "name", "can", "not", "be", "null", "\"", ")", ";", "preconditions", "check", "not", "null", "(", "type", ",", "\"", "column", "type", "can", "not", "be", "null", "\"", ")", ";", "return", "new", "metadata", "column", "(", "name", ",", "type", ",", "metadata", "alias", ",", "is", "virtual", ")", ";", "}" ]
[ "return", "{", "@", "code", "true", "}", "if", "there", "is", "a", "{", "@", "link", "cors", "configuration", "source", "}", "for", "this", "handler" ]
[ "protected", "boolean", "has", "cors", "configuration", "source", "(", "object", "handler", ")", "{", "if", "(", "handler", "instanceof", "handler", "execution", "chain", ")", "{", "handler", "=", "(", "(", "handler", "execution", "chain", ")", "handler", ")", "get", "handler", "(", ")", ";", "}", "return", "(", "handler", "instanceof", "cors", "configuration", "source", "|", "|", "this", "cors", "configuration", "source", "!", "=", "null", ")", ";", "}" ]
[ "returns", "all", "source", "functions", "in", "the", "model" ]
[ "public", "set", "<", "function", ">", "get", "source", "functions", "(", ")", "{", "set", "<", "function", ">", "items", "=", "new", "hash", "set", "<", ">", "(", ")", ";", "for", "(", "function", "comparison", "fc", ":", "comparisons", ")", "{", "items", "add", "(", "fc", "get", "source", "(", ")", ")", ";", "}", "return", "items", ";", "}" ]
[ "returns", "a", "range", "that", "{", "@", "linkplain", "range", "#", "contains", "(", "comparable", ")", "contains", "}", "only", "the", "given", "value", "the", "returned", "range", "is", "{", "@", "linkplain", "bound", "type", "#", "closed", "closed", "}", "on", "both", "ends" ]
[ "public", "static", "<", "c", "extends", "comparable", "<", "?", ">", ">", "range", "<", "c", ">", "singleton", "(", "c", "value", ")", "{", "return", "closed", "(", "value", ",", "value", ")", ";", "}" ]
[ "allows", "to", "return", "custom", "camera", "if", "needed" ]
[ "protected", "camera", "intercept", "camera", "(", "light", "properties", "lp", ")", "{", "return", "lp", "camera", ";", "}" ]
[ "create", "a", "jms", "map", "message", "for", "the", "given", "map" ]
[ "protected", "map", "message", "create", "message", "for", "map", "(", "map", "<", "?", ",", "?", ">", "map", ",", "session", "session", ")", "throws", "j", "m", "s", "exception", "{", "map", "message", "message", "=", "session", "create", "map", "message", "(", ")", ";", "for", "(", "map", "entry", "<", "?", ",", "?", ">", "entry", ":", "map", "entry", "set", "(", ")", ")", "{", "object", "key", "=", "entry", "get", "key", "(", ")", ";", "if", "(", "!", "(", "key", "instanceof", "string", ")", ")", "{", "throw", "new", "message", "conversion", "exception", "(", "\"", "cannot", "convert", "non", "-", "string", "key", "of", "type", "[", "\"", "+", "object", "utils", "null", "safe", "class", "name", "(", "key", ")", "+", "\"", "]", "to", "jms", "map", "message", "entry", "\"", ")", ";", "}", "message", "set", "object", "(", "(", "string", ")", "key", ",", "entry", "get", "value", "(", ")", ")", ";", "}", "return", "message", ";", "}" ]
[ "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", "\"", ")", ";", "}" ]
[ "get", "anytype", "2" ]
[ "public", "object", "get", "anytype", "2", "(", ")", "{", "return", "anytype", "2", ";", "}" ]
[ "populates", "an", "empty", "{", "@", "link", "structure", "data", "type", "}", "with", "its", "fields" ]
[ "private", "void", "populate", "stub", "struct", "(", "d", "w", "a", "r", "f", "data", "type", "ddt", ",", "d", "i", "e", "aggregate", "diea", ")", "throws", "i", "o", "exception", ",", "d", "w", "a", "r", "f", "expression", "exception", "{", "structure", "data", "type", "structure", "=", "(", "structure", "data", "type", ")", "ddt", "data", "type", ";", "long", "struct", "size", "=", "diea", "get", "unsigned", "long", "(", "d", "w", "a", "r", "f", "attribute", "dw", "at", "byte", "size", ",", "0", ")", ";", "if", "(", "is", "struct", "too", "big", "for", "ghidra", "(", "struct", "size", ")", ")", "{", "return", ";", "}", "/", "/", "add", "member", "fields", "first", "before", "inheritance", "because", "empty", "base", "classes", "'", "offset", "/", "/", "location", "can", "conflict", "with", "the", "first", "member", "field", "'", "s", "offset", "/", "/", "this", "means", "that", "member", "fields", "will", "be", "successfully", "added", "and", "the", "field", "/", "/", "that", "represents", "the", "base", "class", "will", "fail", "in", "these", "cases", "populate", "stub", "struct", "worker", "(", "ddt", ",", "structure", ",", "diea", ",", "d", "w", "a", "r", "f", "tag", "dw", "tag", "member", ")", ";", "populate", "stub", "struct", "worker", "(", "ddt", ",", "structure", ",", "diea", ",", "d", "w", "a", "r", "f", "tag", "dw", "tag", "inheritance", ")", ";", "remove", "uneeded", "struct", "member", "shrinkage", "(", "structure", ")", ";", "}" ]
[ "minimum", "number", "of", "requests", "in", "the", "{", "@", "link", "#", "metrics", "rolling", "statistical", "window", "in", "milliseconds", "(", ")", "}", "that", "must", "exist", "before", "the", "{", "@", "link", "hystrix", "circuit", "breaker", "}", "will", "trip", "if", "below", "this", "number", "the", "circuit", "will", "not", "trip", "regardless", "of", "error", "percentage" ]
[ "public", "hystrix", "property", "<", "integer", ">", "circuit", "breaker", "request", "volume", "threshold", "(", ")", "{", "return", "circuit", "breaker", "request", "volume", "threshold", ";", "}" ]
[ "check", "if", "indices", "permissions", "allow", "for", "the", "given", "action", ",", "also", "checks", "whether", "the", "limited", "by", "role", "allows", "the", "given", "actions" ]
[ "public", "boolean", "check", "indices", "action", "(", "string", "action", ")", "{", "return", "super", "check", "indices", "action", "(", "action", ")", "&", "&", "limited", "by", "check", "indices", "action", "(", "action", ")", ";", "}" ]
[ "returns", "a", "matcher", "that", "matches", "any", "character", "not", "matched", "by", "this", "matcher" ]
[ "public", "char", "matcher", "negate", "(", ")", "{", "return", "new", "negated", "(", "this", ")", ";", "}" ]
[ "r", "eturns", "whether", "this", "frame", "is", "transient", "a", "transient", "frame", "is", "one", "that", "is", "show", "temporarily" ]
[ "public", "boolean", "is", "transient", "(", ")", "{", "return", "is", "transient", ";", "}" ]
[ "register", "a", "member", "with", "the", "data", "-", "bus", "to", "start", "receiving", "events" ]
[ "public", "void", "subscribe", "(", "final", "member", "member", ")", "{", "this", "listeners", "add", "(", "member", ")", ";", "}" ]
[ "get", "my", "number" ]
[ "public", "big", "decimal", "get", "my", "number", "(", ")", "{", "return", "my", "number", ";", "}" ]
[ "determines", "the", "number", "of", "consecutive", "characters", "that", "are", "encodable", "using", "text", "compaction" ]
[ "private", "static", "int", "determine", "consecutive", "text", "count", "(", "char", "sequence", "msg", ",", "int", "startpos", ")", "{", "int", "len", "=", "msg", "length", "(", ")", ";", "int", "idx", "=", "startpos", ";", "while", "(", "idx", "<", "len", ")", "{", "char", "ch", "=", "msg", "char", "at", "(", "idx", ")", ";", "int", "numeric", "count", "=", "0", ";", "while", "(", "numeric", "count", "<", "13", "&", "&", "is", "digit", "(", "ch", ")", "&", "&", "idx", "<", "len", ")", "{", "numeric", "count", "+", "+", ";", "idx", "+", "+", ";", "if", "(", "idx", "<", "len", ")", "{", "ch", "=", "msg", "char", "at", "(", "idx", ")", ";", "}", "}", "if", "(", "numeric", "count", ">", "=", "13", ")", "{", "return", "idx", "-", "startpos", "-", "numeric", "count", ";", "}", "if", "(", "numeric", "count", ">", "0", ")", "{", "/", "/", "heuristic", ":", "all", "text", "-", "encodable", "chars", "or", "digits", "are", "binary", "encodable", "continue", ";", "}", "ch", "=", "msg", "char", "at", "(", "idx", ")", ";", "/", "/", "check", "if", "character", "is", "encodable", "if", "(", "!", "is", "text", "(", "ch", ")", ")", "{", "break", ";", "}", "idx", "+", "+", ";", "}", "return", "idx", "-", "startpos", ";", "}" ]
[ "factory", "for", "\"", "regular", "\"", "version", "of", "{", "@", "link", "data", "high", "level", "shader", "language", "symbol", "internals", "}" ]
[ "public", "static", "data", "high", "level", "shader", "language", "symbol", "internals", "parse", "(", "abstract", "pdb", "pdb", ",", "pdb", "byte", "reader", "reader", ")", "throws", "pdb", "exception", "{", "data", "high", "level", "shader", "language", "symbol", "internals", "3", "2", "result", "=", "new", "data", "high", "level", "shader", "language", "symbol", "internals", "3", "2", "(", "pdb", ")", ";", "result", "type", "record", "number", "=", "record", "number", "parse", "(", "pdb", ",", "reader", ",", "record", "category", "type", ",", "32", ")", ";", "result", "register", "type", "=", "h", "l", "s", "l", "register", "type", "from", "value", "(", "reader", "parse", "unsigned", "short", "val", "(", ")", ")", ";", "result", "data", "slot", "=", "reader", "parse", "unsigned", "short", "val", "(", ")", ";", "result", "data", "offset", "=", "reader", "parse", "unsigned", "short", "val", "(", ")", ";", "result", "texture", "slot", "start", "=", "reader", "parse", "unsigned", "short", "val", "(", ")", ";", "result", "sampler", "slot", "start", "=", "reader", "parse", "unsigned", "short", "val", "(", ")", ";", "result", "uav", "slot", "start", "=", "reader", "parse", "unsigned", "short", "val", "(", ")", ";", "result", "name", "=", "reader", "parse", "string", "(", "pdb", ",", "string", "parse", "type", "string", "utf", "8", "nt", ")", ";", "return", "result", ";", "}" ]
[ "retrieves", "an", "entity", "manager", "factory", "by", "persistence", "unit", "name", ",", "if", "none", "set", "explicitly", "falls", "back", "to", "a", "default", "entity", "manager", "factory", "bean", "if", "no", "persistence", "unit", "specified" ]
[ "public", "void", "set", "bean", "factory", "(", "bean", "factory", "bean", "factory", ")", "throws", "beans", "exception", "{", "if", "(", "get", "entity", "manager", "factory", "(", ")", "=", "=", "null", ")", "{", "if", "(", "!", "(", "bean", "factory", "instanceof", "listable", "bean", "factory", ")", ")", "{", "throw", "new", "illegal", "state", "exception", "(", "\"", "cannot", "retrieve", "entity", "manager", "factory", "by", "persistence", "unit", "name", "\"", "+", "\"", "in", "a", "non", "-", "listable", "bean", "factory", ":", "\"", "+", "bean", "factory", ")", ";", "}", "listable", "bean", "factory", "lbf", "=", "(", "listable", "bean", "factory", ")", "bean", "factory", ";", "set", "entity", "manager", "factory", "(", "entity", "manager", "factory", "utils", "find", "entity", "manager", "factory", "(", "lbf", ",", "get", "persistence", "unit", "name", "(", ")", ")", ")", ";", "}", "}" ]
[ "sets", "the", "value", "of", "a", "field", "on", "the", "object" ]
[ "private", "static", "boolean", "set", "field", "(", "base", "record", "record", ",", "string", "field", "name", ",", "object", "data", ")", "{", "method", "m", "=", "locate", "setter", "(", "record", ",", "field", "name", ")", ";", "if", "(", "m", "!", "=", "null", ")", "{", "try", "{", "m", "invoke", "(", "record", ",", "data", ")", ";", "}", "catch", "(", "exception", "e", ")", "{", "log", "error", "(", "\"", "cannot", "set", "field", "\"", "+", "field", "name", "+", "\"", "on", "object", "\"", "+", "record", "get", "class", "(", ")", "get", "name", "(", ")", "+", "\"", "to", "data", "\"", "+", "data", "+", "\"", "of", "type", "\"", "+", "data", "get", "class", "(", ")", ",", "e", ")", ";", "return", "false", ";", "}", "}", "return", "true", ";", "}" ]
[ "ensure", "metrics", "cardinality", "doesn", "'", "t", "blow", "up", "on", "variables" ]
[ "private", "static", "tag", "uri", "(", "request", "log", "request", "log", ")", "{", "int", "status", "=", "request", "log", "response", "headers", "(", ")", "status", "(", ")", "code", "(", ")", ";", "if", "(", "status", ">", "299", "&", "&", "status", "<", "400", ")", "return", "uri", "redirection", ";", "if", "(", "status", "=", "=", "404", ")", "return", "uri", "not", "found", ";", "string", "uri", "=", "get", "path", "info", "(", "request", "log", ")", ";", "if", "(", "uri", "starts", "with", "(", "\"", "/", "zipkin", "\"", ")", ")", "{", "if", "(", "uri", "equals", "(", "\"", "/", "zipkin", "/", "\"", ")", "|", "|", "uri", "equals", "(", "\"", "/", "zipkin", "\"", ")", "|", "|", "uri", "starts", "with", "(", "\"", "/", "zipkin", "/", "traces", "/", "\"", ")", "|", "|", "uri", "equals", "(", "\"", "/", "zipkin", "/", "dependency", "\"", ")", "|", "|", "uri", "equals", "(", "\"", "/", "zipkin", "/", "trace", "viewer", "\"", ")", ")", "{", "return", "uri", "crossroads", ";", "/", "/", "single", "-", "page", "app", "route", "}", "/", "/", "un", "-", "map", "ui", "'", "s", "api", "route", "if", "(", "uri", "starts", "with", "(", "\"", "/", "zipkin", "/", "api", "\"", ")", ")", "{", "uri", "=", "uri", "replace", "first", "(", "\"", "/", "zipkin", "\"", ",", "\"", "\"", ")", ";", "}", "}", "/", "/", "handle", "templated", "routes", "instead", "of", "exploding", "on", "trace", "id", "cardinality", "if", "(", "uri", "starts", "with", "(", "\"", "/", "api", "/", "v", "2", "/", "trace", "/", "\"", ")", ")", "return", "uri", "trace", "v2", ";", "return", "tag", "of", "(", "\"", "uri", "\"", ",", "uri", ")", ";", "}" ]
[ "sets", "the", "minimum", "number", "of", "times", "that", "a", "download", "will", "be", "retried", "a", "download", "will", "fail", "if", "the", "specified", "number", "of", "retries", "is", "exceeded", "without", "any", "progress", "being", "made" ]
[ "public", "void", "set", "min", "retry", "count", "(", "int", "min", "retry", "count", ")", "{", "assertions", "check", "argument", "(", "min", "retry", "count", ">", "=", "0", ")", ";", "if", "(", "this", "min", "retry", "count", "=", "=", "min", "retry", "count", ")", "{", "return", ";", "}", "this", "min", "retry", "count", "=", "min", "retry", "count", ";", "pending", "messages", "+", "+", ";", "internal", "handler", "obtain", "message", "(", "msg", "set", "min", "retry", "count", ",", "min", "retry", "count", ",", "/", "*", "unused", "*", "/", "0", ")", "send", "to", "target", "(", ")", ";", "}" ]
[ "enables", "a", "cross", "fade", "animation", "between", "both", "the", "placeholder", "and", "the", "first", "resource", "and", "between", "subsequent", "resources", "(", "if", "thumbnails", "are", "used", ")" ]
[ "public", "drawable", "transition", "options", "cross", "fade", "(", "int", "duration", ")", "{", "return", "cross", "fade", "(", "new", "drawable", "cross", "fade", "factory", "builder", "(", "duration", ")", ")", ";", "}" ]
[ "loads", "the", "native", "bullet", "native", "library", "and", "initializes", "the", "gdx", "-", "bullet", "extension", "must", "be", "called", "before", "any", "of", "the", "bullet", "classesmethods", "can", "be", "used" ]
[ "public", "static", "void", "init", "(", "boolean", "use", "ref", "counting", ")", "{", "init", "(", "use", "ref", "counting", ",", "true", ")", ";", "}" ]
[ "configure", "the", "max", "amount", "of", "time", "that", "may", "elapse", "after", "the", "{", "@", "link", "#", "get", "last", "access", "time", "(", ")", "last", "access", "time", "}", "before", "a", "session", "is", "considered", "expired", "a", "negative", "value", "indicates", "the", "session", "should", "not", "expire" ]
[ "void", "set", "max", "idle", "time", "(", "duration", "max", "idle", "time", ")", ";" ]
[ "this", "method", "produces", "an", "allocation", "that", "includes", "the", "current", "view", "of", "the", "resources", "that", "will", "be", "allocated", "to", "and", "preempted", "from", "this", "application" ]
[ "public", "allocation", "get", "allocation", "(", "resource", "calculator", "resource", "calculator", ",", "resource", "cluster", "resource", ",", "resource", "minimum", "allocation", ")", "{", "write", "lock", "lock", "(", ")", ";", "try", "{", "set", "<", "container", "id", ">", "current", "cont", "preemption", "=", "collections", "unmodifiable", "set", "(", "new", "hash", "set", "<", "container", "id", ">", "(", "containers", "to", "preempt", ")", ")", ";", "containers", "to", "preempt", "clear", "(", ")", ";", "resource", "tot", "=", "resource", "new", "instance", "(", "0", ",", "0", ")", ";", "for", "(", "container", "id", "c", ":", "current", "cont", "preemption", ")", "{", "resources", "add", "to", "(", "tot", ",", "live", "containers", "get", "(", "c", ")", "get", "container", "(", ")", "get", "resource", "(", ")", ")", ";", "}", "int", "num", "cont", "=", "(", "int", ")", "math", "ceil", "(", "resources", "divide", "(", "rc", ",", "cluster", "resource", ",", "tot", ",", "minimum", "allocation", ")", ")", ";", "resource", "request", "rr", "=", "resource", "request", "new", "builder", "(", ")", "priority", "(", "priority", "undefined", ")", "resource", "name", "(", "resource", "request", "any", ")", "capability", "(", "minimum", "allocation", ")", "num", "containers", "(", "num", "cont", ")", "build", "(", ")", ";", "list", "<", "container", ">", "previous", "attempt", "containers", "=", "pull", "previous", "attempt", "containers", "(", ")", ";", "list", "<", "container", ">", "newly", "allocated", "containers", "=", "pull", "newly", "allocated", "containers", "(", ")", ";", "list", "<", "container", ">", "newly", "increased", "containers", "=", "pull", "newly", "increased", "containers", "(", ")", ";", "list", "<", "container", ">", "newly", "decreased", "containers", "=", "pull", "newly", "decreased", "containers", "(", ")", ";", "list", "<", "container", ">", "newly", "promoted", "containers", "=", "pull", "newly", "promoted", "containers", "(", ")", ";", "list", "<", "container", ">", "newly", "demoted", "containers", "=", "pull", "newly", "demoted", "containers", "(", ")", ";", "list", "<", "n", "m", "token", ">", "updated", "n", "m", "tokens", "=", "pull", "updated", "n", "m", "tokens", "(", ")", ";", "resource", "headroom", "=", "get", "headroom", "(", ")", ";", "set", "application", "headroom", "for", "metrics", "(", "headroom", ")", ";", "return", "new", "allocation", "(", "newly", "allocated", "containers", ",", "headroom", ",", "null", ",", "current", "cont", "preemption", ",", "collections", "singleton", "list", "(", "rr", ")", ",", "updated", "n", "m", "tokens", ",", "newly", "increased", "containers", ",", "newly", "decreased", "containers", ",", "newly", "promoted", "containers", ",", "newly", "demoted", "containers", ",", "previous", "attempt", "containers", ",", "app", "scheduling", "info", "get", "rejected", "request", "(", ")", ")", ";", "}", "finally", "{", "write", "lock", "unlock", "(", ")", ";", "}", "}" ]
[ "put", "an", "application" ]
[ "private", "void", "put", "app", "(", "final", "application", "id", "app", "id", ",", "final", "sub", "cluster", "id", "sub", "cluster", "id", ",", "boolean", "update", ")", "throws", "yarn", "exception", "{", "string", "app", "z", "node", "=", "get", "node", "path", "(", "apps", "z", "node", ",", "app", "id", "to", "string", "(", ")", ")", ";", "sub", "cluster", "id", "proto", "proto", "=", "(", "(", "sub", "cluster", "id", "p", "b", "impl", ")", "sub", "cluster", "id", ")", "get", "proto", "(", ")", ";", "byte", "[", "]", "data", "=", "proto", "to", "byte", "array", "(", ")", ";", "put", "(", "app", "z", "node", ",", "data", ",", "update", ")", ";", "}" ]
[ "set", "to", "false", "if", "wait", "for", "data", "bound", "data", "fetched", "is", "bounded", "to", "the", "ui", "otherwise", ",", "set", "it", "to", "true" ]
[ "void", "wait", "for", "data", "bound", "(", "boolean", "wait", "for", "data", "bound", ")", "{", "m", "wait", "for", "data", "bound", "=", "wait", "for", "data", "bound", ";", "}" ]
[ "assert", "that", "this", "{", "@", "code", "test", "observer", "}", "{", "@", "code", "test", "subscriber", "}", "has", "not", "received", "an", "{", "@", "code", "on", "complete", "}", "event" ]
[ "public", "final", "u", "assert", "not", "complete", "(", ")", "{", "long", "c", "=", "completions", ";", "if", "(", "c", "=", "=", "1", ")", "{", "throw", "fail", "(", "\"", "completed", "!", "\"", ")", ";", "}", "else", "if", "(", "c", ">", "1", ")", "{", "throw", "fail", "(", "\"", "multiple", "completions", ":", "\"", "+", "c", ")", ";", "}", "return", "(", "u", ")", "this", ";", "}" ]
[ "get", "the", "number", "of", "bytes", "to", "make", "a", "unit", ";", "in", "this", "case", ",", "returns", "1" ]
[ "public", "int", "get", "unit", "byte", "size", "(", ")", "{", "return", "unit", "byte", "size", ";", "}" ]
[ "get", "the", "current", "highlight" ]
[ "byte", "block", "selection", "get", "viewer", "highlight", "(", ")", "{", "if", "(", "current", "view", "=", "=", "null", ")", "{", "return", "null", ";", "}", "return", "current", "view", "get", "viewer", "highlight", "(", ")", ";", "}" ]
[ "set", "the", "default", "json", "instance" ]
[ "public", "static", "void", "set", "default", "(", "json", "json", ")", "{", "json", "json", "=", "json", ";", "}" ]
[ "a", "list", "of", "alternate", "names", "to", "verify", "the", "subject", "identity", "in", "the", "certificate", "presented", "by", "the", "client", "<", "code", ">", "repeated", "string", "subject", "alt", "names", "=", "6", ";", "<", "code", ">" ]
[ "public", "builder", "add", "subject", "alt", "names", "(", "java", "lang", "string", "value", ")", "{", "if", "(", "value", "=", "=", "null", ")", "{", "throw", "new", "null", "pointer", "exception", "(", ")", ";", "}", "ensure", "subject", "alt", "names", "is", "mutable", "(", ")", ";", "subject", "alt", "names", "add", "(", "value", ")", ";", "on", "changed", "(", ")", ";", "return", "this", ";", "}" ]
[ "simple", "concat", "of", "2", "asynchronous", "observables", "ensuring", "it", "emits", "in", "correct", "order" ]
[ "public", "void", "simple", "async", "concat", "(", ")", "{", "observer", "<", "string", ">", "observer", "=", "test", "helper", "mock", "observer", "(", ")", ";", "test", "observable", "<", "string", ">", "o", "1", "=", "new", "test", "observable", "<", ">", "(", "\"", "one", "\"", ",", "\"", "two", "\"", ",", "\"", "three", "\"", ")", ";", "test", "observable", "<", "string", ">", "o", "2", "=", "new", "test", "observable", "<", ">", "(", "\"", "four", "\"", ",", "\"", "five", "\"", ",", "\"", "six", "\"", ")", ";", "observable", "concat", "(", "observable", "unsafe", "create", "(", "o", "1", ")", ",", "observable", "unsafe", "create", "(", "o", "2", ")", ")", "subscribe", "(", "observer", ")", ";", "try", "{", "/", "/", "wait", "for", "async", "observables", "to", "complete", "o", "1", "t", "join", "(", ")", ";", "o", "2", "t", "join", "(", ")", ";", "}", "catch", "(", "throwable", "e", ")", "{", "throw", "new", "runtime", "exception", "(", "\"", "failed", "waiting", "on", "threads", "\"", ")", ";", "}", "in", "order", "in", "order", "=", "in", "order", "(", "observer", ")", ";", "in", "order", "verify", "(", "observer", ",", "times", "(", "1", ")", ")", "on", "next", "(", "\"", "one", "\"", ")", ";", "in", "order", "verify", "(", "observer", ",", "times", "(", "1", ")", ")", "on", "next", "(", "\"", "two", "\"", ")", ";", "in", "order", "verify", "(", "observer", ",", "times", "(", "1", ")", ")", "on", "next", "(", "\"", "three", "\"", ")", ";", "in", "order", "verify", "(", "observer", ",", "times", "(", "1", ")", ")", "on", "next", "(", "\"", "four", "\"", ")", ";", "in", "order", "verify", "(", "observer", ",", "times", "(", "1", ")", ")", "on", "next", "(", "\"", "five", "\"", ")", ";", "in", "order", "verify", "(", "observer", ",", "times", "(", "1", ")", ")", "on", "next", "(", "\"", "six", "\"", ")", ";", "}" ]
[ "returns", "an", "immutable", "set", "instance", "containing", "the", "given", "enum", "elements", "internally", ",", "the", "returned", "set", "will", "be", "backed", "by", "an", "{", "@", "link", "enum", "set", "}", "the", "iteration", "order", "of", "the", "returned", "set", "follows", "the", "enum", "'", "s", "iteration", "order", ",", "not", "the", "order", "in", "which", "the", "elements", "are", "provided", "to", "the", "method" ]
[ "public", "static", "<", "e", "extends", "enum", "<", "e", ">", ">", "immutable", "set", "<", "e", ">", "immutable", "enum", "set", "(", "e", "an", "element", ",", "e", "other", "elements", ")", "{", "return", "immutable", "enum", "set", "as", "immutable", "(", "enum", "set", "of", "(", "an", "element", ",", "other", "elements", ")", ")", ";", "}" ]
[ "returns", "pet", "inventories", "by", "status", "returns", "a", "map", "of", "status", "codes", "to", "quantities" ]
[ "public", "api", "response", "<", "map", "<", "string", ",", "integer", ">", ">", "get", "inventory", "with", "http", "info", "(", ")", "throws", "api", "exception", "{", "object", "local", "var", "post", "body", "=", "null", ";", "/", "/", "create", "path", "and", "map", "variables", "string", "local", "var", "path", "=", "\"", "/", "store", "/", "inventory", "\"", ";", "/", "/", "query", "params", "list", "<", "pair", ">", "local", "var", "query", "params", "=", "new", "array", "list", "<", "pair", ">", "(", ")", ";", "map", "<", "string", ",", "string", ">", "local", "var", "header", "params", "=", "new", "hash", "map", "<", "string", ",", "string", ">", "(", ")", ";", "map", "<", "string", ",", "string", ">", "local", "var", "cookie", "params", "=", "new", "hash", "map", "<", "string", ",", "string", ">", "(", ")", ";", "map", "<", "string", ",", "object", ">", "local", "var", "form", "params", "=", "new", "hash", "map", "<", "string", ",", "object", ">", "(", ")", ";", "final", "string", "[", "]", "local", "var", "accepts", "=", "{", "\"", "application", "/", "json", "\"", "}", ";", "final", "string", "local", "var", "accept", "=", "api", "client", "select", "header", "accept", "(", "local", "var", "accepts", ")", ";", "final", "string", "[", "]", "local", "var", "content", "types", "=", "{", "}", ";", "final", "string", "local", "var", "content", "type", "=", "api", "client", "select", "header", "content", "type", "(", "local", "var", "content", "types", ")", ";", "string", "[", "]", "local", "var", "auth", "names", "=", "new", "string", "[", "]", "{", "\"", "api", "key", "\"", "}", ";", "generic", "type", "<", "map", "<", "string", ",", "integer", ">", ">", "local", "var", "return", "type", "=", "new", "generic", "type", "<", "map", "<", "string", ",", "integer", ">", ">", "(", ")", "{", "}", ";", "return", "api", "client", "invoke", "a", "p", "i", "(", "\"", "store", "api", "get", "inventory", "\"", ",", "local", "var", "path", ",", "\"", "get", "\"", ",", "local", "var", "query", "params", ",", "local", "var", "post", "body", ",", "local", "var", "header", "params", ",", "local", "var", "cookie", "params", ",", "local", "var", "form", "params", ",", "local", "var", "accept", ",", "local", "var", "content", "type", ",", "local", "var", "auth", "names", ",", "local", "var", "return", "type", ",", "false", ")", ";", "}" ]
[ "add", "a", "new", "sink", "that", "forwards", "records", "from", "upstream", "parent", "processor", "andor", "source", "nodes", "to", "kafka", "topics", "based", "on", "{", "@", "code", "topic", "extractor", "}", ",", "using", "the", "supplied", "partitioner", "the", "topics", "that", "it", "may", "ever", "send", "to", "should", "be", "pre", "-", "created", "the", "sink", "will", "use", "the", "{", "@", "link", "streams", "config", "#", "default", "key", "serde", "class", "config", "default", "key", "serializer", "}", "and", "{", "@", "link", "streams", "config", "#", "default", "value", "serde", "class", "config", "default", "value", "serializer", "}", "specified", "in", "the", "{", "@", "link", "streams", "config", "stream", "configuration", "}", "the", "sink", "will", "also", "use", "the", "specified", "{", "@", "link", "stream", "partitioner", "}", "to", "determine", "how", "records", "are", "distributed", "among", "the", "named", "kafka", "topic", "'", "s", "partitions", "such", "control", "is", "often", "useful", "with", "topologies", "that", "use", "{", "@", "link", "#", "add", "state", "store", "(", "store", "builder", ",", "string", ")", "state", "stores", "}", "in", "its", "processors", "in", "most", "other", "cases", ",", "however", ",", "a", "partitioner", "needs", "not", "be", "specified", "and", "kafka", "will", "automatically", "distribute", "records", "among", "partitions", "using", "kafka", "'", "s", "default", "partitioning", "logic" ]
[ "public", "synchronized", "<", "k", ",", "v", ">", "topology", "add", "sink", "(", "final", "string", "name", ",", "final", "topic", "name", "extractor", "<", "k", ",", "v", ">", "topic", "extractor", ",", "final", "stream", "partitioner", "<", "?", "super", "k", ",", "?", "super", "v", ">", "partitioner", ",", "final", "string", "parent", "names", ")", "{", "internal", "topology", "builder", "add", "sink", "(", "name", ",", "topic", "extractor", ",", "null", ",", "null", ",", "partitioner", ",", "parent", "names", ")", ";", "return", "this", ";", "}" ]
[ "tests", "that", "allow", "values", "sets", "its", "default", "value", "when", "the", "user", "doesn", "'", "t", "provide", "a", "value", "and", "the", "flag", "'", "s", "default", "value", "is", "disallowed" ]
[ "public", "void", "test", "allow", "values", "sets", "new", "default", "when", "flag", "default", "is", "disallowed", "(", ")", "throws", "exception", "{", "invocation", "policy", "builder", "invocation", "policy", "builder", "=", "invocation", "policy", "new", "builder", "(", ")", ";", "invocation", "policy", "builder", "add", "flag", "policies", "builder", "(", ")", "set", "flag", "name", "(", "\"", "test", "string", "\"", ")", "get", "allow", "values", "builder", "(", ")", "/", "/", "default", "value", "from", "flag", "'", "s", "definition", "is", "not", "allowed", "add", "allowed", "values", "(", "allowed", "value", "1", ")", "add", "allowed", "values", "(", "allowed", "value", "2", ")", "set", "new", "value", "(", "\"", "new", "default", "\"", ")", ";", "invocation", "policy", "enforcer", "enforcer", "=", "create", "options", "policy", "enforcer", "(", "invocation", "policy", "builder", ")", ";", "/", "/", "option", "should", "be", "its", "default", "test", "options", "test", "options", "=", "get", "test", "options", "(", ")", ";", "assert", "that", "(", "test", "options", "test", "string", ")", "is", "equal", "to", "(", "test", "options", "test", "string", "default", ")", ";", "enforcer", "enforce", "(", "parser", ",", "build", "command", ")", ";", "/", "/", "flag", "'", "s", "value", "should", "be", "the", "default", "value", "from", "the", "policy", "test", "options", "=", "get", "test", "options", "(", ")", ";", "assert", "that", "(", "test", "options", "test", "string", ")", "is", "equal", "to", "(", "\"", "new", "default", "\"", ")", ";", "}" ]
[ "windows", "this", "{", "@", "code", "keyed", "stream", "}", "into", "tumbling", "time", "windows", "this", "is", "a", "shortcut", "for", "either", "{", "@", "code", "window", "(", "tumbling", "event", "time", "windows", "of", "(", "size", ")", ")", "}", "or", "{", "@", "code", "window", "(", "tumbling", "processing", "time", "windows", "of", "(", "size", ")", ")", "}", "depending", "on", "the", "time", "characteristic", "set", "using", "{", "@", "link", "org", "apache", "flink", "streaming", "api", "environment", "stream", "execution", "environment", "#", "set", "stream", "time", "characteristic", "(", "org", "apache", "flink", "streaming", "api", "time", "characteristic", ")", "}" ]
[ "public", "windowed", "stream", "<", "t", ",", "key", ",", "time", "window", ">", "time", "window", "(", "time", "size", ")", "{", "if", "(", "environment", "get", "stream", "time", "characteristic", "(", ")", "=", "=", "time", "characteristic", "processing", "time", ")", "{", "return", "window", "(", "tumbling", "processing", "time", "windows", "of", "(", "size", ")", ")", ";", "}", "else", "{", "return", "window", "(", "tumbling", "event", "time", "windows", "of", "(", "size", ")", ")", ";", "}", "}" ]
[ "returns", "the", "first", "module", "that", "is", "an", "instance", "of", "a", "given", "class", "or", "interface" ]
[ "public", "<", "t", ">", "t", "get", "blaze", "module", "(", "class", "<", "t", ">", "module", "class", ")", "{", "for", "(", "blaze", "module", "module", ":", "blaze", "modules", ")", "{", "if", "(", "module", "class", "is", "instance", "(", "module", ")", ")", "{", "return", "(", "t", ")", "module", ";", "}", "}", "return", "null", ";", "}" ]
[ "try", "to", "match", "an", "octal", "literal", ",", "following", "the", "optional", "sign", "and", "prefix" ]
[ "protected", "collection", "<", "assembly", "parse", "numeric", "token", ">", "match", "oct", "(", "int", "s", ",", "string", "buffer", ",", "int", "pos", ",", "boolean", "neg", ",", "assembly", "grammar", "grammar", ")", "{", "int", "b", "=", "s", ";", "while", "(", "b", "<", "buffer", "length", "(", ")", ")", "{", "char", "c", "=", "buffer", "char", "at", "(", "b", ")", ";", "if", "(", "'", "0", "'", "<", "=", "c", "&", "&", "c", "<", "=", "'", "7", "'", ")", "{", "b", "+", "+", ";", "continue", ";", "}", "break", ";", "}", "if", "(", "b", "=", "=", "s", ")", "{", "/", "/", "then", "the", "entire", "token", "is", "just", "0", "return", "make", "token", "(", "buffer", "substring", "(", "pos", ",", "b", ")", ",", "\"", "0", "\"", ",", "8", ",", "neg", ",", "grammar", ")", ";", "}", "return", "make", "token", "(", "buffer", "substring", "(", "pos", ",", "b", ")", ",", "buffer", "substring", "(", "s", ",", "b", ")", ",", "8", ",", "neg", ",", "grammar", ")", ";", "}" ]
[ "returns", "a", "set", "of", "diagnostic", "stack", "traces", "for", "any", "deadlocked", "threads", "if", "no", "threads", "are", "deadlocked", ",", "returns", "an", "empty", "set" ]
[ "public", "set", "<", "string", ">", "get", "deadlocked", "threads", "(", ")", "{", "final", "long", "[", "]", "ids", "=", "threads", "find", "deadlocked", "threads", "(", ")", ";", "if", "(", "ids", "!", "=", "null", ")", "{", "final", "set", "<", "string", ">", "deadlocks", "=", "new", "hash", "set", "<", ">", "(", ")", ";", "for", "(", "thread", "info", "info", ":", "threads", "get", "thread", "info", "(", "ids", ",", "max", "stack", "trace", "depth", ")", ")", "{", "final", "string", "builder", "stack", "trace", "=", "new", "string", "builder", "(", ")", ";", "for", "(", "stack", "trace", "element", "element", ":", "info", "get", "stack", "trace", "(", ")", ")", "{", "stack", "trace", "append", "(", "\"", "\\", "t", "at", "\"", ")", "append", "(", "element", "to", "string", "(", ")", ")", "append", "(", "string", "format", "(", "\"", "%", "n", "\"", ")", ")", ";", "}", "deadlocks", "add", "(", "string", "format", "(", "\"", "%", "s", "locked", "on", "%", "s", "(", "owned", "by", "%", "s", ")", ":", "%", "n", "%", "s", "\"", ",", "info", "get", "thread", "name", "(", ")", ",", "info", "get", "lock", "name", "(", ")", ",", "info", "get", "lock", "owner", "name", "(", ")", ",", "stack", "trace", "to", "string", "(", ")", ")", ")", ";", "}", "return", "collections", "unmodifiable", "set", "(", "deadlocks", ")", ";", "}", "return", "collections", "empty", "set", "(", ")", ";", "}" ]
[ "close", "the", "given", "connection", ",", "obtained", "from", "the", "given", "data", "source", ",", "if", "it", "is", "not", "managed", "externally", "(", "that", "is", ",", "not", "bound", "to", "the", "thread", ")" ]
[ "public", "static", "void", "release", "connection", "(", "@", "nullable", "connection", "con", ",", "@", "nullable", "data", "source", "data", "source", ")", "{", "try", "{", "do", "release", "connection", "(", "con", ",", "data", "source", ")", ";", "}", "catch", "(", "s", "q", "l", "exception", "ex", ")", "{", "logger", "debug", "(", "\"", "could", "not", "close", "jdbc", "connection", "\"", ",", "ex", ")", ";", "}", "catch", "(", "throwable", "ex", ")", "{", "logger", "debug", "(", "\"", "unexpected", "exception", "on", "closing", "jdbc", "connection", "\"", ",", "ex", ")", ";", "}", "}" ]
[ "bytes", "left", "in", "stream" ]
[ "public", "synchronized", "long", "remaining", "in", "file", "(", ")", "{", "return", "this", "content", "length", "-", "this", "pos", ";", "}" ]
[ "write", "new", "policy", "file", "to", "policy", "out", "stream", "which", "will", "include", "read", "access", "to", "localize", "resources", "optionally", "a", "default", "policy", "file", "path", "can", "be", "specified", "to", "append", "a", "custom", "policy", "implementation", "to", "the", "new", "policy", "file" ]
[ "static", "void", "generate", "policy", "file", "(", "output", "stream", "policy", "out", "stream", ",", "list", "<", "string", ">", "local", "dirs", ",", "list", "<", "string", ">", "group", "policy", "paths", ",", "map", "<", "org", "apache", "hadoop", "fs", "path", ",", "list", "<", "string", ">", ">", "resources", ",", "configuration", "conf", ")", "throws", "i", "o", "exception", "{", "string", "policy", "file", "path", "=", "conf", "get", "(", "yarn", "configuration", "yarn", "container", "sandbox", "policy", ")", ";", "string", "file", "permissions", "=", "conf", "get", "(", "yarn", "configuration", "yarn", "container", "sandbox", "file", "permissions", ",", "yarn", "configuration", "default", "yarn", "container", "sandbox", "file", "permissions", ")", ";", "set", "<", "string", ">", "cache", "dirs", "=", "new", "hash", "set", "<", ">", "(", ")", ";", "for", "(", "org", "apache", "hadoop", "fs", "path", "path", ":", "resources", "key", "set", "(", ")", ")", "{", "cache", "dirs", "add", "(", "path", "get", "parent", "(", ")", "to", "string", "(", ")", ")", ";", "}", "if", "(", "group", "policy", "paths", "!", "=", "null", ")", "{", "for", "(", "string", "policy", "path", ":", "group", "policy", "paths", ")", "{", "files", "copy", "(", "paths", "get", "(", "policy", "path", ")", ",", "policy", "out", "stream", ")", ";", "}", "}", "else", "if", "(", "policy", "file", "path", "=", "=", "null", ")", "{", "i", "o", "utils", "copy", "bytes", "(", "n", "m", "container", "policy", "utils", "class", "get", "resource", "as", "stream", "(", "\"", "/", "\"", "+", "policy", "file", ")", ",", "policy", "out", "stream", ",", "conf", ",", "false", ")", ";", "}", "else", "{", "files", "copy", "(", "paths", "get", "(", "policy", "file", "path", ")", ",", "policy", "out", "stream", ")", ";", "}", "formatter", "file", "permission", "format", "=", "new", "formatter", "(", "policy", "out", "stream", ",", "standard", "charsets", "utf", "8", "name", "(", ")", ")", ";", "file", "permission", "format", "format", "(", "hadoop", "home", "permission", ")", ";", "file", "permission", "format", "format", "(", "\"", "grant", "{", "%", "n", "\"", ")", ";", "for", "(", "string", "local", "dir", ":", "local", "dirs", ")", "{", "file", "permission", "format", "format", "(", "file", "permission", "format", ",", "local", "dir", ",", "file", "permissions", ")", ";", "}", "for", "(", "string", "cache", "dir", ":", "cache", "dirs", ")", "{", "file", "permission", "format", "format", "(", "file", "permission", "format", ",", "cache", "dir", ",", "file", "permissions", ")", ";", "}", "file", "permission", "format", "format", "(", "\"", "}", ";", "%", "n", "\"", ")", ";", "file", "permission", "format", "flush", "(", ")", ";", "}" ]
[ "returns", "a", "reader", "for", "reading", "this", "file", "as", "characters", "@", "throw", "gdx", "runtime", "exception", "if", "the", "file", "handle", "represents", "a", "directory", ",", "doesn", "'", "t", "exist", ",", "or", "could", "not", "be", "read" ]
[ "public", "reader", "reader", "(", ")", "{", "throw", "new", "gdx", "runtime", "exception", "(", "\"", "stub", "\"", ")", ";", "}" ]
[ "returns", "the", "offset", "of", "the", "first", "byte", "within", "the", "backing", "byte", "array", "of", "this", "buffer" ]
[ "int", "array", "offset", "(", ")", ";" ]
[ "updates", "saved", "options", "from", "an", "old", "name", "to", "a", "new", "name", "note", ":", "this", "must", "be", "called", "before", "any", "calls", "to", "register", "or", "get", "options" ]
[ "public", "void", "register", "options", "name", "change", "(", "string", "old", "name", ",", "string", "new", "name", ")", "{", "options", "mgr", "register", "option", "name", "changed", "(", "old", "name", ",", "new", "name", ")", ";", "}" ]
[ "get", "the", "rough", "measure", "of", "the", "number", "of", "buckets", "a", "fixed", "-", "bucket", "{", "@", "link", "aggregator", "}", "will", "collect" ]
[ "public", "abstract", "cardinality", "upper", "bound", "multiply", "(", "int", "bucket", "count", ")", ";" ]
[ "deepest", "recursion", "before", "giving", "up", "and", "doing", "a", "heapsort", "returns", "2", "ceil", "(", "log", "(", "n", ")", ")" ]
[ "protected", "static", "int", "get", "max", "depth", "(", "int", "x", ")", "{", "if", "(", "x", "<", "=", "0", ")", "{", "throw", "new", "illegal", "argument", "exception", "(", "\"", "undefined", "for", "\"", "+", "x", ")", ";", "}", "return", "(", "32", "-", "integer", "number", "of", "leading", "zeros", "(", "x", "-", "1", ")", ")", "<", "<", "2", ";", "}" ]
[ "add", "a", "signature", "to", "a", "request" ]
[ "public", "static", "void", "add", "to", "request", "(", "secret", "key", "key", ",", "byte", "[", "]", "request", "body", ",", "string", "signature", "algorithm", ",", "request", "request", ")", "{", "mac", "mac", ";", "try", "{", "mac", "=", "mac", "(", "signature", "algorithm", ")", ";", "}", "catch", "(", "no", "such", "algorithm", "exception", "e", ")", "{", "throw", "new", "connect", "exception", "(", "e", ")", ";", "}", "byte", "[", "]", "request", "signature", "=", "sign", "(", "mac", ",", "key", ",", "request", "body", ")", ";", "request", "header", "(", "internal", "request", "signature", "signature", "header", ",", "base", "6", "4", "get", "encoder", "(", ")", "encode", "to", "string", "(", "request", "signature", ")", ")", "header", "(", "internal", "request", "signature", "signature", "algorithm", "header", ",", "signature", "algorithm", ")", ";", "}" ]
[ "gets", "the", "end", "timestamp", "of", "this", "window", "the", "end", "timestamp", "is", "exclusive", ",", "meaning", "it", "is", "the", "first", "timestamp", "that", "does", "not", "belong", "to", "this", "window", "any", "more" ]
[ "public", "long", "get", "end", "(", ")", "{", "return", "end", ";", "}" ]
[ "copy", "and", "create", "all", "necessary", "files", "under", "the", "working", "directory", "of", "the", "test" ]
[ "void", "setup", "(", "black", "box", "test", "context", "context", ")", "throws", "i", "o", "exception", ";" ]
[ "add", "a", "{", "@", "code", "runnable", "}", "task", "to", "be", "triggered", "at", "the", "given", "fixed", "-", "rate", "interval" ]
[ "public", "void", "add", "fixed", "rate", "task", "(", "runnable", "task", ",", "long", "interval", ")", "{", "add", "fixed", "rate", "task", "(", "new", "interval", "task", "(", "task", ",", "interval", ",", "0", ")", ")", ";", "}" ]
[ "select", "the", "accept", "header", "'", "s", "value", "from", "the", "given", "accepts", "array", ":", "if", "json", "exists", "in", "the", "given", "array", ",", "use", "it", ";", "otherwise", "use", "all", "of", "them", "(", "joining", "into", "a", "string", ")" ]
[ "public", "string", "select", "header", "accept", "(", "string", "[", "]", "accepts", ")", "{", "if", "(", "accepts", "length", "=", "=", "0", ")", "{", "return", "null", ";", "}", "for", "(", "string", "accept", ":", "accepts", ")", "{", "if", "(", "is", "json", "mime", "(", "accept", ")", ")", "{", "return", "accept", ";", "}", "}", "return", "string", "util", "join", "(", "accepts", ",", "\"", ",", "\"", ")", ";", "}" ]
[ "reads", "the", "guid", "index", "that", "the", "reader", "is", "positioned", "at" ]
[ "protected", "int", "read", "guid", "index", "(", "binary", "reader", "reader", ")", "throws", "i", "o", "exception", "{", "return", "metadata", "stream", "get", "guid", "index", "data", "type", "(", ")", "=", "=", "d", "word", "data", "type", "data", "type", "?", "reader", "read", "next", "int", "(", ")", ":", "reader", "read", "next", "short", "(", ")", "&", "0xffff", ";", "}" ]
[ "returns", "the", "number", "of", "ad", "groups", "in", "the", "period" ]
[ "public", "int", "get", "ad", "group", "count", "(", ")", "{", "return", "ad", "playback", "state", "ad", "group", "count", ";", "}" ]
[ "test", "the", "property", "'", "property", "'" ]
[ "public", "void", "property", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "property", "}" ]
[ "checks", "to", "make", "sure", "the", "given", "file", "contains", "only", "valid", "characters", "in", "its", "name" ]
[ "static", "void", "check", "valid", "filename", "(", "file", "curr", "file", ")", "throws", "invalid", "input", "exception", "{", "boolean", "is", "dir", "=", "curr", "file", "is", "directory", "(", ")", ";", "string", "filename", "=", "curr", "file", "get", "name", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "filename", "length", "(", ")", ";", "i", "+", "+", ")", "{", "char", "c", "=", "filename", "char", "at", "(", "i", ")", ";", "if", "(", "!", "local", "file", "system", "is", "valid", "name", "character", "(", "c", ")", ")", "{", "if", "(", "is", "dir", ")", "{", "throw", "new", "invalid", "input", "exception", "(", "\"", "the", "directory", "'", "\"", "+", "filename", "+", "\"", "'", "contains", "the", "invalid", "characgter", ":", "\\", "'", "\"", "+", "c", "+", "\"", "\\", "'", "and", "can", "not", "be", "created", "in", "the", "project", "(", "full", "path", ":", "\"", "+", "curr", "file", "get", "absolute", "path", "(", ")", "+", "\"", ")", "to", "allow", "successful", "import", "of", "the", "directory", "and", "its", "contents", ",", "please", "rename", "the", "directory", "\"", ")", ";", "}", "throw", "new", "invalid", "input", "exception", "(", "\"", "the", "file", "'", "\"", "+", "filename", "+", "\"", "'", "contains", "the", "invalid", "character", ":", "\\", "'", "\"", "+", "c", "+", "\"", "\\", "'", "and", "can", "not", "be", "imported", "(", "full", "path", ":", "\"", "+", "curr", "file", "get", "absolute", "path", "(", ")", "+", "\"", ")", "please", "rename", "the", "file", "\"", ")", ";", "}", "}", "}" ]