docstring_tokens
sequence
code_tokens
sequence
[ "some", "special", "views", "are", "not", "instantiable", ",", "and", "for", "those", "this", "method", "returns", "false" ]
[ "public", "boolean", "is", "instantiable", "(", ")", "{", "return", "true", ";", "}" ]
[ "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", ";", "}" ]
[ "the", "to", "part", "of", "the", "range", "query", "null", "indicates", "unbounded" ]
[ "public", "range", "query", "builder", "lte", "(", "object", "to", ")", "{", "return", "to", "(", "to", ",", "true", ")", ";", "}" ]
[ "get", "prefix", "boolean" ]
[ "public", "boolean", "get", "prefix", "boolean", "(", ")", "{", "return", "prefix", "boolean", ";", "}" ]
[ "test", "the", "property", "'", "array", "array", "of", "model", "'" ]
[ "public", "void", "array", "array", "of", "model", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "array", "array", "of", "model", "}" ]
[ "test", "adding", "new", "blocks", "restart", "the", "name", "node", "in", "the", "test", "to", "make", "sure", "the", "add", "block", "op", "in", "the", "editlog", "is", "applied", "correctly" ]
[ "public", "void", "test", "add", "block", "(", ")", "throws", "exception", "{", "distributed", "file", "system", "fs", "=", "cluster", "get", "file", "system", "(", ")", ";", "final", "path", "file", "1", "=", "new", "path", "(", "\"", "/", "file", "1", "\"", ")", ";", "final", "path", "file", "2", "=", "new", "path", "(", "\"", "/", "file", "2", "\"", ")", ";", "final", "path", "file", "3", "=", "new", "path", "(", "\"", "/", "file", "3", "\"", ")", ";", "final", "path", "file", "4", "=", "new", "path", "(", "\"", "/", "file", "4", "\"", ")", ";", "d", "f", "s", "test", "util", "create", "file", "(", "fs", ",", "file", "1", ",", "blocksize", "-", "1", ",", "replication", ",", "0l", ")", ";", "d", "f", "s", "test", "util", "create", "file", "(", "fs", ",", "file", "2", ",", "blocksize", ",", "replication", ",", "0l", ")", ";", "d", "f", "s", "test", "util", "create", "file", "(", "fs", ",", "file", "3", ",", "blocksize", "*", "2", "-", "1", ",", "replication", ",", "0l", ")", ";", "d", "f", "s", "test", "util", "create", "file", "(", "fs", ",", "file", "4", ",", "blocksize", "*", "2", ",", "replication", ",", "0l", ")", ";", "/", "/", "restart", "name", "node", "cluster", "restart", "name", "node", "(", "true", ")", ";", "f", "s", "directory", "fsdir", "=", "cluster", "get", "namesystem", "(", ")", "get", "f", "s", "directory", "(", ")", ";", "/", "/", "check", "file", "1", "i", "node", "file", "file", "1", "node", "=", "fsdir", "get", "i", "node", "4", "write", "(", "file", "1", "to", "string", "(", ")", ")", "as", "file", "(", ")", ";", "block", "info", "[", "]", "file", "1", "blocks", "=", "file", "1", "node", "get", "blocks", "(", ")", ";", "assert", "equals", "(", "1", ",", "file", "1", "blocks", "length", ")", ";", "assert", "equals", "(", "blocksize", "-", "1", ",", "file", "1", "blocks", "[", "0", "]", "get", "num", "bytes", "(", ")", ")", ";", "assert", "equals", "(", "block", "u", "c", "state", "complete", ",", "file", "1", "blocks", "[", "0", "]", "get", "block", "u", "c", "state", "(", ")", ")", ";", "/", "/", "check", "file", "2", "i", "node", "file", "file", "2", "node", "=", "fsdir", "get", "i", "node", "4", "write", "(", "file", "2", "to", "string", "(", ")", ")", "as", "file", "(", ")", ";", "block", "info", "[", "]", "file", "2", "blocks", "=", "file", "2", "node", "get", "blocks", "(", ")", ";", "assert", "equals", "(", "1", ",", "file", "2", "blocks", "length", ")", ";", "assert", "equals", "(", "blocksize", ",", "file", "2", "blocks", "[", "0", "]", "get", "num", "bytes", "(", ")", ")", ";", "assert", "equals", "(", "block", "u", "c", "state", "complete", ",", "file", "2", "blocks", "[", "0", "]", "get", "block", "u", "c", "state", "(", ")", ")", ";", "/", "/", "check", "file", "3", "i", "node", "file", "file", "3", "node", "=", "fsdir", "get", "i", "node", "4", "write", "(", "file", "3", "to", "string", "(", ")", ")", "as", "file", "(", ")", ";", "block", "info", "[", "]", "file", "3", "blocks", "=", "file", "3", "node", "get", "blocks", "(", ")", ";", "assert", "equals", "(", "2", ",", "file", "3", "blocks", "length", ")", ";", "assert", "equals", "(", "blocksize", ",", "file", "3", "blocks", "[", "0", "]", "get", "num", "bytes", "(", ")", ")", ";", "assert", "equals", "(", "block", "u", "c", "state", "complete", ",", "file", "3", "blocks", "[", "0", "]", "get", "block", "u", "c", "state", "(", ")", ")", ";", "assert", "equals", "(", "blocksize", "-", "1", ",", "file", "3", "blocks", "[", "1", "]", "get", "num", "bytes", "(", ")", ")", ";", "assert", "equals", "(", "block", "u", "c", "state", "complete", ",", "file", "3", "blocks", "[", "1", "]", "get", "block", "u", "c", "state", "(", ")", ")", ";", "/", "/", "check", "file", "4", "i", "node", "file", "file", "4", "node", "=", "fsdir", "get", "i", "node", "4", "write", "(", "file", "4", "to", "string", "(", ")", ")", "as", "file", "(", ")", ";", "block", "info", "[", "]", "file", "4", "blocks", "=", "file", "4", "node", "get", "blocks", "(", ")", ";", "assert", "equals", "(", "2", ",", "file", "4", "blocks", "length", ")", ";", "assert", "equals", "(", "blocksize", ",", "file", "4", "blocks", "[", "0", "]", "get", "num", "bytes", "(", ")", ")", ";", "assert", "equals", "(", "block", "u", "c", "state", "complete", ",", "file", "4", "blocks", "[", "0", "]", "get", "block", "u", "c", "state", "(", ")", ")", ";", "assert", "equals", "(", "blocksize", ",", "file", "4", "blocks", "[", "1", "]", "get", "num", "bytes", "(", ")", ")", ";", "assert", "equals", "(", "block", "u", "c", "state", "complete", ",", "file", "4", "blocks", "[", "1", "]", "get", "block", "u", "c", "state", "(", ")", ")", ";", "}" ]
[ "generate", "a", "sql", "for", "renaming", "the", "table", "into", "a", "temporary", "table" ]
[ "protected", "string", "generate", "alter", "to", "temp", "table", "s", "q", "l", "(", "string", "table", "name", ")", "{", "string", "builder", "sql", "=", "new", "string", "builder", "(", ")", ";", "sql", "append", "(", "\"", "alter", "table", "\"", ")", "append", "(", "table", "name", ")", "append", "(", "\"", "rename", "to", "\"", ")", "append", "(", "get", "temp", "table", "name", "(", "table", "name", ")", ")", ";", "return", "sql", "to", "string", "(", ")", ";", "}" ]
[ "create", "a", "color", "integer", "value", "with", "specified", "alpha", "this", "may", "be", "useful", "to", "change", "alpha", "value", "of", "background", "color" ]
[ "public", "static", "int", "get", "color", "with", "alpha", "(", "float", "alpha", ",", "int", "base", "color", ")", "{", "int", "a", "=", "math", "min", "(", "255", ",", "math", "max", "(", "0", ",", "(", "int", ")", "(", "alpha", "*", "255", ")", ")", ")", "<", "<", "24", ";", "int", "rgb", "=", "0x", "0", "0ffffff", "&", "base", "color", ";", "return", "a", "+", "rgb", ";", "}" ]
[ "returns", "whether", "or", "not", "the", "file", "system", "supports", "symbolic", "links", "returns", "true", "if", "file", "system", "supports", "the", "following", ":", "{", "@", "link", "#", "create", "symbolic", "link", "(", "path", ",", "path", "fragment", ")", "}", "{", "@", "link", "#", "get", "file", "size", "(", "path", ",", "boolean", ")", "}", "where", "{", "@", "code", "follow", "symlinks", "=", "false", "}", "{", "@", "link", "#", "get", "last", "modified", "time", "(", "path", ",", "boolean", ")", "}", "where", "{", "@", "code", "follow", "symlinks", "=", "false", "}", "{", "@", "link", "#", "read", "symbolic", "link", "(", "path", ")", "}", "where", "the", "link", "points", "to", "a", "non", "-", "existent", "file", "the", "above", "calls", "may", "result", "in", "an", "{", "@", "link", "unsupported", "operation", "exception", "}", "on", "a", "file", "system", "where", "this", "method", "returns", "{", "@", "code", "false", "}", "the", "implementation", "can", "try", "to", "emulate", "these", "calls", "at", "its", "own", "discretion" ]
[ "public", "abstract", "boolean", "supports", "symbolic", "links", "natively", "(", "path", "path", ")", ";" ]
[ "make", "a", "copy", "with", "the", "same", "collected", "blocks", ",", "removed", "i", "nodes", ",", "and", "removed", "u", "c", "files", "but", "a", "new", "quota", "delta" ]
[ "public", "reclaim", "context", "get", "copy", "(", ")", "{", "return", "new", "reclaim", "context", "(", "bsps", ",", "collected", "blocks", ",", "removed", "i", "nodes", ",", "removed", "u", "c", "files", ")", ";", "}" ]
[ "grab", "all", "the", "decompiler", "options", "from", "various", "sources", "within", "a", "specific", "tool", "and", "program", "and", "cache", "them", "in", "this", "object" ]
[ "public", "void", "grab", "from", "tool", "and", "program", "(", "plugin", "owner", "plugin", ",", "tool", "options", "opt", ",", "program", "program", ")", "{", "grab", "from", "program", "(", "program", ")", ";", "/", "/", "assuming", "if", "one", "is", "not", "registered", ",", "then", "none", "area", "if", "(", "!", "opt", "is", "registered", "(", "predicate", "optionstring", ")", ")", "{", "return", ";", "}", "predicate", "=", "opt", "get", "boolean", "(", "predicate", "optionstring", ",", "predicate", "optiondefault", ")", ";", "read", "only", "=", "opt", "get", "boolean", "(", "readonly", "optionstring", ",", "readonly", "optiondefault", ")", ";", "eliminate", "unreachable", "=", "opt", "get", "boolean", "(", "eliminate", "unreachable", "optionstring", ",", "eliminate", "unreachable", "optiondefault", ")", ";", "simplify", "double", "precision", "=", "opt", "get", "boolean", "(", "simplify", "doubleprecision", "optionstring", ",", "simplify", "doubleprecision", "optiondefault", ")", ";", "ignoreunimpl", "=", "opt", "get", "boolean", "(", "ignoreunimpl", "optionstring", ",", "ignoreunimpl", "optiondefault", ")", ";", "inferconstptr", "=", "opt", "get", "boolean", "(", "inferconstptr", "optionstring", ",", "inferconstptr", "optiondefault", ")", ";", "null", "token", "=", "opt", "get", "boolean", "(", "nulltoken", "optionstring", ",", "nulltoken", "optiondefault", ")", ";", "inplace", "tokens", "=", "opt", "get", "boolean", "(", "inplaceop", "optionstring", ",", "inplaceop", "optiondefault", ")", ";", "alias", "block", "=", "opt", "get", "enum", "(", "aliasblock", "optionstring", ",", "aliasblock", "optiondefault", ")", ";", "convention", "print", "=", "opt", "get", "boolean", "(", "convention", "optionstring", ",", "convention", "optiondefault", ")", ";", "no", "cast", "print", "=", "opt", "get", "boolean", "(", "nocast", "optionstring", ",", "nocast", "optiondefault", ")", ";", "maxwidth", "=", "opt", "get", "int", "(", "maxwidth", "optionstring", ",", "maxwidth", "optiondefault", ")", ";", "indentwidth", "=", "opt", "get", "int", "(", "indentwidth", "optionstring", ",", "indentwidth", "optiondefault", ")", ";", "commentindent", "=", "opt", "get", "int", "(", "commentindent", "optionstring", ",", "commentindent", "optiondefault", ")", ";", "comment", "style", "=", "opt", "get", "enum", "(", "commentstyle", "optionstring", ",", "commentstyle", "optiondefault", ")", ";", "comment", "e", "o", "l", "include", "=", "opt", "get", "boolean", "(", "commenteol", "optionstring", ",", "commenteol", "optiondefault", ")", ";", "comment", "p", "r", "e", "include", "=", "opt", "get", "boolean", "(", "commentpre", "optionstring", ",", "commentpre", "optiondefault", ")", ";", "comment", "p", "o", "s", "t", "include", "=", "opt", "get", "boolean", "(", "commentpost", "optionstring", ",", "commentpost", "optiondefault", ")", ";", "comment", "p", "l", "a", "t", "e", "include", "=", "opt", "get", "boolean", "(", "commentplate", "optionstring", ",", "commentplate", "optiondefault", ")", ";", "comment", "w", "a", "r", "n", "include", "=", "opt", "get", "boolean", "(", "commentwarn", "optionstring", ",", "commentwarn", "optiondefault", ")", ";", "comment", "head", "include", "=", "opt", "get", "boolean", "(", "commenthead", "optionstring", ",", "commenthead", "optiondefault", ")", ";", "namespace", "strategy", "=", "opt", "get", "enum", "(", "namespace", "optionstring", ",", "namespace", "optiondefault", ")", ";", "integer", "format", "=", "opt", "get", "enum", "(", "integerformat", "optionstring", ",", "integerformat", "optiondefault", ")", ";", "keyword", "color", "=", "opt", "get", "color", "(", "highlight", "keyword", "msg", ",", "highlight", "keyword", "def", ")", ";", "type", "color", "=", "opt", "get", "color", "(", "highlight", "type", "msg", ",", "highlight", "type", "def", ")", ";", "function", "color", "=", "opt", "get", "color", "(", "highlight", "function", "msg", ",", "highlight", "function", "def", ")", ";", "comment", "color", "=", "opt", "get", "color", "(", "highlight", "comment", "msg", ",", "highlight", "comment", "def", ")", ";", "variable", "color", "=", "opt", "get", "color", "(", "highlight", "variable", "msg", ",", "highlight", "variable", "def", ")", ";", "constant", "color", "=", "opt", "get", "color", "(", "highlight", "const", "msg", ",", "highlight", "const", "def", ")", ";", "parameter", "color", "=", "opt", "get", "color", "(", "highlight", "parameter", "msg", ",", "highlight", "parameter", "def", ")", ";", "global", "color", "=", "opt", "get", "color", "(", "highlight", "global", "msg", ",", "highlight", "global", "def", ")", ";", "default", "color", "=", "opt", "get", "color", "(", "highlight", "default", "msg", ",", "highlight", "default", "def", ")", ";", "code", "viewer", "background", "color", "=", "opt", "get", "color", "(", "code", "viewer", "background", "color", "msg", ",", "code", "viewer", "background", "color", ")", ";", "current", "variable", "highlight", "color", "=", "opt", "get", "color", "(", "highlight", "current", "variable", "msg", ",", "highlight", "current", "variable", "def", ")", ";", "default", "font", "=", "opt", "get", "font", "(", "font", "msg", ",", "default", "font", ")", ";", "default", "font", "=", "system", "utilities", "adjust", "for", "font", "size", "override", "(", "default", "font", ")", ";", "default", "search", "highlight", "color", "=", "opt", "get", "color", "(", "search", "highlight", "msg", ",", "search", "highlight", "def", ")", ";", "display", "line", "numbers", "=", "opt", "get", "boolean", "(", "line", "number", "msg", ",", "line", "number", "def", ")", ";", "decompile", "timeout", "seconds", "=", "opt", "get", "int", "(", "decompile", "timeout", ",", "suggested", "decompile", "timeout", "secs", ")", ";", "payload", "limit", "m", "bytes", "=", "opt", "get", "int", "(", "payload", "limit", ",", "suggested", "max", "payload", "bytes", ")", ";", "cached", "results", "size", "=", "opt", "get", "int", "(", "cached", "results", "size", "msg", ",", "suggested", "cached", "results", "size", ")", ";", "grab", "from", "tool", "options", "(", "owner", "plugin", ")", ";", "}" ]
[ "returns", "bytes", "reference", ",", "also", "un", "compress", "the", "source", "if", "needed" ]
[ "public", "bytes", "reference", "source", "ref", "(", ")", "{", "if", "(", "source", "=", "=", "null", ")", "{", "return", "null", ";", "}", "try", "{", "this", "source", "=", "compressor", "factory", "uncompress", "if", "needed", "(", "this", "source", ")", ";", "return", "this", "source", ";", "}", "catch", "(", "i", "o", "exception", "e", ")", "{", "throw", "new", "elasticsearch", "parse", "exception", "(", "\"", "failed", "to", "decompress", "source", "\"", ",", "e", ")", ";", "}", "}" ]
[ "try", "to", "get", "the", "custom", "value", "from", "trace", "context" ]
[ "public", "static", "optional", "<", "string", ">", "get", "correlation", "(", "string", "key", ")", "{", "return", "optional", "empty", "(", ")", ";", "}" ]
[ "allows", "at", "-", "most", "-", "once", "verification", "e", "g", ":", "<", "pre", "class", "=", "\"", "code", "\"", ">", "<", "code", "class", "=", "\"", "java", "\"", ">", "verify", "(", "mock", ",", "at", "most", "once", "(", ")", ")", "some", "method", "(", "\"", "some", "arg", "\"", ")", ";", "<", "code", ">", "alias", "to", "<", "code", ">", "at", "most", "(", "1", ")", "<", "code", ">", "see", "examples", "in", "javadoc", "for", "{", "@", "link", "mockito", "}", "class" ]
[ "public", "static", "verification", "mode", "at", "most", "once", "(", ")", "{", "return", "verification", "mode", "factory", "at", "most", "once", "(", ")", ";", "}" ]
[ "returns", "the", "array", "of", "names", "defined", "in", "the", "resident", "name", "table" ]
[ "public", "length", "string", "ordinal", "set", "[", "]", "get", "names", "(", ")", "{", "return", "names", ";", "}" ]
[ "a", "sequence", "of", "requests", "followed", "by", "one", "response", "(", "streamed", "upload", ")", "the", "server", "returns", "the", "aggregated", "size", "of", "client", "payload", "as", "the", "result" ]
[ "public", "io", "grpc", "stub", "stream", "observer", "<", "io", "grpc", "testing", "integration", "messages", "streaming", "input", "call", "request", ">", "streaming", "input", "call", "(", "io", "grpc", "stub", "stream", "observer", "<", "io", "grpc", "testing", "integration", "messages", "streaming", "input", "call", "response", ">", "response", "observer", ")", "{", "return", "io", "grpc", "stub", "server", "calls", "async", "unimplemented", "streaming", "call", "(", "get", "streaming", "input", "call", "method", "(", ")", ",", "response", "observer", ")", ";", "}" ]
[ "tests", "that", "the", "nfa", "successfully", "returns", "partially", "matched", "event", "sequences", "when", "they", "'", "ve", "timed", "out" ]
[ "public", "void", "test", "simple", "pattern", "with", "timeout", "handling", "(", ")", "throws", "exception", "{", "list", "<", "stream", "record", "<", "event", ">", ">", "events", "=", "new", "array", "list", "<", ">", "(", ")", ";", "list", "<", "map", "<", "string", ",", "list", "<", "event", ">", ">", ">", "resulting", "patterns", "=", "new", "array", "list", "<", ">", "(", ")", ";", "set", "<", "tuple", "2", "<", "map", "<", "string", ",", "list", "<", "event", ">", ">", ",", "long", ">", ">", "resulting", "timeout", "patterns", "=", "new", "hash", "set", "<", ">", "(", ")", ";", "set", "<", "tuple", "2", "<", "map", "<", "string", ",", "list", "<", "event", ">", ">", ",", "long", ">", ">", "expected", "timeout", "patterns", "=", "new", "hash", "set", "<", ">", "(", ")", ";", "events", "add", "(", "new", "stream", "record", "<", ">", "(", "new", "event", "(", "1", ",", "\"", "start", "\"", ",", "1", "0", ")", ",", "1", ")", ")", ";", "events", "add", "(", "new", "stream", "record", "<", ">", "(", "new", "event", "(", "2", ",", "\"", "start", "\"", ",", "1", "0", ")", ",", "2", ")", ")", ";", "events", "add", "(", "new", "stream", "record", "<", ">", "(", "new", "event", "(", "3", ",", "\"", "middle", "\"", ",", "1", "0", ")", ",", "3", ")", ")", ";", "events", "add", "(", "new", "stream", "record", "<", ">", "(", "new", "event", "(", "4", ",", "\"", "foobar", "\"", ",", "1", "0", ")", ",", "4", ")", ")", ";", "events", "add", "(", "new", "stream", "record", "<", ">", "(", "new", "event", "(", "5", ",", "\"", "end", "\"", ",", "1", "0", ")", ",", "11", ")", ")", ";", "events", "add", "(", "new", "stream", "record", "<", ">", "(", "new", "event", "(", "6", ",", "\"", "end", "\"", ",", "1", "0", ")", ",", "13", ")", ")", ";", "map", "<", "string", ",", "list", "<", "event", ">", ">", "timeout", "pattern", "1", "=", "new", "hash", "map", "<", ">", "(", ")", ";", "timeout", "pattern", "1", "put", "(", "\"", "start", "\"", ",", "collections", "singleton", "list", "(", "new", "event", "(", "1", ",", "\"", "start", "\"", ",", "1", "0", ")", ")", ")", ";", "timeout", "pattern", "1", "put", "(", "\"", "middle", "\"", ",", "collections", "singleton", "list", "(", "new", "event", "(", "3", ",", "\"", "middle", "\"", ",", "1", "0", ")", ")", ")", ";", "map", "<", "string", ",", "list", "<", "event", ">", ">", "timeout", "pattern", "2", "=", "new", "hash", "map", "<", ">", "(", ")", ";", "timeout", "pattern", "2", "put", "(", "\"", "start", "\"", ",", "collections", "singleton", "list", "(", "new", "event", "(", "2", ",", "\"", "start", "\"", ",", "1", "0", ")", ")", ")", ";", "timeout", "pattern", "2", "put", "(", "\"", "middle", "\"", ",", "collections", "singleton", "list", "(", "new", "event", "(", "3", ",", "\"", "middle", "\"", ",", "1", "0", ")", ")", ")", ";", "map", "<", "string", ",", "list", "<", "event", ">", ">", "timeout", "pattern", "3", "=", "new", "hash", "map", "<", ">", "(", ")", ";", "timeout", "pattern", "3", "put", "(", "\"", "start", "\"", ",", "collections", "singleton", "list", "(", "new", "event", "(", "1", ",", "\"", "start", "\"", ",", "1", "0", ")", ")", ")", ";", "map", "<", "string", ",", "list", "<", "event", ">", ">", "timeout", "pattern", "4", "=", "new", "hash", "map", "<", ">", "(", ")", ";", "timeout", "pattern", "4", "put", "(", "\"", "start", "\"", ",", "collections", "singleton", "list", "(", "new", "event", "(", "2", ",", "\"", "start", "\"", ",", "1", "0", ")", ")", ")", ";", "expected", "timeout", "patterns", "add", "(", "tuple", "2", "of", "(", "timeout", "pattern", "1", ",", "11l", ")", ")", ";", "expected", "timeout", "patterns", "add", "(", "tuple", "2", "of", "(", "timeout", "pattern", "2", ",", "12l", ")", ")", ";", "expected", "timeout", "patterns", "add", "(", "tuple", "2", "of", "(", "timeout", "pattern", "3", ",", "11l", ")", ")", ";", "expected", "timeout", "patterns", "add", "(", "tuple", "2", "of", "(", "timeout", "pattern", "4", ",", "12l", ")", ")", ";", "pattern", "<", "event", ",", "?", ">", "pattern", "=", "pattern", "<", "event", ">", "begin", "(", "\"", "start", "\"", ")", "where", "(", "new", "simple", "condition", "<", "event", ">", "(", ")", "{", "private", "static", "final", "long", "serial", "version", "u", "i", "d", "=", "7907391379273505897l", ";", "@", "override", "public", "boolean", "filter", "(", "event", "value", ")", "throws", "exception", "{", "return", "value", "get", "name", "(", ")", "equals", "(", "\"", "start", "\"", ")", ";", "}", "}", ")", "followed", "by", "any", "(", "\"", "middle", "\"", ")", "where", "(", "new", "simple", "condition", "<", "event", ">", "(", ")", "{", "private", "static", "final", "long", "serial", "version", "u", "i", "d", "=", "-", "3268741540234334074l", ";", "@", "override", "public", "boolean", "filter", "(", "event", "value", ")", "throws", "exception", "{", "return", "value", "get", "name", "(", ")", "equals", "(", "\"", "middle", "\"", ")", ";", "}", "}", ")", "followed", "by", "any", "(", "\"", "end", "\"", ")", "where", "(", "new", "simple", "condition", "<", "event", ">", "(", ")", "{", "private", "static", "final", "long", "serial", "version", "u", "i", "d", "=", "-", "8995174172182138608l", ";", "@", "override", "public", "boolean", "filter", "(", "event", "value", ")", "throws", "exception", "{", "return", "value", "get", "name", "(", ")", "equals", "(", "\"", "end", "\"", ")", ";", "}", "}", ")", "within", "(", "time", "milliseconds", "(", "10", ")", ")", ";", "nfa", "<", "event", ">", "nfa", "=", "compile", "(", "pattern", ",", "true", ")", ";", "n", "f", "a", "state", "nfa", "state", "=", "nfa", "create", "initial", "n", "f", "a", "state", "(", ")", ";", "for", "(", "stream", "record", "<", "event", ">", "event", ":", "events", ")", "{", "collection", "<", "tuple", "2", "<", "map", "<", "string", ",", "list", "<", "event", ">", ">", ",", "long", ">", ">", "timeout", "patterns", "=", "nfa", "advance", "time", "(", "shared", "buffer", "accessor", ",", "nfa", "state", ",", "event", "get", "timestamp", "(", ")", ")", ";", "collection", "<", "map", "<", "string", ",", "list", "<", "event", ">", ">", ">", "matched", "patterns", "=", "nfa", "process", "(", "shared", "buffer", "accessor", ",", "nfa", "state", ",", "event", "get", "value", "(", ")", ",", "event", "get", "timestamp", "(", ")", ",", "after", "match", "skip", "strategy", "no", "skip", "(", ")", ",", "new", "test", "timer", "service", "(", ")", ")", ";", "resulting", "patterns", "add", "all", "(", "matched", "patterns", ")", ";", "resulting", "timeout", "patterns", "add", "all", "(", "timeout", "patterns", ")", ";", "}", "assert", "equals", "(", "1", ",", "resulting", "patterns", "size", "(", ")", ")", ";", "assert", "equals", "(", "expected", "timeout", "patterns", "size", "(", ")", ",", "resulting", "timeout", "patterns", "size", "(", ")", ")", ";", "assert", "equals", "(", "expected", "timeout", "patterns", ",", "resulting", "timeout", "patterns", ")", ";", "}" ]
[ "method", "called", "by", "the", "program", "change", "listener", "when", "a", "tree", "is", "removed" ]
[ "void", "tree", "removed", "(", "string", "tree", "name", ")", "{", "remove", "provider", "(", "tree", "name", ")", ";", "}" ]
[ "sets", "the", "enablement", "state", "of", "the", "\"", "ok", "\"", "button" ]
[ "protected", "void", "set", "ok", "enabled", "(", "boolean", "state", ")", "{", "if", "(", "ok", "button", "!", "=", "null", ")", "{", "ok", "button", "set", "enabled", "(", "state", ")", ";", "}", "}" ]
[ "returns", "a", "buffered", "reader", "for", "reading", "this", "file", "as", "characters", "@", "throw", "gdx", "runtime", "exception", "if", "the", "file", "handle", "represents", "a", "directory", ",", "doesn", "'", "t", "exist", ",", "or", "could", "not", "be", "read" ]
[ "public", "buffered", "reader", "reader", "(", "int", "buffer", "size", ")", "{", "throw", "new", "gdx", "runtime", "exception", "(", "\"", "stub", "\"", ")", ";", "}" ]
[ "post", "fakeouternumber", "test", "serialization", "of", "outer", "number", "types" ]
[ "public", "response", "entity", "<", "big", "decimal", ">", "fake", "outer", "number", "serialize", "(", "@", "api", "param", "(", "value", "=", "\"", "input", "number", "as", "post", "body", "\"", ")", "@", "valid", "@", "request", "body", "(", "required", "=", "false", ")", "big", "decimal", "body", ")", "{", "return", "new", "response", "entity", "<", ">", "(", "http", "status", "not", "implemented", ")", ";", "}" ]
[ "provides", "a", "{", "@", "link", "time", "provider", "}", "that", "is", "backed", "by", "this", "fake", "clock" ]
[ "public", "time", "provider", "get", "time", "provider", "(", ")", "{", "return", "time", "provider", ";", "}" ]
[ "determines", "whether", "a", "cause", "has", "been", "set" ]
[ "public", "boolean", "has", "cause", "(", ")", "{", "return", "cause", "!", "=", "null", ";", "}" ]
[ "return", "true", "if", "the", "limit", "has", "been", "exceeded" ]
[ "public", "boolean", "get", "limit", "exceeded", "(", ")", "{", "return", "limit", ">", "=", "0", "&", "&", "(", "(", "now", "(", ")", "-", "start", ")", ">", "limit", ")", ";", "}" ]
[ "invoked", "from", "the", "spark", "filter" ]
[ "default", "void", "destroy", "(", ")", "{", "}" ]
[ "determine", "if", "user", "group", "information", "is", "using", "kerberos", "to", "determine", "user", "identities", "or", "is", "relying", "on", "simple", "authentication" ]
[ "public", "static", "boolean", "is", "security", "enabled", "(", ")", "{", "return", "!", "is", "authentication", "method", "enabled", "(", "authentication", "method", "simple", ")", ";", "}" ]
[ "helper", "method", "which", "retries", "the", "provided", "operation", "in", "case", "of", "a", "failure" ]
[ "private", "static", "<", "t", ">", "void", "retry", "operation", "(", "final", "completable", "future", "<", "t", ">", "result", "future", ",", "final", "supplier", "<", "completable", "future", "<", "t", ">", ">", "operation", ",", "final", "int", "retries", ",", "final", "predicate", "<", "throwable", ">", "retry", "predicate", ",", "final", "executor", "executor", ")", "{", "if", "(", "!", "result", "future", "is", "done", "(", ")", ")", "{", "final", "completable", "future", "<", "t", ">", "operation", "future", "=", "operation", "get", "(", ")", ";", "operation", "future", "when", "complete", "async", "(", "(", "t", ",", "throwable", ")", "-", ">", "{", "if", "(", "throwable", "!", "=", "null", ")", "{", "if", "(", "throwable", "instanceof", "cancellation", "exception", ")", "{", "result", "future", "complete", "exceptionally", "(", "new", "retry", "exception", "(", "\"", "operation", "future", "was", "cancelled", "\"", ",", "throwable", ")", ")", ";", "}", "else", "{", "throwable", "=", "exception", "utils", "strip", "execution", "exception", "(", "throwable", ")", ";", "if", "(", "!", "retry", "predicate", "test", "(", "throwable", ")", ")", "{", "result", "future", "complete", "exceptionally", "(", "new", "retry", "exception", "(", "\"", "stopped", "retrying", "the", "operation", "because", "the", "error", "is", "not", "\"", "+", "\"", "retryable", "\"", ",", "throwable", ")", ")", ";", "}", "else", "{", "if", "(", "retries", ">", "0", ")", "{", "retry", "operation", "(", "result", "future", ",", "operation", ",", "retries", "-", "1", ",", "retry", "predicate", ",", "executor", ")", ";", "}", "else", "{", "result", "future", "complete", "exceptionally", "(", "new", "retry", "exception", "(", "\"", "could", "not", "complete", "the", "operation", "number", "of", "retries", "\"", "+", "\"", "has", "been", "exhausted", "\"", ",", "throwable", ")", ")", ";", "}", "}", "}", "}", "else", "{", "result", "future", "complete", "(", "t", ")", ";", "}", "}", ",", "executor", ")", ";", "result", "future", "when", "complete", "(", "(", "t", ",", "throwable", ")", "-", ">", "operation", "future", "cancel", "(", "false", ")", ")", ";", "}", "}" ]
[ "reports", "the", "problem", "if", "it", "is", "different", "than", "the", "last", "seen", "problem" ]
[ "private", "void", "report", "problem", "(", "string", "template", ",", "string", "problem", "message", ")", "{", "has", "problems", "=", "true", ";", "if", "(", "!", "objects", "equals", "(", "previous", "problem", ",", "problem", "message", ")", ")", "{", "previous", "problem", "=", "problem", "message", ";", "auditor", "error", "(", "job", "id", ",", "messages", "get", "message", "(", "template", ",", "problem", "message", ")", ")", ";", "}", "}" ]
[ "get", "last", "name" ]
[ "public", "string", "get", "last", "name", "(", ")", "{", "return", "last", "name", ";", "}" ]
[ "recursively", "check", "if", "a", "given", "path", "and", "its", "child", "paths", "have", "colons", "in", "their", "names", "it", "returns", "true", "if", "none", "of", "them", "has", "a", "colon", "or", "this", "path", "does", "not", "exist", ",", "and", "false", "otherwise" ]
[ "private", "boolean", "recursive", "check", "child", "path", "name", "(", "file", "system", "fs", ",", "path", "p", ")", "throws", "i", "o", "exception", "{", "if", "(", "p", "=", "=", "null", ")", "{", "return", "true", ";", "}", "file", "status", "status", ";", "try", "{", "status", "=", "fs", "get", "file", "status", "(", "p", ")", ";", "}", "catch", "(", "file", "not", "found", "exception", "e", ")", "{", "system", "out", "println", "(", "\"", "path", "\"", "+", "p", "+", "\"", "does", "not", "exist", "!", "\"", ")", ";", "return", "true", ";", "}", "if", "(", "status", "is", "file", "(", ")", ")", "{", "if", "(", "contains", "colon", "(", "p", ")", ")", "{", "system", "out", "println", "(", "\"", "warning", ":", "file", "\"", "+", "p", "+", "\"", "has", "a", "colon", "in", "its", "name", "\"", ")", ";", "return", "false", ";", "}", "else", "{", "return", "true", ";", "}", "}", "else", "{", "boolean", "flag", ";", "if", "(", "contains", "colon", "(", "p", ")", ")", "{", "system", "out", "println", "(", "\"", "warning", ":", "directory", "\"", "+", "p", "+", "\"", "has", "a", "colon", "in", "its", "name", "\"", ")", ";", "flag", "=", "false", ";", "}", "else", "{", "flag", "=", "true", ";", "}", "file", "status", "[", "]", "listed", "=", "fs", "list", "status", "(", "p", ")", ";", "for", "(", "file", "status", "l", ":", "listed", ")", "{", "if", "(", "!", "recursive", "check", "child", "path", "name", "(", "fs", ",", "l", "get", "path", "(", ")", ")", ")", "{", "flag", "=", "false", ";", "}", "}", "return", "flag", ";", "}", "}" ]
[ "if", "this", "executor", "is", "running", "an", "{", "@", "link", "asynchronous", "execution", "}", "and", "that", "execution", "wants", "to", "hide", "the", "display", "cell", "for", "the", "executor", "(", "because", "there", "is", "another", "executor", "displaying", "the", "job", "progress", "and", "we", "don", "'", "t", "want", "to", "confuse", "the", "user", ")", "then", "this", "method", "will", "return", "{", "@", "code", "false", "}", "to", "indicate", "to", "{", "@", "code", "executors", "jelly", "}", "that", "the", "executor", "cell", "should", "be", "hidden" ]
[ "public", "boolean", "is", "display", "cell", "(", ")", "{", "asynchronous", "execution", "asynchronous", "execution", "=", "get", "asynchronous", "execution", "(", ")", ";", "return", "asynchronous", "execution", "=", "=", "null", "|", "|", "asynchronous", "execution", "display", "cell", "(", ")", ";", "}" ]
[ "returns", "{", "@", "code", "true", "}", "if", "this", "provider", "set", "can", "have", "any", "provider", ",", "or", "if", "it", "advertises", "the", "specific", "built", "-", "in", "provider", "requested" ]
[ "public", "boolean", "advertises", "(", "class", "<", "?", ">", "builtin", "provider", "class", ")", "{", "if", "(", "can", "have", "any", "provider", "(", ")", ")", "{", "return", "true", ";", "}", "return", "builtin", "providers", "contains", "(", "builtin", "provider", "class", ")", ";", "}" ]
[ "creates", "a", "new", "ordering", "the", "represents", "an", "ordering", "on", "a", "prefix", "of", "the", "fields", "if", "the", "exclusive", "index", "up", "to", "which", "to", "create", "the", "ordering", "is", "<", "code", ">", "0", "<", "code", ">", ",", "then", "there", "is", "no", "resulting", "ordering", "and", "this", "method", "return", "<", "code", ">", "null", "<", "code", ">" ]
[ "public", "ordering", "create", "new", "ordering", "up", "to", "index", "(", "int", "exclusive", "index", ")", "{", "if", "(", "exclusive", "index", "=", "=", "0", ")", "{", "return", "null", ";", "}", "final", "ordering", "new", "ordering", "=", "new", "ordering", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "exclusive", "index", ";", "i", "+", "+", ")", "{", "new", "ordering", "append", "ordering", "(", "this", "indexes", "get", "(", "i", ")", ",", "this", "types", "get", "(", "i", ")", ",", "this", "orders", "get", "(", "i", ")", ")", ";", "}", "return", "new", "ordering", ";", "}" ]
[ "extract", "the", "payload", "of", "the", "specified", "{", "@", "link", "javax", "jms", "message", "}" ]
[ "protected", "object", "extract", "payload", "(", "javax", "jms", "message", "message", ")", "throws", "j", "m", "s", "exception", "{", "return", "this", "payload", "converter", "from", "message", "(", "message", ")", ";", "}" ]
[ "test", "an", "enveloping", "polygon", "around", "the", "max", "mercator", "bounds" ]
[ "public", "void", "test", "boundary", "shape", "(", ")", "{", "polygon", "builder", "builder", "=", "new", "polygon", "builder", "(", "new", "coordinates", "builder", "(", ")", "coordinate", "(", "-", "180", ",", "90", ")", "coordinate", "(", "180", ",", "90", ")", "coordinate", "(", "180", ",", "-", "90", ")", "coordinate", "(", "-", "180", ",", "90", ")", ")", ";", "assert", "polygon", "(", "builder", "close", "(", ")", "build", "s", "4", "j", "(", ")", ",", "true", ")", ";", "assert", "polygon", "(", "build", "geometry", "(", "builder", "close", "(", ")", ")", ",", "false", ")", ";", "}" ]
[ "this", "implementation", "creates", "an", "{", "@", "link", "x", "s", "s", "f", "workbook", "}", "for", "the", "xlsx", "format" ]
[ "protected", "workbook", "create", "workbook", "(", "map", "<", "string", ",", "object", ">", "model", ",", "http", "servlet", "request", "request", ")", "{", "return", "new", "x", "s", "s", "f", "workbook", "(", ")", ";", "}" ]
[ "return", "the", "number", "of", "unset", "bits" ]
[ "public", "int", "get", "unset", "bits", "(", "int", "batch", "size", ")", "throws", "i", "o", "exception", "{", "int", "count", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "batch", "size", ";", "i", "+", "+", ")", "{", "count", "+", "=", "next", "bit", "(", ")", "?", "0", ":", "1", ";", "}", "return", "count", ";", "}" ]
[ "get", "array", "array", "of", "integer" ]
[ "public", "list", "<", "list", "<", "long", ">", ">", "get", "array", "array", "of", "integer", "(", ")", "{", "return", "array", "array", "of", "integer", ";", "}" ]
[ "emit", "a", "message", "that", "can", "be", "logged", "or", "escalated", "by", "the", "logger", "implementation" ]
[ "public", "static", "void", "report", "(", "final", "log", "level", "level", ",", "final", "string", "category", "key", ",", "final", "string", "message", ",", "final", "int", "sampling", "frequency", ",", "final", "@", "nullable", "map", "<", "string", ",", "object", ">", "metadata", ")", "{", "get", "instance", "(", ")", "report", "(", "level", ",", "category", "key", ",", "message", ",", "sampling", "frequency", ",", "metadata", ")", ";", "}" ]
[ "specifies", "the", "expected", "number", "of", "edges", "in", "the", "network" ]
[ "public", "network", "builder", "<", "n", ",", "e", ">", "expected", "edge", "count", "(", "int", "expected", "edge", "count", ")", "{", "this", "expected", "edge", "count", "=", "optional", "of", "(", "check", "non", "negative", "(", "expected", "edge", "count", ")", ")", ";", "return", "this", ";", "}" ]
[ "returns", "a", "uncompressed", "stream", ",", "else", "{", "@", "code", "null", "}" ]
[ "private", "@", "nullable", "input", "stream", "try", "compressed", "(", "input", "stream", "input", ")", "{", "try", "{", "return", "new", "compressor", "stream", "factory", "(", ")", "create", "compressor", "input", "stream", "(", "input", ")", ";", "}", "catch", "(", "compressor", "exception", "e", ")", "{", "return", "null", ";", "}", "}" ]
[ "returns", "the", "{", "@", "link", "objc", "provider", "}", "which", "contains", "information", "about", "the", "transitive", "dependencies", "linked", "into", "the", "dylib" ]
[ "public", "objc", "provider", "get", "deps", "objc", "provider", "(", ")", "{", "return", "deps", "objc", "provider", ";", "}" ]
[ "atomically", "increments", "by", "one", "the", "current", "value" ]
[ "public", "int", "increment", "and", "get", "(", "string", "ip", ")", "{", "int", "index", "=", "0", ";", "if", "(", "ip", "!", "=", "null", ")", "{", "index", "=", "ip", "hash", "code", "(", ")", "%", "slot", "count", ";", "}", "if", "(", "index", "<", "0", ")", "{", "index", "=", "-", "index", ";", "}", "return", "data", "[", "index", "]", "increment", "and", "get", "(", ")", ";", "}" ]
[ "returns", "a", "new", "target", "iterator", "each", "time", "it", "'", "s", "called", "this", "is", "the", "iterator", "you", "are", "trying", "to", "test", "this", "must", "return", "an", "iterator", "that", "returns", "the", "expected", "elements", "passed", "to", "the", "constructor", "in", "the", "given", "order", "warning", ":", "it", "is", "not", "enough", "to", "simply", "pull", "multiple", "iterators", "from", "the", "same", "source", "iterable", ",", "unless", "that", "iterator", "is", "unmodifiable" ]
[ "protected", "abstract", "i", "new", "target", "iterator", "(", ")", ";" ]
[ "opens", "a", "blob", "input", "stream", "to", "download", "the", "blob", "using", "the", "specified", "operation", "context", "use", "{", "@", "link", "cloud", "blob", "client", "#", "set", "stream", "minimum", "read", "size", "in", "bytes", "}", "to", "configure", "the", "read", "size" ]
[ "input", "stream", "open", "input", "stream", "(", "blob", "request", "options", "options", ",", "operation", "context", "op", "context", ")", "throws", "storage", "exception", ";" ]
[ "ensures", "the", "specified", "full", "directory", "path", "exists", ",", "creating", "any", "missing", "directories", "as", "needed", "throws", "an", "{", "@", "link", "i", "o", "exception", "}", "if", "there", "is", "any", "problem", "while", "creating", "the", "directory", "uses", "{", "@", "link", "#", "create", "dir", "(", "file", ")", "}", "to", "create", "new", "directories", "(", "which", "handles", "race", "conditions", "if", "other", "processes", "are", "also", "trying", "to", "create", "the", "same", "directory", ")" ]
[ "public", "static", "file", "checked", "mkdirs", "(", "file", "dir", ")", "throws", "i", "o", "exception", "{", "if", "(", "!", "create", "dir", "(", "dir", ")", ")", "{", "file", "canon", "file", "=", "dir", "get", "canonical", "file", "(", ")", ";", "file", "parent", "=", "canon", "file", "get", "parent", "file", "(", ")", ";", "if", "(", "parent", "!", "=", "null", ")", "{", "checked", "mkdirs", "(", "parent", ")", ";", "checked", "mkdir", "(", "canon", "file", ")", ";", "}", "}", "return", "dir", ";", "}" ]
[ "gets", "a", "display", "label", "from", "an", "{", "@", "link", "attributed", "}", "object", "(", "vertex", ")" ]
[ "public", "static", "string", "get", "label", "(", "attributed", "attributed", ")", "{", "map", "<", "string", ",", "string", ">", "map", "=", "attributed", "get", "attribute", "map", "(", ")", ";", "string", "name", "=", "string", "escape", "utils", "escape", "html", "4", "(", "map", "get", "(", "\"", "name", "\"", ")", ")", ";", "if", "(", "map", "contains", "key", "(", "\"", "code", "\"", ")", ")", "{", "name", "=", "string", "escape", "utils", "escape", "html", "4", "(", "map", "get", "(", "\"", "code", "\"", ")", ")", ";", "}", "return", "\"", "<", "html", ">", "\"", "+", "string", "join", "(", "\"", "<", "p", ">", "\"", ",", "splitter", "on", "(", "'", "\\", "n", "'", ")", "split", "(", "name", ")", ")", ";", "}" ]
[ "utility", "function", "to", "get", "the", "browsing", "engine", "'", "s", "configuration", "as", "a", "json", "object", "from", "the", "\"", "engine", "\"", "request", "parameter", ",", "most", "often", "in", "the", "post", "body" ]
[ "static", "protected", "engine", "config", "get", "engine", "config", "(", "http", "servlet", "request", "request", ")", "{", "if", "(", "request", "=", "=", "null", ")", "{", "throw", "new", "illegal", "argument", "exception", "(", "\"", "parameter", "'", "request", "'", "should", "not", "be", "null", "\"", ")", ";", "}", "string", "json", "=", "request", "get", "parameter", "(", "\"", "engine", "\"", ")", ";", "return", "(", "json", "=", "=", "null", ")", "?", "null", ":", "engine", "config", "reconstruct", "(", "json", ")", ";", "}" ]
[ "prevent", "the", "client", "from", "automatically", "reconnecting", "if", "the", "connection", "to", "the", "server", "is", "lost" ]
[ "public", "void", "dont", "reconnect", "(", ")", "throws", "exception", "{", "java", "lang", "reflect", "field", "f", "=", "cnxn", "get", "class", "(", ")", "get", "declared", "field", "(", "\"", "closing", "\"", ")", ";", "f", "set", "accessible", "(", "true", ")", ";", "f", "set", "boolean", "(", "cnxn", ",", "true", ")", ";", "}" ]
[ "filters", "factories", "with", "matching", "context", "by", "factory", "class" ]
[ "private", "static", "<", "t", ">", "list", "<", "t", ">", "filter", "by", "factory", "class", "(", "class", "<", "t", ">", "factory", "class", ",", "map", "<", "string", ",", "string", ">", "properties", ",", "list", "<", "table", "factory", ">", "found", "factories", ")", "{", "list", "<", "table", "factory", ">", "class", "factories", "=", "found", "factories", "stream", "(", ")", "filter", "(", "p", "-", ">", "factory", "class", "is", "assignable", "from", "(", "p", "get", "class", "(", ")", ")", ")", "collect", "(", "collectors", "to", "list", "(", ")", ")", ";", "if", "(", "class", "factories", "is", "empty", "(", ")", ")", "{", "throw", "new", "no", "matching", "table", "factory", "exception", "(", "string", "format", "(", "\"", "no", "factory", "implements", "'", "%", "s", "'", "\"", ",", "factory", "class", "get", "canonical", "name", "(", ")", ")", ",", "factory", "class", ",", "found", "factories", ",", "properties", ")", ";", "}", "return", "(", "list", "<", "t", ">", ")", "class", "factories", ";", "}" ]
[ "returns", "a", "language", "compiler", "spec", "pair", ",", "using", "the", "string", "parameters", "for", "guidance", "the", "actual", "behavior", "of", "the", "method", "depends", "on", "your", "environment", ",", "which", "can", "be", "gui", "or", "headless", "regardless", "of", "environment", "-", "-", "if", "script", "arguments", "have", "been", "set", ",", "this", "method", "will", "use", "the", "next", "argument", "in", "the", "array", "and", "advance", "the", "array", "index", "so", "the", "next", "call", "to", "an", "ask", "method", "will", "get", "the", "next", "argument", "if", "there", "are", "no", "script", "arguments", "and", "a", "properties", "file", "sharing", "the", "same", "base", "name", "as", "the", "ghidra", "script", "exists", "(", "i", "e", ",", "script", "1", "properties", "for", "script", "1", "java", ")", ",", "then", "this", "method", "will", "then", "look", "there", "for", "the", "string", "value", "to", "return", "the", "method", "will", "look", "in", "the", "properties", "file", "by", "searching", "for", "a", "property", "name", "that", "is", "a", "space", "-", "separated", "concatenation", "of", "the", "input", "string", "parameters", "(", "title", "+", "\"", "\"", "+", "message", ")", "if", "that", "property", "name", "exists", "and", "its", "value", "represents", "a", "valid", "language", "compiler", "spec", "pair", "value", ",", "then", "the", "properties", "value", "will", "be", "used", "in", "the", "following", "way", ":", "in", "the", "gui", "environment", ",", "this", "method", "displays", "a", "language", "table", "dialog", "and", "returns", "the", "selected", "language", "if", "the", "same", "popup", "has", "been", "run", "before", "in", "the", "same", "session", ",", "the", "last", "-", "used", "language", "will", "be", "pre", "-", "selected", "if", "not", ",", "the", "language", "specified", "in", "the", "properties", "file", "will", "be", "pre", "-", "selected", "(", "if", "it", "exists", ")", "in", "the", "headless", "environment", ",", "this", "method", "returns", "a", "language", "compiler", "spec", "pair", "representing", "the", "properties", "value", "(", "if", "it", "exists", ")", ",", "or", "throws", "an", "exception", "if", "there", "is", "an", "invalid", "or", "missing", "properties", "value" ]
[ "public", "language", "compiler", "spec", "pair", "ask", "language", "(", "string", "title", ",", "string", "approve", "button", "text", ")", "throws", "cancelled", "exception", "{", "string", "key", "=", "join", "(", "title", ",", "approve", "button", "text", ")", ";", "language", "compiler", "spec", "pair", "existing", "value", "=", "load", "ask", "value", "(", "this", ":", ":", "parse", "language", "compile", "spec", "pair", ",", "key", ")", ";", "if", "(", "is", "running", "headless", "(", ")", ")", "{", "return", "existing", "value", ";", "}", "class", "<", "language", "compiler", "spec", "pair", ">", "clazz", "=", "language", "compiler", "spec", "pair", "class", ";", "language", "compiler", "spec", "pair", "choice", "=", "do", "ask", "(", "clazz", ",", "title", ",", "approve", "button", "text", ",", "existing", "value", ",", "last", "value", "-", ">", "{", "select", "language", "dialog", "dialog", "=", "new", "select", "language", "dialog", "(", "title", ",", "approve", "button", "text", ")", ";", "atomic", "reference", "<", "language", "compiler", "spec", "pair", ">", "ref", "=", "new", "atomic", "reference", "<", ">", "(", ")", ";", "runnable", "r", "=", "(", ")", "-", ">", "{", "dialog", "set", "selected", "language", "(", "last", "value", ")", ";", "ref", "set", "(", "dialog", "get", "selected", "language", "(", ")", ")", ";", "}", ";", "swing", "run", "now", "(", "r", ")", ";", "if", "(", "dialog", "was", "cancelled", "(", ")", ")", "{", "throw", "new", "cancelled", "exception", "(", ")", ";", "}", "return", "ref", "get", "(", ")", ";", "}", ")", ";", "return", "choice", ";", "}" ]
[ "set", "the", "(", "new", ")", "value", "of", "the", "{", "@", "code", "access", "-", "control", "-", "allow", "-", "methods", "}", "response", "header" ]
[ "public", "void", "set", "access", "control", "allow", "methods", "(", "list", "<", "http", "method", ">", "allowed", "methods", ")", "{", "set", "(", "access", "control", "allow", "methods", ",", "string", "utils", "collection", "to", "comma", "delimited", "string", "(", "allowed", "methods", ")", ")", ";", "}" ]
[ "test", "the", "property", "'", "prefix", "ns", "string", "'" ]
[ "public", "void", "prefix", "ns", "string", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "prefix", "ns", "string", "}" ]
[ "the", "configured", "http", "header", "names", "to", "be", "copied", "from", "the", "handshake", "headers", "and", "also", "included", "in", "other", "http", "requests" ]
[ "public", "string", "[", "]", "get", "http", "header", "names", "(", ")", "{", "return", "this", "http", "header", "names", ";", "}" ]
[ "method", "to", "adjust", "line", "and", "column", "numbers", "for", "the", "start", "of", "a", "token" ]
[ "public", "void", "adjust", "begin", "line", "column", "(", "int", "new", "line", ",", "int", "new", "col", ")", "{", "int", "start", "=", "token", "begin", ";", "int", "len", ";", "if", "(", "bufpos", ">", "=", "token", "begin", ")", "{", "len", "=", "bufpos", "-", "token", "begin", "+", "in", "buf", "+", "1", ";", "}", "else", "{", "len", "=", "bufsize", "-", "token", "begin", "+", "bufpos", "+", "1", "+", "in", "buf", ";", "}", "int", "i", "=", "0", ",", "j", "=", "0", ",", "k", "=", "0", ";", "int", "next", "col", "diff", "=", "0", ",", "column", "diff", "=", "0", ";", "while", "(", "i", "<", "len", "&", "&", "bufline", "[", "j", "=", "start", "%", "bufsize", "]", "=", "=", "bufline", "[", "k", "=", "+", "+", "start", "%", "bufsize", "]", ")", "{", "bufline", "[", "j", "]", "=", "new", "line", ";", "next", "col", "diff", "=", "column", "diff", "+", "bufcolumn", "[", "k", "]", "-", "bufcolumn", "[", "j", "]", ";", "bufcolumn", "[", "j", "]", "=", "new", "col", "+", "column", "diff", ";", "column", "diff", "=", "next", "col", "diff", ";", "i", "+", "+", ";", "}", "if", "(", "i", "<", "len", ")", "{", "bufline", "[", "j", "]", "=", "new", "line", "+", "+", ";", "bufcolumn", "[", "j", "]", "=", "new", "col", "+", "column", "diff", ";", "while", "(", "i", "+", "+", "<", "len", ")", "{", "if", "(", "bufline", "[", "j", "=", "start", "%", "bufsize", "]", "!", "=", "bufline", "[", "+", "+", "start", "%", "bufsize", "]", ")", "bufline", "[", "j", "]", "=", "new", "line", "+", "+", ";", "else", "bufline", "[", "j", "]", "=", "new", "line", ";", "}", "}", "line", "=", "bufline", "[", "j", "]", ";", "column", "=", "bufcolumn", "[", "j", "]", ";", "}" ]
[ "{", "@", "inherit", "doc", "}", "the", "default", "implementation", "returns", "the", "result", "of", "calling", "{", "@", "link", "#", "visit", "children", "}", "on", "{", "@", "code", "ctx", "}" ]
[ "@", "override", "public", "t", "visit", "elvis", "(", "painless", "parser", "elvis", "context", "ctx", ")", "{", "return", "visit", "children", "(", "ctx", ")", ";", "}" ]
[ "returns", "a", "future", "indicating", "when", "the", "rpc", "service", "has", "been", "shut", "down" ]
[ "completable", "future", "<", "void", ">", "get", "termination", "future", "(", ")", ";" ]
[ "assert", "the", "precision", "value", "is", "within", "the", "allowed", "range", ",", "and", "return", "it", "if", "ok", ",", "or", "throw" ]
[ "public", "static", "int", "check", "precision", "range", "(", "int", "precision", ")", "{", "if", "(", "precision", "<", "0", "|", "|", "precision", ">", "max", "zoom", ")", "{", "throw", "new", "illegal", "argument", "exception", "(", "\"", "invalid", "geotile", "grid", "precision", "of", "\"", "+", "precision", "+", "\"", "must", "be", "between", "0", "and", "\"", "+", "max", "zoom", "+", "\"", "\"", ")", ";", "}", "return", "precision", ";", "}" ]
[ "used", "during", "deserialization", "only" ]
[ "final", "void", "set", "map", "(", "map", "<", "k", ",", "collection", "<", "v", ">", ">", "map", ")", "{", "this", "map", "=", "map", ";", "total", "size", "=", "0", ";", "for", "(", "collection", "<", "v", ">", "values", ":", "map", "values", "(", ")", ")", "{", "check", "argument", "(", "!", "values", "is", "empty", "(", ")", ")", ";", "total", "size", "+", "=", "values", "size", "(", ")", ";", "}", "}" ]
[ "clear", "the", "current", "alert", "status" ]
[ "void", "clear", "alert", "(", ")", ";" ]
[ "returns", "a", "new", "data", "encryption", "key", "factory", "that", "generates", "a", "key", "from", "the", "block", "pool", "token", "secret", "manager", ",", "using", "the", "block", "pool", "id", "of", "the", "given", "block" ]
[ "public", "data", "encryption", "key", "factory", "get", "data", "encryption", "key", "factory", "for", "block", "(", "final", "extended", "block", "block", ")", "{", "return", "new", "data", "encryption", "key", "factory", "(", ")", "{", "@", "override", "public", "data", "encryption", "key", "new", "data", "encryption", "key", "(", ")", "{", "return", "dn", "conf", "encrypt", "data", "transfer", "?", "block", "pool", "token", "secret", "manager", "generate", "data", "encryption", "key", "(", "block", "get", "block", "pool", "id", "(", ")", ")", ":", "null", ";", "}", "}", ";", "}" ]
[ "sets", "transaction", "service", "group" ]
[ "public", "void", "set", "transaction", "service", "group", "(", "string", "transaction", "service", "group", ")", "{", "this", "transaction", "service", "group", "=", "transaction", "service", "group", ";", "}" ]
[ "waits", "until", "at", "least", "a", "give", "number", "of", "document", "is", "visible", "for", "searchers" ]
[ "public", "void", "wait", "for", "docs", "(", "final", "long", "num", "docs", ",", "final", "background", "indexer", "indexer", ")", "throws", "exception", "{", "/", "/", "indexing", "threads", "can", "wait", "for", "up", "to", "~", "1m", "before", "retrying", "when", "they", "first", "try", "to", "index", "into", "a", "shard", "which", "is", "not", "started", "final", "long", "max", "wait", "time", "ms", "=", "math", "max", "(", "90", "*", "1000", ",", "200", "*", "num", "docs", ")", ";", "assert", "busy", "(", "(", ")", "-", ">", "{", "long", "last", "known", "count", "=", "indexer", "total", "indexed", "docs", "(", ")", ";", "if", "(", "last", "known", "count", ">", "=", "num", "docs", ")", "{", "try", "{", "long", "count", "=", "indexer", "get", "client", "(", ")", "prepare", "search", "(", ")", "set", "track", "total", "hits", "(", "true", ")", "set", "size", "(", "0", ")", "set", "query", "(", "query", "builders", "match", "all", "query", "(", ")", ")", "get", "(", ")", "get", "hits", "(", ")", "get", "total", "hits", "(", ")", "value", ";", "if", "(", "count", "=", "=", "last", "known", "count", ")", "{", "/", "/", "no", "progress", "-", "try", "to", "refresh", "for", "the", "next", "time", "indexer", "get", "client", "(", ")", "admin", "(", ")", "indices", "(", ")", "prepare", "refresh", "(", ")", "get", "(", ")", ";", "}", "last", "known", "count", "=", "count", ";", "}", "catch", "(", "exception", "e", ")", "{", "/", "/", "count", "now", "acts", "like", "search", "and", "barfs", "if", "all", "shards", "failed", "logger", "debug", "(", "\"", "failed", "to", "executed", "count", "\"", ",", "e", ")", ";", "throw", "e", ";", "}", "}", "if", "(", "logger", "is", "debug", "enabled", "(", ")", ")", "{", "if", "(", "last", "known", "count", "<", "num", "docs", ")", "{", "logger", "debug", "(", "\"", "[", "{", "}", "]", "docs", "indexed", "waiting", "for", "[", "{", "}", "]", "\"", ",", "last", "known", "count", ",", "num", "docs", ")", ";", "}", "else", "{", "logger", "debug", "(", "\"", "[", "{", "}", "]", "docs", "visible", "for", "search", "(", "needed", "[", "{", "}", "]", ")", "\"", ",", "last", "known", "count", ",", "num", "docs", ")", ";", "}", "}", "assert", "that", "(", "last", "known", "count", ",", "greater", "than", "or", "equal", "to", "(", "num", "docs", ")", ")", ";", "}", ",", "max", "wait", "time", "ms", ",", "time", "unit", "milliseconds", ")", ";", "}" ]
[ "adds", "a", "type", "information", "hint", "about", "the", "return", "type", "of", "this", "operator", "this", "method", "can", "be", "used", "in", "cases", "where", "flink", "cannot", "determine", "automatically", "what", "the", "produced", "type", "of", "a", "function", "is", "that", "can", "be", "the", "case", "if", "the", "function", "uses", "generic", "type", "variables", "in", "the", "return", "type", "that", "cannot", "be", "inferred", "from", "the", "input", "type", "use", "this", "method", "the", "following", "way", ":", "{", "@", "code", "data", "stream", "<", "tuple", "2", "<", "string", ",", "double", ">", ">", "result", "=", "stream", "flat", "map", "(", "new", "function", "with", "non", "inferrable", "return", "type", "(", ")", ")", "returns", "(", "new", "type", "hint", "<", "tuple", "2", "<", "string", ",", "double", ">", ">", "(", ")", "{", "}", ")", ";", "}" ]
[ "public", "single", "output", "stream", "operator", "<", "t", ">", "returns", "(", "type", "hint", "<", "t", ">", "type", "hint", ")", "{", "require", "non", "null", "(", "type", "hint", ",", "\"", "type", "hint", "must", "not", "be", "null", "\"", ")", ";", "try", "{", "return", "returns", "(", "type", "information", "of", "(", "type", "hint", ")", ")", ";", "}", "catch", "(", "invalid", "types", "exception", "e", ")", "{", "throw", "new", "invalid", "types", "exception", "(", "\"", "cannot", "infer", "the", "type", "information", "from", "the", "type", "hint", "\"", "+", "\"", "make", "sure", "that", "the", "type", "hint", "does", "not", "use", "any", "generic", "type", "variables", "\"", ")", ";", "}", "}" ]
[ "return", "the", "{", "@", "link", "message", "info", "}", "for", "inbound", "messages", "or", "{", "@", "code", "null", "}", "for", "outbound", "messages" ]
[ "public", "message", "info", "message", "info", "(", ")", "{", "return", "msg", "info", ";", "}" ]
[ "for", "ordering", "purposes", ";", "lower", "numbers", "are", "more", "important", "(", "and", "listed", "first", ",", "within", "its", "tier", ")" ]
[ "public", "int", "get", "tier", "priority", "(", ")", ";" ]
[ "adds", "the", "given", "values", "to", "the", "dataset", "the", "stream", "will", "be", "completely", "consumed", "by", "this", "method" ]
[ "public", "void", "add", "all", "(", "double", "stream", "values", ")", "{", "add", "all", "(", "values", "collect", "(", "stats", "accumulator", ":", ":", "new", ",", "stats", "accumulator", ":", ":", "add", ",", "stats", "accumulator", ":", ":", "add", "all", ")", ")", ";", "}" ]
[ "return", "the", "parcelable", "in", "cache" ]
[ "public", "static", "<", "t", ">", "t", "get", "parcelable", "(", "@", "non", "null", "final", "string", "key", ",", "@", "non", "null", "final", "parcelable", "creator", "<", "t", ">", "creator", ",", "final", "t", "default", "value", ",", "@", "non", "null", "final", "cache", "disk", "utils", "cache", "disk", "utils", ")", "{", "return", "cache", "disk", "utils", "get", "parcelable", "(", "key", ",", "creator", ",", "default", "value", ")", ";", "}", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "about", "serializable", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/", "/" ]
[ "a", "convenience", "method", "that", "performs", "click", "-", "and", "-", "hold", "at", "the", "location", "of", "the", "source", "element", ",", "moves", "by", "a", "given", "offset", ",", "then", "releases", "the", "mouse" ]
[ "public", "actions", "drag", "and", "drop", "by", "(", "web", "element", "source", ",", "int", "x", "offset", ",", "int", "y", "offset", ")", "{", "if", "(", "is", "building", "actions", "(", ")", ")", "{", "action", "add", "action", "(", "new", "click", "and", "hold", "action", "(", "json", "mouse", ",", "(", "locatable", ")", "source", ")", ")", ";", "action", "add", "action", "(", "new", "move", "to", "offset", "action", "(", "json", "mouse", ",", "null", ",", "x", "offset", ",", "y", "offset", ")", ")", ";", "action", "add", "action", "(", "new", "button", "release", "action", "(", "json", "mouse", ",", "null", ")", ")", ";", "}", "return", "move", "in", "ticks", "(", "source", ",", "0", ",", "0", ")", "tick", "(", "default", "mouse", "create", "pointer", "down", "(", "left", "as", "arg", "(", ")", ")", ")", "tick", "(", "default", "mouse", "create", "pointer", "move", "(", "duration", "of", "millis", "(", "250", ")", ",", "origin", "pointer", "(", ")", ",", "x", "offset", ",", "y", "offset", ")", ")", "tick", "(", "default", "mouse", "create", "pointer", "up", "(", "left", "as", "arg", "(", ")", ")", ")", ";", "}" ]
[ "provide", "a", "function", "to", "populate", "the", "reactor", "{", "@", "code", "context", "}" ]
[ "s", "context", "(", "function", "<", "context", ",", "context", ">", "context", "modifier", ")", ";" ]
[ "takes", "a", "string", "with", "keys", "and", "values", "separated", "by", "'", "=", "'", "and", "each", "key", "value", "pair", "separated", "by", "'", ",", "'", "for", "example", "max", "block", "ms", "=", "5000", ",", "retries", "=", "6", ",", "request", "timeout", "ms", "=", "6000", "this", "class", "makes", "it", "easier", "to", "pass", "configs", "from", "the", "system", "test", "in", "python", "to", "the", "java", "test" ]
[ "public", "static", "map", "<", "string", ",", "string", ">", "parse", "configs", "(", "final", "string", "formatted", "configs", ")", "{", "objects", "require", "non", "null", "(", "formatted", "configs", ",", "\"", "formatted", "config", "string", "can", "'", "t", "be", "null", "\"", ")", ";", "if", "(", "formatted", "configs", "index", "of", "(", "'", "=", "'", ")", "=", "=", "-", "1", ")", "{", "throw", "new", "illegal", "state", "exception", "(", "string", "format", "(", "\"", "provided", "string", "[", "%", "s", "]", "does", "not", "have", "expected", "key", "-", "value", "separator", "of", "'", "=", "'", "\"", ",", "formatted", "configs", ")", ")", ";", "}", "final", "string", "[", "]", "parts", "=", "formatted", "configs", "split", "(", "\"", ",", "\"", ")", ";", "final", "map", "<", "string", ",", "string", ">", "configs", "=", "new", "hash", "map", "<", ">", "(", ")", ";", "for", "(", "final", "string", "part", ":", "parts", ")", "{", "final", "string", "[", "]", "key", "value", "=", "part", "split", "(", "\"", "=", "\"", ")", ";", "if", "(", "key", "value", "length", ">", "2", ")", "{", "throw", "new", "illegal", "state", "exception", "(", "string", "format", "(", "\"", "provided", "string", "[", "%", "s", "]", "does", "not", "have", "expected", "key", "-", "value", "pair", "separator", "of", "'", ",", "'", "\"", ",", "formatted", "configs", ")", ")", ";", "}", "configs", "put", "(", "key", "value", "[", "key", "]", ",", "key", "value", "[", "value", "]", ")", ";", "}", "return", "configs", ";", "}" ]
[ "writes", "to", "the", "given", "{", "@", "link", "byte", "buffer", "}", "a", "byte", "representation", "of", "this", "instance", "<", "b", ">", "note", ":", "<", "b", ">", "no", "guarantees", "are", "made", "regarding", "stability", "of", "the", "representation", "between", "versions" ]
[ "void", "write", "to", "(", "byte", "buffer", "buffer", ")", "{", "check", "not", "null", "(", "buffer", ")", ";", "check", "argument", "(", "buffer", "remaining", "(", ")", ">", "=", "bytes", ",", "\"", "expected", "at", "least", "stats", "bytes", "=", "%", "s", "remaining", ",", "got", "%", "s", "\"", ",", "bytes", ",", "buffer", "remaining", "(", ")", ")", ";", "buffer", "put", "long", "(", "count", ")", "put", "double", "(", "mean", ")", "put", "double", "(", "sum", "of", "squares", "of", "deltas", ")", "put", "double", "(", "min", ")", "put", "double", "(", "max", ")", ";", "}" ]
[ "the", "{", "@", "code", "proto", "}", "source", "files", "in", "this", "{", "@", "code", "proto", "library", "}", "'", "s", "{", "@", "code", "srcs", "}", "and", "all", "of", "its", "transitive", "dependencies" ]
[ "public", "nested", "set", "<", "proto", "source", ">", "get", "transitive", "sources", "(", ")", "{", "return", "transitive", "sources", ";", "}" ]
[ "bind", "the", "given", "property", "values", "to", "this", "binder", "'", "s", "target", "this", "call", "can", "create", "field", "errors", ",", "representing", "basic", "binding", "errors", "like", "a", "required", "field", "(", "code", "\"", "required", "\"", ")", ",", "or", "type", "mismatch", "between", "value", "and", "bean", "property", "(", "code", "\"", "type", "mismatch", "\"", ")", "note", "that", "the", "given", "property", "values", "should", "be", "a", "throwaway", "instance", ":", "for", "efficiency", ",", "it", "will", "be", "modified", "to", "just", "contain", "allowed", "fields", "if", "it", "implements", "the", "mutable", "property", "values", "interface", ";", "else", ",", "an", "internal", "mutable", "copy", "will", "be", "created", "for", "this", "purpose", "pass", "in", "a", "copy", "of", "the", "property", "values", "if", "you", "want", "your", "original", "instance", "to", "stay", "unmodified", "in", "any", "case" ]
[ "public", "void", "bind", "(", "property", "values", "pvs", ")", "{", "mutable", "property", "values", "mpvs", "=", "(", "pvs", "instanceof", "mutable", "property", "values", "?", "(", "mutable", "property", "values", ")", "pvs", ":", "new", "mutable", "property", "values", "(", "pvs", ")", ")", ";", "do", "bind", "(", "mpvs", ")", ";", "}" ]
[ "transition", "from", "decommissioning", "state", "to", "maintenance", "state" ]
[ "public", "void", "test", "transition", "from", "decommissioning", "(", ")", "throws", "i", "o", "exception", "{", "log", "info", "(", "\"", "starting", "test", "transition", "from", "decommissioning", "\"", ")", ";", "start", "cluster", "(", "1", ",", "3", ")", ";", "final", "path", "file", "=", "new", "path", "(", "\"", "/", "test", "transition", "from", "decommissioning", "dat", "\"", ")", ";", "final", "int", "replicas", "=", "3", ";", "final", "file", "system", "file", "sys", "=", "get", "cluster", "(", ")", "get", "file", "system", "(", "0", ")", ";", "final", "f", "s", "namesystem", "ns", "=", "get", "cluster", "(", ")", "get", "namesystem", "(", "0", ")", ";", "write", "file", "(", "file", "sys", ",", "file", ",", "replicas", ")", ";", "final", "datanode", "info", "node", "outof", "service", "=", "take", "node", "outof", "service", "(", "0", ",", "null", ",", "0", ",", "null", ",", "admin", "states", "decommission", "inprogress", ")", ";", "take", "node", "outof", "service", "(", "0", ",", "node", "outof", "service", "get", "datanode", "uuid", "(", ")", ",", "long", "max", "value", ",", "null", ",", "admin", "states", "in", "maintenance", ")", ";", "check", "with", "retry", "(", "ns", ",", "file", "sys", ",", "file", ",", "replicas", "-", "1", ",", "node", "outof", "service", ")", ";", "cleanup", "file", "(", "file", "sys", ",", "file", ")", ";", "}" ]
[ "adds", "meta", "-", "inf", "directory", "through", "zip", "combiner", "with", "the", "given", "date", "and", "the", "magic", "jar", "id" ]
[ "public", "static", "void", "add", "meta", "inf", "(", "zip", "combiner", "combiner", ",", "date", "date", ")", "throws", "i", "o", "exception", "{", "combiner", "add", "directory", "(", "manifest", "directory", ",", "date", ",", "magic", "jar", "id", "extra", "entries", ")", ";", "}" ]
[ "create", "a", "new", "view", "of", "the", "annotation", "that", "exposes", "non", "-", "merged", "attribute", "values", "methods", "from", "this", "view", "will", "return", "attribute", "values", "with", "only", "alias", "mirroring", "rules", "applied", "aliases", "to", "{", "@", "link", "#", "get", "meta", "source", "(", ")", "meta", "-", "source", "}", "attributes", "will", "not", "be", "applied" ]
[ "merged", "annotation", "<", "a", ">", "with", "non", "merged", "attributes", "(", ")", ";" ]
[ "returns", "document", "frequency", "-", "the", "number", "of", "documents", "in", "the", "index", "that", "contain", "this", "term" ]
[ "public", "integer", "get", "doc", "freq", "(", ")", "{", "return", "doc", "freq", ";", "}" ]
[ "get", "name", "boolean" ]
[ "public", "boolean", "is", "name", "boolean", "(", ")", "{", "return", "name", "boolean", ";", "}" ]
[ "returns", "true", "if", "the", "entry", "has", "expired" ]
[ "boolean", "is", "expired", "(", "reference", "entry", "<", "k", ",", "v", ">", "entry", ",", "long", "now", ")", "{", "check", "not", "null", "(", "entry", ")", ";", "if", "(", "expires", "after", "access", "(", ")", "&", "&", "(", "now", "-", "entry", "get", "access", "time", "(", ")", ">", "=", "expire", "after", "access", "nanos", ")", ")", "{", "return", "true", ";", "}", "if", "(", "expires", "after", "write", "(", ")", "&", "&", "(", "now", "-", "entry", "get", "write", "time", "(", ")", ">", "=", "expire", "after", "write", "nanos", ")", ")", "{", "return", "true", ";", "}", "return", "false", ";", "}" ]
[ "declare", "the", "expected", "cost", "on", "any", "fs" ]
[ "protected", "operation", "cost", "validator", "expected", "probe", "always", "(", "operation", "cost", "cost", ")", "{", "return", "expect", "(", "true", ",", "cost", ")", ";", "}" ]
[ "gets", "the", "size", "of", "the", "collectioniterator", "specified", "this", "method", "can", "handles", "objects", "as", "follows", "collection", "-", "the", "collection", "size", "map", "-", "the", "map", "size", "array", "-", "the", "array", "size", "iterator", "-", "the", "number", "of", "elements", "remaining", "in", "the", "iterator", "enumeration", "-", "the", "number", "of", "elements", "remaining", "in", "the", "enumeration" ]
[ "public", "static", "int", "size", "(", "object", "object", ")", "{", "if", "(", "object", "=", "=", "null", ")", "return", "0", ";", "int", "total", "=", "0", ";", "if", "(", "object", "instanceof", "map", ")", "{", "total", "=", "(", "(", "map", ")", "object", ")", "size", "(", ")", ";", "}", "else", "if", "(", "object", "instanceof", "collection", ")", "{", "total", "=", "(", "(", "collection", ")", "object", ")", "size", "(", ")", ";", "}", "else", "if", "(", "object", "instanceof", "object", "[", "]", ")", "{", "total", "=", "(", "(", "object", "[", "]", ")", "object", ")", "length", ";", "}", "else", "if", "(", "object", "instanceof", "iterator", ")", "{", "iterator", "it", "=", "(", "iterator", ")", "object", ";", "while", "(", "it", "has", "next", "(", ")", ")", "{", "total", "+", "+", ";", "it", "next", "(", ")", ";", "}", "}", "else", "if", "(", "object", "instanceof", "enumeration", ")", "{", "enumeration", "it", "=", "(", "enumeration", ")", "object", ";", "while", "(", "it", "has", "more", "elements", "(", ")", ")", "{", "total", "+", "+", ";", "it", "next", "element", "(", ")", ";", "}", "}", "else", "{", "try", "{", "total", "=", "array", "get", "length", "(", "object", ")", ";", "}", "catch", "(", "illegal", "argument", "exception", "ex", ")", "{", "throw", "new", "illegal", "argument", "exception", "(", "\"", "unsupported", "object", "type", ":", "\"", "+", "object", "get", "class", "(", ")", "get", "name", "(", ")", ")", ";", "}", "}", "return", "total", ";", "}" ]
[ "the", "value", "of", "the", "enumflag", "<", "code", ">", "optional", "uint", "3", "2", "value", "=", "4", ";", "<", "code", ">" ]
[ "public", "int", "get", "value", "(", ")", "{", "return", "value", ";", "}" ]
[ "skip", "records", "with", "parse", "error", "instead", "to", "fail", "throw", "an", "exception", "by", "default" ]
[ "public", "old", "csv", "ignore", "parse", "errors", "(", ")", "{", "this", "lenient", "=", "optional", "of", "(", "true", ")", ";", "return", "this", ";", "}" ]
[ "returns", "an", "index", "for", "which", "{", "@", "link", "#", "value", "at", "}", "would", "return", "the", "specified", "key", ",", "or", "a", "negative", "number", "if", "no", "keys", "map", "to", "the", "specified", "value", "beware", "that", "this", "is", "a", "linear", "search", ",", "unlike", "lookups", "by", "key", ",", "and", "that", "multiple", "keys", "can", "map", "to", "the", "same", "value", "and", "this", "will", "find", "only", "one", "of", "them" ]
[ "public", "int", "index", "of", "value", "(", "int", "value", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "m", "size", ";", "+", "+", "i", ")", "{", "if", "(", "m", "values", "[", "i", "]", "=", "=", "value", ")", "{", "return", "i", ";", "}", "}", "return", "-", "1", ";", "}" ]
[ "return", "a", "qualifier", "value", "associated", "with", "this", "transaction", "attribute" ]
[ "public", "string", "get", "qualifier", "(", ")", "{", "return", "this", "qualifier", ";", "}" ]
[ "list", "of", "network", "dependencies" ]
[ "public", "list", "<", "string", ">", "get", "dependent", "host", "names", "(", ")", "{", "return", "dependent", "host", "names", ";", "}" ]
[ "test", "correctness", "of", "snapshot", "diff", "for", "encryption", "zone", "snapshto", "diff", "should", "work", "when", "the", "path", "parameter", "is", "prefixed", "with", "reservedraw", "for", "path", "that", "'", "s", "both", "snapshottable", "and", "encryption", "zone" ]
[ "public", "void", "test", "snapshot", "diff", "on", "encryption", "zones", "(", ")", "throws", "exception", "{", "final", "string", "test", "key2", "=", "\"", "testkey", "2", "\"", ";", "d", "f", "s", "test", "util", "create", "key", "(", "test", "key2", ",", "cluster", ",", "conf", ")", ";", "final", "int", "len", "=", "8196", ";", "final", "path", "zone", "=", "new", "path", "(", "\"", "/", "zone", "\"", ")", ";", "final", "path", "raw", "zone", "=", "new", "path", "(", "\"", "/", "reserved", "/", "raw", "/", "zone", "\"", ")", ";", "final", "path", "zone", "file", "=", "new", "path", "(", "zone", ",", "\"", "zone", "file", "\"", ")", ";", "fs", "wrapper", "mkdir", "(", "zone", ",", "fs", "permission", "get", "dir", "default", "(", ")", ",", "true", ")", ";", "dfs", "admin", "allow", "snapshot", "(", "zone", ")", ";", "dfs", "admin", "create", "encryption", "zone", "(", "zone", ",", "test", "key", ",", "no", "trash", ")", ";", "d", "f", "s", "test", "util", "create", "file", "(", "fs", ",", "zone", "file", ",", "len", ",", "(", "short", ")", "1", ",", "0x", "f", "e", "e", "d", ")", ";", "fs", "create", "snapshot", "(", "zone", ",", "\"", "snap", "1", "\"", ")", ";", "fs", "wrapper", "delete", "(", "zone", "file", ",", "true", ")", ";", "fs", "create", "snapshot", "(", "zone", ",", "\"", "snap", "2", "\"", ")", ";", "verify", "diff", "report", "(", "zone", ",", "\"", "snap", "1", "\"", ",", "\"", "snap", "2", "\"", ",", "new", "diff", "report", "entry", "(", "diff", "type", "modify", ",", "d", "f", "s", "util", "string", "2", "bytes", "(", "\"", "\"", ")", ")", ",", "new", "diff", "report", "entry", "(", "diff", "type", "delete", ",", "d", "f", "s", "util", "string", "2", "bytes", "(", "\"", "zone", "file", "\"", ")", ")", ")", ";", "verify", "diff", "report", "(", "raw", "zone", ",", "\"", "snap", "1", "\"", ",", "\"", "snap", "2", "\"", ",", "new", "diff", "report", "entry", "(", "diff", "type", "modify", ",", "d", "f", "s", "util", "string", "2", "bytes", "(", "\"", "\"", ")", ")", ",", "new", "diff", "report", "entry", "(", "diff", "type", "delete", ",", "d", "f", "s", "util", "string", "2", "bytes", "(", "\"", "zone", "file", "\"", ")", ")", ")", ";", "}" ]
[ "if", "set", "to", "true", ",", "the", "on", "measure", "(", ")", "call", "won", "'", "t", "measure", "the", "component", "tree", "with", "the", "given", "measure", "specs", ",", "but", "it", "will", "just", "use", "them", "as", "measured", "dimensions" ]
[ "public", "void", "suppress", "measure", "component", "tree", "(", "boolean", "suppress", ")", "{", "m", "suppress", "measure", "component", "tree", "=", "suppress", ";", "}" ]
[ "helper", "method", "to", "set", "api", "key", "prefix", "for", "the", "first", "api", "key", "authentication" ]
[ "public", "api", "client", "set", "api", "key", "prefix", "(", "string", "api", "key", "prefix", ")", "{", "for", "(", "authentication", "auth", ":", "authentications", "values", "(", ")", ")", "{", "if", "(", "auth", "instanceof", "api", "key", "auth", ")", "{", "(", "(", "api", "key", "auth", ")", "auth", ")", "set", "api", "key", "prefix", "(", "api", "key", "prefix", ")", ";", "return", "this", ";", "}", "}", "throw", "new", "runtime", "exception", "(", "\"", "no", "api", "key", "authentication", "configured", "!", "\"", ")", ";", "}" ]
[ "stores", "a", "double", "value", "in", "the", "table", "at", "the", "given", "row", "and", "column", "note", "-", "all", "values", "in", "a", "given", "column", "must", "be", "of", "the", "same", "type" ]
[ "public", "void", "put", "double", "(", "int", "row", ",", "int", "col", ",", "double", "value", ")", "{", "if", "(", "col", ">", "=", "data", "columns", "length", ")", "{", "grow", "table", "(", "col", "+", "1", ")", ";", "}", "double", "array", "da", "=", "null", ";", "if", "(", "data", "columns", "[", "col", "]", "=", "=", "null", ")", "{", "da", "=", "new", "double", "array", "(", ")", ";", "data", "columns", "[", "col", "]", "=", "da", ";", "}", "else", "{", "da", "=", "(", "double", "array", ")", "data", "columns", "[", "col", "]", ";", "}", "da", "put", "(", "row", ",", "value", ")", ";", "}" ]
[ "returns", "the", "'", "current", "time", "'", "of", "the", "scheduler", "in", "the", "specified", "time", "unit" ]
[ "public", "long", "now", "(", "@", "non", "null", "time", "unit", "unit", ")", "{", "return", "unit", "convert", "(", "system", "current", "time", "millis", "(", ")", ",", "time", "unit", "milliseconds", ")", ";", "}" ]
[ "get", "ship", "date" ]
[ "public", "offset", "date", "time", "get", "ship", "date", "(", ")", "{", "return", "ship", "date", ";", "}" ]
[ "filter", "the", "request", "object", "for", "all", "routes", "created", "by", "this", "builder", "with", "the", "given", "request", "processing", "function", "filters", "are", "typically", "used", "to", "address", "cross", "-", "cutting", "concerns", ",", "such", "as", "logging", ",", "security", ",", "etc", "for", "instance", ",", "the", "following", "example", "creates", "a", "filter", "that", "logs", "the", "request", "before", "the", "handler", "function", "executes", "<", "pre", "class", "=", "\"", "code", "\"", ">", "router", "function", "&", "lt", ";", "server", "response", "&", "gt", ";", "filtered", "route", "=", "router", "functions", "route", "(", ")", "get", "(", "\"", "user", "\"", ",", "this", ":", ":", "list", "users", ")", "before", "(", "request", "-", ">", "{", "log", "(", "request", ")", ";", "return", "request", ";", "}", ")", "build", "(", ")", ";" ]
[ "builder", "before", "(", "function", "<", "server", "request", ",", "server", "request", ">", "request", "processor", ")", ";" ]
[ "get", "a", "bucket", "-", "specific", "property", "if", "the", "generic", "key", "passed", "in", "has", "an", "{", "@", "code", "fs", "s", "3a", "prefix", "}", ",", "that", "'", "s", "stripped", "off" ]
[ "public", "static", "string", "get", "bucket", "option", "(", "configuration", "conf", ",", "string", "bucket", ",", "string", "generic", "key", ")", "{", "final", "string", "base", "key", "=", "generic", "key", "starts", "with", "(", "fs", "s3a", "prefix", ")", "?", "generic", "key", "substring", "(", "fs", "s3a", "prefix", "length", "(", ")", ")", ":", "generic", "key", ";", "return", "conf", "get", "(", "fs", "s3a", "bucket", "prefix", "+", "bucket", "+", "'", "'", "+", "base", "key", ")", ";", "}" ]
[ "check", "information", "recorded", "by", "tracers" ]
[ "private", "void", "check", "tracers", "(", "test", "stream", "tracer", "tracer", ",", "collection", "<", "?", "extends", "message", "lite", ">", "sent", "messages", ",", "collection", "<", "?", "extends", "message", "lite", ">", "received", "messages", ")", "{", "long", "uncompressed", "sent", "size", "=", "0", ";", "int", "seq", "no", "=", "0", ";", "for", "(", "message", "lite", "msg", ":", "sent", "messages", ")", "{", "assert", "that", "(", "tracer", "next", "outbound", "event", "(", ")", ")", "is", "equal", "to", "(", "string", "format", "(", "\"", "outbound", "message", "(", "%", "d", ")", "\"", ",", "seq", "no", ")", ")", ";", "assert", "that", "(", "tracer", "next", "outbound", "event", "(", ")", ")", "matches", "(", "string", "format", "(", "\"", "outbound", "message", "sent", "\\", "\\", "(", "%", "d", ",", "-", "?", "[", "0", "-", "9", "]", "+", ",", "-", "?", "[", "0", "-", "9", "]", "+", "\\", "\\", ")", "\"", ",", "seq", "no", ")", ")", ";", "seq", "no", "+", "+", ";", "uncompressed", "sent", "size", "+", "=", "msg", "get", "serialized", "size", "(", ")", ";", "}", "assert", "null", "(", "tracer", "next", "outbound", "event", "(", ")", ")", ";", "long", "uncompressed", "received", "size", "=", "0", ";", "seq", "no", "=", "0", ";", "for", "(", "message", "lite", "msg", ":", "received", "messages", ")", "{", "assert", "that", "(", "tracer", "next", "inbound", "event", "(", ")", ")", "is", "equal", "to", "(", "string", "format", "(", "\"", "inbound", "message", "(", "%", "d", ")", "\"", ",", "seq", "no", ")", ")", ";", "assert", "that", "(", "tracer", "next", "inbound", "event", "(", ")", ")", "matches", "(", "string", "format", "(", "\"", "inbound", "message", "read", "\\", "\\", "(", "%", "d", ",", "-", "?", "[", "0", "-", "9", "]", "+", ",", "-", "?", "[", "0", "-", "9", "]", "+", "\\", "\\", ")", "\"", ",", "seq", "no", ")", ")", ";", "uncompressed", "received", "size", "+", "=", "msg", "get", "serialized", "size", "(", ")", ";", "seq", "no", "+", "+", ";", "}", "assert", "null", "(", "tracer", "next", "inbound", "event", "(", ")", ")", ";", "if", "(", "metrics", "expected", "(", ")", ")", "{", "assert", "equals", "(", "uncompressed", "sent", "size", ",", "tracer", "get", "outbound", "uncompressed", "size", "(", ")", ")", ";", "assert", "equals", "(", "uncompressed", "received", "size", ",", "tracer", "get", "inbound", "uncompressed", "size", "(", ")", ")", ";", "}", "}" ]
[ "need", "to", "judge", "the", "size", "of", "content", "whether", "to", "exceed", "the", "limination" ]
[ "public", "object", "around", "sync", "update", "config", "all", "(", "proceeding", "join", "point", "pjp", ",", "http", "servlet", "request", "request", ",", "http", "servlet", "response", "response", ",", "string", "data", "id", ",", "string", "group", ",", "string", "content", ",", "string", "app", "name", ",", "string", "src", "user", ",", "string", "tenant", ",", "string", "tag", ")", "throws", "throwable", "{", "if", "(", "!", "property", "util", "is", "manage", "capacity", "(", ")", ")", "{", "return", "pjp", "proceed", "(", ")", ";", "}", "logger", "info", "(", "\"", "[", "capacity", "management", "]", "around", "sync", "update", "config", "all", "\"", ")", ";", "string", "beta", "ips", "=", "request", "get", "header", "(", "\"", "beta", "ips", "\"", ")", ";", "if", "(", "string", "utils", "is", "blank", "(", "beta", "ips", ")", ")", "{", "if", "(", "string", "utils", "is", "blank", "(", "tag", ")", ")", "{", "/", "/", "do", "capacity", "management", "limination", "check", "for", "writting", "or", "updating", "config", "info", "table", "if", "(", "persist", "service", "find", "config", "info", "(", "data", "id", ",", "group", ",", "tenant", ")", "=", "=", "null", ")", "{", "/", "/", "write", "operation", "return", "do", "4", "insert", "(", "pjp", ",", "request", ",", "response", ",", "group", ",", "tenant", ",", "content", ")", ";", "}", "/", "/", "update", "operation", "return", "do", "4", "update", "(", "pjp", ",", "request", ",", "response", ",", "data", "id", ",", "group", ",", "tenant", ",", "content", ")", ";", "}", "}", "return", "pjp", "proceed", "(", ")", ";", "}" ]
[ "returns", "a", "new", "{", "@", "code", "type", "resolver", "}", "with", "type", "variables", "in", "{", "@", "code", "formal", "}", "mapping", "to", "types", "in", "{", "@", "code", "actual", "}", "for", "example", ",", "if", "{", "@", "code", "formal", "}", "is", "a", "{", "@", "code", "type", "variable", "t", "}", ",", "and", "{", "@", "code", "actual", "}", "is", "{", "@", "code", "string", "class", "}", ",", "then", "{", "@", "code", "new", "type", "resolver", "(", ")", "where", "(", "formal", ",", "actual", ")", "}", "will", "{", "@", "linkplain", "#", "resolve", "type", "resolve", "}", "{", "@", "code", "parameterized", "type", "list", "<", "t", ">", "}", "to", "{", "@", "code", "list", "<", "string", ">", "}", ",", "and", "resolve", "{", "@", "code", "map", "<", "t", ",", "something", ">", "}", "to", "{", "@", "code", "map", "<", "string", ",", "something", ">", "}", "etc", "similarly", ",", "{", "@", "code", "formal", "}", "and", "{", "@", "code", "actual", "}", "can", "be", "{", "@", "code", "map", "<", "k", ",", "v", ">", "}", "and", "{", "@", "code", "map", "<", "string", ",", "integer", ">", "}", "respectively", ",", "or", "they", "can", "be", "{", "@", "code", "e", "[", "]", "}", "and", "{", "@", "code", "string", "[", "]", "}", "respectively", ",", "or", "even", "any", "arbitrary", "combination", "thereof" ]
[ "public", "type", "resolver", "where", "(", "type", "formal", ",", "type", "actual", ")", "{", "map", "<", "type", "variable", "key", ",", "type", ">", "mappings", "=", "maps", "new", "hash", "map", "(", ")", ";", "populate", "type", "mappings", "(", "mappings", ",", "check", "not", "null", "(", "formal", ")", ",", "check", "not", "null", "(", "actual", ")", ")", ";", "return", "where", "(", "mappings", ")", ";", "}" ]
[ "can", "the", "shard", "request", "be", "cached", "at", "all", "?" ]
[ "public", "boolean", "can", "cache", "(", "shard", "search", "request", "request", ",", "search", "context", "context", ")", "{", "/", "/", "queries", "that", "create", "a", "scroll", "context", "cannot", "use", "the", "cache", "/", "/", "they", "modify", "the", "search", "context", "during", "their", "execution", "so", "using", "the", "cache", "/", "/", "may", "invalidate", "the", "scroll", "for", "the", "next", "query", "if", "(", "request", "scroll", "(", ")", "!", "=", "null", ")", "{", "return", "false", ";", "}", "/", "/", "we", "cannot", "cache", "with", "dfs", "because", "results", "depend", "not", "only", "on", "the", "content", "of", "the", "index", "but", "also", "/", "/", "on", "the", "overridden", "statistics", "so", "if", "you", "ran", "two", "queries", "on", "the", "same", "index", "with", "different", "stats", "/", "/", "(", "because", "an", "other", "shard", "was", "updated", ")", "you", "would", "get", "wrong", "results", "because", "of", "the", "scores", "/", "/", "(", "think", "about", "top", "hits", "aggs", "or", "scripts", "using", "the", "score", ")", "if", "(", "search", "type", "query", "then", "fetch", "!", "=", "context", "search", "type", "(", ")", ")", "{", "return", "false", ";", "}", "/", "/", "profiled", "queries", "should", "not", "use", "the", "cache", "if", "(", "request", "source", "(", ")", "!", "=", "null", "&", "&", "request", "source", "(", ")", "profile", "(", ")", ")", "{", "return", "false", ";", "}", "index", "settings", "settings", "=", "context", "index", "shard", "(", ")", "index", "settings", "(", ")", ";", "/", "/", "if", "not", "explicitly", "set", "in", "the", "request", ",", "use", "the", "index", "setting", ",", "if", "not", ",", "use", "the", "request", "if", "(", "request", "request", "cache", "(", ")", "=", "=", "null", ")", "{", "if", "(", "settings", "get", "value", "(", "indices", "request", "cache", "index", "cache", "request", "enabled", "setting", ")", "=", "=", "false", ")", "{", "return", "false", ";", "}", "else", "if", "(", "context", "size", "(", ")", "!", "=", "0", ")", "{", "/", "/", "if", "no", "request", "cache", "query", "parameter", "and", "shard", "request", "cache", "/", "/", "is", "enabled", "in", "settings", "don", "'", "t", "cache", "for", "requests", "with", "size", ">", "0", "return", "false", ";", "}", "}", "else", "if", "(", "request", "request", "cache", "(", ")", "=", "=", "false", ")", "{", "return", "false", ";", "}", "/", "/", "we", "use", "the", "cache", "key", "of", "the", "index", "reader", "as", "a", "part", "of", "a", "key", "of", "the", "indices", "request", "cache", "assert", "context", "searcher", "(", ")", "get", "index", "reader", "(", ")", "get", "reader", "cache", "helper", "(", ")", "!", "=", "null", ";", "/", "/", "if", "now", "in", "millis", "is", "used", "(", "or", "in", "the", "future", ",", "a", "more", "generic", "\"", "is", "deterministic", "\"", "flag", "/", "/", "then", "we", "can", "'", "t", "cache", "based", "on", "\"", "now", "\"", "key", "within", "the", "search", "request", ",", "as", "it", "is", "not", "deterministic", "if", "(", "context", "get", "query", "shard", "context", "(", ")", "is", "cacheable", "(", ")", "=", "=", "false", ")", "{", "return", "false", ";", "}", "return", "true", ";", "}" ]
[ "there", "is", "only", "one", "storage", "type", "(", "disk", ")", "in", "the", "cluster", "and", "tries", "to", "select", "a", "disk", "devices", "every", "time", "also", "one", "approach", "will", "always", "succeed", "in", "one", "call", "this", "test", "shows", "how", "bad", "the", "new", "approach", "is", "compared", "to", "the", "optimal", "situation" ]
[ "public", "void", "test", "same", "storage", "type", "(", ")", "throws", "exception", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "node", "num", ";", "i", "+", "+", ")", "{", "types", "[", "i", "]", "=", "storage", "type", "disk", ";", "}", "add", "node", "by", "types", "(", "types", ")", ";", "/", "/", "wait", "a", "bit", "for", "things", "to", "become", "stable", "thread", "sleep", "(", "1000", ")", ";", "print", "mem", "usage", "(", "\"", "before", "test", "1", "\"", ")", ";", "total", "start", "=", "system", "nano", "time", "(", ")", ";", "total", "trials", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "op", "num", ";", "i", "+", "+", ")", "{", "/", "/", "mimic", "the", "behaviour", "of", "current", "code", ":", "/", "/", "1", "choose", "random", "on", "network", "topology", "/", "/", "2", "if", "it", "satisfies", ",", "we", "are", "good", ",", "break", "/", "/", "3", "if", "not", ",", "add", "to", "excluded", ",", "try", "again", "do", "{", "total", "trials", "+", "=", "1", ";", "node", "=", "cluster", "choose", "random", "(", "\"", "\"", ",", "excluded", ")", ";", "assert", "not", "null", "(", "node", ")", ";", "if", "(", "is", "type", "(", "node", ",", "storage", "type", "disk", ")", ")", "{", "break", ";", "}", "excluded", "add", "(", "node", ")", ";", "}", "while", "(", "true", ")", ";", "excluded", "clear", "(", ")", ";", "}", "total", "end", "=", "system", "nano", "time", "(", ")", ";", "total", "ms", "=", "(", "total", "end", "-", "total", "start", ")", "/", "ns", "to", "ms", ";", "/", "/", "on", "average", "it", "takes", "20", "trials", "log", "info", "(", "\"", "total", "time", ":", "{", "}", "avg", "time", ":", "{", "}", "avg", "trials", ":", "{", "}", "\"", ",", "total", "ms", ",", "total", "ms", "/", "op", "num", ",", "(", "float", ")", "total", "trials", "/", "op", "num", ")", ";", "/", "/", "wait", "a", "bit", "for", "things", "to", "become", "stable", "thread", "sleep", "(", "1000", ")", ";", "print", "mem", "usage", "(", "\"", "after", "test", "1", "before", "test", "2", "\"", ")", ";", "total", "start", "=", "system", "nano", "time", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "op", "num", ";", "i", "+", "+", ")", "{", "node", "=", "dfscluster", "choose", "random", "with", "storage", "type", "(", "\"", "\"", ",", "excluded", ",", "storage", "type", "disk", ")", ";", "assert", "not", "null", "(", "node", ")", ";", "/", "/", "with", "dfs", "cluster", ",", "the", "returned", "is", "always", "already", "the", "required", "type", ";", "/", "/", "add", "assertion", "mainly", "to", "make", "a", "more", "fair", "comparison", "assert", "true", "(", "is", "type", "(", "node", ",", "storage", "type", "disk", ")", ")", ";", "}", "total", "end", "=", "system", "nano", "time", "(", ")", ";", "total", "ms", "=", "(", "total", "end", "-", "total", "start", ")", "/", "ns", "to", "ms", ";", "log", "info", "(", "\"", "total", "time", ":", "{", "}", "avg", "time", ":", "{", "}", "\"", ",", "total", "ms", ",", "total", "ms", "/", "op", "num", ")", ";", "print", "mem", "usage", "(", "\"", "after", "test", "2", "\"", ")", ";", "}" ]