docstring_tokens
list
code_tokens
list
[ "unregisters", "the", "application", "{", "@", "link", "health", "check", "}", "with", "the", "given", "name" ]
[ "public", "void", "unregister", "(", "string", "name", ")", "{", "health", "check", "health", "check", ";", "synchronized", "(", "lock", ")", "{", "health", "check", "=", "health", "checks", "remove", "(", "name", ")", ";", "if", "(", "health", "check", "instanceof", "async", "health", "check", "decorator", ")", "{", "(", "(", "async", "health", "check", "decorator", ")", "health", "check", ")", "tear", "down", "(", ")", ";", "}", "}", "if", "(", "health", "check", "!", "=", "null", ")", "{", "on", "health", "check", "removed", "(", "name", ",", "health", "check", ")", ";", "}", "}" ]
[ "establish", "connectivity", "to", "a", "vertex", "that", "follows", "the", "last", "vertex", "don", "'", "t", "call", "this", "for", "loops" ]
[ "public", "void", "set", "next", "vertex", "(", "float", "next", "vertex", "x", ",", "float", "next", "vertex", "y", ")", "{", "jni", "set", "next", "vertex", "(", "addr", ",", "next", "vertex", "x", ",", "next", "vertex", "y", ")", ";", "}" ]
[ "create", "a", "test", "path", "using", "the", "value", "of", "{", "@", "link", "azure", "test", "constants", "#", "test", "unique", "fork", "id", "}", "if", "it", "is", "set" ]
[ "public", "static", "path", "path", "for", "tests", "(", "file", "system", "fs", ",", "string", "filename", ")", "{", "string", "test", "unique", "fork", "id", "=", "system", "get", "property", "(", "azure", "test", "constants", "test", "unique", "fork", "id", ")", ";", "return", "fs", "make", "qualified", "(", "new", "path", "(", "test", "unique", "fork", "id", "=", "=", "null", "?", "(", "\"", "/", "test", "/", "\"", "+", "filename", ")", ":", "(", "test", "unique", "fork", "id", "+", "\"", "/", "\"", "+", "filename", ")", ")", ")", ";", "}" ]
[ "returns", "account", "-", "agnostic", "class", "if", "it", "exists", ",", "else", "returns", "the", "default", "value" ]
[ "public", "<", "u", ">", "class", "<", "?", "extends", "u", ">", "get", "account", "agnostic", "class", "(", "string", "name", ",", "class", "<", "?", "extends", "u", ">", "default", "value", ",", "class", "<", "u", ">", "xface", ")", "{", "return", "raw", "config", "get", "class", "(", "name", ",", "default", "value", ",", "xface", ")", ";", "}" ]
[ "return", "the", "name", "of", "this", "{", "@", "code", "property", "source", "}" ]
[ "public", "string", "get", "name", "(", ")", "{", "return", "this", "name", ";", "}" ]
[ "maps", "the", "specified", "class", "to", "the", "specified", "value", "does", "not", "associate", "this", "value", "with", "any", "of", "the", "class", "'", "s", "supertypes" ]
[ "<", "t", "extends", "b", ">", "t", "put", "instance", "(", "class", "<", "t", ">", "type", ",", "@", "nullable", "decl", "t", "value", ")", ";" ]
[ "specifies", "the", "amount", "of", "time", "the", "driver", "should", "wait", "when", "searching", "for", "an", "element", "if", "it", "is", "not", "immediately", "present", "when", "searching", "for", "a", "single", "element", ",", "the", "driver", "should", "poll", "the", "page", "until", "the", "element", "has", "been", "found", ",", "or", "this", "timeout", "expires", "before", "throwing", "a", "{", "@", "link", "no", "such", "element", "exception", "}", "when", "searching", "for", "multiple", "elements", ",", "the", "driver", "should", "poll", "the", "page", "until", "at", "least", "one", "element", "has", "been", "found", "or", "this", "timeout", "has", "expired", "increasing", "the", "implicit", "wait", "timeout", "should", "be", "used", "judiciously", "as", "it", "will", "have", "an", "adverse", "effect", "on", "test", "run", "time", ",", "especially", "when", "used", "with", "slower", "location", "strategies", "like", "x", "path" ]
[ "default", "timeouts", "implicitly", "wait", "(", "duration", "duration", ")", "{", "return", "implicitly", "wait", "(", "duration", "to", "millis", "(", ")", ",", "time", "unit", "milliseconds", ")", ";", "}" ]
[ "returns", "the", "maximum", "{", "@", "link", "version", "}", "that", "is", "compatible", "with", "the", "given", "version" ]
[ "public", "static", "version", "max", "compatible", "version", "(", "version", "version", ")", "{", "final", "list", "<", "version", ">", "compatible", "=", "all", "versions", "stream", "(", ")", "filter", "(", "version", ":", ":", "is", "compatible", ")", "filter", "(", "version", ":", ":", "on", "or", "before", ")", "collect", "(", "collectors", "to", "list", "(", ")", ")", ";", "assert", "compatible", "size", "(", ")", ">", "0", ";", "return", "compatible", "get", "(", "compatible", "size", "(", ")", "-", "1", ")", ";", "}" ]
[ "convert", "the", "given", "object", "to", "string", "with", "each", "line", "indented", "by", "4", "spaces", "(", "except", "the", "first", "line", ")" ]
[ "private", "string", "to", "indented", "string", "(", "object", "o", ")", "{", "if", "(", "o", "=", "=", "null", ")", "{", "return", "\"", "null", "\"", ";", "}", "return", "o", "to", "string", "(", ")", "replace", "(", "\"", "\\", "n", "\"", ",", "\"", "\\", "n", "\"", ")", ";", "}" ]
[ "return", "the", "{", "@", "link", "http", "client", "}", "instance", "that", "this", "request", "executor", "uses" ]
[ "public", "http", "client", "get", "http", "client", "(", ")", "{", "return", "this", "http", "client", ";", "}" ]
[ "returns", "how", "much", "ram", "is", "current", "being", "freed", "up", "by", "refreshing", "this", "is", "{", "@", "link", "#", "ram", "bytes", "used", "(", ")", "}", "except", "does", "not", "include", "tombstones", "because", "they", "don", "'", "t", "clear", "on", "refresh" ]
[ "long", "get", "refreshing", "bytes", "(", ")", "{", "return", "maps", "old", "ram", "bytes", "used", "get", "(", ")", ";", "}" ]
[ "map", "the", "route", "for", "http", "patch", "requests" ]
[ "public", "void", "patch", "(", "string", "path", ",", "route", "route", ")", "{", "add", "route", "(", "http", "method", "patch", ",", "create", "route", "impl", "(", "path", ",", "route", ")", ")", ";", "}" ]
[ "set", "the", "storage", "record", "for", "this", "instance", "data", "is", "refreshed", "from", "the", "record", "provided" ]
[ "void", "set", "record", "(", "d", "b", "handle", "dbh", ",", "d", "b", "record", "record", ")", "throws", "i", "o", "exception", "{", "this", "table", "schema", "=", "parse", "schema", "(", "dbh", ",", "record", ")", ";", "this", "record", "=", "record", ";", "if", "(", "table", "!", "=", "null", ")", "{", "table", "table", "record", "changed", "(", ")", ";", "}", "}" ]
[ "test", "for", "network", "host", ":", "gce" ]
[ "public", "void", "test", "network", "host", "gce", "default", "(", ")", "throws", "i", "o", "exception", "{", "resolve", "gce", "(", "\"", "gce", "\"", ",", "inet", "address", "get", "by", "name", "(", "\"", "10", "240", "0", "2", "\"", ")", ")", ";", "}" ]
[ "populates", "a", "multiset", "by", "reading", "an", "input", "stream", ",", "as", "part", "of", "deserialization", "see", "{", "@", "link", "#", "write", "multiset", "}", "for", "the", "data", "format", "the", "number", "of", "distinct", "elements", "is", "determined", "by", "a", "prior", "call", "to", "{", "@", "link", "#", "read", "count", "}" ]
[ "static", "<", "e", ">", "void", "populate", "multiset", "(", "multiset", "<", "e", ">", "multiset", ",", "object", "input", "stream", "stream", ",", "int", "distinct", "elements", ")", "throws", "i", "o", "exception", ",", "class", "not", "found", "exception", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "distinct", "elements", ";", "i", "+", "+", ")", "{", "@", "suppress", "warnings", "(", "\"", "unchecked", "\"", ")", "/", "/", "reading", "data", "stored", "by", "write", "multiset", "e", "element", "=", "(", "e", ")", "stream", "read", "object", "(", ")", ";", "int", "count", "=", "stream", "read", "int", "(", ")", ";", "multiset", "add", "(", "element", ",", "count", ")", ";", "}", "}" ]
[ "expand", "the", "given", "path", "as", "a", "glob", "pattern", "non", "-", "existent", "paths", "do", "not", "throw", "an", "exception", "because", "creation", "commands", "like", "touch", "and", "mkdir", "need", "to", "create", "them", "the", "\"", "stat", "\"", "field", "will", "be", "null", "if", "the", "path", "does", "not", "exist" ]
[ "public", "static", "path", "data", "[", "]", "expand", "as", "glob", "(", "string", "pattern", ",", "configuration", "conf", ")", "throws", "i", "o", "exception", "{", "path", "glob", "path", "=", "new", "path", "(", "pattern", ")", ";", "file", "system", "fs", "=", "glob", "path", "get", "file", "system", "(", "conf", ")", ";", "file", "status", "[", "]", "stats", "=", "fs", "glob", "status", "(", "glob", "path", ")", ";", "path", "data", "[", "]", "items", "=", "null", ";", "if", "(", "stats", "=", "=", "null", ")", "{", "/", "/", "remove", "any", "quoting", "in", "the", "glob", "pattern", "pattern", "=", "pattern", "replace", "all", "(", "\"", "\\", "\\", "\\", "\\", "(", ")", "\"", ",", "\"", "$", "1", "\"", ")", ";", "/", "/", "not", "a", "glob", "&", "file", "not", "found", ",", "so", "add", "the", "path", "with", "a", "null", "stat", "items", "=", "new", "path", "data", "[", "]", "{", "new", "path", "data", "(", "fs", ",", "pattern", ",", "null", ")", "}", ";", "}", "else", "{", "/", "/", "figure", "out", "what", "type", "of", "glob", "path", "was", "given", ",", "will", "convert", "globbed", "/", "/", "paths", "to", "match", "the", "type", "to", "preserve", "relativity", "path", "type", "glob", "type", ";", "uri", "glob", "uri", "=", "glob", "path", "to", "uri", "(", ")", ";", "if", "(", "glob", "uri", "get", "scheme", "(", ")", "!", "=", "null", ")", "{", "glob", "type", "=", "path", "type", "has", "scheme", ";", "}", "else", "if", "(", "!", "glob", "uri", "get", "path", "(", ")", "is", "empty", "(", ")", "&", "&", "new", "path", "(", "glob", "uri", "get", "path", "(", ")", ")", "is", "absolute", "(", ")", ")", "{", "glob", "type", "=", "path", "type", "schemeless", "absolute", ";", "}", "else", "{", "glob", "type", "=", "path", "type", "relative", ";", "}", "/", "/", "convert", "stats", "to", "path", "data", "items", "=", "new", "path", "data", "[", "stats", "length", "]", ";", "int", "i", "=", "0", ";", "for", "(", "file", "status", "stat", ":", "stats", ")", "{", "uri", "match", "uri", "=", "stat", "get", "path", "(", ")", "to", "uri", "(", ")", ";", "string", "glob", "match", "=", "null", ";", "switch", "(", "glob", "type", ")", "{", "case", "has", "scheme", ":", "/", "/", "use", "as", "-", "is", ",", "but", "remove", "authority", "if", "necessary", "if", "(", "glob", "uri", "get", "authority", "(", ")", "=", "=", "null", ")", "{", "match", "uri", "=", "remove", "authority", "(", "match", "uri", ")", ";", "}", "glob", "match", "=", "uri", "to", "string", "(", "match", "uri", ",", "false", ")", ";", "break", ";", "case", "schemeless", "absolute", ":", "/", "/", "take", "just", "the", "uri", "'", "s", "path", "glob", "match", "=", "match", "uri", "get", "path", "(", ")", ";", "break", ";", "case", "relative", ":", "/", "/", "make", "it", "relative", "to", "the", "current", "working", "dir", "uri", "cwd", "uri", "=", "fs", "get", "working", "directory", "(", ")", "to", "uri", "(", ")", ";", "glob", "match", "=", "relativize", "(", "cwd", "uri", ",", "match", "uri", ",", "stat", "is", "directory", "(", ")", ")", ";", "break", ";", "}", "items", "[", "i", "+", "+", "]", "=", "new", "path", "data", "(", "fs", ",", "glob", "match", ",", "stat", ")", ";", "}", "}", "arrays", "sort", "(", "items", ")", ";", "return", "items", ";", "}" ]
[ "validates", "an", "i", "pv", "6", "address", "returns", "true", "if", "valid" ]
[ "public", "boolean", "is", "valid", "inet", "6", "address", "(", "string", "inet", "6", "address", ")", "{", "boolean", "contains", "compressed", "zeroes", "=", "inet", "6", "address", "contains", "(", "\"", ":", ":", "\"", ")", ";", "if", "(", "contains", "compressed", "zeroes", "&", "&", "(", "inet", "6", "address", "index", "of", "(", "\"", ":", ":", "\"", ")", "!", "=", "inet", "6", "address", "last", "index", "of", "(", "\"", ":", ":", "\"", ")", ")", ")", "{", "return", "false", ";", "}", "if", "(", "(", "inet", "6", "address", "starts", "with", "(", "\"", ":", "\"", ")", "&", "&", "!", "inet", "6", "address", "starts", "with", "(", "\"", ":", ":", "\"", ")", ")", "|", "|", "(", "inet", "6", "address", "ends", "with", "(", "\"", ":", "\"", ")", "&", "&", "!", "inet", "6", "address", "ends", "with", "(", "\"", ":", ":", "\"", ")", ")", ")", "{", "return", "false", ";", "}", "string", "[", "]", "octets", "=", "inet", "6", "address", "split", "(", "\"", ":", "\"", ")", ";", "if", "(", "contains", "compressed", "zeroes", ")", "{", "list", "<", "string", ">", "octet", "list", "=", "new", "array", "list", "<", ">", "(", "arrays", "as", "list", "(", "octets", ")", ")", ";", "if", "(", "inet", "6", "address", "ends", "with", "(", "\"", ":", ":", "\"", ")", ")", "{", "/", "/", "string", "split", "(", ")", "drops", "ending", "empty", "segments", "octet", "list", "add", "(", "\"", "\"", ")", ";", "}", "else", "if", "(", "inet", "6", "address", "starts", "with", "(", "\"", ":", ":", "\"", ")", "&", "&", "!", "octet", "list", "is", "empty", "(", ")", ")", "{", "octet", "list", "remove", "(", "0", ")", ";", "}", "octets", "=", "octet", "list", "to", "array", "(", "new", "string", "[", "0", "]", ")", ";", "}", "if", "(", "octets", "length", ">", "ipv6", "max", "hex", "groups", ")", "{", "return", "false", ";", "}", "int", "valid", "octets", "=", "0", ";", "int", "empty", "octets", "=", "0", ";", "/", "/", "consecutive", "empty", "chunks", "for", "(", "int", "index", "=", "0", ";", "index", "<", "octets", "length", ";", "index", "+", "+", ")", "{", "string", "octet", "=", "octets", "[", "index", "]", ";", "if", "(", "octet", "length", "(", ")", "=", "=", "0", ")", "{", "empty", "octets", "+", "+", ";", "if", "(", "empty", "octets", ">", "1", ")", "{", "return", "false", ";", "}", "}", "else", "{", "empty", "octets", "=", "0", ";", "/", "/", "is", "last", "chunk", "an", "i", "pv", "4", "address", "?", "if", "(", "index", "=", "=", "octets", "length", "-", "1", "&", "&", "octet", "contains", "(", "\"", "\"", ")", ")", "{", "if", "(", "!", "is", "valid", "inet", "4", "address", "(", "octet", ")", ")", "{", "return", "false", ";", "}", "valid", "octets", "+", "=", "2", ";", "continue", ";", "}", "if", "(", "octet", "length", "(", ")", ">", "ipv6", "max", "hex", "digits", "per", "group", ")", "{", "return", "false", ";", "}", "int", "octet", "int", ";", "try", "{", "octet", "int", "=", "integer", "parse", "int", "(", "octet", ",", "base", "16", ")", ";", "}", "catch", "(", "number", "format", "exception", "e", ")", "{", "return", "false", ";", "}", "if", "(", "octet", "int", "<", "0", "|", "|", "octet", "int", ">", "max", "unsigned", "short", ")", "{", "return", "false", ";", "}", "}", "valid", "octets", "+", "+", ";", "}", "if", "(", "valid", "octets", ">", "ipv6", "max", "hex", "groups", "|", "|", "(", "valid", "octets", "<", "ipv6", "max", "hex", "groups", "&", "&", "!", "contains", "compressed", "zeroes", ")", ")", "{", "return", "false", ";", "}", "return", "true", ";", "}" ]
[ "correct", "offset", "order", "when", "doing", "both", "parts", "and", "concatenation", ":", "power", "shot", "is", "a", "synonym", "of", "power" ]
[ "public", "void", "test", "parts", "and", "catenate", "(", ")", "throws", "i", "o", "exception", "{", "e", "s", "test", "case", "test", "analysis", "analysis", "=", "analysis", "tests", "helper", "create", "test", "analysis", "from", "settings", "(", "settings", "builder", "(", ")", "put", "(", "environment", "path", "home", "setting", "get", "key", "(", ")", ",", "create", "temp", "dir", "(", ")", "to", "string", "(", ")", ")", "put", "(", "\"", "index", "analysis", "filter", "my", "word", "delimiter", "type", "\"", ",", "type", ")", "put", "(", "\"", "index", "analysis", "filter", "my", "word", "delimiter", "catenate", "words", "\"", ",", "\"", "true", "\"", ")", "put", "(", "\"", "index", "analysis", "filter", "my", "word", "delimiter", "generate", "word", "parts", "\"", ",", "\"", "true", "\"", ")", "build", "(", ")", ",", "new", "common", "analysis", "plugin", "(", ")", ")", ";", "token", "filter", "factory", "token", "filter", "=", "analysis", "token", "filter", "get", "(", "\"", "my", "word", "delimiter", "\"", ")", ";", "string", "source", "=", "\"", "power", "shot", "\"", ";", "string", "[", "]", "expected", "=", "new", "string", "[", "]", "{", "\"", "power", "\"", ",", "\"", "power", "shot", "\"", ",", "\"", "shot", "\"", "}", ";", "tokenizer", "tokenizer", "=", "new", "whitespace", "tokenizer", "(", ")", ";", "tokenizer", "set", "reader", "(", "new", "string", "reader", "(", "source", ")", ")", ";", "assert", "token", "stream", "contents", "(", "token", "filter", "create", "(", "tokenizer", ")", ",", "expected", ")", ";", "}" ]
[ "delete", "a", "file" ]
[ "public", "boolean", "delete", "(", "path", "f", ",", "boolean", "recursive", ")", "throws", "i", "o", "exception", "{", "map", "<", "string", ",", "string", ">", "params", "=", "new", "hash", "map", "<", "string", ",", "string", ">", "(", ")", ";", "params", "put", "(", "op", "param", ",", "operation", "delete", "to", "string", "(", ")", ")", ";", "params", "put", "(", "recursive", "param", ",", "boolean", "to", "string", "(", "recursive", ")", ")", ";", "http", "u", "r", "l", "connection", "conn", "=", "get", "connection", "(", "operation", "delete", "get", "method", "(", ")", ",", "params", ",", "f", ",", "true", ")", ";", "http", "exception", "utils", "validate", "response", "(", "conn", ",", "http", "u", "r", "l", "connection", "http", "ok", ")", ";", "j", "s", "o", "n", "object", "json", "=", "(", "j", "s", "o", "n", "object", ")", "http", "f", "s", "utils", "json", "parse", "(", "conn", ")", ";", "return", "(", "boolean", ")", "json", "get", "(", "delete", "json", ")", ";", "}" ]
[ "stably", "sorts", "the", "provided", "{", "@", "code", "list", "}", "in", "-", "place", ",", "in", "order", "of", "decreasing", "score" ]
[ "private", "static", "<", "t", ">", "void", "sort", "by", "score", "(", "list", "<", "t", ">", "list", ",", "score", "provider", "<", "t", ">", "score", "provider", ")", "{", "collections", "sort", "(", "list", ",", "(", "a", ",", "b", ")", "-", ">", "score", "provider", "get", "score", "(", "b", ")", "-", "score", "provider", "get", "score", "(", "a", ")", ")", ";", "}" ]
[ "deprecated", ":", "please", "call", "{", "@", "link", "g", "p", "u", "image", "view", "#", "update", "preview", "frame", "(", "byte", "[", "]", ",", "int", ",", "int", ")", "}", "frame", "by", "frame", "sets", "the", "up", "camera", "to", "be", "connected", "to", "g", "p", "u", "image", "to", "get", "a", "filtered", "preview" ]
[ "public", "void", "set", "up", "camera", "(", "final", "camera", "camera", ",", "final", "int", "degrees", ",", "final", "boolean", "flip", "horizontal", ",", "final", "boolean", "flip", "vertical", ")", "{", "gpu", "image", "set", "up", "camera", "(", "camera", ",", "degrees", ",", "flip", "horizontal", ",", "flip", "vertical", ")", ";", "}" ]
[ "wait", "the", "removal", "of", "the", "document", "decoded", "from", "the", "provided", "{", "@", "link", "async", "execution", "id", "}" ]
[ "protected", "void", "ensure", "task", "removal", "(", "string", "id", ")", "throws", "exception", "{", "async", "execution", "id", "search", "id", "=", "async", "execution", "id", "decode", "(", "id", ")", ";", "assert", "busy", "(", "(", ")", "-", ">", "{", "get", "response", "resp", "=", "client", "(", ")", "prepare", "get", "(", ")", "set", "index", "(", "async", "results", "index", ")", "set", "id", "(", "search", "id", "get", "doc", "id", "(", ")", ")", "get", "(", ")", ";", "assert", "false", "(", "resp", "is", "exists", "(", ")", ")", ";", "}", ")", ";", "}" ]
[ "completes", "the", "co", "-", "group", "operation", "with", "the", "user", "function", "that", "is", "executed", "for", "windowed", "groups", "<", "b", ">", "note", ":", "<", "b", ">", "this", "is", "a", "temporary", "workaround", "while", "the", "{", "@", "link", "#", "apply", "(", "co", "group", "function", ",", "type", "information", ")", "}", "method", "has", "the", "wrong", "return", "type", "and", "hence", "does", "not", "allow", "one", "to", "set", "an", "operator", "-", "specific", "parallelism" ]
[ "public", "<", "t", ">", "single", "output", "stream", "operator", "<", "t", ">", "with", "(", "co", "group", "function", "<", "t1", ",", "t2", ",", "t", ">", "function", ",", "type", "information", "<", "t", ">", "result", "type", ")", "{", "return", "(", "single", "output", "stream", "operator", "<", "t", ">", ")", "apply", "(", "function", ",", "result", "type", ")", ";", "}" ]
[ "parse", "user", "info", "request", "claims", "set" ]
[ "public", "static", "set", "<", "string", ">", "parse", "user", "info", "request", "claims", "(", "final", "o", "auth", "2", "0", "token", "token", ")", "{", "return", "token", "get", "claims", "(", ")", "get", "or", "default", "(", "\"", "userinfo", "\"", ",", "new", "hash", "map", "<", ">", "(", "0", ")", ")", "key", "set", "(", ")", ";", "}" ]
[ "validates", "a", "path", "meta", "-", "data", "object" ]
[ "private", "static", "void", "check", "path", "metadata", "(", "path", "metadata", "meta", ")", "{", "preconditions", "check", "not", "null", "(", "meta", ")", ";", "preconditions", "check", "not", "null", "(", "meta", "get", "file", "status", "(", ")", ")", ";", "preconditions", "check", "not", "null", "(", "meta", "get", "file", "status", "(", ")", "get", "path", "(", ")", ")", ";", "}" ]
[ "close", "frame", "to", "send", ",", "when", "close", "frame", "was", "not", "send", "manually", "or", "{", "@", "code", "null", "}", "to", "disable", "proper", "close" ]
[ "public", "builder", "send", "close", "frame", "(", "web", "socket", "close", "status", "send", "close", "frame", ")", "{", "this", "send", "close", "frame", "=", "send", "close", "frame", ";", "return", "this", ";", "}" ]
[ "get", "$", "special", "property", "name" ]
[ "public", "long", "get", "$", "special", "property", "name", "(", ")", "{", "return", "$", "special", "property", "name", ";", "}" ]
[ "returns", "the", "appropriate", "{", "@", "code", "const", "}", "rop", "for", "the", "given", "type", "the", "result", "is", "a", "shared", "instance" ]
[ "public", "static", "rop", "op", "const", "(", "type", "bearer", "type", ")", "{", "if", "(", "type", "get", "type", "(", ")", "=", "=", "type", "known", "null", ")", "{", "return", "const", "object", "nothrow", ";", "}", "switch", "(", "type", "get", "basic", "frame", "type", "(", ")", ")", "{", "case", "type", "bt", "int", ":", "return", "const", "int", ";", "case", "type", "bt", "long", ":", "return", "const", "long", ";", "case", "type", "bt", "float", ":", "return", "const", "float", ";", "case", "type", "bt", "double", ":", "return", "const", "double", ";", "case", "type", "bt", "object", ":", "return", "const", "object", ";", "}", "return", "throw", "bad", "type", "(", "type", ")", ";", "}" ]
[ "what", "were", "the", "total", "number", "of", "documents", "matching", "the", "search", "?" ]
[ "public", "long", "get", "total", "hits", "(", ")", "{", "return", "total", "hits", ";", "}" ]
[ "murmur", "3", "64", "-", "bit", "variant", "this", "is", "essentially", "msb", "8", "bytes", "of", "murmur", "3", "128", "-", "bit", "variant" ]
[ "public", "static", "long", "hash", "6", "4", "(", "byte", "[", "]", "data", ")", "{", "return", "hash", "6", "4", "(", "data", ",", "0", ",", "data", "length", ",", "default", "seed", ")", ";", "}" ]
[ "computes", "a", "reduced", "compile", "-", "time", "classpath", "from", "the", "union", "of", "direct", "dependencies", "and", "their", "dependencies", ",", "as", "listed", "in", "the", "associated", "deps", "artifacts" ]
[ "public", "immutable", "list", "<", "path", ">", "compute", "strict", "classpath", "(", "immutable", "list", "<", "path", ">", "original", "classpath", ")", "throws", "i", "o", "exception", "{", "if", "(", "!", "strict", "classpath", "mode", ")", "{", "return", "original", "classpath", ";", "}", "/", "/", "classpath", "=", "direct", "deps", "+", "runtime", "direct", "deps", "+", "their", "deps", "required", "classpath", "=", "new", "hash", "set", "<", ">", "(", "direct", "jars", ")", ";", "for", "(", "path", "deps", "artifact", ":", "deps", "artifacts", ")", "{", "collect", "dependencies", "from", "artifact", "(", "deps", "artifact", ")", ";", "}", "/", "/", "todo", "(", "b", "/", "71936047", ")", ":", "it", "should", "be", "an", "error", "for", "required", "classpath", "to", "contain", "paths", "that", "are", "not", "/", "/", "in", "original", "classpath", "/", "/", "filter", "the", "initial", "classpath", "and", "keep", "the", "original", "order", "return", "original", "classpath", "stream", "(", ")", "filter", "(", "required", "classpath", ":", ":", "contains", ")", "collect", "(", "to", "immutable", "list", "(", ")", ")", ";", "}" ]
[ "test", "that", "we", "can", "zero", "-", "copy", "read", "cached", "data", "even", "without", "disabling", "checksums" ]
[ "public", "void", "test", "zero", "copy", "read", "of", "cached", "data", "(", ")", "throws", "exception", "{", "block", "reader", "test", "util", "enable", "short", "circuit", "shm", "tracing", "(", ")", ";", "block", "reader", "test", "util", "enable", "block", "reader", "factory", "tracing", "(", ")", ";", "block", "reader", "test", "util", "enable", "hdfs", "caching", "tracing", "(", ")", ";", "final", "int", "test", "file", "length", "=", "block", "size", ";", "final", "path", "test", "path", "=", "new", "path", "(", "\"", "/", "a", "\"", ")", ";", "final", "int", "random", "seed", "=", "23453", ";", "hdfs", "configuration", "conf", "=", "init", "zero", "copy", "test", "(", ")", ";", "conf", "set", "boolean", "(", "hdfs", "client", "config", "keys", "read", "short", "circuit", "skip", "checksum", "key", ",", "false", ")", ";", "final", "string", "context", "=", "\"", "test", "zero", "copy", "read", "of", "cached", "data", "\"", ";", "conf", "set", "(", "hdfs", "client", "config", "keys", "dfs", "client", "context", ",", "context", ")", ";", "conf", "set", "long", "(", "dfs", "datanode", "max", "locked", "memory", "key", ",", "d", "f", "s", "test", "util", "round", "up", "to", "multiple", "(", "test", "file", "length", ",", "(", "int", ")", "native", "i", "o", "posix", "get", "cache", "manipulator", "(", ")", "get", "operating", "system", "page", "size", "(", ")", ")", ")", ";", "mini", "d", "f", "s", "cluster", "cluster", "=", "null", ";", "byte", "buffer", "result", "=", "null", ",", "result", "2", "=", "null", ";", "cluster", "=", "new", "mini", "d", "f", "s", "cluster", "builder", "(", "conf", ")", "num", "data", "nodes", "(", "1", ")", "build", "(", ")", ";", "cluster", "wait", "active", "(", ")", ";", "fs", "dataset", "spi", "<", "?", ">", "fsd", "=", "cluster", "get", "data", "nodes", "(", ")", "get", "(", "0", ")", "get", "f", "s", "dataset", "(", ")", ";", "distributed", "file", "system", "fs", "=", "cluster", "get", "file", "system", "(", ")", ";", "d", "f", "s", "test", "util", "create", "file", "(", "fs", ",", "test", "path", ",", "test", "file", "length", ",", "(", "short", ")", "1", ",", "random", "seed", ")", ";", "d", "f", "s", "test", "util", "wait", "replication", "(", "fs", ",", "test", "path", ",", "(", "short", ")", "1", ")", ";", "byte", "original", "[", "]", "=", "d", "f", "s", "test", "util", "calculate", "file", "contents", "from", "seed", "(", "random", "seed", ",", "test", "file", "length", ")", ";", "/", "/", "prior", "to", "caching", ",", "the", "file", "can", "'", "t", "be", "read", "via", "zero", "-", "copy", "f", "s", "data", "input", "stream", "fs", "in", "=", "fs", "open", "(", "test", "path", ")", ";", "try", "{", "result", "=", "fs", "in", "read", "(", "null", ",", "test", "file", "length", "/", "2", ",", "enum", "set", "none", "of", "(", "read", "option", "class", ")", ")", ";", "assert", "fail", "(", "\"", "expected", "unsupported", "operation", "exception", "\"", ")", ";", "}", "catch", "(", "unsupported", "operation", "exception", "e", ")", "{", "/", "/", "expected", "}", "/", "/", "cache", "the", "file", "fs", "add", "cache", "pool", "(", "new", "cache", "pool", "info", "(", "\"", "pool", "1", "\"", ")", ")", ";", "long", "directive", "id", "=", "fs", "add", "cache", "directive", "(", "new", "cache", "directive", "info", "builder", "(", ")", "set", "path", "(", "test", "path", ")", "set", "replication", "(", "(", "short", ")", "1", ")", "set", "pool", "(", "\"", "pool", "1", "\"", ")", "build", "(", ")", ")", ";", "int", "num", "blocks", "=", "(", "int", ")", "math", "ceil", "(", "(", "double", ")", "test", "file", "length", "/", "block", "size", ")", ";", "d", "f", "s", "test", "util", "verify", "expected", "cache", "usage", "(", "d", "f", "s", "test", "util", "round", "up", "to", "multiple", "(", "test", "file", "length", ",", "block", "size", ")", ",", "num", "blocks", ",", "cluster", "get", "data", "nodes", "(", ")", "get", "(", "0", ")", "get", "f", "s", "dataset", "(", ")", ")", ";", "try", "{", "result", "=", "fs", "in", "read", "(", "null", ",", "test", "file", "length", ",", "enum", "set", "none", "of", "(", "read", "option", "class", ")", ")", ";", "}", "catch", "(", "unsupported", "operation", "exception", "e", ")", "{", "assert", "fail", "(", "\"", "expected", "to", "be", "able", "to", "read", "cached", "file", "via", "zero", "-", "copy", "\"", ")", ";", "}", "assert", "assert", "array", "equals", "(", "arrays", "copy", "of", "range", "(", "original", ",", "0", ",", "block", "size", ")", ",", "byte", "buffer", "to", "array", "(", "result", ")", ")", ";", "/", "/", "test", "that", "files", "opened", "after", "the", "cache", "operation", "has", "finished", "/", "/", "still", "get", "the", "benefits", "of", "zero", "-", "copy", "(", "regression", "test", "for", "hdfs", "-", "6086", ")", "f", "s", "data", "input", "stream", "fs", "in", "2", "=", "fs", "open", "(", "test", "path", ")", ";", "try", "{", "result", "2", "=", "fs", "in", "2", "read", "(", "null", ",", "test", "file", "length", ",", "enum", "set", "none", "of", "(", "read", "option", "class", ")", ")", ";", "}", "catch", "(", "unsupported", "operation", "exception", "e", ")", "{", "assert", "fail", "(", "\"", "expected", "to", "be", "able", "to", "read", "cached", "file", "via", "zero", "-", "copy", "\"", ")", ";", "}", "assert", "assert", "array", "equals", "(", "arrays", "copy", "of", "range", "(", "original", ",", "0", ",", "block", "size", ")", ",", "byte", "buffer", "to", "array", "(", "result", "2", ")", ")", ";", "fs", "in", "2", "release", "buffer", "(", "result", "2", ")", ";", "fs", "in", "2", "close", "(", ")", ";", "/", "/", "check", "that", "the", "replica", "is", "anchored", "final", "extended", "block", "first", "block", "=", "d", "f", "s", "test", "util", "get", "first", "block", "(", "fs", ",", "test", "path", ")", ";", "final", "short", "circuit", "cache", "cache", "=", "client", "context", "get", "(", "context", ",", "conf", ")", "get", "short", "circuit", "cache", "(", "0", ")", ";", "wait", "for", "replica", "anchor", "status", "(", "cache", ",", "first", "block", ",", "true", ",", "true", ",", "1", ")", ";", "/", "/", "uncache", "the", "replica", "fs", "remove", "cache", "directive", "(", "directive", "id", ")", ";", "wait", "for", "replica", "anchor", "status", "(", "cache", ",", "first", "block", ",", "false", ",", "true", ",", "1", ")", ";", "fs", "in", "release", "buffer", "(", "result", ")", ";", "wait", "for", "replica", "anchor", "status", "(", "cache", ",", "first", "block", ",", "false", ",", "false", ",", "1", ")", ";", "d", "f", "s", "test", "util", "verify", "expected", "cache", "usage", "(", "0", ",", "0", ",", "fsd", ")", ";", "fs", "in", "close", "(", ")", ";", "fs", "close", "(", ")", ";", "cluster", "shutdown", "(", ")", ";", "}" ]
[ "returns", "a", "new", "array", "of", "class", "object", "[", "]", "containing", "the", "elements", "of", "starlark", "iterable", "value", "{", "@", "code", "x", "}", "a", "starlark", "value", "is", "iterable", "if", "it", "implements", "{", "@", "link", "starlark", "iterable", "}" ]
[ "public", "static", "object", "[", "]", "to", "array", "(", "object", "x", ")", "throws", "eval", "exception", "{", "/", "/", "specialize", "sequence", "and", "dict", "to", "avoid", "allocation", "and", "/", "or", "indirection", "if", "(", "x", "instanceof", "sequence", ")", "{", "/", "/", "the", "returned", "array", "type", "must", "be", "exactly", "object", "[", "]", ",", "/", "/", "not", "a", "subclass", ",", "so", "calling", "to", "array", "(", ")", "is", "not", "enough", "return", "(", "(", "sequence", "<", "?", ">", ")", "x", ")", "to", "array", "(", "empty", ")", ";", "}", "else", "if", "(", "x", "instanceof", "dict", ")", "{", "return", "(", "(", "dict", "<", "?", ",", "?", ">", ")", "x", ")", "key", "set", "(", ")", "to", "array", "(", ")", ";", "}", "else", "{", "return", "iterables", "to", "array", "(", "to", "iterable", "(", "x", ")", ",", "object", "class", ")", ";", "}", "}" ]
[ "creates", "a", "bitmap", "with", "the", "specified", "width", "and", "height", "its", "initial", "density", "is", "determined", "from", "the", "given", "display", "metrics" ]
[ "public", "closeable", "reference", "<", "bitmap", ">", "create", "bitmap", "(", "display", "metrics", "display", ",", "int", "[", "]", "colors", ",", "int", "offset", ",", "int", "stride", ",", "int", "width", ",", "int", "height", ",", "bitmap", "config", "config", ")", "{", "return", "create", "bitmap", "(", "display", ",", "colors", ",", "offset", ",", "stride", ",", "width", ",", "height", ",", "config", ",", "null", ")", ";", "}" ]
[ "get", "all", "the", "jobs", "in", "cluster" ]
[ "public", "job", "[", "]", "get", "all", "jobs", "(", ")", "throws", "i", "o", "exception", ",", "interrupted", "exception", "{", "return", "get", "jobs", "(", "client", "get", "all", "jobs", "(", ")", ")", ";", "}" ]
[ "where", "the", "attribute", "was", "defined", "within", "the", "&", "lt", ";", "declare", "-", "styleable", "&", "gt", ";", "block", "<", "code", ">", "optional", "aapt", "pb", "source", "source", "=", "1", ";", "<", "code", ">" ]
[ "public", "boolean", "has", "source", "(", ")", "{", "return", "(", "(", "bit", "field", "0", "&", "0x", "0", "0", "0", "0", "0", "0", "0", "1", ")", "=", "=", "0x", "0", "0", "0", "0", "0", "0", "0", "1", ")", ";", "}" ]
[ "sets", "the", "animation", "from", "a", "file", "in", "the", "raw", "directory", "this", "will", "load", "and", "deserialize", "the", "file", "asynchronously" ]
[ "public", "void", "set", "animation", "(", "@", "raw", "res", "final", "int", "raw", "res", ")", "{", "this", "animation", "res", "id", "=", "raw", "res", ";", "animation", "name", "=", "null", ";", "set", "composition", "task", "(", "from", "raw", "res", "(", "raw", "res", ")", ")", ";", "}" ]
[ "returns", "a", "byte", "array", "containing", "the", "bytes", "from", "{", "@", "code", "start", "}", "to", "this", "section", "'", "s", "current", "position" ]
[ "private", "byte", "[", "]", "get", "bytes", "from", "(", "int", "start", ")", "{", "int", "end", "=", "data", "position", "(", ")", ";", "byte", "[", "]", "result", "=", "new", "byte", "[", "end", "-", "start", "]", ";", "data", "position", "(", "start", ")", ";", "data", "get", "(", "result", ")", ";", "return", "result", ";", "}" ]
[ "cancel", "any", "scheduled", "run" ]
[ "public", "synchronized", "void", "close", "(", ")", "{", "if", "(", "closed", "compare", "and", "set", "(", "false", ",", "true", ")", ")", "{", "cancel", "(", ")", ";", "}", "}" ]
[ "get", "ship", "date" ]
[ "public", "date", "get", "ship", "date", "(", ")", "{", "return", "ship", "date", ";", "}" ]
[ "find", "plugins", "and", "return", "a", "corresponding", "collection", "of", "{", "@", "link", "plugin", "descriptor", "}", "instances" ]
[ "collection", "<", "plugin", "descriptor", ">", "find", "plugins", "(", ")", "throws", "i", "o", "exception", ";" ]
[ "sets", "the", "time", "without", "read", "activity", "before", "sending", "a", "keepalive", "ping", "an", "unreasonably", "small", "value", "might", "be", "increased", ",", "and", "{", "@", "code", "long", "max", "value", "}", "nano", "seconds", "or", "an", "unreasonably", "large", "value", "will", "disable", "keepalive", "defaults", "to", "infinite", "clients", "must", "receive", "permission", "from", "the", "service", "owner", "before", "enabling", "this", "option", "keepalives", "can", "increase", "the", "load", "on", "services", "and", "are", "commonly", "\"", "invisible", "\"", "making", "it", "hard", "to", "notice", "when", "they", "are", "causing", "excessive", "load", "clients", "are", "strongly", "encouraged", "to", "use", "only", "as", "small", "of", "a", "value", "as", "necessary" ]
[ "public", "t", "keep", "alive", "time", "(", "long", "keep", "alive", "time", ",", "time", "unit", "time", "unit", ")", "{", "throw", "new", "unsupported", "operation", "exception", "(", ")", ";", "}" ]
[ "build", "call", "for", "get", "inventory" ]
[ "public", "okhttp", "3", "call", "get", "inventory", "call", "(", "final", "api", "callback", "callback", ")", "throws", "api", "exception", "{", "object", "local", "var", "post", "body", "=", "null", ";", "/", "/", "create", "path", "and", "map", "variables", "string", "local", "var", "path", "=", "\"", "/", "store", "/", "inventory", "\"", ";", "list", "<", "pair", ">", "local", "var", "query", "params", "=", "new", "array", "list", "<", "pair", ">", "(", ")", ";", "list", "<", "pair", ">", "local", "var", "collection", "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", "=", "local", "var", "api", "client", "select", "header", "accept", "(", "local", "var", "accepts", ")", ";", "if", "(", "local", "var", "accept", "!", "=", "null", ")", "{", "local", "var", "header", "params", "put", "(", "\"", "accept", "\"", ",", "local", "var", "accept", ")", ";", "}", "final", "string", "[", "]", "local", "var", "content", "types", "=", "{", "}", ";", "final", "string", "local", "var", "content", "type", "=", "local", "var", "api", "client", "select", "header", "content", "type", "(", "local", "var", "content", "types", ")", ";", "local", "var", "header", "params", "put", "(", "\"", "content", "-", "type", "\"", ",", "local", "var", "content", "type", ")", ";", "string", "[", "]", "local", "var", "auth", "names", "=", "new", "string", "[", "]", "{", "\"", "api", "key", "\"", "}", ";", "return", "local", "var", "api", "client", "build", "call", "(", "local", "var", "path", ",", "\"", "get", "\"", ",", "local", "var", "query", "params", ",", "local", "var", "collection", "query", "params", ",", "local", "var", "post", "body", ",", "local", "var", "header", "params", ",", "local", "var", "cookie", "params", ",", "local", "var", "form", "params", ",", "local", "var", "auth", "names", ",", "callback", ")", ";", "}" ]
[ "the", "compare", "test", "creates", "a", "sorted", "stream", ",", "writes", "it", "to", "the", "buffer", "and", "compares", "random", "elements", "it", "expects", "that", "earlier", "elements", "are", "lower", "than", "later", "ones" ]
[ "public", "void", "test", "compare", "(", ")", "throws", "exception", "{", "final", "int", "num", "segments", "=", "memory", "size", "/", "memory", "page", "size", ";", "final", "list", "<", "memory", "segment", ">", "memory", "=", "this", "memory", "manager", "allocate", "pages", "(", "new", "dummy", "invokable", "(", ")", ",", "num", "segments", ")", ";", "normalized", "key", "sorter", "<", "tuple", "2", "<", "integer", ",", "string", ">", ">", "sorter", "=", "new", "sort", "buffer", "(", "memory", ")", ";", "test", "data", "tuple", "generator", "generator", "=", "new", "test", "data", "tuple", "generator", "(", "seed", ",", "key", "max", ",", "value", "length", ",", "key", "mode", "sorted", ",", "value", "mode", "random", "length", ")", ";", "/", "/", "write", "the", "records", "tuple", "2", "<", "integer", ",", "string", ">", "record", "=", "new", "tuple", "2", "<", ">", "(", ")", ";", "int", "num", "=", "-", "1", ";", "do", "{", "generator", "next", "(", "record", ")", ";", "num", "+", "+", ";", "}", "while", "(", "sorter", "write", "(", "record", ")", ")", ";", "/", "/", "compare", "random", "elements", "random", "rnd", "=", "new", "random", "(", "seed", "<", "<", "1", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "2", "*", "num", ";", "i", "+", "+", ")", "{", "int", "pos", "1", "=", "rnd", "next", "int", "(", "num", ")", ";", "int", "pos", "2", "=", "rnd", "next", "int", "(", "num", ")", ";", "int", "cmp", "=", "sorter", "compare", "(", "pos", "1", ",", "pos", "2", ")", ";", "if", "(", "pos", "1", "<", "pos", "2", ")", "{", "assert", "assert", "true", "(", "cmp", "<", "=", "0", ")", ";", "}", "else", "{", "assert", "assert", "true", "(", "cmp", ">", "=", "0", ")", ";", "}", "}", "/", "/", "release", "the", "memory", "occupied", "by", "the", "buffers", "sorter", "dispose", "(", ")", ";", "this", "memory", "manager", "release", "(", "memory", ")", ";", "}" ]
[ "the", "default", "character", "set", "to", "use", "for", "reading", "form", "data", "this", "is", "a", "shortcut", "for", ":", "<", "br", ">", "{", "@", "code", "get", "form", "converter", "set", "charset", "(", "charset", ")", "}" ]
[ "public", "void", "set", "charset", "(", "charset", "charset", ")", "{", "this", "form", "converter", "set", "charset", "(", "charset", ")", ";", "}" ]
[ "verifies", "certain", "behavior", "happened", "at", "least", "once", "exact", "number", "of", "times", "never", "e", "g", ":", "<", "pre", "class", "=", "\"", "code", "\"", ">", "<", "code", "class", "=", "\"", "java", "\"", ">", "verify", "(", "mock", ",", "times", "(", "5", ")", ")", "some", "method", "(", "\"", "was", "called", "five", "times", "\"", ")", ";", "verify", "(", "mock", ",", "at", "least", "(", "2", ")", ")", "some", "method", "(", "\"", "was", "called", "at", "least", "two", "times", "\"", ")", ";", "you", "can", "use", "flexible", "argument", "matchers", ",", "e", "g", ":", "verify", "(", "mock", ",", "at", "least", "once", "(", ")", ")", "some", "method", "(", "<", "b", ">", "any", "string", "(", ")", "<", "b", ">", ")", ";", "<", "code", ">", "<", "b", ">", "times", "(", "1", ")", "is", "the", "default", "<", "b", ">", "and", "can", "be", "omitted", "arguments", "passed", "are", "compared", "using", "<", "code", ">", "equals", "(", ")", "<", "code", ">", "method", "read", "about", "{", "@", "link", "argument", "captor", "}", "or", "{", "@", "link", "argument", "matcher", "}", "to", "find", "out", "other", "ways", "of", "matching", "asserting", "arguments", "passed" ]
[ "public", "static", "<", "t", ">", "t", "verify", "(", "t", "mock", ",", "verification", "mode", "mode", ")", "{", "return", "mockito", "core", "verify", "(", "mock", ",", "mode", ")", ";", "}" ]
[ "update", "physics", "component", "of", "game" ]
[ "public", "void", "update", "(", ")", "{", "logger", "info", "(", "\"", "update", "physics", "component", "of", "game", "\"", ")", ";", "}" ]
[ "creates", "a", "pipeline", "with", "the", "current", "version", "'", "s", "pipeline", "definition" ]
[ "public", "static", "void", "create", "(", "client", "client", ",", "action", "listener", "<", "acknowledged", "response", ">", "listener", ")", "{", "final", "bytes", "reference", "pipeline", "=", "bytes", "reference", "bytes", "(", "current", "enrich", "pipeline", "definition", "(", "x", "content", "type", "json", ")", ")", ";", "final", "put", "pipeline", "request", "request", "=", "new", "put", "pipeline", "request", "(", "pipeline", "name", "(", ")", ",", "pipeline", ",", "x", "content", "type", "json", ")", ";", "client", "admin", "(", ")", "cluster", "(", ")", "put", "pipeline", "(", "request", ",", "listener", ")", ";", "}" ]
[ "called", "when", "a", "rds", "response", "is", "received" ]
[ "protected", "void", "handle", "rds", "response", "(", "string", "version", "info", ",", "list", "<", "any", ">", "resources", ",", "string", "nonce", ")", "{", "}" ]
[ "check", "if", "a", "specific", "resource", "is", "evictable", "according", "to", "the", "store", "'", "s", "enabled", "cache", "eviction", "policies" ]
[ "public", "abstract", "boolean", "is", "resource", "evictable", "(", "string", "key", ",", "file", "status", "file", ")", ";" ]
[ "model", "tests", "for", "enum", "class" ]
[ "public", "void", "test", "enum", "class", "(", ")", "{", "/", "/", "todo", ":", "test", "enum", "class", "}" ]
[ "substitutes", "each", "{", "@", "code", "%", "s", "}", "in", "{", "@", "code", "template", "}", "with", "an", "argument", "these", "are", "matched", "by", "position", ":", "the", "first", "{", "@", "code", "%", "s", "}", "gets", "{", "@", "code", "args", "[", "0", "]", "}", ",", "etc", "if", "there", "are", "more", "arguments", "than", "placeholders", ",", "the", "unmatched", "arguments", "will", "be", "appended", "to", "the", "end", "of", "the", "formatted", "message", "in", "square", "braces" ]
[ "static", "string", "format", "(", "@", "nullable", "string", "template", ",", "object", "args", ")", "{", "template", "=", "string", "value", "of", "(", "template", ")", ";", "/", "/", "null", "-", ">", "\"", "null", "\"", "/", "/", "start", "substituting", "the", "arguments", "into", "the", "'", "%", "s", "'", "placeholders", "string", "builder", "builder", "=", "new", "string", "builder", "(", "template", "length", "(", ")", "+", "16", "*", "args", "length", ")", ";", "int", "template", "start", "=", "0", ";", "int", "i", "=", "0", ";", "while", "(", "i", "<", "args", "length", ")", "{", "int", "placeholder", "start", "=", "template", "index", "of", "(", "\"", "%", "s", "\"", ",", "template", "start", ")", ";", "if", "(", "placeholder", "start", "=", "=", "-", "1", ")", "{", "break", ";", "}", "builder", "append", "(", "template", "substring", "(", "template", "start", ",", "placeholder", "start", ")", ")", ";", "builder", "append", "(", "args", "[", "i", "+", "+", "]", ")", ";", "template", "start", "=", "placeholder", "start", "+", "2", ";", "}", "builder", "append", "(", "template", "substring", "(", "template", "start", ")", ")", ";", "/", "/", "if", "we", "run", "out", "of", "placeholders", ",", "append", "the", "extra", "args", "in", "square", "braces", "if", "(", "i", "<", "args", "length", ")", "{", "builder", "append", "(", "\"", "[", "\"", ")", ";", "builder", "append", "(", "args", "[", "i", "+", "+", "]", ")", ";", "while", "(", "i", "<", "args", "length", ")", "{", "builder", "append", "(", "\"", ",", "\"", ")", ";", "builder", "append", "(", "args", "[", "i", "+", "+", "]", ")", ";", "}", "builder", "append", "(", "'", "]", "'", ")", ";", "}", "return", "builder", "to", "string", "(", ")", ";", "}" ]
[ "{", "@", "inherit", "doc", "}" ]
[ "public", "boolean", "was", "null", "(", ")", "throws", "s", "q", "l", "exception", "{", "return", "false", ";", "}" ]
[ "returns", "the", "label", "of", "the", "xcode", "config", "rule", "to", "use", "for", "resolving", "the", "host", "system", "xcode", "version" ]
[ "public", "label", "get", "xcode", "config", "label", "(", ")", "{", "return", "null", ";", "}" ]
[ "returns", "a", "value", "that", "satisfies", "the", "contract", "of", "the", "{", "@", "link", "#", "value", "}", "field", "based", "on", "the", "state", "of", "given", "future", "this", "is", "approximately", "the", "inverse", "of", "{", "@", "link", "#", "get", "done", "value", "(", "object", ")", "}" ]
[ "private", "static", "object", "get", "future", "value", "(", "listenable", "future", "<", "?", ">", "future", ")", "{", "if", "(", "future", "instanceof", "trusted", ")", "{", "/", "/", "break", "encapsulation", "for", "trusted", "future", "instances", "since", "we", "know", "that", "subclasses", "cannot", "/", "/", "override", "get", "(", ")", "(", "since", "it", "is", "final", ")", "and", "therefore", "this", "is", "equivalent", "to", "calling", "get", "(", ")", "/", "/", "and", "unpacking", "the", "exceptions", "like", "we", "do", "below", "(", "just", "much", "faster", "because", "it", "is", "a", "single", "/", "/", "field", "read", "instead", "of", "a", "read", ",", "several", "branches", "and", "possibly", "creating", "exceptions", ")", "object", "v", "=", "(", "(", "abstract", "future", "<", "?", ">", ")", "future", ")", "value", ";", "if", "(", "v", "instanceof", "cancellation", ")", "{", "/", "/", "if", "the", "other", "future", "was", "interrupted", ",", "clear", "the", "interrupted", "bit", "while", "preserving", "the", "cause", "/", "/", "this", "will", "make", "it", "consistent", "with", "how", "non", "-", "trustedfutures", "work", "which", "cannot", "propagate", "the", "/", "/", "was", "interrupted", "bit", "cancellation", "c", "=", "(", "cancellation", ")", "v", ";", "if", "(", "c", "was", "interrupted", ")", "{", "v", "=", "c", "cause", "!", "=", "null", "?", "new", "cancellation", "(", "/", "*", "was", "interrupted", "=", "*", "/", "false", ",", "c", "cause", ")", ":", "cancellation", "causeless", "cancelled", ";", "}", "}", "return", "v", ";", "}", "if", "(", "future", "instanceof", "internal", "future", "failure", "access", ")", "{", "throwable", "throwable", "=", "internal", "futures", "try", "internal", "fast", "path", "get", "failure", "(", "(", "internal", "future", "failure", "access", ")", "future", ")", ";", "if", "(", "throwable", "!", "=", "null", ")", "{", "return", "new", "failure", "(", "throwable", ")", ";", "}", "}", "boolean", "was", "cancelled", "=", "future", "is", "cancelled", "(", ")", ";", "/", "/", "don", "'", "t", "allocate", "a", "cancellation", "exception", "if", "it", "'", "s", "not", "necessary", "if", "(", "!", "generate", "cancellation", "causes", "&", "was", "cancelled", ")", "{", "return", "cancellation", "causeless", "cancelled", ";", "}", "/", "/", "otherwise", "calculate", "the", "value", "by", "calling", "get", "(", ")", "try", "{", "object", "v", "=", "get", "uninterruptibly", "(", "future", ")", ";", "if", "(", "was", "cancelled", ")", "{", "return", "new", "cancellation", "(", "false", ",", "new", "illegal", "argument", "exception", "(", "\"", "get", "(", ")", "did", "not", "throw", "cancellation", "exception", ",", "despite", "reporting", "\"", "+", "\"", "is", "cancelled", "(", ")", "=", "=", "true", ":", "\"", "+", "future", ")", ")", ";", "}", "return", "v", "=", "=", "null", "?", "null", ":", "v", ";", "}", "catch", "(", "execution", "exception", "exception", ")", "{", "if", "(", "was", "cancelled", ")", "{", "return", "new", "cancellation", "(", "false", ",", "new", "illegal", "argument", "exception", "(", "\"", "get", "(", ")", "did", "not", "throw", "cancellation", "exception", ",", "despite", "reporting", "\"", "+", "\"", "is", "cancelled", "(", ")", "=", "=", "true", ":", "\"", "+", "future", ",", "exception", ")", ")", ";", "}", "return", "new", "failure", "(", "exception", "get", "cause", "(", ")", ")", ";", "}", "catch", "(", "cancellation", "exception", "cancellation", ")", "{", "if", "(", "!", "was", "cancelled", ")", "{", "return", "new", "failure", "(", "new", "illegal", "argument", "exception", "(", "\"", "get", "(", ")", "threw", "cancellation", "exception", ",", "despite", "reporting", "is", "cancelled", "(", ")", "=", "=", "false", ":", "\"", "+", "future", ",", "cancellation", ")", ")", ";", "}", "return", "new", "cancellation", "(", "false", ",", "cancellation", ")", ";", "}", "catch", "(", "throwable", "t", ")", "{", "return", "new", "failure", "(", "t", ")", ";", "}", "}" ]
[ "return", "the", "pattern", "for", "the", "exception", "name" ]
[ "public", "string", "get", "exception", "name", "(", ")", "{", "return", "this", "exception", "name", ";", "}" ]
[ "expert", ":", "set", "the", "collection", "mode" ]
[ "public", "terms", "aggregation", "builder", "collect", "mode", "(", "sub", "agg", "collection", "mode", "collect", "mode", ")", "{", "if", "(", "collect", "mode", "=", "=", "null", ")", "{", "throw", "new", "illegal", "argument", "exception", "(", "\"", "[", "collect", "mode", "]", "must", "not", "be", "null", ":", "[", "\"", "+", "name", "+", "\"", "]", "\"", ")", ";", "}", "this", "collect", "mode", "=", "collect", "mode", ";", "return", "this", ";", "}" ]
[ "test", "the", "property", "'", "string", "item", "'" ]
[ "public", "void", "string", "item", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "string", "item", "}" ]
[ "assert", "the", "response", "status", "code", "is", "{", "@", "code", "http", "status", "moved", "permanently", "}", "(", "301", ")" ]
[ "public", "result", "matcher", "is", "moved", "permanently", "(", ")", "{", "return", "matcher", "(", "http", "status", "moved", "permanently", ")", ";", "}" ]
[ "confirm", "our", "jdbc", "template", "is", "used" ]
[ "public", "void", "test", "stored", "procedure", "configured", "via", "jdbc", "template", "(", ")", "throws", "exception", "{", "given", "(", "callable", "statement", "execute", "(", ")", ")", "will", "return", "(", "false", ")", ";", "given", "(", "callable", "statement", "get", "update", "count", "(", ")", ")", "will", "return", "(", "-", "1", ")", ";", "given", "(", "callable", "statement", "get", "object", "(", "2", ")", ")", "will", "return", "(", "4", ")", ";", "given", "(", "connection", "prepare", "call", "(", "\"", "{", "call", "\"", "+", "stored", "procedure", "configured", "via", "jdbc", "template", "sql", "+", "\"", "(", "?", ",", "?", ")", "}", "\"", ")", ")", "will", "return", "(", "callable", "statement", ")", ";", "jdbc", "template", "t", "=", "new", "jdbc", "template", "(", ")", ";", "t", "set", "data", "source", "(", "data", "source", ")", ";", "stored", "procedure", "configured", "via", "jdbc", "template", "sp", "=", "new", "stored", "procedure", "configured", "via", "jdbc", "template", "(", "t", ")", ";", "assert", "that", "(", "sp", "execute", "(", "1106", ")", ")", "is", "equal", "to", "(", "4", ")", ";", "verify", "(", "callable", "statement", ")", "set", "object", "(", "1", ",", "1106", ",", "types", "integer", ")", ";", "verify", "(", "callable", "statement", ")", "register", "out", "parameter", "(", "2", ",", "types", "integer", ")", ";", "}" ]
[ "{", "@", "link", "executor", "}", "running", "this", "work", "unit", "{", "@", "link", "executor", "#", "get", "current", "work", "unit", "(", ")", "}", "and", "{", "@", "link", "work", "unit", "#", "get", "executor", "(", ")", "}", "form", "a", "bi", "-", "directional", "reachability", "between", "them" ]
[ "public", "@", "check", "for", "null", "executor", "get", "executor", "(", ")", "{", "return", "executor", ";", "}" ]
[ "gets", "cas", "properties" ]
[ "public", "static", "optional", "<", "cas", "configuration", "properties", ">", "get", "cas", "configuration", "properties", "(", ")", "{", "if", "(", "context", "!", "=", "null", ")", "{", "return", "optional", "of", "(", "context", "get", "bean", "(", "cas", "configuration", "properties", "class", ")", ")", ";", "}", "return", "optional", "empty", "(", ")", ";", "}" ]
[ "compares", "this", "and", "another", "\"", "produces", "\"", "condition", "as", "follows", ":", "sort", "'", "accept", "'", "header", "media", "types", "by", "quality", "value", "via", "{", "@", "link", "media", "type", "#", "sort", "by", "quality", "value", "(", "list", ")", "}", "and", "iterate", "the", "list", "get", "the", "first", "index", "of", "matching", "media", "types", "in", "each", "\"", "produces", "\"", "condition", "first", "matching", "with", "{", "@", "link", "media", "type", "#", "equals", "(", "object", ")", "}", "and", "then", "with", "{", "@", "link", "media", "type", "#", "includes", "(", "media", "type", ")", "}", "if", "a", "lower", "index", "is", "found", ",", "the", "condition", "at", "that", "index", "wins", "if", "both", "indexes", "are", "equal", ",", "the", "media", "types", "at", "the", "index", "are", "compared", "further", "with", "{", "@", "link", "media", "type", "#", "specificity", "comparator", "}", "it", "is", "assumed", "that", "both", "instances", "have", "been", "obtained", "via", "{", "@", "link", "#", "get", "matching", "condition", "(", "server", "web", "exchange", ")", "}", "and", "each", "instance", "contains", "the", "matching", "producible", "media", "type", "expression", "only", "or", "is", "otherwise", "empty" ]
[ "public", "int", "compare", "to", "(", "produces", "request", "condition", "other", ",", "server", "web", "exchange", "exchange", ")", "{", "try", "{", "list", "<", "media", "type", ">", "accepted", "media", "types", "=", "get", "accepted", "media", "types", "(", "exchange", ")", ";", "for", "(", "media", "type", "accepted", "media", "type", ":", "accepted", "media", "types", ")", "{", "int", "this", "index", "=", "this", "index", "of", "equal", "media", "type", "(", "accepted", "media", "type", ")", ";", "int", "other", "index", "=", "other", "index", "of", "equal", "media", "type", "(", "accepted", "media", "type", ")", ";", "int", "result", "=", "compare", "matching", "media", "types", "(", "this", ",", "this", "index", ",", "other", ",", "other", "index", ")", ";", "if", "(", "result", "!", "=", "0", ")", "{", "return", "result", ";", "}", "this", "index", "=", "this", "index", "of", "included", "media", "type", "(", "accepted", "media", "type", ")", ";", "other", "index", "=", "other", "index", "of", "included", "media", "type", "(", "accepted", "media", "type", ")", ";", "result", "=", "compare", "matching", "media", "types", "(", "this", ",", "this", "index", ",", "other", ",", "other", "index", ")", ";", "if", "(", "result", "!", "=", "0", ")", "{", "return", "result", ";", "}", "}", "return", "0", ";", "}", "catch", "(", "not", "acceptable", "status", "exception", "ex", ")", "{", "/", "/", "should", "never", "happen", "throw", "new", "illegal", "state", "exception", "(", "\"", "cannot", "compare", "without", "having", "any", "requested", "media", "types", "\"", ",", "ex", ")", ";", "}", "}" ]
[ "get", "capital", "camel" ]
[ "public", "string", "get", "capital", "camel", "(", ")", "{", "return", "capital", "camel", ";", "}" ]
[ "return", "the", "configured", "user", "destination", "prefix" ]
[ "public", "string", "get", "user", "destination", "prefix", "(", ")", "{", "return", "this", "destination", "prefix", ";", "}" ]
[ "test", "application", "that", "prints", "out", "the", "individual", "words", "of", "the", "argument", "list" ]
[ "public", "static", "void", "main", "(", "string", "[", "]", "args", ")", "{", "try", "{", "word", "reader", "reader", "=", "new", "argument", "word", "reader", "(", "args", ",", "null", ")", ";", "try", "{", "while", "(", "true", ")", "{", "string", "word", "=", "reader", "next", "word", "(", "false", ")", ";", "if", "(", "word", "=", "=", "null", ")", "system", "exit", "(", "-", "1", ")", ";", "system", "err", "println", "(", "\"", "[", "\"", "+", "word", "+", "\"", "]", "\"", ")", ";", "}", "}", "catch", "(", "exception", "ex", ")", "{", "ex", "print", "stack", "trace", "(", ")", ";", "}", "finally", "{", "reader", "close", "(", ")", ";", "}", "}", "catch", "(", "i", "o", "exception", "ex", ")", "{", "ex", "print", "stack", "trace", "(", ")", ";", "}", "}" ]
[ "return", "the", "configured", "message", "converters" ]
[ "public", "list", "<", "http", "message", "reader", "<", "?", ">", ">", "get", "message", "readers", "(", ")", "{", "return", "this", "message", "readers", ";", "}" ]
[ "helper", "to", "decode", "half", "of", "a", "hexadecimal", "number", "from", "a", "string" ]
[ "private", "static", "char", "decode", "hex", "nibble", "(", "final", "char", "c", ")", "{", "if", "(", "'", "0", "'", "<", "=", "c", "&", "&", "c", "<", "=", "'", "9", "'", ")", "{", "return", "(", "char", ")", "(", "c", "-", "'", "0", "'", ")", ";", "}", "else", "if", "(", "'", "a", "'", "<", "=", "c", "&", "&", "c", "<", "=", "'", "f", "'", ")", "{", "return", "(", "char", ")", "(", "c", "-", "'", "a", "'", "+", "10", ")", ";", "}", "else", "if", "(", "'", "a", "'", "<", "=", "c", "&", "&", "c", "<", "=", "'", "f", "'", ")", "{", "return", "(", "char", ")", "(", "c", "-", "'", "a", "'", "+", "10", ")", ";", "}", "else", "{", "return", "character", "max", "value", ";", "}", "}" ]
[ "builder", "method", "for", "created", "parameter" ]
[ "public", "builder", "with", "created", "(", "date", "created", ")", "{", "this", "created", "=", "created", ";", "return", "this", ";", "}" ]
[ "@", "t", "c", "description", ":", ",", ",", ",", ",", "@", "test", "step", ":", "@", "expect", "result", ":" ]
[ "public", "void", "multiple", "tenant", "group", "patch", "instance", "(", ")", "throws", "exception", "{", "string", "service", "name", "=", "random", "domain", "name", "(", ")", ";", "naming", "1", "register", "instance", "(", "service", "name", ",", "\"", "11", "11", "11", "11", "\"", ",", "80", ")", ";", "naming", "2", "register", "instance", "(", "service", "name", ",", "test", "group", "2", ",", "\"", "22", "22", "22", "22", "\"", ",", "80", ")", ";", "time", "unit", "seconds", "sleep", "(", "5l", ")", ";", "response", "entity", "<", "string", ">", "response", "=", "request", "(", "\"", "/", "nacos", "/", "v", "1", "/", "ns", "/", "instance", "\"", ",", "params", "new", "params", "(", ")", "append", "param", "(", "\"", "service", "name", "\"", ",", "service", "name", ")", "append", "param", "(", "\"", "group", "name", "\"", ",", "test", "group", "2", ")", "append", "param", "(", "\"", "ip", "\"", ",", "\"", "22", "22", "22", "22", "\"", ")", "append", "param", "(", "\"", "port", "\"", ",", "\"", "80", "\"", ")", "append", "param", "(", "\"", "namespace", "id", "\"", ",", "\"", "namespace", "-", "2", "\"", ")", "append", "param", "(", "\"", "weight", "\"", ",", "\"", "8", "0", "\"", ")", "done", "(", ")", ",", "string", "class", ",", "http", "method", "put", ")", ";", "assert", "assert", "true", "(", "response", "get", "status", "code", "(", ")", "is", "2xx", "successful", "(", ")", ")", ";", "response", "=", "request", "(", "\"", "/", "nacos", "/", "v", "1", "/", "ns", "/", "instance", "\"", ",", "params", "new", "params", "(", ")", "append", "param", "(", "\"", "service", "name", "\"", ",", "service", "name", ")", "append", "param", "(", "\"", "group", "name", "\"", ",", "test", "group", "2", ")", "append", "param", "(", "\"", "ip", "\"", ",", "\"", "22", "22", "22", "22", "\"", ")", "append", "param", "(", "\"", "port", "\"", ",", "\"", "80", "\"", ")", "append", "param", "(", "\"", "namespace", "id", "\"", ",", "\"", "namespace", "-", "2", "\"", ")", "done", "(", ")", ",", "string", "class", ",", "http", "method", "patch", ")", ";", "assert", "assert", "true", "(", "response", "get", "status", "code", "(", ")", "is", "2xx", "successful", "(", ")", ")", ";", "response", "=", "request", "(", "\"", "/", "nacos", "/", "v", "1", "/", "ns", "/", "instance", "/", "list", "\"", ",", "params", "new", "params", "(", ")", "append", "param", "(", "\"", "service", "name", "\"", ",", "service", "name", ")", "/", "/", "append", "param", "(", "\"", "namespace", "id", "\"", ",", "\"", "namespace", "-", "2", "\"", ")", "append", "param", "(", "\"", "group", "name", "\"", ",", "test", "group", "2", ")", "done", "(", ")", ",", "string", "class", ")", ";", "assert", "assert", "true", "(", "response", "get", "status", "code", "(", ")", "is", "2xx", "successful", "(", ")", ")", ";", "json", "node", "json", "=", "jackson", "utils", "to", "obj", "(", "response", "get", "body", "(", ")", ")", ";", "assert", "assert", "equals", "(", "1", ",", "json", "get", "(", "\"", "hosts", "\"", ")", "size", "(", ")", ")", ";", "assert", "assert", "equals", "(", "\"", "8", "0", "\"", ",", "json", "get", "(", "\"", "hosts", "\"", ")", "get", "(", "0", ")", "get", "(", "\"", "weight", "\"", ")", "as", "text", "(", ")", ")", ";", "}" ]
[ "allocate", "a", "fully", "-", "undefined", "pattern", "block", "of", "the", "given", "length" ]
[ "public", "static", "assembly", "pattern", "block", "from", "length", "(", "int", "length", ")", "{", "byte", "[", "]", "mask", "=", "new", "byte", "[", "length", "]", ";", "byte", "[", "]", "vals", "=", "new", "byte", "[", "length", "]", ";", "return", "new", "assembly", "pattern", "block", "(", "0", ",", "mask", ",", "vals", ")", ";", "}" ]
[ "return", "the", "{", "@", "link", "view", "resolver", "view", "resolvers", "}", "to", "be", "used", "for", "view", "name", "resolution" ]
[ "list", "<", "view", "resolver", ">", "view", "resolvers", "(", ")", ";" ]
[ "do", "branch", "rollback" ]
[ "protected", "void", "do", "branch", "rollback", "(", "branch", "rollback", "request", "request", ",", "branch", "rollback", "response", "response", ")", "throws", "transaction", "exception", "{", "string", "xid", "=", "request", "get", "xid", "(", ")", ";", "long", "branch", "id", "=", "request", "get", "branch", "id", "(", ")", ";", "string", "resource", "id", "=", "request", "get", "resource", "id", "(", ")", ";", "string", "application", "data", "=", "request", "get", "application", "data", "(", ")", ";", "if", "(", "logger", "is", "info", "enabled", "(", ")", ")", "{", "logger", "info", "(", "\"", "branch", "rollbacking", ":", "\"", "+", "xid", "+", "\"", "\"", "+", "branch", "id", "+", "\"", "\"", "+", "resource", "id", ")", ";", "}", "branch", "status", "status", "=", "get", "resource", "manager", "(", ")", "branch", "rollback", "(", "request", "get", "branch", "type", "(", ")", ",", "xid", ",", "branch", "id", ",", "resource", "id", ",", "application", "data", ")", ";", "response", "set", "xid", "(", "xid", ")", ";", "response", "set", "branch", "id", "(", "branch", "id", ")", ";", "response", "set", "branch", "status", "(", "status", ")", ";", "if", "(", "logger", "is", "info", "enabled", "(", ")", ")", "{", "logger", "info", "(", "\"", "branch", "rollbacked", "result", ":", "\"", "+", "status", ")", ";", "}", "}" ]
[ "returns", "a", "normalizer", "that", "splits", "on", "whitespace", "mapped", "to", "the", "given", "name", "or", "<", "code", ">", "null", "<", "code", ">", "if", "not", "present" ]
[ "public", "named", "analyzer", "get", "whitespace", "normalizer", "(", "string", "name", ")", "{", "return", "whitespace", "normalizers", "get", "(", "name", ")", ";", "}" ]
[ "loads", "the", "integer", "value", "from", "the", "variable", "with", "the", "given", "index" ]
[ "public", "integer", "value", "iload", "(", "int", "index", ")", "{", "return", "load", "(", "index", ")", "integer", "value", "(", ")", ";", "}" ]
[ "set", "the", "network", "timeout", ",", "if", "<", "code", ">", "is", "use", "network", "timeout", "<", "code", ">", "is", "<", "code", ">", "true", "<", "code", ">", "and", "the", "driver", "supports", "it" ]
[ "private", "void", "set", "network", "timeout", "(", "final", "connection", "connection", ",", "final", "long", "timeout", "ms", ")", "throws", "s", "q", "l", "exception", "{", "if", "(", "is", "network", "timeout", "supported", "=", "=", "true", ")", "{", "connection", "set", "network", "timeout", "(", "net", "timeout", "executor", ",", "(", "int", ")", "timeout", "ms", ")", ";", "}", "}" ]
[ "executes", "a", "search", "using", "the", "search", "scroll", "api", "see", "<", "a", "href", "=", "\"", "https", ":", "www", "elastic", "coguideenelasticsearchreferencemastersearch", "-", "request", "-", "body", "html", "#", "request", "-", "body", "-", "search", "-", "scroll", "\"", ">", "search", "scroll", "api", "on", "elastic", "co" ]
[ "public", "final", "search", "response", "search", "scroll", "(", "search", "scroll", "request", "search", "scroll", "request", ",", "request", "options", "options", ")", "throws", "i", "o", "exception", "{", "return", "scroll", "(", "search", "scroll", "request", ",", "options", ")", ";", "}" ]
[ "sets", "whether", "or", "not", "the", "panel", "overlays", "the", "content" ]
[ "public", "void", "set", "overlayed", "(", "boolean", "overlayed", ")", "{", "m", "overlay", "content", "=", "overlayed", ";", "}" ]
[ "for", "a", "given", "job", ",", "collect", "and", "return", "a", "subset", "of", "the", "keys", "from", "the", "input", "data" ]
[ "k", "[", "]", "get", "sample", "(", "input", "format", "<", "k", ",", "v", ">", "inf", ",", "job", "job", ")", "throws", "i", "o", "exception", ",", "interrupted", "exception", ";" ]
[ "expand", "the", "first", "selected", "node", ";", "called", "from", "an", "action", "listener", "on", "a", "menu" ]
[ "private", "void", "expand", "(", "data", "tree", "tree", ",", "tree", "path", "path", ")", "{", "tree", "expand", "tree", "(", "(", "g", "tree", "node", ")", "path", "get", "last", "path", "component", "(", ")", ")", ";", "}" ]
[ "a", "2", "wants", "a", "1", ",", "a", "3", "wants", "a", "1", "and", "a", "2", ",", "the", "path", "is", "[", "a", "2", ",", "a", "1", ",", "a", "2", ",", "a", "3", "]", ",", "so", "a", "2", "occurs", "twice", "first", "occurrence", "of", "a", "2", "would", "not", "see", "a", "1", ",", "but", "the", "second", "would", ":", "that", "is", "an", "error" ]
[ "public", "void", "duplicate", "aspect", "(", ")", "throws", "exception", "{", "aspect", "a", "1", "=", "create", "aspect", "(", "\"", "a", "1", "\"", ")", ";", "aspect", "a", "2", "=", "create", "aspect", "(", "\"", "a", "2", "\"", ",", "\"", "a", "1", "\"", ")", ";", "aspect", "a", "3", "=", "create", "aspect", "(", "\"", "a", "3", "\"", ",", "\"", "a", "2", "\"", ",", "\"", "a", "1", "\"", ")", ";", "aspect", "cycle", "on", "path", "exception", "e", "=", "assert", "throws", "(", "aspect", "cycle", "on", "path", "exception", "class", ",", "(", ")", "-", ">", "aspect", "collection", "create", "(", "immutable", "list", "of", "(", "a", "2", ",", "a", "1", ",", "a", "2", ",", "a", "3", ")", ")", ")", ";", "assert", "that", "(", "e", "get", "aspect", "(", ")", ")", "is", "equal", "to", "(", "a", "2", "get", "descriptor", "(", ")", ")", ";", "assert", "that", "(", "e", "get", "previous", "aspect", "(", ")", ")", "is", "equal", "to", "(", "a", "1", "get", "descriptor", "(", ")", ")", ";", "}" ]
[ "returns", "{", "@", "code", "true", "}", "to", "indicate", "that", "exclusive", "tests", "should", "be", "treated", "as", "regular", "parallel", "tests", "returning", "{", "@", "code", "true", "}", "may", "make", "sense", "for", "certain", "forced", "remote", "test", "execution", "strategies", "where", "running", "tests", "in", "sequence", "would", "be", "wasteful" ]
[ "default", "boolean", "force", "parallel", "test", "execution", "(", ")", "{", "return", "false", ";", "}" ]
[ "build", "the", "instance", "of", "{", "@", "link", "type", "definition", "}", "from", "the", "specified", "{", "@", "link", "type", "mirror", "type", "}" ]
[ "static", "type", "definition", "build", "(", "processing", "environment", "processing", "env", ",", "type", "mirror", "type", ")", "{", "string", "type", "name", "=", "type", "to", "string", "(", ")", ";", "type", "definition", "type", "definition", "=", "new", "type", "definition", "(", "type", "name", ")", ";", "/", "/", "build", "by", "all", "instances", "of", "type", "definition", "builder", "that", "were", "loaded", "by", "java", "spi", "get", "extension", "loader", "(", "type", "definition", "builder", "class", ")", "get", "supported", "extension", "instances", "(", ")", "stream", "(", ")", "/", "/", "load", "(", "type", "definition", "builder", "class", ",", "type", "definition", "builder", "class", "get", "class", "loader", "(", ")", ")", "filter", "(", "builder", "-", ">", "builder", "accept", "(", "processing", "env", ",", "type", ")", ")", "find", "first", "(", ")", "if", "present", "(", "builder", "-", ">", "{", "builder", "build", "(", "processing", "env", ",", "type", ",", "type", "definition", ")", ";", "/", "/", "type", "definition", "set", "type", "builder", "name", "(", "builder", "get", "class", "(", ")", "get", "name", "(", ")", ")", ";", "}", ")", ";", "return", "type", "definition", ";", "}" ]
[ "convenience", "method", "to", "auto", "-", "cast", "the", "index", "object" ]
[ "<", "u", ">", "u", "index", "(", ")", "{", "return", "(", "u", ")", "index", ";", "}" ]
[ "get", "array", "enum" ]
[ "public", "list", "<", "array", "enum", "enum", ">", "get", "array", "enum", "(", ")", "{", "return", "array", "enum", ";", "}" ]
[ "returns", "the", "clock", "drift", "tolerance", "in", "nanoseconds", "based", "on", "the", "input", "selection" ]
[ "static", "long", "compute", "clock", "drift", "(", "long", "time", ",", "string", "time", "unit", ")", "{", "if", "(", "\"", "seconds", "\"", "equals", "ignore", "case", "(", "time", "unit", ")", ")", "{", "return", "time", "unit", "seconds", "to", "nanos", "(", "time", ")", ";", "}", "else", "if", "(", "\"", "milliseconds", "\"", "equals", "ignore", "case", "(", "time", "unit", ")", ")", "{", "return", "time", "unit", "milliseconds", "to", "nanos", "(", "time", ")", ";", "}", "return", "time", "unit", "minutes", "to", "nanos", "(", "time", ")", ";", "}" ]
[ "delegate", "put", "requests", "to", "{", "@", "link", "#", "process", "request", "}" ]
[ "protected", "final", "void", "do", "put", "(", "http", "servlet", "request", "request", ",", "http", "servlet", "response", "response", ")", "throws", "servlet", "exception", ",", "i", "o", "exception", "{", "process", "request", "(", "request", ",", "response", ")", ";", "}" ]
[ "returns", "the", "attempt", "number", "of", "the", "subtask" ]
[ "public", "int", "get", "attempt", "number", "(", ")", "{", "return", "attempt", "number", ";", "}" ]
[ "get", "the", "optional", "boolean", "value", "associated", "with", "an", "index", "it", "returns", "false", "if", "there", "is", "no", "value", "at", "that", "index", ",", "or", "if", "the", "value", "is", "not", "boolean", "true", "or", "the", "string", "\"", "true", "\"" ]
[ "public", "boolean", "opt", "boolean", "(", "int", "index", ")", "{", "return", "opt", "boolean", "(", "index", ",", "false", ")", ";", "}" ]
[ "test", "the", "property", "'", "color", "'" ]
[ "public", "void", "color", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "color", "}" ]
[ "performs", "rs", "error", "correction", "on", "an", "array", "of", "bits" ]
[ "private", "corrected", "bits", "result", "correct", "bits", "(", "boolean", "[", "]", "rawbits", ")", "throws", "format", "exception", "{", "generic", "g", "f", "gf", ";", "int", "codeword", "size", ";", "if", "(", "ddata", "get", "nb", "layers", "(", ")", "<", "=", "2", ")", "{", "codeword", "size", "=", "6", ";", "gf", "=", "generic", "g", "f", "aztec", "data", "6", ";", "}", "else", "if", "(", "ddata", "get", "nb", "layers", "(", ")", "<", "=", "8", ")", "{", "codeword", "size", "=", "8", ";", "gf", "=", "generic", "g", "f", "aztec", "data", "8", ";", "}", "else", "if", "(", "ddata", "get", "nb", "layers", "(", ")", "<", "=", "22", ")", "{", "codeword", "size", "=", "10", ";", "gf", "=", "generic", "g", "f", "aztec", "data", "10", ";", "}", "else", "{", "codeword", "size", "=", "12", ";", "gf", "=", "generic", "g", "f", "aztec", "data", "12", ";", "}", "int", "num", "data", "codewords", "=", "ddata", "get", "nb", "datablocks", "(", ")", ";", "int", "num", "codewords", "=", "rawbits", "length", "/", "codeword", "size", ";", "if", "(", "num", "codewords", "<", "num", "data", "codewords", ")", "{", "throw", "format", "exception", "get", "format", "instance", "(", ")", ";", "}", "int", "offset", "=", "rawbits", "length", "%", "codeword", "size", ";", "int", "[", "]", "data", "words", "=", "new", "int", "[", "num", "codewords", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "num", "codewords", ";", "i", "+", "+", ",", "offset", "+", "=", "codeword", "size", ")", "{", "data", "words", "[", "i", "]", "=", "read", "code", "(", "rawbits", ",", "offset", ",", "codeword", "size", ")", ";", "}", "try", "{", "reed", "solomon", "decoder", "rs", "decoder", "=", "new", "reed", "solomon", "decoder", "(", "gf", ")", ";", "rs", "decoder", "decode", "(", "data", "words", ",", "num", "codewords", "-", "num", "data", "codewords", ")", ";", "}", "catch", "(", "reed", "solomon", "exception", "ex", ")", "{", "throw", "format", "exception", "get", "format", "instance", "(", "ex", ")", ";", "}", "/", "/", "now", "perform", "the", "unstuffing", "operation", "/", "/", "first", ",", "count", "how", "many", "bits", "are", "going", "to", "be", "thrown", "out", "as", "stuffing", "int", "mask", "=", "(", "1", "<", "<", "codeword", "size", ")", "-", "1", ";", "int", "stuffed", "bits", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "num", "data", "codewords", ";", "i", "+", "+", ")", "{", "int", "data", "word", "=", "data", "words", "[", "i", "]", ";", "if", "(", "data", "word", "=", "=", "0", "|", "|", "data", "word", "=", "=", "mask", ")", "{", "throw", "format", "exception", "get", "format", "instance", "(", ")", ";", "}", "else", "if", "(", "data", "word", "=", "=", "1", "|", "|", "data", "word", "=", "=", "mask", "-", "1", ")", "{", "stuffed", "bits", "+", "+", ";", "}", "}", "/", "/", "now", ",", "actually", "unpack", "the", "bits", "and", "remove", "the", "stuffing", "boolean", "[", "]", "corrected", "bits", "=", "new", "boolean", "[", "num", "data", "codewords", "*", "codeword", "size", "-", "stuffed", "bits", "]", ";", "int", "index", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "num", "data", "codewords", ";", "i", "+", "+", ")", "{", "int", "data", "word", "=", "data", "words", "[", "i", "]", ";", "if", "(", "data", "word", "=", "=", "1", "|", "|", "data", "word", "=", "=", "mask", "-", "1", ")", "{", "/", "/", "next", "codeword", "size", "-", "1", "bits", "are", "all", "zeros", "or", "all", "ones", "arrays", "fill", "(", "corrected", "bits", ",", "index", ",", "index", "+", "codeword", "size", "-", "1", ",", "data", "word", ">", "1", ")", ";", "index", "+", "=", "codeword", "size", "-", "1", ";", "}", "else", "{", "for", "(", "int", "bit", "=", "codeword", "size", "-", "1", ";", "bit", ">", "=", "0", ";", "-", "-", "bit", ")", "{", "corrected", "bits", "[", "index", "+", "+", "]", "=", "(", "data", "word", "&", "(", "1", "<", "<", "bit", ")", ")", "!", "=", "0", ";", "}", "}", "}", "return", "new", "corrected", "bits", "result", "(", "corrected", "bits", ",", "100", "*", "(", "num", "codewords", "-", "num", "data", "codewords", ")", "/", "num", "codewords", ")", ";", "}" ]
[ "flip", "the", "cluster", "states", "from", "\"", "assigned", "\"", "to", "\"", "subscribed", "\"", "so", "they", "can", "be", "used", "for", "another", "round", "of", "assignments" ]
[ "private", "void", "prepare", "for", "next", "rebalance", "(", ")", "{", "final", "map", "<", "uuid", ",", "client", "state", ">", "new", "client", "states", "=", "new", "tree", "map", "<", ">", "(", ")", ";", "for", "(", "final", "map", "entry", "<", "uuid", ",", "client", "state", ">", "entry", ":", "client", "states", "entry", "set", "(", ")", ")", "{", "final", "uuid", "uuid", "=", "entry", "get", "key", "(", ")", ";", "final", "client", "state", "new", "client", "state", "=", "new", "client", "state", "(", "1", ")", ";", "final", "client", "state", "client", "state", "=", "entry", "get", "value", "(", ")", ";", "final", "map", "<", "task", "id", ",", "long", ">", "task", "offset", "sums", "=", "new", "tree", "map", "<", ">", "(", ")", ";", "for", "(", "final", "task", "id", "task", "id", ":", "client", "state", "active", "tasks", "(", ")", ")", "{", "if", "(", "stateful", "task", "end", "offset", "sums", "contains", "key", "(", "task", "id", ")", ")", "{", "task", "offset", "sums", "put", "(", "task", "id", ",", "stateful", "task", "end", "offset", "sums", "get", "(", "task", "id", ")", ")", ";", "}", "}", "for", "(", "final", "task", "id", "task", "id", ":", "client", "state", "standby", "tasks", "(", ")", ")", "{", "if", "(", "stateful", "task", "end", "offset", "sums", "contains", "key", "(", "task", "id", ")", ")", "{", "task", "offset", "sums", "put", "(", "task", "id", ",", "stateful", "task", "end", "offset", "sums", "get", "(", "task", "id", ")", ")", ";", "}", "}", "new", "client", "state", "add", "previous", "active", "tasks", "(", "client", "state", "active", "tasks", "(", ")", ")", ";", "new", "client", "state", "add", "previous", "standby", "tasks", "(", "client", "state", "standby", "tasks", "(", ")", ")", ";", "new", "client", "state", "add", "previous", "tasks", "and", "offset", "sums", "(", "\"", "consumer", "\"", ",", "task", "offset", "sums", ")", ";", "new", "client", "state", "compute", "task", "lags", "(", "uuid", ",", "stateful", "task", "end", "offset", "sums", ")", ";", "new", "client", "states", "put", "(", "uuid", ",", "new", "client", "state", ")", ";", "}", "client", "states", "clear", "(", ")", ";", "client", "states", "put", "all", "(", "new", "client", "states", ")", ";", "}" ]
[ "sets", "a", "query", "used", "for", "filtering", "out", "suggested", "phrases", "(", "collation", ")" ]
[ "public", "phrase", "suggestion", "builder", "collate", "query", "(", "script", "collate", "query", "template", ")", "{", "this", "collate", "query", "=", "collate", "query", "template", ";", "return", "this", ";", "}" ]
[ "validate", "the", "state", "of", "the", "binding", "this", "is", "called", "in", "{", "@", "link", "#", "test", "000", "(", ")", "}", "so", "will", "fail", "independently", "of", "the", "other", "tests" ]
[ "public", "void", "validate", "(", ")", "throws", "throwable", "{", "assert", "not", "null", "(", "\"", "not", "bound", "to", "a", "cluster", "\"", ",", "binding", ")", ";", "assert", "not", "null", "(", "\"", "no", "cluster", "filesystem", "\"", ",", "get", "cluster", "f", "s", "(", ")", ")", ";", "assert", "not", "null", "(", "\"", "no", "yarn", "cluster", "\"", ",", "binding", "get", "yarn", "(", ")", ")", ";", "}" ]
[ "set", "the", "jndi", "name", "of", "the", "jta", "transaction", "manager", "a", "transaction", "manager", "is", "necessary", "for", "suspending", "and", "resuming", "transactions", ",", "as", "this", "not", "supported", "by", "the", "user", "transaction", "interface", "note", "that", "the", "transaction", "manager", "will", "be", "autodetected", "if", "the", "jta", "user", "transaction", "object", "implements", "the", "jta", "transaction", "manager", "interface", "too", ",", "as", "well", "as", "autodetected", "at", "various", "well", "-", "known", "fallback", "jndi", "locations" ]
[ "public", "void", "set", "transaction", "manager", "name", "(", "string", "transaction", "manager", "name", ")", "{", "this", "transaction", "manager", "name", "=", "transaction", "manager", "name", ";", "}" ]
[ "returns", "the", "column", "headers" ]
[ "protected", "set", "<", "string", ">", "headers", "(", ")", "{", "if", "(", "headers", "=", "=", "null", ")", "{", "set", "<", "string", ">", "all", "=", "results", "stream", "(", ")", "flat", "map", "(", "policy", "stats", "-", ">", "policy", "stats", "metrics", "(", ")", "key", "set", "(", ")", "stream", "(", ")", ")", "collect", "(", "to", "immutable", "set", "(", ")", ")", ";", "set", "<", "string", ">", "used", "=", "results", "stream", "(", ")", "flat", "map", "(", "policy", "stats", "-", ">", "policy", "stats", "metrics", "(", ")", "values", "(", ")", "stream", "(", ")", ")", "filter", "(", "metric", "-", ">", "metric", "characteristics", "(", ")", "is", "empty", "(", ")", "|", "|", "metric", "characteristics", "(", ")", "stream", "(", ")", "any", "match", "(", "characteristics", ":", ":", "contains", ")", ")", "filter", "(", "metric", "-", ">", "metric", "required", "(", ")", "|", "|", "!", "metrics", "(", ")", "format", "(", "metric", ")", "is", "empty", "(", ")", ")", "map", "(", "metric", ":", ":", "name", ")", "collect", "(", "to", "immutable", "set", "(", ")", ")", ";", "headers", "=", "immutable", "set", "copy", "of", "(", "sets", "intersection", "(", "all", ",", "used", ")", ")", ";", "}", "return", "headers", ";", "}" ]
[ "test", "serialization", "of", "outer", "string", "types" ]
[ "public", "void", "fake", "outer", "string", "serialize", "test", "(", ")", "{", "string", "body", "=", "null", ";", "string", "response", "=", "api", "fake", "outer", "string", "serialize", "(", "body", ")", "block", "(", ")", ";", "/", "/", "todo", ":", "test", "validations", "}" ]
[ "an", "opaque", "identifier", "for", "the", "mcp", "node", "<", "code", ">", "string", "id", "=", "1", ";", "<", "code", ">" ]
[ "public", "builder", "set", "id", "(", "java", "lang", "string", "value", ")", "{", "if", "(", "value", "=", "=", "null", ")", "{", "throw", "new", "null", "pointer", "exception", "(", ")", ";", "}", "id", "=", "value", ";", "on", "changed", "(", ")", ";", "return", "this", ";", "}" ]
[ "regression", "test", "for", "hdfs", "-", "1480", "-", "cluster", "has", "2", "racks", ",", "a", "and", "b", ",", "each", "with", "three", "nodes", "-", "block", "initially", "written", "on", "a1", ",", "a2", ",", "b1", "-", "admin", "decommissions", "two", "of", "these", "nodes", "(", "let", "'", "s", "say", "a1", "and", "a2", "but", "it", "doesn", "'", "t", "matter", ")", "-", "re", "-", "replication", "should", "respect", "rack", "policy" ]
[ "public", "void", "test", "two", "of", "three", "nodes", "decommissioned", "(", ")", "throws", "exception", "{", "add", "nodes", "(", "nodes", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "num", "test", "iters", ";", "i", "+", "+", ")", "{", "do", "test", "two", "of", "three", "nodes", "decommissioned", "(", "i", ")", ";", "}", "}" ]
[ "get", "attribute", "integer" ]
[ "public", "integer", "get", "attribute", "integer", "(", ")", "{", "return", "attribute", "integer", ";", "}" ]