docstring_tokens
list
code_tokens
list
[ "returns", "a", "generic", "iso", "time", "parser", "the", "returned", "formatter", "can", "only", "be", "used", "for", "parsing", ",", "printing", "is", "unsupported", "the", "parser", "is", "strict", "by", "default", ",", "thus", "time", "string", "{", "@", "code", "24", ":", "00", "}", "cannot", "be", "parsed", "it", "accepts", "formats", "described", "by", "the", "following", "syntax", ":", "time", "-", "element", "=", "hh", "[", "minute", "-", "element", "]", "|", "[", "fraction", "]", "minute", "-", "element", "=", "'", ":", "'", "mm", "[", "second", "-", "element", "]", "|", "[", "fraction", "]", "second", "-", "element", "=", "'", ":", "'", "ss", "[", "fraction", "]", "fraction", "=", "(", "'", "'", "|", "'", ",", "'", ")", "digit", "+" ]
[ "public", "static", "date", "time", "formatter", "time", "element", "parser", "(", ")", "{", "return", "constants", "tpe", ";", "}" ]
[ "split", "query", "parameters" ]
[ "public", "static", "map", "<", "string", ",", "string", ">", "split", "query", "parameters", "(", "uri", "raw", "uri", ")", "{", "string", "query", "=", "raw", "uri", "get", "encoded", "query", "(", ")", ";", "if", "(", "query", "=", "=", "null", ")", "{", "return", "collections", "empty", "map", "(", ")", ";", "}", "map", "<", "string", ",", "string", ">", "param", "map", "=", "new", "linked", "hash", "map", "<", ">", "(", ")", ";", "int", "start", "=", "0", ";", "do", "{", "int", "next", "=", "query", "index", "of", "(", "'", "&", "'", ",", "start", ")", ";", "int", "end", "=", "(", "next", "=", "=", "-", "1", ")", "?", "query", "length", "(", ")", ":", "next", ";", "int", "separator", "=", "query", "index", "of", "(", "'", "=", "'", ",", "start", ")", ";", "if", "(", "separator", ">", "end", "|", "|", "separator", "=", "=", "-", "1", ")", "{", "separator", "=", "end", ";", "}", "string", "name", "=", "query", "substring", "(", "start", ",", "separator", ")", ";", "if", "(", "!", "android", "text", "text", "utils", "is", "empty", "(", "name", ")", ")", "{", "string", "value", "=", "(", "separator", "=", "=", "end", "?", "\"", "\"", ":", "query", "substring", "(", "separator", "+", "1", ",", "end", ")", ")", ";", "param", "map", "put", "(", "uri", "decode", "(", "name", ")", ",", "uri", "decode", "(", "value", ")", ")", ";", "}", "/", "/", "move", "start", "to", "end", "of", "name", "start", "=", "end", "+", "1", ";", "}", "while", "(", "start", "<", "query", "length", "(", ")", ")", ";", "return", "collections", "unmodifiable", "map", "(", "param", "map", ")", ";", "}" ]
[ "converts", "the", "given", "{", "@", "code", "listenable", "future", "}", "to", "an", "equivalent", "{", "@", "code", "fluent", "future", "}", "if", "the", "given", "{", "@", "code", "listenable", "future", "}", "is", "already", "a", "{", "@", "code", "fluent", "future", "}", ",", "it", "is", "returned", "directly", "if", "not", ",", "it", "is", "wrapped", "in", "a", "{", "@", "code", "fluent", "future", "}", "that", "delegates", "all", "calls", "to", "the", "original", "{", "@", "code", "listenable", "future", "}" ]
[ "public", "static", "<", "v", ">", "fluent", "future", "<", "v", ">", "from", "(", "listenable", "future", "<", "v", ">", "future", ")", "{", "return", "future", "instanceof", "fluent", "future", "?", "(", "fluent", "future", "<", "v", ">", ")", "future", ":", "new", "forwarding", "fluent", "future", "<", "v", ">", "(", "future", ")", ";", "}" ]
[ "creates", "an", "http", "options", "builder", "with", "the", "given", "string", "base", "uri", "template" ]
[ "public", "static", "headers", "builder", "<", "?", ">", "options", "(", "string", "uri", "template", ",", "object", "uri", "variables", ")", "{", "return", "method", "(", "http", "method", "options", ",", "uri", "template", ",", "uri", "variables", ")", ";", "}" ]
[ "call", "when", "a", "player", "joins", "to", "update", "their", "information", "here" ]
[ "public", "void", "update", "player", "joined", "(", "string", "id", ",", "string", "ip", ",", "string", "name", ")", "{", "player", "info", "info", "=", "get", "create", "info", "(", "id", ")", ";", "info", "last", "name", "=", "name", ";", "info", "last", "i", "p", "=", "ip", ";", "info", "times", "joined", "+", "+", ";", "if", "(", "!", "info", "names", "contains", "(", "name", ",", "false", ")", ")", "info", "names", "add", "(", "name", ")", ";", "if", "(", "!", "info", "ips", "contains", "(", "ip", ",", "false", ")", ")", "info", "ips", "add", "(", "ip", ")", ";", "}" ]
[ "mark", "all", "instructions", "with", "unimplemented", "pcode", "over", "the", "specified", "address", "set" ]
[ "public", "static", "void", "mark", "unimplemented", "pcode", "(", "program", "program", ",", "address", "set", "view", "address", "set", ",", "task", "monitor", "monitor", ")", "throws", "cancelled", "exception", "{", "listing", "listing", "=", "program", "get", "listing", "(", ")", ";", "instruction", "iterator", "instructions", "=", "(", "address", "set", "=", "=", "null", ")", "?", "listing", "get", "instructions", "(", "true", ")", ":", "listing", "get", "instructions", "(", "address", "set", ",", "true", ")", ";", "while", "(", "instructions", "has", "next", "(", ")", ")", "{", "instruction", "instr", "=", "instructions", "next", "(", ")", ";", "pcode", "op", "[", "]", "pcode", "=", "instr", "get", "pcode", "(", ")", ";", "if", "(", "pcode", "!", "=", "null", "&", "&", "pcode", "length", "=", "=", "1", "&", "&", "pcode", "[", "0", "]", "get", "opcode", "(", ")", "=", "=", "pcode", "op", "unimplemented", ")", "{", "mark", "unimplemented", "pcode", "(", "instr", ")", ";", "}", "}", "}" ]
[ "service", "init", "creates", "the", "kdc" ]
[ "protected", "void", "service", "init", "(", "final", "configuration", "conf", ")", "throws", "exception", "{", "patch", "config", "at", "init", "(", "conf", ")", ";", "super", "service", "init", "(", "conf", ")", ";", "properties", "kdc", "conf", "=", "mini", "kdc", "create", "conf", "(", ")", ";", "work", "dir", "=", "generic", "test", "utils", "get", "test", "dir", "(", "\"", "kerberos", "\"", ")", ";", "work", "dir", "mkdirs", "(", ")", ";", "kdc", "=", "new", "mini", "kdc", "(", "kdc", "conf", ",", "work", "dir", ")", ";", "krb", "instance", "=", "localhost", "name", ";", "}" ]
[ "to", "test", "class", "name", "in", "snake", "case", "to", "test", "class", "name", "in", "snake", "case", "<", "b", ">", "200", "<", "b", ">", "-", "successful", "operation" ]
[ "public", "response", "entity", "<", "client", ">", "test", "classname", "with", "http", "info", "(", "client", "body", ")", "throws", "rest", "client", "exception", "{", "object", "post", "body", "=", "body", ";", "/", "/", "verify", "the", "required", "parameter", "'", "body", "'", "is", "set", "if", "(", "body", "=", "=", "null", ")", "{", "throw", "new", "http", "client", "error", "exception", "(", "http", "status", "bad", "request", ",", "\"", "missing", "the", "required", "parameter", "'", "body", "'", "when", "calling", "test", "classname", "\"", ")", ";", "}", "string", "path", "=", "api", "client", "expand", "path", "(", "\"", "/", "fake", "classname", "test", "\"", ",", "collections", "<", "string", ",", "object", ">", "empty", "map", "(", ")", ")", ";", "final", "multi", "value", "map", "<", "string", ",", "string", ">", "query", "params", "=", "new", "linked", "multi", "value", "map", "<", "string", ",", "string", ">", "(", ")", ";", "final", "http", "headers", "header", "params", "=", "new", "http", "headers", "(", ")", ";", "final", "multi", "value", "map", "<", "string", ",", "string", ">", "cookie", "params", "=", "new", "linked", "multi", "value", "map", "<", "string", ",", "string", ">", "(", ")", ";", "final", "multi", "value", "map", "<", "string", ",", "object", ">", "form", "params", "=", "new", "linked", "multi", "value", "map", "<", "string", ",", "object", ">", "(", ")", ";", "final", "string", "[", "]", "local", "var", "accepts", "=", "{", "\"", "application", "/", "json", "\"", "}", ";", "final", "list", "<", "media", "type", ">", "local", "var", "accept", "=", "api", "client", "select", "header", "accept", "(", "local", "var", "accepts", ")", ";", "final", "string", "[", "]", "content", "types", "=", "{", "\"", "application", "/", "json", "\"", "}", ";", "final", "media", "type", "content", "type", "=", "api", "client", "select", "header", "content", "type", "(", "content", "types", ")", ";", "string", "[", "]", "auth", "names", "=", "new", "string", "[", "]", "{", "\"", "api", "key", "query", "\"", "}", ";", "parameterized", "type", "reference", "<", "client", ">", "return", "type", "=", "new", "parameterized", "type", "reference", "<", "client", ">", "(", ")", "{", "}", ";", "return", "api", "client", "invoke", "a", "p", "i", "(", "path", ",", "http", "method", "patch", ",", "query", "params", ",", "post", "body", ",", "header", "params", ",", "cookie", "params", ",", "form", "params", ",", "local", "var", "accept", ",", "content", "type", ",", "auth", "names", ",", "return", "type", ")", ";", "}" ]
[ "removes", "the", "ok", "button", "from", "the", "dialog", "this", "is", "useful", "if", "you", "are", "using", "this", "dialog", "as", "a", "presentation", "of", "data", "and", "do", "not", "wish", "to", "do", "anything", "when", "the", "user", "makes", "selections" ]
[ "public", "void", "hide", "ok", "button", "(", ")", "{", "remove", "button", "(", "ok", "button", ")", ";", "}" ]
[ "sets", "the", "{", "@", "link", "texture", "filter", "}", "for", "this", "texture", "for", "minification", "and", "magnification", "assumes", "the", "texture", "is", "bound", "and", "active", "!" ]
[ "public", "void", "unsafe", "set", "filter", "(", "texture", "filter", "min", "filter", ",", "texture", "filter", "mag", "filter", ",", "boolean", "force", ")", "{", "if", "(", "min", "filter", "!", "=", "null", "&", "&", "(", "force", "|", "|", "this", "min", "filter", "!", "=", "min", "filter", ")", ")", "{", "gdx", "gl", "gl", "tex", "parameteri", "(", "gl", "target", ",", "gl20", "gl", "texture", "min", "filter", ",", "min", "filter", "get", "g", "l", "enum", "(", ")", ")", ";", "this", "min", "filter", "=", "min", "filter", ";", "}", "if", "(", "mag", "filter", "!", "=", "null", "&", "&", "(", "force", "|", "|", "this", "mag", "filter", "!", "=", "mag", "filter", ")", ")", "{", "gdx", "gl", "gl", "tex", "parameteri", "(", "gl", "target", ",", "gl20", "gl", "texture", "mag", "filter", ",", "mag", "filter", "get", "g", "l", "enum", "(", ")", ")", ";", "this", "mag", "filter", "=", "mag", "filter", ";", "}", "}" ]
[ "count", "and", "queue", "all", "destination", "references", "flowing", "out", "of", "this", "subroutine", "(", "block", ")", "all", "calls", "from", "this", "block", ",", "and", "all", "external", "flow", "type", "block", "references", "from", "this", "block", "are", "counted" ]
[ "private", "static", "int", "get", "destinations", "(", "code", "block", "block", ",", "list", "<", "code", "block", "reference", ">", "block", "ref", "queue", ",", "task", "monitor", "monitor", ")", "throws", "cancelled", "exception", "{", "if", "(", "block", "=", "=", "null", "|", "|", "block", "get", "min", "address", "(", ")", "=", "=", "null", ")", "{", "return", "0", ";", "}", "int", "count", "=", "0", ";", "code", "block", "model", "model", "=", "block", "get", "model", "(", ")", ";", "boolean", "include", "externals", "=", "model", "externals", "included", "(", ")", ";", "/", "/", "iterate", "over", "all", "basic", "blocks", "within", "specified", "block", "code", "block", "iterator", "bblock", "iter", "=", "(", "model", "get", "basic", "block", "model", "(", ")", ")", "get", "code", "blocks", "containing", "(", "block", ",", "monitor", ")", ";", "while", "(", "bblock", "iter", "has", "next", "(", ")", ")", "{", "/", "/", "get", "next", "basic", "block", "code", "block", "bblock", "=", "bblock", "iter", "next", "(", ")", ";", "/", "/", "get", "basic", "block", "destinations", "code", "block", "reference", "iterator", "bb", "dest", "iter", "=", "bblock", "get", "destinations", "(", "monitor", ")", ";", "while", "(", "bb", "dest", "iter", "has", "next", "(", ")", ")", "{", "code", "block", "reference", "bb", "dest", "ref", "=", "bb", "dest", "iter", "next", "(", ")", ";", "flow", "type", "ref", "flow", "type", "=", "bb", "dest", "ref", "get", "flow", "type", "(", ")", ";", "address", "dest", "addr", "=", "bb", "dest", "ref", "get", "reference", "(", ")", ";", "boolean", "add", "block", "ref", "=", "false", ";", "if", "(", "dest", "addr", "is", "external", "address", "(", ")", ")", "{", "if", "(", "include", "externals", ")", "{", "/", "/", "add", "all", "forward", "external", "references", "to", "queue", "if", "include", "externals", "add", "block", "ref", "=", "true", ";", "}", "}", "else", "if", "(", "ref", "flow", "type", "is", "call", "(", ")", ")", "{", "/", "/", "add", "all", "forward", "call", "references", "to", "queue", "add", "block", "ref", "=", "true", ";", "}", "else", "if", "(", "ref", "flow", "type", "is", "jump", "(", ")", "|", "|", "ref", "flow", "type", "is", "fallthrough", "(", ")", ")", "{", "/", "/", "add", "forward", "external", "jump", "and", "fall", "-", "through", "references", "to", "queue", "if", "(", "!", "block", "contains", "(", "dest", "addr", ")", ")", "{", "add", "block", "ref", "=", "true", ";", "}", "}", "if", "(", "add", "block", "ref", ")", "{", "queue", "dest", "references", "(", "block", "ref", "queue", ",", "block", ",", "bb", "dest", "ref", "get", "referent", "(", ")", ",", "dest", "addr", ",", "ref", "flow", "type", ")", ";", "count", "+", "+", ";", "}", "}", "}", "return", "count", ";", "}" ]
[ "test", "unevenly", "distributed", "cluster" ]
[ "public", "void", "test", "balancer", "1", "(", ")", "throws", "exception", "{", "test", "balancer", "1", "internal", "(", "new", "hdfs", "configuration", "(", ")", ")", ";", "}" ]
[ "{", "@", "code", "annotation", "config", "context", "loader", "}", "should", "be", "used", "as", "a", "{", "@", "link", "org", "springframework", "test", "context", "smart", "context", "loader", "smart", "context", "loader", "}", ",", "not", "as", "a", "legacy", "{", "@", "link", "org", "springframework", "test", "context", "context", "loader", "context", "loader", "}", "consequently", ",", "this", "method", "is", "not", "supported" ]
[ "protected", "string", "[", "]", "generate", "default", "locations", "(", "class", "<", "?", ">", "clazz", ")", "{", "throw", "new", "unsupported", "operation", "exception", "(", "\"", "annotation", "config", "context", "loader", "does", "not", "support", "the", "generate", "default", "locations", "(", "class", ")", "method", "\"", ")", ";", "}" ]
[ "sets", "the", "value", "of", "\"", "missing", "bucket", "\"" ]
[ "public", "builder", "set", "missing", "bucket", "(", "boolean", "missing", "bucket", ")", "{", "this", "missing", "bucket", "=", "missing", "bucket", ";", "return", "this", ";", "}" ]
[ "get", "all", "metric", "files", "'", "name", "in", "{", "@", "code", "base", "dir", "}", "the", "file", "name", "must", "like", "base", "file", "name", "+", "\"", "yyyy", "-", "mm", "-", "dd", "number", "\"", "and", "not", "ends", "with", "{", "@", "link", "#", "metric", "file", "index", "suffix", "}", "or", "\"", "lck", "\"" ]
[ "static", "list", "<", "string", ">", "list", "metric", "files", "(", "string", "base", "dir", ",", "string", "base", "file", "name", ")", "throws", "exception", "{", "list", "<", "string", ">", "list", "=", "new", "array", "list", "<", "string", ">", "(", ")", ";", "file", "base", "file", "=", "new", "file", "(", "base", "dir", ")", ";", "file", "[", "]", "files", "=", "base", "file", "list", "files", "(", ")", ";", "if", "(", "files", "=", "=", "null", ")", "{", "return", "list", ";", "}", "for", "(", "file", "file", ":", "files", ")", "{", "string", "file", "name", "=", "file", "get", "name", "(", ")", ";", "if", "(", "file", "is", "file", "(", ")", "&", "&", "file", "name", "matches", "(", "file", "name", ",", "base", "file", "name", ")", "&", "&", "!", "file", "name", "ends", "with", "(", "metric", "writer", "metric", "file", "index", "suffix", ")", "&", "&", "!", "file", "name", "ends", "with", "(", "\"", "lck", "\"", ")", ")", "{", "list", "add", "(", "file", "get", "absolute", "path", "(", ")", ")", ";", "}", "}", "collections", "sort", "(", "list", ",", "metric", "writer", "metric", "file", "name", "cmp", ")", ";", "return", "list", ";", "}" ]
[ "uses", "the", "given", "label", "to", "retrieve", "the", "workspace", "-", "relative", "path", "of", "the", "given", "location", "(", "including", "the", "line", "number", ")", "for", "example", ",", "the", "location", "usrlocalworkspacemycoolpackage", "b", "u", "i", "l", "d", ":", "3", ":", "1", "and", "the", "label", "mycoolpackage", ":", "build", "would", "lead", "to", "\"", "mycoolpackage", ":", "build", ":", "3", "\"" ]
[ "private", "static", "string", "maybe", "get", "relative", "location", "(", "@", "nullable", "location", "location", ",", "label", "label", ")", "{", "if", "(", "location", "=", "=", "null", ")", "{", "return", "null", ";", "}", "/", "/", "determining", "the", "workspace", "root", "only", "works", "reliably", "if", "both", "location", "and", "label", "point", "to", "files", "/", "/", "in", "the", "same", "package", "/", "/", "it", "would", "be", "preferable", "to", "construct", "the", "path", "from", "the", "label", "itself", ",", "but", "this", "doesn", "'", "t", "work", "for", "/", "/", "rules", "created", "from", "function", "calls", "in", "a", "subincluded", "file", ",", "even", "if", "both", "files", "share", "a", "path", "/", "/", "prefix", "(", "for", "example", ",", "when", "/", "/", "a", "/", "package", ":", "build", "subincludes", "/", "/", "a", "/", "package", "/", "with", "/", "a", "/", "subpackage", ":", "build", ")", "/", "/", "we", "can", "revert", "to", "that", "approach", "once", "subincludes", "aren", "'", "t", "supported", "anymore", "/", "/", "/", "/", "todo", "(", "b", "/", "151165647", ")", ":", "this", "logic", "has", "always", "been", "wrong", ":", "/", "/", "it", "spuriously", "matches", "occurrences", "of", "the", "package", "name", "earlier", "in", "the", "path", "string", "absolute", "path", "=", "location", "to", "string", "(", ")", ";", "int", "pos", "=", "absolute", "path", "index", "of", "(", "label", "get", "package", "name", "(", ")", ")", ";", "return", "(", "pos", "<", "0", ")", "?", "null", ":", "absolute", "path", "substring", "(", "pos", ")", ";", "}" ]
[ "check", "that", "a", "licensed", "plugin", "cannot", "be", "installed", "when", "the", "distribution", "type", "is", "unknown" ]
[ "public", "void", "test", "install", "plugin", "command", "on", "unknown", "distribution", "(", ")", "throws", "exception", "{", "mock", "terminal", "terminal", "=", "new", "mock", "terminal", "(", ")", ";", "plugin", "info", "plugin", "info", "=", "build", "info", "(", "true", ")", ";", "expect", "throws", "(", "user", "exception", "class", ",", "(", ")", "-", ">", "install", "plugin", "command", "check", "can", "installation", "proceed", "(", "terminal", ",", "build", "flavor", "unknown", ",", "plugin", "info", ")", ")", ";", "assert", "that", "(", "terminal", "get", "error", "output", "(", ")", ",", "contains", "string", "(", "\"", "error", ":", "this", "is", "a", "licensed", "plugin", "\"", ")", ")", ";", "}" ]
[ "inspects", "the", "target", "class", "exceptions", "will", "be", "logged", ",", "and", "a", "marker", "map", "returned", "to", "indicate", "the", "lack", "of", "debug", "information" ]
[ "private", "map", "<", "executable", ",", "string", "[", "]", ">", "inspect", "class", "(", "class", "<", "?", ">", "clazz", ")", "{", "input", "stream", "is", "=", "clazz", "get", "resource", "as", "stream", "(", "class", "utils", "get", "class", "file", "name", "(", "clazz", ")", ")", ";", "if", "(", "is", "=", "=", "null", ")", "{", "/", "/", "we", "couldn", "'", "t", "load", "the", "class", "file", ",", "which", "is", "not", "fatal", "as", "it", "/", "/", "simply", "means", "this", "method", "of", "discovering", "parameter", "names", "won", "'", "t", "work", "if", "(", "logger", "is", "debug", "enabled", "(", ")", ")", "{", "logger", "debug", "(", "\"", "cannot", "find", "'", "class", "'", "file", "for", "class", "[", "\"", "+", "clazz", "+", "\"", "]", "-", "unable", "to", "determine", "constructor", "/", "method", "parameter", "names", "\"", ")", ";", "}", "return", "no", "debug", "info", "map", ";", "}", "try", "{", "class", "reader", "class", "reader", "=", "new", "class", "reader", "(", "is", ")", ";", "map", "<", "executable", ",", "string", "[", "]", ">", "map", "=", "new", "concurrent", "hash", "map", "<", ">", "(", "32", ")", ";", "class", "reader", "accept", "(", "new", "parameter", "name", "discovering", "visitor", "(", "clazz", ",", "map", ")", ",", "0", ")", ";", "return", "map", ";", "}", "catch", "(", "i", "o", "exception", "ex", ")", "{", "if", "(", "logger", "is", "debug", "enabled", "(", ")", ")", "{", "logger", "debug", "(", "\"", "exception", "thrown", "while", "reading", "'", "class", "'", "file", "for", "class", "[", "\"", "+", "clazz", "+", "\"", "]", "-", "unable", "to", "determine", "constructor", "/", "method", "parameter", "names", "\"", ",", "ex", ")", ";", "}", "}", "catch", "(", "illegal", "argument", "exception", "ex", ")", "{", "if", "(", "logger", "is", "debug", "enabled", "(", ")", ")", "{", "logger", "debug", "(", "\"", "asm", "class", "reader", "failed", "to", "parse", "class", "file", "[", "\"", "+", "clazz", "+", "\"", "]", ",", "probably", "due", "to", "a", "new", "java", "class", "file", "version", "that", "isn", "'", "t", "supported", "yet", "\"", "+", "\"", "-", "unable", "to", "determine", "constructor", "/", "method", "parameter", "names", "\"", ",", "ex", ")", ";", "}", "}", "finally", "{", "try", "{", "is", "close", "(", ")", ";", "}", "catch", "(", "i", "o", "exception", "ex", ")", "{", "/", "/", "ignore", "}", "}", "return", "no", "debug", "info", "map", ";", "}" ]
[ "check", "for", "invalid", "characters", "(", "space", ",", "colon", ",", "asterisk", ",", "plus", ",", "bracket", ")", "in", "labels" ]
[ "public", "static", "boolean", "contains", "invalid", "chars", "(", "string", "str", ")", "{", "int", "len", "=", "str", "length", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "len", ";", "i", "+", "+", ")", "{", "char", "c", "=", "str", "char", "at", "(", "i", ")", ";", "if", "(", "is", "invalid", "char", "(", "c", ")", ")", "{", "return", "true", ";", "}", "}", "return", "false", ";", "}" ]
[ "return", "whether", "execution", "of", "a", "callable", "statement", "will", "return", "the", "results", "in", "a", "map", "that", "uses", "case", "insensitive", "names", "for", "the", "parameters" ]
[ "public", "boolean", "is", "results", "map", "case", "insensitive", "(", ")", "{", "return", "this", "results", "map", "case", "insensitive", ";", "}" ]
[ "returns", "a", "description", "of", "the", "fields", "generated", "by", "this", "factory" ]
[ "public", "string", "get", "field", "text", "(", ")", "{", "return", "name", ";", "}" ]
[ "there", "is", "a", "weird", "bug", "in", "geometry", "comparison", "if", "a", "geometry", "envelope", "is", "not", "loaded", "it", "may", "return", "false", "for", "two", "empty", "line", "strings", "or", "multiline", "strings" ]
[ "private", "static", "void", "ensure", "envelope", "loaded", "(", "o", "g", "c", "geometry", "geometry", ")", "{", "geometry", "envelope", "(", ")", ";", "}" ]
[ "initialize", "using", "the", "database", "meta", "-", "data", "provided" ]
[ "void", "initialize", "with", "meta", "data", "(", "database", "meta", "data", "database", "meta", "data", ")", "throws", "s", "q", "l", "exception", ";" ]
[ "test", "a", "path", "to", "see", "if", "it", "is", "subject", "to", "mandatory", "read", "permission", "checks", "by", "container", "-", "managed", "security" ]
[ "public", "boolean", "is", "subject", "to", "mandatory", "read", "permission", "check", "(", "string", "rest", "of", "path", ")", "{", "for", "(", "string", "name", ":", "always", "readable", "paths", ")", "{", "if", "(", "rest", "of", "path", "starts", "with", "(", "\"", "/", "\"", "+", "name", "+", "\"", "/", "\"", ")", "|", "|", "rest", "of", "path", "equals", "(", "\"", "/", "\"", "+", "name", ")", ")", "{", "return", "false", ";", "}", "}", "for", "(", "string", "name", ":", "get", "unprotected", "root", "actions", "(", ")", ")", "{", "if", "(", "rest", "of", "path", "starts", "with", "(", "\"", "/", "\"", "+", "name", "+", "\"", "/", "\"", ")", "|", "|", "rest", "of", "path", "equals", "(", "\"", "/", "\"", "+", "name", ")", ")", "{", "return", "false", ";", "}", "}", "/", "/", "todo", "slave", "computer", "do", "slave", "agent", "jnlp", ";", "there", "should", "be", "an", "annotation", "to", "request", "unprotected", "access", "if", "(", "(", "is", "agent", "jnlp", "path", "(", "rest", "of", "path", ",", "\"", "jenkins", "\"", ")", "|", "|", "(", "is", "agent", "jnlp", "path", "(", "rest", "of", "path", ",", "\"", "slave", "\"", ")", ")", ")", "&", "&", "\"", "true", "\"", "equals", "(", "stapler", "get", "current", "request", "(", ")", "get", "parameter", "(", "\"", "encrypt", "\"", ")", ")", ")", "{", "return", "false", ";", "}", "return", "true", ";", "}" ]
[ "clears", "any", "user", "selection", "in", "the", "panel" ]
[ "void", "clear", "selection", "(", ")", "{", "user", "list", "get", "selection", "model", "(", ")", "clear", "selection", "(", ")", ";", "}" ]
[ "accepts", "the", "new", "description" ]
[ "public", "synchronized", "void", "do", "submit", "description", "(", "stapler", "request", "req", ",", "stapler", "response", "rsp", ")", "throws", "i", "o", "exception", ",", "servlet", "exception", "{", "check", "permission", "(", "configure", ")", ";", "description", "=", "req", "get", "parameter", "(", "\"", "description", "\"", ")", ";", "save", "(", ")", ";", "rsp", "send", "redirect", "(", "\"", "\"", ")", ";", "/", "/", "go", "to", "the", "top", "page", "}" ]
[ "return", "true", "if", "this", "additional", "properties", "class", "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", ";", "}", "additional", "properties", "class", "additional", "properties", "class", "=", "(", "additional", "properties", "class", ")", "o", ";", "return", "objects", "equals", "(", "this", "map", "property", ",", "additional", "properties", "class", "map", "property", ")", "&", "&", "objects", "equals", "(", "this", "map", "of", "map", "property", ",", "additional", "properties", "class", "map", "of", "map", "property", ")", "&", "&", "objects", "equals", "(", "this", "anytype", "1", ",", "additional", "properties", "class", "anytype", "1", ")", "&", "&", "objects", "equals", "(", "this", "map", "with", "undeclared", "properties", "anytype", "1", ",", "additional", "properties", "class", "map", "with", "undeclared", "properties", "anytype", "1", ")", "&", "&", "objects", "equals", "(", "this", "map", "with", "undeclared", "properties", "anytype", "2", ",", "additional", "properties", "class", "map", "with", "undeclared", "properties", "anytype", "2", ")", "&", "&", "objects", "equals", "(", "this", "map", "with", "undeclared", "properties", "anytype", "3", ",", "additional", "properties", "class", "map", "with", "undeclared", "properties", "anytype", "3", ")", "&", "&", "objects", "equals", "(", "this", "empty", "map", ",", "additional", "properties", "class", "empty", "map", ")", "&", "&", "objects", "equals", "(", "this", "map", "with", "undeclared", "properties", "string", ",", "additional", "properties", "class", "map", "with", "undeclared", "properties", "string", ")", ";", "}" ]
[ "get", "the", "declared", "bit", "size", "of", "this", "bit", "-", "field", "which", "may", "be", "larger", "than", "the", "effective", "size", "which", "could", "be", "truncated" ]
[ "public", "int", "get", "declared", "bit", "size", "(", ")", "{", "return", "bit", "size", ";", "}" ]
[ "set", "rules", "of", "the", "machine", "rules", "=", "=", "null", "will", "return", "immediately", ";", "rules", "is", "empty", "(", ")", "means", "setting", "the", "rules", "to", "empty" ]
[ "public", "boolean", "set", "flow", "rule", "of", "machine", "(", "string", "app", ",", "string", "ip", ",", "int", "port", ",", "list", "<", "flow", "rule", "entity", ">", "rules", ")", "{", "return", "set", "rules", "(", "app", ",", "ip", ",", "port", ",", "flow", "rule", "type", ",", "rules", ")", ";", "}" ]
[ "returns", "drm", "init", "data", "from", "leaf", "atoms" ]
[ "private", "static", "drm", "init", "data", "get", "drm", "init", "data", "from", "atoms", "(", "list", "<", "atom", "leaf", "atom", ">", "leaf", "children", ")", "{", "@", "nullable", "array", "list", "<", "scheme", "data", ">", "scheme", "datas", "=", "null", ";", "int", "leaf", "children", "size", "=", "leaf", "children", "size", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "leaf", "children", "size", ";", "i", "+", "+", ")", "{", "leaf", "atom", "child", "=", "leaf", "children", "get", "(", "i", ")", ";", "if", "(", "child", "type", "=", "=", "atom", "type", "pssh", ")", "{", "if", "(", "scheme", "datas", "=", "=", "null", ")", "{", "scheme", "datas", "=", "new", "array", "list", "<", ">", "(", ")", ";", "}", "byte", "[", "]", "pssh", "data", "=", "child", "data", "get", "data", "(", ")", ";", "@", "nullable", "uuid", "uuid", "=", "pssh", "atom", "util", "parse", "uuid", "(", "pssh", "data", ")", ";", "if", "(", "uuid", "=", "=", "null", ")", "{", "log", "w", "(", "tag", ",", "\"", "skipped", "pssh", "atom", "(", "failed", "to", "extract", "uuid", ")", "\"", ")", ";", "}", "else", "{", "scheme", "datas", "add", "(", "new", "scheme", "data", "(", "uuid", ",", "mime", "types", "video", "mp4", ",", "pssh", "data", ")", ")", ";", "}", "}", "}", "return", "scheme", "datas", "=", "=", "null", "?", "null", ":", "new", "drm", "init", "data", "(", "scheme", "datas", ")", ";", "}" ]
[ "returns", "the", "{", "@", "link", "level", "}", "to", "log", "an", "uncaught", "exception", "from", "a", "{", "@", "link", "descriptor", "visibility", "filter", "}", "we", "need", "to", "suppress", "repeated", "exceptions", "as", "there", "can", "be", "many", "invocations", "of", "the", "{", "@", "link", "descriptor", "visibility", "filter", "}", "triggered", "by", "the", "ui", "and", "spamming", "the", "logs", "would", "be", "bad" ]
[ "private", "static", "level", "log", "level", "for", "(", "descriptor", "visibility", "filter", "f", ")", "{", "long", "interval", "=", "system", "properties", "get", "long", "(", "descriptor", "visibility", "filter", "class", "get", "name", "(", ")", "+", "\"", "bad", "filter", "log", "warning", "interval", "minutes", "\"", ",", "60l", ")", ";", "/", "/", "the", "healthy", "path", "will", "never", "see", "this", "synchronized", "block", "synchronized", "(", "resource", "holder", "bad", "filters", ")", "{", "long", "last", "time", "=", "resource", "holder", "bad", "filters", "get", "(", "f", ")", ";", "if", "(", "last", "time", "=", "=", "null", "|", "|", "last", "time", "+", "time", "unit", "minutes", "to", "millis", "(", "interval", ")", "<", "system", "current", "time", "millis", "(", ")", ")", "{", "resource", "holder", "bad", "filters", "put", "(", "f", ",", "system", "current", "time", "millis", "(", ")", ")", ";", "return", "level", "warning", ";", "}", "else", "{", "return", "level", "fine", ";", "}", "}", "}" ]
[ "filters", "out", "elements", "that", "don", "'", "t", "pass", "the", "filter", "predicate", "similar", "to", "a", "sql", "where", "clause", "example", ":", "{", "@", "code", "tab", "filter", "(", "\"", "name", "=", "'", "fred", "'", "\"", ")", "}" ]
[ "table", "filter", "(", "string", "predicate", ")", ";" ]
[ "get", "the", "number", "of", "failed", "reducers", "for", "the", "job" ]
[ "public", "int", "get", "failed", "reduces", "(", ")", "{", "return", "failed", "reduces", ";", "}" ]
[ "run", "a", "full", "key", "life", "cycle", "test", "using", "the", "provided", "configuration", "and", "users" ]
[ "private", "void", "do", "full", "acl", "test", "(", "final", "configuration", "conf", ",", "final", "user", "group", "information", "hdfs", "ugi", ",", "final", "user", "group", "information", "keyadmin", "ugi", ",", "final", "user", "group", "information", "user", "ugi", ")", "throws", "exception", "{", "try", "{", "setup", "(", "conf", ")", ";", "/", "/", "create", "a", "test", "key", "assert", "true", "(", "\"", "exception", "during", "creation", "of", "key", "\"", "+", "key1", "+", "\"", "by", "\"", "+", "keyadmin", "ugi", "get", "user", "name", "(", ")", ",", "create", "key", "(", "keyadmin", "ugi", ",", "key1", ",", "conf", ")", ")", ";", "/", "/", "fail", "to", "create", "a", "test", "key", "assert", "false", "(", "\"", "allowed", "creation", "of", "key", "\"", "+", "key2", "+", "\"", "by", "\"", "+", "hdfs", "ugi", "get", "user", "name", "(", ")", ",", "create", "key", "(", "hdfs", "ugi", ",", "key2", ",", "conf", ")", ")", ";", "assert", "false", "(", "\"", "allowed", "creation", "of", "key", "\"", "+", "key2", "+", "\"", "by", "\"", "+", "user", "ugi", "get", "user", "name", "(", ")", ",", "create", "key", "(", "user", "ugi", ",", "key2", ",", "conf", ")", ")", ";", "/", "/", "create", "a", "directory", "and", "chown", "it", "to", "the", "normal", "user", "fs", "mkdirs", "(", "zone1", ")", ";", "fs", "set", "owner", "(", "zone1", ",", "user", "ugi", "get", "user", "name", "(", ")", ",", "user", "ugi", "get", "primary", "group", "name", "(", ")", ")", ";", "/", "/", "create", "an", "ez", "assert", "true", "(", "\"", "exception", "during", "creation", "of", "ez", "\"", "+", "zone1", "+", "\"", "by", "\"", "+", "hdfs", "ugi", "get", "user", "name", "(", ")", "+", "\"", "using", "key", "\"", "+", "key1", ",", "create", "encryption", "zone", "(", "hdfs", "ugi", ",", "key1", ",", "zone1", ")", ")", ";", "/", "/", "fail", "to", "create", "an", "ez", "assert", "false", "(", "\"", "allowed", "creation", "of", "ez", "\"", "+", "zone2", "+", "\"", "by", "\"", "+", "keyadmin", "ugi", "get", "user", "name", "(", ")", "+", "\"", "using", "key", "\"", "+", "key1", ",", "create", "encryption", "zone", "(", "keyadmin", "ugi", ",", "key1", ",", "zone2", ")", ")", ";", "assert", "false", "(", "\"", "allowed", "creation", "of", "ez", "\"", "+", "zone2", "+", "\"", "by", "\"", "+", "user", "ugi", "get", "user", "name", "(", ")", "+", "\"", "using", "key", "\"", "+", "key1", ",", "create", "encryption", "zone", "(", "user", "ugi", ",", "key1", ",", "zone2", ")", ")", ";", "/", "/", "create", "a", "file", "in", "the", "zone", "assert", "true", "(", "\"", "exception", "during", "creation", "of", "file", "\"", "+", "file1", "+", "\"", "by", "\"", "+", "user", "ugi", "get", "user", "name", "(", ")", ",", "create", "file", "(", "user", "ugi", ",", "file1", ",", "text", ")", ")", ";", "/", "/", "fail", "to", "create", "a", "file", "in", "the", "zone", "assert", "false", "(", "\"", "allowed", "creation", "of", "file", "\"", "+", "file1a", "+", "\"", "by", "\"", "+", "hdfs", "ugi", "get", "user", "name", "(", ")", ",", "create", "file", "(", "hdfs", "ugi", ",", "file1a", ",", "text", ")", ")", ";", "assert", "false", "(", "\"", "allowed", "creation", "of", "file", "\"", "+", "file1a", "+", "\"", "by", "\"", "+", "keyadmin", "ugi", "get", "user", "name", "(", ")", ",", "create", "file", "(", "keyadmin", "ugi", ",", "file1a", ",", "text", ")", ")", ";", "/", "/", "read", "a", "file", "in", "the", "zone", "assert", "true", "(", "\"", "exception", "while", "reading", "file", "\"", "+", "file1", "+", "\"", "by", "\"", "+", "user", "ugi", "get", "user", "name", "(", ")", ",", "compare", "file", "(", "user", "ugi", ",", "file1", ",", "text", ")", ")", ";", "/", "/", "fail", "to", "read", "a", "file", "in", "the", "zone", "assert", "false", "(", "\"", "allowed", "reading", "of", "file", "\"", "+", "file1", "+", "\"", "by", "\"", "+", "hdfs", "ugi", "get", "user", "name", "(", ")", ",", "compare", "file", "(", "hdfs", "ugi", ",", "file1", ",", "text", ")", ")", ";", "assert", "false", "(", "\"", "allowed", "reading", "of", "file", "\"", "+", "file1", "+", "\"", "by", "\"", "+", "keyadmin", "ugi", "get", "user", "name", "(", ")", ",", "compare", "file", "(", "keyadmin", "ugi", ",", "file1", ",", "text", ")", ")", ";", "/", "/", "remove", "the", "zone", "fs", "delete", "(", "zone1", ",", "true", ")", ";", "/", "/", "fail", "to", "remove", "the", "key", "assert", "false", "(", "\"", "allowed", "deletion", "of", "file", "\"", "+", "file1", "+", "\"", "by", "\"", "+", "hdfs", "ugi", "get", "user", "name", "(", ")", ",", "delete", "key", "(", "hdfs", "ugi", ",", "key1", ")", ")", ";", "assert", "false", "(", "\"", "allowed", "deletion", "of", "file", "\"", "+", "file1", "+", "\"", "by", "\"", "+", "user", "ugi", "get", "user", "name", "(", ")", ",", "delete", "key", "(", "user", "ugi", ",", "key1", ")", ")", ";", "/", "/", "remove", "assert", "true", "(", "\"", "exception", "during", "deletion", "of", "file", "\"", "+", "file1", "+", "\"", "by", "\"", "+", "keyadmin", "ugi", "get", "user", "name", "(", ")", ",", "delete", "key", "(", "keyadmin", "ugi", ",", "key1", ")", ")", ";", "}", "finally", "{", "fs", "delete", "(", "zone1", ",", "true", ")", ";", "fs", "delete", "(", "zone2", ",", "true", ")", ";", "teardown", "(", ")", ";", "}", "}" ]
[ "return", "whether", "the", "given", "context", "is", "valid", "for", "actions", "on", "popup", "menus" ]
[ "public", "boolean", "is", "valid", "context", "(", "action", "context", "context", ")", ";" ]
[ "get", "float", "item" ]
[ "public", "float", "get", "float", "item", "(", ")", "{", "return", "float", "item", ";", "}" ]
[ "a", "simple", "test", "that", "updates", "a", "sub", "-", "directory", "of", "a", "snapshottable", "directory", "with", "snapshots" ]
[ "public", "void", "test", "update", "directory", "(", ")", "throws", "exception", "{", "path", "dir", "=", "new", "path", "(", "\"", "/", "dir", "\"", ")", ";", "path", "sub", "=", "new", "path", "(", "dir", ",", "\"", "sub", "\"", ")", ";", "path", "sub", "file", "=", "new", "path", "(", "sub", ",", "\"", "file", "\"", ")", ";", "d", "f", "s", "test", "util", "create", "file", "(", "hdfs", ",", "sub", "file", ",", "blocksize", ",", "replication", ",", "seed", ")", ";", "file", "status", "old", "status", "=", "hdfs", "get", "file", "status", "(", "sub", ")", ";", "hdfs", "allow", "snapshot", "(", "dir", ")", ";", "hdfs", "create", "snapshot", "(", "dir", ",", "\"", "s", "1", "\"", ")", ";", "hdfs", "set", "times", "(", "sub", ",", "100l", ",", "100l", ")", ";", "path", "snapshot", "path", "=", "snapshot", "test", "helper", "get", "snapshot", "path", "(", "dir", ",", "\"", "s", "1", "\"", ",", "\"", "sub", "\"", ")", ";", "file", "status", "snapshot", "status", "=", "hdfs", "get", "file", "status", "(", "snapshot", "path", ")", ";", "assert", "equals", "(", "old", "status", "get", "modification", "time", "(", ")", ",", "snapshot", "status", "get", "modification", "time", "(", ")", ")", ";", "assert", "equals", "(", "old", "status", "get", "access", "time", "(", ")", ",", "snapshot", "status", "get", "access", "time", "(", ")", ")", ";", "}" ]
[ "get", "enum", "integer" ]
[ "public", "enum", "integer", "enum", "get", "enum", "integer", "(", ")", "{", "return", "enum", "integer", ";", "}" ]
[ "the", "set", "of", "enumsflags", "defined", "in", "this", "attribute", "only", "makes", "sense", "if", "the", "format", "includes", "either", "format", "flags", ":", ":", "enum", "or", "format", "flags", ":", ":", "flags", "having", "both", "is", "an", "error", "<", "code", ">", "repeated", "aapt", "pb", "attribute", "symbol", "symbol", "=", "4", ";", "<", "code", ">" ]
[ "public", "java", "util", "list", "<", "com", "android", "aapt", "resources", "attribute", "symbol", ">", "get", "symbol", "list", "(", ")", "{", "return", "symbol", ";", "}" ]
[ "set", "the", "{", "@", "link", "object", "mapper", "}", "instance", "to", "use", "if", "not", "set", ",", "the", "{", "@", "link", "object", "mapper", "}", "will", "be", "created", "using", "its", "default", "constructor" ]
[ "public", "void", "set", "object", "mapper", "(", "object", "mapper", "object", "mapper", ")", "{", "this", "object", "mapper", "=", "object", "mapper", ";", "}" ]
[ "set", "up", "for", "test" ]
[ "public", "void", "start", "up", "(", ")", "throws", "i", "o", "exception", "{", "mockito", "annotations", "init", "mocks", "(", "this", ")", ";", "builder", "=", "new", "server", "impl", "builder", "(", "new", "client", "transport", "servers", "builder", "(", ")", "{", "@", "override", "public", "internal", "server", "build", "client", "transport", "servers", "(", "list", "<", "?", "extends", "server", "stream", "tracer", "factory", ">", "stream", "tracer", "factories", ")", "{", "throw", "new", "unsupported", "operation", "exception", "(", ")", ";", "}", "}", ")", ";", "builder", "channelz", "=", "channelz", ";", "builder", "ticker", "=", "timer", "get", "deadline", "ticker", "(", ")", ";", "stream", "tracer", "factories", "=", "arrays", "as", "list", "(", "stream", "tracer", "factory", ")", ";", "when", "(", "executor", "pool", "get", "object", "(", ")", ")", "then", "return", "(", "executor", "get", "scheduled", "executor", "service", "(", ")", ")", ";", "when", "(", "stream", "tracer", "factory", "new", "server", "stream", "tracer", "(", "any", "string", "(", ")", ",", "any", "(", "metadata", "class", ")", ")", ")", "then", "return", "(", "stream", "tracer", ")", ";", "when", "(", "stream", "get", "authority", "(", ")", ")", "then", "return", "(", "authority", ")", ";", "}" ]
[ "returns", "watched", "{", "@", "link", "requirements", "}" ]
[ "public", "requirements", "get", "requirements", "(", ")", "{", "return", "requirements", ";", "}" ]
[ "performs", "auto", "merge", "of", "bytes", "and", "code", "units", "followed", "by", "merge", "of", "byte", "and", "code", "unit", "conflicts" ]
[ "private", "void", "merge", "code", "units", "(", "task", "monitor", "monitor", ")", "throws", "program", "conflict", "exception", ",", "memory", "access", "exception", ",", "cancelled", "exception", "{", "display", "initial", "phase", "message", "(", "code", "units", "phase", ",", "\"", "merge", "of", "byte", "&", "code", "unit", "changes", "\"", ")", ";", "abstract", "listing", "merger", "[", "]", "mergers", "=", "new", "abstract", "listing", "merger", "[", "]", "{", "cu", "merge", "}", ";", "auto", "merge", "(", "mergers", ",", "monitor", ")", ";", "current", "merger", "=", "cu", "merge", ";", "merge", "manager", "show", "progress", "icon", "(", "false", ")", ";", "cu", "merge", "merge", "conflicts", "(", "this", "merge", "panel", ",", "conflict", "option", ",", "monitor", ")", ";", "merge", "manager", "show", "progress", "icon", "(", "true", ")", ";", "remove", "bottom", "component", "(", ")", ";", "merge", "manager", "set", "completed", "(", "code", "units", "phase", ")", ";", "}" ]
[ "returns", "a", "type", "name", "equivalent", "to", "{", "@", "code", "type", "}" ]
[ "public", "static", "type", "name", "get", "(", "type", "type", ")", "{", "return", "get", "(", "type", ",", "new", "linked", "hash", "map", "<", ">", "(", ")", ")", ";", "}" ]
[ "create", "a", "populated", "namespace", "for", "later", "testing", "save", "its", "contents", "to", "a", "data", "structure", "and", "store", "its", "fsimage", "location", "we", "only", "want", "to", "generate", "the", "fsimage", "file", "once", "and", "use", "it", "for", "multiple", "tests" ]
[ "public", "static", "void", "create", "original", "f", "s", "image", "(", ")", "throws", "i", "o", "exception", "{", "mini", "d", "f", "s", "cluster", "cluster", "=", "null", ";", "configuration", "conf", "=", "new", "configuration", "(", ")", ";", "try", "{", "cluster", "=", "new", "mini", "d", "f", "s", "cluster", "builder", "(", "conf", ")", "build", "(", ")", ";", "cluster", "wait", "active", "(", ")", ";", "distributed", "file", "system", "hdfs", "=", "cluster", "get", "file", "system", "(", ")", ";", "/", "/", "create", "a", "name", "space", "with", "x", "attributes", "path", "dir", "=", "new", "path", "(", "\"", "/", "dir", "1", "\"", ")", ";", "hdfs", "mkdirs", "(", "dir", ")", ";", "hdfs", "set", "x", "attr", "(", "dir", ",", "\"", "user", "attr", "1", "\"", ",", "\"", "value", "1", "\"", "get", "bytes", "(", ")", ")", ";", "hdfs", "set", "x", "attr", "(", "dir", ",", "\"", "user", "attr", "2", "\"", ",", "\"", "value", "2", "\"", "get", "bytes", "(", ")", ")", ";", "/", "/", "write", "results", "to", "the", "fsimage", "file", "hdfs", "set", "safe", "mode", "(", "hdfs", "constants", "safe", "mode", "action", "safemode", "enter", ",", "false", ")", ";", "hdfs", "save", "namespace", "(", ")", ";", "list", "<", "x", "attr", ">", "attributes", "=", "new", "array", "list", "<", "x", "attr", ">", "(", ")", ";", "attributes", "add", "(", "x", "attr", "helper", "build", "x", "attr", "(", "\"", "user", "attr", "1", "\"", ",", "\"", "value", "1", "\"", "get", "bytes", "(", ")", ")", ")", ";", "attr", "1", "j", "son", "=", "json", "util", "to", "json", "string", "(", "attributes", ",", "null", ")", ";", "attributes", "add", "(", "x", "attr", "helper", "build", "x", "attr", "(", "\"", "user", "attr", "2", "\"", ",", "\"", "value", "2", "\"", "get", "bytes", "(", ")", ")", ")", ";", "/", "/", "determine", "the", "location", "of", "the", "fsimage", "file", "original", "fsimage", "=", "f", "s", "image", "test", "util", "find", "latest", "image", "file", "(", "f", "s", "image", "test", "util", "get", "f", "s", "image", "(", "cluster", "get", "name", "node", "(", ")", ")", "get", "storage", "(", ")", "get", "storage", "dir", "(", "0", ")", ")", ";", "if", "(", "original", "fsimage", "=", "=", "null", ")", "{", "throw", "new", "runtime", "exception", "(", "\"", "didn", "'", "t", "generate", "or", "can", "'", "t", "find", "fsimage", "\"", ")", ";", "}", "log", "debug", "(", "\"", "original", "fs", "image", "file", "is", "\"", "+", "original", "fsimage", ")", ";", "}", "finally", "{", "if", "(", "cluster", "!", "=", "null", ")", "cluster", "shutdown", "(", ")", ";", "}", "}" ]
[ "removes", "this", "block", "from", "the", "world", ",", "or", "replaces", "it", "with", "something", "else" ]
[ "public", "void", "remove", "self", "(", "tile", "tile", ")", "{", "tile", "remove", "(", ")", ";", "}" ]
[ "return", "generated", "{", "@", "link", "allocate", "response", "}", "object" ]
[ "public", "allocate", "response", "build", "(", ")", "{", "return", "allocate", "response", ";", "}" ]
[ "patch", "the", "yarn", "settings", "note", "how", "the", "yarn", "principal", "has", "to", "include", "the", "realm" ]
[ "protected", "void", "patch", "config", "with", "y", "a", "r", "n", "bindings", "(", "final", "configuration", "conf", ")", "{", "preconditions", "check", "state", "(", "is", "in", "state", "(", "state", "started", ")", ")", ";", "enable", "kerberos", "(", "conf", ")", ";", "patch", "config", "at", "init", "(", "conf", ")", ";", "string", "path", "=", "get", "keytab", "path", "(", ")", ";", "string", "localhost", "=", "localhost", "name", ";", "string", "yarn", "principal", "=", "with", "realm", "(", "get", "login", "principal", "(", ")", ")", ";", "conf", "set", "(", "rm", "principal", ",", "yarn", "principal", ")", ";", "conf", "set", "(", "rm", "keytab", ",", "path", ")", ";", "conf", "set", "(", "rm", "hostname", ",", "localhost", ")", ";", "conf", "set", "(", "rm", "bind", "host", ",", "localhost", ")", ";", "conf", "set", "(", "rm", "address", ",", "localhost", "+", "\"", ":", "\"", "+", "default", "rm", "port", ")", ";", "conf", "set", "(", "nm", "principal", ",", "yarn", "principal", ")", ";", "conf", "set", "(", "nm", "keytab", ",", "path", ")", ";", "conf", "set", "(", "nm", "address", ",", "localhost", "+", "\"", ":", "\"", "+", "default", "nm", "port", ")", ";", "conf", "set", "boolean", "(", "timeline", "service", "enabled", ",", "false", ")", ";", "conf", "set", "boolean", "(", "m", "r", "job", "config", "mapreduce", "job", "emit", "timeline", "data", ",", "false", ")", ";", "conf", "set", "(", "j", "h", "admin", "config", "mr", "history", "keytab", ",", "path", ")", ";", "conf", "set", "(", "j", "h", "admin", "config", "mr", "history", "principal", ",", "yarn", "principal", ")", ";", "conf", "set", "(", "j", "h", "admin", "config", "mr", "history", "address", ",", "localhost", "+", "\"", ":", "\"", "+", "default", "mr", "history", "port", ")", ";", "conf", "set", "boolean", "(", "j", "h", "admin", "config", "mr", "history", "cleaner", "enable", ",", "false", ")", ";", "conf", "set", "int", "(", "rm", "am", "max", "attempts", ",", "1", ")", ";", "conf", "set", "int", "(", "yarn", "configuration", "resourcemanager", "connect", "max", "wait", "ms", ",", "100", ")", ";", "conf", "set", "int", "(", "yarn", "configuration", "resourcemanager", "connect", "retry", "interval", "ms", ",", "10", "000", ")", ";", "}" ]
[ "ensures", "that", "this", "object", "has", "a", "minimum", "capacity", "available", "before", "requiring", "the", "internal", "buffer", "to", "be", "enlarged", "the", "general", "policy", "of", "this", "method", "is", "that", "if", "the", "{", "@", "code", "minimum", "capacity", "}", "is", "larger", "than", "the", "current", "{", "@", "link", "#", "capacity", "(", ")", "}", ",", "then", "the", "capacity", "will", "be", "increased", "to", "the", "largest", "value", "of", "either", "the", "{", "@", "code", "minimum", "capacity", "}", "or", "the", "current", "capacity", "multiplied", "by", "two", "plus", "two", "although", "this", "is", "the", "general", "policy", ",", "there", "is", "no", "guarantee", "that", "the", "capacity", "will", "change" ]
[ "public", "void", "ensure", "capacity", "(", "int", "min", ")", "{", "if", "(", "min", ">", "chars", "length", ")", "{", "int", "twice", "=", "(", "chars", "length", "<", "<", "1", ")", "+", "2", ";", "enlarge", "buffer", "(", "twice", ">", "min", "?", "twice", ":", "min", ")", ";", "}", "}" ]
[ "notifies", "the", "renderer", "that", "output", "end", "of", "stream", "is", "pending", "and", "should", "be", "handled", "on", "the", "next", "render" ]
[ "protected", "final", "void", "set", "pending", "output", "end", "of", "stream", "(", ")", "{", "pending", "output", "end", "of", "stream", "=", "true", ";", "}" ]
[ "returns", "whether", "or", "not", "any", "layers", "in", "this", "composition", "has", "a", "matte", "layer" ]
[ "@", "suppress", "warnings", "(", "{", "\"", "unused", "\"", ",", "\"", "weaker", "access", "\"", "}", ")", "public", "boolean", "has", "matte", "(", ")", "{", "return", "composition", "layer", "!", "=", "null", "&", "&", "composition", "layer", "has", "matte", "(", ")", ";", "}" ]
[ "add", "the", "provided", "header", "to", "the", "request" ]
[ "public", "builder", "add", "header", "(", "string", "name", ",", "string", "value", ")", "{", "objects", "require", "non", "null", "(", "name", ",", "\"", "header", "name", "cannot", "be", "null", "\"", ")", ";", "objects", "require", "non", "null", "(", "value", ",", "\"", "header", "value", "cannot", "be", "null", "\"", ")", ";", "this", "headers", "add", "(", "new", "req", "header", "(", "name", ",", "value", ")", ")", ";", "return", "this", ";", "}" ]
[ "gets", "the", "scope", "as", "an", "array", "of", "the", "scope", "components", ",", "for", "example", "{", "@", "code", "[", "\"", "host", "-", "7", "\"", ",", "\"", "taskmanager", "-", "2", "\"", ",", "\"", "window", "word", "count", "\"", ",", "\"", "my", "-", "mapper", "\"", "]", "}" ]
[ "public", "string", "[", "]", "get", "scope", "components", "(", ")", "{", "return", "scope", "components", ";", "}" ]
[ "compute", "the", "thumb", "and", "fill", "coordinates" ]
[ "private", "void", "get", "thumb", "and", "fill", "coordinates", "(", ")", "{", "int", "middle", "of", "thumb", ";", "if", "(", "slider", "get", "orientation", "(", ")", "=", "=", "swing", "constants", "horizontal", ")", "{", "middle", "of", "thumb", "=", "thumb", "rect", "x", "+", "(", "thumb", "rect", "width", "/", "2", ")", ";", "middle", "of", "thumb", "-", "=", "track", "rect", "x", ";", "/", "/", "to", "compensate", "for", "the", "g", "translate", "(", ")", "fill", "top", "=", "track", "top", ";", "fill", "bottom", "=", "track", "bottom", "-", "1", ";", "if", "(", "draw", "inverted", "(", ")", ")", "{", "fill", "left", "=", "middle", "of", "thumb", ";", "fill", "right", "=", "track", "right", "-", "1", ";", "}", "else", "{", "fill", "left", "=", "track", "left", ";", "fill", "right", "=", "middle", "of", "thumb", ";", "}", "}", "else", "{", "middle", "of", "thumb", "=", "thumb", "rect", "y", "+", "(", "thumb", "rect", "height", "/", "2", ")", ";", "middle", "of", "thumb", "-", "=", "track", "rect", "y", ";", "/", "/", "to", "compensate", "for", "the", "g", "translate", "(", ")", "fill", "left", "=", "track", "left", ";", "fill", "right", "=", "track", "right", "-", "1", ";", "if", "(", "draw", "inverted", "(", ")", ")", "{", "fill", "top", "=", "track", "top", ";", "fill", "bottom", "=", "middle", "of", "thumb", ";", "}", "else", "{", "fill", "top", "=", "middle", "of", "thumb", ";", "fill", "bottom", "=", "track", "bottom", "-", "1", ";", "}", "}", "}" ]
[ "returns", "a", "string", "containing", "the", "result", "of", "{", "@", "link", "throwable", "#", "to", "string", "(", ")", "to", "string", "(", ")", "}", ",", "followed", "by", "the", "full", ",", "recursive", "stack", "trace", "of", "{", "@", "code", "throwable", "}", "note", "that", "you", "probably", "should", "not", "be", "parsing", "the", "resulting", "string", ";", "if", "you", "need", "programmatic", "access", "to", "the", "stack", "frames", ",", "you", "can", "call", "{", "@", "link", "throwable", "#", "get", "stack", "trace", "(", ")", "}" ]
[ "public", "static", "string", "get", "stack", "trace", "as", "string", "(", "throwable", "throwable", ")", "{", "string", "writer", "string", "writer", "=", "new", "string", "writer", "(", ")", ";", "throwable", "print", "stack", "trace", "(", "new", "print", "writer", "(", "string", "writer", ")", ")", ";", "return", "string", "writer", "to", "string", "(", ")", ";", "}" ]
[ "get", "the", "byte", "array", "value", "for", "an", "instance", "setting" ]
[ "public", "byte", "[", "]", "get", "byte", "settings", "value", "(", "address", "data", "addr", ",", "string", "name", ")", "{", "instance", "settings", "d", "b", "settings", "=", "get", "instance", "settings", "d", "b", "(", "data", "addr", ",", "name", ")", ";", "if", "(", "settings", "!", "=", "null", ")", "{", "return", "settings", "get", "byte", "value", "(", ")", ";", "}", "return", "null", ";", "}" ]
[ "copy", "all", "entries", "from", "the", "supplied", "map", "into", "the", "{", "@", "link", "transformer", "#", "set", "parameter", "(", "string", ",", "object", ")", "parameter", "set", "}", "of", "the", "supplied", "{", "@", "link", "transformer", "}" ]
[ "protected", "final", "void", "copy", "model", "parameters", "(", "map", "<", "string", ",", "object", ">", "model", ",", "transformer", "transformer", ")", "{", "model", "for", "each", "(", "transformer", ":", ":", "set", "parameter", ")", ";", "}" ]
[ "start", "the", "activity" ]
[ "public", "static", "boolean", "start", "activity", "(", "@", "non", "null", "final", "intent", "intent", ",", "@", "anim", "res", "final", "int", "enter", "anim", ",", "@", "anim", "res", "final", "int", "exit", "anim", ")", "{", "context", "context", "=", "get", "top", "activity", "or", "app", "(", ")", ";", "boolean", "is", "success", "=", "start", "activity", "(", "intent", ",", "context", ",", "get", "options", "bundle", "(", "context", ",", "enter", "anim", ",", "exit", "anim", ")", ")", ";", "if", "(", "is", "success", ")", "{", "if", "(", "build", "version", "sdk", "int", "<", "build", "version", "codes", "jelly", "bean", "&", "&", "context", "instanceof", "activity", ")", "{", "(", "(", "activity", ")", "context", ")", "override", "pending", "transition", "(", "enter", "anim", ",", "exit", "anim", ")", ";", "}", "}", "return", "is", "success", ";", "}" ]
[ "invoked", "after", "a", "{", "@", "link", "web", "socket", "session", "}", "has", "started" ]
[ "void", "after", "session", "started", "(", "web", "socket", "session", "session", ",", "message", "channel", "output", "channel", ")", "throws", "exception", ";" ]
[ "get", "a", "{", "@", "link", "reader", "}", "that", "corresponds", "to", "a", "specified", "column", "index", "from", "{", "@", "link", "callable", "statement", "}" ]
[ "public", "reader", "get", "nullable", "result", "(", "callable", "statement", "cs", ",", "int", "column", "index", ")", "throws", "s", "q", "l", "exception", "{", "return", "to", "reader", "(", "cs", "get", "clob", "(", "column", "index", ")", ")", ";", "}" ]
[ "applies", "the", "given", "visitor", "to", "the", "default", "element", "value" ]
[ "public", "void", "default", "value", "accept", "(", "clazz", "clazz", ",", "element", "value", "visitor", "element", "value", "visitor", ")", "{", "default", "value", "accept", "(", "clazz", ",", "null", ",", "element", "value", "visitor", ")", ";", "}" ]
[ "aborts", "the", "stream", ",", "also", "sets", "it", "to", "null" ]
[ "public", "void", "abort", "(", ")", "{", "if", "(", "stream", "=", "=", "null", ")", "return", ";", "try", "{", "stream", "abort", "(", ")", ";", "}", "catch", "(", "i", "o", "exception", "ioe", ")", "{", "log", "error", "(", "\"", "unable", "to", "abort", "stream", "\"", "+", "stream", ",", "ioe", ")", ";", "}", "stream", "=", "null", ";", "}" ]
[ "create", "a", "test", "filesystem", "which", "is", "always", "unguarded", "this", "filesystem", "must", "be", "closed", "in", "test", "teardown" ]
[ "private", "s", "3", "a", "file", "system", "create", "unguarded", "f", "s", "(", ")", "throws", "exception", "{", "s", "3", "a", "file", "system", "test", "f", "s", "=", "get", "file", "system", "(", ")", ";", "configuration", "config", "=", "new", "configuration", "(", "test", "f", "s", "get", "conf", "(", ")", ")", ";", "uri", "uri", "=", "test", "f", "s", "get", "uri", "(", ")", ";", "remove", "base", "and", "bucket", "overrides", "(", "uri", "get", "host", "(", ")", ",", "config", ",", "s3", "metadata", "store", "impl", ")", ";", "remove", "base", "and", "bucket", "overrides", "(", "uri", "get", "host", "(", ")", ",", "config", ",", "metadatastore", "authoritative", ",", "authoritative", "path", ")", ";", "return", "create", "f", "s", "(", "uri", ",", "config", ")", ";", "}" ]
[ "returns", "the", "column", "index", "of", "the", "given", "column", "class" ]
[ "public", "int", "get", "column", "index", "(", "class", "<", "?", ">", "column", "class", ")", "{", "dynamic", "table", "column", "<", "row", "type", ",", "?", ",", "?", ">", "column", "=", "get", "column", "for", "default", "column", "identifier", "(", "column", "class", ")", ";", "return", "table", "columns", "index", "of", "(", "column", ")", ";", "}" ]
[ "tests", "that", "we", "can", "submit", "a", "job", "to", "the", "dispatcher", "which", "then", "spawns", "a", "new", "job", "manager", "runner" ]
[ "public", "void", "test", "job", "submission", "(", ")", "throws", "exception", "{", "dispatcher", "=", "create", "and", "start", "dispatcher", "(", "heartbeat", "services", ",", "ha", "services", ",", "new", "expected", "job", "id", "job", "manager", "runner", "factory", "(", "test", "job", "id", ",", "created", "job", "manager", "runner", "latch", ")", ")", ";", "dispatcher", "gateway", "dispatcher", "gateway", "=", "dispatcher", "get", "self", "gateway", "(", "dispatcher", "gateway", "class", ")", ";", "dispatcher", "gateway", "submit", "job", "(", "job", "graph", ",", "timeout", ")", "get", "(", ")", ";", "job", "master", "leader", "election", "service", "get", "start", "future", "(", ")", "get", "(", ")", ";", "assert", "true", "(", "\"", "job", "manager", "runner", "was", "not", "started", "\"", ",", "job", "master", "leader", "election", "service", "get", "start", "future", "(", ")", "is", "done", "(", ")", ")", ";", "}" ]
[ "copies", "a", "substring", "of", "this", "string", "into", "the", "given", "target", "string", "value", "the", "substring", "begins", "at", "the", "given", "<", "code", ">", "start", "<", "code", ">", "index", "and", "ends", "at", "end", "of", "the", "string" ]
[ "public", "void", "substring", "(", "string", "value", "target", ",", "int", "start", ")", "{", "substring", "(", "target", ",", "start", ",", "this", "len", ")", ";", "}" ]
[ "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", "\"", ")", ";", "}" ]
[ "make", "sure", "exception", "will", "be", "thrown", "with", "allocation", "failure", "rather", "than", "swallowed" ]
[ "public", "void", "test", "put", "with", "allocation", "failure", "(", ")", "{", "allocator", "exceptional", "allocator", "=", "new", "allocator", "(", ")", "{", "@", "override", "public", "long", "allocate", "(", "int", "size", ")", "{", "throw", "new", "runtime", "exception", "(", "\"", "exception", "on", "purpose", "\"", ")", ";", "}", "@", "override", "public", "void", "free", "(", "long", "address", ")", "{", "}", "@", "override", "@", "nullable", "public", "chunk", "get", "chunk", "by", "id", "(", "int", "chunk", "id", ")", "{", "return", "null", ";", "}", "@", "override", "public", "void", "close", "(", ")", "{", "}", "}", ";", "try", "(", "copy", "on", "write", "skip", "list", "state", "map", "<", "integer", ",", "long", ",", "string", ">", "state", "map", "=", "create", "empty", "state", "map", "(", "0", ",", "0", "0f", ",", "exceptional", "allocator", ")", ")", "{", "state", "map", "put", "(", "1", ",", "1l", ",", "\"", "test", "-", "value", "\"", ")", ";", "fail", "(", "\"", "should", "have", "thrown", "exception", "when", "space", "allocation", "fails", "\"", ")", ";", "}", "catch", "(", "flink", "runtime", "exception", "e", ")", "{", "/", "/", "expected", "}", "}" ]
[ "compact", "the", "underlying", "tree", "set", "holding", "blocks" ]
[ "public", "boolean", "tree", "set", "compact", "(", "long", "timeout", ")", "{", "return", "blocks", "compact", "(", "timeout", ")", ";", "}" ]
[ "uploads", "an", "image" ]
[ "public", "api", "response", "<", "model", "api", "response", ">", "upload", "file", "with", "http", "info", "(", "long", "pet", "id", ",", "string", "additional", "metadata", ",", "file", "file", ")", "throws", "api", "exception", "{", "object", "local", "var", "post", "body", "=", "null", ";", "/", "/", "verify", "the", "required", "parameter", "'", "pet", "id", "'", "is", "set", "if", "(", "pet", "id", "=", "=", "null", ")", "{", "throw", "new", "api", "exception", "(", "400", ",", "\"", "missing", "the", "required", "parameter", "'", "pet", "id", "'", "when", "calling", "upload", "file", "\"", ")", ";", "}", "/", "/", "create", "path", "and", "map", "variables", "string", "local", "var", "path", "=", "\"", "/", "pet", "/", "{", "pet", "id", "}", "/", "upload", "image", "\"", "replace", "all", "(", "\"", "\\", "\\", "{", "\"", "+", "\"", "pet", "id", "\"", "+", "\"", "\\", "\\", "}", "\"", ",", "api", "client", "escape", "string", "(", "pet", "id", "to", "string", "(", ")", ")", ")", ";", "/", "/", "query", "params", "list", "<", "pair", ">", "local", "var", "query", "params", "=", "new", "array", "list", "<", "pair", ">", "(", ")", ";", "map", "<", "string", ",", "string", ">", "local", "var", "header", "params", "=", "new", "hash", "map", "<", "string", ",", "string", ">", "(", ")", ";", "map", "<", "string", ",", "string", ">", "local", "var", "cookie", "params", "=", "new", "hash", "map", "<", "string", ",", "string", ">", "(", ")", ";", "map", "<", "string", ",", "object", ">", "local", "var", "form", "params", "=", "new", "hash", "map", "<", "string", ",", "object", ">", "(", ")", ";", "if", "(", "additional", "metadata", "!", "=", "null", ")", "local", "var", "form", "params", "put", "(", "\"", "additional", "metadata", "\"", ",", "additional", "metadata", ")", ";", "if", "(", "file", "!", "=", "null", ")", "local", "var", "form", "params", "put", "(", "\"", "file", "\"", ",", "file", ")", ";", "final", "string", "[", "]", "local", "var", "accepts", "=", "{", "\"", "application", "/", "json", "\"", "}", ";", "final", "string", "local", "var", "accept", "=", "api", "client", "select", "header", "accept", "(", "local", "var", "accepts", ")", ";", "final", "string", "[", "]", "local", "var", "content", "types", "=", "{", "\"", "multipart", "/", "form", "-", "data", "\"", "}", ";", "final", "string", "local", "var", "content", "type", "=", "api", "client", "select", "header", "content", "type", "(", "local", "var", "content", "types", ")", ";", "string", "[", "]", "local", "var", "auth", "names", "=", "new", "string", "[", "]", "{", "\"", "petstore", "auth", "\"", "}", ";", "generic", "type", "<", "model", "api", "response", ">", "local", "var", "return", "type", "=", "new", "generic", "type", "<", "model", "api", "response", ">", "(", ")", "{", "}", ";", "return", "api", "client", "invoke", "a", "p", "i", "(", "\"", "pet", "api", "upload", "file", "\"", ",", "local", "var", "path", ",", "\"", "post", "\"", ",", "local", "var", "query", "params", ",", "local", "var", "post", "body", ",", "local", "var", "header", "params", ",", "local", "var", "cookie", "params", ",", "local", "var", "form", "params", ",", "local", "var", "accept", ",", "local", "var", "content", "type", ",", "local", "var", "auth", "names", ",", "local", "var", "return", "type", ",", "false", ")", ";", "}" ]
[ "{", "@", "inherit", "doc", "}", "because", "the", "values", "for", "a", "given", "key", "may", "have", "duplicates", "and", "follow", "the", "insertion", "ordering", ",", "this", "method", "returns", "a", "{", "@", "link", "list", "}", ",", "instead", "of", "the", "{", "@", "link", "java", "util", "collection", "}", "specified", "in", "the", "{", "@", "link", "multimap", "}", "interface" ]
[ "list", "<", "v", ">", "replace", "values", "(", "k", "key", ",", "iterable", "<", "?", "extends", "v", ">", "values", ")", ";" ]
[ "sets", "the", "{", "@", "link", "charset", "settings", "definition", "}" ]
[ "public", "settings", "builder", "set", "(", "charset", "cs", ")", "{", "charset", "settings", "definition", "charset", "set", "charset", "(", "settings", ",", "cs", "name", "(", ")", ")", ";", "return", "this", ";", "}" ]
[ "gets", "jasypt", "param", "from", "env" ]
[ "private", "static", "string", "get", "jasypt", "param", "from", "env", "(", "final", "environment", "environment", ",", "final", "jasypt", "encryption", "parameters", "param", ")", "{", "return", "environment", "get", "property", "(", "param", "get", "property", "name", "(", ")", ",", "param", "get", "default", "value", "(", ")", ")", ";", "}" ]
[ "returns", "the", "{", "@", "linkplain", "token", "#", "number", "int", "}", "value", "of", "the", "next", "token", ",", "consuming", "it", "if", "the", "next", "token", "is", "a", "string", ",", "this", "method", "will", "attempt", "to", "parse", "it", "as", "an", "int", "if", "the", "next", "token", "'", "s", "numeric", "value", "cannot", "be", "exactly", "represented", "by", "a", "java", "{", "@", "code", "int", "}", ",", "this", "method", "throws" ]
[ "public", "abstract", "int", "next", "int", "(", ")", "throws", "i", "o", "exception", ";" ]
[ "get", "prefix", "ns", "integer" ]
[ "public", "integer", "get", "prefix", "ns", "integer", "(", ")", "{", "return", "prefix", "ns", "integer", ";", "}" ]
[ "try", "to", "touch", "a", "file", ",", "verify", "that", "it", "is", "not", "allowed" ]
[ "public", "static", "void", "assert", "touch", "forbidden", "(", "final", "file", "system", "fs", ",", "final", "path", "path", ")", "throws", "exception", "{", "intercept", "(", "access", "denied", "exception", "class", ",", "\"", "\"", ",", "\"", "caller", "could", "create", "file", "at", "\"", "+", "path", ",", "(", ")", "-", ">", "{", "touch", "(", "fs", ",", "path", ")", ";", "return", "fs", "get", "file", "status", "(", "path", ")", ";", "}", ")", ";", "}" ]
[ "receive", "a", "message", "synchronously", "from", "the", "default", "destination", ",", "but", "only", "wait", "up", "to", "a", "specified", "time", "for", "delivery", "this", "method", "should", "be", "used", "carefully", ",", "since", "it", "will", "block", "the", "thread", "until", "the", "message", "becomes", "available", "or", "until", "the", "timeout", "value", "is", "exceeded", "this", "will", "only", "work", "with", "a", "default", "destination", "specified", "!" ]
[ "message", "receive", "selected", "(", "string", "message", "selector", ")", "throws", "jms", "exception", ";" ]
[ "test", "the", "property", "'", "my", "number", "'" ]
[ "public", "void", "my", "number", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "my", "number", "}" ]
[ "instantiate", "the", "given", "groovy", "script", "class", "and", "run", "it", "if", "necessary" ]
[ "protected", "object", "execute", "script", "(", "script", "source", "script", "source", ",", "class", "<", "?", ">", "script", "class", ")", "throws", "script", "compilation", "exception", "{", "try", "{", "groovy", "object", "goo", "=", "(", "groovy", "object", ")", "reflection", "utils", "accessible", "constructor", "(", "script", "class", ")", "new", "instance", "(", ")", ";", "if", "(", "this", "groovy", "object", "customizer", "!", "=", "null", ")", "{", "/", "/", "allow", "metaclass", "and", "other", "customization", "this", "groovy", "object", "customizer", "customize", "(", "goo", ")", ";", "}", "if", "(", "goo", "instanceof", "script", ")", "{", "/", "/", "a", "groovy", "script", ",", "probably", "creating", "an", "instance", ":", "let", "'", "s", "execute", "it", "return", "(", "(", "script", ")", "goo", ")", "run", "(", ")", ";", "}", "else", "{", "/", "/", "an", "instance", "of", "the", "scripted", "class", ":", "let", "'", "s", "return", "it", "as", "-", "is", "return", "goo", ";", "}", "}", "catch", "(", "no", "such", "method", "exception", "ex", ")", "{", "throw", "new", "script", "compilation", "exception", "(", "\"", "no", "default", "constructor", "on", "groovy", "script", "class", ":", "\"", "+", "script", "class", "get", "name", "(", ")", ",", "ex", ")", ";", "}", "catch", "(", "instantiation", "exception", "ex", ")", "{", "throw", "new", "script", "compilation", "exception", "(", "script", "source", ",", "\"", "unable", "to", "instantiate", "groovy", "script", "class", ":", "\"", "+", "script", "class", "get", "name", "(", ")", ",", "ex", ")", ";", "}", "catch", "(", "illegal", "access", "exception", "ex", ")", "{", "throw", "new", "script", "compilation", "exception", "(", "script", "source", ",", "\"", "could", "not", "access", "groovy", "script", "constructor", ":", "\"", "+", "script", "class", "get", "name", "(", ")", ",", "ex", ")", ";", "}", "catch", "(", "invocation", "target", "exception", "ex", ")", "{", "throw", "new", "script", "compilation", "exception", "(", "\"", "failed", "to", "invoke", "groovy", "script", "constructor", ":", "\"", "+", "script", "class", "get", "name", "(", ")", ",", "ex", "get", "target", "exception", "(", ")", ")", ";", "}", "}" ]
[ "initializes", "a", "default", "set", "of", "{", "@", "linkplain", "http", "message", "converter", "message", "converters", "}" ]
[ "private", "void", "init", "message", "converters", "(", ")", "{", "list", "<", "http", "message", "converter", "<", "?", ">", ">", "message", "converters", "=", "new", "array", "list", "<", ">", "(", "4", ")", ";", "message", "converters", "add", "(", "new", "byte", "array", "http", "message", "converter", "(", ")", ")", ";", "message", "converters", "add", "(", "new", "string", "http", "message", "converter", "(", ")", ")", ";", "if", "(", "!", "should", "ignore", "xml", ")", "{", "try", "{", "message", "converters", "add", "(", "new", "source", "http", "message", "converter", "<", ">", "(", ")", ")", ";", "}", "catch", "(", "error", "err", ")", "{", "/", "/", "ignore", "when", "no", "transformer", "factory", "implementation", "is", "available", "}", "}", "message", "converters", "add", "(", "new", "all", "encompassing", "form", "http", "message", "converter", "(", ")", ")", ";", "this", "message", "converters", "=", "message", "converters", ";", "}" ]
[ "divide", "and", "rounding", "up", "to", "integer", "e", "g", ",", "divide", "round", "up", "(", "3", ",", "2", ")", "returns", "2", ",", "divide", "round", "up", "(", "0", ",", "3", ")", "returns", "0", "note", "that", "this", "method", "does", "not", "support", "negative", "values" ]
[ "public", "static", "int", "divide", "round", "up", "(", "int", "dividend", ",", "int", "divisor", ")", "{", "preconditions", "check", "argument", "(", "dividend", ">", "=", "0", ",", "\"", "negative", "dividend", "is", "not", "supported", "\"", ")", ";", "preconditions", "check", "argument", "(", "divisor", ">", "0", ",", "\"", "negative", "or", "zero", "divisor", "is", "not", "supported", "\"", ")", ";", "return", "dividend", "=", "=", "0", "?", "0", ":", "(", "dividend", "-", "1", ")", "/", "divisor", "+", "1", ";", "}" ]
[ "test", "writing", "logs", "to", "hdfs", "without", "append", "enabled", ",", "with", "ignore", "errors", "enabled", ",", "and", "when", "the", "log", "file", "already", "exists" ]
[ "public", "void", "test", "silent", "overwrite", "(", ")", "throws", "exception", "{", "string", "path", "=", "\"", "hdfs", ":", "/", "/", "\"", "+", "cluster", "get", "name", "node", "(", ")", "get", "host", "and", "port", "(", ")", "+", "\"", "/", "tmp", "\"", ";", "assert", "metrics", "contents", "(", "do", "append", "test", "(", "path", ",", "true", ",", "false", ",", "2", ")", ")", ";", "}" ]
[ "the", "setup", "phase", "includes", "creating", "the", "test", "objects" ]
[ "public", "void", "setup", "(", ")", "throws", "exception", "{", "super", "setup", "(", ")", ";", "s", "3", "a", "file", "system", "fs", "=", "get", "file", "system", "(", ")", ";", "assume", "(", "\"", "unguarded", "fs", "only", "\"", ",", "!", "fs", "has", "metadata", "store", "(", ")", ")", ";", "s", "3client", "=", "fs", "get", "amazon", "s", "3", "client", "for", "testing", "(", "\"", "markers", "\"", ")", ";", "bucket", "=", "fs", "get", "bucket", "(", ")", ";", "path", "base", "=", "new", "path", "(", "method", "path", "(", ")", ",", "\"", "base", "\"", ")", ";", "create", "test", "objects", "(", "base", ")", ";", "}" ]
[ "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", "\"", ")", ";", "}" ]
[ "creates", "a", "new", "blocking", "-", "style", "stub", "that", "supports", "unary", "and", "streaming", "output", "calls", "on", "the", "service" ]
[ "public", "static", "resource", "source", "blocking", "stub", "new", "blocking", "stub", "(", "io", "grpc", "channel", "channel", ")", "{", "return", "new", "resource", "source", "blocking", "stub", "(", "channel", ")", ";", "}" ]
[ "this", "test", "depends", "on", "the", "fact", "that", "{", "@", "code", "abstract", "sequential", "list", "iterator", "}", "transforms", "the", "{", "@", "code", "iterator", "(", ")", "}", "call", "into", "a", "call", "on", "{", "@", "code", "list", "iterator", "(", "int", ")", "}", "this", "is", "fine", "because", "the", "behavior", "is", "clearly", "documented", "so", "it", "'", "s", "not", "expected", "to", "change" ]
[ "public", "void", "test", "transformed", "sequential", "iteration", "uses", "backing", "list", "iteration", "only", "(", ")", "{", "list", "<", "integer", ">", "random", "access", "list", "=", "lists", "new", "array", "list", "(", "some", "sequential", "list", ")", ";", "list", "<", "integer", ">", "list", "iterator", "only", "list", "=", "new", "list", "iteration", "only", "list", "<", ">", "(", "random", "access", "list", ")", ";", "list", "<", "string", ">", "transform", "=", "lists", "transform", "(", "list", "iterator", "only", "list", ",", "some", "function", ")", ";", "assert", "true", "(", "iterables", "elements", "equal", "(", "transform", ",", "lists", "transform", "(", "random", "access", "list", ",", "some", "function", ")", ")", ")", ";", "}" ]
[ "hdfs", "-", "15242", ":", "this", "function", "ensures", "that", "writing", "causes", "some", "metrics", "of", "f", "s", "dataset", "impl", "to", "increment" ]
[ "public", "void", "test", "fs", "dataset", "metrics", "(", ")", "throws", "exception", "{", "configuration", "conf", "=", "new", "hdfs", "configuration", "(", ")", ";", "mini", "d", "f", "s", "cluster", "cluster", "=", "new", "mini", "d", "f", "s", "cluster", "builder", "(", "conf", ")", "build", "(", ")", ";", "try", "{", "cluster", "wait", "active", "(", ")", ";", "string", "bpid", "=", "cluster", "get", "name", "node", "(", ")", "get", "namesystem", "(", ")", "get", "block", "pool", "id", "(", ")", ";", "list", "<", "data", "node", ">", "datanodes", "=", "cluster", "get", "data", "nodes", "(", ")", ";", "data", "node", "datanode", "=", "datanodes", "get", "(", "0", ")", ";", "/", "/", "verify", "both", "of", "metrics", "set", "to", "0", "when", "initialize", "metrics", "record", "builder", "rb", "=", "get", "metrics", "(", "datanode", "get", "metrics", "(", ")", "name", "(", ")", ")", ";", "assert", "counter", "(", "\"", "create", "rbw", "op", "num", "ops", "\"", ",", "0l", ",", "rb", ")", ";", "assert", "counter", "(", "\"", "create", "temporary", "op", "num", "ops", "\"", ",", "0l", ",", "rb", ")", ";", "assert", "counter", "(", "\"", "finalize", "block", "op", "num", "ops", "\"", ",", "0l", ",", "rb", ")", ";", "/", "/", "write", "into", "a", "file", "to", "trigger", "dn", "metrics", "distributed", "file", "system", "fs", "=", "cluster", "get", "file", "system", "(", ")", ";", "path", "test", "file", "=", "new", "path", "(", "\"", "/", "test", "block", "metrics", "txt", "\"", ")", ";", "f", "s", "data", "output", "stream", "fout", "=", "fs", "create", "(", "test", "file", ")", ";", "fout", "write", "(", "new", "byte", "[", "1", "]", ")", ";", "fout", "hsync", "(", ")", ";", "fout", "close", "(", ")", ";", "/", "/", "create", "temporary", "block", "file", "to", "trigger", "dn", "metrics", "final", "extended", "block", "block", "=", "new", "extended", "block", "(", "bpid", ",", "1", ",", "1", ",", "2001", ")", ";", "datanode", "data", "create", "temporary", "(", "storage", "type", "default", ",", "null", ",", "block", ",", "false", ")", ";", "/", "/", "verify", "both", "of", "metrics", "value", "has", "updated", "after", "do", "some", "operations", "rb", "=", "get", "metrics", "(", "datanode", "get", "metrics", "(", ")", "name", "(", ")", ")", ";", "assert", "counter", "(", "\"", "create", "rbw", "op", "num", "ops", "\"", ",", "1l", ",", "rb", ")", ";", "assert", "counter", "(", "\"", "create", "temporary", "op", "num", "ops", "\"", ",", "1l", ",", "rb", ")", ";", "assert", "counter", "(", "\"", "finalize", "block", "op", "num", "ops", "\"", ",", "1l", ",", "rb", ")", ";", "}", "finally", "{", "if", "(", "cluster", "!", "=", "null", ")", "{", "cluster", "shutdown", "(", ")", ";", "}", "}", "}" ]
[ "returns", "the", "status", "of", "half", "-", "close", "callers", "may", "listen", "to", "the", "return", "future", "to", "be", "notified", "when", "the", "half", "-", "close", "is", "complete", "half", "-", "close", "indicates", "that", "all", "client", "-", "side", "data", "is", "transmitted", "but", "still", "waiting", "on", "server", "-", "side", "acknowledgement", "the", "client", "must", "buffer", "the", "information", "in", "case", "the", "server", "fails", "to", "acknowledge", "implementations", "may", "choose", "to", "return", "the", "full", "close", "future", "via", "{", "@", "link", "#", "close", "(", ")", "}", "if", "there", "is", "no", "sensible", "half", "-", "close", "state", "this", "should", "be", "only", "called", "after", "{", "@", "link", "#", "close", "(", ")", "}" ]
[ "default", "listenable", "future", "<", "void", ">", "get", "half", "close", "future", "(", ")", "{", "return", "close", "(", ")", ";", "}" ]
[ "process", "the", "given", "{", "@", "code", "@", "scheduled", "}", "method", "declaration", "on", "the", "given", "bean" ]
[ "protected", "void", "process", "scheduled", "(", "scheduled", "scheduled", ",", "method", "method", ",", "object", "bean", ")", "{", "try", "{", "runnable", "runnable", "=", "create", "runnable", "(", "bean", ",", "method", ")", ";", "boolean", "processed", "schedule", "=", "false", ";", "string", "error", "message", "=", "\"", "exactly", "one", "of", "the", "'", "cron", "'", ",", "'", "fixed", "delay", "(", "string", ")", "'", ",", "or", "'", "fixed", "rate", "(", "string", ")", "'", "attributes", "is", "required", "\"", ";", "set", "<", "scheduled", "task", ">", "tasks", "=", "new", "linked", "hash", "set", "<", ">", "(", "4", ")", ";", "/", "/", "determine", "initial", "delay", "long", "initial", "delay", "=", "scheduled", "initial", "delay", "(", ")", ";", "string", "initial", "delay", "string", "=", "scheduled", "initial", "delay", "string", "(", ")", ";", "if", "(", "string", "utils", "has", "text", "(", "initial", "delay", "string", ")", ")", "{", "assert", "is", "true", "(", "initial", "delay", "<", "0", ",", "\"", "specify", "'", "initial", "delay", "'", "or", "'", "initial", "delay", "string", "'", ",", "not", "both", "\"", ")", ";", "if", "(", "this", "embedded", "value", "resolver", "!", "=", "null", ")", "{", "initial", "delay", "string", "=", "this", "embedded", "value", "resolver", "resolve", "string", "value", "(", "initial", "delay", "string", ")", ";", "}", "if", "(", "string", "utils", "has", "length", "(", "initial", "delay", "string", ")", ")", "{", "try", "{", "initial", "delay", "=", "parse", "delay", "as", "long", "(", "initial", "delay", "string", ")", ";", "}", "catch", "(", "runtime", "exception", "ex", ")", "{", "throw", "new", "illegal", "argument", "exception", "(", "\"", "invalid", "initial", "delay", "string", "value", "\\", "\"", "\"", "+", "initial", "delay", "string", "+", "\"", "\\", "\"", "-", "cannot", "parse", "into", "long", "\"", ")", ";", "}", "}", "}", "/", "/", "check", "cron", "expression", "string", "cron", "=", "scheduled", "cron", "(", ")", ";", "if", "(", "string", "utils", "has", "text", "(", "cron", ")", ")", "{", "string", "zone", "=", "scheduled", "zone", "(", ")", ";", "if", "(", "this", "embedded", "value", "resolver", "!", "=", "null", ")", "{", "cron", "=", "this", "embedded", "value", "resolver", "resolve", "string", "value", "(", "cron", ")", ";", "zone", "=", "this", "embedded", "value", "resolver", "resolve", "string", "value", "(", "zone", ")", ";", "}", "if", "(", "string", "utils", "has", "length", "(", "cron", ")", ")", "{", "assert", "is", "true", "(", "initial", "delay", "=", "=", "-", "1", ",", "\"", "'", "initial", "delay", "'", "not", "supported", "for", "cron", "triggers", "\"", ")", ";", "processed", "schedule", "=", "true", ";", "if", "(", "!", "scheduled", "cron", "disabled", "equals", "(", "cron", ")", ")", "{", "time", "zone", "time", "zone", ";", "if", "(", "string", "utils", "has", "text", "(", "zone", ")", ")", "{", "time", "zone", "=", "string", "utils", "parse", "time", "zone", "string", "(", "zone", ")", ";", "}", "else", "{", "time", "zone", "=", "time", "zone", "get", "default", "(", ")", ";", "}", "tasks", "add", "(", "this", "registrar", "schedule", "cron", "task", "(", "new", "cron", "task", "(", "runnable", ",", "new", "cron", "trigger", "(", "cron", ",", "time", "zone", ")", ")", ")", ")", ";", "}", "}", "}", "/", "/", "at", "this", "point", "we", "don", "'", "t", "need", "to", "differentiate", "between", "initial", "delay", "set", "or", "not", "anymore", "if", "(", "initial", "delay", "<", "0", ")", "{", "initial", "delay", "=", "0", ";", "}", "/", "/", "check", "fixed", "delay", "long", "fixed", "delay", "=", "scheduled", "fixed", "delay", "(", ")", ";", "if", "(", "fixed", "delay", ">", "=", "0", ")", "{", "assert", "is", "true", "(", "!", "processed", "schedule", ",", "error", "message", ")", ";", "processed", "schedule", "=", "true", ";", "tasks", "add", "(", "this", "registrar", "schedule", "fixed", "delay", "task", "(", "new", "fixed", "delay", "task", "(", "runnable", ",", "fixed", "delay", ",", "initial", "delay", ")", ")", ")", ";", "}", "string", "fixed", "delay", "string", "=", "scheduled", "fixed", "delay", "string", "(", ")", ";", "if", "(", "string", "utils", "has", "text", "(", "fixed", "delay", "string", ")", ")", "{", "if", "(", "this", "embedded", "value", "resolver", "!", "=", "null", ")", "{", "fixed", "delay", "string", "=", "this", "embedded", "value", "resolver", "resolve", "string", "value", "(", "fixed", "delay", "string", ")", ";", "}", "if", "(", "string", "utils", "has", "length", "(", "fixed", "delay", "string", ")", ")", "{", "assert", "is", "true", "(", "!", "processed", "schedule", ",", "error", "message", ")", ";", "processed", "schedule", "=", "true", ";", "try", "{", "fixed", "delay", "=", "parse", "delay", "as", "long", "(", "fixed", "delay", "string", ")", ";", "}", "catch", "(", "runtime", "exception", "ex", ")", "{", "throw", "new", "illegal", "argument", "exception", "(", "\"", "invalid", "fixed", "delay", "string", "value", "\\", "\"", "\"", "+", "fixed", "delay", "string", "+", "\"", "\\", "\"", "-", "cannot", "parse", "into", "long", "\"", ")", ";", "}", "tasks", "add", "(", "this", "registrar", "schedule", "fixed", "delay", "task", "(", "new", "fixed", "delay", "task", "(", "runnable", ",", "fixed", "delay", ",", "initial", "delay", ")", ")", ")", ";", "}", "}", "/", "/", "check", "fixed", "rate", "long", "fixed", "rate", "=", "scheduled", "fixed", "rate", "(", ")", ";", "if", "(", "fixed", "rate", ">", "=", "0", ")", "{", "assert", "is", "true", "(", "!", "processed", "schedule", ",", "error", "message", ")", ";", "processed", "schedule", "=", "true", ";", "tasks", "add", "(", "this", "registrar", "schedule", "fixed", "rate", "task", "(", "new", "fixed", "rate", "task", "(", "runnable", ",", "fixed", "rate", ",", "initial", "delay", ")", ")", ")", ";", "}", "string", "fixed", "rate", "string", "=", "scheduled", "fixed", "rate", "string", "(", ")", ";", "if", "(", "string", "utils", "has", "text", "(", "fixed", "rate", "string", ")", ")", "{", "if", "(", "this", "embedded", "value", "resolver", "!", "=", "null", ")", "{", "fixed", "rate", "string", "=", "this", "embedded", "value", "resolver", "resolve", "string", "value", "(", "fixed", "rate", "string", ")", ";", "}", "if", "(", "string", "utils", "has", "length", "(", "fixed", "rate", "string", ")", ")", "{", "assert", "is", "true", "(", "!", "processed", "schedule", ",", "error", "message", ")", ";", "processed", "schedule", "=", "true", ";", "try", "{", "fixed", "rate", "=", "parse", "delay", "as", "long", "(", "fixed", "rate", "string", ")", ";", "}", "catch", "(", "runtime", "exception", "ex", ")", "{", "throw", "new", "illegal", "argument", "exception", "(", "\"", "invalid", "fixed", "rate", "string", "value", "\\", "\"", "\"", "+", "fixed", "rate", "string", "+", "\"", "\\", "\"", "-", "cannot", "parse", "into", "long", "\"", ")", ";", "}", "tasks", "add", "(", "this", "registrar", "schedule", "fixed", "rate", "task", "(", "new", "fixed", "rate", "task", "(", "runnable", ",", "fixed", "rate", ",", "initial", "delay", ")", ")", ")", ";", "}", "}", "/", "/", "check", "whether", "we", "had", "any", "attribute", "set", "assert", "is", "true", "(", "processed", "schedule", ",", "error", "message", ")", ";", "/", "/", "finally", "register", "the", "scheduled", "tasks", "synchronized", "(", "this", "scheduled", "tasks", ")", "{", "set", "<", "scheduled", "task", ">", "reg", "tasks", "=", "this", "scheduled", "tasks", "compute", "if", "absent", "(", "bean", ",", "key", "-", ">", "new", "linked", "hash", "set", "<", ">", "(", "4", ")", ")", ";", "reg", "tasks", "add", "all", "(", "tasks", ")", ";", "}", "}", "catch", "(", "illegal", "argument", "exception", "ex", ")", "{", "throw", "new", "illegal", "state", "exception", "(", "\"", "encountered", "invalid", "@", "scheduled", "method", "'", "\"", "+", "method", "get", "name", "(", ")", "+", "\"", "'", ":", "\"", "+", "ex", "get", "message", "(", ")", ")", ";", "}", "}" ]
[ "get", "the", "http", "status", "code" ]
[ "public", "int", "get", "code", "(", ")", "{", "return", "code", ";", "}" ]
[ "obtain", "a", "jms", "session", "that", "is", "synchronized", "with", "the", "current", "transaction", ",", "if", "any" ]
[ "public", "static", "session", "do", "get", "transactional", "session", "(", "connection", "factory", "connection", "factory", ",", "resource", "factory", "resource", "factory", ",", "boolean", "start", "connection", ")", "throws", "j", "m", "s", "exception", "{", "assert", "not", "null", "(", "connection", "factory", ",", "\"", "connection", "factory", "must", "not", "be", "null", "\"", ")", ";", "assert", "not", "null", "(", "resource", "factory", ",", "\"", "resource", "factory", "must", "not", "be", "null", "\"", ")", ";", "jms", "resource", "holder", "resource", "holder", "=", "(", "jms", "resource", "holder", ")", "transaction", "synchronization", "manager", "get", "resource", "(", "connection", "factory", ")", ";", "if", "(", "resource", "holder", "!", "=", "null", ")", "{", "session", "session", "=", "resource", "factory", "get", "session", "(", "resource", "holder", ")", ";", "if", "(", "session", "!", "=", "null", ")", "{", "if", "(", "start", "connection", ")", "{", "connection", "con", "=", "resource", "factory", "get", "connection", "(", "resource", "holder", ")", ";", "if", "(", "con", "!", "=", "null", ")", "{", "con", "start", "(", ")", ";", "}", "}", "return", "session", ";", "}", "if", "(", "resource", "holder", "is", "frozen", "(", ")", ")", "{", "return", "null", ";", "}", "}", "if", "(", "!", "transaction", "synchronization", "manager", "is", "synchronization", "active", "(", ")", ")", "{", "return", "null", ";", "}", "jms", "resource", "holder", "resource", "holder", "to", "use", "=", "resource", "holder", ";", "if", "(", "resource", "holder", "to", "use", "=", "=", "null", ")", "{", "resource", "holder", "to", "use", "=", "new", "jms", "resource", "holder", "(", "connection", "factory", ")", ";", "}", "connection", "con", "=", "resource", "factory", "get", "connection", "(", "resource", "holder", "to", "use", ")", ";", "session", "session", "=", "null", ";", "try", "{", "boolean", "is", "existing", "con", "=", "(", "con", "!", "=", "null", ")", ";", "if", "(", "!", "is", "existing", "con", ")", "{", "con", "=", "resource", "factory", "create", "connection", "(", ")", ";", "resource", "holder", "to", "use", "add", "connection", "(", "con", ")", ";", "}", "session", "=", "resource", "factory", "create", "session", "(", "con", ")", ";", "resource", "holder", "to", "use", "add", "session", "(", "session", ",", "con", ")", ";", "if", "(", "start", "connection", ")", "{", "con", "start", "(", ")", ";", "}", "}", "catch", "(", "j", "m", "s", "exception", "ex", ")", "{", "if", "(", "session", "!", "=", "null", ")", "{", "try", "{", "session", "close", "(", ")", ";", "}", "catch", "(", "throwable", "ex", "2", ")", "{", "/", "/", "ignore", "}", "}", "if", "(", "con", "!", "=", "null", ")", "{", "try", "{", "con", "close", "(", ")", ";", "}", "catch", "(", "throwable", "ex", "2", ")", "{", "/", "/", "ignore", "}", "}", "throw", "ex", ";", "}", "if", "(", "resource", "holder", "to", "use", "!", "=", "resource", "holder", ")", "{", "transaction", "synchronization", "manager", "register", "synchronization", "(", "new", "jms", "resource", "synchronization", "(", "resource", "holder", "to", "use", ",", "connection", "factory", ",", "resource", "factory", "is", "synched", "local", "transaction", "allowed", "(", ")", ")", ")", ";", "resource", "holder", "to", "use", "set", "synchronized", "with", "transaction", "(", "true", ")", ";", "transaction", "synchronization", "manager", "bind", "resource", "(", "connection", "factory", ",", "resource", "holder", "to", "use", ")", ";", "}", "return", "session", ";", "}" ]
[ "tests", "that", "a", "batch", "slot", "request", "won", "'", "t", "time", "out", "if", "there", "exists", "a", "slot", "in", "the", "slot", "pool", "which", "fulfills", "the", "requested", "{", "@", "link", "resource", "profile", "}" ]
[ "public", "void", "test", "pending", "batch", "slot", "request", "does", "not", "timeout", "if", "fulfilling", "slot", "exists", "(", ")", "throws", "exception", "{", "final", "time", "batch", "slot", "timeout", "=", "time", "milliseconds", "(", "2l", ")", ";", "final", "component", "main", "thread", "executor", "direct", "main", "thread", "executor", "=", "component", "main", "thread", "executor", "service", "adapter", "for", "main", "thread", "(", ")", ";", "final", "manual", "clock", "clock", "=", "new", "manual", "clock", "(", ")", ";", "try", "(", "final", "testing", "slot", "pool", "impl", "slot", "pool", "=", "create", "and", "set", "up", "slot", "pool", "(", "direct", "main", "thread", "executor", ",", "null", ",", "batch", "slot", "timeout", ",", "clock", ")", ")", "{", "slot", "pool", "utils", "offer", "slots", "(", "slot", "pool", ",", "direct", "main", "thread", "executor", ",", "arrays", "as", "list", "(", "resource", "profile", ",", "smaller", "resource", "profile", ")", ")", ";", "final", "completable", "future", "<", "physical", "slot", ">", "first", "slot", "future", "=", "slot", "pool", "utils", "request", "new", "allocated", "batch", "slot", "(", "slot", "pool", ",", "direct", "main", "thread", "executor", ",", "resource", "profile", ")", ";", "final", "completable", "future", "<", "physical", "slot", ">", "second", "slot", "future", "=", "slot", "pool", "utils", "request", "new", "allocated", "batch", "slot", "(", "slot", "pool", ",", "direct", "main", "thread", "executor", ",", "resource", "profile", "unknown", ")", ";", "final", "completable", "future", "<", "physical", "slot", ">", "third", "slot", "future", "=", "slot", "pool", "utils", "request", "new", "allocated", "batch", "slot", "(", "slot", "pool", ",", "direct", "main", "thread", "executor", ",", "smaller", "resource", "profile", ")", ";", "final", "list", "<", "completable", "future", "<", "physical", "slot", ">", ">", "slot", "futures", "=", "arrays", "as", "list", "(", "first", "slot", "future", ",", "second", "slot", "future", ",", "third", "slot", "future", ")", ";", "advance", "time", "and", "trigger", "check", "batch", "slot", "timeout", "(", "slot", "pool", ",", "clock", ",", "batch", "slot", "timeout", ")", ";", "for", "(", "completable", "future", "<", "physical", "slot", ">", "slot", "future", ":", "slot", "futures", ")", "{", "assert", "that", "(", "slot", "future", "is", "done", "(", ")", ",", "is", "(", "false", ")", ")", ";", "}", "}", "}" ]
[ "creates", "test", "data", "that", "will", "be", "written", "using", "the", "pre", "-", "upgrade", "{", "@", "link", "type", "serializer", "}" ]
[ "previous", "element", "t", "create", "test", "data", "(", ")", ";" ]
[ "returns", "a", "thread", "-", "local", "1024", "-", "char", "array" ]
[ "static", "char", "[", "]", "char", "buffer", "from", "thread", "local", "(", ")", "{", "return", "dest", "tl", "get", "(", ")", ";", "}" ]
[ "post", "initializes", "the", "service", "this", "method", "is", "called", "by", "the", "{", "@", "link", "server", "}", "after", "all", "services", "of", "the", "server", "have", "been", "initialized", "this", "method", "does", "a", "nop" ]
[ "public", "void", "post", "init", "(", ")", "throws", "service", "exception", "{", "}" ]
[ "tests", "correctness", "of", "comparison", "of", "char", "(", "x", ")", "and", "varchar", "pushed", "down", "to", "a", "table", "scan", "as", "a", "tuple", "domain" ]
[ "public", "void", "test", "predicate", "push", "down", "to", "table", "scan", "(", ")", "{", "/", "/", "test", "not", "specific", "to", "hive", ",", "but", "needs", "a", "connector", "supporting", "table", "creation", "assert", "update", "(", "\"", "create", "table", "test", "table", "with", "char", "(", "a", "char", "(", "20", ")", ")", "\"", ")", ";", "try", "{", "assert", "update", "(", "\"", "insert", "into", "test", "table", "with", "char", "(", "a", ")", "values", "\"", "+", "\"", "(", "cast", "(", "'", "aaa", "'", "as", "char", "(", "20", ")", ")", ")", ",", "\"", "+", "\"", "(", "cast", "(", "'", "bbb", "'", "as", "char", "(", "20", ")", ")", ")", ",", "\"", "+", "\"", "(", "cast", "(", "'", "bbc", "'", "as", "char", "(", "20", ")", ")", ")", ",", "\"", "+", "\"", "(", "cast", "(", "'", "bbd", "'", "as", "char", "(", "20", ")", ")", ")", "\"", ",", "4", ")", ";", "assert", "query", "(", "\"", "select", "a", ",", "a", "<", "=", "'", "bbc", "'", "from", "test", "table", "with", "char", "\"", ",", "\"", "values", "(", "cast", "(", "'", "aaa", "'", "as", "char", "(", "20", ")", ")", ",", "true", ")", ",", "\"", "+", "\"", "(", "cast", "(", "'", "bbb", "'", "as", "char", "(", "20", ")", ")", ",", "true", ")", ",", "\"", "+", "\"", "(", "cast", "(", "'", "bbc", "'", "as", "char", "(", "20", ")", ")", ",", "true", ")", ",", "\"", "+", "\"", "(", "cast", "(", "'", "bbd", "'", "as", "char", "(", "20", ")", ")", ",", "false", ")", "\"", ")", ";", "assert", "query", "(", "\"", "select", "a", "from", "test", "table", "with", "char", "where", "a", "<", "=", "'", "bbc", "'", "\"", ",", "\"", "values", "cast", "(", "'", "aaa", "'", "as", "char", "(", "20", ")", ")", ",", "\"", "+", "\"", "cast", "(", "'", "bbb", "'", "as", "char", "(", "20", ")", ")", ",", "\"", "+", "\"", "cast", "(", "'", "bbc", "'", "as", "char", "(", "20", ")", ")", "\"", ")", ";", "}", "finally", "{", "assert", "update", "(", "\"", "drop", "table", "test", "table", "with", "char", "\"", ")", ";", "}", "}" ]
[ "get", "the", "number", "of", "operands", "for", "the", "resulting", "prototype" ]
[ "public", "int", "get", "num", "operands", "(", ")", "{", "if", "(", "prototype", "=", "=", "null", ")", "{", "throw", "new", "illegal", "state", "exception", "(", "\"", "pattern", "is", "not", "complete", "\"", ")", ";", "}", "return", "prototype", "get", "num", "operands", "(", ")", ";", "}" ]
[ "commits", "the", "ongoing", "transaction", "this", "method", "will", "flush", "any", "unsent", "records", "before", "actually", "committing", "the", "transaction", "further", ",", "if", "any", "of", "the", "{", "@", "link", "#", "send", "(", "producer", "record", ")", "}", "calls", "which", "were", "part", "of", "the", "transaction", "hit", "irrecoverable", "errors", ",", "this", "method", "will", "throw", "the", "last", "received", "exception", "immediately", "and", "the", "transaction", "will", "not", "be", "committed", "so", "all", "{", "@", "link", "#", "send", "(", "producer", "record", ")", "}", "calls", "in", "a", "transaction", "must", "succeed", "in", "order", "for", "this", "method", "to", "succeed", "note", "that", "this", "method", "will", "raise", "{", "@", "link", "timeout", "exception", "}", "if", "the", "transaction", "cannot", "be", "committed", "before", "expiration", "of", "{", "@", "code", "max", "block", "ms", "}", "additionally", ",", "it", "will", "raise", "{", "@", "link", "interrupt", "exception", "}", "if", "interrupted", "it", "is", "safe", "to", "retry", "in", "either", "case", ",", "but", "it", "is", "not", "possible", "to", "attempt", "a", "different", "operation", "(", "such", "as", "abort", "transaction", ")", "since", "the", "commit", "may", "already", "be", "in", "the", "progress", "of", "completing", "if", "not", "retrying", ",", "the", "only", "option", "is", "to", "close", "the", "producer" ]
[ "public", "void", "commit", "transaction", "(", ")", "throws", "producer", "fenced", "exception", "{", "throw", "if", "no", "transaction", "manager", "(", ")", ";", "throw", "if", "producer", "closed", "(", ")", ";", "transactional", "request", "result", "result", "=", "transaction", "manager", "begin", "commit", "(", ")", ";", "sender", "wakeup", "(", ")", ";", "result", "await", "(", "max", "block", "time", "ms", ",", "time", "unit", "milliseconds", ")", ";", "}" ]
[ "create", "and", "write", "operation" ]
[ "private", "void", "do", "create", "write", "op", "(", "string", "name", ",", "reporter", "reporter", ")", "{", "f", "s", "data", "output", "stream", "out", ";", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "bytes", "to", "write", "]", ";", "for", "(", "long", "l", "=", "0l", ";", "l", "<", "number", "of", "files", ";", "l", "+", "+", ")", "{", "path", "file", "path", "=", "new", "path", "(", "new", "path", "(", "base", "dir", ",", "data", "dir", "name", ")", ",", "name", "+", "\"", "\"", "+", "l", ")", ";", "boolean", "successful", "op", "=", "false", ";", "while", "(", "!", "successful", "op", "&", "&", "num", "of", "exceptions", "<", "max", "operation", "exceptions", ")", "{", "try", "{", "/", "/", "set", "up", "timer", "for", "measuring", "al", "(", "transaction", "#", "1", ")", "start", "time", "a", "l", "=", "system", "current", "time", "millis", "(", ")", ";", "/", "/", "create", "the", "file", "/", "/", "use", "a", "buffer", "size", "of", "512", "out", "=", "filesystem", "create", "(", "file", "path", ",", "true", ",", "512", ",", "repl", "factor", ",", "blk", "size", ")", ";", "out", "write", "(", "buffer", ")", ";", "total", "time", "a", "l", "1", "+", "=", "(", "system", "current", "time", "millis", "(", ")", "-", "start", "time", "a", "l", ")", ";", "/", "/", "close", "the", "file", "/", "file", "output", "stream", "/", "/", "set", "up", "timers", "for", "measuring", "al", "(", "transaction", "#", "2", ")", "start", "time", "a", "l", "=", "system", "current", "time", "millis", "(", ")", ";", "out", "close", "(", ")", ";", "total", "time", "a", "l", "2", "+", "=", "(", "system", "current", "time", "millis", "(", ")", "-", "start", "time", "a", "l", ")", ";", "successful", "op", "=", "true", ";", "successful", "file", "ops", "+", "+", ";", "reporter", "set", "status", "(", "\"", "finish", "\"", "+", "l", "+", "\"", "files", "\"", ")", ";", "}", "catch", "(", "i", "o", "exception", "e", ")", "{", "log", "error", "(", "\"", "exception", "recorded", "in", "op", ":", "create", "/", "write", "/", "close", ",", "\"", "+", "\"", "file", ":", "\\", "\"", "\"", "+", "file", "path", "+", "\"", "\\", "\"", "\"", ",", "e", ")", ";", "num", "of", "exceptions", "+", "+", ";", "}", "}", "}", "}" ]
[ "directly", "set", "the", "link", "type", "this", "can", "be", "used", "instead", "of", "{", "@", "link", "#", "set", "alwayslink", "}", "setting", "anything", "other", "than", "a", "static", "link", "causes", "this", "class", "to", "skip", "the", "link", "action", "creation", "this", "exists", "only", "for", "objective", "-", "c" ]
[ "public", "cc", "linking", "helper", "set", "static", "link", "type", "(", "link", "target", "type", "link", "type", ")", "{", "preconditions", "check", "not", "null", "(", "link", "type", ")", ";", "preconditions", "check", "state", "(", "link", "type", "linker", "or", "archiver", "(", ")", "=", "=", "linker", "or", "archiver", "archiver", ")", ";", "this", "static", "link", "type", "=", "link", "type", ";", "return", "this", ";", "}" ]