docstring_tokens
list
code_tokens
list
[ "the", "name", "of", "the", "field", "highlighted" ]
[ "public", "string", "name", "(", ")", "{", "return", "name", ";", "}" ]
[ "ensure", "that", "all", "ranges", "of", "data", "written", "to", "the", "cache", "file", "are", "written", "to", "the", "storage", "device", "that", "contains", "it", "this", "method", "performs", "synchronization", "only", "if", "data", "has", "been", "written", "to", "the", "cache", "since", "the", "last", "time", "the", "method", "was", "called", "if", "calling", "this", "method", "resulted", "in", "performing", "a", "synchronization", ",", "a", "sorted", "set", "of", "all", "successfully", "written", "ranges", "of", "data", "since", "the", "creation", "of", "the", "cache", "file", "is", "returned", "if", "the", "cache", "file", "is", "evicted", "or", "if", "a", "concurrent", "thread", "is", "already", "fsyncing", "the", "file", "this", "method", "returns", "an", "empty", "set", "of", "ranges" ]
[ "public", "sorted", "set", "<", "tuple", "<", "long", ",", "long", ">", ">", "fsync", "(", ")", "throws", "i", "o", "exception", "{", "if", "(", "ref", "counter", "try", "inc", "ref", "(", ")", ")", "{", "try", "{", "if", "(", "needs", "fsync", "compare", "and", "set", "(", "true", ",", "false", ")", ")", "{", "boolean", "success", "=", "false", ";", "try", "{", "/", "/", "capture", "the", "completed", "ranges", "before", "fsyncing", ";", "ranges", "that", "are", "completed", "after", "this", "point", "won", "'", "t", "be", "considered", "as", "/", "/", "persisted", "on", "disk", "by", "the", "caller", "of", "this", "method", ",", "even", "if", "they", "are", "fully", "written", "to", "disk", "at", "the", "time", "the", "file", "/", "/", "fsync", "is", "effectively", "executed", "final", "sorted", "set", "<", "tuple", "<", "long", ",", "long", ">", ">", "completed", "ranges", "=", "tracker", "get", "completed", "ranges", "(", ")", ";", "assert", "completed", "ranges", "!", "=", "null", ";", "assert", "completed", "ranges", "is", "empty", "(", ")", "=", "=", "false", ";", "i", "o", "utils", "fsync", "(", "file", ",", "false", ",", "false", ")", ";", "success", "=", "true", ";", "return", "completed", "ranges", ";", "}", "finally", "{", "if", "(", "success", "=", "=", "false", ")", "{", "mark", "as", "needs", "f", "sync", "(", ")", ";", "}", "}", "}", "}", "finally", "{", "ref", "counter", "dec", "ref", "(", ")", ";", "}", "}", "else", "{", "assert", "evicted", "get", "(", ")", ";", "}", "return", "collections", "empty", "sorted", "set", "(", ")", ";", "}" ]
[ "return", "a", "matching", "expectation", ",", "or", "{", "@", "code", "null", "}", "if", "none", "match" ]
[ "public", "request", "expectation", "find", "expectation", "(", "client", "http", "request", "request", ")", "throws", "i", "o", "exception", "{", "for", "(", "request", "expectation", "expectation", ":", "this", "expectations", ")", "{", "try", "{", "expectation", "match", "(", "request", ")", ";", "return", "expectation", ";", "}", "catch", "(", "assertion", "error", "error", ")", "{", "/", "/", "we", "'", "re", "looking", "to", "find", "a", "match", "or", "return", "null", "}", "}", "return", "null", ";", "}" ]
[ "creates", "new", "component", "file", "text", "content" ]
[ "public", "pair", "<", "string", ",", "string", ">", "create", "litho", "file", "content", "(", "psi", "class", "spec", "cls", ")", "{", "final", "string", "component", "q", "n", "=", "litho", "plugin", "utils", "get", "litho", "component", "name", "from", "spec", "(", "spec", "cls", "get", "qualified", "name", "(", ")", ")", ";", "if", "(", "component", "q", "n", "=", "=", "null", ")", "return", "null", ";", "final", "spec", "model", "model", "=", "get", "or", "create", "spec", "model", "(", "spec", "cls", ")", ";", "if", "(", "model", "=", "=", "null", ")", "return", "null", ";", "final", "string", "new", "content", "=", "create", "file", "content", "from", "model", "(", "component", "q", "n", ",", "model", ")", ";", "return", "pair", "create", "(", "component", "q", "n", ",", "new", "content", ")", ";", "}" ]
[ "verify", "that", "the", "input", "stream", "is", "open", "non", "blocking", ";", "this", "gives", "the", "last", "state", "of", "the", "volatile", "{", "@", "link", "#", "closed", "}", "field" ]
[ "private", "void", "check", "not", "closed", "(", ")", "throws", "i", "o", "exception", "{", "if", "(", "closed", ")", "{", "throw", "new", "i", "o", "exception", "(", "uri", "+", "\"", ":", "\"", "+", "f", "s", "exception", "messages", "stream", "is", "closed", ")", ";", "}", "}" ]
[ "draws", "the", "provided", "path", "in", "filled", "mode", "with", "the", "provided", "drawable" ]
[ "protected", "void", "draw", "filled", "path", "(", "canvas", "c", ",", "path", "filled", "path", ",", "drawable", "drawable", ")", "{", "if", "(", "clip", "path", "supported", "(", ")", ")", "{", "int", "save", "=", "c", "save", "(", ")", ";", "c", "clip", "path", "(", "filled", "path", ")", ";", "drawable", "set", "bounds", "(", "(", "int", ")", "m", "view", "port", "handler", "content", "left", "(", ")", ",", "(", "int", ")", "m", "view", "port", "handler", "content", "top", "(", ")", ",", "(", "int", ")", "m", "view", "port", "handler", "content", "right", "(", ")", ",", "(", "int", ")", "m", "view", "port", "handler", "content", "bottom", "(", ")", ")", ";", "drawable", "draw", "(", "c", ")", ";", "c", "restore", "to", "count", "(", "save", ")", ";", "}", "else", "{", "throw", "new", "runtime", "exception", "(", "\"", "fill", "-", "drawables", "not", "(", "yet", ")", "supported", "below", "api", "level", "18", ",", "\"", "+", "\"", "this", "code", "was", "run", "on", "api", "level", "\"", "+", "utils", "get", "s", "d", "k", "int", "(", ")", "+", "\"", "\"", ")", ";", "}", "}" ]
[ "helper", "for", "{", "@", "link", "#", "reserve", "registers", "}", ",", "which", "does", "one", "pass", "over", "the", "instructions", ",", "calculating", "the", "number", "of", "registers", "that", "need", "to", "be", "reserved", "it", "also", "updates", "the", "{", "@", "code", "opcodes", "}", "list", "to", "help", "avoid", "extra", "work", "in", "future", "register", "reservation", "passes" ]
[ "private", "int", "calculate", "reserved", "count", "(", "dop", "[", "]", "opcodes", ")", "{", "int", "size", "=", "insns", "size", "(", ")", ";", "/", "*", "*", "potential", "new", "value", "of", "reserved", "count", ",", "which", "gets", "updated", "in", "the", "*", "following", "loop", "it", "starts", "out", "with", "the", "existing", "reserved", "count", "*", "and", "gets", "increased", "if", "it", "turns", "out", "that", "additional", "registers", "*", "need", "to", "be", "reserved", "*", "/", "int", "new", "reserved", "count", "=", "reserved", "count", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "size", ";", "i", "+", "+", ")", "{", "dalv", "insn", "insn", "=", "insns", "get", "(", "i", ")", ";", "dop", "original", "opcode", "=", "opcodes", "[", "i", "]", ";", "dop", "new", "opcode", "=", "find", "opcode", "for", "insn", "(", "insn", ",", "original", "opcode", ")", ";", "if", "(", "new", "opcode", "=", "=", "null", ")", "{", "/", "*", "*", "the", "instruction", "will", "need", "to", "be", "expanded", ",", "so", "find", "the", "*", "expanded", "opcode", "and", "reserve", "registers", "for", "it", "*", "/", "dop", "expanded", "op", "=", "find", "expanded", "opcode", "for", "insn", "(", "insn", ")", ";", "bit", "set", "compat", "regs", "=", "expanded", "op", "get", "format", "(", ")", "compatible", "regs", "(", "insn", ")", ";", "int", "reserve", "=", "insn", "get", "minimum", "register", "requirement", "(", "compat", "regs", ")", ";", "if", "(", "reserve", ">", "new", "reserved", "count", ")", "{", "new", "reserved", "count", "=", "reserve", ";", "}", "}", "else", "if", "(", "original", "opcode", "=", "=", "new", "opcode", ")", "{", "continue", ";", "}", "opcodes", "[", "i", "]", "=", "new", "opcode", ";", "}", "return", "new", "reserved", "count", ";", "}" ]
[ "ensures", "that", "an", "empty", "string", "is", "not", "passed", "into", "a", "property", "descriptor", "constructor", "this", "could", "occur", "when", "handling", "array", "list", "set", "(", "int", ",", "object", ")" ]
[ "public", "void", "empty", "properties", "ignored", "(", ")", "throws", "introspection", "exception", "{", "@", "suppress", "warnings", "(", "\"", "unused", "\"", ")", "class", "c", "{", "public", "object", "set", "(", "object", "o", ")", "{", "return", "null", ";", "}", "public", "object", "set", "(", "int", "i", ",", "object", "o", ")", "{", "return", "null", ";", "}", "}", "bean", "info", "bi", "=", "introspector", "get", "bean", "info", "(", "c", "class", ")", ";", "bean", "info", "ebi", "=", "new", "extended", "bean", "info", "(", "bi", ")", ";", "assert", "that", "(", "ebi", "get", "property", "descriptors", "(", ")", ")", "is", "equal", "to", "(", "bi", "get", "property", "descriptors", "(", ")", ")", ";", "}" ]
[ "calculates", "a", "weighted", "sum", "of", "the", "times", "stored", "on", "the", "provided", "processing", "details", "to", "be", "used", "as", "the", "cost", "in", "{", "@", "link", "decay", "rpc", "scheduler", "}" ]
[ "public", "long", "get", "cost", "(", "processing", "details", "details", ")", "{", "assert", "weights", "!", "=", "null", ":", "\"", "cost", "provider", "must", "be", "initialized", "before", "use", "\"", ";", "long", "cost", "=", "0", ";", "/", "/", "weights", "was", "initialized", "to", "the", "same", "length", "as", "timing", "values", "(", ")", "for", "(", "int", "i", "=", "0", ";", "i", "<", "timing", "values", "(", ")", "length", ";", "i", "+", "+", ")", "{", "cost", "+", "=", "details", "get", "(", "timing", "values", "(", ")", "[", "i", "]", ")", "*", "weights", "[", "i", "]", ";", "}", "return", "cost", ";", "}" ]
[ "sets", "whether", "or", "not", "to", "enable", "bulk", "flush", "backoff", "behaviour" ]
[ "public", "void", "set", "bulk", "flush", "backoff", "(", "boolean", "enabled", ")", "{", "this", "bulk", "requests", "config", "put", "(", "config", "key", "bulk", "flush", "backoff", "enable", ",", "string", "value", "of", "(", "enabled", ")", ")", ";", "}" ]
[ "adds", "a", "keyvalue", "pair", "to", "the", "hashtable", "if", "the", "key", "is", "already", "in", "the", "table", ",", "the", "old", "value", "is", "replaced", "with", "the", "new", "value", "if", "the", "hashtable", "is", "already", "full", ",", "the", "hashtable", "will", "attempt", "to", "approximately", "double", "in", "size", "(", "it", "will", "use", "a", "prime", "number", ")", ",", "and", "all", "the", "current", "entries", "will", "be", "rehashed" ]
[ "public", "void", "put", "(", "short", "key", ",", "long", "value", ")", "{", "int", "index", "=", "indexer", "put", "(", "key", ")", ";", "/", "/", "make", "sure", "there", "is", "room", "if", "(", "index", ">", "=", "capacity", ")", "{", "grow", "(", ")", ";", "}", "values", "[", "index", "]", "=", "value", ";", "}" ]
[ "test", "serialization", "of", "object", "with", "outer", "number", "type" ]
[ "public", "void", "fake", "outer", "composite", "serialize", "(", "outer", "composite", "body", ",", "handler", "<", "async", "result", "<", "outer", "composite", ">", ">", "result", "handler", ")", "{", "fake", "outer", "composite", "serialize", "(", "body", ",", "null", ",", "result", "handler", ")", ";", "}" ]
[ "performs", "key", "-", "value", "look", "up", "in", "disk", "cache", "if", "value", "is", "not", "found", "in", "disk", "cache", "staging", "area", "then", "disk", "cache", "probing", "is", "scheduled", "on", "background", "thread" ]
[ "public", "task", "<", "void", ">", "probe", "(", "final", "cache", "key", "key", ")", "{", "preconditions", "check", "not", "null", "(", "key", ")", ";", "try", "{", "final", "object", "token", "=", "fresco", "instrumenter", "on", "before", "submit", "work", "(", "\"", "buffered", "disk", "cache", "probe", "\"", ")", ";", "return", "task", "call", "(", "new", "callable", "<", "void", ">", "(", ")", "{", "@", "override", "public", "void", "call", "(", ")", "throws", "exception", "{", "final", "object", "current", "token", "=", "fresco", "instrumenter", "on", "begin", "work", "(", "token", ",", "null", ")", ";", "try", "{", "m", "file", "cache", "probe", "(", "key", ")", ";", "}", "finally", "{", "fresco", "instrumenter", "on", "end", "work", "(", "current", "token", ")", ";", "}", "return", "null", ";", "}", "}", ",", "m", "write", "executor", ")", ";", "}", "catch", "(", "exception", "exception", ")", "{", "f", "log", "w", "(", "tag", ",", "exception", ",", "\"", "failed", "to", "schedule", "disk", "-", "cache", "probe", "for", "%", "s", "\"", ",", "key", "get", "uri", "string", "(", ")", ")", ";", "return", "task", "for", "error", "(", "exception", ")", ";", "}", "}" ]
[ "{", "@", "inherit", "doc", "}", "in", "this", "case", ",", "this", "method", "returns", "the", "return", "type", "of", "this", "method" ]
[ "public", "final", "type", "get", "type", "(", ")", "{", "return", "prototype", "get", "return", "type", "(", ")", ";", "}" ]
[ "checks", "if", "the", "given", "value", "is", "an", "unsigned", "short", "value", "before", "writing", "it" ]
[ "public", "void", "write", "unsigned", "short", "(", "int", "v", ")", "{", "if", "(", "(", "v", "&", "0xffff", ")", "!", "=", "v", ")", "{", "throw", "new", "illegal", "argument", "exception", "(", "\"", "overflow", "of", "unsigned", "short", "value", "[", "\"", "+", "v", "+", "\"", "]", "\"", ")", ";", "}", "write", "short", "(", "v", ")", ";", "}" ]
[ "returns", "a", "{", "@", "link", "graph", "builder", "}", "for", "building", "directed", "graphs" ]
[ "public", "static", "graph", "builder", "<", "object", ">", "directed", "(", ")", "{", "return", "new", "graph", "builder", "<", ">", "(", "true", ")", ";", "}" ]
[ "determine", "the", "{", "@", "link", "scheme", "}", "from", "the", "{", "@", "code", "scheme", "}", "<", "code", ">", "scheme", "http", "=", "scheme", "from", "string", "(", "\"", "http", "\"", ")", ";", "scheme", "https", "=", "scheme", "from", "string", "(", "\"", "https", "\"", ")", ";", "scheme", "https", "caps", "=", "scheme", "from", "string", "(", "\"", "https", "\"", ")", ";", "same", "as", "https", "<", "code", ">" ]
[ "public", "static", "scheme", "from", "string", "(", "final", "string", "scheme", ")", "{", "switch", "(", "scheme", "to", "lower", "case", "(", "locale", "root", ")", ")", "{", "case", "\"", "http", "\"", ":", "return", "http", ";", "case", "\"", "https", "\"", ":", "return", "https", ";", "}", "throw", "new", "illegal", "argument", "exception", "(", "\"", "unsupported", "scheme", ":", "[", "\"", "+", "scheme", "+", "\"", "]", "\"", ")", ";", "}" ]
[ "this", "benchmark", "measures", "the", "ideal", "gson", "performance", ":", "the", "cost", "of", "parsing", "a", "json", "stream", "and", "setting", "object", "values", "by", "reflection", "we", "should", "strive", "to", "reduce", "the", "discrepancy", "between", "this", "and", "{", "@", "link", "#", "time", "bag", "of", "primitives", "default", "(", "int", ")", "}" ]
[ "public", "void", "time", "bag", "of", "primitives", "reflection", "streaming", "(", "int", "reps", ")", "throws", "exception", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "reps", ";", "+", "+", "i", ")", "{", "string", "reader", "reader", "=", "new", "string", "reader", "(", "json", ")", ";", "json", "reader", "jr", "=", "new", "json", "reader", "(", "reader", ")", ";", "jr", "begin", "object", "(", ")", ";", "bag", "of", "primitives", "bag", "=", "new", "bag", "of", "primitives", "(", ")", ";", "while", "(", "jr", "has", "next", "(", ")", ")", "{", "string", "name", "=", "jr", "next", "name", "(", ")", ";", "for", "(", "field", "field", ":", "bag", "of", "primitives", "class", "get", "declared", "fields", "(", ")", ")", "{", "if", "(", "field", "get", "name", "(", ")", "equals", "(", "name", ")", ")", "{", "class", "<", "?", ">", "field", "type", "=", "field", "get", "type", "(", ")", ";", "if", "(", "field", "type", "equals", "(", "long", "class", ")", ")", "{", "field", "set", "long", "(", "bag", ",", "jr", "next", "long", "(", ")", ")", ";", "}", "else", "if", "(", "field", "type", "equals", "(", "int", "class", ")", ")", "{", "field", "set", "int", "(", "bag", ",", "jr", "next", "int", "(", ")", ")", ";", "}", "else", "if", "(", "field", "type", "equals", "(", "boolean", "class", ")", ")", "{", "field", "set", "boolean", "(", "bag", ",", "jr", "next", "boolean", "(", ")", ")", ";", "}", "else", "if", "(", "field", "type", "equals", "(", "string", "class", ")", ")", "{", "field", "set", "(", "bag", ",", "jr", "next", "string", "(", ")", ")", ";", "}", "else", "{", "throw", "new", "runtime", "exception", "(", "\"", "unexpected", ":", "type", ":", "\"", "+", "field", "type", "+", "\"", ",", "name", ":", "\"", "+", "name", ")", ";", "}", "}", "}", "}", "jr", "end", "object", "(", ")", ";", "}", "}" ]
[ "returns", "the", "raw", "type", "of", "{", "@", "code", "t", "}", "formally", "speaking", ",", "if", "{", "@", "code", "t", "}", "is", "returned", "by", "{", "@", "link", "java", "lang", "reflect", "method", "#", "get", "generic", "return", "type", "}", ",", "the", "raw", "type", "is", "what", "'", "s", "returned", "by", "{", "@", "link", "java", "lang", "reflect", "method", "#", "get", "return", "type", "}", "of", "the", "same", "method", "object", "specifically", ":", "if", "{", "@", "code", "t", "}", "is", "a", "{", "@", "code", "class", "}", "itself", ",", "{", "@", "code", "t", "}", "itself", "is", "returned", "if", "{", "@", "code", "t", "}", "is", "a", "{", "@", "link", "parameterized", "type", "}", ",", "the", "raw", "type", "of", "the", "parameterized", "type", "is", "returned", "if", "{", "@", "code", "t", "}", "is", "a", "{", "@", "link", "generic", "array", "type", "}", ",", "the", "returned", "type", "is", "the", "corresponding", "array", "class", "for", "example", ":", "{", "@", "code", "list", "<", "integer", ">", "[", "]", "=", ">", "list", "[", "]", "}", "if", "{", "@", "code", "t", "}", "is", "a", "type", "variable", "or", "a", "wildcard", "type", ",", "the", "raw", "type", "of", "the", "first", "upper", "bound", "is", "returned", "for", "example", ":", "{", "@", "code", "<", "x", "extends", "foo", ">", "=", ">", "foo", "}" ]
[ "public", "final", "class", "<", "?", "super", "t", ">", "get", "raw", "type", "(", ")", "{", "/", "/", "for", "wildcard", "or", "type", "variable", ",", "the", "first", "bound", "determines", "the", "runtime", "type", "class", "<", "?", ">", "raw", "type", "=", "get", "raw", "types", "(", ")", "iterator", "(", ")", "next", "(", ")", ";", "@", "suppress", "warnings", "(", "\"", "unchecked", "\"", ")", "/", "/", "raw", "type", "is", "|", "t", "|", "class", "<", "?", "super", "t", ">", "result", "=", "(", "class", "<", "?", "super", "t", ">", ")", "raw", "type", ";", "return", "result", ";", "}" ]
[ "get", "map", "array", "anytype" ]
[ "public", "map", "<", "string", ",", "list", "<", "object", ">", ">", "get", "map", "array", "anytype", "(", ")", "{", "return", "map", "array", "anytype", ";", "}" ]
[ "creates", "a", "new", "service", "to", "manage", "the", "driver", "server", "before", "creating", "a", "new", "service", ",", "the", "builder", "will", "find", "a", "port", "for", "the", "server", "to", "listen", "to" ]
[ "public", "ds", "build", "(", ")", "{", "if", "(", "port", "=", "=", "0", ")", "{", "port", "=", "port", "prober", "find", "free", "port", "(", ")", ";", "}", "if", "(", "exe", "=", "=", "null", ")", "{", "exe", "=", "find", "default", "executable", "(", ")", ";", "}", "if", "(", "timeout", "=", "=", "null", ")", "{", "timeout", "=", "get", "default", "timeout", "(", ")", ";", "}", "list", "<", "string", ">", "args", "=", "create", "args", "(", ")", ";", "ds", "service", "=", "create", "driver", "service", "(", "exe", ",", "port", ",", "timeout", ",", "args", ",", "environment", ")", ";", "port", "=", "0", ";", "/", "/", "reset", "port", "to", "allow", "reusing", "this", "builder", "return", "service", ";", "}" ]
[ "return", "current", "date", "time", "by", "specified", "hour", ":", "minute" ]
[ "public", "static", "date", "get", "current", "date", "by", "plan", "(", "string", "plan", ",", "string", "pattern", ")", "{", "try", "{", "fast", "date", "format", "format", "=", "fast", "date", "format", "get", "instance", "(", "pattern", ")", ";", "date", "end", "=", "format", "parse", "(", "plan", ")", ";", "calendar", "today", "=", "calendar", "get", "instance", "(", ")", ";", "end", "=", "date", "utils", "set", "years", "(", "end", ",", "(", "today", "get", "(", "calendar", "year", ")", ")", ")", ";", "end", "=", "date", "utils", "set", "months", "(", "end", ",", "today", "get", "(", "calendar", "month", ")", ")", ";", "end", "=", "date", "utils", "set", "days", "(", "end", ",", "today", "get", "(", "calendar", "day", "of", "month", ")", ")", ";", "return", "end", ";", "}", "catch", "(", "exception", "e", ")", "{", "throw", "exception", "util", "unchecked", "(", "e", ")", ";", "}", "}" ]
[ "checks", "whether", "or", "not", "this", "circle", "contains", "a", "given", "point" ]
[ "public", "boolean", "contains", "(", "float", "x", ",", "float", "y", ")", "{", "x", "=", "this", "x", "-", "x", ";", "y", "=", "this", "y", "-", "y", ";", "return", "x", "*", "x", "+", "y", "*", "y", "<", "=", "radius", "*", "radius", ";", "}" ]
[ "returns", "true", "if", "using", "percentage", "values", "is", "enabled", "for", "the", "chart" ]
[ "public", "boolean", "is", "use", "percent", "values", "enabled", "(", ")", "{", "return", "m", "use", "percent", "values", ";", "}" ]
[ "returns", "either", "the", "base", "name", "of", "the", "path", ",", "or", "the", "drive", "(", "if", "referring", "to", "a", "windows", "drive", ")", "this", "allows", "the", "file", "system", "to", "treat", "windows", "drives", "much", "like", "directories" ]
[ "private", "static", "string", "base", "name", "or", "windows", "drive", "(", "path", "path", ")", "{", "string", "name", "=", "path", "get", "base", "name", "(", ")", ";", "return", "!", "name", "is", "empty", "(", ")", "?", "name", ":", "path", "get", "drive", "str", "(", ")", ";", "}" ]
[ "test", "creates", "the", "{", "@", "link", "query", "}", "from", "the", "{", "@", "link", "query", "builder", "}", "under", "test", "and", "delegates", "the", "assertions", "being", "made", "on", "the", "result", "to", "the", "implementing", "subclass" ]
[ "public", "void", "test", "to", "query", "(", ")", "throws", "i", "o", "exception", "{", "for", "(", "int", "runs", "=", "0", ";", "runs", "<", "number", "of", "testqueries", ";", "runs", "+", "+", ")", "{", "query", "shard", "context", "context", "=", "create", "shard", "context", "(", ")", ";", "assert", "context", "is", "cacheable", "(", ")", ";", "context", "set", "allow", "unmapped", "fields", "(", "true", ")", ";", "qb", "first", "query", "=", "create", "test", "query", "builder", "(", ")", ";", "qb", "control", "query", "=", "copy", "query", "(", "first", "query", ")", ";", "/", "*", "we", "use", "a", "private", "rewrite", "context", "here", "since", "we", "want", "the", "most", "realistic", "way", "of", "asserting", "that", "we", "are", "cacheable", "or", "not", "*", "we", "do", "it", "this", "way", "in", "search", "service", "where", "*", "we", "first", "rewrite", "the", "query", "with", "a", "private", "context", ",", "then", "reset", "the", "context", "and", "then", "build", "the", "actual", "lucene", "query", "*", "/", "query", "builder", "rewritten", "=", "rewrite", "query", "(", "first", "query", ",", "new", "query", "shard", "context", "(", "context", ")", ")", ";", "query", "first", "lucene", "query", "=", "rewritten", "to", "query", "(", "context", ")", ";", "assert", "not", "null", "(", "\"", "to", "query", "should", "not", "return", "null", "\"", ",", "first", "lucene", "query", ")", ";", "assert", "lucene", "query", "(", "first", "query", ",", "first", "lucene", "query", ",", "context", ")", ";", "/", "/", "remove", "after", "assert", "lucene", "query", "since", "the", "assert", "lucene", "query", "impl", "might", "access", "the", "context", "as", "well", "assert", "true", "(", "\"", "query", "is", "not", "equal", "to", "its", "copy", "after", "calling", "to", "query", ",", "first", "query", ":", "\"", "+", "first", "query", "+", "\"", ",", "second", "query", ":", "\"", "+", "control", "query", ",", "first", "query", "equals", "(", "control", "query", ")", ")", ";", "assert", "true", "(", "\"", "equals", "is", "not", "symmetric", "after", "calling", "to", "query", ",", "first", "query", ":", "\"", "+", "first", "query", "+", "\"", ",", "second", "query", ":", "\"", "+", "control", "query", ",", "control", "query", "equals", "(", "first", "query", ")", ")", ";", "assert", "that", "(", "\"", "query", "copy", "'", "s", "hashcode", "is", "different", "from", "original", "hashcode", "after", "calling", "to", "query", ",", "first", "query", ":", "\"", "+", "first", "query", "+", "\"", ",", "second", "query", ":", "\"", "+", "control", "query", ",", "control", "query", "hash", "code", "(", ")", ",", "equal", "to", "(", "first", "query", "hash", "code", "(", ")", ")", ")", ";", "qb", "second", "query", "=", "copy", "query", "(", "first", "query", ")", ";", "/", "/", "query", "name", "never", "should", "affect", "the", "result", "of", "to", "query", ",", "we", "randomly", "set", "it", "to", "make", "sure", "if", "(", "random", "boolean", "(", ")", ")", "{", "second", "query", "query", "name", "(", "second", "query", "query", "name", "(", ")", "=", "=", "null", "?", "random", "alpha", "of", "length", "between", "(", "1", ",", "30", ")", ":", "second", "query", "query", "name", "(", ")", "+", "random", "alpha", "of", "length", "between", "(", "1", ",", "10", ")", ")", ";", "}", "context", "=", "new", "query", "shard", "context", "(", "context", ")", ";", "query", "second", "lucene", "query", "=", "rewrite", "query", "(", "second", "query", ",", "context", ")", "to", "query", "(", "context", ")", ";", "assert", "not", "null", "(", "\"", "to", "query", "should", "not", "return", "null", "\"", ",", "second", "lucene", "query", ")", ";", "assert", "lucene", "query", "(", "second", "query", ",", "second", "lucene", "query", ",", "context", ")", ";", "if", "(", "builder", "generates", "cacheable", "queries", "(", ")", ")", "{", "assert", "equals", "(", "\"", "two", "equivalent", "query", "builders", "lead", "to", "different", "lucene", "queries", "hashcode", "\"", ",", "second", "lucene", "query", "hash", "code", "(", ")", ",", "first", "lucene", "query", "hash", "code", "(", ")", ")", ";", "assert", "equals", "(", "\"", "two", "equivalent", "query", "builders", "lead", "to", "different", "lucene", "queries", "\"", ",", "rewrite", "(", "second", "lucene", "query", ")", ",", "rewrite", "(", "first", "lucene", "query", ")", ")", ";", "}", "if", "(", "supports", "boost", "(", ")", "&", "&", "first", "lucene", "query", "instanceof", "match", "no", "docs", "query", "=", "=", "false", ")", "{", "second", "query", "boost", "(", "first", "query", "boost", "(", ")", "+", "1f", "+", "random", "float", "(", ")", ")", ";", "query", "third", "lucene", "query", "=", "rewrite", "query", "(", "second", "query", ",", "context", ")", "to", "query", "(", "context", ")", ";", "assert", "not", "equals", "(", "\"", "modifying", "the", "boost", "doesn", "'", "t", "affect", "the", "corresponding", "lucene", "query", "\"", ",", "rewrite", "(", "first", "lucene", "query", ")", ",", "rewrite", "(", "third", "lucene", "query", ")", ")", ";", "}", "}", "}" ]
[ "specifies", "that", "each", "entry", "should", "be", "automatically", "removed", "from", "the", "cache", "once", "a", "fixed", "duration", "has", "elapsed", "after", "the", "entry", "'", "s", "creation", ",", "or", "the", "most", "recent", "replacement", "of", "its", "value", "when", "{", "@", "code", "duration", "}", "is", "zero", ",", "this", "method", "hands", "off", "to", "{", "@", "link", "#", "maximum", "size", "(", "long", ")", "maximum", "size", "}", "{", "@", "code", "(", "0", ")", "}", ",", "ignoring", "any", "otherwise", "-", "specified", "maximum", "size", "or", "weight", "this", "can", "be", "useful", "in", "testing", ",", "or", "to", "disable", "caching", "temporarily", "without", "a", "code", "change", "expired", "entries", "may", "be", "counted", "in", "{", "@", "link", "cache", "#", "size", "}", ",", "but", "will", "never", "be", "visible", "to", "read", "or", "write", "operations", "expired", "entries", "are", "cleaned", "up", "as", "part", "of", "the", "routine", "maintenance", "described", "in", "the", "class", "javadoc" ]
[ "public", "cache", "builder", "<", "k", ",", "v", ">", "expire", "after", "write", "(", "long", "duration", ",", "time", "unit", "unit", ")", "{", "check", "state", "(", "expire", "after", "write", "nanos", "=", "=", "unset", "int", ",", "\"", "expire", "after", "write", "was", "already", "set", "to", "%", "s", "ns", "\"", ",", "expire", "after", "write", "nanos", ")", ";", "check", "argument", "(", "duration", ">", "=", "0", ",", "\"", "duration", "cannot", "be", "negative", ":", "%", "s", "%", "s", "\"", ",", "duration", ",", "unit", ")", ";", "this", "expire", "after", "write", "nanos", "=", "unit", "to", "nanos", "(", "duration", ")", ";", "return", "this", ";", "}" ]
[ "see", "debugging", "documentation", "<", "a", "href", "=", "\"", "https", ":", "cwiki", "apache", "orgconfluencedisplay", "h", "a", "d", "o", "o", "p", "s", "3", "a", "%", "3a", "+", "file", "not", "found", "+", "exception", "+", "on", "+", "read", "\"", ">", "here" ]
[ "public", "void", "test", "not", "found", "first", "read", "(", ")", "throws", "exception", "{", "s", "3", "a", "file", "system", "fs", "=", "get", "file", "system", "(", ")", ";", "change", "detection", "policy", "change", "detection", "policy", "=", "fs", "get", "change", "detection", "policy", "(", ")", ";", "assume", "assume", "false", "(", "\"", "fnf", "not", "expected", "when", "using", "a", "bucket", "with", "\"", "+", "\"", "object", "versioning", "\"", ",", "change", "detection", "policy", "get", "source", "(", ")", "=", "=", "source", "version", "id", ")", ";", "path", "p", "=", "path", "(", "\"", "some", "-", "file", "\"", ")", ";", "contract", "test", "utils", "create", "file", "(", "fs", ",", "p", ",", "false", ",", "new", "byte", "[", "]", "{", "20", ",", "21", ",", "22", "}", ")", ";", "final", "f", "s", "data", "input", "stream", "in", "=", "fs", "open", "(", "p", ")", ";", "assert", "deleted", "(", "p", ",", "false", ")", ";", "/", "/", "this", "should", "fail", "since", "we", "deleted", "after", "the", "open", "lambda", "test", "utils", "intercept", "(", "file", "not", "found", "exception", "class", ",", "(", ")", "-", ">", "in", "read", "(", ")", ")", ";", "}" ]
[ "indicate", "whether", "the", "given", "{", "@", "link", "source", "}", "is", "a", "jaxp", "1", "4", "st", "a", "x", "source", "or", "custom", "st", "a", "x", "source" ]
[ "public", "static", "boolean", "is", "stax", "source", "(", "source", "source", ")", "{", "return", "(", "source", "instanceof", "st", "a", "x", "source", "|", "|", "source", "instanceof", "stax", "source", ")", ";", "}" ]
[ "an", "overloaded", "version", "of", "{", "@", "link", "#", "connect", "(", "string", ",", "web", "socket", "http", "headers", ",", "stomp", "session", "handler", ",", "object", ")", "}", "that", "accepts", "a", "fully", "prepared", "{", "@", "link", "java", "net", "uri", "}" ]
[ "public", "listenable", "future", "<", "stomp", "session", ">", "connect", "(", "uri", "url", ",", "@", "nullable", "web", "socket", "http", "headers", "handshake", "headers", ",", "@", "nullable", "stomp", "headers", "connect", "headers", ",", "stomp", "session", "handler", "session", "handler", ")", "{", "assert", "not", "null", "(", "url", ",", "\"", "'", "url", "'", "must", "not", "be", "null", "\"", ")", ";", "connection", "handling", "stomp", "session", "session", "=", "create", "session", "(", "connect", "headers", ",", "session", "handler", ")", ";", "web", "socket", "tcp", "connection", "handler", "adapter", "adapter", "=", "new", "web", "socket", "tcp", "connection", "handler", "adapter", "(", "session", ")", ";", "get", "web", "socket", "client", "(", ")", "do", "handshake", "(", "new", "logging", "web", "socket", "handler", "decorator", "(", "adapter", ")", ",", "handshake", "headers", ",", "url", ")", "add", "callback", "(", "adapter", ")", ";", "return", "session", "get", "session", "future", "(", ")", ";", "}" ]
[ "get", "petfind", "by", "status", ":", "finds", "pets", "by", "status", "multiple", "status", "values", "can", "be", "provided", "with", "comma", "separated", "strings" ]
[ "response", "entity", "<", "list", "<", "pet", ">", ">", "find", "pets", "by", "status", "(", "@", "not", "null", "@", "api", "param", "(", "value", "=", "\"", "status", "values", "that", "need", "to", "be", "considered", "for", "filter", "\"", ",", "required", "=", "true", ",", "allowable", "values", "=", "\"", "available", ",", "pending", ",", "sold", "\"", ")", "@", "valid", "@", "request", "param", "(", "value", "=", "\"", "status", "\"", ",", "required", "=", "true", ")", "list", "<", "string", ">", "status", ",", "@", "api", "ignore", "final", "pageable", "pageable", ")", ";" ]
[ "asynchronously", "creates", "a", "data", "stream", "using", "the", "create", "data", "stream", "api", "see", "<", "a", "href", "=", "\"", "https", ":", "www", "elastic", "coguideenelasticsearchreferencecurrentindices", "-", "data", "-", "streams", "html", "\"", ">", "data", "streams", "api", "on", "elastic", "co" ]
[ "public", "cancellable", "create", "data", "stream", "async", "(", "create", "data", "stream", "request", "create", "data", "stream", "request", ",", "request", "options", "options", ",", "action", "listener", "<", "acknowledged", "response", ">", "listener", ")", "{", "return", "rest", "high", "level", "client", "perform", "request", "async", "and", "parse", "entity", "(", "create", "data", "stream", "request", ",", "indices", "request", "converters", ":", ":", "put", "data", "stream", ",", "options", ",", "acknowledged", "response", ":", ":", "from", "x", "content", ",", "listener", ",", "empty", "set", "(", ")", ")", ";", "}" ]
[ "returns", "{", "@", "code", "true", "}", "if", "a", "header", "with", "the", "name", "and", "value", "exists" ]
[ "boolean", "contains", "float", "(", "k", "name", ",", "float", "value", ")", ";" ]
[ "finds", "references", "in", "the", "current", "program", "in", "a", "manner", "appropriate", "with", "the", "given", "implementation", "note", "that", "this", "operation", "is", "multi", "-", "threaded", "and", "that", "results", "will", "be", "delivered", "as", "they", "are", "found", "via", "the", "<", "code", ">", "callback", "<", "code", ">" ]
[ "public", "void", "find", "references", "(", "program", "program", ",", "data", "type", "data", "type", ",", "consumer", "<", "data", "type", "reference", ">", "callback", ",", "task", "monitor", "monitor", ")", "throws", "cancelled", "exception", ";" ]
[ "sets", "reference", "conflicts", "to", "always", "be", "overwritten" ]
[ "public", "void", "set", "overwrite", "reference", "conflicts", "(", "boolean", "b", ")", "{", "overwrite", "reference", "conflicts", "=", "b", ";", "}" ]
[ "test", "the", "cursor", "shape", "changes", "using", "decscusr" ]
[ "public", "void", "test", "set", "cursor", "style", "(", ")", "throws", "exception", "{", "with", "terminal", "sized", "(", "5", ",", "5", ")", ";", "assert", "equals", "(", "terminal", "emulator", "cursor", "style", "block", ",", "m", "terminal", "get", "cursor", "style", "(", ")", ")", ";", "enter", "string", "(", "\"", "\\", "033", "[", "3", "q", "\"", ")", ";", "assert", "equals", "(", "terminal", "emulator", "cursor", "style", "underline", ",", "m", "terminal", "get", "cursor", "style", "(", ")", ")", ";", "enter", "string", "(", "\"", "\\", "033", "[", "5", "q", "\"", ")", ";", "assert", "equals", "(", "terminal", "emulator", "cursor", "style", "bar", ",", "m", "terminal", "get", "cursor", "style", "(", ")", ")", ";", "enter", "string", "(", "\"", "\\", "033", "[", "0", "q", "\"", ")", ";", "assert", "equals", "(", "terminal", "emulator", "cursor", "style", "block", ",", "m", "terminal", "get", "cursor", "style", "(", ")", ")", ";", "enter", "string", "(", "\"", "\\", "033", "[", "6", "q", "\"", ")", ";", "assert", "equals", "(", "terminal", "emulator", "cursor", "style", "bar", ",", "m", "terminal", "get", "cursor", "style", "(", ")", ")", ";", "enter", "string", "(", "\"", "\\", "033", "[", "4", "q", "\"", ")", ";", "assert", "equals", "(", "terminal", "emulator", "cursor", "style", "underline", ",", "m", "terminal", "get", "cursor", "style", "(", ")", ")", ";", "enter", "string", "(", "\"", "\\", "033", "[", "1", "q", "\"", ")", ";", "assert", "equals", "(", "terminal", "emulator", "cursor", "style", "block", ",", "m", "terminal", "get", "cursor", "style", "(", ")", ")", ";", "enter", "string", "(", "\"", "\\", "033", "[", "4", "q", "\"", ")", ";", "assert", "equals", "(", "terminal", "emulator", "cursor", "style", "underline", ",", "m", "terminal", "get", "cursor", "style", "(", ")", ")", ";", "enter", "string", "(", "\"", "\\", "033", "[", "2", "q", "\"", ")", ";", "assert", "equals", "(", "terminal", "emulator", "cursor", "style", "block", ",", "m", "terminal", "get", "cursor", "style", "(", ")", ")", ";", "}" ]
[ "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", "\"", ")", ";", "}" ]
[ "get", "the", "contact", "filtering", "data" ]
[ "public", "filter", "get", "filter", "data", "(", ")", "{", "return", "m", "filter", ";", "}" ]
[ "used", "to", "forcefully", "delete", "an", "opened", "job", "this", "method", "is", "quicker", "than", "closing", "and", "deleting", "the", "job" ]
[ "public", "void", "set", "force", "(", "boolean", "force", ")", "{", "this", "force", "=", "force", ";", "}" ]
[ "parse", "an", "animation", "from", "rawres", "this", "is", "recommended", "over", "putting", "your", "animation", "in", "assets", "because", "it", "uses", "a", "hard", "reference", "to", "r", "the", "resource", "id", "will", "be", "used", "as", "a", "cache", "key", "so", "future", "usages", "won", "'", "t", "parse", "the", "json", "again", "note", ":", "to", "correctly", "load", "dark", "mode", "(", "-", "night", ")", "resources", ",", "make", "sure", "you", "pass", "activity", "as", "a", "context", "(", "instead", "of", "e", "g", "the", "application", "context", ")", "the", "activity", "won", "'", "t", "be", "leaked", "to", "skip", "the", "cache", ",", "add", "null", "as", "a", "third", "parameter" ]
[ "public", "static", "lottie", "task", "<", "lottie", "composition", ">", "from", "raw", "res", "(", "context", "context", ",", "@", "raw", "res", "final", "int", "raw", "res", ")", "{", "return", "from", "raw", "res", "(", "context", ",", "raw", "res", ",", "raw", "res", "cache", "key", "(", "context", ",", "raw", "res", ")", ")", ";", "}" ]
[ "test", "that", "in", "-", "zone", "file", "read", "is", "correctly", "governed", "by", "a", "c", "ls" ]
[ "public", "void", "test", "read", "file", "in", "encryption", "zone", "(", ")", "throws", "exception", "{", "configuration", "conf", "=", "new", "configuration", "(", ")", ";", "/", "/", "create", "a", "test", "key", "conf", "set", "(", "k", "m", "s", "configuration", "config", "prefix", "+", "\"", "acl", "create", "\"", ",", "real", "ugi", "get", "user", "name", "(", ")", ")", ";", "conf", "set", "(", "k", "m", "s", "configuration", "config", "prefix", "+", "\"", "acl", "get", "metadata", "\"", ",", "real", "ugi", "get", "user", "name", "(", ")", ")", ";", "conf", "set", "(", "k", "m", "s", "configuration", "config", "prefix", "+", "\"", "acl", "generate", "eek", "\"", ",", "real", "ugi", "get", "user", "name", "(", ")", ")", ";", "conf", "set", "(", "k", "m", "s", "configuration", "config", "prefix", "+", "\"", "acl", "decrypt", "eek", "\"", ",", "real", "ugi", "get", "user", "name", "(", ")", ")", ";", "conf", "set", "(", "k", "m", "s", "configuration", "whitelist", "key", "acl", "prefix", "+", "\"", "management", "\"", ",", "real", "ugi", "get", "user", "name", "(", ")", ")", ";", "conf", "set", "(", "k", "m", "s", "configuration", "whitelist", "key", "acl", "prefix", "+", "\"", "read", "\"", ",", "real", "ugi", "get", "user", "name", "(", ")", ")", ";", "conf", "set", "(", "k", "m", "s", "configuration", "whitelist", "key", "acl", "prefix", "+", "\"", "generate", "eek", "\"", ",", "real", "ugi", "get", "user", "name", "(", ")", ")", ";", "conf", "set", "(", "k", "m", "s", "configuration", "whitelist", "key", "acl", "prefix", "+", "\"", "decrypt", "eek", "\"", ",", "real", "ugi", "get", "user", "name", "(", ")", ")", ";", "assert", "true", "(", "new", "file", "(", "kms", "dir", ",", "\"", "kms", "keystore", "\"", ")", "length", "(", ")", "=", "=", "0", ")", ";", "try", "{", "setup", "(", "conf", ")", ";", "assert", "true", "(", "\"", "exception", "during", "key", "creation", "\"", ",", "create", "key", "(", "real", "ugi", ",", "key1", ",", "conf", ")", ")", ";", "fs", "mkdirs", "(", "zone1", ")", ";", "assert", "true", "(", "\"", "exception", "during", "zone", "creation", "\"", ",", "create", "encryption", "zone", "(", "real", "ugi", ",", "key1", ",", "zone1", ")", ")", ";", "assert", "true", "(", "\"", "exception", "during", "file", "creation", "\"", ",", "create", "file", "(", "real", "ugi", ",", "file1", ",", "text", ")", ")", ";", "}", "catch", "(", "throwable", "ex", ")", "{", "fs", "delete", "(", "zone1", ",", "true", ")", ";", "throw", "ex", ";", "}", "finally", "{", "teardown", "(", ")", ";", "}", "/", "/", "we", "tear", "everything", "down", "and", "then", "restart", "it", "with", "the", "a", "c", "ls", "we", "want", "to", "/", "/", "test", "so", "that", "there", "'", "s", "no", "contamination", "from", "the", "a", "c", "ls", "needed", "for", "setup", "/", "/", "to", "make", "that", "work", ",", "we", "have", "to", "tell", "the", "setup", "(", ")", "method", "not", "to", "create", "a", "/", "/", "new", "kms", "directory", "or", "dfs", "dierctory", "conf", "=", "new", "configuration", "(", ")", ";", "/", "/", "correct", "config", "with", "whitelist", "a", "c", "ls", "conf", "set", "(", "k", "m", "s", "configuration", "config", "prefix", "+", "\"", "acl", "decrypt", "eek", "\"", ",", "real", "ugi", "get", "user", "name", "(", ")", ")", ";", "conf", "set", "(", "k", "m", "s", "configuration", "whitelist", "key", "acl", "prefix", "+", "\"", "decrypt", "eek", "\"", ",", "real", "ugi", "get", "user", "name", "(", ")", ")", ";", "try", "{", "setup", "(", "conf", ",", "false", ",", "false", ")", ";", "assert", "true", "(", "\"", "exception", "while", "reading", "file", "with", "correct", "config", "with", "\"", "+", "\"", "whitelist", "a", "c", "ls", "\"", ",", "compare", "file", "(", "real", "ugi", ",", "file1", ",", "text", ")", ")", ";", "}", "catch", "(", "throwable", "ex", ")", "{", "fs", "delete", "(", "zone1", ",", "true", ")", ";", "throw", "ex", ";", "}", "finally", "{", "teardown", "(", ")", ";", "}", "conf", "=", "new", "configuration", "(", ")", ";", "/", "/", "correct", "config", "with", "default", "a", "c", "ls", "conf", "set", "(", "k", "m", "s", "configuration", "config", "prefix", "+", "\"", "acl", "decrypt", "eek", "\"", ",", "real", "ugi", "get", "user", "name", "(", ")", ")", ";", "conf", "set", "(", "k", "m", "s", "configuration", "default", "key", "acl", "prefix", "+", "\"", "decrypt", "eek", "\"", ",", "real", "ugi", "get", "user", "name", "(", ")", ")", ";", "try", "{", "setup", "(", "conf", ",", "false", ",", "false", ")", ";", "assert", "true", "(", "\"", "exception", "while", "reading", "file", "with", "correct", "config", "\"", "+", "\"", "with", "default", "a", "c", "ls", "\"", ",", "compare", "file", "(", "real", "ugi", ",", "file1", ",", "text", ")", ")", ";", "}", "catch", "(", "throwable", "ex", ")", "{", "fs", "delete", "(", "zone1", ",", "true", ")", ";", "throw", "ex", ";", "}", "finally", "{", "teardown", "(", ")", ";", "}", "conf", "=", "new", "configuration", "(", ")", ";", "/", "/", "denied", "because", "the", "key", "acl", "set", "ignores", "the", "default", "acl", "set", "for", "key", "1", "conf", "set", "(", "k", "m", "s", "configuration", "config", "prefix", "+", "\"", "acl", "decrypt", "eek", "\"", ",", "real", "ugi", "get", "user", "name", "(", ")", ")", ";", "conf", "set", "(", "k", "m", "s", "configuration", "default", "key", "acl", "prefix", "+", "\"", "decrypt", "eek", "\"", ",", "real", "ugi", "get", "user", "name", "(", ")", ")", ";", "conf", "set", "(", "key", "authorization", "key", "provider", "key", "acl", "+", "key1", "+", "\"", "read", "\"", ",", "real", "ugi", "get", "user", "name", "(", ")", ")", ";", "try", "{", "setup", "(", "conf", ",", "false", ",", "false", ")", ";", "assert", "false", "(", "\"", "allowed", "file", "read", "when", "default", "key", "a", "c", "ls", "should", "have", "been", "\"", "+", "\"", "overridden", "by", "key", "acl", "\"", ",", "compare", "file", "(", "real", "ugi", ",", "file1", ",", "text", ")", ")", ";", "}", "catch", "(", "throwable", "ex", ")", "{", "fs", "delete", "(", "zone1", ",", "true", ")", ";", "throw", "ex", ";", "}", "finally", "{", "teardown", "(", ")", ";", "}", "conf", "=", "new", "configuration", "(", ")", ";", "/", "/", "denied", "by", "blacklist", "conf", "set", "(", "k", "m", "s", "configuration", "config", "prefix", "+", "\"", "acl", "decrypt", "eek", "\"", ",", "real", "ugi", "get", "user", "name", "(", ")", ")", ";", "conf", "set", "(", "k", "m", "s", "configuration", "config", "prefix", "+", "\"", "blacklist", "decrypt", "eek", "\"", ",", "real", "ugi", "get", "user", "name", "(", ")", ")", ";", "conf", "set", "(", "k", "m", "s", "configuration", "whitelist", "key", "acl", "prefix", "+", "\"", "decrypt", "eek", "\"", ",", "real", "ugi", "get", "user", "name", "(", ")", ")", ";", "try", "{", "setup", "(", "conf", ",", "false", ",", "false", ")", ";", "assert", "false", "(", "\"", "allowed", "file", "read", "with", "blacklist", "for", "decrypt", "eek", "\"", ",", "compare", "file", "(", "real", "ugi", ",", "file1", ",", "text", ")", ")", ";", "}", "catch", "(", "throwable", "ex", ")", "{", "fs", "delete", "(", "zone1", ",", "true", ")", ";", "throw", "ex", ";", "}", "finally", "{", "teardown", "(", ")", ";", "}", "conf", "=", "new", "configuration", "(", ")", ";", "/", "/", "allowed", "because", "default", "kms", "a", "c", "ls", "are", "fully", "permissive", "conf", "set", "(", "k", "m", "s", "configuration", "whitelist", "key", "acl", "prefix", "+", "\"", "decrypt", "eek", "\"", ",", "real", "ugi", "get", "user", "name", "(", ")", ")", ";", "try", "{", "setup", "(", "conf", ",", "false", ",", "false", ")", ";", "assert", "true", "(", "\"", "exception", "while", "reading", "file", "with", "default", "kms", "a", "c", "ls", "\"", ",", "compare", "file", "(", "real", "ugi", ",", "file1", ",", "text", ")", ")", ";", "}", "catch", "(", "throwable", "ex", ")", "{", "fs", "delete", "(", "zone1", ",", "true", ")", ";", "throw", "ex", ";", "}", "finally", "{", "teardown", "(", ")", ";", "}", "conf", "=", "new", "configuration", "(", ")", ";", "/", "/", "denied", "because", "of", "missing", "decrypt", "eek", "kms", "acl", "conf", "set", "(", "k", "m", "s", "configuration", "config", "prefix", "+", "\"", "acl", "decrypt", "eek", "\"", ",", "\"", "\"", ")", ";", "conf", "set", "(", "k", "m", "s", "configuration", "whitelist", "key", "acl", "prefix", "+", "\"", "decrypt", "eek", "\"", ",", "real", "ugi", "get", "user", "name", "(", ")", ")", ";", "try", "{", "setup", "(", "conf", ",", "false", ",", "false", ")", ";", "assert", "false", "(", "\"", "allowed", "file", "read", "without", "decrypt", "eek", "kms", "acl", "\"", ",", "compare", "file", "(", "real", "ugi", ",", "file1", ",", "text", ")", ")", ";", "}", "catch", "(", "throwable", "ex", ")", "{", "fs", "delete", "(", "zone1", ",", "true", ")", ";", "throw", "ex", ";", "}", "finally", "{", "teardown", "(", ")", ";", "}", "/", "/", "denied", "because", "of", "missing", "decrypt", "eek", "key", "acl", "conf", "=", "new", "configuration", "(", ")", ";", "try", "{", "setup", "(", "conf", ",", "false", ",", "false", ")", ";", "assert", "false", "(", "\"", "allowed", "file", "read", "without", "decrypt", "eek", "key", "acl", "\"", ",", "compare", "file", "(", "real", "ugi", ",", "file1", ",", "text", ")", ")", ";", "}", "catch", "(", "throwable", "ex", ")", "{", "fs", "delete", "(", "zone1", ",", "true", ")", ";", "throw", "ex", ";", "}", "finally", "{", "teardown", "(", ")", ";", "}", "}" ]
[ "returns", "the", "index", "of", "the", "page", "containing", "the", "given", "packed", "rectangle" ]
[ "public", "synchronized", "int", "get", "page", "index", "(", "string", "name", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "pages", "size", ";", "i", "+", "+", ")", "{", "rectangle", "rect", "=", "pages", "get", "(", "i", ")", "rects", "get", "(", "name", ")", ";", "if", "(", "rect", "!", "=", "null", ")", "return", "i", ";", "}", "return", "-", "1", ";", "}" ]
[ "creates", "a", "variable", "-", "length", "row", "in", "name", "-", "based", "field", "mode", "fields", "can", "be", "accessed", "by", "name", "via", "{", "@", "link", "#", "set", "field", "(", "string", ",", "object", ")", "}", "and", "{", "@", "link", "#", "get", "field", "(", "string", ")", "}", "see", "the", "class", "documentation", "of", "{", "@", "link", "row", "}", "for", "more", "information" ]
[ "public", "static", "row", "with", "names", "(", "row", "kind", "kind", ")", "{", "return", "new", "row", "(", "kind", ",", "null", ",", "new", "hash", "map", "<", ">", "(", ")", ",", "null", ")", ";", "}" ]
[ "creates", "list", "of", "users", "with", "given", "input", "array" ]
[ "public", "api", "response", "<", "void", ">", "create", "users", "with", "array", "input", "with", "http", "info", "(", "list", "<", "user", ">", "body", ")", "throws", "api", "exception", "{", "object", "local", "var", "post", "body", "=", "body", ";", "/", "/", "verify", "the", "required", "parameter", "'", "body", "'", "is", "set", "if", "(", "body", "=", "=", "null", ")", "{", "throw", "new", "api", "exception", "(", "400", ",", "\"", "missing", "the", "required", "parameter", "'", "body", "'", "when", "calling", "create", "users", "with", "array", "input", "\"", ")", ";", "}", "/", "/", "create", "path", "and", "map", "variables", "string", "local", "var", "path", "=", "\"", "/", "user", "/", "create", "with", "array", "\"", ";", "/", "/", "query", "params", "list", "<", "pair", ">", "local", "var", "query", "params", "=", "new", "array", "list", "<", "pair", ">", "(", ")", ";", "map", "<", "string", ",", "string", ">", "local", "var", "header", "params", "=", "new", "hash", "map", "<", "string", ",", "string", ">", "(", ")", ";", "map", "<", "string", ",", "string", ">", "local", "var", "cookie", "params", "=", "new", "hash", "map", "<", "string", ",", "string", ">", "(", ")", ";", "map", "<", "string", ",", "object", ">", "local", "var", "form", "params", "=", "new", "hash", "map", "<", "string", ",", "object", ">", "(", ")", ";", "final", "string", "[", "]", "local", "var", "accepts", "=", "{", "}", ";", "final", "string", "local", "var", "accept", "=", "api", "client", "select", "header", "accept", "(", "local", "var", "accepts", ")", ";", "final", "string", "[", "]", "local", "var", "content", "types", "=", "{", "}", ";", "final", "string", "local", "var", "content", "type", "=", "api", "client", "select", "header", "content", "type", "(", "local", "var", "content", "types", ")", ";", "string", "[", "]", "local", "var", "auth", "names", "=", "new", "string", "[", "]", "{", "}", ";", "return", "api", "client", "invoke", "a", "p", "i", "(", "\"", "user", "api", "create", "users", "with", "array", "input", "\"", ",", "local", "var", "path", ",", "\"", "post", "\"", ",", "local", "var", "query", "params", ",", "local", "var", "post", "body", ",", "local", "var", "header", "params", ",", "local", "var", "cookie", "params", ",", "local", "var", "form", "params", ",", "local", "var", "accept", ",", "local", "var", "content", "type", ",", "local", "var", "auth", "names", ",", "null", ",", "false", ")", ";", "}" ]
[ "returns", "true", "if", "field", "corresponding", "to", "field", "i", "d", "is", "set", "(", "has", "been", "assigned", "a", "value", ")", "and", "false", "otherwise" ]
[ "public", "boolean", "is", "set", "(", "fields", "field", ")", "{", "if", "(", "field", "=", "=", "null", ")", "{", "throw", "new", "illegal", "argument", "exception", "(", ")", ";", "}", "switch", "(", "field", ")", "{", "case", "arg", ":", "return", "is", "set", "arg", "(", ")", ";", "}", "throw", "new", "illegal", "state", "exception", "(", ")", ";", "}" ]
[ "return", "the", "request", "factory", "that", "this", "accessor", "uses", "for", "obtaining", "client", "request", "handles" ]
[ "public", "client", "http", "request", "factory", "get", "request", "factory", "(", ")", "{", "return", "this", "request", "factory", ";", "}" ]
[ "add", "headers", "to", "the", "request", "that", "is", "being", "built" ]
[ "protected", "void", "add", "headers", "to", "request", "(", "http", "headers", "headers", ",", "body", "builder", "request", "builder", ")", "{", "for", "(", "entry", "<", "string", ",", "list", "<", "string", ">", ">", "entry", ":", "headers", "entry", "set", "(", ")", ")", "{", "list", "<", "string", ">", "values", "=", "entry", "get", "value", "(", ")", ";", "for", "(", "string", "value", ":", "values", ")", "{", "if", "(", "value", "!", "=", "null", ")", "{", "request", "builder", "header", "(", "entry", "get", "key", "(", ")", ",", "value", ")", ";", "}", "}", "}", "}" ]
[ "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", "\"", ")", ";", "}" ]
[ "create", "a", "new", "record", "node", "with", "no", "siblings", "attached" ]
[ "static", "fixed", "key", "record", "node", "create", "record", "node", "(", "node", "mgr", "node", "mgr", ")", "throws", "i", "o", "exception", "{", "schema", "schema", "=", "node", "mgr", "get", "table", "schema", "(", ")", ";", "fixed", "key", "record", "node", "node", "=", "null", ";", "if", "(", "schema", "is", "variable", "length", "(", ")", ")", "{", "node", "=", "new", "fixed", "key", "var", "rec", "node", "(", "node", "mgr", ",", "-", "1", ",", "-", "1", ")", ";", "}", "else", "{", "node", "=", "new", "fixed", "key", "fixed", "rec", "node", "(", "node", "mgr", ",", "-", "1", ",", "-", "1", ")", ";", "}", "return", "node", ";", "}" ]
[ "gets", "the", "mime", "type", "for", "the", "file", "with", "the", "given", "name", ",", "by", "extension", "this", "method", "tries", "to", "extract", "the", "file", "extension", "and", "then", "use", "the", "{", "@", "link", "#", "get", "mime", "type", "for", "extension", "(", "string", ")", "}", "to", "determine", "the", "mime", "type", "if", "the", "extension", "cannot", "be", "determined", ",", "or", "the", "extension", "is", "unrecognized", ",", "this", "method", "return", "{", "@", "code", "null", "}" ]
[ "public", "static", "string", "get", "mime", "type", "for", "file", "name", "(", "string", "file", "name", ")", "{", "int", "extension", "pos", "=", "file", "name", "last", "index", "of", "(", "'", "'", ")", ";", "if", "(", "extension", "pos", ">", "=", "1", "&", "&", "extension", "pos", "<", "file", "name", "length", "(", ")", "-", "1", ")", "{", "string", "extension", "=", "file", "name", "substring", "(", "extension", "pos", "+", "1", ")", ";", "return", "get", "mime", "type", "for", "extension", "(", "extension", ")", ";", "}", "else", "{", "return", "null", ";", "}", "}" ]
[ "is", "called", "when", "an", "{", "@", "link", "idle", "state", "event", "}", "should", "be", "fired", "this", "implementation", "calls", "{", "@", "link", "channel", "handler", "context", "#", "fire", "user", "event", "triggered", "(", "object", ")", "}" ]
[ "protected", "void", "channel", "idle", "(", "channel", "handler", "context", "ctx", ",", "idle", "state", "event", "evt", ")", "throws", "exception", "{", "ctx", "fire", "user", "event", "triggered", "(", "evt", ")", ";", "}" ]
[ "checks", "if", "the", "unix", "timestamp", "is", "representable", "as", "a", "valid", "dos", "timestamp", "see", "<", "a", "href", "=", "\"", "http", ":", "www", "pkware", "comdocumentscasestudies", "a", "p", "p", "n", "o", "t", "e", "txt", "\"", ">", "zip", "format", "for", "a", "general", "description", "of", "the", "date", "a", "time", "fields", "(", "section", "4", "4", "6", ")", "and", "<", "a", "href", "=", "\"", "https", ":", "msdn", "microsoft", "comen", "-", "uslibrarywindowsdesktopms", "7", "2", "4", "2", "4", "7", "aspx", "\"", ">", "dos", "date", "format", "for", "a", "detailed", "description", "of", "the", "format" ]
[ "public", "static", "boolean", "is", "valid", "in", "dos", "(", "long", "time", "millis", ")", "{", "calendar", "time", "=", "calendar", "get", "instance", "(", ")", ";", "time", "set", "time", "in", "millis", "(", "time", "millis", ")", ";", "calendar", "min", "time", "=", "calendar", "get", "instance", "(", ")", ";", "min", "time", "set", "time", "in", "millis", "(", "dos", "epoch", ")", ";", "calendar", "max", "time", "=", "calendar", "get", "instance", "(", ")", ";", "max", "time", "set", "time", "in", "millis", "(", "max", "dos", "date", ")", ";", "return", "(", "!", "time", "before", "(", "min", "time", ")", "&", "&", "!", "time", "after", "(", "max", "time", ")", ")", ";", "}" ]
[ "match", "the", "given", "qualifier", "annotations", "against", "the", "candidate", "bean", "definition" ]
[ "protected", "boolean", "check", "qualifiers", "(", "bean", "definition", "holder", "bd", "holder", ",", "annotation", "[", "]", "annotations", "to", "search", ")", "{", "if", "(", "object", "utils", "is", "empty", "(", "annotations", "to", "search", ")", ")", "{", "return", "true", ";", "}", "simple", "type", "converter", "type", "converter", "=", "new", "simple", "type", "converter", "(", ")", ";", "for", "(", "annotation", "annotation", ":", "annotations", "to", "search", ")", "{", "class", "<", "?", "extends", "annotation", ">", "type", "=", "annotation", "annotation", "type", "(", ")", ";", "boolean", "check", "meta", "=", "true", ";", "boolean", "fallback", "to", "meta", "=", "false", ";", "if", "(", "is", "qualifier", "(", "type", ")", ")", "{", "if", "(", "!", "check", "qualifier", "(", "bd", "holder", ",", "annotation", ",", "type", "converter", ")", ")", "{", "fallback", "to", "meta", "=", "true", ";", "}", "else", "{", "check", "meta", "=", "false", ";", "}", "}", "if", "(", "check", "meta", ")", "{", "boolean", "found", "meta", "=", "false", ";", "for", "(", "annotation", "meta", "ann", ":", "type", "get", "annotations", "(", ")", ")", "{", "class", "<", "?", "extends", "annotation", ">", "meta", "type", "=", "meta", "ann", "annotation", "type", "(", ")", ";", "if", "(", "is", "qualifier", "(", "meta", "type", ")", ")", "{", "found", "meta", "=", "true", ";", "/", "/", "only", "accept", "fallback", "match", "if", "@", "qualifier", "annotation", "has", "a", "value", "/", "/", "otherwise", "it", "is", "just", "a", "marker", "for", "a", "custom", "qualifier", "annotation", "if", "(", "(", "fallback", "to", "meta", "&", "&", "object", "utils", "is", "empty", "(", "annotation", "utils", "get", "value", "(", "meta", "ann", ")", ")", ")", "|", "|", "!", "check", "qualifier", "(", "bd", "holder", ",", "meta", "ann", ",", "type", "converter", ")", ")", "{", "return", "false", ";", "}", "}", "}", "if", "(", "fallback", "to", "meta", "&", "&", "!", "found", "meta", ")", "{", "return", "false", ";", "}", "}", "}", "return", "true", ";", "}" ]
[ "specify", "the", "{", "@", "link", "exception", "handler", "}", "to", "use", "with", "the", "event", "handler" ]
[ "public", "void", "with", "(", "exception", "handler", "<", "?", "super", "t", ">", "exception", "handler", ")", "{", "final", "event", "processor", "event", "processor", "=", "consumer", "repository", "get", "event", "processor", "for", "(", "event", "handler", ")", ";", "if", "(", "event", "processor", "instanceof", "batch", "event", "processor", ")", "{", "(", "(", "batch", "event", "processor", "<", "t", ">", ")", "event", "processor", ")", "set", "exception", "handler", "(", "exception", "handler", ")", ";", "consumer", "repository", "get", "barrier", "for", "(", "event", "handler", ")", "alert", "(", ")", ";", "}", "else", "{", "throw", "new", "runtime", "exception", "(", "\"", "event", "processor", ":", "\"", "+", "event", "processor", "+", "\"", "is", "not", "a", "batch", "event", "processor", "\"", "+", "\"", "and", "does", "not", "support", "exception", "handlers", "\"", ")", ";", "}", "}" ]
[ "test", "get", "branch", "type" ]
[ "public", "void", "test", "get", "branch", "type", "(", ")", "{", "root", "context", "bind", "branch", "type", "(", "default", "branch", "type", ")", ";", "/", "/", "before", "bind", "xid", ",", "branch", "type", "is", "null", "assert", "that", "(", "root", "context", "get", "branch", "type", "(", ")", ")", "is", "null", "(", ")", ";", "/", "/", "after", "bind", "xid", ",", "branch", "type", "is", "not", "null", "root", "context", "bind", "(", "default", "xid", ")", ";", "assert", "that", "(", "root", "context", "get", "branch", "type", "(", ")", ")", "is", "equal", "to", "(", "default", "branch", "type", ")", ";", "root", "context", "unbind", "(", ")", ";", "assert", "that", "(", "root", "context", "unbind", "branch", "type", "(", ")", ")", "is", "equal", "to", "(", "default", "branch", "type", ")", ";", "assert", "that", "(", "root", "context", "get", "branch", "type", "(", ")", ")", "is", "null", "(", ")", ";", "}" ]
[ "merging", "a", "late", "window", "should", "not", "register", "a", "timer", ",", "otherwise", "we", "would", "get", "two", "firings", ":", "one", "from", "on", "element", "(", ")", "on", "the", "merged", "window", "and", "one", "from", "the", "timer" ]
[ "public", "void", "test", "merging", "late", "windows", "(", ")", "throws", "exception", "{", "trigger", "test", "harness", "<", "object", ",", "time", "window", ">", "test", "harness", "=", "new", "trigger", "test", "harness", "<", ">", "(", "processing", "time", "trigger", "create", "(", ")", ",", "new", "time", "window", "serializer", "(", ")", ")", ";", "assert", "true", "(", "processing", "time", "trigger", "create", "(", ")", "can", "merge", "(", ")", ")", ";", "assert", "equals", "(", "trigger", "result", "continue", ",", "test", "harness", "process", "element", "(", "new", "stream", "record", "<", "object", ">", "(", "1", ")", ",", "new", "time", "window", "(", "0", ",", "2", ")", ")", ")", ";", "assert", "equals", "(", "trigger", "result", "continue", ",", "test", "harness", "process", "element", "(", "new", "stream", "record", "<", "object", ">", "(", "1", ")", ",", "new", "time", "window", "(", "2", ",", "4", ")", ")", ")", ";", "assert", "equals", "(", "0", ",", "test", "harness", "num", "state", "entries", "(", ")", ")", ";", "assert", "equals", "(", "0", ",", "test", "harness", "num", "event", "time", "timers", "(", ")", ")", ";", "assert", "equals", "(", "2", ",", "test", "harness", "num", "processing", "time", "timers", "(", ")", ")", ";", "assert", "equals", "(", "1", ",", "test", "harness", "num", "processing", "time", "timers", "(", "new", "time", "window", "(", "0", ",", "2", ")", ")", ")", ";", "assert", "equals", "(", "1", ",", "test", "harness", "num", "processing", "time", "timers", "(", "new", "time", "window", "(", "2", ",", "4", ")", ")", ")", ";", "test", "harness", "advance", "processing", "time", "(", "10", ")", ";", "assert", "equals", "(", "0", ",", "test", "harness", "num", "state", "entries", "(", ")", ")", ";", "assert", "equals", "(", "0", ",", "test", "harness", "num", "event", "time", "timers", "(", ")", ")", ";", "assert", "equals", "(", "0", ",", "test", "harness", "num", "processing", "time", "timers", "(", ")", ")", ";", "assert", "equals", "(", "0", ",", "test", "harness", "num", "processing", "time", "timers", "(", "new", "time", "window", "(", "0", ",", "2", ")", ")", ")", ";", "assert", "equals", "(", "0", ",", "test", "harness", "num", "processing", "time", "timers", "(", "new", "time", "window", "(", "2", ",", "4", ")", ")", ")", ";", "test", "harness", "merge", "windows", "(", "new", "time", "window", "(", "0", ",", "4", ")", ",", "lists", "new", "array", "list", "(", "new", "time", "window", "(", "0", ",", "2", ")", ",", "new", "time", "window", "(", "2", ",", "4", ")", ")", ")", ";", "assert", "equals", "(", "0", ",", "test", "harness", "num", "state", "entries", "(", ")", ")", ";", "assert", "equals", "(", "0", ",", "test", "harness", "num", "event", "time", "timers", "(", ")", ")", ";", "assert", "equals", "(", "0", ",", "test", "harness", "num", "processing", "time", "timers", "(", ")", ")", ";", "assert", "equals", "(", "0", ",", "test", "harness", "num", "processing", "time", "timers", "(", "new", "time", "window", "(", "0", ",", "2", ")", ")", ")", ";", "assert", "equals", "(", "0", ",", "test", "harness", "num", "processing", "time", "timers", "(", "new", "time", "window", "(", "2", ",", "4", ")", ")", ")", ";", "assert", "equals", "(", "0", ",", "test", "harness", "num", "processing", "time", "timers", "(", "new", "time", "window", "(", "0", ",", "4", ")", ")", ")", ";", "}" ]
[ "returns", "a", "complete", "notification" ]
[ "public", "static", "object", "complete", "(", ")", "{", "return", "complete", ";", "}" ]
[ "test", "that", "we", "see", "a", "runtime", "exception", "come", "back" ]
[ "public", "void", "test", "exception", "comes", "back", "(", ")", "throws", "exception", "{", "final", "string", "sql", "=", "\"", "select", "id", "from", "custmr", "\"", ";", "final", "runtime", "exception", "runtime", "exception", "=", "new", "runtime", "exception", "(", "\"", "expected", "\"", ")", ";", "given", "(", "this", "result", "set", "next", "(", ")", ")", "will", "return", "(", "true", ")", ";", "given", "(", "this", "connection", "create", "statement", "(", ")", ")", "will", "return", "(", "this", "prepared", "statement", ")", ";", "try", "{", "assert", "that", "exception", "of", "type", "(", "runtime", "exception", "class", ")", "is", "thrown", "by", "(", "(", ")", "-", ">", "this", "template", "query", "(", "sql", ",", "(", "row", "callback", "handler", ")", "rs", "-", ">", "{", "throw", "runtime", "exception", ";", "}", ")", ")", "with", "message", "(", "runtime", "exception", "get", "message", "(", ")", ")", ";", "}", "finally", "{", "verify", "(", "this", "result", "set", ")", "close", "(", ")", ";", "verify", "(", "this", "prepared", "statement", ")", "close", "(", ")", ";", "verify", "(", "this", "connection", ")", "close", "(", ")", ";", "}", "}" ]
[ "create", "a", "row", "data", "key", "selector", "to", "extract", "keys", "from", "data", "stream", "which", "type", "is", "{", "@", "link", "internal", "type", "info", "}", "of", "{", "@", "link", "row", "data", "}" ]
[ "public", "static", "row", "data", "key", "selector", "get", "row", "data", "selector", "(", "int", "[", "]", "key", "fields", ",", "internal", "type", "info", "<", "row", "data", ">", "row", "type", ")", "{", "if", "(", "key", "fields", "length", ">", "0", ")", "{", "logical", "type", "[", "]", "input", "field", "types", "=", "row", "type", "to", "row", "field", "types", "(", ")", ";", "logical", "type", "[", "]", "key", "field", "types", "=", "new", "logical", "type", "[", "key", "fields", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "key", "fields", "length", ";", "+", "+", "i", ")", "{", "key", "field", "types", "[", "i", "]", "=", "input", "field", "types", "[", "key", "fields", "[", "i", "]", "]", ";", "}", "/", "/", "do", "not", "provide", "field", "names", "for", "the", "result", "key", "type", ",", "/", "/", "because", "we", "may", "have", "duplicate", "key", "fields", "and", "the", "field", "names", "may", "conflict", "row", "type", "return", "type", "=", "row", "type", "of", "(", "key", "field", "types", ")", ";", "row", "type", "input", "type", "=", "row", "type", "to", "row", "type", "(", ")", ";", "generated", "projection", "generated", "projection", "=", "projection", "code", "generator", "generate", "projection", "(", "code", "generator", "context", "apply", "(", "new", "table", "config", "(", ")", ")", ",", "\"", "key", "projection", "\"", ",", "input", "type", ",", "return", "type", ",", "key", "fields", ")", ";", "internal", "type", "info", "<", "row", "data", ">", "key", "row", "type", "=", "internal", "type", "info", "of", "(", "return", "type", ")", ";", "return", "new", "binary", "row", "data", "key", "selector", "(", "key", "row", "type", ",", "generated", "projection", ")", ";", "}", "else", "{", "return", "empty", "row", "data", "key", "selector", "instance", ";", "}", "}" ]
[ "bind", "to", "the", "interrupt", "handler" ]
[ "public", "void", "bind", "(", ")", "{", "preconditions", "check", "state", "(", "signal", "=", "=", "null", ",", "\"", "handler", "already", "bound", "\"", ")", ";", "try", "{", "signal", "=", "new", "signal", "(", "name", ")", ";", "signal", "handle", "(", "signal", ",", "this", ")", ";", "}", "catch", "(", "illegal", "argument", "exception", "e", ")", "{", "throw", "new", "illegal", "argument", "exception", "(", "\"", "could", "not", "set", "handler", "for", "signal", "\\", "\"", "\"", "+", "name", "+", "\"", "\\", "\"", "\"", "+", "\"", "this", "can", "happen", "if", "the", "jvm", "has", "the", "-", "xrs", "set", "\"", ",", "e", ")", ";", "}", "}" ]
[ "convert", "the", "given", "object", "to", "string", "with", "each", "line", "indented", "by", "4", "spaces", "(", "except", "the", "first", "line", ")" ]
[ "private", "string", "to", "indented", "string", "(", "object", "o", ")", "{", "if", "(", "o", "=", "=", "null", ")", "{", "return", "\"", "null", "\"", ";", "}", "return", "o", "to", "string", "(", ")", "replace", "(", "\"", "\\", "n", "\"", ",", "\"", "\\", "n", "\"", ")", ";", "}" ]
[ "returns", "whether", "the", "end", "of", "the", "configuration", "has", "been", "reached" ]
[ "private", "boolean", "configuration", "end", "(", ")", "{", "return", "configuration", "end", "(", "false", ")", ";", "}" ]
[ "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", "\"", ")", ";", "}" ]
[ "the", "response", "resources", "wrapped", "in", "the", "common", "mcp", "resource", "message", "<", "code", ">", "repeated", "istio", "mcp", "v", "1alpha", "1", "resource", "resources", "=", "2", ";", "<", "code", ">" ]
[ "public", "builder", "add", "resources", "(", "int", "index", ",", "com", "alibaba", "nacos", "istio", "model", "mcp", "resource", "value", ")", "{", "if", "(", "resources", "builder", "=", "=", "null", ")", "{", "if", "(", "value", "=", "=", "null", ")", "{", "throw", "new", "null", "pointer", "exception", "(", ")", ";", "}", "ensure", "resources", "is", "mutable", "(", ")", ";", "resources", "add", "(", "index", ",", "value", ")", ";", "on", "changed", "(", ")", ";", "}", "else", "{", "resources", "builder", "add", "message", "(", "index", ",", "value", ")", ";", "}", "return", "this", ";", "}" ]
[ "enabledisable", "the", "joint", "motor" ]
[ "public", "void", "enable", "motor", "(", "boolean", "flag", ")", "{", "joint", "enable", "motor", "(", "flag", ")", ";", "}" ]
[ "rank", "end", "column", "must", "be", "long", ",", "int", "or", "short", "type", ",", "but", "could", "not", "be", "string", "type", "yet" ]
[ "public", "void", "test", "invalid", "variable", "rank", "range", "with", "int", "type", "(", ")", "throws", "exception", "{", "abstract", "top", "n", "function", "func", "=", "create", "function", "(", "rank", "type", "row", "number", ",", "new", "variable", "rank", "range", "(", "0", ")", ",", "true", ",", "false", ")", ";", "one", "input", "stream", "operator", "test", "harness", "<", "row", "data", ",", "row", "data", ">", "test", "harness", "=", "create", "test", "harness", "(", "func", ")", ";", "test", "harness", "open", "(", ")", ";", "}" ]
[ "gets", "extra", "data" ]
[ "public", "string", "get", "extra", "data", "(", ")", "{", "return", "extra", "data", ";", "}" ]
[ "try", "to", "return", "the", "current", "aop", "proxy", "this", "method", "is", "usable", "only", "if", "the", "calling", "method", "has", "been", "invoked", "via", "aop", ",", "and", "the", "aop", "framework", "has", "been", "set", "to", "expose", "proxies", "otherwise", ",", "this", "method", "will", "throw", "an", "illegal", "state", "exception" ]
[ "public", "static", "object", "current", "proxy", "(", ")", "throws", "illegal", "state", "exception", "{", "object", "proxy", "=", "current", "proxy", "get", "(", ")", ";", "if", "(", "proxy", "=", "=", "null", ")", "{", "throw", "new", "illegal", "state", "exception", "(", "\"", "cannot", "find", "current", "proxy", ":", "set", "'", "expose", "proxy", "'", "property", "on", "advised", "to", "'", "true", "'", "to", "make", "it", "available", ",", "and", "\"", "+", "\"", "ensure", "that", "aop", "context", "current", "proxy", "(", ")", "is", "invoked", "in", "the", "same", "thread", "as", "the", "aop", "invocation", "context", "\"", ")", ";", "}", "return", "proxy", ";", "}" ]
[ "this", "simlulates", "a", "short", "server", "operation", "multiple", "threads", "start", "an", "operation", "that", "takes", "very", "short", "time", "and", "finally", "succeeds", "the", "retries", "in", "this", "case", "do", "not", "wait", "long", "for", "the", "current", "operation", "to", "complete", "all", "the", "retries", "then", "complete", "based", "on", "the", "entry", "in", "the", "retry", "cache" ]
[ "public", "void", "test", "short", "operations", "success", "(", ")", "throws", "exception", "{", "/", "/", "test", "long", "failed", "operations", "/", "/", "there", "is", "no", "entry", "in", "cache", "expected", "when", "the", "first", "operation", "starts", "test", "operations", "(", "r", "next", "int", "(", ")", ",", "25", ",", "0", ",", "false", ",", "false", ",", "new", "call", "(", ")", ")", ";", "}" ]
[ "applies", "the", "given", "window", "function", "to", "each", "window", "the", "window", "function", "is", "called", "for", "each", "evaluation", "of", "the", "window", "for", "each", "key", "individually", "the", "output", "of", "the", "window", "function", "is", "interpreted", "as", "a", "regular", "non", "-", "windowed", "stream", "note", "that", "this", "function", "requires", "that", "all", "data", "in", "the", "windows", "is", "buffered", "until", "the", "window", "is", "evaluated", ",", "as", "the", "function", "provides", "no", "means", "of", "incremental", "aggregation" ]
[ "public", "<", "r", ">", "single", "output", "stream", "operator", "<", "r", ">", "apply", "(", "window", "function", "<", "t", ",", "r", ",", "k", ",", "w", ">", "function", ",", "type", "information", "<", "r", ">", "result", "type", ")", "{", "function", "=", "input", "get", "execution", "environment", "(", ")", "clean", "(", "function", ")", ";", "final", "string", "op", "name", "=", "builder", "generate", "operator", "name", "(", "function", ",", "null", ")", ";", "one", "input", "stream", "operator", "<", "t", ",", "r", ">", "operator", "=", "builder", "apply", "(", "function", ")", ";", "return", "input", "transform", "(", "op", "name", ",", "result", "type", ",", "operator", ")", ";", "}" ]
[ "gets", "the", "{", "@", "link", "file", "system", "browser", "plugin", "}", "provider", "'", "s", "tree" ]
[ "public", "g", "tree", "get", "tree", "(", ")", "{", "return", "g", "tree", ";", "}" ]
[ "get", "map", "of", "enum", "string" ]
[ "public", "map", "<", "string", ",", "inner", "enum", ">", "get", "map", "of", "enum", "string", "(", ")", "{", "return", "map", "of", "enum", "string", ";", "}" ]
[ "specify", "the", "statement", "separator", ",", "if", "a", "custom", "one", "defaults", "to", "{", "@", "code", "\"", ";", "\"", "}", "if", "not", "specified", "and", "falls", "back", "to", "{", "@", "code", "\"", "\\", "n", "\"", "}", "as", "a", "last", "resort", ";", "may", "be", "set", "to", "{", "@", "link", "script", "utils", "#", "eof", "statement", "separator", "}", "to", "signal", "that", "each", "script", "contains", "a", "single", "statement", "without", "a", "separator" ]
[ "public", "void", "set", "separator", "(", "string", "separator", ")", "{", "this", "separator", "=", "separator", ";", "}" ]
[ "returns", "a", "hash", "code", ",", "having", "the", "same", "bit", "length", "as", "each", "of", "the", "input", "hash", "codes", ",", "that", "combines", "the", "information", "of", "these", "hash", "codes", "in", "an", "unordered", "fashion", "that", "is", ",", "whenever", "two", "equal", "hash", "codes", "are", "produced", "by", "two", "calls", "to", "this", "method", ",", "it", "is", "as", "likely", "as", "possible", "that", "each", "was", "computed", "from", "the", "same", "input", "hash", "codes", "in", "some", "order" ]
[ "public", "static", "hash", "code", "combine", "unordered", "(", "iterable", "<", "hash", "code", ">", "hash", "codes", ")", "{", "iterator", "<", "hash", "code", ">", "iterator", "=", "hash", "codes", "iterator", "(", ")", ";", "check", "argument", "(", "iterator", "has", "next", "(", ")", ",", "\"", "must", "be", "at", "least", "1", "hash", "code", "to", "combine", "\"", ")", ";", "byte", "[", "]", "result", "bytes", "=", "new", "byte", "[", "iterator", "next", "(", ")", "bits", "(", ")", "/", "8", "]", ";", "for", "(", "hash", "code", "hash", "code", ":", "hash", "codes", ")", "{", "byte", "[", "]", "next", "bytes", "=", "hash", "code", "as", "bytes", "(", ")", ";", "check", "argument", "(", "next", "bytes", "length", "=", "=", "result", "bytes", "length", ",", "\"", "all", "hashcodes", "must", "have", "the", "same", "bit", "length", "\"", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "next", "bytes", "length", ";", "i", "+", "+", ")", "{", "result", "bytes", "[", "i", "]", "+", "=", "next", "bytes", "[", "i", "]", ";", "}", "}", "return", "hash", "code", "from", "bytes", "no", "copy", "(", "result", "bytes", ")", ";", "}" ]
[ "write", "a", "version", "to", "the", "update", "file", ",", "update", "last", "modified", "to", ">", "2", "4h" ]
[ "private", "static", "void", "write", "version", "(", "string", "s", ")", "throws", "i", "o", "exception", "{", "file", "f", "=", "setup", "wizard", "get", "update", "state", "file", "(", ")", ";", "file", "utils", "write", "string", "to", "file", "(", "f", ",", "s", ")", ";", "f", "set", "last", "modified", "(", "system", "current", "time", "millis", "(", ")", "-", "time", "unit", "days", "to", "millis", "(", "1", ")", ")", ";", "}" ]
[ "return", "time", "duration", "in", "the", "given", "time", "unit", "valid", "units", "are", "encoded", "in", "properties", "as", "suffixes", ":", "nanoseconds", "(", "ns", ")", ",", "microseconds", "(", "us", ")", ",", "milliseconds", "(", "ms", ")", ",", "seconds", "(", "s", ")", ",", "minutes", "(", "m", ")", ",", "hours", "(", "h", ")", ",", "and", "days", "(", "d", ")" ]
[ "public", "long", "get", "time", "duration", "(", "string", "name", ",", "long", "default", "value", ",", "time", "unit", "unit", ")", "{", "string", "v", "str", "=", "get", "(", "name", ")", ";", "if", "(", "null", "=", "=", "v", "str", ")", "{", "return", "default", "value", ";", "}", "v", "str", "=", "v", "str", "trim", "(", ")", ";", "return", "get", "time", "duration", "helper", "(", "name", ",", "v", "str", ",", "unit", ")", ";", "}" ]
[ "waits", "out", "termination", "of", "a", "thread", "pool", "or", "fails", "doing", "so" ]
[ "void", "join", "pool", "(", "executor", "service", "exec", ")", "{", "try", "{", "exec", "shutdown", "(", ")", ";", "if", "(", "!", "exec", "await", "termination", "(", "2", "*", "long", "delay", "ms", ",", "milliseconds", ")", ")", "{", "fail", "(", "\"", "executor", "service", "\"", "+", "exec", "+", "\"", "did", "not", "terminate", "in", "a", "timely", "manner", "\"", ")", ";", "}", "}", "catch", "(", "security", "exception", "ok", ")", "{", "/", "/", "allowed", "in", "case", "test", "doesn", "'", "t", "have", "privs", "}", "catch", "(", "interrupted", "exception", "fail", ")", "{", "fail", "(", "\"", "unexpected", "interrupted", "exception", "\"", ")", ";", "}", "}" ]
[ "clean", "up", "all", "objects", "matching", "the", "prefix" ]
[ "public", "void", "purge", "(", "string", "prefix", ")", "throws", "i", "o", "exception", "{", "string", "key", ";", "try", "{", "object", "listing", "objects", "=", "list", "objects", "(", "prefix", ",", "max", "keys", ",", "null", ",", "true", ")", ";", "for", "(", "o", "s", "s", "object", "summary", "object", ":", "objects", "get", "object", "summaries", "(", ")", ")", "{", "key", "=", "object", "get", "key", "(", ")", ";", "oss", "client", "delete", "object", "(", "bucket", "name", ",", "key", ")", ";", "statistics", "increment", "write", "ops", "(", "1", ")", ";", "}", "for", "(", "string", "dir", ":", "objects", "get", "common", "prefixes", "(", ")", ")", "{", "delete", "dirs", "(", "dir", ")", ";", "}", "}", "catch", "(", "o", "s", "s", "exception", "|", "client", "exception", "e", ")", "{", "log", "error", "(", "\"", "failed", "to", "purge", "\"", "+", "prefix", ")", ";", "}", "}" ]
[ "verifies", "deserialization", "failure", "cases", "when", "reading", "a", "serializer", "from", "bytes", ",", "in", "the", "case", "of", "a", "{", "@", "link", "class", "not", "found", "exception", "}" ]
[ "public", "void", "test", "serializer", "serialization", "with", "class", "not", "found", "(", ")", "throws", "exception", "{", "type", "serializer", "<", "?", ">", "serializer", "=", "int", "serializer", "instance", ";", "byte", "[", "]", "serialized", ";", "try", "(", "byte", "array", "output", "stream", "with", "pos", "out", "=", "new", "byte", "array", "output", "stream", "with", "pos", "(", ")", ")", "{", "type", "serializer", "serialization", "util", "write", "serializer", "(", "new", "data", "output", "view", "stream", "wrapper", "(", "out", ")", ",", "serializer", ")", ";", "serialized", "=", "out", "to", "byte", "array", "(", ")", ";", "}", "type", "serializer", "<", "?", ">", "deserialized", "serializer", ";", "try", "(", "byte", "array", "input", "stream", "with", "pos", "in", "=", "new", "byte", "array", "input", "stream", "with", "pos", "(", "serialized", ")", ")", "{", "deserialized", "serializer", "=", "type", "serializer", "serialization", "util", "try", "read", "serializer", "(", "new", "data", "input", "view", "stream", "wrapper", "(", "in", ")", ",", "new", "artificial", "c", "n", "f", "exception", "throwing", "class", "loader", "(", "thread", "current", "thread", "(", ")", "get", "context", "class", "loader", "(", ")", ",", "collections", "singleton", "(", "int", "serializer", "class", "get", "name", "(", ")", ")", ")", ",", "true", ")", ";", "}", "assert", "assert", "true", "(", "deserialized", "serializer", "instanceof", "unloadable", "dummy", "type", "serializer", ")", ";", "assert", "assert", "array", "equals", "(", "instantiation", "util", "serialize", "object", "(", "serializer", ")", ",", "(", "(", "unloadable", "dummy", "type", "serializer", "<", "?", ">", ")", "deserialized", "serializer", ")", "get", "actual", "bytes", "(", ")", ")", ";", "}" ]
[ "for", "upgrade", "patch", ",", "patch", "file", "version", "can", "'", "t", "equal", "old", "version", "or", "new", "version", "in", "old", "patch", "info", "for", "repair", "patch", ",", "old", "patch", "info", "can", "'", "t", "be", "null", ",", "and", "patch", "file", "version", "must", "equal", "with", "old", "version", "and", "new", "version" ]
[ "void", "on", "patch", "version", "check", "fail", "(", "file", "patch", "file", ",", "share", "patch", "info", "old", "patch", "info", ",", "string", "patch", "file", "version", ")", ";" ]
[ "visits", "an", "annotation", "on", "a", "type", "in", "the", "method", "signature" ]
[ "public", "annotation", "visitor", "visit", "type", "annotation", "(", "final", "int", "type", "ref", ",", "final", "type", "path", "type", "path", ",", "final", "string", "descriptor", ",", "final", "boolean", "visible", ")", "{", "if", "(", "api", "<", "opcodes", "asm5", ")", "{", "throw", "new", "unsupported", "operation", "exception", "(", "requires", "asm5", ")", ";", "}", "if", "(", "mv", "!", "=", "null", ")", "{", "return", "mv", "visit", "type", "annotation", "(", "type", "ref", ",", "type", "path", ",", "descriptor", ",", "visible", ")", ";", "}", "return", "null", ";", "}" ]
[ "issues", "an", "initial", "tls", "handshake", "once", "connected", "when", "used", "in", "client", "-", "mode" ]
[ "public", "void", "channel", "active", "(", "final", "channel", "handler", "context", "ctx", ")", "throws", "exception", "{", "if", "(", "!", "start", "tls", ")", "{", "start", "handshake", "processing", "(", ")", ";", "}", "ctx", "fire", "channel", "active", "(", ")", ";", "}" ]
[ "closes", "this", "local", "memory", "context", "once", "closed", "the", "bytes", "tracked", "by", "this", "local", "memory", "context", "will", "be", "set", "to", "0", ",", "and", "none", "of", "its", "methods", "(", "except", "{", "@", "code", "get", "bytes", "(", ")", "}", ")", "can", "be", "called" ]
[ "void", "close", "(", ")", ";" ]
[ "get", "the", "key", "class", "for", "the", "map", "output", "data", "if", "it", "is", "not", "set", ",", "use", "the", "(", "final", ")", "output", "key", "class", "this", "allows", "the", "map", "output", "key", "class", "to", "be", "different", "than", "the", "final", "output", "key", "class" ]
[ "public", "class", "<", "?", ">", "get", "map", "output", "key", "class", "(", ")", "{", "return", "conf", "get", "map", "output", "key", "class", "(", ")", ";", "}" ]
[ "prints", "all", "exceptions", "found", "that", "did", "not", "occur", "on", "the", "test", "thread", "this", "is", "useful", "for", "debugging" ]
[ "private", "void", "print", "non", "test", "thread", "exceptions", "(", ")", "{", "list", "<", "test", "exception", "tracker", ">", "trackers", "=", "concurrent", "test", "exception", "handler", "get", "exceptions", "(", ")", ";", "if", "(", "trackers", "is", "empty", "(", ")", ")", "{", "return", ";", "}", "msg", "error", "(", "this", ",", "\"", "found", "unhandled", "exceptions", "(", "\"", "+", "trackers", "size", "(", ")", "+", "\"", ")", ":", "\"", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "trackers", "size", "(", ")", ";", "i", "+", "+", ")", "{", "test", "exception", "tracker", "tracker", "=", "trackers", "get", "(", "i", ")", ";", "throwable", "combined", "exception", "=", "tracker", "get", "combined", "exception", "(", ")", ";", "msg", "error", "(", "this", ",", "\"", "exception", "\"", "+", "(", "i", "+", "1", ")", "+", "\"", "of", "\"", "+", "trackers", "size", "(", ")", "+", "'", "\\", "n", "'", ",", "combined", "exception", ")", ";", "}", "}" ]
[ "returns", "the", "reference", "manager", "being", "used", "by", "this", "code", "manager" ]
[ "public", "reference", "manager", "get", "reference", "mgr", "(", ")", "{", "return", "ref", "manager", ";", "}" ]
[ "iterate", "over", "the", "records", "in", "ascending", "sorted", "order", "sorting", "occurs", "on", "the", "primary", "key", "value", "starting", "at", "the", "specified", "start", "key" ]
[ "public", "record", "iterator", "iterator", "(", "field", "start", "key", ")", "throws", "i", "o", "exception", "{", "synchronized", "(", "db", ")", "{", "if", "(", "schema", "use", "long", "key", "nodes", "(", ")", ")", "{", "return", "new", "long", "key", "record", "iterator", "(", "long", "min", "value", ",", "long", "max", "value", ",", "start", "key", "get", "long", "value", "(", ")", ")", ";", "}", "return", "new", "field", "key", "record", "iterator", "(", "null", ",", "null", ",", "start", "key", ")", ";", "}", "}" ]
[ "return", "the", "fully", "-", "qualified", "path", "of", "path", ",", "resolving", "the", "path", "through", "any", "symlinks", "or", "mount", "point" ]
[ "public", "path", "resolve", "path", "(", "final", "path", "p", ")", "throws", "i", "o", "exception", "{", "check", "path", "(", "p", ")", ";", "return", "get", "file", "status", "(", "p", ")", "get", "path", "(", ")", ";", "}" ]
[ "deletes", "all", "children", "of", "this", "directory", ",", "recursively" ]
[ "public", "void", "empty", "directory", "(", ")", "{", "empty", "directory", "(", "false", ")", ";", "}" ]
[ "executes", "the", "{", "@", "link", "#", "call", "impl", "}", "hook", "and", "handles", "stdoutstderr" ]
[ "public", "final", "immutable", "list", "<", "spawn", "result", ">", "call", "(", ")", "throws", "interrupted", "exception", ",", "exec", "exception", "{", "file", "out", "err", "file", "out", "err", "=", "get", "suffixed", "file", "out", "err", "(", "context", "get", "file", "out", "err", "(", ")", ",", "\"", "\"", "+", "mode", "name", "(", ")", ")", ";", "immutable", "list", "<", "spawn", "result", ">", "results", "=", "null", ";", "exec", "exception", "exception", "=", "null", ";", "try", "{", "results", "=", "call", "impl", "(", "context", "with", "file", "out", "err", "(", "file", "out", "err", ")", ")", ";", "}", "catch", "(", "exec", "exception", "e", ")", "{", "exception", "=", "e", ";", "}", "finally", "{", "try", "{", "file", "out", "err", "close", "(", ")", ";", "}", "catch", "(", "i", "o", "exception", "ignored", ")", "{", "/", "/", "nothing", "we", "can", "do", "here", "}", "}", "move", "file", "out", "err", "(", "file", "out", "err", ",", "context", "get", "file", "out", "err", "(", ")", ")", ";", "if", "(", "exception", "!", "=", "null", ")", "{", "throw", "exception", ";", "}", "else", "{", "check", "not", "null", "(", "results", ")", ";", "return", "results", ";", "}", "}" ]
[ "test", "the", "property", "'", "password", "'" ]
[ "public", "void", "password", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "password", "}" ]
[ "test", "scanning", "all", "blocks", "set", "the", "scan", "period", "high", "enough", "that", "we", "shouldn", "'", "t", "rescan", "any", "block", "during", "this", "test" ]
[ "public", "void", "test", "scan", "all", "blocks", "no", "rescan", "(", ")", "throws", "exception", "{", "test", "scan", "all", "blocks", "impl", "(", "false", ")", ";", "}" ]
[ "static", "helper", "method", "to", "easily", "display", "an", "single", "-", "option", "dialog", "the", "dialog", "will", "remain", "until", "the", "user", "presses", "the", "option", "1", "button", "or", "the", "cancel", "button" ]
[ "public", "static", "int", "show", "option", "dialog", "(", "component", "parent", ",", "string", "title", ",", "string", "message", ",", "string", "option", "1", ",", "int", "message", "type", ")", "{", "return", "swing", "run", "now", "(", "(", ")", "-", ">", "{", "option", "dialog", "info", "=", "new", "option", "dialog", "(", "title", ",", "message", ",", "option", "1", ",", "message", "type", ",", "null", ")", ";", "return", "info", "show", "(", "parent", ")", ";", "}", ")", ";", "}" ]
[ "gets", "the", "size", "of", "the", "array", ",", "in", "bytes" ]
[ "public", "int", "size", "(", ")", "{", "return", "size", ";", "}" ]
[ "test", "that", "if", "the", "send", "buffer", "size", "is", "0", ",", "the", "socket", "will", "use", "a", "tcp", "auto", "-", "tuned", "value" ]
[ "public", "void", "test", "auto", "tuning", "send", "buffer", "size", "(", ")", "throws", "i", "o", "exception", "{", "final", "configuration", "conf", "=", "new", "configuration", "(", ")", ";", "conf", "set", "int", "(", "dfs", "client", "socket", "send", "buffer", "size", "key", ",", "0", ")", ";", "final", "int", "send", "buffer", "size", "=", "get", "send", "buffer", "size", "(", "conf", ")", ";", "log", "info", "(", "\"", "the", "auto", "tuned", "send", "buffer", "size", "is", ":", "{", "}", "\"", ",", "send", "buffer", "size", ")", ";", "assert", "true", "(", "\"", "send", "buffer", "size", "should", "be", "non", "-", "negative", "value", "which", "is", "\"", "+", "\"", "determined", "by", "system", "(", "kernel", ")", "\"", ",", "send", "buffer", "size", ">", "0", ")", ";", "}" ]
[ "performs", "the", "closing", "handshake" ]
[ "public", "channel", "future", "close", "(", "channel", "channel", ",", "close", "web", "socket", "frame", "frame", ")", "{", "object", "util", "check", "not", "null", "(", "channel", ",", "\"", "channel", "\"", ")", ";", "return", "close", "(", "channel", ",", "frame", ",", "channel", "new", "promise", "(", ")", ")", ";", "}" ]
[ "accepts", "a", "mapping", "of", "user", "-", "&", "gt", ";", "list", "of", "roles" ]
[ "public", "static", "void", "write", "file", "(", "map", "<", "string", ",", "string", "[", "]", ">", "user", "to", "roles", ",", "path", "path", ")", "{", "hash", "map", "<", "string", ",", "list", "<", "string", ">", ">", "role", "to", "users", "=", "new", "hash", "map", "<", ">", "(", ")", ";", "for", "(", "map", "entry", "<", "string", ",", "string", "[", "]", ">", "entry", ":", "user", "to", "roles", "entry", "set", "(", ")", ")", "{", "for", "(", "string", "role", ":", "entry", "get", "value", "(", ")", ")", "{", "list", "<", "string", ">", "users", "=", "role", "to", "users", "compute", "if", "absent", "(", "role", ",", "k", "-", ">", "new", "array", "list", "<", ">", "(", ")", ")", ";", "users", "add", "(", "entry", "get", "key", "(", ")", ")", ";", "}", "}", "security", "files", "write", "file", "atomically", "(", "path", ",", "role", "to", "users", ",", "e", "-", ">", "string", "format", "(", "locale", "root", ",", "\"", "%", "s", ":", "%", "s", "\"", ",", "e", "get", "key", "(", ")", ",", "collection", "to", "comma", "delimited", "string", "(", "e", "get", "value", "(", ")", ")", ")", ")", ";", "}" ]
[ "<", "b", ">", "200", "<", "b", ">", "-", "success" ]
[ "public", "mono", "<", "void", ">", "test", "body", "with", "query", "params", "(", "string", "query", ",", "user", "body", ")", "throws", "web", "client", "response", "exception", "{", "object", "post", "body", "=", "body", ";", "/", "/", "verify", "the", "required", "parameter", "'", "query", "'", "is", "set", "if", "(", "query", "=", "=", "null", ")", "{", "throw", "new", "web", "client", "response", "exception", "(", "\"", "missing", "the", "required", "parameter", "'", "query", "'", "when", "calling", "test", "body", "with", "query", "params", "\"", ",", "http", "status", "bad", "request", "value", "(", ")", ",", "http", "status", "bad", "request", "get", "reason", "phrase", "(", ")", ",", "null", ",", "null", ",", "null", ")", ";", "}", "/", "/", "verify", "the", "required", "parameter", "'", "body", "'", "is", "set", "if", "(", "body", "=", "=", "null", ")", "{", "throw", "new", "web", "client", "response", "exception", "(", "\"", "missing", "the", "required", "parameter", "'", "body", "'", "when", "calling", "test", "body", "with", "query", "params", "\"", ",", "http", "status", "bad", "request", "value", "(", ")", ",", "http", "status", "bad", "request", "get", "reason", "phrase", "(", ")", ",", "null", ",", "null", ",", "null", ")", ";", "}", "/", "/", "create", "path", "and", "map", "variables", "final", "map", "<", "string", ",", "object", ">", "path", "params", "=", "new", "hash", "map", "<", "string", ",", "object", ">", "(", ")", ";", "final", "multi", "value", "map", "<", "string", ",", "string", ">", "query", "params", "=", "new", "linked", "multi", "value", "map", "<", "string", ",", "string", ">", "(", ")", ";", "final", "http", "headers", "header", "params", "=", "new", "http", "headers", "(", ")", ";", "final", "multi", "value", "map", "<", "string", ",", "string", ">", "cookie", "params", "=", "new", "linked", "multi", "value", "map", "<", "string", ",", "string", ">", "(", ")", ";", "final", "multi", "value", "map", "<", "string", ",", "object", ">", "form", "params", "=", "new", "linked", "multi", "value", "map", "<", "string", ",", "object", ">", "(", ")", ";", "query", "params", "put", "all", "(", "api", "client", "parameter", "to", "multi", "value", "map", "(", "null", ",", "\"", "query", "\"", ",", "query", ")", ")", ";", "final", "string", "[", "]", "local", "var", "accepts", "=", "{", "}", ";", "final", "list", "<", "media", "type", ">", "local", "var", "accept", "=", "api", "client", "select", "header", "accept", "(", "local", "var", "accepts", ")", ";", "final", "string", "[", "]", "local", "var", "content", "types", "=", "{", "\"", "application", "/", "json", "\"", "}", ";", "final", "media", "type", "local", "var", "content", "type", "=", "api", "client", "select", "header", "content", "type", "(", "local", "var", "content", "types", ")", ";", "string", "[", "]", "local", "var", "auth", "names", "=", "new", "string", "[", "]", "{", "}", ";", "parameterized", "type", "reference", "<", "void", ">", "local", "var", "return", "type", "=", "new", "parameterized", "type", "reference", "<", "void", ">", "(", ")", "{", "}", ";", "return", "api", "client", "invoke", "a", "p", "i", "(", "\"", "/", "fake", "/", "body", "-", "with", "-", "query", "-", "params", "\"", ",", "http", "method", "put", ",", "path", "params", ",", "query", "params", ",", "post", "body", ",", "header", "params", ",", "cookie", "params", ",", "form", "params", ",", "local", "var", "accept", ",", "local", "var", "content", "type", ",", "local", "var", "auth", "names", ",", "local", "var", "return", "type", ")", ";", "}" ]
[ "returns", "the", "configured", "time", "zone", ",", "or", "null", "if", "none", "is", "configured" ]
[ "@", "check", "for", "null", "public", "time", "zone", "get", "time", "zone", "(", ")", "{", "if", "(", "this", "spec", "timezone", "=", "=", "null", ")", "{", "return", "null", ";", "}", "return", "time", "zone", "get", "time", "zone", "(", "this", "spec", "timezone", ")", ";", "}" ]
[ "total", "traced", "calls", "made", "from", "{", "@", "link", "#", "parent", "}", "to", "{", "@", "link", "#", "child", "}" ]
[ "public", "long", "call", "count", "(", ")", "{", "return", "call", "count", ";", "}" ]