docstring_tokens
list
code_tokens
list
[ "parses", "{", "@", "link", "icy", "headers", "}", "from", "response", "headers" ]
[ "public", "static", "icy", "headers", "parse", "(", "map", "<", "string", ",", "list", "<", "string", ">", ">", "response", "headers", ")", "{", "boolean", "icy", "headers", "present", "=", "false", ";", "int", "bitrate", "=", "format", "no", "value", ";", "string", "genre", "=", "null", ";", "string", "name", "=", "null", ";", "string", "url", "=", "null", ";", "boolean", "is", "public", "=", "false", ";", "int", "metadata", "interval", "=", "c", "length", "unset", ";", "list", "<", "string", ">", "headers", "=", "response", "headers", "get", "(", "response", "header", "bitrate", ")", ";", "if", "(", "headers", "!", "=", "null", ")", "{", "string", "bitrate", "header", "=", "headers", "get", "(", "0", ")", ";", "try", "{", "bitrate", "=", "integer", "parse", "int", "(", "bitrate", "header", ")", "*", "1000", ";", "if", "(", "bitrate", ">", "0", ")", "{", "icy", "headers", "present", "=", "true", ";", "}", "else", "{", "log", "w", "(", "tag", ",", "\"", "invalid", "bitrate", ":", "\"", "+", "bitrate", "header", ")", ";", "bitrate", "=", "format", "no", "value", ";", "}", "}", "catch", "(", "number", "format", "exception", "e", ")", "{", "log", "w", "(", "tag", ",", "\"", "invalid", "bitrate", "header", ":", "\"", "+", "bitrate", "header", ")", ";", "}", "}", "headers", "=", "response", "headers", "get", "(", "response", "header", "genre", ")", ";", "if", "(", "headers", "!", "=", "null", ")", "{", "genre", "=", "headers", "get", "(", "0", ")", ";", "icy", "headers", "present", "=", "true", ";", "}", "headers", "=", "response", "headers", "get", "(", "response", "header", "name", ")", ";", "if", "(", "headers", "!", "=", "null", ")", "{", "name", "=", "headers", "get", "(", "0", ")", ";", "icy", "headers", "present", "=", "true", ";", "}", "headers", "=", "response", "headers", "get", "(", "response", "header", "url", ")", ";", "if", "(", "headers", "!", "=", "null", ")", "{", "url", "=", "headers", "get", "(", "0", ")", ";", "icy", "headers", "present", "=", "true", ";", "}", "headers", "=", "response", "headers", "get", "(", "response", "header", "pub", ")", ";", "if", "(", "headers", "!", "=", "null", ")", "{", "is", "public", "=", "headers", "get", "(", "0", ")", "equals", "(", "\"", "1", "\"", ")", ";", "icy", "headers", "present", "=", "true", ";", "}", "headers", "=", "response", "headers", "get", "(", "response", "header", "metadata", "interval", ")", ";", "if", "(", "headers", "!", "=", "null", ")", "{", "string", "metadata", "interval", "header", "=", "headers", "get", "(", "0", ")", ";", "try", "{", "metadata", "interval", "=", "integer", "parse", "int", "(", "metadata", "interval", "header", ")", ";", "if", "(", "metadata", "interval", ">", "0", ")", "{", "icy", "headers", "present", "=", "true", ";", "}", "else", "{", "log", "w", "(", "tag", ",", "\"", "invalid", "metadata", "interval", ":", "\"", "+", "metadata", "interval", "header", ")", ";", "metadata", "interval", "=", "c", "length", "unset", ";", "}", "}", "catch", "(", "number", "format", "exception", "e", ")", "{", "log", "w", "(", "tag", ",", "\"", "invalid", "metadata", "interval", ":", "\"", "+", "metadata", "interval", "header", ")", ";", "}", "}", "return", "icy", "headers", "present", "?", "new", "icy", "headers", "(", "bitrate", ",", "genre", ",", "name", ",", "url", ",", "is", "public", ",", "metadata", "interval", ")", ":", "null", ";", "}" ]
[ "test", "the", "property", "'", "date", "time", "'" ]
[ "public", "void", "date", "time", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "date", "time", "}" ]
[ "get", "a", "string", "representation", "of", "the", "actual", "contents", ",", "displaying", "also", "a", "header", "and", "ellipses", "when", "there", "was", "a", "truncate" ]
[ "public", "string", "to", "string", "(", ")", "{", "if", "(", "messages", "length", "(", ")", "<", "total", "character", "count", ")", "{", "return", "string", "format", "(", "truncated", "messages", "template", ",", "messages", "length", "(", ")", ",", "total", "character", "count", ",", "messages", "to", "string", "(", ")", ")", ";", "}", "return", "messages", "to", "string", "(", ")", ";", "}" ]
[ "restoring", "a", "snapshot", "that", "contains", "multiple", "files", "must", "succeed", "even", "when", "some", "files", "already", "exist", "in", "the", "shard", "'", "s", "store" ]
[ "public", "void", "test", "restore", "snapshot", "with", "existing", "files", "(", ")", "throws", "i", "o", "exception", "{", "final", "index", "id", "index", "id", "=", "new", "index", "id", "(", "random", "alpha", "of", "length", "(", "10", ")", ",", "u", "u", "i", "ds", "random", "base", "6", "4", "u", "u", "i", "d", "(", ")", ")", ";", "final", "shard", "id", "shard", "id", "=", "new", "shard", "id", "(", "index", "id", "get", "name", "(", ")", ",", "index", "id", "get", "id", "(", ")", ",", "0", ")", ";", "index", "shard", "shard", "=", "new", "shard", "(", "shard", "id", ",", "true", ")", ";", "try", "{", "/", "/", "index", "documents", "in", "the", "shards", "final", "int", "num", "docs", "=", "scaled", "random", "int", "between", "(", "1", ",", "500", ")", ";", "recover", "shard", "from", "store", "(", "shard", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "num", "docs", ";", "i", "+", "+", ")", "{", "index", "doc", "(", "shard", ",", "\"", "doc", "\"", ",", "integer", "to", "string", "(", "i", ")", ")", ";", "if", "(", "rarely", "(", ")", ")", "{", "flush", "shard", "(", "shard", ",", "false", ")", ";", "}", "}", "assert", "doc", "count", "(", "shard", ",", "num", "docs", ")", ";", "/", "/", "snapshot", "the", "shard", "final", "repository", "repository", "=", "create", "repository", "(", ")", ";", "final", "snapshot", "snapshot", "=", "new", "snapshot", "(", "repository", "get", "metadata", "(", ")", "name", "(", ")", ",", "new", "snapshot", "id", "(", "random", "alpha", "of", "length", "(", "10", ")", ",", "\"", "uuid", "\"", ")", ")", ";", "snapshot", "shard", "(", "shard", ",", "snapshot", ",", "repository", ")", ";", "/", "/", "capture", "current", "store", "files", "final", "store", "metadata", "snapshot", "store", "files", "=", "shard", "snapshot", "store", "metadata", "(", ")", ";", "assert", "false", "(", "store", "files", "as", "map", "(", ")", "is", "empty", "(", ")", ")", ";", "/", "/", "close", "the", "shard", "close", "shards", "(", "shard", ")", ";", "/", "/", "delete", "some", "random", "files", "in", "the", "store", "list", "<", "string", ">", "deleted", "files", "=", "random", "subset", "of", "(", "random", "int", "between", "(", "1", ",", "store", "files", "size", "(", ")", "-", "1", ")", ",", "store", "files", "as", "map", "(", ")", "key", "set", "(", ")", ")", ";", "for", "(", "string", "deleted", "file", ":", "deleted", "files", ")", "{", "files", "delete", "(", "shard", "shard", "path", "(", ")", "resolve", "index", "(", ")", "resolve", "(", "deleted", "file", ")", ")", ";", "}", "/", "/", "build", "a", "new", "shard", "using", "the", "same", "store", "directory", "as", "the", "closed", "shard", "shard", "routing", "shard", "routing", "=", "shard", "routing", "helper", "init", "with", "same", "id", "(", "shard", "routing", "entry", "(", ")", ",", "recovery", "source", "existing", "store", "recovery", "source", "instance", ")", ";", "shard", "=", "new", "shard", "(", "shard", "routing", ",", "shard", "shard", "path", "(", ")", ",", "shard", "index", "settings", "(", ")", "get", "index", "metadata", "(", ")", ",", "null", ",", "null", ",", "new", "internal", "engine", "factory", "(", ")", ",", "(", ")", "-", ">", "{", "}", ",", "retention", "lease", "syncer", "empty", ",", "empty", "event", "listener", ")", ";", "/", "/", "restore", "the", "shard", "recover", "shard", "from", "snapshot", "(", "shard", ",", "snapshot", ",", "repository", ")", ";", "/", "/", "check", "that", "the", "shard", "is", "not", "corrupted", "test", "util", "check", "index", "(", "shard", "store", "(", ")", "directory", "(", ")", ")", ";", "/", "/", "check", "that", "all", "files", "have", "been", "restored", "final", "directory", "directory", "=", "shard", "store", "(", ")", "directory", "(", ")", ";", "final", "list", "<", "string", ">", "directory", "files", "=", "arrays", "as", "list", "(", "directory", "list", "all", "(", ")", ")", ";", "for", "(", "store", "file", "metadata", "store", "file", ":", "store", "files", ")", "{", "string", "file", "name", "=", "store", "file", "name", "(", ")", ";", "assert", "true", "(", "\"", "file", "[", "\"", "+", "file", "name", "+", "\"", "]", "does", "not", "exist", "in", "store", "directory", "\"", ",", "directory", "files", "contains", "(", "file", "name", ")", ")", ";", "assert", "equals", "(", "store", "file", "length", "(", ")", ",", "shard", "store", "(", ")", "directory", "(", ")", "file", "length", "(", "file", "name", ")", ")", ";", "}", "}", "finally", "{", "if", "(", "shard", "!", "=", "null", "&", "&", "shard", "state", "(", ")", "!", "=", "index", "shard", "state", "closed", ")", "{", "try", "{", "shard", "close", "(", "\"", "test", "\"", ",", "false", ")", ";", "}", "finally", "{", "i", "o", "utils", "close", "(", "shard", "store", "(", ")", ")", ";", "}", "}", "}", "}" ]
[ "return", "an", "id", "for", "the", "current", "underlying", "session" ]
[ "string", "get", "session", "id", "(", ")", ";" ]
[ "shortens", "a", "supplied", "string", "so", "that", "it", "fits", "within", "the", "area", "specified", "by", "the", "width", "argument", "strings", "that", "have", "been", "shorted", "have", "an", "\"", "\"", "attached", "to", "the", "end", "of", "the", "string", "the", "width", "is", "computed", "using", "the", "{", "@", "link", "org", "eclipse", "swt", "graphics", "gc", "#", "string", "extent", "(", "string", ")", "}", "<", "p", ">", "text", "shorten", "removed", "due", "to", "awful", "algorithm", "(", "it", "works", "really", "slow", "on", "long", "strings", ")", "todo", ":", "make", "something", "better" ]
[ "public", "static", "string", "get", "short", "string", "(", "font", "metrics", "font", "metrics", ",", "string", "t", ",", "int", "width", ")", "{", "/", "/", "return", "t", ";", "if", "(", "common", "utils", "is", "empty", "(", "t", ")", ")", "{", "return", "t", ";", "}", "if", "(", "width", "<", "=", "1", ")", "{", "return", "\"", "\"", ";", "/", "/", "$", "non", "-", "nls", "-", "1", "$", "}", "double", "avg", "char", "width", "=", "font", "metrics", "get", "average", "char", "width", "(", ")", ";", "double", "length", "=", "t", "length", "(", ")", ";", "if", "(", "width", "<", "length", "*", "avg", "char", "width", ")", "{", "length", "=", "(", "float", ")", "width", "/", "avg", "char", "width", ";", "length", "*", "=", "2", ";", "/", "/", "in", "case", "of", "big", "number", "of", "narrow", "characters", "if", "(", "length", "<", "t", "length", "(", ")", ")", "{", "t", "=", "t", "substring", "(", "0", ",", "(", "int", ")", "length", ")", ";", "/", "/", "return", "get", "short", "text", "(", "gc", ",", "t", ",", "width", ")", ";", "}", "}", "return", "t", ";", "}" ]
[ "performs", "the", "checkout", "step", "see", "{", "@", "link", "#", "pre", "checkout", "(", "abstract", "build", ",", "launcher", ",", "build", "listener", ")", "}", "for", "the", "semantics", "of", "the", "parameters" ]
[ "public", "void", "checkout", "(", "abstract", "build", "execution", "execution", ")", "throws", "i", "o", "exception", ",", "interrupted", "exception", "{", "execution", "default", "checkout", "(", ")", ";", "}" ]
[ "print", "a", "big", "banner", "in", "the", "test", "log", "to", "make", "debug", "easier" ]
[ "static", "void", "banner", "(", "string", "string", ")", "{", "log", "info", "(", "\"", "\\", "n", "\\", "n", "\\", "n", "\\", "n", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "\\", "n", "\"", "+", "string", "+", "\"", "\\", "n", "\"", "+", "\"", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "\\", "n", "\\", "n", "\"", ")", ";", "}" ]
[ "specify", "the", "set", "of", "handlers", "that", "this", "exception", "resolver", "should", "apply", "to", "the", "exception", "mappings", "and", "the", "default", "error", "view", "will", "only", "apply", "to", "the", "specified", "handlers", "if", "no", "handlers", "or", "handler", "classes", "are", "set", ",", "the", "exception", "mappings", "and", "the", "default", "error", "view", "will", "apply", "to", "all", "handlers", "this", "means", "that", "a", "specified", "default", "error", "view", "will", "be", "used", "as", "a", "fallback", "for", "all", "exceptions", ";", "any", "further", "handler", "exception", "resolvers", "in", "the", "chain", "will", "be", "ignored", "in", "this", "case" ]
[ "public", "void", "set", "mapped", "handlers", "(", "set", "<", "?", ">", "mapped", "handlers", ")", "{", "this", "mapped", "handlers", "=", "mapped", "handlers", ";", "}" ]
[ "hook", "for", "subclasses", "to", "validate", "a", "build", "request", "before", "building", "begins", "implementors", "should", "print", "warnings", "for", "invalid", "targets", "iff", "keep", "going" ]
[ "void", "validate", "targets", "(", "collection", "<", "target", ">", "targets", ",", "boolean", "keep", "going", ")", "throws", "loading", "failed", "exception", ";" ]
[ "convenience", "method", "to", "apply", "{", "@", "link", "#", "encode", "(", "string", ",", "charset", ")", "}", "to", "all", "given", "uri", "variable", "values" ]
[ "public", "static", "object", "[", "]", "encode", "uri", "variables", "(", "object", "uri", "variables", ")", "{", "return", "arrays", "stream", "(", "uri", "variables", ")", "map", "(", "value", "-", ">", "{", "string", "string", "value", "=", "(", "value", "!", "=", "null", "?", "value", "to", "string", "(", ")", ":", "\"", "\"", ")", ";", "return", "encode", "(", "string", "value", ",", "standard", "charsets", "utf", "8", ")", ";", "}", ")", "to", "array", "(", ")", ";", "}" ]
[ "enables", "integrating", "hamcrest", "matchers", "that", "match", "primitive", "<", "code", ">", "short", "<", "code", ">", "arguments", "note", "that", "{", "@", "link", "#", "arg", "that", "}", "will", "not", "work", "with", "primitive", "<", "code", ">", "short", "<", "code", ">", "matchers", "due", "to", "<", "code", ">", "null", "pointer", "exception", "<", "code", ">", "auto", "-", "unboxing", "caveat", "<", "p", ">", "see", "examples", "in", "javadoc", "for", "{", "@", "link", "mockito", "hamcrest", "}", "class" ]
[ "public", "static", "short", "short", "that", "(", "matcher", "<", "short", ">", "matcher", ")", "{", "report", "matcher", "(", "matcher", ")", ";", "return", "0", ";", "}" ]
[ "primarily", "invoked", "from", "{", "@", "link", "proc", "starter", "#", "start", "(", ")", "}", "to", "start", "a", "process", "with", "a", "specific", "launcher" ]
[ "public", "abstract", "proc", "launch", "(", "@", "non", "null", "proc", "starter", "starter", ")", "throws", "i", "o", "exception", ";" ]
[ "test", "that", "creates", "new", "smoothing", "model", "from", "a", "random", "test", "smoothing", "model", "and", "checks", "both", "for", "equality" ]
[ "public", "void", "test", "from", "x", "content", "(", ")", "throws", "i", "o", "exception", "{", "smoothing", "model", "test", "model", "=", "create", "test", "model", "(", ")", ";", "x", "content", "builder", "content", "builder", "=", "x", "content", "factory", "content", "builder", "(", "random", "from", "(", "x", "content", "type", "values", "(", ")", ")", ")", ";", "if", "(", "random", "boolean", "(", ")", ")", "{", "content", "builder", "pretty", "print", "(", ")", ";", "}", "content", "builder", "start", "object", "(", ")", ";", "test", "model", "inner", "to", "x", "content", "(", "content", "builder", ",", "to", "x", "content", "empty", "params", ")", ";", "content", "builder", "end", "object", "(", ")", ";", "try", "(", "x", "content", "parser", "parser", "=", "create", "parser", "(", "shuffle", "x", "content", "(", "content", "builder", ")", ")", ")", "{", "parser", "next", "token", "(", ")", ";", "/", "/", "go", "to", "start", "token", ",", "real", "parsing", "would", "do", "that", "in", "the", "outer", "element", "parser", "smoothing", "model", "parsed", "model", "=", "from", "x", "content", "(", "parser", ")", ";", "assert", "not", "same", "(", "test", "model", ",", "parsed", "model", ")", ";", "assert", "equals", "(", "test", "model", ",", "parsed", "model", ")", ";", "assert", "equals", "(", "test", "model", "hash", "code", "(", ")", ",", "parsed", "model", "hash", "code", "(", ")", ")", ";", "}", "}" ]
[ "any", "comments", "associated", "with", "the", "declaration", "<", "code", ">", "optional", "string", "comment", "=", "2", ";", "<", "code", ">" ]
[ "public", "java", "lang", "string", "get", "comment", "(", ")", "{", "return", "comment", ";", "}" ]
[ "clears", "the", "playlist", "and", "adds", "the", "specified", "{", "@", "link", "media", "item", "media", "items", "}" ]
[ "void", "set", "media", "items", "(", "list", "<", "media", "item", ">", "media", "items", ",", "int", "start", "window", "index", ",", "long", "start", "position", "ms", ")", ";" ]
[ "returns", "the", "text", "to", "parse", "the", "query", "from" ]
[ "public", "string", "value", "(", ")", "{", "return", "this", "query", "text", ";", "}" ]
[ "check", "if", "dfs", "remains", "in", "proper", "condition", "after", "a", "restart" ]
[ "public", "void", "test", "restart", "dfs", "with", "flush", "(", ")", "throws", "exception", "{", "test", "restart", "dfs", "(", "true", ")", ";", "}" ]
[ "get", "the", "current", "state", "of", "the", "router" ]
[ "string", "get", "router", "status", "(", ")", ";" ]
[ "verify", "random", "rack", "node", "selection", "for", "remote", "client" ]
[ "public", "void", "test", "random", "rack", "selection", "for", "remote", "client", "(", ")", "throws", "exception", "{", "string", "client", "machine", "=", "\"", "client", "foo", "com", "\"", ";", "/", "/", "don", "'", "t", "map", "client", "machine", "to", "any", "rack", ",", "/", "/", "so", "by", "default", "it", "will", "be", "treated", "as", "/", "default", "-", "rack", "/", "/", "in", "that", "case", "a", "random", "node", "should", "be", "selected", "as", "first", "node", "test", "placement", "(", "client", "machine", ",", "null", ",", "true", ")", ";", "}" ]
[ "fails", "this", "future", "with", "the", "given", "throwable", "if", "{", "@", "link", "#", "all", "must", "succeed", "}", "is", "true", "also", ",", "logs", "the", "throwable", "if", "it", "is", "an", "{", "@", "link", "error", "}", "or", "if", "{", "@", "link", "#", "all", "must", "succeed", "}", "is", "{", "@", "code", "true", "}", ",", "the", "throwable", "did", "not", "cause", "this", "future", "to", "fail", ",", "and", "it", "is", "the", "first", "time", "we", "'", "ve", "seen", "that", "particular", "throwable" ]
[ "private", "void", "handle", "exception", "(", "throwable", "throwable", ")", "{", "check", "not", "null", "(", "throwable", ")", ";", "if", "(", "all", "must", "succeed", ")", "{", "/", "/", "as", "soon", "as", "the", "first", "one", "fails", ",", "make", "that", "failure", "the", "result", "of", "the", "output", "future", "/", "/", "the", "results", "of", "all", "other", "inputs", "are", "then", "ignored", "(", "except", "for", "logging", "any", "failures", ")", "boolean", "completed", "with", "failure", "=", "set", "exception", "(", "throwable", ")", ";", "if", "(", "!", "completed", "with", "failure", ")", "{", "/", "/", "go", "up", "the", "causal", "chain", "to", "see", "if", "we", "'", "ve", "already", "seen", "this", "cause", ";", "if", "we", "have", ",", "even", "if", "/", "/", "it", "'", "s", "wrapped", "by", "a", "different", "exception", ",", "don", "'", "t", "log", "it", "boolean", "first", "time", "seeing", "this", "exception", "=", "add", "causal", "chain", "(", "get", "or", "init", "seen", "exceptions", "(", ")", ",", "throwable", ")", ";", "if", "(", "first", "time", "seeing", "this", "exception", ")", "{", "log", "(", "throwable", ")", ";", "return", ";", "}", "}", "}", "/", "*", "*", "todo", "(", "cpovirk", ")", ":", "should", "when", "all", "complete", "(", ")", "call", "*", "(", ")", "log", "errors", ",", "too", "?", "currently", ",", "it", "doesn", "'", "t", "call", "*", "handle", "exception", "(", ")", "at", "all", "*", "/", "if", "(", "throwable", "instanceof", "error", ")", "{", "/", "*", "*", "todo", "(", "cpovirk", ")", ":", "do", "we", "really", "want", "to", "log", "this", "if", "we", "called", "set", "exception", "(", "throwable", ")", "and", "it", "*", "returned", "true", "?", "this", "was", "intentional", "(", "cl", "46470009", ")", ",", "but", "it", "seems", "odd", "compared", "to", "how", "we", "*", "normally", "handle", "error", "*", "*", "similarly", ",", "do", "we", "really", "want", "to", "log", "the", "same", "error", "more", "than", "once", "?", "*", "/", "log", "(", "throwable", ")", ";", "}", "}" ]
[ "find", "purchase", "order", "by", "id", "for", "valid", "response", "try", "integer", "i", "ds", "with", "value", "&", "lt", ";", "&", "#", "x", "3", "d", ";", "5", "or", "&", "gt", ";", "10", "other", "values", "will", "generated", "exceptions" ]
[ "public", "void", "get", "order", "by", "id", "test", "(", "test", "context", "test", "context", ")", "{", "async", "async", "=", "test", "context", "async", "(", ")", ";", "long", "order", "id", "=", "null", ";", "api", "get", "order", "by", "id", "(", "order", "id", ",", "result", "-", ">", "{", "/", "/", "todo", ":", "test", "validations", "async", "complete", "(", ")", ";", "}", ")", ";", "}" ]
[ "test", "the", "property", "'", "double", "'" ]
[ "public", "void", "double", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "double", "}" ]
[ "add", "multifactor", "authentication", "providers" ]
[ "default", "void", "add", "multifactor", "authentication", "providers", "(", "final", "multifactor", "authentication", "provider", "providers", ")", "{", "add", "multifactor", "authentication", "providers", "(", "arrays", "stream", "(", "providers", ")", "collect", "(", "collectors", "to", "list", "(", ")", ")", ")", ";", "}" ]
[ "put", "parcelable", "in", "cache" ]
[ "public", "static", "void", "put", "(", "@", "non", "null", "final", "string", "key", ",", "final", "parcelable", "value", ",", "final", "int", "save", "time", ",", "@", "non", "null", "final", "cache", "double", "utils", "cache", "double", "utils", ")", "{", "cache", "double", "utils", "put", "(", "key", ",", "value", ",", "save", "time", ")", ";", "}" ]
[ "returns", "a", "collection", "of", "uri", "futures", "corresponding", "to", "in", "-", "flight", "file", "uploads", "the", "files", "here", "are", "considered", "\"", "remote", "\"", "in", "that", "they", "may", "not", "correspond", "to", "on", "-", "disk", "files" ]
[ "default", "collection", "<", "listenable", "future", "<", "string", ">", ">", "remote", "uploads", "(", ")", "{", "return", "immutable", "list", "of", "(", ")", ";", "}" ]
[ "find", "the", "fields", "constant", "that", "matches", "field", "id", ",", "throwing", "an", "exception", "if", "it", "is", "not", "found" ]
[ "public", "static", "fields", "find", "by", "thrift", "id", "or", "throw", "(", "int", "field", "id", ")", "{", "fields", "fields", "=", "find", "by", "thrift", "id", "(", "field", "id", ")", ";", "if", "(", "fields", "=", "=", "null", ")", "throw", "new", "illegal", "argument", "exception", "(", "\"", "field", "\"", "+", "field", "id", "+", "\"", "doesn", "'", "t", "exist", "!", "\"", ")", ";", "return", "fields", ";", "}" ]
[ "closes", "all", "resources", "used" ]
[ "public", "void", "close", "(", ")", "throws", "i", "o", "exception", "{", "if", "(", "result", "set", "=", "=", "null", ")", "{", "return", ";", "}", "try", "{", "result", "set", "close", "(", ")", ";", "}", "catch", "(", "s", "q", "l", "exception", "se", ")", "{", "log", "info", "(", "\"", "inputformat", "result", "set", "couldn", "'", "t", "be", "closed", "-", "\"", "+", "se", "get", "message", "(", ")", ")", ";", "}", "}" ]
[ "returns", "the", "operation", "result", "or", "a", "{", "@", "code", "throwable", "}", "if", "the", "{", "@", "code", "completable", "future", "}", "finished", ",", "otherwise", "{", "@", "code", "null", "}" ]
[ "public", "either", "<", "throwable", ",", "r", ">", "get", "(", "final", "k", "operation", "key", ")", "throws", "unknown", "operation", "key", "exception", "{", "result", "access", "tracker", "<", "r", ">", "result", "access", "tracker", ";", "if", "(", "(", "result", "access", "tracker", "=", "registered", "operation", "triggers", "get", "(", "operation", "key", ")", ")", "=", "=", "null", "&", "&", "(", "result", "access", "tracker", "=", "completed", "operations", "get", "if", "present", "(", "operation", "key", ")", ")", "=", "=", "null", ")", "{", "throw", "new", "unknown", "operation", "key", "exception", "(", "operation", "key", ")", ";", "}", "return", "result", "access", "tracker", "access", "operation", "result", "or", "error", "(", ")", ";", "}" ]
[ "attempts", "to", "record", "the", "given", "key", "as", "the", "canonical", "invocation", "for", "its", "descriptor", "and", "the", "passed", "-", "in", "trimmed", "configuration", "the", "trimmed", "configuration", "must", "be", "a", "subset", "of", "the", "input", "key", "'", "s", "configuration", "otherwise", ",", "{", "@", "link", "illegal", "argument", "exception", "}", "will", "be", "thrown", "if", "another", "key", "matching", "this", "configuration", "is", "found", ",", "that", "key", "will", "be", "returned", "that", "key", "represents", "the", "canonical", "invocation", ",", "which", "should", "produce", "the", "same", "result", "as", "the", "input", "key", "it", "may", "have", "been", "previously", "invalidated", ",", "but", "will", "be", "considered", "revalidated", "at", "this", "point", "otherwise", ",", "if", "the", "input", "key", "is", "the", "first", "to", "trim", "to", "this", "configuration", ",", "the", "input", "key", "is", "returned" ]
[ "public", "key", "t", "put", "if", "absent", "(", "key", "t", "canonical", "key", ",", "configuration", "t", "trimmed", "configuration", ")", "{", "configuration", "t", "full", "configuration", "=", "get", "configuration", "for", "(", "canonical", "key", ")", ";", "preconditions", "check", "argument", "(", "compare", "configurations", "(", "trimmed", "configuration", ",", "full", "configuration", ")", "is", "subset", "or", "equal", "(", ")", ")", ";", "concurrent", "hash", "map", "<", "configuration", "t", ",", "key", "and", "state", "<", "key", "t", ">", ">", "trimmings", "of", "descriptor", "=", "descriptors", "compute", "if", "absent", "(", "get", "descriptor", "for", "(", "canonical", "key", ")", ",", "unused", "-", ">", "new", "descriptor", "map", "(", ")", ")", ";", "key", "and", "state", "<", "key", "t", ">", "current", "mapping", "=", "trimmings", "of", "descriptor", "compute", "(", "trimmed", "configuration", ",", "(", "configuration", ",", "current", "value", ")", "-", ">", "{", "if", "(", "current", "value", "=", "=", "null", ")", "{", "return", "key", "and", "state", "create", "(", "canonical", "key", ")", ";", "}", "else", "{", "return", "current", "value", "as", "validated", "(", ")", ";", "}", "}", ")", ";", "boolean", "newly", "added", "=", "current", "mapping", "get", "key", "(", ")", "equals", "(", "canonical", "key", ")", ";", "int", "failed", "removes", ";", "do", "{", "failed", "removes", "=", "0", ";", "for", "(", "entry", "<", "configuration", "t", ",", "key", "and", "state", "<", "key", "t", ">", ">", "entry", ":", "trimmings", "of", "descriptor", "entry", "set", "(", ")", ")", "{", "if", "(", "entry", "get", "value", "(", ")", "get", "state", "(", ")", "equals", "(", "key", "and", "state", "state", "possibly", "invalid", ")", ")", "{", "/", "/", "remove", "invalidated", "keys", "where", ":", "/", "/", "*", "the", "same", "key", "evaluated", "to", "a", "different", "configuration", "than", "it", "does", "now", "/", "/", "*", "(", "for", "trimmed", "configurations", "not", "yet", "seen", ")", "the", "new", "trimmed", "configuration", "has", "equal", "/", "/", "values", "for", "every", "fragment", "it", "shares", "with", "the", "old", "configuration", "(", "including", "subsets", "/", "/", "or", "supersets", ")", "/", "/", "these", "are", "keys", "we", "know", "will", "not", "be", "revalidated", "as", "part", "of", "the", "current", "build", "/", "/", "although", "it", "also", "ensures", "that", "we", "don", "'", "t", "remove", "the", "entry", "we", "just", "added", ",", "the", "check", "for", "/", "/", "invalidation", "is", "mainly", "to", "avoid", "wasting", "time", "checking", "entries", "that", "are", "still", "valid", "for", "/", "/", "the", "current", "build", "and", "therefore", "will", "not", "match", "either", "of", "these", "properties", "if", "(", "entry", "get", "value", "(", ")", "get", "key", "(", ")", "equals", "(", "canonical", "key", ")", "|", "|", "(", "newly", "added", "&", "&", "compare", "configurations", "(", "trimmed", "configuration", ",", "entry", "get", "key", "(", ")", ")", "has", "equal", "shared", "fragments", "(", ")", ")", ")", "{", "if", "(", "!", "trimmings", "of", "descriptor", "remove", "(", "entry", "get", "key", "(", ")", ",", "entry", "get", "value", "(", ")", ")", ")", "{", "/", "/", "it", "'", "s", "possible", "that", "this", "entry", "was", "removed", "by", "another", "thread", "in", "the", "meantime", "failed", "removes", "+", "=", "1", ";", "}", "}", "}", "}", "}", "while", "(", "failed", "removes", ">", "0", ")", ";", "return", "current", "mapping", "get", "key", "(", ")", ";", "}" ]
[ "deserialize", "and", "create", "a", "instance", "of", "health", "checker" ]
[ "public", "static", "abstract", "health", "checker", "deserialize", "(", "string", "json", "string", ")", "{", "try", "{", "return", "mapper", "read", "value", "(", "json", "string", ",", "abstract", "health", "checker", "class", ")", ";", "}", "catch", "(", "i", "o", "exception", "e", ")", "{", "throw", "new", "nacos", "deserialization", "exception", "(", "abstract", "health", "checker", "class", ",", "e", ")", ";", "}", "}" ]
[ "allows", "declaring", "the", "method", "to", "stub", "see", "{", "@", "link", "mockito", "#", "when", "(", "object", ")", "}", "needed", "for", "classic", "stubbing", "with", "when", "(", ")", "then", "(", ")" ]
[ "<", "t", ">", "ongoing", "stubbing", "<", "t", ">", "when", "(", "t", "method", "call", ")", ";" ]
[ "sets", "the", "tooltip", "for", "the", "ok", "button" ]
[ "protected", "void", "set", "ok", "tool", "tip", "(", "string", "tooltip", ")", "{", "if", "(", "ok", "button", "!", "=", "null", ")", "{", "ok", "button", "set", "tool", "tip", "text", "(", "tooltip", ")", ";", "}", "}" ]
[ "static", "utility", "to", "parse", "a", "field", "of", "type", "long", "from", "a", "byte", "sequence", "that", "represents", "text", "characters", "(", "such", "as", "when", "read", "from", "a", "file", "stream", ")" ]
[ "public", "static", "final", "long", "parse", "field", "(", "byte", "[", "]", "bytes", ",", "int", "start", "pos", ",", "int", "length", ",", "char", "delimiter", ")", "{", "long", "val", "=", "0", ";", "boolean", "neg", "=", "false", ";", "if", "(", "bytes", "[", "start", "pos", "]", "=", "=", "delimiter", ")", "{", "throw", "new", "number", "format", "exception", "(", "\"", "empty", "field", "\"", ")", ";", "}", "if", "(", "bytes", "[", "start", "pos", "]", "=", "=", "'", "-", "'", ")", "{", "neg", "=", "true", ";", "start", "pos", "+", "+", ";", "length", "-", "-", ";", "if", "(", "length", "=", "=", "0", "|", "|", "bytes", "[", "start", "pos", "]", "=", "=", "delimiter", ")", "{", "throw", "new", "number", "format", "exception", "(", "\"", "orphaned", "minus", "sign", "\"", ")", ";", "}", "}", "for", "(", ";", "length", ">", "0", ";", "start", "pos", "+", "+", ",", "length", "-", "-", ")", "{", "if", "(", "bytes", "[", "start", "pos", "]", "=", "=", "delimiter", ")", "{", "return", "neg", "?", "-", "val", ":", "val", ";", "}", "if", "(", "bytes", "[", "start", "pos", "]", "<", "48", "|", "|", "bytes", "[", "start", "pos", "]", ">", "57", ")", "{", "throw", "new", "number", "format", "exception", "(", "\"", "invalid", "character", "\"", ")", ";", "}", "val", "*", "=", "10", ";", "val", "+", "=", "bytes", "[", "start", "pos", "]", "-", "48", ";", "/", "/", "check", "for", "overflow", "/", "underflow", "if", "(", "val", "<", "0", ")", "{", "/", "/", "this", "is", "an", "overflow", "/", "underflow", ",", "unless", "we", "hit", "exactly", "the", "long", "min", "value", "if", "(", "neg", "&", "&", "val", "=", "=", "long", "min", "value", ")", "{", "if", "(", "length", "=", "=", "1", "|", "|", "bytes", "[", "start", "pos", "+", "1", "]", "=", "=", "delimiter", ")", "{", "return", "long", "min", "value", ";", "}", "else", "{", "throw", "new", "number", "format", "exception", "(", "\"", "value", "overflow", "\"", ")", ";", "}", "}", "else", "{", "throw", "new", "number", "format", "exception", "(", "\"", "value", "overflow", "\"", ")", ";", "}", "}", "}", "return", "neg", "?", "-", "val", ":", "val", ";", "}" ]
[ "sets", "request", "message" ]
[ "public", "void", "set", "request", "message", "(", "rpc", "message", "request", "message", ")", "{", "this", "request", "message", "=", "request", "message", ";", "}" ]
[ "date", "and", "time", "of", "change" ]
[ "del", "$", "datetime", "(", "string", "datetime", ")", ";" ]
[ "returns", "if", "the", "document", "is", "found", "always", "<", "code", ">", "true", "<", "code", ">", "for", "artificial", "documents" ]
[ "public", "boolean", "get", "found", "(", ")", "{", "return", "found", ";", "}" ]
[ "invoked", "when", "an", "exception", "that", "is", "mapped", "to", "this", "handler", "occurs", "during", "routing" ]
[ "void", "handle", "(", "t", "exception", ",", "request", "request", ",", "response", "response", ")", ";" ]
[ "async", "client", "-", "streaming", "example", "sends", "{", "@", "code", "num", "points", "}", "randomly", "chosen", "points", "from", "{", "@", "code", "features", "}", "with", "a", "variable", "delay", "in", "between", "prints", "the", "statistics", "when", "they", "are", "sent", "from", "the", "server" ]
[ "private", "string", "record", "route", "(", "list", "<", "point", ">", "points", ",", "int", "num", "points", ",", "route", "guide", "stub", "async", "stub", ")", "throws", "interrupted", "exception", ",", "runtime", "exception", "{", "final", "string", "buffer", "logs", "=", "new", "string", "buffer", "(", ")", ";", "append", "logs", "(", "logs", ",", "\"", "*", "*", "*", "record", "route", "\"", ")", ";", "final", "count", "down", "latch", "finish", "latch", "=", "new", "count", "down", "latch", "(", "1", ")", ";", "stream", "observer", "<", "route", "summary", ">", "response", "observer", "=", "new", "stream", "observer", "<", "route", "summary", ">", "(", ")", "{", "@", "override", "public", "void", "on", "next", "(", "route", "summary", "summary", ")", "{", "append", "logs", "(", "logs", ",", "\"", "finished", "trip", "with", "{", "0", "}", "points", "passed", "{", "1", "}", "features", "\"", "+", "\"", "travelled", "{", "2", "}", "meters", "it", "took", "{", "3", "}", "seconds", "\"", ",", "summary", "get", "point", "count", "(", ")", ",", "summary", "get", "feature", "count", "(", ")", ",", "summary", "get", "distance", "(", ")", ",", "summary", "get", "elapsed", "time", "(", ")", ")", ";", "}", "@", "override", "public", "void", "on", "error", "(", "throwable", "t", ")", "{", "failed", "=", "t", ";", "finish", "latch", "count", "down", "(", ")", ";", "}", "@", "override", "public", "void", "on", "completed", "(", ")", "{", "append", "logs", "(", "logs", ",", "\"", "finished", "record", "route", "\"", ")", ";", "finish", "latch", "count", "down", "(", ")", ";", "}", "}", ";", "stream", "observer", "<", "point", ">", "request", "observer", "=", "async", "stub", "record", "route", "(", "response", "observer", ")", ";", "try", "{", "/", "/", "send", "num", "points", "points", "randomly", "selected", "from", "the", "points", "list", "random", "rand", "=", "new", "random", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "num", "points", ";", "+", "+", "i", ")", "{", "int", "index", "=", "rand", "next", "int", "(", "points", "size", "(", ")", ")", ";", "point", "point", "=", "points", "get", "(", "index", ")", ";", "append", "logs", "(", "logs", ",", "\"", "visiting", "point", "{", "0", "}", ",", "{", "1", "}", "\"", ",", "route", "guide", "util", "get", "latitude", "(", "point", ")", ",", "route", "guide", "util", "get", "longitude", "(", "point", ")", ")", ";", "request", "observer", "on", "next", "(", "point", ")", ";", "/", "/", "sleep", "for", "a", "bit", "before", "sending", "the", "next", "one", "thread", "sleep", "(", "rand", "next", "int", "(", "1000", ")", "+", "500", ")", ";", "if", "(", "finish", "latch", "get", "count", "(", ")", "=", "=", "0", ")", "{", "/", "/", "rpc", "completed", "or", "errored", "before", "we", "finished", "sending", "/", "/", "sending", "further", "requests", "won", "'", "t", "error", ",", "but", "they", "will", "just", "be", "thrown", "away", "break", ";", "}", "}", "}", "catch", "(", "runtime", "exception", "e", ")", "{", "/", "/", "cancel", "rpc", "request", "observer", "on", "error", "(", "e", ")", ";", "throw", "e", ";", "}", "/", "/", "mark", "the", "end", "of", "requests", "request", "observer", "on", "completed", "(", ")", ";", "/", "/", "receiving", "happens", "asynchronously", "if", "(", "!", "finish", "latch", "await", "(", "1", ",", "time", "unit", "minutes", ")", ")", "{", "throw", "new", "runtime", "exception", "(", "\"", "could", "not", "finish", "rpc", "within", "1", "minute", ",", "the", "server", "is", "likely", "down", "\"", ")", ";", "}", "if", "(", "failed", "!", "=", "null", ")", "{", "throw", "new", "runtime", "exception", "(", "failed", ")", ";", "}", "return", "logs", "to", "string", "(", ")", ";", "}" ]
[ "appends", "the", "given", "label", "with", "the", "given", "old", "offset" ]
[ "public", "void", "append", "label", "(", "int", "old", "instruction", "offset", ")", "{", "if", "(", "debug", ")", "{", "println", "(", "\"", "[", "\"", "+", "code", "length", "+", "\"", "]", "<", "-", "\"", ",", "\"", "[", "\"", "+", "old", "instruction", "offset", "+", "\"", "]", "(", "label", ")", "\"", ")", ";", "}", "/", "/", "make", "sure", "the", "code", "and", "offset", "arrays", "are", "large", "enough", "ensure", "code", "length", "(", "code", "length", "+", "1", ")", ";", "/", "/", "remember", "the", "old", "offset", "of", "the", "following", "instruction", "old", "instruction", "offsets", "[", "code", "length", "]", "=", "old", "instruction", "offset", ";", "/", "/", "fill", "out", "the", "new", "offset", "of", "the", "following", "instruction", "instruction", "offset", "map", "[", "level", "]", "[", "old", "instruction", "offset", "]", "=", "code", "length", ";", "}" ]
[ "sets", "the", "id", "of", "the", "audio", "session", "to", "attach", "to", "the", "underlying", "{", "@", "link", "android", "media", "audio", "track", "}", "the", "audio", "session", "id", "can", "be", "generated", "using", "{", "@", "link", "c", "#", "generate", "audio", "session", "id", "v", "2", "1", "(", "context", ")", "}", "for", "api", "21", "+" ]
[ "void", "set", "audio", "session", "id", "(", "int", "audio", "session", "id", ")", ";" ]
[ "get", "the", "paths", "value" ]
[ "public", "list", "<", "list", "result", "entry", "schema", ">", "paths", "(", ")", "{", "return", "this", "paths", ";", "}" ]
[ "if", "key", "provided", "matches", "that", "of", "this", "composite", ",", "give", "join", "collector", "iterator", "over", "values", "it", "may", "emit" ]
[ "public", "void", "accept", "(", "composite", "record", "reader", "join", "collector", "jc", ",", "k", "key", ")", "throws", "i", "o", "exception", ",", "interrupted", "exception", "{", "if", "(", "has", "next", "(", ")", "&", "&", "0", "=", "=", "cmp", "compare", "(", "key", ",", "key", "(", ")", ")", ")", "{", "fill", "join", "collector", "(", "create", "key", "(", ")", ")", ";", "jc", "add", "(", "id", ",", "get", "delegate", "(", ")", ")", ";", "return", ";", "}", "jc", "add", "(", "id", ",", "empty", ")", ";", "}" ]
[ "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", "\"", ")", ";", "}" ]
[ "computes", "the", "checksum", "with", "the", "given", "options" ]
[ "public", "void", "update", "checksum", "(", "memory", "memory", ",", "address", "set", "view", "addr", "set", ",", "task", "monitor", "monitor", ",", "boolean", "ones", "comp", ",", "boolean", "twos", "comp", ")", "throws", "memory", "access", "exception", ",", "cancelled", "exception", "{", "byte", "[", "]", "bytes", "=", "new", "byte", "[", "1024", "]", ";", "long", "crc", ";", "try", "(", "checked", "input", "stream", "cis", "=", "new", "checked", "input", "stream", "(", "new", "memory", "input", "stream", "(", "memory", ",", "addr", "set", ")", ",", "new", "crc32", "(", ")", ")", ")", "{", "while", "(", "cis", "read", "(", "bytes", ")", ">", "0", ")", "{", "if", "(", "monitor", "is", "cancelled", "(", ")", ")", "{", "throw", "new", "cancelled", "exception", "(", ")", ";", "}", "}", "crc", "=", "cis", "get", "checksum", "(", ")", "get", "value", "(", ")", ";", "}", "catch", "(", "i", "o", "exception", "e", ")", "{", "throw", "new", "memory", "access", "exception", "(", "e", "get", "message", "(", ")", ")", ";", "}", "if", "(", "ones", "comp", ")", "{", "crc", "=", "~", "crc", ";", "}", "else", "if", "(", "twos", "comp", ")", "{", "crc", "=", "-", "crc", ";", "}", "checksum", "=", "to", "array", "(", "crc", ",", "4", ")", ";", "}" ]
[ "create", "a", "proxy", "user", "ugi", "for", "testing", "hdfs", "and", "map", "reduce" ]
[ "public", "static", "user", "group", "information", "create", "proxy", "user", "for", "testing", "(", "string", "user", ",", "user", "group", "information", "real", "user", ",", "string", "[", "]", "user", "groups", ")", "{", "ensure", "initialized", "(", ")", ";", "user", "group", "information", "ugi", "=", "create", "proxy", "user", "(", "user", ",", "real", "user", ")", ";", "/", "/", "make", "sure", "that", "the", "testing", "object", "is", "setup", "if", "(", "!", "(", "groups", "instanceof", "testing", "groups", ")", ")", "{", "groups", "=", "new", "testing", "groups", "(", "groups", ")", ";", "}", "/", "/", "add", "the", "user", "groups", "(", "(", "testing", "groups", ")", "groups", ")", "set", "user", "groups", "(", "ugi", "get", "short", "user", "name", "(", ")", ",", "user", "groups", ")", ";", "return", "ugi", ";", "}" ]
[ "combine", "from", "other", "{", "@", "link", "profile", "stack", "node", "}" ]
[ "public", "profile", "stack", "node", "combine", "(", "profile", "stack", "node", "node", ")", "{", "/", "/", "combine", "this", "node", "this", "combine", "detected", "stacks", "(", "node", ")", ";", "/", "/", "merge", "tree", "using", "ldr", "to", "traversal", "tree", "node", "/", "/", "using", "stack", "to", "avoid", "recursion", "/", "/", "merge", "key", "children", "<", "-", "value", "children", "linked", "list", "<", "pair", "<", "profile", "stack", "node", ",", "profile", "stack", "node", ">", ">", "stack", "=", "new", "linked", "list", "<", ">", "(", ")", ";", "stack", "add", "(", "new", "pair", "<", ">", "(", "this", ",", "node", ")", ")", ";", "while", "(", "!", "stack", "is", "empty", "(", ")", ")", "{", "pair", "<", "profile", "stack", "node", ",", "profile", "stack", "node", ">", "need", "combine", "node", "=", "stack", "pop", "(", ")", ";", "/", "/", "merge", "value", "children", "to", "key", "/", "/", "add", "to", "stack", "if", "need", "to", "keep", "traversal", "combine", "children", "nodes", "(", "need", "combine", "node", "key", ",", "need", "combine", "node", "value", ",", "stack", ":", ":", "add", ")", ";", "}", "return", "this", ";", "}" ]
[ "api", "to", "store", "value", "against", "a", "key", "in", "the", "calling", "thread", "scope" ]
[ "public", "void", "put", "(", "object", "key", ",", "object", "value", ")", "{", "store", "put", "(", "key", ",", "value", ")", ";", "}" ]
[ "if", "child", "is", "not", "done", ",", "removes", "{", "@", "code", "in", "progress", "parent", "}", "from", "{", "@", "code", "child", "}", "'", "s", "reverse", "deps", "returns", "whether", "child", "should", "be", "removed", "from", "in", "progress", "parent", "'", "s", "entry", "'", "s", "direct", "deps" ]
[ "private", "static", "boolean", "remove", "incomplete", "child", "for", "cycle", "(", "sky", "key", "in", "progress", "parent", ",", "sky", "key", "child", ",", "parallel", "evaluator", "context", "evaluator", "context", ")", "throws", "interrupted", "exception", "{", "node", "entry", "child", "entry", "=", "evaluator", "context", "get", "graph", "(", ")", "get", "(", "in", "progress", "parent", ",", "reason", "cycle", "checking", ",", "child", ")", ";", "if", "(", "!", "is", "done", "for", "build", "(", "child", "entry", ")", ")", "{", "child", "entry", "remove", "in", "progress", "reverse", "dep", "(", "in", "progress", "parent", ")", ";", "return", "true", ";", "}", "return", "false", ";", "}" ]
[ "sets", "the", "content", "type", "header", "for", "the", "http", "response" ]
[ "private", "static", "void", "set", "content", "type", "header", "(", "http", "response", "response", ",", "file", "file", ")", "{", "mimetypes", "file", "type", "map", "mime", "types", "map", "=", "new", "mimetypes", "file", "type", "map", "(", ")", ";", "response", "headers", "(", ")", "set", "(", "http", "header", "names", "content", "type", ",", "mime", "types", "map", "get", "content", "type", "(", "file", "get", "path", "(", ")", ")", ")", ";", "}" ]
[ "write", "file", "from", "bytes", "by", "map" ]
[ "public", "static", "boolean", "write", "file", "from", "bytes", "by", "map", "(", "final", "file", "file", ",", "final", "byte", "[", "]", "bytes", ",", "final", "boolean", "is", "force", ")", "{", "return", "write", "file", "from", "bytes", "by", "map", "(", "file", ",", "bytes", ",", "false", ",", "is", "force", ")", ";", "}" ]
[ "returns", "size", "value", "of", "divider", "height", "for", "horizontal", "divider", ",", "width", "for", "vertical", "divider" ]
[ "int", "divider", "size", "(", "int", "position", ",", "recycler", "view", "parent", ")", ";" ]
[ "sets", "the", "table", "column", "comparator", "to", "use", "for", "sorting", "the", "data", "this", "method", "can", "be", "called", "on", "the", "currently", "running", "job", "as", "well", "as", "the", "pending", "job", "if", "called", "on", "the", "running", "job", ",", "the", "effect", "depends", "on", "the", "running", "job", "'", "s", "state", ":", "if", "the", "sort", "state", "hasn", "'", "t", "happened", "yet", ",", "all", "it", "does", "is", "set", "the", "comparator", "for", "when", "the", "sort", "occurs", "if", "the", "sort", "state", "has", "already", "been", "started", "or", "completed", ",", "then", "this", "method", "attempts", "to", "stop", "the", "current", "process", "phase", "and", "cause", "the", "state", "machine", "to", "return", "to", "the", "sort", "phase", "if", "the", "current", "job", "has", "already", "entered", "the", "done", "state", ",", "then", "the", "sort", "cannot", "take", "effect", "in", "this", "job", "and", "a", "false", "value", "is", "returned", "to", "indicate", "the", "sort", "was", "not", "handled", "by", "this", "job" ]
[ "public", "synchronized", "boolean", "request", "sort", "(", "table", "sorting", "context", "<", "t", ">", "new", "sorting", "context", ",", "boolean", "force", "sort", ")", "{", "if", "(", "current", "state", "=", "=", "done", ")", "{", "return", "false", ";", "}", "this", "do", "force", "sort", "=", "force", "sort", ";", "this", "new", "sort", "context", "=", "new", "sorting", "context", ";", "if", "(", "has", "sorted", "(", ")", ")", "{", "/", "/", "the", "user", "has", "requested", "a", "new", "sort", ",", "and", "we", "'", "ve", "already", "sorted", ",", "so", "we", "need", "to", "sort", "again", "monitor", "cancel", "(", ")", ";", "pending", "requested", "state", "=", "sorting", ";", "}", "return", "true", ";", "}" ]
[ "handles", "the", "math", "query", "of", "the", "given", "table" ]
[ "protected", "<", "t", ">", "t", "math", "query", "(", "string", "table", "name", ",", "string", "[", "]", "columns", ",", "string", "[", "]", "conditions", ",", "class", "<", "t", ">", "type", ")", "{", "base", "utility", "check", "conditions", "correct", "(", "conditions", ")", ";", "cursor", "cursor", "=", "null", ";", "t", "result", "=", "null", ";", "try", "{", "cursor", "=", "m", "database", "query", "(", "table", "name", ",", "columns", ",", "get", "where", "clause", "(", "conditions", ")", ",", "get", "where", "args", "(", "conditions", ")", ",", "null", ",", "null", ",", "null", ")", ";", "if", "(", "cursor", "move", "to", "first", "(", ")", ")", "{", "class", "<", "?", ">", "cursor", "class", "=", "cursor", "get", "class", "(", ")", ";", "method", "method", "=", "cursor", "class", "get", "method", "(", "gen", "get", "column", "method", "(", "type", ")", ",", "int", "class", ")", ";", "result", "=", "(", "t", ")", "method", "invoke", "(", "cursor", ",", "0", ")", ";", "}", "}", "catch", "(", "exception", "e", ")", "{", "throw", "new", "lite", "pal", "support", "exception", "(", "e", "get", "message", "(", ")", ",", "e", ")", ";", "}", "finally", "{", "if", "(", "cursor", "!", "=", "null", ")", "{", "cursor", "close", "(", ")", ";", "}", "}", "return", "result", ";", "}" ]
[ "returns", "the", "{", "@", "link", "class", "}", "of", "the", "data", "that", "will", "be", "parsed", "from", "{", "@", "link", "byte", "buffer", "}", "s" ]
[ "class", "<", "t", ">", "get", "data", "class", "(", ")", ";" ]
[ "indicate", "whether", "external", "xml", "entities", "are", "processed", "when", "converting", "to", "a", "source", "default", "is", "{", "@", "code", "false", "}", ",", "meaning", "that", "external", "entities", "are", "not", "resolved", "note", ":", "setting", "this", "option", "to", "{", "@", "code", "true", "}", "also", "automatically", "sets", "{", "@", "link", "#", "set", "support", "dtd", "}", "to", "{", "@", "code", "true", "}" ]
[ "public", "void", "set", "process", "external", "entities", "(", "boolean", "process", "external", "entities", ")", "{", "this", "process", "external", "entities", "=", "process", "external", "entities", ";", "if", "(", "process", "external", "entities", ")", "{", "this", "support", "dtd", "=", "true", ";", "}", "}" ]
[ "get", "my", "number" ]
[ "public", "big", "decimal", "get", "my", "number", "(", ")", "{", "return", "my", "number", ";", "}" ]
[ "return", "true", "if", "the", "method", "does", "not", "include", "any", "of", "the", "{", "@", "code", "private", "}", ",", "{", "@", "code", "protected", "}", ",", "or", "{", "@", "code", "public", "}", "modifiers" ]
[ "public", "boolean", "is", "default", "access", "(", ")", "{", "return", "!", "is", "private", "(", ")", "&", "&", "!", "is", "protected", "(", ")", "&", "&", "!", "is", "public", "(", ")", ";", "}" ]
[ "this", "member", "gives", "the", "virtual", "address", "to", "which", "the", "system", "first", "transfers", "control", ",", "thus", "starting", "the", "process", "if", "the", "file", "has", "no", "associated", "entry", "point", ",", "this", "member", "holds", "zero" ]
[ "public", "long", "e", "entry", "(", ")", "{", "/", "/", "guard", "against", "adjustment", "of", "0", "/", "/", "todo", ":", "this", "might", "need", "to", "be", "re", "-", "thought", "if", "(", "e", "entry", "=", "=", "0", ")", "{", "return", "0", ";", "}", "return", "adjust", "address", "for", "prelink", "(", "e", "entry", ")", ";", "}" ]
[ "wraps", "a", "bulk", "loader", "that", "returns", "values", "in", "a", "map", "accessed", "by", "key" ]
[ "public", "static", "<", "key", ",", "value", ">", "coalescing", "bulkloader", "<", "key", ",", "value", ">", "by", "map", "(", "int", "max", "load", "size", ",", "long", "max", "delay", ",", "final", "function", "<", "stream", "<", "key", ">", ",", "completable", "future", "<", "map", "<", "key", ",", "value", ">", ">", ">", "load", ")", "{", "return", "new", "coalescing", "bulkloader", "<", ">", "(", "max", "load", "size", ",", "max", "delay", ",", "to", "load", "-", ">", "{", "final", "stream", "<", "key", ">", "keys", "=", "to", "load", "stream", "(", ")", "map", "(", "wk", "-", ">", "wk", "key", ")", ";", "load", "apply", "(", "keys", ")", "then", "accept", "(", "values", "-", ">", "{", "for", "(", "coalescing", "bulkloader", "<", "key", ",", "value", ">", "waiting", "key", "waiting", "key", ":", "to", "load", ")", "{", "if", "(", "values", "contains", "key", "(", "waiting", "key", "key", ")", ")", "waiting", "key", "future", "complete", "(", "values", "get", "(", "waiting", "key", "key", ")", ")", ";", "else", "waiting", "key", "future", "complete", "exceptionally", "(", "new", "no", "such", "element", "exception", "(", "\"", "no", "value", "for", "key", "\"", "+", "waiting", "key", "key", ")", ")", ";", "}", "}", ")", ";", "}", ")", ";", "}" ]
[ "registers", "a", "kv", "state", "instance", "for", "the", "given", "key", "group", "index" ]
[ "public", "void", "register", "kv", "state", "(", "key", "group", "range", "key", "group", "range", ",", "kv", "state", "i", "d", "kv", "state", "id", ",", "inet", "socket", "address", "kv", "state", "address", ")", "{", "if", "(", "key", "group", "range", "get", "start", "key", "group", "(", ")", "<", "0", "|", "|", "key", "group", "range", "get", "end", "key", "group", "(", ")", ">", "=", "num", "key", "groups", ")", "{", "throw", "new", "index", "out", "of", "bounds", "exception", "(", "\"", "key", "group", "index", "\"", ")", ";", "}", "for", "(", "int", "kg", "idx", "=", "key", "group", "range", "get", "start", "key", "group", "(", ")", ";", "kg", "idx", "<", "=", "key", "group", "range", "get", "end", "key", "group", "(", ")", ";", "+", "+", "kg", "idx", ")", "{", "if", "(", "kv", "state", "ids", "[", "kg", "idx", "]", "=", "=", "null", "&", "&", "kv", "state", "addresses", "[", "kg", "idx", "]", "=", "=", "null", ")", "{", "num", "registered", "key", "groups", "+", "+", ";", "}", "kv", "state", "ids", "[", "kg", "idx", "]", "=", "kv", "state", "id", ";", "kv", "state", "addresses", "[", "kg", "idx", "]", "=", "kv", "state", "address", ";", "}", "}" ]
[ "mangle", "a", "string", "so", "that", "it", "can", "be", "represented", "in", "an", "xml", "document", "there", "are", "three", "kinds", "of", "code", "points", "in", "xml", ":", "-", "those", "that", "can", "be", "represented", "normally", ",", "-", "those", "that", "have", "to", "be", "escaped", "(", "for", "example", ",", "&", "amp", ";", "must", "be", "represented", "as", "{", "@", "literal", "&", "amp", ";", "}", ")", "-", "those", "that", "cannot", "be", "represented", "at", "all", "in", "xml", "the", "built", "-", "in", "sax", "functions", "will", "handle", "the", "first", "two", "types", "for", "us", "just", "fine", "however", ",", "sometimes", "we", "come", "across", "a", "code", "point", "of", "the", "third", "type", "in", "this", "case", ",", "we", "have", "to", "mangle", "the", "string", "in", "order", "to", "represent", "it", "at", "all", "we", "also", "mangle", "backslash", "to", "avoid", "confusing", "a", "backslash", "in", "the", "string", "with", "part", "our", "escape", "sequence", "the", "encoding", "used", "here", "is", "as", "follows", ":", "an", "illegal", "code", "point", "is", "represented", "as", "'", "\\", "abcd", ";", "'", ",", "where", "abcd", "is", "the", "hexadecimal", "value", "of", "the", "code", "point" ]
[ "public", "static", "string", "mangle", "xml", "string", "(", "string", "str", ",", "boolean", "create", "entity", "refs", ")", "{", "final", "string", "builder", "bld", "=", "new", "string", "builder", "(", ")", ";", "final", "int", "length", "=", "str", "length", "(", ")", ";", "for", "(", "int", "offset", "=", "0", ";", "offset", "<", "length", ";", ")", "{", "final", "int", "cp", "=", "str", "code", "point", "at", "(", "offset", ")", ";", "final", "int", "len", "=", "character", "char", "count", "(", "cp", ")", ";", "if", "(", "code", "point", "must", "be", "mangled", "(", "cp", ")", ")", "{", "bld", "append", "(", "mangle", "code", "point", "(", "cp", ")", ")", ";", "}", "else", "{", "string", "entity", "ref", "=", "null", ";", "if", "(", "create", "entity", "refs", ")", "{", "entity", "ref", "=", "code", "point", "to", "entity", "ref", "(", "cp", ")", ";", "}", "if", "(", "entity", "ref", "!", "=", "null", ")", "{", "bld", "append", "(", "entity", "ref", ")", ";", "}", "else", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "len", ";", "i", "+", "+", ")", "{", "bld", "append", "(", "str", "char", "at", "(", "offset", "+", "i", ")", ")", ";", "}", "}", "}", "offset", "+", "=", "len", ";", "}", "return", "bld", "to", "string", "(", ")", ";", "}" ]
[ "call", "the", "callack", "and", "update", "prometheus", "gauge", "this", "method", "is", "called", "when", "the", "server", "is", "polling", "for", "a", "value" ]
[ "private", "void", "sample", "(", ")", "{", "number", "value", "=", "gauge", "get", "(", ")", ";", "this", "inner", "set", "(", "value", "!", "=", "null", "?", "value", "double", "value", "(", ")", ":", "0", ")", ";", "}" ]
[ "overrides", "the", "url", "that", "inbound", "tcp", "agents", "should", "connect", "to", "as", "advertised", "in", "the", "agent", "jnlp", "file", "if", "not", "set", ",", "the", "default", "behavior", "is", "unchanged", "and", "returns", "the", "root", "url", "this", "enables", "using", "a", "private", "address", "for", "inbound", "tcp", "agents", ",", "separate", "from", "jenkins", "root", "url" ]
[ "public", "static", "string", "get", "inbound", "agent", "url", "(", ")", "{", "string", "url", "=", "system", "properties", "get", "string", "(", "custom", "inbound", "url", "property", ")", ";", "if", "(", "url", "=", "=", "null", "|", "|", "url", "is", "empty", "(", ")", ")", "{", "return", "jenkins", "get", "(", ")", "get", "root", "url", "(", ")", ";", "}", "return", "url", ";", "}" ]
[ "test", "the", "property", "'", "prefix", "wrapped", "array", "'" ]
[ "public", "void", "prefix", "wrapped", "array", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "prefix", "wrapped", "array", "}" ]
[ "update", "original", "table", "statistics", "parameters" ]
[ "private", "void", "update", "stats", "(", "catalog", "table", "statistics", "new", "table", "stats", ",", "map", "<", "string", ",", "string", ">", "parameters", ")", "{", "parameters", "put", "(", "stats", "setup", "const", "row", "count", ",", "string", "value", "of", "(", "new", "table", "stats", "get", "row", "count", "(", ")", ")", ")", ";", "parameters", "put", "(", "stats", "setup", "const", "total", "size", ",", "string", "value", "of", "(", "new", "table", "stats", "get", "total", "size", "(", ")", ")", ")", ";", "parameters", "put", "(", "stats", "setup", "const", "num", "files", ",", "string", "value", "of", "(", "new", "table", "stats", "get", "file", "count", "(", ")", ")", ")", ";", "parameters", "put", "(", "stats", "setup", "const", "raw", "data", "size", ",", "string", "value", "of", "(", "new", "table", "stats", "get", "raw", "data", "size", "(", ")", ")", ")", ";", "}" ]
[ "gets", "the", "value", "at", "the", "{", "@", "code", "block", "}", "{", "@", "code", "position", "}", "as", "a", "slice" ]
[ "slice", "get", "slice", "(", "block", "block", ",", "int", "position", ")", ";" ]
[ "build", "a", "new", "meter", "object" ]
[ "public", "meter", "build", "(", ")", "{", "/", "/", "sort", "the", "tags", "this", "meter", "id", "get", "tags", "(", ")", "sort", "(", "meter", "tag", ":", ":", "compare", "to", ")", ";", "/", "/", "create", "or", "get", "the", "meter", "if", "(", "meter", "service", "=", "=", "null", ")", "{", "meter", "service", "=", "service", "manager", "instance", "find", "service", "(", "meter", "service", "class", ")", ";", "}", "final", "meter", "adapter", "=", "this", "create", "(", "meter", "id", ")", ";", "meter", "service", "register", "(", "adapter", ")", ";", "return", "(", "meter", ")", "adapter", ";", "}" ]
[ "describe", "the", "stage", "in", "the", "process", "with", "a", "box", "around", "it", "-", "so", "as", "to", "highlight", "it", "in", "test", "logs" ]
[ "public", "static", "void", "describe", "(", "logger", "log", ",", "string", "text", ",", "object", "args", ")", "{", "log", "info", "(", "\"", "\\", "n", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "\"", ")", ";", "log", "info", "(", "text", ",", "args", ")", ";", "log", "info", "(", "\"", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "=", "\\", "n", "\"", ")", ";", "}" ]
[ "a", "list", "of", "strings", "that", "are", "parsed", "into", "the", "options", "for", "the", "command" ]
[ "list", "<", "string", ">", "get", "command", "line", "for", "(", "string", "command", ",", "event", "handler", "event", "handler", ")", "throws", "abrupt", "exit", "exception", ";" ]
[ "returns", "the", "language", "of", "the", "script" ]
[ "public", "string", "get", "lang", "(", ")", "{", "return", "lang", ";", "}" ]
[ "add", "a", "attribute", "to", "this", "material", "if", "the", "material", "already", "contains", "an", "attribute", "of", "the", "same", "type", "it", "is", "overwritten" ]
[ "public", "final", "void", "set", "(", "final", "attribute", "attribute", ")", "{", "final", "int", "idx", "=", "index", "of", "(", "attribute", "type", ")", ";", "if", "(", "idx", "<", "0", ")", "{", "enable", "(", "attribute", "type", ")", ";", "attributes", "add", "(", "attribute", ")", ";", "sorted", "=", "false", ";", "}", "else", "{", "attributes", "set", "(", "idx", ",", "attribute", ")", ";", "}", "sort", "(", ")", ";", "/", "/", "fixme", ":", "see", "#", "4186", "}" ]
[ "add", "the", "given", "success", "callback", "to", "this", "registry" ]
[ "public", "void", "add", "success", "callback", "(", "success", "callback", "<", "?", "super", "t", ">", "callback", ")", "{", "assert", "not", "null", "(", "callback", ",", "\"", "'", "callback", "'", "must", "not", "be", "null", "\"", ")", ";", "synchronized", "(", "this", "mutex", ")", "{", "switch", "(", "this", "state", ")", "{", "case", "new", ":", "this", "success", "callbacks", "add", "(", "callback", ")", ";", "break", ";", "case", "success", ":", "notify", "success", "(", "callback", ")", ";", "break", ";", "}", "}", "}" ]
[ "auxiliary", "method", "to", "make", "sure", "that", "enough", "followers", "terminated" ]
[ "boolean", "wait", "for", "quorum", "(", "long", "id", ")", "throws", "interrupted", "exception", "{", "int", "loop", "counter", "=", "0", ";", "while", "(", "(", "quora", "get", "(", "id", ")", "size", "(", ")", "<", "=", "count", "/", "2", ")", "&", "&", "(", "loop", "counter", "<", "max", "loop", "counter", ")", ")", "{", "thread", "sleep", "(", "100", ")", ";", "loop", "counter", "+", "+", ";", "}", "return", "(", "loop", "counter", "<", "max", "loop", "counter", ")", "|", "|", "(", "quora", "get", "(", "id", ")", "size", "(", ")", ">", "count", "/", "2", ")", ";", "}" ]
[ "updated", "user", "this", "can", "only", "be", "done", "by", "the", "logged", "in", "user", "<", "b", ">", "400", "<", "b", ">", "-", "invalid", "user", "supplied", "<", "b", ">", "404", "<", "b", ">", "-", "user", "not", "found" ]
[ "public", "mono", "<", "void", ">", "update", "user", "(", "string", "username", ",", "user", "body", ")", "throws", "web", "client", "response", "exception", "{", "object", "post", "body", "=", "body", ";", "/", "/", "verify", "the", "required", "parameter", "'", "username", "'", "is", "set", "if", "(", "username", "=", "=", "null", ")", "{", "throw", "new", "web", "client", "response", "exception", "(", "\"", "missing", "the", "required", "parameter", "'", "username", "'", "when", "calling", "update", "user", "\"", ",", "http", "status", "bad", "request", "value", "(", ")", ",", "http", "status", "bad", "request", "get", "reason", "phrase", "(", ")", ",", "null", ",", "null", ",", "null", ")", ";", "}", "/", "/", "verify", "the", "required", "parameter", "'", "body", "'", "is", "set", "if", "(", "body", "=", "=", "null", ")", "{", "throw", "new", "web", "client", "response", "exception", "(", "\"", "missing", "the", "required", "parameter", "'", "body", "'", "when", "calling", "update", "user", "\"", ",", "http", "status", "bad", "request", "value", "(", ")", ",", "http", "status", "bad", "request", "get", "reason", "phrase", "(", ")", ",", "null", ",", "null", ",", "null", ")", ";", "}", "/", "/", "create", "path", "and", "map", "variables", "final", "map", "<", "string", ",", "object", ">", "path", "params", "=", "new", "hash", "map", "<", "string", ",", "object", ">", "(", ")", ";", "path", "params", "put", "(", "\"", "username", "\"", ",", "username", ")", ";", "final", "multi", "value", "map", "<", "string", ",", "string", ">", "query", "params", "=", "new", "linked", "multi", "value", "map", "<", "string", ",", "string", ">", "(", ")", ";", "final", "http", "headers", "header", "params", "=", "new", "http", "headers", "(", ")", ";", "final", "multi", "value", "map", "<", "string", ",", "string", ">", "cookie", "params", "=", "new", "linked", "multi", "value", "map", "<", "string", ",", "string", ">", "(", ")", ";", "final", "multi", "value", "map", "<", "string", ",", "object", ">", "form", "params", "=", "new", "linked", "multi", "value", "map", "<", "string", ",", "object", ">", "(", ")", ";", "final", "string", "[", "]", "local", "var", "accepts", "=", "{", "}", ";", "final", "list", "<", "media", "type", ">", "local", "var", "accept", "=", "api", "client", "select", "header", "accept", "(", "local", "var", "accepts", ")", ";", "final", "string", "[", "]", "local", "var", "content", "types", "=", "{", "}", ";", "final", "media", "type", "local", "var", "content", "type", "=", "api", "client", "select", "header", "content", "type", "(", "local", "var", "content", "types", ")", ";", "string", "[", "]", "local", "var", "auth", "names", "=", "new", "string", "[", "]", "{", "}", ";", "parameterized", "type", "reference", "<", "void", ">", "local", "var", "return", "type", "=", "new", "parameterized", "type", "reference", "<", "void", ">", "(", ")", "{", "}", ";", "return", "api", "client", "invoke", "a", "p", "i", "(", "\"", "/", "user", "/", "{", "username", "}", "\"", ",", "http", "method", "put", ",", "path", "params", ",", "query", "params", ",", "post", "body", ",", "header", "params", ",", "cookie", "params", ",", "form", "params", ",", "local", "var", "accept", ",", "local", "var", "content", "type", ",", "local", "var", "auth", "names", ",", "local", "var", "return", "type", ")", ";", "}" ]
[ "returns", "the", "size", "of", "the", "module", ",", "module", "packages", "and", "module", "main", "class", "attributes", "generated", "by", "this", "module", "writer", "also", "add", "the", "names", "of", "these", "attributes", "in", "the", "constant", "pool" ]
[ "int", "compute", "attributes", "size", "(", ")", "{", "symbol", "table", "add", "constant", "utf", "8", "(", "constants", "module", ")", ";", "/", "/", "6", "attribute", "header", "bytes", ",", "6", "bytes", "for", "name", ",", "flags", "and", "version", ",", "and", "5", "*", "2", "bytes", "for", "counts", "int", "size", "=", "22", "+", "requires", "length", "+", "exports", "length", "+", "opens", "length", "+", "uses", "index", "length", "+", "provides", "length", ";", "if", "(", "package", "count", ">", "0", ")", "{", "symbol", "table", "add", "constant", "utf", "8", "(", "constants", "module", "packages", ")", ";", "/", "/", "6", "attribute", "header", "bytes", ",", "and", "2", "bytes", "for", "package", "count", "size", "+", "=", "8", "+", "package", "index", "length", ";", "}", "if", "(", "main", "class", "index", ">", "0", ")", "{", "symbol", "table", "add", "constant", "utf", "8", "(", "constants", "module", "main", "class", ")", ";", "/", "/", "6", "attribute", "header", "bytes", ",", "and", "2", "bytes", "for", "main", "class", "index", "size", "+", "=", "8", ";", "}", "return", "size", ";", "}" ]
[ "execute", "this", "command", "with", "no", "input", "to", "stdin", ",", "and", "with", "the", "output", "streamed", "to", "the", "given", "output", "streams", ",", "which", "must", "be", "thread", "-", "safe", "if", "the", "current", "process", "is", "interrupted", ",", "then", "the", "subprocess", "is", "also", "interrupted", "this", "call", "blocks", "until", "the", "subprocess", "completes", "or", "an", "error", "occurs", "note", "that", "the", "given", "output", "streams", "are", "never", "closed", "by", "this", "class", "this", "method", "is", "a", "convenience", "wrapper", "for", "<", "code", ">", "execute", "async", "(", "std", "out", ",", "std", "err", ")", "get", "(", ")", "<", "code", ">" ]
[ "public", "command", "result", "execute", "(", "output", "stream", "std", "out", ",", "output", "stream", "std", "err", ")", "throws", "command", "exception", ",", "interrupted", "exception", "{", "return", "do", "execute", "(", "no", "input", ",", "consumers", "create", "streaming", "consumers", "(", "std", "out", ",", "std", "err", ")", ",", "kill", "subprocess", "on", "interrupt", ")", "get", "(", ")", ";", "}" ]
[ "delete", "purchase", "order", "by", "id", "for", "valid", "response", "try", "integer", "i", "ds", "with", "value", "&", "lt", ";", "1000", "anything", "above", "1000", "or", "nonintegers", "will", "generate", "api", "errors" ]
[ "public", "single", "<", "void", ">", "rx", "delete", "order", "(", "string", "order", "id", ",", "api", "client", "auth", "info", "auth", "info", ")", "{", "return", "single", "create", "(", "new", "io", "vertx", "rx", "java", "single", "on", "subscribe", "adapter", "<", ">", "(", "fut", "-", ">", "delegate", "delete", "order", "(", "order", "id", ",", "auth", "info", ",", "fut", ")", ")", ")", ";", "}" ]
[ "get", "namespace", "boolean" ]
[ "public", "boolean", "is", "namespace", "boolean", "(", ")", "{", "return", "namespace", "boolean", ";", "}" ]
[ "return", "a", "sorted", "set", "of", "the", "keys", "in", "this", "{", "@", "link", "properties", "}", "object", "the", "keys", "will", "be", "converted", "to", "strings", "if", "necessary", "using", "{", "@", "link", "string", "#", "value", "of", "(", "object", ")", "}", "and", "sorted", "alphanumerically", "according", "to", "the", "natural", "order", "of", "strings" ]
[ "public", "set", "<", "object", ">", "key", "set", "(", ")", "{", "set", "<", "object", ">", "sorted", "keys", "=", "new", "tree", "set", "<", ">", "(", "key", "comparator", ")", ";", "sorted", "keys", "add", "all", "(", "super", "key", "set", "(", ")", ")", ";", "return", "collections", "synchronized", "set", "(", "sorted", "keys", ")", ";", "}" ]
[ "called", "when", "bazel", "initializes", "a", "new", "workspace", ";", "this", "is", "only", "called", "after", "{", "@", "link", "#", "server", "init", "}", ",", "and", "only", "if", "the", "server", "initialization", "was", "successful", "modules", "can", "override", "this", "method", "to", "affect", "how", "the", "workspace", "is", "configured" ]
[ "public", "void", "workspace", "init", "(", "blaze", "runtime", "runtime", ",", "blaze", "directories", "directories", ",", "workspace", "builder", "builder", ")", "{", "}" ]
[ "returns", "the", "false", "positives", "based", "on", "an", "input", "of", "unique", "elements" ]
[ "private", "int", "false", "positives", "(", "membership", "filter", ",", "long", "[", "]", "input", ")", "{", "int", "false", "positives", "=", "0", ";", "int", "true", "positives", "=", "0", ";", "int", "i", "=", "0", ";", "/", "/", "add", "only", "first", "half", "of", "input", "array", "for", "(", ";", "i", "<", "(", "input", "length", "/", "2", ")", ";", "i", "+", "+", ")", "{", "filter", "put", "(", "input", "[", "i", "]", ")", ";", "}", "/", "/", "first", "half", "should", "be", "members", "for", "(", "int", "k", "=", "0", ";", "k", "<", "i", ";", "k", "+", "+", ")", "{", "true", "positives", "+", "=", "filter", "might", "contain", "(", "input", "[", "k", "]", ")", "?", "1", ":", "0", ";", "}", "assert", "that", "(", "true", "positives", ",", "is", "(", "input", "length", "/", "2", ")", ")", ";", "/", "/", "second", "half", "shouldn", "'", "t", "be", "members", "for", "(", ";", "i", "<", "input", "length", ";", "i", "+", "+", ")", "{", "false", "positives", "+", "=", "filter", "might", "contain", "(", "input", "[", "i", "]", ")", "?", "1", ":", "0", ";", "}", "return", "false", "positives", ";", "}" ]
[ "source", "line", "and", "column", "info", "<", "code", ">", "optional", "aapt", "pb", "source", "position", "source", "=", "3", ";", "<", "code", ">" ]
[ "private", "void", "set", "source", "(", "com", "android", "aapt", "resources", "source", "position", "builder", "builder", "for", "value", ")", "{", "source", "=", "builder", "for", "value", "build", "(", ")", ";", "bit", "field", "0", "|", "=", "0x", "0", "0", "0", "0", "0", "0", "0", "4", ";", "}" ]
[ "method", ":", "seek", "(", "long", "pos", ")" ]
[ "public", "void", "test", "seek", "(", ")", "throws", "exception", "{", "path", "seek", "test", "file", "path", "=", "new", "path", "(", "this", "test", "root", "dir", "+", "\"", "/", "\"", "+", "\"", "seek", "test", "file", "\"", ")", ";", "long", "file", "size", "=", "5", "*", "unit", "mb", ";", "contract", "test", "utils", "generate", "test", "file", "(", "this", "fs", ",", "seek", "test", "file", "path", ",", "file", "size", ",", "256", ",", "255", ")", ";", "log", "info", "(", "\"", "5mb", "file", "for", "seek", "test", "has", "created", "\"", ")", ";", "f", "s", "data", "input", "stream", "input", "stream", "=", "this", "fs", "open", "(", "seek", "test", "file", "path", ")", ";", "int", "seek", "times", "=", "5", ";", "for", "(", "int", "i", "=", "0", ";", "i", "!", "=", "seek", "times", ";", "i", "+", "+", ")", "{", "long", "pos", "=", "file", "size", "/", "(", "seek", "times", "-", "i", ")", "-", "1", ";", "input", "stream", "seek", "(", "pos", ")", ";", "assert", "true", "(", "\"", "expected", "position", "at", ":", "\"", "+", "pos", "+", "\"", ",", "but", "got", ":", "\"", "+", "input", "stream", "get", "pos", "(", ")", ",", "input", "stream", "get", "pos", "(", ")", "=", "=", "pos", ")", ";", "log", "info", "(", "\"", "completed", "seeking", "at", "pos", ":", "\"", "+", "input", "stream", "get", "pos", "(", ")", ")", ";", "}", "log", "info", "(", "\"", "begin", "to", "random", "position", "seeking", "test", "\"", ")", ";", "random", "random", "=", "new", "random", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "seek", "times", ";", "i", "+", "+", ")", "{", "long", "pos", "=", "math", "abs", "(", "random", "next", "long", "(", ")", ")", "%", "file", "size", ";", "log", "info", "(", "\"", "seeking", "for", "pos", ":", "\"", "+", "pos", ")", ";", "input", "stream", "seek", "(", "pos", ")", ";", "assert", "true", "(", "\"", "expected", "position", "at", ":", "\"", "+", "pos", "+", "\"", ",", "but", "got", ":", "\"", "+", "input", "stream", "get", "pos", "(", ")", ",", "input", "stream", "get", "pos", "(", ")", "=", "=", "pos", ")", ";", "log", "info", "(", "\"", "completed", "seeking", "at", "pos", ":", "\"", "+", "input", "stream", "get", "pos", "(", ")", ")", ";", "}", "}" ]
[ "notifies", "that", "a", "node", "corresponding", "to", "{", "@", "code", "sky", "key", "}", "is", "about", "to", "enter", "the", "given", "{", "@", "code", "node", "state", "}", "notably", ",", "this", "includes", "{", "@", "link", "sky", "function", "#", "compute", "}", "calls", "due", "to", "skyframe", "restarts", ",", "but", "also", "dirtiness", "checking", "and", "node", "completion" ]
[ "void", "state", "starting", "(", "sky", "key", "sky", "key", ",", "node", "state", "node", "state", ")", ";" ]
[ "join", "on", "underscore" ]
[ "public", "static", "string", "join", "(", "object", "args", ")", "{", "return", "joiner", "join", "(", "args", ")", ";", "}" ]
[ "remove", "path", "from", "the", "view" ]
[ "private", "void", "remove", "path", "from", "view", "(", "tree", "path", "path", ",", "boolean", "fire", "event", ")", "{", "if", "(", "view", "list", "contains", "(", "path", ")", ")", "{", "tree", "remove", "from", "view", "(", "path", ")", ";", "if", "(", "fire", "event", ")", "{", "tree", "fire", "tree", "view", "changed", "(", ")", ";", "}", "}", "}" ]
[ "elapse", "the", "given", "temporal", "for", "the", "difference", "between", "the", "current", "value", "of", "this", "field", "and", "the", "goal", "value", "typically", ",", "the", "returned", "temporal", "will", "have", "the", "given", "goal", "as", "the", "current", "value", "for", "this", "type", ",", "but", "this", "is", "not", "the", "case", "for", "{", "@", "link", "#", "day", "of", "month", "}", "for", "instance", ",", "if", "{", "@", "code", "goal", "}", "is", "31", ",", "and", "{", "@", "code", "temporal", "}", "is", "april", "1", "6th", ",", "this", "method", "returns", "may", "1st", ",", "because", "april", "3", "1st", "does", "not", "exist" ]
[ "public", "<", "t", "extends", "temporal", "&", "comparable", "<", "?", "super", "t", ">", ">", "t", "elapse", "until", "(", "t", "temporal", ",", "int", "goal", ")", "{", "int", "current", "=", "get", "(", "temporal", ")", ";", "if", "(", "current", "<", "goal", ")", "{", "return", "this", "field", "get", "base", "unit", "(", ")", "add", "to", "(", "temporal", ",", "goal", "-", "current", ")", ";", "}", "else", "{", "value", "range", "range", "=", "temporal", "range", "(", "this", "field", ")", ";", "long", "amount", "=", "goal", "+", "range", "get", "maximum", "(", ")", "-", "current", "+", "1", "-", "range", "get", "minimum", "(", ")", ";", "return", "this", "field", "get", "base", "unit", "(", ")", "add", "to", "(", "temporal", ",", "amount", ")", ";", "}", "}" ]
[ "get", "the", "content", "handler", "associated", "with", "the", "specified", "domain", "object" ]
[ "public", "static", "synchronized", "content", "handler", "get", "content", "handler", "(", "domain", "object", "dobj", ")", "throws", "i", "o", "exception", "{", "check", "content", "handler", "maps", "(", ")", ";", "content", "handler", "ch", "=", "content", "handler", "class", "map", "get", "(", "dobj", "get", "class", "(", ")", ")", ";", "if", "(", "ch", "=", "=", "null", ")", "{", "throw", "new", "i", "o", "exception", "(", "\"", "content", "handler", "not", "found", "for", "\"", "+", "dobj", "get", "class", "(", ")", "get", "name", "(", ")", ")", ";", "}", "return", "ch", ";", "}" ]
[ "create", "a", "new", "{", "@", "code", "date", "time", "formatter", "}", "using", "this", "factory", "if", "no", "specific", "pattern", "or", "style", "has", "been", "defined", ",", "{", "@", "link", "format", "style", "#", "medium", "medium", "date", "time", "format", "}", "will", "be", "used" ]
[ "public", "date", "time", "formatter", "create", "date", "time", "formatter", "(", ")", "{", "return", "create", "date", "time", "formatter", "(", "date", "time", "formatter", "of", "localized", "date", "time", "(", "format", "style", "medium", ")", ")", ";", "}" ]
[ "assert", "the", "response", "status", "code", "is", "in", "the", "3xx", "range" ]
[ "public", "result", "matcher", "is", "3xx", "redirection", "(", ")", "{", "return", "result", "-", ">", "assert", "equals", "(", "\"", "range", "for", "response", "status", "value", "\"", "+", "result", "get", "response", "(", ")", "get", "status", "(", ")", ",", "http", "status", "series", "redirection", ",", "get", "http", "status", "series", "(", "result", ")", ")", ";", "}" ]
[ "allocate", "a", "new", "storage", "location" ]
[ "protected", "item", "storage", "allocate", "item", "storage", "(", "string", "folder", "path", ",", "string", "item", "name", ")", "throws", "i", "o", "exception", ",", "invalid", "name", "exception", "{", "index", "journal", "open", "(", ")", ";", "try", "{", "folder", "folder", "=", "get", "folder", "(", "folder", "path", ",", "get", "folder", "option", "create", "all", "notify", ")", ";", "if", "(", "folder", "items", "contains", "key", "(", "item", "name", ")", ")", "{", "throw", "new", "duplicate", "file", "exception", "(", "get", "path", "(", "folder", "path", ",", "item", "name", ")", "+", "\"", "already", "exists", "\"", ")", ";", "}", "item", "item", "=", "new", "item", "(", "folder", ",", "item", "name", ")", ";", "index", "journal", "add", "item", "(", "item", ")", ";", "return", "item", "item", "storage", ";", "}", "catch", "(", "not", "found", "exception", "e", ")", "{", "throw", "new", "file", "not", "found", "exception", "(", "\"", "folder", "not", "found", ":", "\"", "+", "folder", "path", ")", ";", "}", "finally", "{", "index", "journal", "close", "(", ")", ";", "}", "}" ]
[ "init", "method", "which", "will", "be", "invoked", "by", "the", "node", "manager", "to", "inject", "the", "nm", "{", "@", "link", "context", "}" ]
[ "void", "init", "(", "context", "context", ")", ";" ]
[ "creates", "a", "standard", "conflict", "count", "message", "for", "an", "address", "this", "indicates", "which", "conflict", "you", "are", "resolving", "of", "some", "total", "number", "of", "conflicts", "at", "a", "given", "address" ]
[ "public", "static", "string", "get", "conflict", "count", "(", "int", "conflict", "num", ",", "int", "total", "conflicts", ",", "address", "addr", ")", "{", "string", "buffer", "buf", "=", "new", "string", "buffer", "(", "get", "conflict", "count", "(", "conflict", "num", ",", "total", "conflicts", ")", ")", ";", "buf", "append", "(", "\"", "@", "address", ":", "\"", ")", ";", "add", "address", "(", "buf", ",", "addr", ")", ";", "return", "buf", "to", "string", "(", ")", ";", "}" ]
[ "set", "the", "stage", "in", "the", "connector", "pipeline", "which", "is", "currently", "executing" ]
[ "public", "void", "position", "(", "stage", "position", ")", "{", "this", "position", "=", "position", ";", "}" ]
[ "get", "namespace", "number" ]
[ "public", "big", "decimal", "get", "namespace", "number", "(", ")", "{", "return", "namespace", "number", ";", "}" ]
[ "copies", "the", "content", "of", "the", "underlying", "atomic", "array", "to", "a", "normal", "one" ]
[ "public", "e", "[", "]", "to", "array", "(", "e", "[", "]", "a", ")", "{", "if", "(", "a", "length", "!", "=", "array", "length", "(", ")", ")", "{", "throw", "new", "elasticsearch", "generation", "exception", "(", "\"", "atomic", "arrays", "can", "only", "be", "copied", "to", "arrays", "of", "the", "same", "size", "\"", ")", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "array", "length", "(", ")", ";", "i", "+", "+", ")", "{", "a", "[", "i", "]", "=", "array", "get", "(", "i", ")", ";", "}", "return", "a", ";", "}" ]
[ "returns", "the", "value", "of", "the", "given", "attribute", "if", "it", "has", "the", "right", "type" ]
[ "public", "<", "t", ">", "object", "get", "attr", "(", "string", "attr", "name", ",", "type", "<", "t", ">", "type", ")", "{", "integer", "index", "=", "rule", "class", "get", "attribute", "index", "(", "attr", "name", ")", ";", "if", "(", "index", "=", "=", "null", ")", "{", "throw", "new", "illegal", "argument", "exception", "(", "\"", "no", "such", "attribute", "\"", "+", "attr", "name", "+", "\"", "in", "\"", "+", "rule", "class", "+", "\"", "rule", "\"", "+", "get", "label", "(", ")", ")", ";", "}", "attribute", "attr", "=", "rule", "class", "get", "attribute", "(", "index", ")", ";", "if", "(", "attr", "get", "type", "(", ")", "!", "=", "type", ")", "{", "throw", "new", "illegal", "argument", "exception", "(", "\"", "attribute", "\"", "+", "attr", "name", "+", "\"", "is", "of", "type", "\"", "+", "attr", "get", "type", "(", ")", "+", "\"", "and", "not", "of", "type", "\"", "+", "type", "+", "\"", "in", "\"", "+", "rule", "class", "+", "\"", "rule", "\"", "+", "get", "label", "(", ")", ")", ";", "}", "return", "get", "attr", "with", "index", "(", "index", ")", ";", "}" ]
[ "used", "by", "metrics" ]
[ "public", "long", "get", "low", "redundancy", "e", "c", "block", "groups", "(", ")", "{", "return", "needed", "reconstruction", "get", "low", "redundancy", "e", "c", "block", "groups", "(", ")", ";", "}" ]
[ "wait", "for", "all", "async", "operation", "to", "return", "so", "we", "know", "that", "we", "can", "start", "verifying", "the", "state" ]
[ "private", "boolean", "wait", "for", "pending", "requests", "(", "int", "timeout", ")", "throws", "interrupted", "exception", "{", "log", "info", "(", "\"", "wait", "for", "pending", "requests", ":", "{", "}", "\"", ",", "pending", "get", "(", ")", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "timeout", ";", "+", "+", "i", ")", "{", "thread", "sleep", "(", "1000", ")", ";", "if", "(", "pending", "get", "(", ")", "=", "=", "0", ")", "{", "return", "true", ";", "}", "}", "log", "info", "(", "\"", "timeout", "waiting", "for", "pending", "requests", ":", "{", "}", "\"", ",", "pending", "get", "(", ")", ")", ";", "return", "false", ";", "}" ]