docstring_tokens
sequence
code_tokens
sequence
[ "flushes", "and", "refreshes", "all", "indices", "in", "the", "cluster" ]
[ "protected", "final", "void", "flush", "and", "refresh", "(", "string", "indices", ")", "{", "flush", "(", "indices", ")", ";", "refresh", "(", "indices", ")", ";", "}" ]
[ "block", "iterator", "iterates", "over", "all", "blocks", "belonging", "to", "datanode", "descriptor", "through", "multiple", "storages", "the", "test", "verifies", "that", "block", "iterator", "can", "be", "set", "to", "start", "iterating", "from", "a", "particular", "starting", "block", "index" ]
[ "void", "test", "block", "iterator", "(", "mini", "d", "f", "s", "cluster", "cluster", ")", "{", "f", "s", "namesystem", "ns", "=", "cluster", "get", "namesystem", "(", ")", ";", "string", "d", "id", "=", "cluster", "get", "data", "nodes", "(", ")", "get", "(", "0", ")", "get", "datanode", "uuid", "(", ")", ";", "datanode", "descriptor", "dnd", "=", "block", "manager", "test", "util", "get", "datanode", "(", "ns", ",", "d", "id", ")", ";", "datanode", "storage", "info", "[", "]", "storages", "=", "dnd", "get", "storage", "infos", "(", ")", ";", "assert", "equals", "(", "\"", "data", "node", "should", "have", "4", "storages", "\"", ",", "4", ",", "storages", "length", ")", ";", "iterator", "<", "block", "info", ">", "dn", "block", "it", "=", "null", ";", "/", "/", "check", "illegal", "start", "block", "number", "try", "{", "dn", "block", "it", "=", "block", "manager", "test", "util", "get", "block", "iterator", "(", "cluster", "get", "namesystem", "(", ")", ",", "d", "id", ",", "-", "1", ")", ";", "assert", "true", "(", "\"", "should", "throw", "illegal", "argument", "exception", "\"", ",", "false", ")", ";", "}", "catch", "(", "illegal", "argument", "exception", "ei", ")", "{", "/", "/", "as", "expected", "}", "assert", "null", "(", "\"", "iterator", "should", "be", "null", "\"", ",", "dn", "block", "it", ")", ";", "/", "/", "form", "an", "array", "of", "all", "data", "node", "blocks", "int", "num", "blocks", "=", "dnd", "num", "blocks", "(", ")", ";", "block", "info", "[", "]", "all", "blocks", "=", "new", "block", "info", "[", "num", "blocks", "]", ";", "int", "idx", "=", "0", ";", "for", "(", "datanode", "storage", "info", "s", ":", "storages", ")", "{", "iterator", "<", "block", "info", ">", "storage", "block", "it", "=", "block", "manager", "test", "util", "get", "block", "iterator", "(", "s", ")", ";", "while", "(", "storage", "block", "it", "has", "next", "(", ")", ")", "{", "all", "blocks", "[", "idx", "+", "+", "]", "=", "storage", "block", "it", "next", "(", ")", ";", "try", "{", "storage", "block", "it", "remove", "(", ")", ";", "assert", "true", "(", "\"", "block", "info", "iterator", "should", "have", "been", "unmodifiable", "\"", ",", "false", ")", ";", "}", "catch", "(", "unsupported", "operation", "exception", "e", ")", "{", "/", "/", "expected", "exception", "}", "}", "}", "/", "/", "check", "iterator", "for", "every", "block", "as", "a", "starting", "point", "for", "(", "int", "i", "=", "0", ";", "i", "<", "all", "blocks", "length", ";", "i", "+", "+", ")", "{", "/", "/", "create", "iterator", "starting", "from", "i", "dn", "block", "it", "=", "block", "manager", "test", "util", "get", "block", "iterator", "(", "ns", ",", "d", "id", ",", "i", ")", ";", "assert", "true", "(", "\"", "block", "iterator", "should", "have", "next", "block", "\"", ",", "dn", "block", "it", "has", "next", "(", ")", ")", ";", "/", "/", "check", "iterator", "lists", "blocks", "in", "the", "desired", "order", "for", "(", "int", "j", "=", "i", ";", "j", "<", "all", "blocks", "length", ";", "j", "+", "+", ")", "{", "assert", "equals", "(", "\"", "wrong", "block", "order", "\"", ",", "all", "blocks", "[", "j", "]", ",", "dn", "block", "it", "next", "(", ")", ")", ";", "}", "}", "/", "/", "check", "start", "block", "number", "larger", "than", "num", "blocks", "in", "the", "data", "node", "dn", "block", "it", "=", "block", "manager", "test", "util", "get", "block", "iterator", "(", "ns", ",", "d", "id", ",", "all", "blocks", "length", "+", "1", ")", ";", "assert", "false", "(", "\"", "iterator", "should", "not", "have", "next", "block", "\"", ",", "dn", "block", "it", "has", "next", "(", ")", ")", ";", "}" ]
[ "returns", "the", "current", "status", "string" ]
[ "public", "string", "get", "status", "(", ")", "{", "return", "status", ";", "}" ]
[ "return", "the", "name", "of", "the", "bound", "object" ]
[ "public", "string", "get", "object", "name", "(", ")", "{", "return", "this", "object", "name", ";", "}" ]
[ "like", "{", "@", "link", "#", "cross", "check", "vertical", "(", "int", ",", "int", ",", "int", ",", "int", ")", "}", ",", "and", "in", "fact", "is", "basically", "identical", ",", "except", "it", "reads", "horizontally", "instead", "of", "vertically", "this", "is", "used", "to", "cross", "-", "cross", "check", "a", "vertical", "cross", "check", "and", "locate", "the", "real", "center", "of", "the", "alignment", "pattern" ]
[ "private", "float", "cross", "check", "horizontal", "(", "int", "start", "j", ",", "int", "center", "i", ",", "int", "max", "count", ",", "int", "original", "state", "count", "total", ")", "{", "bit", "matrix", "image", "=", "this", "image", ";", "int", "max", "j", "=", "image", "get", "width", "(", ")", ";", "int", "[", "]", "state", "count", "=", "get", "cross", "check", "state", "count", "(", ")", ";", "int", "j", "=", "start", "j", ";", "while", "(", "j", ">", "=", "0", "&", "&", "image", "get", "(", "j", ",", "center", "i", ")", ")", "{", "state", "count", "[", "2", "]", "+", "+", ";", "j", "-", "-", ";", "}", "if", "(", "j", "<", "0", ")", "{", "return", "float", "na", "n", ";", "}", "while", "(", "j", ">", "=", "0", "&", "&", "!", "image", "get", "(", "j", ",", "center", "i", ")", "&", "&", "state", "count", "[", "1", "]", "<", "=", "max", "count", ")", "{", "state", "count", "[", "1", "]", "+", "+", ";", "j", "-", "-", ";", "}", "if", "(", "j", "<", "0", "|", "|", "state", "count", "[", "1", "]", ">", "max", "count", ")", "{", "return", "float", "na", "n", ";", "}", "while", "(", "j", ">", "=", "0", "&", "&", "image", "get", "(", "j", ",", "center", "i", ")", "&", "&", "state", "count", "[", "0", "]", "<", "=", "max", "count", ")", "{", "state", "count", "[", "0", "]", "+", "+", ";", "j", "-", "-", ";", "}", "if", "(", "state", "count", "[", "0", "]", ">", "max", "count", ")", "{", "return", "float", "na", "n", ";", "}", "j", "=", "start", "j", "+", "1", ";", "while", "(", "j", "<", "max", "j", "&", "&", "image", "get", "(", "j", ",", "center", "i", ")", ")", "{", "state", "count", "[", "2", "]", "+", "+", ";", "j", "+", "+", ";", "}", "if", "(", "j", "=", "=", "max", "j", ")", "{", "return", "float", "na", "n", ";", "}", "while", "(", "j", "<", "max", "j", "&", "&", "!", "image", "get", "(", "j", ",", "center", "i", ")", "&", "&", "state", "count", "[", "3", "]", "<", "max", "count", ")", "{", "state", "count", "[", "3", "]", "+", "+", ";", "j", "+", "+", ";", "}", "if", "(", "j", "=", "=", "max", "j", "|", "|", "state", "count", "[", "3", "]", ">", "=", "max", "count", ")", "{", "return", "float", "na", "n", ";", "}", "while", "(", "j", "<", "max", "j", "&", "&", "image", "get", "(", "j", ",", "center", "i", ")", "&", "&", "state", "count", "[", "4", "]", "<", "max", "count", ")", "{", "state", "count", "[", "4", "]", "+", "+", ";", "j", "+", "+", ";", "}", "if", "(", "state", "count", "[", "4", "]", ">", "=", "max", "count", ")", "{", "return", "float", "na", "n", ";", "}", "/", "/", "if", "we", "found", "a", "finder", "-", "pattern", "-", "like", "section", ",", "but", "its", "size", "is", "significantly", "different", "than", "/", "/", "the", "original", ",", "assume", "it", "'", "s", "a", "false", "positive", "int", "state", "count", "total", "=", "state", "count", "[", "0", "]", "+", "state", "count", "[", "1", "]", "+", "state", "count", "[", "2", "]", "+", "state", "count", "[", "3", "]", "+", "state", "count", "[", "4", "]", ";", "if", "(", "5", "*", "math", "abs", "(", "state", "count", "total", "-", "original", "state", "count", "total", ")", ">", "=", "original", "state", "count", "total", ")", "{", "return", "float", "na", "n", ";", "}", "return", "found", "pattern", "cross", "(", "state", "count", ")", "?", "center", "from", "end", "(", "state", "count", ",", "j", ")", ":", "float", "na", "n", ";", "}" ]
[ "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", "\"", ")", ";", "}" ]
[ "updates", "a", "pet", "in", "the", "store", "with", "form", "data" ]
[ "public", "void", "update", "pet", "with", "form", "(", "long", "pet", "id", ",", "string", "name", ",", "string", "status", ")", "throws", "api", "exception", "{", "update", "pet", "with", "form", "with", "http", "info", "(", "pet", "id", ",", "name", ",", "status", ")", ";", "}" ]
[ "find", "the", "fields", "constant", "that", "matches", "field", "id", ",", "or", "null", "if", "its", "not", "found" ]
[ "public", "static", "fields", "find", "by", "thrift", "id", "(", "int", "field", "id", ")", "{", "switch", "(", "field", "id", ")", "{", "case", "0", ":", "/", "/", "success", "return", "success", ";", "default", ":", "return", "null", ";", "}", "}" ]
[ "builds", "the", "list", "cell", "renderer", "for", "the", "autocompletion", "list", "a", "programmer", "may", "override", "this", "if", "the", "various", "{", "@", "code", "get", "completion", "}", "methods", "prove", "insufficient", "for", "customizing", "the", "display", "of", "the", "suggestions", "please", "remember", "that", "{", "@", "link", "j", "label", "}", "s", "can", "render", "html", ",", "so", "{", "@", "link", "#", "get", "completion", "display", "(", "object", ")", "get", "completion", "display", "(", "t", ")", "}", "is", "quite", "powerful", "with", "the", "default", "{", "@", "link", "autocompletion", "cell", "renderer", "}" ]
[ "protected", "list", "cell", "renderer", "<", "?", "super", "t", ">", "build", "list", "cell", "renderer", "(", ")", "{", "return", "new", "autocompletion", "cell", "renderer", "<", ">", "(", "this", ")", ";", "}" ]
[ "returns", "a", "string", "representation", "of", "x", ",", "where", "x", "is", "treated", "as", "unsigned" ]
[ "public", "static", "string", "to", "string", "(", "long", "x", ")", "{", "return", "to", "string", "(", "x", ",", "10", ")", ";", "}" ]
[ "returns", "an", "integer", "array", "of", "all", "the", "different", "angles", "the", "chart", "slices", "have", "the", "angles", "in", "the", "returned", "array", "determine", "how", "much", "space", "(", "of", "360", "°", ")", "each", "slice", "takes" ]
[ "public", "float", "[", "]", "get", "draw", "angles", "(", ")", "{", "return", "m", "draw", "angles", ";", "}" ]
[ "determine", "the", "create", "method", "of", "the", "given", "ejb", "home", "object" ]
[ "protected", "method", "get", "create", "method", "(", "object", "home", ")", "throws", "ejb", "access", "exception", "{", "try", "{", "/", "/", "cache", "the", "ejb", "create", "(", ")", "method", "that", "must", "be", "declared", "on", "the", "home", "interface", "return", "home", "get", "class", "(", ")", "get", "method", "(", "\"", "create", "\"", ")", ";", "}", "catch", "(", "no", "such", "method", "exception", "ex", ")", "{", "throw", "new", "ejb", "access", "exception", "(", "\"", "ejb", "home", "[", "\"", "+", "home", "+", "\"", "]", "has", "no", "no", "-", "arg", "create", "(", ")", "method", "\"", ")", ";", "}", "}" ]
[ "round", "a", "long", "value", "up", "to", "a", "multiple", "of", "a", "factor" ]
[ "public", "static", "long", "round", "up", "to", "multiple", "(", "long", "val", ",", "int", "factor", ")", "{", "assert", "(", "factor", ">", "1", ")", ";", "long", "c", "=", "(", "val", "+", "factor", "-", "1", ")", "/", "factor", ";", "return", "c", "*", "factor", ";", "}" ]
[ "disposes", "of", "any", "system", "resources", "or", "security", "-", "sensitive", "information", "sasl", "might", "be", "using", "@", "exception", "sasl", "exception", "if", "a", "sasl", "error", "occurs" ]
[ "private", "void", "dispose", "sasl", "(", ")", "throws", "sasl", "exception", "{", "if", "(", "sasl", "client", "!", "=", "null", ")", "{", "sasl", "client", "dispose", "(", ")", ";", "}", "if", "(", "sasl", "server", "!", "=", "null", ")", "{", "sasl", "server", "dispose", "(", ")", ";", "}", "}" ]
[ "test", "the", "property", "'", "prefix", "ns", "boolean", "'" ]
[ "public", "void", "prefix", "ns", "boolean", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "prefix", "ns", "boolean", "}" ]
[ "infer", "the", "type", "parameterization", "'", "p", "'" ]
[ "private", "class", "<", "p", ">", "get", "p", "(", ")", "{", "return", "functions", "get", "type", "parameter", "(", "get", "class", "(", ")", ",", "descriptor", "class", ",", "0", ")", ";", "}" ]
[ "reads", "a", "bitset", "from", "the", "stream", "that", "has", "been", "written", "with", "{", "@", "link", "#", "write", "bit", "set", "(", "data", "output", ",", "int", ",", "bit", "set", ")", "}" ]
[ "private", "static", "final", "void", "read", "bit", "set", "(", "data", "input", "stream", ",", "int", "nbits", ",", "bit", "set", "bit", "set", ")", "throws", "i", "o", "exception", "{", "bit", "set", "clear", "(", ")", ";", "long", "initial", "bits", "=", "writable", "utils", "read", "v", "long", "(", "stream", ")", ";", "long", "last", "=", "0l", ";", "while", "(", "0l", "!", "=", "initial", "bits", ")", "{", "last", "=", "long", "lowest", "one", "bit", "(", "initial", "bits", ")", ";", "initial", "bits", "^", "=", "last", ";", "bit", "set", "set", "(", "long", "number", "of", "trailing", "zeros", "(", "last", ")", ")", ";", "}", "for", "(", "int", "offset", "=", "long", "size", ";", "offset", "<", "nbits", ";", "offset", "+", "=", "byte", "size", ")", "{", "byte", "bits", "=", "stream", "read", "byte", "(", ")", ";", "while", "(", "0", "!", "=", "bits", ")", "{", "last", "=", "long", "lowest", "one", "bit", "(", "bits", ")", ";", "bits", "^", "=", "last", ";", "bit", "set", "set", "(", "long", "number", "of", "trailing", "zeros", "(", "last", ")", "+", "offset", ")", ";", "}", "}", "}" ]
[ "is", "the", "joint", "motor", "enabled", "?" ]
[ "public", "boolean", "is", "motor", "enabled", "(", ")", "{", "return", "m", "enable", "motor", ";", "}" ]
[ "updates", "a", "pet", "in", "the", "store", "with", "form", "data" ]
[ "public", "api", "response", "<", "void", ">", "update", "pet", "with", "form", "with", "http", "info", "(", "long", "pet", "id", ",", "string", "name", ",", "string", "status", ")", "throws", "api", "exception", "{", "http", "request", "builder", "local", "var", "request", "builder", "=", "update", "pet", "with", "form", "request", "builder", "(", "pet", "id", ",", "name", ",", "status", ")", ";", "try", "{", "http", "response", "<", "input", "stream", ">", "local", "var", "response", "=", "member", "var", "http", "client", "send", "(", "local", "var", "request", "builder", "build", "(", ")", ",", "http", "response", "body", "handlers", "of", "input", "stream", "(", ")", ")", ";", "if", "(", "member", "var", "response", "interceptor", "!", "=", "null", ")", "{", "member", "var", "response", "interceptor", "accept", "(", "local", "var", "response", ")", ";", "}", "if", "(", "local", "var", "response", "status", "code", "(", ")", "/", "100", "!", "=", "2", ")", "{", "throw", "new", "api", "exception", "(", "local", "var", "response", "status", "code", "(", ")", ",", "\"", "update", "pet", "with", "form", "call", "received", "non", "-", "success", "response", "\"", ",", "local", "var", "response", "headers", "(", ")", ",", "local", "var", "response", "body", "(", ")", "=", "=", "null", "?", "null", ":", "new", "string", "(", "local", "var", "response", "body", "(", ")", "read", "all", "bytes", "(", ")", ")", ")", ";", "}", "return", "new", "api", "response", "<", "void", ">", "(", "local", "var", "response", "status", "code", "(", ")", ",", "local", "var", "response", "headers", "(", ")", "map", "(", ")", ",", "null", ")", ";", "}", "catch", "(", "i", "o", "exception", "e", ")", "{", "throw", "new", "api", "exception", "(", "e", ")", ";", "}", "catch", "(", "interrupted", "exception", "e", ")", "{", "thread", "current", "thread", "(", ")", "interrupt", "(", ")", ";", "throw", "new", "api", "exception", "(", "e", ")", ";", "}", "}" ]
[ "adds", "a", "row", "to", "the", "model" ]
[ "public", "void", "add", "row", "(", "string", "row", ",", "int", "index", ",", "boolean", "notify", ")", "{", "string", "date", "=", "get", "date", "(", "row", ")", ";", "dates", "add", "(", "index", ",", "date", ")", ";", "row", "=", "row", "replace", "first", "(", "date", ",", "\"", "\"", ")", ";", "string", "time", "=", "get", "time", "(", "row", ")", ";", "times", "add", "(", "index", ",", "time", ")", ";", "row", "=", "row", "replace", "first", "(", "time", ",", "\"", "\"", ")", ";", "string", "level", "=", "get", "level", "(", "row", ")", ";", "levels", "add", "(", "index", ",", "level", ")", ";", "row", "=", "row", "replace", "first", "(", "level", ",", "\"", "\"", ")", ";", "messages", "add", "(", "index", ",", "row", "trim", "(", ")", ")", ";", "if", "(", "notify", ")", "{", "fire", "table", "rows", "inserted", "(", "messages", "size", "(", ")", "-", "1", ",", "messages", "size", "(", ")", "-", "1", ")", ";", "}", "}" ]
[ "remove", "the", "entity", "from", "cache" ]
[ "public", "void", "remove", "(", "string", "path", ")", "{", "write", "lock", "lock", "(", ")", ";", "try", "{", "this", "cache", "remove", "(", "path", ")", ";", "}", "finally", "{", "write", "lock", "unlock", "(", ")", ";", "}", "}" ]
[ "the", "shard", "is", "in", "started", "mode" ]
[ "public", "boolean", "started", "(", ")", "{", "return", "state", "=", "=", "shard", "routing", "state", "started", ";", "}" ]
[ "enables", "disables", "both", "vertical", "and", "horizontal", "highlight", "-", "indicators" ]
[ "public", "void", "set", "draw", "highlight", "indicators", "(", "boolean", "enabled", ")", "{", "set", "draw", "vertical", "highlight", "indicator", "(", "enabled", ")", ";", "set", "draw", "horizontal", "highlight", "indicator", "(", "enabled", ")", ";", "}" ]
[ "calls", "{", "@", "link", "channel", "handler", "context", "#", "fire", "exception", "caught", "(", "throwable", ")", "}", "to", "forward", "to", "the", "next", "{", "@", "link", "channel", "handler", "}", "in", "the", "{", "@", "link", "channel", "pipeline", "}", "sub", "-", "classes", "may", "override", "this", "method", "to", "change", "behavior" ]
[ "public", "void", "exception", "caught", "(", "channel", "handler", "context", "ctx", ",", "throwable", "cause", ")", "throws", "exception", "{", "ctx", "fire", "exception", "caught", "(", "cause", ")", ";", "}" ]
[ "instantiate", "mock", "client", "with", "the", "results", "and", "errors", "requested" ]
[ "public", "static", "amazon", "s", "3", "new", "mock", "s", "3", "client", "(", "final", "client", "results", "results", ",", "final", "client", "errors", "errors", ")", "{", "amazon", "s", "3", "client", "mock", "client", "=", "mock", "(", "amazon", "s", "3", "client", "class", ")", ";", "final", "object", "lock", "=", "new", "object", "(", ")", ";", "/", "/", "initiate", "multipart", "upload", "when", "(", "mock", "client", "initiate", "multipart", "upload", "(", "any", "(", "initiate", "multipart", "upload", "request", "class", ")", ")", ")", "then", "answer", "(", "invocation", "-", ">", "{", "log", "debug", "(", "\"", "initiate", "multipart", "upload", "for", "{", "}", "\"", ",", "mock", "client", ")", ";", "synchronized", "(", "lock", ")", "{", "if", "(", "results", "requests", "size", "(", ")", "=", "=", "errors", "fail", "on", "init", ")", "{", "if", "(", "errors", "recover", ")", "{", "errors", "fail", "on", "init", "(", "-", "1", ")", ";", "}", "throw", "new", "amazon", "client", "exception", "(", "\"", "mock", "fail", "on", "init", "\"", "+", "results", "requests", "size", "(", ")", ")", ";", "}", "string", "upload", "id", "=", "uuid", "random", "u", "u", "i", "d", "(", ")", "to", "string", "(", ")", ";", "initiate", "multipart", "upload", "request", "req", "=", "get", "argument", "at", "(", "invocation", ",", "0", ",", "initiate", "multipart", "upload", "request", "class", ")", ";", "results", "requests", "put", "(", "upload", "id", ",", "req", ")", ";", "results", "active", "uploads", "put", "(", "upload", "id", ",", "req", "get", "key", "(", ")", ")", ";", "results", "uploads", "add", "(", "upload", "id", ")", ";", "return", "new", "result", "(", "results", "requests", "get", "(", "upload", "id", ")", ",", "upload", "id", ")", ";", "}", "}", ")", ";", "/", "/", "upload", "part", "when", "(", "mock", "client", "upload", "part", "(", "any", "(", "upload", "part", "request", "class", ")", ")", ")", "then", "answer", "(", "invocation", "-", ">", "{", "log", "debug", "(", "\"", "upload", "part", "for", "{", "}", "\"", ",", "mock", "client", ")", ";", "synchronized", "(", "lock", ")", "{", "if", "(", "results", "parts", "size", "(", ")", "=", "=", "errors", "fail", "on", "upload", ")", "{", "if", "(", "errors", "recover", ")", "{", "errors", "fail", "on", "upload", "(", "-", "1", ")", ";", "}", "log", "info", "(", "\"", "triggering", "upload", "failure", "\"", ")", ";", "throw", "new", "amazon", "client", "exception", "(", "\"", "mock", "fail", "on", "upload", "\"", "+", "results", "parts", "size", "(", ")", ")", ";", "}", "upload", "part", "request", "req", "=", "get", "argument", "at", "(", "invocation", ",", "0", ",", "upload", "part", "request", "class", ")", ";", "results", "parts", "add", "(", "req", ")", ";", "string", "etag", "=", "uuid", "random", "u", "u", "i", "d", "(", ")", "to", "string", "(", ")", ";", "list", "<", "string", ">", "etags", "=", "results", "tags", "by", "upload", "get", "(", "req", "get", "upload", "id", "(", ")", ")", ";", "if", "(", "etags", "=", "=", "null", ")", "{", "etags", "=", "lists", "new", "array", "list", "(", ")", ";", "results", "tags", "by", "upload", "put", "(", "req", "get", "upload", "id", "(", ")", ",", "etags", ")", ";", "}", "etags", "add", "(", "etag", ")", ";", "return", "new", "result", "(", "req", ",", "etag", ")", ";", "}", "}", ")", ";", "/", "/", "complete", "multipart", "upload", "when", "(", "mock", "client", "complete", "multipart", "upload", "(", "any", "(", "complete", "multipart", "upload", "request", "class", ")", ")", ")", "then", "answer", "(", "invocation", "-", ">", "{", "log", "debug", "(", "\"", "complete", "multipart", "upload", "for", "{", "}", "\"", ",", "mock", "client", ")", ";", "synchronized", "(", "lock", ")", "{", "if", "(", "results", "commits", "size", "(", ")", "=", "=", "errors", "fail", "on", "commit", ")", "{", "if", "(", "errors", "recover", ")", "{", "errors", "fail", "on", "commit", "(", "-", "1", ")", ";", "}", "throw", "new", "amazon", "client", "exception", "(", "\"", "mock", "fail", "on", "commit", "\"", "+", "results", "commits", "size", "(", ")", ")", ";", "}", "complete", "multipart", "upload", "request", "req", "=", "get", "argument", "at", "(", "invocation", ",", "0", ",", "complete", "multipart", "upload", "request", "class", ")", ";", "string", "upload", "id", "=", "req", "get", "upload", "id", "(", ")", ";", "remove", "upload", "(", "results", ",", "upload", "id", ")", ";", "results", "commits", "add", "(", "req", ")", ";", "return", "new", "result", "(", "req", ")", ";", "}", "}", ")", ";", "/", "/", "abort", "multipart", "upload", "mocking", "do", "answer", "(", "invocation", "-", ">", "{", "log", "debug", "(", "\"", "abort", "multipart", "upload", "for", "{", "}", "\"", ",", "mock", "client", ")", ";", "synchronized", "(", "lock", ")", "{", "if", "(", "results", "aborts", "size", "(", ")", "=", "=", "errors", "fail", "on", "abort", ")", "{", "if", "(", "errors", "recover", ")", "{", "errors", "fail", "on", "abort", "(", "-", "1", ")", ";", "}", "throw", "new", "amazon", "client", "exception", "(", "\"", "mock", "fail", "on", "abort", "\"", "+", "results", "aborts", "size", "(", ")", ")", ";", "}", "abort", "multipart", "upload", "request", "req", "=", "get", "argument", "at", "(", "invocation", ",", "0", ",", "abort", "multipart", "upload", "request", "class", ")", ";", "string", "id", "=", "req", "get", "upload", "id", "(", ")", ";", "remove", "upload", "(", "results", ",", "id", ")", ";", "results", "aborts", "add", "(", "req", ")", ";", "return", "null", ";", "}", "}", ")", "when", "(", "mock", "client", ")", "abort", "multipart", "upload", "(", "any", "(", "abort", "multipart", "upload", "request", "class", ")", ")", ";", "/", "/", "delete", "object", "mocking", "do", "answer", "(", "invocation", "-", ">", "{", "log", "debug", "(", "\"", "delete", "object", "for", "{", "}", "\"", ",", "mock", "client", ")", ";", "synchronized", "(", "lock", ")", "{", "results", "deletes", "add", "(", "get", "argument", "at", "(", "invocation", ",", "0", ",", "delete", "object", "request", "class", ")", ")", ";", "return", "null", ";", "}", "}", ")", "when", "(", "mock", "client", ")", "delete", "object", "(", "any", "(", "delete", "object", "request", "class", ")", ")", ";", "/", "/", "delete", "object", "mocking", "do", "answer", "(", "invocation", "-", ">", "{", "log", "debug", "(", "\"", "delete", "object", "for", "{", "}", "\"", ",", "mock", "client", ")", ";", "synchronized", "(", "lock", ")", "{", "results", "deletes", "add", "(", "new", "delete", "object", "request", "(", "get", "argument", "at", "(", "invocation", ",", "0", ",", "string", "class", ")", ",", "get", "argument", "at", "(", "invocation", ",", "1", ",", "string", "class", ")", ")", ")", ";", "return", "null", ";", "}", "}", ")", "when", "(", "mock", "client", ")", "delete", "object", "(", "any", "(", "string", "class", ")", ",", "any", "(", "string", "class", ")", ")", ";", "/", "/", "to", "string", "returns", "the", "debug", "information", "when", "(", "mock", "client", "to", "string", "(", ")", ")", "then", "answer", "(", "invocation", "-", ">", "\"", "mock", "3", "a", "client", "\"", "+", "results", "+", "\"", "\"", "+", "errors", ")", ";", "when", "(", "mock", "client", "list", "multipart", "uploads", "(", "any", "(", "list", "multipart", "uploads", "request", "class", ")", ")", ")", "then", "answer", "(", "invocation", "-", ">", "{", "synchronized", "(", "lock", ")", "{", "multipart", "upload", "listing", "l", "=", "new", "multipart", "upload", "listing", "(", ")", ";", "l", "set", "multipart", "uploads", "(", "results", "active", "uploads", "entry", "set", "(", ")", "stream", "(", ")", "map", "(", "e", "-", ">", "new", "m", "p", "u", "(", "e", "get", "key", "(", ")", ",", "e", "get", "value", "(", ")", ")", ")", "collect", "(", "collectors", "to", "list", "(", ")", ")", ")", ";", "return", "l", ";", "}", "}", ")", ";", "return", "mock", "client", ";", "}" ]
[ "test", "that", "that", "writes", "to", "an", "incomplete", "block", "are", "available", "to", "a", "reader" ]
[ "public", "void", "test", "unfinished", "block", "read", "(", ")", "throws", "i", "o", "exception", "{", "/", "/", "create", "a", "new", "file", "in", "the", "root", ",", "write", "data", ",", "do", "no", "close", "path", "file", "1", "=", "new", "path", "(", "\"", "/", "unfinished", "-", "block", "\"", ")", ";", "f", "s", "data", "output", "stream", "stm", "=", "test", "file", "creation", "create", "file", "(", "file", "system", ",", "file", "1", ",", "1", ")", ";", "/", "/", "write", "partial", "block", "and", "sync", "int", "partial", "block", "size", "=", "block", "size", "/", "2", ";", "write", "file", "and", "sync", "(", "stm", ",", "partial", "block", "size", ")", ";", "/", "/", "make", "sure", "a", "client", "can", "read", "it", "before", "it", "is", "closed", "check", "can", "read", "(", "file", "system", ",", "file", "1", ",", "partial", "block", "size", ")", ";", "stm", "close", "(", ")", ";", "}" ]
[ "unions", "two", "{", "@", "link", "table", "}", "s", "similar", "to", "a", "sql", "union", "all", "the", "fields", "of", "the", "two", "union", "operations", "must", "fully", "overlap", "note", ":", "both", "tables", "must", "be", "bound", "to", "the", "same", "{", "@", "code", "table", "environment", "}", "example", ":", "{", "@", "code", "left", "union", "all", "(", "right", ")", ";", "}" ]
[ "table", "union", "all", "(", "table", "right", ")", ";" ]
[ "create", "the", "configuration", "to", "use", "when", "creating", "a", "test", "account", "subclasses", "can", "override", "this", "to", "tune", "the", "test", "account", "configuration" ]
[ "public", "configuration", "create", "configuration", "(", ")", "{", "return", "azure", "blob", "storage", "test", "account", "create", "test", "configuration", "(", ")", ";", "}" ]
[ "extracts", "the", "-", "xmx", "heap", "option", "from", "the", "specified", "string" ]
[ "public", "static", "void", "extract", "max", "heap", "opts", "(", "final", "string", "java", "options", ",", "list", "<", "string", ">", "heap", "opts", ",", "list", "<", "string", ">", "others", ")", "{", "for", "(", "string", "opt", ":", "java", "options", "split", "(", "\"", "\"", ")", ")", "{", "matcher", "matcher", "=", "max", "heap", "pattern", "matcher", "(", "opt", ")", ";", "if", "(", "matcher", "find", "(", ")", ")", "{", "heap", "opts", "add", "(", "opt", ")", ";", "}", "else", "{", "others", "add", "(", "opt", ")", ";", "}", "}", "}" ]
[ "get", "the", "default", "tools", "from", "the", "default", "tools", "location" ]
[ "private", "void", "add", "default", "tools", "(", ")", "{", "import", "ghidra", "tools", "dialog", "dialog", "=", "new", "import", "ghidra", "tools", "dialog", "(", "tool", ")", ";", "dialog", "show", "dialog", "(", ")", ";", "if", "(", "dialog", "is", "cancelled", "(", ")", ")", "{", "return", ";", "}", "list", "<", "string", ">", "list", "=", "dialog", "get", "selected", "list", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "list", "size", "(", ")", ";", "i", "+", "+", ")", "{", "string", "filename", "=", "list", "get", "(", "i", ")", ";", "add", "default", "tool", "(", "filename", ")", ";", "}", "}" ]
[ "binds", "this", "vertex", "buffer", "object", "for", "rendering", "via", "gl", "draw", "arrays", "or", "gl", "draw", "elements" ]
[ "public", "void", "bind", "(", "final", "shader", "program", "shader", ")", "{", "bind", "(", "shader", ",", "null", ")", ";", "}" ]
[ "check", "for", "a", "previously", "{", "@", "link", "url", "path", "helper", "#", "resolve", "and", "cache", "lookup", "path", "resolved", "}", "string", "lookup", "path", "or", "a", "previously", "{", "@", "link", "#", "parse", "and", "cache", "parsed", "}", "{", "@", "code", "request", "path", "}" ]
[ "public", "static", "boolean", "has", "cached", "path", "(", "servlet", "request", "request", ")", "{", "return", "(", "request", "get", "attribute", "(", "path", "attribute", ")", "!", "=", "null", "|", "|", "request", "get", "attribute", "(", "url", "path", "helper", "path", "attribute", ")", "!", "=", "null", ")", ";", "}" ]
[ "convert", "a", "json", "map", "to", "a", "token", "of", "block", "token", "identifier" ]
[ "static", "token", "<", "block", "token", "identifier", ">", "to", "block", "token", "(", "final", "map", "<", "?", ",", "?", ">", "m", ")", "throws", "i", "o", "exception", "{", "return", "(", "token", "<", "block", "token", "identifier", ">", ")", "to", "token", "(", "m", ")", ";", "}" ]
[ "gets", "the", "list", "of", "all", "case", "values" ]
[ "public", "int", "list", "get", "values", "(", ")", "{", "return", "values", ";", "}" ]
[ "returns", "the", "equates", "defined", "at", "the", "operand", "index", "of", "the", "instruction" ]
[ "public", "final", "list", "<", "equate", ">", "get", "equates", "(", "instruction", "instruction", ",", "int", "operand", "index", ")", "{", "return", "current", "program", "get", "equate", "table", "(", ")", "get", "equates", "(", "instruction", "get", "min", "address", "(", ")", ",", "operand", "index", ")", ";", "}" ]
[ "implementations", "must", "implement", "this", "method", "to", "map", "each", "row", "of", "data", "in", "the", "result", "set", "this", "method", "should", "not", "call", "{", "@", "code", "next", "(", ")", "}", "on", "the", "result", "set", ";", "it", "is", "only", "supposed", "to", "map", "values", "of", "the", "current", "row" ]
[ "t", "map", "row", "(", "result", "set", "rs", ",", "int", "row", "num", ")", "throws", "s", "q", "l", "exception", ";" ]
[ "set", "new", "base", "offset", "relative", "to", "the", "associated", "mem", "buffer", "'", "s", "address" ]
[ "private", "void", "set", "base", "offset", "(", "int", "offset", ")", "throws", "address", "out", "of", "bounds", "exception", "{", "this", "address", "=", "mem", "buffer", "get", "address", "(", ")", "add", "(", "offset", ")", ";", "this", "base", "offset", "=", "offset", ";", "if", "(", "buffer", "length", ">", "0", ")", "{", "min", "offset", "=", "0", ";", "max", "offset", "=", "-", "1", ";", "max", "offset", "=", "mem", "buffer", "get", "bytes", "(", "buffer", ",", "base", "offset", ")", "-", "1", ";", "}", "}" ]
[ "convert", "the", "given", "object", "to", "string", "with", "each", "line", "indented", "by", "4", "spaces", "(", "except", "the", "first", "line", ")" ]
[ "private", "string", "to", "indented", "string", "(", "object", "o", ")", "{", "if", "(", "o", "=", "=", "null", ")", "{", "return", "\"", "null", "\"", ";", "}", "return", "o", "to", "string", "(", ")", "replace", "(", "\"", "\\", "n", "\"", ",", "\"", "\\", "n", "\"", ")", ";", "}" ]
[ "check", "that", "a", "licensed", "plugin", "can", "be", "installed", "when", "the", "distribution", "type", "is", "default" ]
[ "public", "void", "test", "install", "plugin", "command", "on", "default", "(", ")", "throws", "exception", "{", "mock", "terminal", "terminal", "=", "new", "mock", "terminal", "(", ")", ";", "plugin", "info", "plugin", "info", "=", "build", "info", "(", "true", ")", ";", "install", "plugin", "command", "check", "can", "installation", "proceed", "(", "terminal", ",", "build", "flavor", "default", ",", "plugin", "info", ")", ";", "}" ]
[ "uses", "a", "hash", "-", "based", "{", "@", "code", "set", "}", "to", "store", "value", "collections" ]
[ "public", "set", "multimap", "builder", "<", "k0", ",", "object", ">", "hash", "set", "values", "(", ")", "{", "return", "hash", "set", "values", "(", "default", "expected", "values", "per", "key", ")", ";", "}" ]
[ "creates", "an", "instance", "using", "provided", "certificate", "chain", "and", "private", "key", "generally", "they", "should", "be", "pem", "-", "encoded", "and", "the", "key", "is", "an", "unencrypted", "pkcs", "#", "8", "key", "(", "file", "headers", "have", "\"", "begin", "certificate", "\"", "and", "\"", "begin", "private", "key", "\"", ")" ]
[ "public", "builder", "key", "manager", "(", "input", "stream", "cert", "chain", ",", "input", "stream", "private", "key", ")", "throws", "i", "o", "exception", "{", "return", "key", "manager", "(", "cert", "chain", ",", "private", "key", ",", "null", ")", ";", "}" ]
[ "get", "pet", "id" ]
[ "public", "long", "get", "pet", "id", "(", ")", "{", "return", "pet", "id", ";", "}" ]
[ "throw", "{", "@", "link", "illegal", "state", "exception", "}", "if", "the", "{", "@", "link", "physical", "transformation", "}", "'", "s", "uid", "or", "hash", "is", "not", "set", "when", "auto", "generate", "uid", "is", "disabled" ]
[ "public", "static", "void", "validate", "transformation", "uid", "(", "stream", "graph", "stream", "graph", ",", "transformation", "<", "?", ">", "transformation", ")", "{", "if", "(", "!", "stream", "graph", "get", "execution", "config", "(", ")", "has", "auto", "generated", "u", "i", "ds", "enabled", "(", ")", ")", "{", "if", "(", "transformation", "instanceof", "physical", "transformation", "&", "&", "transformation", "get", "user", "provided", "node", "hash", "(", ")", "=", "=", "null", "&", "&", "transformation", "get", "uid", "(", ")", "=", "=", "null", ")", "{", "throw", "new", "illegal", "state", "exception", "(", "\"", "auto", "generated", "u", "i", "ds", "have", "been", "disabled", "\"", "+", "\"", "but", "no", "uid", "or", "hash", "has", "been", "assigned", "to", "operator", "\"", "+", "transformation", "get", "name", "(", ")", ")", ";", "}", "}", "}" ]
[ "tests", "that", "an", "already", "registered", "allocation", "id", "can", "be", "reused", "after", "the", "initial", "slot", "request", "has", "been", "freed" ]
[ "public", "void", "test", "accepting", "duplicate", "slot", "request", "after", "allocation", "release", "(", ")", "throws", "exception", "{", "final", "resource", "manager", "id", "resource", "manager", "id", "=", "resource", "manager", "id", "generate", "(", ")", ";", "final", "atomic", "integer", "allocate", "resource", "calls", "=", "new", "atomic", "integer", "(", "0", ")", ";", "final", "resource", "actions", "resource", "manager", "actions", "=", "new", "testing", "resource", "actions", "builder", "(", ")", "set", "allocate", "resource", "consumer", "(", "ignored", "-", ">", "allocate", "resource", "calls", "increment", "and", "get", "(", ")", ")", "build", "(", ")", ";", "final", "allocation", "i", "d", "allocation", "id", "=", "new", "allocation", "i", "d", "(", ")", ";", "final", "resource", "profile", "resource", "profile", "=", "resource", "profile", "from", "resources", "(", "2", "0", ",", "2", ")", ";", "final", "slot", "request", "slot", "request", "1", "=", "new", "slot", "request", "(", "new", "job", "i", "d", "(", ")", ",", "allocation", "id", ",", "resource", "profile", ",", "\"", "foobar", "\"", ")", ";", "final", "slot", "request", "slot", "request", "2", "=", "new", "slot", "request", "(", "new", "job", "i", "d", "(", ")", ",", "allocation", "id", ",", "resource", "profile", ",", "\"", "barfoo", "\"", ")", ";", "final", "task", "executor", "gateway", "task", "executor", "gateway", "=", "new", "testing", "task", "executor", "gateway", "builder", "(", ")", "create", "testing", "task", "executor", "gateway", "(", ")", ";", "final", "resource", "i", "d", "resource", "i", "d", "=", "resource", "i", "d", "generate", "(", ")", ";", "final", "task", "executor", "connection", "task", "manager", "connection", "=", "new", "task", "executor", "connection", "(", "resource", "i", "d", ",", "task", "executor", "gateway", ")", ";", "final", "slot", "i", "d", "slot", "id", "=", "new", "slot", "i", "d", "(", "resource", "i", "d", ",", "0", ")", ";", "final", "slot", "status", "slot", "status", "=", "new", "slot", "status", "(", "slot", "id", ",", "resource", "profile", ")", ";", "final", "slot", "report", "slot", "report", "=", "new", "slot", "report", "(", "slot", "status", ")", ";", "try", "(", "slot", "manager", "impl", "slot", "manager", "=", "create", "slot", "manager", "(", "resource", "manager", "id", ",", "resource", "manager", "actions", ")", ")", "{", "slot", "manager", "register", "task", "manager", "(", "task", "manager", "connection", ",", "slot", "report", ",", "resource", "profile", "any", ",", "resource", "profile", "any", ")", ";", "assert", "true", "(", "slot", "manager", "register", "slot", "request", "(", "slot", "request", "1", ")", ")", ";", "task", "manager", "slot", "slot", "=", "slot", "manager", "get", "slot", "(", "slot", "id", ")", ";", "assert", "equals", "(", "\"", "the", "slot", "has", "not", "been", "allocated", "to", "the", "expected", "allocation", "id", "\"", ",", "allocation", "id", ",", "slot", "get", "allocation", "id", "(", ")", ")", ";", "slot", "manager", "free", "slot", "(", "slot", "id", ",", "allocation", "id", ")", ";", "/", "/", "check", "that", "the", "slot", "has", "been", "freed", "assert", "true", "(", "slot", "get", "state", "(", ")", "=", "=", "slot", "state", "free", ")", ";", "assert", "null", "(", "slot", "get", "allocation", "id", "(", ")", ")", ";", "assert", "true", "(", "slot", "manager", "register", "slot", "request", "(", "slot", "request", "2", ")", ")", ";", "assert", "equals", "(", "\"", "the", "slot", "has", "not", "been", "allocated", "to", "the", "expected", "allocation", "id", "\"", ",", "allocation", "id", ",", "slot", "get", "allocation", "id", "(", ")", ")", ";", "}", "/", "/", "check", "that", "we", "have", "only", "called", "the", "resource", "allocation", "only", "for", "the", "first", "slot", "request", ",", "/", "/", "since", "the", "second", "request", "is", "a", "duplicate", "assert", "that", "(", "allocate", "resource", "calls", "get", "(", ")", ",", "is", "(", "0", ")", ")", ";", "}" ]
[ "throws", "if", "rewinding", "is", "enabled", "and", "lost", "inputs", "have", "been", "detected" ]
[ "void", "check", "for", "lost", "inputs", "(", ")", "throws", "lost", "inputs", "exec", "exception", ";" ]
[ "test", "verifies", "watcher", "type", "any", "-", "removes", "only", "the", "configured", "data", "watcher", "function" ]
[ "public", "void", "test", "remove", "any", "data", "watcher", "(", "boolean", "use", "async", ")", "throws", "exception", "{", "zk", "1", "create", "(", "\"", "/", "node", "1", "\"", ",", "null", ",", "ids", "open", "acl", "unsafe", ",", "create", "mode", "persistent", ")", ";", "my", "watcher", "w", "1", "=", "new", "my", "watcher", "(", "\"", "/", "node", "1", "\"", ",", "1", ")", ";", "my", "watcher", "w", "2", "=", "new", "my", "watcher", "(", "\"", "/", "node", "1", "\"", ",", "2", ")", ";", "/", "/", "add", "multiple", "data", "watches", "log", "info", "(", "\"", "adding", "data", "watcher", "{", "}", "on", "path", "{", "}", "\"", ",", "w", "1", ",", "\"", "/", "node", "1", "\"", ")", ";", "assert", "not", "null", "(", "zk", "2", "exists", "(", "\"", "/", "node", "1", "\"", ",", "w", "1", ")", ",", "\"", "didn", "'", "t", "set", "data", "watches", "\"", ")", ";", "log", "info", "(", "\"", "adding", "data", "watcher", "{", "}", "on", "path", "{", "}", "\"", ",", "w", "2", ",", "\"", "/", "node", "1", "\"", ")", ";", "assert", "not", "null", "(", "zk", "2", "exists", "(", "\"", "/", "node", "1", "\"", ",", "w", "2", ")", ",", "\"", "didn", "'", "t", "set", "data", "watches", "\"", ")", ";", "/", "/", "add", "child", "watch", "log", "info", "(", "\"", "adding", "child", "watcher", "{", "}", "on", "path", "{", "}", "\"", ",", "w", "2", ",", "\"", "/", "node", "1", "\"", ")", ";", "zk", "2", "get", "children", "(", "\"", "/", "node", "1", "\"", ",", "w", "2", ")", ";", "remove", "watches", "(", "zk", "2", ",", "\"", "/", "node", "1", "\"", ",", "w", "1", ",", "watcher", "type", "any", ",", "false", ",", "code", "ok", ",", "use", "async", ")", ";", "assert", "true", "(", "w", "1", "matches", "(", ")", ",", "\"", "didn", "'", "t", "remove", "data", "watcher", "\"", ")", ";", "assert", "equals", "(", "1", ",", "zk", "2", "get", "child", "watches", "(", ")", "size", "(", ")", ",", "\"", "didn", "'", "t", "find", "child", "watcher", "\"", ")", ";", "assert", "equals", "(", "1", ",", "zk", "2", "get", "data", "watches", "(", ")", "size", "(", ")", ",", "\"", "didn", "'", "t", "find", "data", "watcher", "\"", ")", ";", "remove", "watches", "(", "zk", "2", ",", "\"", "/", "node", "1", "\"", ",", "w", "2", ",", "watcher", "type", "any", ",", "false", ",", "code", "ok", ",", "use", "async", ")", ";", "assert", "true", "(", "w", "2", "matches", "(", ")", ",", "\"", "didn", "'", "t", "remove", "child", "watcher", "\"", ")", ";", "}" ]
[ "sets", "a", "static", "lookup", "table", "that", "maps", "from", "old", "deprecated", "(", "language", ",", "encoding", ")", "index", "values", "to", "a", "charset", "name", "the", "old", "index", "values", "were", "used", "by", "old", "-", "style", "mbcs", "data", "type" ]
[ "public", "static", "void", "set", "static", "encoding", "mapping", "values", "(", "map", "<", "long", ",", "list", "<", "string", ">", ">", "mapping", "values", ")", "{", "language", "to", "charset", "index", "map", "clear", "(", ")", ";", "language", "to", "charset", "index", "map", "put", "all", "(", "mapping", "values", ")", ";", "}" ]
[ "xid", "and", "branch", "id", "provider", "object", "[", "]", "[", "]" ]
[ "static", "stream", "<", "arguments", ">", "xid", "and", "branch", "id", "provider", "(", ")", "throws", "exception", "{", "string", "xid", "=", "core", "begin", "(", "application", "id", ",", "tx", "service", "group", ",", "tx", "name", ",", "timeout", ")", ";", "long", "branch", "id", "=", "core", "branch", "register", "(", "branch", "type", "at", ",", "resource", "id", ",", "client", "id", ",", "xid", ",", "null", ",", "lock", "keys", "2", ")", ";", "assertions", "assert", "not", "null", "(", "xid", ")", ";", "assertions", "assert", "true", "(", "branch", "id", "!", "=", "0", ")", ";", "return", "stream", "of", "(", "arguments", "of", "(", "xid", ",", "branch", "id", ")", ")", ";", "}" ]
[ "creates", "get", "api", "key", "request", "for", "given", "api", "key", "id" ]
[ "public", "static", "get", "api", "key", "request", "using", "api", "key", "id", "(", "string", "api", "key", "id", ",", "boolean", "owned", "by", "authenticated", "user", ")", "{", "return", "new", "get", "api", "key", "request", "(", "null", ",", "null", ",", "api", "key", "id", ",", "null", ",", "owned", "by", "authenticated", "user", ")", ";", "}" ]
[ "checks", "whether", "the", "cosmosdb", "conf", "are", "set", "properly", "in", "yarn", "-", "site", "xml", "conf" ]
[ "public", "static", "void", "validate", "cosmos", "d", "b", "conf", "(", "configuration", "conf", ")", "throws", "yarn", "exception", "{", "if", "(", "conf", "=", "=", "null", ")", "{", "throw", "new", "null", "pointer", "exception", "(", "\"", "configuration", "cannot", "be", "null", "\"", ")", ";", "}", "if", "(", "is", "null", "or", "empty", "(", "conf", "get", "(", "timeline", "service", "cosmosdb", "endpoint", ")", ",", "conf", "get", "(", "timeline", "service", "cosmosdb", "master", "key", ")", ")", ")", "{", "throw", "new", "yarn", "exception", "(", "\"", "one", "or", "more", "cosmos", "d", "b", "configuration", "property", "is", "\"", "+", "\"", "missing", "in", "yarn", "-", "site", "xml", "\"", ")", ";", "}", "}" ]
[ "get", "prefix", "ns", "number" ]
[ "public", "big", "decimal", "get", "prefix", "ns", "number", "(", ")", "{", "return", "prefix", "ns", "number", ";", "}" ]
[ "returns", "any", "stored", "request", "using", "{", "@", "link", "android", "view", "view", "#", "get", "tag", "(", ")", "}" ]
[ "public", "final", "request", "get", "request", "(", ")", "{", "object", "tag", "=", "get", "tag", "(", ")", ";", "if", "(", "tag", "!", "=", "null", ")", "{", "if", "(", "tag", "instanceof", "request", ")", "{", "return", "(", "request", ")", "tag", ";", "}", "else", "{", "throw", "new", "illegal", "argument", "exception", "(", "\"", "you", "must", "not", "pass", "non", "-", "r", "id", "ids", "to", "set", "tag", "(", "id", ")", "\"", ")", ";", "}", "}", "return", "null", ";", "}" ]
[ "{", "@", "inherit", "doc", "}" ]
[ "public", "boolean", "equals", "(", "object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "annotations", ")", ")", "{", "return", "false", ";", "}", "annotations", "other", "annotations", "=", "(", "annotations", ")", "other", ";", "return", "annotations", "equals", "(", "other", "annotations", "annotations", ")", ";", "}" ]
[ "begin", "statistics", "collection" ]
[ "default", "connector", "table", "handle", "begin", "statistics", "collection", "(", "connector", "session", "session", ",", "connector", "table", "handle", "table", "handle", ")", "{", "throw", "new", "presto", "exception", "(", "generic", "internal", "error", ",", "\"", "connector", "metadata", "get", "statistics", "collection", "metadata", "(", ")", "is", "implemented", "without", "begin", "statistics", "collection", "(", ")", "\"", ")", ";", "}" ]
[ "get", "the", "effective", "permission", "for", "the", "acl", "entry", "<", "br", ">", "recommended", "to", "use", "this", "api", "only", "if", "client", "communicates", "with", "the", "old", "name", "node", ",", "needs", "to", "pass", "the", "permission", "for", "the", "path", "to", "get", "effective", "permission", ",", "else", "use", "{", "@", "link", "acl", "status", "#", "get", "effective", "permission", "(", "acl", "entry", ")", "}" ]
[ "public", "fs", "action", "get", "effective", "permission", "(", "acl", "entry", "entry", ",", "fs", "permission", "perm", "arg", ")", "throws", "illegal", "argument", "exception", "{", "/", "/", "at", "least", "one", "permission", "bits", "should", "be", "available", "preconditions", "check", "argument", "(", "this", "permission", "!", "=", "null", "|", "|", "perm", "arg", "!", "=", "null", ",", "\"", "permission", "bits", "are", "not", "available", "to", "calculate", "effective", "permission", "\"", ")", ";", "if", "(", "this", "permission", "!", "=", "null", ")", "{", "/", "/", "permission", "bits", "from", "server", "response", "will", "have", "the", "priority", "for", "/", "/", "accuracy", "perm", "arg", "=", "this", "permission", ";", "}", "if", "(", "(", "entry", "get", "name", "(", ")", "!", "=", "null", "|", "|", "entry", "get", "type", "(", ")", "=", "=", "acl", "entry", "type", "group", ")", ")", "{", "if", "(", "entry", "get", "scope", "(", ")", "=", "=", "acl", "entry", "scope", "access", ")", "{", "fs", "action", "entry", "perm", "=", "entry", "get", "permission", "(", ")", ";", "return", "entry", "perm", "and", "(", "perm", "arg", "get", "group", "action", "(", ")", ")", ";", "}", "else", "{", "preconditions", "check", "argument", "(", "this", "entries", "contains", "(", "entry", ")", "&", "&", "this", "entries", "size", "(", ")", ">", "=", "3", ",", "\"", "passed", "default", "acl", "entry", "not", "found", "in", "the", "list", "of", "a", "c", "ls", "\"", ")", ";", "/", "/", "default", "mask", "entry", "for", "effective", "permission", "calculation", "will", "be", "the", "/", "/", "penultimate", "entry", "this", "can", "be", "mask", "entry", "in", "case", "of", "extended", "a", "c", "ls", "/", "/", "in", "case", "of", "minimal", "acl", ",", "this", "is", "the", "owner", "group", "entry", ",", "and", "we", "end", "up", "/", "/", "intersecting", "group", "fs", "action", "with", "itself", ",", "which", "is", "a", "no", "-", "op", "fs", "action", "default", "mask", "=", "this", "entries", "get", "(", "this", "entries", "size", "(", ")", "-", "2", ")", "get", "permission", "(", ")", ";", "fs", "action", "entry", "perm", "=", "entry", "get", "permission", "(", ")", ";", "return", "entry", "perm", "and", "(", "default", "mask", ")", ";", "}", "}", "else", "{", "return", "entry", "get", "permission", "(", ")", ";", "}", "}" ]
[ "finds", "the", "repository", "instance", "for", "a", "given", "class", "it", "is", "important", "that", "all", "test", "cases", "in", "a", "class", "share", "the", "same", "repository", "instance", "this", "ensures", "that", ",", "if", "two", "or", "more", "test", "cases", "fail", ",", "the", "log", "file", "will", "contains", "the", "actual", "results", "of", "both", "test", "cases", "the", "<", "code", ">", "base", "repository", "<", "code", ">", "parameter", "is", "useful", "if", "the", "test", "is", "an", "extension", "to", "a", "previous", "test", "if", "the", "test", "class", "has", "a", "base", "class", "which", "also", "has", "a", "repository", ",", "specify", "the", "repository", "here", "diff", "repository", "will", "look", "for", "resources", "in", "the", "base", "class", "if", "it", "cannot", "find", "them", "in", "this", "repository", "if", "test", "resources", "from", "test", "cases", "in", "the", "base", "class", "are", "missing", "or", "incorrect", ",", "it", "will", "not", "write", "them", "to", "the", "log", "file", "-", "-", "you", "probably", "need", "to", "fix", "the", "base", "test", "use", "the", "<", "code", ">", "filter", "<", "code", ">", "parameter", "if", "you", "expect", "the", "test", "to", "return", "results", "slightly", "different", "than", "in", "the", "repository", "this", "happens", "if", "the", "behavior", "of", "a", "derived", "test", "is", "slightly", "different", "than", "a", "base", "test", "if", "you", "do", "not", "specify", "a", "filter", ",", "no", "filtering", "will", "happen" ]
[ "public", "static", "synchronized", "diff", "repository", "lookup", "(", "class", "clazz", ",", "diff", "repository", "base", "repository", ",", "filter", "filter", ")", "{", "diff", "repository", "diff", "repository", "=", "map", "class", "to", "repository", "get", "(", "clazz", ")", ";", "if", "(", "diff", "repository", "=", "=", "null", ")", "{", "final", "url", "ref", "file", "=", "find", "file", "(", "clazz", ",", "\"", "xml", "\"", ")", ";", "final", "file", "log", "file", "=", "new", "file", "(", "ref", "file", "get", "file", "(", ")", "replace", "(", "\"", "test", "-", "classes", "\"", ",", "\"", "surefire", "\"", ")", ")", ";", "diff", "repository", "=", "new", "diff", "repository", "(", "ref", "file", ",", "log", "file", ",", "base", "repository", ",", "filter", ")", ";", "map", "class", "to", "repository", "put", "(", "clazz", ",", "diff", "repository", ")", ";", "}", "return", "diff", "repository", ";", "}" ]
[ "whether", "user", "credentials", "are", "supported", "by", "default", "this", "is", "not", "set", "(", "i", "e", "user", "credentials", "are", "not", "supported", ")" ]
[ "public", "void", "set", "allow", "credentials", "(", "@", "nullable", "boolean", "allow", "credentials", ")", "{", "this", "allow", "credentials", "=", "allow", "credentials", ";", "}" ]
[ "find", "the", "meta", "annotations", "from", "the", "the", "the", "annotated", "element", "by", "meta", "annotation", "type" ]
[ "static", "<", "a", "extends", "annotation", ">", "list", "<", "a", ">", "find", "meta", "annotations", "(", "annotated", "element", "annotated", "element", ",", "class", "<", "a", ">", "meta", "annotation", "type", ")", "{", "list", "<", "a", ">", "meta", "annotations", "=", "new", "linked", "list", "<", ">", "(", ")", ";", "for", "(", "annotation", "annotation", ":", "get", "all", "declared", "annotations", "(", "annotated", "element", ")", ")", "{", "meta", "annotations", "add", "all", "(", "find", "meta", "annotations", "(", "annotation", "annotation", "type", "(", ")", ",", "meta", "annotation", "type", ")", ")", ";", "}", "return", "unmodifiable", "list", "(", "meta", "annotations", ")", ";", "}" ]
[ "applies", "a", "transformation", "on", "the", "current", "edge", "value", "and", "the", "value", "of", "the", "matched", "tuple", "of", "the", "input", "data", "set" ]
[ "ev", "edge", "join", "(", "ev", "edge", "value", ",", "t", "input", "value", ")", "throws", "exception", ";" ]
[ "return", "the", "j", "s", "o", "n", "array", "in", "cache" ]
[ "public", "j", "s", "o", "n", "array", "get", "j", "s", "o", "n", "array", "(", "@", "non", "null", "final", "string", "key", ")", "{", "return", "get", "j", "s", "o", "n", "array", "(", "key", ",", "null", ")", ";", "}" ]
[ "tests", "the", "following", "sequence", "of", "steps", ":", "1", "start", "snapshot", "of", "two", "shards", "(", "both", "located", "on", "separate", "data", "nodes", ")", "2", "have", "one", "of", "the", "shards", "snapshot", "completely", "and", "the", "other", "block", "3", "restart", "the", "data", "node", "that", "completed", "its", "shard", "snapshot", "4", "make", "sure", "that", "snapshot", "status", "a", "p", "is", "show", "correct", "file", "-", "counts", "and", "-", "sizes" ]
[ "public", "void", "test", "correct", "counts", "for", "done", "shards", "(", ")", "throws", "exception", "{", "final", "string", "index", "one", "=", "\"", "index", "-", "1", "\"", ";", "final", "string", "index", "two", "=", "\"", "index", "-", "2", "\"", ";", "final", "list", "<", "string", ">", "data", "nodes", "=", "internal", "cluster", "(", ")", "start", "data", "only", "nodes", "(", "2", ")", ";", "final", "string", "data", "node", "one", "=", "data", "nodes", "get", "(", "0", ")", ";", "final", "string", "data", "node", "two", "=", "data", "nodes", "get", "(", "1", ")", ";", "create", "index", "(", "index", "one", ",", "single", "shard", "one", "node", "(", "data", "node", "one", ")", ")", ";", "index", "doc", "(", "index", "one", ",", "\"", "some", "doc", "id", "\"", ",", "\"", "foo", "\"", ",", "\"", "bar", "\"", ")", ";", "create", "index", "(", "index", "two", ",", "single", "shard", "one", "node", "(", "data", "node", "two", ")", ")", ";", "index", "doc", "(", "index", "two", ",", "\"", "some", "doc", "id", "\"", ",", "\"", "foo", "\"", ",", "\"", "bar", "\"", ")", ";", "final", "string", "repo", "name", "=", "\"", "test", "-", "repo", "\"", ";", "create", "repository", "(", "repo", "name", ",", "\"", "mock", "\"", ")", ";", "block", "data", "node", "(", "repo", "name", ",", "data", "node", "one", ")", ";", "final", "string", "snapshot", "one", "=", "\"", "snap", "-", "1", "\"", ";", "/", "/", "restarting", "a", "data", "node", "below", "so", "using", "a", "master", "client", "here", "final", "action", "future", "<", "create", "snapshot", "response", ">", "response", "snapshot", "one", "=", "internal", "cluster", "(", ")", "master", "client", "(", ")", "admin", "(", ")", "cluster", "(", ")", "prepare", "create", "snapshot", "(", "repo", "name", ",", "snapshot", "one", ")", "set", "wait", "for", "completion", "(", "true", ")", "execute", "(", ")", ";", "assert", "busy", "(", "(", ")", "-", ">", "{", "final", "snapshot", "status", "snapshot", "status", "one", "=", "get", "snapshot", "status", "(", "repo", "name", ",", "snapshot", "one", ")", ";", "final", "snapshot", "index", "shard", "status", "snapshot", "shard", "state", "=", "state", "first", "shard", "(", "snapshot", "status", "one", ",", "index", "two", ")", ";", "assert", "that", "(", "snapshot", "shard", "state", "get", "stage", "(", ")", ",", "is", "(", "snapshot", "index", "shard", "stage", "done", ")", ")", ";", "assert", "that", "(", "snapshot", "shard", "state", "get", "stats", "(", ")", "get", "total", "file", "count", "(", ")", ",", "greater", "than", "(", "0", ")", ")", ";", "assert", "that", "(", "snapshot", "shard", "state", "get", "stats", "(", ")", "get", "total", "size", "(", ")", ",", "greater", "than", "(", "0l", ")", ")", ";", "}", ",", "30l", ",", "time", "unit", "seconds", ")", ";", "final", "snapshot", "stats", "snapshot", "shard", "stats", "=", "state", "first", "shard", "(", "get", "snapshot", "status", "(", "repo", "name", ",", "snapshot", "one", ")", ",", "index", "two", ")", "get", "stats", "(", ")", ";", "final", "int", "total", "files", "=", "snapshot", "shard", "stats", "get", "total", "file", "count", "(", ")", ";", "final", "long", "total", "file", "size", "=", "snapshot", "shard", "stats", "get", "total", "size", "(", ")", ";", "internal", "cluster", "(", ")", "restart", "node", "(", "data", "node", "two", ")", ";", "final", "snapshot", "index", "shard", "status", "snapshot", "shard", "state", "after", "node", "restart", "=", "state", "first", "shard", "(", "get", "snapshot", "status", "(", "repo", "name", ",", "snapshot", "one", ")", ",", "index", "two", ")", ";", "assert", "that", "(", "snapshot", "shard", "state", "after", "node", "restart", "get", "stage", "(", ")", ",", "is", "(", "snapshot", "index", "shard", "stage", "done", ")", ")", ";", "assert", "that", "(", "snapshot", "shard", "state", "after", "node", "restart", "get", "stats", "(", ")", "get", "total", "file", "count", "(", ")", ",", "equal", "to", "(", "total", "files", ")", ")", ";", "assert", "that", "(", "snapshot", "shard", "state", "after", "node", "restart", "get", "stats", "(", ")", "get", "total", "size", "(", ")", ",", "equal", "to", "(", "total", "file", "size", ")", ")", ";", "unblock", "all", "data", "nodes", "(", "repo", "name", ")", ";", "assert", "that", "(", "response", "snapshot", "one", "get", "(", ")", "get", "snapshot", "info", "(", ")", "state", "(", ")", ",", "is", "(", "snapshot", "state", "success", ")", ")", ";", "/", "/", "indexing", "another", "document", "to", "the", "second", "index", "so", "it", "will", "do", "writes", "during", "the", "snapshot", "and", "we", "can", "block", "on", "those", "writes", "index", "doc", "(", "index", "two", ",", "\"", "some", "other", "doc", "id", "\"", ",", "\"", "foo", "\"", ",", "\"", "other", "bar", "\"", ")", ";", "block", "data", "node", "(", "repo", "name", ",", "data", "node", "two", ")", ";", "final", "string", "snapshot", "two", "=", "\"", "snap", "-", "2", "\"", ";", "final", "action", "future", "<", "create", "snapshot", "response", ">", "response", "snapshot", "two", "=", "client", "(", ")", "admin", "(", ")", "cluster", "(", ")", "prepare", "create", "snapshot", "(", "repo", "name", ",", "snapshot", "two", ")", "set", "wait", "for", "completion", "(", "true", ")", "execute", "(", ")", ";", "wait", "for", "block", "(", "data", "node", "two", ",", "repo", "name", ")", ";", "assert", "busy", "(", "(", ")", "-", ">", "{", "final", "snapshot", "status", "snapshot", "status", "one", "=", "get", "snapshot", "status", "(", "repo", "name", ",", "snapshot", "one", ")", ";", "final", "snapshot", "status", "snapshot", "status", "two", "=", "get", "snapshot", "status", "(", "repo", "name", ",", "snapshot", "two", ")", ";", "final", "snapshot", "index", "shard", "status", "snapshot", "shard", "state", "one", "=", "state", "first", "shard", "(", "snapshot", "status", "one", ",", "index", "one", ")", ";", "final", "snapshot", "index", "shard", "status", "snapshot", "shard", "state", "two", "=", "state", "first", "shard", "(", "snapshot", "status", "two", ",", "index", "one", ")", ";", "assert", "that", "(", "snapshot", "shard", "state", "one", "get", "stage", "(", ")", ",", "is", "(", "snapshot", "index", "shard", "stage", "done", ")", ")", ";", "assert", "that", "(", "snapshot", "shard", "state", "two", "get", "stage", "(", ")", ",", "is", "(", "snapshot", "index", "shard", "stage", "done", ")", ")", ";", "final", "int", "total", "files", "shard", "one", "=", "snapshot", "shard", "state", "one", "get", "stats", "(", ")", "get", "total", "file", "count", "(", ")", ";", "final", "long", "total", "size", "shard", "one", "=", "snapshot", "shard", "state", "one", "get", "stats", "(", ")", "get", "total", "size", "(", ")", ";", "assert", "that", "(", "total", "files", "shard", "one", ",", "greater", "than", "(", "0", ")", ")", ";", "assert", "that", "(", "total", "size", "shard", "one", ",", "greater", "than", "(", "0l", ")", ")", ";", "assert", "that", "(", "total", "files", "shard", "one", ",", "equal", "to", "(", "snapshot", "shard", "state", "two", "get", "stats", "(", ")", "get", "total", "file", "count", "(", ")", ")", ")", ";", "assert", "that", "(", "total", "size", "shard", "one", ",", "equal", "to", "(", "snapshot", "shard", "state", "two", "get", "stats", "(", ")", "get", "total", "size", "(", ")", ")", ")", ";", "assert", "that", "(", "snapshot", "shard", "state", "two", "get", "stats", "(", ")", "get", "incremental", "file", "count", "(", ")", ",", "equal", "to", "(", "0", ")", ")", ";", "assert", "that", "(", "snapshot", "shard", "state", "two", "get", "stats", "(", ")", "get", "incremental", "size", "(", ")", ",", "equal", "to", "(", "0l", ")", ")", ";", "}", ",", "30l", ",", "time", "unit", "seconds", ")", ";", "unblock", "all", "data", "nodes", "(", "repo", "name", ")", ";", "assert", "that", "(", "response", "snapshot", "two", "get", "(", ")", "get", "snapshot", "info", "(", ")", "state", "(", ")", ",", "is", "(", "snapshot", "state", "success", ")", ")", ";", "}" ]
[ "child", "class", "implements", "this", "method", "to", "realize", "{", "@", "code", "array", "(", ")", "}" ]
[ "abstract", "double", "[", "]", "protected", "array", "(", ")", ";" ]
[ "the", "version", "of", "the", "response", "data", "<", "code", ">", "string", "version", "info", "=", "1", ";", "<", "code", ">" ]
[ "public", "com", "google", "protobuf", "byte", "string", "get", "version", "info", "bytes", "(", ")", "{", "java", "lang", "object", "ref", "=", "version", "info", ";", "if", "(", "ref", "instanceof", "java", "lang", "string", ")", "{", "com", "google", "protobuf", "byte", "string", "b", "=", "com", "google", "protobuf", "byte", "string", "copy", "from", "utf", "8", "(", "(", "java", "lang", "string", ")", "ref", ")", ";", "version", "info", "=", "b", ";", "return", "b", ";", "}", "else", "{", "return", "(", "com", "google", "protobuf", "byte", "string", ")", "ref", ";", "}", "}" ]
[ "like", "{", "{", "@", "link", "#", "get", "revision", "id", "(", "object", "metadata", ",", "string", ")", "}", "}", ",", "but", "retrieves", "the", "revision", "identifier", "from", "{", "@", "link", "s", "3", "object", "attributes", "}" ]
[ "public", "abstract", "string", "get", "revision", "id", "(", "s", "3", "object", "attributes", "s", "3", "attributes", ")", ";" ]
[ "multiplies", "two", "long", "values", "and", "caps", "the", "product", "at", "{", "@", "link", "long", "#", "max", "value", "}" ]
[ "public", "static", "long", "multiply", "cap", "(", "long", "a", ",", "long", "b", ")", "{", "long", "u", "=", "a", "*", "b", ";", "if", "(", "(", "(", "a", "|", "b", ")", ">", ">", ">", "31", ")", "!", "=", "0", ")", "{", "if", "(", "u", "/", "a", "!", "=", "b", ")", "{", "return", "long", "max", "value", ";", "}", "}", "return", "u", ";", "}" ]
[ "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", "\"", ")", ";", "}" ]
[ "checks", "for", "any", "nodes", "which", "are", "in", "maintenance", "and", "if", "maintenance", "has", "expired", ",", "the", "node", "will", "be", "moved", "back", "to", "in", "service", "(", "or", "dead", ")", "as", "required" ]
[ "private", "void", "process", "maintenance", "nodes", "(", ")", "{", "/", "/", "check", "for", "any", "maintenance", "state", "nodes", "which", "need", "to", "be", "expired", "namesystem", "write", "lock", "(", ")", ";", "try", "{", "for", "(", "datanode", "descriptor", "dn", ":", "out", "of", "service", "node", "blocks", "key", "set", "(", ")", ")", "{", "if", "(", "dn", "is", "maintenance", "(", ")", "&", "&", "dn", "maintenance", "expired", "(", ")", ")", "{", "/", "/", "if", "maintenance", "expires", ",", "stop", "tracking", "it", "this", "can", "be", "an", "/", "/", "expensive", "call", ",", "as", "it", "may", "need", "to", "invalidate", "blocks", "therefore", "/", "/", "we", "can", "yield", "and", "retake", "the", "write", "lock", "after", "each", "node", "/", "/", "/", "/", "the", "call", "to", "stop", "maintenance", "makes", "a", "call", "to", "stop", "tracking", "node", "(", ")", "/", "/", "which", "added", "the", "node", "to", "the", "cancelled", "list", "therefore", "expired", "/", "/", "maintenance", "nodes", "do", "not", "need", "to", "be", "added", "to", "the", "to", "remove", "list", "dn", "admin", "stop", "maintenance", "(", "dn", ")", ";", "namesystem", "write", "unlock", "(", ")", ";", "namesystem", "write", "lock", "(", ")", ";", "}", "}", "}", "finally", "{", "namesystem", "write", "unlock", "(", ")", ";", "}", "}" ]
[ "truncate", "the", "file", "in", "the", "indicated", "path", "to", "the", "indicated", "size", "fails", "if", "path", "is", "a", "directory", "fails", "if", "path", "does", "not", "exist", "fails", "if", "path", "is", "not", "closed", "fails", "if", "new", "size", "is", "greater", "than", "current", "size" ]
[ "public", "boolean", "truncate", "(", "path", "f", ",", "long", "new", "length", ")", "throws", "i", "o", "exception", "{", "throw", "new", "unsupported", "operation", "exception", "(", "\"", "not", "implemented", "by", "the", "\"", "+", "get", "class", "(", ")", "get", "simple", "name", "(", ")", "+", "\"", "file", "system", "implementation", "\"", ")", ";", "}" ]
[ "returns", "the", "contents", "of", "an", "object", "as", "an", "unparsed", "bytes", "reference", "this", "is", "useful", "for", "things", "like", "mappings", "where", "we", "'", "re", "copying", "bytes", "around", "but", "don", "'", "t", "actually", "need", "to", "parse", "their", "contents", ",", "and", "so", "avoids", "building", "large", "maps", "of", "maps", "unnecessarily" ]
[ "public", "static", "bytes", "reference", "child", "bytes", "(", "x", "content", "parser", "parser", ")", "throws", "i", "o", "exception", "{", "if", "(", "parser", "current", "token", "(", ")", "!", "=", "x", "content", "parser", "token", "start", "object", ")", "{", "if", "(", "parser", "next", "token", "(", ")", "!", "=", "x", "content", "parser", "token", "start", "object", ")", "{", "throw", "new", "x", "content", "parse", "exception", "(", "parser", "get", "token", "location", "(", ")", ",", "\"", "expected", "[", "start", "object", "]", "but", "got", "[", "\"", "+", "parser", "current", "token", "(", ")", "+", "\"", "]", "\"", ")", ";", "}", "}", "x", "content", "builder", "builder", "=", "x", "content", "builder", "builder", "(", "parser", "content", "type", "(", ")", "x", "content", "(", ")", ")", ";", "builder", "copy", "current", "structure", "(", "parser", ")", ";", "return", "bytes", "reference", "bytes", "(", "builder", ")", ";", "}" ]
[ "gets", "the", "version", "of", "the", "dyld", "slide", "info" ]
[ "public", "int", "get", "version", "(", ")", "{", "return", "version", ";", "}" ]
[ "right", "outer", "join" ]
[ "public", "t", "right", "outer", "join", "(", "string", "joins", ")", "{", "sql", "(", ")", "right", "outer", "join", "add", "all", "(", "arrays", "as", "list", "(", "joins", ")", ")", ";", "return", "get", "self", "(", ")", ";", "}" ]
[ "sets", "the", "writer", "where", "json", "output", "will", "be", "written", "this", "is", "only", "necessary", "when", "not", "using", "the", "to", "json", "methods" ]
[ "public", "void", "set", "writer", "(", "writer", "writer", ")", "{", "if", "(", "!", "(", "writer", "instanceof", "json", "writer", ")", ")", "writer", "=", "new", "json", "writer", "(", "writer", ")", ";", "this", "writer", "=", "(", "json", "writer", ")", "writer", ";", "this", "writer", "set", "output", "type", "(", "output", "type", ")", ";", "this", "writer", "set", "quote", "long", "values", "(", "quote", "long", "values", ")", ";", "}" ]
[ "get", "pet", "id" ]
[ "public", "long", "get", "pet", "id", "(", ")", "{", "return", "pet", "id", ";", "}" ]
[ "returns", "the", "first", "record", "in", "the", "specified", "{", "@", "code", "section", "}", "of", "this", "dns", "message", "when", "the", "specified", "{", "@", "code", "section", "}", "is", "{", "@", "link", "dns", "section", "#", "question", "}", ",", "the", "type", "of", "the", "returned", "record", "is", "always", "{", "@", "link", "dns", "question", "}" ]
[ "<", "t", "extends", "dns", "record", ">", "t", "record", "at", "(", "dns", "section", "section", ")", ";" ]
[ "finds", "pets", "by", "tags", "multiple", "tags", "can", "be", "provided", "with", "comma", "separated", "strings", "use", "tag", "1", ",", "tag", "2", ",", "tag", "3", "for", "testing" ]
[ "public", "void", "find", "pets", "by", "tags", "test", "(", ")", "throws", "api", "exception", "{", "/", "/", "list", "<", "string", ">", "tags", "=", "null", ";", "/", "/", "list", "<", "pet", ">", "response", "=", "api", "find", "pets", "by", "tags", "(", "tags", ")", ";", "/", "/", "todo", ":", "test", "validations", "}" ]
[ "get", "the", "comments", "for", "this", "history", "object" ]
[ "public", "string", "get", "comments", "(", ")", "{", "return", "comments", ";", "}" ]
[ "the", "emitter", "for", "a", "transactional", "spout", "runs", "as", "many", "tasks", "across", "the", "cluster", "emitters", "are", "responsible", "for", "emitting", "batches", "of", "tuples", "for", "a", "transaction", "and", "must", "ensure", "that", "the", "same", "batch", "of", "tuples", "is", "always", "emitted", "for", "the", "same", "transaction", "id" ]
[ "emitter", "<", "t", ">", "get", "emitter", "(", "map", "conf", ",", "topology", "context", "context", ")", ";" ]
[ "tests", "that", "the", "unregister", "cause", "is", "being", "forwarded", "when", "failing", "allocations" ]
[ "public", "void", "unregister", "task", "manager", "with", "allocated", "slot", "fails", "allocations", "with", "cause", "(", ")", "throws", "exception", "{", "completable", "future", "<", "exception", ">", "allocation", "failure", "cause", "=", "new", "completable", "future", "<", ">", "(", ")", ";", "testing", "resource", "actions", "resource", "actions", "=", "new", "testing", "resource", "actions", "builder", "(", ")", "set", "notify", "allocation", "failure", "consumer", "(", "job", "i", "d", "allocation", "i", "d", "exception", "tuple", "3", "-", ">", "allocation", "failure", "cause", "complete", "(", "job", "i", "d", "allocation", "i", "d", "exception", "tuple", "3", "f", "2", ")", ")", "build", "(", ")", ";", "flink", "exception", "failure", "cause", "=", "new", "flink", "exception", "(", "\"", "unregister", "task", "manager", "test", "exception", "\"", ")", ";", "try", "(", "slot", "manager", "impl", "slot", "manager", "=", "create", "slot", "manager", "(", "resource", "manager", "id", "generate", "(", ")", ",", "resource", "actions", ")", ")", "{", "task", "executor", "connection", "task", "executor", "connection", "=", "create", "task", "executor", "connection", "(", ")", ";", "slot", "report", "slot", "report", "=", "create", "single", "allocated", "slot", "report", "(", "task", "executor", "connection", "get", "resource", "i", "d", "(", ")", ",", "new", "job", "i", "d", "(", ")", ")", ";", "slot", "manager", "register", "task", "manager", "(", "task", "executor", "connection", ",", "slot", "report", ",", "resource", "profile", "any", ",", "resource", "profile", "any", ")", ";", "slot", "manager", "unregister", "task", "manager", "(", "task", "executor", "connection", "get", "instance", "i", "d", "(", ")", ",", "failure", "cause", ")", ";", "assert", "that", "(", "allocation", "failure", "cause", "get", "(", ")", ",", "flink", "matchers", "contains", "cause", "(", "failure", "cause", ")", ")", ";", "}", "}" ]
[ "parses", "an", "annotation", "value" ]
[ "private", "constant", "parse", "value", "(", ")", "throws", "i", "o", "exception", "{", "int", "tag", "=", "input", "read", "unsigned", "byte", "(", ")", ";", "if", "(", "observer", "!", "=", "null", ")", "{", "cst", "string", "human", "tag", "=", "new", "cst", "string", "(", "character", "to", "string", "(", "(", "char", ")", "tag", ")", ")", ";", "parsed", "(", "1", ",", "\"", "tag", ":", "\"", "+", "human", "tag", "to", "quoted", "(", ")", ")", ";", "}", "switch", "(", "tag", ")", "{", "case", "'", "b", "'", ":", "{", "cst", "integer", "value", "=", "(", "cst", "integer", ")", "parse", "constant", "(", ")", ";", "return", "cst", "byte", "make", "(", "value", "get", "value", "(", ")", ")", ";", "}", "case", "'", "c", "'", ":", "{", "cst", "integer", "value", "=", "(", "cst", "integer", ")", "parse", "constant", "(", ")", ";", "int", "int", "value", "=", "value", "get", "value", "(", ")", ";", "return", "cst", "char", "make", "(", "value", "get", "value", "(", ")", ")", ";", "}", "case", "'", "d", "'", ":", "{", "cst", "double", "value", "=", "(", "cst", "double", ")", "parse", "constant", "(", ")", ";", "return", "value", ";", "}", "case", "'", "f", "'", ":", "{", "cst", "float", "value", "=", "(", "cst", "float", ")", "parse", "constant", "(", ")", ";", "return", "value", ";", "}", "case", "'", "i", "'", ":", "{", "cst", "integer", "value", "=", "(", "cst", "integer", ")", "parse", "constant", "(", ")", ";", "return", "value", ";", "}", "case", "'", "j", "'", ":", "{", "cst", "long", "value", "=", "(", "cst", "long", ")", "parse", "constant", "(", ")", ";", "return", "value", ";", "}", "case", "'", "s", "'", ":", "{", "cst", "integer", "value", "=", "(", "cst", "integer", ")", "parse", "constant", "(", ")", ";", "return", "cst", "short", "make", "(", "value", "get", "value", "(", ")", ")", ";", "}", "case", "'", "z", "'", ":", "{", "cst", "integer", "value", "=", "(", "cst", "integer", ")", "parse", "constant", "(", ")", ";", "return", "cst", "boolean", "make", "(", "value", "get", "value", "(", ")", ")", ";", "}", "case", "'", "c", "'", ":", "{", "int", "class", "info", "index", "=", "input", "read", "unsigned", "short", "(", ")", ";", "cst", "string", "value", "=", "(", "cst", "string", ")", "pool", "get", "(", "class", "info", "index", ")", ";", "type", "type", "=", "type", "intern", "return", "type", "(", "value", "get", "string", "(", ")", ")", ";", "if", "(", "observer", "!", "=", "null", ")", "{", "parsed", "(", "2", ",", "\"", "class", "info", ":", "\"", "+", "type", "to", "human", "(", ")", ")", ";", "}", "return", "new", "cst", "type", "(", "type", ")", ";", "}", "case", "'", "s", "'", ":", "{", "return", "parse", "constant", "(", ")", ";", "}", "case", "'", "e", "'", ":", "{", "require", "length", "(", "4", ")", ";", "int", "type", "name", "index", "=", "input", "read", "unsigned", "short", "(", ")", ";", "int", "const", "name", "index", "=", "input", "read", "unsigned", "short", "(", ")", ";", "cst", "string", "type", "name", "=", "(", "cst", "string", ")", "pool", "get", "(", "type", "name", "index", ")", ";", "cst", "string", "const", "name", "=", "(", "cst", "string", ")", "pool", "get", "(", "const", "name", "index", ")", ";", "if", "(", "observer", "!", "=", "null", ")", "{", "parsed", "(", "2", ",", "\"", "type", "name", ":", "\"", "+", "type", "name", "to", "human", "(", ")", ")", ";", "parsed", "(", "2", ",", "\"", "const", "name", ":", "\"", "+", "const", "name", "to", "human", "(", ")", ")", ";", "}", "return", "new", "cst", "enum", "ref", "(", "new", "cst", "nat", "(", "const", "name", ",", "type", "name", ")", ")", ";", "}", "case", "'", "@", "'", ":", "{", "annotation", "annotation", "=", "parse", "annotation", "(", "annotation", "visibility", "embedded", ")", ";", "return", "new", "cst", "annotation", "(", "annotation", ")", ";", "}", "case", "'", "[", "'", ":", "{", "require", "length", "(", "2", ")", ";", "int", "num", "values", "=", "input", "read", "unsigned", "short", "(", ")", ";", "cst", "array", "list", "list", "=", "new", "cst", "array", "list", "(", "num", "values", ")", ";", "if", "(", "observer", "!", "=", "null", ")", "{", "parsed", "(", "2", ",", "\"", "num", "values", ":", "\"", "+", "num", "values", ")", ";", "change", "indent", "(", "1", ")", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "num", "values", ";", "i", "+", "+", ")", "{", "if", "(", "observer", "!", "=", "null", ")", "{", "change", "indent", "(", "-", "1", ")", ";", "parsed", "(", "0", ",", "\"", "element", "value", "[", "\"", "+", "i", "+", "\"", "]", ":", "\"", ")", ";", "change", "indent", "(", "1", ")", ";", "}", "list", "set", "(", "i", ",", "parse", "value", "(", ")", ")", ";", "}", "if", "(", "observer", "!", "=", "null", ")", "{", "change", "indent", "(", "-", "1", ")", ";", "}", "list", "set", "immutable", "(", ")", ";", "return", "new", "cst", "array", "(", "list", ")", ";", "}", "default", ":", "{", "throw", "new", "parse", "exception", "(", "\"", "unknown", "annotation", "tag", ":", "\"", "+", "hex", "u", "1", "(", "tag", ")", ")", ";", "}", "}", "}" ]
[ "model", "tests", "for", "outer", "enum" ]
[ "public", "void", "test", "outer", "enum", "(", ")", "{", "/", "/", "todo", ":", "test", "outer", "enum", "}" ]
[ "specify", "the", "{", "@", "link", "document", "loader", "}", "to", "use", "the", "default", "implementation", "is", "{", "@", "link", "default", "document", "loader", "}", "which", "loads", "{", "@", "link", "document", "}", "instances", "using", "jaxp" ]
[ "public", "void", "set", "document", "loader", "(", "@", "nullable", "document", "loader", "document", "loader", ")", "{", "this", "document", "loader", "=", "(", "document", "loader", "!", "=", "null", "?", "document", "loader", ":", "new", "default", "document", "loader", "(", ")", ")", ";", "}" ]
[ "returns", "a", "string", "representing", "all", "items", "selected", "in", "the", "pulldown", "if", "multiple", "items", "are", "selected", ",", "they", "will", "be", "comma", "-", "delimited" ]
[ "private", "string", "get", "selection", "text", "(", ")", "{", "list", "<", "string", ">", "values", "=", "new", "array", "list", "<", ">", "(", ")", ";", "for", "(", "t", "t", ":", "selected", "values", ")", "{", "values", "add", "(", "data", "model", "get", "display", "text", "(", "t", ")", ")", ";", "}", "return", "string", "utils", "join", "(", "values", "iterator", "(", ")", ",", "\"", ",", "\"", ")", ";", "}" ]
[ "gets", "the", "private", "dependencies", "of", "the", "bundle" ]
[ "private", "map", "<", "string", ",", "set", "<", "string", ">", ">", "get", "bundle", "provided", "map", "(", "configuration", "bundle", "classpath", ")", "{", "map", "<", "string", ",", "set", "<", "string", ">", ">", "bundle", "map", "=", "new", "hash", "map", "<", ">", "(", ")", ";", "bundle", "classpath", "get", "dependencies", "(", ")", "for", "each", "(", "new", "consumer", "<", "dependency", ">", "(", ")", "{", "@", "override", "public", "void", "accept", "(", "dependency", "dependency", ")", "{", "if", "(", "dependency", "instanceof", "default", "project", "dependency", ")", "{", "default", "project", "dependency", "project", "dependency", "=", "(", "default", "project", "dependency", ")", "dependency", ";", "string", "key", "=", "project", "dependency", "get", "group", "(", ")", "+", "\"", ":", "\"", "+", "project", "dependency", "get", "name", "(", ")", ";", "set", "<", "string", ">", "provided", "sets", "=", "new", "hash", "set", "<", ">", "(", ")", ";", "try", "{", "project", "dependency", "get", "dependency", "project", "(", ")", "get", "configurations", "(", ")", "get", "by", "name", "(", "\"", "compile", "\"", ")", "get", "dependencies", "(", ")", "for", "each", "(", "new", "consumer", "<", "dependency", ">", "(", ")", "{", "@", "override", "public", "void", "accept", "(", "dependency", "dependency", ")", "{", "if", "(", "\"", "com", "android", "support", "\"", "equals", "(", "dependency", "get", "group", "(", ")", ")", "|", "|", "\"", "com", "android", "databinding", "\"", "equals", "(", "dependency", "get", "group", "(", ")", ")", ")", "{", "provided", "sets", "add", "(", "dependency", "get", "group", "(", ")", "+", "\"", ":", "\"", "+", "dependency", "get", "name", "(", ")", ")", ";", "}", "}", "}", ")", ";", "project", "dependency", "get", "dependency", "project", "(", ")", "get", "configurations", "(", ")", "get", "by", "name", "(", "atlas", "plugin", "provided", "compile", ")", "get", "dependencies", "(", ")", "for", "each", "(", "new", "consumer", "<", "dependency", ">", "(", ")", "{", "@", "override", "public", "void", "accept", "(", "dependency", "dependency", ")", "{", "provided", "sets", "add", "(", "dependency", "get", "group", "(", ")", "+", "\"", ":", "\"", "+", "dependency", "get", "name", "(", ")", ")", ";", "}", "}", ")", ";", "}", "catch", "(", "unknown", "configuration", "exception", "e", ")", "{", "}", "bundle", "map", "put", "(", "key", ",", "provided", "sets", ")", ";", "}", "}", "}", ")", ";", "return", "bundle", "map", ";", "}" ]
[ "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", "\"", ")", ";", "}" ]
[ "model", "tests", "for", "additional", "properties", "object" ]
[ "public", "void", "test", "additional", "properties", "object", "(", ")", "{", "/", "/", "todo", ":", "test", "additional", "properties", "object", "}" ]
[ "get", "package", "configs" ]
[ "public", "string", "get", "package", "config", "by", "name", "(", "string", "name", ")", "{", "if", "(", "package", "config", "!", "=", "null", ")", "{", "return", "package", "config", "get", "(", "name", ")", ";", "}", "return", "null", ";", "}" ]
[ "returns", "all", "{", "@", "link", "cached", "entity", "}", "instances", "for", "the", "given", "type", "the", "difference", "with", "{", "@", "link", "#", "find", "in", "cache", "(", "class", ")", "}", "is", "that", "here", "the", "whole", "{", "@", "link", "cached", "entity", "}", "is", "returned", ",", "which", "gives", "access", "to", "the", "persistent", "state", "at", "the", "moment", "of", "putting", "it", "in", "the", "cache" ]
[ "<", "t", ">", "collection", "<", "cached", "entity", ">", "find", "in", "cache", "as", "cached", "objects", "(", "class", "<", "t", ">", "entity", "class", ")", ";" ]
[ "register", "a", "listener", "that", "will", "be", "called", "when", "this", "model", "visibility", "has", "changed", "the", "listener", "will", "contribute", "to", "this", "model", "'", "s", "hash", "code", "state", "per", "the", "{", "@", "link", "com", "airbnb", "epoxy", "epoxy", "attribute", "option", "#", "do", "not", "hash", "}", "rules" ]
[ "public", "saved", "state", "view", "model", "on", "visibility", "changed", "(", "on", "model", "visibility", "changed", "listener", "<", "saved", "state", "view", "model", ",", "saved", "state", "view", ">", "listener", ")", "{", "on", "mutation", "(", ")", ";", "this", "on", "model", "visibility", "changed", "listener", "epoxy", "generated", "model", "=", "listener", ";", "return", "this", ";", "}" ]
[ "same", "as", "{", "@", "link", "#", "new", "restorable", "context", "(", "boolean", ")", "}", "but", "wraps", "an", "existing", "context", "to", "restore" ]
[ "public", "supplier", "<", "stored", "context", ">", "wrap", "restorable", "(", "stored", "context", "stored", "context", ")", "{", "return", "(", ")", "-", ">", "{", "stored", "context", "context", "=", "new", "stored", "context", "(", "false", ")", ";", "stored", "context", "restore", "(", ")", ";", "return", "context", ";", "}", ";", "}" ]
[ "return", "the", "assigned", "{", "@", "link", "byte", "buf", "allocator", "}", "which", "will", "be", "used", "to", "allocate", "{", "@", "link", "byte", "buf", "}", "s" ]
[ "byte", "buf", "allocator", "alloc", "(", ")", ";" ]
[ "returns", "an", "immutable", "copy", "of", "the", "current", "contents", "of", "this", "set", "view", "does", "not", "support", "null", "elements", "<", "b", ">", "warning", ":", "<", "b", ">", "this", "may", "have", "unexpected", "results", "if", "a", "backing", "set", "of", "this", "view", "uses", "a", "nonstandard", "notion", "of", "equivalence", ",", "for", "example", "if", "it", "is", "a", "{", "@", "link", "tree", "set", "}", "using", "a", "comparator", "that", "is", "inconsistent", "with", "{", "@", "link", "object", "#", "equals", "(", "object", ")", "}" ]
[ "public", "immutable", "set", "<", "e", ">", "immutable", "copy", "(", ")", "{", "return", "immutable", "set", "copy", "of", "(", "this", ")", ";", "}" ]
[ "return", "the", "sub", "-", "event", "type", "for", "this", "change", "record", "a", "value", "of", "0", "is", "the", "default", "if", "unspecified" ]
[ "public", "int", "get", "sub", "event", "type", "(", ")", "{", "return", "sub", "event", "type", ";", "}" ]
[ "callback", "hook", "for", "nested", "spring", ":", "param", "tags", "to", "pass", "their", "value", "to", "the", "parent", "tag" ]
[ "void", "add", "param", "(", "param", "param", ")", ";" ]
[ "create", "a", "new", "{", "@", "code", "bean", "definition", "builder", "}", "used", "to", "construct", "a", "{", "@", "link", "root", "bean", "definition", "}" ]
[ "public", "static", "bean", "definition", "builder", "root", "bean", "definition", "(", "string", "bean", "class", "name", ",", "@", "nullable", "string", "factory", "method", "name", ")", "{", "bean", "definition", "builder", "builder", "=", "new", "bean", "definition", "builder", "(", "new", "root", "bean", "definition", "(", ")", ")", ";", "builder", "bean", "definition", "set", "bean", "class", "name", "(", "bean", "class", "name", ")", ";", "builder", "bean", "definition", "set", "factory", "method", "name", "(", "factory", "method", "name", ")", ";", "return", "builder", ";", "}" ]
[ "used", "as", "a", "hook", "to", "inject", "intercept", "when", "b", "p", "offer", "service", "hold", "lock" ]
[ "public", "void", "delay", "when", "offer", "service", "hold", "lock", "(", ")", "{", "}" ]
[ "subtract", "two", "varnodes", "to", "get", "a", "new", "value", "this", "could", "create", "a", "new", "space", "and", "return", "a", "varnode", "pointed", "into", "that", "space" ]
[ "public", "varnode", "subtract", "(", "varnode", "val", "1", ",", "varnode", "val", "2", ",", "context", "evaluator", "evaluator", ")", "throws", "not", "found", "exception", "{", "/", "/", "degenerate", "case", ",", "don", "'", "t", "need", "to", "know", "the", "value", "if", "(", "val", "1", "equals", "(", "val", "2", ")", ")", "{", "return", "create", "varnode", "(", "0", ",", "addr", "factory", "get", "constant", "space", "(", ")", "get", "space", "i", "d", "(", ")", ",", "val", "1", "get", "size", "(", ")", ")", ";", "}", "int", "space", "i", "d", "=", "val", "1", "get", "space", "(", ")", ";", "long", "valbase", "=", "0", ";", "if", "(", "val", "1", "is", "constant", "(", ")", ")", "{", "valbase", "=", "val", "1", "get", "offset", "(", ")", ";", "}", "else", "if", "(", "is", "register", "(", "val", "1", ")", ")", "{", "register", "reg", "=", "trans", "get", "register", "(", "val", "1", ")", ";", "if", "(", "reg", "=", "=", "null", ")", "{", "throw", "not", "found", "exc", ";", "}", "space", "i", "d", "=", "get", "address", "space", "(", "reg", "get", "name", "(", ")", ")", ";", "valbase", "=", "0", ";", "}", "else", "if", "(", "is", "symbolic", "space", "(", "space", "i", "d", ")", ")", "{", "instruction", "instr", "=", "get", "current", "instruction", "(", "offset", "context", "get", "address", "(", ")", ")", ";", "valbase", "=", "val", "1", "get", "offset", "(", ")", ";", "if", "(", "evaluator", "!", "=", "null", ")", "{", "long", "uval", "=", "evaluator", "unknown", "value", "(", "this", ",", "instr", ",", "val", "1", ")", ";", "if", "(", "uval", "!", "=", "null", ")", "{", "valbase", "=", "uval", "long", "value", "(", ")", ";", "/", "/", "valbase", "+", "=", "uval", "long", "value", "(", ")", ";", "/", "/", "space", "i", "d", "=", "val", "2", "get", "space", "(", ")", ";", "return", "add", "(", "create", "constant", "varnode", "(", "valbase", ",", "val", "1", "get", "size", "(", ")", ")", ",", "val", "2", ",", "evaluator", ")", ";", "}", "}", "}", "else", "{", "throw", "not", "found", "exc", ";", "}", "long", "result", "=", "(", "valbase", "-", "get", "constant", "(", "val", "2", ",", "null", ")", ")", "&", "(", "0xffffffffffffffff", "l", ">", ">", ">", "(", "(", "8", "-", "val", "1", "get", "size", "(", ")", ")", "*", "8", ")", ")", ";", "return", "create", "varnode", "(", "result", ",", "space", "i", "d", ",", "val", "1", "get", "size", "(", ")", ")", ";", "}" ]
[ "returns", "a", "{", "@", "link", "session", "command", "group", "}", "with", "custom", "commands", "to", "publish", "to", "the", "controller", ",", "or", "{", "@", "code", "null", "}", "if", "no", "custom", "commands", "should", "be", "published" ]
[ "session", "command", "group", "get", "custom", "commands", "(", "media", "session", "session", ",", "controller", "info", "controller", "info", ")", ";" ]
[ "loads", "settings", "from", "the", "actual", "string", "content", "that", "represents", "them", "using", "{", "@", "link", "#", "from", "x", "content", "(", "x", "content", "parser", ")", "}" ]
[ "public", "builder", "load", "from", "source", "(", "string", "source", ",", "x", "content", "type", "x", "content", "type", ")", "{", "try", "(", "x", "content", "parser", "parser", "=", "x", "content", "factory", "x", "content", "(", "x", "content", "type", ")", "create", "parser", "(", "named", "x", "content", "registry", "empty", ",", "logging", "deprecation", "handler", "instance", ",", "source", ")", ")", "{", "this", "put", "(", "from", "x", "content", "(", "parser", ",", "true", ",", "true", ")", ")", ";", "}", "catch", "(", "exception", "e", ")", "{", "throw", "new", "settings", "exception", "(", "\"", "failed", "to", "load", "settings", "from", "[", "\"", "+", "source", "+", "\"", "]", "\"", ",", "e", ")", ";", "}", "return", "this", ";", "}" ]
[ "the", "n", "recent", "valid", "snapshots" ]
[ "public", "list", "<", "file", ">", "find", "n", "valid", "snapshots", "(", "int", "n", ")", "throws", "i", "o", "exception", "{", "file", "snap", "snaplog", "=", "new", "file", "snap", "(", "snap", "dir", ")", ";", "return", "snaplog", "find", "n", "valid", "snapshots", "(", "n", ")", ";", "}" ]
[ "examine", "the", "returned", "expiry", "time", "and", "validate", "it", "against", "expectations", "allows", "for", "some", "flexibility", "in", "local", "clock", ",", "but", "not", "much" ]
[ "public", "void", "test", "session", "token", "expiry", "(", ")", "throws", "exception", "{", "configuration", "conf", "=", "new", "configuration", "(", "get", "contract", "(", ")", "get", "conf", "(", ")", ")", ";", "marshalled", "credentials", "sc", "=", "request", "session", "credentials", "(", "conf", ",", "get", "file", "system", "(", ")", "get", "bucket", "(", ")", ")", ";", "long", "permitted", "expiry", "offset", "=", "60", ";", "offset", "date", "time", "expiration", "timestamp", "=", "sc", "get", "expiration", "date", "time", "(", ")", "get", "(", ")", ";", "offset", "date", "time", "local", "timestamp", "=", "offset", "date", "time", "now", "(", ")", ";", "assert", "true", "(", "\"", "local", "time", "of", "\"", "+", "local", "timestamp", "+", "\"", "is", "after", "expiry", "time", "of", "\"", "+", "expiration", "timestamp", ",", "local", "timestamp", "is", "before", "(", "expiration", "timestamp", ")", ")", ";", "/", "/", "what", "is", "the", "interval", "duration", "actual", "duration", "=", "duration", "between", "(", "local", "timestamp", ",", "expiration", "timestamp", ")", ";", "duration", "offset", "=", "actual", "duration", "minus", "(", "test", "session", "token", "duration", ")", ";", "assert", "that", "(", "\"", "duration", "of", "session", "\"", "+", "actual", "duration", "+", "\"", "out", "of", "expected", "range", "of", "with", "\"", "+", "offset", "+", "\"", "this", "host", "'", "s", "clock", "may", "be", "wrong", "\"", ",", "offset", "get", "seconds", "(", ")", ",", "matchers", "less", "than", "or", "equal", "to", "(", "permitted", "expiry", "offset", ")", ")", ";", "}" ]