docstring_tokens
list
code_tokens
list
[ "read", "the", "next", "value" ]
[ "private", "void", "read", "next", "value", "(", ")", "throws", "i", "o", "exception", "{", "data", "input", "buffer", "next", "value", "bytes", "=", "in", "get", "value", "(", ")", ";", "value", "in", "reset", "(", "next", "value", "bytes", "get", "data", "(", ")", ",", "next", "value", "bytes", "get", "position", "(", ")", ",", "next", "value", "bytes", "get", "length", "(", ")", ")", ";", "value", "=", "val", "deserializer", "deserialize", "(", "value", ")", ";", "}" ]
[ "given", "a", "state", "and", "a", "composable", "template", ",", "validate", "that", "the", "final", "composite", "template", "generated", "by", "the", "composable", "template", "and", "all", "of", "its", "component", "templates", "contains", "valid", "settings", ",", "mappings", ",", "and", "aliases" ]
[ "private", "static", "void", "validate", "composite", "template", "(", "final", "cluster", "state", "state", ",", "final", "string", "template", "name", ",", "final", "composable", "index", "template", "template", ",", "final", "indices", "service", "indices", "service", ",", "final", "named", "x", "content", "registry", "x", "content", "registry", ")", "throws", "exception", "{", "final", "cluster", "state", "state", "with", "template", "=", "cluster", "state", "builder", "(", "state", ")", "metadata", "(", "metadata", "builder", "(", "state", "metadata", "(", ")", ")", "put", "(", "template", "name", ",", "template", ")", ")", "build", "(", ")", ";", "final", "string", "temporary", "index", "name", "=", "\"", "validate", "-", "template", "-", "\"", "+", "u", "u", "i", "ds", "random", "base", "6", "4", "u", "u", "i", "d", "(", ")", "to", "lower", "case", "(", "locale", "root", ")", ";", "settings", "resolved", "settings", "=", "resolve", "settings", "(", "state", "with", "template", "metadata", "(", ")", ",", "template", "name", ")", ";", "/", "/", "use", "the", "provided", "values", ",", "otherwise", "just", "pick", "valid", "dummy", "values", "int", "dummy", "partition", "size", "=", "index", "metadata", "index", "routing", "partition", "size", "setting", "get", "(", "resolved", "settings", ")", ";", "int", "dummy", "shards", "=", "resolved", "settings", "get", "as", "int", "(", "index", "metadata", "setting", "number", "of", "shards", ",", "dummy", "partition", "size", "=", "=", "1", "?", "1", ":", "dummy", "partition", "size", "+", "1", ")", ";", "int", "shard", "replicas", "=", "resolved", "settings", "get", "as", "int", "(", "index", "metadata", "setting", "number", "of", "replicas", ",", "0", ")", ";", "/", "/", "create", "the", "final", "aggregate", "settings", ",", "which", "will", "be", "used", "to", "create", "the", "temporary", "index", "metadata", "to", "validate", "everything", "settings", "final", "resolved", "settings", "=", "settings", "builder", "(", ")", "put", "(", "index", "metadata", "setting", "version", "created", ",", "version", "current", ")", "put", "(", "resolved", "settings", ")", "put", "(", "index", "metadata", "setting", "number", "of", "shards", ",", "dummy", "shards", ")", "put", "(", "index", "metadata", "setting", "number", "of", "replicas", ",", "shard", "replicas", ")", "put", "(", "index", "metadata", "setting", "index", "uuid", ",", "u", "u", "i", "ds", "random", "base", "6", "4", "u", "u", "i", "d", "(", ")", ")", "build", "(", ")", ";", "/", "/", "validate", "index", "metadata", "(", "settings", ")", "final", "cluster", "state", "state", "with", "index", "=", "cluster", "state", "builder", "(", "state", "with", "template", ")", "metadata", "(", "metadata", "builder", "(", "state", "with", "template", "metadata", "(", ")", ")", "put", "(", "index", "metadata", "builder", "(", "temporary", "index", "name", ")", "settings", "(", "final", "resolved", "settings", ")", ")", "build", "(", ")", ")", "build", "(", ")", ";", "final", "index", "metadata", "tmp", "index", "metadata", "=", "state", "with", "index", "metadata", "(", ")", "index", "(", "temporary", "index", "name", ")", ";", "indices", "service", "with", "temp", "index", "service", "(", "tmp", "index", "metadata", ",", "temp", "index", "service", "-", ">", "{", "/", "/", "validate", "aliases", "metadata", "create", "index", "service", "resolve", "and", "validate", "aliases", "(", "temporary", "index", "name", ",", "collections", "empty", "set", "(", ")", ",", "metadata", "index", "template", "service", "resolve", "aliases", "(", "state", "with", "index", "metadata", "(", ")", ",", "template", "name", ")", ",", "state", "with", "index", "metadata", "(", ")", ",", "new", "alias", "validator", "(", ")", ",", "/", "/", "the", "context", "is", "only", "used", "for", "validation", "so", "it", "'", "s", "fine", "to", "pass", "fake", "values", "for", "the", "/", "/", "shard", "id", "and", "the", "current", "timestamp", "x", "content", "registry", ",", "temp", "index", "service", "new", "query", "shard", "context", "(", "0", ",", "0", ",", "null", ",", "(", ")", "-", ">", "0l", ",", "null", ",", "empty", "map", "(", ")", ")", ")", ";", "/", "/", "triggers", "inclusion", "of", "timestamp", "field", "and", "its", "validation", ":", "string", "index", "name", "=", "data", "stream", "backing", "index", "prefix", "+", "temporary", "index", "name", ";", "/", "/", "parse", "mappings", "to", "ensure", "they", "are", "valid", "after", "being", "composed", "if", "(", "template", "get", "data", "stream", "template", "(", ")", "!", "=", "null", ")", "{", "/", "/", "if", "there", "is", "no", "data", "stream", "meta", "field", "mapper", "and", "a", "data", "stream", "should", "be", "created", "then", "/", "/", "fail", "as", "if", "the", "data", "stream", "field", "can", "'", "t", "be", "parsed", ":", "if", "(", "temp", "index", "service", "mapper", "service", "(", ")", "is", "metadata", "field", "(", "\"", "data", "stream", "timestamp", "\"", ")", "=", "=", "false", ")", "{", "/", "/", "fail", "like", "a", "parsing", "expection", ",", "since", "we", "will", "be", "moving", "data", "stream", "template", "out", "of", "server", "module", "and", "/", "/", "then", "we", "would", "fail", "with", "the", "same", "error", "message", ",", "like", "we", "do", "here", "throw", "new", "x", "content", "parse", "exception", "(", "\"", "[", "index", "template", "]", "unknown", "field", "[", "data", "stream", "]", "\"", ")", ";", "}", "}", "list", "<", "compressed", "x", "content", ">", "mappings", "=", "collect", "mappings", "(", "state", "with", "index", ",", "template", "name", ",", "index", "name", ",", "x", "content", "registry", ")", ";", "try", "{", "mapper", "service", "mapper", "service", "=", "temp", "index", "service", "mapper", "service", "(", ")", ";", "for", "(", "compressed", "x", "content", "mapping", ":", "mappings", ")", "{", "mapper", "service", "merge", "(", "mapper", "service", "single", "mapping", "name", ",", "mapping", ",", "merge", "reason", "index", "template", ")", ";", "}", "if", "(", "template", "get", "data", "stream", "template", "(", ")", "!", "=", "null", ")", "{", "string", "ts", "field", "name", "=", "template", "get", "data", "stream", "template", "(", ")", "get", "timestamp", "field", "(", ")", ";", "validate", "timestamp", "field", "mapping", "(", "ts", "field", "name", ",", "mapper", "service", ")", ";", "}", "}", "catch", "(", "exception", "e", ")", "{", "throw", "new", "illegal", "argument", "exception", "(", "\"", "invalid", "composite", "mappings", "for", "[", "\"", "+", "template", "name", "+", "\"", "]", "\"", ",", "e", ")", ";", "}", "return", "null", ";", "}", ")", ";", "}" ]
[ "convert", "a", "network", "tree", "to", "a", "string" ]
[ "public", "string", "to", "string", "(", ")", "{", "/", "/", "print", "the", "number", "of", "racks", "string", "builder", "tree", "=", "new", "string", "builder", "(", ")", ";", "tree", "append", "(", "\"", "number", "of", "racks", ":", "\"", ")", "append", "(", "num", "of", "racks", ")", "append", "(", "\"", "\\", "n", "\"", ")", ";", "/", "/", "print", "the", "number", "of", "leaves", "int", "num", "of", "leaves", "=", "get", "num", "of", "leaves", "(", ")", ";", "tree", "append", "(", "\"", "expected", "number", "of", "leaves", ":", "\"", ")", "append", "(", "num", "of", "leaves", ")", "append", "(", "\"", "\\", "n", "\"", ")", ";", "/", "/", "print", "nodes", "for", "(", "int", "i", "=", "0", ";", "i", "<", "num", "of", "leaves", ";", "i", "+", "+", ")", "{", "tree", "append", "(", "node", "base", "get", "path", "(", "cluster", "map", "get", "leaf", "(", "i", ",", "null", ")", ")", ")", "append", "(", "\"", "\\", "n", "\"", ")", ";", "}", "return", "tree", "to", "string", "(", ")", ";", "}" ]
[ "set", "up", "and", "{", "@", "linkplain", "constructing", "object", "parser", "}", "to", "accept", "the", "standard", "arguments", "for", "an", "{", "@", "linkplain", "n", "x", "y", "significance", "heuristic", "}" ]
[ "protected", "static", "void", "declare", "parse", "fields", "(", "constructing", "object", "parser", "<", "?", "extends", "n", "x", "y", "significance", "heuristic", ",", "?", ">", "parser", ")", "{", "parser", "declare", "boolean", "(", "optional", "constructor", "arg", "(", ")", ",", "include", "negatives", "field", ")", ";", "parser", "declare", "boolean", "(", "optional", "constructor", "arg", "(", ")", ",", "background", "is", "superset", ")", ";", "}" ]
[ "finds", "all", "plugin", "classes", "loaded", "from", "a", "particular", "folderfile", "this", "uses", "the", "{", "@", "link", "class", "searcher", "}", "to", "find", "all", "<", "code", ">", "plugin", "class", "<", "code", ">", "objects", "on", "the", "classpath", "for", "each", "class", ",", "the", "original", "resource", "file", "is", "compared", "against", "the", "given", "folder", "and", "if", "it", "'", "s", "contained", "therein", "(", "or", "if", "it", "matches", "a", "given", "jar", ")", ",", "it", "'", "s", "added", "to", "the", "return", "list" ]
[ "private", "static", "list", "<", "class", "<", "?", ">", ">", "find", "loaded", "plugins", "(", "file", "dir", ")", "{", "/", "/", "the", "list", "of", "classes", "to", "return", "list", "<", "class", "<", "?", ">", ">", "ret", "plugins", "=", "new", "array", "list", "<", ">", "(", ")", ";", "/", "/", "find", "any", "jar", "files", "in", "the", "directory", "provided", "our", "plugin", "(", "s", ")", "will", "always", "be", "/", "/", "in", "a", "jar", "list", "<", "file", ">", "jar", "files", "=", "new", "array", "list", "<", ">", "(", ")", ";", "find", "jar", "files", "(", "dir", ",", "jar", "files", ")", ";", "/", "/", "now", "get", "all", "plugin", "class", "files", "that", "have", "been", "loaded", ",", "and", "see", "if", "any", "of", "them", "/", "/", "were", "loaded", "from", "one", "of", "the", "jars", "we", "just", "found", "list", "<", "class", "<", "?", "extends", "plugin", ">", ">", "plugins", "=", "class", "searcher", "get", "classes", "(", "plugin", "class", ")", ";", "for", "(", "class", "<", "?", "extends", "plugin", ">", "plugin", ":", "plugins", ")", "{", "url", "location", "=", "plugin", "get", "resource", "(", "'", "/", "'", "+", "plugin", "get", "name", "(", ")", "replace", "(", "'", "'", ",", "'", "/", "'", ")", "+", "\"", "class", "\"", ")", ";", "if", "(", "location", "=", "=", "null", ")", "{", "msg", "warn", "(", "null", ",", "\"", "class", "location", "for", "plugin", "[", "\"", "+", "plugin", "get", "name", "(", ")", "+", "\"", "]", "could", "not", "be", "determined", "\"", ")", ";", "continue", ";", "}", "string", "plugin", "location", "=", "location", "get", "path", "(", ")", ";", "for", "(", "file", "jar", ":", "jar", "files", ")", "{", "url", "jar", "url", "=", "null", ";", "try", "{", "jar", "url", "=", "jar", "to", "u", "r", "i", "(", ")", "to", "u", "r", "l", "(", ")", ";", "if", "(", "plugin", "location", "contains", "(", "jar", "url", "get", "path", "(", ")", ")", ")", "{", "ret", "plugins", "add", "(", "plugin", ")", ";", "}", "}", "catch", "(", "malformed", "u", "r", "l", "exception", "e", ")", "{", "continue", ";", "}", "}", "}", "return", "ret", "plugins", ";", "}" ]
[ "decodes", "the", "bounds", "of", "an", "image", "and", "returns", "its", "width", "and", "height", "or", "null", "if", "the", "size", "can", "'", "t", "be", "determined", "it", "also", "recovers", "the", "color", "space", "of", "the", "image", ",", "or", "null", "if", "it", "can", "'", "t", "be", "determined" ]
[ "public", "static", "image", "meta", "data", "decode", "dimensions", "and", "color", "space", "(", "input", "stream", "is", ")", "{", "preconditions", "check", "not", "null", "(", "is", ")", ";", "byte", "buffer", "byte", "buffer", "=", "decode", "buffers", "acquire", "(", ")", ";", "if", "(", "byte", "buffer", "=", "=", "null", ")", "{", "byte", "buffer", "=", "byte", "buffer", "allocate", "(", "decode", "buffer", "size", ")", ";", "}", "bitmap", "factory", "options", "options", "=", "new", "bitmap", "factory", "options", "(", ")", ";", "options", "in", "just", "decode", "bounds", "=", "true", ";", "try", "{", "options", "in", "temp", "storage", "=", "byte", "buffer", "array", "(", ")", ";", "bitmap", "factory", "decode", "stream", "(", "is", ",", "null", ",", "options", ")", ";", "color", "space", "color", "space", "=", "null", ";", "if", "(", "android", "os", "build", "version", "sdk", "int", ">", "=", "android", "os", "build", "version", "codes", "o", ")", "{", "color", "space", "=", "options", "out", "color", "space", ";", "}", "return", "new", "image", "meta", "data", "(", "options", "out", "width", ",", "options", "out", "height", ",", "color", "space", ")", ";", "}", "finally", "{", "decode", "buffers", "release", "(", "byte", "buffer", ")", ";", "}", "}" ]
[ "processes", "an", "embedded", "crc", "checkvalue", ",", "throwing", "an", "exception", "of", "the", "current", "crc", "does", "not", "match", "the", "stored", "crc" ]
[ "private", "void", "process", "crc", "chunk", "(", ")", "throws", "i", "o", "exception", "{", "int", "file", "crc", "=", "reader", "read", "next", "int", "(", ")", ";", "int", "value", "=", "(", "int", ")", "crc", "get", "value", "(", ")", ";", "if", "(", "file", "crc", "!", "=", "value", ")", "{", "throw", "new", "i", "o", "exception", "(", "\"", "computed", "crc", "(", "0x", "\"", "+", "integer", "to", "hex", "string", "(", "value", ")", "+", "\"", ")", "did", "not", "match", "the", "expected", "crc", "(", "0x", "\"", "+", "integer", "to", "hex", "string", "(", "file", "crc", ")", "+", "\"", ")", "\"", ")", ";", "}", "}" ]
[ "gets", "the", "name", "length", "the", "name", "length", "may", "be", "larger", "than", "necessary", "because", "the", "name", "string", "is", "must", "be", "aligned", "to", "the", "next", "4", "-", "byte", "boundary" ]
[ "public", "int", "get", "name", "length", "(", ")", "{", "return", "name", "len", ";", "}" ]
[ "tokenize", "the", "given", "path", "pattern", "into", "parts", ",", "based", "on", "this", "matcher", "'", "s", "settings", "performs", "caching", "based", "on", "{", "@", "link", "#", "set", "cache", "patterns", "}", ",", "delegating", "to", "{", "@", "link", "#", "tokenize", "path", "(", "string", ")", "}", "for", "the", "actual", "tokenization", "algorithm" ]
[ "protected", "string", "[", "]", "tokenize", "pattern", "(", "string", "pattern", ")", "{", "string", "[", "]", "tokenized", "=", "null", ";", "boolean", "cache", "patterns", "=", "this", "cache", "patterns", ";", "if", "(", "cache", "patterns", "=", "=", "null", "|", "|", "cache", "patterns", "boolean", "value", "(", ")", ")", "{", "tokenized", "=", "this", "tokenized", "pattern", "cache", "get", "(", "pattern", ")", ";", "}", "if", "(", "tokenized", "=", "=", "null", ")", "{", "tokenized", "=", "tokenize", "path", "(", "pattern", ")", ";", "if", "(", "cache", "patterns", "=", "=", "null", "&", "&", "this", "tokenized", "pattern", "cache", "size", "(", ")", ">", "=", "cache", "turnoff", "threshold", ")", "{", "/", "/", "try", "to", "adapt", "to", "the", "runtime", "situation", "that", "we", "'", "re", "encountering", ":", "/", "/", "there", "are", "obviously", "too", "many", "different", "patterns", "coming", "in", "here", "/", "/", "so", "let", "'", "s", "turn", "off", "the", "cache", "since", "the", "patterns", "are", "unlikely", "to", "be", "reoccurring", "deactivate", "pattern", "cache", "(", ")", ";", "return", "tokenized", ";", "}", "if", "(", "cache", "patterns", "=", "=", "null", "|", "|", "cache", "patterns", "boolean", "value", "(", ")", ")", "{", "this", "tokenized", "pattern", "cache", "put", "(", "pattern", ",", "tokenized", ")", ";", "}", "}", "return", "tokenized", ";", "}" ]
[ "get", "pet", "id" ]
[ "public", "long", "get", "pet", "id", "(", ")", "{", "return", "pet", "id", ";", "}" ]
[ "test", "the", "property", "'", "$", "special", "property", "name", "'" ]
[ "public", "void", "$", "special", "property", "name", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "$", "special", "property", "name", "}" ]
[ "gets", "the", "accumulated", "stats", "for", "r", "p", "cs", "sent", "by", "a", "test", "client" ]
[ "public", "io", "grpc", "testing", "integration", "messages", "load", "balancer", "accumulated", "stats", "response", "get", "client", "accumulated", "stats", "(", "io", "grpc", "testing", "integration", "messages", "load", "balancer", "accumulated", "stats", "request", "request", ")", "{", "return", "io", "grpc", "stub", "client", "calls", "blocking", "unary", "call", "(", "get", "channel", "(", ")", ",", "get", "get", "client", "accumulated", "stats", "method", "(", ")", ",", "get", "call", "options", "(", ")", ",", "request", ")", ";", "}" ]
[ "convert", "the", "given", "object", "to", "string", "with", "each", "line", "indented", "by", "4", "spaces", "(", "except", "the", "first", "line", ")" ]
[ "private", "string", "to", "indented", "string", "(", "object", "o", ")", "{", "if", "(", "o", "=", "=", "null", ")", "{", "return", "\"", "null", "\"", ";", "}", "return", "o", "to", "string", "(", ")", "replace", "(", "\"", "\\", "n", "\"", ",", "\"", "\\", "n", "\"", ")", ";", "}" ]
[ "regression", "test", "for", "bug", "found" ]
[ "public", "void", "test", "correct", "ordering", "regression", "(", ")", "{", "min", "max", "priority", "queue", "<", "integer", ">", "q", "=", "min", "max", "priority", "queue", "create", "(", "immutable", "list", "of", "(", "3", ",", "5", ",", "1", ",", "4", ",", "7", ")", ")", ";", "list", "<", "integer", ">", "expected", "=", "immutable", "list", "of", "(", "1", ",", "3", ",", "4", ",", "5", ",", "7", ")", ";", "list", "<", "integer", ">", "actual", "=", "new", "array", "list", "<", ">", "(", "5", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "expected", "size", "(", ")", ";", "i", "+", "+", ")", "{", "actual", "add", "(", "q", "poll", "first", "(", ")", ")", ";", "}", "assert", "equals", "(", "expected", ",", "actual", ")", ";", "}" ]
[ "return", "true", "if", "this", "type", "holder", "example", "object", "is", "equal", "to", "o" ]
[ "public", "boolean", "equals", "(", "object", "o", ")", "{", "if", "(", "this", "=", "=", "o", ")", "{", "return", "true", ";", "}", "if", "(", "o", "=", "=", "null", "|", "|", "get", "class", "(", ")", "!", "=", "o", "get", "class", "(", ")", ")", "{", "return", "false", ";", "}", "type", "holder", "example", "type", "holder", "example", "=", "(", "type", "holder", "example", ")", "o", ";", "return", "objects", "equals", "(", "this", "string", "item", ",", "type", "holder", "example", "string", "item", ")", "&", "&", "objects", "equals", "(", "this", "number", "item", ",", "type", "holder", "example", "number", "item", ")", "&", "&", "objects", "equals", "(", "this", "float", "item", ",", "type", "holder", "example", "float", "item", ")", "&", "&", "objects", "equals", "(", "this", "integer", "item", ",", "type", "holder", "example", "integer", "item", ")", "&", "&", "objects", "equals", "(", "this", "bool", "item", ",", "type", "holder", "example", "bool", "item", ")", "&", "&", "objects", "equals", "(", "this", "array", "item", ",", "type", "holder", "example", "array", "item", ")", ";", "}" ]
[ "returns", "an", "empty", "diff", "list" ]
[ "static", "<", "t", "extends", "comparable", "<", "integer", ">", ">", "diff", "list", "<", "t", ">", "empty", "list", "(", ")", "{", "return", "empty", "list", ";", "}" ]
[ "return", "true", "if", "the", "method", "includes", "the", "{", "@", "code", "native", "}", "modifier" ]
[ "public", "boolean", "is", "native", "(", ")", "{", "return", "modifier", "is", "native", "(", "method", "get", "modifiers", "(", ")", ")", ";", "}" ]
[ "extracts", "the", "args", "from", "the", "given", "list", "that", "are", "not", "flags", "(", "i", "e", "do", "not", "start", "with", "\"", "-", "-", "\"", ")", "note", ",", "this", "makes", "sense", "only", "if", "flags", "with", "values", "have", "previously", "been", "joined", ",", "e", "g", "\"", "-", "-", "foo", "=", "bar", "\"", "rather", "than", "\"", "-", "-", "foo", "\"", ",", "\"", "bar", "\"" ]
[ "public", "static", "immutable", "list", "<", "string", ">", "non", "flags", "(", "iterable", "<", "string", ">", "args", ")", "{", "return", "streams", "stream", "(", "args", ")", "filter", "(", "arg", "-", ">", "!", "is", "flag", "(", "arg", ")", ")", "collect", "(", "to", "immutable", "list", "(", ")", ")", ";", "}" ]
[ "generates", "a", "complete", "sphere", "equirectangular", "projection" ]
[ "public", "static", "projection", "create", "equirectangular", "(", "@", "c", "stereo", "mode", "int", "stereo", "mode", ")", "{", "return", "create", "equirectangular", "(", "/", "*", "radius", "=", "*", "/", "50", ",", "/", "/", "should", "be", "large", "enough", "that", "there", "are", "no", "stereo", "artifacts", "/", "*", "latitudes", "=", "*", "/", "36", ",", "/", "/", "should", "be", "large", "enough", "to", "prevent", "videos", "looking", "wavy", "/", "*", "longitudes", "=", "*", "/", "72", ",", "/", "/", "should", "be", "large", "enough", "to", "prevent", "videos", "looking", "wavy", "/", "*", "vertical", "fov", "degrees", "=", "*", "/", "180", ",", "/", "*", "horizontal", "fov", "degrees", "=", "*", "/", "360", ",", "stereo", "mode", ")", ";", "}" ]
[ ",", "<", "e", ",", "tree", "set", "<", "v", ">", ">", ",", "," ]
[ "public", "static", "<", "k", ",", "v", ">", "sorted", "set", "multimap", "<", "k", ",", "v", ">", "create", "sorted", "set", "multi", "value", "map", "(", "comparator", "<", "v", ">", "comparator", ")", "{", "return", "(", "sorted", "set", "multimap", "<", "k", ",", "v", ">", ")", "multimap", "builder", "hash", "keys", "(", ")", "tree", "set", "values", "(", "comparator", ")", ";", "}" ]
[ "reads", "an", "8", "-", "bit", "value", "from", "<", "code", ">", "program", "<", "code", ">", "at", "the", "address", "of", "<", "code", ">", "buf", "<", "code", ">" ]
[ "protected", "static", "long", "read", "byte", "(", "mem", "buffer", "buf", ",", "int", "length", ")", "throws", "memory", "access", "exception", "{", "return", "buf", "get", "byte", "(", "0", ")", ";", "}" ]
[ "create", "and", "udp", "listener", "socket" ]
[ "private", "datagram", "channel", "open", "u", "d", "p", "channel", "(", "inet", "address", "addr", ",", "int", "port", ")", "throws", "i", "o", "exception", "{", "datagram", "channel", "channel", "=", "datagram", "channel", "open", "(", ")", ";", "try", "{", "channel", "socket", "(", ")", "bind", "(", "new", "inet", "socket", "address", "(", "addr", ",", "port", ")", ")", ";", "}", "catch", "(", "i", "o", "exception", "e", ")", "{", "throw", "net", "utils", "wrap", "exception", "(", "null", ",", "0", ",", "inet", "address", "get", "local", "host", "(", ")", "get", "host", "name", "(", ")", ",", "port", ",", "e", ")", ";", "}", "return", "channel", ";", "}" ]
[ "load", "an", "image", "from", "a", "file" ]
[ "public", "static", "buffered", "image", "read", "file", "(", "file", "image", "file", ")", "throws", "i", "o", "exception", "{", "return", "image", "i", "o", "read", "(", "image", "file", ")", ";", "}" ]
[ "commit", "the", "last", "block", "of", "the", "file", "and", "mark", "it", "as", "complete", "if", "it", "has", "meets", "the", "minimum", "redundancy", "requirement" ]
[ "public", "boolean", "commit", "or", "complete", "last", "block", "(", "block", "collection", "bc", ",", "block", "commit", "block", ",", "i", "nodes", "in", "path", "iip", ")", "throws", "i", "o", "exception", "{", "if", "(", "commit", "block", "=", "=", "null", ")", "return", "false", ";", "/", "/", "not", "committing", ",", "this", "is", "a", "block", "allocation", "retry", "block", "info", "last", "block", "=", "bc", "get", "last", "block", "(", ")", ";", "if", "(", "last", "block", "=", "=", "null", ")", "return", "false", ";", "/", "/", "no", "blocks", "in", "file", "yet", "if", "(", "last", "block", "is", "complete", "(", ")", ")", "return", "false", ";", "/", "/", "already", "completed", "(", "e", "g", "by", "sync", "block", ")", "if", "(", "last", "block", "is", "under", "recovery", "(", ")", ")", "{", "throw", "new", "i", "o", "exception", "(", "\"", "commit", "or", "complete", "block", "\"", "+", "commit", "block", "+", "\"", ",", "whereas", "it", "is", "under", "recovery", "\"", ")", ";", "}", "final", "boolean", "committed", "=", "commit", "block", "(", "last", "block", ",", "commit", "block", ")", ";", "if", "(", "committed", "&", "&", "last", "block", "is", "striped", "(", ")", ")", "{", "/", "/", "update", "scheduled", "size", "for", "datanode", "storages", "that", "do", "not", "store", "any", "/", "/", "internal", "blocks", "last", "block", "get", "under", "construction", "feature", "(", ")", "update", "storage", "scheduled", "size", "(", "(", "block", "info", "striped", ")", "last", "block", ")", ";", "}", "/", "/", "count", "replicas", "on", "decommissioning", "nodes", ",", "as", "these", "will", "not", "be", "/", "/", "decommissioned", "unless", "recovery", "/", "completing", "last", "block", "has", "finished", "number", "replicas", "num", "replicas", "=", "count", "nodes", "(", "last", "block", ")", ";", "int", "num", "usable", "replicas", "=", "num", "replicas", "live", "replicas", "(", ")", "+", "num", "replicas", "decommissioning", "(", ")", "+", "num", "replicas", "live", "entering", "maintenance", "replicas", "(", ")", ";", "if", "(", "has", "min", "storage", "(", "last", "block", ",", "num", "usable", "replicas", ")", ")", "{", "if", "(", "committed", ")", "{", "add", "expected", "replicas", "to", "pending", "(", "last", "block", ")", ";", "}", "complete", "block", "(", "last", "block", ",", "iip", ",", "false", ")", ";", "}", "else", "if", "(", "pending", "recovery", "blocks", "is", "under", "recovery", "(", "last", "block", ")", ")", "{", "/", "/", "we", "'", "ve", "just", "finished", "recovery", "for", "this", "block", ",", "complete", "/", "/", "the", "block", "forcibly", "disregarding", "number", "of", "replicas", "/", "/", "this", "is", "to", "ignore", "min", "replication", ",", "the", "block", "will", "be", "closed", "/", "/", "and", "then", "replicated", "out", "complete", "block", "(", "last", "block", ",", "iip", ",", "true", ")", ";", "update", "needed", "reconstructions", "(", "last", "block", ",", "1", ",", "0", ")", ";", "}", "return", "committed", ";", "}" ]
[ "returns", "a", "web", "g", "l", "context", "for", "the", "given", "canvas", "element", "returns", "null", "if", "no", "3d", "context", "is", "available" ]
[ "public", "static", "native", "web", "g", "l", "rendering", "context", "get", "context", "(", "canvas", "element", "canvas", ",", "web", "g", "l", "context", "attributes", "attributes", ")", "/", "*", "-", "{", "var", "names", "=", "[", "\"", "experimental", "-", "webgl", "\"", ",", "\"", "webgl", "\"", ",", "\"", "moz", "-", "webgl", "\"", ",", "\"", "webkit", "-", "webgl", "\"", ",", "\"", "webkit", "-", "3d", "\"", "]", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "names", "length", ";", "i", "+", "+", ")", "{", "try", "{", "var", "ctx", "=", "canvas", "get", "context", "(", "names", "[", "i", "]", ",", "attributes", ")", ";", "if", "(", "ctx", "!", "=", "null", ")", "{", "/", "/", "hook", "for", "the", "semi", "-", "standard", "web", "g", "l", "debug", "utils", "script", "if", "(", "$", "wnd", "web", "g", "l", "debug", "utils", ")", "{", "if", "(", "$", "wnd", "console", "&", "&", "$", "wnd", "console", "log", ")", "console", "log", "(", "'", "web", "g", "l", "debugging", "enabled", "'", ")", ";", "return", "$", "wnd", "web", "g", "l", "debug", "utils", "make", "debug", "context", "(", "ctx", ")", ";", "}", "return", "ctx", ";", "}", "}", "catch", "(", "e", ")", "{", "}", "}", "return", "null", ";", "}" ]
[ "set", "the", "probability", "of", "throttling", "a", "request" ]
[ "public", "void", "set", "throttle", "probability", "(", "float", "throttle", "probability", ")", "{", "policy", "set", "throttle", "probability", "(", "throttle", "probability", ")", ";", "}" ]
[ "creates", "a", "new", "blocking", "-", "style", "stub", "that", "supports", "unary", "and", "streaming", "output", "calls", "on", "the", "service" ]
[ "public", "static", "test", "service", "blocking", "stub", "new", "blocking", "stub", "(", "io", "grpc", "channel", "channel", ")", "{", "io", "grpc", "stub", "abstract", "stub", "stub", "factory", "<", "test", "service", "blocking", "stub", ">", "factory", "=", "new", "io", "grpc", "stub", "abstract", "stub", "stub", "factory", "<", "test", "service", "blocking", "stub", ">", "(", ")", "{", "@", "java", "lang", "override", "public", "test", "service", "blocking", "stub", "new", "stub", "(", "io", "grpc", "channel", "channel", ",", "io", "grpc", "call", "options", "call", "options", ")", "{", "return", "new", "test", "service", "blocking", "stub", "(", "channel", ",", "call", "options", ")", ";", "}", "}", ";", "return", "test", "service", "blocking", "stub", "new", "stub", "(", "factory", ",", "channel", ")", ";", "}" ]
[ "get", "the", "end", "address", "of", "the", "block" ]
[ "address", "get", "end", "address", "(", ")", "{", "return", "block", "get", "end", "(", ")", ";", "}" ]
[ "wait", "until", "at", "least", "one", "result", "is", "available", "and", "then", "return", "the", "first", "result" ]
[ "public", "q", "result", "<", "i", ",", "r", ">", "wait", "for", "next", "result", "(", ")", "throws", "interrupted", "exception", "{", "if", "(", "!", "collect", "results", ")", "{", "throw", "new", "illegal", "state", "exception", "(", "\"", "can", "'", "t", "wait", "for", "next", "result", "when", "not", "collecting", "results", "\"", ")", ";", "}", "lock", "lock", "interruptibly", "(", ")", ";", "try", "{", "if", "(", "result", "list", "is", "empty", "(", ")", ")", "{", "if", "(", "is", "empty", "(", ")", ")", "{", "return", "null", ";", "}", "tracker", "wait", "for", "next", "(", ")", ";", "}", "return", "result", "list", "pop", "(", ")", ";", "}", "finally", "{", "lock", "unlock", "(", ")", ";", "}", "}" ]
[ "method", "called", "when", "the", "action", "is", "invoked" ]
[ "public", "void", "action", "performed", "(", "navigatable", "action", "context", "context", ")", "{", "address", "set", "view", "address", "set", "=", "null", ";", "if", "(", "context", "has", "selection", "(", ")", ")", "{", "address", "set", "=", "context", "get", "selection", "(", ")", ";", "}", "else", "{", "address", "set", "=", "new", "address", "set", "(", "context", "get", "address", "(", ")", ")", ";", "}", "program", "selection", "selection", "=", "get", "selection", "(", "context", "get", "program", "(", ")", ",", "address", "set", ")", ";", "navigation", "utils", "set", "selection", "(", "tool", ",", "context", "get", "navigatable", "(", ")", ",", "selection", ")", ";", "}" ]
[ "converts", "{", "@", "link", "reader", "}", "to", "given", "type" ]
[ "public", "static", "<", "t", ">", "t", "from", "json", "(", "@", "non", "null", "final", "gson", "gson", ",", "final", "reader", "reader", ",", "@", "non", "null", "final", "type", "type", ")", "{", "return", "gson", "from", "json", "(", "reader", ",", "type", ")", ";", "}" ]
[ "a", "callback", "for", "scripts", "to", "perform", "any", "needed", "cleanup", "after", "the", "script", "is", "finished" ]
[ "public", "void", "cleanup", "(", "boolean", "success", ")", "{", "/", "/", "for", "users", "to", "override", "}" ]
[ "reduces", "the", "size", "of", "the", "backing", "arrays", "to", "be", "the", "specified", "capacity", "load", "factor", ",", "or", "less", "if", "the", "capacity", "is", "already", "less", ",", "nothing", "is", "done", "if", "the", "map", "contains", "more", "items", "than", "the", "specified", "capacity", ",", "the", "next", "highest", "power", "of", "two", "capacity", "is", "used", "instead" ]
[ "public", "void", "shrink", "(", "int", "maximum", "capacity", ")", "{", "if", "(", "maximum", "capacity", "<", "0", ")", "throw", "new", "illegal", "argument", "exception", "(", "\"", "maximum", "capacity", "must", "be", ">", "=", "0", ":", "\"", "+", "maximum", "capacity", ")", ";", "int", "table", "size", "=", "table", "size", "(", "maximum", "capacity", ",", "load", "factor", ")", ";", "if", "(", "key", "table", "length", ">", "table", "size", ")", "resize", "(", "table", "size", ")", ";", "}" ]
[ "{", "@", "inherit", "doc", "}", "the", "default", "implementation", "returns", "the", "result", "of", "calling", "{", "@", "link", "#", "visit", "children", "}", "on", "{", "@", "code", "ctx", "}" ]
[ "@", "override", "public", "t", "visit", "group", "by", "(", "sql", "base", "parser", "group", "by", "context", "ctx", ")", "{", "return", "visit", "children", "(", "ctx", ")", ";", "}" ]
[ "parse", "object", "to", "jackson", "{", "@", "link", "json", "node", "}" ]
[ "public", "static", "json", "node", "transfer", "to", "json", "node", "(", "object", "obj", ")", "{", "return", "mapper", "value", "to", "tree", "(", "obj", ")", ";", "}" ]
[ "{", "@", "inherit", "doc", "}" ]
[ "public", "int", "byte", "length", "(", ")", "{", "return", "8", "+", "exceptions", "size", "(", ")", "*", "2", ";", "}" ]
[ "tests", "the", "operation", "fails", "at", "every", "attempt", "after", "s", "s", "l", "handshake", "exception" ]
[ "public", "void", "test", "client", "retries", "with", "s", "s", "l", "handshake", "exception", "fails", "at", "every", "attempt", "(", ")", "throws", "exception", "{", "configuration", "conf", "=", "new", "configuration", "(", ")", ";", "conf", "set", "int", "(", "common", "configuration", "keys", "public", "kms", "client", "failover", "max", "retries", "key", ",", "2", ")", ";", "final", "string", "key", "name", "=", "\"", "test", "\"", ";", "final", "string", "exception", "message", "=", "\"", "p", "1", "exception", "message", "\"", ";", "k", "m", "s", "client", "provider", "p", "1", "=", "mock", "(", "k", "m", "s", "client", "provider", "class", ")", ";", "exception", "original", "ssl", "ex", "=", "new", "s", "s", "l", "handshake", "exception", "(", "exception", "message", ")", ";", "when", "(", "p", "1", "create", "key", "(", "mockito", "any", "string", "(", ")", ",", "mockito", "any", "(", "options", "class", ")", ")", ")", "then", "throw", "(", "original", "ssl", "ex", ")", ";", "k", "m", "s", "client", "provider", "p", "2", "=", "mock", "(", "k", "m", "s", "client", "provider", "class", ")", ";", "when", "(", "p", "2", "create", "key", "(", "mockito", "any", "string", "(", ")", ",", "mockito", "any", "(", "options", "class", ")", ")", ")", "then", "throw", "(", "new", "connect", "exception", "(", "\"", "p", "2", "exception", "message", "\"", ")", ")", ";", "when", "(", "p", "1", "get", "k", "m", "s", "url", "(", ")", ")", "then", "return", "(", "\"", "p", "1", "\"", ")", ";", "when", "(", "p", "2", "get", "k", "m", "s", "url", "(", ")", ")", "then", "return", "(", "\"", "p", "2", "\"", ")", ";", "load", "balancing", "k", "m", "s", "client", "provider", "kp", "=", "new", "load", "balancing", "k", "m", "s", "client", "provider", "(", "new", "k", "m", "s", "client", "provider", "[", "]", "{", "p", "1", ",", "p", "2", "}", ",", "0", ",", "conf", ")", ";", "exception", "intercepted", "ex", "=", "intercept", "(", "connect", "exception", "class", ",", "\"", "s", "s", "l", "handshake", "exception", ":", "\"", "+", "exception", "message", ",", "(", ")", "-", ">", "kp", "create", "key", "(", "key", "name", ",", "new", "options", "(", "conf", ")", ")", ")", ";", "assert", "equals", "(", "original", "ssl", "ex", ",", "intercepted", "ex", "get", "cause", "(", ")", ")", ";", "verify", "(", "p", "1", ",", "mockito", "times", "(", "2", ")", ")", "create", "key", "(", "mockito", "eq", "(", "key", "name", ")", ",", "mockito", "any", "(", "options", "class", ")", ")", ";", "verify", "(", "p", "2", ",", "mockito", "times", "(", "1", ")", ")", "create", "key", "(", "mockito", "eq", "(", "key", "name", ")", ",", "mockito", "any", "(", "options", "class", ")", ")", ";", "}" ]
[ "map", "the", "route", "for", "http", "patch", "requests" ]
[ "public", "void", "patch", "(", "string", "path", ",", "template", "view", "route", "route", ",", "template", "engine", "engine", ")", "{", "add", "route", "(", "http", "method", "patch", ",", "template", "view", "route", "impl", "create", "(", "path", ",", "route", ",", "engine", ")", ")", ";", "}" ]
[ "this", "method", "reports", "the", "processed", "bytes", "so", "far", "please", "note", "that", "this", "statistic", "is", "only", "updated", "on", "block", "boundaries", "and", "only", "when", "the", "stream", "is", "initiated", "in", "byblock", "mode" ]
[ "public", "long", "get", "processed", "byte", "count", "(", ")", "{", "return", "reported", "bytes", "read", "from", "compressed", "stream", ";", "}" ]
[ "tests", "that", "changing", "a", "tree", "artifact", "directory", "should", "cause", "reexeuction" ]
[ "public", "void", "directory", "contents", "caching", "for", "tree", "artifacts", "(", ")", "throws", "exception", "{", "artifact", "in", "=", "create", "source", "artifact", "(", "\"", "input", "\"", ")", ";", "write", "file", "(", "in", ",", "\"", "input", "content", "\"", ")", ";", "button", "button", "1", "=", "new", "button", "(", ")", ";", "special", "artifact", "out", "1", "=", "create", "tree", "artifact", "(", "\"", "output", "1", "\"", ")", ";", "write", "input", "to", "files", "action", "action", "1", "=", "new", "write", "input", "to", "files", "action", "(", "button", "1", ",", "in", ",", "out", "1", ",", "\"", "file", "1", "\"", ",", "\"", "file", "2", "\"", ")", ";", "register", "action", "(", "action", "1", ")", ";", "button", "button", "2", "=", "new", "button", "(", ")", ";", "special", "artifact", "out", "2", "=", "create", "tree", "artifact", "(", "\"", "output", "2", "\"", ")", ";", "copy", "tree", "action", "action", "2", "=", "new", "copy", "tree", "action", "(", "button", "2", ",", "out", "1", ",", "out", "2", ")", ";", "register", "action", "(", "action", "2", ")", ";", "button", "1", "pressed", "=", "false", ";", "button", "2", "pressed", "=", "false", ";", "build", "artifact", "(", "out", "2", ")", ";", "/", "/", "just", "a", "smoke", "test", "-", "-", "if", "these", "aren", "'", "t", "built", "we", "have", "bigger", "problems", "!", "assert", "that", "(", "button", "1", "pressed", ")", "is", "true", "(", ")", ";", "assert", "that", "(", "button", "2", "pressed", ")", "is", "true", "(", ")", ";", "/", "/", "adding", "a", "file", "to", "a", "directory", "should", "cause", "reexecution", "button", "1", "pressed", "=", "false", ";", "button", "2", "pressed", "=", "false", ";", "path", "spurious", "output", "one", "=", "out", "1", "get", "path", "(", ")", "get", "relative", "(", "\"", "spurious", "output", "\"", ")", ";", "touch", "file", "(", "spurious", "output", "one", ")", ";", "build", "artifact", "(", "out", "2", ")", ";", "/", "/", "should", "re", "-", "execute", ",", "and", "delete", "spurious", "output", "assert", "that", "(", "spurious", "output", "one", "exists", "(", ")", ")", "is", "false", "(", ")", ";", "assert", "that", "(", "button", "1", "pressed", ")", "is", "true", "(", ")", ";", "assert", "that", "(", "button", "2", "pressed", ")", "is", "false", "(", ")", ";", "/", "/", "should", "have", "been", "cached", "button", "1", "pressed", "=", "false", ";", "button", "2", "pressed", "=", "false", ";", "path", "spurious", "output", "two", "=", "out", "2", "get", "path", "(", ")", "get", "relative", "(", "\"", "another", "spurious", "output", "\"", ")", ";", "touch", "file", "(", "spurious", "output", "two", ")", ";", "build", "artifact", "(", "out", "2", ")", ";", "assert", "that", "(", "spurious", "output", "two", "exists", "(", ")", ")", "is", "false", "(", ")", ";", "assert", "that", "(", "button", "1", "pressed", ")", "is", "false", "(", ")", ";", "assert", "that", "(", "button", "2", "pressed", ")", "is", "true", "(", ")", ";", "/", "/", "deleting", "should", "cause", "reexecution", "button", "1", "pressed", "=", "false", ";", "button", "2", "pressed", "=", "false", ";", "tree", "file", "artifact", "out", "1", "file", "1", "=", "tree", "file", "artifact", "create", "tree", "output", "(", "out", "1", ",", "\"", "file", "1", "\"", ")", ";", "delete", "file", "(", "out", "1", "file", "1", ")", ";", "build", "artifact", "(", "out", "2", ")", ";", "assert", "that", "(", "out", "1", "file", "1", "get", "path", "(", ")", "exists", "(", ")", ")", "is", "true", "(", ")", ";", "assert", "that", "(", "button", "1", "pressed", ")", "is", "true", "(", ")", ";", "assert", "that", "(", "button", "2", "pressed", ")", "is", "false", "(", ")", ";", "/", "/", "should", "have", "been", "cached", "button", "1", "pressed", "=", "false", ";", "button", "2", "pressed", "=", "false", ";", "tree", "file", "artifact", "out", "2", "file", "1", "=", "tree", "file", "artifact", "create", "tree", "output", "(", "out", "2", ",", "\"", "file", "1", "\"", ")", ";", "delete", "file", "(", "out", "2", "file", "1", ")", ";", "build", "artifact", "(", "out", "2", ")", ";", "assert", "that", "(", "out", "2", "file", "1", "get", "path", "(", ")", "exists", "(", ")", ")", "is", "true", "(", ")", ";", "assert", "that", "(", "button", "1", "pressed", ")", "is", "false", "(", ")", ";", "assert", "that", "(", "button", "2", "pressed", ")", "is", "true", "(", ")", ";", "}" ]
[ "tells", "whether", "the", "function", "uses", "longjmp", "(", ")" ]
[ "public", "boolean", "uses", "long", "jmp", "(", ")", "{", "return", "uses", "long", "jmp", ";", "}" ]
[ "cycle", "detecting", "lock", "implementations", "must", "call", "this", "method", "before", "attempting", "to", "acquire", "the", "lock" ]
[ "private", "void", "about", "to", "acquire", "(", "cycle", "detecting", "lock", "lock", ")", "{", "if", "(", "!", "lock", "is", "acquired", "by", "current", "thread", "(", ")", ")", "{", "array", "list", "<", "lock", "graph", "node", ">", "acquired", "lock", "list", "=", "acquired", "locks", "get", "(", ")", ";", "lock", "graph", "node", "node", "=", "lock", "get", "lock", "graph", "node", "(", ")", ";", "node", "check", "acquired", "locks", "(", "policy", ",", "acquired", "lock", "list", ")", ";", "acquired", "lock", "list", "add", "(", "node", ")", ";", "}", "}" ]
[ "executes", "the", "given", "runnable", "with", "the", "main", "thread", "executor", "and", "blocks", "until", "completion" ]
[ "public", "void", "execute", "(", "@", "nonnull", "throwing", "runnable", "<", "throwable", ">", "throwing", "runnable", ")", "{", "execute", "(", "(", ")", "-", ">", "{", "throwing", "runnable", "run", "(", ")", ";", "return", "null", ";", "}", ")", ";", "}" ]
[ "finds", "pets", "by", "status", "multiple", "status", "values", "can", "be", "provided", "with", "comma", "separated", "strings" ]
[ "public", "void", "find", "pets", "by", "status", "test", "(", ")", "{", "list", "<", "string", ">", "status", "=", "null", ";", "/", "/", "list", "<", "pet", ">", "response", "=", "api", "find", "pets", "by", "status", "(", "status", ")", ";", "/", "/", "todo", ":", "test", "validations", "}" ]
[ "given", "the", "{", "@", "link", "i", "o", "exception", "}", "encountered", "when", "reading", "the", "contents", "of", "the", "given", "build", "file", ",", "returns", "the", "contents", "that", "should", "be", "used", ",", "or", "{", "@", "code", "null", "}", "if", "the", "original", "{", "@", "link", "i", "o", "exception", "}", "should", "be", "respected", "(", "that", "is", ",", "we", "should", "error", "-", "out", "with", "a", "package", "loading", "error", ")" ]
[ "byte", "[", "]", "maybe", "get", "build", "file", "contents", "to", "use", "(", "path", "fragment", "build", "file", "path", "fragment", ",", "i", "o", "exception", "original", "exn", ")", ";" ]
[ "gets", "the", "current", "health", "of", "the", "id", "generator" ]
[ "public", "rest", "result", "<", "map", "<", "string", ",", "map", "<", "object", ",", "object", ">", ">", ">", "id", "info", "(", ")", "{", "map", "<", "string", ",", "map", "<", "object", ",", "object", ">", ">", "info", "=", "new", "hash", "map", "<", ">", "(", "10", ")", ";", "id", "generator", "manager", "get", "generator", "map", "(", ")", "for", "each", "(", "(", "resource", ",", "id", "generator", ")", "-", ">", "info", "put", "(", "resource", ",", "id", "generator", "info", "(", ")", ")", ")", ";", "return", "rest", "result", "utils", "success", "(", "info", ")", ";", "}" ]
[ "transitions", "the", "pending", "job", "to", "the", "current", "job", "is", "a", "thread", "safe", "way" ]
[ "private", "table", "update", "job", "<", "t", ">", "get", "next", "job", "(", ")", "{", "synchronized", "(", "add", "remove", "updater", ")", "{", "current", "job", "=", "pending", "job", ";", "pending", "job", "=", "null", ";", "if", "(", "current", "job", "=", "=", "null", ")", "{", "job", "done", "(", ")", ";", "}", "return", "current", "job", ";", "}", "}" ]
[ "build", "the", "i", "o", "statistics", "instance" ]
[ "public", "i", "o", "statistics", "build", "(", ")", "{", "final", "dynamic", "i", "o", "statistics", "stats", "=", "active", "instance", "(", ")", ";", "/", "/", "stop", "the", "builder", "from", "working", "any", "more", "instance", "=", "null", ";", "return", "stats", ";", "}" ]
[ "this", "method", "will", "retrieve", "a", "column", "value", "for", "the", "given", "row", "object", "further", ",", "the", "retrieved", "value", "will", "be", "cached", "this", "is", "useful", "when", "sorting", "a", "table", ",", "as", "the", "same", "column", "value", "may", "be", "requested", "multiple", "times", "<", "u", ">", "performance", "notes", "<", "u", ">", "this", "method", "uses", "a", "{", "@", "link", "hash", "map", "}", "to", "cache", "column", "values", "for", "a", "row", "object", "further", ",", "upon", "a", "key", "collision", ",", "the", "map", "will", "perform", "o", "(", "logn", ")", "lookups", "<", "b", ">", "if", "the", "key", "(", "the", "row", "object", ")", "is", "{", "@", "link", "comparable", "}", "<", "b", ">", "if", "the", "key", "is", "not", "comparable", ",", "then", "the", "collision", "lookups", "will", "be", "linear", "so", ",", "make", "your", "row", "objects", "comparable", "for", "maximum", "speed", "<", "b", ">", "when", "your", "table", "size", "becomes", "large", "<", "b", ">", "(", "for", "small", "tables", "there", "is", "no", "observable", "impact", ")", "even", "if", "your", "row", "objects", "are", "comparable", ",", "relying", "on", "this", "table", "model", "to", "convert", "your", "row", "object", "into", "column", "values", "can", "be", "slow", "<", "b", ">", "for", "large", "tables", "<", "b", ">", "this", "is", "because", "the", "default", "column", "comparison", "framework", "for", "the", "tables", "will", "call", "this", "method", "multiple", "times", ",", "resulting", "in", "many", "more", "method", "calls", "per", "column", "value", "lookup", "for", "large", "data", ",", "the", "repeated", "method", "calls", "start", "to", "become", "noticeable", "for", "maximum", "column", "sorting", "speed", ",", "use", "a", "comparator", "that", "works", "not", "on", "the", "column", "value", ",", "but", "on", "the", "row", "value", "to", "do", "this", ",", "return", "a", "comparator", "from", "your", "model", "'", "s", "{", "@", "link", "#", "create", "sort", "comparator", "(", "int", ")", "}", "method", ",", "instead", "of", "from", "the", "column", "itself", "or", "by", "relying", "on", "column", "item", "implementing", "{", "@", "link", "comparable", "}", "this", "is", "possible", "any", "time", "that", "a", "row", "object", "already", "has", "a", "field", "that", "is", "used", "for", "a", "given", "column" ]
[ "object", "get", "cached", "column", "value", "for", "row", "(", "row", "object", "row", "object", ",", "int", "column", "index", ")", "{", "map", "<", "row", "object", ",", "map", "<", "integer", ",", "object", ">", ">", "cached", "column", "values", "=", "thread", "local", "column", "cache", "get", "(", ")", ";", "if", "(", "cached", "column", "values", "=", "=", "null", ")", "{", "/", "/", "the", "caching", "has", "not", "been", "enabled", "-", "-", "this", "must", "be", "a", "simple", "lookup", "from", "a", "client", "/", "/", "that", "cares", "not", "about", "speed", "return", "get", "column", "value", "for", "row", "(", "row", "object", ",", "column", "index", ")", ";", "}", "map", "<", "integer", ",", "object", ">", "column", "map", "=", "cached", "column", "values", "get", "(", "row", "object", ")", ";", "if", "(", "column", "map", "=", "=", "null", ")", "{", "column", "map", "=", "new", "hash", "map", "<", ">", "(", ")", ";", "cached", "column", "values", "put", "(", "row", "object", ",", "column", "map", ")", ";", "}", "object", "column", "value", "for", "row", "=", "column", "map", "get", "(", "column", "index", ")", ";", "if", "(", "column", "value", "for", "row", "=", "=", "null", ")", "{", "column", "value", "for", "row", "=", "get", "column", "value", "for", "row", "(", "row", "object", ",", "column", "index", ")", ";", "column", "map", "put", "(", "column", "index", ",", "column", "value", "for", "row", ")", ";", "}", "return", "column", "value", "for", "row", ";", "}" ]
[ "clears", "any", "selected", "vertices", "as", "well", "as", "the", "focused", "vertex" ]
[ "public", "void", "clear", "selected", "vertices", "(", ")", ";" ]
[ "return", "the", "parameters", "for", "this", "script" ]
[ "public", "map", "<", "string", ",", "object", ">", "get", "params", "(", ")", "{", "return", "params", ";", "}" ]
[ "process", "the", "entry", "(", "p", "ex", "rename", "the", "file", ")", "returns", "<", "code", ">", "true", "<", "code", ">", "if", "the", "processor", "has", "has", "changed", "the", "entry", "in", "this", "case", ",", "the", "entry", "can", "be", "removed", "from", "the", "jar", "file", "in", "a", "future", "time", "return", "<", "code", ">", "false", "<", "code", ">", "for", "the", "entries", "which", "do", "not", "have", "been", "changed", "and", "there", "fore", "are", "not", "to", "be", "deleted" ]
[ "boolean", "process", "(", "entry", "struct", "struct", ")", "throws", "i", "o", "exception", ";" ]
[ "provide", "a", "string", "representation", "of", "the", "context", "configuration", "attributes", "and", "declaring", "class" ]
[ "public", "string", "to", "string", "(", ")", "{", "return", "new", "to", "string", "creator", "(", "this", ")", "append", "(", "\"", "declaring", "class", "\"", ",", "this", "declaring", "class", "get", "name", "(", ")", ")", "append", "(", "\"", "classes", "\"", ",", "object", "utils", "null", "safe", "to", "string", "(", "this", "classes", ")", ")", "append", "(", "\"", "locations", "\"", ",", "object", "utils", "null", "safe", "to", "string", "(", "this", "locations", ")", ")", "append", "(", "\"", "inherit", "locations", "\"", ",", "this", "inherit", "locations", ")", "append", "(", "\"", "initializers", "\"", ",", "object", "utils", "null", "safe", "to", "string", "(", "this", "initializers", ")", ")", "append", "(", "\"", "inherit", "initializers", "\"", ",", "this", "inherit", "initializers", ")", "append", "(", "\"", "name", "\"", ",", "this", "name", ")", "append", "(", "\"", "context", "loader", "class", "\"", ",", "this", "context", "loader", "class", "get", "name", "(", ")", ")", "to", "string", "(", ")", ";", "}" ]
[ "consider", "using", "{", "@", "link", "#", "add", "(", "long", ")", "}", "instead", "for", "primitive", "long", "values" ]
[ "public", "void", "add", "(", "long", "value", ")", "{", "this", "min", "=", "math", "min", "(", "this", "min", ",", "value", ")", ";", "}" ]
[ "test", "the", "property", "'", "$", "special", "property", "name", "'" ]
[ "public", "void", "$", "special", "property", "name", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "$", "special", "property", "name", "}" ]
[ "predicate", ":", "does", "this", "instance", "contain", "a", "file", "reference" ]
[ "boolean", "has", "file", "(", ")", "{", "return", "file", "!", "=", "null", ";", "}" ]
[ "adds", "this", "uidversion", "to", "the", "pending", "adds", "map", "iff", "the", "map", "needs", "safe", "access" ]
[ "void", "maybe", "put", "index", "under", "lock", "(", "bytes", "ref", "uid", ",", "index", "version", "value", "version", ")", "{", "assert", "assert", "keyed", "lock", "held", "by", "current", "thread", "(", "uid", ")", ";", "maps", "maps", "=", "this", "maps", ";", "if", "(", "maps", "is", "safe", "access", "mode", "(", ")", ")", "{", "put", "index", "under", "lock", "(", "uid", ",", "version", ")", ";", "}", "else", "{", "/", "/", "even", "though", "we", "don", "'", "t", "store", "a", "record", "of", "the", "indexing", "operation", "(", "and", "mark", "as", "unsafe", ")", ",", "/", "/", "we", "should", "still", "remove", "any", "previous", "delete", "for", "this", "uuid", "(", "avoid", "accidental", "accesses", ")", "/", "/", "not", "this", "should", "not", "hurt", "performance", "because", "the", "tombstone", "is", "small", "(", "or", "empty", ")", "when", "unsafe", "is", "relevant", "remove", "tombstone", "under", "lock", "(", "uid", ")", ";", "maps", "current", "mark", "as", "unsafe", "(", ")", ";", "assert", "put", "assertion", "map", "(", "uid", ",", "version", ")", ";", "}", "}" ]
[ "this", "is", "just", "a", "convenience", "method", "to", "call", "{", "@", "link", "#", "to", "wrapped", "h", "t", "m", "l", "(", "string", ",", "int", ")", "}", "with", "a", "max", "line", "length", "of", "{", "@", "value", "#", "default", "max", "line", "length", "}" ]
[ "public", "static", "string", "to", "wrapped", "h", "t", "m", "l", "(", "string", "text", ")", "{", "return", "to", "wrapped", "h", "t", "m", "l", "(", "text", ",", "default", "max", "line", "length", ")", ";", "}" ]
[ "analyzes", "the", "specified", "targets", "using", "skyframe", "as", "the", "driving", "framework" ]
[ "public", "skyframe", "analysis", "result", "configure", "targets", "(", "extended", "event", "handler", "event", "handler", ",", "list", "<", "configured", "target", "key", ">", "ct", "keys", ",", "list", "<", "aspect", "value", "key", ">", "aspect", "keys", ",", "supplier", "<", "map", "<", "build", "configuration", "value", "key", ",", "build", "configuration", ">", ">", "configuration", "lookup", "supplier", ",", "top", "level", "artifact", "context", "top", "level", "artifact", "context", "for", "conflict", "pruning", ",", "event", "bus", "event", "bus", ",", "boolean", "keep", "going", ",", "int", "num", "threads", ",", "boolean", "strict", "conflict", "checks", ")", "throws", "interrupted", "exception", ",", "view", "creation", "failed", "exception", "{", "enable", "analysis", "(", "true", ")", ";", "evaluation", "result", "<", "action", "lookup", "value", ">", "result", ";", "try", "(", "silent", "closeable", "c", "=", "profiler", "instance", "(", ")", "profile", "(", "\"", "skyframe", "executor", "configure", "targets", "\"", ")", ")", "{", "result", "=", "skyframe", "executor", "configure", "targets", "(", "event", "handler", ",", "ct", "keys", ",", "aspect", "keys", ",", "keep", "going", ",", "num", "threads", ")", ";", "}", "finally", "{", "enable", "analysis", "(", "false", ")", ";", "}", "map", "<", "aspect", "key", ",", "configured", "aspect", ">", "aspects", "=", "maps", "new", "hash", "map", "with", "expected", "size", "(", "aspect", "keys", "size", "(", ")", ")", ";", "root", "single", "source", "root", "=", "skyframe", "executor", "get", "forced", "single", "source", "root", "if", "no", "execroot", "symlink", "creation", "(", ")", ";", "nested", "set", "builder", "<", "package", ">", "packages", "=", "single", "source", "root", "=", "=", "null", "?", "nested", "set", "builder", "stable", "order", "(", ")", ":", "null", ";", "for", "(", "aspect", "value", "key", "aspect", "key", ":", "aspect", "keys", ")", "{", "aspect", "value", "value", "=", "(", "aspect", "value", ")", "result", "get", "(", "aspect", "key", ")", ";", "if", "(", "value", "=", "=", "null", ")", "{", "/", "/", "skip", "aspects", "that", "couldn", "'", "t", "be", "applied", "to", "targets", "continue", ";", "}", "aspects", "put", "(", "value", "get", "key", "(", ")", ",", "value", "get", "configured", "aspect", "(", ")", ")", ";", "if", "(", "packages", "!", "=", "null", ")", "{", "packages", "add", "transitive", "(", "value", "get", "transitive", "packages", "for", "package", "root", "resolution", "(", ")", ")", ";", "}", "}", "collection", "<", "configured", "target", ">", "cts", "=", "lists", "new", "array", "list", "with", "capacity", "(", "ct", "keys", "size", "(", ")", ")", ";", "for", "(", "configured", "target", "key", "value", ":", "ct", "keys", ")", "{", "configured", "target", "value", "ct", "value", "=", "(", "configured", "target", "value", ")", "result", "get", "(", "value", ")", ";", "if", "(", "ct", "value", "=", "=", "null", ")", "{", "continue", ";", "}", "cts", "add", "(", "ct", "value", "get", "configured", "target", "(", ")", ")", ";", "if", "(", "packages", "!", "=", "null", ")", "{", "packages", "add", "transitive", "(", "ct", "value", "get", "transitive", "packages", "for", "package", "root", "resolution", "(", ")", ")", ";", "}", "}", "package", "roots", "package", "roots", "=", "single", "source", "root", "=", "=", "null", "?", "new", "map", "as", "package", "roots", "(", "collect", "package", "roots", "(", "packages", "build", "(", ")", "to", "list", "(", ")", ")", ")", ":", "new", "package", "roots", "no", "symlink", "creation", "(", "single", "source", "root", ")", ";", "immutable", "map", "<", "action", "analysis", "metadata", ",", "conflict", "exception", ">", "action", "conflicts", "=", "immutable", "map", "of", "(", ")", ";", "try", "(", "silent", "closeable", "c", "=", "profiler", "instance", "(", ")", "profile", "(", "\"", "skyframe", "executor", "find", "artifact", "conflicts", "\"", ")", ")", "{", "immutable", "set", "<", "sky", "key", ">", "new", "keys", "=", "immutable", "set", "<", "sky", "key", ">", "builder", "with", "expected", "size", "(", "ct", "keys", "size", "(", ")", "+", "aspect", "keys", "size", "(", ")", ")", "add", "all", "(", "ct", "keys", ")", "add", "all", "(", "aspect", "keys", ")", "build", "(", ")", ";", "if", "(", "should", "check", "for", "conflicts", "(", "new", "keys", ")", ")", "{", "largest", "top", "level", "key", "set", "checked", "for", "conflicts", "=", "new", "keys", ";", "/", "/", "this", "operation", "is", "somewhat", "expensive", ",", "so", "we", "only", "do", "it", "if", "the", "graph", "might", "have", "changed", "in", "/", "/", "some", "way", "-", "-", "either", "we", "analyzed", "a", "new", "target", "or", "we", "invalidated", "an", "old", "one", "or", "are", "building", "/", "/", "targets", "together", "that", "haven", "'", "t", "been", "built", "before", "action", "conflicts", "=", "artifact", "conflict", "finder", "find", "and", "store", "artifact", "conflicts", "(", "skyframe", "executor", "get", "action", "lookup", "values", "in", "build", "(", "ct", "keys", ",", "aspect", "keys", ")", ",", "strict", "conflict", "checks", ",", "action", "key", "context", ")", ";", "some", "configured", "target", "evaluated", "=", "false", ";", "}", "}", "found", "action", "conflict", "=", "!", "action", "conflicts", "is", "empty", "(", ")", ";", "if", "(", "!", "result", "has", "error", "(", ")", "&", "&", "!", "found", "action", "conflict", ")", "{", "return", "new", "skyframe", "analysis", "result", "(", "/", "*", "has", "loading", "error", "=", "*", "/", "false", ",", "/", "*", "has", "analysis", "error", "=", "*", "/", "false", ",", "found", "action", "conflict", ",", "immutable", "list", "copy", "of", "(", "cts", ")", ",", "result", "get", "walkable", "graph", "(", ")", ",", "immutable", "map", "copy", "of", "(", "aspects", ")", ",", "package", "roots", ")", ";", "}", "pair", "<", "boolean", ",", "view", "creation", "failed", "exception", ">", "errors", "=", "process", "errors", "(", "result", ",", "configuration", "lookup", "supplier", ",", "skyframe", "executor", ",", "event", "handler", ",", "keep", "going", ",", "event", "bus", ")", ";", "collection", "<", "exception", ">", "reported", "exceptions", "=", "sets", "new", "hash", "set", "(", ")", ";", "for", "(", "map", "entry", "<", "action", "analysis", "metadata", ",", "conflict", "exception", ">", "bad", ":", "action", "conflicts", "entry", "set", "(", ")", ")", "{", "conflict", "exception", "ex", "=", "bad", "get", "value", "(", ")", ";", "detailed", "exit", "code", "detailed", "exit", "code", ";", "try", "{", "ex", "rethrow", "typed", "(", ")", ";", "throw", "new", "illegal", "state", "exception", "(", "\"", "conflict", "exception", "rethrow", "typed", "must", "throw", "\"", ")", ";", "}", "catch", "(", "action", "conflict", "exception", "ace", ")", "{", "detailed", "exit", "code", "=", "ace", "get", "detailed", "exit", "code", "(", ")", ";", "ace", "report", "to", "(", "event", "handler", ")", ";", "if", "(", "keep", "going", ")", "{", "event", "handler", "handle", "(", "event", "warn", "(", "\"", "errors", "encountered", "while", "analyzing", "target", "'", "\"", "+", "bad", "get", "key", "(", ")", "get", "owner", "(", ")", "get", "label", "(", ")", "+", "\"", "'", ":", "it", "will", "not", "be", "built", "\"", ")", ")", ";", "}", "}", "catch", "(", "artifact", "prefix", "conflict", "exception", "apce", ")", "{", "detailed", "exit", "code", "=", "apce", "get", "detailed", "exit", "code", "(", ")", ";", "if", "(", "reported", "exceptions", "add", "(", "apce", ")", ")", "{", "event", "handler", "handle", "(", "event", "error", "(", "apce", "get", "message", "(", ")", ")", ")", ";", "}", "}", "/", "/", "todo", "(", "ulfjack", ")", ":", "don", "'", "t", "throw", "here", "in", "the", "nokeep", "going", "case", ",", "but", "report", "all", "known", "issues", "if", "(", "!", "keep", "going", ")", "{", "throw", "new", "view", "creation", "failed", "exception", "(", "detailed", "exit", "code", "get", "failure", "detail", "(", ")", ",", "ex", ")", ";", "}", "}", "/", "/", "this", "is", "here", "for", "backwards", "compatibility", "the", "keep", "going", "and", "nokeep", "going", "code", "paths", "were", "/", "/", "checking", "action", "conflicts", "and", "analysis", "errors", "in", "different", "orders", ",", "so", "we", "only", "throw", "the", "/", "/", "analysis", "error", "here", "after", "first", "throwing", "action", "conflicts", "if", "(", "!", "keep", "going", ")", "{", "throw", "errors", "second", ";", "}", "if", "(", "found", "action", "conflict", ")", "{", "/", "/", "in", "order", "to", "determine", "the", "set", "of", "configured", "targets", "transitively", "error", "free", "from", "action", "/", "/", "conflict", "issues", ",", "we", "run", "a", "post", "-", "processing", "update", "(", ")", "that", "uses", "the", "bad", "action", "map", "predicate", "<", "action", "lookup", "key", ">", "error", "free", "predicate", ";", "enable", "analysis", "(", "true", ")", ";", "try", "{", "error", "free", "predicate", "=", "skyframe", "executor", "filter", "action", "conflicts", "for", "configured", "targets", "and", "aspects", "(", "event", "handler", ",", "iterables", "concat", "(", "ct", "keys", ",", "aspect", "keys", ")", ",", "action", "conflicts", ",", "top", "level", "artifact", "context", "for", "conflict", "pruning", ")", ";", "}", "finally", "{", "enable", "analysis", "(", "false", ")", ";", "}", "cts", "=", "ct", "keys", "stream", "(", ")", "filter", "(", "error", "free", "predicate", ")", "map", "(", "k", "-", ">", "preconditions", "check", "not", "null", "(", "(", "configured", "target", "value", ")", "result", "get", "(", "k", ")", ",", "k", ")", "get", "configured", "target", "(", ")", ")", "collect", "(", "to", "immutable", "list", "(", ")", ")", ";", "aspects", "=", "aspect", "keys", "stream", "(", ")", "filter", "(", "error", "free", "predicate", ")", "map", "(", "result", ":", ":", "get", ")", "map", "(", "aspect", "value", "class", ":", ":", "cast", ")", "collect", "(", "immutable", "map", "to", "immutable", "map", "(", "aspect", "value", ":", ":", "get", "key", ",", "aspect", "value", ":", ":", "get", "configured", "aspect", ")", ")", ";", "}", "return", "new", "skyframe", "analysis", "result", "(", "errors", "first", ",", "result", "has", "error", "(", ")", "|", "|", "found", "action", "conflict", ",", "found", "action", "conflict", ",", "immutable", "list", "copy", "of", "(", "cts", ")", ",", "result", "get", "walkable", "graph", "(", ")", ",", "immutable", "map", "copy", "of", "(", "aspects", ")", ",", "package", "roots", ")", ";", "}" ]
[ "get", "my", "string" ]
[ "public", "string", "get", "my", "string", "(", ")", "{", "return", "my", "string", ";", "}" ]
[ "calculate", "the", "bounding", "box", "of", "this", "node", "this", "is", "a", "potential", "slow", "operation", ",", "it", "is", "advised", "to", "cache", "the", "result" ]
[ "public", "bounding", "box", "calculate", "bounding", "box", "(", "final", "bounding", "box", "out", ")", "{", "out", "inf", "(", ")", ";", "return", "extend", "bounding", "box", "(", "out", ")", ";", "}" ]
[ "sets", "the", "next", "element", "or", "<", "tt", ">", "null", "<", "tt", ">", "if", "there", "is", "no", "link" ]
[ "void", "set", "next", "in", "write", "order", "(", "@", "nullable", "t", "next", ")", ";" ]
[ "convert", "the", "given", "object", "to", "string", "with", "each", "line", "indented", "by", "4", "spaces", "(", "except", "the", "first", "line", ")" ]
[ "private", "string", "to", "indented", "string", "(", "object", "o", ")", "{", "if", "(", "o", "=", "=", "null", ")", "{", "return", "\"", "null", "\"", ";", "}", "return", "o", "to", "string", "(", ")", "replace", "(", "\"", "\\", "n", "\"", ",", "\"", "\\", "n", "\"", ")", ";", "}" ]
[ "returns", "a", "newly", "-", "created", "{", "@", "code", "immutable", "sorted", "set", "}", "based", "on", "the", "contents", "of", "the", "{", "@", "code", "builder", "}", "and", "its", "comparator" ]
[ "public", "immutable", "sorted", "set", "<", "e", ">", "build", "(", ")", "{", "@", "suppress", "warnings", "(", "\"", "unchecked", "\"", ")", "/", "/", "we", "'", "re", "careful", "to", "put", "only", "e", "'", "s", "in", "here", "e", "[", "]", "contents", "array", "=", "(", "e", "[", "]", ")", "contents", ";", "immutable", "sorted", "set", "<", "e", ">", "result", "=", "construct", "(", "comparator", ",", "size", ",", "contents", "array", ")", ";", "this", "size", "=", "result", "size", "(", ")", ";", "/", "/", "we", "eliminated", "duplicates", "in", "-", "place", "in", "contents", "array", "this", "force", "copy", "=", "true", ";", "return", "result", ";", "}" ]
[ "adds", "new", "promises", "to", "be", "combined", "new", "promises", "may", "be", "added", "until", "an", "aggregate", "promise", "is", "added", "via", "the", "{", "@", "link", "promise", "combiner", "#", "finish", "(", "promise", ")", "}", "method" ]
[ "public", "void", "add", "all", "(", "promise", "promises", ")", "{", "add", "all", "(", "(", "future", "[", "]", ")", "promises", ")", ";", "}" ]
[ "initiates", "an", "orderly", "shutdown", "in", "which", "preexisting", "calls", "continue", "but", "new", "calls", "are", "rejected" ]
[ "public", "server", "impl", "shutdown", "(", ")", "{", "boolean", "shutdown", "transport", "servers", ";", "synchronized", "(", "lock", ")", "{", "if", "(", "shutdown", ")", "{", "return", "this", ";", "}", "shutdown", "=", "true", ";", "shutdown", "transport", "servers", "=", "started", ";", "if", "(", "!", "shutdown", "transport", "servers", ")", "{", "transport", "servers", "terminated", "=", "true", ";", "check", "for", "termination", "(", ")", ";", "}", "}", "if", "(", "shutdown", "transport", "servers", ")", "{", "transport", "server", "shutdown", "(", ")", ";", "}", "return", "this", ";", "}" ]
[ "add", "a", "map", "of", "other", "information", "of", "the", "entity", "to", "the", "existing", "other", "info", "map" ]
[ "public", "void", "add", "other", "info", "(", "map", "<", "string", ",", "object", ">", "other", "info", ")", "{", "this", "other", "info", "put", "all", "(", "other", "info", ")", ";", "}" ]
[ "get", "pet", "id" ]
[ "public", "long", "get", "pet", "id", "(", ")", "{", "return", "pet", "id", ";", "}" ]
[ "generate", "byte", "array", "representing", "a", "set", "of", "garbage", "mkdir", "op" ]
[ "public", "static", "byte", "[", "]", "create", "gabage", "txns", "(", "long", "start", "tx", "id", ",", "int", "num", "txns", ")", "throws", "i", "o", "exception", "{", "data", "output", "buffer", "buf", "=", "new", "data", "output", "buffer", "(", ")", ";", "f", "s", "edit", "log", "op", "writer", "writer", "=", "new", "f", "s", "edit", "log", "op", "writer", "(", "buf", ")", ";", "for", "(", "long", "txid", "=", "start", "tx", "id", ";", "txid", "<", "start", "tx", "id", "+", "num", "txns", ";", "txid", "+", "+", ")", "{", "f", "s", "edit", "log", "op", "op", "=", "new", "test", "edit", "log", "garbage", "mkdir", "op", "(", ")", ";", "op", "set", "transaction", "id", "(", "txid", ")", ";", "writer", "write", "op", "(", "op", ",", "fake", "nsinfo", "get", "layout", "version", "(", ")", ")", ";", "}", "return", "arrays", "copy", "of", "(", "buf", "get", "data", "(", ")", ",", "buf", "get", "length", "(", ")", ")", ";", "}" ]
[ "how", "many", "bits", "should", "be", "used", "to", "do", "inline", "token", "type", "tests", "?", "java", "assumes", "a", "64", "-", "bit", "word", "for", "bitsets", "must", "be", "a", "valid", "wordsize", "for", "your", "target", "like", "8", ",", "16", ",", "32", ",", "64", ",", "etc" ]
[ "public", "int", "get", "inline", "test", "set", "word", "size", "(", ")", "{", "return", "64", ";", "}" ]
[ "prepare", "the", "compressor", "to", "be", "used", "in", "a", "new", "stream", "with", "settings", "defined", "in", "the", "given", "configuration" ]
[ "public", "void", "reinit", "(", "configuration", "conf", ")", "{", "reset", "(", ")", ";", "}" ]
[ "starting", "a", "name", "with", "underscore", ",", "so", "that", "the", "user", "cannot", "access", "this", "function", "directly", "through", "a", "script" ]
[ "public", "void", "set", "index", "version", "(", "version", "index", "version", ")", "{", "this", "index", "version", "=", "index", "version", ";", "}" ]
[ "register", "a", "listener", "that", "will", "be", "called", "when", "this", "model", "is", "bound", "to", "a", "view", "the", "listener", "will", "contribute", "to", "this", "model", "'", "s", "hash", "code", "state", "per", "the", "{", "@", "link", "com", "airbnb", "epoxy", "epoxy", "attribute", "option", "#", "do", "not", "hash", "}", "rules", "you", "may", "clear", "the", "listener", "by", "setting", "a", "null", "value", ",", "or", "by", "calling", "{", "@", "link", "#", "reset", "(", ")", "}" ]
[ "public", "null", "on", "recycle", "view", "model", "on", "bind", "(", "on", "model", "bound", "listener", "<", "null", "on", "recycle", "view", "model", ",", "null", "on", "recycle", "view", ">", "listener", ")", "{", "on", "mutation", "(", ")", ";", "this", "on", "model", "bound", "listener", "epoxy", "generated", "model", "=", "listener", ";", "return", "this", ";", "}" ]
[ "gets", "the", "\"", "zero", "\"", "(", "or", "{", "@", "code", "null", "}", ")", "value", "for", "the", "given", "type" ]
[ "public", "static", "constant", "zero", "for", "(", "type", "type", ")", "{", "switch", "(", "type", "get", "basic", "type", "(", ")", ")", "{", "case", "type", "bt", "boolean", ":", "return", "cst", "boolean", "value", "false", ";", "case", "type", "bt", "byte", ":", "return", "cst", "byte", "value", "0", ";", "case", "type", "bt", "char", ":", "return", "cst", "char", "value", "0", ";", "case", "type", "bt", "double", ":", "return", "cst", "double", "value", "0", ";", "case", "type", "bt", "float", ":", "return", "cst", "float", "value", "0", ";", "case", "type", "bt", "int", ":", "return", "cst", "integer", "value", "0", ";", "case", "type", "bt", "long", ":", "return", "cst", "long", "value", "0", ";", "case", "type", "bt", "short", ":", "return", "cst", "short", "value", "0", ";", "case", "type", "bt", "object", ":", "return", "cst", "known", "null", "the", "one", ";", "default", ":", "{", "throw", "new", "unsupported", "operation", "exception", "(", "\"", "no", "zero", "for", "type", ":", "\"", "+", "type", "to", "human", "(", ")", ")", ";", "}", "}", "}" ]
[ "the", "shard", "of", "the", "search", "hit" ]
[ "public", "search", "shard", "target", "get", "shard", "(", ")", "{", "return", "shard", ";", "}" ]
[ "whether", "this", "{", "@", "link", "messaging", "advice", "bean", "}", "applies", "to", "the", "given", "bean", "type" ]
[ "boolean", "is", "applicable", "to", "bean", "type", "(", "class", "<", "?", ">", "bean", "type", ")", ";" ]
[ "return", "a", "merged", "bean", "definition", "for", "the", "given", "bean", "name", ",", "merging", "a", "child", "bean", "definition", "with", "its", "parent", "if", "necessary", "considers", "bean", "definitions", "in", "ancestor", "factories", "as", "well" ]
[ "bean", "definition", "get", "merged", "bean", "definition", "(", "string", "bean", "name", ")", "throws", "no", "such", "bean", "definition", "exception", ";" ]
[ "smoothly", "open", "surface" ]
[ "public", "void", "open", "(", ")", "{", "open", "(", "true", ",", "true", ")", ";", "}" ]
[ "returns", "the", "collection", "of", "connect", "protocols", "that", "are", "supported", "by", "this", "version", "along", "with", "their", "serialized", "metadata", "the", "protocols", "are", "ordered", "by", "preference" ]
[ "public", "static", "join", "group", "request", "protocol", "collection", "metadata", "request", "(", "extended", "worker", "state", "worker", "state", ",", "boolean", "sessioned", ")", "{", "/", "/", "order", "matters", "in", "terms", "of", "protocol", "preference", "list", "<", "join", "group", "request", "protocol", ">", "join", "group", "request", "protocols", "=", "new", "array", "list", "<", ">", "(", ")", ";", "if", "(", "sessioned", ")", "{", "join", "group", "request", "protocols", "add", "(", "new", "join", "group", "request", "protocol", "(", ")", "set", "name", "(", "sessioned", "protocol", "(", ")", ")", "set", "metadata", "(", "incremental", "cooperative", "connect", "protocol", "serialize", "metadata", "(", "worker", "state", ",", "true", ")", "array", "(", ")", ")", ")", ";", "}", "join", "group", "request", "protocols", "add", "(", "new", "join", "group", "request", "protocol", "(", ")", "set", "name", "(", "compatible", "protocol", "(", ")", ")", "set", "metadata", "(", "incremental", "cooperative", "connect", "protocol", "serialize", "metadata", "(", "worker", "state", ",", "false", ")", "array", "(", ")", ")", ")", ";", "join", "group", "request", "protocols", "add", "(", "new", "join", "group", "request", "protocol", "(", ")", "set", "name", "(", "eager", "protocol", "(", ")", ")", "set", "metadata", "(", "connect", "protocol", "serialize", "metadata", "(", "worker", "state", ")", "array", "(", ")", ")", ")", ";", "return", "new", "join", "group", "request", "protocol", "collection", "(", "join", "group", "request", "protocols", "iterator", "(", ")", ")", ";", "}" ]
[ "creates", "the", "cache", "loader", "for", "the", "status", "loading", "cache", "this", "should", "be", "used", "to", "create", "an", "instance", "of", "the", "status", "cache", "that", "is", "passed", "into", "the", "f", "s", "download", "constructor" ]
[ "public", "static", "cache", "loader", "<", "path", ",", "future", "<", "file", "status", ">", ">", "create", "status", "cache", "loader", "(", "final", "configuration", "conf", ")", "{", "return", "new", "cache", "loader", "<", "path", ",", "future", "<", "file", "status", ">", ">", "(", ")", "{", "public", "future", "<", "file", "status", ">", "load", "(", "path", "path", ")", "{", "try", "{", "file", "system", "fs", "=", "path", "get", "file", "system", "(", "conf", ")", ";", "return", "futures", "immediate", "future", "(", "fs", "get", "file", "status", "(", "path", ")", ")", ";", "}", "catch", "(", "throwable", "th", ")", "{", "/", "/", "report", "failures", "so", "it", "can", "be", "memoized", "return", "futures", "immediate", "failed", "future", "(", "th", ")", ";", "}", "}", "}", ";", "}" ]
[ "string", "representation", "of", "this", "history", "-", "level" ]
[ "public", "string", "get", "key", "(", ")", "{", "return", "key", ";", "}" ]
[ "waits", "a", "reasonable", "amount", "of", "time", "for", "the", "given", "image", "to", "load" ]
[ "public", "static", "boolean", "wait", "for", "image", "(", "string", "image", "name", ",", "image", "image", ")", "{", "if", "(", "image", "instanceof", "buffered", "image", ")", "{", "return", "true", ";", "}", "if", "(", "image", "get", "width", "(", "null", ")", ">", "0", "&", "&", "image", "get", "height", "(", "null", ")", ">", "0", ")", "{", "return", "true", ";", "}", "media", "tracker", "tracker", "=", "new", "media", "tracker", "(", "get", "media", "tracker", "component", "(", ")", ")", ";", "int", "max", "waits", "=", "20", ";", "/", "/", "2", "seconds", "not", "sure", "if", "we", "can", "ever", "hit", "this", "limit", "int", "wait", "time", "=", "100", ";", "tracker", "add", "image", "(", "image", ",", "0", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "max", "waits", ";", "i", "+", "+", ")", "{", "try", "{", "tracker", "wait", "for", "i", "d", "(", "0", ",", "wait", "time", ")", ";", "int", "width", "=", "image", "get", "width", "(", "null", ")", ";", "int", "height", "=", "image", "get", "height", "(", "null", ")", ";", "if", "(", "width", "<", "0", "|", "|", "height", "<", "0", ")", "{", "continue", ";", "/", "/", "try", "again", "}", "tracker", "remove", "image", "(", "image", ",", "0", ")", ";", "return", "true", ";", "}", "catch", "(", "interrupted", "exception", "e", ")", "{", "/", "/", "don", "'", "t", "care", ";", "try", "again", "}", "}", "msg", "debug", "(", "image", "utils", "class", ",", "\"", "timed", "-", "out", "waiting", "for", "image", "to", "load", "after", "\"", "+", "(", "(", "max", "waits", "*", "wait", "time", ")", "/", "1000", ")", "+", "\"", "seconds", ";", "\"", "+", "image", "name", ")", ";", "tracker", "remove", "image", "(", "image", ",", "0", ")", ";", "return", "false", ";", "}" ]
[ "test", "the", "property", "'", "array", "enum", "'" ]
[ "public", "void", "array", "enum", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "array", "enum", "}" ]
[ "creates", "an", "instance", "of", "type", "{", "@", "link", "#", "type", "source", "}" ]
[ "public", "static", "exo", "playback", "exception", "create", "for", "source", "(", "i", "o", "exception", "cause", ")", "{", "return", "new", "exo", "playback", "exception", "(", "type", "source", ",", "cause", ")", ";", "}" ]
[ "start", "the", "activity" ]
[ "public", "static", "void", "start", "activity", "(", "@", "non", "null", "final", "activity", "activity", ",", "@", "non", "null", "final", "class", "<", "?", "extends", "activity", ">", "clz", ")", "{", "start", "activity", "(", "activity", ",", "null", ",", "activity", "get", "package", "name", "(", ")", ",", "clz", "get", "name", "(", ")", ",", "null", ")", ";", "}" ]
[ "searches", "for", "matched", "characters", "in", "the", "given", "string" ]
[ "private", "boolean", "search", "for", "characters", "(", "string", "text", ",", "i", "character", "pair", "matcher", "extension", "matcher", ")", "{", "if", "(", "text", "=", "=", "null", ")", "return", "false", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "text", "length", "(", ")", ";", "i", "+", "+", ")", "{", "if", "(", "matcher", "is", "matched", "char", "(", "text", "char", "at", "(", "i", ")", ")", ")", "{", "return", "true", ";", "}", "}", "return", "false", ";", "}" ]
[ "tests", "abnormal", "usage", "of", "{", "@", "link", "uri", "util", "#", "resolve", "(", "string", ",", "string", ")", "}", "the", "test", "cases", "are", "taken", "from", "rfc", "-", "3986", "5", "4", "2" ]
[ "public", "void", "resolve", "abnormal", "(", ")", "{", "string", "base", "=", "\"", "http", ":", "/", "/", "a", "/", "b", "/", "c", "/", "d", ";", "p", "?", "q", "\"", ";", "assert", "that", "(", "resolve", "(", "base", ",", "\"", "/", "/", "/", "g", "\"", ")", ")", "is", "equal", "to", "(", "\"", "http", ":", "/", "/", "a", "/", "g", "\"", ")", ";", "assert", "that", "(", "resolve", "(", "base", ",", "\"", "/", "/", "/", "/", "g", "\"", ")", ")", "is", "equal", "to", "(", "\"", "http", ":", "/", "/", "a", "/", "g", "\"", ")", ";", "assert", "that", "(", "resolve", "(", "base", ",", "\"", "/", "/", "g", "\"", ")", ")", "is", "equal", "to", "(", "\"", "http", ":", "/", "/", "a", "/", "g", "\"", ")", ";", "assert", "that", "(", "resolve", "(", "base", ",", "\"", "/", "/", "g", "\"", ")", ")", "is", "equal", "to", "(", "\"", "http", ":", "/", "/", "a", "/", "g", "\"", ")", ";", "assert", "that", "(", "resolve", "(", "base", ",", "\"", "g", "\"", ")", ")", "is", "equal", "to", "(", "\"", "http", ":", "/", "/", "a", "/", "b", "/", "c", "/", "g", "\"", ")", ";", "assert", "that", "(", "resolve", "(", "base", ",", "\"", "g", "\"", ")", ")", "is", "equal", "to", "(", "\"", "http", ":", "/", "/", "a", "/", "b", "/", "c", "/", "g", "\"", ")", ";", "assert", "that", "(", "resolve", "(", "base", ",", "\"", "g", "\"", ")", ")", "is", "equal", "to", "(", "\"", "http", ":", "/", "/", "a", "/", "b", "/", "c", "/", "g", "\"", ")", ";", "assert", "that", "(", "resolve", "(", "base", ",", "\"", "g", "\"", ")", ")", "is", "equal", "to", "(", "\"", "http", ":", "/", "/", "a", "/", "b", "/", "c", "/", "g", "\"", ")", ";", "assert", "that", "(", "resolve", "(", "base", ",", "\"", "/", "/", "g", "\"", ")", ")", "is", "equal", "to", "(", "\"", "http", ":", "/", "/", "a", "/", "b", "/", "g", "\"", ")", ";", "assert", "that", "(", "resolve", "(", "base", ",", "\"", "/", "g", "/", "\"", ")", ")", "is", "equal", "to", "(", "\"", "http", ":", "/", "/", "a", "/", "b", "/", "c", "/", "g", "/", "\"", ")", ";", "assert", "that", "(", "resolve", "(", "base", ",", "\"", "g", "/", "/", "h", "\"", ")", ")", "is", "equal", "to", "(", "\"", "http", ":", "/", "/", "a", "/", "b", "/", "c", "/", "g", "/", "h", "\"", ")", ";", "assert", "that", "(", "resolve", "(", "base", ",", "\"", "g", "/", "/", "h", "\"", ")", ")", "is", "equal", "to", "(", "\"", "http", ":", "/", "/", "a", "/", "b", "/", "c", "/", "h", "\"", ")", ";", "assert", "that", "(", "resolve", "(", "base", ",", "\"", "g", ";", "x", "=", "1", "/", "/", "y", "\"", ")", ")", "is", "equal", "to", "(", "\"", "http", ":", "/", "/", "a", "/", "b", "/", "c", "/", "g", ";", "x", "=", "1", "/", "y", "\"", ")", ";", "assert", "that", "(", "resolve", "(", "base", ",", "\"", "g", ";", "x", "=", "1", "/", "/", "y", "\"", ")", ")", "is", "equal", "to", "(", "\"", "http", ":", "/", "/", "a", "/", "b", "/", "c", "/", "y", "\"", ")", ";", "assert", "that", "(", "resolve", "(", "base", ",", "\"", "g", "?", "y", "/", "/", "x", "\"", ")", ")", "is", "equal", "to", "(", "\"", "http", ":", "/", "/", "a", "/", "b", "/", "c", "/", "g", "?", "y", "/", "/", "x", "\"", ")", ";", "assert", "that", "(", "resolve", "(", "base", ",", "\"", "g", "?", "y", "/", "/", "x", "\"", ")", ")", "is", "equal", "to", "(", "\"", "http", ":", "/", "/", "a", "/", "b", "/", "c", "/", "g", "?", "y", "/", "/", "x", "\"", ")", ";", "assert", "that", "(", "resolve", "(", "base", ",", "\"", "g", "#", "s", "/", "/", "x", "\"", ")", ")", "is", "equal", "to", "(", "\"", "http", ":", "/", "/", "a", "/", "b", "/", "c", "/", "g", "#", "s", "/", "/", "x", "\"", ")", ";", "assert", "that", "(", "resolve", "(", "base", ",", "\"", "g", "#", "s", "/", "/", "x", "\"", ")", ")", "is", "equal", "to", "(", "\"", "http", ":", "/", "/", "a", "/", "b", "/", "c", "/", "g", "#", "s", "/", "/", "x", "\"", ")", ";", "assert", "that", "(", "resolve", "(", "base", ",", "\"", "http", ":", "g", "\"", ")", ")", "is", "equal", "to", "(", "\"", "http", ":", "g", "\"", ")", ";", "}" ]
[ "read", "messages", "into", "the", "given", "array", "and", "return", "the", "amount", "which", "was", "read" ]
[ "protected", "abstract", "int", "do", "read", "messages", "(", "list", "<", "object", ">", "buf", ")", "throws", "exception", ";" ]
[ "uploads", "an", "image" ]
[ "public", "model", "api", "response", "upload", "file", "(", "long", "pet", "id", ",", "string", "additional", "metadata", ",", "attachment", "file", "detail", ")", "{", "/", "/", "todo", ":", "implement", "return", "null", ";", "}" ]
[ "performs", "basic", "validation", "of", "a", "path", "for", "a", "create", "request", "throws", "if", "the", "path", "is", "not", "valid", "and", "returns", "the", "parent", "path" ]
[ "private", "string", "validate", "path", "for", "create", "(", "string", "path", ",", "long", "session", "id", ")", "throws", "bad", "arguments", "exception", "{", "int", "last", "slash", "=", "path", "last", "index", "of", "(", "'", "/", "'", ")", ";", "if", "(", "last", "slash", "=", "=", "-", "1", "|", "|", "path", "index", "of", "(", "'", "\\", "0", "'", ")", "!", "=", "-", "1", "|", "|", "fail", "create", ")", "{", "log", "info", "(", "\"", "invalid", "path", "{", "}", "with", "session", "0x", "{", "}", "\"", ",", "path", ",", "long", "to", "hex", "string", "(", "session", "id", ")", ")", ";", "throw", "new", "keeper", "exception", "bad", "arguments", "exception", "(", "path", ")", ";", "}", "return", "path", "substring", "(", "0", ",", "last", "slash", ")", ";", "}" ]
[ "gets", "entity", "id" ]
[ "public", "string", "get", "entity", "id", "(", ")", "{", "return", "this", "entity", "descriptor", "get", "entity", "i", "d", "(", ")", ";", "}" ]
[ "returns", "a", "{", "@", "link", "cache", "loader", "}", "that", "throws", "the", "given", "exception", "for", "every", "request" ]
[ "static", "<", "k", ",", "v", ">", "cache", "loader", "<", "k", ",", "v", ">", "exception", "loader", "(", "final", "exception", "e", ")", "{", "check", "not", "null", "(", "e", ")", ";", "return", "new", "cache", "loader", "<", "k", ",", "v", ">", "(", ")", "{", "@", "override", "public", "v", "load", "(", "k", "key", ")", "throws", "exception", "{", "throw", "e", ";", "}", "}", ";", "}" ]
[ "returns", "the", "size", "of", "the", "stride", "for", "this", "strided", "array" ]
[ "public", "long", "get", "stride", "(", ")", "{", "return", "stride", ";", "}" ]
[ "shallow", "tuple", "copy" ]
[ "public", "tuple", "9", "<", "t0", ",", "t1", ",", "t2", ",", "t3", ",", "t4", ",", "t5", ",", "t6", ",", "t7", ",", "t8", ">", "copy", "(", ")", "{", "return", "new", "tuple", "9", "<", ">", "(", "this", "f", "0", ",", "this", "f", "1", ",", "this", "f", "2", ",", "this", "f", "3", ",", "this", "f", "4", ",", "this", "f", "5", ",", "this", "f", "6", ",", "this", "f", "7", ",", "this", "f", "8", ")", ";", "}" ]
[ "model", "tests", "for", "fruit" ]
[ "public", "void", "test", "fruit", "(", ")", "{", "/", "/", "todo", ":", "test", "fruit", "}" ]
[ "returns", "the", "end", "pointer" ]
[ "public", "long", "get", "end", "pointer", "(", ")", "{", "return", "end", "pointer", ";", "}" ]
[ "lower", "scores", "sorts", "first", ";", "if", "scores", "are", "equal", ",", "than", "later", "terms", "(", "zzz", ")", "sort", "first" ]
[ "public", "int", "compare", "to", "(", "correction", "other", ")", "{", "return", "compare", "to", "(", "other", "score", ",", "other", "candidates", ")", ";", "}" ]
[ "return", "the", "handshake", "handler" ]
[ "public", "handshake", "handler", "get", "handshake", "handler", "(", ")", "{", "return", "this", "handshake", "handler", ";", "}" ]
[ "visit", "a", "parse", "tree", "produced", "by", "the", "{", "@", "code", "single", "}", "labeled", "alternative", "in", "{", "@", "link", "painless", "parser", "#", "noncondexpression", "}" ]
[ "t", "visit", "single", "(", "painless", "parser", "single", "context", "ctx", ")", ";" ]
[ "returns", "the", "path", "name", "of", "the", "user", "specified", "archive", "file" ]
[ "public", "string", "get", "archive", "path", "name", "(", ")", "{", "string", "archive", "=", "archive", "field", "get", "text", "(", ")", "trim", "(", ")", ";", "if", "(", "archive", "length", "(", ")", "=", "=", "0", ")", "{", "return", "null", ";", "}", "file", "file", "=", "new", "file", "(", "archive", ")", ";", "string", "path", "name", "=", "file", "get", "absolute", "path", "(", ")", ";", "if", "(", "path", "name", "=", "=", "null", "|", "|", "path", "name", "length", "(", ")", "=", "=", "0", ")", "{", "return", "null", ";", "}", "if", "(", "!", "path", "name", "ends", "with", "(", "archive", "plugin", "archive", "extension", ")", ")", "{", "path", "name", "=", "path", "name", "+", "archive", "plugin", "archive", "extension", ";", "}", "return", "path", "name", ";", "}" ]