docstring_tokens
list
code_tokens
list
[ "create", "a", "builder", "with", "the", "method", ",", "uri", ",", "headers", ",", "and", "cookies", "of", "the", "given", "request" ]
[ "static", "builder", "from", "(", "client", "request", "other", ")", "{", "return", "new", "default", "client", "request", "builder", "(", "other", ")", ";", "}" ]
[ "returns", "the", "entry", "associated", "with", "this", "value", "reference", ",", "or", "{", "@", "code", "null", "}", "if", "this", "value", "reference", "is", "independent", "of", "any", "entry" ]
[ "reference", "entry", "<", "k", ",", "v", ">", "get", "entry", "(", ")", ";" ]
[ "get", "array", "of", "string" ]
[ "public", "list", "<", "string", ">", "get", "array", "of", "string", "(", ")", "{", "return", "array", "of", "string", ";", "}" ]
[ "return", "a", "{", "@", "code", "request", "predicate", "}", "that", "tests", "the", "request", "'", "s", "headers", "against", "the", "given", "headers", "predicate" ]
[ "public", "static", "request", "predicate", "headers", "(", "predicate", "<", "server", "request", "headers", ">", "headers", "predicate", ")", "{", "return", "new", "headers", "predicate", "(", "headers", "predicate", ")", ";", "}" ]
[ "removes", "the", "entry", "at", "the", "specified", "index", ",", "given", "the", "hash", "of", "its", "key", "and", "value" ]
[ "private", "void", "remove", "entry", "(", "int", "entry", ",", "int", "key", "hash", ",", "int", "value", "hash", ")", "{", "check", "argument", "(", "entry", "!", "=", "absent", ")", ";", "delete", "from", "table", "k", "to", "v", "(", "entry", ",", "key", "hash", ")", ";", "delete", "from", "table", "v", "to", "k", "(", "entry", ",", "value", "hash", ")", ";", "int", "old", "predecessor", "=", "prev", "in", "insertion", "order", "[", "entry", "]", ";", "int", "old", "successor", "=", "next", "in", "insertion", "order", "[", "entry", "]", ";", "set", "succeeds", "(", "old", "predecessor", ",", "old", "successor", ")", ";", "move", "entry", "to", "index", "(", "size", "-", "1", ",", "entry", ")", ";", "keys", "[", "size", "-", "1", "]", "=", "null", ";", "values", "[", "size", "-", "1", "]", "=", "null", ";", "size", "-", "-", ";", "mod", "count", "+", "+", ";", "}" ]
[ "called", "when", "the", "metric", "command", "is", "changed", "by", "\"", "delta", "\"", "units", "at", "time", "\"", "time", "\"", "via", "user", "\"", "user", "\"" ]
[ "public", "void", "record", "metric", "(", "long", "time", ",", "string", "command", ",", "string", "user", ",", "long", "delta", ")", "{", "rolling", "window", "window", "=", "get", "rolling", "window", "(", "command", ",", "user", ")", ";", "window", "inc", "at", "(", "time", ",", "delta", ")", ";", "}" ]
[ "attempt", "to", "read", "the", "named", "property", "from", "the", "current", "context", "object" ]
[ "private", "typed", "value", "read", "property", "(", "typed", "value", "context", "object", ",", "evaluation", "context", "eval", "context", ",", "string", "name", ")", "throws", "evaluation", "exception", "{", "object", "target", "object", "=", "context", "object", "get", "value", "(", ")", ";", "if", "(", "target", "object", "=", "=", "null", "&", "&", "this", "null", "safe", ")", "{", "return", "typed", "value", "null", ";", "}", "property", "accessor", "accessor", "to", "use", "=", "this", "cached", "read", "accessor", ";", "if", "(", "accessor", "to", "use", "!", "=", "null", ")", "{", "if", "(", "eval", "context", "get", "property", "accessors", "(", ")", "contains", "(", "accessor", "to", "use", ")", ")", "{", "try", "{", "return", "accessor", "to", "use", "read", "(", "eval", "context", ",", "context", "object", "get", "value", "(", ")", ",", "name", ")", ";", "}", "catch", "(", "exception", "ex", ")", "{", "/", "/", "this", "is", "ok", "-", "it", "may", "have", "gone", "stale", "due", "to", "a", "class", "change", ",", "/", "/", "let", "'", "s", "try", "to", "get", "a", "new", "one", "and", "call", "it", "before", "giving", "up", "}", "}", "this", "cached", "read", "accessor", "=", "null", ";", "}", "list", "<", "property", "accessor", ">", "accessors", "to", "try", "=", "get", "property", "accessors", "to", "try", "(", "context", "object", "get", "value", "(", ")", ",", "eval", "context", "get", "property", "accessors", "(", ")", ")", ";", "/", "/", "go", "through", "the", "accessors", "that", "may", "be", "able", "to", "resolve", "it", "if", "they", "are", "a", "cacheable", "accessor", "then", "/", "/", "get", "the", "accessor", "and", "use", "it", "if", "they", "are", "not", "cacheable", "but", "report", "they", "can", "read", "the", "property", "/", "/", "then", "ask", "them", "to", "read", "it", "try", "{", "for", "(", "property", "accessor", "accessor", ":", "accessors", "to", "try", ")", "{", "if", "(", "accessor", "can", "read", "(", "eval", "context", ",", "context", "object", "get", "value", "(", ")", ",", "name", ")", ")", "{", "if", "(", "accessor", "instanceof", "reflective", "property", "accessor", ")", "{", "accessor", "=", "(", "(", "reflective", "property", "accessor", ")", "accessor", ")", "create", "optimal", "accessor", "(", "eval", "context", ",", "context", "object", "get", "value", "(", ")", ",", "name", ")", ";", "}", "this", "cached", "read", "accessor", "=", "accessor", ";", "return", "accessor", "read", "(", "eval", "context", ",", "context", "object", "get", "value", "(", ")", ",", "name", ")", ";", "}", "}", "}", "catch", "(", "exception", "ex", ")", "{", "throw", "new", "spel", "evaluation", "exception", "(", "ex", ",", "spel", "message", "exception", "during", "property", "read", ",", "name", ",", "ex", "get", "message", "(", ")", ")", ";", "}", "if", "(", "context", "object", "get", "value", "(", ")", "=", "=", "null", ")", "{", "throw", "new", "spel", "evaluation", "exception", "(", "spel", "message", "property", "or", "field", "not", "readable", "on", "null", ",", "name", ")", ";", "}", "else", "{", "throw", "new", "spel", "evaluation", "exception", "(", "get", "start", "position", "(", ")", ",", "spel", "message", "property", "or", "field", "not", "readable", ",", "name", ",", "format", "helper", "format", "class", "name", "for", "message", "(", "get", "object", "class", "(", "context", "object", "get", "value", "(", ")", ")", ")", ")", ";", "}", "}" ]
[ "get", "a", "suffix", "for", "the", "user", "agent", "suffix", "of", "http", "requests", ",", "which", "can", "be", "used", "to", "identify", "the", "principal", "making", "abfs", "requests" ]
[ "default", "string", "get", "user", "agent", "suffix", "(", ")", "{", "return", "\"", "\"", ";", "}" ]
[ "sets", "to", "true", "if", "this", "vertex", "is", "showing", "all", "edges", "in", "the", "incoming", "direction" ]
[ "public", "void", "set", "incoming", "expanded", "(", "boolean", "set", "expanded", ")", "{", "validate", "incoming", "expanded", "state", "(", "set", "expanded", ")", ";", "this", "incoming", "expanded", "=", "set", "expanded", ";", "toggle", "ins", "button", "set", "icon", "(", "set", "expanded", "?", "collapse", "icon", ":", "expand", "icon", ")", ";", "string", "hide", "show", "=", "set", "expanded", "?", "\"", "hide", "\"", ":", "\"", "show", "\"", ";", "toggle", "ins", "button", "set", "tool", "tip", "text", "(", "\"", "click", "to", "\"", "+", "hide", "show", "+", "\"", "incoming", "edges", "\"", ")", ";", "}" ]
[ "returns", "primary", "key", "naming", "convenion" ]
[ "public", "boolean", "get", "add", "surrogate", "key", "(", ")", "{", "return", "this", "add", "surrogate", "key", ";", "}" ]
[ "separates", "host", "and", "port", "from", "given", "host", "port", "string", "if", "host", "port", "string", "is", "enclosed", "within", "square", "bracket" ]
[ "public", "static", "string", "[", "]", "get", "i", "p", "v", "6", "host", "and", "port", "(", "string", "host", "port", ")", "{", "if", "(", "host", "port", "starts", "with", "(", "\"", "[", "\"", ")", ")", "{", "int", "i", "=", "host", "port", "last", "index", "of", "(", "'", "]", "'", ")", ";", "if", "(", "i", "<", "0", ")", "{", "throw", "new", "illegal", "argument", "exception", "(", "host", "port", "+", "\"", "starts", "with", "'", "[", "'", "but", "has", "no", "matching", "'", "]", "'", "\"", ")", ";", "}", "string", "host", "=", "host", "port", "substring", "(", "1", ",", "i", ")", ";", "if", "(", "host", "is", "empty", "(", ")", ")", "{", "throw", "new", "illegal", "argument", "exception", "(", "host", "+", "\"", "is", "empty", "\"", ")", ";", "}", "if", "(", "host", "port", "length", "(", ")", ">", "i", "+", "1", ")", "{", "return", "get", "host", "port", "(", "host", "port", ",", "i", ",", "host", ")", ";", "}", "return", "new", "string", "[", "]", "{", "host", "}", ";", "}", "else", "{", "/", "/", "not", "an", "ipv6", "host", "port", "string", "return", "new", "string", "[", "]", "{", "}", ";", "}", "}" ]
[ "model", "tests", "for", "file", "schema", "test", "class" ]
[ "public", "void", "test", "file", "schema", "test", "class", "(", ")", "{", "/", "/", "todo", ":", "test", "file", "schema", "test", "class", "}" ]
[ "convenience", "method", "that", "returns", "a", "read", "only", "view", "of", "the", "{", "@", "link", "cause", "}", "s", "associated", "with", "this", "item", "in", "the", "queue" ]
[ "public", "final", "list", "<", "cause", ">", "get", "causes", "(", ")", "{", "cause", "action", "ca", "=", "get", "action", "(", "cause", "action", "class", ")", ";", "if", "(", "ca", "!", "=", "null", ")", "return", "collections", "unmodifiable", "list", "(", "ca", "get", "causes", "(", ")", ")", ";", "return", "collections", "empty", "list", "(", ")", ";", "}" ]
[ "place", "an", "order", "for", "a", "pet" ]
[ "public", "api", "response", "<", "order", ">", "place", "order", "with", "http", "info", "(", "order", "body", ")", "throws", "api", "exception", "{", "http", "request", "builder", "local", "var", "request", "builder", "=", "place", "order", "request", "builder", "(", "body", ")", ";", "try", "{", "http", "response", "<", "input", "stream", ">", "local", "var", "response", "=", "member", "var", "http", "client", "send", "(", "local", "var", "request", "builder", "build", "(", ")", ",", "http", "response", "body", "handlers", "of", "input", "stream", "(", ")", ")", ";", "if", "(", "member", "var", "response", "interceptor", "!", "=", "null", ")", "{", "member", "var", "response", "interceptor", "accept", "(", "local", "var", "response", ")", ";", "}", "if", "(", "local", "var", "response", "status", "code", "(", ")", "/", "100", "!", "=", "2", ")", "{", "throw", "new", "api", "exception", "(", "local", "var", "response", "status", "code", "(", ")", ",", "\"", "place", "order", "call", "received", "non", "-", "success", "response", "\"", ",", "local", "var", "response", "headers", "(", ")", ",", "local", "var", "response", "body", "(", ")", "=", "=", "null", "?", "null", ":", "new", "string", "(", "local", "var", "response", "body", "(", ")", "read", "all", "bytes", "(", ")", ")", ")", ";", "}", "return", "new", "api", "response", "<", "order", ">", "(", "local", "var", "response", "status", "code", "(", ")", ",", "local", "var", "response", "headers", "(", ")", "map", "(", ")", ",", "member", "var", "object", "mapper", "read", "value", "(", "local", "var", "response", "body", "(", ")", ",", "new", "type", "reference", "<", "order", ">", "(", ")", "{", "}", ")", ")", ";", "}", "catch", "(", "i", "o", "exception", "e", ")", "{", "throw", "new", "api", "exception", "(", "e", ")", ";", "}", "catch", "(", "interrupted", "exception", "e", ")", "{", "thread", "current", "thread", "(", ")", "interrupt", "(", ")", ";", "throw", "new", "api", "exception", "(", "e", ")", ";", "}", "}" ]
[ "attaches", "the", "tool", "tip", "from", "the", "gui", "resources", "that", "corresponds", "to", "the", "given", "key", ",", "to", "the", "given", "component" ]
[ "private", "static", "j", "component", "tip", "(", "j", "component", "component", ",", "string", "message", "key", ")", "{", "component", "set", "tool", "tip", "text", "(", "msg", "(", "message", "key", ")", ")", ";", "return", "component", ";", "}" ]
[ "returns", "a", "{", "@", "code", "byte", "[", "]", "}", "of", "{", "@", "code", "short", "}", "value", "this", "is", "opposite", "of", "{", "@", "code", "make", "short", "(", ")", "}" ]
[ "static", "byte", "[", "]", "short", "to", "bytes", "(", "short", "value", ")", "{", "byte", "[", "]", "bytes", "=", "new", "byte", "[", "2", "]", ";", "if", "(", "platform", "dependent", "big", "endian", "native", "order", ")", "{", "bytes", "[", "1", "]", "=", "(", "byte", ")", "(", "(", "value", ">", ">", "8", ")", "&", "0xff", ")", ";", "bytes", "[", "0", "]", "=", "(", "byte", ")", "(", "value", "&", "0xff", ")", ";", "}", "else", "{", "bytes", "[", "0", "]", "=", "(", "byte", ")", "(", "(", "value", ">", ">", "8", ")", "&", "0xff", ")", ";", "bytes", "[", "1", "]", "=", "(", "byte", ")", "(", "value", "&", "0xff", ")", ";", "}", "return", "bytes", ";", "}" ]
[ "constructs", "a", "zip", "entry", "object", "for", "the", "location", "of", "the", "given", "header", ",", "with", "the", "corresponding", "directory", "entry" ]
[ "private", "zip", "entry", "entry", "with", "(", "local", "file", "header", "header", ",", "directory", "entry", "dir", "entry", ")", "throws", "i", "o", "exception", "{", "zip", "entry", "zip", "entry", "=", "new", "zip", "entry", "(", ")", "with", "header", "(", "header", ")", "with", "entry", "(", "dir", "entry", ")", ";", "int", "offset", "=", "(", "int", ")", "(", "header", "file", "offset", "(", ")", "+", "header", "get", "size", "(", ")", ")", ";", "/", "/", "!", "use", "directory", "|", "|", "dir", "entry", "!", "=", "null", "|", "|", "!", "ignore", "deleted", "string", "entry", "name", "=", "header", "get", "filename", "(", ")", ";", "if", "(", "dir", "entry", "!", "=", "null", "&", "&", "!", "entry", "name", "equals", "(", "dir", "entry", "get", "filename", "(", ")", ")", ")", "{", "return", "zip", "entry", "with", "entry", "(", "dir", "entry", ")", "with", "code", "(", "zip", "entry", "status", "filename", "error", ")", ";", "}", "int", "size", "by", "header", "=", "header", "data", "size", "(", ")", ";", "int", "size", "by", "dir", "=", "dir", "entry", "!", "=", "null", "?", "dir", "entry", "data", "size", "(", ")", ":", "-", "1", ";", "byte", "buffer", "content", ";", "if", "(", "size", "by", "dir", "=", "=", "size", "by", "header", "&", "&", "size", "by", "dir", ">", "=", "0", ")", "{", "/", "/", "ideal", "case", ",", "header", "and", "directory", "in", "agreement", "content", "=", "get", "data", "(", "offset", ",", "size", "by", "header", ")", ";", "if", "(", "content", "limit", "(", ")", "=", "=", "size", "by", "header", ")", "{", "return", "zip", "entry", "with", "content", "(", "content", ")", "with", "code", "(", "zip", "entry", "status", "entry", "ok", ")", ";", "}", "else", "{", "return", "zip", "entry", "with", "content", "(", "content", ")", "with", "code", "(", "zip", "entry", "status", "not", "enough", "data", ")", ";", "}", "}", "if", "(", "size", "by", "dir", ">", "=", "0", ")", "{", "/", "/", "if", "file", "is", "correct", ",", "we", "get", "here", "because", "of", "a", "0x", "8", "flag", ",", "and", "we", "expect", "/", "/", "data", "to", "be", "followed", "by", "a", "data", "descriptor", "content", "=", "get", "data", "(", "offset", ",", "size", "by", "dir", ")", ";", "data", "descriptor", "data", "desc", "=", "descriptor", "at", "(", "offset", "+", "size", "by", "dir", ",", "dir", "entry", ")", ";", "if", "(", "data", "desc", "!", "=", "null", ")", "{", "return", "zip", "entry", "with", "content", "(", "content", ")", "with", "descriptor", "(", "data", "desc", ")", "with", "code", "(", "zip", "entry", "status", "entry", "ok", ")", ";", "}", "return", "zip", "entry", "with", "content", "(", "content", ")", "with", "code", "(", "zip", "entry", "status", "no", "data", "desc", ")", ";", "}", "if", "(", "!", "ignore", "deleted", ")", "{", "if", "(", "size", "by", "header", ">", "=", "0", ")", "{", "content", "=", "get", "data", "(", "offset", ",", "size", "by", "header", ")", ";", "if", "(", "content", "limit", "(", ")", "=", "=", "size", "by", "header", ")", "{", "return", "zip", "entry", "with", "content", "(", "content", ")", "with", "code", "(", "zip", "entry", "status", "entry", "ok", ")", ";", "}", "return", "zip", "entry", "with", "content", "(", "content", ")", "with", "code", "(", "zip", "entry", "status", "not", "enough", "data", ")", ";", "}", "else", "{", "data", "descriptor", "data", "desc", "=", "descriptor", "from", "(", "offset", ",", "dir", "entry", ")", ";", "if", "(", "data", "desc", "=", "=", "null", ")", "{", "/", "/", "only", "way", "now", "would", "be", "to", "decompress", "return", "zip", "entry", "with", "code", "(", "zip", "entry", "status", "unknown", "size", ")", ";", "}", "int", "size", "by", "desc", "=", "data", "desc", "get", "(", "extsiz", ")", ";", "if", "(", "size", "by", "desc", "!", "=", "data", "desc", "file", "offset", "(", ")", "-", "offset", ")", "{", "/", "/", "that", "just", "can", "'", "t", "be", "the", "right", "return", "zip", "entry", "with", "descriptor", "(", "data", "desc", ")", "with", "code", "(", "zip", "entry", "status", "unknown", "size", ")", ";", "}", "content", "=", "get", "data", "(", "offset", ",", "size", "by", "desc", ")", ";", "return", "zip", "entry", "with", "content", "(", "content", ")", "with", "descriptor", "(", "data", "desc", ")", "with", "code", "(", "zip", "entry", "status", "entry", "ok", ")", ";", "}", "}", "return", "zip", "entry", "with", "code", "(", "zip", "entry", "status", "unknown", "size", ")", ";", "}" ]
[ "converts", "list", "of", "{", "@", "link", "equivalent", "address", "group", "}", "to", "{", "@", "link", "equivalent", "address", "group", "}", "set", "and", "remove", "all", "attributes", "the", "values", "are", "the", "original", "e", "a", "gs" ]
[ "private", "static", "map", "<", "equivalent", "address", "group", ",", "equivalent", "address", "group", ">", "strip", "attrs", "(", "list", "<", "equivalent", "address", "group", ">", "group", "list", ")", "{", "map", "<", "equivalent", "address", "group", ",", "equivalent", "address", "group", ">", "addrs", "=", "new", "hash", "map", "<", ">", "(", "group", "list", "size", "(", ")", "*", "2", ")", ";", "for", "(", "equivalent", "address", "group", "group", ":", "group", "list", ")", "{", "addrs", "put", "(", "strip", "attrs", "(", "group", ")", ",", "group", ")", ";", "}", "return", "addrs", ";", "}" ]
[ "draws", "a", "line", "using", "{", "@", "link", "shape", "type", "#", "line", "}", "or", "{", "@", "link", "shape", "type", "#", "filled", "}" ]
[ "public", "final", "void", "line", "(", "float", "x", ",", "float", "y", ",", "float", "z", ",", "float", "x", "2", ",", "float", "y", "2", ",", "float", "z", "2", ")", "{", "line", "(", "x", ",", "y", ",", "z", ",", "x", "2", ",", "y", "2", ",", "z", "2", ",", "color", ",", "color", ")", ";", "}" ]
[ "called", "if", "no", "valid", "timestamp", "is", "embedded", "in", "the", "record", "meta", "data" ]
[ "public", "abstract", "long", "on", "invalid", "timestamp", "(", "final", "consumer", "record", "<", "object", ",", "object", ">", "record", ",", "final", "long", "record", "timestamp", ",", "final", "long", "partition", "time", ")", ";" ]
[ "called", "for", "each", "response", "obtained", "from", "non", "master", "nodes" ]
[ "public", "void", "on", "response", "(", "discovery", "node", "node", ")", "{", "boolean", "found", "=", "pending", "nodes", "remove", "(", "node", ")", ";", "assert", "found", ":", "\"", "node", "[", "\"", "+", "node", "+", "\"", "]", "already", "responded", "or", "failed", "\"", ";", "latch", "count", "down", "(", ")", ";", "}" ]
[ "read", "at", "a", "specific", "position", "reads", "at", "a", "position", "earlier", "than", "the", "current", "{", "@", "link", "#", "get", "pos", "(", ")", "}", "position", "will", "fail", "with", "a", "{", "@", "link", "path", "i", "o", "exception", "}", "see", "{", "@", "link", "#", "seek", "(", "long", ")", "}", "unlike", "the", "base", "implementation", "and", "the", "requirements", "of", "the", "filesystem", "specification", ",", "this", "updates", "the", "stream", "position", "as", "returned", "in", "{", "@", "link", "#", "get", "pos", "(", ")", "}" ]
[ "public", "int", "read", "(", "final", "long", "position", ",", "final", "byte", "[", "]", "buffer", ",", "final", "int", "offset", ",", "final", "int", "length", ")", "throws", "i", "o", "exception", "{", "/", "/", "maybe", "seek", "forwards", "to", "the", "position", "seek", "(", "position", ")", ";", "return", "read", "(", "buffer", ",", "offset", ",", "length", ")", ";", "}" ]
[ "unions", "two", "{", "@", "link", "table", "}", "s", "with", "duplicate", "records", "removed", "similar", "to", "a", "sql", "union", "the", "fields", "of", "the", "two", "union", "operations", "must", "fully", "overlap", "note", ":", "both", "tables", "must", "be", "bound", "to", "the", "same", "{", "@", "code", "table", "environment", "}", "example", ":", "{", "@", "code", "left", "union", "(", "right", ")", ";", "}" ]
[ "table", "union", "(", "table", "right", ")", ";" ]
[ "get", "maximum", "retry", "attempts", "for", "the", "subscribe", "to", "shard", "operation" ]
[ "public", "int", "get", "subscribe", "to", "shard", "max", "retries", "(", ")", "{", "return", "subscribe", "to", "shard", "max", "retries", ";", "}" ]
[ "parse", "the", "given", "string", "into", "date", "object" ]
[ "public", "date", "parse", "date", "(", "string", "str", ")", "{", "try", "{", "return", "date", "format", "parse", "(", "str", ")", ";", "}", "catch", "(", "java", "text", "parse", "exception", "e", ")", "{", "throw", "new", "runtime", "exception", "(", "e", ")", ";", "}", "}" ]
[ "modify", "the", "current", "{", "@", "link", "mdc", "}", "logging", "context", "to", "set", "the", "{", "@", "link", "#", "connector", "context", "connector", "context", "}", "to", "include", "the", "supplied", "connector", "name", "and", "the", "{", "@", "link", "scope", "#", "validate", "}", "scope" ]
[ "public", "static", "logging", "context", "for", "validation", "(", "string", "connector", "name", ")", "{", "logging", "context", "context", "=", "new", "logging", "context", "(", ")", ";", "mdc", "put", "(", "connector", "context", ",", "prefix", "for", "(", "connector", "name", ",", "scope", "validate", ",", "null", ")", ")", ";", "return", "context", ";", "}" ]
[ "{", "@", "link", "step", "}", "s", "for", "the", "current", "index", "and", "policy", "are", "executed", "in", "succession", "until", "the", "next", "step", "to", "be", "executed", "is", "not", "a", "{", "@", "link", "cluster", "state", "action", "step", "}", ",", "or", "not", "a", "{", "@", "link", "cluster", "state", "wait", "step", "}", ",", "or", "does", "not", "belong", "to", "the", "same", "phase", "as", "the", "executed", "step", "all", "other", "types", "of", "steps", "are", "executed", "outside", "of", "this", "{", "@", "link", "cluster", "state", "update", "task", "}", ",", "so", "they", "are", "of", "no", "concern", "here" ]
[ "public", "cluster", "state", "execute", "(", "final", "cluster", "state", "current", "state", ")", "throws", "i", "o", "exception", "{", "step", "current", "step", "=", "start", "step", ";", "index", "metadata", "index", "metadata", "=", "current", "state", "metadata", "(", ")", "index", "(", "index", ")", ";", "if", "(", "index", "metadata", "=", "=", "null", ")", "{", "logger", "debug", "(", "\"", "lifecycle", "for", "index", "[", "{", "}", "]", "executed", "but", "index", "no", "longer", "exists", "\"", ",", "index", "get", "name", "(", ")", ")", ";", "/", "/", "this", "index", "doesn", "'", "t", "exist", "any", "more", ",", "there", "'", "s", "nothing", "to", "execute", "currently", "return", "current", "state", ";", "}", "step", "registered", "current", "step", "=", "index", "lifecycle", "runner", "get", "current", "step", "(", "policy", "steps", "registry", ",", "policy", ",", "index", "metadata", ")", ";", "if", "(", "current", "step", "equals", "(", "registered", "current", "step", ")", ")", "{", "cluster", "state", "state", "=", "current", "state", ";", "/", "/", "we", "can", "do", "cluster", "state", "steps", "all", "together", "until", "we", "/", "/", "either", "get", "to", "a", "step", "that", "isn", "'", "t", "a", "cluster", "state", "step", "or", "a", "/", "/", "cluster", "state", "wait", "step", "returns", "not", "completed", "while", "(", "current", "step", "instanceof", "cluster", "state", "action", "step", "|", "|", "current", "step", "instanceof", "cluster", "state", "wait", "step", ")", "{", "if", "(", "current", "step", "instanceof", "cluster", "state", "action", "step", ")", "{", "/", "/", "cluster", "state", "action", "step", "so", "do", "the", "action", "and", "/", "/", "move", "the", "cluster", "state", "to", "the", "next", "step", "logger", "trace", "(", "\"", "[", "{", "}", "]", "performing", "cluster", "state", "action", "(", "{", "}", ")", "[", "{", "}", "]", "\"", ",", "index", "get", "name", "(", ")", ",", "current", "step", "get", "class", "(", ")", "get", "simple", "name", "(", ")", ",", "current", "step", "get", "key", "(", ")", ")", ";", "try", "{", "state", "=", "(", "(", "cluster", "state", "action", "step", ")", "current", "step", ")", "perform", "action", "(", "index", ",", "state", ")", ";", "}", "catch", "(", "exception", "exception", ")", "{", "return", "move", "to", "error", "step", "(", "state", ",", "current", "step", "get", "key", "(", ")", ",", "exception", ")", ";", "}", "/", "/", "set", "here", "to", "make", "sure", "that", "the", "cluster", "processed", "knows", "to", "execute", "the", "/", "/", "correct", "step", "if", "it", "an", "async", "action", "next", "step", "key", "=", "current", "step", "get", "next", "step", "key", "(", ")", ";", "if", "(", "next", "step", "key", "=", "=", "null", ")", "{", "return", "state", ";", "}", "else", "{", "logger", "trace", "(", "\"", "[", "{", "}", "]", "moving", "cluster", "state", "to", "next", "step", "[", "{", "}", "]", "\"", ",", "index", "get", "name", "(", ")", ",", "next", "step", "key", ")", ";", "state", "=", "index", "lifecycle", "transition", "move", "cluster", "state", "to", "step", "(", "index", ",", "state", ",", "next", "step", "key", ",", "now", "supplier", ",", "policy", "steps", "registry", ",", "false", ")", ";", "}", "}", "else", "{", "/", "/", "set", "here", "to", "make", "sure", "that", "the", "cluster", "processed", "knows", "to", "execute", "the", "/", "/", "correct", "step", "if", "it", "an", "async", "action", "next", "step", "key", "=", "current", "step", "get", "next", "step", "key", "(", ")", ";", "/", "/", "cluster", "state", "wait", "step", "so", "evaluate", "the", "/", "/", "condition", ",", "if", "the", "condition", "is", "met", "move", "to", "the", "/", "/", "next", "step", ",", "if", "its", "not", "met", "return", "the", "current", "/", "/", "cluster", "state", "so", "it", "can", "be", "applied", "and", "we", "will", "/", "/", "wait", "for", "the", "next", "trigger", "to", "evaluate", "the", "/", "/", "condition", "again", "logger", "trace", "(", "\"", "[", "{", "}", "]", "waiting", "for", "cluster", "state", "step", "condition", "(", "{", "}", ")", "[", "{", "}", "]", ",", "next", ":", "[", "{", "}", "]", "\"", ",", "index", "get", "name", "(", ")", ",", "current", "step", "get", "class", "(", ")", "get", "simple", "name", "(", ")", ",", "current", "step", "get", "key", "(", ")", ",", "next", "step", "key", ")", ";", "cluster", "state", "wait", "step", "result", "result", ";", "try", "{", "result", "=", "(", "(", "cluster", "state", "wait", "step", ")", "current", "step", ")", "is", "condition", "met", "(", "index", ",", "state", ")", ";", "}", "catch", "(", "exception", "exception", ")", "{", "return", "move", "to", "error", "step", "(", "state", ",", "current", "step", "get", "key", "(", ")", ",", "exception", ")", ";", "}", "if", "(", "result", "is", "complete", "(", ")", ")", "{", "logger", "trace", "(", "\"", "[", "{", "}", "]", "cluster", "state", "step", "condition", "met", "successfully", "(", "{", "}", ")", "[", "{", "}", "]", ",", "moving", "to", "next", "step", "{", "}", "\"", ",", "index", "get", "name", "(", ")", ",", "current", "step", "get", "class", "(", ")", "get", "simple", "name", "(", ")", ",", "current", "step", "get", "key", "(", ")", ",", "next", "step", "key", ")", ";", "if", "(", "next", "step", "key", "=", "=", "null", ")", "{", "return", "state", ";", "}", "else", "{", "state", "=", "index", "lifecycle", "transition", "move", "cluster", "state", "to", "step", "(", "index", ",", "state", ",", "next", "step", "key", ",", "now", "supplier", ",", "policy", "steps", "registry", ",", "false", ")", ";", "}", "}", "else", "{", "final", "to", "x", "content", "object", "step", "info", "=", "result", "get", "infomation", "context", "(", ")", ";", "if", "(", "logger", "is", "trace", "enabled", "(", ")", ")", "{", "logger", "trace", "(", "\"", "[", "{", "}", "]", "condition", "not", "met", "(", "{", "}", ")", "[", "{", "}", "]", ",", "returning", "existing", "state", "(", "info", ":", "{", "}", ")", "\"", ",", "index", "get", "name", "(", ")", ",", "current", "step", "get", "class", "(", ")", "get", "simple", "name", "(", ")", ",", "current", "step", "get", "key", "(", ")", ",", "step", "info", "=", "=", "null", "?", "\"", "null", "\"", ":", "strings", "to", "string", "(", "step", "info", ")", ")", ";", "}", "/", "/", "we", "may", "have", "executed", "a", "step", "and", "set", "\"", "next", "step", "key", "\"", "to", "/", "/", "a", "value", ",", "but", "in", "this", "case", ",", "since", "the", "condition", "was", "/", "/", "not", "met", ",", "we", "can", "'", "t", "advance", "any", "way", ",", "so", "don", "'", "t", "attempt", "/", "/", "to", "run", "the", "current", "step", "next", "step", "key", "=", "null", ";", "if", "(", "step", "info", "=", "=", "null", ")", "{", "return", "state", ";", "}", "else", "{", "return", "index", "lifecycle", "transition", "add", "step", "info", "to", "cluster", "state", "(", "index", ",", "state", ",", "step", "info", ")", ";", "}", "}", "}", "/", "/", "there", "are", "actions", "we", "need", "to", "take", "in", "the", "event", "a", "phase", "/", "/", "transition", "happens", ",", "so", "even", "if", "we", "would", "continue", "in", "the", "while", "/", "/", "loop", ",", "if", "we", "are", "about", "to", "go", "into", "a", "new", "phase", ",", "return", "so", "that", "/", "/", "other", "processing", "can", "occur", "if", "(", "current", "step", "get", "key", "(", ")", "get", "phase", "(", ")", "equals", "(", "current", "step", "get", "next", "step", "key", "(", ")", "get", "phase", "(", ")", ")", "=", "=", "false", ")", "{", "return", "state", ";", "}", "current", "step", "=", "policy", "steps", "registry", "get", "step", "(", "index", "metadata", ",", "current", "step", "get", "next", "step", "key", "(", ")", ")", ";", "}", "return", "state", ";", "}", "else", "{", "/", "/", "either", "we", "are", "no", "longer", "the", "master", "or", "the", "step", "is", "now", "/", "/", "not", "the", "same", "as", "when", "we", "submitted", "the", "update", "task", "in", "/", "/", "either", "case", "we", "don", "'", "t", "want", "to", "do", "anything", "now", "return", "current", "state", ";", "}", "}" ]
[ "test", "interruption", "handling", "when", "a", "long", "-", "running", "sky", "function", "gets", "interrupted" ]
[ "public", "void", "interrupted", "function", "(", ")", "throws", "exception", "{", "run", "interruption", "test", "(", "new", "sky", "function", "factory", "(", ")", "{", "@", "override", "public", "sky", "function", "create", "(", "final", "semaphore", "thread", "started", ",", "final", "string", "[", "]", "error", "message", ")", "{", "return", "new", "sky", "function", "(", ")", "{", "@", "override", "public", "sky", "value", "compute", "(", "sky", "key", "key", ",", "environment", "env", ")", "throws", "interrupted", "exception", "{", "/", "/", "signal", "the", "waiting", "test", "thread", "that", "the", "evaluator", "thread", "has", "really", "started", "thread", "started", "release", "(", ")", ";", "/", "/", "simulate", "a", "sky", "function", "that", "runs", "for", "10", "seconds", "(", "this", "number", "was", "chosen", "arbitrarily", ")", "/", "/", "the", "main", "thread", "should", "interrupt", "it", "shortly", "after", "it", "got", "started", "thread", "sleep", "(", "10", "*", "1000", ")", ";", "/", "/", "set", "an", "error", "message", "to", "indicate", "that", "the", "expected", "interruption", "didn", "'", "t", "happen", "/", "/", "we", "can", "'", "t", "use", "assert", "fail", "(", "string", ")", "on", "an", "async", "thread", "error", "message", "[", "0", "]", "=", "\"", "sky", "function", "should", "have", "been", "interrupted", "\"", ";", "return", "null", ";", "}", "@", "nullable", "@", "override", "public", "string", "extract", "tag", "(", "sky", "key", "sky", "key", ")", "{", "return", "null", ";", "}", "}", ";", "}", "}", ")", ";", "}" ]
[ "returns", "the", "closest", "enemy", "of", "this", "team", "using", "a", "custom", "comparison", "function", "filter", "by", "predicate" ]
[ "public", "static", "unit", "best", "enemy", "(", "team", "team", ",", "float", "x", ",", "float", "y", ",", "float", "range", ",", "boolf", "<", "unit", ">", "predicate", ",", "sortf", "sort", ")", "{", "if", "(", "team", "=", "=", "team", "derelict", ")", "return", "null", ";", "result", "=", "null", ";", "cdist", "=", "0f", ";", "nearby", "enemies", "(", "team", ",", "x", "-", "range", ",", "y", "-", "range", ",", "range", "*", "2f", ",", "range", "*", "2f", ",", "e", "-", ">", "{", "if", "(", "e", "dead", "(", ")", "|", "|", "!", "predicate", "get", "(", "e", ")", "|", "|", "!", "e", "within", "(", "x", ",", "y", ",", "range", ")", ")", "return", ";", "float", "cost", "=", "sort", "cost", "(", "e", ",", "x", ",", "y", ")", ";", "if", "(", "result", "=", "=", "null", "|", "|", "cost", "<", "cdist", ")", "{", "result", "=", "e", ";", "cdist", "=", "cost", ";", "}", "}", ")", ";", "return", "result", ";", "}" ]
[ "called", "when", "transitioning", "between", "two", "status", "effects" ]
[ "public", "status", "entry", "get", "transition", "(", "unit", "unit", ",", "status", "effect", "to", ",", "float", "time", ",", "float", "new", "time", ",", "status", "entry", "result", ")", "{", "if", "(", "transitions", "contains", "key", "(", "to", ")", ")", "{", "transitions", "get", "(", "to", ")", "handle", "(", "unit", ",", "time", ",", "new", "time", ",", "result", ")", ";", "return", "result", ";", "}", "return", "result", "set", "(", "to", ",", "new", "time", ")", ";", "}" ]
[ "set", "the", "name", "of", "the", "target", "bean", "this", "is", "an", "alternative", "to", "specifying", "the", "target", "name", "at", "the", "end", "of", "the", "\"", "interceptor", "names", "\"", "array", "you", "can", "also", "specify", "a", "target", "object", "or", "a", "target", "source", "object", "directly", ",", "via", "the", "\"", "target", "\"", "\"", "target", "source", "\"", "property", ",", "respectively" ]
[ "public", "void", "set", "target", "name", "(", "string", "target", "name", ")", "{", "this", "target", "name", "=", "target", "name", ";", "}" ]
[ "sets", "the", "analyzer", "name", "to", "use", "in", "order", "to", "analyze", "the", "text" ]
[ "public", "analyze", "request", "builder", "set", "analyzer", "(", "string", "analyzer", ")", "{", "request", "analyzer", "(", "analyzer", ")", ";", "return", "this", ";", "}" ]
[ "returns", "the", "{", "@", "link", "pdb", "debug", "info", "}", "component" ]
[ "public", "pdb", "debug", "info", "get", "debug", "info", "(", ")", "{", "return", "debug", "info", ";", "}" ]
[ "add", "a", "link", "to", "the", "config", "for", "the", "default", "mount", "table" ]
[ "public", "static", "void", "add", "link", "(", "final", "configuration", "conf", ",", "final", "string", "src", ",", "final", "uri", "target", ")", "{", "add", "link", "(", "conf", ",", "get", "default", "mount", "table", "name", "(", "conf", ")", ",", "src", ",", "target", ")", ";", "}" ]
[ "assert", "a", "cookie", "'", "s", "comment" ]
[ "public", "result", "matcher", "comment", "(", "string", "name", ",", "string", "comment", ")", "{", "return", "result", "-", ">", "{", "cookie", "cookie", "=", "get", "cookie", "(", "result", ",", "name", ")", ";", "assert", "equals", "(", "\"", "response", "cookie", "'", "\"", "+", "name", "+", "\"", "'", "comment", "\"", ",", "comment", ",", "cookie", "get", "comment", "(", ")", ")", ";", "}", ";", "}" ]
[ "emulation", "callback", "immediately", "following", "execution", "of", "the", "last", "execute", "address", "one", "use", "of", "this", "callback", "is", "to", "modify", "the", "flowingfuture", "context", "state" ]
[ "public", "void", "post", "execute", "callback", "(", "emulate", "emulate", ",", "address", "last", "execute", "address", ",", "pcode", "op", "[", "]", "last", "execute", "pcode", ",", "int", "last", "pcode", "index", ",", "address", "current", "address", ")", "throws", "lowlevel", "error", "{", "/", "/", "no", "default", "implementation", "}" ]
[ "import", "resource", "and", "provide", "boolean" ]
[ "public", "boolean", "import", "resource", "(", "final", "resource", "resource", ")", "{", "try", "{", "if", "(", "resource", "utils", "does", "resource", "exist", "(", "resource", ")", ")", "{", "try", "(", "val", "reader", "=", "new", "input", "stream", "reader", "(", "resource", "get", "input", "stream", "(", ")", ",", "standard", "charsets", "utf", "8", ")", ")", "{", "final", "type", "reference", "<", "list", "<", "saml", "identity", "provider", "entity", ">", ">", "ref", "=", "new", "type", "reference", "<", ">", "(", ")", "{", "}", ";", "identity", "providers", "add", "all", "(", "mapper", "read", "value", "(", "json", "value", "read", "hjson", "(", "reader", ")", "to", "string", "(", ")", ",", "ref", ")", ")", ";", "}", "return", "true", ";", "}", "}", "catch", "(", "final", "exception", "e", ")", "{", "logging", "utils", "error", "(", "logger", ",", "e", ")", ";", "}", "return", "false", ";", "}" ]
[ "<", "code", ">", "optional", "aapt", "pb", "attribute", "attr", "=", "1", ";", "<", "code", ">" ]
[ "public", "boolean", "has", "attr", "(", ")", "{", "return", "(", "(", "bit", "field", "0", "&", "0x", "0", "0", "0", "0", "0", "0", "0", "1", ")", "=", "=", "0x", "0", "0", "0", "0", "0", "0", "0", "1", ")", ";", "}" ]
[ "helper", "methods", "that", "tests", "for", "a", "variety", "of", "{", "@", "link", "mono", "}", "decoding", "scenarios", "this", "methods", "invokes", ":", "{", "@", "link", "#", "test", "decode", "to", "mono", "(", "publisher", ",", "resolvable", "type", ",", "consumer", ",", "mime", "type", ",", "map", ")", "}", "{", "@", "link", "#", "test", "decode", "to", "mono", "error", "(", "publisher", ",", "resolvable", "type", ",", "mime", "type", ",", "map", ")", "}", "{", "@", "link", "#", "test", "decode", "to", "mono", "cancel", "(", "publisher", ",", "resolvable", "type", ",", "mime", "type", ",", "map", ")", "}", "{", "@", "link", "#", "test", "decode", "to", "mono", "empty", "(", "resolvable", "type", ",", "mime", "type", ",", "map", ")", "}" ]
[ "protected", "<", "t", ">", "void", "test", "decode", "to", "mono", "all", "(", "publisher", "<", "data", "buffer", ">", "input", ",", "resolvable", "type", "output", "type", ",", "consumer", "<", "step", "verifier", "first", "step", "<", "t", ">", ">", "step", "consumer", ",", "@", "nullable", "mime", "type", "mime", "type", ",", "@", "nullable", "map", "<", "string", ",", "object", ">", "hints", ")", "{", "test", "decode", "to", "mono", "(", "input", ",", "output", "type", ",", "step", "consumer", ",", "mime", "type", ",", "hints", ")", ";", "test", "decode", "to", "mono", "error", "(", "input", ",", "output", "type", ",", "mime", "type", ",", "hints", ")", ";", "test", "decode", "to", "mono", "cancel", "(", "input", ",", "output", "type", ",", "mime", "type", ",", "hints", ")", ";", "test", "decode", "to", "mono", "empty", "(", "output", "type", ",", "mime", "type", ",", "hints", ")", ";", "}" ]
[ "register", "a", "rpc", "kind", "and", "the", "class", "to", "deserialize", "the", "rpc", "request", "called", "by", "static", "initializers", "of", "rpc", "kind", "engines" ]
[ "public", "static", "void", "register", "protocol", "engine", "(", "rpc", "rpc", "kind", "rpc", "kind", ",", "class", "<", "?", "extends", "writable", ">", "rpc", "request", "wrapper", "class", ",", "rpc", "invoker", "rpc", "invoker", ")", "{", "rpc", "kind", "map", "value", "old", "=", "rpc", "kind", "map", "put", "(", "rpc", "kind", ",", "new", "rpc", "kind", "map", "value", "(", "rpc", "request", "wrapper", "class", ",", "rpc", "invoker", ")", ")", ";", "if", "(", "old", "!", "=", "null", ")", "{", "rpc", "kind", "map", "put", "(", "rpc", "kind", ",", "old", ")", ";", "throw", "new", "illegal", "argument", "exception", "(", "\"", "re", "registration", "of", "rpc", "kind", ":", "\"", "+", "rpc", "kind", ")", ";", "}", "if", "(", "log", "is", "debug", "enabled", "(", ")", ")", "{", "log", "debug", "(", "\"", "rpc", "kind", "=", "\"", "+", "rpc", "kind", "+", "\"", ",", "rpc", "request", "wrapper", "class", "=", "\"", "+", "rpc", "request", "wrapper", "class", "+", "\"", ",", "rpc", "invoker", "=", "\"", "+", "rpc", "invoker", ")", ";", "}", "}" ]
[ "convert", "an", "address", "into", "an", "xml", "document" ]
[ "public", "static", "string", "build", "x", "m", "l", "address", "(", "address", "addr", ")", "{", "if", "(", "(", "addr", "=", "=", "null", ")", "|", "|", "(", "addr", "=", "=", "address", "no", "address", ")", ")", "{", "return", "\"", "<", "addr", "/", ">", "\"", ";", "}", "string", "builder", "res", "buf", "=", "new", "string", "builder", "(", ")", ";", "res", "buf", "append", "(", "\"", "<", "addr", "\"", ")", ";", "append", "space", "offset", "(", "res", "buf", ",", "addr", ")", ";", "res", "buf", "append", "(", "\"", "/", ">", "\"", ")", ";", "return", "res", "buf", "to", "string", "(", ")", ";", "}" ]
[ "returns", "the", "method", "{", "@", "link", "type", "}", "corresponding", "to", "the", "given", "method" ]
[ "public", "static", "type", "get", "type", "(", "final", "method", "method", ")", "{", "return", "get", "type", "(", "get", "method", "descriptor", "(", "method", ")", ")", ";", "}" ]
[ "check", "if", "the", "specified", "pointer", "tracked", "in", "the", "current", "gesture", "has", "crossed", "the", "required", "slop", "threshold", "this", "depends", "on", "internal", "state", "populated", "by", "{", "@", "link", "#", "should", "intercept", "touch", "event", "(", "android", "view", "motion", "event", ")", "}", "or", "{", "@", "link", "#", "process", "touch", "event", "(", "android", "view", "motion", "event", ")", "}", "you", "should", "only", "rely", "on", "the", "results", "of", "this", "method", "after", "all", "currently", "available", "touch", "data", "has", "been", "provided", "to", "one", "of", "these", "two", "methods" ]
[ "public", "boolean", "check", "touch", "slop", "(", "int", "directions", ",", "int", "pointer", "id", ")", "{", "if", "(", "!", "is", "pointer", "down", "(", "pointer", "id", ")", ")", "{", "return", "false", ";", "}", "final", "boolean", "check", "horizontal", "=", "(", "directions", "&", "direction", "horizontal", ")", "=", "=", "direction", "horizontal", ";", "final", "boolean", "check", "vertical", "=", "(", "directions", "&", "direction", "vertical", ")", "=", "=", "direction", "vertical", ";", "final", "float", "dx", "=", "m", "last", "motion", "x", "[", "pointer", "id", "]", "-", "m", "initial", "motion", "x", "[", "pointer", "id", "]", ";", "final", "float", "dy", "=", "m", "last", "motion", "y", "[", "pointer", "id", "]", "-", "m", "initial", "motion", "y", "[", "pointer", "id", "]", ";", "if", "(", "check", "horizontal", "&", "&", "check", "vertical", ")", "{", "return", "dx", "*", "dx", "+", "dy", "*", "dy", ">", "m", "touch", "slop", "*", "m", "touch", "slop", ";", "}", "else", "if", "(", "check", "horizontal", ")", "{", "return", "math", "abs", "(", "dx", ")", ">", "m", "touch", "slop", ";", "}", "else", "if", "(", "check", "vertical", ")", "{", "return", "math", "abs", "(", "dy", ")", ">", "m", "touch", "slop", ";", "}", "return", "false", ";", "}" ]
[ "calculate", "the", "contrast", "color", "based", "on", "luma", "(", "brightness", ")", "https", ":", "en", "wikipedia", "orgwiki", "luma", "(", "video", ")", "do", "not", "dispose", "returned", "color" ]
[ "public", "static", "color", "get", "contrast", "color", "(", "color", "color", ")", "{", "if", "(", "color", "=", "=", "null", ")", "{", "return", "color", "black", ";", "}", "double", "luminance", "=", "1", "-", "(", "0", "299", "*", "color", "get", "red", "(", ")", "+", "0", "587", "*", "color", "get", "green", "(", ")", "+", "0", "114", "*", "color", "get", "blue", "(", ")", ")", "/", "255", ";", "if", "(", "luminance", ">", "0", "5", ")", "{", "return", "color", "white", ";", "}", "return", "color", "black", ";", "}" ]
[ "determine", "if", "the", "specified", "variables", "have", "overlapping", "storage", "variable", "storage", "check", "includes", "dynamically", "mapped", "storage", "for", "parameters", "this", "method", "should", "not", "be", "used", "with", "caution", "if", "both", "arguments", "are", "parameters", "which", "use", "dynamically", "mapped", "storage" ]
[ "public", "static", "boolean", "variable", "storage", "overlaps", "(", "variable", "var", "1", ",", "variable", "var", "2", ")", "{", "program", "program", "1", "=", "var", "1", "get", "function", "(", ")", "get", "program", "(", ")", ";", "program", "program", "2", "=", "var", "2", "get", "function", "(", ")", "get", "program", "(", ")", ";", "variable", "storage", "storage", "=", "get", "compatible", "variable", "storage", "(", "program", "1", ",", "var", "1", "get", "variable", "storage", "(", ")", ",", "program", "2", ")", ";", "if", "(", "storage", "=", "=", "null", "|", "|", "storage", "is", "bad", "storage", "(", ")", ")", "{", "return", "false", ";", "}", "return", "storage", "intersects", "(", "var", "2", "get", "variable", "storage", "(", ")", ")", ";", "}" ]
[ "returns", "a", "tuple", "of", "{", "@", "link", "update", "response", "}", "s", "the", "left", "element", "is", "the", "actual", "{", "@", "link", "update", "response", "}", "to", "serialize", "while", "the", "right", "element", "is", "the", "expected", "{", "@", "link", "update", "response", "}", "after", "parsing" ]
[ "public", "static", "tuple", "<", "update", "response", ",", "update", "response", ">", "random", "update", "response", "(", "x", "content", "type", "x", "content", "type", ")", "{", "tuple", "<", "get", "result", ",", "get", "result", ">", "get", "results", "=", "get", "result", "tests", "random", "get", "result", "(", "x", "content", "type", ")", ";", "get", "result", "actual", "get", "result", "=", "get", "results", "v", "1", "(", ")", ";", "get", "result", "expected", "get", "result", "=", "get", "results", "v", "2", "(", ")", ";", "string", "index", "=", "actual", "get", "result", "get", "index", "(", ")", ";", "string", "id", "=", "actual", "get", "result", "get", "id", "(", ")", ";", "long", "version", "=", "actual", "get", "result", "get", "version", "(", ")", ";", "doc", "write", "response", "result", "result", "=", "actual", "get", "result", "is", "exists", "(", ")", "?", "doc", "write", "response", "result", "updated", ":", "doc", "write", "response", "result", "not", "found", ";", "string", "index", "u", "uid", "=", "random", "alpha", "of", "length", "(", "5", ")", ";", "int", "shard", "id", "=", "random", "int", "between", "(", "0", ",", "5", ")", ";", "/", "/", "we", "also", "want", "small", "number", "values", "(", "random", "non", "negative", "long", "(", ")", "tend", "to", "generate", "high", "numbers", ")", "/", "/", "in", "order", "to", "catch", "some", "conversion", "error", "that", "happen", "between", "int", "/", "long", "after", "parsing", "long", "seq", "no", "=", "random", "from", "(", "random", "non", "negative", "long", "(", ")", ",", "(", "long", ")", "random", "int", "between", "(", "0", ",", "10", "000", ")", ",", "sequence", "numbers", "unassigned", "seq", "no", ")", ";", "long", "primary", "term", "=", "seq", "no", "=", "=", "sequence", "numbers", "unassigned", "seq", "no", "?", "sequence", "numbers", "unassigned", "primary", "term", ":", "random", "int", "between", "(", "1", ",", "16", ")", ";", "shard", "id", "actual", "shard", "id", "=", "new", "shard", "id", "(", "index", ",", "index", "u", "uid", ",", "shard", "id", ")", ";", "shard", "id", "expected", "shard", "id", "=", "new", "shard", "id", "(", "index", ",", "index", "uuid", "na", "value", ",", "-", "1", ")", ";", "update", "response", "actual", ",", "expected", ";", "if", "(", "seq", "no", "!", "=", "sequence", "numbers", "unassigned", "seq", "no", ")", "{", "tuple", "<", "replication", "response", "shard", "info", ",", "replication", "response", "shard", "info", ">", "shard", "infos", "=", "random", "objects", "random", "shard", "info", "(", "random", "(", ")", ")", ";", "actual", "=", "new", "update", "response", "(", "shard", "infos", "v", "1", "(", ")", ",", "actual", "shard", "id", ",", "id", ",", "seq", "no", ",", "primary", "term", ",", "version", ",", "result", ")", ";", "expected", "=", "new", "update", "response", "(", "shard", "infos", "v", "2", "(", ")", ",", "expected", "shard", "id", ",", "id", ",", "seq", "no", ",", "primary", "term", ",", "version", ",", "result", ")", ";", "}", "else", "{", "actual", "=", "new", "update", "response", "(", "actual", "shard", "id", ",", "id", ",", "seq", "no", ",", "primary", "term", ",", "version", ",", "result", ")", ";", "expected", "=", "new", "update", "response", "(", "expected", "shard", "id", ",", "id", ",", "seq", "no", ",", "primary", "term", ",", "version", ",", "result", ")", ";", "}", "if", "(", "actual", "get", "result", "is", "exists", "(", ")", ")", "{", "actual", "set", "get", "result", "(", "actual", "get", "result", ")", ";", "}", "if", "(", "expected", "get", "result", "is", "exists", "(", ")", ")", "{", "expected", "set", "get", "result", "(", "expected", "get", "result", ")", ";", "}", "boolean", "forced", "refresh", "=", "random", "boolean", "(", ")", ";", "actual", "set", "forced", "refresh", "(", "forced", "refresh", ")", ";", "expected", "set", "forced", "refresh", "(", "forced", "refresh", ")", ";", "return", "tuple", "tuple", "(", "actual", ",", "expected", ")", ";", "}" ]
[ "finds", "pets", "by", "status", "multiple", "status", "values", "can", "be", "provided", "with", "comma", "separated", "strings" ]
[ "public", "api", "response", "<", "list", "<", "pet", ">", ">", "find", "pets", "by", "status", "with", "http", "info", "(", "list", "<", "string", ">", "status", ")", "throws", "api", "exception", "{", "okhttp", "3", "call", "local", "var", "call", "=", "find", "pets", "by", "status", "validate", "before", "call", "(", "status", ",", "null", ")", ";", "type", "local", "var", "return", "type", "=", "new", "type", "token", "<", "list", "<", "pet", ">", ">", "(", ")", "{", "}", "get", "type", "(", ")", ";", "return", "local", "var", "api", "client", "execute", "(", "local", "var", "call", ",", "local", "var", "return", "type", ")", ";", "}" ]
[ "returns", "a", "map", "of", "java", "methods", "and", "corresponding", "starlark", "method", "annotations", "for", "each", "annotated", "java", "method", "of", "the", "specified", "class", "elements", "are", "ordered", "by", "java", "method", "name", ",", "which", "is", "not", "necessarily", "the", "same", "as", "the", "starlark", "attribute", "name", "the", "set", "of", "enabled", "methods", "is", "determined", "by", "{", "@", "link", "starlark", "semantics", "#", "default", "}", "excludes", "the", "{", "@", "code", "self", "call", "}", "method", ",", "if", "any", "most", "callers", "should", "use", "{", "@", "link", "#", "dir", "}", "and", "{", "@", "link", "#", "getattr", "}", "instead" ]
[ "public", "static", "immutable", "map", "<", "method", ",", "starlark", "method", ">", "get", "method", "annotations", "(", "class", "<", "?", ">", "clazz", ")", "{", "immutable", "map", "builder", "<", "method", ",", "starlark", "method", ">", "result", "=", "immutable", "map", "builder", "(", ")", ";", "for", "(", "method", "descriptor", "desc", ":", "call", "utils", "get", "annotated", "methods", "(", "starlark", "semantics", "default", ",", "clazz", ")", "values", "(", ")", ")", "{", "result", "put", "(", "desc", "get", "method", "(", ")", ",", "desc", "get", "annotation", "(", ")", ")", ";", "}", "return", "result", "build", "(", ")", ";", "}" ]
[ "returns", "the", "value", "of", "this", "{", "@", "code", "unsigned", "long", "}", "as", "a", "{", "@", "code", "float", "}", ",", "analogous", "to", "a", "widening", "primitive", "conversion", "from", "{", "@", "code", "long", "}", "to", "{", "@", "code", "float", "}", ",", "and", "correctly", "rounded" ]
[ "public", "float", "float", "value", "(", ")", "{", "@", "suppress", "warnings", "(", "\"", "cast", "\"", ")", "float", "f", "value", "=", "(", "float", ")", "(", "value", "&", "unsigned", "mask", ")", ";", "if", "(", "value", "<", "0", ")", "{", "f", "value", "+", "=", "0x", "1", "0p", "6", "3f", ";", "}", "return", "f", "value", ";", "}" ]
[ "get", "map", "number" ]
[ "public", "map", "<", "string", ",", "big", "decimal", ">", "get", "map", "number", "(", ")", "{", "return", "map", "number", ";", "}" ]
[ "create", "an", "application", "-", "managed", "extended", "entity", "manager", "proxy" ]
[ "public", "static", "entity", "manager", "create", "application", "managed", "entity", "manager", "(", "entity", "manager", "raw", "entity", "manager", ",", "entity", "manager", "factory", "info", "emf", "info", ")", "{", "return", "create", "proxy", "(", "raw", "entity", "manager", ",", "emf", "info", ",", "false", ",", "false", ")", ";", "}" ]
[ "creates", "an", "instance", "of", "the", "<", "code", ">", "cloud", "blob", "client", "<", "code", ">", "class", "using", "the", "specified", "blob", "service", "endpoint", "and", "account", "credentials" ]
[ "public", "abstract", "void", "create", "blob", "client", "(", "uri", "base", "uri", ",", "storage", "credentials", "credentials", ")", ";" ]
[ "produce", "a", "string", "representation", "of", "the", "abstract", "syntax", "tree", "for", "the", "expression", "this", "should", "ideally", "look", "like", "the", "input", "expression", ",", "but", "properly", "formatted", "since", "any", "unnecessary", "whitespace", "will", "have", "been", "discarded", "during", "the", "parse", "of", "the", "expression" ]
[ "public", "string", "to", "string", "a", "s", "t", "(", ")", "{", "return", "this", "ast", "to", "string", "a", "s", "t", "(", ")", ";", "}" ]
[ "clear", "the", "internal", "parts", "of", "a", "structure" ]
[ "private", "boolean", "clear", "structure", "(", "program", "program", ",", "program", "location", "start", ",", "program", "location", "end", ")", "{", "/", "/", "get", "data", "at", "start", "boolean", "commit", "=", "false", ";", "int", "id", "=", "program", "start", "transaction", "(", "\"", "clear", "structure", "\"", ")", ";", "try", "{", "address", "data", "addr", "=", "start", "get", "byte", "address", "(", ")", ";", "data", "data", "=", "program", "get", "listing", "(", ")", "get", "defined", "data", "containing", "(", "data", "addr", ")", ";", "if", "(", "data", "=", "=", "null", ")", "{", "return", "false", ";", "}", "/", "/", "get", "the", "structure", "to", "clear", ",", "make", "sure", "it", "is", "a", "structure", "data", "comp", "data", "=", "data", "get", "component", "(", "start", "get", "component", "path", "(", ")", ")", ";", "if", "(", "comp", "data", "=", "=", "null", ")", "{", "return", "false", ";", "}", "data", "type", "data", "type", "=", "comp", "data", "get", "parent", "(", ")", "get", "base", "data", "type", "(", ")", ";", "if", "(", "!", "(", "data", "type", "instanceof", "composite", ")", ")", "{", "return", "false", ";", "}", "/", "/", "don", "'", "t", "allow", "clearing", "the", "last", "component", "from", "a", "union", "if", "(", "data", "type", "instanceof", "union", "&", "&", "(", "(", "composite", ")", "data", "type", ")", "get", "num", "components", "(", ")", "<", "=", "1", ")", "{", "return", "false", ";", "}", "/", "/", "get", "the", "start", "offset", "into", "the", "data", "structure", "int", "index", "=", "comp", "data", "get", "component", "index", "(", ")", ";", "if", "(", "data", "type", "instanceof", "union", ")", "{", "(", "(", "union", ")", "data", "type", ")", "delete", "(", "index", ")", ";", "}", "else", "{", "/", "/", "now", "clear", "it", "address", "start", "address", "=", "start", "get", "byte", "address", "(", ")", ";", "address", "end", "address", "=", "(", "end", "!", "=", "null", ")", "?", "end", "get", "byte", "address", "(", ")", ":", "start", "address", ";", "data", "parent", "=", "comp", "data", "get", "parent", "(", ")", ";", "address", "parent", "address", "=", "parent", "get", "address", "(", ")", ";", "int", "start", "offset", "=", "(", "int", ")", "start", "address", "subtract", "(", "parent", "address", ")", ";", "int", "end", "offset", "=", "(", "int", ")", "end", "address", "subtract", "(", "parent", "address", ")", ";", "structure", "structure", "=", "(", "structure", ")", "data", "type", ";", "int", "start", "ordinal", "=", "get", "ordinal", "at", "or", "before", "(", "structure", ",", "start", "offset", ")", ";", "int", "end", "ordinal", "=", "get", "ordinal", "at", "or", "before", "(", "structure", ",", "end", "offset", ")", ";", "for", "(", "int", "ordinal", "=", "end", "ordinal", ";", "ordinal", ">", "=", "0", "&", "&", "ordinal", ">", "=", "start", "ordinal", ";", "ordinal", "-", "-", ")", "{", "structure", "clear", "component", "(", "ordinal", ")", ";", "}", "}", "commit", "=", "true", ";", "}", "catch", "(", "exception", "e", ")", "{", "e", "print", "stack", "trace", "(", ")", ";", "}", "finally", "{", "program", "end", "transaction", "(", "id", ",", "commit", ")", ";", "}", "return", "commit", ";", "}" ]
[ "open", "the", "output", "generated", "by", "this", "format" ]
[ "public", "static", "map", "file", "reader", "[", "]", "get", "readers", "(", "path", "dir", ",", "configuration", "conf", ")", "throws", "i", "o", "exception", "{", "file", "system", "fs", "=", "dir", "get", "file", "system", "(", "conf", ")", ";", "path", "filter", "filter", "=", "new", "path", "filter", "(", ")", "{", "@", "override", "public", "boolean", "accept", "(", "path", "path", ")", "{", "string", "name", "=", "path", "get", "name", "(", ")", ";", "if", "(", "name", "starts", "with", "(", "\"", "\"", ")", "|", "|", "name", "starts", "with", "(", "\"", "\"", ")", ")", "return", "false", ";", "return", "true", ";", "}", "}", ";", "path", "[", "]", "names", "=", "file", "util", "stat", "2", "paths", "(", "fs", "list", "status", "(", "dir", ",", "filter", ")", ")", ";", "/", "/", "sort", "names", ",", "so", "that", "hash", "partitioning", "works", "arrays", "sort", "(", "names", ")", ";", "map", "file", "reader", "[", "]", "parts", "=", "new", "map", "file", "reader", "[", "names", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "names", "length", ";", "i", "+", "+", ")", "{", "parts", "[", "i", "]", "=", "new", "map", "file", "reader", "(", "fs", ",", "names", "[", "i", "]", "to", "string", "(", ")", ",", "conf", ")", ";", "}", "return", "parts", ";", "}" ]
[ "add", "one", "or", "more", "components", "to", "be", "invoked", "after", "the", "execution", "of", "a", "controller", "method", "annotated", "with", "{", "@", "code", "@", "response", "body", "}", "or", "returning", "{", "@", "code", "response", "entity", "}", "but", "before", "the", "body", "is", "written", "to", "the", "response", "with", "the", "selected", "{", "@", "code", "http", "message", "converter", "}" ]
[ "public", "void", "set", "response", "body", "advice", "(", "@", "nullable", "list", "<", "response", "body", "advice", "<", "?", ">", ">", "response", "body", "advice", ")", "{", "if", "(", "response", "body", "advice", "!", "=", "null", ")", "{", "this", "response", "body", "advice", "add", "all", "(", "response", "body", "advice", ")", ";", "}", "}" ]
[ "creates", "or", "updates", "a", "symbolic", "link", "from", "'", "link", "'", "to", "'", "target", "'", "replaces", "existing", "symbolic", "links", "with", "target", ",", "and", "skips", "the", "link", "creation", "if", "it", "is", "already", "present", "will", "also", "create", "any", "missing", "ancestor", "directories", "of", "the", "link", "this", "method", "is", "non", "-", "atomic", "note", ":", "this", "method", "will", "throw", "an", "i", "o", "exception", "if", "there", "is", "an", "unequal", "non", "-", "symlink", "at", "link" ]
[ "public", "static", "void", "ensure", "symbolic", "link", "(", "path", "link", ",", "string", "target", ")", "throws", "i", "o", "exception", "{", "ensure", "symbolic", "link", "(", "link", ",", "path", "fragment", "create", "(", "target", ")", ")", ";", "}" ]
[ "postprocess", "the", "configuration", "so", "that", "exponential", "backoff", "is", "disabled", "when", "reconnect", "backoff", "is", "explicitly", "configured", "but", "the", "maximum", "reconnect", "backoff", "is", "not", "explicitly", "configured" ]
[ "public", "static", "map", "<", "string", ",", "object", ">", "post", "process", "reconnect", "backoff", "configs", "(", "abstract", "config", "config", ",", "map", "<", "string", ",", "object", ">", "parsed", "values", ")", "{", "hash", "map", "<", "string", ",", "object", ">", "rval", "=", "new", "hash", "map", "<", ">", "(", ")", ";", "if", "(", "(", "!", "config", "originals", "(", ")", "contains", "key", "(", "reconnect", "backoff", "max", "ms", "config", ")", ")", "&", "&", "config", "originals", "(", ")", "contains", "key", "(", "reconnect", "backoff", "ms", "config", ")", ")", "{", "log", "debug", "(", "\"", "disabling", "exponential", "reconnect", "backoff", "because", "{", "}", "is", "set", ",", "but", "{", "}", "is", "not", "\"", ",", "reconnect", "backoff", "ms", "config", ",", "reconnect", "backoff", "max", "ms", "config", ")", ";", "rval", "put", "(", "reconnect", "backoff", "max", "ms", "config", ",", "parsed", "values", "get", "(", "reconnect", "backoff", "ms", "config", ")", ")", ";", "}", "return", "rval", ";", "}" ]
[ "set", "the", "amount", "of", "ram", "reserved", "for", "each", "reduce", "slot" ]
[ "public", "builder", "set", "memory", "per", "reduce", "slot", "(", "long", "memory", "per", "reduce", "slot", ")", "{", "node", "memory", "per", "reduce", "slot", "=", "memory", "per", "reduce", "slot", ";", "return", "this", ";", "}" ]
[ "test", "that", "an", "end", "string", "alignment", "value", "of", "\"", "4", "\"", "(", "default", "value", ")", "works", "setting", "the", "end", "string", "alignment", "looks", "for", "00", "'", "s", "to", "pad", "the", "string", "so", "that", "whatever", "follows", "this", "string", "is", "aligned", "to", "the", "selected", "alignment", "this", "should", "only", "work", "if", "the", "\"", "require", "null", "termination", "\"", "option", "is", "enabled" ]
[ "public", "void", "test", "string", "end", "align", "at", "4", "(", ")", "throws", "exception", "{", "program", "test", "program", "=", "build", "program", "(", "\"", "finder", "exe", "\"", ",", "false", ")", ";", "listing", "listing", "=", "test", "program", "get", "listing", "(", ")", ";", "address", "space", "space", "=", "test", "program", "get", "language", "(", ")", "get", "address", "factory", "(", ")", "get", "default", "address", "space", "(", ")", ";", "string", "[", "]", "existing", "strings", "=", "new", "string", "[", "]", "{", "\"", "tloss", "error", "\\", "\\", "r", "\\", "\\", "n", "\"", ",", "\"", "sing", "error", "\\", "\\", "r", "\\", "\\", "n", "\"", ",", "\"", "microsoft", "visual", "c", "+", "+", "runtime", "library", "\"", ",", "\"", "get", "last", "active", "popup", "\"", "}", ";", "int", "[", "]", "offsets", "=", "new", "int", "[", "]", "{", "0x", "3", "0", "0", "0", "1", "0d", "0", ",", "0x", "3", "0", "0", "0", "1", "0e", "0", ",", "0x", "3", "0", "0", "0", "1", "3", "4", "8", ",", "0x", "3", "0", "0", "0", "1", "3ac", "}", ";", "int", "[", "]", "extra", "length", "=", "new", "int", "[", "]", "{", "2", ",", "3", ",", "3", ",", "1", "}", ";", "address", "[", "]", "existing", "addresses", "=", "new", "address", "[", "offsets", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "offsets", "length", ";", "i", "+", "+", ")", "{", "existing", "addresses", "[", "i", "]", "=", "addr", "(", "space", ",", "offsets", "[", "i", "]", ")", ";", "}", "data", "data", "here", ";", "/", "/", "verify", "these", "strings", "do", "not", "exist", "prior", "to", "running", "the", "strings", "analyzer", "for", "(", "address", "curr", "address", ":", "existing", "addresses", ")", "{", "data", "here", "=", "listing", "get", "defined", "data", "at", "(", "curr", "address", ")", ";", "assert", "null", "(", "data", "here", ")", ";", "}", "auto", "analysis", "manager", "manager", "=", "auto", "analysis", "manager", "get", "analysis", "manager", "(", "test", "program", ")", ";", "strings", "analyzer", "analyzer", "=", "new", "strings", "analyzer", "(", ")", ";", "analyzer", "set", "string", "end", "alignment", "(", "4", ")", ";", "analyzer", "set", "require", "null", "termination", "(", "true", ")", ";", "analyzer", "added", "(", "test", "program", ",", "null", ",", "monitor", ",", "manager", "get", "message", "log", "(", ")", ")", ";", "string", "string", "here", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "existing", "strings", "length", ";", "i", "+", "+", ")", "{", "/", "/", "verify", "string", "is", "actually", "there", "data", "here", "=", "listing", "get", "defined", "data", "at", "(", "existing", "addresses", "[", "i", "]", ")", ";", "assert", "not", "null", "(", "data", "here", ")", ";", "string", "here", "=", "data", "here", "get", "default", "value", "representation", "(", ")", ";", "/", "/", "string", "will", "look", "something", "like", "-", "-", ">", "\"", "my", "string", "\"", ",", "00", "string", "builder", "build", "my", "string", "=", "new", "string", "builder", "(", "\"", "\\", "\"", "\"", "+", "existing", "strings", "[", "i", "]", "+", "\"", "\\", "\"", "\"", ")", ";", "assert", "equals", "(", "build", "my", "string", "to", "string", "(", ")", ",", "string", "here", ")", ";", "}", "}" ]
[ "gauges", "go", "up", "and", "down" ]
[ "public", "void", "test", "gauges", "(", ")", "throws", "throwable", "{", "stats", "set", "gauge", "(", "gauge", ",", "1", ")", ";", "verify", "statistic", "gauge", "value", "(", "stats", ",", "gauge", ",", "1", ")", ";", "stats", "increment", "gauge", "(", "gauge", ",", "1", ")", ";", "verify", "statistic", "gauge", "value", "(", "stats", ",", "gauge", ",", "2", ")", ";", "stats", "set", "gauge", "(", "gauge", ",", "-", "1", ")", ";", "verify", "statistic", "gauge", "value", "(", "stats", ",", "gauge", ",", "-", "1", ")", ";", "assertions", "assert", "that", "(", "stats", "increment", "gauge", "(", "gauge", ",", "-", "1", ")", ")", "is", "equal", "to", "(", "-", "2", ")", ";", "verify", "statistic", "gauge", "value", "(", "stats", ",", "gauge", ",", "-", "2", ")", ";", "assertions", "assert", "that", "(", "stats", "get", "gauge", "reference", "(", "gauge", ")", "get", "(", ")", ")", "is", "equal", "to", "(", "-", "2", ")", ";", "stats", "set", "gauge", "(", "unknown", ",", "1", ")", ";", "assertions", "assert", "that", "(", "stats", "increment", "gauge", "(", "unknown", ",", "1", ")", ")", "is", "equal", "to", "(", "0", ")", ";", "}" ]
[ "for", "{", "@", "link", "test", "transfer", "rbw", "}" ]
[ "public", "static", "block", "op", "response", "proto", "transfer", "rbw", "(", "final", "extended", "block", "b", ",", "final", "d", "f", "s", "client", "dfs", "client", ",", "final", "datanode", "info", "datanodes", ")", "throws", "i", "o", "exception", "{", "assert", "equals", "(", "2", ",", "datanodes", "length", ")", ";", "final", "long", "write", "timeout", "=", "dfs", "client", "get", "datanode", "write", "timeout", "(", "datanodes", "length", ")", ";", "try", "(", "socket", "s", "=", "data", "streamer", "create", "socket", "for", "pipeline", "(", "datanodes", "[", "0", "]", ",", "datanodes", "length", ",", "dfs", "client", ")", ";", "data", "output", "stream", "out", "=", "new", "data", "output", "stream", "(", "new", "buffered", "output", "stream", "(", "net", "utils", "get", "output", "stream", "(", "s", ",", "write", "timeout", ")", ",", "d", "f", "s", "util", "client", "get", "small", "buffer", "size", "(", "dfs", "client", "get", "configuration", "(", ")", ")", ")", ")", ";", "data", "input", "stream", "in", "=", "new", "data", "input", "stream", "(", "net", "utils", "get", "input", "stream", "(", "s", ")", ")", ")", "{", "/", "/", "send", "the", "request", "new", "sender", "(", "out", ")", "transfer", "block", "(", "b", ",", "new", "token", "<", "block", "token", "identifier", ">", "(", ")", ",", "dfs", "client", "client", "name", ",", "new", "datanode", "info", "[", "]", "{", "datanodes", "[", "1", "]", "}", ",", "new", "storage", "type", "[", "]", "{", "storage", "type", "default", "}", ",", "new", "string", "[", "0", "]", ")", ";", "out", "flush", "(", ")", ";", "return", "block", "op", "response", "proto", "parse", "delimited", "from", "(", "in", ")", ";", "}", "}" ]
[ "copy", "the", "contents", "of", "the", "given", "reader", "into", "a", "string", "closes", "the", "reader", "when", "done" ]
[ "public", "static", "string", "copy", "to", "string", "(", "@", "nullable", "reader", "in", ")", "throws", "i", "o", "exception", "{", "if", "(", "in", "=", "=", "null", ")", "{", "return", "\"", "\"", ";", "}", "string", "writer", "out", "=", "new", "string", "writer", "(", "buffer", "size", ")", ";", "copy", "(", "in", ",", "out", ")", ";", "return", "out", "to", "string", "(", ")", ";", "}" ]
[ "send", "a", "request", "message", "and", "receive", "the", "reply", "from", "the", "given", "destination" ]
[ "message", "<", "?", ">", "send", "and", "receive", "(", "string", "destination", "name", ",", "message", "<", "?", ">", "request", "message", ")", "throws", "messaging", "exception", ";" ]
[ "returns", "a", "{", "@", "code", "tree", "range", "set", "}", "representing", "the", "union", "of", "the", "specified", "ranges", "this", "is", "the", "smallest", "{", "@", "code", "range", "set", "}", "which", "encloses", "each", "of", "the", "specified", "ranges", "an", "element", "will", "be", "contained", "in", "this", "{", "@", "code", "range", "set", "}", "if", "and", "only", "if", "it", "is", "contained", "in", "at", "least", "one", "{", "@", "code", "range", "}", "in", "{", "@", "code", "ranges", "}" ]
[ "public", "static", "<", "c", "extends", "comparable", "<", "?", ">", ">", "tree", "range", "set", "<", "c", ">", "create", "(", "iterable", "<", "range", "<", "c", ">", ">", "ranges", ")", "{", "tree", "range", "set", "<", "c", ">", "result", "=", "create", "(", ")", ";", "result", "add", "all", "(", "ranges", ")", ";", "return", "result", ";", "}" ]
[ "test", "the", "lazy", "down", "-", "conversion", "path", "in", "the", "presence", "of", "commit", "markers", "when", "converting", "to", "v0", "or", "v1", ",", "these", "batches", "are", "dropped", "if", "there", "happen", "to", "be", "no", "more", "batches", "left", "to", "convert", ",", "we", "must", "get", "an", "overflow", "message", "batch", "after", "conversion" ]
[ "public", "void", "test", "conversion", "of", "commit", "marker", "(", ")", "throws", "i", "o", "exception", "{", "memory", "records", "records", "to", "convert", "=", "memory", "records", "with", "end", "transaction", "marker", "(", "0", ",", "time", "system", "milliseconds", "(", ")", ",", "record", "batch", "no", "partition", "leader", "epoch", ",", "1", ",", "(", "short", ")", "1", ",", "new", "end", "transaction", "marker", "(", "control", "record", "type", "commit", ",", "0", ")", ")", ";", "memory", "records", "converted", "records", "=", "convert", "records", "(", "records", "to", "convert", ",", "(", "byte", ")", "1", ",", "records", "to", "convert", "size", "in", "bytes", "(", ")", ")", ";", "byte", "buffer", "buffer", "=", "converted", "records", "buffer", "(", ")", ";", "/", "/", "read", "the", "offset", "and", "the", "batch", "length", "buffer", "get", "long", "(", ")", ";", "int", "size", "of", "converted", "records", "=", "buffer", "get", "int", "(", ")", ";", "/", "/", "assert", "we", "got", "an", "overflow", "message", "batch", "assert", "true", "(", "size", "of", "converted", "records", ">", "buffer", "limit", "(", ")", ")", ";", "assert", "false", "(", "converted", "records", "batch", "iterator", "(", ")", "has", "next", "(", ")", ")", ";", "}" ]
[ "we", "'", "re", "informed", "that", "a", "block", "is", "no", "longer", "valid", "delete", "it" ]
[ "public", "void", "invalidate", "(", "string", "bpid", ",", "block", "invalid", "blks", "[", "]", ")", "throws", "i", "o", "exception", "{", "invalidate", "(", "bpid", ",", "invalid", "blks", ",", "true", ")", ";", "}" ]
[ "take", "an", "array", "of", "strings", "and", "split", "each", "element", "based", "on", "the", "given", "delimiter", "a", "{", "@", "code", "properties", "}", "instance", "is", "then", "generated", ",", "with", "the", "left", "of", "the", "delimiter", "providing", "the", "key", ",", "and", "the", "right", "of", "the", "delimiter", "providing", "the", "value", "will", "trim", "both", "the", "key", "and", "value", "before", "adding", "them", "to", "the", "{", "@", "code", "properties", "}" ]
[ "public", "static", "properties", "split", "array", "elements", "into", "properties", "(", "string", "[", "]", "array", ",", "string", "delimiter", ")", "{", "return", "split", "array", "elements", "into", "properties", "(", "array", ",", "delimiter", ",", "null", ")", ";", "}" ]
[ "sets", "a", "custom", "{", "@", "code", "equivalence", "}", "strategy", "for", "comparing", "keys", "by", "default", ",", "the", "cache", "uses", "{", "@", "link", "equivalence", "#", "identity", "}", "to", "determine", "key", "equality", "when", "{", "@", "link", "#", "weak", "keys", "}", "is", "specified", ",", "and", "{", "@", "link", "equivalence", "#", "equals", "(", ")", "}", "otherwise" ]
[ "cache", "builder", "<", "k", ",", "v", ">", "key", "equivalence", "(", "equivalence", "<", "object", ">", "equivalence", ")", "{", "check", "state", "(", "key", "equivalence", "=", "=", "null", ",", "\"", "key", "equivalence", "was", "already", "set", "to", "%", "s", "\"", ",", "key", "equivalence", ")", ";", "key", "equivalence", "=", "check", "not", "null", "(", "equivalence", ")", ";", "return", "this", ";", "}" ]
[ "start", "the", "activity" ]
[ "public", "static", "void", "start", "activity", "(", "@", "non", "null", "final", "bundle", "extras", ",", "@", "non", "null", "final", "activity", "activity", ",", "@", "non", "null", "final", "string", "pkg", ",", "@", "non", "null", "final", "string", "cls", ",", "@", "anim", "res", "final", "int", "enter", "anim", ",", "@", "anim", "res", "final", "int", "exit", "anim", ")", "{", "start", "activity", "(", "activity", ",", "extras", ",", "pkg", ",", "cls", ",", "get", "options", "bundle", "(", "activity", ",", "enter", "anim", ",", "exit", "anim", ")", ")", ";", "if", "(", "build", "version", "sdk", "int", "<", "build", "version", "codes", "jelly", "bean", ")", "{", "activity", "override", "pending", "transition", "(", "enter", "anim", ",", "exit", "anim", ")", ";", "}", "}" ]
[ "projects", "a", "{", "@", "link", "tuple", "}", "{", "@", "link", "data", "set", "}", "to", "the", "previously", "selected", "fields" ]
[ "public", "<", "t0", ">", "project", "operator", "<", "t", ",", "tuple", "1", "<", "t0", ">", ">", "project", "tuple", "1", "(", ")", "{", "type", "information", "<", "?", ">", "[", "]", "f", "types", "=", "extract", "field", "types", "(", "field", "indexes", ",", "ds", "get", "type", "(", ")", ")", ";", "tuple", "type", "info", "<", "tuple", "1", "<", "t0", ">", ">", "t", "type", "=", "new", "tuple", "type", "info", "<", "tuple", "1", "<", "t0", ">", ">", "(", "f", "types", ")", ";", "return", "new", "project", "operator", "<", "t", ",", "tuple", "1", "<", "t0", ">", ">", "(", "this", "ds", ",", "this", "field", "indexes", ",", "t", "type", ")", ";", "}" ]
[ "subclasses", "may", "need", "to", "override", "this", "if", "they", "want", "to", "perform", "custom", "behaviour", "in", "around", "advice", "however", ",", "subclasses", "should", "invoke", "this", "method", ",", "which", "handles", "introduced", "interfaces", "and", "forwarding", "to", "the", "target" ]
[ "public", "object", "invoke", "(", "method", "invocation", "mi", ")", "throws", "throwable", "{", "if", "(", "is", "method", "on", "introduced", "interface", "(", "mi", ")", ")", "{", "object", "delegate", "=", "get", "introduction", "delegate", "for", "(", "mi", "get", "this", "(", ")", ")", ";", "/", "/", "using", "the", "following", "method", "rather", "than", "direct", "reflection", ",", "/", "/", "we", "get", "correct", "handling", "of", "invocation", "target", "exception", "/", "/", "if", "the", "introduced", "method", "throws", "an", "exception", "object", "ret", "val", "=", "aop", "utils", "invoke", "joinpoint", "using", "reflection", "(", "delegate", ",", "mi", "get", "method", "(", ")", ",", "mi", "get", "arguments", "(", ")", ")", ";", "/", "/", "massage", "return", "value", "if", "possible", ":", "if", "the", "delegate", "returned", "itself", ",", "/", "/", "we", "really", "want", "to", "return", "the", "proxy", "if", "(", "ret", "val", "=", "=", "delegate", "&", "&", "mi", "instanceof", "proxy", "method", "invocation", ")", "{", "ret", "val", "=", "(", "(", "proxy", "method", "invocation", ")", "mi", ")", "get", "proxy", "(", ")", ";", "}", "return", "ret", "val", ";", "}", "return", "do", "proceed", "(", "mi", ")", ";", "}" ]
[ "gets", "the", "{", "@", "link", "standard", "socket", "options", "#", "so", "rcvbuf", "}", "option" ]
[ "int", "get", "receive", "buffer", "size", "(", ")", ";" ]
[ "utility", "method", "to", "fetch", "the", "zk", "a", "c", "ls", "from", "the", "configuration" ]
[ "public", "static", "list", "<", "acl", ">", "get", "z", "k", "acls", "(", "configuration", "conf", ")", "throws", "i", "o", "exception", "{", "/", "/", "parse", "authentication", "from", "configuration", "string", "zk", "acl", "conf", "=", "conf", "get", "(", "common", "configuration", "keys", "zk", "acl", ",", "common", "configuration", "keys", "zk", "acl", "default", ")", ";", "try", "{", "zk", "acl", "conf", "=", "z", "k", "util", "resolve", "conf", "indirection", "(", "zk", "acl", "conf", ")", ";", "return", "z", "k", "util", "parse", "a", "c", "ls", "(", "zk", "acl", "conf", ")", ";", "}", "catch", "(", "i", "o", "exception", "|", "z", "k", "util", "bad", "acl", "format", "exception", "e", ")", "{", "log", "error", "(", "\"", "couldn", "'", "t", "read", "a", "c", "ls", "based", "on", "{", "}", "\"", ",", "common", "configuration", "keys", "zk", "acl", ")", ";", "throw", "e", ";", "}", "}" ]
[ "check", "dead", "node", "periodically" ]
[ "private", "void", "check", "dead", "nodes", "(", ")", "{", "set", "<", "datanode", "info", ">", "datanode", "infos", "=", "clear", "and", "get", "detected", "dead", "nodes", "(", ")", ";", "for", "(", "datanode", "info", "datanode", "info", ":", "datanode", "infos", ")", "{", "if", "(", "!", "dead", "nodes", "probe", "queue", "offer", "(", "datanode", "info", ")", ")", "{", "log", "debug", "(", "\"", "skip", "to", "add", "dead", "node", "{", "}", "to", "check", "\"", "+", "\"", "since", "the", "probe", "queue", "is", "full", "\"", ",", "datanode", "info", ")", ";", "break", ";", "}", "else", "{", "log", "debug", "(", "\"", "add", "dead", "node", "to", "check", ":", "{", "}", "\"", ",", "datanode", "info", ")", ";", "}", "}", "state", "=", "state", "idle", ";", "}" ]
[ "create", "a", "{", "@", "link", "s", "a", "x", "parser", "factory", "}", "that", "is", "not", "susceptible", "to", "xxe", "this", "configures", "the", "factory", "to", "ignore", "external", "entities" ]
[ "public", "static", "s", "a", "x", "parser", "factory", "create", "secure", "s", "a", "x", "parser", "factory", "(", "boolean", "needs", "d", "t", "d", ")", "{", "s", "a", "x", "parser", "factory", "factory", "=", "s", "a", "x", "parser", "factory", "new", "instance", "(", ")", ";", "try", "{", "factory", "set", "feature", "(", "x", "m", "l", "constants", "feature", "secure", "processing", ",", "true", ")", ";", "/", "/", "xml", "program", "import", "uses", "dtd", "if", "(", "!", "needs", "d", "t", "d", ")", "{", "factory", "set", "feature", "(", "feature", "disallow", "dtd", ",", "true", ")", ";", "}", "factory", "set", "feature", "(", "feature", "external", "general", "entities", ",", "false", ")", ";", "factory", "set", "feature", "(", "feature", "external", "parameter", "entities", ",", "false", ")", ";", "}", "catch", "(", "s", "a", "x", "not", "recognized", "exception", "|", "s", "a", "x", "not", "supported", "exception", "|", "parser", "configuration", "exception", "e", ")", "{", "throw", "new", "runtime", "exception", "(", "\"", "cannot", "set", "xml", "parsing", "feature", "for", "secure", "processing", ":", "\"", ",", "e", ")", ";", "}", "return", "factory", ";", "}" ]
[ "block", "recovery", "02", "13", "two", "replicas", "are", "rwr" ]
[ "public", "void", "test", "r", "w", "r", "replicas", "(", ")", "throws", "i", "o", "exception", "{", "if", "(", "log", "is", "debug", "enabled", "(", ")", ")", "{", "log", "debug", "(", "\"", "running", "\"", "+", "generic", "test", "utils", "get", "method", "name", "(", ")", ")", ";", "}", "replica", "recovery", "info", "replica", "1", "=", "new", "replica", "recovery", "info", "(", "block", "id", ",", "replica", "len1", ",", "gen", "stamp", "-", "1", ",", "replica", "state", "rwr", ")", ";", "replica", "recovery", "info", "replica", "2", "=", "new", "replica", "recovery", "info", "(", "block", "id", ",", "replica", "len2", ",", "gen", "stamp", "-", "2", ",", "replica", "state", "rwr", ")", ";", "inter", "datanode", "protocol", "dn", "1", "=", "mock", "(", "inter", "datanode", "protocol", "class", ")", ";", "inter", "datanode", "protocol", "dn", "2", "=", "mock", "(", "inter", "datanode", "protocol", "class", ")", ";", "long", "min", "len", "=", "math", "min", "(", "replica", "len1", ",", "replica", "len2", ")", ";", "test", "sync", "replicas", "(", "replica", "1", ",", "replica", "2", ",", "dn", "1", ",", "dn", "2", ",", "min", "len", ")", ";", "verify", "(", "dn", "1", ")", "update", "replica", "under", "recovery", "(", "block", ",", "recovery", "id", ",", "block", "id", ",", "min", "len", ")", ";", "verify", "(", "dn", "2", ")", "update", "replica", "under", "recovery", "(", "block", ",", "recovery", "id", ",", "block", "id", ",", "min", "len", ")", ";", "}" ]
[ "returns", "true", "if", "the", "configuration", "of", "this", "subsystem", "becomes", "relevant", "unless", "this", "option", "is", "relevant", ",", "we", "don", "'", "t", "let", "users", "choose", "this" ]
[ "public", "boolean", "is", "relevant", "(", ")", "{", "return", "jenkins", "has", "permission", "(", "jenkins", "administer", ")", "&", "&", "jenkins", "is", "use", "security", "(", ")", ";", "}" ]
[ "initiates", "an", "orderly", "shutdown", "of", "the", "transport", "existing", "streams", "continue", ",", "but", "new", "streams", "will", "eventually", "begin", "failing", "new", "streams", "\"", "eventually", "\"", "begin", "failing", "because", "shutdown", "may", "need", "to", "be", "processed", "on", "a", "separate", "thread", "may", "only", "be", "called", "once" ]
[ "void", "shutdown", "(", ")", ";" ]
[ "test", "the", "compatible", "when", "enabledisable", "digest", ":", "check", "that", "txns", "which", "were", "written", "with", "digest", "can", "be", "read", "when", "digest", "is", "disabled", "check", "that", "txns", "which", "were", "written", "without", "digest", "can", "be", "read", "when", "digest", "is", "enabled" ]
[ "public", "void", "check", "txn", "compatible", "with", "and", "without", "digest", "(", ")", "throws", "exception", "{", "/", "/", "1", "start", "server", "with", "digest", "disabled", "restart", "server", "with", "digest", "flag", "(", "false", ")", ";", "/", "/", "trigger", "some", "write", "ops", "map", "<", "string", ",", "string", ">", "expected", "nodes", "=", "perform", "operations", "(", "create", "client", "(", ")", ",", "\"", "/", "p", "1", "\"", ")", ";", "/", "/", "reset", "the", "mismatch", "metrics", "simple", "counter", "digest", "mistaches", "count", "=", "(", "simple", "counter", ")", "server", "metrics", "get", "metrics", "(", ")", "digest", "mismatches", "count", ";", "digest", "mistaches", "count", "reset", "(", ")", ";", "/", "/", "2", "restart", "server", "with", "digest", "enabled", "restart", "server", "with", "digest", "flag", "(", "true", ")", ";", "/", "/", "make", "sure", "the", "data", "wrote", "when", "digest", "was", "disabled", "can", "be", "/", "/", "successfully", "read", "check", "nodes", "(", "expected", "nodes", ")", ";", "map", "<", "string", ",", "string", ">", "expected", "nodes", "1", "=", "perform", "operations", "(", "create", "client", "(", ")", ",", "\"", "/", "p", "2", "\"", ")", ";", "/", "/", "make", "sure", "there", "is", "no", "digest", "mismatch", "assert", "equals", "(", "0", ",", "digest", "mistaches", "count", "get", "(", ")", ")", ";", "/", "/", "3", "disable", "the", "digest", "again", "and", "make", "sure", "everything", "is", "fine", "restart", "server", "with", "digest", "flag", "(", "false", ")", ";", "check", "nodes", "(", "expected", "nodes", ")", ";", "check", "nodes", "(", "expected", "nodes", "1", ")", ";", "}" ]
[ "model", "tests", "for", "enum", "test" ]
[ "public", "void", "test", "enum", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "enum", "test", "}" ]
[ "creates", "a", "new", "{", "@", "link", "input", "stream", "}", "that", "can", "be", "used", "to", "read", "the", "given", "blob", "starting", "from", "a", "specific", "{", "@", "code", "position", "}", "in", "the", "blob", "the", "{", "@", "code", "length", "}", "is", "an", "indication", "of", "the", "number", "of", "bytes", "that", "are", "expected", "to", "be", "read", "from", "the", "{", "@", "link", "input", "stream", "}" ]
[ "input", "stream", "read", "blob", "(", "string", "blob", "name", ",", "long", "position", ",", "long", "length", ")", "throws", "i", "o", "exception", ";" ]
[ "if", "the", "specified", "instruction", "is", "contained", "within", "a", "delay", "slot", ",", "or", "has", "delay", "slots", ",", "the", "maximum", "address", "of", "the", "last", "delay", "slot", "instruction", "will", "be", "returned", "if", "a", "normal", "instruction", "is", "specified", "the", "instructions", "maximum", "address", "is", "returned" ]
[ "public", "static", "address", "get", "end", "of", "delay", "slots", "(", "instruction", "instr", ")", "{", "listing", "listing", "=", "instr", "get", "program", "(", ")", "get", "listing", "(", ")", ";", "address", "max", "addr", "=", "instr", "get", "max", "address", "(", ")", ";", "try", "{", "instruction", "next", "instr", "=", "listing", "get", "instruction", "at", "(", "max", "addr", "add", "no", "wrap", "(", "1", ")", ")", ";", "while", "(", "next", "instr", "!", "=", "null", "&", "&", "next", "instr", "is", "in", "delay", "slot", "(", ")", ")", "{", "max", "addr", "=", "next", "instr", "get", "max", "address", "(", ")", ";", "next", "instr", "=", "listing", "get", "instruction", "at", "(", "max", "addr", "add", "no", "wrap", "(", "1", ")", ")", ";", "}", "}", "catch", "(", "address", "overflow", "exception", "e", ")", "{", "/", "/", "ignore", "}", "return", "max", "addr", ";", "}" ]
[ "declares", "that", "the", "implementation", "of", "the", "associated", "rule", "class", "requires", "the", "given", "fragments", "to", "be", "present", "in", "this", "rule", "'", "s", "target", "configuration", "only", "in", "contrast", "to", "{", "@", "link", "#", "requires", "configuration", "fragments", "(", "collection", ")", "}", ",", "this", "method", "takes", "the", "names", "of", "fragments", "(", "as", "determined", "by", "{", "@", "link", "starlark", "builtin", "}", ")", "instead", "of", "their", "classes", "the", "value", "is", "inherited", "by", "subclasses" ]
[ "public", "builder", "requires", "configuration", "fragments", "by", "starlark", "builtin", "name", "(", "collection", "<", "string", ">", "configuration", "fragment", "names", ")", "{", "requires", "configuration", "fragments", "by", "starlark", "builtin", "name", "(", "no", "transition", "instance", ",", "configuration", "fragment", "names", ")", ";", "return", "this", ";", "}" ]
[ "for", "each", "partition", "which", "needs", "validation", ",", "make", "an", "asynchronous", "request", "to", "get", "the", "end", "-", "offsets", "for", "the", "partition", "with", "the", "epoch", "less", "than", "or", "equal", "to", "the", "epoch", "the", "partition", "last", "saw", "requests", "are", "grouped", "by", "node", "for", "efficiency" ]
[ "private", "void", "validate", "offsets", "async", "(", "map", "<", "topic", "partition", ",", "fetch", "position", ">", "partitions", "to", "validate", ")", "{", "final", "map", "<", "node", ",", "map", "<", "topic", "partition", ",", "fetch", "position", ">", ">", "regrouped", "=", "regroup", "fetch", "positions", "by", "leader", "(", "partitions", "to", "validate", ")", ";", "long", "next", "reset", "time", "ms", "=", "time", "milliseconds", "(", ")", "+", "request", "timeout", "ms", ";", "regrouped", "for", "each", "(", "(", "node", ",", "fetch", "positions", ")", "-", ">", "{", "if", "(", "node", "is", "empty", "(", ")", ")", "{", "metadata", "request", "update", "(", ")", ";", "return", ";", "}", "node", "api", "versions", "node", "api", "versions", "=", "api", "versions", "get", "(", "node", "id", "string", "(", ")", ")", ";", "if", "(", "node", "api", "versions", "=", "=", "null", ")", "{", "client", "try", "connect", "(", "node", ")", ";", "return", ";", "}", "if", "(", "!", "has", "usable", "offset", "for", "leader", "epoch", "version", "(", "node", "api", "versions", ")", ")", "{", "log", "debug", "(", "\"", "skipping", "validation", "of", "fetch", "offsets", "for", "partitions", "{", "}", "since", "the", "broker", "does", "not", "\"", "+", "\"", "support", "the", "required", "protocol", "version", "(", "introduced", "in", "kafka", "2", "3", ")", "\"", ",", "fetch", "positions", "key", "set", "(", ")", ")", ";", "for", "(", "topic", "partition", "partition", ":", "fetch", "positions", "key", "set", "(", ")", ")", "{", "subscriptions", "complete", "validation", "(", "partition", ")", ";", "}", "return", ";", "}", "subscriptions", "set", "next", "allowed", "retry", "(", "fetch", "positions", "key", "set", "(", ")", ",", "next", "reset", "time", "ms", ")", ";", "request", "future", "<", "offset", "for", "epoch", "result", ">", "future", "=", "offsets", "for", "leader", "epoch", "client", "send", "async", "request", "(", "node", ",", "fetch", "positions", ")", ";", "future", "add", "listener", "(", "new", "request", "future", "listener", "<", "offset", "for", "epoch", "result", ">", "(", ")", "{", "@", "override", "public", "void", "on", "success", "(", "offset", "for", "epoch", "result", "offsets", "result", ")", "{", "list", "<", "subscription", "state", "log", "truncation", ">", "truncations", "=", "new", "array", "list", "<", ">", "(", ")", ";", "if", "(", "!", "offsets", "result", "partitions", "to", "retry", "(", ")", "is", "empty", "(", ")", ")", "{", "subscriptions", "set", "next", "allowed", "retry", "(", "offsets", "result", "partitions", "to", "retry", "(", ")", ",", "time", "milliseconds", "(", ")", "+", "retry", "backoff", "ms", ")", ";", "metadata", "request", "update", "(", ")", ";", "}", "/", "/", "for", "each", "offsets", "for", "leader", "response", ",", "check", "if", "the", "end", "-", "offset", "is", "lower", "than", "our", "current", "offset", "/", "/", "for", "the", "partition", "if", "so", ",", "it", "means", "we", "have", "experienced", "log", "truncation", "and", "need", "to", "reposition", "/", "/", "that", "partition", "'", "s", "offset", "/", "/", "/", "/", "in", "addition", ",", "check", "whether", "the", "returned", "offset", "and", "epoch", "are", "valid", "if", "not", ",", "then", "we", "should", "reset", "/", "/", "its", "offset", "if", "reset", "policy", "is", "configured", ",", "or", "throw", "out", "of", "range", "exception", "offsets", "result", "end", "offsets", "(", ")", "for", "each", "(", "(", "topic", "partition", ",", "resp", "end", "offset", ")", "-", ">", "{", "fetch", "position", "request", "position", "=", "fetch", "positions", "get", "(", "topic", "partition", ")", ";", "optional", "<", "subscription", "state", "log", "truncation", ">", "truncation", "opt", "=", "subscriptions", "maybe", "complete", "validation", "(", "topic", "partition", ",", "request", "position", ",", "resp", "end", "offset", ")", ";", "truncation", "opt", "if", "present", "(", "truncations", ":", ":", "add", ")", ";", "}", ")", ";", "if", "(", "!", "truncations", "is", "empty", "(", ")", ")", "{", "maybe", "set", "offset", "for", "leader", "exception", "(", "build", "log", "truncation", "exception", "(", "truncations", ")", ")", ";", "}", "}", "@", "override", "public", "void", "on", "failure", "(", "runtime", "exception", "e", ")", "{", "subscriptions", "request", "failed", "(", "fetch", "positions", "key", "set", "(", ")", ",", "time", "milliseconds", "(", ")", "+", "retry", "backoff", "ms", ")", ";", "metadata", "request", "update", "(", ")", ";", "if", "(", "!", "(", "e", "instanceof", "retriable", "exception", ")", ")", "{", "maybe", "set", "offset", "for", "leader", "exception", "(", "e", ")", ";", "}", "}", "}", ")", ";", "}", ")", ";", "}" ]
[ "returns", "whether", "this", "reference", "value", "and", "the", "given", "reference", "value", "are", "different" ]
[ "public", "final", "int", "not", "equal", "(", "reference", "value", "other", ")", "{", "return", "-", "equal", "(", "other", ")", ";", "}" ]
[ "verify", "the", "number", "of", "items", "in", "the", "tree", "the", "root", "has", "6", "children", "so", "we", "expect", "a", "{", "@", "link", "node", "#", "get", "tree", "size", "(", ")", "}", "of", "7", "{", "@", "link", "node", "}", "s", "in", "total" ]
[ "public", "void", "test", "tree", "size", "(", ")", "{", "assert", "equals", "(", "7", ",", "tree", "root", "get", "tree", "size", "(", ")", ")", ";", "}" ]
[ "{", "@", "inherit", "doc", "}" ]
[ "protected", "void", "write", "to", "0", "(", "dex", "file", "file", ",", "annotated", "output", "out", ")", "{", "boolean", "annotates", "=", "out", "annotates", "(", ")", ";", "int", "class", "off", "=", "offsetted", "item", "get", "absolute", "offset", "or", "0", "(", "class", "annotations", ")", ";", "int", "fields", "size", "=", "list", "size", "(", "field", "annotations", ")", ";", "int", "methods", "size", "=", "list", "size", "(", "method", "annotations", ")", ";", "int", "parameters", "size", "=", "list", "size", "(", "parameter", "annotations", ")", ";", "if", "(", "annotates", ")", "{", "out", "annotate", "(", "0", ",", "offset", "string", "(", ")", "+", "\"", "annotations", "directory", "\"", ")", ";", "out", "annotate", "(", "4", ",", "\"", "class", "annotations", "off", ":", "\"", "+", "hex", "u", "4", "(", "class", "off", ")", ")", ";", "out", "annotate", "(", "4", ",", "\"", "fields", "size", ":", "\"", "+", "hex", "u", "4", "(", "fields", "size", ")", ")", ";", "out", "annotate", "(", "4", ",", "\"", "methods", "size", ":", "\"", "+", "hex", "u", "4", "(", "methods", "size", ")", ")", ";", "out", "annotate", "(", "4", ",", "\"", "parameters", "size", ":", "\"", "+", "hex", "u", "4", "(", "parameters", "size", ")", ")", ";", "}", "out", "write", "int", "(", "class", "off", ")", ";", "out", "write", "int", "(", "fields", "size", ")", ";", "out", "write", "int", "(", "methods", "size", ")", ";", "out", "write", "int", "(", "parameters", "size", ")", ";", "if", "(", "fields", "size", "!", "=", "0", ")", "{", "collections", "sort", "(", "field", "annotations", ")", ";", "if", "(", "annotates", ")", "{", "out", "annotate", "(", "0", ",", "\"", "fields", ":", "\"", ")", ";", "}", "for", "(", "field", "annotation", "struct", "item", ":", "field", "annotations", ")", "{", "item", "write", "to", "(", "file", ",", "out", ")", ";", "}", "}", "if", "(", "methods", "size", "!", "=", "0", ")", "{", "collections", "sort", "(", "method", "annotations", ")", ";", "if", "(", "annotates", ")", "{", "out", "annotate", "(", "0", ",", "\"", "methods", ":", "\"", ")", ";", "}", "for", "(", "method", "annotation", "struct", "item", ":", "method", "annotations", ")", "{", "item", "write", "to", "(", "file", ",", "out", ")", ";", "}", "}", "if", "(", "parameters", "size", "!", "=", "0", ")", "{", "collections", "sort", "(", "parameter", "annotations", ")", ";", "if", "(", "annotates", ")", "{", "out", "annotate", "(", "0", ",", "\"", "parameters", ":", "\"", ")", ";", "}", "for", "(", "parameter", "annotation", "struct", "item", ":", "parameter", "annotations", ")", "{", "item", "write", "to", "(", "file", ",", "out", ")", ";", "}", "}", "}" ]
[ "calls", "the", "multi", "term", "vectors", "api", "see", "<", "a", "href", "=", "\"", "https", ":", "www", "elastic", "coguideenelasticsearchreferencecurrentdocs", "-", "multi", "-", "termvectors", "html", "\"", ">", "multi", "term", "vectors", "api", "on", "elastic", "co" ]
[ "public", "final", "multi", "term", "vectors", "response", "mtermvectors", "(", "multi", "term", "vectors", "request", "request", ",", "request", "options", "options", ")", "throws", "i", "o", "exception", "{", "return", "perform", "request", "and", "parse", "entity", "(", "request", ",", "request", "converters", ":", ":", "mterm", "vectors", ",", "options", ",", "multi", "term", "vectors", "response", ":", ":", "from", "x", "content", ",", "empty", "set", "(", ")", ")", ";", "}" ]
[ "test", "the", "property", "'", "name", "number", "'" ]
[ "public", "void", "name", "number", "test", "(", ")", "{", "/", "/", "todo", ":", "test", "name", "number", "}" ]
[ "{", "@", "inherit", "doc", "}", "the", "default", "implementation", "does", "nothing" ]
[ "@", "override", "public", "void", "enter", "query", "specification", "(", "sql", "base", "parser", "query", "specification", "context", "ctx", ")", "{", "}" ]
[ "manager", "for", "pattern", "define", "it", "with", "a", "factorial", "function" ]
[ "public", "static", "trampoline", "<", "integer", ">", "loop", "(", "int", "times", ",", "int", "prod", ")", "{", "if", "(", "times", "=", "=", "0", ")", "{", "return", "trampoline", "done", "(", "prod", ")", ";", "}", "else", "{", "return", "trampoline", "more", "(", "(", ")", "-", ">", "loop", "(", "times", "-", "1", ",", "prod", "*", "times", ")", ")", ";", "}", "}" ]
[ "modify", "the", "current", "context", "register", "value", "at", "the", "specified", "address", "if", "current", "disassembly", "flow", "address", "equals", "specified", "address", "the", "current", "disassembly", "context", "will", "be", "changed", ",", "otherwise", "the", "future", "flow", "state", "will", "be", "changed", "this", "differs", "from", "{", "@", "link", "#", "set", "value", "(", "register", ",", "address", ",", "big", "integer", ")", "}", "in", "that", "is", "can", "affect", "the", "current", "context", "state", "at", "the", "current", "address", "in", "a", "non", "-", "delayed", "fashion", "use", "this", "method", "if", "keeping", "separate", "flows", "from", "different", "flow", "from", "addresses", "is", "not", "important" ]
[ "public", "void", "set", "context", "register", "value", "(", "register", "value", "value", ",", "address", "address", ")", "{", "set", "context", "register", "value", "(", "value", ",", "address", "no", "address", ",", "address", ")", ";", "}" ]
[ "{", "@", "inherit", "doc", "}", "the", "default", "implementation", "does", "nothing" ]
[ "@", "override", "public", "void", "exit", "function", "template", "(", "sql", "base", "parser", "function", "template", "context", "ctx", ")", "{", "}" ]
[ "tests", "nested", "repeatable", "and", "use", "of", "@", "data", "bound", "constructor", "to", "process", "form", "data" ]
[ "public", "void", "test", "nested", "enabled", "top", "button", "outer", "(", ")", "throws", "exception", "{", "html", "page", "p", "=", "create", "web", "client", "(", ")", "go", "to", "(", "\"", "self", "/", "test", "nested", "top", "button", "outer", "\"", ")", ";", "html", "form", "f", "=", "p", "get", "form", "by", "name", "(", "\"", "config", "\"", ")", ";", "try", "{", "click", "button", "(", "p", ",", "f", ",", "\"", "add", "\"", ",", "true", ")", ";", "f", "get", "input", "by", "value", "(", "\"", "\"", ")", "set", "value", "attribute", "(", "\"", "title", "one", "\"", ")", ";", "click", "button", "(", "p", ",", "f", ",", "\"", "add", "foo", "\"", ",", "true", ")", ";", "f", "get", "input", "by", "value", "(", "\"", "\"", ")", "set", "value", "attribute", "(", "\"", "txt", "one", "\"", ")", ";", "click", "button", "(", "p", ",", "f", ",", "\"", "add", "foo", "\"", ",", "false", ")", ";", "f", "get", "input", "by", "value", "(", "\"", "\"", ")", "set", "value", "attribute", "(", "\"", "txt", "two", "\"", ")", ";", "f", "get", "inputs", "by", "name", "(", "\"", "bool", "\"", ")", "get", "(", "1", ")", "click", "(", ")", ";", "click", "button", "(", "p", ",", "f", ",", "\"", "add", "\"", ",", "false", ")", ";", "f", "get", "input", "by", "value", "(", "\"", "\"", ")", "set", "value", "attribute", "(", "\"", "title", "two", "\"", ")", ";", "f", "get", "elements", "by", "tag", "name", "(", "\"", "button", "\"", ")", "get", "(", "2", ")", "click", "(", ")", ";", "/", "/", "2nd", "\"", "add", "foo", "\"", "button", "f", "get", "input", "by", "value", "(", "\"", "\"", ")", "set", "value", "attribute", "(", "\"", "txt", "2", "1", "\"", ")", ";", "}", "catch", "(", "exception", "e", ")", "{", "system", "err", "println", "(", "\"", "html", "at", "time", "of", "failure", ":", "\\", "n", "\"", "+", "p", "get", "body", "(", ")", "as", "xml", "(", ")", ")", ";", "throw", "e", ";", "}", "bind", "class", "=", "foo", "list", "class", ";", "submit", "(", "f", ")", ";", "assert", "equals", "(", "\"", "[", "foo", "list", ":", "title", "one", ":", "[", "foo", ":", "txt", "one", ":", "false", ",", "foo", ":", "txt", "two", ":", "true", "]", ",", "\"", "+", "\"", "foo", "list", ":", "title", "two", ":", "[", "foo", ":", "txt", "2", "1", ":", "false", "]", "]", "\"", ",", "bind", "result", "to", "string", "(", ")", ")", ";", "}" ]
[ "return", "the", "score", "for", "this", "path", "element", ",", "combined", "score", "is", "used", "to", "compare", "parsed", "patterns" ]
[ "public", "int", "get", "score", "(", ")", "{", "return", "0", ";", "}" ]
[ "test", "json", "serialization", "of", "form", "data", "<", "b", ">", "200", "<", "b", ">", "-", "successful", "operation" ]
[ "public", "void", "test", "json", "form", "data", "(", "string", "param", ",", "string", "param", "2", ")", "throws", "i", "o", "exception", "{", "test", "json", "form", "data", "for", "http", "response", "(", "param", ",", "param", "2", ")", ";", "}" ]
[ "gets", "the", "serializer", "that", "recognizes", "the", "current", "serialization", "schema", "of", "the", "state", "this", "is", "the", "serializer", "that", "should", "be", "used", "for", "regular", "state", "serialization", "and", "deserialization", "after", "state", "has", "been", "restored", "if", "this", "provider", "was", "created", "from", "a", "restored", "state", "'", "s", "serializer", "snapshot", ",", "while", "a", "new", "serializer", "(", "with", "a", "new", "schema", ")", "was", "not", "registered", "for", "the", "state", "(", "i", "e", ",", "because", "the", "state", "was", "never", "accessed", "after", "it", "was", "restored", ")", ",", "then", "the", "schema", "of", "state", "remains", "identical", "therefore", ",", "in", "this", "case", ",", "it", "is", "guaranteed", "that", "the", "serializer", "returned", "by", "this", "method", "is", "the", "same", "as", "the", "one", "returned", "by", "{", "@", "link", "#", "previous", "schema", "serializer", "(", ")", "}", "if", "this", "provider", "was", "created", "from", "a", "serializer", "instance", ",", "then", "this", "always", "returns", "the", "that", "same", "serializer", "instance", "if", "later", "on", "a", "snapshot", "of", "the", "previous", "serializer", "is", "supplied", "via", "{", "@", "link", "#", "set", "previous", "serializer", "snapshot", "for", "restored", "state", "(", "type", "serializer", "snapshot", ")", "}", ",", "then", "the", "initially", "supplied", "serializer", "instance", "will", "be", "checked", "for", "compatibility" ]
[ "public", "final", "type", "serializer", "<", "t", ">", "current", "schema", "serializer", "(", ")", "{", "if", "(", "registered", "serializer", "!", "=", "null", ")", "{", "check", "state", "(", "!", "is", "registered", "with", "incompatible", "serializer", ",", "\"", "unable", "to", "provide", "a", "serializer", "with", "the", "current", "schema", ",", "because", "the", "restored", "state", "was", "\"", "+", "\"", "registered", "with", "a", "new", "serializer", "that", "has", "incompatible", "schema", "\"", ")", ";", "return", "registered", "serializer", ";", "}", "/", "/", "if", "we", "are", "not", "yet", "registered", "with", "a", "new", "serializer", ",", "/", "/", "we", "can", "just", "use", "the", "restore", "serializer", "to", "read", "/", "write", "the", "state", "return", "previous", "schema", "serializer", "(", ")", ";", "}" ]
[ "set", "the", "session", "attribute", "with", "the", "given", "name", "to", "the", "given", "value", "removes", "the", "session", "attribute", "if", "value", "is", "null", ",", "if", "a", "session", "existed", "at", "all", "does", "not", "create", "a", "new", "session", "if", "not", "necessary", "!" ]
[ "public", "static", "void", "set", "session", "attribute", "(", "http", "servlet", "request", "request", ",", "string", "name", ",", "@", "nullable", "object", "value", ")", "{", "assert", "not", "null", "(", "request", ",", "\"", "request", "must", "not", "be", "null", "\"", ")", ";", "if", "(", "value", "!", "=", "null", ")", "{", "request", "get", "session", "(", ")", "set", "attribute", "(", "name", ",", "value", ")", ";", "}", "else", "{", "http", "session", "session", "=", "request", "get", "session", "(", "false", ")", ";", "if", "(", "session", "!", "=", "null", ")", "{", "session", "remove", "attribute", "(", "name", ")", ";", "}", "}", "}" ]
[ "creates", "a", "new", "server", "-", "side", "{", "@", "link", "ssl", "context", "}" ]
[ "public", "static", "ssl", "context", "new", "server", "context", "(", "file", "cert", "chain", "file", ",", "file", "key", "file", ",", "string", "key", "password", ",", "iterable", "<", "string", ">", "ciphers", ",", "cipher", "suite", "filter", "cipher", "filter", ",", "application", "protocol", "config", "apn", ",", "long", "session", "cache", "size", ",", "long", "session", "timeout", ")", "throws", "s", "s", "l", "exception", "{", "return", "new", "server", "context", "(", "null", ",", "cert", "chain", "file", ",", "key", "file", ",", "key", "password", ",", "ciphers", ",", "cipher", "filter", ",", "apn", ",", "session", "cache", "size", ",", "session", "timeout", ")", ";", "}" ]