docstring_tokens
list
code_tokens
list
[ "subclasses", "should", "expose", "this", "as", "\"", "decodable", "\"", "or", "\"", "encodable", "\"", "mime", "types" ]
[ "protected", "list", "<", "mime", "type", ">", "get", "mime", "types", "(", ")", "{", "return", "this", "mime", "types", ";", "}" ]
[ "gets", "the", "string", "identifiers", "section", "this", "is", "package", "-", "scope", "in", "order", "to", "allow", "the", "various", "{", "@", "link", "item", "}", "instances", "to", "add", "items", "to", "the", "instance" ]
[ "/", "*", "package", "*", "/", "string", "ids", "section", "get", "string", "ids", "(", ")", "{", "return", "string", "ids", ";", "}" ]
[ "for", "this", "test", ",", "the", "body", "for", "this", "request", "much", "reference", "a", "schema", "named", "&", "#", "x", "6", "0", ";", "file", "&", "#", "x", "6", "0", ";" ]
[ "public", "single", "<", "void", ">", "rx", "test", "body", "with", "file", "schema", "(", "file", "schema", "test", "class", "body", ",", "api", "client", "auth", "info", "auth", "info", ")", "{", "return", "single", "create", "(", "new", "io", "vertx", "rx", "java", "single", "on", "subscribe", "adapter", "<", ">", "(", "fut", "-", ">", "delegate", "test", "body", "with", "file", "schema", "(", "body", ",", "auth", "info", ",", "fut", ")", ")", ")", ";", "}" ]
[ "test", "the", "property", "'", "photo", "urls", "'" ]
[ "public", "void", "photo", "urls", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "photo", "urls", "}" ]
[ "get", "map", "integer" ]
[ "public", "map", "<", "string", ",", "integer", ">", "get", "map", "integer", "(", ")", "{", "return", "map", "integer", ";", "}" ]
[ "adds", "the", "entry", "listeners", "settings" ]
[ "private", "void", "add", "listeners", "(", ")", "{", "for", "(", "string", "path", ":", "merged", "get", "string", "list", "(", "\"", "listeners", "\"", ")", ")", "{", "config", "listener", "=", "root", "get", "config", "(", "path", ")", ";", "factory", "<", "?", "extends", "cache", "entry", "listener", "<", "?", "super", "k", ",", "?", "super", "v", ">", ">", "listener", "factory", "=", "factory", "creator", "factory", "of", "(", "listener", "get", "string", "(", "\"", "class", "\"", ")", ")", ";", "factory", "<", "?", "extends", "cache", "entry", "event", "filter", "<", "?", "super", "k", ",", "?", "super", "v", ">", ">", "filter", "factory", "=", "null", ";", "if", "(", "listener", "has", "path", "(", "\"", "filter", "\"", ")", ")", "{", "filter", "factory", "=", "factory", "creator", "factory", "of", "(", "listener", "get", "string", "(", "\"", "filter", "\"", ")", ")", ";", "}", "boolean", "old", "value", "required", "=", "listener", "get", "boolean", "(", "\"", "old", "-", "value", "-", "required", "\"", ")", ";", "boolean", "synchronous", "=", "listener", "get", "boolean", "(", "\"", "synchronous", "\"", ")", ";", "configuration", "add", "cache", "entry", "listener", "configuration", "(", "new", "mutable", "cache", "entry", "listener", "configuration", "<", ">", "(", "listener", "factory", ",", "filter", "factory", ",", "old", "value", "required", ",", "synchronous", ")", ")", ";", "}", "}" ]
[ "waits", "until", "the", "given", "process", "terminates", "if", "timeout", "is", "non", "-", "negative", ",", "it", "indicates", "the", "number", "of", "milliseconds", "before", "the", "call", "times", "out", "return", "values", ":", "0", ":", "process", "finished", "1", ":", "timeout", "2", ":", "something", "went", "wrong" ]
[ "public", "static", "native", "int", "wait", "for", "(", "long", "process", ",", "long", "timeout", ")", ";" ]
[ "a", "few", "hardcoded", "latlngzoom", "hashing", "expectations" ]
[ "public", "void", "test", "string", "encode", "(", ")", "{", "assert", "str", "codec", "(", "0x", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "l", ",", "\"", "0", "/", "0", "/", "0", "\"", ",", "0", ")", ";", "assert", "str", "codec", "(", "0x", "3", "c", "0", "0", "0", "9", "5", "5", "4", "0", "0", "0", "1", "c", "a", "5", "l", ",", "\"", "15", "/", "19114", "/", "7333", "\"", ",", "15", ")", ";", "assert", "str", "codec", "(", "0x", "7", "7", "f", "f", "f", "f", "4", "5", "8", "0", "0", "0", "0", "0", "0", "0", "l", ",", "\"", "29", "/", "536869420", "/", "0", "\"", ",", "29", ")", ";", "assert", "str", "codec", "(", "0x", "7", "4", "0", "0", "0", "0", "b", "a", "7", "f", "f", "f", "f", "f", "f", "f", "l", ",", "\"", "29", "/", "1491", "/", "536870911", "\"", ",", "29", ")", ";", "assert", "str", "codec", "(", "0x", "0", "8", "0", "0", "0", "0", "0", "0", "4", "0", "0", "0", "0", "0", "0", "1", "l", ",", "\"", "2", "/", "2", "/", "1", "\"", ",", "2", ")", ";", "assert", "str", "codec", "(", "0x", "0", "c", "0", "0", "0", "0", "0", "0", "6", "0", "0", "0", "0", "0", "0", "0", "l", ",", "\"", "3", "/", "3", "/", "0", "\"", ",", "3", ")", ";", "assert", "str", "codec", "(", "0x", "7", "1", "1", "2", "7", "d", "2", "7", "c", "8", "a", "c", "a", "6", "7", "a", "l", ",", "\"", "28", "/", "143911230", "/", "145532538", "\"", ",", "28", ")", ";", "assert", "str", "codec", "(", "0x", "4", "c", "0", "0", "7", "7", "7", "7", "6", "0", "0", "3", "a", "9", "a", "c", "l", ",", "\"", "19", "/", "244667", "/", "240044", "\"", ",", "19", ")", ";", "assert", "str", "codec", "(", "0x", "1", "4", "0", "0", "0", "0", "0", "2", "4", "0", "0", "0", "0", "0", "0", "e", "l", ",", "\"", "5", "/", "18", "/", "14", "\"", ",", "5", ")", ";", "assert", "str", "codec", "(", "0x", "6", "4", "3", "6", "f", "9", "6", "b", "6", "0", "0", "0", "0", "0", "0", "0", "l", ",", "\"", "25", "/", "28822363", "/", "0", "\"", ",", "25", ")", ";", "assert", "str", "codec", "(", "0x", "6", "4", "1", "1", "b", "d", "6", "b", "a", "0", "a", "9", "8", "3", "5", "9", "l", ",", "\"", "25", "/", "9300829", "/", "11109209", "\"", ",", "25", ")", ";", "assert", "str", "codec", "(", "0x", "7", "5", "1", "b", "d", "6", "b", "b", "c", "a", "9", "8", "3", "5", "9", "6", "l", ",", "\"", "29", "/", "148813278", "/", "177747350", "\"", ",", "29", ")", ";", "assert", "str", "codec", "(", "0x", "7", "7", "c", "f", "8", "8", "0", "a", "2", "0", "0", "0", "0", "0", "0", "0", "l", ",", "\"", "29", "/", "511459409", "/", "0", "\"", ",", "29", ")", ";", "assert", "str", "codec", "(", "0x", "7", "6", "2", "4", "f", "a", "4", "f", "a", "0", "0", "0", "0", "0", "0", "0", "l", ",", "\"", "29", "/", "287822461", "/", "0", "\"", ",", "29", ")", ";", "assert", "str", "codec", "(", "0x", "7", "6", "2", "4", "f", "a", "4", "f", "b", "f", "f", "f", "f", "f", "f", "f", "l", ",", "\"", "29", "/", "287822461", "/", "536870911", "\"", ",", "29", ")", ";", "assert", "str", "codec", "(", "0x", "0", "4", "0", "0", "0", "0", "0", "0", "2", "0", "0", "0", "0", "0", "0", "0", "l", ",", "\"", "1", "/", "1", "/", "0", "\"", ",", "1", ")", ";", "assert", "str", "codec", "(", "0x", "0", "4", "0", "0", "0", "0", "0", "0", "2", "0", "0", "0", "0", "0", "0", "1", "l", ",", "\"", "1", "/", "1", "/", "1", "\"", ",", "1", ")", ";", "expect", "throws", "(", "illegal", "argument", "exception", "class", ",", "(", ")", "-", ">", "string", "encode", "(", "-", "1l", ")", ")", ";", "expect", "throws", "(", "illegal", "argument", "exception", "class", ",", "(", ")", "-", ">", "string", "encode", "(", "0x", "7", "8", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "l", ")", ")", ";", "/", "/", "z", "=", "30", "expect", "throws", "(", "illegal", "argument", "exception", "class", ",", "(", ")", "-", ">", "string", "encode", "(", "0x", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "l", ")", ")", ";", "/", "/", "z", "=", "0", ",", "x", "=", "0", ",", "y", "=", "1", "expect", "throws", "(", "illegal", "argument", "exception", "class", ",", "(", ")", "-", ">", "string", "encode", "(", "0x", "0", "0", "0", "0", "0", "0", "0", "0", "2", "0", "0", "0", "0", "0", "0", "0", "l", ")", ")", ";", "/", "/", "z", "=", "0", ",", "x", "=", "1", ",", "y", "=", "0", "for", "(", "int", "zoom", "=", "0", ";", "zoom", "<", "5", ";", "zoom", "+", "+", ")", "{", "int", "max", "tile", "=", "1", "<", "<", "zoom", ";", "for", "(", "int", "x", "=", "0", ";", "x", "<", "max", "tile", ";", "x", "+", "+", ")", "{", "for", "(", "int", "y", "=", "0", ";", "y", "<", "max", "tile", ";", "y", "+", "+", ")", "{", "string", "expected", "tile", "index", "=", "zoom", "+", "\"", "/", "\"", "+", "x", "+", "\"", "/", "\"", "+", "y", ";", "geo", "point", "point", "=", "key", "to", "geo", "point", "(", "expected", "tile", "index", ")", ";", "string", "actual", "tile", "index", "=", "string", "encode", "(", "long", "encode", "(", "point", "lon", "(", ")", ",", "point", "lat", "(", ")", ",", "zoom", ")", ")", ";", "assert", "equals", "(", "expected", "tile", "index", ",", "actual", "tile", "index", ")", ";", "}", "}", "}", "}" ]
[ "sets", "the", "attributes", "for", "a", "path", "iff", "posix", "attributes", "are", "supported" ]
[ "private", "static", "void", "set", "file", "attributes", "(", "final", "path", "path", ",", "final", "set", "<", "posix", "file", "permission", ">", "permissions", ")", "throws", "i", "o", "exception", "{", "posix", "file", "attribute", "view", "file", "attribute", "view", "=", "files", "get", "file", "attribute", "view", "(", "path", ",", "posix", "file", "attribute", "view", "class", ")", ";", "if", "(", "file", "attribute", "view", "!", "=", "null", ")", "{", "files", "set", "posix", "file", "permissions", "(", "path", ",", "permissions", ")", ";", "}", "}" ]
[ "add", "interceptors", "for", "specific", "patterns", "this", "is", "delegated", "to", "{", "@", "link", "standalone", "mock", "mvc", "builder", "#", "add", "mapped", "interceptors", "(", "string", "[", "]", ",", "handler", "interceptor", ")", "}" ]
[ "controller", "spec", "mapped", "interceptors", "(", "@", "nullable", "string", "[", "]", "path", "patterns", ",", "handler", "interceptor", "interceptors", ")", ";" ]
[ "tests", "that", "it", "will", "throw", "exception", "when", "getting", "the", "task", "manager", "location", "of", "a", "non", "existing", "execution" ]
[ "public", "void", "test", "get", "non", "existing", "execution", "vertex", "will", "throw", "exception", "(", ")", "throws", "exception", "{", "final", "job", "vertex", "job", "vertex", "=", "execution", "graph", "test", "utils", "create", "no", "op", "vertex", "(", "1", ")", ";", "final", "execution", "graph", "eg", "=", "execution", "graph", "test", "utils", "create", "simple", "test", "graph", "(", "job", "vertex", ")", ";", "final", "execution", "graph", "to", "inputs", "locations", "retriever", "adapter", "inputs", "locations", "retriever", "=", "new", "execution", "graph", "to", "inputs", "locations", "retriever", "adapter", "(", "eg", ")", ";", "execution", "vertex", "i", "d", "invalid", "execution", "vertex", "id", "=", "new", "execution", "vertex", "i", "d", "(", "new", "job", "vertex", "i", "d", "(", ")", ",", "0", ")", ";", "try", "{", "inputs", "locations", "retriever", "get", "task", "manager", "location", "(", "invalid", "execution", "vertex", "id", ")", ";", "fail", "(", "\"", "should", "throw", "exception", "if", "execution", "vertex", "doesn", "'", "t", "exist", "!", "\"", ")", ";", "}", "catch", "(", "illegal", "state", "exception", "expected", ")", "{", "/", "/", "expect", "this", "exception", "}", "}" ]
[ "returns", "a", "{", "@", "link", "differencer", "diff", "with", "delta", "}", "containing", "keys", "that", "are", "dirty", "according", "to", "the", "passed", "-", "in", "{", "@", "code", "dirtiness", "checker", "}" ]
[ "public", "differencer", "diff", "with", "delta", "get", "new", "and", "old", "values", "(", "walkable", "graph", "walkable", "graph", ",", "collection", "<", "sky", "key", ">", "keys", ",", "sky", "value", "dirtiness", "checker", "dirtiness", "checker", ")", "throws", "interrupted", "exception", "{", "return", "get", "dirty", "values", "(", "new", "walkable", "graph", "backed", "value", "fetcher", "(", "walkable", "graph", ")", ",", "keys", ",", "dirtiness", "checker", ",", "/", "*", "check", "missing", "values", "=", "*", "/", "true", ")", ";", "}" ]
[ "increment", "the", "count", "of", "triggered", "synchronous", "state", "updates", "in", "litho", "components", "(", "by", "one", ")" ]
[ "public", "static", "long", "increment", "component", "state", "update", "sync", "count", "(", ")", "{", "return", "s", "component", "triggered", "sync", "state", "update", "count", "add", "and", "get", "(", "1", ")", ";", "}" ]
[ "returns", "the", "{", "@", "link", "kind", "}", "attribute" ]
[ "public", "kind", "get", "kind", "(", ")", "{", "return", "kind", ";", "}" ]
[ "returns", "whether", "data", "needs", "to", "be", "grouped", "by", "partition", "before", "it", "is", "consumed", "by", "the", "sink", "by", "default", ",", "this", "is", "not", "required", "from", "the", "runtime", "and", "records", "arrive", "in", "arbitrary", "partition", "order", "if", "this", "method", "returns", "true", ",", "the", "sink", "can", "expect", "that", "all", "records", "will", "be", "grouped", "by", "the", "partition", "keys", "before", "consumed", "by", "the", "sink", "in", "other", "words", ":", "the", "sink", "will", "receive", "all", "elements", "of", "one", "partition", "and", "then", "all", "elements", "of", "another", "partition", "elements", "of", "different", "partitions", "will", "not", "be", "mixed", "for", "some", "sinks", ",", "this", "can", "be", "used", "to", "reduce", "the", "number", "of", "partition", "writers", "and", "improve", "writing", "performance", "by", "writing", "one", "partition", "at", "a", "time", "the", "given", "argument", "indicates", "whether", "the", "current", "execution", "mode", "supports", "grouping", "or", "not", "for", "example", ",", "depending", "on", "the", "execution", "mode", "a", "sorting", "operation", "might", "not", "be", "available", "during", "runtime" ]
[ "default", "boolean", "requires", "partition", "grouping", "(", "boolean", "supports", "grouping", ")", "{", "return", "false", ";", "}" ]
[ "returns", "true", "if", "field", "corresponding", "to", "field", "i", "d", "is", "set", "(", "has", "been", "assigned", "a", "value", ")", "and", "false", "otherwise" ]
[ "public", "boolean", "is", "set", "(", "fields", "field", ")", "{", "if", "(", "field", "=", "=", "null", ")", "{", "throw", "new", "illegal", "argument", "exception", "(", ")", ";", "}", "switch", "(", "field", ")", "{", "case", "arg", ":", "return", "is", "set", "arg", "(", ")", ";", "}", "throw", "new", "illegal", "state", "exception", "(", ")", ";", "}" ]
[ "close", "the", "reader", "the", "state", "of", "the", "reader", "object", "is", "undefined", "after", "close", "calling", "close", "(", ")", "for", "multiple", "times", "has", "no", "effect" ]
[ "public", "void", "close", "(", ")", "throws", "i", "o", "exception", "{", "reader", "b", "c", "f", "close", "(", ")", ";", "}" ]
[ "returns", "the", "last", "index", "in", "the", "shuffle", "order", ",", "or", "{", "@", "link", "c", "#", "index", "unset", "}", "if", "the", "shuffle", "order", "is", "empty" ]
[ "int", "get", "last", "index", "(", ")", ";" ]
[ "get", "the", "current", "application", "name" ]
[ "public", "string", "get", "current", "application", "name", "(", ")", "{", "return", "current", "application", "name", ";", "}" ]
[ "make", "sure", "when", "the", "block", "length", "after", "appending", "is", "less", "than", "512", "bytes", ",", "the", "checksum", "re", "-", "calculation", "and", "overwrite", "are", "performed", "correctly" ]
[ "public", "void", "test", "append", "less", "than", "checksum", "chunk", "(", ")", "throws", "exception", "{", "final", "byte", "[", "]", "buf", "=", "new", "byte", "[", "1024", "]", ";", "final", "mini", "d", "f", "s", "cluster", "cluster", "=", "new", "mini", "d", "f", "s", "cluster", "builder", "(", "new", "hdfs", "configuration", "(", ")", ")", "num", "data", "nodes", "(", "1", ")", "build", "(", ")", ";", "cluster", "wait", "active", "(", ")", ";", "try", "(", "distributed", "file", "system", "fs", "=", "cluster", "get", "file", "system", "(", ")", ")", "{", "final", "int", "len", "1", "=", "200", ";", "final", "int", "len", "2", "=", "300", ";", "final", "path", "p", "=", "new", "path", "(", "\"", "/", "foo", "\"", ")", ";", "f", "s", "data", "output", "stream", "out", "=", "fs", "create", "(", "p", ")", ";", "out", "write", "(", "buf", ",", "0", ",", "len", "1", ")", ";", "out", "close", "(", ")", ";", "out", "=", "fs", "append", "(", "p", ")", ";", "out", "write", "(", "buf", ",", "0", ",", "len", "2", ")", ";", "/", "/", "flush", "but", "leave", "open", "out", "hflush", "(", ")", ";", "/", "/", "read", "data", "to", "verify", "the", "replica", "'", "s", "content", "and", "checksum", "are", "correct", "f", "s", "data", "input", "stream", "in", "=", "fs", "open", "(", "p", ")", ";", "final", "int", "length", "=", "in", "read", "(", "0", ",", "buf", ",", "0", ",", "len", "1", "+", "len", "2", ")", ";", "assert", "true", "(", "length", ">", "0", ")", ";", "in", "close", "(", ")", ";", "out", "close", "(", ")", ";", "}", "finally", "{", "cluster", "shutdown", "(", ")", ";", "}", "}" ]
[ "model", "tests", "for", "enum", "test" ]
[ "public", "void", "test", "enum", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "enum", "test", "}" ]
[ "model", "tests", "for", "additional", "properties", "boolean" ]
[ "public", "void", "test", "additional", "properties", "boolean", "(", ")", "{", "/", "/", "todo", ":", "test", "additional", "properties", "boolean", "}" ]
[ "tests", "broadcasting", "events", "when", "records", "have", "been", "emitted" ]
[ "public", "void", "test", "broadcast", "event", "mixed", "records", "(", ")", "throws", "exception", "{", "random", "rand", "=", "new", "x", "o", "r", "shift", "random", "(", ")", ";", "int", "number", "of", "channels", "=", "4", ";", "int", "buffer", "size", "=", "32", ";", "int", "len", "bytes", "=", "4", ";", "/", "/", "serialized", "length", "result", "partition", "partition", "=", "create", "result", "partition", "(", "buffer", "size", ",", "number", "of", "channels", ")", ";", "record", "writer", "<", "byte", "array", "i", "o", ">", "writer", "=", "create", "record", "writer", "(", "partition", ")", ";", "checkpoint", "barrier", "barrier", "=", "new", "checkpoint", "barrier", "(", "integer", "max", "value", "+", "1292l", ",", "integer", "max", "value", "+", "199l", ",", "checkpoint", "options", "for", "checkpoint", "with", "default", "location", "(", ")", ")", ";", "/", "/", "emit", "records", "on", "some", "channels", "first", "(", "requesting", "buffers", ")", ",", "then", "/", "/", "broadcast", "the", "event", "the", "record", "buffers", "should", "be", "emitted", "first", ",", "then", "/", "/", "the", "event", "after", "the", "event", ",", "no", "new", "buffer", "should", "be", "requested", "/", "/", "(", "i", ")", "smaller", "than", "the", "buffer", "size", "byte", "[", "]", "bytes", "=", "new", "byte", "[", "buffer", "size", "/", "2", "]", ";", "rand", "next", "bytes", "(", "bytes", ")", ";", "writer", "emit", "(", "new", "byte", "array", "i", "o", "(", "bytes", ")", ")", ";", "/", "/", "(", "ii", ")", "larger", "than", "the", "buffer", "size", "bytes", "=", "new", "byte", "[", "buffer", "size", "+", "1", "]", ";", "rand", "next", "bytes", "(", "bytes", ")", ";", "writer", "emit", "(", "new", "byte", "array", "i", "o", "(", "bytes", ")", ")", ";", "/", "/", "(", "iii", ")", "exactly", "the", "buffer", "size", "bytes", "=", "new", "byte", "[", "buffer", "size", "-", "len", "bytes", "]", ";", "rand", "next", "bytes", "(", "bytes", ")", ";", "writer", "emit", "(", "new", "byte", "array", "i", "o", "(", "bytes", ")", ")", ";", "/", "/", "(", "iv", ")", "broadcast", "the", "event", "writer", "broadcast", "event", "(", "barrier", ")", ";", "if", "(", "is", "broadcast", "writer", ")", "{", "assert", "equals", "(", "3", ",", "partition", "get", "buffer", "pool", "(", ")", "best", "effort", "get", "num", "of", "used", "buffers", "(", ")", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "number", "of", "channels", ";", "i", "+", "+", ")", "{", "assert", "equals", "(", "4", ",", "partition", "get", "number", "of", "queued", "buffers", "(", "i", ")", ")", ";", "/", "/", "3", "buffer", "+", "1", "event", "result", "subpartition", "view", "view", "=", "partition", "create", "subpartition", "view", "(", "i", ",", "new", "no", "op", "buffer", "availablity", "listener", "(", ")", ")", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "3", ";", "j", "+", "+", ")", "{", "assert", "true", "(", "parse", "buffer", "(", "view", "get", "next", "buffer", "(", ")", "buffer", "(", ")", ",", "0", ")", "is", "buffer", "(", ")", ")", ";", "}", "buffer", "or", "event", "boe", "=", "parse", "buffer", "(", "view", "get", "next", "buffer", "(", ")", "buffer", "(", ")", ",", "i", ")", ";", "assert", "true", "(", "boe", "is", "event", "(", ")", ")", ";", "assert", "equals", "(", "barrier", ",", "boe", "get", "event", "(", ")", ")", ";", "}", "}", "else", "{", "assert", "equals", "(", "4", ",", "partition", "get", "buffer", "pool", "(", ")", "best", "effort", "get", "num", "of", "used", "buffers", "(", ")", ")", ";", "result", "subpartition", "view", "[", "]", "views", "=", "new", "result", "subpartition", "view", "[", "4", "]", ";", "assert", "equals", "(", "2", ",", "partition", "get", "number", "of", "queued", "buffers", "(", "0", ")", ")", ";", "/", "/", "1", "buffer", "+", "1", "event", "views", "[", "0", "]", "=", "partition", "create", "subpartition", "view", "(", "0", ",", "new", "no", "op", "buffer", "availablity", "listener", "(", ")", ")", ";", "assert", "true", "(", "parse", "buffer", "(", "views", "[", "0", "]", "get", "next", "buffer", "(", ")", "buffer", "(", ")", ",", "0", ")", "is", "buffer", "(", ")", ")", ";", "assert", "equals", "(", "3", ",", "partition", "get", "number", "of", "queued", "buffers", "(", "1", ")", ")", ";", "/", "/", "2", "buffers", "+", "1", "event", "views", "[", "1", "]", "=", "partition", "create", "subpartition", "view", "(", "1", ",", "new", "no", "op", "buffer", "availablity", "listener", "(", ")", ")", ";", "assert", "true", "(", "parse", "buffer", "(", "views", "[", "1", "]", "get", "next", "buffer", "(", ")", "buffer", "(", ")", ",", "1", ")", "is", "buffer", "(", ")", ")", ";", "assert", "true", "(", "parse", "buffer", "(", "views", "[", "1", "]", "get", "next", "buffer", "(", ")", "buffer", "(", ")", ",", "1", ")", "is", "buffer", "(", ")", ")", ";", "assert", "equals", "(", "2", ",", "partition", "get", "number", "of", "queued", "buffers", "(", "2", ")", ")", ";", "/", "/", "1", "buffer", "+", "1", "event", "views", "[", "2", "]", "=", "partition", "create", "subpartition", "view", "(", "2", ",", "new", "no", "op", "buffer", "availablity", "listener", "(", ")", ")", ";", "assert", "true", "(", "parse", "buffer", "(", "views", "[", "2", "]", "get", "next", "buffer", "(", ")", "buffer", "(", ")", ",", "2", ")", "is", "buffer", "(", ")", ")", ";", "views", "[", "3", "]", "=", "partition", "create", "subpartition", "view", "(", "3", ",", "new", "no", "op", "buffer", "availablity", "listener", "(", ")", ")", ";", "assert", "equals", "(", "1", ",", "partition", "get", "number", "of", "queued", "buffers", "(", "3", ")", ")", ";", "/", "/", "0", "buffers", "+", "1", "event", "/", "/", "every", "queue", "'", "s", "last", "element", "should", "be", "the", "event", "for", "(", "int", "i", "=", "0", ";", "i", "<", "number", "of", "channels", ";", "i", "+", "+", ")", "{", "buffer", "or", "event", "boe", "=", "parse", "buffer", "(", "views", "[", "i", "]", "get", "next", "buffer", "(", ")", "buffer", "(", ")", ",", "i", ")", ";", "assert", "true", "(", "boe", "is", "event", "(", ")", ")", ";", "assert", "equals", "(", "barrier", ",", "boe", "get", "event", "(", ")", ")", ";", "}", "}", "}" ]
[ "helper", "method", "to", "set", "username", "for", "the", "first", "http", "basic", "authentication" ]
[ "public", "void", "set", "username", "(", "string", "username", ")", "{", "for", "(", "authentication", "auth", ":", "authentications", "values", "(", ")", ")", "{", "if", "(", "auth", "instanceof", "http", "basic", "auth", ")", "{", "(", "(", "http", "basic", "auth", ")", "auth", ")", "set", "username", "(", "username", ")", ";", "return", ";", "}", "}", "throw", "new", "runtime", "exception", "(", "\"", "no", "http", "basic", "authentication", "configured", "!", "\"", ")", ";", "}" ]
[ "{", "@", "link", "r", "m", "app", "attempt", "state", "#", "submitted", "}", "-", ">", "{", "@", "link", "r", "m", "app", "attempt", "state", "#", "failed", "}" ]
[ "private", "void", "test", "app", "attempt", "submitted", "to", "failed", "state", "(", "string", "diagnostics", ")", "{", "send", "attempt", "update", "saved", "event", "(", "application", "attempt", ")", ";", "assert", "equals", "(", "r", "m", "app", "attempt", "state", "failed", ",", "application", "attempt", "get", "app", "attempt", "state", "(", ")", ")", ";", "assert", "equals", "(", "diagnostics", ",", "application", "attempt", "get", "diagnostics", "(", ")", ")", ";", "assert", "equals", "(", "0", ",", "application", "attempt", "get", "just", "finished", "containers", "(", ")", "size", "(", ")", ")", ";", "assert", "null", "(", "application", "attempt", "get", "master", "container", "(", ")", ")", ";", "assert", "equals", "(", "0", "0", ",", "(", "double", ")", "application", "attempt", "get", "progress", "(", ")", ",", "0", "0001", ")", ";", "assert", "equals", "(", "0", ",", "application", "get", "ran", "nodes", "(", ")", "size", "(", ")", ")", ";", "assert", "null", "(", "application", "attempt", "get", "final", "application", "status", "(", ")", ")", ";", "/", "/", "check", "events", "verify", "(", "master", "service", ")", "unregister", "attempt", "(", "application", "attempt", "get", "app", "attempt", "id", "(", ")", ")", ";", "/", "/", "attempt", "failed", "should", "be", "notified", "to", "app", "if", "app", "attempt", "is", "submitted", "to", "/", "/", "failed", "state", "argument", "matcher", "<", "r", "m", "app", "event", ">", "matcher", "=", "event", "-", ">", "event", "get", "type", "(", ")", "=", "=", "r", "m", "app", "event", "type", "attempt", "failed", ";", "verify", "(", "application", ")", "handle", "(", "arg", "that", "(", "matcher", ")", ")", ";", "verify", "token", "count", "(", "application", "attempt", "get", "app", "attempt", "id", "(", ")", ",", "1", ")", ";", "verify", "application", "attempt", "finished", "(", "r", "m", "app", "attempt", "state", "failed", ")", ";", "}" ]
[ "get", "integer", "item" ]
[ "public", "integer", "get", "integer", "item", "(", ")", "{", "return", "integer", "item", ";", "}" ]
[ "create", "a", "new", "{", "@", "link", "part", "}", "or", "{", "@", "link", "file", "part", "}", "with", "the", "given", "parameters", "returns", "{", "@", "link", "file", "part", "}", "if", "the", "{", "@", "code", "content", "-", "disposition", "}", "of", "the", "given", "headers", "contains", "a", "filename", ",", "or", "a", "\"", "normal", "\"", "{", "@", "link", "part", "}", "otherwise" ]
[ "public", "static", "part", "part", "(", "http", "headers", "headers", ",", "flux", "<", "data", "buffer", ">", "content", ")", "{", "assert", "not", "null", "(", "headers", ",", "\"", "headers", "must", "not", "be", "null", "\"", ")", ";", "assert", "not", "null", "(", "content", ",", "\"", "content", "must", "not", "be", "null", "\"", ")", ";", "string", "filename", "=", "headers", "get", "content", "disposition", "(", ")", "get", "filename", "(", ")", ";", "if", "(", "filename", "!", "=", "null", ")", "{", "return", "new", "default", "file", "part", "(", "headers", ",", "content", ")", ";", "}", "else", "{", "return", "new", "default", "part", "(", "headers", ",", "content", ")", ";", "}", "}" ]
[ "the", "list", "of", "array", "elements", "<", "code", ">", "repeated", "aapt", "pb", "array", "element", "element", "=", "1", ";", "<", "code", ">" ]
[ "int", "get", "element", "count", "(", ")", ";" ]
[ "get", "the", "current", "joint", "translation", ",", "usually", "in", "meters" ]
[ "public", "float", "get", "joint", "translation", "(", ")", "{", "return", "jni", "get", "joint", "translation", "(", "addr", ")", ";", "}" ]
[ "add", "a", "new", "write", "access", "entry", "to", "be", "added", "to", "node", "permissions", "in", "all", "future", "write", "operations", "of", "a", "session", "connected", "to", "a", "secure", "registry", "this", "does", "not", "grant", "the", "session", "any", "more", "rights", ":", "if", "it", "lacked", "any", "write", "access", ",", "it", "will", "still", "be", "unable", "to", "manipulate", "the", "registry", "in", "an", "insecure", "cluster", ",", "this", "operation", "has", "no", "effect" ]
[ "boolean", "add", "write", "accessor", "(", "string", "id", ",", "string", "pass", ")", "throws", "i", "o", "exception", ";" ]
[ "test", "the", "property", "'", "bar", "'" ]
[ "public", "void", "bar", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "bar", "}" ]
[ "filter", "filesdirectories", "in", "the", "given", "list", "of", "paths", "using", "user", "-", "supplied", "path", "filter" ]
[ "public", "file", "status", "[", "]", "list", "status", "(", "path", "[", "]", "files", ",", "path", "filter", "filter", ")", "throws", "access", "control", "exception", ",", "file", "not", "found", "exception", ",", "i", "o", "exception", "{", "array", "list", "<", "file", "status", ">", "results", "=", "new", "array", "list", "<", "file", "status", ">", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "files", "length", ";", "i", "+", "+", ")", "{", "list", "status", "(", "results", ",", "files", "[", "i", "]", ",", "filter", ")", ";", "}", "return", "results", "to", "array", "(", "new", "file", "status", "[", "results", "size", "(", ")", "]", ")", ";", "}" ]
[ "return", "whether", "this", "bean", "is", "a", "candidate", "for", "getting", "autowired", "into", "some", "other", "bean" ]
[ "boolean", "is", "autowire", "candidate", "(", ")", ";" ]
[ "if", "the", "length", "of", "the", "content", "is", "0", "for", "sure", ",", "{", "@", "link", "http", "content", "encoder", "}", "should", "skip", "encoding" ]
[ "public", "void", "test", "empty", "full", "content", "(", ")", "throws", "exception", "{", "embedded", "channel", "ch", "=", "new", "embedded", "channel", "(", "new", "http", "content", "compressor", "(", ")", ")", ";", "ch", "write", "inbound", "(", "new", "request", "(", ")", ")", ";", "full", "http", "response", "res", "=", "new", "default", "full", "http", "response", "(", "http", "version", "http", "1", "1", ",", "http", "response", "status", "ok", ",", "unpooled", "empty", "buffer", ")", ";", "ch", "write", "outbound", "(", "res", ")", ";", "object", "o", "=", "ch", "read", "outbound", "(", ")", ";", "assert", "that", "(", "o", ",", "is", "(", "instance", "of", "(", "full", "http", "response", "class", ")", ")", ")", ";", "res", "=", "(", "full", "http", "response", ")", "o", ";", "assert", "that", "(", "res", "headers", "(", ")", "get", "(", "http", "header", "names", "transfer", "encoding", ")", ",", "is", "(", "null", "value", "(", ")", ")", ")", ";", "/", "/", "content", "encoding", "shouldn", "'", "t", "be", "modified", "assert", "that", "(", "res", "headers", "(", ")", "get", "(", "http", "header", "names", "content", "encoding", ")", ",", "is", "(", "null", "value", "(", ")", ")", ")", ";", "assert", "that", "(", "res", "content", "(", ")", "readable", "bytes", "(", ")", ",", "is", "(", "0", ")", ")", ";", "assert", "that", "(", "res", "content", "(", ")", "to", "string", "(", "charset", "util", "us", "ascii", ")", ",", "is", "(", "\"", "\"", ")", ")", ";", "res", "release", "(", ")", ";", "assert", "that", "(", "ch", "read", "outbound", "(", ")", ",", "is", "(", "null", "value", "(", ")", ")", ")", ";", "}" ]
[ "set", "the", "(", "new", ")", "value", "of", "the", "{", "@", "code", "if", "-", "match", "}", "header" ]
[ "public", "void", "set", "if", "match", "(", "string", "if", "match", ")", "{", "set", "(", "if", "match", ",", "if", "match", ")", ";", "}" ]
[ "encodes", "exceptions", "where", "\"", "-", "co", "-", "\"", "encodes", "to", "s", "instead", "of", "k", "including", "cases", "where", "the", "cedilla", "has", "not", "been", "used" ]
[ "boolean", "encode", "co", "to", "s", "(", ")", "{", "/", "/", "e", "g", "'", "coelecanth", "'", "=", ">", "slkn0", "if", "(", "(", "string", "at", "(", "m", "current", ",", "4", ",", "\"", "coel", "\"", ",", "\"", "\"", ")", "&", "&", "(", "is", "vowel", "(", "m", "current", "+", "4", ")", "|", "|", "(", "(", "m", "current", "+", "3", ")", "=", "=", "m", "last", ")", ")", ")", "|", "|", "string", "at", "(", "m", "current", ",", "5", ",", "\"", "coena", "\"", ",", "\"", "coeno", "\"", ",", "\"", "\"", ")", "|", "|", "string", "at", "(", "0", ",", "8", ",", "\"", "francois", "\"", ",", "\"", "melancon", "\"", ",", "\"", "\"", ")", "|", "|", "string", "at", "(", "0", ",", "6", ",", "\"", "garcon", "\"", ",", "\"", "\"", ")", ")", "{", "metaph", "add", "(", "\"", "s", "\"", ")", ";", "advance", "counter", "(", "3", ",", "1", ")", ";", "return", "true", ";", "}", "return", "false", ";", "}" ]
[ "this", "test", "confirms", "that", "java", "poet", "ignores", "the", "host", "charset", "and", "always", "uses", "utf", "-", "8", "the", "host", "charset", "is", "customized", "with", "{", "@", "code", "-", "dfile", "encoding", "=", "iso", "-", "8859", "-", "1", "}" ]
[ "@", "test", "public", "void", "file", "is", "utf", "8", "(", ")", "throws", "i", "o", "exception", "{", "java", "file", "java", "file", "=", "java", "file", "builder", "(", "\"", "foo", "\"", ",", "type", "spec", "class", "builder", "(", "\"", "taco", "\"", ")", "build", "(", ")", ")", "add", "file", "comment", "(", "\"", "pi", "\\", "u", "0", "0f", "1ata", "\\", "u", "0", "0a", "1", "\"", ")", "build", "(", ")", ";", "java", "file", "write", "to", "(", "fs", "root", ")", ";", "path", "foo", "path", "=", "fs", "root", "resolve", "(", "fs", "get", "path", "(", "\"", "foo", "\"", ",", "\"", "taco", "java", "\"", ")", ")", ";", "assert", "that", "(", "new", "string", "(", "files", "read", "all", "bytes", "(", "foo", "path", ")", ",", "utf", "8", ")", ")", "is", "equal", "to", "(", "\"", "\"", "+", "\"", "/", "/", "pi", "\\", "u", "0", "0f", "1ata", "\\", "u", "0", "0a", "1", "\\", "n", "\"", "+", "\"", "package", "foo", ";", "\\", "n", "\"", "+", "\"", "\\", "n", "\"", "+", "\"", "class", "taco", "{", "\\", "n", "\"", "+", "\"", "}", "\\", "n", "\"", ")", ";", "}" ]
[ "returns", "{", "@", "code", "true", "}", "if", "a", "header", "with", "the", "name", "and", "value", "exists" ]
[ "boolean", "contains", "char", "(", "k", "name", ",", "char", "value", ")", ";" ]
[ "emits", "a", "tuple", "to", "the", "default", "output", "stream", "with", "a", "null", "message", "id", "storm", "will", "not", "track", "this", "message", "so", "ack", "and", "fail", "will", "never", "be", "called", "for", "this", "tuple", "the", "emitted", "values", "must", "be", "immutable" ]
[ "public", "list", "<", "integer", ">", "emit", "(", "list", "<", "object", ">", "tuple", ")", "{", "return", "emit", "(", "tuple", ",", "null", ")", ";", "}" ]
[ "combines", "two", "patterns", "into", "a", "single", "pattern" ]
[ "string", "combine", "(", "string", "pattern", "1", ",", "string", "pattern", "2", ")", ";" ]
[ "{", "@", "inherit", "doc", "}" ]
[ "public", "string", "to", "string", "(", ")", "{", "long", "bits", "=", "get", "long", "bits", "(", ")", ";", "return", "\"", "double", "{", "0x", "\"", "+", "hex", "u", "8", "(", "bits", ")", "+", "\"", "/", "\"", "+", "double", "long", "bits", "to", "double", "(", "bits", ")", "+", "'", "}", "'", ";", "}" ]
[ "perform", "a", "rollback", ",", "handling", "rollback", "exceptions", "properly" ]
[ "protected", "void", "rollback", "on", "exception", "if", "necessary", "(", "session", "session", ",", "throwable", "ex", ")", "throws", "j", "m", "s", "exception", "{", "try", "{", "if", "(", "session", "get", "transacted", "(", ")", ")", "{", "if", "(", "is", "session", "locally", "transacted", "(", "session", ")", ")", "{", "/", "/", "transacted", "session", "created", "by", "this", "container", "-", ">", "rollback", "if", "(", "logger", "is", "debug", "enabled", "(", ")", ")", "{", "logger", "debug", "(", "\"", "initiating", "transaction", "rollback", "on", "application", "exception", "\"", ",", "ex", ")", ";", "}", "jms", "utils", "rollback", "if", "necessary", "(", "session", ")", ";", "}", "}", "else", "if", "(", "is", "client", "acknowledge", "(", "session", ")", ")", "{", "session", "recover", "(", ")", ";", "}", "}", "catch", "(", "illegal", "state", "exception", "ex", "2", ")", "{", "logger", "debug", "(", "\"", "could", "not", "roll", "back", "because", "session", "already", "closed", "\"", ",", "ex", "2", ")", ";", "}", "catch", "(", "j", "m", "s", "exception", "|", "runtime", "exception", "|", "error", "ex", "2", ")", "{", "logger", "error", "(", "\"", "application", "exception", "overridden", "by", "rollback", "error", "\"", ",", "ex", ")", ";", "throw", "ex", "2", ";", "}", "}" ]
[ "remove", "all", "entries", "from", "the", "hashtable" ]
[ "public", "void", "remove", "all", "(", ")", "{", "indexer", "clear", "(", ")", ";", "values", "=", "(", "t", "[", "]", ")", "new", "object", "[", "values", "length", "]", ";", "/", "/", "suppressed", "}" ]
[ "{", "@", "inherit", "doc", "}" ]
[ "public", "set", "<", "k", ">", "key", "set", "(", ")", "{", "return", "collections", "empty", "set", "(", ")", ";", "}" ]
[ "test", "the", "property", "'", "attribute", "number", "'" ]
[ "public", "void", "attribute", "number", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "attribute", "number", "}" ]
[ "creates", "a", "manifest", "and", "returns", "an", "input", "stream", "for", "its", "contents" ]
[ "private", "input", "stream", "create", "manifest", "(", ")", "throws", "i", "o", "exception", "{", "manifest", "manifest", "=", "new", "manifest", "(", ")", ";", "attributes", "attributes", "=", "manifest", "get", "main", "attributes", "(", ")", ";", "attributes", "put", "(", "attributes", "name", "manifest", "version", ",", "\"", "1", "0", "\"", ")", ";", "attributes", "put", "(", "new", "attributes", "name", "(", "\"", "created", "-", "by", "\"", ")", ",", "\"", "blaze", "-", "singlejar", "\"", ")", ";", "if", "(", "main", "class", "!", "=", "null", ")", "{", "attributes", "put", "(", "attributes", "name", "main", "class", ",", "main", "class", ")", ";", "}", "if", "(", "extra", "manifest", "content", "!", "=", "null", ")", "{", "byte", "array", "input", "stream", "in", "=", "new", "byte", "array", "input", "stream", "(", "extra", "manifest", "content", "get", "bytes", "(", "\"", "utf8", "\"", ")", ")", ";", "manifest", "read", "(", "in", ")", ";", "}", "byte", "array", "output", "stream", "out", "=", "new", "byte", "array", "output", "stream", "(", ")", ";", "manifest", "write", "(", "out", ")", ";", "return", "new", "byte", "array", "input", "stream", "(", "out", "to", "byte", "array", "(", ")", ")", ";", "}" ]
[ "this", "optional", "operation", "is", "not", "supported" ]
[ "public", "f", "s", "data", "output", "stream", "append", "(", "path", "f", ",", "int", "buffer", "size", ",", "progressable", "progress", ")", "throws", "i", "o", "exception", "{", "log", "debug", "(", "\"", "swift", "file", "system", "append", "\"", ")", ";", "throw", "new", "swift", "unsupported", "feature", "exception", "(", "\"", "not", "supported", ":", "append", "(", ")", "\"", ")", ";", "}" ]
[ "read", "list", "of", "user", "permissions", "from", "user", "access", "file", "and", "determine", "if", "anonymous", "read", "-", "only", "access", "is", "permitted" ]
[ "private", "static", "boolean", "read", "access", "file", "(", "file", "user", "access", "file", ",", "list", "<", "user", ">", "users", ")", "throws", "i", "o", "exception", "{", "boolean", "allow", "anonymous", "=", "false", ";", "try", "(", "buffered", "reader", "reader", "=", "new", "buffered", "reader", "(", "new", "file", "reader", "(", "user", "access", "file", ")", ")", ")", "{", "string", "line", "=", "\"", "\"", ";", "while", "(", "true", ")", "{", "line", "=", "reader", "read", "line", "(", ")", ";", "if", "(", "line", "=", "=", "null", ")", "{", "break", ";", "}", "if", "(", "line", "starts", "with", "(", "\"", ";", "\"", ")", ")", "{", "continue", ";", "}", "line", "=", "line", "trim", "(", ")", ";", "if", "(", "anonymous", "str", "equals", "(", "line", ")", ")", "{", "allow", "anonymous", "=", "true", ";", "continue", ";", "}", "user", "user", "=", "process", "access", "line", "(", "line", ")", ";", "if", "(", "user", "!", "=", "null", ")", "{", "users", "add", "(", "user", ")", ";", "}", "}", "}", "return", "allow", "anonymous", ";", "}" ]
[ "reset", "server", "port", "property", "if", "it", "'", "s", "absent", ",", "whose", "value", "is", "configured", "by", "\"", "dubbbo", "protocol", "port", "\"", "or", "\"", "dubbo", "protcols", "rest", "port", "\"" ]
[ "private", "void", "reset", "server", "port", "(", "configurable", "environment", "environment", ",", "map", "<", "string", ",", "object", ">", "default", "properties", ")", "{", "string", "server", "port", "=", "environment", "get", "property", "(", "server", "port", "property", "name", ",", "environment", "get", "property", "(", "port", "property", "name", ")", ")", ";", "if", "(", "server", "port", "!", "=", "null", ")", "{", "return", ";", "}", "server", "port", "=", "get", "rest", "port", "from", "protocol", "property", "(", "environment", ")", ";", "if", "(", "server", "port", "=", "=", "null", ")", "{", "server", "port", "=", "get", "rest", "port", "from", "protocols", "properties", "(", "environment", ")", ";", "}", "set", "server", "port", "(", "environment", ",", "server", "port", ",", "default", "properties", ")", ";", "}" ]
[ "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", "\"", ")", ";", "}" ]
[ "apply", "an", "action", "animation", "on", "top", "of", "the", "current", "animation" ]
[ "protected", "animation", "desc", "action", "(", "final", "animation", "anim", ",", "float", "offset", ",", "float", "duration", ",", "int", "loop", "count", ",", "float", "speed", ",", "final", "animation", "listener", "listener", ",", "float", "transition", "time", ")", "{", "return", "action", "(", "obtain", "(", "anim", ",", "offset", ",", "duration", ",", "loop", "count", ",", "speed", ",", "listener", ")", ",", "transition", "time", ")", ";", "}" ]
[ "transfers", "this", "buffer", "'", "s", "data", "to", "the", "specified", "stream", "starting", "at", "the", "specified", "absolute", "{", "@", "code", "index", "}", "this", "method", "does", "not", "modify", "{", "@", "code", "reader", "index", "}", "or", "{", "@", "code", "writer", "index", "}", "of", "this", "buffer" ]
[ "public", "abstract", "byte", "buf", "get", "bytes", "(", "int", "index", ",", "output", "stream", "out", ",", "int", "length", ")", "throws", "i", "o", "exception", ";" ]
[ "initializes", "the", "reader", "the", "code", "from", "this", "method", "should", "ideally", "happen", "in", "the", "constructor", "or", "in", "the", "operator", "factory", "even", "it", "has", "to", "happen", "here", "at", "a", "slightly", "later", "stage", ",", "because", "of", "the", "lazy", "metric", "initialization", "calling", "this", "method", "explicitly", "is", "an", "optional", "way", "to", "have", "the", "reader", "initialization", "a", "bit", "earlier", "than", "in", "open", "(", ")", ",", "as", "needed", "by", "the", "{", "@", "link", "org", "apache", "flink", "streaming", "runtime", "tasks", "source", "operator", "stream", "task", "}", "this", "code", "should", "move", "to", "the", "constructor", "once", "the", "metric", "groups", "are", "available", "at", "task", "setup", "time" ]
[ "public", "void", "init", "reader", "(", ")", "throws", "exception", "{", "if", "(", "source", "reader", "!", "=", "null", ")", "{", "return", ";", "}", "final", "metric", "group", "metric", "group", "=", "get", "metric", "group", "(", ")", ";", "assert", "metric", "group", "!", "=", "null", ";", "final", "int", "subtask", "index", "=", "get", "runtime", "context", "(", ")", "get", "index", "of", "this", "subtask", "(", ")", ";", "final", "source", "reader", "context", "context", "=", "new", "source", "reader", "context", "(", ")", "{", "@", "override", "public", "metric", "group", "metric", "group", "(", ")", "{", "return", "metric", "group", ";", "}", "@", "override", "public", "configuration", "get", "configuration", "(", ")", "{", "return", "configuration", ";", "}", "@", "override", "public", "string", "get", "local", "host", "name", "(", ")", "{", "return", "local", "hostname", ";", "}", "@", "override", "public", "int", "get", "index", "of", "subtask", "(", ")", "{", "return", "subtask", "index", ";", "}", "@", "override", "public", "void", "send", "split", "request", "(", ")", "{", "operator", "event", "gateway", "send", "event", "to", "coordinator", "(", "new", "request", "split", "event", "(", "get", "local", "host", "name", "(", ")", ")", ")", ";", "}", "@", "override", "public", "void", "send", "source", "event", "to", "coordinator", "(", "source", "event", "event", ")", "{", "operator", "event", "gateway", "send", "event", "to", "coordinator", "(", "new", "source", "event", "wrapper", "(", "event", ")", ")", ";", "}", "}", ";", "source", "reader", "=", "reader", "factory", "apply", "(", "context", ")", ";", "}" ]
[ "register", "a", "listener", "that", "will", "be", "called", "when", "this", "model", "visibility", "state", "has", "changed", "the", "listener", "will", "contribute", "to", "this", "model", "'", "s", "hash", "code", "state", "per", "the", "{", "@", "link", "com", "airbnb", "epoxy", "epoxy", "attribute", "option", "#", "do", "not", "hash", "}", "rules" ]
[ "public", "test", "field", "prop", "child", "view", "model", "on", "visibility", "state", "changed", "(", "on", "model", "visibility", "state", "changed", "listener", "<", "test", "field", "prop", "child", "view", "model", ",", "test", "field", "prop", "child", "view", ">", "listener", ")", "{", "on", "mutation", "(", ")", ";", "this", "on", "model", "visibility", "state", "changed", "listener", "epoxy", "generated", "model", "=", "listener", ";", "return", "this", ";", "}" ]
[ "checks", "if", "the", "expression", "is", "a", "function", "call", "of", "given", "type" ]
[ "public", "static", "boolean", "is", "function", "of", "kind", "(", "expression", "expression", ",", "function", "kind", "kind", ")", "{", "if", "(", "expression", "instanceof", "unresolved", "call", "expression", ")", "{", "return", "(", "(", "unresolved", "call", "expression", ")", "expression", ")", "get", "function", "definition", "(", ")", "get", "kind", "(", ")", "=", "=", "kind", ";", "}", "if", "(", "expression", "instanceof", "call", "expression", ")", "{", "return", "(", "(", "call", "expression", ")", "expression", ")", "get", "function", "definition", "(", ")", "get", "kind", "(", ")", "=", "=", "kind", ";", "}", "return", "false", ";", "}" ]
[ "returns", "the", "owner", "type", "of", "a", "{", "@", "link", "parameterized", "type", "}", "or", "enclosing", "class", "of", "a", "{", "@", "link", "class", "}", ",", "or", "null", "otherwise" ]
[ "private", "@", "nullable", "type", "get", "owner", "type", "if", "present", "(", ")", "{", "if", "(", "runtime", "type", "instanceof", "parameterized", "type", ")", "{", "return", "(", "(", "parameterized", "type", ")", "runtime", "type", ")", "get", "owner", "type", "(", ")", ";", "}", "else", "if", "(", "runtime", "type", "instanceof", "class", "<", "?", ">", ")", "{", "return", "(", "(", "class", "<", "?", ">", ")", "runtime", "type", ")", "get", "enclosing", "class", "(", ")", ";", "}", "else", "{", "return", "null", ";", "}", "}" ]
[ "create", "the", "advisor", "(", "interceptor", ")", "chain", "advisors", "that", "are", "sourced", "from", "a", "bean", "factory", "will", "be", "refreshed", "each", "time", "a", "new", "prototype", "instance", "is", "added", "interceptors", "added", "programmatically", "through", "the", "factory", "api", "are", "unaffected", "by", "such", "changes" ]
[ "private", "synchronized", "void", "initialize", "advisor", "chain", "(", ")", "throws", "aop", "config", "exception", ",", "beans", "exception", "{", "if", "(", "this", "advisor", "chain", "initialized", ")", "{", "return", ";", "}", "if", "(", "!", "object", "utils", "is", "empty", "(", "this", "interceptor", "names", ")", ")", "{", "if", "(", "this", "bean", "factory", "=", "=", "null", ")", "{", "throw", "new", "illegal", "state", "exception", "(", "\"", "no", "bean", "factory", "available", "anymore", "(", "probably", "due", "to", "serialization", ")", "\"", "+", "\"", "-", "cannot", "resolve", "interceptor", "names", "\"", "+", "arrays", "as", "list", "(", "this", "interceptor", "names", ")", ")", ";", "}", "/", "/", "globals", "can", "'", "t", "be", "last", "unless", "we", "specified", "a", "target", "source", "using", "the", "property", "if", "(", "this", "interceptor", "names", "[", "this", "interceptor", "names", "length", "-", "1", "]", "ends", "with", "(", "global", "suffix", ")", "&", "&", "this", "target", "name", "=", "=", "null", "&", "&", "this", "target", "source", "=", "=", "empty", "target", "source", ")", "{", "throw", "new", "aop", "config", "exception", "(", "\"", "target", "required", "after", "globals", "\"", ")", ";", "}", "/", "/", "materialize", "interceptor", "chain", "from", "bean", "names", "for", "(", "string", "name", ":", "this", "interceptor", "names", ")", "{", "if", "(", "name", "ends", "with", "(", "global", "suffix", ")", ")", "{", "if", "(", "!", "(", "this", "bean", "factory", "instanceof", "listable", "bean", "factory", ")", ")", "{", "throw", "new", "aop", "config", "exception", "(", "\"", "can", "only", "use", "global", "advisors", "or", "interceptors", "with", "a", "listable", "bean", "factory", "\"", ")", ";", "}", "add", "global", "advisors", "(", "(", "listable", "bean", "factory", ")", "this", "bean", "factory", ",", "name", "substring", "(", "0", ",", "name", "length", "(", ")", "-", "global", "suffix", "length", "(", ")", ")", ")", ";", "}", "else", "{", "/", "/", "if", "we", "get", "here", ",", "we", "need", "to", "add", "a", "named", "interceptor", "/", "/", "we", "must", "check", "if", "it", "'", "s", "a", "singleton", "or", "prototype", "object", "advice", ";", "if", "(", "this", "singleton", "|", "|", "this", "bean", "factory", "is", "singleton", "(", "name", ")", ")", "{", "/", "/", "add", "the", "real", "advisor", "/", "advice", "to", "the", "chain", "advice", "=", "this", "bean", "factory", "get", "bean", "(", "name", ")", ";", "}", "else", "{", "/", "/", "it", "'", "s", "a", "prototype", "advice", "or", "advisor", ":", "replace", "with", "a", "prototype", "/", "/", "avoid", "unnecessary", "creation", "of", "prototype", "bean", "just", "for", "advisor", "chain", "initialization", "advice", "=", "new", "prototype", "placeholder", "advisor", "(", "name", ")", ";", "}", "add", "advisor", "on", "chain", "creation", "(", "advice", ")", ";", "}", "}", "}", "this", "advisor", "chain", "initialized", "=", "true", ";", "}" ]
[ "creates", "frame", "buffer", "and", "starts", "decoding", "thread", "does", "nothing", "if", "already", "started" ]
[ "public", "void", "start", "decoder", "thread", "(", ")", "{", "m", "gif", "info", "handle", "start", "decoder", "thread", "(", ")", ";", "}" ]
[ "key", "listener", "allows", "us", "to", "check", "field", "validity", "on", "every", "key", "typed" ]
[ "public", "void", "add", "listeners", "(", ")", "{", "get", "document", "(", ")", "add", "document", "listener", "(", "new", "document", "listener", "(", ")", "{", "@", "override", "public", "void", "remove", "update", "(", "document", "event", "e", ")", "{", "validate", "field", "(", ")", ";", "}", "@", "override", "public", "void", "insert", "update", "(", "document", "event", "e", ")", "{", "validate", "field", "(", ")", ";", "}", "@", "override", "public", "void", "changed", "update", "(", "document", "event", "e", ")", "{", "/", "/", "do", "nothing", "}", "}", ")", ";", "}" ]
[ "this", "method", "can", "be", "used", "to", "build", "a", "range", "of", "grid", "rows", "that", "is", "allowed", "to", "span", "a", "certain", "height", "in", "pixels", "<", "p", ">", "it", "returns", "a", "{", "@", "link", "row", "range", "}", "that", "contains", "information", "about", "the", "range", ",", "especially", "the", "index", "of", "the", "last", "element", "in", "the", "range", "(", "or", "if", "inverse", "=", "=", "true", ",", "then", "the", "index", "of", "the", "first", "element", ")", "<", "p", ">", "note", ":", "even", "if", "'", "force", "end", "completely", "inside", "'", "is", "set", "to", "true", ",", "the", "last", "item", "will", "not", "lie", "completely", "within", "the", "available", "height", ",", "if", "(", "height", "of", "item", "at", "start", "index", "<", "available", "height", ")" ]
[ "private", "row", "range", "get", "row", "range", "(", "int", "start", "index", ",", "int", "available", "height", ",", "boolean", "force", "end", "completely", "inside", ",", "boolean", "inverse", ")", "{", "/", "/", "parameter", "preparation", "if", "(", "start", "index", "=", "=", "-", "1", ")", "{", "if", "(", "!", "inverse", ")", "{", "/", "/", "search", "first", "visible", "item", "start", "index", "=", "0", ";", "}", "else", "{", "/", "/", "search", "last", "visible", "item", "start", "index", "=", "get", "item", "count", "(", ")", "-", "1", ";", "}", "}", "row", "range", "range", "=", "new", "row", "range", "(", ")", ";", "if", "(", "start", "index", "<", "0", "|", "|", "start", "index", ">", "=", "get", "item", "count", "(", ")", ")", "{", "/", "/", "something", "is", "broken", "range", "start", "index", "=", "0", ";", "range", "end", "index", "=", "0", ";", "range", "height", "=", "0", ";", "range", "rows", "=", "0", ";", "return", "range", ";", "}", "if", "(", "available", "height", "<", "=", "0", ")", "{", "/", "/", "special", "case", ":", "empty", "range", "range", "start", "index", "=", "start", "index", ";", "range", "end", "index", "=", "start", "index", ";", "range", "rows", "=", "0", ";", "range", "height", "=", "0", ";", "return", "range", ";", "}", "int", "available", "rows", "=", "(", "available", "height", "+", "1", ")", "/", "(", "get", "item", "height", "(", ")", "+", "1", ")", ";", "if", "(", "(", "(", "get", "item", "height", "(", ")", "+", "1", ")", "*", "range", "rows", "-", "1", ")", "+", "1", "<", "available", "height", ")", "{", "/", "/", "not", "all", "available", "space", "used", "yet", "/", "/", "-", "so", "add", "another", "row", "if", "it", "need", "not", "be", "completely", "within", "available", "height", "if", "(", "!", "force", "end", "completely", "inside", ")", "available", "rows", "+", "+", ";", "}", "int", "other", "index", "=", "start", "index", "+", "(", "(", "available", "rows", "-", "1", ")", "*", "(", "!", "inverse", "?", "1", ":", "-", "1", ")", ")", ";", "if", "(", "other", "index", "<", "0", ")", "other", "index", "=", "0", ";", "if", "(", "other", "index", ">", "=", "get", "item", "count", "(", ")", ")", "other", "index", "=", "get", "item", "count", "(", ")", "-", "1", ";", "range", "start", "index", "=", "!", "inverse", "?", "start", "index", ":", "other", "index", ";", "range", "end", "index", "=", "!", "inverse", "?", "other", "index", ":", "start", "index", ";", "range", "rows", "=", "range", "end", "index", "-", "range", "start", "index", "+", "1", ";", "range", "height", "=", "(", "get", "item", "height", "(", ")", "+", "1", ")", "*", "range", "rows", "-", "1", ";", "return", "range", ";", "}" ]
[ "instructs", "the", "{", "@", "code", "connectable", "flowable", "}", "to", "begin", "emitting", "the", "items", "from", "its", "underlying", "{", "@", "link", "flowable", "}", "to", "its", "{", "@", "link", "subscriber", "}", "s", "<", "dl", ">", "<", "dt", ">", "<", "b", ">", "scheduler", ":", "<", "b", ">", "<", "dt", ">", "<", "dd", ">", "the", "behavior", "is", "determined", "by", "the", "implementor", "of", "this", "abstract", "class", "<", "dd", ">", "<", "dl", ">" ]
[ "public", "abstract", "void", "connect", "(", "@", "non", "null", "consumer", "<", "?", "super", "disposable", ">", "connection", ")", ";" ]
[ "guaranteed", "to", "throw", "an", "exception", "and", "leave", "the", "{", "@", "code", "range", "map", "}", "unmodified" ]
[ "public", "void", "remove", "(", "range", "<", "k", ">", "range", ")", "{", "throw", "new", "unsupported", "operation", "exception", "(", ")", ";", "}" ]
[ "configure", "the", "filter", "by", "checking", "the", "configuration" ]
[ "public", "void", "set", "conf", "(", "configuration", "conf", ")", "{", "this", "frequency", "=", "conf", "get", "int", "(", "filter", "frequency", ",", "10", ")", ";", "if", "(", "this", "frequency", "<", "=", "0", ")", "{", "throw", "new", "runtime", "exception", "(", "\"", "negative", "\"", "+", "filter", "frequency", "+", "\"", ":", "\"", "+", "this", "frequency", ")", ";", "}", "this", "conf", "=", "conf", ";", "}" ]
[ "<", "code", ">", "optional", "string", "msg", "=", "1", ";", "<", "code", ">" ]
[ "public", "boolean", "has", "msg", "(", ")", "{", "return", "(", "(", "bit", "field", "0", "&", "0x", "0", "0", "0", "0", "0", "0", "0", "1", ")", "=", "=", "0x", "0", "0", "0", "0", "0", "0", "0", "1", ")", ";", "}" ]
[ "return", "the", "number", "of", "threads", "we", "should", "launch", "for", "this", "cluster", "<", "p", ">", "here", "is", "the", "heuristic", "we", "are", "using", "<", "p", ">", "1", "thread", "per", "100", "nodes", "that", "we", "want", "to", "process", "minimum", "nodes", "to", "process", "threads", "in", "the", "pool", "maximum", "100", "threads", "in", "the", "pool", "<", "p", ">", "generally", "return", "a", "rounded", "up", "multiple", "of", "10" ]
[ "private", "int", "compute", "pool", "size", "(", "int", "node", "count", ")", "{", "if", "(", "node", "count", "<", "10", ")", "{", "return", "node", "count", ";", "}", "int", "thread", "ratio", "=", "node", "count", "/", "100", ";", "int", "mod", "value", "=", "thread", "ratio", "%", "10", ";", "if", "(", "(", "(", "10", "-", "mod", "value", ")", "+", "thread", "ratio", ")", ">", "100", ")", "{", "return", "100", ";", "}", "else", "{", "return", "(", "10", "-", "mod", "value", ")", "+", "thread", "ratio", ";", "}", "}" ]
[ "create", "a", "{", "@", "code", "string", "decoder", "}", "for", "{", "@", "code", "\"", "textplain", "\"", "}" ]
[ "public", "static", "string", "decoder", "text", "plain", "only", "(", "boolean", "strip", "delimiter", ")", "{", "return", "text", "plain", "only", "(", ")", ";", "}" ]
[ "remove", "the", "given", "reference", "and", "then", "return", "the", "reference", "count", "if", "the", "referred", "inode", "is", "not", "a", "with", "count", ",", "return", "-", "1", ";" ]
[ "private", "static", "int", "remove", "reference", "(", "i", "node", "reference", "ref", ")", "{", "final", "i", "node", "referred", "=", "ref", "get", "referred", "i", "node", "(", ")", ";", "if", "(", "!", "(", "referred", "instanceof", "with", "count", ")", ")", "{", "return", "-", "1", ";", "}", "with", "count", "wc", "=", "(", "with", "count", ")", "referred", ";", "wc", "remove", "reference", "(", "ref", ")", ";", "return", "wc", "get", "reference", "count", "(", ")", ";", "}" ]
[ "setup", "includes", "assigning", "exclusive", "buffers", "to", "this", "input", "channel", ",", "and", "this", "method", "should", "be", "called", "only", "once", "after", "this", "input", "channel", "is", "created" ]
[ "void", "setup", "(", ")", "throws", "i", "o", "exception", "{", "check", "state", "(", "buffer", "manager", "unsynchronized", "get", "available", "exclusive", "buffers", "(", ")", "=", "=", "0", ",", "\"", "bug", "in", "input", "channel", "setup", "logic", ":", "exclusive", "buffers", "have", "already", "been", "set", "for", "this", "input", "channel", "\"", ")", ";", "buffer", "manager", "request", "exclusive", "buffers", "(", "initial", "credit", ")", ";", "}" ]
[ "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", "\"", ")", ";", "}" ]
[ "whether", "to", "ignore", "if", "a", "wildcard", "expression", "matches", "no", "data", "frame", "analytics" ]
[ "public", "get", "data", "frame", "analytics", "request", "set", "allow", "no", "match", "(", "boolean", "allow", "no", "match", ")", "{", "this", "allow", "no", "match", "=", "allow", "no", "match", ";", "return", "this", ";", "}" ]
[ "replace", "the", "value", "of", "a", "field", "containing", "a", "non", "null", "array", ",", "by", "a", "new", "array", "containing", "the", "elements", "of", "the", "original", "array", "plus", "the", "elements", "of", "extra", "elements" ]
[ "private", "static", "void", "expand", "field", "array", "(", "object", "instance", ",", "string", "field", "name", ",", "object", "[", "]", "extra", "elements", ")", "throws", "no", "such", "field", "exception", ",", "illegal", "argument", "exception", ",", "illegal", "access", "exception", "{", "field", "jlr", "field", "=", "find", "field", "(", "instance", ",", "field", "name", ")", ";", "object", "[", "]", "original", "=", "(", "object", "[", "]", ")", "jlr", "field", "get", "(", "instance", ")", ";", "object", "[", "]", "combined", "=", "(", "object", "[", "]", ")", "array", "new", "instance", "(", "original", "get", "class", "(", ")", "get", "component", "type", "(", ")", ",", "original", "length", "+", "extra", "elements", "length", ")", ";", "system", "arraycopy", "(", "original", ",", "0", ",", "combined", ",", "0", ",", "original", "length", ")", ";", "system", "arraycopy", "(", "extra", "elements", ",", "0", ",", "combined", ",", "original", "length", ",", "extra", "elements", "length", ")", ";", "jlr", "field", "set", "(", "instance", ",", "combined", ")", ";", "}" ]
[ "get", "prefix", "array" ]
[ "public", "list", "<", "integer", ">", "get", "prefix", "array", "(", ")", "{", "return", "prefix", "array", ";", "}" ]
[ "parse", "the", "user", "-", "specified", "options", ",", "get", "the", "generic", "options", ",", "and", "modify", "configuration", "accordingly" ]
[ "private", "boolean", "parse", "general", "options", "(", "options", "opts", ",", "string", "[", "]", "args", ")", "throws", "i", "o", "exception", "{", "opts", "=", "build", "general", "options", "(", "opts", ")", ";", "command", "line", "parser", "parser", "=", "new", "gnu", "parser", "(", ")", ";", "boolean", "parsed", "=", "false", ";", "try", "{", "command", "line", "=", "parser", "parse", "(", "opts", ",", "pre", "process", "for", "windows", "(", "args", ")", ",", "true", ")", ";", "process", "general", "options", "(", "command", "line", ")", ";", "parsed", "=", "true", ";", "}", "catch", "(", "parse", "exception", "e", ")", "{", "log", "warn", "(", "\"", "options", "parsing", "failed", ":", "\"", "+", "e", "get", "message", "(", ")", ")", ";", "help", "formatter", "formatter", "=", "new", "help", "formatter", "(", ")", ";", "formatter", "print", "help", "(", "\"", "general", "options", "are", ":", "\"", ",", "opts", ")", ";", "}", "return", "parsed", ";", "}" ]
[ "{", "@", "inherit", "doc", "}" ]
[ "public", "void", "accept", "(", "visitor", "visitor", ")", "{", "visitor", "visit", "plain", "insn", "(", "this", ")", ";", "}" ]
[ "invoked", "when", "a", "named", "value", "is", "required", ",", "but", "{", "@", "link", "#", "resolve", "name", "(", "string", ",", "method", "parameter", ",", "server", "web", "exchange", ")", "}", "returned", "{", "@", "code", "null", "}", "and", "there", "is", "no", "default", "value", "subclasses", "typically", "throw", "an", "exception", "in", "this", "case" ]
[ "protected", "void", "handle", "missing", "value", "(", "string", "name", ",", "method", "parameter", "parameter", ")", "{", "string", "type", "name", "=", "parameter", "get", "nested", "parameter", "type", "(", ")", "get", "simple", "name", "(", ")", ";", "throw", "new", "server", "web", "input", "exception", "(", "\"", "missing", "argument", "'", "\"", "+", "name", "+", "\"", "'", "for", "method", "\"", "+", "\"", "parameter", "of", "type", "\"", "+", "type", "name", ",", "parameter", ")", ";", "}" ]
[ "extract", "the", "version", "from", "a", "version", "marker", "item" ]
[ "static", "int", "extract", "version", "from", "marker", "(", "item", "marker", ")", "throws", "i", "o", "exception", "{", "if", "(", "marker", "has", "attribute", "(", "table", "version", ")", ")", "{", "return", "marker", "get", "int", "(", "table", "version", ")", ";", "}", "else", "{", "throw", "new", "i", "o", "exception", "(", "e", "not", "version", "marker", "+", "marker", ")", ";", "}", "}" ]
[ "probes", "the", "specified", "file", "for", "a", "supported", "{", "@", "link", "g", "file", "system", "}", "implementation", ",", "and", "if", "found", ",", "creates", "a", "new", "filesystem", "instance" ]
[ "public", "g", "file", "system", "probe", "(", "fsrl", "container", "f", "s", "r", "l", ",", "file", "container", "file", ",", "file", "system", "service", "fs", "service", ",", "file", "system", "probe", "conflict", "resolver", "conflict", "resolver", ",", "task", "monitor", "monitor", ")", "throws", "i", "o", "exception", ",", "cancelled", "exception", "{", "return", "probe", "(", "container", "f", "s", "r", "l", ",", "container", "file", ",", "fs", "service", ",", "conflict", "resolver", ",", "file", "system", "info", "priority", "lowest", ",", "monitor", ")", ";", "}" ]
[ "sets", "the", "real", "implementation", "to", "be", "called", "when", "the", "method", "is", "called", "on", "a", "mock", "object", "as", "usual", "you", "are", "going", "to", "read", "<", "b", ">", "the", "partial", "mock", "warning", "<", "b", ">", ":", "object", "oriented", "programming", "is", "more", "less", "tackling", "complexity", "by", "dividing", "the", "complexity", "into", "separate", ",", "specific", ",", "s", "r", "py", "objects", "how", "does", "partial", "mock", "fit", "into", "this", "paradigm", "?", "well", ",", "it", "just", "doesn", "'", "t", "partial", "mock", "usually", "means", "that", "the", "complexity", "has", "been", "moved", "to", "a", "different", "method", "on", "the", "same", "object", "in", "most", "cases", ",", "this", "is", "not", "the", "way", "you", "want", "to", "design", "your", "application", "however", ",", "there", "are", "rare", "cases", "when", "partial", "mocks", "come", "handy", ":", "dealing", "with", "code", "you", "cannot", "change", "easily", "(", "3rd", "party", "interfaces", ",", "interim", "refactoring", "of", "legacy", "code", "etc", ")", "however", ",", "i", "wouldn", "'", "t", "use", "partial", "mocks", "for", "new", ",", "test", "-", "driven", "&", "well", "-", "designed", "code", "<", "pre", "class", "=", "\"", "code", "\"", ">", "<", "code", "class", "=", "\"", "java", "\"", ">", "some", "method", "(", ")", "must", "be", "safe", "(", "e", "g", "doesn", "'", "t", "throw", ",", "doesn", "'", "t", "have", "dependencies", "to", "the", "object", "state", ",", "etc", ")", "if", "it", "isn", "'", "t", "safe", "then", "you", "will", "have", "trouble", "stubbing", "it", "using", "this", "api", "use", "mockito", "do", "call", "real", "method", "(", ")", "instead", "when", "(", "mock", "some", "method", "(", ")", ")", "then", "call", "real", "method", "(", ")", ";", "calls", "real", "method", ":", "mock", "some", "method", "(", ")", ";", "<", "code", ">", "see", "also", "javadoc", "{", "@", "link", "mockito", "#", "spy", "(", "object", ")", "}", "to", "find", "out", "more", "about", "partial", "mocks", "<", "b", ">", "mockito", "spy", "(", ")", "is", "a", "recommended", "way", "of", "creating", "partial", "mocks", "<", "b", ">", "the", "reason", "is", "it", "guarantees", "real", "methods", "are", "called", "against", "correctly", "constructed", "object", "because", "you", "'", "re", "responsible", "for", "constructing", "the", "object", "passed", "to", "spy", "(", ")", "method", "see", "examples", "in", "javadoc", "for", "{", "@", "link", "mockito", "#", "when", "}" ]
[ "ongoing", "stubbing", "<", "t", ">", "then", "call", "real", "method", "(", ")", ";" ]
[ "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", "list", "of", "delegate", "futures", "that", "correspond", "to", "the", "futures", "received", "in", "the", "order", "that", "they", "complete", "delegate", "futures", "return", "the", "same", "value", "or", "throw", "the", "same", "exception", "as", "the", "corresponding", "input", "future", "returnsthrows", "\"", "in", "the", "order", "that", "they", "complete", "\"", "means", ",", "for", "practical", "purposes", ",", "about", "what", "you", "would", "expect", ",", "but", "there", "are", "some", "subtleties", "first", ",", "we", "do", "guarantee", "that", ",", "if", "the", "output", "future", "at", "index", "n", "is", "done", ",", "the", "output", "future", "at", "index", "n", "-", "1", "is", "also", "done", "(", "but", "as", "usual", "with", "futures", ",", "some", "listeners", "for", "future", "n", "may", "complete", "before", "some", "for", "future", "n", "-", "1", ")", "however", ",", "it", "is", "possible", ",", "if", "one", "input", "completes", "with", "result", "x", "and", "another", "later", "with", "result", "y", ",", "for", "y", "to", "come", "before", "x", "in", "the", "output", "future", "list", "(", "such", "races", "are", "impossible", "to", "solve", "without", "global", "synchronization", "of", "all", "future", "completions", "and", "they", "should", "have", "little", "practical", "impact", ")", "cancelling", "a", "delegate", "future", "propagates", "to", "input", "futures", "once", "all", "the", "delegates", "complete", ",", "either", "from", "cancellation", "or", "because", "an", "input", "future", "has", "completed", "if", "n", "futures", "are", "passed", "in", ",", "and", "m", "delegates", "are", "cancelled", ",", "the", "remaining", "m", "input", "futures", "will", "be", "cancelled", "once", "n", "-", "m", "of", "the", "input", "futures", "complete", "if", "all", "the", "delegates", "are", "cancelled", ",", "all", "the", "input", "futures", "will", "be", "too" ]
[ "public", "static", "<", "t", ">", "immutable", "list", "<", "listenable", "future", "<", "t", ">", ">", "in", "completion", "order", "(", "iterable", "<", "?", "extends", "listenable", "future", "<", "?", "extends", "t", ">", ">", "futures", ")", "{", "/", "/", "can", "'", "t", "use", "iterables", "to", "array", "because", "it", "'", "s", "not", "gwt", "compatible", "final", "collection", "<", "listenable", "future", "<", "?", "extends", "t", ">", ">", "collection", ";", "if", "(", "futures", "instanceof", "collection", ")", "{", "collection", "=", "(", "collection", "<", "listenable", "future", "<", "?", "extends", "t", ">", ">", ")", "futures", ";", "}", "else", "{", "collection", "=", "immutable", "list", "copy", "of", "(", "futures", ")", ";", "}", "@", "suppress", "warnings", "(", "\"", "unchecked", "\"", ")", "listenable", "future", "<", "?", "extends", "t", ">", "[", "]", "copy", "=", "(", "listenable", "future", "<", "?", "extends", "t", ">", "[", "]", ")", "collection", "to", "array", "(", "new", "listenable", "future", "[", "collection", "size", "(", ")", "]", ")", ";", "final", "in", "completion", "order", "state", "<", "t", ">", "state", "=", "new", "in", "completion", "order", "state", "<", ">", "(", "copy", ")", ";", "immutable", "list", "builder", "<", "abstract", "future", "<", "t", ">", ">", "delegates", "builder", "=", "immutable", "list", "builder", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "copy", "length", ";", "i", "+", "+", ")", "{", "delegates", "builder", "add", "(", "new", "in", "completion", "order", "future", "<", "t", ">", "(", "state", ")", ")", ";", "}", "final", "immutable", "list", "<", "abstract", "future", "<", "t", ">", ">", "delegates", "=", "delegates", "builder", "build", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "copy", "length", ";", "i", "+", "+", ")", "{", "final", "int", "local", "i", "=", "i", ";", "copy", "[", "i", "]", "add", "listener", "(", "new", "runnable", "(", ")", "{", "@", "override", "public", "void", "run", "(", ")", "{", "state", "record", "input", "completion", "(", "delegates", ",", "local", "i", ")", ";", "}", "}", ",", "direct", "executor", "(", ")", ")", ";", "}", "@", "suppress", "warnings", "(", "\"", "unchecked", "\"", ")", "immutable", "list", "<", "listenable", "future", "<", "t", ">", ">", "delegates", "cast", "=", "(", "immutable", "list", ")", "delegates", ";", "return", "delegates", "cast", ";", "}" ]
[ "sets", "the", "<", "code", ">", "anytype", "1", "<", "code", ">", "property" ]
[ "public", "void", "set", "anytype", "1", "(", "object", "anytype", "1", ")", "{", "this", "anytype", "1", "=", "anytype", "1", ";", "}" ]
[ "return", "an", "array", "of", "resource", "locations", ",", "referring", "to", "the", "xml", "bean", "definition", "files", "that", "this", "context", "should", "be", "built", "with", "can", "also", "include", "location", "patterns", ",", "which", "will", "get", "resolved", "via", "a", "resource", "pattern", "resolver", "the", "default", "implementation", "returns", "{", "@", "code", "null", "}", "subclasses", "can", "override", "this", "to", "provide", "a", "set", "of", "resource", "locations", "to", "load", "bean", "definitions", "from" ]
[ "protected", "string", "[", "]", "get", "config", "locations", "(", ")", "{", "return", "(", "this", "config", "locations", "!", "=", "null", "?", "this", "config", "locations", ":", "get", "default", "config", "locations", "(", ")", ")", ";", "}" ]
[ "returns", "the", "description", "of", "the", "dynamically", "-", "added", "test", "case" ]
[ "public", "final", "description", "get", "test", "(", ")", "{", "return", "test", ";", "}" ]
[ "gets", "the", "number", "of", "memory", "segments", "used", "by", "this", "partition", ",", "which", "includes", "build", "side", "memory", "buffers", "and", "overflow", "memory", "segments" ]
[ "int", "get", "num", "occupied", "memory", "segments", "(", ")", "{", "/", "/", "either", "the", "number", "of", "memory", "segments", ",", "or", "one", "for", "spilling", "final", "int", "num", "partition", "buffers", "=", "this", "partition", "buffers", "!", "=", "null", "?", "this", "partition", "buffers", "length", ":", "this", "build", "side", "write", "buffer", "get", "num", "occupied", "memory", "segments", "(", ")", ";", "return", "num", "partition", "buffers", "+", "bucket", "area", "buckets", "length", "+", "bucket", "area", "num", "overflow", "segments", ";", "}" ]
[ "configuration", "mutations", "not", "logged", "(", "i", "e", "not", "persisted", ")", "as", "such", ",", "they", "are", "not", "persisted", "and", "not", "versioned", "hence", ",", "no", "version", "information", "to", "store" ]
[ "public", "void", "store", "version", "(", ")", "throws", "exception", "{", "/", "/", "does", "nothing", "}" ]
[ "create", "the", "url", "to", "be", "used", "for", "authentication", "of", "the", "user", "in", "the", "absence", "of", "a", "jwt", "token", "within", "the", "incoming", "request" ]
[ "string", "construct", "login", "u", "r", "l", "(", "http", "servlet", "request", "request", ")", "{", "string", "delimiter", "=", "\"", "?", "\"", ";", "if", "(", "authentication", "provider", "url", "contains", "(", "\"", "?", "\"", ")", ")", "{", "delimiter", "=", "\"", "&", "\"", ";", "}", "string", "login", "u", "r", "l", "=", "authentication", "provider", "url", "+", "delimiter", "+", "original", "url", "query", "param", "+", "request", "get", "request", "u", "r", "l", "(", ")", "to", "string", "(", ")", "+", "get", "original", "query", "string", "(", "request", ")", ";", "return", "login", "u", "r", "l", ";", "}" ]
[ "returns", "a", "prioritized", "list", "of", "directories", "where", "ghidra", "extensions", "are", "installed", "these", "should", "be", "at", "the", "following", "locations", ":", "<", "br", ">", "<", "code", ">", "[", "user", "settings", "dir", "]", "extensions", "<", "code", ">", "<", "code", ">", "[", "application", "install", "dir", "]", "ghidra", "extensions", "<", "code", ">", "<", "code", ">", "ghidra", "ghidra", "extensions", "<", "code", ">", "(", "development", "mode", ")" ]
[ "protected", "list", "<", "resource", "file", ">", "find", "extension", "installation", "directories", "(", ")", "{", "list", "<", "resource", "file", ">", "dirs", "=", "new", "array", "list", "<", ">", "(", ")", ";", "/", "/", "would", "like", "to", "find", "a", "better", "way", "to", "do", "this", ",", "but", "for", "the", "moment", "this", "seems", "the", "/", "/", "only", "solution", "we", "want", "to", "get", "the", "'", "extensions", "'", "directory", "in", "ghidra", ",", "but", "there", "'", "s", "/", "/", "no", "way", "to", "retrieve", "that", "directory", "directly", "we", "can", "only", "get", "the", "full", "set", "of", "/", "/", "application", "root", "dirs", "and", "search", "for", "it", ",", "hoping", "we", "don", "'", "t", "encounter", "one", "with", "the", "/", "/", "name", "'", "extensions", "'", "in", "one", "of", "the", "other", "root", "dirs", "if", "(", "system", "utilities", "is", "in", "development", "mode", "(", ")", ")", "{", "resource", "file", "root", "dir", "=", "get", "application", "root", "dirs", "(", ")", "iterator", "(", ")", "next", "(", ")", ";", "file", "temp", "=", "new", "file", "(", "root", "dir", "get", "file", "(", "false", ")", ",", "\"", "extensions", "\"", ")", ";", "if", "(", "temp", "exists", "(", ")", ")", "{", "dirs", "add", "(", "new", "resource", "file", "(", "temp", ")", ")", ";", "}", "}", "else", "{", "dirs", "add", "(", "new", "resource", "file", "(", "new", "file", "(", "user", "settings", "dir", ",", "\"", "extensions", "\"", ")", ")", ")", ";", "dirs", "add", "(", "new", "resource", "file", "(", "application", "installation", "dir", ",", "\"", "ghidra", "/", "extensions", "\"", ")", ")", ";", "}", "return", "dirs", ";", "}" ]
[ "generate", "a", "sql", "for", "dropping", "table" ]
[ "protected", "string", "generate", "drop", "table", "s", "q", "l", "(", "string", "table", "name", ")", "{", "return", "\"", "drop", "table", "if", "exists", "\"", "+", "table", "name", ";", "}" ]
[ "tests", "whether", "the", "kryo", "serializer", "is", "forwarded", "via", "the", "execution", "config" ]
[ "public", "void", "test", "register", "type", "with", "kryo", "serializer", "(", ")", "throws", "exception", "{", "int", "num", "elements", "=", "10", ";", "execution", "environment", "env", "=", "execution", "environment", "get", "execution", "environment", "(", ")", ";", "env", "register", "type", "with", "kryo", "serializer", "(", "test", "class", "class", ",", "new", "test", "class", "serializer", "(", ")", ")", ";", "data", "set", "<", "long", ">", "input", "=", "env", "generate", "sequence", "(", "0", ",", "num", "elements", "-", "1", ")", ";", "data", "set", "<", "test", "class", ">", "mapped", "=", "input", "map", "(", "new", "map", "function", "<", "long", ",", "test", "class", ">", "(", ")", "{", "private", "static", "final", "long", "serial", "version", "u", "i", "d", "=", "-", "529116076312998262l", ";", "@", "override", "public", "test", "class", "map", "(", "long", "value", ")", "throws", "exception", "{", "return", "new", "test", "class", "(", "value", ")", ";", "}", "}", ")", ";", "list", "<", "test", "class", ">", "expected", "=", "new", "array", "list", "<", ">", "(", "num", "elements", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "num", "elements", ";", "i", "+", "+", ")", "{", "expected", "add", "(", "new", "test", "class", "(", "42", ")", ")", ";", "}", "compare", "result", "collections", "(", "expected", ",", "mapped", "collect", "(", ")", ",", "new", "comparator", "<", "test", "class", ">", "(", ")", "{", "@", "override", "public", "int", "compare", "(", "test", "class", "o", "1", ",", "test", "class", "o", "2", ")", "{", "return", "(", "int", ")", "(", "o", "1", "get", "value", "(", ")", "-", "o", "2", "get", "value", "(", ")", ")", ";", "}", "}", ")", ";", "}" ]
[ "blocks", "the", "calling", "thread", "until", "this", "adjuster", "is", "initialized" ]
[ "public", "synchronized", "void", "wait", "until", "initialized", "(", ")", "throws", "interrupted", "exception", "{", "while", "(", "last", "sample", "timestamp", "us", "=", "=", "c", "time", "unset", ")", "{", "wait", "(", ")", ";", "}", "}" ]
[ "test", "a", "successful", "thread", "-", "isolated", "command", "execution" ]
[ "public", "void", "test", "thread", "observe", "success", "(", ")", "{", "test", "observe", "success", "(", "execution", "isolation", "strategy", "thread", ")", ";", "}" ]
[ "get", "the", "value", "of", "the", "specified", "index", "of", "the", "array" ]
[ "public", "static", "object", "get", "(", "object", "array", ",", "int", "index", ")", "{", "return", "get", "(", "array", ",", "index", ",", "null", ")", ";", "}" ]
[ "a", "command", "line", "implementation" ]
[ "public", "static", "void", "main", "(", "string", "[", "]", "args", ")", "throws", "exception", "{", "cli", "cli", "=", "new", "cli", "(", "new", "configuration", "(", ")", ")", ";", "system", "exit", "(", "tool", "runner", "run", "(", "cli", ",", "args", ")", ")", ";", "}" ]
[ "get", "last", "name" ]
[ "public", "string", "get", "last", "name", "(", ")", "{", "return", "last", "name", ";", "}" ]
[ "set", "up", "the", "actual", "image", "wrapper", "scale", "type", "drawable" ]
[ "void", "setup", "actual", "image", "wrapper", "(", "scale", "type", "drawable", "actual", "image", "wrapper", ",", "image", "options", "image", "options", ",", "@", "nullable", "object", "caller", "context", ")", ";" ]
[ "get", "map", "number" ]
[ "public", "map", "<", "string", ",", "big", "decimal", ">", "get", "map", "number", "(", ")", "{", "return", "map", "number", ";", "}" ]
[ "returns", "true", "if", "address", "of", "the", "given", "index", "is", "not", "the", "successor", "of", "the", "previous", "index", "'", "s", "address" ]
[ "public", "boolean", "is", "gap", "index", "(", "big", "integer", "index", ")", "{", "if", "(", "big", "integer", "zero", "equals", "(", "index", ")", ")", "{", "return", "false", ";", "}", "if", "(", "index", "compare", "to", "(", "min", "index", ")", ">", "0", "&", "&", "index", "compare", "to", "(", "max", "index", ")", "<", "0", ")", "{", "return", "false", ";", "}", "return", "is", "gap", "address", "(", "get", "address", "(", "index", ")", ")", ";", "}" ]
[ "returns", "the", "jdk", "{", "@", "link", "s", "s", "l", "context", "}", "object", "held", "by", "this", "context" ]
[ "public", "final", "s", "s", "l", "context", "context", "(", ")", "{", "return", "ssl", "context", ";", "}" ]
[ "get", "all", "productions", "where", "the", "left", "-", "hand", "side", "non", "-", "terminal", "has", "the", "given", "name" ]
[ "public", "collection", "<", "p", ">", "productions", "of", "(", "string", "name", ")", "{", "if", "(", "!", "productions", "contains", "key", "(", "name", ")", ")", "{", "return", "collections", "empty", "set", "(", ")", ";", "}", "return", "productions", "get", "(", "name", ")", ";", "}" ]
[ "return", "a", "list", "containing", "the", "elements", "represented", "by", "the", "current", "set", "the", "list", "is", "returned", "in", "ascending", "numerical", "order" ]
[ "list", "<", "integer", ">", "to", "list", "(", ")", ";" ]